@grapesjs/studio-sdk-plugins 1.0.21 → 1.0.22

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 (66) hide show
  1. package/dist/animationComponent/components/Animation.d.ts +6 -0
  2. package/dist/animationComponent/components/AnimationGroup.d.ts +4 -0
  3. package/dist/animationComponent/index.cjs.d.ts +3 -0
  4. package/dist/animationComponent/index.cjs.js +507 -0
  5. package/dist/animationComponent/index.d.ts +3 -0
  6. package/dist/animationComponent/index.es.d.ts +3 -0
  7. package/dist/animationComponent/index.es.js +1111 -0
  8. package/dist/animationComponent/index.umd.js +507 -0
  9. package/dist/animationComponent/shared.d.ts +3 -0
  10. package/dist/animationComponent/types.d.ts +28 -0
  11. package/dist/animationComponent/typesSchema.d.ts +48 -0
  12. package/dist/animationComponent/utils.d.ts +19 -0
  13. package/dist/dataSourceEjs/EjsExporter.d.ts +13 -0
  14. package/dist/dataSourceEjs/EjsImporter.d.ts +29 -0
  15. package/dist/dataSourceEjs/index.cjs.d.ts +2 -2
  16. package/dist/dataSourceEjs/index.cjs.js +24 -3
  17. package/dist/dataSourceEjs/index.d.ts +2 -2
  18. package/dist/dataSourceEjs/index.es.d.ts +2 -2
  19. package/dist/dataSourceEjs/index.es.js +697 -114
  20. package/dist/dataSourceEjs/index.umd.js +24 -3
  21. package/dist/dataSourceEjs/shared.d.ts +3 -0
  22. package/dist/dataSourceEjs/types.d.ts +2 -2
  23. package/dist/dataSourceEjs/typesSchema.d.ts +3 -0
  24. package/dist/dataSourceHandlebars/HandlebarsExporter.d.ts +16 -0
  25. package/dist/dataSourceHandlebars/HandlebarsImporter.d.ts +20 -0
  26. package/dist/dataSourceHandlebars/helperImplementations.d.ts +1 -0
  27. package/dist/dataSourceHandlebars/index.cjs.js +20 -1
  28. package/dist/dataSourceHandlebars/index.es.js +401 -99
  29. package/dist/dataSourceHandlebars/index.umd.js +20 -1
  30. package/dist/dataSourceHandlebars/shared.d.ts +3 -0
  31. package/dist/dataSourceHandlebars/types.d.ts +2 -2
  32. package/dist/dataSourceHandlebars/typesSchema.d.ts +3 -0
  33. package/dist/googleFontsAssetProvider/index.cjs.js +1 -1
  34. package/dist/googleFontsAssetProvider/index.es.js +29 -29
  35. package/dist/googleFontsAssetProvider/index.umd.js +1 -1
  36. package/dist/iconifyComponent/index.cjs.js +2 -2
  37. package/dist/iconifyComponent/index.es.js +64 -64
  38. package/dist/iconifyComponent/index.umd.js +2 -2
  39. package/dist/index.cjs.d.ts +1 -0
  40. package/dist/index.cjs.js +587 -51
  41. package/dist/index.d.ts +1 -0
  42. package/dist/index.es.d.ts +1 -0
  43. package/dist/index.es.js +4809 -3046
  44. package/dist/index.umd.js +584 -48
  45. package/dist/layoutSidebarButtons/index.cjs.js +1 -1
  46. package/dist/layoutSidebarButtons/index.es.js +59 -59
  47. package/dist/layoutSidebarButtons/index.umd.js +1 -1
  48. package/dist/presetPrintable/index.cjs.js +3 -3
  49. package/dist/presetPrintable/index.es.js +136 -131
  50. package/dist/presetPrintable/index.umd.js +4 -4
  51. package/dist/prosemirror/index.cjs.js +1 -1
  52. package/dist/prosemirror/index.es.js +1 -1
  53. package/dist/prosemirror/index.umd.js +1 -1
  54. package/dist/rteTinyMce/index.cjs.js +2 -2
  55. package/dist/rteTinyMce/index.es.js +67 -67
  56. package/dist/rteTinyMce/index.umd.js +2 -2
  57. package/dist/tableComponent/index.cjs.js +1 -1
  58. package/dist/tableComponent/index.es.js +14 -14
  59. package/dist/tableComponent/index.umd.js +1 -1
  60. package/dist/utilsDataSources.d.ts +28 -0
  61. package/dist/youtubeAssetProvider/index.cjs.js +1 -1
  62. package/dist/youtubeAssetProvider/index.es.js +26 -26
  63. package/dist/youtubeAssetProvider/index.umd.js +1 -1
  64. package/package.json +2 -1
  65. package/dist/dataSourceEjs/EjsStrategy.d.ts +0 -15
  66. package/dist/dataSourceHandlebars/HandlebarsStrategy.d.ts +0 -17
@@ -0,0 +1,1111 @@
1
+ const P = "app.grapesjs.com", z = "app-stage.grapesjs.com", A = [
2
+ P,
3
+ z,
4
+ "localhost",
5
+ "127.0.0.1",
6
+ ".local-credentialless.webcontainer.io",
7
+ // For stackblitz.com demos
8
+ ".local.webcontainer.io",
9
+ // For stackblitz.com demos
10
+ "-sandpack.codesandbox.io"
11
+ // For Sandpack demos
12
+ ], B = "license:check:start", V = "license:check:end", F = () => typeof window < "u", O = ({ isDev: t, isStage: n }) => `${t ? "" : `https://${n ? z : P}`}/api`, X = () => {
13
+ const t = F() && window.location.hostname;
14
+ return !!t && (A.includes(t) || A.some((n) => t.endsWith(n)));
15
+ };
16
+ async function M({
17
+ path: t,
18
+ baseApiUrl: n,
19
+ method: e = "GET",
20
+ headers: r = {},
21
+ params: i,
22
+ body: o
23
+ }) {
24
+ const c = `${n || O({ isDev: !1, isStage: !1 })}${t}`, l = {
25
+ method: e,
26
+ headers: {
27
+ "Content-Type": "application/json",
28
+ ...r
29
+ }
30
+ };
31
+ o && (l.body = JSON.stringify(o));
32
+ const f = i ? new URLSearchParams(i).toString() : "", a = f ? `?${f}` : "", s = await fetch(`${c}${a}`, l);
33
+ if (!s.ok)
34
+ throw new Error(`HTTP error! status: ${s.status}`);
35
+ return s.json();
36
+ }
37
+ var I = /* @__PURE__ */ ((t) => (t.free = "free", t.startup = "startup", t.business = "business", t.enterprise = "enterprise", t))(I || {});
38
+ const L = {
39
+ [I.free]: 0,
40
+ [I.startup]: 10,
41
+ [I.business]: 20,
42
+ [I.enterprise]: 30
43
+ };
44
+ function W(t) {
45
+ const n = t;
46
+ return n.init = (e) => (r) => t(r, e), n;
47
+ }
48
+ const Y = (t) => /* @__PURE__ */ W(t);
49
+ async function $({
50
+ editor: t,
51
+ plan: n,
52
+ pluginName: e,
53
+ licenseKey: r,
54
+ cleanup: i
55
+ }) {
56
+ let o = "", m = !1;
57
+ const c = X(), l = (a) => {
58
+ console.warn("Cleanup plugin:", e, "Reason:", a), i();
59
+ }, f = (a = {}) => {
60
+ var b;
61
+ const { error: s, sdkLicense: g } = a, p = (b = a.plan) == null ? void 0 : b.category;
62
+ if (!(g || a.license) || s)
63
+ l(s || "Invalid license");
64
+ else if (p) {
65
+ const C = L[n], U = L[p];
66
+ C > U && l({ pluginRequiredPlan: n, licensePlan: p });
67
+ }
68
+ };
69
+ t.on(B, (a) => {
70
+ o = a == null ? void 0 : a.baseApiUrl, m = !0;
71
+ }), t.on(V, (a) => {
72
+ f(a);
73
+ }), setTimeout(async () => {
74
+ if (!m) {
75
+ if (c) return;
76
+ if (r) {
77
+ const a = await j({ licenseKey: r, pluginName: e, baseApiUrl: o });
78
+ a && f(a);
79
+ } else
80
+ l("The `licenseKey` option not provided");
81
+ }
82
+ }, 2e3);
83
+ }
84
+ async function j(t) {
85
+ const { licenseKey: n, pluginName: e, baseApiUrl: r } = t;
86
+ try {
87
+ return (await M({
88
+ baseApiUrl: r,
89
+ path: `/sdk/${n || "na"}`,
90
+ method: "POST",
91
+ params: {
92
+ d: window.location.hostname,
93
+ pn: e
94
+ }
95
+ })).result || {};
96
+ } catch (i) {
97
+ return console.error("Error during SDK license check:", i), !1;
98
+ }
99
+ }
100
+ const H = (...t) => (n) => t.some((e) => n.is(e));
101
+ var u = /* @__PURE__ */ ((t) => (t.name = "animation-name", t.duration = "animation-duration", t.delay = "animation-delay", t.fillMode = "animation-fill-mode", t))(u || {}), T = /* @__PURE__ */ ((t) => (t.staggerDelay = "--stagger-delay", t))(T || {}), d = /* @__PURE__ */ ((t) => (t.onScroll = "--animation-on-scroll", t.threshold = "--animation-threshold", t.repeat = "--animation-repeat", t))(d || {});
102
+ const y = "animation", v = "animation-group", E = "animation:update", k = "animation-group:update", Z = {
103
+ category: { id: "animations", label: "Animations" },
104
+ select: !0
105
+ }, w = (t) => (t == null ? void 0 : t.type) === y, x = (t) => (t == null ? void 0 : t.type) === v, N = (t) => w(t) || x(t), _ = {
106
+ // @ts-expect-error available from the next release
107
+ isVisible: ({ component: t }) => N(t)
108
+ }, S = {
109
+ // @ts-expect-error available from the next release
110
+ isVisible: ({ component: t }) => w(t)
111
+ }, K = {
112
+ // @ts-expect-error available from the next release
113
+ isVisible: ({ component: t }) => x(t)
114
+ }, D = {
115
+ // @ts-expect-error available from the next release
116
+ isVisible: ({ component: t, sector: n }) => {
117
+ var e;
118
+ return w(t) && x(t == null ? void 0 : t.parent()) ? !1 : N(t) && ((e = n.getProperty(d.onScroll)) == null ? void 0 : e.getValue()) === "true";
119
+ }
120
+ }, G = {
121
+ animation: '<svg viewBox="0 0 24 24"><path fill="currentColor" d="M16.5 14a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13"/><path fill="currentColor" d="M17.14 15.98a8.5 8.5 0 0 1-9.12-9.12 6.5 6.5 0 1 0 9.12 9.12"/><path fill="currentColor" d="M12.64 20.48a8.5 8.5 0 0 1-9.12-9.12 6.5 6.5 0 1 0 9.12 9.12"/></svg>',
122
+ animationGroup: '<svg viewBox="0 0 24 24"><path d="M4 2a2 2 0 0 0-2 2v10h2V4h10V2H4m4 4a2 2 0 0 0-2 2v10h2V8h10V6H8m4 4a2 2 0 0 0-2 2v8c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-8Z"/></svg>'
123
+ }, R = [
124
+ {
125
+ id: "bounce",
126
+ name: "Bounce",
127
+ css: `@keyframes bounce {
128
+ 0%, 20%, 53%, 80%, to {
129
+ animation-timing-function: cubic-bezier(.215, .61, .355, 1);
130
+ transform:translateZ(0)
131
+ }
132
+
133
+ 40%, 43% {
134
+ animation-timing-function: cubic-bezier(.755, .05, .855, .06);
135
+ transform:translate3d(0, -30px, 0)
136
+ }
137
+
138
+ 70% {
139
+ animation-timing-function: cubic-bezier(.755, .05, .855, .06);
140
+ transform:translate3d(0, -15px, 0)
141
+ }
142
+
143
+ 90% {
144
+ transform:translate3d(0, -4px, 0)
145
+ }
146
+ }`
147
+ },
148
+ {
149
+ id: "flash",
150
+ name: "Flash",
151
+ css: `@keyframes flash {
152
+ 0%, 50%, to {
153
+ opacity:1
154
+ }
155
+
156
+ 25%, 75% {
157
+ opacity:0
158
+ }
159
+ }`
160
+ },
161
+ {
162
+ id: "pulse",
163
+ name: "Pulse",
164
+ css: `@keyframes pulse {
165
+ 0% {
166
+ transform:scaleX(1)
167
+ }
168
+
169
+ 50% {
170
+ transform:scale3d(1.05, 1.05, 1.05)
171
+ }
172
+
173
+ to {
174
+ transform:scaleX(1)
175
+ }
176
+ }`
177
+ },
178
+ {
179
+ id: "shake",
180
+ name: "Shake",
181
+ css: `@keyframes shake {
182
+ 0%, to {
183
+ transform:translateZ(0)
184
+ }
185
+
186
+ 10%, 30%, 50%, 70%, 90% {
187
+ transform:translate3d(-10px, 0, 0)
188
+ }
189
+
190
+ 20%, 40%, 60%, 80% {
191
+ transform:translate3d(10px, 0, 0)
192
+ }
193
+ }`
194
+ },
195
+ {
196
+ id: "tada",
197
+ name: "Tada",
198
+ css: `@keyframes tada {
199
+ 0% {
200
+ transform:scaleX(1)
201
+ }
202
+
203
+ 10%, 20% {
204
+ transform:scale3d(.9, .9, .9) rotate(-3deg)
205
+ }
206
+
207
+ 30%, 50%, 70%, 90% {
208
+ transform:scale3d(1.1, 1.1, 1.1) rotate(3deg)
209
+ }
210
+
211
+ 40%, 60%, 80% {
212
+ transform:scale3d(1.1, 1.1, 1.1) rotate(-3deg)
213
+ }
214
+
215
+ to {
216
+ transform:scaleX(1)
217
+ }
218
+ }`
219
+ },
220
+ {
221
+ id: "heartBeat",
222
+ name: "Heart Beat",
223
+ css: `@keyframes heartBeat {
224
+ 0% {
225
+ transform:scale(1)
226
+ }
227
+
228
+ 14% {
229
+ transform:scale(1.3)
230
+ }
231
+
232
+ 28% {
233
+ transform:scale(1)
234
+ }
235
+
236
+ 42% {
237
+ transform:scale(1.3)
238
+ }
239
+
240
+ 70% {
241
+ transform:scale(1)
242
+ }
243
+ }`
244
+ },
245
+ {
246
+ id: "bounceIn",
247
+ name: "Bounce In",
248
+ css: `@keyframes bounceIn {
249
+ 0%, 20%, 40%, 60%, 80%, to {
250
+ animation-timing-function:cubic-bezier(.215, .61, .355, 1)
251
+ }
252
+
253
+ 0% {
254
+ opacity: 0;
255
+ transform:scale3d(.3, .3, .3)
256
+ }
257
+
258
+ 20% {
259
+ transform:scale3d(1.1, 1.1, 1.1)
260
+ }
261
+
262
+ 40% {
263
+ transform:scale3d(.9, .9, .9)
264
+ }
265
+
266
+ 60% {
267
+ opacity: 1;
268
+ transform:scale3d(1.03, 1.03, 1.03)
269
+ }
270
+
271
+ 80% {
272
+ transform:scale3d(.97, .97, .97)
273
+ }
274
+
275
+ to {
276
+ opacity: 1;
277
+ transform:scaleX(1)
278
+ }
279
+ }`
280
+ },
281
+ {
282
+ id: "bounceInDown",
283
+ name: "Bounce In Down",
284
+ css: `@keyframes bounceInDown {
285
+ 0%, 60%, 75%, 90%, to {
286
+ animation-timing-function:cubic-bezier(.215, .61, .355, 1)
287
+ }
288
+
289
+ 0% {
290
+ opacity: 0;
291
+ transform:translate3d(0, -100%, 0)
292
+ }
293
+
294
+ 60% {
295
+ opacity: 1;
296
+ transform:translate3d(0, 25px, 0)
297
+ }
298
+
299
+ 75% {
300
+ transform:translate3d(0, -10px, 0)
301
+ }
302
+
303
+ 90% {
304
+ transform:translate3d(0, 5px, 0)
305
+ }
306
+
307
+ to {
308
+ transform:translateZ(0)
309
+ }
310
+ }`
311
+ },
312
+ {
313
+ id: "bounceInLeft",
314
+ name: "Bounce In Left",
315
+ css: `@keyframes bounceInLeft {
316
+ 0%, 1%, 60%, 75%, 90%, to {
317
+ animation-timing-function:cubic-bezier(.215, .61, .355, .1)
318
+ }
319
+
320
+ 0% {
321
+ opacity: 0;
322
+ }
323
+
324
+ 1% {
325
+ transform:translate3d(-100%, 0, 0)
326
+ }
327
+
328
+ 60% {
329
+ opacity: 1;
330
+ transform:translate3d(25px, 0, 0)
331
+ }
332
+
333
+ 75% {
334
+ transform:translate3d(-10px, 0, 0)
335
+ }
336
+
337
+ 90% {
338
+ transform:translate3d(5px, 0, 0)
339
+ }
340
+
341
+ to {
342
+ transform:translateZ(0)
343
+ }
344
+ }`
345
+ },
346
+ {
347
+ id: "bounceInRight",
348
+ name: "Bounce In Right",
349
+ css: `@keyframes bounceInRight {
350
+ 0%, 1%, 60%, 75%, 90%, to {
351
+ animation-timing-function:cubic-bezier(.215, .61, .355, .1)
352
+ }
353
+
354
+ 0% {
355
+ opacity: 0;
356
+ }
357
+
358
+ 1% {
359
+ transform:translate3d(100%, 0, 0)
360
+ }
361
+
362
+ 60% {
363
+ opacity: 1;
364
+ transform:translate3d(-25px, 0, 0)
365
+ }
366
+
367
+ 75% {
368
+ transform:translate3d(10px, 0, 0)
369
+ }
370
+
371
+ 90% {
372
+ transform:translate3d(-5px, 0, 0)
373
+ }
374
+
375
+ to {
376
+ transform:translateZ(0)
377
+ }
378
+ }`
379
+ },
380
+ {
381
+ id: "bounceInUp",
382
+ name: "Bounce In Up",
383
+ css: `@keyframes bounceInUp {
384
+ 0%, 60%, 75%, 90%, to {
385
+ animation-timing-function:cubic-bezier(.215, .61, .355, .1)
386
+ }
387
+
388
+ 0% {
389
+ opacity: 0;
390
+ transform:translate3d(0, 100%, 0)
391
+ }
392
+
393
+ 60% {
394
+ opacity: 1;
395
+ transform:translate3d(0, -20px, 0)
396
+ }
397
+
398
+ 75% {
399
+ transform:translate3d(0, 10px, 0)
400
+ }
401
+
402
+ 90% {
403
+ transform:translate3d(0, -5px, 0)
404
+ }
405
+
406
+ to {
407
+ transform:translateZ(0)
408
+ }
409
+ }`
410
+ },
411
+ {
412
+ id: "fadeIn",
413
+ name: "Fade In",
414
+ css: `@keyframes fadeIn {
415
+ 0% {
416
+ opacity:0
417
+ }
418
+
419
+ to {
420
+ opacity:1
421
+ }
422
+ }`
423
+ },
424
+ {
425
+ id: "fadeInDown",
426
+ name: "Fade In Down",
427
+ css: `@keyframes fadeInDown {
428
+ 0% {
429
+ opacity: 0;
430
+ }
431
+
432
+ 1% {
433
+ transform:translate3d(0, -100%, 0)
434
+ }
435
+
436
+ to {
437
+ opacity: 1;
438
+ transform:translateZ(0)
439
+ }
440
+ }`
441
+ },
442
+ {
443
+ id: "fadeInLeft",
444
+ name: "Fade In Left",
445
+ css: `@keyframes fadeInLeft {
446
+ 0% {
447
+ opacity: 0;
448
+ }
449
+
450
+ 1% {
451
+ transform:translate3d(-100%, 0, 0)
452
+ }
453
+
454
+ to {
455
+ opacity: 1;
456
+ transform:translateZ(0)
457
+ }
458
+ }`
459
+ },
460
+ {
461
+ id: "fadeInRight",
462
+ name: "Fade In Right",
463
+ css: `@keyframes fadeInRight {
464
+ 0% {
465
+ opacity: 0;
466
+ }
467
+
468
+ 1% {
469
+ transform:translate3d(100%, 0, 0)
470
+ }
471
+
472
+ to {
473
+ opacity: 1;
474
+ transform:translateZ(0)
475
+ }
476
+ }`
477
+ },
478
+ {
479
+ id: "fadeInUp",
480
+ name: "Fade In Up",
481
+ css: `@keyframes fadeInUp {
482
+ 0% {
483
+ opacity: 0;
484
+ }
485
+
486
+ 1% {
487
+ transform:translate3d(0, 100%, 0)
488
+ }
489
+
490
+ to {
491
+ opacity: 1;
492
+ transform:translateZ(0)
493
+ }
494
+ }`
495
+ },
496
+ {
497
+ id: "flipInX",
498
+ name: "Flip In X",
499
+ css: `@keyframes flipInX {
500
+ 0% {
501
+ transform: perspective(400px) rotateX(90deg);
502
+ animation-timing-function: ease-in;
503
+ opacity:0
504
+ }
505
+
506
+ 40% {
507
+ transform: perspective(400px) rotateX(-20deg);
508
+ animation-timing-function:ease-in
509
+ }
510
+
511
+ 60% {
512
+ transform: perspective(400px) rotateX(10deg);
513
+ opacity:1
514
+ }
515
+
516
+ 80% {
517
+ transform:perspective(400px) rotateX(-5deg)
518
+ }
519
+
520
+ to {
521
+ transform:perspective(400px)
522
+ }
523
+ }`
524
+ },
525
+ {
526
+ id: "flipInY",
527
+ name: "Flip In Y",
528
+ css: `@keyframes flipInY {
529
+ 0% {
530
+ transform: perspective(400px) rotateY(90deg);
531
+ animation-timing-function: ease-in;
532
+ opacity:0
533
+ }
534
+
535
+ 40% {
536
+ transform: perspective(400px) rotateY(-20deg);
537
+ animation-timing-function:ease-in
538
+ }
539
+
540
+ 60% {
541
+ transform: perspective(400px) rotateY(10deg);
542
+ opacity:1
543
+ }
544
+
545
+ 80% {
546
+ transform:perspective(400px) rotateY(-5deg)
547
+ }
548
+
549
+ to {
550
+ transform:perspective(400px)
551
+ }
552
+ }`
553
+ },
554
+ {
555
+ id: "rotateIn",
556
+ name: "Rotate In",
557
+ css: `@keyframes rotateIn {
558
+ 0% {
559
+ transform-origin: center;
560
+ transform: rotate(-200deg);
561
+ opacity:0
562
+ }
563
+
564
+ to {
565
+ transform-origin: center;
566
+ transform: translateZ(0);
567
+ opacity:1
568
+ }
569
+ }`
570
+ },
571
+ {
572
+ id: "rotateInDownLeft",
573
+ name: "Rotate In Down Left",
574
+ css: `@keyframes rotateInDownLeft {
575
+ 0% {
576
+ transform-origin: left bottom;
577
+ transform: rotate(-45deg);
578
+ opacity:0
579
+ }
580
+
581
+ to {
582
+ transform-origin: left bottom;
583
+ transform: translateZ(0);
584
+ opacity:1
585
+ }
586
+ }`
587
+ },
588
+ {
589
+ id: "rotateInDownRight",
590
+ name: "Rotate In Down Right",
591
+ css: `@keyframes rotateInDownRight {
592
+ 0% {
593
+ transform-origin: right bottom;
594
+ transform: rotate(45deg);
595
+ opacity:0
596
+ }
597
+
598
+ to {
599
+ transform-origin: right bottom;
600
+ transform: translateZ(0);
601
+ opacity:1
602
+ }
603
+ }`
604
+ },
605
+ {
606
+ id: "rotateInUpLeft",
607
+ name: "Rotate In Up Left",
608
+ css: `@keyframes rotateInUpLeft {
609
+ 0% {
610
+ transform-origin: left bottom;
611
+ transform: rotate(45deg);
612
+ opacity:0
613
+ }
614
+
615
+ to {
616
+ transform-origin: left bottom;
617
+ transform: translateZ(0);
618
+ opacity:1
619
+ }
620
+ }`
621
+ },
622
+ {
623
+ id: "rotateInUpRight",
624
+ name: "Rotate In Up Right",
625
+ css: `@keyframes rotateInUpRight {
626
+ 0% {
627
+ transform-origin: right bottom;
628
+ transform: rotate(-90deg);
629
+ opacity:0
630
+ }
631
+
632
+ to {
633
+ transform-origin: right bottom;
634
+ transform: translateZ(0);
635
+ opacity:1
636
+ }
637
+ }`
638
+ },
639
+ {
640
+ id: "slideInDown",
641
+ name: "Slide In Down",
642
+ css: `@keyframes slideInDown {
643
+ 0% {
644
+ visibility:visible
645
+ }
646
+
647
+ 1% {
648
+ transform: translate3d(0, -100%, 0);
649
+ }
650
+
651
+ to {
652
+ transform:translateZ(0)
653
+ }
654
+ }`
655
+ },
656
+ {
657
+ id: "slideInLeft",
658
+ name: "Slide In Left",
659
+ css: `@keyframes slideInLeft {
660
+ 0% {
661
+ visibility:visible
662
+ }
663
+
664
+ 1% {
665
+ transform: translate3d(-100%, 0, 0);
666
+ }
667
+
668
+ to {
669
+ transform:translateZ(0)
670
+ }
671
+ }`
672
+ },
673
+ {
674
+ id: "slideInRight",
675
+ name: "Slide In Right",
676
+ css: `@keyframes slideInRight {
677
+ 0% {
678
+ visibility:visible
679
+ }
680
+
681
+ 1% {
682
+ transform: translate3d(100%, 0, 0);
683
+ }
684
+
685
+ to {
686
+ transform:translateZ(0)
687
+ }
688
+ }`
689
+ },
690
+ {
691
+ id: "slideInUp",
692
+ name: "Slide In Up",
693
+ css: `@keyframes slideInUp {
694
+ 0% {
695
+ visibility:visible
696
+ }
697
+
698
+ 1% {
699
+ transform: translate3d(0, 100%, 0);
700
+ }
701
+
702
+ to {
703
+ transform:translateZ(0)
704
+ }
705
+ }`
706
+ },
707
+ {
708
+ id: "zoomIn",
709
+ name: "Zoom In",
710
+ css: `@keyframes zoomIn {
711
+ 0% {
712
+ opacity: 0;
713
+ transform:scale3d(.3, .3, .3)
714
+ }
715
+
716
+ 50% {
717
+ opacity:1
718
+ }
719
+ }`
720
+ },
721
+ {
722
+ id: "zoomInDown",
723
+ name: "Zoom In Down",
724
+ css: `@keyframes zoomInDown {
725
+ 0% {
726
+ opacity: 0;
727
+ transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
728
+ animation-timing-function:cubic-bezier(.55, .055, .675, .19)
729
+ }
730
+
731
+ 60% {
732
+ opacity: 1;
733
+ transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
734
+ animation-timing-function:cubic-bezier(.175, .885, .32, 1)
735
+ }
736
+ }`
737
+ },
738
+ {
739
+ id: "zoomInLeft",
740
+ name: "Zoom In Left",
741
+ css: `@keyframes zoomInLeft {
742
+ 0% {
743
+ opacity: 0;
744
+ transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
745
+ animation-timing-function:cubic-bezier(.55, .055, .675, .19)
746
+ }
747
+
748
+ 60% {
749
+ opacity: 1;
750
+ transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
751
+ animation-timing-function:cubic-bezier(.175, .885, .32, 1)
752
+ }
753
+ }`
754
+ },
755
+ {
756
+ id: "zoomInRight",
757
+ name: "Zoom In Right",
758
+ css: `@keyframes zoomInRight {
759
+ 0% {
760
+ opacity: 0;
761
+ transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
762
+ animation-timing-function:cubic-bezier(.55, .055, .675, .19)
763
+ }
764
+
765
+ 60% {
766
+ opacity: 1;
767
+ transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
768
+ animation-timing-function:cubic-bezier(.175, .885, .32, 1)
769
+ }
770
+ }`
771
+ },
772
+ {
773
+ id: "zoomInUp",
774
+ name: "Zoom In Up",
775
+ css: `@keyframes zoomInUp {
776
+ 0% {
777
+ opacity: 0;
778
+ transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
779
+ animation-timing-function:cubic-bezier(.55, .055, .675, .19)
780
+ }
781
+
782
+ 60% {
783
+ opacity: 1;
784
+ transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
785
+ animation-timing-function:cubic-bezier(.175, .885, .32, 1)
786
+ }
787
+ }`
788
+ }
789
+ ], q = function(t) {
790
+ const n = this;
791
+ let e = null;
792
+ const r = () => {
793
+ e == null || e.disconnect(), e = null;
794
+ }, i = () => {
795
+ r();
796
+ const o = n.style;
797
+ o.animationName = "", requestAnimationFrame(() => {
798
+ const m = getComputedStyle(n), c = m.getPropertyValue("animation-name").trim(), l = m.getPropertyValue("--animation-on-scroll").trim() !== "false", f = parseFloat(m.getPropertyValue("--animation-threshold").trim()) || 0.2, a = m.getPropertyValue("--animation-repeat").trim() === "true", s = () => {
799
+ o.animationName = "none", n.offsetWidth, o.animationName = c, o.animationPlayState = "running";
800
+ };
801
+ if (!c || c === "none") {
802
+ o.animationName = "none", o.animationPlayState = "paused";
803
+ return;
804
+ }
805
+ if (!l) {
806
+ s();
807
+ return;
808
+ }
809
+ o.animationPlayState = "paused", e = new IntersectionObserver(
810
+ (g) => {
811
+ g.forEach((p) => {
812
+ p.isIntersecting && (s(), !a && r());
813
+ });
814
+ },
815
+ { threshold: f }
816
+ ), e.observe(n);
817
+ });
818
+ };
819
+ n.addEventListener(t.animationUpdateEvent, i), i();
820
+ }, J = (t, n) => {
821
+ const { Components: e, Blocks: r, Canvas: i } = t, { block: o = {}, animationList: m = [] } = n, c = "Animation", l = Object.values(d), f = Object.values(u);
822
+ return e.addType(y, {
823
+ block: o ? {
824
+ label: c,
825
+ media: G.animation,
826
+ content: { type: y },
827
+ ...Z,
828
+ ...o
829
+ } : void 0,
830
+ model: {
831
+ defaults: {
832
+ emptyState: !0,
833
+ name: c,
834
+ traits: [],
835
+ script: q,
836
+ animationUpdateEvent: E,
837
+ "script-props": ["animationUpdateEvent"],
838
+ styles: m.map((a) => a.css).join(`
839
+ `),
840
+ style: {
841
+ [u.name]: "fadeIn",
842
+ [u.duration]: "1s",
843
+ [u.delay]: "0s",
844
+ [u.fillMode]: "both",
845
+ [d.onScroll]: "true",
846
+ [d.threshold]: "0.2",
847
+ [d.repeat]: "false",
848
+ ...n.animationStyle
849
+ }
850
+ },
851
+ init() {
852
+ const { em: a } = this;
853
+ this.listenTo(a, "component:mount", (s) => {
854
+ var p;
855
+ if (s !== this) return;
856
+ ((p = this.parent()) == null ? void 0 : p.get("type")) !== v || l.forEach((h) => this.removeStyle(h));
857
+ });
858
+ }
859
+ },
860
+ view: {
861
+ events: () => ({
862
+ animationstart: "onAnimationStart",
863
+ animationend: "onAnimationEnd"
864
+ }),
865
+ init() {
866
+ const { model: a } = this;
867
+ this.listenTo(a, "component:styleUpdate", this.handleStyleChange);
868
+ },
869
+ onAnimationStart() {
870
+ var s;
871
+ if ((s = this.cmpSpots) != null && s.length) return;
872
+ const a = i.getSpots({ component: this.model });
873
+ this.cmpSpots = a, i.removeSpots(a), this.el.ownerDocument.body.style.overflowX = "hidden";
874
+ },
875
+ onAnimationEnd() {
876
+ const a = this.cmpSpots || [];
877
+ i.spots.add(a), this.cmpSpots = [], this.el.ownerDocument.body.style.overflowX = "";
878
+ },
879
+ triggerAnimation() {
880
+ this.el.dispatchEvent(new CustomEvent(E));
881
+ },
882
+ handleStyleChange(a, s) {
883
+ Object.keys((s == null ? void 0 : s.style) || {}).some((h) => f.includes(h) || l.includes(h)) && this.triggerAnimation();
884
+ },
885
+ onRender() {
886
+ this.triggerAnimation();
887
+ }
888
+ }
889
+ }), () => {
890
+ r.remove(y), e.removeType(y);
891
+ };
892
+ }, Q = function(t) {
893
+ const n = this, e = "--animation-on-scroll", r = "--animation-threshold", i = "--animation-repeat";
894
+ let o = null;
895
+ const m = () => {
896
+ o == null || o.disconnect(), o = null;
897
+ }, c = () => {
898
+ m();
899
+ const l = getComputedStyle(n), f = l.getPropertyValue(e).trim() !== "false", a = parseFloat(l.getPropertyValue(r).trim()) || 0.2, s = l.getPropertyValue(i).trim() === "true", g = () => {
900
+ Array.from(n.children).forEach((p) => {
901
+ p instanceof HTMLElement && typeof p.dispatchEvent == "function" && p.dispatchEvent(new CustomEvent(k, { bubbles: !1 }));
902
+ });
903
+ };
904
+ if (!f) {
905
+ g();
906
+ return;
907
+ }
908
+ o = new IntersectionObserver(
909
+ (p) => {
910
+ p.forEach((h) => {
911
+ h.isIntersecting ? (g(), !s && m()) : s && Array.from(n.children).forEach((b) => {
912
+ b instanceof HTMLElement && getComputedStyle(b).getPropertyValue(e).trim() !== "false" && (b.style.opacity = "0", b.style.animationPlayState = "paused");
913
+ });
914
+ });
915
+ },
916
+ { threshold: a }
917
+ ), o.observe(n);
918
+ };
919
+ n.addEventListener(t.animationGroupUpdateEvent, c), c();
920
+ }, tt = (t, n) => {
921
+ const { Components: e, Blocks: r } = t, { blockGroup: i = {} } = n, o = "Animation Group";
922
+ return e.addType(v, {
923
+ block: i ? {
924
+ label: o,
925
+ media: G.animationGroup,
926
+ content: {
927
+ type: v,
928
+ components: [
929
+ { type: y },
930
+ { type: y },
931
+ { type: y }
932
+ ]
933
+ },
934
+ ...Z,
935
+ ...i
936
+ } : void 0,
937
+ model: {
938
+ defaults: {
939
+ name: o,
940
+ emptyState: !0,
941
+ traits: [],
942
+ script: Q,
943
+ animationGroupUpdateEvent: k,
944
+ "script-props": ["animationGroupUpdateEvent"],
945
+ droppable: H(y),
946
+ style: {
947
+ [T.staggerDelay]: "0.3s",
948
+ [d.onScroll]: "true",
949
+ [d.threshold]: "0.2",
950
+ [d.repeat]: "false",
951
+ ...n.animationGroupStyle
952
+ }
953
+ },
954
+ init() {
955
+ const m = this.components();
956
+ this.listenTo(m, "add remove", this.updateChildrenStaggerStyles), this.updateChildrenStaggerStyles();
957
+ },
958
+ updateChildrenStaggerStyles() {
959
+ this.components().forEach((m, c) => {
960
+ m.is(y) && m.addStyle(
961
+ {
962
+ "--stagger-index": c.toString(),
963
+ [u.delay]: "calc(var(--stagger-index, 0) * var(--stagger-delay, 0s))"
964
+ },
965
+ { partial: !0 }
966
+ );
967
+ });
968
+ }
969
+ },
970
+ view: {
971
+ init() {
972
+ const { model: m } = this;
973
+ this.listenTo(m, "component:styleUpdate", this.handleStyleChange);
974
+ },
975
+ triggerAnimation() {
976
+ this.el.dispatchEvent(new CustomEvent(k));
977
+ },
978
+ handleStyleChange() {
979
+ this.triggerAnimation(), this.model.updateChildrenStaggerStyles();
980
+ },
981
+ onRender() {
982
+ this.triggerAnimation();
983
+ }
984
+ }
985
+ }), () => {
986
+ r.remove(v), e.removeType(v);
987
+ };
988
+ }, nt = "animationComponent", et = I.startup, at = function(t, n = {}) {
989
+ var i;
990
+ const e = ((i = n.animations) == null ? void 0 : i.call(n, { items: R })) || R, r = [
991
+ J(t, { ...n, animationList: e }),
992
+ tt(t, n)
993
+ ];
994
+ t.Styles.addSector("animation", {
995
+ name: "Animation",
996
+ properties: [
997
+ {
998
+ ...S,
999
+ name: "Type",
1000
+ property: u.name,
1001
+ type: "select",
1002
+ full: !0,
1003
+ default: "fadeIn",
1004
+ options: e
1005
+ },
1006
+ {
1007
+ ...S,
1008
+ name: "Duration",
1009
+ property: u.duration,
1010
+ type: "number",
1011
+ units: ["s"],
1012
+ min: 0.1,
1013
+ max: 10,
1014
+ step: 0.1,
1015
+ default: "1s"
1016
+ },
1017
+ {
1018
+ ...S,
1019
+ name: "Fill Mode",
1020
+ property: u.fillMode,
1021
+ type: "select",
1022
+ default: "both",
1023
+ options: [
1024
+ {
1025
+ name: "None",
1026
+ id: "none"
1027
+ },
1028
+ {
1029
+ name: "Forwards",
1030
+ id: "forwards"
1031
+ },
1032
+ {
1033
+ name: "Backwards",
1034
+ id: "backwards"
1035
+ },
1036
+ {
1037
+ name: "Both",
1038
+ id: "both"
1039
+ }
1040
+ ]
1041
+ },
1042
+ {
1043
+ ...K,
1044
+ name: "Stagger Delay",
1045
+ property: "--stagger-delay",
1046
+ type: "slider",
1047
+ units: ["s"],
1048
+ min: 0.1,
1049
+ max: 5,
1050
+ step: 0.1,
1051
+ default: "0.1s"
1052
+ },
1053
+ {
1054
+ ..._,
1055
+ name: "Animate on Scroll",
1056
+ property: d.onScroll,
1057
+ type: "radio",
1058
+ default: "true",
1059
+ options: [
1060
+ {
1061
+ name: "Yes",
1062
+ id: "true"
1063
+ },
1064
+ {
1065
+ name: "No",
1066
+ id: "false"
1067
+ }
1068
+ ]
1069
+ },
1070
+ {
1071
+ ...D,
1072
+ name: "Scroll Threshold",
1073
+ property: d.threshold,
1074
+ type: "number",
1075
+ full: !0,
1076
+ min: 0.1,
1077
+ max: 1,
1078
+ step: 0.01,
1079
+ default: "0.2"
1080
+ },
1081
+ {
1082
+ ...D,
1083
+ name: "Repeat on Scroll",
1084
+ property: d.repeat,
1085
+ type: "radio",
1086
+ default: "false",
1087
+ options: [
1088
+ {
1089
+ name: "Yes",
1090
+ id: "true"
1091
+ },
1092
+ {
1093
+ name: "No",
1094
+ id: "false"
1095
+ }
1096
+ ]
1097
+ }
1098
+ ]
1099
+ }), $({
1100
+ editor: t,
1101
+ licenseKey: n.licenseKey,
1102
+ plan: et,
1103
+ pluginName: nt,
1104
+ cleanup: () => {
1105
+ r.forEach((o) => o());
1106
+ }
1107
+ });
1108
+ }, ot = Y(at);
1109
+ export {
1110
+ ot as default
1111
+ };