@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,8 +1,8 @@
1
- const B = "app.grapesjs.com", H = "app-stage.grapesjs.com", L = "app2.grapesjs.com", S = "app-stage2.grapesjs.com", $ = [
2
- B,
3
- L,
1
+ const H = "app.grapesjs.com", T = "app-stage.grapesjs.com", R = "app2.grapesjs.com", L = "app-stage2.grapesjs.com", z = [
4
2
  H,
5
- S,
3
+ R,
4
+ T,
5
+ L,
6
6
  "localhost",
7
7
  "127.0.0.1",
8
8
  ".local-credentialless.webcontainer.io",
@@ -11,102 +11,107 @@ const B = "app.grapesjs.com", H = "app-stage.grapesjs.com", L = "app2.grapesjs.c
11
11
  // For stackblitz.com demos
12
12
  "-sandpack.codesandbox.io"
13
13
  // For Sandpack demos
14
- ], k = "license:check:start", E = "license:check:end", I = () => typeof window < "u", P = ({ isDev: e, isStage: a }) => `${e ? "" : `https://${a ? H : B}`}/api`, N = () => {
15
- const e = I() && window.location.hostname;
16
- return !!e && ($.includes(e) || $.some((a) => e.endsWith(a)));
14
+ ], E = "license:check:start", I = "license:check:end", P = () => typeof window < "u", N = ({
15
+ isDev: e,
16
+ isStage: i,
17
+ isPlatform: l
18
+ }) => `${e ? "" : `https://${i ? T : H}`}/${l ? "platform-api" : "api"}`, k = () => {
19
+ const e = P() && window.location.hostname;
20
+ return !!e && (z.includes(e) || z.some((i) => e.endsWith(i)));
17
21
  };
18
22
  async function D({
19
23
  path: e,
20
- baseApiUrl: a,
21
- method: i = "GET",
22
- headers: o = {},
23
- params: p,
24
- body: n
24
+ baseApiUrl: i,
25
+ method: l = "GET",
26
+ headers: c = {},
27
+ params: n,
28
+ body: o
25
29
  }) {
26
- const d = `${a || P({ isDev: !1, isStage: !1 })}${e}`, s = {
27
- method: i,
30
+ const v = `${i || N({ isDev: !1, isStage: !1 })}${e}`, t = {
31
+ method: l,
28
32
  headers: {
29
33
  "Content-Type": "application/json",
30
- ...o
34
+ ...c
31
35
  }
32
36
  };
33
- n && (s.body = JSON.stringify(n));
34
- const r = p ? new URLSearchParams(p).toString() : "", l = r ? `?${r}` : "", v = await fetch(`${d}${l}`, s);
35
- if (!v.ok)
36
- throw new Error(`HTTP error! status: ${v.status}`);
37
- return v.json();
37
+ o && (t.body = JSON.stringify(o));
38
+ const r = n ? new URLSearchParams(n).toString() : "", g = r ? `?${r}` : "", s = await fetch(`${v}${g}`, t);
39
+ if (!s.ok)
40
+ throw new Error(`HTTP error! status: ${s.status}`);
41
+ return s.json();
38
42
  }
39
43
  var w = /* @__PURE__ */ ((e) => (e.free = "free", e.startup = "startup", e.business = "business", e.enterprise = "enterprise", e))(w || {});
40
- const z = {
44
+ const C = {
41
45
  [w.free]: 0,
42
46
  [w.startup]: 10,
43
47
  [w.business]: 20,
44
48
  [w.enterprise]: 30
45
49
  };
46
50
  function W(e) {
47
- const a = e;
48
- return a.init = (i) => (o) => e(o, i), a;
51
+ const i = e;
52
+ return i.init = (l) => (c) => e(c, l), i;
49
53
  }
50
54
  const _ = (e) => /* @__PURE__ */ W(e);
51
55
  async function U({
52
56
  editor: e,
53
- plan: a,
54
- pluginName: i,
55
- licenseKey: o,
56
- cleanup: p
57
+ plan: i,
58
+ pluginName: l,
59
+ licenseKey: c,
60
+ onLicenseCheckResponse: n,
61
+ cleanup: o
57
62
  }) {
58
- let n = "", c = !1;
59
- const d = N(), s = (l) => {
60
- console.warn("Cleanup plugin:", i, "Reason:", l), p();
61
- }, r = (l = {}) => {
62
- var b;
63
- const { error: v, sdkLicense: A } = l, g = (b = l.plan) == null ? void 0 : b.category;
64
- if (!(A || l.license) || v)
65
- s(v || "Invalid license");
66
- else if (g) {
67
- const m = z[a], C = z[g];
68
- m > C && s({ pluginRequiredPlan: a, licensePlan: g });
63
+ let p = "", v = !1;
64
+ const t = k(), r = (s) => {
65
+ console.warn("Cleanup plugin:", l, "Reason:", s), o();
66
+ }, g = (s = {}) => {
67
+ var y;
68
+ const { error: m, sdkLicense: b } = s, f = (y = s.plan) == null ? void 0 : y.category;
69
+ if (!(b || s.license) || m)
70
+ r(m || "Invalid license");
71
+ else if (f) {
72
+ const M = C[i], V = C[f];
73
+ M > V && r({ pluginRequiredPlan: i, licensePlan: f });
69
74
  }
70
75
  };
71
- e.on(k, (l) => {
72
- n = l == null ? void 0 : l.baseApiUrl, c = !0;
73
- }), e.on(E, (l) => {
74
- r(l);
76
+ e.on(E, (s) => {
77
+ p = s == null ? void 0 : s.baseApiUrl, v = !0;
78
+ }), e.on(I, (s) => {
79
+ n == null || n(s), g(s);
75
80
  }), setTimeout(async () => {
76
- if (!c) {
77
- if (d) return;
78
- if (o) {
79
- const l = await F({ licenseKey: o, pluginName: i, baseApiUrl: n });
80
- l && r(l);
81
+ if (!v) {
82
+ if (t) return;
83
+ if (c) {
84
+ const s = await F({ licenseKey: c, pluginName: l, baseApiUrl: p });
85
+ n == null || n(s), s && g(s);
81
86
  } else
82
- s("The `licenseKey` option not provided");
87
+ r("The `licenseKey` option not provided");
83
88
  }
84
89
  }, 2e3);
85
90
  }
86
91
  async function F(e) {
87
- const { licenseKey: a, pluginName: i, baseApiUrl: o } = e;
92
+ const { licenseKey: i, pluginName: l, baseApiUrl: c } = e;
88
93
  try {
89
94
  return (await D({
90
- baseApiUrl: o,
91
- path: `/sdk/${a || "na"}`,
95
+ baseApiUrl: c,
96
+ path: `/sdk/${i || "na"}`,
92
97
  method: "POST",
93
98
  params: {
94
99
  d: window.location.hostname,
95
- pn: i
100
+ pn: l
96
101
  }
97
102
  })).result || {};
98
- } catch (p) {
99
- return console.error("Error during SDK license check:", p), !1;
103
+ } catch (n) {
104
+ return console.error("Error during SDK license check:", n), !1;
100
105
  }
101
106
  }
102
- const O = (e, a) => {
103
- var i;
104
- return !!((i = e == null ? void 0 : e.classList) != null && i.contains(a));
105
- }, x = (e) => (a) => {
106
- var i;
107
- return ((i = a.getAttribute) == null ? void 0 : i.call(a, M)) === e;
108
- }, R = "gjs-plg-", M = "data-type-role", Y = "shapeDividerComponent", K = w.startup, j = function(e, a = {}) {
109
- const { Components: i, Blocks: o, Selectors: p } = e, n = "shape-divider", c = `${n}-cnt`, d = `${R}${n}`, s = `${R}${c}`, r = [
107
+ const O = (e, i) => {
108
+ var l;
109
+ return !!((l = e == null ? void 0 : e.classList) != null && l.contains(i));
110
+ }, x = (e) => (i) => {
111
+ var l;
112
+ return ((l = i.getAttribute) == null ? void 0 : l.call(i, $)) === e;
113
+ }, B = "gjs-plg-", $ = "data-type-role", Y = "shapeDividerComponent", K = w.startup, j = function(e, i = {}) {
114
+ const { Components: l, Blocks: c, Selectors: n } = e, o = "shape-divider", p = `${o}-cnt`, v = `${B}${o}`, t = `${B}${p}`, r = [
110
115
  {
111
116
  id: "tilt",
112
117
  label: "Tilt",
@@ -126,7 +131,7 @@ const O = (e, a) => {
126
131
  {
127
132
  id: "triangle",
128
133
  label: "Trinagle",
129
- value: `<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 1200 120">
134
+ value: `<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 1200 120">
130
135
  <path d="M1200 0L0 0 598.97 114.72 1200 0z"/>
131
136
  </svg>`
132
137
  },
@@ -140,7 +145,7 @@ const O = (e, a) => {
140
145
  {
141
146
  id: "triangle-asy",
142
147
  label: "Trinagle asymmetrical",
143
- value: `<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 1200 120">
148
+ value: `<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 1200 120">
144
149
  <path d="M1200 0L0 0 892.25 114.72 1200 0z"></path>
145
150
  </svg>`
146
151
  },
@@ -154,21 +159,21 @@ const O = (e, a) => {
154
159
  {
155
160
  id: "book-inv",
156
161
  label: "Book inverted",
157
- value: `<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 1200 120">
162
+ value: `<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 1200 120">
158
163
  <path d="M1200,0H0V120H281.94C572.9,116.24,602.45,3.86,602.45,3.86h0S632,116.24,923,120h277Z" ></path>
159
164
  </svg>`
160
165
  },
161
166
  {
162
167
  id: "hills",
163
168
  label: "Hills",
164
- value: `<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
169
+ value: `<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
165
170
  <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"/>
166
171
  </svg>`
167
172
  },
168
173
  {
169
174
  id: "hills-split",
170
175
  label: "Hills split",
171
- value: `<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
176
+ value: `<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
172
177
  <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"/>
173
178
  <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"/>
174
179
  <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"/>
@@ -193,14 +198,14 @@ const O = (e, a) => {
193
198
  {
194
199
  id: "high-hills",
195
200
  label: "High hills",
196
- value: `<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
201
+ value: `<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
197
202
  <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"/>
198
203
  </svg>`
199
204
  },
200
205
  {
201
206
  id: "high-hills-split",
202
207
  label: "High hills split",
203
- value: `<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
208
+ value: `<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
204
209
  <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"/>
205
210
  <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"/>
206
211
  <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"/>
@@ -225,14 +230,14 @@ const O = (e, a) => {
225
230
  {
226
231
  id: "pit",
227
232
  label: "Pit",
228
- value: `<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
233
+ value: `<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
229
234
  <path d="M240 24V0H0v24S47.9 5.1 119.8 5.1C191.8 5.1 240 24 240 24z"/>
230
235
  </svg>`
231
236
  },
232
237
  {
233
238
  id: "pit-split",
234
239
  label: "Pit split",
235
- value: `<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
240
+ value: `<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
236
241
  <path fill-opacity=".3" d="M240 24V0H0v24S47.9 5.1 119.8 5.1C191.8 5.1 240 24 240 24z"/>
237
242
  <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"/>
238
243
  <path d="M119.8.1A541 541 0 01240 13.4V0H0v13.3A538.9 538.9 0 01119.8.1z"/>
@@ -257,14 +262,14 @@ const O = (e, a) => {
257
262
  {
258
263
  id: "windy-waves",
259
264
  label: "Windy waves",
260
- value: `<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
265
+ value: `<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
261
266
  <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"/>
262
267
  </svg>`
263
268
  },
264
269
  {
265
270
  id: "windy-waves-split",
266
271
  label: "Windy waves split",
267
- value: `<svg class="${s}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
272
+ value: `<svg class="${t}-inv" preserveAspectRatio="none" viewBox="0 0 240 24">
268
273
  <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"/>
269
274
  <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"/>
270
275
  <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"/>
@@ -273,11 +278,11 @@ const O = (e, a) => {
273
278
  {
274
279
  id: "zigzag",
275
280
  label: "Zigzag",
276
- value: `<svg class="${s}-inv" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" viewBox="0 0 1000 38">
281
+ value: `<svg class="${t}-inv" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" viewBox="0 0 1000 38">
277
282
  <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"/>
278
283
  </svg>`
279
284
  }
280
- ], l = {
285
+ ], g = {
281
286
  tl: !1,
282
287
  tc: !1,
283
288
  tr: !1,
@@ -286,16 +291,16 @@ const O = (e, a) => {
286
291
  bl: !1,
287
292
  bc: !1,
288
293
  br: !1
289
- }, 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">
294
+ }, s = { ...g, bc: !0 }, m = { ...g, tc: !0 }, b = "shape", f = "flip-y", A = "flip-x", y = "Shape Divider", M = `<svg viewBox="0 0 22 22">
290
295
  <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"/>
291
- </svg>`, { block: V = {} } = a;
292
- e.on(p.events.add, (t) => {
293
- t.getFullName().startsWith(`.${d}`) && t.set({ private: !0 });
294
- }), i.addType(n, {
295
- isComponent: (t) => x(n)(t) || O(t, d),
296
+ </svg>`, { block: V = {} } = i;
297
+ e.on(n.events.add, (a) => {
298
+ a.getFullName().startsWith(`.${v}`) && a.set({ private: !0 });
299
+ }), l.addType(o, {
300
+ isComponent: (a) => x(o)(a) || O(a, v),
296
301
  block: V && {
297
- label: m,
298
- media: C,
302
+ label: y,
303
+ media: M,
299
304
  category: "Extra",
300
305
  select: !0,
301
306
  ...V
@@ -304,13 +309,13 @@ const O = (e, a) => {
304
309
  defaults: {
305
310
  droppable: !1,
306
311
  highlightable: !1,
307
- classes: d,
308
- attributes: { [M]: n },
309
- components: { type: c },
310
- styles: `.${d} { position: relative; }`,
312
+ classes: v,
313
+ attributes: { [$]: o },
314
+ components: { type: p },
315
+ styles: `.${v} { position: relative; }`,
311
316
  delegate: {
312
- select: (t) => t.findFirstType(c),
313
- layer: (t) => t.findFirstType(c)
317
+ select: (a) => a.findFirstType(p),
318
+ layer: (a) => a.findFirstType(p)
314
319
  }
315
320
  }
316
321
  },
@@ -319,106 +324,106 @@ const O = (e, a) => {
319
324
  this.el.style.height = "1px";
320
325
  }
321
326
  }
322
- }), i.addType(c, {
323
- isComponent: x(c),
327
+ }), l.addType(p, {
328
+ isComponent: x(p),
324
329
  model: {
325
330
  defaults: {
326
331
  droppable: !1,
327
332
  highlightable: !1,
328
- classes: s,
333
+ classes: t,
329
334
  emptyState: !0,
330
- icon: C,
331
- name: m,
335
+ icon: M,
336
+ name: y,
332
337
  delegate: {
333
- remove: (t) => t.parent(),
334
- move: (t) => t.parent(),
335
- copy: (t) => t.parent()
338
+ remove: (a) => a.parent(),
339
+ move: (a) => a.parent(),
340
+ copy: (a) => a.parent()
336
341
  },
337
- attributes: { [M]: c },
338
- [g]: r[0].id,
339
- resizable: v,
342
+ attributes: { [$]: p },
343
+ [b]: r[0].id,
344
+ resizable: s,
340
345
  stylable: ["height", "width", "color"],
341
346
  styles: `
342
- .${s} {
347
+ .${t} {
343
348
  position: absolute;
344
349
  width: 100%;
345
350
  height: 100px;
346
351
  color: black;
347
352
  overflow: hidden;
348
353
  }
349
- .${s} > svg {
354
+ .${t} > svg {
350
355
  height: 100%;
351
356
  width: 100%;
352
357
  transform: scaleY(-1);
353
358
  }
354
- .${s}--fl-v {
359
+ .${t}--fl-v {
355
360
  transform: translateY(-100%);
356
361
  }
357
- .${s}--fl-v-h {
362
+ .${t}--fl-v-h {
358
363
  transform: translateY(-100%);
359
364
  }
360
- .${s}--fl-v > svg {
365
+ .${t}--fl-v > svg {
361
366
  transform: scaleY(1);
362
367
  }
363
- .${s}--fl-h > svg {
368
+ .${t}--fl-h > svg {
364
369
  transform: scaleX(-1) scaleY(-1);
365
370
  }
366
- .${s}--fl-v-h > svg {
371
+ .${t}--fl-v-h > svg {
367
372
  transform: scaleY(1) scaleX(-1);
368
373
  }
369
- .${s} > svg > path {
374
+ .${t} > svg > path {
370
375
  fill: currentColor;
371
376
  }
372
- .${s}-inv > path {
377
+ .${t}-inv > path {
373
378
  transform: scale(-1, -1) translate(-100%, -100%);
374
379
  }
375
380
  `,
376
381
  traits: [
377
382
  {
378
383
  type: "select",
379
- name: g,
384
+ name: b,
380
385
  label: "Shape",
381
386
  changeProp: !0,
382
- options: r.map(({ id: t, label: u, value: h }) => ({
383
- id: t,
384
- label: u,
387
+ options: r.map(({ id: a, label: d, value: h }) => ({
388
+ id: a,
389
+ label: d,
385
390
  icon: { icon: h.replace("<svg ", '<svg style="width: 35px; height: 7px; fill: currentColor;"') }
386
391
  }))
387
392
  },
388
393
  {
389
394
  type: "checkbox",
390
- name: y,
395
+ name: f,
391
396
  label: "Flip vertically",
392
397
  changeProp: !0
393
398
  },
394
399
  {
395
400
  type: "checkbox",
396
- name: b,
401
+ name: A,
397
402
  label: "flip horizontally",
398
403
  changeProp: !0
399
404
  }
400
405
  ]
401
406
  },
402
407
  init() {
403
- this.on(`change:${g}`, this.onShapeChange), this.on(`change:${b} change:${y}`, this.onFlip), this.onShapeChange();
408
+ this.on(`change:${b}`, this.onShapeChange), this.on(`change:${A} change:${f}`, this.onFlip), this.onShapeChange();
404
409
  },
405
410
  onShapeChange() {
406
- const t = this.get(g), u = r.find((f) => f.id === t), h = (u == null ? void 0 : u.value) || this.getInnerHTML().trim();
411
+ const a = this.get(b), d = r.find((u) => u.id === a), h = (d == null ? void 0 : d.value) || this.getInnerHTML().trim();
407
412
  this.components(""), h && this.set("content", h);
408
413
  },
409
414
  onFlip() {
410
- const t = this.get(y), u = this.get(b), h = ["fl-v", "fl-h", "fl-v-h"].map((T) => `${s}--${T}`);
411
- let f;
412
- 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);
415
+ const a = this.get(f), d = this.get(A), h = ["fl-v", "fl-h", "fl-v-h"].map((S) => `${t}--${S}`);
416
+ let u;
417
+ a && d ? u = h[2] : d ? u = h[1] : a && (u = h[0]), this.removeClass(h), u && this.addClass(u), this.set("resizable", a ? m : s);
413
418
  }
414
419
  }
415
420
  }), U({
416
421
  editor: e,
417
- licenseKey: a.licenseKey,
422
+ licenseKey: i.licenseKey,
418
423
  plan: K,
419
424
  pluginName: Y,
420
425
  cleanup: () => {
421
- i.removeType(n), o.remove(n);
426
+ l.removeType(o), c.remove(o);
422
427
  }
423
428
  });
424
429
  }, G = _(j);
@@ -1,22 +1,22 @@
1
- (function(b,m){typeof exports=="object"&&typeof module<"u"?module.exports=m():typeof define=="function"&&define.amd?define(m):(b=typeof globalThis<"u"?globalThis:b||self,b.StudioSdkPlugins_shapeDividerComponent=m())})(this,function(){"use strict";const b="app.grapesjs.com",m="app-stage.grapesjs.com",z=[b,"app2.grapesjs.com",m,"app-stage2.grapesjs.com","localhost","127.0.0.1",".local-credentialless.webcontainer.io",".local.webcontainer.io","-sandpack.codesandbox.io"],H="license:check:start",L="license:check:end",S=()=>typeof window<"u",k=({isDev:e,isStage:i})=>`${e?"":`https://${i?m:b}`}/api`,I=()=>{const e=S()&&window.location.hostname;return!!e&&(z.includes(e)||z.some(i=>e.endsWith(i)))};async function P({path:e,baseApiUrl:i,method:a="GET",headers:o={},params:p,body:n}){const d=`${i||k({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 y=(e=>(e.free="free",e.startup="startup",e.business="business",e.enterprise="enterprise",e))(y||{});const x={[y.free]:0,[y.startup]:10,[y.business]:20,[y.enterprise]:30};function E(e){const i=e;return i.init=a=>o=>e(o,a),i}const D=e=>E(e);async function N({editor:e,plan:i,pluginName:a,licenseKey:o,cleanup:p}){let n="",c=!1;const d=I(),s=l=>{console.warn("Cleanup plugin:",a,"Reason:",l),p()},r=(l={})=>{var w;const{error:v,sdkLicense:$}=l,g=(w=l.plan)==null?void 0:w.category;if(!($||l.license)||v)s(v||"Invalid license");else if(g){const A=x[i],M=x[g];A>M&&s({pluginRequiredPlan:i,licensePlan:g})}};e.on(H,l=>{n=l==null?void 0:l.baseApiUrl,c=!0}),e.on(L,l=>{r(l)}),setTimeout(async()=>{if(!c){if(d)return;if(o){const l=await _({licenseKey:o,pluginName:a,baseApiUrl:n});l&&r(l)}else s("The `licenseKey` option not provided")}},2e3)}async function _(e){const{licenseKey:i,pluginName:a,baseApiUrl:o}=e;try{return(await P({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))},R=e=>i=>{var a;return((a=i.getAttribute)==null?void 0:a.call(i,V))===e},T="gjs-plg-",V="data-type-role",W="shapeDividerComponent",U=y.startup;return D(function(e,i={}){const{Components:a,Blocks:o,Selectors:p}=e,n="shape-divider",c=`${n}-cnt`,d=`${T}${n}`,s=`${T}${c}`,r=[{id:"tilt",label:"Tilt",value:`<svg preserveAspectRatio="none" viewBox="0 0 240 24">
1
+ (function(b,m){typeof exports=="object"&&typeof module<"u"?module.exports=m():typeof define=="function"&&define.amd?define(m):(b=typeof globalThis<"u"?globalThis:b||self,b.StudioSdkPlugins_shapeDividerComponent=m())})(this,function(){"use strict";const b="app.grapesjs.com",m="app-stage.grapesjs.com",x=[b,"app2.grapesjs.com",m,"app-stage2.grapesjs.com","localhost","127.0.0.1",".local-credentialless.webcontainer.io",".local.webcontainer.io","-sandpack.codesandbox.io"],S="license:check:start",R="license:check:end",I=()=>typeof window<"u",P=({isDev:e,isStage:a,isPlatform:l})=>`${e?"":`https://${a?m:b}`}/${l?"platform-api":"api"}`,E=()=>{const e=I()&&window.location.hostname;return!!e&&(x.includes(e)||x.some(a=>e.endsWith(a)))};async function L({path:e,baseApiUrl:a,method:l="GET",headers:c={},params:n,body:o}){const v=`${a||P({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 y=(e=>(e.free="free",e.startup="startup",e.business="business",e.enterprise="enterprise",e))(y||{});const T={[y.free]:0,[y.startup]:10,[y.business]:20,[y.enterprise]:30};function D(e){const a=e;return a.init=l=>c=>e(c,l),a}const N=e=>D(e);async function _({editor:e,plan:a,pluginName:l,licenseKey:c,onLicenseCheckResponse:n,cleanup:o}){let p="",v=!1;const t=E(),r=s=>{console.warn("Cleanup plugin:",l,"Reason:",s),o()},g=(s={})=>{var A;const{error:M,sdkLicense:w}=s,u=(A=s.plan)==null?void 0:A.category;if(!(w||s.license)||M)r(M||"Invalid license");else if(u){const $=T[a],z=T[u];$>z&&r({pluginRequiredPlan:a,licensePlan:u})}};e.on(S,s=>{p=s==null?void 0:s.baseApiUrl,v=!0}),e.on(R,s=>{n==null||n(s),g(s)}),setTimeout(async()=>{if(!v){if(t)return;if(c){const s=await k({licenseKey:c,pluginName:l,baseApiUrl:p});n==null||n(s),s&&g(s)}else r("The `licenseKey` option not provided")}},2e3)}async function k(e){const{licenseKey:a,pluginName:l,baseApiUrl:c}=e;try{return(await L({baseApiUrl:c,path:`/sdk/${a||"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,a)=>{var l;return!!((l=e==null?void 0:e.classList)!=null&&l.contains(a))},B=e=>a=>{var l;return((l=a.getAttribute)==null?void 0:l.call(a,C))===e},H="gjs-plg-",C="data-type-role",W="shapeDividerComponent",U=y.startup;return N(function(e,a={}){const{Components:l,Blocks:c,Selectors:n}=e,o="shape-divider",p=`${o}-cnt`,v=`${H}${o}`,t=`${H}${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},$={...l,tc:!0},g="shape",C="flip-y",w="flip-x",A="Shape Divider",M=`<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},w="shape",u="flip-y",V="flip-x",A="Shape Divider",$=`<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:B={}}=i;e.on(p.events.add,t=>{t.getFullName().startsWith(`.${d}`)&&t.set({private:!0})}),a.addType(n,{isComponent:t=>R(n)(t)||O(t,d),block:B&&{label:A,media:M,category:"Extra",select:!0,...B},model:{defaults:{droppable:!1,highlightable:!1,classes:d,attributes:{[V]: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:R(c),model:{defaults:{droppable:!1,highlightable:!1,classes:s,emptyState:!0,icon:M,name:A,delegate:{remove:t=>t.parent(),move:t=>t.parent(),copy:t=>t.parent()},attributes:{[V]:c},[g]:r[0].id,resizable:v,stylable:["height","width","color"],styles:`
64
- .${s} {
63
+ </svg>`,{block:z={}}=a;e.on(n.events.add,i=>{i.getFullName().startsWith(`.${v}`)&&i.set({private:!0})}),l.addType(o,{isComponent:i=>B(o)(i)||O(i,v),block:z&&{label:A,media:$,category:"Extra",select:!0,...z},model:{defaults:{droppable:!1,highlightable:!1,classes:v,attributes:{[C]:o},components:{type:p},styles:`.${v} { position: relative; }`,delegate:{select:i=>i.findFirstType(p),layer:i=>i.findFirstType(p)}}},view:{onRender(){this.el.style.height="1px"}}}),l.addType(p,{isComponent:B(p),model:{defaults:{droppable:!1,highlightable:!1,classes:t,emptyState:!0,icon:$,name:A,delegate:{remove:i=>i.parent(),move:i=>i.parent(),copy:i=>i.parent()},attributes:{[C]:p},[w]: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:C,label:"Flip vertically",changeProp:!0},{type:"checkbox",name:w,label:"flip horizontally",changeProp:!0}]},init(){this.on(`change:${g}`,this.onShapeChange),this.on(`change:${w} change:${C}`,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(C),u=this.get(w),h=["fl-v","fl-h","fl-v-h"].map(F=>`${s}--${F}`);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?$:v)}}}),N({editor:e,licenseKey:i.licenseKey,plan:U,pluginName:W,cleanup:()=>{a.removeType(n),o.remove(n)}})})});
97
+ `,traits:[{type:"select",name:w,label:"Shape",changeProp:!0,options:r.map(({id:i,label:d,value:h})=>({id:i,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:V,label:"flip horizontally",changeProp:!0}]},init(){this.on(`change:${w}`,this.onShapeChange),this.on(`change:${V} change:${u}`,this.onFlip),this.onShapeChange()},onShapeChange(){const i=this.get(w),d=r.find(f=>f.id===i),h=(d==null?void 0:d.value)||this.getInnerHTML().trim();this.components(""),h&&this.set("content",h)},onFlip(){const i=this.get(u),d=this.get(V),h=["fl-v","fl-h","fl-v-h"].map(F=>`${t}--${F}`);let f;i&&d?f=h[2]:d?f=h[1]:i&&(f=h[0]),this.removeClass(h),f&&this.addClass(f),this.set("resizable",i?M:s)}}}),_({editor:e,licenseKey:a.licenseKey,plan:U,pluginName:W,cleanup:()=>{l.removeType(o),c.remove(o)}})})});