@grapesjs/studio-sdk-plugins 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dialogComponent/index.cjs.js +1 -1
- package/dist/dialogComponent/index.es.js +1 -1
- package/dist/dialogComponent/index.umd.js +1 -1
- package/dist/index.cjs.d.ts +1 -0
- package/dist/index.cjs.js +22 -12
- package/dist/index.d.ts +1 -0
- package/dist/index.es.d.ts +1 -0
- package/dist/index.es.js +1834 -1725
- package/dist/index.umd.js +22 -12
- package/dist/listPagesComponent/index.cjs.d.ts +3 -0
- package/dist/listPagesComponent/index.cjs.js +11 -0
- package/dist/listPagesComponent/index.d.ts +3 -0
- package/dist/listPagesComponent/index.es.d.ts +3 -0
- package/dist/listPagesComponent/index.es.js +204 -0
- package/dist/listPagesComponent/index.umd.js +11 -0
- package/dist/listPagesComponent/types.d.ts +9 -0
- package/dist/listPagesComponent/typesSchema.d.ts +1 -0
- package/dist/listPagesComponent/utils.d.ts +6 -0
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/prosemirror/index.umd.js +1 -1
- package/dist/tableComponent/index.cjs.js +1 -1
- package/dist/tableComponent/index.es.js +1 -1
- package/dist/tableComponent/index.umd.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";require("react");const b="app.grapesjs.com",w="app-stage.grapesjs.com",E=[b,w,"localhost","127.0.0.1",".local-credentialless.webcontainer.io",".local.webcontainer.io","-sandpack.codesandbox.io"],S="license:check:start",_="license:check:end",P=()=>typeof window<"u",k=({isDev:n,isStage:t})=>`${n?"":`https://${t?w:b}`}/api`,x=()=>{const n=P()&&window.location.hostname;return!!n&&(E.includes(n)||E.some(t=>n.endsWith(t)))},N=()=>(P()&&window.location.hostname)===b;var j={NODE_ENV:"production",NPM_PACKAGE_VERSION:"1.0.
|
|
1
|
+
"use strict";require("react");const b="app.grapesjs.com",w="app-stage.grapesjs.com",E=[b,w,"localhost","127.0.0.1",".local-credentialless.webcontainer.io",".local.webcontainer.io","-sandpack.codesandbox.io"],S="license:check:start",_="license:check:end",P=()=>typeof window<"u",k=({isDev:n,isStage:t})=>`${n?"":`https://${t?w:b}`}/api`,x=()=>{const n=P()&&window.location.hostname;return!!n&&(E.includes(n)||E.some(t=>n.endsWith(t)))},N=()=>(P()&&window.location.hostname)===b;var j={NODE_ENV:"production",NPM_PACKAGE_VERSION:"1.0.7",STUDIO_NPM_PACKAGE_VERSION:"1.0.25"};const D=j.NODE_ENV!=="production";async function $({path:n,method:t="GET",headers:l={},body:o}){const s=`${k({isDev:D,isStage:!N()})}${n}`,a={method:t,headers:{"Content-Type":"application/json",...l}};o&&(a.body=JSON.stringify(o));const i=await fetch(s,a);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return i.json()}function A(n){const t=n;return t.init=l=>o=>n(o,l),t}const I=n=>A(n);async function X({editor:n,pluginName:t,licenseKey:l,cleanup:o}){let g=!1;const s=x();n.on(S,()=>{g=!0}),n.on(_,({sdkLicense:a})=>{a||o()}),setTimeout(async()=>{if(!g){if(s)return;l&&await q({licenseKey:l,pluginName:t})||o()}},2e3)}async function q({licenseKey:n,pluginName:t}){try{const l=await $({path:`/sdk/${n}`,method:"POST",body:JSON.stringify({d:window.location.hostname,pn:t})}),{license:o}=l.result||{};return!!o}catch(l){return console.error("Error during SDK license check:",l),!1}}const W=(...n)=>n.map(t=>`[data-gjs-type="${t}"]`).join(","),M="dialogComponent",U=function(n,t={}){const{Blocks:l,Components:o}=n,{licenseKey:g}=t,s="gjs-plg-dialog",a="gjs-plg-dialog-overlay",i="gjs-plg-dialog-content",h="gjs-plg-dialog-close",u="gjs-plg-dialog-title",y="gjs-plg-dialog-body",m="gjs-plg-dialog-description",f="gjs-plg-dialog-placeholder";l.add(s,{label:"Dialog",media:`
|
|
2
2
|
<svg viewBox="0 0 24 24">
|
|
3
3
|
<path d="M4 4h16v10H8l-4 4V4z"></path>
|
|
4
4
|
</svg>
|
|
@@ -14,7 +14,7 @@ const b = "app.grapesjs.com", w = "app-stage.grapesjs.com", E = [
|
|
|
14
14
|
const n = P() && window.location.hostname;
|
|
15
15
|
return !!n && (E.includes(n) || E.some((t) => n.endsWith(t)));
|
|
16
16
|
}, N = () => (P() && window.location.hostname) === b;
|
|
17
|
-
var j = { NODE_ENV: "production", NPM_PACKAGE_VERSION: "1.0.
|
|
17
|
+
var j = { NODE_ENV: "production", NPM_PACKAGE_VERSION: "1.0.7", STUDIO_NPM_PACKAGE_VERSION: "1.0.25" };
|
|
18
18
|
const D = j.NODE_ENV !== "production";
|
|
19
19
|
async function $({
|
|
20
20
|
path: n,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(p,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("react")):typeof define=="function"&&define.amd?define(["react"],u):(p=typeof globalThis<"u"?globalThis:p||self,p.StudioSdkPlugins_dialogComponent=u())})(this,function(){"use strict";const p="app.grapesjs.com",u="app-stage.grapesjs.com",W=[p,u,"localhost","127.0.0.1",".local-credentialless.webcontainer.io",".local.webcontainer.io","-sandpack.codesandbox.io"],T="license:check:start",C="license:check:end",w=()=>typeof window<"u",O=({isDev:n,isStage:t})=>`${n?"":`https://${t?u:p}`}/api`,S=()=>{const n=w()&&window.location.hostname;return!!n&&(W.includes(n)||W.some(t=>n.endsWith(t)))},L=()=>(w()&&window.location.hostname)===p;var _={NODE_ENV:"production",NPM_PACKAGE_VERSION:"1.0.
|
|
1
|
+
(function(p,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("react")):typeof define=="function"&&define.amd?define(["react"],u):(p=typeof globalThis<"u"?globalThis:p||self,p.StudioSdkPlugins_dialogComponent=u())})(this,function(){"use strict";const p="app.grapesjs.com",u="app-stage.grapesjs.com",W=[p,u,"localhost","127.0.0.1",".local-credentialless.webcontainer.io",".local.webcontainer.io","-sandpack.codesandbox.io"],T="license:check:start",C="license:check:end",w=()=>typeof window<"u",O=({isDev:n,isStage:t})=>`${n?"":`https://${t?u:p}`}/api`,S=()=>{const n=w()&&window.location.hostname;return!!n&&(W.includes(n)||W.some(t=>n.endsWith(t)))},L=()=>(w()&&window.location.hostname)===p;var _={NODE_ENV:"production",NPM_PACKAGE_VERSION:"1.0.7",STUDIO_NPM_PACKAGE_VERSION:"1.0.25"};const k=_.NODE_ENV!=="production";async function x({path:n,method:t="GET",headers:l={},body:o}){const s=`${O({isDev:k,isStage:!L()})}${n}`,i={method:t,headers:{"Content-Type":"application/json",...l}};o&&(i.body=JSON.stringify(o));const a=await fetch(s,i);if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return a.json()}function N(n){const t=n;return t.init=l=>o=>n(o,l),t}const j=n=>N(n);async function D({editor:n,pluginName:t,licenseKey:l,cleanup:o}){let h=!1;const s=S();n.on(T,()=>{h=!0}),n.on(C,({sdkLicense:i})=>{i||o()}),setTimeout(async()=>{if(!h){if(s)return;l&&await $({licenseKey:l,pluginName:t})||o()}},2e3)}async function $({licenseKey:n,pluginName:t}){try{const l=await x({path:`/sdk/${n}`,method:"POST",body:JSON.stringify({d:window.location.hostname,pn:t})}),{license:o}=l.result||{};return!!o}catch(l){return console.error("Error during SDK license check:",l),!1}}const P=(...n)=>n.map(t=>`[data-gjs-type="${t}"]`).join(","),A="dialogComponent";return j(function(n,t={}){const{Blocks:l,Components:o}=n,{licenseKey:h}=t,s="gjs-plg-dialog",i="gjs-plg-dialog-overlay",a="gjs-plg-dialog-content",y="gjs-plg-dialog-close",f="gjs-plg-dialog-title",m="gjs-plg-dialog-body",v="gjs-plg-dialog-description",E="gjs-plg-dialog-placeholder";l.add(s,{label:"Dialog",media:`
|
|
2
2
|
<svg viewBox="0 0 24 24">
|
|
3
3
|
<path d="M4 4h16v10H8l-4 4V4z"></path>
|
|
4
4
|
</svg>
|
package/dist/index.cjs.d.ts
CHANGED