@kolkrabbi/design-editor 0.46.0 → 0.47.0
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.
- package/dist/{BindDot-B0VcuOag.js → BindDot-B85UV79g.js} +9 -8
- package/dist/{BufferResource-BfLgK37S.js → BufferResource-Di5teicy.js} +2 -2
- package/dist/{CanvasPool-YNSF8hsR.js → CanvasPool-JdLj49b-.js} +1 -1
- package/dist/CanvasRenderer-fXDObOOi.js +2 -0
- package/dist/{FederatedEventTarget-BJgROaRQ.js → FederatedEventTarget-CH0bzxx1.js} +1 -1
- package/dist/{FilterSystem-BUrPNXx-.js → FilterSystem-C-ZoyuTO.js} +3 -3
- package/dist/{Geometry-C5s5KpWq.js → Geometry-D4tiuMOr.js} +1 -1
- package/dist/KolboxView-n6kEPJtV.js +21615 -0
- package/dist/{RenderTargetSystem-oFwWv5IW.js → RenderTargetSystem-Bom_vhlS.js} +1 -1
- package/dist/{Timeline-Ck1rBV8S.js → Timeline-EbecYeGh.js} +49 -47
- package/dist/TreePicker-2RUSyGl4.js +209 -0
- package/dist/WebGLRenderer-4hvrGmfW.js +2 -0
- package/dist/WebGPURenderer-BjzMV7Pg.js +2 -0
- package/dist/__vite-browser-external-y2xWjzgx.js +780 -0
- package/dist/browserAll-BFE0MRLW.js +6 -0
- package/dist/{canvasUtils-BoNfkAod.js → canvasUtils-DUNsu3ct.js} +1 -1
- package/dist/{core-BBb9Tk4Q.js → core-9UlJPBwX.js} +6272 -6239
- package/dist/core.js +6 -5
- package/dist/design-editor.css +2 -1
- package/dist/design-editor.js +7 -3644
- package/dist/{effectCategories-Ccye-8LP.js → effectCategories-CCpYmxS0.js} +8965 -4984
- package/dist/effects-DspYFJAM.js +447 -0
- package/dist/effects.js +1 -1
- package/dist/{generators-BdVXv0jY.js → generators-DY4_ymWh.js} +2386 -2416
- package/dist/generators.js +1 -1
- package/dist/{getTextureBatchBindGroup-CNWhZRbV.js → getTextureBatchBindGroup-ZMqkwiZS.js} +1 -1
- package/dist/{host-meUhieO9.js → host-0qv2SCjk.js} +1 -1
- package/dist/{host-9pJ7NvnR.js → host-Bo6itV50.js} +50 -50
- package/dist/init-DkGhdexn.js +4 -0
- package/dist/{morphStore-D6mkLJ-8.js → morphStore-Bm30Ekce.js} +1 -1
- package/dist/{motion-wsc6Qd7S.js → motion-BOWE4m3Q.js} +762 -759
- package/dist/motion.js +1 -1
- package/dist/{pipeline-CMpuPUaX.js → pipeline-hZsOKbHd.js} +12 -12
- package/dist/{previewScale-SYKvfhUm.js → previewScale-C6EBx--U.js} +8 -8
- package/dist/{rolls-KpWCAeDv.js → rolls-DugKaHUw.js} +10549 -4517
- package/dist/src-BlvCHYVY.js +3672 -0
- package/dist/{src-B5o6fGRJ.js → src-D-TQbBo2.js} +1 -2
- package/dist/{store-iBb0I6hk.js → store-BMGP1qou.js} +295 -275
- package/dist/{useLayerEdit-Ba7RA6qX.js → useLayerEdit-B5nF5I9b.js} +103 -102
- package/dist/webworkerAll-0WBQ2FBr.js +2 -0
- package/package.json +12 -9
- package/dist/CanvasRenderer-Bl0rlqNq.js +0 -2
- package/dist/TreePicker-Dv0zpJwe.js +0 -166
- package/dist/WebGLRenderer-CXxpVIx3.js +0 -2
- package/dist/WebGPURenderer-BwLEUYBa.js +0 -2
- package/dist/browserAll-CAzdTUbR.js +0 -6
- package/dist/chunk-3b4jIN3o.js +0 -13
- package/dist/effects-B47bpwGh.js +0 -447
- package/dist/init-jApIMi04.js +0 -4
- package/dist/webworkerAll-DEZhpG90.js +0 -2
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as
|
|
3
|
-
import { i as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import {
|
|
1
|
+
import { D as e, i as t, j as n, k as r, r as i, s as a } from "./__vite-browser-external-y2xWjzgx.js";
|
|
2
|
+
import { $n as o, Cn as s, D as c, Dn as l, En as u, F as d, Gn as f, Ir as p, Kn as m, L as h, Qn as g, T as _, Tn as v, Yn as y, Zn as b, d as x, f as S, q as C, qn as w, t as ee, wn as te } from "./rolls-DugKaHUw.js";
|
|
3
|
+
import { a as T, c as E, d as ne, f as re, i as ie, l as ae, r as oe, s as se, u as ce } from "./TreePicker-2RUSyGl4.js";
|
|
4
|
+
import { a as D, t as O } from "./Timeline-EbecYeGh.js";
|
|
5
|
+
import { BezierPathEditor as le, ButtonGroup as ue, Input as de, MenuDropdownItem as fe, PopoverPanel as k, ToggleCheckbox as pe, Tooltip as A, glyphSize as me, usePopover as he } from "@kolkrabbi/kol-component";
|
|
6
|
+
import { Fragment as ge, useEffect as _e, useState as j } from "react";
|
|
7
|
+
import { Fragment as ve, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
8
|
+
import { IconLoader as ye } from "@kolkrabbi/kol-icons";
|
|
8
9
|
//#region src/kinetic/paths.js
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
return e.map((e, t) => `${t === 0 ? "M" : "L"} ${
|
|
10
|
+
var P = Math.PI * 2, F = (e) => Math.round(e * 100) / 100;
|
|
11
|
+
function be(e) {
|
|
12
|
+
return e.map((e, t) => `${t === 0 ? "M" : "L"} ${F(e[0])} ${F(e[1])}`).join(" ");
|
|
12
13
|
}
|
|
13
|
-
var
|
|
14
|
+
var xe = [
|
|
14
15
|
[.12, .55],
|
|
15
16
|
[.37, .32],
|
|
16
17
|
[.63, .68],
|
|
17
18
|
[.88, .45]
|
|
18
19
|
];
|
|
19
|
-
function
|
|
20
|
+
function Se(e, t, n) {
|
|
20
21
|
let r = e.map(([e, r]) => [e * t, r * n]);
|
|
21
|
-
if (r.length < 2) return `M ${
|
|
22
|
-
let i = `M ${
|
|
22
|
+
if (r.length < 2) return `M ${F(t / 2)} ${F(n / 2)} L ${F(t / 2 + 1)} ${F(n / 2)}`;
|
|
23
|
+
let i = `M ${F(r[0][0])} ${F(r[0][1])}`;
|
|
23
24
|
for (let e = 0; e < r.length - 1; e++) {
|
|
24
25
|
let t = r[e - 1] || r[e], n = r[e], a = r[e + 1], o = r[e + 2] || r[e + 1], s = n[0] + (a[0] - t[0]) / 6, c = n[1] + (a[1] - t[1]) / 6, l = a[0] - (o[0] - n[0]) / 6, u = a[1] - (o[1] - n[1]) / 6;
|
|
25
|
-
i += ` C ${
|
|
26
|
+
i += ` C ${F(s)} ${F(c)} ${F(l)} ${F(u)} ${F(a[0])} ${F(a[1])}`;
|
|
26
27
|
}
|
|
27
28
|
return i;
|
|
28
29
|
}
|
|
29
|
-
var
|
|
30
|
+
var Ce = (e) => e === "array", I = (e) => e === "radial", we = (e) => e === "rings", L = {
|
|
30
31
|
amp: .4,
|
|
31
32
|
freq: 2,
|
|
32
33
|
turns: 3,
|
|
@@ -39,27 +40,27 @@ var Se = (e) => e === "array", Ce = (e) => e === "radial", we = (e) => e === "ri
|
|
|
39
40
|
twist: .5,
|
|
40
41
|
grow: .6
|
|
41
42
|
};
|
|
42
|
-
function
|
|
43
|
-
let i = t / 2, a = n / 2, o = Math.min(t, n) * .12, s = r.amp ??
|
|
43
|
+
function Te(e, t, n, r = {}) {
|
|
44
|
+
let i = t / 2, a = n / 2, o = Math.min(t, n) * .12, s = r.amp ?? L.amp, c = Math.max(1, Math.round(r.freq ?? L.freq)), l = Math.max(1, Math.round(r.turns ?? L.turns)), u = r.radius ?? L.radius;
|
|
44
45
|
switch (e) {
|
|
45
46
|
case "arc": {
|
|
46
47
|
let e = n * .62, r = e - s * n * .7;
|
|
47
48
|
return {
|
|
48
|
-
d: `M ${
|
|
49
|
+
d: `M ${F(o)} ${F(e)} Q ${F(i)} ${F(r)} ${F(t - o)} ${F(e)}`,
|
|
49
50
|
closed: !1
|
|
50
51
|
};
|
|
51
52
|
}
|
|
52
53
|
case "circle": {
|
|
53
54
|
let e = Math.min(t, n) * .5 * u;
|
|
54
55
|
return {
|
|
55
|
-
d: `M ${
|
|
56
|
+
d: `M ${F(i - e)} ${F(a)} A ${F(e)} ${F(e)} 0 1 1 ${F(i + e)} ${F(a)} A ${F(e)} ${F(e)} 0 1 1 ${F(i - e)} ${F(a)} Z`,
|
|
56
57
|
closed: !0
|
|
57
58
|
};
|
|
58
59
|
}
|
|
59
60
|
case "ellipse": {
|
|
60
61
|
let e = (t * .5 - o) * u, r = (n * .5 - o) * u;
|
|
61
62
|
return {
|
|
62
|
-
d: `M ${
|
|
63
|
+
d: `M ${F(i - e)} ${F(a)} A ${F(e)} ${F(r)} 0 1 1 ${F(i + e)} ${F(a)} A ${F(e)} ${F(r)} 0 1 1 ${F(i - e)} ${F(a)} Z`,
|
|
63
64
|
closed: !0
|
|
64
65
|
};
|
|
65
66
|
}
|
|
@@ -67,21 +68,21 @@ function Ee(e, t, n, r = {}) {
|
|
|
67
68
|
let e = [];
|
|
68
69
|
for (let r = 0; r <= 120; r++) {
|
|
69
70
|
let i = r / 120;
|
|
70
|
-
e.push([o + i * (t - 2 * o), a + s * n * .32 * Math.sin(i * c *
|
|
71
|
+
e.push([o + i * (t - 2 * o), a + s * n * .32 * Math.sin(i * c * P)]);
|
|
71
72
|
}
|
|
72
73
|
return {
|
|
73
|
-
d:
|
|
74
|
+
d: be(e),
|
|
74
75
|
closed: !1
|
|
75
76
|
};
|
|
76
77
|
}
|
|
77
78
|
case "spiral": {
|
|
78
79
|
let e = Math.min(t, n) * .45 * u, r = [];
|
|
79
80
|
for (let t = 0; t <= 420; t++) {
|
|
80
|
-
let n = t / 420, o = n * l *
|
|
81
|
+
let n = t / 420, o = n * l * P, s = n * e;
|
|
81
82
|
r.push([i + Math.cos(o) * s, a + Math.sin(o) * s]);
|
|
82
83
|
}
|
|
83
84
|
return {
|
|
84
|
-
d:
|
|
85
|
+
d: be(r),
|
|
85
86
|
closed: !1
|
|
86
87
|
};
|
|
87
88
|
}
|
|
@@ -92,18 +93,18 @@ function Ee(e, t, n, r = {}) {
|
|
|
92
93
|
r.push([o + c * (t - 2 * o), a + (i % 2 == 0 ? -1 : 1) * s * n * .28]);
|
|
93
94
|
}
|
|
94
95
|
return {
|
|
95
|
-
d:
|
|
96
|
+
d: be(r),
|
|
96
97
|
closed: !1
|
|
97
98
|
};
|
|
98
99
|
}
|
|
99
100
|
case "custom": return {
|
|
100
|
-
d:
|
|
101
|
+
d: Se(Array.isArray(r.points) && r.points.length >= 2 ? r.points : xe, t, n),
|
|
101
102
|
closed: !1
|
|
102
103
|
};
|
|
103
104
|
default: {
|
|
104
105
|
let e = a + (r.offset || 0) * n;
|
|
105
106
|
return {
|
|
106
|
-
d: `M ${
|
|
107
|
+
d: `M ${F(o)} ${F(e)} L ${F(t - o)} ${F(e)}`,
|
|
107
108
|
closed: !1
|
|
108
109
|
};
|
|
109
110
|
}
|
|
@@ -111,7 +112,7 @@ function Ee(e, t, n, r = {}) {
|
|
|
111
112
|
}
|
|
112
113
|
//#endregion
|
|
113
114
|
//#region src/kinetic/presets.js
|
|
114
|
-
var
|
|
115
|
+
var Ee = "#0b0d12", R = "#e8e4dc", z = {
|
|
115
116
|
text: "Kinetic",
|
|
116
117
|
font: "gullhamrar",
|
|
117
118
|
fontSize: 120,
|
|
@@ -134,7 +135,7 @@ var De = "#0b0d12", L = "#e8e4dc", R = {
|
|
|
134
135
|
showPath: !1,
|
|
135
136
|
path: {
|
|
136
137
|
type: "line",
|
|
137
|
-
...
|
|
138
|
+
...L
|
|
138
139
|
},
|
|
139
140
|
motion: {
|
|
140
141
|
mode: "none",
|
|
@@ -162,60 +163,60 @@ var De = "#0b0d12", L = "#e8e4dc", R = {
|
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
165
|
};
|
|
165
|
-
function
|
|
166
|
-
let n =
|
|
166
|
+
function De(e, t = {}) {
|
|
167
|
+
let n = E(e), r = se(n);
|
|
167
168
|
for (let e of n.axes) t[e.tag] != null && (r[e.tag] = t[e.tag]);
|
|
168
169
|
return r;
|
|
169
170
|
}
|
|
170
|
-
function
|
|
171
|
+
function Oe(e = {}, t = 0) {
|
|
171
172
|
let n = {
|
|
172
173
|
id: e.id || `i${t}`,
|
|
173
|
-
...
|
|
174
|
+
...z,
|
|
174
175
|
...e,
|
|
175
176
|
path: {
|
|
176
|
-
...
|
|
177
|
+
...z.path,
|
|
177
178
|
...e.path || {}
|
|
178
179
|
},
|
|
179
180
|
motion: {
|
|
180
|
-
...
|
|
181
|
+
...z.motion,
|
|
181
182
|
...e.motion || {}
|
|
182
183
|
},
|
|
183
184
|
motions: Array.isArray(e.motions) ? e.motions.map((e) => ({
|
|
184
|
-
...
|
|
185
|
+
...z.motion,
|
|
185
186
|
...e
|
|
186
187
|
})) : [],
|
|
187
188
|
offset: {
|
|
188
|
-
...
|
|
189
|
+
...z.offset,
|
|
189
190
|
...e.offset || {}
|
|
190
191
|
},
|
|
191
192
|
opentype: { ...e.opentype || {} },
|
|
192
193
|
morph: {
|
|
193
|
-
...
|
|
194
|
+
...z.morph,
|
|
194
195
|
...e.morph || {},
|
|
195
196
|
vf2: { ...e.morph?.vf2 || {} }
|
|
196
197
|
}
|
|
197
198
|
};
|
|
198
|
-
return n.vf =
|
|
199
|
+
return n.vf = De(n.font, e.vf), n;
|
|
199
200
|
}
|
|
200
|
-
var
|
|
201
|
-
bg:
|
|
202
|
-
instances: [
|
|
201
|
+
var B = (e) => ({
|
|
202
|
+
bg: Ee,
|
|
203
|
+
instances: [Oe({
|
|
203
204
|
font: "rot",
|
|
204
|
-
fill:
|
|
205
|
+
fill: R,
|
|
205
206
|
...e
|
|
206
207
|
}, 0)]
|
|
207
|
-
}),
|
|
208
|
-
bg:
|
|
209
|
-
instances: e.map((e, t) =>
|
|
210
|
-
}),
|
|
208
|
+
}), ke = "#16202E", V = (...e) => ({
|
|
209
|
+
bg: ke,
|
|
210
|
+
instances: e.map((e, t) => Oe(e, t))
|
|
211
|
+
}), Ae = (e, ...t) => ({
|
|
211
212
|
bg: e,
|
|
212
|
-
instances: t.map((e, t) =>
|
|
213
|
-
}),
|
|
213
|
+
instances: t.map((e, t) => Oe(e, t))
|
|
214
|
+
}), H = [
|
|
214
215
|
{
|
|
215
216
|
id: "sunburst",
|
|
216
217
|
label: "Sunburst",
|
|
217
218
|
sub: "Radial",
|
|
218
|
-
comp:
|
|
219
|
+
comp: B({
|
|
219
220
|
text: "Without a soul, is it a place?",
|
|
220
221
|
fontSize: 26,
|
|
221
222
|
vf: {
|
|
@@ -234,7 +235,7 @@ var z = (e) => ({
|
|
|
234
235
|
id: "dense-burst",
|
|
235
236
|
label: "Dense burst",
|
|
236
237
|
sub: "Radial",
|
|
237
|
-
comp:
|
|
238
|
+
comp: B({
|
|
238
239
|
text: "is it a place",
|
|
239
240
|
fontSize: 30,
|
|
240
241
|
vf: {
|
|
@@ -253,7 +254,7 @@ var z = (e) => ({
|
|
|
253
254
|
id: "double-twirl",
|
|
254
255
|
label: "Double twirl",
|
|
255
256
|
sub: "Radial",
|
|
256
|
-
comp:
|
|
257
|
+
comp: B({
|
|
257
258
|
text: "turning and turning",
|
|
258
259
|
fontSize: 24,
|
|
259
260
|
font: "malromur",
|
|
@@ -270,7 +271,7 @@ var z = (e) => ({
|
|
|
270
271
|
id: "pulse-burst",
|
|
271
272
|
label: "Pulse burst",
|
|
272
273
|
sub: "Radial",
|
|
273
|
-
comp:
|
|
274
|
+
comp: B({
|
|
274
275
|
text: "breathe in, breathe out",
|
|
275
276
|
fontSize: 26,
|
|
276
277
|
font: "gullhamrar",
|
|
@@ -292,7 +293,7 @@ var z = (e) => ({
|
|
|
292
293
|
id: "vortex",
|
|
293
294
|
label: "Vortex",
|
|
294
295
|
sub: "Rings",
|
|
295
|
-
comp:
|
|
296
|
+
comp: B({
|
|
296
297
|
text: "Does a community make a place? ",
|
|
297
298
|
fontSize: 24,
|
|
298
299
|
vf: {
|
|
@@ -314,7 +315,7 @@ var z = (e) => ({
|
|
|
314
315
|
id: "galaxy",
|
|
315
316
|
label: "Galaxy",
|
|
316
317
|
sub: "Rings",
|
|
317
|
-
comp:
|
|
318
|
+
comp: B({
|
|
318
319
|
text: "spiralling inward forever ",
|
|
319
320
|
fontSize: 22,
|
|
320
321
|
font: "malromur",
|
|
@@ -334,7 +335,7 @@ var z = (e) => ({
|
|
|
334
335
|
id: "wide-rings",
|
|
335
336
|
label: "Wide rings",
|
|
336
337
|
sub: "Rings",
|
|
337
|
-
comp:
|
|
338
|
+
comp: B({
|
|
338
339
|
text: "around and around ",
|
|
339
340
|
fontSize: 28,
|
|
340
341
|
font: "gullhamrar",
|
|
@@ -354,7 +355,7 @@ var z = (e) => ({
|
|
|
354
355
|
id: "orbit",
|
|
355
356
|
label: "Orbit",
|
|
356
357
|
sub: "Path",
|
|
357
|
-
comp:
|
|
358
|
+
comp: B({
|
|
358
359
|
text: "KOLKRABBI · REYKJAVIK · ",
|
|
359
360
|
fontSize: 40,
|
|
360
361
|
font: "malromur",
|
|
@@ -373,7 +374,7 @@ var z = (e) => ({
|
|
|
373
374
|
id: "spiral",
|
|
374
375
|
label: "Spiral",
|
|
375
376
|
sub: "Path",
|
|
376
|
-
comp:
|
|
377
|
+
comp: B({
|
|
377
378
|
text: "into the spiral we go ",
|
|
378
379
|
fontSize: 30,
|
|
379
380
|
vf: {
|
|
@@ -395,7 +396,7 @@ var z = (e) => ({
|
|
|
395
396
|
id: "template",
|
|
396
397
|
label: "Template",
|
|
397
398
|
sub: "Path",
|
|
398
|
-
comp:
|
|
399
|
+
comp: B({
|
|
399
400
|
text: "Type here",
|
|
400
401
|
fontSize: 160,
|
|
401
402
|
vf: {
|
|
@@ -408,7 +409,7 @@ var z = (e) => ({
|
|
|
408
409
|
id: "big-statement",
|
|
409
410
|
label: "Flood",
|
|
410
411
|
sub: "Scenes",
|
|
411
|
-
comp:
|
|
412
|
+
comp: V({
|
|
412
413
|
text: "BIG",
|
|
413
414
|
font: "rot",
|
|
414
415
|
fontSize: 220,
|
|
@@ -429,7 +430,7 @@ var z = (e) => ({
|
|
|
429
430
|
id: "ring-and-word",
|
|
430
431
|
label: "Ring",
|
|
431
432
|
sub: "Scenes",
|
|
432
|
-
comp:
|
|
433
|
+
comp: V({
|
|
433
434
|
id: "a",
|
|
434
435
|
text: "KOLKRABBI · REYKJAVIK · ",
|
|
435
436
|
font: "malromur",
|
|
@@ -458,7 +459,7 @@ var z = (e) => ({
|
|
|
458
459
|
id: "custom-s",
|
|
459
460
|
label: "Flow",
|
|
460
461
|
sub: "Scenes",
|
|
461
|
-
comp:
|
|
462
|
+
comp: V({
|
|
462
463
|
text: "freeform",
|
|
463
464
|
fontSize: 96,
|
|
464
465
|
vf: { wght: 600 },
|
|
@@ -470,7 +471,7 @@ var z = (e) => ({
|
|
|
470
471
|
id: "malromur-wave",
|
|
471
472
|
label: "Morph",
|
|
472
473
|
sub: "Scenes",
|
|
473
|
-
comp:
|
|
474
|
+
comp: V({
|
|
474
475
|
text: "Malromur",
|
|
475
476
|
font: "malromur",
|
|
476
477
|
fontSize: 132,
|
|
@@ -487,7 +488,7 @@ var z = (e) => ({
|
|
|
487
488
|
id: "flag",
|
|
488
489
|
label: "Wave",
|
|
489
490
|
sub: "Scenes",
|
|
490
|
-
comp:
|
|
491
|
+
comp: V({
|
|
491
492
|
text: "flag",
|
|
492
493
|
font: "rot",
|
|
493
494
|
fontSize: 168,
|
|
@@ -507,7 +508,7 @@ var z = (e) => ({
|
|
|
507
508
|
id: "sweep-grid",
|
|
508
509
|
label: "Reveal",
|
|
509
510
|
sub: "Scenes",
|
|
510
|
-
comp:
|
|
511
|
+
comp: V({
|
|
511
512
|
text: "KOL",
|
|
512
513
|
font: "rot",
|
|
513
514
|
fontSize: 56,
|
|
@@ -533,7 +534,7 @@ var z = (e) => ({
|
|
|
533
534
|
id: "baseline",
|
|
534
535
|
label: "Baseline",
|
|
535
536
|
sub: "Elements",
|
|
536
|
-
comp:
|
|
537
|
+
comp: V({
|
|
537
538
|
text: "Typography",
|
|
538
539
|
fontSize: 120,
|
|
539
540
|
vf: { wght: 500 }
|
|
@@ -543,7 +544,7 @@ var z = (e) => ({
|
|
|
543
544
|
id: "arc-kinetic",
|
|
544
545
|
label: "Arcs",
|
|
545
546
|
sub: "Elements",
|
|
546
|
-
comp:
|
|
547
|
+
comp: V({
|
|
547
548
|
text: "Kinetic",
|
|
548
549
|
fontSize: 130,
|
|
549
550
|
vf: { wght: 600 },
|
|
@@ -557,7 +558,7 @@ var z = (e) => ({
|
|
|
557
558
|
id: "ellipse-loop",
|
|
558
559
|
label: "Loops",
|
|
559
560
|
sub: "Elements",
|
|
560
|
-
comp:
|
|
561
|
+
comp: V({
|
|
561
562
|
text: "REYKJAVIK",
|
|
562
563
|
font: "rot",
|
|
563
564
|
fontSize: 78,
|
|
@@ -576,7 +577,7 @@ var z = (e) => ({
|
|
|
576
577
|
id: "zigzag",
|
|
577
578
|
label: "Angular",
|
|
578
579
|
sub: "Elements",
|
|
579
|
-
comp:
|
|
580
|
+
comp: V({
|
|
580
581
|
text: "ZIGZAG",
|
|
581
582
|
font: "malromur",
|
|
582
583
|
fontSize: 92,
|
|
@@ -592,7 +593,7 @@ var z = (e) => ({
|
|
|
592
593
|
id: "array-grid",
|
|
593
594
|
label: "Grid",
|
|
594
595
|
sub: "Elements",
|
|
595
|
-
comp:
|
|
596
|
+
comp: V({
|
|
596
597
|
text: "KOL",
|
|
597
598
|
fontSize: 64,
|
|
598
599
|
vf: { wght: 600 },
|
|
@@ -607,7 +608,7 @@ var z = (e) => ({
|
|
|
607
608
|
id: "weight-pulse",
|
|
608
609
|
label: "Weight",
|
|
609
610
|
sub: "Elements",
|
|
610
|
-
comp:
|
|
611
|
+
comp: V({
|
|
611
612
|
text: "WEIGHT",
|
|
612
613
|
fontSize: 150,
|
|
613
614
|
vf: { wght: 300 },
|
|
@@ -623,7 +624,7 @@ var z = (e) => ({
|
|
|
623
624
|
id: "rot-width",
|
|
624
625
|
label: "Width",
|
|
625
626
|
sub: "Elements",
|
|
626
|
-
comp:
|
|
627
|
+
comp: V({
|
|
627
628
|
text: "WIDTH",
|
|
628
629
|
font: "rot",
|
|
629
630
|
fontSize: 150,
|
|
@@ -643,7 +644,7 @@ var z = (e) => ({
|
|
|
643
644
|
id: "cascade",
|
|
644
645
|
label: "Cascade",
|
|
645
646
|
sub: "Elements",
|
|
646
|
-
comp:
|
|
647
|
+
comp: V({
|
|
647
648
|
text: "CASCADE",
|
|
648
649
|
fontSize: 130,
|
|
649
650
|
vf: { wght: 600 },
|
|
@@ -658,7 +659,7 @@ var z = (e) => ({
|
|
|
658
659
|
id: "baseline-mono",
|
|
659
660
|
label: "Mono line",
|
|
660
661
|
sub: "Lines",
|
|
661
|
-
comp:
|
|
662
|
+
comp: V({
|
|
662
663
|
text: "monospace",
|
|
663
664
|
font: "rot",
|
|
664
665
|
fontSize: 110,
|
|
@@ -673,7 +674,7 @@ var z = (e) => ({
|
|
|
673
674
|
id: "baseline-light",
|
|
674
675
|
label: "On paper",
|
|
675
676
|
sub: "Lines",
|
|
676
|
-
comp:
|
|
677
|
+
comp: Ae("#f4f1ea", {
|
|
677
678
|
text: "Reykjavik",
|
|
678
679
|
font: "malromur",
|
|
679
680
|
fontSize: 130,
|
|
@@ -685,7 +686,7 @@ var z = (e) => ({
|
|
|
685
686
|
id: "sine-flow",
|
|
686
687
|
label: "Sine flow",
|
|
687
688
|
sub: "Curves",
|
|
688
|
-
comp:
|
|
689
|
+
comp: V({
|
|
689
690
|
text: "wave along",
|
|
690
691
|
font: "rot",
|
|
691
692
|
fontSize: 96,
|
|
@@ -708,7 +709,7 @@ var z = (e) => ({
|
|
|
708
709
|
id: "spiral-in",
|
|
709
710
|
label: "Spiral",
|
|
710
711
|
sub: "Curves",
|
|
711
|
-
comp:
|
|
712
|
+
comp: V({
|
|
712
713
|
text: "spiral",
|
|
713
714
|
fontSize: 88,
|
|
714
715
|
vf: { wght: 700 },
|
|
@@ -722,7 +723,7 @@ var z = (e) => ({
|
|
|
722
723
|
id: "arc-march",
|
|
723
724
|
label: "Arc march",
|
|
724
725
|
sub: "Curves",
|
|
725
|
-
comp:
|
|
726
|
+
comp: V({
|
|
726
727
|
text: "on the arc",
|
|
727
728
|
font: "rot",
|
|
728
729
|
fontSize: 96,
|
|
@@ -741,7 +742,7 @@ var z = (e) => ({
|
|
|
741
742
|
id: "arc-up",
|
|
742
743
|
label: "High arc",
|
|
743
744
|
sub: "Curves",
|
|
744
|
-
comp:
|
|
745
|
+
comp: V({
|
|
745
746
|
text: "over the top",
|
|
746
747
|
font: "malromur",
|
|
747
748
|
fontSize: 92,
|
|
@@ -756,7 +757,7 @@ var z = (e) => ({
|
|
|
756
757
|
id: "arc-wide",
|
|
757
758
|
label: "Wide arc",
|
|
758
759
|
sub: "Curves",
|
|
759
|
-
comp:
|
|
760
|
+
comp: V({
|
|
760
761
|
text: "WIDEARC",
|
|
761
762
|
font: "rot",
|
|
762
763
|
fontSize: 96,
|
|
@@ -774,7 +775,7 @@ var z = (e) => ({
|
|
|
774
775
|
id: "sine-fast",
|
|
775
776
|
label: "Fast wave",
|
|
776
777
|
sub: "Curves",
|
|
777
|
-
comp:
|
|
778
|
+
comp: V({
|
|
778
779
|
text: "up and down",
|
|
779
780
|
fontSize: 90,
|
|
780
781
|
vf: { wght: 600 },
|
|
@@ -793,7 +794,7 @@ var z = (e) => ({
|
|
|
793
794
|
id: "sine-tall",
|
|
794
795
|
label: "Tall wave",
|
|
795
796
|
sub: "Curves",
|
|
796
|
-
comp:
|
|
797
|
+
comp: V({
|
|
797
798
|
text: "rolling",
|
|
798
799
|
font: "rot",
|
|
799
800
|
fontSize: 100,
|
|
@@ -812,7 +813,7 @@ var z = (e) => ({
|
|
|
812
813
|
id: "spiral-march",
|
|
813
814
|
label: "Spiral march",
|
|
814
815
|
sub: "Curves",
|
|
815
|
-
comp:
|
|
816
|
+
comp: V({
|
|
816
817
|
text: "into the spiral",
|
|
817
818
|
font: "rot",
|
|
818
819
|
fontSize: 72,
|
|
@@ -834,7 +835,7 @@ var z = (e) => ({
|
|
|
834
835
|
id: "circle-orbit",
|
|
835
836
|
label: "Circle",
|
|
836
837
|
sub: "Closed",
|
|
837
|
-
comp:
|
|
838
|
+
comp: V({
|
|
838
839
|
text: "KOLKRABBI",
|
|
839
840
|
font: "malromur",
|
|
840
841
|
fontSize: 80,
|
|
@@ -853,7 +854,7 @@ var z = (e) => ({
|
|
|
853
854
|
id: "circle-big",
|
|
854
855
|
label: "Big circle",
|
|
855
856
|
sub: "Closed",
|
|
856
|
-
comp:
|
|
857
|
+
comp: V({
|
|
857
858
|
text: "AROUND WE GO",
|
|
858
859
|
fontSize: 76,
|
|
859
860
|
vf: { wght: 600 },
|
|
@@ -868,7 +869,7 @@ var z = (e) => ({
|
|
|
868
869
|
id: "circle-mono",
|
|
869
870
|
label: "Mono circle",
|
|
870
871
|
sub: "Closed",
|
|
871
|
-
comp:
|
|
872
|
+
comp: V({
|
|
872
873
|
text: "LOOP/LOOP/",
|
|
873
874
|
font: "rot",
|
|
874
875
|
fontSize: 72,
|
|
@@ -888,7 +889,7 @@ var z = (e) => ({
|
|
|
888
889
|
id: "ellipse-wide",
|
|
889
890
|
label: "Wide ellipse",
|
|
890
891
|
sub: "Closed",
|
|
891
|
-
comp:
|
|
892
|
+
comp: V({
|
|
892
893
|
text: "ELLIPTICAL",
|
|
893
894
|
font: "malromur",
|
|
894
895
|
fontSize: 74,
|
|
@@ -904,7 +905,7 @@ var z = (e) => ({
|
|
|
904
905
|
id: "zigzag-fine",
|
|
905
906
|
label: "Fine zigzag",
|
|
906
907
|
sub: "Angular",
|
|
907
|
-
comp:
|
|
908
|
+
comp: V({
|
|
908
909
|
text: "sawtooth",
|
|
909
910
|
font: "rot",
|
|
910
911
|
fontSize: 80,
|
|
@@ -923,7 +924,7 @@ var z = (e) => ({
|
|
|
923
924
|
id: "custom-march",
|
|
924
925
|
label: "Custom march",
|
|
925
926
|
sub: "Custom",
|
|
926
|
-
comp:
|
|
927
|
+
comp: V({
|
|
927
928
|
text: "follow me",
|
|
928
929
|
font: "rot",
|
|
929
930
|
fontSize: 90,
|
|
@@ -939,7 +940,7 @@ var z = (e) => ({
|
|
|
939
940
|
id: "ordspor-pulse",
|
|
940
941
|
label: "Ordspor",
|
|
941
942
|
sub: "Weight",
|
|
942
|
-
comp:
|
|
943
|
+
comp: V({
|
|
943
944
|
text: "Ordspor",
|
|
944
945
|
font: "rot",
|
|
945
946
|
fontSize: 132,
|
|
@@ -959,7 +960,7 @@ var z = (e) => ({
|
|
|
959
960
|
id: "rot-weight",
|
|
960
961
|
label: "Rot weight",
|
|
961
962
|
sub: "Weight",
|
|
962
|
-
comp:
|
|
963
|
+
comp: V({
|
|
963
964
|
text: "ROT",
|
|
964
965
|
font: "rot",
|
|
965
966
|
fontSize: 200,
|
|
@@ -979,7 +980,7 @@ var z = (e) => ({
|
|
|
979
980
|
id: "weight-slow",
|
|
980
981
|
label: "Slow weight",
|
|
981
982
|
sub: "Weight",
|
|
982
|
-
comp:
|
|
983
|
+
comp: V({
|
|
983
984
|
text: "breathe",
|
|
984
985
|
fontSize: 150,
|
|
985
986
|
vf: { wght: 300 },
|
|
@@ -995,7 +996,7 @@ var z = (e) => ({
|
|
|
995
996
|
id: "weight-fast",
|
|
996
997
|
label: "Fast weight",
|
|
997
998
|
sub: "Weight",
|
|
998
|
-
comp:
|
|
999
|
+
comp: V({
|
|
999
1000
|
text: "PULSE",
|
|
1000
1001
|
fontSize: 160,
|
|
1001
1002
|
vf: { wght: 300 },
|
|
@@ -1011,7 +1012,7 @@ var z = (e) => ({
|
|
|
1011
1012
|
id: "malromur-heavy",
|
|
1012
1013
|
label: "Heavy swing",
|
|
1013
1014
|
sub: "Weight",
|
|
1014
|
-
comp:
|
|
1015
|
+
comp: Ae("#f4f1ea", {
|
|
1015
1016
|
text: "Malromur",
|
|
1016
1017
|
font: "malromur",
|
|
1017
1018
|
fontSize: 130,
|
|
@@ -1029,7 +1030,7 @@ var z = (e) => ({
|
|
|
1029
1030
|
id: "ordspor-wave2",
|
|
1030
1031
|
label: "Ordspor ×2",
|
|
1031
1032
|
sub: "Weight",
|
|
1032
|
-
comp:
|
|
1033
|
+
comp: V({
|
|
1033
1034
|
text: "twice",
|
|
1034
1035
|
font: "rot",
|
|
1035
1036
|
fontSize: 150,
|
|
@@ -1049,7 +1050,7 @@ var z = (e) => ({
|
|
|
1049
1050
|
id: "rot-weight2",
|
|
1050
1051
|
label: "Rot weight ×2",
|
|
1051
1052
|
sub: "Weight",
|
|
1052
|
-
comp:
|
|
1053
|
+
comp: V({
|
|
1053
1054
|
text: "ROT",
|
|
1054
1055
|
font: "rot",
|
|
1055
1056
|
fontSize: 200,
|
|
@@ -1069,7 +1070,7 @@ var z = (e) => ({
|
|
|
1069
1070
|
id: "malromur-bigwave",
|
|
1070
1071
|
label: "Big wave",
|
|
1071
1072
|
sub: "Weight",
|
|
1072
|
-
comp:
|
|
1073
|
+
comp: V({
|
|
1073
1074
|
text: "WEIGHT",
|
|
1074
1075
|
font: "malromur",
|
|
1075
1076
|
fontSize: 150,
|
|
@@ -1087,7 +1088,7 @@ var z = (e) => ({
|
|
|
1087
1088
|
id: "ordspor-accent",
|
|
1088
1089
|
label: "Ordspor accent",
|
|
1089
1090
|
sub: "Weight",
|
|
1090
|
-
comp:
|
|
1091
|
+
comp: V({
|
|
1091
1092
|
text: "Ordspor",
|
|
1092
1093
|
font: "rot",
|
|
1093
1094
|
fontSize: 140,
|
|
@@ -1108,7 +1109,7 @@ var z = (e) => ({
|
|
|
1108
1109
|
id: "rot-dual",
|
|
1109
1110
|
label: "Variable",
|
|
1110
1111
|
sub: "Width",
|
|
1111
|
-
comp:
|
|
1112
|
+
comp: V({
|
|
1112
1113
|
text: "variable",
|
|
1113
1114
|
font: "rot",
|
|
1114
1115
|
fontSize: 124,
|
|
@@ -1128,7 +1129,7 @@ var z = (e) => ({
|
|
|
1128
1129
|
id: "rot-width-fast",
|
|
1129
1130
|
label: "Width ×2",
|
|
1130
1131
|
sub: "Width",
|
|
1131
|
-
comp:
|
|
1132
|
+
comp: V({
|
|
1132
1133
|
text: "STRETCH",
|
|
1133
1134
|
font: "rot",
|
|
1134
1135
|
fontSize: 130,
|
|
@@ -1148,7 +1149,7 @@ var z = (e) => ({
|
|
|
1148
1149
|
id: "rot-width-slow",
|
|
1149
1150
|
label: "Width slow",
|
|
1150
1151
|
sub: "Width",
|
|
1151
|
-
comp:
|
|
1152
|
+
comp: V({
|
|
1152
1153
|
text: "expand",
|
|
1153
1154
|
font: "rot",
|
|
1154
1155
|
fontSize: 130,
|
|
@@ -1168,7 +1169,7 @@ var z = (e) => ({
|
|
|
1168
1169
|
id: "morph-mtl",
|
|
1169
1170
|
label: "Made to last",
|
|
1170
1171
|
sub: "Morph",
|
|
1171
|
-
comp:
|
|
1172
|
+
comp: V({
|
|
1172
1173
|
text: "Made to last",
|
|
1173
1174
|
font: "rot",
|
|
1174
1175
|
fontSize: 150,
|
|
@@ -1192,7 +1193,7 @@ var z = (e) => ({
|
|
|
1192
1193
|
id: "morph-wave",
|
|
1193
1194
|
label: "Morph wave",
|
|
1194
1195
|
sub: "Morph",
|
|
1195
|
-
comp:
|
|
1196
|
+
comp: V({
|
|
1196
1197
|
text: "MORPH",
|
|
1197
1198
|
font: "rot",
|
|
1198
1199
|
fontSize: 200,
|
|
@@ -1216,7 +1217,7 @@ var z = (e) => ({
|
|
|
1216
1217
|
id: "morph-ease",
|
|
1217
1218
|
label: "Heavy → light",
|
|
1218
1219
|
sub: "Morph",
|
|
1219
|
-
comp:
|
|
1220
|
+
comp: V({
|
|
1220
1221
|
text: "gradient",
|
|
1221
1222
|
font: "rot",
|
|
1222
1223
|
fontSize: 150,
|
|
@@ -1240,7 +1241,7 @@ var z = (e) => ({
|
|
|
1240
1241
|
id: "morph-random",
|
|
1241
1242
|
label: "Ransom note",
|
|
1242
1243
|
sub: "Morph",
|
|
1243
|
-
comp:
|
|
1244
|
+
comp: V({
|
|
1244
1245
|
text: "CHAOS",
|
|
1245
1246
|
font: "rot",
|
|
1246
1247
|
fontSize: 170,
|
|
@@ -1259,7 +1260,7 @@ var z = (e) => ({
|
|
|
1259
1260
|
id: "morph-fade",
|
|
1260
1261
|
label: "Fade A↔B",
|
|
1261
1262
|
sub: "Morph",
|
|
1262
|
-
comp:
|
|
1263
|
+
comp: V({
|
|
1263
1264
|
text: "between",
|
|
1264
1265
|
font: "gullhamrar",
|
|
1265
1266
|
fontSize: 150,
|
|
@@ -1276,7 +1277,7 @@ var z = (e) => ({
|
|
|
1276
1277
|
id: "morph-cross",
|
|
1277
1278
|
label: "Cross-face",
|
|
1278
1279
|
sub: "Morph",
|
|
1279
|
-
comp:
|
|
1280
|
+
comp: V({
|
|
1280
1281
|
text: "hybrid",
|
|
1281
1282
|
font: "rot",
|
|
1282
1283
|
fontSize: 150,
|
|
@@ -1296,7 +1297,7 @@ var z = (e) => ({
|
|
|
1296
1297
|
id: "arc-weight",
|
|
1297
1298
|
label: "Morph on arc",
|
|
1298
1299
|
sub: "On path",
|
|
1299
|
-
comp:
|
|
1300
|
+
comp: V({
|
|
1300
1301
|
text: "morph",
|
|
1301
1302
|
fontSize: 120,
|
|
1302
1303
|
path: {
|
|
@@ -1315,7 +1316,7 @@ var z = (e) => ({
|
|
|
1315
1316
|
id: "sine-weight",
|
|
1316
1317
|
label: "Wave + weight",
|
|
1317
1318
|
sub: "On path",
|
|
1318
|
-
comp:
|
|
1319
|
+
comp: V({
|
|
1319
1320
|
text: "modulated",
|
|
1320
1321
|
fontSize: 92,
|
|
1321
1322
|
vf: { wght: 400 },
|
|
@@ -1336,7 +1337,7 @@ var z = (e) => ({
|
|
|
1336
1337
|
id: "circle-weight",
|
|
1337
1338
|
label: "Ring + weight",
|
|
1338
1339
|
sub: "On path",
|
|
1339
|
-
comp:
|
|
1340
|
+
comp: V({
|
|
1340
1341
|
text: "ROTATING",
|
|
1341
1342
|
font: "malromur",
|
|
1342
1343
|
fontSize: 78,
|
|
@@ -1357,7 +1358,7 @@ var z = (e) => ({
|
|
|
1357
1358
|
id: "arc-width",
|
|
1358
1359
|
label: "Arc + width",
|
|
1359
1360
|
sub: "On path",
|
|
1360
|
-
comp:
|
|
1361
|
+
comp: V({
|
|
1361
1362
|
text: "arcwidth",
|
|
1362
1363
|
font: "rot",
|
|
1363
1364
|
fontSize: 96,
|
|
@@ -1381,7 +1382,7 @@ var z = (e) => ({
|
|
|
1381
1382
|
id: "pop",
|
|
1382
1383
|
label: "Pop",
|
|
1383
1384
|
sub: "Reveal",
|
|
1384
|
-
comp:
|
|
1385
|
+
comp: V({
|
|
1385
1386
|
text: "POP POP",
|
|
1386
1387
|
fontSize: 130,
|
|
1387
1388
|
vf: { wght: 800 },
|
|
@@ -1396,7 +1397,7 @@ var z = (e) => ({
|
|
|
1396
1397
|
id: "arc-cascade",
|
|
1397
1398
|
label: "Curve cascade",
|
|
1398
1399
|
sub: "Reveal",
|
|
1399
|
-
comp:
|
|
1400
|
+
comp: V({
|
|
1400
1401
|
text: "on a curve",
|
|
1401
1402
|
font: "rot",
|
|
1402
1403
|
fontSize: 100,
|
|
@@ -1419,7 +1420,7 @@ var z = (e) => ({
|
|
|
1419
1420
|
id: "cascade-slow",
|
|
1420
1421
|
label: "Slow cascade",
|
|
1421
1422
|
sub: "Reveal",
|
|
1422
|
-
comp:
|
|
1423
|
+
comp: V({
|
|
1423
1424
|
text: "unfold",
|
|
1424
1425
|
fontSize: 130,
|
|
1425
1426
|
vf: { wght: 600 },
|
|
@@ -1434,7 +1435,7 @@ var z = (e) => ({
|
|
|
1434
1435
|
id: "cascade-fast",
|
|
1435
1436
|
label: "Fast cascade",
|
|
1436
1437
|
sub: "Reveal",
|
|
1437
|
-
comp:
|
|
1438
|
+
comp: V({
|
|
1438
1439
|
text: "flicker",
|
|
1439
1440
|
fontSize: 130,
|
|
1440
1441
|
vf: { wght: 700 },
|
|
@@ -1449,7 +1450,7 @@ var z = (e) => ({
|
|
|
1449
1450
|
id: "typewriter",
|
|
1450
1451
|
label: "Typewriter",
|
|
1451
1452
|
sub: "Reveal",
|
|
1452
|
-
comp:
|
|
1453
|
+
comp: V({
|
|
1453
1454
|
text: "type_type_",
|
|
1454
1455
|
font: "rot",
|
|
1455
1456
|
fontSize: 100,
|
|
@@ -1469,7 +1470,7 @@ var z = (e) => ({
|
|
|
1469
1470
|
id: "spiral-cascade",
|
|
1470
1471
|
label: "Spiral reveal",
|
|
1471
1472
|
sub: "Reveal",
|
|
1472
|
-
comp:
|
|
1473
|
+
comp: V({
|
|
1473
1474
|
text: "spiral down",
|
|
1474
1475
|
fontSize: 74,
|
|
1475
1476
|
vf: { wght: 600 },
|
|
@@ -1488,7 +1489,7 @@ var z = (e) => ({
|
|
|
1488
1489
|
id: "circle-cascade",
|
|
1489
1490
|
label: "Ring reveal",
|
|
1490
1491
|
sub: "Reveal",
|
|
1491
|
-
comp:
|
|
1492
|
+
comp: V({
|
|
1492
1493
|
text: "AROUND",
|
|
1493
1494
|
font: "malromur",
|
|
1494
1495
|
fontSize: 86,
|
|
@@ -1508,7 +1509,7 @@ var z = (e) => ({
|
|
|
1508
1509
|
id: "pop-mono",
|
|
1509
1510
|
label: "Mono pop",
|
|
1510
1511
|
sub: "Reveal",
|
|
1511
|
-
comp:
|
|
1512
|
+
comp: V({
|
|
1512
1513
|
text: "POP.POP.",
|
|
1513
1514
|
font: "rot",
|
|
1514
1515
|
fontSize: 110,
|
|
@@ -1528,7 +1529,7 @@ var z = (e) => ({
|
|
|
1528
1529
|
id: "glyph-wave",
|
|
1529
1530
|
label: "Ripple",
|
|
1530
1531
|
sub: "Wave",
|
|
1531
|
-
comp:
|
|
1532
|
+
comp: V({
|
|
1532
1533
|
text: "ripple",
|
|
1533
1534
|
font: "malromur",
|
|
1534
1535
|
fontSize: 140,
|
|
@@ -1545,7 +1546,7 @@ var z = (e) => ({
|
|
|
1545
1546
|
id: "sine-ripple",
|
|
1546
1547
|
label: "Sine ripple",
|
|
1547
1548
|
sub: "Wave",
|
|
1548
|
-
comp:
|
|
1549
|
+
comp: V({
|
|
1549
1550
|
text: "wavewave",
|
|
1550
1551
|
font: "rot",
|
|
1551
1552
|
fontSize: 108,
|
|
@@ -1568,7 +1569,7 @@ var z = (e) => ({
|
|
|
1568
1569
|
id: "glyph-big",
|
|
1569
1570
|
label: "Big ripple",
|
|
1570
1571
|
sub: "Wave",
|
|
1571
|
-
comp:
|
|
1572
|
+
comp: V({
|
|
1572
1573
|
text: "WAVES",
|
|
1573
1574
|
fontSize: 150,
|
|
1574
1575
|
vf: { wght: 700 },
|
|
@@ -1584,7 +1585,7 @@ var z = (e) => ({
|
|
|
1584
1585
|
id: "glyph-fast",
|
|
1585
1586
|
label: "Fast ripple",
|
|
1586
1587
|
sub: "Wave",
|
|
1587
|
-
comp:
|
|
1588
|
+
comp: V({
|
|
1588
1589
|
text: "shiver",
|
|
1589
1590
|
font: "malromur",
|
|
1590
1591
|
fontSize: 140,
|
|
@@ -1601,7 +1602,7 @@ var z = (e) => ({
|
|
|
1601
1602
|
id: "arc-glyphwave",
|
|
1602
1603
|
label: "Arc ripple",
|
|
1603
1604
|
sub: "Wave",
|
|
1604
|
-
comp:
|
|
1605
|
+
comp: V({
|
|
1605
1606
|
text: "on a curve",
|
|
1606
1607
|
font: "rot",
|
|
1607
1608
|
fontSize: 96,
|
|
@@ -1623,7 +1624,7 @@ var z = (e) => ({
|
|
|
1623
1624
|
id: "rot-flag-fast",
|
|
1624
1625
|
label: "Rot flag",
|
|
1625
1626
|
sub: "Wave",
|
|
1626
|
-
comp:
|
|
1627
|
+
comp: V({
|
|
1627
1628
|
text: "flutter",
|
|
1628
1629
|
font: "rot",
|
|
1629
1630
|
fontSize: 150,
|
|
@@ -1643,7 +1644,7 @@ var z = (e) => ({
|
|
|
1643
1644
|
id: "sine-ripple2",
|
|
1644
1645
|
label: "Sine flutter",
|
|
1645
1646
|
sub: "Wave",
|
|
1646
|
-
comp:
|
|
1647
|
+
comp: V({
|
|
1647
1648
|
text: "flowflow",
|
|
1648
1649
|
font: "rot",
|
|
1649
1650
|
fontSize: 100,
|
|
@@ -1667,7 +1668,7 @@ var z = (e) => ({
|
|
|
1667
1668
|
id: "sweep-x",
|
|
1668
1669
|
label: "Sweep X",
|
|
1669
1670
|
sub: "Sweep",
|
|
1670
|
-
comp:
|
|
1671
|
+
comp: V({
|
|
1671
1672
|
text: "SWEEP",
|
|
1672
1673
|
fontSize: 150,
|
|
1673
1674
|
vf: { wght: 700 },
|
|
@@ -1683,7 +1684,7 @@ var z = (e) => ({
|
|
|
1683
1684
|
id: "sweep-y",
|
|
1684
1685
|
label: "Sweep Y",
|
|
1685
1686
|
sub: "Sweep",
|
|
1686
|
-
comp:
|
|
1687
|
+
comp: V({
|
|
1687
1688
|
text: "descend",
|
|
1688
1689
|
font: "rot",
|
|
1689
1690
|
fontSize: 130,
|
|
@@ -1703,7 +1704,7 @@ var z = (e) => ({
|
|
|
1703
1704
|
id: "sweep-radial",
|
|
1704
1705
|
label: "Radial pulse",
|
|
1705
1706
|
sub: "Sweep",
|
|
1706
|
-
comp:
|
|
1707
|
+
comp: V({
|
|
1707
1708
|
text: "PULSE",
|
|
1708
1709
|
font: "malromur",
|
|
1709
1710
|
fontSize: 140,
|
|
@@ -1720,7 +1721,7 @@ var z = (e) => ({
|
|
|
1720
1721
|
id: "sweep-weight",
|
|
1721
1722
|
label: "Sweep weight",
|
|
1722
1723
|
sub: "Sweep",
|
|
1723
|
-
comp:
|
|
1724
|
+
comp: V({
|
|
1724
1725
|
text: "WEIGHT",
|
|
1725
1726
|
fontSize: 150,
|
|
1726
1727
|
vf: { wght: 300 },
|
|
@@ -1736,7 +1737,7 @@ var z = (e) => ({
|
|
|
1736
1737
|
id: "sweep-shift",
|
|
1737
1738
|
label: "Sweep shift",
|
|
1738
1739
|
sub: "Sweep",
|
|
1739
|
-
comp:
|
|
1740
|
+
comp: V({
|
|
1740
1741
|
text: "shiver",
|
|
1741
1742
|
font: "rot",
|
|
1742
1743
|
fontSize: 130,
|
|
@@ -1756,7 +1757,7 @@ var z = (e) => ({
|
|
|
1756
1757
|
id: "orbit-spin",
|
|
1757
1758
|
label: "Orbit",
|
|
1758
1759
|
sub: "Orbit",
|
|
1759
|
-
comp:
|
|
1760
|
+
comp: V({
|
|
1760
1761
|
text: "ORBIT",
|
|
1761
1762
|
font: "malromur",
|
|
1762
1763
|
fontSize: 88,
|
|
@@ -1775,7 +1776,7 @@ var z = (e) => ({
|
|
|
1775
1776
|
id: "orbit-fast",
|
|
1776
1777
|
label: "Fast orbit",
|
|
1777
1778
|
sub: "Orbit",
|
|
1778
|
-
comp:
|
|
1779
|
+
comp: V({
|
|
1779
1780
|
text: "spinning",
|
|
1780
1781
|
fontSize: 84,
|
|
1781
1782
|
vf: { wght: 600 },
|
|
@@ -1793,7 +1794,7 @@ var z = (e) => ({
|
|
|
1793
1794
|
id: "ellipse-orbit",
|
|
1794
1795
|
label: "Ellipse orbit",
|
|
1795
1796
|
sub: "Orbit",
|
|
1796
|
-
comp:
|
|
1797
|
+
comp: V({
|
|
1797
1798
|
text: "ORBITAL",
|
|
1798
1799
|
font: "rot",
|
|
1799
1800
|
fontSize: 78,
|
|
@@ -1815,7 +1816,7 @@ var z = (e) => ({
|
|
|
1815
1816
|
id: "array-pulse",
|
|
1816
1817
|
label: "Grid pulse",
|
|
1817
1818
|
sub: "Array",
|
|
1818
|
-
comp:
|
|
1819
|
+
comp: V({
|
|
1819
1820
|
text: "NODE",
|
|
1820
1821
|
font: "rot",
|
|
1821
1822
|
fontSize: 44,
|
|
@@ -1840,7 +1841,7 @@ var z = (e) => ({
|
|
|
1840
1841
|
id: "array-wave",
|
|
1841
1842
|
label: "Grid wave",
|
|
1842
1843
|
sub: "Array",
|
|
1843
|
-
comp:
|
|
1844
|
+
comp: V({
|
|
1844
1845
|
text: "echo",
|
|
1845
1846
|
font: "rot",
|
|
1846
1847
|
fontSize: 52,
|
|
@@ -1865,7 +1866,7 @@ var z = (e) => ({
|
|
|
1865
1866
|
id: "array-weight",
|
|
1866
1867
|
label: "Grid weight",
|
|
1867
1868
|
sub: "Array",
|
|
1868
|
-
comp:
|
|
1869
|
+
comp: V({
|
|
1869
1870
|
text: "OK",
|
|
1870
1871
|
font: "rot",
|
|
1871
1872
|
fontSize: 88,
|
|
@@ -1890,7 +1891,7 @@ var z = (e) => ({
|
|
|
1890
1891
|
id: "stacked",
|
|
1891
1892
|
label: "Stacked",
|
|
1892
1893
|
sub: "Composite",
|
|
1893
|
-
comp:
|
|
1894
|
+
comp: V({
|
|
1894
1895
|
id: "a",
|
|
1895
1896
|
text: "KINETIC",
|
|
1896
1897
|
font: "gullhamrar",
|
|
@@ -1927,7 +1928,7 @@ var z = (e) => ({
|
|
|
1927
1928
|
id: "grid-and-ring",
|
|
1928
1929
|
label: "Grid + ring",
|
|
1929
1930
|
sub: "Composite",
|
|
1930
|
-
comp:
|
|
1931
|
+
comp: Ae("#0a0b14", {
|
|
1931
1932
|
id: "a",
|
|
1932
1933
|
text: "echo",
|
|
1933
1934
|
font: "rot",
|
|
@@ -1962,107 +1963,107 @@ var z = (e) => ({
|
|
|
1962
1963
|
}
|
|
1963
1964
|
})
|
|
1964
1965
|
}
|
|
1965
|
-
],
|
|
1966
|
+
], je = (e) => H.find((t) => t.id === e) || H[0], Me = [
|
|
1966
1967
|
"Radial",
|
|
1967
1968
|
"Rings",
|
|
1968
1969
|
"Path"
|
|
1969
|
-
],
|
|
1970
|
+
], Ne = [{
|
|
1970
1971
|
label: "Type",
|
|
1971
|
-
subs:
|
|
1972
|
+
subs: Me
|
|
1972
1973
|
}, {
|
|
1973
1974
|
label: "Kinetic",
|
|
1974
|
-
subs: [...new Set(
|
|
1975
|
-
}],
|
|
1975
|
+
subs: [...new Set(H.map((e) => e.sub))].filter((e) => !Me.includes(e))
|
|
1976
|
+
}], Pe = (e) => structuredClone(e.comp), U = {
|
|
1976
1977
|
dLen: 0,
|
|
1977
1978
|
dNormal: 0,
|
|
1978
1979
|
scale: 1,
|
|
1979
1980
|
dRot: 0,
|
|
1980
1981
|
opacity: 1,
|
|
1981
1982
|
vf: null
|
|
1982
|
-
},
|
|
1983
|
-
none: () =>
|
|
1983
|
+
}, Fe = {
|
|
1984
|
+
none: () => U,
|
|
1984
1985
|
march: (e) => ({
|
|
1985
|
-
...
|
|
1986
|
+
...U,
|
|
1986
1987
|
dLen: e.u * e.pathLen * Math.max(1, Math.round(e.m.cycles || 1))
|
|
1987
1988
|
}),
|
|
1988
1989
|
orbit: (e) => ({
|
|
1989
|
-
...
|
|
1990
|
+
...U,
|
|
1990
1991
|
dLen: e.u * e.pathLen * Math.max(1, Math.round(e.m.cycles || 1))
|
|
1991
1992
|
}),
|
|
1992
|
-
vfwave: (
|
|
1993
|
-
let
|
|
1993
|
+
vfwave: (t) => {
|
|
1994
|
+
let r = Math.max(1, Math.round(t.m.cycles || 1)), i = .5 + .5 * Math.sin(t.u * e * r - t.i * (t.m.phase ?? .5));
|
|
1994
1995
|
return {
|
|
1995
|
-
...
|
|
1996
|
-
vf: { [
|
|
1996
|
+
...U,
|
|
1997
|
+
vf: { [t.axisTag]: n(t.axisMin, t.axisMax, i) }
|
|
1997
1998
|
};
|
|
1998
1999
|
},
|
|
1999
|
-
glyphwave: (
|
|
2000
|
-
let
|
|
2000
|
+
glyphwave: (t) => {
|
|
2001
|
+
let n = Math.max(1, Math.round(t.m.cycles || 1)), r = Math.sin(t.u * e * n - t.i * (t.m.phase ?? .5));
|
|
2001
2002
|
return {
|
|
2002
|
-
...
|
|
2003
|
-
dNormal: (
|
|
2003
|
+
...U,
|
|
2004
|
+
dNormal: (t.m.amp ?? .3) * t.sizePx * r
|
|
2004
2005
|
};
|
|
2005
2006
|
},
|
|
2006
|
-
cascade: (
|
|
2007
|
-
let
|
|
2007
|
+
cascade: (t) => {
|
|
2008
|
+
let r = Math.max(1, Math.round(t.m.cycles || 1)), i = .5 + .5 * Math.sin(t.u * e * r - t.i * (t.m.phase ?? .6));
|
|
2008
2009
|
return {
|
|
2009
|
-
...
|
|
2010
|
-
scale:
|
|
2011
|
-
opacity:
|
|
2010
|
+
...U,
|
|
2011
|
+
scale: n(.25, 1, i),
|
|
2012
|
+
opacity: n(.15, 1, i)
|
|
2012
2013
|
};
|
|
2013
2014
|
},
|
|
2014
2015
|
sweep: (e) => {
|
|
2015
|
-
let t =
|
|
2016
|
+
let t = ze(e);
|
|
2016
2017
|
return {
|
|
2017
|
-
...
|
|
2018
|
-
scale:
|
|
2019
|
-
opacity:
|
|
2018
|
+
...U,
|
|
2019
|
+
scale: n(.25, 1, t),
|
|
2020
|
+
opacity: n(.12, 1, t)
|
|
2020
2021
|
};
|
|
2021
2022
|
},
|
|
2022
2023
|
sweepWeight: (e) => {
|
|
2023
|
-
let t =
|
|
2024
|
+
let t = ze(e);
|
|
2024
2025
|
return {
|
|
2025
|
-
...
|
|
2026
|
-
vf: { [e.axisTag]:
|
|
2026
|
+
...U,
|
|
2027
|
+
vf: { [e.axisTag]: n(e.axisMin, e.axisMax, t) }
|
|
2027
2028
|
};
|
|
2028
2029
|
},
|
|
2029
2030
|
sweepShift: (e) => {
|
|
2030
|
-
let t =
|
|
2031
|
+
let t = ze(e);
|
|
2031
2032
|
return {
|
|
2032
|
-
...
|
|
2033
|
+
...U,
|
|
2033
2034
|
dNormal: t * .6 * e.sizePx
|
|
2034
2035
|
};
|
|
2035
2036
|
}
|
|
2036
|
-
},
|
|
2037
|
-
function
|
|
2037
|
+
}, Ie = (e) => e - Math.floor(e);
|
|
2038
|
+
function Le(e, t) {
|
|
2038
2039
|
if (t <= 0) return 0;
|
|
2039
2040
|
let n = Math.min(1, e / t);
|
|
2040
2041
|
return 1 - n * n * (3 - 2 * n);
|
|
2041
2042
|
}
|
|
2042
|
-
function
|
|
2043
|
-
let s =
|
|
2044
|
-
let t = Math.abs(
|
|
2045
|
-
return
|
|
2043
|
+
function Re(t, n, r, i, a, o) {
|
|
2044
|
+
let s = Ie(i * a), c = Math.max(.02, o * .5), l = (e) => {
|
|
2045
|
+
let t = Math.abs(Ie(e) - s);
|
|
2046
|
+
return Le(Math.min(t, 1 - t), c);
|
|
2046
2047
|
};
|
|
2047
|
-
switch (
|
|
2048
|
-
case "y": return l(
|
|
2049
|
-
case "diagonal": return l(.5 + (
|
|
2050
|
-
case "radial": return l(Math.hypot(
|
|
2051
|
-
case "angular": return l(Math.atan2(
|
|
2048
|
+
switch (t) {
|
|
2049
|
+
case "y": return l(r);
|
|
2050
|
+
case "diagonal": return l(.5 + (n - .5) * .7071 + (r - .5) * .7071);
|
|
2051
|
+
case "radial": return l(Math.hypot(n - .5, r - .5) / .7071);
|
|
2052
|
+
case "angular": return l(Math.atan2(r - .5, n - .5) / e + .5);
|
|
2052
2053
|
case "wave": {
|
|
2053
|
-
let
|
|
2054
|
-
return .5 + .5 * Math.sin((
|
|
2054
|
+
let t = Math.max(1, Math.round(1 + (1 - o) * 6));
|
|
2055
|
+
return .5 + .5 * Math.sin((n * t - i * a) * e);
|
|
2055
2056
|
}
|
|
2056
|
-
default: return l(
|
|
2057
|
+
default: return l(n);
|
|
2057
2058
|
}
|
|
2058
2059
|
}
|
|
2059
|
-
var
|
|
2060
|
-
function
|
|
2061
|
-
return (
|
|
2060
|
+
var ze = (e) => Re(e.m.field || "x", e.nx ?? .5, e.ny ?? .5, e.u, Math.max(1, Math.round(e.m.cycles || 1)), e.m.amp ?? .35);
|
|
2061
|
+
function Be(e, t) {
|
|
2062
|
+
return (Fe[e] || Fe.none)(t);
|
|
2062
2063
|
}
|
|
2063
2064
|
//#endregion
|
|
2064
2065
|
//#region src/kinetic/features.js
|
|
2065
|
-
var
|
|
2066
|
+
var Ve = [
|
|
2066
2067
|
{
|
|
2067
2068
|
tag: "liga",
|
|
2068
2069
|
label: "Ligatures"
|
|
@@ -2104,7 +2105,7 @@ var He = [
|
|
|
2104
2105
|
label: "Stylistic set 2"
|
|
2105
2106
|
}
|
|
2106
2107
|
];
|
|
2107
|
-
function
|
|
2108
|
+
function He(e) {
|
|
2108
2109
|
if (!e) return "normal";
|
|
2109
2110
|
let t = [];
|
|
2110
2111
|
for (let [n, r] of Object.entries(e)) t.push(`"${n}" ${+!!r}`);
|
|
@@ -2112,11 +2113,11 @@ function Ue(e) {
|
|
|
2112
2113
|
}
|
|
2113
2114
|
//#endregion
|
|
2114
2115
|
//#region src/kinetic/KineticType.js
|
|
2115
|
-
var
|
|
2116
|
-
function
|
|
2116
|
+
var Ue = "http://www.w3.org/2000/svg", W = (e) => e - Math.floor(e), G = (e) => document.createElementNS(Ue, e);
|
|
2117
|
+
function We(e, t) {
|
|
2117
2118
|
return !e || !t || t === "none" ? e || "" : t === "upper" ? e.toUpperCase() : t === "lower" ? e.toLowerCase() : t === "title" ? e.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
2118
2119
|
}
|
|
2119
|
-
function
|
|
2120
|
+
function Ge(e) {
|
|
2120
2121
|
if (!e) return {
|
|
2121
2122
|
bg: "#16202E",
|
|
2122
2123
|
instances: []
|
|
@@ -2131,11 +2132,11 @@ function Ke(e) {
|
|
|
2131
2132
|
}]
|
|
2132
2133
|
};
|
|
2133
2134
|
}
|
|
2134
|
-
var
|
|
2135
|
+
var Ke = class {
|
|
2135
2136
|
constructor(e) {
|
|
2136
|
-
this.host = e, this.params =
|
|
2137
|
-
let t =
|
|
2138
|
-
t.setAttribute("xmlns",
|
|
2137
|
+
this.host = e, this.params = Ge(null), this.w = 0, this.h = 0, this._rt = /* @__PURE__ */ new Map(), this._instSig = "", this._needsRemeasure = !1;
|
|
2138
|
+
let t = G("svg");
|
|
2139
|
+
t.setAttribute("xmlns", Ue), t.style.display = "block", t.style.maxWidth = "100%", t.style.maxHeight = "100%", t.style.pointerEvents = "none", t.style.overflow = "hidden", this._clipApplied = !0, this.bg = G("rect"), this.layer = G("g"), this.measEl = G("text"), this.measEl.setAttribute("x", "0"), this.measEl.setAttribute("y", "0"), this.measEl.style.visibility = "hidden", t.append(this.bg, this.layer, this.measEl), e.appendChild(t), this.svg = t, e.__kolKineticEngine = this, typeof document < "u" && document.fonts && document.fonts.ready.then(() => {
|
|
2139
2140
|
this._needsRemeasure = !0;
|
|
2140
2141
|
}).catch(() => {});
|
|
2141
2142
|
}
|
|
@@ -2144,10 +2145,10 @@ var qe = class {
|
|
|
2144
2145
|
for (let e of this._rt.values()) e.cache = null;
|
|
2145
2146
|
}
|
|
2146
2147
|
setComposition(e) {
|
|
2147
|
-
this.params =
|
|
2148
|
+
this.params = Ge(e);
|
|
2148
2149
|
}
|
|
2149
2150
|
renderAt(e) {
|
|
2150
|
-
!this.w || !this.h || this._render(
|
|
2151
|
+
!this.w || !this.h || this._render(r(e));
|
|
2151
2152
|
}
|
|
2152
2153
|
getInstanceRect(e) {
|
|
2153
2154
|
let t = this._rt.get(e);
|
|
@@ -2189,9 +2190,9 @@ var qe = class {
|
|
|
2189
2190
|
for (let t of e) {
|
|
2190
2191
|
let e = this._rt.get(t.id);
|
|
2191
2192
|
if (!e) {
|
|
2192
|
-
let n =
|
|
2193
|
+
let n = G("g"), r = G("path");
|
|
2193
2194
|
r.setAttribute("fill", "none");
|
|
2194
|
-
let i =
|
|
2195
|
+
let i = G("g");
|
|
2195
2196
|
i.setAttribute("data-glyphs", t.id), n.append(r, i), e = {
|
|
2196
2197
|
group: n,
|
|
2197
2198
|
pathEl: r,
|
|
@@ -2222,16 +2223,16 @@ var qe = class {
|
|
|
2222
2223
|
if (i !== e.glyphKey) {
|
|
2223
2224
|
e.glyphKey = i, e.glyphG.textContent = "", e.glyphEls = [];
|
|
2224
2225
|
for (let n = 0; n < r; n++) for (let n of t) {
|
|
2225
|
-
let t =
|
|
2226
|
+
let t = G("text");
|
|
2226
2227
|
t.setAttribute("text-anchor", "middle"), t.setAttribute("dominant-baseline", "central"), t.textContent = n, e.glyphG.appendChild(t), e.glyphEls.push(t);
|
|
2227
2228
|
}
|
|
2228
2229
|
}
|
|
2229
2230
|
}
|
|
2230
2231
|
_measure(e, t, n, r) {
|
|
2231
|
-
let i = t.letterSpacing || 0, a =
|
|
2232
|
+
let i = t.letterSpacing || 0, a = He(t.opentype), o = `${r}|${n.family}|${t.fontSize}|${i}|${ne(t.vf)}|${a}`;
|
|
2232
2233
|
if (e.cache && e.cache.key === o) return e.cache;
|
|
2233
2234
|
let s = this.measEl;
|
|
2234
|
-
s.style.fontFamily = `'${n.family}'`, s.style.fontSize = `${t.fontSize}px`, s.style.letterSpacing = `${i}px`, s.style.fontVariationSettings =
|
|
2235
|
+
s.style.fontFamily = `'${n.family}'`, s.style.fontSize = `${t.fontSize}px`, s.style.letterSpacing = `${i}px`, s.style.fontVariationSettings = ne(t.vf), s.style.fontFeatureSettings = a, s.textContent = r;
|
|
2235
2236
|
let c = r.length, l = Array(c), u = 0;
|
|
2236
2237
|
try {
|
|
2237
2238
|
u = s.getComputedTextLength();
|
|
@@ -2249,43 +2250,43 @@ var qe = class {
|
|
|
2249
2250
|
}, e.cache;
|
|
2250
2251
|
}
|
|
2251
2252
|
_renderInstance(e, t, n) {
|
|
2252
|
-
let r =
|
|
2253
|
-
if (t.group.setAttribute("transform", `translate(${
|
|
2254
|
-
let n =
|
|
2255
|
-
if (
|
|
2256
|
-
this._setKind(t, "morph"), this._renderMorph(e, t, i,
|
|
2253
|
+
let r = E(e.font), i = e.phase ? W(n + e.phase) : n, a = We(e.text || "", e.case), o = Math.max(1, Math.round(e.multiply || 1)), s = o > 1 && a ? Array(o).fill(a).join(" ") : a, c = e.path?.type || "line", d = (e.offset?.x || 0) * this.w, f = (e.offset?.y || 0) * this.h;
|
|
2254
|
+
if (t.group.setAttribute("transform", `translate(${d.toFixed(2)} ${f.toFixed(2)})`), e.morph?.on && !I(c) && !we(c)) {
|
|
2255
|
+
let n = (t) => e.italic && t.italicUrl ? t.italicUrl : t.url, a = n(r), o = e.morph.face2 ? E(e.morph.face2) : null, d = o ? n(o) : a, f = l(a), p = l(d);
|
|
2256
|
+
if (f && p) {
|
|
2257
|
+
this._setKind(t, "morph"), this._renderMorph(e, t, i, f, p, r, s, c);
|
|
2257
2258
|
return;
|
|
2258
2259
|
}
|
|
2259
|
-
|
|
2260
|
+
f || u(a).catch(() => {}), !p && d !== a && u(d).catch(() => {});
|
|
2260
2261
|
}
|
|
2261
|
-
if (this._setKind(t, "text"),
|
|
2262
|
+
if (this._setKind(t, "text"), Ce(c)) {
|
|
2262
2263
|
t.pathEl.setAttribute("d", ""), t.pathEl.style.opacity = 0;
|
|
2263
2264
|
let n = Math.max(1, Math.round(e.path?.rows ?? 2)), a = Math.max(1, Math.round(e.path?.cols ?? 3));
|
|
2264
2265
|
if (this._ensureGlyphs(t, s, r, n * a), !s.length) return;
|
|
2265
2266
|
this._measure(t, e, r, s), this._placeArray(e, t, r, i, t.glyphEls, n, a);
|
|
2266
2267
|
return;
|
|
2267
2268
|
}
|
|
2268
|
-
if (
|
|
2269
|
+
if (I(c) || we(c)) {
|
|
2269
2270
|
t.pathEl.setAttribute("d", ""), t.pathEl.style.opacity = 0;
|
|
2270
2271
|
let n = Math.max(1, Math.round(e.path?.count ?? 12));
|
|
2271
2272
|
if (this._ensureGlyphs(t, s, r, n), !s.length) return;
|
|
2272
|
-
this._measure(t, e, r, s),
|
|
2273
|
+
this._measure(t, e, r, s), I(c) ? this._placeRadial(e, t, r, i, t.glyphEls, n) : this._placeRings(e, t, r, i, t.glyphEls, n);
|
|
2273
2274
|
return;
|
|
2274
2275
|
}
|
|
2275
|
-
let p =
|
|
2276
|
+
let p = Te(c, this.w, this.h, e.path || {});
|
|
2276
2277
|
t.closed = p.closed, t.pathEl.setAttribute("d", p.d), t.pathEl.setAttribute("stroke", e.showPath ? e.fill || "#888" : "none"), t.pathEl.setAttribute("stroke-width", +!!e.showPath), t.pathEl.style.opacity = e.showPath ? .25 : 0, this._ensureGlyphs(t, s, r, 1), s.length && (this._measure(t, e, r, s), this._placeOnPath(e, t, r, i, t.glyphEls));
|
|
2277
2278
|
}
|
|
2278
2279
|
_styleGlyph(e, t, n, r) {
|
|
2279
|
-
e.style.fontFamily = `'${n.family}'`, e.style.fontSize = `${t.fontSize}px`, e.style.fontStyle = t.italic ? "italic" : "normal", e.style.fontVariationSettings =
|
|
2280
|
+
e.style.fontFamily = `'${n.family}'`, e.style.fontSize = `${t.fontSize}px`, e.style.fontStyle = t.italic ? n.italicStyle || "italic" : "normal", e.style.fontVariationSettings = ne(r.vf ? {
|
|
2280
2281
|
...t.vf,
|
|
2281
2282
|
...r.vf
|
|
2282
|
-
} : t.vf), e.style.fontFeatureSettings =
|
|
2283
|
+
} : t.vf), e.style.fontFeatureSettings = He(t.opentype), e.setAttribute("fill", t.fill || "#e8e4dc"), e.setAttribute("opacity", r.opacity);
|
|
2283
2284
|
}
|
|
2284
2285
|
_anim(e, t, n) {
|
|
2285
2286
|
let r = e.motions && e.motions.length ? [e.motion, ...e.motions] : [e.motion], i = 0, a = 0, o = 0, s = 1, c = 1, l = null;
|
|
2286
2287
|
for (let e of r) {
|
|
2287
2288
|
if (!e || (e.mode || "none") === "none") continue;
|
|
2288
|
-
let r = n.axes.find((t) => t.tag === (e.axis || n.axes[0] && n.axes[0].tag)), u =
|
|
2289
|
+
let r = n.axes.find((t) => t.tag === (e.axis || n.axes[0] && n.axes[0].tag)), u = Be(e.mode, {
|
|
2289
2290
|
...t,
|
|
2290
2291
|
m: e,
|
|
2291
2292
|
axisTag: r ? r.tag : "wght",
|
|
@@ -2306,167 +2307,169 @@ var qe = class {
|
|
|
2306
2307
|
vf: l
|
|
2307
2308
|
};
|
|
2308
2309
|
}
|
|
2309
|
-
_placeOnPath(e, t, n,
|
|
2310
|
-
let
|
|
2311
|
-
if (!a) return;
|
|
2312
|
-
let o = t.pathEl.getTotalLength();
|
|
2310
|
+
_placeOnPath(e, t, n, i, a) {
|
|
2311
|
+
let o = t.cache;
|
|
2313
2312
|
if (!o) return;
|
|
2314
|
-
let
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2313
|
+
let s = t.pathEl.getTotalLength();
|
|
2314
|
+
if (!s) return;
|
|
2315
|
+
let { centers: c, total: l } = o, u = e.align || "center", d = u === "start" ? 0 : u === "end" ? s - l : (s - l) / 2, f = .75, p = t.closed, m = e.flow === "flow" && !p, h = (e) => p ? (e % s + s) % s : Math.max(0, Math.min(s, e)), g = (e) => {
|
|
2316
|
+
if (m && (e < 0 || e > s)) {
|
|
2317
|
+
let n = e < 0 ? 0 : s, r = t.pathEl.getPointAtLength(n), i = t.pathEl.getPointAtLength(Math.max(0, n - f)), a = t.pathEl.getPointAtLength(Math.min(s, n + f)), o = a.x - i.x, c = a.y - i.y, l = Math.hypot(o, c) || 1;
|
|
2318
|
+
o /= l, c /= l;
|
|
2318
2319
|
let u = e - n;
|
|
2319
2320
|
return {
|
|
2320
|
-
x: r.x +
|
|
2321
|
+
x: r.x + o * u,
|
|
2321
2322
|
y: r.y + c * u
|
|
2322
2323
|
};
|
|
2323
2324
|
}
|
|
2324
2325
|
return t.pathEl.getPointAtLength(h(e));
|
|
2325
|
-
}, _ = Math.min(
|
|
2326
|
+
}, _ = Math.min(a.length, c.length), v = r(e.stagger || 0), y = Math.max(1, Math.round(e.multiply || 1)), b = (c.length + 2) / y;
|
|
2326
2327
|
for (let t = 0; t < _; t++) {
|
|
2327
|
-
let
|
|
2328
|
+
let r = d + c[t], o = g(r), l = v && y > 1 ? W(i + v * Math.floor(t / b) / y) : i, u = this._anim(e, {
|
|
2328
2329
|
i: t,
|
|
2329
|
-
n:
|
|
2330
|
+
n: c.length,
|
|
2330
2331
|
u: l,
|
|
2331
2332
|
sizePx: e.fontSize,
|
|
2332
|
-
pathLen:
|
|
2333
|
-
nx: this.w ?
|
|
2334
|
-
ny: this.h ?
|
|
2335
|
-
}, n), p =
|
|
2336
|
-
|
|
2333
|
+
pathLen: s,
|
|
2334
|
+
nx: this.w ? o.x / this.w : .5,
|
|
2335
|
+
ny: this.h ? o.y / this.h : .5
|
|
2336
|
+
}, n), p = r + u.dLen, m = g(p), h = g(p - f), _ = g(p + f), x = Math.atan2(_.y - h.y, _.x - h.x) * 180 / Math.PI;
|
|
2337
|
+
a[t].setAttribute("transform", `translate(${m.x.toFixed(2)} ${m.y.toFixed(2)}) rotate(${(x + u.dRot).toFixed(2)}) translate(0 ${(-u.dNormal).toFixed(2)}) scale(${u.scale.toFixed(3)})`), this._styleGlyph(a[t], e, n, u);
|
|
2337
2338
|
}
|
|
2338
2339
|
}
|
|
2339
|
-
_placeArray(e, t, n,
|
|
2340
|
-
let
|
|
2341
|
-
if (!
|
|
2342
|
-
let { centers:
|
|
2343
|
-
if (!
|
|
2344
|
-
let
|
|
2340
|
+
_placeArray(e, t, n, i, a, o, s) {
|
|
2341
|
+
let c = t.cache;
|
|
2342
|
+
if (!c) return;
|
|
2343
|
+
let { centers: l, total: u } = c, d = l.length;
|
|
2344
|
+
if (!d) return;
|
|
2345
|
+
let f = Math.min(this.w, this.h) * .08, p = (this.w - 2 * f) / s, m = (this.h - 2 * f) / o, h = r(e.stagger || 0), g = o * s;
|
|
2345
2346
|
for (let t = 0; t < g; t++) {
|
|
2346
|
-
let
|
|
2347
|
-
for (let r = 0; r <
|
|
2348
|
-
let
|
|
2349
|
-
if (!
|
|
2350
|
-
let o = _ +
|
|
2351
|
-
i: t *
|
|
2352
|
-
n: g *
|
|
2347
|
+
let r = Math.floor(t / s), o = f + t % s * p + p / 2, c = f + r * m + m / 2, _ = o - u / 2, v = h ? W(i + h * t / g) : i;
|
|
2348
|
+
for (let r = 0; r < d; r++) {
|
|
2349
|
+
let i = a[t * d + r];
|
|
2350
|
+
if (!i) continue;
|
|
2351
|
+
let o = _ + l[r], s = this._anim(e, {
|
|
2352
|
+
i: t * d + r,
|
|
2353
|
+
n: g * d,
|
|
2353
2354
|
u: v,
|
|
2354
2355
|
sizePx: e.fontSize,
|
|
2355
2356
|
pathLen: 0,
|
|
2356
2357
|
nx: this.w ? o / this.w : .5,
|
|
2357
|
-
ny: this.h ?
|
|
2358
|
-
}, n),
|
|
2359
|
-
|
|
2358
|
+
ny: this.h ? c / this.h : .5
|
|
2359
|
+
}, n), u = c - s.dNormal;
|
|
2360
|
+
i.setAttribute("transform", `translate(${o.toFixed(2)} ${u.toFixed(2)}) rotate(${s.dRot.toFixed(2)}) scale(${s.scale.toFixed(3)})`), this._styleGlyph(i, e, n, s);
|
|
2360
2361
|
}
|
|
2361
2362
|
}
|
|
2362
2363
|
}
|
|
2363
|
-
_placeRadial(
|
|
2364
|
-
let
|
|
2365
|
-
if (!
|
|
2366
|
-
let { centers:
|
|
2367
|
-
if (!
|
|
2368
|
-
let
|
|
2369
|
-
for (let
|
|
2370
|
-
let
|
|
2371
|
-
for (let
|
|
2372
|
-
let
|
|
2373
|
-
if (!
|
|
2374
|
-
let
|
|
2375
|
-
i,
|
|
2376
|
-
n:
|
|
2364
|
+
_placeRadial(t, n, i, a, o, s) {
|
|
2365
|
+
let c = n.cache;
|
|
2366
|
+
if (!c) return;
|
|
2367
|
+
let { centers: l } = c, u = l.length;
|
|
2368
|
+
if (!u) return;
|
|
2369
|
+
let d = this.w / 2, f = this.h / 2, p = Math.min(this.w, this.h) * .5, m = p * Math.max(0, Math.min(.95, t.path?.inner ?? .12)), h = Math.round(t.path?.spin ?? 1), g = r(t.stagger || 0);
|
|
2370
|
+
for (let n = 0; n < s; n++) {
|
|
2371
|
+
let r = s > 1 ? n / (s - 1) : 0, c = h + (g ? Math.round(g * 2 * r) : 0), _ = n / s * e + a * e * c, v = g ? W(a + g * n / s) : a, y = Math.cos(_), b = Math.sin(_), x = _ * 180 / Math.PI;
|
|
2372
|
+
for (let e = 0; e < u; e++) {
|
|
2373
|
+
let r = n * u + e, a = o[r];
|
|
2374
|
+
if (!a) continue;
|
|
2375
|
+
let c = m + l[e], h = d + y * c, g = f + b * c, _ = this._anim(t, {
|
|
2376
|
+
i: r,
|
|
2377
|
+
n: s * u,
|
|
2377
2378
|
u: v,
|
|
2378
|
-
sizePx:
|
|
2379
|
-
pathLen:
|
|
2379
|
+
sizePx: t.fontSize,
|
|
2380
|
+
pathLen: p,
|
|
2380
2381
|
nx: this.w ? h / this.w : .5,
|
|
2381
2382
|
ny: this.h ? g / this.h : .5
|
|
2382
|
-
},
|
|
2383
|
-
|
|
2383
|
+
}, i), S = c + _.dLen, C = d + y * S, w = f + b * S;
|
|
2384
|
+
a.setAttribute("transform", `translate(${C.toFixed(2)} ${w.toFixed(2)}) rotate(${(x + _.dRot).toFixed(2)}) translate(0 ${(-_.dNormal).toFixed(2)}) scale(${_.scale.toFixed(3)})`), this._styleGlyph(a, t, i, _);
|
|
2384
2385
|
}
|
|
2385
2386
|
}
|
|
2386
2387
|
}
|
|
2387
|
-
_placeRings(
|
|
2388
|
-
let
|
|
2389
|
-
if (!
|
|
2390
|
-
let { centers:
|
|
2391
|
-
if (!
|
|
2392
|
-
let
|
|
2393
|
-
for (let
|
|
2394
|
-
let
|
|
2395
|
-
for (let r = 0; r <
|
|
2396
|
-
let
|
|
2388
|
+
_placeRings(t, n, i, a, o, s) {
|
|
2389
|
+
let c = n.cache;
|
|
2390
|
+
if (!c) return;
|
|
2391
|
+
let { centers: l, total: u } = c, d = l.length;
|
|
2392
|
+
if (!d) return;
|
|
2393
|
+
let f = this.w / 2, p = this.h / 2, m = Math.min(this.w, this.h) * .5 * Math.max(.1, Math.min(1, t.path?.radius ?? .92)), h = m * Math.max(.02, Math.min(.95, t.path?.inner ?? .14)), g = Math.round(t.path?.spin ?? 1), _ = t.path?.twist ?? .5, v = t.path?.grow ?? .6, y = r(t.stagger || 0);
|
|
2394
|
+
for (let n = 0; n < s; n++) {
|
|
2395
|
+
let r = s > 1 ? n / (s - 1) : 0, c = Math.max(1, h + r * (m - h)), b = g + (y ? Math.round(y * 2 * r) : 0), x = a * e * b + r * _ * e, S = y ? W(a + y * n / s) : a, C = 1 + v * r;
|
|
2396
|
+
for (let r = 0; r < d; r++) {
|
|
2397
|
+
let a = n * d + r, m = o[a];
|
|
2397
2398
|
if (!m) continue;
|
|
2398
|
-
let h = x + (
|
|
2399
|
-
i:
|
|
2400
|
-
n:
|
|
2399
|
+
let h = x + (l[r] - u / 2) / c, g = f + Math.cos(h) * c, _ = p + Math.sin(h) * c, v = this._anim(t, {
|
|
2400
|
+
i: a,
|
|
2401
|
+
n: s * d,
|
|
2401
2402
|
u: S,
|
|
2402
|
-
sizePx:
|
|
2403
|
-
pathLen:
|
|
2403
|
+
sizePx: t.fontSize,
|
|
2404
|
+
pathLen: e * c,
|
|
2404
2405
|
nx: this.w ? g / this.w : .5,
|
|
2405
2406
|
ny: this.h ? _ / this.h : .5
|
|
2406
|
-
},
|
|
2407
|
-
m.setAttribute("transform", `translate(${
|
|
2407
|
+
}, i), y = h + v.dLen / c, b = c - v.dNormal, w = f + Math.cos(y) * b, ee = p + Math.sin(y) * b, te = y * 180 / Math.PI + 90 + v.dRot;
|
|
2408
|
+
m.setAttribute("transform", `translate(${w.toFixed(2)} ${ee.toFixed(2)}) rotate(${te.toFixed(2)}) scale(${(v.scale * C).toFixed(3)})`), this._styleGlyph(m, t, i, v);
|
|
2408
2409
|
}
|
|
2409
2410
|
}
|
|
2410
2411
|
}
|
|
2411
2412
|
_setKind(e, t) {
|
|
2412
2413
|
e.kind !== t && (e.kind = t, e.glyphG.textContent = "", e.glyphEls = [], e.morphEls = [], e.glyphKey = "", e.morphKey = "", e.morphPoolKey = "", e.cache = null);
|
|
2413
2414
|
}
|
|
2414
|
-
_renderMorph(e, t, n, i, a, o, s
|
|
2415
|
-
let
|
|
2416
|
-
for (let t of
|
|
2417
|
-
let
|
|
2418
|
-
if (!
|
|
2419
|
-
|
|
2415
|
+
_renderMorph(e, t, n, r, i, a, o, s) {
|
|
2416
|
+
let c = e.fontSize, l = a.axes || [], u = {};
|
|
2417
|
+
for (let t of l) u[t.tag] = e.vf?.[t.tag] ?? t.def;
|
|
2418
|
+
let d = !!e.morph.face2, f = {};
|
|
2419
|
+
if (!d) for (let t of l) f[t.tag] = e.morph.vf2?.[t.tag] ?? t.max;
|
|
2420
|
+
e.italic && a.slnt != null && (u.slnt = a.slnt, d || (f.slnt = a.slnt));
|
|
2421
|
+
let p = c * .12 + (e.letterSpacing || 0), m = e.morph.mode || "morph", h = e.morph.blend ?? .5, g = e.morph.curve || "flat", _ = e.morph.cp1 || {
|
|
2420
2422
|
x: .33,
|
|
2421
2423
|
y: .33
|
|
2422
2424
|
}, y = e.morph.cp2 || {
|
|
2423
2425
|
x: .66,
|
|
2424
2426
|
y: .66
|
|
2425
2427
|
}, b = e.fill || "#e8e4dc", x = JSON.stringify([
|
|
2426
|
-
|
|
2428
|
+
o,
|
|
2427
2429
|
e.font,
|
|
2428
2430
|
e.morph.face2 || "",
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2431
|
+
!!e.italic,
|
|
2432
|
+
c,
|
|
2433
|
+
u,
|
|
2434
|
+
f,
|
|
2435
|
+
m,
|
|
2432
2436
|
h,
|
|
2433
2437
|
g,
|
|
2434
2438
|
_,
|
|
2435
|
-
v,
|
|
2436
2439
|
y,
|
|
2437
2440
|
e.letterSpacing || 0,
|
|
2438
2441
|
b
|
|
2439
2442
|
]), S = x !== t.morphKey;
|
|
2440
2443
|
if (S) {
|
|
2441
2444
|
t.morphKey = x;
|
|
2442
|
-
let e = r
|
|
2443
|
-
mode:
|
|
2444
|
-
blend:
|
|
2445
|
-
curve:
|
|
2446
|
-
cp1:
|
|
2445
|
+
let e = v(r, i, o, c, {
|
|
2446
|
+
mode: m,
|
|
2447
|
+
blend: h,
|
|
2448
|
+
curve: g,
|
|
2449
|
+
cp1: _,
|
|
2447
2450
|
cp2: y,
|
|
2448
|
-
coordsA:
|
|
2449
|
-
coordsB:
|
|
2450
|
-
axes:
|
|
2451
|
-
gap:
|
|
2451
|
+
coordsA: u,
|
|
2452
|
+
coordsB: f,
|
|
2453
|
+
axes: l,
|
|
2454
|
+
gap: p
|
|
2452
2455
|
});
|
|
2453
2456
|
t.morphData = e;
|
|
2454
|
-
let n = [],
|
|
2455
|
-
for (let t of e.glyphs) n.push(
|
|
2457
|
+
let n = [], a = 0;
|
|
2458
|
+
for (let t of e.glyphs) n.push(a + t.advance / 2), a += t.advance;
|
|
2456
2459
|
t.morphCenters = n, t.morphTotal = e.totalAdvance;
|
|
2457
2460
|
}
|
|
2458
|
-
let
|
|
2459
|
-
if (!
|
|
2461
|
+
let C = t.morphData?.glyphs.length || 0;
|
|
2462
|
+
if (!o.length || !C) {
|
|
2460
2463
|
t.pathEl.setAttribute("d", ""), t.pathEl.style.opacity = 0;
|
|
2461
2464
|
return;
|
|
2462
2465
|
}
|
|
2463
|
-
let
|
|
2464
|
-
if ((S || E) && this._refreshMorphPaths(t, T,
|
|
2465
|
-
t.pathEl.setAttribute("d", ""), t.pathEl.style.opacity = 0, this._placeMorphArray(e, t,
|
|
2466
|
+
let w = Ce(s), ee = w ? Math.max(1, Math.round(e.path?.rows ?? 2)) : 1, te = w ? Math.max(1, Math.round(e.path?.cols ?? 3)) : 1, T = w ? ee * te : 1, E = this._ensureMorphPool(t, C, T, m);
|
|
2467
|
+
if ((S || E) && this._refreshMorphPaths(t, T, m, b), w) {
|
|
2468
|
+
t.pathEl.setAttribute("d", ""), t.pathEl.style.opacity = 0, this._placeMorphArray(e, t, a, n, ee, te);
|
|
2466
2469
|
return;
|
|
2467
2470
|
}
|
|
2468
|
-
let ne =
|
|
2469
|
-
t.closed = ne.closed, t.pathEl.setAttribute("d", ne.d), t.pathEl.setAttribute("stroke", e.showPath ? e.fill || "#888" : "none"), t.pathEl.setAttribute("stroke-width", +!!e.showPath), t.pathEl.style.opacity = e.showPath ? .25 : 0, this._placeMorphOnPath(e, t,
|
|
2471
|
+
let ne = Te(s, this.w, this.h, e.path || {});
|
|
2472
|
+
t.closed = ne.closed, t.pathEl.setAttribute("d", ne.d), t.pathEl.setAttribute("stroke", e.showPath ? e.fill || "#888" : "none"), t.pathEl.setAttribute("stroke-width", +!!e.showPath), t.pathEl.style.opacity = e.showPath ? .25 : 0, this._placeMorphOnPath(e, t, a, n);
|
|
2470
2473
|
}
|
|
2471
2474
|
_ensureMorphPool(e, t, n, r) {
|
|
2472
2475
|
let i = `${t}|${n}|${r}`;
|
|
@@ -2474,8 +2477,8 @@ var qe = class {
|
|
|
2474
2477
|
e.morphPoolKey = i, e.glyphG.textContent = "", e.morphEls = [];
|
|
2475
2478
|
let a = t * n;
|
|
2476
2479
|
for (let t = 0; t < a; t++) {
|
|
2477
|
-
let t =
|
|
2478
|
-
t.appendChild(
|
|
2480
|
+
let t = G("g");
|
|
2481
|
+
t.appendChild(G("path")), r === "fade" && t.appendChild(G("path")), e.glyphG.appendChild(t), e.morphEls.push(t);
|
|
2479
2482
|
}
|
|
2480
2483
|
return !0;
|
|
2481
2484
|
}
|
|
@@ -2494,79 +2497,79 @@ var qe = class {
|
|
|
2494
2497
|
let a = (n.x1 + n.x2) / 2, o = (n.y1 + n.y2) / 2;
|
|
2495
2498
|
e.setAttribute("transform", `translate(${(-a).toFixed(2)} ${(-o).toFixed(2)})`);
|
|
2496
2499
|
}
|
|
2497
|
-
_placeMorphOnPath(e, t, n,
|
|
2498
|
-
let
|
|
2499
|
-
if (!
|
|
2500
|
-
let
|
|
2501
|
-
if (!
|
|
2502
|
-
let
|
|
2503
|
-
if (
|
|
2504
|
-
let n = e < 0 ? 0 :
|
|
2505
|
-
o /= l,
|
|
2506
|
-
let
|
|
2500
|
+
_placeMorphOnPath(e, t, n, i, a = t.morphEls) {
|
|
2501
|
+
let o = t.morphCenters, s = t.morphTotal;
|
|
2502
|
+
if (!o || !a) return;
|
|
2503
|
+
let c = t.pathEl.getTotalLength();
|
|
2504
|
+
if (!c) return;
|
|
2505
|
+
let l = e.align || "center", u = l === "start" ? 0 : l === "end" ? c - s : (c - s) / 2, d = .75, f = t.closed, p = e.flow === "flow" && !f, m = (e) => f ? (e % c + c) % c : Math.max(0, Math.min(c, e)), h = (e) => {
|
|
2506
|
+
if (p && (e < 0 || e > c)) {
|
|
2507
|
+
let n = e < 0 ? 0 : c, r = t.pathEl.getPointAtLength(n), i = t.pathEl.getPointAtLength(Math.max(0, n - d)), a = t.pathEl.getPointAtLength(Math.min(c, n + d)), o = a.x - i.x, s = a.y - i.y, l = Math.hypot(o, s) || 1;
|
|
2508
|
+
o /= l, s /= l;
|
|
2509
|
+
let u = e - n;
|
|
2507
2510
|
return {
|
|
2508
|
-
x: r.x + o *
|
|
2509
|
-
y: r.y +
|
|
2511
|
+
x: r.x + o * u,
|
|
2512
|
+
y: r.y + s * u
|
|
2510
2513
|
};
|
|
2511
2514
|
}
|
|
2512
2515
|
return t.pathEl.getPointAtLength(m(e));
|
|
2513
|
-
}, g = e.italic ? " skewX(-12)" : "", _ = Math.min(
|
|
2516
|
+
}, g = e.italic ? " skewX(-12)" : "", _ = Math.min(a.length, o.length), v = r(e.stagger || 0), y = Math.max(1, Math.round(e.multiply || 1)), b = (o.length + 2) / y;
|
|
2514
2517
|
for (let t = 0; t < _; t++) {
|
|
2515
|
-
let
|
|
2518
|
+
let r = u + o[t], s = h(r), l = v && y > 1 ? W(i + v * Math.floor(t / b) / y) : i, f = this._anim(e, {
|
|
2516
2519
|
i: t,
|
|
2517
|
-
n:
|
|
2518
|
-
u:
|
|
2520
|
+
n: o.length,
|
|
2521
|
+
u: l,
|
|
2519
2522
|
sizePx: e.fontSize,
|
|
2520
|
-
pathLen:
|
|
2521
|
-
nx: this.w ?
|
|
2522
|
-
ny: this.h ?
|
|
2523
|
-
}, n), p =
|
|
2524
|
-
|
|
2523
|
+
pathLen: c,
|
|
2524
|
+
nx: this.w ? s.x / this.w : .5,
|
|
2525
|
+
ny: this.h ? s.y / this.h : .5
|
|
2526
|
+
}, n), p = r + f.dLen, m = h(p), _ = h(p - d), x = h(p + d), S = Math.atan2(x.y - _.y, x.x - _.x) * 180 / Math.PI;
|
|
2527
|
+
a[t].setAttribute("transform", `translate(${m.x.toFixed(2)} ${m.y.toFixed(2)}) rotate(${(S + f.dRot).toFixed(2)}) translate(0 ${(-f.dNormal).toFixed(2)}) scale(${f.scale.toFixed(3)})${g}`), a[t].setAttribute("opacity", f.opacity);
|
|
2525
2528
|
}
|
|
2526
2529
|
}
|
|
2527
|
-
_placeMorphArray(e, t, n,
|
|
2528
|
-
let
|
|
2529
|
-
if (!
|
|
2530
|
-
let
|
|
2531
|
-
if (!
|
|
2532
|
-
let
|
|
2530
|
+
_placeMorphArray(e, t, n, i, a, o, s = t.morphEls) {
|
|
2531
|
+
let c = t.morphCenters, l = t.morphTotal;
|
|
2532
|
+
if (!c || !s) return;
|
|
2533
|
+
let u = c.length;
|
|
2534
|
+
if (!u) return;
|
|
2535
|
+
let d = Math.min(this.w, this.h) * .08, f = (this.w - 2 * d) / o, p = (this.h - 2 * d) / a, m = e.italic ? " skewX(-12)" : "", h = r(e.stagger || 0), g = a * o;
|
|
2533
2536
|
for (let t = 0; t < g; t++) {
|
|
2534
|
-
let
|
|
2535
|
-
for (let r = 0; r <
|
|
2536
|
-
let i = t *
|
|
2537
|
+
let r = Math.floor(t / o), a = d + t % o * f + f / 2, _ = d + r * p + p / 2, v = a - l / 2, y = h ? W(i + h * t / g) : i;
|
|
2538
|
+
for (let r = 0; r < u; r++) {
|
|
2539
|
+
let i = t * u + r, a = s[i];
|
|
2537
2540
|
if (!a) continue;
|
|
2538
|
-
let
|
|
2541
|
+
let o = v + c[r], l = this._anim(e, {
|
|
2539
2542
|
i,
|
|
2540
|
-
n: g *
|
|
2543
|
+
n: g * u,
|
|
2541
2544
|
u: y,
|
|
2542
2545
|
sizePx: e.fontSize,
|
|
2543
2546
|
pathLen: 0,
|
|
2544
|
-
nx: this.w ?
|
|
2547
|
+
nx: this.w ? o / this.w : .5,
|
|
2545
2548
|
ny: this.h ? _ / this.h : .5
|
|
2546
|
-
}, n), d = _ -
|
|
2547
|
-
a.setAttribute("transform", `translate(${
|
|
2549
|
+
}, n), d = _ - l.dNormal;
|
|
2550
|
+
a.setAttribute("transform", `translate(${o.toFixed(2)} ${d.toFixed(2)}) rotate(${l.dRot.toFixed(2)}) scale(${l.scale.toFixed(3)})${m}`), a.setAttribute("opacity", l.opacity);
|
|
2548
2551
|
}
|
|
2549
2552
|
}
|
|
2550
2553
|
}
|
|
2551
|
-
},
|
|
2554
|
+
}, K = (e, t = 0) => e?.instances?.[t] ?? null, q = (e, t, n = 0) => ({
|
|
2552
2555
|
...e,
|
|
2553
2556
|
instances: (e.instances ?? []).map((e, r) => r === n ? {
|
|
2554
2557
|
...e,
|
|
2555
2558
|
...t
|
|
2556
2559
|
} : e)
|
|
2557
|
-
}),
|
|
2560
|
+
}), qe = (e, t) => ({
|
|
2558
2561
|
...e,
|
|
2559
2562
|
instances: (e.instances ?? []).map((e, n, r) => ({
|
|
2560
2563
|
...e,
|
|
2561
2564
|
...t(e, n, r.length)
|
|
2562
2565
|
}))
|
|
2563
|
-
}),
|
|
2564
|
-
...
|
|
2566
|
+
}), J = (e, t, n = 0) => q(e, { path: {
|
|
2567
|
+
...K(e, n)?.path ?? {},
|
|
2565
2568
|
...t
|
|
2566
|
-
} }, n),
|
|
2567
|
-
...
|
|
2569
|
+
} }, n), Je = (e, t, n = 0) => q(e, { motion: {
|
|
2570
|
+
...K(e, n)?.motion ?? {},
|
|
2568
2571
|
...t
|
|
2569
|
-
} }, n), Y = (e, t = 0) =>
|
|
2572
|
+
} }, n), Y = (e, t = 0) => K(e, t)?.path?.type ?? "line", Ye = (e, t = 0) => K(e, t)?.motion?.mode ?? "none", Xe = (e, t = 0) => ![
|
|
2570
2573
|
"radial",
|
|
2571
2574
|
"rings",
|
|
2572
2575
|
"array"
|
|
@@ -2615,24 +2618,24 @@ var qe = class {
|
|
|
2615
2618
|
value: "rings",
|
|
2616
2619
|
label: "Rings"
|
|
2617
2620
|
}
|
|
2618
|
-
], X = (e, t = 0) =>
|
|
2619
|
-
...
|
|
2621
|
+
], X = (e, t = 0) => K(e, t)?.morph ?? {}, Z = (e, t, n = 0) => q(e, { morph: {
|
|
2622
|
+
...K(e, n)?.morph ?? {},
|
|
2620
2623
|
...t
|
|
2621
2624
|
} }, n), Qe = (e, t, n, r = 0) => Z(e, { vf2: {
|
|
2622
2625
|
...X(e, r).vf2 ?? {},
|
|
2623
2626
|
[t]: n
|
|
2624
|
-
} }, r), $e = (e, t = 0) => !["radial", "rings"].includes(Y(e, t)),
|
|
2627
|
+
} }, r), $e = (e, t = 0) => !["radial", "rings"].includes(Y(e, t)), Q = (e, t = 0) => $e(e, t) && !!X(e, t).on, et = (e, t = 0) => X(e, t).mode ?? "morph", tt = (e, t = 0) => Q(e, t) && ["morph", "fade"].includes(et(e, t)), $ = (e, t, n = 0) => E(K(e, n)?.font).axes.find((e) => e.tag === t), nt = (e, t, n, r = 0) => {
|
|
2625
2628
|
let i = $(e, t, r), a = i ? Math.min(i.max, Math.max(i.min, n)) : n;
|
|
2626
2629
|
return Qe(e, t, Math.round(a), r);
|
|
2627
2630
|
}, rt = (e, t, n, r = 0) => {
|
|
2628
2631
|
let i = $(e, t, r), a = i ? Math.min(i.max, Math.max(i.min, n)) : n;
|
|
2629
|
-
return
|
|
2630
|
-
...
|
|
2632
|
+
return q(e, { vf: {
|
|
2633
|
+
...K(e, r)?.vf ?? {},
|
|
2631
2634
|
[t]: Math.round(a)
|
|
2632
2635
|
} }, r);
|
|
2633
2636
|
}, it = (e) => ({
|
|
2634
2637
|
key: `vf${e[0].toUpperCase()}${e.slice(1)}`,
|
|
2635
|
-
label:
|
|
2638
|
+
label: ie[e] || e,
|
|
2636
2639
|
tab: "style",
|
|
2637
2640
|
section: "Axes",
|
|
2638
2641
|
type: "range",
|
|
@@ -2640,9 +2643,9 @@ var qe = class {
|
|
|
2640
2643
|
min: (t, n = 0) => $(t, e, n)?.min ?? 0,
|
|
2641
2644
|
max: (t, n = 0) => $(t, e, n)?.max ?? 1e3,
|
|
2642
2645
|
when: (t, n = 0) => !!$(t, e, n),
|
|
2643
|
-
get: (t, n = 0) =>
|
|
2646
|
+
get: (t, n = 0) => K(t, n)?.vf?.[e] ?? $(t, e, n)?.def ?? 0,
|
|
2644
2647
|
set: (t, n, r = 0) => rt(t, e, n, r)
|
|
2645
|
-
}), at = (e, t = 0) =>
|
|
2648
|
+
}), at = (e, t = 0) => Q(e, t) && et(e, t) === "morph" && (X(e, t).curve ?? "flat") === "custom", ot = (e, t) => ({
|
|
2646
2649
|
key: `morphC${e}${t}`,
|
|
2647
2650
|
label: `P${e} ${t.toUpperCase()}`,
|
|
2648
2651
|
tab: "style",
|
|
@@ -2682,20 +2685,20 @@ var qe = class {
|
|
|
2682
2685
|
type: "color",
|
|
2683
2686
|
role: "fg",
|
|
2684
2687
|
noRandom: !0,
|
|
2685
|
-
get: (e, t = 0) =>
|
|
2686
|
-
set: (e, t, n = 0) =>
|
|
2688
|
+
get: (e, t = 0) => K(e, t)?.fill,
|
|
2689
|
+
set: (e, t, n = 0) => q(e, { fill: t }, n)
|
|
2687
2690
|
},
|
|
2688
2691
|
{
|
|
2689
2692
|
key: "font",
|
|
2690
2693
|
label: "Font",
|
|
2691
2694
|
tab: "style",
|
|
2692
2695
|
type: "select",
|
|
2693
|
-
options:
|
|
2696
|
+
options: T,
|
|
2694
2697
|
noRandom: !0,
|
|
2695
|
-
get: (e, t = 0) =>
|
|
2696
|
-
set: (e, t, n = 0) =>
|
|
2698
|
+
get: (e, t = 0) => E(K(e, t)?.font).key,
|
|
2699
|
+
set: (e, t, n = 0) => q(e, {
|
|
2697
2700
|
font: t,
|
|
2698
|
-
vf:
|
|
2701
|
+
vf: De(t, K(e, n)?.vf)
|
|
2699
2702
|
}, n)
|
|
2700
2703
|
},
|
|
2701
2704
|
{
|
|
@@ -2711,8 +2714,8 @@ var qe = class {
|
|
|
2711
2714
|
value: "on",
|
|
2712
2715
|
label: "On"
|
|
2713
2716
|
}],
|
|
2714
|
-
get: (e, t = 0) =>
|
|
2715
|
-
set: (e, t, n = 0) =>
|
|
2717
|
+
get: (e, t = 0) => K(e, t)?.italic ? "on" : "off",
|
|
2718
|
+
set: (e, t, n = 0) => q(e, { italic: t === "on" }, n)
|
|
2716
2719
|
},
|
|
2717
2720
|
{
|
|
2718
2721
|
key: "case",
|
|
@@ -2738,8 +2741,8 @@ var qe = class {
|
|
|
2738
2741
|
label: "Tt"
|
|
2739
2742
|
}
|
|
2740
2743
|
],
|
|
2741
|
-
get: (e, t = 0) =>
|
|
2742
|
-
set: (e, t, n = 0) =>
|
|
2744
|
+
get: (e, t = 0) => K(e, t)?.case ?? "none",
|
|
2745
|
+
set: (e, t, n = 0) => q(e, { case: t }, n)
|
|
2743
2746
|
},
|
|
2744
2747
|
{
|
|
2745
2748
|
key: "fontSize",
|
|
@@ -2751,8 +2754,8 @@ var qe = class {
|
|
|
2751
2754
|
step: 1,
|
|
2752
2755
|
rMin: 36,
|
|
2753
2756
|
rMax: 150,
|
|
2754
|
-
get: (e, t = 0) =>
|
|
2755
|
-
set: (e, t, n = 0) =>
|
|
2757
|
+
get: (e, t = 0) => K(e, t)?.fontSize ?? 26,
|
|
2758
|
+
set: (e, t, n = 0) => q(e, { fontSize: Math.round(t) }, n)
|
|
2756
2759
|
},
|
|
2757
2760
|
{
|
|
2758
2761
|
key: "letterSpacing",
|
|
@@ -2764,8 +2767,8 @@ var qe = class {
|
|
|
2764
2767
|
step: .5,
|
|
2765
2768
|
rMin: 0,
|
|
2766
2769
|
rMax: 12,
|
|
2767
|
-
get: (e, t = 0) =>
|
|
2768
|
-
set: (e, t, n = 0) =>
|
|
2770
|
+
get: (e, t = 0) => K(e, t)?.letterSpacing ?? 0,
|
|
2771
|
+
set: (e, t, n = 0) => q(e, { letterSpacing: t }, n)
|
|
2769
2772
|
},
|
|
2770
2773
|
{
|
|
2771
2774
|
key: "align",
|
|
@@ -2788,8 +2791,8 @@ var qe = class {
|
|
|
2788
2791
|
label: "End"
|
|
2789
2792
|
}
|
|
2790
2793
|
],
|
|
2791
|
-
get: (e, t = 0) =>
|
|
2792
|
-
set: (e, t, n = 0) =>
|
|
2794
|
+
get: (e, t = 0) => K(e, t)?.align ?? "center",
|
|
2795
|
+
set: (e, t, n = 0) => q(e, { align: t }, n)
|
|
2793
2796
|
},
|
|
2794
2797
|
{
|
|
2795
2798
|
key: "multiply",
|
|
@@ -2801,8 +2804,8 @@ var qe = class {
|
|
|
2801
2804
|
step: 1,
|
|
2802
2805
|
noRandom: !0,
|
|
2803
2806
|
when: Xe,
|
|
2804
|
-
get: (e, t = 0) =>
|
|
2805
|
-
set: (e, t, n = 0) =>
|
|
2807
|
+
get: (e, t = 0) => K(e, t)?.multiply ?? 1,
|
|
2808
|
+
set: (e, t, n = 0) => q(e, { multiply: Math.round(t) }, n)
|
|
2806
2809
|
},
|
|
2807
2810
|
it("wdth"),
|
|
2808
2811
|
it("wght"),
|
|
@@ -2815,7 +2818,7 @@ var qe = class {
|
|
|
2815
2818
|
noRandom: !0,
|
|
2816
2819
|
options: Ze,
|
|
2817
2820
|
get: Y,
|
|
2818
|
-
set: (e, t, n = 0) =>
|
|
2821
|
+
set: (e, t, n = 0) => J(e, { type: t }, n)
|
|
2819
2822
|
},
|
|
2820
2823
|
{
|
|
2821
2824
|
key: "spokes",
|
|
@@ -2829,8 +2832,8 @@ var qe = class {
|
|
|
2829
2832
|
rMin: 6,
|
|
2830
2833
|
rMax: 28,
|
|
2831
2834
|
when: (e, t = 0) => Y(e, t) === "radial",
|
|
2832
|
-
get: (e, t = 0) =>
|
|
2833
|
-
set: (e, t, n = 0) =>
|
|
2835
|
+
get: (e, t = 0) => K(e, t)?.path?.count ?? 12,
|
|
2836
|
+
set: (e, t, n = 0) => J(e, { count: Math.round(t) }, n)
|
|
2834
2837
|
},
|
|
2835
2838
|
{
|
|
2836
2839
|
key: "rings",
|
|
@@ -2844,8 +2847,8 @@ var qe = class {
|
|
|
2844
2847
|
rMin: 4,
|
|
2845
2848
|
rMax: 16,
|
|
2846
2849
|
when: (e, t = 0) => Y(e, t) === "rings",
|
|
2847
|
-
get: (e, t = 0) =>
|
|
2848
|
-
set: (e, t, n = 0) =>
|
|
2850
|
+
get: (e, t = 0) => K(e, t)?.path?.count ?? 12,
|
|
2851
|
+
set: (e, t, n = 0) => J(e, { count: Math.round(t) }, n)
|
|
2849
2852
|
},
|
|
2850
2853
|
{
|
|
2851
2854
|
key: "inner",
|
|
@@ -2859,8 +2862,8 @@ var qe = class {
|
|
|
2859
2862
|
rMin: .04,
|
|
2860
2863
|
rMax: .4,
|
|
2861
2864
|
when: (e, t = 0) => Y(e, t) === "radial" || Y(e, t) === "rings",
|
|
2862
|
-
get: (e, t = 0) =>
|
|
2863
|
-
set: (e, t, n = 0) =>
|
|
2865
|
+
get: (e, t = 0) => K(e, t)?.path?.inner ?? .12,
|
|
2866
|
+
set: (e, t, n = 0) => J(e, { inner: t }, n)
|
|
2864
2867
|
},
|
|
2865
2868
|
{
|
|
2866
2869
|
key: "ringRadius",
|
|
@@ -2874,8 +2877,8 @@ var qe = class {
|
|
|
2874
2877
|
rMin: .6,
|
|
2875
2878
|
rMax: 1,
|
|
2876
2879
|
when: (e, t = 0) => Y(e, t) === "rings",
|
|
2877
|
-
get: (e, t = 0) =>
|
|
2878
|
-
set: (e, t, n = 0) =>
|
|
2880
|
+
get: (e, t = 0) => K(e, t)?.path?.radius ?? .92,
|
|
2881
|
+
set: (e, t, n = 0) => J(e, { radius: t }, n)
|
|
2879
2882
|
},
|
|
2880
2883
|
{
|
|
2881
2884
|
key: "twist",
|
|
@@ -2889,8 +2892,8 @@ var qe = class {
|
|
|
2889
2892
|
rMin: 0,
|
|
2890
2893
|
rMax: 1.5,
|
|
2891
2894
|
when: (e, t = 0) => Y(e, t) === "rings",
|
|
2892
|
-
get: (e, t = 0) =>
|
|
2893
|
-
set: (e, t, n = 0) =>
|
|
2895
|
+
get: (e, t = 0) => K(e, t)?.path?.twist ?? .5,
|
|
2896
|
+
set: (e, t, n = 0) => J(e, { twist: t }, n)
|
|
2894
2897
|
},
|
|
2895
2898
|
{
|
|
2896
2899
|
key: "grow",
|
|
@@ -2904,8 +2907,8 @@ var qe = class {
|
|
|
2904
2907
|
rMin: 0,
|
|
2905
2908
|
rMax: 1.5,
|
|
2906
2909
|
when: (e, t = 0) => Y(e, t) === "rings",
|
|
2907
|
-
get: (e, t = 0) =>
|
|
2908
|
-
set: (e, t, n = 0) =>
|
|
2910
|
+
get: (e, t = 0) => K(e, t)?.path?.grow ?? .6,
|
|
2911
|
+
set: (e, t, n = 0) => J(e, { grow: t }, n)
|
|
2909
2912
|
},
|
|
2910
2913
|
{
|
|
2911
2914
|
key: "pathRadius",
|
|
@@ -2923,8 +2926,8 @@ var qe = class {
|
|
|
2923
2926
|
"ellipse",
|
|
2924
2927
|
"spiral"
|
|
2925
2928
|
].includes(Y(e, t)),
|
|
2926
|
-
get: (e, t = 0) =>
|
|
2927
|
-
set: (e, t, n = 0) =>
|
|
2929
|
+
get: (e, t = 0) => K(e, t)?.path?.radius ?? .72,
|
|
2930
|
+
set: (e, t, n = 0) => J(e, { radius: t }, n)
|
|
2928
2931
|
},
|
|
2929
2932
|
{
|
|
2930
2933
|
key: "turns",
|
|
@@ -2940,8 +2943,8 @@ var qe = class {
|
|
|
2940
2943
|
rMin: 2,
|
|
2941
2944
|
rMax: 5,
|
|
2942
2945
|
when: (e, t = 0) => Y(e, t) === "spiral",
|
|
2943
|
-
get: (e, t = 0) =>
|
|
2944
|
-
set: (e, t, n = 0) =>
|
|
2946
|
+
get: (e, t = 0) => K(e, t)?.path?.turns ?? 3,
|
|
2947
|
+
set: (e, t, n = 0) => J(e, { turns: Math.round(t) }, n)
|
|
2945
2948
|
},
|
|
2946
2949
|
{
|
|
2947
2950
|
key: "amp",
|
|
@@ -2959,8 +2962,8 @@ var qe = class {
|
|
|
2959
2962
|
"sine",
|
|
2960
2963
|
"zigzag"
|
|
2961
2964
|
].includes(Y(e, t)),
|
|
2962
|
-
get: (e, t = 0) =>
|
|
2963
|
-
set: (e, t, n = 0) =>
|
|
2965
|
+
get: (e, t = 0) => K(e, t)?.path?.amp ?? .4,
|
|
2966
|
+
set: (e, t, n = 0) => J(e, { amp: t }, n)
|
|
2964
2967
|
},
|
|
2965
2968
|
{
|
|
2966
2969
|
key: "freq",
|
|
@@ -2974,8 +2977,8 @@ var qe = class {
|
|
|
2974
2977
|
rMin: 1,
|
|
2975
2978
|
rMax: 4,
|
|
2976
2979
|
when: (e, t = 0) => ["sine", "zigzag"].includes(Y(e, t)),
|
|
2977
|
-
get: (e, t = 0) =>
|
|
2978
|
-
set: (e, t, n = 0) =>
|
|
2980
|
+
get: (e, t = 0) => K(e, t)?.path?.freq ?? 2,
|
|
2981
|
+
set: (e, t, n = 0) => J(e, { freq: Math.round(t) }, n)
|
|
2979
2982
|
},
|
|
2980
2983
|
{
|
|
2981
2984
|
key: "rows",
|
|
@@ -2989,8 +2992,8 @@ var qe = class {
|
|
|
2989
2992
|
rMin: 2,
|
|
2990
2993
|
rMax: 4,
|
|
2991
2994
|
when: (e, t = 0) => Y(e, t) === "array",
|
|
2992
|
-
get: (e, t = 0) =>
|
|
2993
|
-
set: (e, t, n = 0) =>
|
|
2995
|
+
get: (e, t = 0) => K(e, t)?.path?.rows ?? 2,
|
|
2996
|
+
set: (e, t, n = 0) => J(e, { rows: Math.round(t) }, n)
|
|
2994
2997
|
},
|
|
2995
2998
|
{
|
|
2996
2999
|
key: "cols",
|
|
@@ -3004,8 +3007,8 @@ var qe = class {
|
|
|
3004
3007
|
rMin: 2,
|
|
3005
3008
|
rMax: 6,
|
|
3006
3009
|
when: (e, t = 0) => Y(e, t) === "array",
|
|
3007
|
-
get: (e, t = 0) =>
|
|
3008
|
-
set: (e, t, n = 0) =>
|
|
3010
|
+
get: (e, t = 0) => K(e, t)?.path?.cols ?? 3,
|
|
3011
|
+
set: (e, t, n = 0) => J(e, { cols: Math.round(t) }, n)
|
|
3009
3012
|
},
|
|
3010
3013
|
{
|
|
3011
3014
|
key: "flow",
|
|
@@ -3022,8 +3025,8 @@ var qe = class {
|
|
|
3022
3025
|
value: "contain",
|
|
3023
3026
|
label: "Contain"
|
|
3024
3027
|
}],
|
|
3025
|
-
get: (e, t = 0) =>
|
|
3026
|
-
set: (e, t, n = 0) =>
|
|
3028
|
+
get: (e, t = 0) => K(e, t)?.flow ?? "flow",
|
|
3029
|
+
set: (e, t, n = 0) => q(e, { flow: t }, n)
|
|
3027
3030
|
},
|
|
3028
3031
|
{
|
|
3029
3032
|
key: "showPath",
|
|
@@ -3040,8 +3043,8 @@ var qe = class {
|
|
|
3040
3043
|
value: "on",
|
|
3041
3044
|
label: "On"
|
|
3042
3045
|
}],
|
|
3043
|
-
get: (e, t = 0) =>
|
|
3044
|
-
set: (e, t, n = 0) =>
|
|
3046
|
+
get: (e, t = 0) => K(e, t)?.showPath ? "on" : "off",
|
|
3047
|
+
set: (e, t, n = 0) => q(e, { showPath: t === "on" }, n)
|
|
3045
3048
|
},
|
|
3046
3049
|
{
|
|
3047
3050
|
key: "offsetX",
|
|
@@ -3053,9 +3056,9 @@ var qe = class {
|
|
|
3053
3056
|
max: 1,
|
|
3054
3057
|
step: .01,
|
|
3055
3058
|
noRandom: !0,
|
|
3056
|
-
get: (e, t = 0) =>
|
|
3057
|
-
set: (e, t, n = 0) =>
|
|
3058
|
-
...
|
|
3059
|
+
get: (e, t = 0) => K(e, t)?.offset?.x ?? 0,
|
|
3060
|
+
set: (e, t, n = 0) => q(e, { offset: {
|
|
3061
|
+
...K(e, n)?.offset ?? {},
|
|
3059
3062
|
x: t
|
|
3060
3063
|
} }, n)
|
|
3061
3064
|
},
|
|
@@ -3069,9 +3072,9 @@ var qe = class {
|
|
|
3069
3072
|
max: 1,
|
|
3070
3073
|
step: .01,
|
|
3071
3074
|
noRandom: !0,
|
|
3072
|
-
get: (e, t = 0) =>
|
|
3073
|
-
set: (e, t, n = 0) =>
|
|
3074
|
-
...
|
|
3075
|
+
get: (e, t = 0) => K(e, t)?.offset?.y ?? 0,
|
|
3076
|
+
set: (e, t, n = 0) => q(e, { offset: {
|
|
3077
|
+
...K(e, n)?.offset ?? {},
|
|
3075
3078
|
y: t
|
|
3076
3079
|
} }, n)
|
|
3077
3080
|
},
|
|
@@ -3099,9 +3102,9 @@ var qe = class {
|
|
|
3099
3102
|
tab: "style",
|
|
3100
3103
|
section: "Morph",
|
|
3101
3104
|
type: "select",
|
|
3102
|
-
when:
|
|
3103
|
-
options:
|
|
3104
|
-
get:
|
|
3105
|
+
when: Q,
|
|
3106
|
+
options: te,
|
|
3107
|
+
get: et,
|
|
3105
3108
|
set: (e, t, n = 0) => Z(e, { mode: t }, n)
|
|
3106
3109
|
},
|
|
3107
3110
|
{
|
|
@@ -3115,13 +3118,13 @@ var qe = class {
|
|
|
3115
3118
|
options: (e, t = 0) => [{
|
|
3116
3119
|
value: "",
|
|
3117
3120
|
label: "Off"
|
|
3118
|
-
}, ...
|
|
3121
|
+
}, ...T.filter((n) => n.value !== K(e, t)?.font)],
|
|
3119
3122
|
get: (e, t = 0) => X(e, t).face2 ?? "",
|
|
3120
3123
|
set: (e, t, n = 0) => Z(e, { face2: t }, n)
|
|
3121
3124
|
},
|
|
3122
3125
|
{
|
|
3123
3126
|
key: "morphVf2Wdth",
|
|
3124
|
-
label: "Cut B
|
|
3127
|
+
label: "Cut B width",
|
|
3125
3128
|
tab: "style",
|
|
3126
3129
|
section: "Morph",
|
|
3127
3130
|
type: "range",
|
|
@@ -3134,7 +3137,7 @@ var qe = class {
|
|
|
3134
3137
|
},
|
|
3135
3138
|
{
|
|
3136
3139
|
key: "morphVf2Wght",
|
|
3137
|
-
label: "Cut B
|
|
3140
|
+
label: "Cut B weight",
|
|
3138
3141
|
tab: "style",
|
|
3139
3142
|
section: "Morph",
|
|
3140
3143
|
type: "range",
|
|
@@ -3151,8 +3154,8 @@ var qe = class {
|
|
|
3151
3154
|
tab: "style",
|
|
3152
3155
|
section: "Morph",
|
|
3153
3156
|
type: "select",
|
|
3154
|
-
when: (e, t = 0) =>
|
|
3155
|
-
options:
|
|
3157
|
+
when: (e, t = 0) => Q(e, t) && et(e, t) === "morph",
|
|
3158
|
+
options: s,
|
|
3156
3159
|
get: (e, t = 0) => X(e, t).curve ?? "flat",
|
|
3157
3160
|
set: (e, t, n = 0) => Z(e, { curve: t }, n)
|
|
3158
3161
|
},
|
|
@@ -3169,7 +3172,7 @@ var qe = class {
|
|
|
3169
3172
|
min: 0,
|
|
3170
3173
|
max: 1,
|
|
3171
3174
|
step: .01,
|
|
3172
|
-
when: (e, t = 0) =>
|
|
3175
|
+
when: (e, t = 0) => Q(e, t) && et(e, t) !== "random",
|
|
3173
3176
|
get: (e, t = 0) => X(e, t).blend ?? .5,
|
|
3174
3177
|
set: (e, t, n = 0) => Z(e, { blend: t }, n)
|
|
3175
3178
|
},
|
|
@@ -3182,7 +3185,7 @@ var qe = class {
|
|
|
3182
3185
|
min: 0,
|
|
3183
3186
|
max: 1,
|
|
3184
3187
|
step: .01,
|
|
3185
|
-
when: (e, t = 0) =>
|
|
3188
|
+
when: (e, t = 0) => Q(e, t) && et(e, t) === "random",
|
|
3186
3189
|
get: (e, t = 0) => X(e, t).blend ?? .5,
|
|
3187
3190
|
set: (e, t, n = 0) => Z(e, { blend: t }, n)
|
|
3188
3191
|
},
|
|
@@ -3231,7 +3234,7 @@ var qe = class {
|
|
|
3231
3234
|
}
|
|
3232
3235
|
],
|
|
3233
3236
|
get: Ye,
|
|
3234
|
-
set: (e, t, n = 0) =>
|
|
3237
|
+
set: (e, t, n = 0) => Je(e, { mode: t }, n)
|
|
3235
3238
|
},
|
|
3236
3239
|
{
|
|
3237
3240
|
key: "cycles",
|
|
@@ -3246,8 +3249,8 @@ var qe = class {
|
|
|
3246
3249
|
rMin: 1,
|
|
3247
3250
|
rMax: 3,
|
|
3248
3251
|
when: (e, t = 0) => Ye(e, t) !== "none",
|
|
3249
|
-
get: (e, t = 0) =>
|
|
3250
|
-
set: (e, t, n = 0) =>
|
|
3252
|
+
get: (e, t = 0) => K(e, t)?.motion?.cycles ?? 1,
|
|
3253
|
+
set: (e, t, n = 0) => Je(e, { cycles: Math.round(t) }, n)
|
|
3251
3254
|
},
|
|
3252
3255
|
{
|
|
3253
3256
|
key: "motionAmp",
|
|
@@ -3265,8 +3268,8 @@ var qe = class {
|
|
|
3265
3268
|
"sweepWeight",
|
|
3266
3269
|
"sweepShift"
|
|
3267
3270
|
].includes(Ye(e, t)),
|
|
3268
|
-
get: (e, t = 0) =>
|
|
3269
|
-
set: (e, t, n = 0) =>
|
|
3271
|
+
get: (e, t = 0) => K(e, t)?.motion?.amp ?? .3,
|
|
3272
|
+
set: (e, t, n = 0) => Je(e, { amp: t }, n)
|
|
3270
3273
|
},
|
|
3271
3274
|
{
|
|
3272
3275
|
key: "motionPhase",
|
|
@@ -3283,21 +3286,21 @@ var qe = class {
|
|
|
3283
3286
|
"glyphwave",
|
|
3284
3287
|
"cascade"
|
|
3285
3288
|
].includes(Ye(e, t)),
|
|
3286
|
-
get: (e, t = 0) =>
|
|
3287
|
-
set: (e, t, n = 0) =>
|
|
3289
|
+
get: (e, t = 0) => K(e, t)?.motion?.phase ?? .5,
|
|
3290
|
+
set: (e, t, n = 0) => Je(e, { phase: t }, n)
|
|
3288
3291
|
},
|
|
3289
3292
|
{
|
|
3290
3293
|
key: "axis",
|
|
3291
3294
|
label: "Axis",
|
|
3292
3295
|
tab: "anim",
|
|
3293
3296
|
type: "select",
|
|
3294
|
-
when: (e, t = 0) => ["vfwave", "sweepWeight"].includes(Ye(e, t)) &&
|
|
3295
|
-
options: (e, t = 0) =>
|
|
3297
|
+
when: (e, t = 0) => ["vfwave", "sweepWeight"].includes(Ye(e, t)) && E(K(e, t)?.font).axes.length > 1,
|
|
3298
|
+
options: (e, t = 0) => E(K(e, t)?.font).axes.map((e) => ({
|
|
3296
3299
|
value: e.tag,
|
|
3297
|
-
label:
|
|
3300
|
+
label: ie[e.tag] || e.tag
|
|
3298
3301
|
})),
|
|
3299
|
-
get: (e, t = 0) =>
|
|
3300
|
-
set: (e, t, n = 0) =>
|
|
3302
|
+
get: (e, t = 0) => K(e, t)?.motion?.axis ?? "wght",
|
|
3303
|
+
set: (e, t, n = 0) => Je(e, { axis: t }, n)
|
|
3301
3304
|
},
|
|
3302
3305
|
{
|
|
3303
3306
|
key: "field",
|
|
@@ -3335,8 +3338,8 @@ var qe = class {
|
|
|
3335
3338
|
label: "Wave"
|
|
3336
3339
|
}
|
|
3337
3340
|
],
|
|
3338
|
-
get: (e, t = 0) =>
|
|
3339
|
-
set: (e, t, n = 0) =>
|
|
3341
|
+
get: (e, t = 0) => K(e, t)?.motion?.field ?? "x",
|
|
3342
|
+
set: (e, t, n = 0) => Je(e, { field: t }, n)
|
|
3340
3343
|
},
|
|
3341
3344
|
{
|
|
3342
3345
|
key: "stagger",
|
|
@@ -3346,8 +3349,8 @@ var qe = class {
|
|
|
3346
3349
|
min: 0,
|
|
3347
3350
|
max: 1,
|
|
3348
3351
|
step: .01,
|
|
3349
|
-
get: (e) =>
|
|
3350
|
-
set: (e, t) =>
|
|
3352
|
+
get: (e) => K(e)?.stagger ?? 0,
|
|
3353
|
+
set: (e, t) => qe(e, (e, n, r) => ({
|
|
3351
3354
|
stagger: t,
|
|
3352
3355
|
phase: r > 1 ? n / r * t : 0
|
|
3353
3356
|
}))
|
|
@@ -3365,8 +3368,8 @@ var qe = class {
|
|
|
3365
3368
|
rMin: 0,
|
|
3366
3369
|
rMax: 3,
|
|
3367
3370
|
when: (e, t = 0) => Y(e, t) === "radial" || Y(e, t) === "rings",
|
|
3368
|
-
get: (e, t = 0) =>
|
|
3369
|
-
set: (e, t, n = 0) =>
|
|
3371
|
+
get: (e, t = 0) => K(e, t)?.path?.spin ?? 1,
|
|
3372
|
+
set: (e, t, n = 0) => J(e, { spin: Math.round(t) }, n)
|
|
3370
3373
|
}
|
|
3371
3374
|
], ct = (e, t, n = 0) => typeof e.options == "function" ? e.options(t, n) : e.options ?? [], lt = (e, t, n = 0) => ({
|
|
3372
3375
|
min: typeof e.min == "function" ? e.min(t, n) : e.min,
|
|
@@ -3429,153 +3432,153 @@ var pt = {
|
|
|
3429
3432
|
"offsetX",
|
|
3430
3433
|
"offsetY"
|
|
3431
3434
|
]), _t = (e, t) => e ? String.fromCharCode(97 + t.indexOf(e) % 26) : null;
|
|
3432
|
-
function vt({ layer: e, setProp:
|
|
3433
|
-
let
|
|
3435
|
+
function vt({ layer: e, setProp: n, updateLayer: r, palette: a, renderAnimate: s, tab: c, tabStrip: l, picker: u = !0 }) {
|
|
3436
|
+
let p = h(), g = e.comp ?? {
|
|
3434
3437
|
bg: "#0b0d12",
|
|
3435
3438
|
instances: []
|
|
3436
|
-
}, v =
|
|
3439
|
+
}, v = g.instances ?? [], [te, T] = j(0), E = Math.min(te, Math.max(0, v.length - 1)), ne = (t) => {
|
|
3437
3440
|
T(t), window.dispatchEvent(new CustomEvent("kol:kinetic-element", { detail: {
|
|
3438
3441
|
id: e.id,
|
|
3439
3442
|
index: t,
|
|
3440
3443
|
from: "panel"
|
|
3441
3444
|
} }));
|
|
3442
3445
|
};
|
|
3443
|
-
|
|
3446
|
+
_e(() => {
|
|
3444
3447
|
let t = (t) => {
|
|
3445
3448
|
t.detail?.id === e.id && t.detail.from === "canvas" && T(t.detail.index);
|
|
3446
3449
|
};
|
|
3447
3450
|
return window.addEventListener("kol:kinetic-element", t), () => window.removeEventListener("kol:kinetic-element", t);
|
|
3448
3451
|
}, [e.id]);
|
|
3449
|
-
let [
|
|
3452
|
+
let [re, ie] = j([]), ae = (e) => ie((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), oe = (e) => {
|
|
3450
3453
|
let t = v[e]?.group;
|
|
3451
3454
|
return t ? v.reduce((e, n, r) => n.group === t ? [...e, r] : e, []) : [e];
|
|
3452
|
-
}, [
|
|
3455
|
+
}, [se, ce] = j(0), D = v[E]?.motions ?? [], O = Math.min(se, D.length), le = (e) => ({
|
|
3453
3456
|
...e,
|
|
3454
3457
|
instances: (e.instances ?? []).map((e, t) => t === E ? {
|
|
3455
3458
|
...e,
|
|
3456
|
-
motion: { ...e.motions?.[
|
|
3459
|
+
motion: { ...e.motions?.[O - 1] ?? {} }
|
|
3457
3460
|
} : e)
|
|
3458
|
-
}),
|
|
3461
|
+
}), ue = (e) => mt.has(e.key) && O > 0 ? le(g) : g, de = (t) => {
|
|
3459
3462
|
t && (r(e.id, {
|
|
3460
3463
|
presetId: t.id,
|
|
3461
3464
|
presetLabel: t.label,
|
|
3462
|
-
comp:
|
|
3463
|
-
}), T(0),
|
|
3464
|
-
},
|
|
3465
|
-
...
|
|
3465
|
+
comp: Pe(t)
|
|
3466
|
+
}), T(0), ce(0));
|
|
3467
|
+
}, fe = (e) => n("comp", e), k = (t) => r(e.id, { comp: {
|
|
3468
|
+
...g,
|
|
3466
3469
|
instances: t
|
|
3467
|
-
} }),
|
|
3468
|
-
...
|
|
3470
|
+
} }), pe = (e, t) => fe({
|
|
3471
|
+
...g,
|
|
3469
3472
|
instances: v.map((n, r) => r === e ? {
|
|
3470
3473
|
...n,
|
|
3471
3474
|
...t
|
|
3472
3475
|
} : n)
|
|
3473
|
-
}),
|
|
3474
|
-
if (
|
|
3476
|
+
}), me = () => {
|
|
3477
|
+
if (re.length < 2) return;
|
|
3475
3478
|
let e = new Set(v.map((e) => e.group).filter(Boolean)), t = 1;
|
|
3476
3479
|
for (; e.has(`g${t}`);) t++;
|
|
3477
|
-
|
|
3480
|
+
k(v.map((e) => re.includes(e.id) ? {
|
|
3478
3481
|
...e,
|
|
3479
3482
|
group: `g${t}`
|
|
3480
|
-
} : e)),
|
|
3481
|
-
},
|
|
3482
|
-
|
|
3483
|
+
} : e)), ie([]);
|
|
3484
|
+
}, he = () => {
|
|
3485
|
+
re.length && (k(v.map((e) => re.includes(e.id) ? {
|
|
3483
3486
|
...e,
|
|
3484
3487
|
group: null
|
|
3485
|
-
} : e)),
|
|
3486
|
-
},
|
|
3487
|
-
if (mt.has(e.key) &&
|
|
3488
|
-
let n = e.set(
|
|
3489
|
-
|
|
3488
|
+
} : e)), ie([]));
|
|
3489
|
+
}, ye = (e, t) => {
|
|
3490
|
+
if (mt.has(e.key) && O > 0) {
|
|
3491
|
+
let n = e.set(le(g), t, E).instances?.[E]?.motion ?? {};
|
|
3492
|
+
pe(E, { motions: D.map((e, t) => t === O - 1 ? n : e) });
|
|
3490
3493
|
return;
|
|
3491
3494
|
}
|
|
3492
|
-
let n =
|
|
3495
|
+
let n = oe(E);
|
|
3493
3496
|
if (n.length > 1 && gt.has(e.key)) {
|
|
3494
|
-
let r =
|
|
3497
|
+
let r = g;
|
|
3495
3498
|
if (e.key === "fontSize") {
|
|
3496
|
-
let i = Number(e.get(
|
|
3499
|
+
let i = Number(e.get(g, E)) || 1, a = t / i;
|
|
3497
3500
|
for (let t of n) {
|
|
3498
|
-
let n = Number(e.get(
|
|
3501
|
+
let n = Number(e.get(g, t)) || i;
|
|
3499
3502
|
r = e.set(r, Math.max(8, Math.min(1200, Math.round(n * a))), t);
|
|
3500
3503
|
}
|
|
3501
3504
|
} else if (e.key === "offsetX" || e.key === "offsetY") {
|
|
3502
|
-
let i = t - (Number(e.get(
|
|
3503
|
-
for (let t of n) r = e.set(r, (Number(e.get(
|
|
3505
|
+
let i = t - (Number(e.get(g, E)) || 0);
|
|
3506
|
+
for (let t of n) r = e.set(r, (Number(e.get(g, t)) || 0) + i, t);
|
|
3504
3507
|
} else for (let i of n) r = e.set(r, t, i);
|
|
3505
|
-
|
|
3508
|
+
fe(r);
|
|
3506
3509
|
return;
|
|
3507
3510
|
}
|
|
3508
|
-
|
|
3509
|
-
},
|
|
3510
|
-
let n =
|
|
3511
|
+
fe(e.set(g, t, E));
|
|
3512
|
+
}, P = x(e), F = (t = null) => {
|
|
3513
|
+
let n = P.take();
|
|
3511
3514
|
r(e.id, {
|
|
3512
|
-
comp: ut(
|
|
3515
|
+
comp: ut(g, E, S(n >>> 0), t),
|
|
3513
3516
|
_rollSeed: n
|
|
3514
3517
|
});
|
|
3515
|
-
},
|
|
3516
|
-
let t =
|
|
3518
|
+
}, be = () => {
|
|
3519
|
+
let t = P.take(), n = S(t >>> 0), i = g;
|
|
3517
3520
|
v.forEach((e, t) => {
|
|
3518
3521
|
i = ut(i, t, n);
|
|
3519
3522
|
}), r(e.id, {
|
|
3520
3523
|
comp: i,
|
|
3521
3524
|
_rollSeed: t
|
|
3522
3525
|
});
|
|
3523
|
-
}, be = () => {
|
|
3524
|
-
let t = V.find((t) => t.id === e.presetId), n = V.filter((e) => e.id !== t?.id && (!t || e.sub === t.sub));
|
|
3525
|
-
n.length && ue(n[Math.floor(_(F.take() >>> 0)() * n.length)]);
|
|
3526
3526
|
}, xe = () => {
|
|
3527
|
-
let
|
|
3528
|
-
|
|
3529
|
-
}, Se = () =>
|
|
3530
|
-
let
|
|
3527
|
+
let t = H.find((t) => t.id === e.presetId), n = H.filter((e) => e.id !== t?.id && (!t || e.sub === t.sub));
|
|
3528
|
+
n.length && de(n[Math.floor(S(P.take() >>> 0)() * n.length)]);
|
|
3529
|
+
}, Se = () => {
|
|
3530
|
+
let e = S(P.take() >>> 0);
|
|
3531
|
+
I(i[Math.floor(e() * i.length)].value, e() < .5);
|
|
3532
|
+
}, Ce = () => de(H.find((t) => t.id === e.presetId) ?? H[0]), I = (n, i) => {
|
|
3533
|
+
let a = t(n, i);
|
|
3531
3534
|
r(e.id, {
|
|
3532
|
-
themeId:
|
|
3533
|
-
themeInvert:
|
|
3535
|
+
themeId: n,
|
|
3536
|
+
themeInvert: i,
|
|
3534
3537
|
comp: {
|
|
3535
|
-
...
|
|
3536
|
-
bg:
|
|
3538
|
+
...g,
|
|
3539
|
+
bg: a.bg,
|
|
3537
3540
|
instances: v.map((e) => ({
|
|
3538
3541
|
...e,
|
|
3539
|
-
fill:
|
|
3542
|
+
fill: a.fg
|
|
3540
3543
|
}))
|
|
3541
3544
|
}
|
|
3542
3545
|
});
|
|
3543
|
-
}, we = (e) =>
|
|
3544
|
-
...
|
|
3546
|
+
}, we = (e) => fe({
|
|
3547
|
+
...g,
|
|
3545
3548
|
instances: v.map((t) => ({
|
|
3546
3549
|
...t,
|
|
3547
3550
|
fill: e
|
|
3548
3551
|
}))
|
|
3549
|
-
}),
|
|
3550
|
-
return /* @__PURE__ */
|
|
3551
|
-
|
|
3552
|
-
|
|
3552
|
+
}), L = c === "labs-effect" ? "style" : c, Te = st.filter((e) => e.tab === L && (!e.when || e.when(ue(e), E))), Ee = v.some((e) => e?.morph?.on), R = v[E];
|
|
3553
|
+
return /* @__PURE__ */ N(ve, { children: [
|
|
3554
|
+
l,
|
|
3555
|
+
u && /* @__PURE__ */ M(yt, {
|
|
3553
3556
|
layer: e,
|
|
3554
|
-
onPreset:
|
|
3557
|
+
onPreset: de
|
|
3555
3558
|
}),
|
|
3556
|
-
|
|
3559
|
+
c === "generate" || c === "labs-effect" ? /* @__PURE__ */ N("div", {
|
|
3557
3560
|
className: "flex flex-col gap-1",
|
|
3558
3561
|
children: [
|
|
3559
|
-
/* @__PURE__ */
|
|
3562
|
+
/* @__PURE__ */ M("span", {
|
|
3560
3563
|
className: "kol-eyebrow text-fg-80",
|
|
3561
3564
|
children: "Elements"
|
|
3562
3565
|
}),
|
|
3563
|
-
/* @__PURE__ */
|
|
3566
|
+
/* @__PURE__ */ M(bt, {
|
|
3564
3567
|
insts: v,
|
|
3565
3568
|
idx: E,
|
|
3566
3569
|
onSelect: ne,
|
|
3567
|
-
onWrite:
|
|
3568
|
-
marked:
|
|
3569
|
-
onMark:
|
|
3570
|
-
onGroup:
|
|
3571
|
-
onUngroup:
|
|
3570
|
+
onWrite: k,
|
|
3571
|
+
marked: re,
|
|
3572
|
+
onMark: ae,
|
|
3573
|
+
onGroup: me,
|
|
3574
|
+
onUngroup: he
|
|
3572
3575
|
}),
|
|
3573
|
-
/* @__PURE__ */
|
|
3576
|
+
/* @__PURE__ */ M(A, {
|
|
3574
3577
|
label: "Edit elements on the canvas (click to select, drag to move, corners to scale)",
|
|
3575
|
-
children: /* @__PURE__ */
|
|
3578
|
+
children: /* @__PURE__ */ M(f, {
|
|
3576
3579
|
"aria-label": "Edit elements on the canvas (click to select, drag to move, corners to scale)",
|
|
3577
3580
|
tone: "primary",
|
|
3578
|
-
size:
|
|
3581
|
+
size: p,
|
|
3579
3582
|
className: "w-full",
|
|
3580
3583
|
onClick: () => window.dispatchEvent(new CustomEvent("kol:kinetic-edit", { detail: {
|
|
3581
3584
|
id: e.id,
|
|
@@ -3585,48 +3588,48 @@ function vt({ layer: e, setProp: t, updateLayer: r, palette: i, renderAnimate: o
|
|
|
3585
3588
|
})
|
|
3586
3589
|
})
|
|
3587
3590
|
]
|
|
3588
|
-
}) : v.length > 1 && /* @__PURE__ */
|
|
3591
|
+
}) : v.length > 1 && /* @__PURE__ */ N("span", {
|
|
3589
3592
|
className: "kol-helper-12 text-meta truncate",
|
|
3590
3593
|
children: [
|
|
3591
3594
|
"Element ",
|
|
3592
3595
|
E + 1,
|
|
3593
3596
|
" · ",
|
|
3594
|
-
|
|
3597
|
+
R?.text || "—"
|
|
3595
3598
|
]
|
|
3596
3599
|
}),
|
|
3597
|
-
(
|
|
3598
|
-
/* @__PURE__ */
|
|
3600
|
+
(c === "generate" || c === "labs-effect") && /* @__PURE__ */ N(ve, { children: [
|
|
3601
|
+
/* @__PURE__ */ M(y, {
|
|
3599
3602
|
label: "TEXT",
|
|
3600
|
-
children: /* @__PURE__ */
|
|
3603
|
+
children: /* @__PURE__ */ M(o, {
|
|
3601
3604
|
variant: "filled",
|
|
3602
|
-
size:
|
|
3605
|
+
size: p,
|
|
3603
3606
|
rows: 2,
|
|
3604
3607
|
axis: "y",
|
|
3605
3608
|
value: v[E]?.text ?? "",
|
|
3606
|
-
onChange: (e) =>
|
|
3609
|
+
onChange: (e) => pe(E, { text: e.target.value })
|
|
3607
3610
|
})
|
|
3608
3611
|
}),
|
|
3609
|
-
/* @__PURE__ */
|
|
3612
|
+
/* @__PURE__ */ N("div", {
|
|
3610
3613
|
className: "flex flex-col gap-2",
|
|
3611
|
-
children: [/* @__PURE__ */
|
|
3614
|
+
children: [/* @__PURE__ */ M(b, {
|
|
3612
3615
|
label: "Theme",
|
|
3613
3616
|
align: "fill",
|
|
3614
|
-
labelWidth:
|
|
3615
|
-
children: /* @__PURE__ */
|
|
3617
|
+
labelWidth: d,
|
|
3618
|
+
children: /* @__PURE__ */ M(w, {
|
|
3616
3619
|
variant: "subtle",
|
|
3617
|
-
size:
|
|
3620
|
+
size: p,
|
|
3618
3621
|
className: "w-full",
|
|
3619
|
-
options:
|
|
3622
|
+
options: i,
|
|
3620
3623
|
value: e.themeId ?? "kol",
|
|
3621
|
-
onChange: (t) =>
|
|
3624
|
+
onChange: (t) => I(t, !!e.themeInvert)
|
|
3622
3625
|
})
|
|
3623
|
-
}), /* @__PURE__ */
|
|
3626
|
+
}), /* @__PURE__ */ M(b, {
|
|
3624
3627
|
label: "Invert",
|
|
3625
3628
|
align: "fill",
|
|
3626
|
-
labelWidth:
|
|
3627
|
-
children: /* @__PURE__ */
|
|
3629
|
+
labelWidth: d,
|
|
3630
|
+
children: /* @__PURE__ */ M(m, {
|
|
3628
3631
|
layout: "joined",
|
|
3629
|
-
size:
|
|
3632
|
+
size: p,
|
|
3630
3633
|
className: "w-full",
|
|
3631
3634
|
options: [{
|
|
3632
3635
|
value: "off",
|
|
@@ -3636,161 +3639,161 @@ function vt({ layer: e, setProp: t, updateLayer: r, palette: i, renderAnimate: o
|
|
|
3636
3639
|
label: "On"
|
|
3637
3640
|
}],
|
|
3638
3641
|
value: e.themeInvert ? "on" : "off",
|
|
3639
|
-
onChange: (t) =>
|
|
3642
|
+
onChange: (t) => I(e.themeId ?? "kol", t === "on")
|
|
3640
3643
|
})
|
|
3641
3644
|
})]
|
|
3642
3645
|
}),
|
|
3643
|
-
/* @__PURE__ */
|
|
3646
|
+
/* @__PURE__ */ M(_, {
|
|
3644
3647
|
inline: !0,
|
|
3645
3648
|
label: "Text color",
|
|
3646
3649
|
value: v[0]?.fill,
|
|
3647
|
-
onChange: (e) => we(
|
|
3648
|
-
palette:
|
|
3650
|
+
onChange: (e) => we(C(e, a) ?? e),
|
|
3651
|
+
palette: a
|
|
3649
3652
|
}),
|
|
3650
|
-
/* @__PURE__ */
|
|
3653
|
+
/* @__PURE__ */ M(f, {
|
|
3651
3654
|
tone: "primary",
|
|
3652
|
-
size:
|
|
3655
|
+
size: p,
|
|
3653
3656
|
className: "w-full",
|
|
3654
|
-
onClick:
|
|
3657
|
+
onClick: xe,
|
|
3655
3658
|
children: "Randomize preset"
|
|
3656
3659
|
}),
|
|
3657
|
-
/* @__PURE__ */
|
|
3660
|
+
/* @__PURE__ */ N("div", {
|
|
3658
3661
|
className: "flex gap-2",
|
|
3659
|
-
children: [/* @__PURE__ */
|
|
3662
|
+
children: [/* @__PURE__ */ M(f, {
|
|
3660
3663
|
tone: "primary",
|
|
3661
|
-
size:
|
|
3664
|
+
size: p,
|
|
3662
3665
|
className: "flex-1 min-w-0",
|
|
3663
|
-
onClick: () =>
|
|
3666
|
+
onClick: () => F(),
|
|
3664
3667
|
children: "Randomize all"
|
|
3665
|
-
}), /* @__PURE__ */
|
|
3668
|
+
}), /* @__PURE__ */ M(A, {
|
|
3666
3669
|
label: "Reset to defaults",
|
|
3667
|
-
children: /* @__PURE__ */
|
|
3670
|
+
children: /* @__PURE__ */ M(f, {
|
|
3668
3671
|
tone: "primary",
|
|
3669
|
-
size:
|
|
3672
|
+
size: p,
|
|
3670
3673
|
iconOnly: "refresh",
|
|
3671
3674
|
"aria-label": "Reset to defaults",
|
|
3672
|
-
onClick:
|
|
3675
|
+
onClick: Ce,
|
|
3673
3676
|
className: "shrink-0"
|
|
3674
3677
|
})
|
|
3675
3678
|
})]
|
|
3676
3679
|
}),
|
|
3677
|
-
/* @__PURE__ */
|
|
3680
|
+
/* @__PURE__ */ N("div", {
|
|
3678
3681
|
className: "grid grid-cols-2 gap-2",
|
|
3679
3682
|
children: [
|
|
3680
|
-
/* @__PURE__ */
|
|
3683
|
+
/* @__PURE__ */ M(f, {
|
|
3681
3684
|
tone: "primary",
|
|
3682
|
-
size:
|
|
3683
|
-
onClick:
|
|
3685
|
+
size: p,
|
|
3686
|
+
onClick: Se,
|
|
3684
3687
|
children: "Color"
|
|
3685
3688
|
}),
|
|
3686
|
-
/* @__PURE__ */
|
|
3689
|
+
/* @__PURE__ */ M(f, {
|
|
3687
3690
|
tone: "primary",
|
|
3688
|
-
size:
|
|
3689
|
-
onClick: () =>
|
|
3691
|
+
size: p,
|
|
3692
|
+
onClick: () => F(["style"]),
|
|
3690
3693
|
children: "Type"
|
|
3691
3694
|
}),
|
|
3692
|
-
/* @__PURE__ */
|
|
3695
|
+
/* @__PURE__ */ M(f, {
|
|
3693
3696
|
tone: "primary",
|
|
3694
|
-
size:
|
|
3695
|
-
onClick: () =>
|
|
3697
|
+
size: p,
|
|
3698
|
+
onClick: () => F(["anim"]),
|
|
3696
3699
|
children: "Motion"
|
|
3697
3700
|
}),
|
|
3698
|
-
/* @__PURE__ */
|
|
3701
|
+
/* @__PURE__ */ M(f, {
|
|
3699
3702
|
tone: "primary",
|
|
3700
|
-
size:
|
|
3701
|
-
onClick:
|
|
3703
|
+
size: p,
|
|
3704
|
+
onClick: be,
|
|
3702
3705
|
children: "All elements"
|
|
3703
3706
|
})
|
|
3704
3707
|
]
|
|
3705
3708
|
}),
|
|
3706
|
-
/* @__PURE__ */
|
|
3709
|
+
/* @__PURE__ */ M(ee, { seed: P })
|
|
3707
3710
|
] }),
|
|
3708
|
-
|
|
3709
|
-
motions:
|
|
3710
|
-
mIdx:
|
|
3711
|
-
onSelect:
|
|
3711
|
+
c === "anim" && /* @__PURE__ */ M(St, {
|
|
3712
|
+
motions: D,
|
|
3713
|
+
mIdx: O,
|
|
3714
|
+
onSelect: ce,
|
|
3712
3715
|
onAdd: () => {
|
|
3713
|
-
|
|
3716
|
+
k(v.map((e, t) => t === E ? {
|
|
3714
3717
|
...e,
|
|
3715
|
-
motions: [...
|
|
3716
|
-
} : e)),
|
|
3718
|
+
motions: [...D, { ...ht }]
|
|
3719
|
+
} : e)), ce(D.length + 1);
|
|
3717
3720
|
},
|
|
3718
3721
|
onRemove: () => {
|
|
3719
|
-
|
|
3722
|
+
O !== 0 && (k(v.map((e, t) => t === E ? {
|
|
3720
3723
|
...e,
|
|
3721
|
-
motions:
|
|
3722
|
-
} : e)),
|
|
3724
|
+
motions: D.filter((e, t) => t !== O - 1)
|
|
3725
|
+
} : e)), ce(O - 1));
|
|
3723
3726
|
}
|
|
3724
3727
|
}),
|
|
3725
|
-
|
|
3726
|
-
|
|
3728
|
+
c !== "generate" && Te.map((t, r) => /* @__PURE__ */ N(ge, { children: [
|
|
3729
|
+
t.key === "arrangement" && /* @__PURE__ */ N(ve, { children: [/* @__PURE__ */ M("span", {
|
|
3727
3730
|
className: "kol-eyebrow text-fg-80",
|
|
3728
3731
|
children: "OpenType"
|
|
3729
|
-
}), /* @__PURE__ */
|
|
3730
|
-
value:
|
|
3731
|
-
onToggle: (e, t) =>
|
|
3732
|
-
...
|
|
3732
|
+
}), /* @__PURE__ */ M(Ct, {
|
|
3733
|
+
value: R?.opentype ?? {},
|
|
3734
|
+
onToggle: (e, t) => pe(E, { opentype: {
|
|
3735
|
+
...R?.opentype ?? {},
|
|
3733
3736
|
[e]: t
|
|
3734
3737
|
} })
|
|
3735
3738
|
})] }),
|
|
3736
|
-
|
|
3739
|
+
t.section && t.section !== Te[r - 1]?.section && /* @__PURE__ */ M("span", {
|
|
3737
3740
|
className: "kol-eyebrow text-fg-80",
|
|
3738
|
-
children:
|
|
3741
|
+
children: t.section
|
|
3739
3742
|
}),
|
|
3740
|
-
/* @__PURE__ */
|
|
3741
|
-
knob:
|
|
3742
|
-
comp:
|
|
3743
|
+
/* @__PURE__ */ M(xt, {
|
|
3744
|
+
knob: t,
|
|
3745
|
+
comp: ue(t),
|
|
3743
3746
|
idx: E,
|
|
3744
|
-
palette:
|
|
3745
|
-
onWrite:
|
|
3746
|
-
bridge: mt.has(
|
|
3747
|
+
palette: a,
|
|
3748
|
+
onWrite: ye,
|
|
3749
|
+
bridge: mt.has(t.key) && O > 0 ? null : {
|
|
3747
3750
|
layer: e,
|
|
3748
|
-
setProp:
|
|
3749
|
-
renderAnimate:
|
|
3750
|
-
key: dt(E,
|
|
3751
|
+
setProp: n,
|
|
3752
|
+
renderAnimate: s,
|
|
3753
|
+
key: dt(E, t.key)
|
|
3751
3754
|
}
|
|
3752
3755
|
}),
|
|
3753
|
-
|
|
3754
|
-
inst:
|
|
3756
|
+
t.key === "showPath" && R?.path?.type === "custom" && /* @__PURE__ */ M(wt, {
|
|
3757
|
+
inst: R,
|
|
3755
3758
|
layer: e,
|
|
3756
|
-
onPoints: (e) =>
|
|
3757
|
-
...
|
|
3759
|
+
onPoints: (e) => pe(E, { path: {
|
|
3760
|
+
...R?.path ?? {},
|
|
3758
3761
|
points: e
|
|
3759
3762
|
} })
|
|
3760
3763
|
})
|
|
3761
|
-
] },
|
|
3762
|
-
|
|
3764
|
+
] }, t.key)),
|
|
3765
|
+
c === "anim" && Ee && /* @__PURE__ */ M(Tt, {
|
|
3763
3766
|
layer: e,
|
|
3764
|
-
setProp:
|
|
3767
|
+
setProp: n,
|
|
3765
3768
|
insts: v,
|
|
3766
|
-
renderAnimate:
|
|
3769
|
+
renderAnimate: s
|
|
3767
3770
|
})
|
|
3768
3771
|
] });
|
|
3769
3772
|
}
|
|
3770
3773
|
function yt({ layer: e, onPreset: t }) {
|
|
3771
|
-
return /* @__PURE__ */
|
|
3772
|
-
tree:
|
|
3773
|
-
presets:
|
|
3774
|
-
current:
|
|
3774
|
+
return /* @__PURE__ */ M(oe, {
|
|
3775
|
+
tree: Ne,
|
|
3776
|
+
presets: H,
|
|
3777
|
+
current: H.find((t) => t.id === e.presetId) ?? H[0],
|
|
3775
3778
|
onPick: t,
|
|
3776
3779
|
inline: !0
|
|
3777
3780
|
});
|
|
3778
3781
|
}
|
|
3779
|
-
function bt({ insts: e, idx: t, onSelect: n, onWrite: r, marked: i, onMark:
|
|
3780
|
-
let
|
|
3782
|
+
function bt({ insts: e, idx: t, onSelect: n, onWrite: r, marked: i, onMark: a, onGroup: o, onUngroup: s }) {
|
|
3783
|
+
let c = h(), l = () => {
|
|
3781
3784
|
let t = e.length;
|
|
3782
3785
|
for (; e.some((e) => e.id === `i${t}`);) t++;
|
|
3783
3786
|
return `i${t}`;
|
|
3784
|
-
},
|
|
3787
|
+
}, u = () => {
|
|
3785
3788
|
let i = {
|
|
3786
|
-
id:
|
|
3789
|
+
id: l(),
|
|
3787
3790
|
text: "Text"
|
|
3788
3791
|
};
|
|
3789
|
-
e[t]?.fill && (i.fill = e[t].fill), r([...e,
|
|
3790
|
-
},
|
|
3792
|
+
e[t]?.fill && (i.fill = e[t].fill), r([...e, Oe(i, e.length)]), n(e.length);
|
|
3793
|
+
}, d = (t) => {
|
|
3791
3794
|
let i = {
|
|
3792
3795
|
...structuredClone(e[t]),
|
|
3793
|
-
id:
|
|
3796
|
+
id: l()
|
|
3794
3797
|
}, a = [...e];
|
|
3795
3798
|
a.splice(t + 1, 0, i), r(a), n(t + 1);
|
|
3796
3799
|
}, p = (t) => {
|
|
@@ -3800,107 +3803,107 @@ function bt({ insts: e, idx: t, onSelect: n, onWrite: r, marked: i, onMark: o, o
|
|
|
3800
3803
|
if (a < 0 || a >= e.length) return;
|
|
3801
3804
|
let o = [...e], [s] = o.splice(t, 1);
|
|
3802
3805
|
o.splice(a, 0, s), r(o), n(a);
|
|
3803
|
-
},
|
|
3804
|
-
return /* @__PURE__ */
|
|
3805
|
-
/* @__PURE__ */
|
|
3806
|
+
}, g = [...new Set(e.map((e) => e.group).filter(Boolean))];
|
|
3807
|
+
return /* @__PURE__ */ N(ve, { children: [
|
|
3808
|
+
/* @__PURE__ */ M("div", {
|
|
3806
3809
|
className: "flex flex-col gap-1",
|
|
3807
|
-
children: e.map((r,
|
|
3808
|
-
let s = _t(r.group,
|
|
3809
|
-
return /* @__PURE__ */
|
|
3810
|
-
onClick: () => n(
|
|
3811
|
-
className: `flex items-center gap-2 pl-2 pr-1 py-1 rounded cursor-pointer kol-helper-12 ${
|
|
3810
|
+
children: e.map((r, o) => {
|
|
3811
|
+
let s = _t(r.group, g);
|
|
3812
|
+
return /* @__PURE__ */ N("div", {
|
|
3813
|
+
onClick: () => n(o),
|
|
3814
|
+
className: `flex items-center gap-2 pl-2 pr-1 py-1 rounded cursor-pointer kol-helper-12 ${o === t ? "bg-oq-08 text-emphasis" : "text-body hover:bg-oq-04 hover:text-emphasis"}`,
|
|
3812
3815
|
children: [
|
|
3813
|
-
/* @__PURE__ */
|
|
3816
|
+
/* @__PURE__ */ M("span", {
|
|
3814
3817
|
onClick: (e) => e.stopPropagation(),
|
|
3815
3818
|
className: "shrink-0",
|
|
3816
3819
|
style: { lineHeight: 0 },
|
|
3817
|
-
children: /* @__PURE__ */
|
|
3820
|
+
children: /* @__PURE__ */ M(pe, {
|
|
3818
3821
|
checked: i.includes(r.id),
|
|
3819
|
-
onChange: () =>
|
|
3822
|
+
onChange: () => a(r.id)
|
|
3820
3823
|
})
|
|
3821
3824
|
}),
|
|
3822
|
-
/* @__PURE__ */
|
|
3825
|
+
/* @__PURE__ */ M("span", {
|
|
3823
3826
|
className: "kol-helper-10 text-meta shrink-0",
|
|
3824
|
-
children:
|
|
3827
|
+
children: o + 1
|
|
3825
3828
|
}),
|
|
3826
|
-
/* @__PURE__ */
|
|
3829
|
+
/* @__PURE__ */ M("span", {
|
|
3827
3830
|
className: "truncate flex-1 min-w-0",
|
|
3828
3831
|
children: r.text || "—"
|
|
3829
3832
|
}),
|
|
3830
|
-
s && /* @__PURE__ */
|
|
3833
|
+
s && /* @__PURE__ */ N("span", {
|
|
3831
3834
|
className: "shrink-0 kol-helper-10 text-meta",
|
|
3832
3835
|
children: ["grp ", s]
|
|
3833
3836
|
}),
|
|
3834
|
-
/* @__PURE__ */
|
|
3837
|
+
/* @__PURE__ */ M(A, {
|
|
3835
3838
|
label: "Duplicate element",
|
|
3836
|
-
children: /* @__PURE__ */
|
|
3839
|
+
children: /* @__PURE__ */ M(f, {
|
|
3837
3840
|
tone: "ghost",
|
|
3838
|
-
size:
|
|
3841
|
+
size: c,
|
|
3839
3842
|
quiet: !0,
|
|
3840
3843
|
iconOnly: "copy",
|
|
3841
3844
|
iconSize: 12,
|
|
3842
3845
|
"aria-label": "Duplicate element",
|
|
3843
3846
|
onClick: (e) => {
|
|
3844
|
-
e.stopPropagation(),
|
|
3847
|
+
e.stopPropagation(), d(o);
|
|
3845
3848
|
}
|
|
3846
3849
|
})
|
|
3847
3850
|
}),
|
|
3848
|
-
/* @__PURE__ */
|
|
3851
|
+
/* @__PURE__ */ M("span", {
|
|
3849
3852
|
className: e.length <= 1 ? "invisible pointer-events-none" : "contents",
|
|
3850
3853
|
"aria-hidden": e.length <= 1 || void 0,
|
|
3851
|
-
children: /* @__PURE__ */
|
|
3854
|
+
children: /* @__PURE__ */ M(A, {
|
|
3852
3855
|
label: "Delete element",
|
|
3853
|
-
children: /* @__PURE__ */
|
|
3856
|
+
children: /* @__PURE__ */ M(f, {
|
|
3854
3857
|
tone: "ghost",
|
|
3855
|
-
size:
|
|
3858
|
+
size: c,
|
|
3856
3859
|
quiet: !0,
|
|
3857
3860
|
iconOnly: "x",
|
|
3858
3861
|
iconSize: 10,
|
|
3859
3862
|
"aria-label": "Delete element",
|
|
3860
3863
|
onClick: (e) => {
|
|
3861
|
-
e.stopPropagation(), p(
|
|
3864
|
+
e.stopPropagation(), p(o);
|
|
3862
3865
|
}
|
|
3863
3866
|
})
|
|
3864
3867
|
})
|
|
3865
3868
|
})
|
|
3866
3869
|
]
|
|
3867
|
-
}, r.id ??
|
|
3870
|
+
}, r.id ?? o);
|
|
3868
3871
|
})
|
|
3869
3872
|
}),
|
|
3870
|
-
i.length > 0 && /* @__PURE__ */
|
|
3873
|
+
i.length > 0 && /* @__PURE__ */ N("div", {
|
|
3871
3874
|
className: "grid grid-cols-2 gap-1",
|
|
3872
|
-
children: [i.length >= 2 && /* @__PURE__ */
|
|
3875
|
+
children: [i.length >= 2 && /* @__PURE__ */ M(f, {
|
|
3873
3876
|
tone: "primary",
|
|
3874
|
-
size:
|
|
3875
|
-
onClick:
|
|
3877
|
+
size: c,
|
|
3878
|
+
onClick: o,
|
|
3876
3879
|
children: "Group"
|
|
3877
|
-
}), /* @__PURE__ */
|
|
3880
|
+
}), /* @__PURE__ */ M(f, {
|
|
3878
3881
|
tone: "primary",
|
|
3879
|
-
size:
|
|
3880
|
-
onClick:
|
|
3882
|
+
size: c,
|
|
3883
|
+
onClick: s,
|
|
3881
3884
|
children: "Ungroup"
|
|
3882
3885
|
})]
|
|
3883
3886
|
}),
|
|
3884
|
-
/* @__PURE__ */
|
|
3887
|
+
/* @__PURE__ */ N("div", {
|
|
3885
3888
|
className: "flex items-center gap-1",
|
|
3886
3889
|
children: [
|
|
3887
|
-
/* @__PURE__ */
|
|
3890
|
+
/* @__PURE__ */ M(f, {
|
|
3888
3891
|
tone: "primary",
|
|
3889
|
-
size:
|
|
3892
|
+
size: c,
|
|
3890
3893
|
className: "flex-1",
|
|
3891
3894
|
iconLeft: "plus",
|
|
3892
3895
|
iconSize: 12,
|
|
3893
|
-
onClick:
|
|
3896
|
+
onClick: u,
|
|
3894
3897
|
children: "Add element"
|
|
3895
3898
|
}),
|
|
3896
|
-
/* @__PURE__ */
|
|
3899
|
+
/* @__PURE__ */ M("span", {
|
|
3897
3900
|
className: t <= 0 ? "invisible pointer-events-none" : "contents",
|
|
3898
3901
|
"aria-hidden": t <= 0 || void 0,
|
|
3899
|
-
children: /* @__PURE__ */
|
|
3902
|
+
children: /* @__PURE__ */ M(A, {
|
|
3900
3903
|
label: "Move element up",
|
|
3901
|
-
children: /* @__PURE__ */
|
|
3904
|
+
children: /* @__PURE__ */ M(f, {
|
|
3902
3905
|
tone: "ghost",
|
|
3903
|
-
size:
|
|
3906
|
+
size: c,
|
|
3904
3907
|
quiet: !0,
|
|
3905
3908
|
iconOnly: "chevron-down",
|
|
3906
3909
|
className: "rotate-180",
|
|
@@ -3909,14 +3912,14 @@ function bt({ insts: e, idx: t, onSelect: n, onWrite: r, marked: i, onMark: o, o
|
|
|
3909
3912
|
})
|
|
3910
3913
|
})
|
|
3911
3914
|
}),
|
|
3912
|
-
/* @__PURE__ */
|
|
3915
|
+
/* @__PURE__ */ M("span", {
|
|
3913
3916
|
className: t >= e.length - 1 ? "invisible pointer-events-none" : "contents",
|
|
3914
3917
|
"aria-hidden": t >= e.length - 1 || void 0,
|
|
3915
|
-
children: /* @__PURE__ */
|
|
3918
|
+
children: /* @__PURE__ */ M(A, {
|
|
3916
3919
|
label: "Move element down",
|
|
3917
|
-
children: /* @__PURE__ */
|
|
3920
|
+
children: /* @__PURE__ */ M(f, {
|
|
3918
3921
|
tone: "ghost",
|
|
3919
|
-
size:
|
|
3922
|
+
size: c,
|
|
3920
3923
|
quiet: !0,
|
|
3921
3924
|
iconOnly: "chevron-down",
|
|
3922
3925
|
"aria-label": "Move element down",
|
|
@@ -3928,92 +3931,92 @@ function bt({ insts: e, idx: t, onSelect: n, onWrite: r, marked: i, onMark: o, o
|
|
|
3928
3931
|
})
|
|
3929
3932
|
] });
|
|
3930
3933
|
}
|
|
3931
|
-
function xt({ knob: e, comp:
|
|
3932
|
-
let
|
|
3933
|
-
if (e.type === "color") return /* @__PURE__ */
|
|
3934
|
+
function xt({ knob: e, comp: t, idx: n, palette: r, onWrite: i, bridge: a }) {
|
|
3935
|
+
let o = h(), s = e.get(t, n), l = (t) => i(e, t);
|
|
3936
|
+
if (e.type === "color") return /* @__PURE__ */ M(_, {
|
|
3934
3937
|
label: e.label,
|
|
3935
|
-
value:
|
|
3936
|
-
onChange: (e) =>
|
|
3937
|
-
palette:
|
|
3938
|
+
value: s,
|
|
3939
|
+
onChange: (e) => l(C(e, r) ?? e),
|
|
3940
|
+
palette: r,
|
|
3938
3941
|
inline: !0
|
|
3939
3942
|
});
|
|
3940
|
-
if (e.type === "select") return /* @__PURE__ */
|
|
3943
|
+
if (e.type === "select") return /* @__PURE__ */ M(b, {
|
|
3941
3944
|
label: e.label,
|
|
3942
3945
|
align: "fill",
|
|
3943
|
-
labelWidth:
|
|
3944
|
-
children: /* @__PURE__ */
|
|
3946
|
+
labelWidth: d,
|
|
3947
|
+
children: /* @__PURE__ */ M(w, {
|
|
3945
3948
|
variant: "subtle",
|
|
3946
|
-
size:
|
|
3949
|
+
size: o,
|
|
3947
3950
|
className: "w-full",
|
|
3948
|
-
options: ct(e,
|
|
3949
|
-
value:
|
|
3950
|
-
onChange:
|
|
3951
|
+
options: ct(e, t, n),
|
|
3952
|
+
value: s,
|
|
3953
|
+
onChange: l
|
|
3951
3954
|
})
|
|
3952
3955
|
});
|
|
3953
|
-
let { min:
|
|
3954
|
-
return /* @__PURE__ */
|
|
3956
|
+
let { min: u, max: f } = lt(e, t, n), p = a && a.layer[a.key], m = c(p), v = typeof p == "number" ? p : s, y = typeof p == "number" ? (e) => a.setProp(a.key, e) : l;
|
|
3957
|
+
return /* @__PURE__ */ M(b, {
|
|
3955
3958
|
label: e.label,
|
|
3956
3959
|
align: "fill",
|
|
3957
|
-
labelWidth:
|
|
3958
|
-
children: /* @__PURE__ */
|
|
3960
|
+
labelWidth: d,
|
|
3961
|
+
children: /* @__PURE__ */ N("div", {
|
|
3959
3962
|
className: "flex flex-1 items-center gap-2",
|
|
3960
|
-
children: [/* @__PURE__ */
|
|
3963
|
+
children: [/* @__PURE__ */ M("div", {
|
|
3961
3964
|
className: "flex-1 min-w-0",
|
|
3962
|
-
children:
|
|
3965
|
+
children: m ? /* @__PURE__ */ M("div", {
|
|
3963
3966
|
className: "kol-helper-12 text-meta italic px-1",
|
|
3964
3967
|
children: "animated"
|
|
3965
|
-
}) : /* @__PURE__ */
|
|
3966
|
-
min:
|
|
3967
|
-
max:
|
|
3968
|
+
}) : /* @__PURE__ */ M(g, {
|
|
3969
|
+
min: u,
|
|
3970
|
+
max: f,
|
|
3968
3971
|
step: e.step ?? 1,
|
|
3969
|
-
value: typeof
|
|
3970
|
-
onChange:
|
|
3971
|
-
displayWidth: String(
|
|
3972
|
+
value: typeof v == "number" ? v : u,
|
|
3973
|
+
onChange: y,
|
|
3974
|
+
displayWidth: String(f).length,
|
|
3972
3975
|
className: "flex-1"
|
|
3973
3976
|
})
|
|
3974
|
-
}),
|
|
3975
|
-
key:
|
|
3977
|
+
}), a?.renderAnimate?.({
|
|
3978
|
+
key: a.key,
|
|
3976
3979
|
label: e.label,
|
|
3977
3980
|
type: "range",
|
|
3978
|
-
min:
|
|
3979
|
-
max:
|
|
3981
|
+
min: u,
|
|
3982
|
+
max: f,
|
|
3980
3983
|
step: e.step ?? 1,
|
|
3981
|
-
default: typeof
|
|
3984
|
+
default: typeof s == "number" ? s : u
|
|
3982
3985
|
})]
|
|
3983
3986
|
})
|
|
3984
3987
|
});
|
|
3985
3988
|
}
|
|
3986
3989
|
function St({ motions: e, mIdx: t, onSelect: n, onAdd: r, onRemove: i }) {
|
|
3987
|
-
let
|
|
3990
|
+
let a = h(), o = [{
|
|
3988
3991
|
value: "0",
|
|
3989
3992
|
label: "1"
|
|
3990
3993
|
}, ...e.map((e, t) => ({
|
|
3991
3994
|
value: String(t + 1),
|
|
3992
3995
|
label: String(t + 2)
|
|
3993
3996
|
}))];
|
|
3994
|
-
return /* @__PURE__ */
|
|
3997
|
+
return /* @__PURE__ */ N("div", {
|
|
3995
3998
|
className: "flex flex-col gap-1",
|
|
3996
|
-
children: [/* @__PURE__ */
|
|
3999
|
+
children: [/* @__PURE__ */ M("span", {
|
|
3997
4000
|
className: "kol-eyebrow text-fg-80",
|
|
3998
4001
|
children: "Motion layers"
|
|
3999
|
-
}), /* @__PURE__ */
|
|
4002
|
+
}), /* @__PURE__ */ N("div", {
|
|
4000
4003
|
className: "flex items-center gap-1",
|
|
4001
4004
|
children: [
|
|
4002
|
-
/* @__PURE__ */
|
|
4005
|
+
/* @__PURE__ */ M("div", {
|
|
4003
4006
|
className: "flex-1 min-w-0",
|
|
4004
|
-
children: /* @__PURE__ */
|
|
4007
|
+
children: /* @__PURE__ */ M(m, {
|
|
4005
4008
|
layout: "joined",
|
|
4006
|
-
size:
|
|
4009
|
+
size: a,
|
|
4007
4010
|
value: String(t),
|
|
4008
4011
|
onChange: (e) => n(Number(e)),
|
|
4009
|
-
options:
|
|
4012
|
+
options: o
|
|
4010
4013
|
})
|
|
4011
4014
|
}),
|
|
4012
|
-
/* @__PURE__ */
|
|
4015
|
+
/* @__PURE__ */ M(A, {
|
|
4013
4016
|
label: "Add motion layer",
|
|
4014
|
-
children: /* @__PURE__ */
|
|
4017
|
+
children: /* @__PURE__ */ M(f, {
|
|
4015
4018
|
tone: "ghost",
|
|
4016
|
-
size:
|
|
4019
|
+
size: a,
|
|
4017
4020
|
quiet: !0,
|
|
4018
4021
|
iconOnly: "plus",
|
|
4019
4022
|
iconSize: 12,
|
|
@@ -4021,14 +4024,14 @@ function St({ motions: e, mIdx: t, onSelect: n, onAdd: r, onRemove: i }) {
|
|
|
4021
4024
|
onClick: r
|
|
4022
4025
|
})
|
|
4023
4026
|
}),
|
|
4024
|
-
/* @__PURE__ */
|
|
4027
|
+
/* @__PURE__ */ M("span", {
|
|
4025
4028
|
className: t === 0 ? "invisible pointer-events-none" : "contents",
|
|
4026
4029
|
"aria-hidden": t === 0 || void 0,
|
|
4027
|
-
children: /* @__PURE__ */
|
|
4030
|
+
children: /* @__PURE__ */ M(A, {
|
|
4028
4031
|
label: "Delete motion layer (the primary can only be set to None)",
|
|
4029
|
-
children: /* @__PURE__ */
|
|
4032
|
+
children: /* @__PURE__ */ M(f, {
|
|
4030
4033
|
tone: "ghost",
|
|
4031
|
-
size:
|
|
4034
|
+
size: a,
|
|
4032
4035
|
quiet: !0,
|
|
4033
4036
|
iconOnly: "x",
|
|
4034
4037
|
iconSize: 10,
|
|
@@ -4042,7 +4045,7 @@ function St({ motions: e, mIdx: t, onSelect: n, onAdd: r, onRemove: i }) {
|
|
|
4042
4045
|
});
|
|
4043
4046
|
}
|
|
4044
4047
|
function Ct({ value: e = {}, onToggle: t }) {
|
|
4045
|
-
let n =
|
|
4048
|
+
let n = h(), [r, i] = j(!1), a = he({
|
|
4046
4049
|
open: r,
|
|
4047
4050
|
onOpenChange: i,
|
|
4048
4051
|
placement: "bottom-start",
|
|
@@ -4050,21 +4053,21 @@ function Ct({ value: e = {}, onToggle: t }) {
|
|
|
4050
4053
|
flip: !1,
|
|
4051
4054
|
matchReferenceWidth: !0,
|
|
4052
4055
|
role: "listbox"
|
|
4053
|
-
}),
|
|
4054
|
-
return /* @__PURE__ */
|
|
4056
|
+
}), o = Ve.filter((t) => e[t.tag]).length;
|
|
4057
|
+
return /* @__PURE__ */ N("div", {
|
|
4055
4058
|
className: "relative w-full",
|
|
4056
|
-
children: [/* @__PURE__ */
|
|
4057
|
-
ref:
|
|
4058
|
-
...
|
|
4059
|
+
children: [/* @__PURE__ */ M(f, {
|
|
4060
|
+
ref: a.refs.setReference,
|
|
4061
|
+
...a.getReferenceProps(),
|
|
4059
4062
|
tone: "primary",
|
|
4060
4063
|
size: n,
|
|
4061
4064
|
className: "w-full justify-between",
|
|
4062
4065
|
iconRight: "chevron-down",
|
|
4063
4066
|
"aria-haspopup": "listbox",
|
|
4064
4067
|
"aria-expanded": r,
|
|
4065
|
-
children:
|
|
4066
|
-
}), /* @__PURE__ */
|
|
4067
|
-
popover:
|
|
4068
|
+
children: o ? `${o} feature${o > 1 ? "s" : ""}` : "None"
|
|
4069
|
+
}), /* @__PURE__ */ M(k, {
|
|
4070
|
+
popover: a,
|
|
4068
4071
|
panel: !1,
|
|
4069
4072
|
focus: !1,
|
|
4070
4073
|
style: {
|
|
@@ -4073,12 +4076,12 @@ function Ct({ value: e = {}, onToggle: t }) {
|
|
|
4073
4076
|
borderRadius: "0 0 4px 4px",
|
|
4074
4077
|
zIndex: "var(--kol-z-dropdown)"
|
|
4075
4078
|
},
|
|
4076
|
-
children: /* @__PURE__ */
|
|
4079
|
+
children: /* @__PURE__ */ M("div", {
|
|
4077
4080
|
className: "flex max-h-[300px] flex-col items-stretch overflow-y-auto",
|
|
4078
4081
|
role: "listbox",
|
|
4079
|
-
children:
|
|
4082
|
+
children: Ve.map((n) => /* @__PURE__ */ M(fe, {
|
|
4080
4083
|
onClick: () => t(n.tag, !e[n.tag]),
|
|
4081
|
-
shortcut: e[n.tag] ? /* @__PURE__ */
|
|
4084
|
+
shortcut: e[n.tag] ? /* @__PURE__ */ M(ye, {
|
|
4082
4085
|
name: "check",
|
|
4083
4086
|
size: 11
|
|
4084
4087
|
}) : void 0,
|
|
@@ -4089,69 +4092,69 @@ function Ct({ value: e = {}, onToggle: t }) {
|
|
|
4089
4092
|
});
|
|
4090
4093
|
}
|
|
4091
4094
|
function wt({ inst: e, layer: t, onPoints: n }) {
|
|
4092
|
-
let r =
|
|
4093
|
-
return /* @__PURE__ */
|
|
4095
|
+
let r = h(), i = e?.path?.points, a = Array.isArray(i) && i.length >= 2 ? i : xe, o = t.w > 0 && t.h > 0 ? t.w / t.h : 1;
|
|
4096
|
+
return /* @__PURE__ */ N("div", {
|
|
4094
4097
|
className: "flex flex-col gap-2",
|
|
4095
|
-
children: [/* @__PURE__ */
|
|
4096
|
-
value:
|
|
4098
|
+
children: [/* @__PURE__ */ M(le, {
|
|
4099
|
+
value: a.map(([e, t]) => ({
|
|
4097
4100
|
x: e,
|
|
4098
4101
|
y: t
|
|
4099
4102
|
})),
|
|
4100
4103
|
onChange: (e) => n(e.map((e) => [Number(e.x.toFixed(3)), Number(e.y.toFixed(3))])),
|
|
4101
|
-
aspect:
|
|
4104
|
+
aspect: o,
|
|
4102
4105
|
size: r,
|
|
4103
4106
|
minPoints: 2,
|
|
4104
4107
|
ariaLabel: "Custom path points"
|
|
4105
|
-
}), /* @__PURE__ */
|
|
4108
|
+
}), /* @__PURE__ */ N("div", {
|
|
4106
4109
|
className: "grid grid-cols-2 gap-2",
|
|
4107
|
-
children: [/* @__PURE__ */
|
|
4110
|
+
children: [/* @__PURE__ */ M(f, {
|
|
4108
4111
|
tone: "primary",
|
|
4109
4112
|
size: r,
|
|
4110
|
-
onClick: () => n([...
|
|
4113
|
+
onClick: () => n([...a, [.5, .5]]),
|
|
4111
4114
|
children: "Add point"
|
|
4112
|
-
}),
|
|
4115
|
+
}), a.length > 2 && /* @__PURE__ */ M(f, {
|
|
4113
4116
|
tone: "primary",
|
|
4114
4117
|
size: r,
|
|
4115
|
-
onClick: () => n(
|
|
4118
|
+
onClick: () => n(a.slice(0, -1)),
|
|
4116
4119
|
children: "Remove point"
|
|
4117
4120
|
})]
|
|
4118
4121
|
})]
|
|
4119
4122
|
});
|
|
4120
4123
|
}
|
|
4121
|
-
function Tt({ layer: e, setProp:
|
|
4122
|
-
let
|
|
4124
|
+
function Tt({ layer: e, setProp: t, insts: n, renderAnimate: r }) {
|
|
4125
|
+
let i = pt, a = e[i.key], o = c(a), s = n.find((e) => e?.morph?.on)?.morph?.blend ?? i.default, l = typeof a == "number" ? a : s, u = o ? /* @__PURE__ */ M("div", {
|
|
4123
4126
|
className: "kol-helper-12 text-meta italic px-1",
|
|
4124
4127
|
children: "animated"
|
|
4125
|
-
}) : /* @__PURE__ */
|
|
4126
|
-
min:
|
|
4127
|
-
max:
|
|
4128
|
-
step:
|
|
4129
|
-
value:
|
|
4130
|
-
onChange: (e) =>
|
|
4128
|
+
}) : /* @__PURE__ */ M(g, {
|
|
4129
|
+
min: i.min,
|
|
4130
|
+
max: i.max,
|
|
4131
|
+
step: i.step,
|
|
4132
|
+
value: l,
|
|
4133
|
+
onChange: (e) => t(i.key, e)
|
|
4131
4134
|
});
|
|
4132
|
-
return /* @__PURE__ */
|
|
4133
|
-
label:
|
|
4135
|
+
return /* @__PURE__ */ M(b, {
|
|
4136
|
+
label: i.label,
|
|
4134
4137
|
align: "fill",
|
|
4135
|
-
labelWidth:
|
|
4136
|
-
children: /* @__PURE__ */
|
|
4138
|
+
labelWidth: d,
|
|
4139
|
+
children: /* @__PURE__ */ N("div", {
|
|
4137
4140
|
className: "flex flex-1 items-center gap-2",
|
|
4138
|
-
children: [/* @__PURE__ */
|
|
4141
|
+
children: [/* @__PURE__ */ M("div", {
|
|
4139
4142
|
className: "flex-1 min-w-0",
|
|
4140
|
-
children:
|
|
4141
|
-
}),
|
|
4143
|
+
children: u
|
|
4144
|
+
}), r(i)]
|
|
4142
4145
|
})
|
|
4143
4146
|
});
|
|
4144
4147
|
}
|
|
4145
4148
|
//#endregion
|
|
4146
4149
|
//#region src/editor/params/TransportBar.jsx
|
|
4147
4150
|
function Et({ seconds: e, onCommit: t, size: n }) {
|
|
4148
|
-
let r = String(e), [i, a] =
|
|
4149
|
-
return
|
|
4151
|
+
let r = String(e), [i, a] = j(r), [o, s] = j(!1);
|
|
4152
|
+
return _e(() => {
|
|
4150
4153
|
o || a(r);
|
|
4151
|
-
}, [r, o]), /* @__PURE__ */
|
|
4154
|
+
}, [r, o]), /* @__PURE__ */ M(A, {
|
|
4152
4155
|
label: "Loop length",
|
|
4153
4156
|
triggerClassName: "flex w-full",
|
|
4154
|
-
children: /* @__PURE__ */
|
|
4157
|
+
children: /* @__PURE__ */ M(de, {
|
|
4155
4158
|
type: "text",
|
|
4156
4159
|
inputMode: "decimal",
|
|
4157
4160
|
variant: "property",
|
|
@@ -4182,21 +4185,21 @@ function Et({ seconds: e, onCommit: t, size: n }) {
|
|
|
4182
4185
|
})
|
|
4183
4186
|
});
|
|
4184
4187
|
}
|
|
4185
|
-
var Dt = (e, t, n = !1) => /* @__PURE__ */
|
|
4188
|
+
var Dt = (e, t, n = !1) => /* @__PURE__ */ M(ye, {
|
|
4186
4189
|
name: e,
|
|
4187
4190
|
variant: n ? "solid" : "outline",
|
|
4188
|
-
size:
|
|
4191
|
+
size: me(t, !0)
|
|
4189
4192
|
}), Ot = {
|
|
4190
4193
|
sm: "shrink-0 [&_.kol-seg-cell]:flex-none [&_.kol-seg-cell]:px-0 [&_.kol-seg-cell]:w-[var(--kol-ctl-sm)]",
|
|
4191
4194
|
md: "shrink-0 [&_.kol-seg-cell]:flex-none [&_.kol-seg-cell]:px-0 [&_.kol-seg-cell]:w-[var(--kol-ctl-md)]",
|
|
4192
4195
|
lg: "shrink-0 [&_.kol-seg-cell]:flex-none [&_.kol-seg-cell]:px-0 [&_.kol-seg-cell]:w-[var(--kol-ctl-lg)]"
|
|
4193
4196
|
};
|
|
4194
4197
|
function kt({ size: e = "sm" }) {
|
|
4195
|
-
let { playing: t, loopSeconds: n, play: r, pause: i, stop:
|
|
4196
|
-
return /* @__PURE__ */
|
|
4198
|
+
let { playing: t, loopSeconds: n, play: r, pause: i, stop: o, rewind: s, setLoopSeconds: c } = a();
|
|
4199
|
+
return /* @__PURE__ */ N("div", {
|
|
4197
4200
|
className: "flex items-center gap-2",
|
|
4198
4201
|
children: [
|
|
4199
|
-
/* @__PURE__ */
|
|
4202
|
+
/* @__PURE__ */ M(ue, {
|
|
4200
4203
|
layout: "joined",
|
|
4201
4204
|
size: e,
|
|
4202
4205
|
ariaLabel: "Playback",
|
|
@@ -4215,21 +4218,21 @@ function kt({ size: e = "sm" }) {
|
|
|
4215
4218
|
label: Dt("pause", e, !t)
|
|
4216
4219
|
}]
|
|
4217
4220
|
}),
|
|
4218
|
-
/* @__PURE__ */
|
|
4221
|
+
/* @__PURE__ */ M("div", {
|
|
4219
4222
|
className: "flex-1 min-w-0",
|
|
4220
|
-
children: /* @__PURE__ */
|
|
4223
|
+
children: /* @__PURE__ */ M(Et, {
|
|
4221
4224
|
seconds: n,
|
|
4222
4225
|
onCommit: c,
|
|
4223
4226
|
size: e
|
|
4224
4227
|
})
|
|
4225
4228
|
}),
|
|
4226
|
-
/* @__PURE__ */
|
|
4229
|
+
/* @__PURE__ */ M(ue, {
|
|
4227
4230
|
layout: "joined",
|
|
4228
4231
|
size: e,
|
|
4229
4232
|
ariaLabel: "Reset",
|
|
4230
4233
|
value: null,
|
|
4231
4234
|
className: Ot[e],
|
|
4232
|
-
onChange: (e) => e === "stop" ?
|
|
4235
|
+
onChange: (e) => e === "stop" ? o() : s(),
|
|
4233
4236
|
options: [{
|
|
4234
4237
|
value: "stop",
|
|
4235
4238
|
ariaLabel: "Stop",
|
|
@@ -4247,20 +4250,20 @@ function kt({ size: e = "sm" }) {
|
|
|
4247
4250
|
//#region src/packs/motion.js
|
|
4248
4251
|
var At = {
|
|
4249
4252
|
layerTypes: ["kinetic"],
|
|
4250
|
-
kineticPresetById:
|
|
4251
|
-
presetComp:
|
|
4252
|
-
KINETIC_TREE:
|
|
4253
|
-
KINETIC_PRESETS:
|
|
4254
|
-
KineticType:
|
|
4253
|
+
kineticPresetById: je,
|
|
4254
|
+
presetComp: Pe,
|
|
4255
|
+
KINETIC_TREE: Ne,
|
|
4256
|
+
KINETIC_PRESETS: H,
|
|
4257
|
+
KineticType: Ke,
|
|
4255
4258
|
applyKnobBridges: ft,
|
|
4256
|
-
loadFonts:
|
|
4257
|
-
warmFontCss:
|
|
4258
|
-
kineticFontCss:
|
|
4259
|
+
loadFonts: ce,
|
|
4260
|
+
warmFontCss: re,
|
|
4261
|
+
kineticFontCss: ae,
|
|
4259
4262
|
KineticPanel: vt,
|
|
4260
|
-
TimelineDock:
|
|
4261
|
-
useTimelineUp:
|
|
4263
|
+
TimelineDock: O,
|
|
4264
|
+
useTimelineUp: D,
|
|
4262
4265
|
TransportBar: kt
|
|
4263
4266
|
};
|
|
4264
|
-
|
|
4267
|
+
p("motion", At);
|
|
4265
4268
|
//#endregion
|
|
4266
|
-
export {
|
|
4269
|
+
export { lt as a, H as c, Pe as d, xe as f, ct as i, Ne as l, vt as n, ut as o, st as r, Ve as s, At as t, Oe as u };
|