@intlayer/design-system 2.0.10 → 2.0.11
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/LICENSE +202 -21
- package/dist/.vite/manifest.json +20 -11
- package/dist/components/Container/index.cjs.js +1 -1
- package/dist/components/Container/index.es.js +5 -5
- package/dist/components/DictionaryEditor/ItemLayout.cjs.js +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.es.js +3 -3
- package/dist/components/Footer/index.cjs.js +1 -1
- package/dist/components/Footer/index.es.js +24 -17
- package/dist/components/Headers/SectionScroller.cjs.js +1 -0
- package/dist/components/Headers/SectionScroller.d.ts +1 -0
- package/dist/components/Headers/SectionScroller.es.js +20 -0
- package/dist/components/Headers/index.cjs.js +1 -1
- package/dist/components/Headers/index.d.ts +6 -4
- package/dist/components/Headers/index.es.js +80 -12
- package/dist/components/IDE/IDE.cjs.js +1 -1
- package/dist/components/IDE/IDE.es.js +27 -24
- package/dist/components/Loader/index.cjs.js +1 -1
- package/dist/components/Loader/index.es.js +12 -10
- package/dist/components/MarkDownRender/index.cjs.js +1 -1
- package/dist/components/MarkDownRender/index.es.js +46 -24
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.es.js +5 -5
- package/dist/components/Navbar/DesktopNavbar.cjs.js +1 -1
- package/dist/components/Navbar/DesktopNavbar.es.js +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs.js +8 -8
- package/dist/components/Navbar/MobileNavbar.es.js +122 -122
- package/dist/components/Popover/index.cjs.js +1 -1
- package/dist/components/Popover/index.es.js +22 -18
- package/dist/components/PressableDiv/PressableDiv.cjs.js +1 -1
- package/dist/components/PressableDiv/PressableDiv.es.js +5 -4
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.cjs.js +1 -1
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.es.js +48 -48
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.es.js +10 -8
- package/dist/motion-minimal-BFpJTMRN.js +788 -0
- package/dist/motion-minimal-CwdK8lup.cjs +1 -0
- package/package.json +3 -3
- package/dist/motion-BuKul-u9.cjs +0 -1
- package/dist/motion-CP5YERk7.js +0 -4517
|
@@ -0,0 +1,788 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as $ } from "./jsx-runtime-Tw_Kw2GZ.js";
|
|
3
|
+
import { createContext as S, useLayoutEffect as St, useEffect as K, useContext as y, useRef as O, useInsertionEffect as Pt, useCallback as xt, useMemo as T, forwardRef as Vt, Fragment as Ct, createElement as Mt } from "react";
|
|
4
|
+
const Q = S({
|
|
5
|
+
transformPagePoint: (t) => t,
|
|
6
|
+
isStatic: !1,
|
|
7
|
+
reducedMotion: "never"
|
|
8
|
+
}), A = S({}), J = S(null), tt = typeof document < "u", Tt = tt ? St : K, et = S({ strict: !1 }), nt = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), At = "framerAppearId", Lt = "data-" + nt(At);
|
|
9
|
+
class N {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.order = [], this.scheduled = /* @__PURE__ */ new Set();
|
|
12
|
+
}
|
|
13
|
+
add(e) {
|
|
14
|
+
if (!this.scheduled.has(e))
|
|
15
|
+
return this.scheduled.add(e), this.order.push(e), !0;
|
|
16
|
+
}
|
|
17
|
+
remove(e) {
|
|
18
|
+
const n = this.order.indexOf(e);
|
|
19
|
+
n !== -1 && (this.order.splice(n, 1), this.scheduled.delete(e));
|
|
20
|
+
}
|
|
21
|
+
clear() {
|
|
22
|
+
this.order.length = 0, this.scheduled.clear();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function kt(t) {
|
|
26
|
+
let e = new N(), n = new N(), o = 0, r = !1, s = !1;
|
|
27
|
+
const c = /* @__PURE__ */ new WeakSet(), l = {
|
|
28
|
+
/**
|
|
29
|
+
* Schedule a process to run on the next frame.
|
|
30
|
+
*/
|
|
31
|
+
schedule: (d, m = !1, u = !1) => {
|
|
32
|
+
const a = u && r, f = a ? e : n;
|
|
33
|
+
return m && c.add(d), f.add(d) && a && r && (o = e.order.length), d;
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* Cancel the provided callback from running on the next frame.
|
|
37
|
+
*/
|
|
38
|
+
cancel: (d) => {
|
|
39
|
+
n.remove(d), c.delete(d);
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* Execute all schedule callbacks.
|
|
43
|
+
*/
|
|
44
|
+
process: (d) => {
|
|
45
|
+
if (r) {
|
|
46
|
+
s = !0;
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (r = !0, [e, n] = [n, e], n.clear(), o = e.order.length, o)
|
|
50
|
+
for (let m = 0; m < o; m++) {
|
|
51
|
+
const u = e.order[m];
|
|
52
|
+
c.has(u) && (l.schedule(u), t()), u(d);
|
|
53
|
+
}
|
|
54
|
+
r = !1, s && (s = !1, l.process(d));
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
return l;
|
|
58
|
+
}
|
|
59
|
+
const x = [
|
|
60
|
+
"read",
|
|
61
|
+
// Read
|
|
62
|
+
"resolveKeyframes",
|
|
63
|
+
// Write/Read/Write/Read
|
|
64
|
+
"update",
|
|
65
|
+
// Compute
|
|
66
|
+
"preRender",
|
|
67
|
+
// Compute
|
|
68
|
+
"render",
|
|
69
|
+
// Write
|
|
70
|
+
"postRender"
|
|
71
|
+
// Compute
|
|
72
|
+
], Rt = 40;
|
|
73
|
+
function rt(t, e) {
|
|
74
|
+
let n = !1, o = !0;
|
|
75
|
+
const r = {
|
|
76
|
+
delta: 0,
|
|
77
|
+
timestamp: 0,
|
|
78
|
+
isProcessing: !1
|
|
79
|
+
}, s = x.reduce((a, f) => (a[f] = kt(() => n = !0), a), {}), c = (a) => {
|
|
80
|
+
s[a].process(r);
|
|
81
|
+
}, l = () => {
|
|
82
|
+
const a = performance.now();
|
|
83
|
+
n = !1, r.delta = o ? 1e3 / 60 : Math.max(Math.min(a - r.timestamp, Rt), 1), r.timestamp = a, r.isProcessing = !0, x.forEach(c), r.isProcessing = !1, n && e && (o = !1, t(l));
|
|
84
|
+
}, d = () => {
|
|
85
|
+
n = !0, o = !0, r.isProcessing || t(l);
|
|
86
|
+
};
|
|
87
|
+
return { schedule: x.reduce((a, f) => {
|
|
88
|
+
const g = s[f];
|
|
89
|
+
return a[f] = (h, p = !1, D = !1) => (n || d(), g.schedule(h, p, D)), a;
|
|
90
|
+
}, {}), cancel: (a) => x.forEach((f) => s[f].cancel(a)), state: r, steps: s };
|
|
91
|
+
}
|
|
92
|
+
const { schedule: Ot, cancel: We } = rt(queueMicrotask, !1);
|
|
93
|
+
function ot(t) {
|
|
94
|
+
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
95
|
+
}
|
|
96
|
+
const jt = S({});
|
|
97
|
+
let _ = !1;
|
|
98
|
+
function Et(t, e, n, o, r) {
|
|
99
|
+
const { visualElement: s } = y(A), c = y(et), l = y(J), d = y(Q).reducedMotion, m = O();
|
|
100
|
+
o = o || c.renderer, !m.current && o && (m.current = o(t, {
|
|
101
|
+
visualState: e,
|
|
102
|
+
parent: s,
|
|
103
|
+
props: n,
|
|
104
|
+
presenceContext: l,
|
|
105
|
+
blockInitialAnimation: l ? l.initial === !1 : !1,
|
|
106
|
+
reducedMotionConfig: d
|
|
107
|
+
}));
|
|
108
|
+
const u = m.current, a = y(jt);
|
|
109
|
+
u && !u.projection && r && (u.type === "html" || u.type === "svg") && Bt(m.current, n, r, a), Pt(() => {
|
|
110
|
+
u && u.update(n, l);
|
|
111
|
+
});
|
|
112
|
+
const f = O(!!(n[Lt] && !window.HandoffComplete));
|
|
113
|
+
return Tt(() => {
|
|
114
|
+
u && (u.updateFeatures(), Ot.render(u.render), f.current && u.animationState && u.animationState.animateChanges());
|
|
115
|
+
}), K(() => {
|
|
116
|
+
u && (!f.current && u.animationState && u.animationState.animateChanges(), f.current && (f.current = !1, _ || (_ = !0, queueMicrotask(Ft))));
|
|
117
|
+
}), u;
|
|
118
|
+
}
|
|
119
|
+
function Ft() {
|
|
120
|
+
window.HandoffComplete = !0;
|
|
121
|
+
}
|
|
122
|
+
function Bt(t, e, n, o) {
|
|
123
|
+
const { layoutId: r, layout: s, drag: c, dragConstraints: l, layoutScroll: d, layoutRoot: m } = e;
|
|
124
|
+
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : st(t.parent)), t.projection.setOptions({
|
|
125
|
+
layoutId: r,
|
|
126
|
+
layout: s,
|
|
127
|
+
alwaysMeasureLayout: !!c || l && ot(l),
|
|
128
|
+
visualElement: t,
|
|
129
|
+
scheduleRender: () => t.scheduleRender(),
|
|
130
|
+
/**
|
|
131
|
+
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
132
|
+
* to update by the time layout animations run.
|
|
133
|
+
* We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
|
|
134
|
+
* ensuring it gets called if there's no potential layout animations.
|
|
135
|
+
*
|
|
136
|
+
*/
|
|
137
|
+
animationType: typeof s == "string" ? s : "both",
|
|
138
|
+
initialPromotionConfig: o,
|
|
139
|
+
layoutScroll: d,
|
|
140
|
+
layoutRoot: m
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function st(t) {
|
|
144
|
+
if (t)
|
|
145
|
+
return t.options.allowProjection !== !1 ? t.projection : st(t.parent);
|
|
146
|
+
}
|
|
147
|
+
function Wt(t, e, n) {
|
|
148
|
+
return xt(
|
|
149
|
+
(o) => {
|
|
150
|
+
o && t.mount && t.mount(o), e && (o ? e.mount(o) : e.unmount()), n && (typeof n == "function" ? n(o) : ot(n) && (n.current = o));
|
|
151
|
+
},
|
|
152
|
+
/**
|
|
153
|
+
* Only pass a new ref callback to React if we've received a visual element
|
|
154
|
+
* factory. Otherwise we'll be mounting/remounting every time externalRef
|
|
155
|
+
* or other dependencies change.
|
|
156
|
+
*/
|
|
157
|
+
[e]
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
function j(t) {
|
|
161
|
+
return typeof t == "string" || Array.isArray(t);
|
|
162
|
+
}
|
|
163
|
+
function at(t) {
|
|
164
|
+
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
165
|
+
}
|
|
166
|
+
const Ht = [
|
|
167
|
+
"animate",
|
|
168
|
+
"whileInView",
|
|
169
|
+
"whileFocus",
|
|
170
|
+
"whileHover",
|
|
171
|
+
"whileTap",
|
|
172
|
+
"whileDrag",
|
|
173
|
+
"exit"
|
|
174
|
+
], Dt = ["initial", ...Ht];
|
|
175
|
+
function E(t) {
|
|
176
|
+
return at(t.animate) || Dt.some((e) => j(t[e]));
|
|
177
|
+
}
|
|
178
|
+
function It(t) {
|
|
179
|
+
return !!(E(t) || t.variants);
|
|
180
|
+
}
|
|
181
|
+
function $t(t, e) {
|
|
182
|
+
if (E(t)) {
|
|
183
|
+
const { initial: n, animate: o } = t;
|
|
184
|
+
return {
|
|
185
|
+
initial: n === !1 || j(n) ? n : void 0,
|
|
186
|
+
animate: j(o) ? o : void 0
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
return t.inherit !== !1 ? e : {};
|
|
190
|
+
}
|
|
191
|
+
function Nt(t) {
|
|
192
|
+
const { initial: e, animate: n } = $t(t, y(A));
|
|
193
|
+
return T(() => ({ initial: e, animate: n }), [Y(e), Y(n)]);
|
|
194
|
+
}
|
|
195
|
+
function Y(t) {
|
|
196
|
+
return Array.isArray(t) ? t.join(" ") : t;
|
|
197
|
+
}
|
|
198
|
+
const z = {
|
|
199
|
+
animation: [
|
|
200
|
+
"animate",
|
|
201
|
+
"variants",
|
|
202
|
+
"whileHover",
|
|
203
|
+
"whileTap",
|
|
204
|
+
"exit",
|
|
205
|
+
"whileInView",
|
|
206
|
+
"whileFocus",
|
|
207
|
+
"whileDrag"
|
|
208
|
+
],
|
|
209
|
+
exit: ["exit"],
|
|
210
|
+
drag: ["drag", "dragControls"],
|
|
211
|
+
focus: ["whileFocus"],
|
|
212
|
+
hover: ["whileHover", "onHoverStart", "onHoverEnd"],
|
|
213
|
+
tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
|
|
214
|
+
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
215
|
+
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
216
|
+
layout: ["layout", "layoutId"]
|
|
217
|
+
}, C = {};
|
|
218
|
+
for (const t in z)
|
|
219
|
+
C[t] = {
|
|
220
|
+
isEnabled: (e) => z[t].some((n) => !!e[n])
|
|
221
|
+
};
|
|
222
|
+
function _t(t) {
|
|
223
|
+
for (const e in t)
|
|
224
|
+
C[e] = {
|
|
225
|
+
...C[e],
|
|
226
|
+
...t[e]
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
const Yt = S({}), zt = Symbol.for("motionComponentSymbol"), F = (t) => t;
|
|
230
|
+
var Gt = {};
|
|
231
|
+
let it = F, ct = F;
|
|
232
|
+
Gt.NODE_ENV !== "production" && (it = (t, e) => {
|
|
233
|
+
!t && typeof console < "u" && console.warn(e);
|
|
234
|
+
}, ct = (t, e) => {
|
|
235
|
+
if (!t)
|
|
236
|
+
throw new Error(e);
|
|
237
|
+
});
|
|
238
|
+
var Xt = {};
|
|
239
|
+
function Zt({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: o, Component: r }) {
|
|
240
|
+
t && _t(t);
|
|
241
|
+
function s(l, d) {
|
|
242
|
+
let m;
|
|
243
|
+
const u = {
|
|
244
|
+
...y(Q),
|
|
245
|
+
...l,
|
|
246
|
+
layoutId: qt(l)
|
|
247
|
+
}, { isStatic: a } = u, f = Nt(l), g = o(l, a);
|
|
248
|
+
if (!a && tt) {
|
|
249
|
+
Ut(u, t);
|
|
250
|
+
const h = Kt(u);
|
|
251
|
+
m = h.MeasureLayout, f.visualElement = Et(r, g, u, e, h.ProjectionNode);
|
|
252
|
+
}
|
|
253
|
+
return $.jsxs(A.Provider, { value: f, children: [m && f.visualElement ? $.jsx(m, { visualElement: f.visualElement, ...u }) : null, n(r, l, Wt(g, f.visualElement, d), g, a, f.visualElement)] });
|
|
254
|
+
}
|
|
255
|
+
const c = Vt(s);
|
|
256
|
+
return c[zt] = r, c;
|
|
257
|
+
}
|
|
258
|
+
function qt({ layoutId: t }) {
|
|
259
|
+
const e = y(Yt).id;
|
|
260
|
+
return e && t !== void 0 ? e + "-" + t : t;
|
|
261
|
+
}
|
|
262
|
+
function Ut(t, e) {
|
|
263
|
+
const n = y(et).strict;
|
|
264
|
+
if (Xt.NODE_ENV !== "production" && e && n) {
|
|
265
|
+
const o = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
266
|
+
t.ignoreStrict ? it(!1, o) : ct(!1, o);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
function Kt(t) {
|
|
270
|
+
const { drag: e, layout: n } = C;
|
|
271
|
+
if (!e && !n)
|
|
272
|
+
return {};
|
|
273
|
+
const o = { ...e, ...n };
|
|
274
|
+
return {
|
|
275
|
+
MeasureLayout: e != null && e.isEnabled(t) || n != null && n.isEnabled(t) ? o.MeasureLayout : void 0,
|
|
276
|
+
ProjectionNode: o.ProjectionNode
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
function Qt(t) {
|
|
280
|
+
function e(o, r = {}) {
|
|
281
|
+
return Zt(t(o, r));
|
|
282
|
+
}
|
|
283
|
+
if (typeof Proxy > "u")
|
|
284
|
+
return e;
|
|
285
|
+
const n = /* @__PURE__ */ new Map();
|
|
286
|
+
return new Proxy(e, {
|
|
287
|
+
/**
|
|
288
|
+
* Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
|
|
289
|
+
* The prop name is passed through as `key` and we can use that to generate a `motion`
|
|
290
|
+
* DOM component with that name.
|
|
291
|
+
*/
|
|
292
|
+
get: (o, r) => (n.has(r) || n.set(r, e(r)), n.get(r))
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
const Jt = [
|
|
296
|
+
"animate",
|
|
297
|
+
"circle",
|
|
298
|
+
"defs",
|
|
299
|
+
"desc",
|
|
300
|
+
"ellipse",
|
|
301
|
+
"g",
|
|
302
|
+
"image",
|
|
303
|
+
"line",
|
|
304
|
+
"filter",
|
|
305
|
+
"marker",
|
|
306
|
+
"mask",
|
|
307
|
+
"metadata",
|
|
308
|
+
"path",
|
|
309
|
+
"pattern",
|
|
310
|
+
"polygon",
|
|
311
|
+
"polyline",
|
|
312
|
+
"rect",
|
|
313
|
+
"stop",
|
|
314
|
+
"switch",
|
|
315
|
+
"symbol",
|
|
316
|
+
"svg",
|
|
317
|
+
"text",
|
|
318
|
+
"tspan",
|
|
319
|
+
"use",
|
|
320
|
+
"view"
|
|
321
|
+
];
|
|
322
|
+
function ut(t) {
|
|
323
|
+
return (
|
|
324
|
+
/**
|
|
325
|
+
* If it's not a string, it's a custom React component. Currently we only support
|
|
326
|
+
* HTML custom React components.
|
|
327
|
+
*/
|
|
328
|
+
typeof t != "string" || /**
|
|
329
|
+
* If it contains a dash, the element is a custom HTML webcomponent.
|
|
330
|
+
*/
|
|
331
|
+
t.includes("-") ? !1 : (
|
|
332
|
+
/**
|
|
333
|
+
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
334
|
+
*/
|
|
335
|
+
!!(Jt.indexOf(t) > -1 || /**
|
|
336
|
+
* If it contains a capital letter, it's an SVG component
|
|
337
|
+
*/
|
|
338
|
+
/[A-Z]/u.test(t))
|
|
339
|
+
)
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
const te = {}, L = [
|
|
343
|
+
"transformPerspective",
|
|
344
|
+
"x",
|
|
345
|
+
"y",
|
|
346
|
+
"z",
|
|
347
|
+
"translateX",
|
|
348
|
+
"translateY",
|
|
349
|
+
"translateZ",
|
|
350
|
+
"scale",
|
|
351
|
+
"scaleX",
|
|
352
|
+
"scaleY",
|
|
353
|
+
"rotate",
|
|
354
|
+
"rotateX",
|
|
355
|
+
"rotateY",
|
|
356
|
+
"rotateZ",
|
|
357
|
+
"skew",
|
|
358
|
+
"skewX",
|
|
359
|
+
"skewY"
|
|
360
|
+
], lt = new Set(L);
|
|
361
|
+
function ft(t, { layout: e, layoutId: n }) {
|
|
362
|
+
return lt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!te[t] || t === "opacity");
|
|
363
|
+
}
|
|
364
|
+
const b = (t) => !!(t && t.getVelocity), ee = {
|
|
365
|
+
x: "translateX",
|
|
366
|
+
y: "translateY",
|
|
367
|
+
z: "translateZ",
|
|
368
|
+
transformPerspective: "perspective"
|
|
369
|
+
}, ne = L.length;
|
|
370
|
+
function re(t, { enableHardwareAcceleration: e = !0, allowTransformNone: n = !0 }, o, r) {
|
|
371
|
+
let s = "";
|
|
372
|
+
for (let c = 0; c < ne; c++) {
|
|
373
|
+
const l = L[c];
|
|
374
|
+
if (t[l] !== void 0) {
|
|
375
|
+
const d = ee[l] || l;
|
|
376
|
+
s += `${d}(${t[l]}) `;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
return e && !t.z && (s += "translateZ(0)"), s = s.trim(), r ? s = r(t, o ? "" : s) : n && o && (s = "none"), s;
|
|
380
|
+
}
|
|
381
|
+
const oe = (t) => (e) => typeof e == "string" && e.startsWith(t), se = oe("--"), ae = (t, e) => e && typeof t == "number" ? e.transform(t) : t, ie = (t, e, n) => n > e ? e : n < t ? t : n, B = {
|
|
382
|
+
test: (t) => typeof t == "number",
|
|
383
|
+
parse: parseFloat,
|
|
384
|
+
transform: (t) => t
|
|
385
|
+
}, k = {
|
|
386
|
+
...B,
|
|
387
|
+
transform: (t) => ie(0, 1, t)
|
|
388
|
+
}, V = {
|
|
389
|
+
...B,
|
|
390
|
+
default: 1
|
|
391
|
+
};
|
|
392
|
+
function ce(t) {
|
|
393
|
+
return typeof t == "string";
|
|
394
|
+
}
|
|
395
|
+
const W = (t) => ({
|
|
396
|
+
test: (e) => ce(e) && e.endsWith(t) && e.split(" ").length === 1,
|
|
397
|
+
parse: parseFloat,
|
|
398
|
+
transform: (e) => `${e}${t}`
|
|
399
|
+
}), w = W("deg"), R = W("%"), i = W("px"), G = {
|
|
400
|
+
...R,
|
|
401
|
+
parse: (t) => R.parse(t) / 100,
|
|
402
|
+
transform: (t) => R.transform(t * 100)
|
|
403
|
+
}, X = {
|
|
404
|
+
...B,
|
|
405
|
+
transform: Math.round
|
|
406
|
+
}, ue = {
|
|
407
|
+
// Border props
|
|
408
|
+
borderWidth: i,
|
|
409
|
+
borderTopWidth: i,
|
|
410
|
+
borderRightWidth: i,
|
|
411
|
+
borderBottomWidth: i,
|
|
412
|
+
borderLeftWidth: i,
|
|
413
|
+
borderRadius: i,
|
|
414
|
+
radius: i,
|
|
415
|
+
borderTopLeftRadius: i,
|
|
416
|
+
borderTopRightRadius: i,
|
|
417
|
+
borderBottomRightRadius: i,
|
|
418
|
+
borderBottomLeftRadius: i,
|
|
419
|
+
// Positioning props
|
|
420
|
+
width: i,
|
|
421
|
+
maxWidth: i,
|
|
422
|
+
height: i,
|
|
423
|
+
maxHeight: i,
|
|
424
|
+
size: i,
|
|
425
|
+
top: i,
|
|
426
|
+
right: i,
|
|
427
|
+
bottom: i,
|
|
428
|
+
left: i,
|
|
429
|
+
// Spacing props
|
|
430
|
+
padding: i,
|
|
431
|
+
paddingTop: i,
|
|
432
|
+
paddingRight: i,
|
|
433
|
+
paddingBottom: i,
|
|
434
|
+
paddingLeft: i,
|
|
435
|
+
margin: i,
|
|
436
|
+
marginTop: i,
|
|
437
|
+
marginRight: i,
|
|
438
|
+
marginBottom: i,
|
|
439
|
+
marginLeft: i,
|
|
440
|
+
// Transform props
|
|
441
|
+
rotate: w,
|
|
442
|
+
rotateX: w,
|
|
443
|
+
rotateY: w,
|
|
444
|
+
rotateZ: w,
|
|
445
|
+
scale: V,
|
|
446
|
+
scaleX: V,
|
|
447
|
+
scaleY: V,
|
|
448
|
+
scaleZ: V,
|
|
449
|
+
skew: w,
|
|
450
|
+
skewX: w,
|
|
451
|
+
skewY: w,
|
|
452
|
+
distance: i,
|
|
453
|
+
translateX: i,
|
|
454
|
+
translateY: i,
|
|
455
|
+
translateZ: i,
|
|
456
|
+
x: i,
|
|
457
|
+
y: i,
|
|
458
|
+
z: i,
|
|
459
|
+
perspective: i,
|
|
460
|
+
transformPerspective: i,
|
|
461
|
+
opacity: k,
|
|
462
|
+
originX: G,
|
|
463
|
+
originY: G,
|
|
464
|
+
originZ: i,
|
|
465
|
+
// Misc
|
|
466
|
+
zIndex: X,
|
|
467
|
+
backgroundPositionX: i,
|
|
468
|
+
backgroundPositionY: i,
|
|
469
|
+
// SVG
|
|
470
|
+
fillOpacity: k,
|
|
471
|
+
strokeOpacity: k,
|
|
472
|
+
numOctaves: X
|
|
473
|
+
};
|
|
474
|
+
function dt(t, e, n, o) {
|
|
475
|
+
const { style: r, vars: s, transform: c, transformOrigin: l } = t;
|
|
476
|
+
let d = !1, m = !1, u = !0;
|
|
477
|
+
for (const a in e) {
|
|
478
|
+
const f = e[a];
|
|
479
|
+
if (se(a)) {
|
|
480
|
+
s[a] = f;
|
|
481
|
+
continue;
|
|
482
|
+
}
|
|
483
|
+
const g = ue[a], h = ae(f, g);
|
|
484
|
+
if (lt.has(a)) {
|
|
485
|
+
if (d = !0, c[a] = h, !u)
|
|
486
|
+
continue;
|
|
487
|
+
f !== (g.default || 0) && (u = !1);
|
|
488
|
+
} else a.startsWith("origin") ? (m = !0, l[a] = h) : r[a] = h;
|
|
489
|
+
}
|
|
490
|
+
if (e.transform || (d || o ? r.transform = re(t.transform, n, u, o) : r.transform && (r.transform = "none")), m) {
|
|
491
|
+
const { originX: a = "50%", originY: f = "50%", originZ: g = 0 } = l;
|
|
492
|
+
r.transformOrigin = `${a} ${f} ${g}`;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
const H = () => ({
|
|
496
|
+
style: {},
|
|
497
|
+
transform: {},
|
|
498
|
+
transformOrigin: {},
|
|
499
|
+
vars: {}
|
|
500
|
+
});
|
|
501
|
+
function mt(t, e, n) {
|
|
502
|
+
for (const o in e)
|
|
503
|
+
!b(e[o]) && !ft(o, n) && (t[o] = e[o]);
|
|
504
|
+
}
|
|
505
|
+
function le({ transformTemplate: t }, e, n) {
|
|
506
|
+
return T(() => {
|
|
507
|
+
const o = H();
|
|
508
|
+
return dt(o, e, { enableHardwareAcceleration: !n }, t), Object.assign({}, o.vars, o.style);
|
|
509
|
+
}, [e]);
|
|
510
|
+
}
|
|
511
|
+
function fe(t, e, n) {
|
|
512
|
+
const o = t.style || {}, r = {};
|
|
513
|
+
return mt(r, o, t), Object.assign(r, le(t, e, n)), r;
|
|
514
|
+
}
|
|
515
|
+
function de(t, e, n) {
|
|
516
|
+
const o = {}, r = fe(t, e, n);
|
|
517
|
+
return t.drag && t.dragListener !== !1 && (o.draggable = !1, r.userSelect = r.WebkitUserSelect = r.WebkitTouchCallout = "none", r.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (o.tabIndex = 0), o.style = r, o;
|
|
518
|
+
}
|
|
519
|
+
const me = /* @__PURE__ */ new Set([
|
|
520
|
+
"animate",
|
|
521
|
+
"exit",
|
|
522
|
+
"variants",
|
|
523
|
+
"initial",
|
|
524
|
+
"style",
|
|
525
|
+
"values",
|
|
526
|
+
"variants",
|
|
527
|
+
"transition",
|
|
528
|
+
"transformTemplate",
|
|
529
|
+
"custom",
|
|
530
|
+
"inherit",
|
|
531
|
+
"onBeforeLayoutMeasure",
|
|
532
|
+
"onAnimationStart",
|
|
533
|
+
"onAnimationComplete",
|
|
534
|
+
"onUpdate",
|
|
535
|
+
"onDragStart",
|
|
536
|
+
"onDrag",
|
|
537
|
+
"onDragEnd",
|
|
538
|
+
"onMeasureDragConstraints",
|
|
539
|
+
"onDirectionLock",
|
|
540
|
+
"onDragTransitionEnd",
|
|
541
|
+
"_dragX",
|
|
542
|
+
"_dragY",
|
|
543
|
+
"onHoverStart",
|
|
544
|
+
"onHoverEnd",
|
|
545
|
+
"onViewportEnter",
|
|
546
|
+
"onViewportLeave",
|
|
547
|
+
"globalTapTarget",
|
|
548
|
+
"ignoreStrict",
|
|
549
|
+
"viewport"
|
|
550
|
+
]);
|
|
551
|
+
function M(t) {
|
|
552
|
+
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || me.has(t);
|
|
553
|
+
}
|
|
554
|
+
let gt = (t) => !M(t);
|
|
555
|
+
function ge(t) {
|
|
556
|
+
t && (gt = (e) => e.startsWith("on") ? !M(e) : t(e));
|
|
557
|
+
}
|
|
558
|
+
try {
|
|
559
|
+
ge(require("@emotion/is-prop-valid").default);
|
|
560
|
+
} catch {
|
|
561
|
+
}
|
|
562
|
+
function he(t, e, n) {
|
|
563
|
+
const o = {};
|
|
564
|
+
for (const r in t)
|
|
565
|
+
r === "values" && typeof t.values == "object" || (gt(r) || n === !0 && M(r) || !e && !M(r) || // If trying to use native HTML drag events, forward drag listeners
|
|
566
|
+
t.draggable && r.startsWith("onDrag")) && (o[r] = t[r]);
|
|
567
|
+
return o;
|
|
568
|
+
}
|
|
569
|
+
function Z(t, e, n) {
|
|
570
|
+
return typeof t == "string" ? t : i.transform(e + n * t);
|
|
571
|
+
}
|
|
572
|
+
function ye(t, e, n) {
|
|
573
|
+
const o = Z(e, t.x, t.width), r = Z(n, t.y, t.height);
|
|
574
|
+
return `${o} ${r}`;
|
|
575
|
+
}
|
|
576
|
+
const pe = {
|
|
577
|
+
offset: "stroke-dashoffset",
|
|
578
|
+
array: "stroke-dasharray"
|
|
579
|
+
}, we = {
|
|
580
|
+
offset: "strokeDashoffset",
|
|
581
|
+
array: "strokeDasharray"
|
|
582
|
+
};
|
|
583
|
+
function be(t, e, n = 1, o = 0, r = !0) {
|
|
584
|
+
t.pathLength = 1;
|
|
585
|
+
const s = r ? pe : we;
|
|
586
|
+
t[s.offset] = i.transform(-o);
|
|
587
|
+
const c = i.transform(e), l = i.transform(n);
|
|
588
|
+
t[s.array] = `${c} ${l}`;
|
|
589
|
+
}
|
|
590
|
+
function ht(t, {
|
|
591
|
+
attrX: e,
|
|
592
|
+
attrY: n,
|
|
593
|
+
attrScale: o,
|
|
594
|
+
originX: r,
|
|
595
|
+
originY: s,
|
|
596
|
+
pathLength: c,
|
|
597
|
+
pathSpacing: l = 1,
|
|
598
|
+
pathOffset: d = 0,
|
|
599
|
+
// This is object creation, which we try to avoid per-frame.
|
|
600
|
+
...m
|
|
601
|
+
}, u, a, f) {
|
|
602
|
+
if (dt(t, m, u, f), a) {
|
|
603
|
+
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
606
|
+
t.attrs = t.style, t.style = {};
|
|
607
|
+
const { attrs: g, style: h, dimensions: p } = t;
|
|
608
|
+
g.transform && (p && (h.transform = g.transform), delete g.transform), p && (r !== void 0 || s !== void 0 || h.transform) && (h.transformOrigin = ye(p, r !== void 0 ? r : 0.5, s !== void 0 ? s : 0.5)), e !== void 0 && (g.x = e), n !== void 0 && (g.y = n), o !== void 0 && (g.scale = o), c !== void 0 && be(g, c, l, d, !1);
|
|
609
|
+
}
|
|
610
|
+
const yt = () => ({
|
|
611
|
+
...H(),
|
|
612
|
+
attrs: {}
|
|
613
|
+
}), pt = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
614
|
+
function ve(t, e, n, o) {
|
|
615
|
+
const r = T(() => {
|
|
616
|
+
const s = yt();
|
|
617
|
+
return ht(s, e, { enableHardwareAcceleration: !1 }, pt(o), t.transformTemplate), {
|
|
618
|
+
...s.attrs,
|
|
619
|
+
style: { ...s.style }
|
|
620
|
+
};
|
|
621
|
+
}, [e]);
|
|
622
|
+
if (t.style) {
|
|
623
|
+
const s = {};
|
|
624
|
+
mt(s, t.style, t), r.style = { ...s, ...r.style };
|
|
625
|
+
}
|
|
626
|
+
return r;
|
|
627
|
+
}
|
|
628
|
+
function Se(t = !1) {
|
|
629
|
+
return (n, o, r, { latestValues: s }, c) => {
|
|
630
|
+
const d = (ut(n) ? ve : de)(o, s, c, n), m = he(o, typeof n == "string", t), u = n !== Ct ? { ...m, ...d, ref: r } : {}, { children: a } = o, f = T(() => b(a) ? a.get() : a, [a]);
|
|
631
|
+
return Mt(n, {
|
|
632
|
+
...u,
|
|
633
|
+
children: f
|
|
634
|
+
});
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
function Pe(t, { style: e, vars: n }, o, r) {
|
|
638
|
+
Object.assign(t.style, e, r);
|
|
639
|
+
for (const s in n)
|
|
640
|
+
t.style.setProperty(s, n[s]);
|
|
641
|
+
}
|
|
642
|
+
const xe = /* @__PURE__ */ new Set([
|
|
643
|
+
"baseFrequency",
|
|
644
|
+
"diffuseConstant",
|
|
645
|
+
"kernelMatrix",
|
|
646
|
+
"kernelUnitLength",
|
|
647
|
+
"keySplines",
|
|
648
|
+
"keyTimes",
|
|
649
|
+
"limitingConeAngle",
|
|
650
|
+
"markerHeight",
|
|
651
|
+
"markerWidth",
|
|
652
|
+
"numOctaves",
|
|
653
|
+
"targetX",
|
|
654
|
+
"targetY",
|
|
655
|
+
"surfaceScale",
|
|
656
|
+
"specularConstant",
|
|
657
|
+
"specularExponent",
|
|
658
|
+
"stdDeviation",
|
|
659
|
+
"tableValues",
|
|
660
|
+
"viewBox",
|
|
661
|
+
"gradientTransform",
|
|
662
|
+
"pathLength",
|
|
663
|
+
"startOffset",
|
|
664
|
+
"textLength",
|
|
665
|
+
"lengthAdjust"
|
|
666
|
+
]);
|
|
667
|
+
function Ve(t, e, n, o) {
|
|
668
|
+
Pe(t, e, void 0, o);
|
|
669
|
+
for (const r in e.attrs)
|
|
670
|
+
t.setAttribute(xe.has(r) ? r : nt(r), e.attrs[r]);
|
|
671
|
+
}
|
|
672
|
+
function wt(t, e, n) {
|
|
673
|
+
var o;
|
|
674
|
+
const { style: r } = t, s = {};
|
|
675
|
+
for (const c in r)
|
|
676
|
+
(b(r[c]) || e.style && b(e.style[c]) || ft(c, t) || ((o = n == null ? void 0 : n.getValue(c)) === null || o === void 0 ? void 0 : o.liveStyle) !== void 0) && (s[c] = r[c]);
|
|
677
|
+
return s;
|
|
678
|
+
}
|
|
679
|
+
function Ce(t, e, n) {
|
|
680
|
+
const o = wt(t, e, n);
|
|
681
|
+
for (const r in t)
|
|
682
|
+
if (b(t[r]) || b(e[r])) {
|
|
683
|
+
const s = L.indexOf(r) !== -1 ? "attr" + r.charAt(0).toUpperCase() + r.substring(1) : r;
|
|
684
|
+
o[s] = t[r];
|
|
685
|
+
}
|
|
686
|
+
return o;
|
|
687
|
+
}
|
|
688
|
+
function q(t) {
|
|
689
|
+
return [{}, {}];
|
|
690
|
+
}
|
|
691
|
+
function Me(t, e, n, o) {
|
|
692
|
+
if (typeof e == "function") {
|
|
693
|
+
const [r, s] = q();
|
|
694
|
+
e = e(t.custom, r, s);
|
|
695
|
+
}
|
|
696
|
+
if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
|
|
697
|
+
const [r, s] = q();
|
|
698
|
+
e = e(t.custom, r, s);
|
|
699
|
+
}
|
|
700
|
+
return e;
|
|
701
|
+
}
|
|
702
|
+
function Te(t) {
|
|
703
|
+
const e = O(null);
|
|
704
|
+
return e.current === null && (e.current = t()), e.current;
|
|
705
|
+
}
|
|
706
|
+
const Ae = (t) => !!(t && typeof t == "object" && t.mix && t.toValue);
|
|
707
|
+
function Le(t) {
|
|
708
|
+
const e = b(t) ? t.get() : t;
|
|
709
|
+
return Ae(e) ? e.toValue() : e;
|
|
710
|
+
}
|
|
711
|
+
function ke({ scrapeMotionValuesFromProps: t, createRenderState: e, onMount: n }, o, r, s) {
|
|
712
|
+
const c = {
|
|
713
|
+
latestValues: Re(o, r, s, t),
|
|
714
|
+
renderState: e()
|
|
715
|
+
};
|
|
716
|
+
return n && (c.mount = (l) => n(o, l, c)), c;
|
|
717
|
+
}
|
|
718
|
+
const bt = (t) => (e, n) => {
|
|
719
|
+
const o = y(A), r = y(J), s = () => ke(t, e, o, r);
|
|
720
|
+
return n ? s() : Te(s);
|
|
721
|
+
};
|
|
722
|
+
function Re(t, e, n, o) {
|
|
723
|
+
const r = {}, s = o(t, {});
|
|
724
|
+
for (const f in s)
|
|
725
|
+
r[f] = Le(s[f]);
|
|
726
|
+
let { initial: c, animate: l } = t;
|
|
727
|
+
const d = E(t), m = It(t);
|
|
728
|
+
e && m && !d && t.inherit !== !1 && (c === void 0 && (c = e.initial), l === void 0 && (l = e.animate));
|
|
729
|
+
let u = n ? n.initial === !1 : !1;
|
|
730
|
+
u = u || c === !1;
|
|
731
|
+
const a = u ? l : c;
|
|
732
|
+
return a && typeof a != "boolean" && !at(a) && (Array.isArray(a) ? a : [a]).forEach((g) => {
|
|
733
|
+
const h = Me(t, g);
|
|
734
|
+
if (!h)
|
|
735
|
+
return;
|
|
736
|
+
const { transitionEnd: p, transition: D, ...I } = h;
|
|
737
|
+
for (const P in I) {
|
|
738
|
+
let v = I[P];
|
|
739
|
+
if (Array.isArray(v)) {
|
|
740
|
+
const vt = u ? v.length - 1 : 0;
|
|
741
|
+
v = v[vt];
|
|
742
|
+
}
|
|
743
|
+
v !== null && (r[P] = v);
|
|
744
|
+
}
|
|
745
|
+
for (const P in p)
|
|
746
|
+
r[P] = p[P];
|
|
747
|
+
}), r;
|
|
748
|
+
}
|
|
749
|
+
const { schedule: U, cancel: He, state: De, steps: Ie } = rt(typeof requestAnimationFrame < "u" ? requestAnimationFrame : F, !0), Oe = {
|
|
750
|
+
useVisualState: bt({
|
|
751
|
+
scrapeMotionValuesFromProps: Ce,
|
|
752
|
+
createRenderState: yt,
|
|
753
|
+
onMount: (t, e, { renderState: n, latestValues: o }) => {
|
|
754
|
+
U.read(() => {
|
|
755
|
+
try {
|
|
756
|
+
n.dimensions = typeof e.getBBox == "function" ? e.getBBox() : e.getBoundingClientRect();
|
|
757
|
+
} catch {
|
|
758
|
+
n.dimensions = {
|
|
759
|
+
x: 0,
|
|
760
|
+
y: 0,
|
|
761
|
+
width: 0,
|
|
762
|
+
height: 0
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
}), U.render(() => {
|
|
766
|
+
ht(n, o, { enableHardwareAcceleration: !1 }, pt(e.tagName), t.transformTemplate), Ve(e, n);
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
})
|
|
770
|
+
}, je = {
|
|
771
|
+
useVisualState: bt({
|
|
772
|
+
scrapeMotionValuesFromProps: wt,
|
|
773
|
+
createRenderState: H
|
|
774
|
+
})
|
|
775
|
+
};
|
|
776
|
+
function Ee(t, { forwardMotionProps: e = !1 }, n, o) {
|
|
777
|
+
return {
|
|
778
|
+
...ut(t) ? Oe : je,
|
|
779
|
+
preloadedFeatures: n,
|
|
780
|
+
useRender: Se(e),
|
|
781
|
+
createVisualElement: o,
|
|
782
|
+
Component: t
|
|
783
|
+
};
|
|
784
|
+
}
|
|
785
|
+
const $e = Qt(Ee);
|
|
786
|
+
export {
|
|
787
|
+
$e as m
|
|
788
|
+
};
|