@kolkrabbi/design-editor 0.26.0 → 0.27.1

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,2164 +0,0 @@
1
- import { Cn as e, N as t, wn as n } from "./rolls-BGtqxVYq.js";
2
- import { useEffect as r, useState as i, useSyncExternalStore as a } from "react";
3
- //#region src/kinetic/paths.js
4
- var o = Math.PI * 2, s = (e) => Math.round(e * 100) / 100;
5
- function c(e) {
6
- return e.map((e, t) => `${t === 0 ? "M" : "L"} ${s(e[0])} ${s(e[1])}`).join(" ");
7
- }
8
- var l = [
9
- [.12, .55],
10
- [.37, .32],
11
- [.63, .68],
12
- [.88, .45]
13
- ];
14
- function u(e, t, n) {
15
- let r = e.map(([e, r]) => [e * t, r * n]);
16
- if (r.length < 2) return `M ${s(t / 2)} ${s(n / 2)} L ${s(t / 2 + 1)} ${s(n / 2)}`;
17
- let i = `M ${s(r[0][0])} ${s(r[0][1])}`;
18
- for (let e = 0; e < r.length - 1; e++) {
19
- let t = r[e - 1] || r[e], n = r[e], a = r[e + 1], o = r[e + 2] || r[e + 1], c = n[0] + (a[0] - t[0]) / 6, l = n[1] + (a[1] - t[1]) / 6, u = a[0] - (o[0] - n[0]) / 6, d = a[1] - (o[1] - n[1]) / 6;
20
- i += ` C ${s(c)} ${s(l)} ${s(u)} ${s(d)} ${s(a[0])} ${s(a[1])}`;
21
- }
22
- return i;
23
- }
24
- var d = (e) => e === "array", f = (e) => e === "radial", p = (e) => e === "rings", m = {
25
- amp: .4,
26
- freq: 2,
27
- turns: 3,
28
- radius: .72,
29
- rows: 2,
30
- cols: 3,
31
- count: 12,
32
- inner: .12,
33
- spin: 1,
34
- twist: .5,
35
- grow: .6
36
- };
37
- function h(e, t, n, r = {}) {
38
- let i = t / 2, a = n / 2, d = Math.min(t, n) * .12, f = r.amp ?? m.amp, p = Math.max(1, Math.round(r.freq ?? m.freq)), h = Math.max(1, Math.round(r.turns ?? m.turns)), g = r.radius ?? m.radius;
39
- switch (e) {
40
- case "arc": {
41
- let e = n * .62, r = e - f * n * .7;
42
- return {
43
- d: `M ${s(d)} ${s(e)} Q ${s(i)} ${s(r)} ${s(t - d)} ${s(e)}`,
44
- closed: !1
45
- };
46
- }
47
- case "circle": {
48
- let e = Math.min(t, n) * .5 * g;
49
- return {
50
- d: `M ${s(i - e)} ${s(a)} A ${s(e)} ${s(e)} 0 1 1 ${s(i + e)} ${s(a)} A ${s(e)} ${s(e)} 0 1 1 ${s(i - e)} ${s(a)} Z`,
51
- closed: !0
52
- };
53
- }
54
- case "ellipse": {
55
- let e = (t * .5 - d) * g, r = (n * .5 - d) * g;
56
- return {
57
- d: `M ${s(i - e)} ${s(a)} A ${s(e)} ${s(r)} 0 1 1 ${s(i + e)} ${s(a)} A ${s(e)} ${s(r)} 0 1 1 ${s(i - e)} ${s(a)} Z`,
58
- closed: !0
59
- };
60
- }
61
- case "sine": {
62
- let e = [];
63
- for (let r = 0; r <= 120; r++) {
64
- let i = r / 120;
65
- e.push([d + i * (t - 2 * d), a + f * n * .32 * Math.sin(i * p * o)]);
66
- }
67
- return {
68
- d: c(e),
69
- closed: !1
70
- };
71
- }
72
- case "spiral": {
73
- let e = Math.min(t, n) * .45 * g, r = [];
74
- for (let t = 0; t <= 420; t++) {
75
- let n = t / 420, s = n * h * o, c = n * e;
76
- r.push([i + Math.cos(s) * c, a + Math.sin(s) * c]);
77
- }
78
- return {
79
- d: c(r),
80
- closed: !1
81
- };
82
- }
83
- case "zigzag": {
84
- let e = p * 2, r = [];
85
- for (let i = 0; i <= e; i++) {
86
- let o = i / e;
87
- r.push([d + o * (t - 2 * d), a + (i % 2 == 0 ? -1 : 1) * f * n * .28]);
88
- }
89
- return {
90
- d: c(r),
91
- closed: !1
92
- };
93
- }
94
- case "custom": return {
95
- d: u(Array.isArray(r.points) && r.points.length >= 2 ? r.points : l, t, n),
96
- closed: !1
97
- };
98
- default: {
99
- let e = a + (r.offset || 0) * n;
100
- return {
101
- d: `M ${s(d)} ${s(e)} L ${s(t - d)} ${s(e)}`,
102
- closed: !1
103
- };
104
- }
105
- }
106
- }
107
- //#endregion
108
- //#region src/kinetic/presets.js
109
- var g = "#0b0d12", _ = "#e8e4dc", v = {
110
- text: "Kinetic",
111
- font: "gullhamrar",
112
- fontSize: 120,
113
- fill: "#e8e4dc",
114
- italic: !1,
115
- case: "none",
116
- letterSpacing: 0,
117
- align: "center",
118
- multiply: 1,
119
- group: null,
120
- flow: "flow",
121
- offset: {
122
- x: 0,
123
- y: 0
124
- },
125
- phase: 0,
126
- stagger: 0,
127
- vf: {},
128
- opentype: {},
129
- showPath: !1,
130
- path: {
131
- type: "line",
132
- ...m
133
- },
134
- motion: {
135
- mode: "none",
136
- cycles: 1,
137
- phase: .5,
138
- amp: .3,
139
- axis: "wght",
140
- field: "x"
141
- },
142
- motions: [],
143
- morph: {
144
- on: !1,
145
- mode: "morph",
146
- vf2: {},
147
- face2: "",
148
- curve: "flat",
149
- blend: .5,
150
- cp1: {
151
- x: .33,
152
- y: .33
153
- },
154
- cp2: {
155
- x: .66,
156
- y: .66
157
- }
158
- }
159
- };
160
- function y(t, r = {}) {
161
- let i = n(t), a = e(i);
162
- for (let e of i.axes) r[e.tag] != null && (a[e.tag] = r[e.tag]);
163
- return a;
164
- }
165
- function b(e = {}, t = 0) {
166
- let n = {
167
- id: e.id || `i${t}`,
168
- ...v,
169
- ...e,
170
- path: {
171
- ...v.path,
172
- ...e.path || {}
173
- },
174
- motion: {
175
- ...v.motion,
176
- ...e.motion || {}
177
- },
178
- motions: Array.isArray(e.motions) ? e.motions.map((e) => ({
179
- ...v.motion,
180
- ...e
181
- })) : [],
182
- offset: {
183
- ...v.offset,
184
- ...e.offset || {}
185
- },
186
- opentype: { ...e.opentype || {} },
187
- morph: {
188
- ...v.morph,
189
- ...e.morph || {},
190
- vf2: { ...e.morph?.vf2 || {} }
191
- }
192
- };
193
- return n.vf = y(n.font, e.vf), n;
194
- }
195
- var x = (e) => ({
196
- bg: g,
197
- instances: [b({
198
- font: "rot",
199
- fill: _,
200
- ...e
201
- }, 0)]
202
- }), S = "#16202E", C = (...e) => ({
203
- bg: S,
204
- instances: e.map((e, t) => b(e, t))
205
- }), w = (e, ...t) => ({
206
- bg: e,
207
- instances: t.map((e, t) => b(e, t))
208
- }), T = [
209
- {
210
- id: "sunburst",
211
- label: "Sunburst",
212
- sub: "Radial",
213
- comp: x({
214
- text: "Without a soul, is it a place?",
215
- fontSize: 26,
216
- vf: {
217
- wdth: 100,
218
- wght: 500
219
- },
220
- path: {
221
- type: "radial",
222
- count: 14,
223
- inner: .1,
224
- spin: 1
225
- }
226
- })
227
- },
228
- {
229
- id: "dense-burst",
230
- label: "Dense burst",
231
- sub: "Radial",
232
- comp: x({
233
- text: "is it a place",
234
- fontSize: 30,
235
- vf: {
236
- wdth: 90,
237
- wght: 600
238
- },
239
- path: {
240
- type: "radial",
241
- count: 28,
242
- inner: .06,
243
- spin: 1
244
- }
245
- })
246
- },
247
- {
248
- id: "double-twirl",
249
- label: "Double twirl",
250
- sub: "Radial",
251
- comp: x({
252
- text: "turning and turning",
253
- fontSize: 24,
254
- font: "malromur",
255
- vf: { wght: 500 },
256
- path: {
257
- type: "radial",
258
- count: 18,
259
- inner: .12,
260
- spin: 2
261
- }
262
- })
263
- },
264
- {
265
- id: "pulse-burst",
266
- label: "Pulse burst",
267
- sub: "Radial",
268
- comp: x({
269
- text: "breathe in, breathe out",
270
- fontSize: 26,
271
- font: "gullhamrar",
272
- vf: { wght: 600 },
273
- path: {
274
- type: "radial",
275
- count: 16,
276
- inner: .1,
277
- spin: 1
278
- },
279
- motion: {
280
- mode: "cascade",
281
- cycles: 2,
282
- phase: .5
283
- }
284
- })
285
- },
286
- {
287
- id: "vortex",
288
- label: "Vortex",
289
- sub: "Rings",
290
- comp: x({
291
- text: "Does a community make a place? ",
292
- fontSize: 24,
293
- vf: {
294
- wdth: 100,
295
- wght: 500
296
- },
297
- path: {
298
- type: "rings",
299
- count: 12,
300
- inner: .1,
301
- radius: .94,
302
- spin: 1,
303
- twist: .6,
304
- grow: .8
305
- }
306
- })
307
- },
308
- {
309
- id: "galaxy",
310
- label: "Galaxy",
311
- sub: "Rings",
312
- comp: x({
313
- text: "spiralling inward forever ",
314
- fontSize: 22,
315
- font: "malromur",
316
- vf: { wght: 500 },
317
- path: {
318
- type: "rings",
319
- count: 16,
320
- inner: .05,
321
- radius: .96,
322
- spin: 1,
323
- twist: 1.25,
324
- grow: .9
325
- }
326
- })
327
- },
328
- {
329
- id: "wide-rings",
330
- label: "Wide rings",
331
- sub: "Rings",
332
- comp: x({
333
- text: "around and around ",
334
- fontSize: 28,
335
- font: "gullhamrar",
336
- vf: { wght: 600 },
337
- path: {
338
- type: "rings",
339
- count: 8,
340
- inner: .18,
341
- radius: .92,
342
- spin: 1,
343
- twist: .3,
344
- grow: 1.2
345
- }
346
- })
347
- },
348
- {
349
- id: "orbit",
350
- label: "Orbit",
351
- sub: "Path",
352
- comp: x({
353
- text: "KOLKRABBI · REYKJAVIK · ",
354
- fontSize: 40,
355
- font: "malromur",
356
- vf: { wght: 500 },
357
- path: {
358
- type: "circle",
359
- radius: .82
360
- },
361
- motion: {
362
- mode: "orbit",
363
- cycles: 1
364
- }
365
- })
366
- },
367
- {
368
- id: "spiral",
369
- label: "Spiral",
370
- sub: "Path",
371
- comp: x({
372
- text: "into the spiral we go ",
373
- fontSize: 30,
374
- vf: {
375
- wdth: 100,
376
- wght: 500
377
- },
378
- path: {
379
- type: "spiral",
380
- turns: 4,
381
- radius: .95
382
- },
383
- motion: {
384
- mode: "march",
385
- cycles: 1
386
- }
387
- })
388
- },
389
- {
390
- id: "template",
391
- label: "Template",
392
- sub: "Path",
393
- comp: x({
394
- text: "Type here",
395
- fontSize: 160,
396
- vf: {
397
- wdth: 100,
398
- wght: 600
399
- }
400
- })
401
- },
402
- {
403
- id: "big-statement",
404
- label: "Flood",
405
- sub: "Scenes",
406
- comp: C({
407
- text: "BIG",
408
- font: "rot",
409
- fontSize: 220,
410
- vf: {
411
- wdth: 140,
412
- wght: 100
413
- },
414
- fill: "#c2502e",
415
- motion: {
416
- mode: "vfwave",
417
- axis: "wght",
418
- cycles: 1,
419
- phase: .5
420
- }
421
- })
422
- },
423
- {
424
- id: "ring-and-word",
425
- label: "Ring",
426
- sub: "Scenes",
427
- comp: C({
428
- id: "a",
429
- text: "KOLKRABBI · REYKJAVIK · ",
430
- font: "malromur",
431
- fontSize: 56,
432
- vf: { wght: 500 },
433
- fill: "#9ec1ff",
434
- path: {
435
- type: "circle",
436
- radius: .86
437
- },
438
- motion: {
439
- mode: "orbit",
440
- cycles: 1
441
- }
442
- }, {
443
- id: "b",
444
- text: "KOL",
445
- font: "gullhamrar",
446
- fontSize: 180,
447
- vf: { wght: 800 },
448
- fill: "#e8e4dc",
449
- path: { type: "line" }
450
- })
451
- },
452
- {
453
- id: "custom-s",
454
- label: "Flow",
455
- sub: "Scenes",
456
- comp: C({
457
- text: "freeform",
458
- fontSize: 96,
459
- vf: { wght: 600 },
460
- path: { type: "custom" },
461
- showPath: !0
462
- })
463
- },
464
- {
465
- id: "malromur-wave",
466
- label: "Morph",
467
- sub: "Scenes",
468
- comp: C({
469
- text: "Malromur",
470
- font: "malromur",
471
- fontSize: 132,
472
- vf: { wght: 300 },
473
- motion: {
474
- mode: "vfwave",
475
- axis: "wght",
476
- cycles: 2,
477
- phase: .5
478
- }
479
- })
480
- },
481
- {
482
- id: "flag",
483
- label: "Wave",
484
- sub: "Scenes",
485
- comp: C({
486
- text: "flag",
487
- font: "rot",
488
- fontSize: 168,
489
- vf: {
490
- wdth: 120,
491
- wght: 600
492
- },
493
- motion: {
494
- mode: "glyphwave",
495
- cycles: 1,
496
- phase: .5,
497
- amp: .5
498
- }
499
- })
500
- },
501
- {
502
- id: "sweep-grid",
503
- label: "Reveal",
504
- sub: "Scenes",
505
- comp: C({
506
- text: "KOL",
507
- font: "rot",
508
- fontSize: 56,
509
- vf: {
510
- wdth: 90,
511
- wght: 500
512
- },
513
- fill: "#7fd1ff",
514
- path: {
515
- type: "array",
516
- rows: 4,
517
- cols: 5
518
- },
519
- motion: {
520
- mode: "sweep",
521
- field: "diagonal",
522
- cycles: 1,
523
- amp: .3
524
- }
525
- })
526
- },
527
- {
528
- id: "baseline",
529
- label: "Baseline",
530
- sub: "Elements",
531
- comp: C({
532
- text: "Typography",
533
- fontSize: 120,
534
- vf: { wght: 500 }
535
- })
536
- },
537
- {
538
- id: "arc-kinetic",
539
- label: "Arcs",
540
- sub: "Elements",
541
- comp: C({
542
- text: "Kinetic",
543
- fontSize: 130,
544
- vf: { wght: 600 },
545
- path: {
546
- type: "arc",
547
- amp: .45
548
- }
549
- })
550
- },
551
- {
552
- id: "ellipse-loop",
553
- label: "Loops",
554
- sub: "Elements",
555
- comp: C({
556
- text: "REYKJAVIK",
557
- font: "rot",
558
- fontSize: 78,
559
- vf: {
560
- wdth: 120,
561
- wght: 600
562
- },
563
- path: {
564
- type: "ellipse",
565
- radius: .92
566
- },
567
- motion: { mode: "orbit" }
568
- })
569
- },
570
- {
571
- id: "zigzag",
572
- label: "Angular",
573
- sub: "Elements",
574
- comp: C({
575
- text: "ZIGZAG",
576
- font: "malromur",
577
- fontSize: 92,
578
- vf: { wght: 700 },
579
- path: {
580
- type: "zigzag",
581
- amp: .5,
582
- freq: 3
583
- }
584
- })
585
- },
586
- {
587
- id: "array-grid",
588
- label: "Grid",
589
- sub: "Elements",
590
- comp: C({
591
- text: "KOL",
592
- fontSize: 64,
593
- vf: { wght: 600 },
594
- path: {
595
- type: "array",
596
- rows: 3,
597
- cols: 4
598
- }
599
- })
600
- },
601
- {
602
- id: "weight-pulse",
603
- label: "Weight",
604
- sub: "Elements",
605
- comp: C({
606
- text: "WEIGHT",
607
- fontSize: 150,
608
- vf: { wght: 300 },
609
- motion: {
610
- mode: "vfwave",
611
- axis: "wght",
612
- cycles: 1,
613
- phase: .6
614
- }
615
- })
616
- },
617
- {
618
- id: "rot-width",
619
- label: "Width",
620
- sub: "Elements",
621
- comp: C({
622
- text: "WIDTH",
623
- font: "rot",
624
- fontSize: 150,
625
- vf: {
626
- wdth: 64,
627
- wght: 600
628
- },
629
- motion: {
630
- mode: "vfwave",
631
- axis: "wdth",
632
- cycles: 1,
633
- phase: .6
634
- }
635
- })
636
- },
637
- {
638
- id: "cascade",
639
- label: "Cascade",
640
- sub: "Elements",
641
- comp: C({
642
- text: "CASCADE",
643
- fontSize: 130,
644
- vf: { wght: 600 },
645
- motion: {
646
- mode: "cascade",
647
- cycles: 1,
648
- phase: .6
649
- }
650
- })
651
- },
652
- {
653
- id: "baseline-mono",
654
- label: "Mono line",
655
- sub: "Lines",
656
- comp: C({
657
- text: "monospace",
658
- font: "rot",
659
- fontSize: 110,
660
- vf: {
661
- wdth: 90,
662
- wght: 500
663
- },
664
- fill: "#7fd1ff"
665
- })
666
- },
667
- {
668
- id: "baseline-light",
669
- label: "On paper",
670
- sub: "Lines",
671
- comp: w("#f4f1ea", {
672
- text: "Reykjavik",
673
- font: "malromur",
674
- fontSize: 130,
675
- vf: { wght: 600 },
676
- fill: "#0b0b0e"
677
- })
678
- },
679
- {
680
- id: "sine-flow",
681
- label: "Sine flow",
682
- sub: "Curves",
683
- comp: C({
684
- text: "wave along",
685
- font: "rot",
686
- fontSize: 96,
687
- vf: {
688
- wdth: 90,
689
- wght: 500
690
- },
691
- path: {
692
- type: "sine",
693
- amp: .4,
694
- freq: 2
695
- },
696
- motion: {
697
- mode: "march",
698
- cycles: 1
699
- }
700
- })
701
- },
702
- {
703
- id: "spiral-in",
704
- label: "Spiral",
705
- sub: "Curves",
706
- comp: C({
707
- text: "spiral",
708
- fontSize: 88,
709
- vf: { wght: 700 },
710
- path: {
711
- type: "spiral",
712
- turns: 3
713
- }
714
- })
715
- },
716
- {
717
- id: "arc-march",
718
- label: "Arc march",
719
- sub: "Curves",
720
- comp: C({
721
- text: "on the arc",
722
- font: "rot",
723
- fontSize: 96,
724
- vf: {
725
- wdth: 100,
726
- wght: 500
727
- },
728
- path: {
729
- type: "arc",
730
- amp: .5
731
- },
732
- motion: { mode: "march" }
733
- })
734
- },
735
- {
736
- id: "arc-up",
737
- label: "High arc",
738
- sub: "Curves",
739
- comp: C({
740
- text: "over the top",
741
- font: "malromur",
742
- fontSize: 92,
743
- vf: { wght: 600 },
744
- path: {
745
- type: "arc",
746
- amp: .7
747
- }
748
- })
749
- },
750
- {
751
- id: "arc-wide",
752
- label: "Wide arc",
753
- sub: "Curves",
754
- comp: C({
755
- text: "WIDEARC",
756
- font: "rot",
757
- fontSize: 96,
758
- vf: {
759
- wdth: 150,
760
- wght: 600
761
- },
762
- path: {
763
- type: "arc",
764
- amp: .4
765
- }
766
- })
767
- },
768
- {
769
- id: "sine-fast",
770
- label: "Fast wave",
771
- sub: "Curves",
772
- comp: C({
773
- text: "up and down",
774
- fontSize: 90,
775
- vf: { wght: 600 },
776
- path: {
777
- type: "sine",
778
- amp: .4,
779
- freq: 3
780
- },
781
- motion: {
782
- mode: "march",
783
- cycles: 2
784
- }
785
- })
786
- },
787
- {
788
- id: "sine-tall",
789
- label: "Tall wave",
790
- sub: "Curves",
791
- comp: C({
792
- text: "rolling",
793
- font: "rot",
794
- fontSize: 100,
795
- vf: {
796
- wdth: 90,
797
- wght: 500
798
- },
799
- path: {
800
- type: "sine",
801
- amp: .6,
802
- freq: 2
803
- }
804
- })
805
- },
806
- {
807
- id: "spiral-march",
808
- label: "Spiral march",
809
- sub: "Curves",
810
- comp: C({
811
- text: "into the spiral",
812
- font: "rot",
813
- fontSize: 72,
814
- vf: {
815
- wdth: 100,
816
- wght: 500
817
- },
818
- path: {
819
- type: "spiral",
820
- turns: 5
821
- },
822
- motion: {
823
- mode: "march",
824
- cycles: 1
825
- }
826
- })
827
- },
828
- {
829
- id: "circle-orbit",
830
- label: "Circle",
831
- sub: "Closed",
832
- comp: C({
833
- text: "KOLKRABBI",
834
- font: "malromur",
835
- fontSize: 80,
836
- vf: { wght: 500 },
837
- path: {
838
- type: "circle",
839
- radius: .72
840
- },
841
- motion: {
842
- mode: "orbit",
843
- cycles: 1
844
- }
845
- })
846
- },
847
- {
848
- id: "circle-big",
849
- label: "Big circle",
850
- sub: "Closed",
851
- comp: C({
852
- text: "AROUND WE GO",
853
- fontSize: 76,
854
- vf: { wght: 600 },
855
- path: {
856
- type: "circle",
857
- radius: .85
858
- },
859
- motion: { mode: "orbit" }
860
- })
861
- },
862
- {
863
- id: "circle-mono",
864
- label: "Mono circle",
865
- sub: "Closed",
866
- comp: C({
867
- text: "LOOP/LOOP/",
868
- font: "rot",
869
- fontSize: 72,
870
- vf: {
871
- wdth: 90,
872
- wght: 500
873
- },
874
- fill: "#f6c453",
875
- path: {
876
- type: "circle",
877
- radius: .78
878
- },
879
- motion: { mode: "orbit" }
880
- })
881
- },
882
- {
883
- id: "ellipse-wide",
884
- label: "Wide ellipse",
885
- sub: "Closed",
886
- comp: C({
887
- text: "ELLIPTICAL",
888
- font: "malromur",
889
- fontSize: 74,
890
- vf: { wght: 500 },
891
- path: {
892
- type: "ellipse",
893
- radius: 1
894
- },
895
- motion: { mode: "orbit" }
896
- })
897
- },
898
- {
899
- id: "zigzag-fine",
900
- label: "Fine zigzag",
901
- sub: "Angular",
902
- comp: C({
903
- text: "sawtooth",
904
- font: "rot",
905
- fontSize: 80,
906
- vf: {
907
- wdth: 90,
908
- wght: 600
909
- },
910
- path: {
911
- type: "zigzag",
912
- amp: .35,
913
- freq: 5
914
- }
915
- })
916
- },
917
- {
918
- id: "custom-march",
919
- label: "Custom march",
920
- sub: "Custom",
921
- comp: C({
922
- text: "follow me",
923
- font: "rot",
924
- fontSize: 90,
925
- vf: {
926
- wdth: 90,
927
- wght: 500
928
- },
929
- path: { type: "custom" },
930
- motion: { mode: "march" }
931
- })
932
- },
933
- {
934
- id: "ordspor-pulse",
935
- label: "Ordspor",
936
- sub: "Weight",
937
- comp: C({
938
- text: "Ordspor",
939
- font: "rot",
940
- fontSize: 132,
941
- vf: {
942
- wdth: 90,
943
- wght: 300
944
- },
945
- motion: {
946
- mode: "vfwave",
947
- axis: "wght",
948
- cycles: 1,
949
- phase: .7
950
- }
951
- })
952
- },
953
- {
954
- id: "rot-weight",
955
- label: "Rot weight",
956
- sub: "Weight",
957
- comp: C({
958
- text: "ROT",
959
- font: "rot",
960
- fontSize: 200,
961
- vf: {
962
- wdth: 120,
963
- wght: 100
964
- },
965
- motion: {
966
- mode: "vfwave",
967
- axis: "wght",
968
- cycles: 1,
969
- phase: .5
970
- }
971
- })
972
- },
973
- {
974
- id: "weight-slow",
975
- label: "Slow weight",
976
- sub: "Weight",
977
- comp: C({
978
- text: "breathe",
979
- fontSize: 150,
980
- vf: { wght: 300 },
981
- motion: {
982
- mode: "vfwave",
983
- axis: "wght",
984
- cycles: 1,
985
- phase: .3
986
- }
987
- })
988
- },
989
- {
990
- id: "weight-fast",
991
- label: "Fast weight",
992
- sub: "Weight",
993
- comp: C({
994
- text: "PULSE",
995
- fontSize: 160,
996
- vf: { wght: 300 },
997
- motion: {
998
- mode: "vfwave",
999
- axis: "wght",
1000
- cycles: 3,
1001
- phase: .6
1002
- }
1003
- })
1004
- },
1005
- {
1006
- id: "malromur-heavy",
1007
- label: "Heavy swing",
1008
- sub: "Weight",
1009
- comp: w("#f4f1ea", {
1010
- text: "Malromur",
1011
- font: "malromur",
1012
- fontSize: 130,
1013
- vf: { wght: 300 },
1014
- fill: "#0b0b0e",
1015
- motion: {
1016
- mode: "vfwave",
1017
- axis: "wght",
1018
- cycles: 1,
1019
- phase: .5
1020
- }
1021
- })
1022
- },
1023
- {
1024
- id: "ordspor-wave2",
1025
- label: "Ordspor ×2",
1026
- sub: "Weight",
1027
- comp: C({
1028
- text: "twice",
1029
- font: "rot",
1030
- fontSize: 150,
1031
- vf: {
1032
- wdth: 90,
1033
- wght: 300
1034
- },
1035
- motion: {
1036
- mode: "vfwave",
1037
- axis: "wght",
1038
- cycles: 2,
1039
- phase: .5
1040
- }
1041
- })
1042
- },
1043
- {
1044
- id: "rot-weight2",
1045
- label: "Rot weight ×2",
1046
- sub: "Weight",
1047
- comp: C({
1048
- text: "ROT",
1049
- font: "rot",
1050
- fontSize: 200,
1051
- vf: {
1052
- wdth: 120,
1053
- wght: 100
1054
- },
1055
- motion: {
1056
- mode: "vfwave",
1057
- axis: "wght",
1058
- cycles: 2,
1059
- phase: .4
1060
- }
1061
- })
1062
- },
1063
- {
1064
- id: "malromur-bigwave",
1065
- label: "Big wave",
1066
- sub: "Weight",
1067
- comp: C({
1068
- text: "WEIGHT",
1069
- font: "malromur",
1070
- fontSize: 150,
1071
- vf: { wght: 300 },
1072
- fill: "#f6c453",
1073
- motion: {
1074
- mode: "vfwave",
1075
- axis: "wght",
1076
- cycles: 2,
1077
- phase: .7
1078
- }
1079
- })
1080
- },
1081
- {
1082
- id: "ordspor-accent",
1083
- label: "Ordspor accent",
1084
- sub: "Weight",
1085
- comp: C({
1086
- text: "Ordspor",
1087
- font: "rot",
1088
- fontSize: 140,
1089
- vf: {
1090
- wdth: 90,
1091
- wght: 300
1092
- },
1093
- fill: "#8f5ad0",
1094
- motion: {
1095
- mode: "vfwave",
1096
- axis: "wght",
1097
- cycles: 1,
1098
- phase: .6
1099
- }
1100
- })
1101
- },
1102
- {
1103
- id: "rot-dual",
1104
- label: "Variable",
1105
- sub: "Width",
1106
- comp: C({
1107
- text: "variable",
1108
- font: "rot",
1109
- fontSize: 124,
1110
- vf: {
1111
- wdth: 100,
1112
- wght: 400
1113
- },
1114
- motion: {
1115
- mode: "vfwave",
1116
- axis: "wdth",
1117
- cycles: 2,
1118
- phase: .4
1119
- }
1120
- })
1121
- },
1122
- {
1123
- id: "rot-width-fast",
1124
- label: "Width ×2",
1125
- sub: "Width",
1126
- comp: C({
1127
- text: "STRETCH",
1128
- font: "rot",
1129
- fontSize: 130,
1130
- vf: {
1131
- wdth: 64,
1132
- wght: 600
1133
- },
1134
- motion: {
1135
- mode: "vfwave",
1136
- axis: "wdth",
1137
- cycles: 2,
1138
- phase: .5
1139
- }
1140
- })
1141
- },
1142
- {
1143
- id: "rot-width-slow",
1144
- label: "Width slow",
1145
- sub: "Width",
1146
- comp: C({
1147
- text: "expand",
1148
- font: "rot",
1149
- fontSize: 130,
1150
- vf: {
1151
- wdth: 100,
1152
- wght: 500
1153
- },
1154
- motion: {
1155
- mode: "vfwave",
1156
- axis: "wdth",
1157
- cycles: 1,
1158
- phase: .3
1159
- }
1160
- })
1161
- },
1162
- {
1163
- id: "morph-mtl",
1164
- label: "Made to last",
1165
- sub: "Morph",
1166
- comp: C({
1167
- text: "Made to last",
1168
- font: "rot",
1169
- fontSize: 150,
1170
- vf: {
1171
- wdth: 64,
1172
- wght: 100
1173
- },
1174
- morph: {
1175
- on: !0,
1176
- mode: "morph",
1177
- curve: "linear",
1178
- blend: .5,
1179
- vf2: {
1180
- wdth: 172,
1181
- wght: 900
1182
- }
1183
- }
1184
- })
1185
- },
1186
- {
1187
- id: "morph-wave",
1188
- label: "Morph wave",
1189
- sub: "Morph",
1190
- comp: C({
1191
- text: "MORPH",
1192
- font: "rot",
1193
- fontSize: 200,
1194
- vf: {
1195
- wdth: 64,
1196
- wght: 200
1197
- },
1198
- morph: {
1199
- on: !0,
1200
- mode: "morph",
1201
- curve: "sine",
1202
- blend: .5,
1203
- vf2: {
1204
- wdth: 172,
1205
- wght: 900
1206
- }
1207
- }
1208
- })
1209
- },
1210
- {
1211
- id: "morph-ease",
1212
- label: "Heavy → light",
1213
- sub: "Morph",
1214
- comp: C({
1215
- text: "gradient",
1216
- font: "rot",
1217
- fontSize: 150,
1218
- vf: {
1219
- wdth: 120,
1220
- wght: 900
1221
- },
1222
- morph: {
1223
- on: !0,
1224
- mode: "morph",
1225
- curve: "ease",
1226
- blend: .5,
1227
- vf2: {
1228
- wdth: 120,
1229
- wght: 100
1230
- }
1231
- }
1232
- })
1233
- },
1234
- {
1235
- id: "morph-random",
1236
- label: "Ransom note",
1237
- sub: "Morph",
1238
- comp: C({
1239
- text: "CHAOS",
1240
- font: "rot",
1241
- fontSize: 170,
1242
- vf: {
1243
- wdth: 100,
1244
- wght: 500
1245
- },
1246
- morph: {
1247
- on: !0,
1248
- mode: "random",
1249
- blend: .37
1250
- }
1251
- })
1252
- },
1253
- {
1254
- id: "morph-fade",
1255
- label: "Fade A↔B",
1256
- sub: "Morph",
1257
- comp: C({
1258
- text: "between",
1259
- font: "gullhamrar",
1260
- fontSize: 150,
1261
- vf: { wght: 300 },
1262
- morph: {
1263
- on: !0,
1264
- mode: "fade",
1265
- blend: .5,
1266
- vf2: { wght: 900 }
1267
- }
1268
- })
1269
- },
1270
- {
1271
- id: "morph-cross",
1272
- label: "Cross-face",
1273
- sub: "Morph",
1274
- comp: C({
1275
- text: "hybrid",
1276
- font: "rot",
1277
- fontSize: 150,
1278
- vf: {
1279
- wdth: 100,
1280
- wght: 600
1281
- },
1282
- morph: {
1283
- on: !0,
1284
- mode: "morph",
1285
- blend: .5,
1286
- face2: "gullhamrar"
1287
- }
1288
- })
1289
- },
1290
- {
1291
- id: "arc-weight",
1292
- label: "Morph on arc",
1293
- sub: "On path",
1294
- comp: C({
1295
- text: "morph",
1296
- fontSize: 120,
1297
- path: {
1298
- type: "arc",
1299
- amp: .3
1300
- },
1301
- motion: {
1302
- mode: "vfwave",
1303
- axis: "wght",
1304
- cycles: 1,
1305
- phase: .6
1306
- }
1307
- })
1308
- },
1309
- {
1310
- id: "sine-weight",
1311
- label: "Wave + weight",
1312
- sub: "On path",
1313
- comp: C({
1314
- text: "modulated",
1315
- fontSize: 92,
1316
- vf: { wght: 400 },
1317
- path: {
1318
- type: "sine",
1319
- amp: .3,
1320
- freq: 2
1321
- },
1322
- motion: {
1323
- mode: "vfwave",
1324
- axis: "wght",
1325
- cycles: 1,
1326
- phase: .5
1327
- }
1328
- })
1329
- },
1330
- {
1331
- id: "circle-weight",
1332
- label: "Ring + weight",
1333
- sub: "On path",
1334
- comp: C({
1335
- text: "ROTATING",
1336
- font: "malromur",
1337
- fontSize: 78,
1338
- vf: { wght: 300 },
1339
- path: {
1340
- type: "circle",
1341
- radius: .74
1342
- },
1343
- motion: {
1344
- mode: "vfwave",
1345
- axis: "wght",
1346
- cycles: 2,
1347
- phase: .6
1348
- }
1349
- })
1350
- },
1351
- {
1352
- id: "arc-width",
1353
- label: "Arc + width",
1354
- sub: "On path",
1355
- comp: C({
1356
- text: "arcwidth",
1357
- font: "rot",
1358
- fontSize: 96,
1359
- vf: {
1360
- wdth: 80,
1361
- wght: 600
1362
- },
1363
- path: {
1364
- type: "arc",
1365
- amp: .4
1366
- },
1367
- motion: {
1368
- mode: "vfwave",
1369
- axis: "wdth",
1370
- cycles: 1,
1371
- phase: .5
1372
- }
1373
- })
1374
- },
1375
- {
1376
- id: "pop",
1377
- label: "Pop",
1378
- sub: "Reveal",
1379
- comp: C({
1380
- text: "POP POP",
1381
- fontSize: 130,
1382
- vf: { wght: 800 },
1383
- motion: {
1384
- mode: "cascade",
1385
- cycles: 2,
1386
- phase: .8
1387
- }
1388
- })
1389
- },
1390
- {
1391
- id: "arc-cascade",
1392
- label: "Curve cascade",
1393
- sub: "Reveal",
1394
- comp: C({
1395
- text: "on a curve",
1396
- font: "rot",
1397
- fontSize: 100,
1398
- vf: {
1399
- wdth: 90,
1400
- wght: 500
1401
- },
1402
- path: {
1403
- type: "arc",
1404
- amp: .4
1405
- },
1406
- motion: {
1407
- mode: "cascade",
1408
- cycles: 1,
1409
- phase: .5
1410
- }
1411
- })
1412
- },
1413
- {
1414
- id: "cascade-slow",
1415
- label: "Slow cascade",
1416
- sub: "Reveal",
1417
- comp: C({
1418
- text: "unfold",
1419
- fontSize: 130,
1420
- vf: { wght: 600 },
1421
- motion: {
1422
- mode: "cascade",
1423
- cycles: 1,
1424
- phase: .4
1425
- }
1426
- })
1427
- },
1428
- {
1429
- id: "cascade-fast",
1430
- label: "Fast cascade",
1431
- sub: "Reveal",
1432
- comp: C({
1433
- text: "flicker",
1434
- fontSize: 130,
1435
- vf: { wght: 700 },
1436
- motion: {
1437
- mode: "cascade",
1438
- cycles: 2,
1439
- phase: .7
1440
- }
1441
- })
1442
- },
1443
- {
1444
- id: "typewriter",
1445
- label: "Typewriter",
1446
- sub: "Reveal",
1447
- comp: C({
1448
- text: "type_type_",
1449
- font: "rot",
1450
- fontSize: 100,
1451
- vf: {
1452
- wdth: 90,
1453
- wght: 500
1454
- },
1455
- fill: "#7fd1ff",
1456
- motion: {
1457
- mode: "cascade",
1458
- cycles: 1,
1459
- phase: 1
1460
- }
1461
- })
1462
- },
1463
- {
1464
- id: "spiral-cascade",
1465
- label: "Spiral reveal",
1466
- sub: "Reveal",
1467
- comp: C({
1468
- text: "spiral down",
1469
- fontSize: 74,
1470
- vf: { wght: 600 },
1471
- path: {
1472
- type: "spiral",
1473
- turns: 3
1474
- },
1475
- motion: {
1476
- mode: "cascade",
1477
- cycles: 1,
1478
- phase: .5
1479
- }
1480
- })
1481
- },
1482
- {
1483
- id: "circle-cascade",
1484
- label: "Ring reveal",
1485
- sub: "Reveal",
1486
- comp: C({
1487
- text: "AROUND",
1488
- font: "malromur",
1489
- fontSize: 86,
1490
- vf: { wght: 600 },
1491
- path: {
1492
- type: "circle",
1493
- radius: .74
1494
- },
1495
- motion: {
1496
- mode: "cascade",
1497
- cycles: 1,
1498
- phase: .6
1499
- }
1500
- })
1501
- },
1502
- {
1503
- id: "pop-mono",
1504
- label: "Mono pop",
1505
- sub: "Reveal",
1506
- comp: C({
1507
- text: "POP.POP.",
1508
- font: "rot",
1509
- fontSize: 110,
1510
- vf: {
1511
- wdth: 90,
1512
- wght: 500
1513
- },
1514
- fill: "#f6c453",
1515
- motion: {
1516
- mode: "cascade",
1517
- cycles: 2,
1518
- phase: .8
1519
- }
1520
- })
1521
- },
1522
- {
1523
- id: "glyph-wave",
1524
- label: "Ripple",
1525
- sub: "Wave",
1526
- comp: C({
1527
- text: "ripple",
1528
- font: "malromur",
1529
- fontSize: 140,
1530
- vf: { wght: 600 },
1531
- motion: {
1532
- mode: "glyphwave",
1533
- cycles: 1,
1534
- phase: .6,
1535
- amp: .4
1536
- }
1537
- })
1538
- },
1539
- {
1540
- id: "sine-ripple",
1541
- label: "Sine ripple",
1542
- sub: "Wave",
1543
- comp: C({
1544
- text: "wavewave",
1545
- font: "rot",
1546
- fontSize: 108,
1547
- vf: {
1548
- wdth: 110,
1549
- wght: 600
1550
- },
1551
- path: {
1552
- type: "sine",
1553
- amp: .3,
1554
- freq: 2
1555
- },
1556
- motion: {
1557
- mode: "glyphwave",
1558
- amp: .3
1559
- }
1560
- })
1561
- },
1562
- {
1563
- id: "glyph-big",
1564
- label: "Big ripple",
1565
- sub: "Wave",
1566
- comp: C({
1567
- text: "WAVES",
1568
- fontSize: 150,
1569
- vf: { wght: 700 },
1570
- motion: {
1571
- mode: "glyphwave",
1572
- cycles: 1,
1573
- phase: .6,
1574
- amp: .6
1575
- }
1576
- })
1577
- },
1578
- {
1579
- id: "glyph-fast",
1580
- label: "Fast ripple",
1581
- sub: "Wave",
1582
- comp: C({
1583
- text: "shiver",
1584
- font: "malromur",
1585
- fontSize: 140,
1586
- vf: { wght: 600 },
1587
- motion: {
1588
- mode: "glyphwave",
1589
- cycles: 2,
1590
- phase: .5,
1591
- amp: .35
1592
- }
1593
- })
1594
- },
1595
- {
1596
- id: "arc-glyphwave",
1597
- label: "Arc ripple",
1598
- sub: "Wave",
1599
- comp: C({
1600
- text: "on a curve",
1601
- font: "rot",
1602
- fontSize: 96,
1603
- vf: {
1604
- wdth: 90,
1605
- wght: 500
1606
- },
1607
- path: {
1608
- type: "arc",
1609
- amp: .4
1610
- },
1611
- motion: {
1612
- mode: "glyphwave",
1613
- amp: .3
1614
- }
1615
- })
1616
- },
1617
- {
1618
- id: "rot-flag-fast",
1619
- label: "Rot flag",
1620
- sub: "Wave",
1621
- comp: C({
1622
- text: "flutter",
1623
- font: "rot",
1624
- fontSize: 150,
1625
- vf: {
1626
- wdth: 120,
1627
- wght: 600
1628
- },
1629
- motion: {
1630
- mode: "glyphwave",
1631
- cycles: 2,
1632
- phase: .5,
1633
- amp: .5
1634
- }
1635
- })
1636
- },
1637
- {
1638
- id: "sine-ripple2",
1639
- label: "Sine flutter",
1640
- sub: "Wave",
1641
- comp: C({
1642
- text: "flowflow",
1643
- font: "rot",
1644
- fontSize: 100,
1645
- vf: {
1646
- wdth: 90,
1647
- wght: 500
1648
- },
1649
- path: {
1650
- type: "sine",
1651
- amp: .3,
1652
- freq: 2
1653
- },
1654
- motion: {
1655
- mode: "glyphwave",
1656
- cycles: 2,
1657
- amp: .3
1658
- }
1659
- })
1660
- },
1661
- {
1662
- id: "sweep-x",
1663
- label: "Sweep X",
1664
- sub: "Sweep",
1665
- comp: C({
1666
- text: "SWEEP",
1667
- fontSize: 150,
1668
- vf: { wght: 700 },
1669
- motion: {
1670
- mode: "sweep",
1671
- field: "x",
1672
- cycles: 1,
1673
- amp: .3
1674
- }
1675
- })
1676
- },
1677
- {
1678
- id: "sweep-y",
1679
- label: "Sweep Y",
1680
- sub: "Sweep",
1681
- comp: C({
1682
- text: "descend",
1683
- font: "rot",
1684
- fontSize: 130,
1685
- vf: {
1686
- wdth: 90,
1687
- wght: 500
1688
- },
1689
- motion: {
1690
- mode: "sweep",
1691
- field: "y",
1692
- cycles: 1,
1693
- amp: .35
1694
- }
1695
- })
1696
- },
1697
- {
1698
- id: "sweep-radial",
1699
- label: "Radial pulse",
1700
- sub: "Sweep",
1701
- comp: C({
1702
- text: "PULSE",
1703
- font: "malromur",
1704
- fontSize: 140,
1705
- vf: { wght: 600 },
1706
- motion: {
1707
- mode: "sweep",
1708
- field: "radial",
1709
- cycles: 1,
1710
- amp: .4
1711
- }
1712
- })
1713
- },
1714
- {
1715
- id: "sweep-weight",
1716
- label: "Sweep weight",
1717
- sub: "Sweep",
1718
- comp: C({
1719
- text: "WEIGHT",
1720
- fontSize: 150,
1721
- vf: { wght: 300 },
1722
- motion: {
1723
- mode: "sweepWeight",
1724
- field: "x",
1725
- cycles: 1,
1726
- amp: .4
1727
- }
1728
- })
1729
- },
1730
- {
1731
- id: "sweep-shift",
1732
- label: "Sweep shift",
1733
- sub: "Sweep",
1734
- comp: C({
1735
- text: "shiver",
1736
- font: "rot",
1737
- fontSize: 130,
1738
- vf: {
1739
- wdth: 110,
1740
- wght: 600
1741
- },
1742
- motion: {
1743
- mode: "sweepShift",
1744
- field: "wave",
1745
- cycles: 1,
1746
- amp: .3
1747
- }
1748
- })
1749
- },
1750
- {
1751
- id: "orbit-spin",
1752
- label: "Orbit",
1753
- sub: "Orbit",
1754
- comp: C({
1755
- text: "ORBIT",
1756
- font: "malromur",
1757
- fontSize: 88,
1758
- vf: { wght: 600 },
1759
- path: {
1760
- type: "circle",
1761
- radius: .7
1762
- },
1763
- motion: {
1764
- mode: "orbit",
1765
- cycles: 1
1766
- }
1767
- })
1768
- },
1769
- {
1770
- id: "orbit-fast",
1771
- label: "Fast orbit",
1772
- sub: "Orbit",
1773
- comp: C({
1774
- text: "spinning",
1775
- fontSize: 84,
1776
- vf: { wght: 600 },
1777
- path: {
1778
- type: "circle",
1779
- radius: .72
1780
- },
1781
- motion: {
1782
- mode: "orbit",
1783
- cycles: 2
1784
- }
1785
- })
1786
- },
1787
- {
1788
- id: "ellipse-orbit",
1789
- label: "Ellipse orbit",
1790
- sub: "Orbit",
1791
- comp: C({
1792
- text: "ORBITAL",
1793
- font: "rot",
1794
- fontSize: 78,
1795
- vf: {
1796
- wdth: 110,
1797
- wght: 600
1798
- },
1799
- path: {
1800
- type: "ellipse",
1801
- radius: .95
1802
- },
1803
- motion: {
1804
- mode: "orbit",
1805
- cycles: 1
1806
- }
1807
- })
1808
- },
1809
- {
1810
- id: "array-pulse",
1811
- label: "Grid pulse",
1812
- sub: "Array",
1813
- comp: C({
1814
- text: "NODE",
1815
- font: "rot",
1816
- fontSize: 44,
1817
- vf: {
1818
- wdth: 90,
1819
- wght: 500
1820
- },
1821
- fill: "#7fd1ff",
1822
- path: {
1823
- type: "array",
1824
- rows: 4,
1825
- cols: 5
1826
- },
1827
- motion: {
1828
- mode: "cascade",
1829
- cycles: 1,
1830
- phase: .5
1831
- }
1832
- })
1833
- },
1834
- {
1835
- id: "array-wave",
1836
- label: "Grid wave",
1837
- sub: "Array",
1838
- comp: C({
1839
- text: "echo",
1840
- font: "rot",
1841
- fontSize: 52,
1842
- vf: {
1843
- wdth: 90,
1844
- wght: 500
1845
- },
1846
- path: {
1847
- type: "array",
1848
- rows: 3,
1849
- cols: 3
1850
- },
1851
- motion: {
1852
- mode: "glyphwave",
1853
- cycles: 1,
1854
- phase: .7,
1855
- amp: .4
1856
- }
1857
- })
1858
- },
1859
- {
1860
- id: "array-weight",
1861
- label: "Grid weight",
1862
- sub: "Array",
1863
- comp: C({
1864
- text: "OK",
1865
- font: "rot",
1866
- fontSize: 88,
1867
- vf: {
1868
- wdth: 100,
1869
- wght: 200
1870
- },
1871
- path: {
1872
- type: "array",
1873
- rows: 2,
1874
- cols: 3
1875
- },
1876
- motion: {
1877
- mode: "vfwave",
1878
- axis: "wght",
1879
- cycles: 1,
1880
- phase: .6
1881
- }
1882
- })
1883
- },
1884
- {
1885
- id: "stacked",
1886
- label: "Stacked",
1887
- sub: "Composite",
1888
- comp: C({
1889
- id: "a",
1890
- text: "KINETIC",
1891
- font: "gullhamrar",
1892
- fontSize: 130,
1893
- vf: { wght: 700 },
1894
- fill: "#e8e4dc",
1895
- path: {
1896
- type: "line",
1897
- offset: -.16
1898
- }
1899
- }, {
1900
- id: "b",
1901
- text: "typography",
1902
- font: "rot",
1903
- fontSize: 90,
1904
- vf: {
1905
- wdth: 90,
1906
- wght: 400
1907
- },
1908
- fill: "#f6c453",
1909
- path: {
1910
- type: "line",
1911
- offset: .16
1912
- },
1913
- motion: {
1914
- mode: "vfwave",
1915
- axis: "wght",
1916
- cycles: 1,
1917
- phase: .5
1918
- }
1919
- })
1920
- },
1921
- {
1922
- id: "grid-and-ring",
1923
- label: "Grid + ring",
1924
- sub: "Composite",
1925
- comp: w("#0a0b14", {
1926
- id: "a",
1927
- text: "echo",
1928
- font: "rot",
1929
- fontSize: 40,
1930
- vf: {
1931
- wdth: 90,
1932
- wght: 500
1933
- },
1934
- fill: "#3a4a6a",
1935
- path: {
1936
- type: "array",
1937
- rows: 4,
1938
- cols: 5
1939
- }
1940
- }, {
1941
- id: "b",
1942
- text: "SIGNAL · SIGNAL · ",
1943
- font: "rot",
1944
- fontSize: 60,
1945
- vf: {
1946
- wdth: 110,
1947
- wght: 600
1948
- },
1949
- fill: "#9ec1ff",
1950
- path: {
1951
- type: "circle",
1952
- radius: .7
1953
- },
1954
- motion: {
1955
- mode: "orbit",
1956
- cycles: 1
1957
- }
1958
- })
1959
- }
1960
- ], E = (e) => T.find((t) => t.id === e) || T[0], D = [
1961
- "Radial",
1962
- "Rings",
1963
- "Path"
1964
- ], O = [{
1965
- label: "Type",
1966
- subs: D
1967
- }, {
1968
- label: "Kinetic",
1969
- subs: [...new Set(T.map((e) => e.sub))].filter((e) => !D.includes(e))
1970
- }], k = (e) => structuredClone(e.comp), A = {
1971
- background: "Background",
1972
- pattern: "Pattern",
1973
- photo: "Photo",
1974
- shape: "Shape",
1975
- text: "Text",
1976
- group: "Group",
1977
- bool: "Boolean",
1978
- path: "Path",
1979
- loop: "Loop",
1980
- kinetic: "Kinetic type",
1981
- misc: "Misc"
1982
- }, j = {
1983
- unite: "Unite",
1984
- subtract: "Subtract",
1985
- intersect: "Intersect",
1986
- exclude: "Exclude"
1987
- }, M = {
1988
- logo: "Logo",
1989
- rect: "Rectangle",
1990
- ellipse: "Ellipse",
1991
- triangle: "Triangle",
1992
- line: "Line",
1993
- polygon: "Polygon",
1994
- star: "Star",
1995
- flatten: "Flatten"
1996
- };
1997
- function N(e) {
1998
- return e.isMask ? `${N({
1999
- ...e,
2000
- isMask: !1
2001
- })} (mask)` : e.name ? e.name : e.type === "text" ? e.text || A.text : e.type === "shape" ? M[e.kind ?? "logo"] ?? A.shape : e.type === "bool" ? j[e.op] ?? A.bool : e.type === "loop" || e.type === "misc" ? e.presetLabel || A[e.type] : e.type === "kinetic" ? e.presetLabel || A.kinetic : A[e.type] ?? e.type;
2002
- }
2003
- //#endregion
2004
- //#region src/editor/morph/buildMorph.js
2005
- var P = [
2006
- {
2007
- value: "loop",
2008
- label: "Loop"
2009
- },
2010
- {
2011
- value: "pingpong",
2012
- label: "Ping-pong"
2013
- },
2014
- {
2015
- value: "once",
2016
- label: "Once"
2017
- }
2018
- ], F = t.filter((e) => e.value !== "hold"), ee = new Set([
2019
- "range",
2020
- "int",
2021
- "color"
2022
- ]), te = [
2023
- "loopGroup",
2024
- "presetId",
2025
- "presetLabel"
2026
- ], ne = (e, t) => e === t || JSON.stringify(e) === JSON.stringify(t);
2027
- function I(e, t, n) {
2028
- let r = t === "loop" ? [...e, e[0]] : t === "pingpong" ? [...e, ...e.slice(0, -1).reverse()] : e, i = r.length - 1;
2029
- return r.map((e, t) => ({
2030
- t: i ? t / i : 0,
2031
- v: e,
2032
- easing: n
2033
- }));
2034
- }
2035
- function L(e, t) {
2036
- return (Array.isArray(e?.layers) ? e.layers : []).find((e) => e && e.type === "loop" && e.loopId === t) ?? null;
2037
- }
2038
- function R({ snapshots: e, schema: t, curve: n = "in-out", cycle: r = "loop", stepSeeds: i = !1 }) {
2039
- if (!Array.isArray(e) || e.length < 2) throw Error("buildMorph: two or more snapshots");
2040
- if (!P.some((e) => e.value === r)) throw Error(`buildMorph: unknown cycle ${r}`);
2041
- let a = e[0], o = {};
2042
- for (let e of te) a[e] !== void 0 && (o[e] = a[e]);
2043
- let s = [], c = [], l = [];
2044
- for (let a of t) {
2045
- let t = e.map((e) => e[a.key] === void 0 ? a.default : e[a.key]);
2046
- if (t.every((e) => ne(e, t[0]))) {
2047
- t[0] !== void 0 && (o[a.key] = t[0]);
2048
- continue;
2049
- }
2050
- if (a.key === "seed" && !i) {
2051
- o[a.key] = t[0], l.push(a);
2052
- continue;
2053
- }
2054
- let u = a.key === "seed" || !ee.has(a.type);
2055
- o[a.key] = {
2056
- bind: "track",
2057
- keys: I(t, r, u ? "hold" : n)
2058
- }, (u ? c : s).push(a);
2059
- }
2060
- return {
2061
- patch: o,
2062
- tweened: s,
2063
- stepped: c,
2064
- held: l
2065
- };
2066
- }
2067
- //#endregion
2068
- //#region src/editor/morph/morphStore.js
2069
- var z = {
2070
- active: !1,
2071
- mode: "shape",
2072
- resolution: 0,
2073
- editRequest: null,
2074
- loopId: null,
2075
- steps: [],
2076
- curve: "in-out",
2077
- cycle: "loop",
2078
- syncLoop: !1,
2079
- seconds: 4,
2080
- editing: null,
2081
- fileId: null,
2082
- fileName: null,
2083
- picker: null,
2084
- presetId: null
2085
- }, B = { ...z }, V = /* @__PURE__ */ new Set(), H = () => V.forEach((e) => e()), U = (e) => (V.add(e), () => V.delete(e)), W = () => B, G = () => a(U, W, W);
2086
- function K(e) {
2087
- B = {
2088
- ...B,
2089
- ...e
2090
- }, H();
2091
- }
2092
- function q(e = {}) {
2093
- B = {
2094
- ...z,
2095
- ...e
2096
- }, H();
2097
- }
2098
- function J(e) {
2099
- B = {
2100
- ...B,
2101
- active: !0,
2102
- loopId: B.loopId ?? e.loopId,
2103
- steps: [...B.steps, e]
2104
- }, H();
2105
- }
2106
- function Y(e, t) {
2107
- let n = B.steps[e];
2108
- if (!n) return;
2109
- let r = B.steps.slice();
2110
- r[e] = {
2111
- ...n,
2112
- params: { ...t }
2113
- }, B = {
2114
- ...B,
2115
- steps: r
2116
- }, H();
2117
- }
2118
- function X(e) {
2119
- let t = B.steps.filter((t, n) => n !== e);
2120
- B = {
2121
- ...B,
2122
- steps: t,
2123
- loopId: t.length ? B.loopId : null,
2124
- editing: B.editing === e ? null : B.editing
2125
- }, H();
2126
- }
2127
- function re(e, t) {
2128
- let n = B.steps.length;
2129
- if (e === t || e < 0 || e >= n || t < 0 || t >= n) return;
2130
- let r = B.steps.slice(), [i] = r.splice(e, 1);
2131
- r.splice(t, 0, i);
2132
- let a = B.editing, o = a == null ? a : a === e ? t : e < a && a <= t ? a - 1 : t <= a && a < e ? a + 1 : a;
2133
- B = {
2134
- ...B,
2135
- steps: r,
2136
- editing: o
2137
- }, H();
2138
- }
2139
- function ie(e, t) {
2140
- let n = {};
2141
- for (let r of t) n[r.key] = e?.[r.key] === void 0 ? r.default : e[r.key];
2142
- return n;
2143
- }
2144
- var ae = (e, t) => e.source?.label || `Step ${t + 1}`, Z = "kol-editor-timeline-pinned", Q = !1;
2145
- try {
2146
- Q = localStorage.getItem(Z) === "1";
2147
- } catch {}
2148
- var $ = /* @__PURE__ */ new Set();
2149
- function oe() {
2150
- Q = !Q;
2151
- try {
2152
- localStorage.setItem(Z, Q ? "1" : "0");
2153
- } catch {}
2154
- $.forEach((e) => e(Q));
2155
- }
2156
- function se() {
2157
- let [e, t] = i(Q);
2158
- return r(() => {
2159
- let e = (e) => t(e);
2160
- return $.add(e), () => $.delete(e);
2161
- }, []), e;
2162
- }
2163
- //#endregion
2164
- export { p as A, b as C, h as D, l as E, d as O, E as S, k as T, L as _, ie as a, T as b, q as c, Y as d, G as f, I as g, R as h, W as i, f as k, K as l, P as m, se as n, X as o, F as p, J as r, re as s, oe as t, ae as u, j as v, y as w, O as x, N as y };