Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@plasmicapp/host

Package Overview
Dependencies
Maintainers
1
Versions
247
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@plasmicapp/host - npm Package Compare versions

Comparing version 0.0.23 to 0.0.25

36

dist/element-types.d.ts
import type { Properties } from "csstype";
declare type CSSProperties = Properties<string | number>;
export declare type CSSProperties = Properties<string | number>;
declare type ContainerTags = "a" | "address" | "article" | "aside" | "blockquote" | "button" | "code" | "dd" | "div" | "dl" | "dt" | "form" | "footer" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hgroup" | "label" | "li" | "main" | "nav" | "ol" | "p" | "pre" | "section" | "span" | "ul";
declare type TypographyProps = "fontFamily" | "fontSize" | "fontWeight" | "fontStyle" | "textAlign" | "textTransform" | "lineHeight" | "letterSpacing" | "whiteSpace" | "userSelect";
declare type LayoutProps = "overflow" | "flexDirection" | "justifyContent" | "alignItems" | "alignContent" | "flexWrap" | "flex-column-gap" | "flex-row-gap";
declare type SizeProps = "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight";
declare type PositioningProps = "position" | "top" | "left" | "bottom" | "right" | "zIndex" | "alignSelf" | "justifySelf" | "verticalAlign" | "order" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "paddingLeft" | "paddingRight" | "paddingTop" | "paddingBottom";
declare type EffectProps = "cursor" | "pointerEvents" | "mixBlendMode" | "isolation";
declare type BorderProps = "borderTopColor" | "borderRightColor" | "borderBottomColor" | "borderLeftColor" | "borderTopStyle" | "borderRightStyle" | "borderBottomStyle" | "borderLeftStyle" | "borderTopWidth" | "borderRightWidth" | "borderBottomWidth" | "borderLeftWidth" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomRightRadius" | "borderBottomLeftRadius";
declare type CommonProps = SizeProps | PositioningProps | EffectProps | BorderProps | "opacity";
export declare type TypographyStyles = Pick<CSSProperties, TypographyProps>;
export declare type ContainerStyles = {
[P in LayoutProps]?: P extends keyof CSSProperties ? CSSProperties[P] : string;
};
export declare type CommonStyles = Pick<CSSProperties, CommonProps>;
declare type CommonAttrKeys = "title" | "tabIndex" | "className" | "id" | "aria-label" | "aria-hidden" | "aria-labelledby" | "aria-describedby" | "role";

@@ -26,3 +14,3 @@ declare type PictureAttrKeys = "alt" | "loading" | CommonAttrKeys;

src: string;
styles?: CommonStyles;
styles?: CSSProperties;
attrs?: Attrs<PictureAttrKeys>;

@@ -35,3 +23,3 @@ }

value: string;
styles?: CommonStyles & TypographyStyles;
styles?: CSSProperties;
attrs?: Attrs<LinkAttrKeys>;

@@ -43,3 +31,3 @@ }

value: string;
styles?: CommonStyles & TypographyStyles;
styles?: CSSProperties;
attrs?: Attrs<ButtonAttrKeys>;

@@ -54,3 +42,3 @@ }

value: string;
styles?: CommonStyles & TypographyStyles;
styles?: CSSProperties;
attrs?: Attrs<CommonAttrKeys>;

@@ -63,3 +51,3 @@ }

children?: PlasmicElement | PlasmicElement[];
styles?: CommonStyles & ContainerStyles;
styles?: CSSProperties;
attrs?: Attrs<LinkAttrKeys>;

@@ -71,3 +59,3 @@ }

children?: PlasmicElement | PlasmicElement[];
styles?: CommonStyles & ContainerStyles;
styles?: CSSProperties;
attrs?: Attrs<ButtonAttrKeys>;

@@ -82,3 +70,3 @@ }

children?: PlasmicElement | PlasmicElement[];
styles?: CommonStyles & ContainerStyles;
styles?: CSSProperties;
attrs?: Attrs<CommonAttrKeys>;

@@ -90,3 +78,3 @@ }

value: string;
styles?: CommonStyles & TypographyStyles;
styles?: CSSProperties;
attrs?: Attrs<ButtonAttrKeys>;

@@ -96,3 +84,3 @@ }

type: "input" | "password";
styles?: CommonStyles & TypographyStyles;
styles?: CSSProperties;
attrs?: Attrs<InputAttrKeys>;

@@ -102,3 +90,3 @@ }

type: "textarea";
styles?: CommonStyles & TypographyStyles;
styles?: CSSProperties;
attrs?: Attrs<TextAreaAttrKeys>;

@@ -117,3 +105,3 @@ }

name: string;
styles?: CommonStyles;
styles?: CSSProperties;
props?: {

@@ -120,0 +108,0 @@ [prop in keyof Partial<P>]: number | string | boolean | null | undefined | JsonElement | PlasmicElement | PlasmicElement[];

@@ -25,4 +25,3 @@ 'use strict';

var root = /*#__PURE__*/require("window-or-global");
var root = globalThis;
root.__PlasmicFetcherRegistry = [];

@@ -54,3 +53,3 @@ function registerFetcher(fetcher, meta) {

var root$1 = /*#__PURE__*/require("window-or-global");
var root$1 = globalThis;

@@ -117,3 +116,3 @@ if (root$1.__PlasmicComponentRegistry == null) {

var root$2 = /*#__PURE__*/require("window-or-global");
var root$2 = globalThis;
root$2.__PlasmicHostVersion = "1";

@@ -120,0 +119,0 @@ var rootChangeListeners = [];

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@plasmicapp/preamble");var e=require("react"),t=require("react-dom");function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var r=require("window-or-global");r.__PlasmicFetcherRegistry=[];var o=require("window-or-global");function a(e,t){return i(e,t)}null==o.__PlasmicComponentRegistry&&(o.__PlasmicComponentRegistry=[]);var i=function(t,n){return t?n:Array.isArray(n)?n.map((function(e){return a(t,e)})):n&&e.isValidElement(n)&&"string"!=typeof n?e.cloneElement(n):n},c=require("window-or-global");c.__PlasmicHostVersion="1";var l=[],u=new function(e){var t=this;this.value=null,this.set=function(e){t.value=e,l.forEach((function(e){return e()}))},this.get=function(){return t.value}}(null);function s(){return function(e,t){if(void 0===t&&(t=""),null==e)throw t=(function(e){return"string"==typeof e}(t)?t:t())||"",new Error("Value must not be undefined or null"+(t?"- "+t:""));return e}(new URL("https://fakeurl/"+location.hash.replace(/#/,"?")).searchParams.get("origin"),"Missing information from Plasmic window.")}c.__Sub={React:e,ReactDOM:t,setPlasmicRootNode:function(e){p++,u.set(e)},registerRenderErrorListener:function(e){return f.push(e),function(){var t=f.indexOf(e);t>=0&&f.splice(t,1)}},repeatedElement:a,setRepeatedElementFn:function(e){i=e}};var p=0,m=e.createContext(!1);function d(){var n,r,o,a=!!window.parent,i=!(null==(n=location.hash)||!n.match(/\bcanvas=true\b/)),c=!(null==(r=location.hash)||!r.match(/\blive=true\b/))||!a,d=a&&!document.querySelector("#plasmic-studio-tag")&&!i&&!c,f=(o=e.useState(0)[1],e.useCallback((function(){o((function(e){return e+1}))}),[]));if(e.useLayoutEffect((function(){return l.push(f),function(){var e=l.indexOf(f);e>=0&&l.splice(e,1)}}),[f]),e.useEffect((function(){var e,t;d&&a&&window.parent!==window&&(e=document.createElement("script"),t=s(),e.src=t+"/static/js/studio.js",document.body.appendChild(e))}),[d,a]),e.useEffect((function(){if(!d&&!document.querySelector("#getlibs")&&c){var e=document.createElement("script");e.id="getlibs",e.src=s()+"/static/js/getlibs.js",e.async=!1,e.onload=function(){null==window.__GetlibsReadyResolver||window.__GetlibsReadyResolver()},document.head.append(e)}}),[d]),!a)return null;if(i||c){var b=document.querySelector("#plasmic-app.__wab_user-body");return b||((b=document.createElement("div")).id="plasmic-app",b.classList.add("__wab_user-body"),document.body.appendChild(b)),t.createPortal(e.createElement(h,{key:""+p},e.createElement(m.Provider,{value:i},u.get())),b,"plasmic-app")}return d&&window.parent===window?e.createElement("p",null,"Your app is ready to host Plasmic Studio! ",e.createElement("br",null)," ",e.createElement("br",null),"On the ",e.createElement("a",{href:"https://studio.plasmic.app/"},"Dashboard"),", click on the"," ",e.createElement("i",null,"Config")," button, and set"," ",e.createElement("code",null,location.origin+location.pathname)," as the host URL.",e.createElement("br",null),e.createElement("br",null),"You can find more information about app-hosting"," ",e.createElement("a",{href:"https://www.plasmic.app/learn/app-hosting/"},"here"),"."):null}var f=[],h=function(t){var r,o;function a(e){var n;return(n=t.call(this,e)||this).state={},n}o=t,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,n(r,o),a.getDerivedStateFromError=function(e){return{error:e}};var i=a.prototype;return i.componentDidCatch=function(e){f.forEach((function(t){return t(e)}))},i.render=function(){return this.state.error?e.createElement("div",null,"Error: ",""+this.state.error.message):this.props.children},a}(e.Component);function b(){return null}exports.PlasmicCanvasContext=m,exports.PlasmicCanvasHost=function(t){var n=t.enableWebpackHmr,r=e.useState(null),o=r[0],a=r[1];return e.useEffect((function(){a(e.createElement(d,null))}),[]),e.createElement(e.Fragment,null,!n&&e.createElement(b,null),o)},exports.registerComponent=function(e,t){o.__PlasmicComponentRegistry.push({component:e,meta:t})},exports.repeatedElement=a,exports.unstable_registerFetcher=function(e,t){r.__PlasmicFetcherRegistry.push({fetcher:e,meta:t})};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@plasmicapp/preamble");var e=require("react"),t=require("react-dom");function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var r=globalThis;r.__PlasmicFetcherRegistry=[];var o=globalThis;function a(e,t){return i(e,t)}null==o.__PlasmicComponentRegistry&&(o.__PlasmicComponentRegistry=[]);var i=function(t,n){return t?n:Array.isArray(n)?n.map((function(e){return a(t,e)})):n&&e.isValidElement(n)&&"string"!=typeof n?e.cloneElement(n):n},c=globalThis;c.__PlasmicHostVersion="1";var l=[],u=new function(e){var t=this;this.value=null,this.set=function(e){t.value=e,l.forEach((function(e){return e()}))},this.get=function(){return t.value}}(null);function s(){return function(e,t){if(void 0===t&&(t=""),null==e)throw t=(function(e){return"string"==typeof e}(t)?t:t())||"",new Error("Value must not be undefined or null"+(t?"- "+t:""));return e}(new URL("https://fakeurl/"+location.hash.replace(/#/,"?")).searchParams.get("origin"),"Missing information from Plasmic window.")}c.__Sub={React:e,ReactDOM:t,setPlasmicRootNode:function(e){p++,u.set(e)},registerRenderErrorListener:function(e){return d.push(e),function(){var t=d.indexOf(e);t>=0&&d.splice(t,1)}},repeatedElement:a,setRepeatedElementFn:function(e){i=e}};var p=0,m=e.createContext(!1);function f(){var n,r,o,a=!!window.parent,i=!(null==(n=location.hash)||!n.match(/\bcanvas=true\b/)),c=!(null==(r=location.hash)||!r.match(/\blive=true\b/))||!a,f=a&&!document.querySelector("#plasmic-studio-tag")&&!i&&!c,d=(o=e.useState(0)[1],e.useCallback((function(){o((function(e){return e+1}))}),[]));if(e.useLayoutEffect((function(){return l.push(d),function(){var e=l.indexOf(d);e>=0&&l.splice(e,1)}}),[d]),e.useEffect((function(){var e,t;f&&a&&window.parent!==window&&(e=document.createElement("script"),t=s(),e.src=t+"/static/js/studio.js",document.body.appendChild(e))}),[f,a]),e.useEffect((function(){if(!f&&!document.querySelector("#getlibs")&&c){var e=document.createElement("script");e.id="getlibs",e.src=s()+"/static/js/getlibs.js",e.async=!1,e.onload=function(){null==window.__GetlibsReadyResolver||window.__GetlibsReadyResolver()},document.head.append(e)}}),[f]),!a)return null;if(i||c){var b=document.querySelector("#plasmic-app.__wab_user-body");return b||((b=document.createElement("div")).id="plasmic-app",b.classList.add("__wab_user-body"),document.body.appendChild(b)),t.createPortal(e.createElement(h,{key:""+p},e.createElement(m.Provider,{value:i},u.get())),b,"plasmic-app")}return f&&window.parent===window?e.createElement("p",null,"Your app is ready to host Plasmic Studio! ",e.createElement("br",null)," ",e.createElement("br",null),"On the ",e.createElement("a",{href:"https://studio.plasmic.app/"},"Dashboard"),", click on the"," ",e.createElement("i",null,"Config")," button, and set"," ",e.createElement("code",null,location.origin+location.pathname)," as the host URL.",e.createElement("br",null),e.createElement("br",null),"You can find more information about app-hosting"," ",e.createElement("a",{href:"https://www.plasmic.app/learn/app-hosting/"},"here"),"."):null}var d=[],h=function(t){var r,o;function a(e){var n;return(n=t.call(this,e)||this).state={},n}o=t,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,n(r,o),a.getDerivedStateFromError=function(e){return{error:e}};var i=a.prototype;return i.componentDidCatch=function(e){d.forEach((function(t){return t(e)}))},i.render=function(){return this.state.error?e.createElement("div",null,"Error: ",""+this.state.error.message):this.props.children},a}(e.Component);function b(){return null}exports.PlasmicCanvasContext=m,exports.PlasmicCanvasHost=function(t){var n=t.enableWebpackHmr,r=e.useState(null),o=r[0],a=r[1];return e.useEffect((function(){a(e.createElement(f,null))}),[]),e.createElement(e.Fragment,null,!n&&e.createElement(b,null),o)},exports.registerComponent=function(e,t){o.__PlasmicComponentRegistry.push({component:e,meta:t})},exports.repeatedElement=a,exports.unstable_registerFetcher=function(e,t){r.__PlasmicFetcherRegistry.push({fetcher:e,meta:t})};
//# sourceMappingURL=host.cjs.production.min.js.map

@@ -23,4 +23,3 @@ import '@plasmicapp/preamble';

var root = /*#__PURE__*/require("window-or-global");
var root = globalThis;
root.__PlasmicFetcherRegistry = [];

@@ -52,3 +51,3 @@ function registerFetcher(fetcher, meta) {

var root$1 = /*#__PURE__*/require("window-or-global");
var root$1 = globalThis;

@@ -115,3 +114,3 @@ if (root$1.__PlasmicComponentRegistry == null) {

var root$2 = /*#__PURE__*/require("window-or-global");
var root$2 = globalThis;
root$2.__PlasmicHostVersion = "1";

@@ -118,0 +117,0 @@ var rootChangeListeners = [];

/// <reference types="react" />
import { CodeComponentElement, CommonStyles as ComponentStyles, PlasmicElement } from "./element-types";
import { CodeComponentElement, CSSProperties, PlasmicElement } from "./element-types";
declare type StringType = "string" | {

@@ -111,3 +111,3 @@ type: "string";

*/
__unstable_defaultStyles?: ComponentStyles;
__unstable_defaultStyles?: CSSProperties;
/**

@@ -114,0 +114,0 @@ * Component templates to start with on Plasmic.

{
"name": "@plasmicapp/host",
"version": "0.0.23",
"version": "0.0.25",
"description": "plasmic library for app hosting",

@@ -31,3 +31,3 @@ "main": "dist/index.js",

"dependencies": {
"@plasmicapp/preamble": "0.0.8",
"@plasmicapp/preamble": "0.0.10",
"window-or-global": "^1.0.1"

@@ -34,0 +34,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc