Socket
Socket
Sign inDemoInstall

@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.38 to 0.0.39

3

dist/host.cjs.development.js

@@ -142,2 +142,5 @@ 'use strict';

if (root$2.__Sub == null) {
// Creating a side effect here by logging, so that vite won't
// ignore this block for whatever reason
console.log("Plasmic: Setting up app host dependencies");
root$2.__Sub = {

@@ -144,0 +147,0 @@ React: React,

2

dist/host.cjs.production.min.js

@@ -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=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},l=globalThis;null==l.__PlasmicHostVersion&&(l.__PlasmicHostVersion="1");var c=[],u=new function(e){var t=this;this.value=null,this.set=function(e){t.value=e,c.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.")}null==l.__Sub&&(l.__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/)),l=!(null==(r=location.hash)||!r.match(/\blive=true\b/))||!a,f=a&&!document.querySelector("#plasmic-studio-tag")&&!i&&!l,d=(o=e.useState(0)[1],e.useCallback((function(){o((function(e){return e+1}))}),[]));if(e.useLayoutEffect((function(){return c.push(d),function(){var e=c.indexOf(d);e>=0&&c.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")&&l){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||l){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})};
"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},l=globalThis;null==l.__PlasmicHostVersion&&(l.__PlasmicHostVersion="1");var c=[],u=new function(e){var t=this;this.value=null,this.set=function(e){t.value=e,c.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.")}null==l.__Sub&&(console.log("Plasmic: Setting up app host dependencies"),l.__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/)),l=!(null==(r=location.hash)||!r.match(/\blive=true\b/))||!a,d=a&&!document.querySelector("#plasmic-studio-tag")&&!i&&!l,f=(o=e.useState(0)[1],e.useCallback((function(){o((function(e){return e+1}))}),[]));if(e.useLayoutEffect((function(){return c.push(f),function(){var e=c.indexOf(f);e>=0&&c.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")&&l){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||l){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})};
//# sourceMappingURL=host.cjs.production.min.js.map

@@ -140,2 +140,5 @@ import '@plasmicapp/preamble';

if (root$2.__Sub == null) {
// Creating a side effect here by logging, so that vite won't
// ignore this block for whatever reason
console.log("Plasmic: Setting up app host dependencies");
root$2.__Sub = {

@@ -142,0 +145,0 @@ React: React,

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

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

"dependencies": {
"@plasmicapp/preamble": "0.0.22",
"@plasmicapp/preamble": "0.0.23",
"window-or-global": "^1.0.1"

@@ -35,0 +35,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