@grapesjs/studio-sdk-plugins 1.0.24 → 1.0.25

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.
@@ -1,507 +1,519 @@
1
- "use strict";const P="app.grapesjs.com",z="app-stage.grapesjs.com",A=[P,z,"localhost","127.0.0.1",".local-credentialless.webcontainer.io",".local.webcontainer.io","-sandpack.codesandbox.io"],B="license:check:start",V="license:check:end",F=()=>typeof window<"u",O=({isDev:t,isStage:n})=>`${t?"":`https://${n?z:P}`}/api`,X=()=>{const t=F()&&window.location.hostname;return!!t&&(A.includes(t)||A.some(n=>t.endsWith(n)))};async function M({path:t,baseApiUrl:n,method:e="GET",headers:r={},params:i,body:o}){const c=`${n||O({isDev:!1,isStage:!1})}${t}`,l={method:e,headers:{"Content-Type":"application/json",...r}};o&&(l.body=JSON.stringify(o));const f=i?new URLSearchParams(i).toString():"",a=f?`?${f}`:"",s=await fetch(`${c}${a}`,l);if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return s.json()}var I=(t=>(t.free="free",t.startup="startup",t.business="business",t.enterprise="enterprise",t))(I||{});const L={[I.free]:0,[I.startup]:10,[I.business]:20,[I.enterprise]:30};function W(t){const n=t;return n.init=e=>r=>t(r,e),n}const Y=t=>W(t);async function $({editor:t,plan:n,pluginName:e,licenseKey:r,cleanup:i}){let o="",m=!1;const c=X(),l=a=>{console.warn("Cleanup plugin:",e,"Reason:",a),i()},f=(a={})=>{var b;const{error:s,sdkLicense:g}=a,p=(b=a.plan)==null?void 0:b.category;if(!(g||a.license)||s)l(s||"Invalid license");else if(p){const C=L[n],U=L[p];C>U&&l({pluginRequiredPlan:n,licensePlan:p})}};t.on(B,a=>{o=a==null?void 0:a.baseApiUrl,m=!0}),t.on(V,a=>{f(a)}),setTimeout(async()=>{if(!m){if(c)return;if(r){const a=await j({licenseKey:r,pluginName:e,baseApiUrl:o});a&&f(a)}else l("The `licenseKey` option not provided")}},2e3)}async function j(t){const{licenseKey:n,pluginName:e,baseApiUrl:r}=t;try{return(await M({baseApiUrl:r,path:`/sdk/${n||"na"}`,method:"POST",params:{d:window.location.hostname,pn:e}})).result||{}}catch(i){return console.error("Error during SDK license check:",i),!1}}const H=(...t)=>n=>t.some(e=>n.is(e));var u=(t=>(t.name="animation-name",t.duration="animation-duration",t.delay="animation-delay",t.fillMode="animation-fill-mode",t))(u||{}),T=(t=>(t.staggerDelay="--stagger-delay",t))(T||{}),d=(t=>(t.onScroll="--animation-on-scroll",t.threshold="--animation-threshold",t.repeat="--animation-repeat",t))(d||{});const y="animation",v="animation-group",E="animation:update",k="animation-group:update",Z={category:{id:"animations",label:"Animations"},select:!0},w=t=>(t==null?void 0:t.type)===y,x=t=>(t==null?void 0:t.type)===v,N=t=>w(t)||x(t),_={isVisible:({component:t})=>N(t)},S={isVisible:({component:t})=>w(t)},K={isVisible:({component:t})=>x(t)},D={isVisible:({component:t,sector:n})=>{var e;return w(t)&&x(t==null?void 0:t.parent())?!1:N(t)&&((e=n.getProperty(d.onScroll))==null?void 0:e.getValue())==="true"}},G={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>',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>'},R=[{id:"bounce",name:"Bounce",css:`@keyframes bounce {
2
- 0%, 20%, 53%, 80%, to {
3
- animation-timing-function: cubic-bezier(.215, .61, .355, 1);
4
- transform:translateZ(0)
5
- }
6
-
7
- 40%, 43% {
8
- animation-timing-function: cubic-bezier(.755, .05, .855, .06);
9
- transform:translate3d(0, -30px, 0)
10
- }
11
-
12
- 70% {
13
- animation-timing-function: cubic-bezier(.755, .05, .855, .06);
14
- transform:translate3d(0, -15px, 0)
15
- }
16
-
17
- 90% {
18
- transform:translate3d(0, -4px, 0)
19
- }
20
- }`},{id:"flash",name:"Flash",css:`@keyframes flash {
21
- 0%, 50%, to {
22
- opacity:1
23
- }
24
-
25
- 25%, 75% {
26
- opacity:0
27
- }
28
- }`},{id:"pulse",name:"Pulse",css:`@keyframes pulse {
29
- 0% {
30
- transform:scaleX(1)
31
- }
32
-
33
- 50% {
34
- transform:scale3d(1.05, 1.05, 1.05)
35
- }
36
-
37
- to {
38
- transform:scaleX(1)
39
- }
40
- }`},{id:"shake",name:"Shake",css:`@keyframes shake {
41
- 0%, to {
42
- transform:translateZ(0)
43
- }
44
-
45
- 10%, 30%, 50%, 70%, 90% {
46
- transform:translate3d(-10px, 0, 0)
47
- }
48
-
49
- 20%, 40%, 60%, 80% {
50
- transform:translate3d(10px, 0, 0)
51
- }
52
- }`},{id:"tada",name:"Tada",css:`@keyframes tada {
53
- 0% {
54
- transform:scaleX(1)
55
- }
56
-
57
- 10%, 20% {
58
- transform:scale3d(.9, .9, .9) rotate(-3deg)
59
- }
60
-
61
- 30%, 50%, 70%, 90% {
62
- transform:scale3d(1.1, 1.1, 1.1) rotate(3deg)
63
- }
64
-
65
- 40%, 60%, 80% {
66
- transform:scale3d(1.1, 1.1, 1.1) rotate(-3deg)
67
- }
68
-
69
- to {
70
- transform:scaleX(1)
71
- }
72
- }`},{id:"heartBeat",name:"Heart Beat",css:`@keyframes heartBeat {
73
- 0% {
74
- transform:scale(1)
75
- }
76
-
77
- 14% {
78
- transform:scale(1.3)
79
- }
80
-
81
- 28% {
82
- transform:scale(1)
83
- }
84
-
85
- 42% {
86
- transform:scale(1.3)
87
- }
88
-
89
- 70% {
90
- transform:scale(1)
91
- }
92
- }`},{id:"bounceIn",name:"Bounce In",css:`@keyframes bounceIn {
93
- 0%, 20%, 40%, 60%, 80%, to {
94
- animation-timing-function:cubic-bezier(.215, .61, .355, 1)
95
- }
96
-
97
- 0% {
98
- opacity: 0;
99
- transform:scale3d(.3, .3, .3)
100
- }
101
-
102
- 20% {
103
- transform:scale3d(1.1, 1.1, 1.1)
104
- }
105
-
106
- 40% {
107
- transform:scale3d(.9, .9, .9)
108
- }
109
-
110
- 60% {
111
- opacity: 1;
112
- transform:scale3d(1.03, 1.03, 1.03)
113
- }
114
-
115
- 80% {
116
- transform:scale3d(.97, .97, .97)
117
- }
118
-
119
- to {
120
- opacity: 1;
121
- transform:scaleX(1)
122
- }
123
- }`},{id:"bounceInDown",name:"Bounce In Down",css:`@keyframes bounceInDown {
124
- 0%, 60%, 75%, 90%, to {
125
- animation-timing-function:cubic-bezier(.215, .61, .355, 1)
126
- }
127
-
128
- 0% {
129
- opacity: 0;
130
- transform:translate3d(0, -100%, 0)
131
- }
132
-
133
- 60% {
134
- opacity: 1;
135
- transform:translate3d(0, 25px, 0)
136
- }
137
-
138
- 75% {
139
- transform:translate3d(0, -10px, 0)
140
- }
141
-
142
- 90% {
143
- transform:translate3d(0, 5px, 0)
144
- }
145
-
146
- to {
147
- transform:translateZ(0)
148
- }
149
- }`},{id:"bounceInLeft",name:"Bounce In Left",css:`@keyframes bounceInLeft {
150
- 0%, 1%, 60%, 75%, 90%, to {
151
- animation-timing-function:cubic-bezier(.215, .61, .355, .1)
152
- }
153
-
154
- 0% {
155
- opacity: 0;
156
- }
157
-
158
- 1% {
159
- transform:translate3d(-100%, 0, 0)
160
- }
161
-
162
- 60% {
163
- opacity: 1;
164
- transform:translate3d(25px, 0, 0)
165
- }
166
-
167
- 75% {
168
- transform:translate3d(-10px, 0, 0)
169
- }
170
-
171
- 90% {
172
- transform:translate3d(5px, 0, 0)
173
- }
174
-
175
- to {
176
- transform:translateZ(0)
177
- }
178
- }`},{id:"bounceInRight",name:"Bounce In Right",css:`@keyframes bounceInRight {
179
- 0%, 1%, 60%, 75%, 90%, to {
180
- animation-timing-function:cubic-bezier(.215, .61, .355, .1)
181
- }
182
-
183
- 0% {
184
- opacity: 0;
185
- }
186
-
187
- 1% {
188
- transform:translate3d(100%, 0, 0)
189
- }
190
-
191
- 60% {
192
- opacity: 1;
193
- transform:translate3d(-25px, 0, 0)
194
- }
195
-
196
- 75% {
197
- transform:translate3d(10px, 0, 0)
198
- }
199
-
200
- 90% {
201
- transform:translate3d(-5px, 0, 0)
202
- }
203
-
204
- to {
205
- transform:translateZ(0)
206
- }
207
- }`},{id:"bounceInUp",name:"Bounce In Up",css:`@keyframes bounceInUp {
208
- 0%, 60%, 75%, 90%, to {
209
- animation-timing-function:cubic-bezier(.215, .61, .355, .1)
210
- }
211
-
212
- 0% {
213
- opacity: 0;
214
- transform:translate3d(0, 100%, 0)
215
- }
216
-
217
- 60% {
218
- opacity: 1;
219
- transform:translate3d(0, -20px, 0)
220
- }
221
-
222
- 75% {
223
- transform:translate3d(0, 10px, 0)
224
- }
225
-
226
- 90% {
227
- transform:translate3d(0, -5px, 0)
228
- }
229
-
230
- to {
231
- transform:translateZ(0)
232
- }
233
- }`},{id:"fadeIn",name:"Fade In",css:`@keyframes fadeIn {
234
- 0% {
235
- opacity:0
236
- }
237
-
238
- to {
239
- opacity:1
240
- }
241
- }`},{id:"fadeInDown",name:"Fade In Down",css:`@keyframes fadeInDown {
242
- 0% {
243
- opacity: 0;
244
- }
245
-
246
- 1% {
247
- transform:translate3d(0, -100%, 0)
248
- }
249
-
250
- to {
251
- opacity: 1;
252
- transform:translateZ(0)
253
- }
254
- }`},{id:"fadeInLeft",name:"Fade In Left",css:`@keyframes fadeInLeft {
255
- 0% {
256
- opacity: 0;
257
- }
258
-
259
- 1% {
260
- transform:translate3d(-100%, 0, 0)
261
- }
262
-
263
- to {
264
- opacity: 1;
265
- transform:translateZ(0)
266
- }
267
- }`},{id:"fadeInRight",name:"Fade In Right",css:`@keyframes fadeInRight {
268
- 0% {
269
- opacity: 0;
270
- }
271
-
272
- 1% {
273
- transform:translate3d(100%, 0, 0)
274
- }
275
-
276
- to {
277
- opacity: 1;
278
- transform:translateZ(0)
279
- }
280
- }`},{id:"fadeInUp",name:"Fade In Up",css:`@keyframes fadeInUp {
281
- 0% {
282
- opacity: 0;
283
- }
284
-
285
- 1% {
286
- transform:translate3d(0, 100%, 0)
287
- }
288
-
289
- to {
290
- opacity: 1;
291
- transform:translateZ(0)
292
- }
293
- }`},{id:"flipInX",name:"Flip In X",css:`@keyframes flipInX {
294
- 0% {
295
- transform: perspective(400px) rotateX(90deg);
296
- animation-timing-function: ease-in;
297
- opacity:0
298
- }
299
-
300
- 40% {
301
- transform: perspective(400px) rotateX(-20deg);
302
- animation-timing-function:ease-in
303
- }
304
-
305
- 60% {
306
- transform: perspective(400px) rotateX(10deg);
307
- opacity:1
308
- }
309
-
310
- 80% {
311
- transform:perspective(400px) rotateX(-5deg)
312
- }
313
-
314
- to {
315
- transform:perspective(400px)
316
- }
317
- }`},{id:"flipInY",name:"Flip In Y",css:`@keyframes flipInY {
318
- 0% {
319
- transform: perspective(400px) rotateY(90deg);
320
- animation-timing-function: ease-in;
321
- opacity:0
322
- }
323
-
324
- 40% {
325
- transform: perspective(400px) rotateY(-20deg);
326
- animation-timing-function:ease-in
327
- }
328
-
329
- 60% {
330
- transform: perspective(400px) rotateY(10deg);
331
- opacity:1
332
- }
333
-
334
- 80% {
335
- transform:perspective(400px) rotateY(-5deg)
336
- }
337
-
338
- to {
339
- transform:perspective(400px)
340
- }
341
- }`},{id:"rotateIn",name:"Rotate In",css:`@keyframes rotateIn {
342
- 0% {
343
- transform-origin: center;
344
- transform: rotate(-200deg);
345
- opacity:0
346
- }
347
-
348
- to {
349
- transform-origin: center;
350
- transform: translateZ(0);
351
- opacity:1
352
- }
353
- }`},{id:"rotateInDownLeft",name:"Rotate In Down Left",css:`@keyframes rotateInDownLeft {
354
- 0% {
355
- transform-origin: left bottom;
356
- transform: rotate(-45deg);
357
- opacity:0
358
- }
359
-
360
- to {
361
- transform-origin: left bottom;
362
- transform: translateZ(0);
363
- opacity:1
364
- }
365
- }`},{id:"rotateInDownRight",name:"Rotate In Down Right",css:`@keyframes rotateInDownRight {
366
- 0% {
367
- transform-origin: right bottom;
368
- transform: rotate(45deg);
369
- opacity:0
370
- }
371
-
372
- to {
373
- transform-origin: right bottom;
374
- transform: translateZ(0);
375
- opacity:1
376
- }
377
- }`},{id:"rotateInUpLeft",name:"Rotate In Up Left",css:`@keyframes rotateInUpLeft {
378
- 0% {
379
- transform-origin: left bottom;
380
- transform: rotate(45deg);
381
- opacity:0
382
- }
383
-
384
- to {
385
- transform-origin: left bottom;
386
- transform: translateZ(0);
387
- opacity:1
388
- }
389
- }`},{id:"rotateInUpRight",name:"Rotate In Up Right",css:`@keyframes rotateInUpRight {
390
- 0% {
391
- transform-origin: right bottom;
392
- transform: rotate(-90deg);
393
- opacity:0
394
- }
395
-
396
- to {
397
- transform-origin: right bottom;
398
- transform: translateZ(0);
399
- opacity:1
400
- }
401
- }`},{id:"slideInDown",name:"Slide In Down",css:`@keyframes slideInDown {
402
- 0% {
403
- visibility:visible
404
- }
405
-
406
- 1% {
407
- transform: translate3d(0, -100%, 0);
408
- }
409
-
410
- to {
411
- transform:translateZ(0)
412
- }
413
- }`},{id:"slideInLeft",name:"Slide In Left",css:`@keyframes slideInLeft {
414
- 0% {
415
- visibility:visible
416
- }
417
-
418
- 1% {
419
- transform: translate3d(-100%, 0, 0);
420
- }
421
-
422
- to {
423
- transform:translateZ(0)
424
- }
425
- }`},{id:"slideInRight",name:"Slide In Right",css:`@keyframes slideInRight {
426
- 0% {
427
- visibility:visible
428
- }
429
-
430
- 1% {
431
- transform: translate3d(100%, 0, 0);
432
- }
433
-
434
- to {
435
- transform:translateZ(0)
436
- }
437
- }`},{id:"slideInUp",name:"Slide In Up",css:`@keyframes slideInUp {
438
- 0% {
439
- visibility:visible
440
- }
441
-
442
- 1% {
443
- transform: translate3d(0, 100%, 0);
444
- }
445
-
446
- to {
447
- transform:translateZ(0)
448
- }
449
- }`},{id:"zoomIn",name:"Zoom In",css:`@keyframes zoomIn {
450
- 0% {
451
- opacity: 0;
452
- transform:scale3d(.3, .3, .3)
453
- }
454
-
455
- 50% {
456
- opacity:1
457
- }
458
- }`},{id:"zoomInDown",name:"Zoom In Down",css:`@keyframes zoomInDown {
459
- 0% {
460
- opacity: 0;
461
- transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
462
- animation-timing-function:cubic-bezier(.55, .055, .675, .19)
463
- }
464
-
465
- 60% {
466
- opacity: 1;
467
- transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
468
- animation-timing-function:cubic-bezier(.175, .885, .32, 1)
469
- }
470
- }`},{id:"zoomInLeft",name:"Zoom In Left",css:`@keyframes zoomInLeft {
471
- 0% {
472
- opacity: 0;
473
- transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
474
- animation-timing-function:cubic-bezier(.55, .055, .675, .19)
475
- }
476
-
477
- 60% {
478
- opacity: 1;
479
- transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
480
- animation-timing-function:cubic-bezier(.175, .885, .32, 1)
481
- }
482
- }`},{id:"zoomInRight",name:"Zoom In Right",css:`@keyframes zoomInRight {
483
- 0% {
484
- opacity: 0;
485
- transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
486
- animation-timing-function:cubic-bezier(.55, .055, .675, .19)
487
- }
488
-
489
- 60% {
490
- opacity: 1;
491
- transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
492
- animation-timing-function:cubic-bezier(.175, .885, .32, 1)
493
- }
494
- }`},{id:"zoomInUp",name:"Zoom In Up",css:`@keyframes zoomInUp {
495
- 0% {
496
- opacity: 0;
497
- transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
498
- animation-timing-function:cubic-bezier(.55, .055, .675, .19)
499
- }
500
-
501
- 60% {
502
- opacity: 1;
503
- transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
504
- animation-timing-function:cubic-bezier(.175, .885, .32, 1)
505
- }
506
- }`}],q=function(t){const n=this;let e=null;const r=()=>{e==null||e.disconnect(),e=null},i=()=>{r();const o=n.style;o.animationName="",requestAnimationFrame(()=>{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())||.2,a=m.getPropertyValue("--animation-repeat").trim()==="true",s=()=>{o.animationName="none",n.offsetWidth,o.animationName=c,o.animationPlayState="running"};if(!c||c==="none"){o.animationName="none",o.animationPlayState="paused";return}if(!l){s();return}o.animationPlayState="paused",e=new IntersectionObserver(g=>{g.forEach(p=>{p.isIntersecting&&(s(),!a&&r())})},{threshold:f}),e.observe(n)})};n.addEventListener(t.animationUpdateEvent,i),i()},J=(t,n)=>{const{Components:e,Blocks:r,Canvas:i}=t,{block:o={},animationList:m=[]}=n,c="Animation",l=Object.values(d),f=Object.values(u);return e.addType(y,{block:o?{label:c,media:G.animation,content:{type:y},...Z,...o}:void 0,model:{defaults:{emptyState:!0,name:c,traits:[],script:q,animationUpdateEvent:E,"script-props":["animationUpdateEvent"],styles:m.map(a=>a.css).join(`
507
- `),style:{[u.name]:"fadeIn",[u.duration]:"1s",[u.delay]:"0s",[u.fillMode]:"both",[d.onScroll]:"true",[d.threshold]:"0.2",[d.repeat]:"false",...n.animationStyle}},init(){const{em:a}=this;this.listenTo(a,"component:mount",s=>{var p;if(s!==this)return;((p=this.parent())==null?void 0:p.get("type"))!==v||l.forEach(h=>this.removeStyle(h))})}},view:{events:()=>({animationstart:"onAnimationStart",animationend:"onAnimationEnd"}),init(){const{model:a}=this;this.listenTo(a,"component:styleUpdate",this.handleStyleChange)},onAnimationStart(){var s;if((s=this.cmpSpots)!=null&&s.length)return;const a=i.getSpots({component:this.model});this.cmpSpots=a,i.removeSpots(a),this.el.ownerDocument.body.style.overflowX="hidden"},onAnimationEnd(){const a=this.cmpSpots||[];i.spots.add(a),this.cmpSpots=[],this.el.ownerDocument.body.style.overflowX=""},triggerAnimation(){this.el.dispatchEvent(new CustomEvent(E))},handleStyleChange(a,s){Object.keys((s==null?void 0:s.style)||{}).some(h=>f.includes(h)||l.includes(h))&&this.triggerAnimation()},onRender(){this.triggerAnimation()}}}),()=>{r.remove(y),e.removeType(y)}},Q=function(t){const n=this,e="--animation-on-scroll",r="--animation-threshold",i="--animation-repeat";let o=null;const m=()=>{o==null||o.disconnect(),o=null},c=()=>{m();const l=getComputedStyle(n),f=l.getPropertyValue(e).trim()!=="false",a=parseFloat(l.getPropertyValue(r).trim())||.2,s=l.getPropertyValue(i).trim()==="true",g=()=>{Array.from(n.children).forEach(p=>{p instanceof HTMLElement&&typeof p.dispatchEvent=="function"&&p.dispatchEvent(new CustomEvent(k,{bubbles:!1}))})};if(!f){g();return}o=new IntersectionObserver(p=>{p.forEach(h=>{h.isIntersecting?(g(),!s&&m()):s&&Array.from(n.children).forEach(b=>{b instanceof HTMLElement&&getComputedStyle(b).getPropertyValue(e).trim()!=="false"&&(b.style.opacity="0",b.style.animationPlayState="paused")})})},{threshold:a}),o.observe(n)};n.addEventListener(t.animationGroupUpdateEvent,c),c()},tt=(t,n)=>{const{Components:e,Blocks:r}=t,{blockGroup:i={}}=n,o="Animation Group";return e.addType(v,{block:i?{label:o,media:G.animationGroup,content:{type:v,components:[{type:y},{type:y},{type:y}]},...Z,...i}:void 0,model:{defaults:{name:o,emptyState:!0,traits:[],script:Q,animationGroupUpdateEvent:k,"script-props":["animationGroupUpdateEvent"],droppable:H(y),style:{[T.staggerDelay]:"0.3s",[d.onScroll]:"true",[d.threshold]:"0.2",[d.repeat]:"false",...n.animationGroupStyle}},init(){const m=this.components();this.listenTo(m,"add remove",this.updateChildrenStaggerStyles),this.updateChildrenStaggerStyles()},updateChildrenStaggerStyles(){this.components().forEach((m,c)=>{m.is(y)&&m.addStyle({"--stagger-index":c.toString(),[u.delay]:"calc(var(--stagger-index, 0) * var(--stagger-delay, 0s))"},{partial:!0})})}},view:{init(){const{model:m}=this;this.listenTo(m,"component:styleUpdate",this.handleStyleChange)},triggerAnimation(){this.el.dispatchEvent(new CustomEvent(k))},handleStyleChange(){this.triggerAnimation(),this.model.updateChildrenStaggerStyles()},onRender(){this.triggerAnimation()}}}),()=>{r.remove(v),e.removeType(v)}},nt="animationComponent",et=I.startup,at=function(t,n={}){var i;const e=((i=n.animations)==null?void 0:i.call(n,{items:R}))||R,r=[J(t,{...n,animationList:e}),tt(t,n)];t.Styles.addSector("animation",{name:"Animation",properties:[{...S,name:"Type",property:u.name,type:"select",full:!0,default:"fadeIn",options:e},{...S,name:"Duration",property:u.duration,type:"number",units:["s"],min:.1,max:10,step:.1,default:"1s"},{...S,name:"Fill Mode",property:u.fillMode,type:"select",default:"both",options:[{name:"None",id:"none"},{name:"Forwards",id:"forwards"},{name:"Backwards",id:"backwards"},{name:"Both",id:"both"}]},{...K,name:"Stagger Delay",property:"--stagger-delay",type:"slider",units:["s"],min:.1,max:5,step:.1,default:"0.1s"},{..._,name:"Animate on Scroll",property:d.onScroll,type:"radio",default:"true",options:[{name:"Yes",id:"true"},{name:"No",id:"false"}]},{...D,name:"Scroll Threshold",property:d.threshold,type:"number",full:!0,min:.1,max:1,step:.01,default:"0.2"},{...D,name:"Repeat on Scroll",property:d.repeat,type:"radio",default:"false",options:[{name:"Yes",id:"true"},{name:"No",id:"false"}]}]}),$({editor:t,licenseKey:n.licenseKey,plan:et,pluginName:nt,cleanup:()=>{r.forEach(o=>o())}})},ot=Y(at);module.exports=ot;
1
+ "use strict";const T="app.grapesjs.com",z="app-stage.grapesjs.com",U=[T,z,"localhost","127.0.0.1",".local-credentialless.webcontainer.io",".local.webcontainer.io","-sandpack.codesandbox.io"],N="license:check:start",V="license:check:end",O=()=>typeof window<"u",B=({isDev:t,isStage:n})=>`${t?"":`https://${n?z:T}`}/api`,F=()=>{const t=O()&&window.location.hostname;return!!t&&(U.includes(t)||U.some(n=>t.endsWith(n)))};async function X({path:t,baseApiUrl:n,method:e="GET",headers:r={},params:i,body:a}){const c=`${n||B({isDev:!1,isStage:!1})}${t}`,l={method:e,headers:{"Content-Type":"application/json",...r}};a&&(l.body=JSON.stringify(a));const f=i?new URLSearchParams(i).toString():"",s=f?`?${f}`:"",o=await fetch(`${c}${s}`,l);if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return o.json()}var b=(t=>(t.free="free",t.startup="startup",t.business="business",t.enterprise="enterprise",t))(b||{});const L={[b.free]:0,[b.startup]:10,[b.business]:20,[b.enterprise]:30};function M(t){const n=t;return n.init=e=>r=>t(r,e),n}const W=t=>M(t);async function Y({editor:t,plan:n,pluginName:e,licenseKey:r,cleanup:i}){let a="",m=!1;const c=F(),l=s=>{console.warn("Cleanup plugin:",e,"Reason:",s),i()},f=(s={})=>{var u;const{error:o,sdkLicense:p}=s,d=(u=s.plan)==null?void 0:u.category;if(!(p||s.license)||o)l(o||"Invalid license");else if(d){const C=L[n],E=L[d];C>E&&l({pluginRequiredPlan:n,licensePlan:d})}};t.on(N,s=>{a=s==null?void 0:s.baseApiUrl,m=!0}),t.on(V,s=>{f(s)}),setTimeout(async()=>{if(!m){if(c)return;if(r){const s=await $({licenseKey:r,pluginName:e,baseApiUrl:a});s&&f(s)}else l("The `licenseKey` option not provided")}},2e3)}async function $(t){const{licenseKey:n,pluginName:e,baseApiUrl:r}=t;try{return(await X({baseApiUrl:r,path:`/sdk/${n||"na"}`,method:"POST",params:{d:window.location.hostname,pn:e}})).result||{}}catch(i){return console.error("Error during SDK license check:",i),!1}}const j=(...t)=>n=>t.some(e=>n.is(e));var y=(t=>(t.name="animation-name",t.duration="animation-duration",t.delay="animation-delay",t.iterationCount="animation-iteration-count",t.timingFunction="animation-timing-function",t.fillMode="animation-fill-mode",t))(y||{}),v=(t=>(t.onScroll="--animation-on-scroll",t.threshold="--animation-threshold",t.repeat="--animation-repeat",t))(v||{});const g="animation",I="animation-group",A="animation:update",x="animation-group:update",P={category:{id:"animations",label:"Animations"},select:!0},k=t=>(t==null?void 0:t.getType())===g,w=t=>(t==null?void 0:t.getType())===I,Z=t=>k(t)||w(t),S={isVisible:({component:t})=>k(t)},H={isVisible:({component:t})=>w(t)},_={isVisible:({component:t})=>k(t)&&w(t==null?void 0:t.parent())?!1:Z(t)},R={isVisible:({component:t,sector:n})=>{var e;return k(t)&&w(t==null?void 0:t.parent())?!1:Z(t)&&((e=n.getProperty(v.onScroll))==null?void 0:e.getValue())==="true"}},G={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>',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>'},K=function(t){const n=this;let e=null;const r=()=>{e==null||e.disconnect(),e=null},i=()=>{r();const a=n.style;a.animationName="",requestAnimationFrame(()=>{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())||.2,s=m.getPropertyValue("--animation-repeat").trim()==="true",o=()=>{a.animationName="none",n.offsetWidth,a.animationName=c,a.animationPlayState="running"};if(!c||c==="none"){a.animationName="none",a.animationPlayState="paused";return}if(!l){o();return}a.animationPlayState="paused",e=new IntersectionObserver(p=>{p.forEach(d=>{d.isIntersecting&&(o(),!s&&r())})},{threshold:f}),e.observe(n)})};n.addEventListener(t.animationUpdateEvent,i),i()},q=(t,n)=>{const{Components:e,Blocks:r,Canvas:i}=t,{block:a={},animationList:m=[]}=n,c=t.Components.events,l="Animation",f=Object.values(v),s=Object.values(y);return e.addType(g,{block:a?{label:l,media:G.animation,content:{type:g},...P,...a}:void 0,model:{defaults:{emptyState:!0,name:l,traits:[],script:K,animationUpdateEvent:A,"script-props":["animationUpdateEvent"],styles:m.map(o=>o.css).join(`
2
+ `)},init(){const{em:o}=this;this.addStyle({[y.name]:"fadeIn",[y.duration]:"1s",[y.fillMode]:"both",...n.animationStyle,...this.getStyle()}),this.listenTo(o,c.mount,p=>{var h;if(p!==this)return;((h=this.parent())==null?void 0:h.get("type"))!==I||f.forEach(u=>this.removeStyle(u))})}},view:{events:()=>({animationstart:"onAnimationStart",animationend:"onAnimationEnd"}),init(){const{model:o}=this;this.listenTo(o,c.styleUpdate,this.handleStyleChange)},onAnimationStart(){var p;if((p=this.cmpSpots)!=null&&p.length)return;const o=i.getSpots({component:this.model});this.cmpSpots=o,i.removeSpots(o),this.el.ownerDocument.body.style.overflowX="hidden"},onAnimationEnd(){const o=this.cmpSpots||[];i.spots.add(o),this.cmpSpots=[],this.el.ownerDocument.body.style.overflowX=""},triggerAnimation(){this.el.dispatchEvent(new CustomEvent(A))},handleStyleChange(o,p){Object.keys((p==null?void 0:p.style)||{}).some(u=>s.includes(u)||f.includes(u))&&this.triggerAnimation()},onRender(){this.triggerAnimation()}}}),()=>{r.remove(g),e.removeType(g)}},J=function(t){const n=this,e="--animation-on-scroll",r="--animation-threshold",i="--animation-repeat";let a=null;const m=()=>{a==null||a.disconnect(),a=null},c=()=>{m();const l=getComputedStyle(n),f=l.getPropertyValue(e).trim()!=="false",s=parseFloat(l.getPropertyValue(r).trim())||.2,o=l.getPropertyValue(i).trim()==="true",p=()=>{Array.from(n.children).forEach(d=>{d instanceof HTMLElement&&typeof d.dispatchEvent=="function"&&d.dispatchEvent(new CustomEvent(x,{bubbles:!1}))})};if(!f){p();return}a=new IntersectionObserver(d=>{d.forEach(h=>{h.isIntersecting?(p(),!o&&m()):o&&Array.from(n.children).forEach(u=>{u instanceof HTMLElement&&getComputedStyle(u).getPropertyValue(e).trim()!=="false"&&(u.style.opacity="0",u.style.animationPlayState="paused")})})},{threshold:s}),a.observe(n)};n.addEventListener(t.animationGroupUpdateEvent,c),c()},Q=(t,n)=>{const{Components:e,Blocks:r}=t,{blockGroup:i={}}=n,a="Animation Group";return e.addType(I,{block:i?{label:a,media:G.animationGroup,content:{type:I,components:[{type:g},{type:g},{type:g}]},...P,...i}:void 0,model:{defaults:{name:a,emptyState:!0,traits:[],script:J,animationGroupUpdateEvent:x,"script-props":["animationGroupUpdateEvent"],droppable:j(g)},init(){this.addStyle({...n.animationGroupStyle,...this.getStyle()});const m=this.components();this.listenTo(m,"add remove",this.updateChildrenStaggerStyles),this.updateChildrenStaggerStyles()},updateChildrenStaggerStyles(){this.components().forEach((m,c)=>{m.is(g)&&m.addStyle({"--stagger-index":c.toString(),[y.delay]:"calc(var(--stagger-index, 0) * var(--stagger-delay, 0.3s))"},{partial:!0})})}},view:{init(){const{model:m}=this;this.listenTo(m,"component:styleUpdate",this.handleStyleChange)},triggerAnimation(){this.el.dispatchEvent(new CustomEvent(x))},handleStyleChange(){this.triggerAnimation(),this.model.updateChildrenStaggerStyles()},onRender(){this.triggerAnimation()}}}),()=>{r.remove(I),e.removeType(I)}},tt="animationComponent",nt=b.startup,D=[{id:"flash",name:"Flash",css:`@keyframes flash {
3
+ 0%, 50%, to {
4
+ opacity:1
5
+ }
6
+
7
+ 25%, 75% {
8
+ opacity:0
9
+ }
10
+ }`},{id:"pulse",name:"Pulse",css:`@keyframes pulse {
11
+ 0% {
12
+ transform:scaleX(1)
13
+ }
14
+
15
+ 50% {
16
+ transform:scale3d(1.05, 1.05, 1.05)
17
+ }
18
+
19
+ to {
20
+ transform:scaleX(1)
21
+ }
22
+ }`},{id:"shake",name:"Shake",css:`@keyframes shake {
23
+ 0%, to {
24
+ transform:translateZ(0)
25
+ }
26
+
27
+ 10%, 30%, 50%, 70%, 90% {
28
+ transform:translate3d(-10px, 0, 0)
29
+ }
30
+
31
+ 20%, 40%, 60%, 80% {
32
+ transform:translate3d(10px, 0, 0)
33
+ }
34
+ }`},{id:"tada",name:"Tada",css:`@keyframes tada {
35
+ 0% {
36
+ transform:scaleX(1)
37
+ }
38
+
39
+ 10%, 20% {
40
+ transform:scale3d(.9, .9, .9) rotate(-3deg)
41
+ }
42
+
43
+ 30%, 50%, 70%, 90% {
44
+ transform:scale3d(1.1, 1.1, 1.1) rotate(3deg)
45
+ }
46
+
47
+ 40%, 60%, 80% {
48
+ transform:scale3d(1.1, 1.1, 1.1) rotate(-3deg)
49
+ }
50
+
51
+ to {
52
+ transform:scaleX(1)
53
+ }
54
+ }`},{id:"heartBeat",name:"Heart Beat",css:`@keyframes heartBeat {
55
+ 0% {
56
+ transform:scale(1)
57
+ }
58
+
59
+ 14% {
60
+ transform:scale(1.3)
61
+ }
62
+
63
+ 28% {
64
+ transform:scale(1)
65
+ }
66
+
67
+ 42% {
68
+ transform:scale(1.3)
69
+ }
70
+
71
+ 70% {
72
+ transform:scale(1)
73
+ }
74
+ }`},{id:"bounce",name:"Bounce",css:`@keyframes bounce {
75
+ 0%, 20%, 53%, 80%, to {
76
+ animation-timing-function: cubic-bezier(.215, .61, .355, 1);
77
+ transform:translateZ(0)
78
+ }
79
+
80
+ 40%, 43% {
81
+ animation-timing-function: cubic-bezier(.755, .05, .855, .06);
82
+ transform:translate3d(0, -30px, 0)
83
+ }
84
+
85
+ 70% {
86
+ animation-timing-function: cubic-bezier(.755, .05, .855, .06);
87
+ transform:translate3d(0, -15px, 0)
88
+ }
89
+
90
+ 90% {
91
+ transform:translate3d(0, -4px, 0)
92
+ }
93
+ }`},{id:"bounceIn",name:"Bounce In",css:`@keyframes bounceIn {
94
+ 0%, 20%, 40%, 60%, 80%, to {
95
+ animation-timing-function:cubic-bezier(.215, .61, .355, 1)
96
+ }
97
+
98
+ 0% {
99
+ opacity: 0;
100
+ transform:scale3d(.3, .3, .3)
101
+ }
102
+
103
+ 20% {
104
+ transform:scale3d(1.1, 1.1, 1.1)
105
+ }
106
+
107
+ 40% {
108
+ transform:scale3d(.9, .9, .9)
109
+ }
110
+
111
+ 60% {
112
+ opacity: 1;
113
+ transform:scale3d(1.03, 1.03, 1.03)
114
+ }
115
+
116
+ 80% {
117
+ transform:scale3d(.97, .97, .97)
118
+ }
119
+
120
+ to {
121
+ opacity: 1;
122
+ transform:scaleX(1)
123
+ }
124
+ }`},{id:"bounceInDown",name:"Bounce In Down",css:`@keyframes bounceInDown {
125
+ 0%, 60%, 75%, 90%, to {
126
+ animation-timing-function:cubic-bezier(.215, .61, .355, 1)
127
+ }
128
+
129
+ 0% {
130
+ opacity: 0;
131
+ transform:translate3d(0, -100%, 0)
132
+ }
133
+
134
+ 60% {
135
+ opacity: 1;
136
+ transform:translate3d(0, 25px, 0)
137
+ }
138
+
139
+ 75% {
140
+ transform:translate3d(0, -10px, 0)
141
+ }
142
+
143
+ 90% {
144
+ transform:translate3d(0, 5px, 0)
145
+ }
146
+
147
+ to {
148
+ transform:translateZ(0)
149
+ }
150
+ }`},{id:"bounceInLeft",name:"Bounce In Left",css:`@keyframes bounceInLeft {
151
+ 0%, 1%, 60%, 75%, 90%, to {
152
+ animation-timing-function:cubic-bezier(.215, .61, .355, .1)
153
+ }
154
+
155
+ 0% {
156
+ opacity: 0;
157
+ }
158
+
159
+ 1% {
160
+ transform:translate3d(-100%, 0, 0)
161
+ }
162
+
163
+ 60% {
164
+ opacity: 1;
165
+ transform:translate3d(25px, 0, 0)
166
+ }
167
+
168
+ 75% {
169
+ transform:translate3d(-10px, 0, 0)
170
+ }
171
+
172
+ 90% {
173
+ transform:translate3d(5px, 0, 0)
174
+ }
175
+
176
+ to {
177
+ transform:translateZ(0)
178
+ }
179
+ }`},{id:"bounceInRight",name:"Bounce In Right",css:`@keyframes bounceInRight {
180
+ 0%, 1%, 60%, 75%, 90%, to {
181
+ animation-timing-function:cubic-bezier(.215, .61, .355, .1)
182
+ }
183
+
184
+ 0% {
185
+ opacity: 0;
186
+ }
187
+
188
+ 1% {
189
+ transform:translate3d(100%, 0, 0)
190
+ }
191
+
192
+ 60% {
193
+ opacity: 1;
194
+ transform:translate3d(-25px, 0, 0)
195
+ }
196
+
197
+ 75% {
198
+ transform:translate3d(10px, 0, 0)
199
+ }
200
+
201
+ 90% {
202
+ transform:translate3d(-5px, 0, 0)
203
+ }
204
+
205
+ to {
206
+ transform:translateZ(0)
207
+ }
208
+ }`},{id:"bounceInUp",name:"Bounce In Up",css:`@keyframes bounceInUp {
209
+ 0%, 1%, 60%, 75%, 90%, to {
210
+ animation-timing-function:cubic-bezier(.215, .61, .355, .1)
211
+ }
212
+
213
+ 0% {
214
+ opacity: 0;
215
+ }
216
+
217
+ 1% {
218
+ transform:translate3d(0, 100%, 0)
219
+ }
220
+
221
+ 60% {
222
+ opacity: 1;
223
+ transform:translate3d(0, -20px, 0)
224
+ }
225
+
226
+ 75% {
227
+ transform:translate3d(0, 10px, 0)
228
+ }
229
+
230
+ 90% {
231
+ transform:translate3d(0, -5px, 0)
232
+ }
233
+
234
+ to {
235
+ transform:translateZ(0)
236
+ }
237
+ }`},{id:"fadeIn",name:"Fade In",css:`@keyframes fadeIn {
238
+ 0% {
239
+ opacity:0
240
+ }
241
+
242
+ to {
243
+ opacity:1
244
+ }
245
+ }`},{id:"fadeInDown",name:"Fade In Down",css:`@keyframes fadeInDown {
246
+ 0% {
247
+ opacity: 0;
248
+ }
249
+
250
+ 1% {
251
+ transform:translate3d(0, -100%, 0)
252
+ }
253
+
254
+ to {
255
+ opacity: 1;
256
+ transform:translateZ(0)
257
+ }
258
+ }`},{id:"fadeInLeft",name:"Fade In Left",css:`@keyframes fadeInLeft {
259
+ 0% {
260
+ opacity: 0;
261
+ }
262
+
263
+ 1% {
264
+ transform:translate3d(-100%, 0, 0)
265
+ }
266
+
267
+ to {
268
+ opacity: 1;
269
+ transform:translateZ(0)
270
+ }
271
+ }`},{id:"fadeInRight",name:"Fade In Right",css:`@keyframes fadeInRight {
272
+ 0% {
273
+ opacity: 0;
274
+ }
275
+
276
+ 1% {
277
+ transform: translate3d(90%, 0, 0)
278
+ }
279
+
280
+ to {
281
+ opacity: 1;
282
+ transform:translateZ(0)
283
+ }
284
+ }`},{id:"fadeInUp",name:"Fade In Up",css:`@keyframes fadeInUp {
285
+ 0% {
286
+ opacity: 0;
287
+ }
288
+
289
+ 1% {
290
+ transform:translate3d(0, 100%, 0)
291
+ }
292
+
293
+ to {
294
+ opacity: 1;
295
+ transform:translateZ(0)
296
+ }
297
+ }`},{id:"flipInX",name:"Flip In X",css:`@keyframes flipInX {
298
+ 0% {
299
+ transform: perspective(400px) rotateX(90deg);
300
+ animation-timing-function: ease-in;
301
+ opacity:0
302
+ }
303
+
304
+ 40% {
305
+ transform: perspective(400px) rotateX(-20deg);
306
+ animation-timing-function:ease-in
307
+ }
308
+
309
+ 60% {
310
+ transform: perspective(400px) rotateX(10deg);
311
+ opacity:1
312
+ }
313
+
314
+ 80% {
315
+ transform:perspective(400px) rotateX(-5deg)
316
+ }
317
+
318
+ to {
319
+ transform:perspective(400px)
320
+ }
321
+ }`},{id:"flipInY",name:"Flip In Y",css:`@keyframes flipInY {
322
+ 0% {
323
+ transform: perspective(400px) rotateY(90deg);
324
+ animation-timing-function: ease-in;
325
+ opacity:0
326
+ }
327
+
328
+ 40% {
329
+ transform: perspective(400px) rotateY(-20deg);
330
+ animation-timing-function:ease-in
331
+ }
332
+
333
+ 60% {
334
+ transform: perspective(400px) rotateY(10deg);
335
+ opacity:1
336
+ }
337
+
338
+ 80% {
339
+ transform:perspective(400px) rotateY(-5deg)
340
+ }
341
+
342
+ to {
343
+ transform:perspective(400px)
344
+ }
345
+ }`},{id:"rotateIn",name:"Rotate In",css:`@keyframes rotateIn {
346
+ 0% {
347
+ transform-origin: center;
348
+ transform: rotate(-200deg);
349
+ opacity:0
350
+ }
351
+
352
+ to {
353
+ transform-origin: center;
354
+ transform: translateZ(0);
355
+ opacity:1
356
+ }
357
+ }`},{id:"rotateInDownLeft",name:"Rotate In Down Left",css:`@keyframes rotateInDownLeft {
358
+ 0% {
359
+ transform-origin: left bottom;
360
+ transform: rotate(-45deg);
361
+ opacity:0
362
+ }
363
+
364
+ to {
365
+ transform-origin: left bottom;
366
+ transform: translateZ(0);
367
+ opacity:1
368
+ }
369
+ }`},{id:"rotateInDownRight",name:"Rotate In Down Right",css:`@keyframes rotateInDownRight {
370
+ 0% {
371
+ transform-origin: right bottom;
372
+ transform: rotate(45deg);
373
+ opacity:0
374
+ }
375
+
376
+ to {
377
+ transform-origin: right bottom;
378
+ transform: translateZ(0);
379
+ opacity:1
380
+ }
381
+ }`},{id:"rotateInUpLeft",name:"Rotate In Up Left",css:`@keyframes rotateInUpLeft {
382
+ 0% {
383
+ opacity: 0
384
+ }
385
+
386
+ 1% {
387
+ transform-origin: left bottom;
388
+ transform: rotate(45deg);
389
+ }
390
+
391
+ to {
392
+ transform-origin: left bottom;
393
+ transform: translateZ(0);
394
+ opacity:1
395
+ }
396
+ }`},{id:"rotateInUpRight",name:"Rotate In Up Right",css:`@keyframes rotateInUpRight {
397
+ 0% {
398
+ opacity: 0
399
+ }
400
+
401
+ 1% {
402
+ transform-origin: right bottom;
403
+ transform: rotate(-90deg);
404
+ }
405
+
406
+ to {
407
+ transform-origin: right bottom;
408
+ transform: translateZ(0);
409
+ opacity:1
410
+ }
411
+ }`},{id:"slideInDown",name:"Slide In Down",css:`@keyframes slideInDown {
412
+ 0% {
413
+ visibility:visible
414
+ }
415
+
416
+ 1% {
417
+ transform: translate3d(0, -100%, 0);
418
+ }
419
+
420
+ to {
421
+ transform:translateZ(0)
422
+ }
423
+ }`},{id:"slideInLeft",name:"Slide In Left",css:`@keyframes slideInLeft {
424
+ 0% {
425
+ visibility:visible
426
+ }
427
+
428
+ 1% {
429
+ transform: translate3d(-100%, 0, 0);
430
+ }
431
+
432
+ to {
433
+ transform: translateZ(0)
434
+ }
435
+ }`},{id:"slideInRight",name:"Slide In Right",css:`@keyframes slideInRight {
436
+ 0% {
437
+ visibility:visible
438
+ }
439
+
440
+ 1% {
441
+ transform: translate3d(100%, 0, 0);
442
+ }
443
+
444
+ to {
445
+ transform:translateZ(0)
446
+ }
447
+ }`},{id:"slideInUp",name:"Slide In Up",css:`@keyframes slideInUp {
448
+ 0% {
449
+ visibility:visible
450
+ }
451
+
452
+ 1% {
453
+ transform: translate3d(0, 100%, 0);
454
+ }
455
+
456
+ to {
457
+ transform:translateZ(0)
458
+ }
459
+ }`},{id:"zoomIn",name:"Zoom In",css:`@keyframes zoomIn {
460
+ 0% {
461
+ opacity: 0;
462
+ transform:scale3d(.3, .3, .3)
463
+ }
464
+
465
+ 50% {
466
+ opacity:1
467
+ }
468
+ }`},{id:"zoomInDown",name:"Zoom In Down",css:`@keyframes zoomInDown {
469
+ 0% {
470
+ opacity: 0;
471
+ transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
472
+ animation-timing-function:cubic-bezier(.55, .055, .675, .19)
473
+ }
474
+
475
+ 60% {
476
+ opacity: 1;
477
+ transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
478
+ animation-timing-function:cubic-bezier(.175, .885, .32, 1)
479
+ }
480
+ }`},{id:"zoomInLeft",name:"Zoom In Left",css:`@keyframes zoomInLeft {
481
+ 0% {
482
+ opacity: 0;
483
+ transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
484
+ animation-timing-function:cubic-bezier(.55, .055, .675, .19)
485
+ }
486
+
487
+ 60% {
488
+ opacity: 1;
489
+ transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
490
+ animation-timing-function:cubic-bezier(.175, .885, .32, 1)
491
+ }
492
+ }`},{id:"zoomInRight",name:"Zoom In Right",css:`@keyframes zoomInRight {
493
+ 0% {
494
+ opacity: 0;
495
+ transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
496
+ animation-timing-function:cubic-bezier(.55, .055, .675, .19)
497
+ }
498
+
499
+ 60% {
500
+ opacity: 1;
501
+ transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
502
+ animation-timing-function:cubic-bezier(.175, .885, .32, 1)
503
+ }
504
+ }`},{id:"zoomInUp",name:"Zoom In Up",css:`@keyframes zoomInUp {
505
+ 0% {
506
+ opacity: 0;
507
+ animation-timing-function: cubic-bezier(.55, .055, .675, .19);
508
+ }
509
+
510
+ 1% {
511
+ transform: scale3d(.1, .1, .1) translate3d(0, 100%, 0);
512
+ }
513
+
514
+ 60% {
515
+ opacity: 1;
516
+ transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
517
+ animation-timing-function:cubic-bezier(.175, .885, .32, 1)
518
+ }
519
+ }`}],et=function(t,n={}){var i;const e=((i=n.animations)==null?void 0:i.call(n,{items:D}))||D,r=[q(t,{...n,animationList:e}),Q(t,n)];t.Styles.addSector("animation",{name:"Animation",properties:[{...S,name:"Type",property:y.name,type:"select",full:!0,default:"fadeIn",options:e},{...S,name:"Duration",property:y.duration,type:"number",units:["s"],min:.1,max:10,step:.1,default:"1s"},{...S,name:"Delay",property:y.delay,type:"number",units:["s"],min:0,max:10,step:.1,default:"1s"},{...S,name:"Iteration Count",property:y.iterationCount,type:"select",default:"1",options:[{id:"1",name:"One time"},{id:"infinite",name:"Infinite"}]},{...S,name:"Timing",property:y.timingFunction,type:"select",default:"ease",options:[{id:"ease",name:"Ease"},{id:"ease-in",name:"Ease in"},{id:"ease-out",name:"Ease out"},{id:"ease-in-out",name:"Ease in out"},{id:"linear",name:"Linear"}]},{...H,name:"Stagger Delay",property:"--stagger-delay",type:"slider",units:["s"],min:.1,max:5,step:.1,default:"0.3s"},{..._,name:"Animate on Scroll",property:v.onScroll,type:"radio",default:"true",options:[{name:"Yes",id:"true"},{name:"No",id:"false"}]},{...R,name:"Scroll Threshold",property:v.threshold,type:"number",full:!0,min:.1,max:1,step:.01,default:"0.2"},{...R,name:"Repeat on Scroll",property:v.repeat,type:"radio",default:"false",options:[{name:"Yes",id:"true"},{name:"No",id:"false"}]}]}),Y({editor:t,licenseKey:n.licenseKey,plan:nt,pluginName:tt,cleanup:()=>{r.forEach(a=>a())}})},at=W(et);module.exports=at;