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