@grapesjs/studio-sdk-plugins 1.0.33-rc.1 → 1.0.33

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.
Files changed (130) hide show
  1. package/dist/accordionComponent/index.cjs.js +7 -7
  2. package/dist/accordionComponent/index.es.js +161 -156
  3. package/dist/accordionComponent/index.umd.js +9 -9
  4. package/dist/aiChat/chatManager.d.ts +15 -0
  5. package/dist/aiChat/clientTools.d.ts +3 -3
  6. package/dist/aiChat/clientToolsProcessors.d.ts +14 -1
  7. package/dist/aiChat/components/AiChatEmptyState.d.ts +4 -6
  8. package/dist/aiChat/components/AiChatError.d.ts +2 -1
  9. package/dist/aiChat/components/AiChatHeader.d.ts +2 -1
  10. package/dist/aiChat/components/AiChatInput/AssetsSection.d.ts +7 -0
  11. package/dist/aiChat/components/AiChatInput/AttachButton.d.ts +10 -0
  12. package/dist/aiChat/components/AiChatInput/ContextSection.d.ts +5 -0
  13. package/dist/aiChat/components/AiChatInput/DictateButton.d.ts +7 -0
  14. package/dist/aiChat/components/AiChatInput/TextAreaWithAutoResize.d.ts +6 -0
  15. package/dist/aiChat/components/AiChatInput/constants.d.ts +6 -0
  16. package/dist/aiChat/components/AiChatInput/hooks/useSpeechToText.d.ts +15 -0
  17. package/dist/aiChat/components/AiChatInput/index.d.ts +37 -0
  18. package/dist/aiChat/components/AiChatLoadingState.d.ts +2 -1
  19. package/dist/aiChat/components/AiChatMessage.d.ts +21 -9
  20. package/dist/aiChat/components/AiChatMessages.d.ts +5 -7
  21. package/dist/aiChat/components/AiChatMessagesStatus.d.ts +5 -0
  22. package/dist/aiChat/components/AiChatPanel.d.ts +2 -3
  23. package/dist/aiChat/components/AiChatProvider.d.ts +14 -0
  24. package/dist/aiChat/components/MemoizedMarkdown.d.ts +9 -0
  25. package/dist/aiChat/components/index.d.ts +24 -25
  26. package/dist/aiChat/components/utils.d.ts +12 -4
  27. package/dist/aiChat/index.cjs.d.ts +5 -0
  28. package/dist/aiChat/index.cjs.js +453 -0
  29. package/dist/aiChat/index.d.ts +4 -3
  30. package/dist/aiChat/index.es.d.ts +5 -0
  31. package/dist/aiChat/index.es.js +30930 -0
  32. package/dist/aiChat/index.js +453 -0
  33. package/dist/aiChat/index.umd.js +453 -0
  34. package/dist/aiChat/locales/en.d.ts +64 -0
  35. package/dist/aiChat/server/index.cjs.d.ts +4 -0
  36. package/dist/aiChat/server/index.cjs.js +309 -0
  37. package/dist/aiChat/server/index.d.ts +0 -50
  38. package/dist/aiChat/server/index.es.d.ts +4 -0
  39. package/dist/aiChat/server/index.es.js +876 -0
  40. package/dist/aiChat/server/index.js +309 -0
  41. package/dist/aiChat/server/index.umd.js +309 -0
  42. package/dist/aiChat/server/stream.d.ts +0 -6
  43. package/dist/aiChat/server/tools.d.ts +157 -51
  44. package/dist/aiChat/server/types.d.ts +108 -64
  45. package/dist/aiChat/types.d.ts +148 -108
  46. package/dist/aiChat/typesSchema.d.ts +238 -25
  47. package/dist/animationComponent/index.cjs.js +3 -3
  48. package/dist/animationComponent/index.es.js +174 -169
  49. package/dist/animationComponent/index.umd.js +3 -3
  50. package/dist/canvasAbsoluteMode/index.cjs.js +1 -1
  51. package/dist/canvasAbsoluteMode/index.es.js +161 -156
  52. package/dist/canvasAbsoluteMode/index.umd.js +1 -1
  53. package/dist/canvasEmptyState/index.cjs.js +1 -1
  54. package/dist/canvasEmptyState/index.es.js +113 -108
  55. package/dist/canvasEmptyState/index.umd.js +1 -1
  56. package/dist/canvasFullSize/index.cjs.js +9 -9
  57. package/dist/canvasFullSize/index.es.js +137 -132
  58. package/dist/canvasFullSize/index.umd.js +9 -9
  59. package/dist/canvasGridMode/index.cjs.js +4 -4
  60. package/dist/canvasGridMode/index.es.js +168 -163
  61. package/dist/canvasGridMode/index.umd.js +8 -8
  62. package/dist/canvasScreenshot/index.cjs.js +1 -1
  63. package/dist/canvasScreenshot/index.es.js +132 -127
  64. package/dist/canvasScreenshot/index.umd.js +1 -1
  65. package/dist/dataSourceEjs/index.cjs.js +5 -5
  66. package/dist/dataSourceEjs/index.es.js +151 -146
  67. package/dist/dataSourceEjs/index.umd.js +5 -5
  68. package/dist/dataSourceHandlebars/index.cjs.js +4 -4
  69. package/dist/dataSourceHandlebars/index.es.js +91 -86
  70. package/dist/dataSourceHandlebars/index.umd.js +5 -5
  71. package/dist/dialogComponent/index.cjs.js +16 -16
  72. package/dist/dialogComponent/index.es.js +117 -112
  73. package/dist/dialogComponent/index.umd.js +16 -16
  74. package/dist/flexComponent/index.cjs.js +11 -11
  75. package/dist/flexComponent/index.es.js +416 -411
  76. package/dist/flexComponent/index.umd.js +11 -11
  77. package/dist/fsLightboxComponent/index.cjs.js +3 -3
  78. package/dist/fsLightboxComponent/index.es.js +152 -147
  79. package/dist/fsLightboxComponent/index.umd.js +3 -3
  80. package/dist/googleFontsAssetProvider/index.cjs.js +1 -1
  81. package/dist/googleFontsAssetProvider/index.es.js +127 -122
  82. package/dist/googleFontsAssetProvider/index.umd.js +1 -1
  83. package/dist/iconifyComponent/index.cjs.js +2 -2
  84. package/dist/iconifyComponent/index.es.js +170 -165
  85. package/dist/iconifyComponent/index.umd.js +2 -2
  86. package/dist/index.cjs.js +1 -1
  87. package/dist/index.es.js +27 -22
  88. package/dist/index.umd.js +1 -1
  89. package/dist/layoutSidebarButtons/index.cjs.js +1 -1
  90. package/dist/layoutSidebarButtons/index.es.js +156 -151
  91. package/dist/layoutSidebarButtons/index.umd.js +1 -1
  92. package/dist/lightGalleryComponent/index.cjs.js +1 -1
  93. package/dist/lightGalleryComponent/index.es.js +197 -192
  94. package/dist/lightGalleryComponent/index.umd.js +1 -1
  95. package/dist/linkImageComponent/index.cjs.js +2 -2
  96. package/dist/linkImageComponent/index.es.js +86 -81
  97. package/dist/linkImageComponent/index.umd.js +2 -2
  98. package/dist/listPagesComponent/index.cjs.js +5 -5
  99. package/dist/listPagesComponent/index.es.js +121 -116
  100. package/dist/listPagesComponent/index.umd.js +5 -5
  101. package/dist/presetPrintable/index.cjs.js +4 -4
  102. package/dist/presetPrintable/index.es.js +180 -175
  103. package/dist/presetPrintable/index.umd.js +4 -4
  104. package/dist/prosemirror/index.cjs.js +6 -6
  105. package/dist/prosemirror/index.es.js +128 -123
  106. package/dist/prosemirror/index.umd.js +8 -8
  107. package/dist/rendererReact/index.cjs.js +1 -1
  108. package/dist/rendererReact/index.es.js +127 -122
  109. package/dist/rendererReact/index.js +1 -1
  110. package/dist/rendererReact/index.umd.js +1 -1
  111. package/dist/rteTinyMce/index.cjs.js +2 -2
  112. package/dist/rteTinyMce/index.es.js +160 -155
  113. package/dist/rteTinyMce/index.umd.js +2 -2
  114. package/dist/shapeDividerComponent/index.cjs.js +25 -25
  115. package/dist/shapeDividerComponent/index.es.js +127 -122
  116. package/dist/shapeDividerComponent/index.umd.js +25 -25
  117. package/dist/swiperComponent/index.cjs.js +9 -9
  118. package/dist/swiperComponent/index.es.js +197 -192
  119. package/dist/swiperComponent/index.umd.js +9 -9
  120. package/dist/tableComponent/index.cjs.js +1 -1
  121. package/dist/tableComponent/index.es.js +227 -222
  122. package/dist/tableComponent/index.umd.js +1 -1
  123. package/dist/types.d.ts +1 -1
  124. package/dist/utils.d.ts +12 -1
  125. package/dist/youtubeAssetProvider/index.cjs.js +1 -1
  126. package/dist/youtubeAssetProvider/index.es.js +124 -119
  127. package/dist/youtubeAssetProvider/index.umd.js +1 -1
  128. package/package.json +5 -2
  129. package/dist/aiChat/components/AiChatInput.d.ts +0 -17
  130. package/dist/aiChat/server/stream-utils.d.ts +0 -16
@@ -1,4 +1,4 @@
1
- (function(f,h){typeof exports=="object"&&typeof module<"u"?module.exports=h():typeof define=="function"&&define.amd?define(h):(f=typeof globalThis<"u"?globalThis:f||self,f.StudioSdkPlugins_rteTinyMce=h())})(this,function(){"use strict";var f=(t=>(t.free="free",t.startup="startup",t.business="business",t.enterprise="enterprise",t))(f||{}),h=(t=>(t.toastAdd="studio:toastAdd",t.toastRemove="studio:toastRemove",t.dialogOpen="studio:dialogOpen",t.dialogClose="studio:dialogClose",t.dialogExportCode="studio:dialogExportCode",t.sidebarLeftSet="studio:sidebarLeft:set",t.sidebarLeftGet="studio:sidebarLeft:get",t.sidebarLeftToggle="studio:sidebarLeft:toggle",t.sidebarRightSet="studio:sidebarRight:set",t.sidebarRightGet="studio:sidebarRight:get",t.sidebarRightToggle="studio:sidebarRight:toggle",t.sidebarTopSet="studio:sidebarTop:set",t.sidebarTopGet="studio:sidebarTop:get",t.sidebarTopToggle="studio:sidebarTop:toggle",t.sidebarBottomSet="studio:sidebarBottom:set",t.sidebarBottomGet="studio:sidebarBottom:get",t.sidebarBottomToggle="studio:sidebarBottom:toggle",t.symbolAdd="studio:symbolAdd",t.symbolDetach="studio:symbolDetach",t.symbolOverride="studio:symbolOverride",t.symbolPropagateStyles="studio:propagateStyles",t.getPagesConfig="studio:getPagesConfig",t.setPagesConfig="studio:setPagesConfig",t.getPageSettings="studio:getPageSettings",t.setPageSettings="studio:setPageSettings",t.clearPage="studio:clearPage",t.projectFiles="studio:projectFiles",t.validateCode="studio:validateCode",t.canvasReload="studio:canvasReload",t.getBlocksPanel="studio:getBlocksPanel",t.setBlocksPanel="studio:setBlocksPanel",t.getStateContextMenu="studio:getStateContextMenu",t.setStateContextMenu="studio:setStateContextMenu",t.contextMenuComponent="studio:contextMenuComponent",t.layoutAdd="studio:layoutAdd",t.layoutRemove="studio:layoutRemove",t.layoutToggle="studio:layoutToggle",t.layoutUpdate="studio:layoutUpdate",t.layoutGet="studio:layoutGet",t.layoutConfigGet="studio:layoutConfigGet",t.layoutConfigSet="studio:layoutConfigSet",t.layoutComponentAdd="studio:layoutComponentAdd",t.layoutComponentGet="studio:layoutComponentGet",t.layoutComponentRemove="studio:layoutComponentRemove",t.layoutComponentRender="studio:layoutComponentRender",t.getStateTheme="studio:getStateTheme",t.setStateTheme="studio:setStateTheme",t.assetProviderGet="studio:assetProviderGet",t.assetProviderAdd="studio:assetProviderAdd",t.assetProviderRemove="studio:assetProviderRemove",t.fontGet="studio:fontGet",t.fontAdd="studio:fontAdd",t.fontRemove="studio:fontRemove",t.fontManagerOpen="studio:fontManagerOpen",t.menuFontLoad="studio:menuFontLoad",t.toggleStateDataSource="studio:toggleStateDataSource",t.getStateDataSource="studio:getStateDataSource",t.dataSourceSetGlobalData="studio:dataSourceSetGlobalData",t.dataSourceSetImporter="studio:dataSourceSetImporter",t.dataSourceSetExporter="studio:dataSourceSetExporter",t.setDragAbsolute="studio:setDragAbsolute",t))(h||{}),E=(t=>(t.dark="dark",t.light="light",t.auto="auto",t))(E||{});const R="app.grapesjs.com",k="app-stage.grapesjs.com",P=[R,"app2.grapesjs.com",k,"app-stage2.grapesjs.com","localhost","127.0.0.1",".local-credentialless.webcontainer.io",".local.webcontainer.io","-sandpack.codesandbox.io"],I="license:check:start",M="license:check:end",G=()=>typeof window<"u",N=({isDev:t,isStage:n})=>`${t?"":`https://${n?k:R}`}/api`,B=()=>{const t=G()&&window.location.hostname;return!!t&&(P.includes(t)||P.some(n=>t.endsWith(n)))};async function j({path:t,baseApiUrl:n,method:o="GET",headers:s={},params:a,body:l}){const c=`${n||N({isDev:!1,isStage:!1})}${t}`,r={method:o,headers:{"Content-Type":"application/json",...s}};l&&(r.body=JSON.stringify(l));const b=a?new URLSearchParams(a).toString():"",e=b?`?${b}`:"",i=await fetch(`${c}${e}`,r);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return i.json()}const _={[f.free]:0,[f.startup]:10,[f.business]:20,[f.enterprise]:30};function U(t){const n=t;return n.init=o=>s=>t(s,o),n}const C=t=>U(t);async function W({editor:t,plan:n,pluginName:o,licenseKey:s,cleanup:a}){let l="",d=!1;const c=B(),r=e=>{console.warn("Cleanup plugin:",o,"Reason:",e),a()},b=(e={})=>{var v;const{error:i,sdkLicense:x}=e,u=(v=e.plan)==null?void 0:v.category;if(!(x||e.license)||i)r(i||"Invalid license");else if(u){const L=_[n],p=_[u];L>p&&r({pluginRequiredPlan:n,licensePlan:u})}};t.on(I,e=>{l=e==null?void 0:e.baseApiUrl,d=!0}),t.on(M,e=>{b(e)}),setTimeout(async()=>{if(!d){if(c)return;if(s){const e=await F({licenseKey:s,pluginName:o,baseApiUrl:l});e&&b(e)}else r("The `licenseKey` option not provided")}},2e3)}async function F(t){const{licenseKey:n,pluginName:o,baseApiUrl:s}=t;try{return(await j({baseApiUrl:s,path:`/sdk/${n||"na"}`,method:"POST",params:{d:window.location.hostname,pn:o}})).result||{}}catch(a){return console.error("Error during SDK license check:",a),!1}}const S=(t,n,o)=>{const{doc:s=document}=o,a=o.target||s.head,l=a.querySelector(`style[${t}]`)||s.createElement("style");l.setAttribute(t,"true"),l.innerHTML=n,!a.contains(l)&&a.appendChild(l)},$=t=>t.dispatchEvent(new CustomEvent("input"));function K(t,n){if(!n)return()=>{};const o=t.Components.events,s=e=>t.getSelectedAll().includes(e),a=e=>e.isInstanceOf("text")&&!e.isChildOf("text"),l=e=>e.isChildOf("text"),d=e=>t.getEditing()===e,c=(e,i={})=>{e.trigger("focus",i.event)},r=(e,i)=>{s(e)&&a(e)&&!d(e)&&c(e,i)},b=(e,i)=>{if(s(e)&&!a(e)&&l(e)){const x=e.parents().find(u=>u.isInstanceOf("text"));x&&(c(x,i),setTimeout(()=>t.select(x),0))}};return t.on(o.select,r),t.on(o.selectBefore,b),()=>{t.off(o.select,r),t.off(o.selectBefore,b)}}const q="rteTinyMce",H=f.startup,z=`
1
+ (function(p,h){typeof exports=="object"&&typeof module<"u"?module.exports=h():typeof define=="function"&&define.amd?define(h):(p=typeof globalThis<"u"?globalThis:p||self,p.StudioSdkPlugins_rteTinyMce=h())})(this,function(){"use strict";var p=(t=>(t.free="free",t.startup="startup",t.business="business",t.enterprise="enterprise",t))(p||{}),h=(t=>(t.toastAdd="studio:toastAdd",t.toastRemove="studio:toastRemove",t.dialogOpen="studio:dialogOpen",t.dialogClose="studio:dialogClose",t.dialogExportCode="studio:dialogExportCode",t.sidebarLeftSet="studio:sidebarLeft:set",t.sidebarLeftGet="studio:sidebarLeft:get",t.sidebarLeftToggle="studio:sidebarLeft:toggle",t.sidebarRightSet="studio:sidebarRight:set",t.sidebarRightGet="studio:sidebarRight:get",t.sidebarRightToggle="studio:sidebarRight:toggle",t.sidebarTopSet="studio:sidebarTop:set",t.sidebarTopGet="studio:sidebarTop:get",t.sidebarTopToggle="studio:sidebarTop:toggle",t.sidebarBottomSet="studio:sidebarBottom:set",t.sidebarBottomGet="studio:sidebarBottom:get",t.sidebarBottomToggle="studio:sidebarBottom:toggle",t.symbolAdd="studio:symbolAdd",t.symbolDetach="studio:symbolDetach",t.symbolOverride="studio:symbolOverride",t.symbolPropagateStyles="studio:propagateStyles",t.getPagesConfig="studio:getPagesConfig",t.setPagesConfig="studio:setPagesConfig",t.getPageSettings="studio:getPageSettings",t.setPageSettings="studio:setPageSettings",t.clearPage="studio:clearPage",t.projectFiles="studio:projectFiles",t.validateCode="studio:validateCode",t.canvasReload="studio:canvasReload",t.getBlocksPanel="studio:getBlocksPanel",t.setBlocksPanel="studio:setBlocksPanel",t.getStateContextMenu="studio:getStateContextMenu",t.setStateContextMenu="studio:setStateContextMenu",t.contextMenuComponent="studio:contextMenuComponent",t.layoutAdd="studio:layoutAdd",t.layoutRemove="studio:layoutRemove",t.layoutToggle="studio:layoutToggle",t.layoutUpdate="studio:layoutUpdate",t.layoutGet="studio:layoutGet",t.layoutConfigGet="studio:layoutConfigGet",t.layoutConfigSet="studio:layoutConfigSet",t.layoutComponentAdd="studio:layoutComponentAdd",t.layoutComponentGet="studio:layoutComponentGet",t.layoutComponentRemove="studio:layoutComponentRemove",t.layoutComponentRender="studio:layoutComponentRender",t.getStateTheme="studio:getStateTheme",t.setStateTheme="studio:setStateTheme",t.assetProviderGet="studio:assetProviderGet",t.assetProviderAdd="studio:assetProviderAdd",t.assetProviderRemove="studio:assetProviderRemove",t.fontGet="studio:fontGet",t.fontAdd="studio:fontAdd",t.fontRemove="studio:fontRemove",t.fontManagerOpen="studio:fontManagerOpen",t.menuFontLoad="studio:menuFontLoad",t.toggleStateDataSource="studio:toggleStateDataSource",t.getStateDataSource="studio:getStateDataSource",t.dataSourceSetGlobalData="studio:dataSourceSetGlobalData",t.dataSourceSetImporter="studio:dataSourceSetImporter",t.dataSourceSetExporter="studio:dataSourceSetExporter",t.setDragAbsolute="studio:setDragAbsolute",t))(h||{}),P=(t=>(t.dark="dark",t.light="light",t.auto="auto",t))(P||{});const _="app.grapesjs.com",R="app-stage.grapesjs.com",k=[_,"app2.grapesjs.com",R,"app-stage2.grapesjs.com","localhost","127.0.0.1",".local-credentialless.webcontainer.io",".local.webcontainer.io","-sandpack.codesandbox.io"],G="license:check:start",L="license:check:end",N=()=>typeof window<"u",B=({isDev:t,isStage:s,isPlatform:n})=>`${t?"":`https://${s?R:_}`}/${n?"platform-api":"api"}`,j=()=>{const t=N()&&window.location.hostname;return!!t&&(k.includes(t)||k.some(s=>t.endsWith(s)))};async function U({path:t,baseApiUrl:s,method:n="GET",headers:a={},params:r,body:c}){const l=`${s||B({isDev:!1,isStage:!1})}${t}`,i={method:n,headers:{"Content-Type":"application/json",...a}};c&&(i.body=JSON.stringify(c));const u=r?new URLSearchParams(r).toString():"",e=u?`?${u}`:"",o=await fetch(`${l}${e}`,i);if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return o.json()}const D={[p.free]:0,[p.startup]:10,[p.business]:20,[p.enterprise]:30};function W(t){const s=t;return s.init=n=>a=>t(a,n),s}const $=t=>W(t);async function F({editor:t,plan:s,pluginName:n,licenseKey:a,onLicenseCheckResponse:r,cleanup:c}){let d="",l=!1;const i=j(),u=o=>{console.warn("Cleanup plugin:",n,"Reason:",o),c()},e=(o={})=>{var E;const{error:b,sdkLicense:x}=o,g=(E=o.plan)==null?void 0:E.category;if(!(x||o.license)||b)u(b||"Invalid license");else if(g){const f=D[s],I=D[g];f>I&&u({pluginRequiredPlan:s,licensePlan:g})}};t.on(G,o=>{d=o==null?void 0:o.baseApiUrl,l=!0}),t.on(L,o=>{r==null||r(o),e(o)}),setTimeout(async()=>{if(!l){if(i)return;if(a){const o=await S({licenseKey:a,pluginName:n,baseApiUrl:d});r==null||r(o),o&&e(o)}else u("The `licenseKey` option not provided")}},2e3)}async function S(t){const{licenseKey:s,pluginName:n,baseApiUrl:a}=t;try{return(await U({baseApiUrl:a,path:`/sdk/${s||"na"}`,method:"POST",params:{d:window.location.hostname,pn:n}})).result||{}}catch(r){return console.error("Error during SDK license check:",r),!1}}const K=(t,s,n)=>{const{doc:a=document}=n,r=n.target||a.head,c=r.querySelector(`style[${t}]`)||a.createElement("style");c.setAttribute(t,"true"),c.innerHTML=s,!r.contains(c)&&r.appendChild(c)},q=t=>t.dispatchEvent(new CustomEvent("input"));function H(t,s){if(!s)return()=>{};const n=t.Components.events,a=e=>t.getSelectedAll().includes(e),r=e=>e.isInstanceOf("text")&&!e.isChildOf("text"),c=e=>e.isChildOf("text"),d=e=>t.getEditing()===e,l=(e,o={})=>{e.trigger("focus",o.event)},i=(e,o)=>{a(e)&&r(e)&&!d(e)&&l(e,o)},u=(e,o)=>{if(a(e)&&!r(e)&&c(e)){const b=e.parents().find(x=>x.isInstanceOf("text"));b&&(l(b,o),setTimeout(()=>t.select(b),0))}};return t.on(n.select,i),t.on(n.selectBefore,u),()=>{t.off(n.select,i),t.off(n.selectBefore,u)}}const z="rteTinyMce",C=p.startup,V=`
2
2
  .tox .tox-toolbar,
3
3
  .tox .tox-toolbar__overflow,
4
4
  .tox .tox-toolbar__primary,
@@ -101,4 +101,4 @@
101
101
  background-color: var(--gs-theme-cl-prm-bg1);
102
102
  border-color: var(--gs-theme-cl-prm-bg3);
103
103
  opacity: 0.75;
104
- }`,w=new WeakMap,V=(t,n)=>{w.set(t,n)},J=t=>{w.delete(t)},T=t=>w.get(t),m=t=>{const n=t.target,o=n.closest(".tox"),s=n.matches(".ephox-snooker-resizer-bar");(o||s)&&t.stopPropagation()},D=t=>{t.stopPropagation(),t.preventDefault()},X=(t,n)=>{const o=t.getDoc(),s=t.getWin();if(n!=null&&n.event){const{event:a}=n,{clientX:l,clientY:d}=a;let c;if(o.caretRangeFromPoint)c=o.caretRangeFromPoint(l,d);else if(o.caretPositionFromPoint){const r=o.caretPositionFromPoint(l,d);c=o.createRange(),c==null||c.setStart(r.offsetNode,r.offset)}if(c){const r=s.getSelection();r==null||r.removeAllRanges(),r==null||r.addRange(c),t.selection.setRng(c)}}else t.execCommand("SelectAll")},Y=t=>{var b,e;const{el:n,editor:o,componentView:s}=t,a=o.runCommand(h.getStateTheme),l=s.model,d={target:n,inline:!0,skin:(a==null?void 0:a.theme)===E.dark?"oxide-dark":"oxide",menubar:!1,image_advtab:!0,paste_data_images:!0,statusbar:!1,branding:!1,forced_root_block:"div",plugins:"advlist autolink lists link image media table",toolbar_mode:"sliding",toolbar:"bold italic underline strikethrough forecolor backcolor alignleft aligncenter alignright alignjustify link image | fontfamily fontsize bullist numlist outdent indent table"},c=((e=(b=t.pluginOpts)==null?void 0:b.loadConfig)==null?void 0:e.call(b,{config:d,editor:o,componentView:s,component:l}))||{};return{...d,...c}},A=(t,n=document)=>new Promise((o,s)=>{const a=Array.isArray(t)?[...t]:[t],{head:l}=n,d=c=>{if(c.length){const r=n.createElement("script");r.src=c.shift(),r.onload=d.bind(null,c),r.onerror=s,l.appendChild(r)}else o()};d(a)});return C(function(t,n={}){const o={cdnScript:"https://cdn.jsdelivr.net/npm/tinymce@6.8.5/tinymce.min.js",...n},{cdnScript:s}=o,a=t.Canvas.events,l=!o.skipCustomTheme,d="gs-plg-tinymce-studio-theme",c=async(e,i)=>{const x=e.ownerDocument,u=x.defaultView,g=i==null?void 0:i.view;if(!u||!g){console.warn("Missing required data",{win:u,componentView:g});return}const v=Y({el:e,editor:t,componentView:g,pluginOpts:o}),p=(await u.tinymce.init(v))[0];if(!p)return;const Q=(await window.tinymce.init({...v,target:document.createElement("div")}))[0];return p.ui.show(),x.body.addEventListener("mousedown",m),document.body.addEventListener("mousedown",m),p.on("Change",()=>$(e)),p.on("blur",()=>p.ui.show()),p.on("OpenWindow",function(){var O;const y=(O=x.querySelector(".tox-dialog"))==null?void 0:O.closest(".tox");y&&(y==null?void 0:y.ownerDocument)!==document&&(document.body.appendChild(y),p.once("CloseWindow",()=>{y&&y.ownerDocument===document&&x.body.appendChild(y)}))}),e.addEventListener("dragstart",D,{capture:!0}),t.runCommand(h.setStateContextMenu,{enabled:!1}),X(p,i),{rteEditor:p,rteEditorShallow:Q}},r=(e,i)=>{e.ownerDocument.body.removeEventListener("mousedown",m),document.body.removeEventListener("mousedown",m),e.removeEventListener("dragstart",D,{capture:!0}),t.runCommand(h.setStateContextMenu,{enabled:!0}),i.rteEditor.destroy(),i.rteEditorShallow.destroy()};t.on(a.frameLoad,async({window:e})=>{const i=e.document;A(s,i)}),t.onReady(()=>{A(s,document),l&&S(d,z,{target:document.body})}),t.setCustomRte({parseContent:!0,async enable(e,i,x){const u=T(e);if(u)return u.rteEditor;const g=await c(e,x);return g&&V(e,g),g==null?void 0:g.rteEditor},disable(e){const i=T(e);i&&(J(e),r(e,i))},getContent(e,i,x){var v;const u=T(e),g=u==null?void 0:u.rteEditor;return g&&!g.isDirty()?x.view.lastContent:g?(v=g.getContent)==null?void 0:v.call(g):e.innerHTML}});const b=K(t,o.enableOnClick);W({editor:t,licenseKey:o.licenseKey,plan:H,pluginName:q,cleanup:()=>{t.RichTextEditor.customRte=void 0,b()}})})});
104
+ }`,w=new WeakMap,J=(t,s)=>{w.set(t,s)},X=t=>{w.delete(t)},T=t=>w.get(t),m=t=>{const s=t.target,n=s.closest(".tox"),a=s.matches(".ephox-snooker-resizer-bar");(n||a)&&t.stopPropagation()},A=t=>{t.stopPropagation(),t.preventDefault()},Y=(t,s)=>{const n=t.getDoc(),a=t.getWin();if(s!=null&&s.event){const{event:r}=s,{clientX:c,clientY:d}=r;let l;if(n.caretRangeFromPoint)l=n.caretRangeFromPoint(c,d);else if(n.caretPositionFromPoint){const i=n.caretPositionFromPoint(c,d);l=n.createRange(),l==null||l.setStart(i.offsetNode,i.offset)}if(l){const i=a.getSelection();i==null||i.removeAllRanges(),i==null||i.addRange(l),t.selection.setRng(l)}}else t.execCommand("SelectAll")},Q=t=>{var u,e;const{el:s,editor:n,componentView:a}=t,r=n.runCommand(h.getStateTheme),c=a.model,d={target:s,inline:!0,skin:(r==null?void 0:r.theme)===P.dark?"oxide-dark":"oxide",menubar:!1,image_advtab:!0,paste_data_images:!0,statusbar:!1,branding:!1,forced_root_block:"div",plugins:"advlist autolink lists link image media table",toolbar_mode:"sliding",toolbar:"bold italic underline strikethrough forecolor backcolor alignleft aligncenter alignright alignjustify link image | fontfamily fontsize bullist numlist outdent indent table"},l=((e=(u=t.pluginOpts)==null?void 0:u.loadConfig)==null?void 0:e.call(u,{config:d,editor:n,componentView:a,component:c}))||{};return{...d,...l}},O=(t,s=document)=>new Promise((n,a)=>{const r=Array.isArray(t)?[...t]:[t],{head:c}=s,d=l=>{if(l.length){const i=s.createElement("script");i.src=l.shift(),i.onload=d.bind(null,l),i.onerror=a,c.appendChild(i)}else n()};d(r)});return $(function(t,s={}){const n={cdnScript:"https://cdn.jsdelivr.net/npm/tinymce@6.8.5/tinymce.min.js",...s},{cdnScript:a}=n,r=t.Canvas.events,c=!n.skipCustomTheme,d="gs-plg-tinymce-studio-theme",l=async(e,o)=>{const b=e.ownerDocument,x=b.defaultView,g=o==null?void 0:o.view;if(!x||!g){console.warn("Missing required data",{win:x,componentView:g});return}const y=Q({el:e,editor:t,componentView:g,pluginOpts:n}),f=(await x.tinymce.init(y))[0];if(!f)return;const Z=(await window.tinymce.init({...y,target:document.createElement("div")}))[0];return f.ui.show(),b.body.addEventListener("mousedown",m),document.body.addEventListener("mousedown",m),f.on("Change",()=>q(e)),f.on("blur",()=>f.ui.show()),f.on("OpenWindow",function(){var M;const v=(M=b.querySelector(".tox-dialog"))==null?void 0:M.closest(".tox");v&&(v==null?void 0:v.ownerDocument)!==document&&(document.body.appendChild(v),f.once("CloseWindow",()=>{v&&v.ownerDocument===document&&b.body.appendChild(v)}))}),e.addEventListener("dragstart",A,{capture:!0}),t.runCommand(h.setStateContextMenu,{enabled:!1}),Y(f,o),{rteEditor:f,rteEditorShallow:Z}},i=(e,o)=>{e.ownerDocument.body.removeEventListener("mousedown",m),document.body.removeEventListener("mousedown",m),e.removeEventListener("dragstart",A,{capture:!0}),t.runCommand(h.setStateContextMenu,{enabled:!0}),o.rteEditor.destroy(),o.rteEditorShallow.destroy()};t.on(r.frameLoad,async({window:e})=>{const o=e.document;O(a,o)}),t.onReady(()=>{O(a,document),c&&K(d,V,{target:document.body})}),t.setCustomRte({parseContent:!0,async enable(e,o,b){const x=T(e);if(x)return x.rteEditor;const g=await l(e,b);return g&&J(e,g),g==null?void 0:g.rteEditor},disable(e){const o=T(e);o&&(X(e),i(e,o))},getContent(e,o,b){var y;const x=T(e),g=x==null?void 0:x.rteEditor;return g&&!g.isDirty()?b.view.lastContent:g?(y=g.getContent)==null?void 0:y.call(g):e.innerHTML}});const u=H(t,n.enableOnClick);F({editor:t,licenseKey:n.licenseKey,plan:C,pluginName:z,cleanup:()=>{t.RichTextEditor.customRte=void 0,u()}})})});
@@ -1,22 +1,22 @@
1
- "use strict";const B="app.grapesjs.com",H="app-stage.grapesjs.com",L="app2.grapesjs.com",S="app-stage2.grapesjs.com",$=[B,L,H,S,"localhost","127.0.0.1",".local-credentialless.webcontainer.io",".local.webcontainer.io","-sandpack.codesandbox.io"],k="license:check:start",E="license:check:end",I=()=>typeof window<"u",P=({isDev:e,isStage:i})=>`${e?"":`https://${i?H:B}`}/api`,N=()=>{const e=I()&&window.location.hostname;return!!e&&($.includes(e)||$.some(i=>e.endsWith(i)))};async function D({path:e,baseApiUrl:i,method:a="GET",headers:o={},params:p,body:n}){const d=`${i||P({isDev:!1,isStage:!1})}${e}`,s={method:a,headers:{"Content-Type":"application/json",...o}};n&&(s.body=JSON.stringify(n));const r=p?new URLSearchParams(p).toString():"",l=r?`?${r}`:"",v=await fetch(`${d}${l}`,s);if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);return v.json()}var w=(e=>(e.free="free",e.startup="startup",e.business="business",e.enterprise="enterprise",e))(w||{});const z={[w.free]:0,[w.startup]:10,[w.business]:20,[w.enterprise]:30};function W(e){const i=e;return i.init=a=>o=>e(o,a),i}const _=e=>W(e);async function U({editor:e,plan:i,pluginName:a,licenseKey:o,cleanup:p}){let n="",c=!1;const d=N(),s=l=>{console.warn("Cleanup plugin:",a,"Reason:",l),p()},r=(l={})=>{var b;const{error:v,sdkLicense:A}=l,g=(b=l.plan)==null?void 0:b.category;if(!(A||l.license)||v)s(v||"Invalid license");else if(g){const m=z[i],C=z[g];m>C&&s({pluginRequiredPlan:i,licensePlan:g})}};e.on(k,l=>{n=l==null?void 0:l.baseApiUrl,c=!0}),e.on(E,l=>{r(l)}),setTimeout(async()=>{if(!c){if(d)return;if(o){const l=await F({licenseKey:o,pluginName:a,baseApiUrl:n});l&&r(l)}else s("The `licenseKey` option not provided")}},2e3)}async function F(e){const{licenseKey:i,pluginName:a,baseApiUrl:o}=e;try{return(await D({baseApiUrl:o,path:`/sdk/${i||"na"}`,method:"POST",params:{d:window.location.hostname,pn:a}})).result||{}}catch(p){return console.error("Error during SDK license check:",p),!1}}const O=(e,i)=>{var a;return!!((a=e==null?void 0:e.classList)!=null&&a.contains(i))},x=e=>i=>{var a;return((a=i.getAttribute)==null?void 0:a.call(i,M))===e},R="gjs-plg-",M="data-type-role",Y="shapeDividerComponent",K=w.startup,j=function(e,i={}){const{Components:a,Blocks:o,Selectors:p}=e,n="shape-divider",c=`${n}-cnt`,d=`${R}${n}`,s=`${R}${c}`,r=[{id:"tilt",label:"Tilt",value:`<svg preserveAspectRatio="none" viewBox="0 0 240 24">
1
+ "use strict";const H="app.grapesjs.com",T="app-stage.grapesjs.com",R="app2.grapesjs.com",L="app-stage2.grapesjs.com",z=[H,R,T,L,"localhost","127.0.0.1",".local-credentialless.webcontainer.io",".local.webcontainer.io","-sandpack.codesandbox.io"],E="license:check:start",I="license:check:end",P=()=>typeof window<"u",N=({isDev:e,isStage:i,isPlatform:l})=>`${e?"":`https://${i?T:H}`}/${l?"platform-api":"api"}`,k=()=>{const e=P()&&window.location.hostname;return!!e&&(z.includes(e)||z.some(i=>e.endsWith(i)))};async function D({path:e,baseApiUrl:i,method:l="GET",headers:c={},params:n,body:o}){const v=`${i||N({isDev:!1,isStage:!1})}${e}`,t={method:l,headers:{"Content-Type":"application/json",...c}};o&&(t.body=JSON.stringify(o));const r=n?new URLSearchParams(n).toString():"",g=r?`?${r}`:"",s=await fetch(`${v}${g}`,t);if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return s.json()}var w=(e=>(e.free="free",e.startup="startup",e.business="business",e.enterprise="enterprise",e))(w||{});const C={[w.free]:0,[w.startup]:10,[w.business]:20,[w.enterprise]:30};function W(e){const i=e;return i.init=l=>c=>e(c,l),i}const _=e=>W(e);async function U({editor:e,plan:i,pluginName:l,licenseKey:c,onLicenseCheckResponse:n,cleanup:o}){let p="",v=!1;const t=k(),r=s=>{console.warn("Cleanup plugin:",l,"Reason:",s),o()},g=(s={})=>{var y;const{error:m,sdkLicense:b}=s,u=(y=s.plan)==null?void 0:y.category;if(!(b||s.license)||m)r(m||"Invalid license");else if(u){const M=C[i],V=C[u];M>V&&r({pluginRequiredPlan:i,licensePlan:u})}};e.on(E,s=>{p=s==null?void 0:s.baseApiUrl,v=!0}),e.on(I,s=>{n==null||n(s),g(s)}),setTimeout(async()=>{if(!v){if(t)return;if(c){const s=await F({licenseKey:c,pluginName:l,baseApiUrl:p});n==null||n(s),s&&g(s)}else r("The `licenseKey` option not provided")}},2e3)}async function F(e){const{licenseKey:i,pluginName:l,baseApiUrl:c}=e;try{return(await D({baseApiUrl:c,path:`/sdk/${i||"na"}`,method:"POST",params:{d:window.location.hostname,pn:l}})).result||{}}catch(n){return console.error("Error during SDK license check:",n),!1}}const O=(e,i)=>{var l;return!!((l=e==null?void 0:e.classList)!=null&&l.contains(i))},x=e=>i=>{var l;return((l=i.getAttribute)==null?void 0:l.call(i,$))===e},B="gjs-plg-",$="data-type-role",Y="shapeDividerComponent",K=w.startup,j=function(e,i={}){const{Components:l,Blocks:c,Selectors:n}=e,o="shape-divider",p=`${o}-cnt`,v=`${B}${o}`,t=`${B}${p}`,r=[{id:"tilt",label:"Tilt",value:`<svg preserveAspectRatio="none" viewBox="0 0 240 24">
2
2
  <path d="M240 24V0L0 24h240z"/>
3
3
  </svg>`},{id:"tilt-split",label:"Tilt split",value:`<svg preserveAspectRatio="none" viewBox="0 0 240 24">
4
4
  <path fill-opacity=".3" d="M240 24V0L0 24h240z"/>
5
5
  <path d="M240 24V3.7L0 24h240z"/>
6
6
  <path fill-opacity=".3" d="M240 24V2L0 24h240z"/>
7
- </svg>`},{id:"triangle",label:"Trinagle",value:`<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 1200 120">
7
+ </svg>`},{id:"triangle",label:"Trinagle",value:`<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 1200 120">
8
8
  <path d="M1200 0L0 0 598.97 114.72 1200 0z"/>
9
9
  </svg>`},{id:"triangle-inv",label:"Trinagle inverted",value:`<svg preserveAspectRatio="none" viewBox="0 0 1200 120">
10
10
  <path d="M598.97 114.72L0 0 0 120 1200 120 1200 0 598.97 114.72z"></path>
11
- </svg>`},{id:"triangle-asy",label:"Trinagle asymmetrical",value:`<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 1200 120">
11
+ </svg>`},{id:"triangle-asy",label:"Trinagle asymmetrical",value:`<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 1200 120">
12
12
  <path d="M1200 0L0 0 892.25 114.72 1200 0z"></path>
13
13
  </svg>`},{id:"book",label:"Book",value:`<svg preserveAspectRatio="none" viewBox="0 0 1200 120">
14
14
  <path d="M602.45,3.86h0S572.9,116.24,281.94,120H923C632,116.24,602.45,3.86,602.45,3.86Z"></path>
15
- </svg>`},{id:"book-inv",label:"Book inverted",value:`<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 1200 120">
15
+ </svg>`},{id:"book-inv",label:"Book inverted",value:`<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 1200 120">
16
16
  <path d="M1200,0H0V120H281.94C572.9,116.24,602.45,3.86,602.45,3.86h0S632,116.24,923,120h277Z" ></path>
17
- </svg>`},{id:"hills",label:"Hills",value:`<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
17
+ </svg>`},{id:"hills",label:"Hills",value:`<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
18
18
  <path d="M0 0v14.2a49 49 0 0110.3-2.7c17.5-2.8 24.4 6 43.5 11.1 26.8 7.2 39.3-19.2 63.4-19.2 22.6 0 40.4 27 65 18.6 14.7-5 19-14 39.9-17.6 7-1.3 13-1.8 17.9-1V0"/>
19
- </svg>`},{id:"hills-split",label:"Hills split",value:`<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
19
+ </svg>`},{id:"hills-split",label:"Hills split",value:`<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
20
20
  <path d="M0 0v14.2a49 49 0 0110.3-2.7c17.5-2.8 24.4 6 43.5 11.1 26.8 7.2 39.3-19.2 63.4-19.2 22.6 0 40.4 27 65 18.6 14.7-5 19-14 39.9-17.6 7-1.3 13-1.8 17.9-1V0"/>
21
21
  <path fill-opacity=".3" d="M0 0v18.1a49 49 0 0115.9-4.9c17-2.3 23.8 5.2 42.5 9.7C84.5 29 96.6 6.3 120 6.3c22.1 0 39.5 23.3 63.6 16 14.2-4.3 18.5-12 38.8-15.2A62.3 62.3 0 01240 6V0"/>
22
22
  <path fill-opacity=".3" d="M0 0v13.4c3.8-.8 7.6-1.4 10.3-1.8 17.3-2.8 24.4 6 47.2 11.1 32 7.2 35-18.1 60.7-18.1 24.1 0 45.2 23 67.4 14.6 13.2-5 19-13.7 39.4-17.4 5.5-1 10.4-1.5 15-1.3V0"/>
@@ -26,9 +26,9 @@
26
26
  <path fill-opacity=".3" d="M240 24V0c-51.8 0-69.9 13.2-94.7 15.6-24.7 2.4-43.9-1.2-63.8-1-19.1 0-31.2 3.6-51.3 6.5A126 126 0 010 22V24h240z"/>
27
27
  <path fill-opacity=".3" d="M240 24V2.2c-51.8 0-69.9 12-94.7 14.2-24.7 2.1-43.9-1.1-63.8-1-19.1 0-31.2 3.3-51.3 6-14.6 1.8-25.9 1.2-30.2.8V24h240z"/>
28
28
  <path d="M240 24V3.7c-51.8 0-69.9 11.7-94.7 14-24.7 2.4-43.9-3.2-63.8-3.1-19.1 0-31.2 3.6-51.3 6.5a128 128 0 01-30.2 1V24h240z"/>
29
- </svg>`},{id:"high-hills",label:"High hills",value:`<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
29
+ </svg>`},{id:"high-hills",label:"High hills",value:`<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
30
30
  <path d="M240 0H0v23.5c4.3.5 15.5 1.2 30.2-.9 20.1-2.8 32.1-6.2 51.3-6.3 20 0 39 3.4 63.8 1 24.8-2.2 42.9-15 94.7-15"/>
31
- </svg>`},{id:"high-hills-split",label:"High hills split",value:`<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
31
+ </svg>`},{id:"high-hills-split",label:"High hills split",value:`<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
32
32
  <path fill-opacity=".3" d="M240 0H0v23.5c4.3.5 15.5 1.2 30.2-.9 20.1-2.8 32.1-6.2 51.3-6.3 20 0 39 3.4 63.8 1 24.8-2.2 42.9-15 94.7-15"/>
33
33
  <path fill-opacity=".3" d="M240 0H0v23.4c4.3.4 15.5 1.2 30.2-1 20.1-3.1 32.1-6.9 51.3-7 20 0 39 6 63.8 3.4C170 16.3 188.2 4 240 4"/>
34
34
  <path d="M0 23.3c4.3.5 15.5 1.3 30.2-1 20.1-3 32.1-6.8 51.3-7 20 0 39 3.8 63.8 1.2C170 14 188.2 0 240 0H0v23.3z"/>
@@ -38,9 +38,9 @@
38
38
  <path fill-opacity=".3" d="M0 13.2V24h240V13.3A541.2 541.2 0 00119.8 0C69.2 0 27.6 6.9 0 13.2z"/>
39
39
  <path fill-opacity=".3" d="M0 18.9V24h240v-5A437.4 437.4 0 00119.8 2.7C64.4 2.7 21.6 12.6 0 19z"/>
40
40
  <path d="M119.8 5.1C47.8 5.1 0 24 0 24h240S191.8 5.1 119.8 5.1z"/>
41
- </svg>`},{id:"pit",label:"Pit",value:`<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
41
+ </svg>`},{id:"pit",label:"Pit",value:`<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
42
42
  <path d="M240 24V0H0v24S47.9 5.1 119.8 5.1C191.8 5.1 240 24 240 24z"/>
43
- </svg>`},{id:"pit-split",label:"Pit split",value:`<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
43
+ </svg>`},{id:"pit-split",label:"Pit split",value:`<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
44
44
  <path fill-opacity=".3" d="M240 24V0H0v24S47.9 5.1 119.8 5.1C191.8 5.1 240 24 240 24z"/>
45
45
  <path fill-opacity=".3" d="M119.8 2.7c55.6 0 98.5 10 120.2 16.2V0H0v18.9A434.6 434.6 0 01119.8 2.7z"/>
46
46
  <path d="M119.8.1A541 541 0 01240 13.4V0H0v13.3A538.9 538.9 0 01119.8.1z"/>
@@ -50,48 +50,48 @@
50
50
  <path fill-opacity=".3" d="M240 0c-4.6-.2-9.6.4-15 1.4-20.4 3.7-26.3 12.3-39.4 17.3C163.3 27 144 4 119.9 4c-25.6 0-30.5 25.3-62.5 18-22.8-5.1-29.8-13.8-47-11-2.8.4-6.6 1-10.4 1.8V24h240V0z"/>
51
51
  <path fill-opacity=".3" d="M222 3.9c-20.8 3.7-25.1 12.6-39.8 17.6C157.6 29.9 141.5 3 118.9 3 94.7 3 80.6 29.3 53.8 22c-19-5-26-13.8-43.5-11-3.7.6-7.2 1.5-10.3 2.7V24h240V2.9c-5-.8-10.9-.3-18 1z"/>
52
52
  <path d="M240 5.7c-4.8-.6-10.6-.2-17.5.9-20.3 3.2-24.6 10.9-38.9 15.2-24 7.3-39.7-16-61.8-16-23.5 0-37.3 22.7-63.5 16.5C39.7 18 33 10.3 16 12.7c-6.1.9-11.5 2.6-15.9 6.7V24h240V5.7z"/>
53
- </svg>`},{id:"windy-waves",label:"Windy waves",value:`<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
53
+ </svg>`},{id:"windy-waves",label:"Windy waves",value:`<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
54
54
  <path d="M0 0v18C21.5 7 49.6 2.2 64.8 6.4 82 11.2 75.4 25.2 91.7 23.9c14.2-1.1 25.8-12.3 40-12.3 10.4 0 7.8 6 18.8 6.9 11.5.8 21.6-5 37.2-9 19.9-5 42.1-5.3 52.3 0V0H0z"/>
55
- </svg>`},{id:"windy-waves-split",label:"Windy waves split",value:`<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
55
+ </svg>`},{id:"windy-waves-split",label:"Windy waves split",value:`<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
56
56
  <path d="M0 0v14.9C21.6 4.7 57.5 0 71 4.3c16 4.8 9.6 19.3 26 18 14.5-1 25.5-13 40.5-12.9 11 0 10.1 6.6 21.7 7.5 12.1 1 17-7 36-11.4 17.6-4.2 33.4-6.1 44.8-5V0H0z"/>
57
57
  <path fill-opacity=".3" d="M0 16.7C19.2 5.9 55.8 1 70 5 86 10 78.4 24 94.1 22.8c14-1 27.8-12.7 42.4-12.7 10.7 0 9.1 6.5 20.5 7.4 11.9.9 16.8-6.8 34.8-11.2 19.8-4.8 36.9-5 48.1-1.7V0H0"/>
58
58
  <path fill-opacity=".3" d="M0 0v18C21.5 7 49.6 2.2 64.8 6.4 82 11.2 75.4 25.2 91.7 23.9c14.2-1.1 25.8-12.3 40-12.3 10.4 0 7.8 6 18.8 6.9 11.5.8 21.6-5 37.2-9 19.9-5 42.1-5.3 52.3 0V0H0z"/>
59
- </svg>`},{id:"zigzag",label:"Zigzag",value:`<svg class="${s}-inv" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" viewBox="0 0 1000 38">
59
+ </svg>`},{id:"zigzag",label:"Zigzag",value:`<svg class="${t}-inv" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" viewBox="0 0 1000 38">
60
60
  <path d="M75 38l25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25V.0H0V13l25 25 25-25z"/>
61
- </svg>`}],l={tl:!1,tc:!1,tr:!1,cl:!1,cr:!1,bl:!1,bc:!1,br:!1},v={...l,bc:!0},A={...l,tc:!0},g="shape",y="flip-y",b="flip-x",m="Shape Divider",C=`<svg viewBox="0 0 22 22">
61
+ </svg>`}],g={tl:!1,tc:!1,tr:!1,cl:!1,cr:!1,bl:!1,bc:!1,br:!1},s={...g,bc:!0},m={...g,tc:!0},b="shape",u="flip-y",A="flip-x",y="Shape Divider",M=`<svg viewBox="0 0 22 22">
62
62
  <path fill="currentColor" d="M2 2v18h18V2H2zm0-2h18a2 2 0 012 2v18a2 2 0 01-2 2H2a2 2 0 01-2-2V2C0 .9.9 0 2 0zM1 13L2 0h18l1 9-20 4z"/>
63
- </svg>`,{block:V={}}=i;e.on(p.events.add,t=>{t.getFullName().startsWith(`.${d}`)&&t.set({private:!0})}),a.addType(n,{isComponent:t=>x(n)(t)||O(t,d),block:V&&{label:m,media:C,category:"Extra",select:!0,...V},model:{defaults:{droppable:!1,highlightable:!1,classes:d,attributes:{[M]:n},components:{type:c},styles:`.${d} { position: relative; }`,delegate:{select:t=>t.findFirstType(c),layer:t=>t.findFirstType(c)}}},view:{onRender(){this.el.style.height="1px"}}}),a.addType(c,{isComponent:x(c),model:{defaults:{droppable:!1,highlightable:!1,classes:s,emptyState:!0,icon:C,name:m,delegate:{remove:t=>t.parent(),move:t=>t.parent(),copy:t=>t.parent()},attributes:{[M]:c},[g]:r[0].id,resizable:v,stylable:["height","width","color"],styles:`
64
- .${s} {
63
+ </svg>`,{block:V={}}=i;e.on(n.events.add,a=>{a.getFullName().startsWith(`.${v}`)&&a.set({private:!0})}),l.addType(o,{isComponent:a=>x(o)(a)||O(a,v),block:V&&{label:y,media:M,category:"Extra",select:!0,...V},model:{defaults:{droppable:!1,highlightable:!1,classes:v,attributes:{[$]:o},components:{type:p},styles:`.${v} { position: relative; }`,delegate:{select:a=>a.findFirstType(p),layer:a=>a.findFirstType(p)}}},view:{onRender(){this.el.style.height="1px"}}}),l.addType(p,{isComponent:x(p),model:{defaults:{droppable:!1,highlightable:!1,classes:t,emptyState:!0,icon:M,name:y,delegate:{remove:a=>a.parent(),move:a=>a.parent(),copy:a=>a.parent()},attributes:{[$]:p},[b]:r[0].id,resizable:s,stylable:["height","width","color"],styles:`
64
+ .${t} {
65
65
  position: absolute;
66
66
  width: 100%;
67
67
  height: 100px;
68
68
  color: black;
69
69
  overflow: hidden;
70
70
  }
71
- .${s} > svg {
71
+ .${t} > svg {
72
72
  height: 100%;
73
73
  width: 100%;
74
74
  transform: scaleY(-1);
75
75
  }
76
- .${s}--fl-v {
76
+ .${t}--fl-v {
77
77
  transform: translateY(-100%);
78
78
  }
79
- .${s}--fl-v-h {
79
+ .${t}--fl-v-h {
80
80
  transform: translateY(-100%);
81
81
  }
82
- .${s}--fl-v > svg {
82
+ .${t}--fl-v > svg {
83
83
  transform: scaleY(1);
84
84
  }
85
- .${s}--fl-h > svg {
85
+ .${t}--fl-h > svg {
86
86
  transform: scaleX(-1) scaleY(-1);
87
87
  }
88
- .${s}--fl-v-h > svg {
88
+ .${t}--fl-v-h > svg {
89
89
  transform: scaleY(1) scaleX(-1);
90
90
  }
91
- .${s} > svg > path {
91
+ .${t} > svg > path {
92
92
  fill: currentColor;
93
93
  }
94
- .${s}-inv > path {
94
+ .${t}-inv > path {
95
95
  transform: scale(-1, -1) translate(-100%, -100%);
96
96
  }
97
- `,traits:[{type:"select",name:g,label:"Shape",changeProp:!0,options:r.map(({id:t,label:u,value:h})=>({id:t,label:u,icon:{icon:h.replace("<svg ",'<svg style="width: 35px; height: 7px; fill: currentColor;"')}}))},{type:"checkbox",name:y,label:"Flip vertically",changeProp:!0},{type:"checkbox",name:b,label:"flip horizontally",changeProp:!0}]},init(){this.on(`change:${g}`,this.onShapeChange),this.on(`change:${b} change:${y}`,this.onFlip),this.onShapeChange()},onShapeChange(){const t=this.get(g),u=r.find(f=>f.id===t),h=(u==null?void 0:u.value)||this.getInnerHTML().trim();this.components(""),h&&this.set("content",h)},onFlip(){const t=this.get(y),u=this.get(b),h=["fl-v","fl-h","fl-v-h"].map(T=>`${s}--${T}`);let f;t&&u?f=h[2]:u?f=h[1]:t&&(f=h[0]),this.removeClass(h),f&&this.addClass(f),this.set("resizable",t?A:v)}}}),U({editor:e,licenseKey:i.licenseKey,plan:K,pluginName:Y,cleanup:()=>{a.removeType(n),o.remove(n)}})},G=_(j);module.exports=G;
97
+ `,traits:[{type:"select",name:b,label:"Shape",changeProp:!0,options:r.map(({id:a,label:d,value:h})=>({id:a,label:d,icon:{icon:h.replace("<svg ",'<svg style="width: 35px; height: 7px; fill: currentColor;"')}}))},{type:"checkbox",name:u,label:"Flip vertically",changeProp:!0},{type:"checkbox",name:A,label:"flip horizontally",changeProp:!0}]},init(){this.on(`change:${b}`,this.onShapeChange),this.on(`change:${A} change:${u}`,this.onFlip),this.onShapeChange()},onShapeChange(){const a=this.get(b),d=r.find(f=>f.id===a),h=(d==null?void 0:d.value)||this.getInnerHTML().trim();this.components(""),h&&this.set("content",h)},onFlip(){const a=this.get(u),d=this.get(A),h=["fl-v","fl-h","fl-v-h"].map(S=>`${t}--${S}`);let f;a&&d?f=h[2]:d?f=h[1]:a&&(f=h[0]),this.removeClass(h),f&&this.addClass(f),this.set("resizable",a?m:s)}}}),U({editor:e,licenseKey:i.licenseKey,plan:K,pluginName:Y,cleanup:()=>{l.removeType(o),c.remove(o)}})},G=_(j);module.exports=G;