unframer 2.25.4 → 2.26.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/babel-jsx.d.ts +15 -0
- package/dist/babel-jsx.d.ts.map +1 -0
- package/dist/babel-jsx.js +223 -0
- package/dist/babel-jsx.js.map +1 -0
- package/dist/babel-plugin-imports.d.ts +0 -6
- package/dist/babel-plugin-imports.d.ts.map +1 -1
- package/dist/babel-plugin-imports.js +2 -135
- package/dist/babel-plugin-imports.js.map +1 -1
- package/dist/cli.d.ts +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +31 -6
- package/dist/cli.js.map +1 -1
- package/dist/css.js +13 -13
- package/dist/esbuild.d.ts.map +1 -1
- package/dist/esbuild.js +82 -66
- package/dist/esbuild.js.map +1 -1
- package/dist/example-code.test.js +39 -39
- package/dist/example-code.test.js.map +1 -1
- package/dist/exporter.d.ts.map +1 -1
- package/dist/exporter.js +137 -87
- package/dist/exporter.js.map +1 -1
- package/dist/flat-cache-interceptor.d.ts +27 -0
- package/dist/flat-cache-interceptor.d.ts.map +1 -0
- package/dist/flat-cache-interceptor.js +99 -0
- package/dist/flat-cache-interceptor.js.map +1 -0
- package/dist/framer.d.ts.map +1 -1
- package/dist/framer.js +895 -741
- package/dist/framer.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +15 -3
- package/dist/react.js.map +1 -1
- package/dist/sentry.d.ts +1 -1
- package/dist/sentry.d.ts.map +1 -1
- package/dist/sentry.js +2 -17
- package/dist/sentry.js.map +1 -1
- package/dist/undici-dispatcher.d.ts +2 -0
- package/dist/undici-dispatcher.d.ts.map +1 -0
- package/dist/undici-dispatcher.js +13 -0
- package/dist/undici-dispatcher.js.map +1 -0
- package/dist/utils.d.ts +3 -3
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +4 -10
- package/dist/utils.js.map +1 -1
- package/dist/utils.test.d.ts +2 -0
- package/dist/utils.test.d.ts.map +1 -0
- package/dist/utils.test.js +143 -0
- package/dist/utils.test.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/babel-jsx.d.ts +15 -0
- package/esm/babel-jsx.d.ts.map +1 -0
- package/esm/babel-jsx.js +219 -0
- package/esm/babel-jsx.js.map +1 -0
- package/esm/babel-plugin-imports.d.ts +0 -6
- package/esm/babel-plugin-imports.d.ts.map +1 -1
- package/esm/babel-plugin-imports.js +2 -134
- package/esm/babel-plugin-imports.js.map +1 -1
- package/esm/cli.d.ts +1 -0
- package/esm/cli.d.ts.map +1 -1
- package/esm/cli.js +31 -6
- package/esm/cli.js.map +1 -1
- package/esm/css.js +13 -13
- package/esm/esbuild.d.ts.map +1 -1
- package/esm/esbuild.js +82 -66
- package/esm/esbuild.js.map +1 -1
- package/esm/example-code.test.js +40 -40
- package/esm/example-code.test.js.map +1 -1
- package/esm/exporter.d.ts.map +1 -1
- package/esm/exporter.js +100 -50
- package/esm/exporter.js.map +1 -1
- package/esm/flat-cache-interceptor.d.ts +27 -0
- package/esm/flat-cache-interceptor.d.ts.map +1 -0
- package/esm/flat-cache-interceptor.js +95 -0
- package/esm/flat-cache-interceptor.js.map +1 -0
- package/esm/framer.d.ts.map +1 -1
- package/esm/framer.js +871 -729
- package/esm/framer.js.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/react.d.ts.map +1 -1
- package/esm/react.js +15 -3
- package/esm/react.js.map +1 -1
- package/esm/sentry.d.ts +1 -1
- package/esm/sentry.d.ts.map +1 -1
- package/esm/sentry.js +2 -17
- package/esm/sentry.js.map +1 -1
- package/esm/undici-dispatcher.d.ts +2 -0
- package/esm/undici-dispatcher.d.ts.map +1 -0
- package/esm/undici-dispatcher.js +10 -0
- package/esm/undici-dispatcher.js.map +1 -0
- package/esm/utils.d.ts +3 -3
- package/esm/utils.d.ts.map +1 -1
- package/esm/utils.js +3 -9
- package/esm/utils.js.map +1 -1
- package/esm/utils.test.d.ts +2 -0
- package/esm/utils.test.d.ts.map +1 -0
- package/esm/utils.test.js +141 -0
- package/esm/utils.test.js.map +1 -0
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/package.json +8 -10
- package/src/babel-jsx.ts +277 -0
- package/src/babel-plugin-imports.ts +6 -169
- package/src/cli.ts +45 -6
- package/src/css.ts +13 -13
- package/src/esbuild.ts +93 -74
- package/src/example-code.test.ts +40 -41
- package/src/exporter.ts +124 -54
- package/src/flat-cache-interceptor.ts +114 -0
- package/src/framer.js +921 -764
- package/src/index.ts +1 -1
- package/src/react.tsx +15 -1
- package/src/sentry.ts +3 -22
- package/src/undici-dispatcher.ts +13 -0
- package/src/utils.test.ts +148 -0
- package/src/utils.ts +4 -17
- package/src/version.ts +1 -1
package/src/framer.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
__toESM,
|
|
14
14
|
} from './framer-chunks/chunk-A2PMVMFI.js';
|
|
15
15
|
|
|
16
|
-
// /:https://app.framerstatic.com/chunk-
|
|
16
|
+
// /:https://app.framerstatic.com/chunk-A6RUM2JZ.mjs
|
|
17
17
|
import { createContext, } from 'react';
|
|
18
18
|
import { useEffect, useLayoutEffect, } from 'react';
|
|
19
19
|
import { useCallback, useContext, useId, } from 'react';
|
|
@@ -68,281 +68,6 @@ var LayoutGroupContext = createContext({},);
|
|
|
68
68
|
var isBrowser = typeof window !== 'undefined';
|
|
69
69
|
var useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;
|
|
70
70
|
var PresenceContext = /* @__PURE__ */ createContext(null,);
|
|
71
|
-
var MotionConfigContext = createContext({
|
|
72
|
-
transformPagePoint: (p) => p,
|
|
73
|
-
isStatic: false,
|
|
74
|
-
reducedMotion: 'never',
|
|
75
|
-
},);
|
|
76
|
-
function usePresence(subscribe = true,) {
|
|
77
|
-
const context = useContext(PresenceContext,);
|
|
78
|
-
if (context === null) return [true, null,];
|
|
79
|
-
const {
|
|
80
|
-
isPresent: isPresent2,
|
|
81
|
-
onExitComplete,
|
|
82
|
-
register,
|
|
83
|
-
} = context;
|
|
84
|
-
const id4 = useId();
|
|
85
|
-
useEffect(() => {
|
|
86
|
-
if (subscribe) {
|
|
87
|
-
return register(id4,);
|
|
88
|
-
}
|
|
89
|
-
}, [subscribe,],);
|
|
90
|
-
const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id4,), [id4, onExitComplete, subscribe,],);
|
|
91
|
-
return !isPresent2 && onExitComplete ? [false, safeToRemove,] : [true,];
|
|
92
|
-
}
|
|
93
|
-
function useIsPresent() {
|
|
94
|
-
return isPresent(useContext(PresenceContext,),);
|
|
95
|
-
}
|
|
96
|
-
function isPresent(context,) {
|
|
97
|
-
return context === null ? true : context.isPresent;
|
|
98
|
-
}
|
|
99
|
-
function useConstant(init,) {
|
|
100
|
-
const ref = useRef3(null,);
|
|
101
|
-
if (ref.current === null) {
|
|
102
|
-
ref.current = init();
|
|
103
|
-
}
|
|
104
|
-
return ref.current;
|
|
105
|
-
}
|
|
106
|
-
var PopChildMeasure = class extends React2.Component {
|
|
107
|
-
getSnapshotBeforeUpdate(prevProps,) {
|
|
108
|
-
const element = this.props.childRef.current;
|
|
109
|
-
if (element && prevProps.isPresent && !this.props.isPresent) {
|
|
110
|
-
const parent = element.offsetParent;
|
|
111
|
-
const parentWidth = parent instanceof HTMLElement ? parent.offsetWidth || 0 : 0;
|
|
112
|
-
const size = this.props.sizeRef.current;
|
|
113
|
-
size.height = element.offsetHeight || 0;
|
|
114
|
-
size.width = element.offsetWidth || 0;
|
|
115
|
-
size.top = element.offsetTop;
|
|
116
|
-
size.left = element.offsetLeft;
|
|
117
|
-
size.right = parentWidth - size.width - size.left;
|
|
118
|
-
}
|
|
119
|
-
return null;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Required with getSnapshotBeforeUpdate to stop React complaining.
|
|
123
|
-
*/
|
|
124
|
-
componentDidUpdate() {}
|
|
125
|
-
render() {
|
|
126
|
-
return this.props.children;
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
function PopChild({
|
|
130
|
-
children,
|
|
131
|
-
isPresent: isPresent2,
|
|
132
|
-
anchorX,
|
|
133
|
-
},) {
|
|
134
|
-
const id4 = useId();
|
|
135
|
-
const ref = useRef3(null,);
|
|
136
|
-
const size = useRef3({
|
|
137
|
-
width: 0,
|
|
138
|
-
height: 0,
|
|
139
|
-
top: 0,
|
|
140
|
-
left: 0,
|
|
141
|
-
right: 0,
|
|
142
|
-
},);
|
|
143
|
-
const {
|
|
144
|
-
nonce,
|
|
145
|
-
} = useContext(MotionConfigContext,);
|
|
146
|
-
useInsertionEffect(() => {
|
|
147
|
-
const {
|
|
148
|
-
width,
|
|
149
|
-
height,
|
|
150
|
-
top,
|
|
151
|
-
left,
|
|
152
|
-
right,
|
|
153
|
-
} = size.current;
|
|
154
|
-
if (isPresent2 || !ref.current || !width || !height) return;
|
|
155
|
-
const x = anchorX === 'left' ? `left: ${left}` : `right: ${right}`;
|
|
156
|
-
ref.current.dataset.motionPopId = id4;
|
|
157
|
-
const style2 = document.createElement('style',);
|
|
158
|
-
if (nonce) style2.nonce = nonce;
|
|
159
|
-
document.head.appendChild(style2,);
|
|
160
|
-
if (style2.sheet) {
|
|
161
|
-
style2.sheet.insertRule(`
|
|
162
|
-
[data-motion-pop-id="${id4}"] {
|
|
163
|
-
position: absolute !important;
|
|
164
|
-
width: ${width}px !important;
|
|
165
|
-
height: ${height}px !important;
|
|
166
|
-
${x}px !important;
|
|
167
|
-
top: ${top}px !important;
|
|
168
|
-
}
|
|
169
|
-
`,);
|
|
170
|
-
}
|
|
171
|
-
return () => {
|
|
172
|
-
if (document.head.contains(style2,)) {
|
|
173
|
-
document.head.removeChild(style2,);
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
}, [isPresent2,],);
|
|
177
|
-
return jsx3(PopChildMeasure, {
|
|
178
|
-
isPresent: isPresent2,
|
|
179
|
-
childRef: ref,
|
|
180
|
-
sizeRef: size,
|
|
181
|
-
children: React2.cloneElement(children, {
|
|
182
|
-
ref,
|
|
183
|
-
},),
|
|
184
|
-
},);
|
|
185
|
-
}
|
|
186
|
-
var PresenceChild = ({
|
|
187
|
-
children,
|
|
188
|
-
initial,
|
|
189
|
-
isPresent: isPresent2,
|
|
190
|
-
onExitComplete,
|
|
191
|
-
custom,
|
|
192
|
-
presenceAffectsLayout,
|
|
193
|
-
mode,
|
|
194
|
-
anchorX,
|
|
195
|
-
},) => {
|
|
196
|
-
const presenceChildren = useConstant(newChildrenMap,);
|
|
197
|
-
const id4 = useId();
|
|
198
|
-
let isReusedContext = true;
|
|
199
|
-
let context = useMemo2(() => {
|
|
200
|
-
isReusedContext = false;
|
|
201
|
-
return {
|
|
202
|
-
id: id4,
|
|
203
|
-
initial,
|
|
204
|
-
isPresent: isPresent2,
|
|
205
|
-
custom,
|
|
206
|
-
onExitComplete: (childId) => {
|
|
207
|
-
presenceChildren.set(childId, true,);
|
|
208
|
-
for (const isComplete of presenceChildren.values()) {
|
|
209
|
-
if (!isComplete) return;
|
|
210
|
-
}
|
|
211
|
-
onExitComplete && onExitComplete();
|
|
212
|
-
},
|
|
213
|
-
register: (childId) => {
|
|
214
|
-
presenceChildren.set(childId, false,);
|
|
215
|
-
return () => presenceChildren.delete(childId,);
|
|
216
|
-
},
|
|
217
|
-
};
|
|
218
|
-
}, [isPresent2, presenceChildren, onExitComplete,],);
|
|
219
|
-
if (presenceAffectsLayout && isReusedContext) {
|
|
220
|
-
context = {
|
|
221
|
-
...context,
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
useMemo2(() => {
|
|
225
|
-
presenceChildren.forEach((_, key7,) => presenceChildren.set(key7, false,));
|
|
226
|
-
}, [isPresent2,],);
|
|
227
|
-
React2.useEffect(() => {
|
|
228
|
-
!isPresent2 && !presenceChildren.size && onExitComplete && onExitComplete();
|
|
229
|
-
}, [isPresent2,],);
|
|
230
|
-
if (mode === 'popLayout') {
|
|
231
|
-
children = jsx3(PopChild, {
|
|
232
|
-
isPresent: isPresent2,
|
|
233
|
-
anchorX,
|
|
234
|
-
children,
|
|
235
|
-
},);
|
|
236
|
-
}
|
|
237
|
-
return jsx3(PresenceContext.Provider, {
|
|
238
|
-
value: context,
|
|
239
|
-
children,
|
|
240
|
-
},);
|
|
241
|
-
};
|
|
242
|
-
function newChildrenMap() {
|
|
243
|
-
return /* @__PURE__ */ new Map();
|
|
244
|
-
}
|
|
245
|
-
var getChildKey = (child) => child.key || '';
|
|
246
|
-
function onlyElements(children,) {
|
|
247
|
-
const filtered = [];
|
|
248
|
-
Children.forEach(children, (child) => {
|
|
249
|
-
if (isValidElement(child,)) filtered.push(child,);
|
|
250
|
-
},);
|
|
251
|
-
return filtered;
|
|
252
|
-
}
|
|
253
|
-
var AnimatePresence = ({
|
|
254
|
-
children,
|
|
255
|
-
custom,
|
|
256
|
-
initial = true,
|
|
257
|
-
onExitComplete,
|
|
258
|
-
presenceAffectsLayout = true,
|
|
259
|
-
mode = 'sync',
|
|
260
|
-
propagate = false,
|
|
261
|
-
anchorX = 'left',
|
|
262
|
-
},) => {
|
|
263
|
-
const [isParentPresent, safeToRemove,] = usePresence(propagate,);
|
|
264
|
-
const presentChildren = useMemo2(() => onlyElements(children,), [children,],);
|
|
265
|
-
const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey,);
|
|
266
|
-
const isInitialRender = useRef3(true,);
|
|
267
|
-
const pendingPresentChildren = useRef3(presentChildren,);
|
|
268
|
-
const exitComplete = useConstant(() => /* @__PURE__ */ new Map());
|
|
269
|
-
const [diffedChildren, setDiffedChildren,] = useState(presentChildren,);
|
|
270
|
-
const [renderedChildren, setRenderedChildren,] = useState(presentChildren,);
|
|
271
|
-
useIsomorphicLayoutEffect(() => {
|
|
272
|
-
isInitialRender.current = false;
|
|
273
|
-
pendingPresentChildren.current = presentChildren;
|
|
274
|
-
for (let i = 0; i < renderedChildren.length; i++) {
|
|
275
|
-
const key7 = getChildKey(renderedChildren[i],);
|
|
276
|
-
if (!presentKeys.includes(key7,)) {
|
|
277
|
-
if (exitComplete.get(key7,) !== true) {
|
|
278
|
-
exitComplete.set(key7, false,);
|
|
279
|
-
}
|
|
280
|
-
} else {
|
|
281
|
-
exitComplete.delete(key7,);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}, [renderedChildren, presentKeys.length, presentKeys.join('-',),],);
|
|
285
|
-
const exitingChildren = [];
|
|
286
|
-
if (presentChildren !== diffedChildren) {
|
|
287
|
-
let nextChildren = [...presentChildren,];
|
|
288
|
-
for (let i = 0; i < renderedChildren.length; i++) {
|
|
289
|
-
const child = renderedChildren[i];
|
|
290
|
-
const key7 = getChildKey(child,);
|
|
291
|
-
if (!presentKeys.includes(key7,)) {
|
|
292
|
-
nextChildren.splice(i, 0, child,);
|
|
293
|
-
exitingChildren.push(child,);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
if (mode === 'wait' && exitingChildren.length) {
|
|
297
|
-
nextChildren = exitingChildren;
|
|
298
|
-
}
|
|
299
|
-
setRenderedChildren(onlyElements(nextChildren,),);
|
|
300
|
-
setDiffedChildren(presentChildren,);
|
|
301
|
-
return null;
|
|
302
|
-
}
|
|
303
|
-
if (false) {
|
|
304
|
-
console.warn(
|
|
305
|
-
`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`,
|
|
306
|
-
);
|
|
307
|
-
}
|
|
308
|
-
const {
|
|
309
|
-
forceRender,
|
|
310
|
-
} = useContext(LayoutGroupContext,);
|
|
311
|
-
return jsx3(Fragment, {
|
|
312
|
-
children: renderedChildren.map((child) => {
|
|
313
|
-
const key7 = getChildKey(child,);
|
|
314
|
-
const isPresent2 = propagate && !isParentPresent ? false : presentChildren === renderedChildren || presentKeys.includes(key7,);
|
|
315
|
-
const onExit = () => {
|
|
316
|
-
if (exitComplete.has(key7,)) {
|
|
317
|
-
exitComplete.set(key7, true,);
|
|
318
|
-
} else {
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
let isEveryExitComplete = true;
|
|
322
|
-
exitComplete.forEach((isExitComplete) => {
|
|
323
|
-
if (!isExitComplete) isEveryExitComplete = false;
|
|
324
|
-
},);
|
|
325
|
-
if (isEveryExitComplete) {
|
|
326
|
-
forceRender == null ? void 0 : forceRender();
|
|
327
|
-
setRenderedChildren(pendingPresentChildren.current,);
|
|
328
|
-
propagate && (safeToRemove == null ? void 0 : safeToRemove());
|
|
329
|
-
onExitComplete && onExitComplete();
|
|
330
|
-
}
|
|
331
|
-
};
|
|
332
|
-
return jsx3(PresenceChild, {
|
|
333
|
-
isPresent: isPresent2,
|
|
334
|
-
initial: !isInitialRender.current || initial ? void 0 : false,
|
|
335
|
-
custom,
|
|
336
|
-
presenceAffectsLayout,
|
|
337
|
-
mode,
|
|
338
|
-
onExitComplete: isPresent2 ? void 0 : onExit,
|
|
339
|
-
anchorX,
|
|
340
|
-
children: child,
|
|
341
|
-
}, key7,);
|
|
342
|
-
},),
|
|
343
|
-
},);
|
|
344
|
-
};
|
|
345
|
-
var DeprecatedLayoutGroupContext = createContext(null,);
|
|
346
71
|
function addUniqueItem(arr, item,) {
|
|
347
72
|
if (arr.indexOf(item,) === -1) arr.push(item,);
|
|
348
73
|
}
|
|
@@ -380,6 +105,9 @@ if (false) {
|
|
|
380
105
|
}
|
|
381
106
|
var MotionGlobalConfig = {};
|
|
382
107
|
var isNumericalString = (v) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v,);
|
|
108
|
+
function isObject(value,) {
|
|
109
|
+
return typeof value === 'object' && value !== null;
|
|
110
|
+
}
|
|
383
111
|
var isZeroValueString = (v) => /^0[^.\s]+$/u.test(v,);
|
|
384
112
|
// @__NO_SIDE_EFFECTS__
|
|
385
113
|
function memo(callback,) {
|
|
@@ -1609,15 +1337,13 @@ var JSAnimation = class extends WithPromise {
|
|
|
1609
1337
|
this.currentTime = 0;
|
|
1610
1338
|
this.holdTime = null;
|
|
1611
1339
|
this.playbackSpeed = 1;
|
|
1612
|
-
this.stop = (
|
|
1340
|
+
this.stop = () => {
|
|
1613
1341
|
var _a, _b;
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
this.tick(time.now(),);
|
|
1620
|
-
}
|
|
1342
|
+
const {
|
|
1343
|
+
motionValue: motionValue2,
|
|
1344
|
+
} = this.options;
|
|
1345
|
+
if (motionValue2 && motionValue2.updatedAt !== time.now()) {
|
|
1346
|
+
this.tick(time.now(),);
|
|
1621
1347
|
}
|
|
1622
1348
|
this.isStopped = true;
|
|
1623
1349
|
if (this.state === 'idle') return;
|
|
@@ -2478,12 +2204,15 @@ var NativeAnimationExtended = class extends NativeAnimation {
|
|
|
2478
2204
|
sampleAnimation.stop();
|
|
2479
2205
|
}
|
|
2480
2206
|
};
|
|
2481
|
-
|
|
2482
|
-
|
|
2207
|
+
function isHTMLElement(element,) {
|
|
2208
|
+
return isObject(element,) && 'offsetHeight' in element;
|
|
2209
|
+
}
|
|
2210
|
+
var acceleratedValues = /* @__PURE__ */ new Set(['opacity', 'clipPath', 'filter', 'transform',// TODO: Could be re-enabled now we have support for linear() easing
|
|
2483
2211
|
// "background-color"
|
|
2484
2212
|
],);
|
|
2485
2213
|
var supportsWaapi = /* @__PURE__ */ memo(() => Object.hasOwnProperty.call(Element.prototype, 'animate',));
|
|
2486
2214
|
function supportsBrowserAnimation(options,) {
|
|
2215
|
+
var _a;
|
|
2487
2216
|
const {
|
|
2488
2217
|
motionValue: motionValue2,
|
|
2489
2218
|
name,
|
|
@@ -2492,7 +2221,7 @@ function supportsBrowserAnimation(options,) {
|
|
|
2492
2221
|
damping,
|
|
2493
2222
|
type,
|
|
2494
2223
|
} = options;
|
|
2495
|
-
if (!motionValue2
|
|
2224
|
+
if (!isHTMLElement((_a = motionValue2 == null ? void 0 : motionValue2.owner) == null ? void 0 : _a.current,)) {
|
|
2496
2225
|
return false;
|
|
2497
2226
|
}
|
|
2498
2227
|
const {
|
|
@@ -3148,6 +2877,120 @@ function resolveElements(elementOrSelector, scope, selectorCache,) {
|
|
|
3148
2877
|
}
|
|
3149
2878
|
return Array.from(elementOrSelector,);
|
|
3150
2879
|
}
|
|
2880
|
+
var getValueAsType = (value, type,) => {
|
|
2881
|
+
return type && typeof value === 'number' ? type.transform(value,) : value;
|
|
2882
|
+
};
|
|
2883
|
+
function camelToDash(str,) {
|
|
2884
|
+
return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`,);
|
|
2885
|
+
}
|
|
2886
|
+
function createSelectorEffect(subjectEffect,) {
|
|
2887
|
+
return (subject, values,) => {
|
|
2888
|
+
const elements = resolveElements(subject,);
|
|
2889
|
+
const subscriptions = [];
|
|
2890
|
+
for (const element of elements) {
|
|
2891
|
+
const remove2 = subjectEffect(element, values,);
|
|
2892
|
+
subscriptions.push(remove2,);
|
|
2893
|
+
}
|
|
2894
|
+
return () => {
|
|
2895
|
+
for (const remove2 of subscriptions) remove2();
|
|
2896
|
+
};
|
|
2897
|
+
};
|
|
2898
|
+
}
|
|
2899
|
+
var MotionValueState = class {
|
|
2900
|
+
constructor() {
|
|
2901
|
+
this.latest = {};
|
|
2902
|
+
this.values = /* @__PURE__ */ new Map();
|
|
2903
|
+
}
|
|
2904
|
+
set(name, value, render, computed, useDefaultValueType = true,) {
|
|
2905
|
+
const existingValue = this.values.get(name,);
|
|
2906
|
+
if (existingValue) {
|
|
2907
|
+
existingValue.onRemove();
|
|
2908
|
+
}
|
|
2909
|
+
const onChange = () => {
|
|
2910
|
+
const v = value.get();
|
|
2911
|
+
if (useDefaultValueType) {
|
|
2912
|
+
this.latest[name] = getValueAsType(v, numberValueTypes[name],);
|
|
2913
|
+
} else {
|
|
2914
|
+
this.latest[name] = v;
|
|
2915
|
+
}
|
|
2916
|
+
render && frame.render(render,);
|
|
2917
|
+
};
|
|
2918
|
+
onChange();
|
|
2919
|
+
const cancelOnChange = value.on('change', onChange,);
|
|
2920
|
+
computed && value.addDependent(computed,);
|
|
2921
|
+
const remove2 = () => {
|
|
2922
|
+
cancelOnChange();
|
|
2923
|
+
render && cancelFrame(render,);
|
|
2924
|
+
this.values.delete(name,);
|
|
2925
|
+
computed && value.removeDependent(computed,);
|
|
2926
|
+
};
|
|
2927
|
+
this.values.set(name, {
|
|
2928
|
+
value,
|
|
2929
|
+
onRemove: remove2,
|
|
2930
|
+
},);
|
|
2931
|
+
return remove2;
|
|
2932
|
+
}
|
|
2933
|
+
get(name,) {
|
|
2934
|
+
var _a;
|
|
2935
|
+
return (_a = this.values.get(name,)) == null ? void 0 : _a.value;
|
|
2936
|
+
}
|
|
2937
|
+
destroy() {
|
|
2938
|
+
for (const value of this.values.values()) {
|
|
2939
|
+
value.onRemove();
|
|
2940
|
+
}
|
|
2941
|
+
}
|
|
2942
|
+
};
|
|
2943
|
+
function createEffect(addValue,) {
|
|
2944
|
+
const stateCache = /* @__PURE__ */ new WeakMap();
|
|
2945
|
+
const subscriptions = [];
|
|
2946
|
+
return (subject, values,) => {
|
|
2947
|
+
const state = stateCache.get(subject,) ?? new MotionValueState();
|
|
2948
|
+
stateCache.set(subject, state,);
|
|
2949
|
+
for (const key7 in values) {
|
|
2950
|
+
const value = values[key7];
|
|
2951
|
+
const remove2 = addValue(subject, state, key7, value,);
|
|
2952
|
+
subscriptions.push(remove2,);
|
|
2953
|
+
}
|
|
2954
|
+
return () => {
|
|
2955
|
+
for (const cancel of subscriptions) cancel();
|
|
2956
|
+
};
|
|
2957
|
+
};
|
|
2958
|
+
}
|
|
2959
|
+
function canSetAsProperty(element, name,) {
|
|
2960
|
+
if (!(name in element)) return false;
|
|
2961
|
+
const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element,), name,) ||
|
|
2962
|
+
Object.getOwnPropertyDescriptor(element, name,);
|
|
2963
|
+
return descriptor && typeof descriptor.set === 'function';
|
|
2964
|
+
}
|
|
2965
|
+
var addAttrValue = (element, state, key7, value,) => {
|
|
2966
|
+
const isProp = canSetAsProperty(element, key7,);
|
|
2967
|
+
const name = isProp ? key7 : key7.startsWith('data',) || key7.startsWith('aria',) ? camelToDash(key7,) : key7;
|
|
2968
|
+
const render = isProp
|
|
2969
|
+
? () => {
|
|
2970
|
+
element[name] = state.latest[key7];
|
|
2971
|
+
}
|
|
2972
|
+
: () => {
|
|
2973
|
+
const v = state.latest[key7];
|
|
2974
|
+
if (v === null || v === void 0) {
|
|
2975
|
+
element.removeAttribute(name,);
|
|
2976
|
+
} else {
|
|
2977
|
+
element.setAttribute(name, String(v,),);
|
|
2978
|
+
}
|
|
2979
|
+
};
|
|
2980
|
+
return state.set(key7, value, render,);
|
|
2981
|
+
};
|
|
2982
|
+
var attrEffect = /* @__PURE__ */ createSelectorEffect(/* @__PURE__ */ createEffect(addAttrValue,),);
|
|
2983
|
+
var propEffect = /* @__PURE__ */ createEffect((subject, state, key7, value,) => {
|
|
2984
|
+
return state.set(
|
|
2985
|
+
key7,
|
|
2986
|
+
value,
|
|
2987
|
+
() => {
|
|
2988
|
+
subject[key7] = state.latest[key7];
|
|
2989
|
+
},
|
|
2990
|
+
void 0,
|
|
2991
|
+
false,
|
|
2992
|
+
);
|
|
2993
|
+
},);
|
|
3151
2994
|
var MAX_VELOCITY_DELTA = 30;
|
|
3152
2995
|
var isFloat = (value) => {
|
|
3153
2996
|
return !isNaN(parseFloat(value,),);
|
|
@@ -3436,48 +3279,6 @@ var MotionValue = class {
|
|
|
3436
3279
|
function motionValue(init, options,) {
|
|
3437
3280
|
return new MotionValue(init, options,);
|
|
3438
3281
|
}
|
|
3439
|
-
var getValueAsType = (value, type,) => {
|
|
3440
|
-
return type && typeof value === 'number' ? type.transform(value,) : value;
|
|
3441
|
-
};
|
|
3442
|
-
var MotionValueState = class {
|
|
3443
|
-
constructor() {
|
|
3444
|
-
this.latest = {};
|
|
3445
|
-
this.values = /* @__PURE__ */ new Map();
|
|
3446
|
-
}
|
|
3447
|
-
set(name, value, render, computed,) {
|
|
3448
|
-
const existingValue = this.values.get(name,);
|
|
3449
|
-
if (existingValue) {
|
|
3450
|
-
existingValue.onRemove();
|
|
3451
|
-
}
|
|
3452
|
-
const onChange = () => {
|
|
3453
|
-
this.latest[name] = getValueAsType(value.get(), numberValueTypes[name],);
|
|
3454
|
-
render && frame.render(render,);
|
|
3455
|
-
};
|
|
3456
|
-
onChange();
|
|
3457
|
-
const cancelOnChange = value.on('change', onChange,);
|
|
3458
|
-
computed && value.addDependent(computed,);
|
|
3459
|
-
const remove2 = () => {
|
|
3460
|
-
cancelOnChange();
|
|
3461
|
-
render && cancelFrame(render,);
|
|
3462
|
-
this.values.delete(name,);
|
|
3463
|
-
computed && value.removeDependent(computed,);
|
|
3464
|
-
};
|
|
3465
|
-
this.values.set(name, {
|
|
3466
|
-
value,
|
|
3467
|
-
onRemove: remove2,
|
|
3468
|
-
},);
|
|
3469
|
-
return remove2;
|
|
3470
|
-
}
|
|
3471
|
-
get(name,) {
|
|
3472
|
-
var _a;
|
|
3473
|
-
return (_a = this.values.get(name,)) == null ? void 0 : _a.value;
|
|
3474
|
-
}
|
|
3475
|
-
destroy() {
|
|
3476
|
-
for (const value of this.values.values()) {
|
|
3477
|
-
value.onRemove();
|
|
3478
|
-
}
|
|
3479
|
-
}
|
|
3480
|
-
};
|
|
3481
3282
|
var translateAlias = {
|
|
3482
3283
|
x: 'translateX',
|
|
3483
3284
|
y: 'translateY',
|
|
@@ -3506,34 +3307,30 @@ function buildTransform(state,) {
|
|
|
3506
3307
|
}
|
|
3507
3308
|
return transformIsDefault ? 'none' : transform2.trim();
|
|
3508
3309
|
}
|
|
3509
|
-
var
|
|
3510
|
-
|
|
3511
|
-
const elements = resolveElements(subject,);
|
|
3512
|
-
const subscriptions = [];
|
|
3513
|
-
for (let i = 0; i < elements.length; i++) {
|
|
3514
|
-
const element = elements[i];
|
|
3515
|
-
const state = stateMap.get(element,) ?? new MotionValueState();
|
|
3516
|
-
stateMap.set(element, state,);
|
|
3517
|
-
for (const key7 in values) {
|
|
3518
|
-
const value = values[key7];
|
|
3519
|
-
const remove2 = addValue(element, state, key7, value,);
|
|
3520
|
-
subscriptions.push(remove2,);
|
|
3521
|
-
}
|
|
3522
|
-
}
|
|
3523
|
-
return () => {
|
|
3524
|
-
for (const cancel of subscriptions) cancel();
|
|
3525
|
-
};
|
|
3526
|
-
}
|
|
3527
|
-
function addValue(element, state, key7, value,) {
|
|
3310
|
+
var originProps = /* @__PURE__ */ new Set(['originX', 'originY', 'originZ',],);
|
|
3311
|
+
var addStyleValue = (element, state, key7, value,) => {
|
|
3528
3312
|
let render = void 0;
|
|
3529
3313
|
let computed = void 0;
|
|
3530
3314
|
if (transformProps.has(key7,)) {
|
|
3531
3315
|
if (!state.get('transform',)) {
|
|
3316
|
+
if (!isHTMLElement(element,) && !state.get('transformBox',)) {
|
|
3317
|
+
addStyleValue(element, state, 'transformBox', new MotionValue('fill-box',),);
|
|
3318
|
+
}
|
|
3532
3319
|
state.set('transform', new MotionValue('none',), () => {
|
|
3533
3320
|
element.style.transform = buildTransform(state,);
|
|
3534
3321
|
},);
|
|
3535
3322
|
}
|
|
3536
3323
|
computed = state.get('transform',);
|
|
3324
|
+
} else if (originProps.has(key7,)) {
|
|
3325
|
+
if (!state.get('transformOrigin',)) {
|
|
3326
|
+
state.set('transformOrigin', new MotionValue('',), () => {
|
|
3327
|
+
const originX = state.latest.originX ?? '50%';
|
|
3328
|
+
const originY = state.latest.originY ?? '50%';
|
|
3329
|
+
const originZ = state.latest.originZ ?? 0;
|
|
3330
|
+
element.style.transformOrigin = `${originX} ${originY} ${originZ}`;
|
|
3331
|
+
},);
|
|
3332
|
+
}
|
|
3333
|
+
computed = state.get('transformOrigin',);
|
|
3537
3334
|
} else if (isCSSVar(key7,)) {
|
|
3538
3335
|
render = () => {
|
|
3539
3336
|
element.style.setProperty(key7, state.latest[key7],);
|
|
@@ -3544,6 +3341,38 @@ function addValue(element, state, key7, value,) {
|
|
|
3544
3341
|
};
|
|
3545
3342
|
}
|
|
3546
3343
|
return state.set(key7, value, render, computed,);
|
|
3344
|
+
};
|
|
3345
|
+
var styleEffect = /* @__PURE__ */ createSelectorEffect(/* @__PURE__ */ createEffect(addStyleValue,),);
|
|
3346
|
+
var toPx = px.transform;
|
|
3347
|
+
function addSVGPathValue(element, state, key7, value,) {
|
|
3348
|
+
frame.render(() => element.setAttribute('pathLength', '1',));
|
|
3349
|
+
if (key7 === 'pathOffset') {
|
|
3350
|
+
return state.set(key7, value, () => element.setAttribute('stroke-dashoffset', toPx(-state.latest[key7],),),);
|
|
3351
|
+
} else {
|
|
3352
|
+
if (!state.get('stroke-dasharray',)) {
|
|
3353
|
+
state.set('stroke-dasharray', new MotionValue('1 1',), () => {
|
|
3354
|
+
const {
|
|
3355
|
+
pathLength = 1,
|
|
3356
|
+
pathSpacing,
|
|
3357
|
+
} = state.latest;
|
|
3358
|
+
element.setAttribute('stroke-dasharray', `${toPx(pathLength,)} ${toPx(pathSpacing ?? 1 - Number(pathLength,),)}`,);
|
|
3359
|
+
},);
|
|
3360
|
+
}
|
|
3361
|
+
return state.set(key7, value, void 0, state.get('stroke-dasharray',),);
|
|
3362
|
+
}
|
|
3363
|
+
}
|
|
3364
|
+
var addSVGValue = (element, state, key7, value,) => {
|
|
3365
|
+
if (key7.startsWith('path',)) {
|
|
3366
|
+
return addSVGPathValue(element, state, key7, value,);
|
|
3367
|
+
} else if (key7.startsWith('attr',)) {
|
|
3368
|
+
return addAttrValue(element, state, convertAttrKey(key7,), value,);
|
|
3369
|
+
}
|
|
3370
|
+
const handler = key7 in element.style ? addStyleValue : addAttrValue;
|
|
3371
|
+
return handler(element, state, key7, value,);
|
|
3372
|
+
};
|
|
3373
|
+
var svgEffect = /* @__PURE__ */ createSelectorEffect(/* @__PURE__ */ createEffect(addSVGValue,),);
|
|
3374
|
+
function convertAttrKey(key7,) {
|
|
3375
|
+
return key7.replace(/^attr([A-Z])/, (_, firstChar,) => firstChar.toLowerCase(),);
|
|
3547
3376
|
}
|
|
3548
3377
|
var {
|
|
3549
3378
|
schedule: microtask,
|
|
@@ -3700,7 +3529,7 @@ function press(targetOrSelector, onPressStart, options = {},) {
|
|
|
3700
3529
|
targets.forEach((target) => {
|
|
3701
3530
|
const pointerDownTarget = options.useGlobalTarget ? window : target;
|
|
3702
3531
|
pointerDownTarget.addEventListener('pointerdown', startPress, eventOptions,);
|
|
3703
|
-
if (target
|
|
3532
|
+
if (isHTMLElement(target,)) {
|
|
3704
3533
|
target.addEventListener('focus', (event) => enableKeyboardPress(event, eventOptions,),);
|
|
3705
3534
|
if (!isElementKeyboardAccessible(target,) && !target.hasAttribute('tabindex',)) {
|
|
3706
3535
|
target.tabIndex = 0;
|
|
@@ -3845,6 +3674,12 @@ function recordStats() {
|
|
|
3845
3674
|
frame.postRender(record, true,);
|
|
3846
3675
|
return reportStats;
|
|
3847
3676
|
}
|
|
3677
|
+
function isSVGElement(element,) {
|
|
3678
|
+
return isObject(element,) && 'ownerSVGElement' in element;
|
|
3679
|
+
}
|
|
3680
|
+
function isSVGSVGElement(element,) {
|
|
3681
|
+
return isSVGElement(element,) && element.tagName === 'svg';
|
|
3682
|
+
}
|
|
3848
3683
|
function transform(...args) {
|
|
3849
3684
|
const useImmediate = !Array.isArray(args[0],);
|
|
3850
3685
|
const argOffset = useImmediate ? 0 : -1;
|
|
@@ -3877,6 +3712,56 @@ function mapValue(inputValue, inputRange, outputRange, options,) {
|
|
|
3877
3712
|
const map2 = transform(inputRange, outputRange, options,);
|
|
3878
3713
|
return transformValue(() => map2(inputValue.get(),));
|
|
3879
3714
|
}
|
|
3715
|
+
var isMotionValue = (value) => Boolean(value && value.getVelocity,);
|
|
3716
|
+
function springValue(source, options,) {
|
|
3717
|
+
const initialValue = isMotionValue(source,) ? source.get() : source;
|
|
3718
|
+
const value = motionValue(initialValue,);
|
|
3719
|
+
attachSpring(value, source, options,);
|
|
3720
|
+
return value;
|
|
3721
|
+
}
|
|
3722
|
+
function attachSpring(value, source, options,) {
|
|
3723
|
+
const initialValue = value.get();
|
|
3724
|
+
let activeAnimation = null;
|
|
3725
|
+
let latestValue = initialValue;
|
|
3726
|
+
let latestSetter;
|
|
3727
|
+
const unit = typeof initialValue === 'string' ? initialValue.replace(/[\d.-]/g, '',) : void 0;
|
|
3728
|
+
const stopAnimation2 = () => {
|
|
3729
|
+
if (activeAnimation) {
|
|
3730
|
+
activeAnimation.stop();
|
|
3731
|
+
activeAnimation = null;
|
|
3732
|
+
}
|
|
3733
|
+
};
|
|
3734
|
+
const startAnimation2 = () => {
|
|
3735
|
+
stopAnimation2();
|
|
3736
|
+
activeAnimation = new JSAnimation({
|
|
3737
|
+
keyframes: [asNumber(value.get(),), asNumber(latestValue,),],
|
|
3738
|
+
velocity: value.getVelocity(),
|
|
3739
|
+
type: 'spring',
|
|
3740
|
+
restDelta: 1e-3,
|
|
3741
|
+
restSpeed: 0.01,
|
|
3742
|
+
...options,
|
|
3743
|
+
onUpdate: latestSetter,
|
|
3744
|
+
},);
|
|
3745
|
+
};
|
|
3746
|
+
value.attach((v, set,) => {
|
|
3747
|
+
latestValue = v;
|
|
3748
|
+
latestSetter = (latest) => set(parseValue(latest, unit,),);
|
|
3749
|
+
frame.postRender(startAnimation2,);
|
|
3750
|
+
return value.get();
|
|
3751
|
+
}, stopAnimation2,);
|
|
3752
|
+
let unsubscribe = void 0;
|
|
3753
|
+
if (isMotionValue(source,)) {
|
|
3754
|
+
unsubscribe = source.on('change', (v) => value.set(parseValue(v, unit,),),);
|
|
3755
|
+
value.on('destroy', unsubscribe,);
|
|
3756
|
+
}
|
|
3757
|
+
return unsubscribe;
|
|
3758
|
+
}
|
|
3759
|
+
function parseValue(v, unit,) {
|
|
3760
|
+
return unit ? v + unit : v;
|
|
3761
|
+
}
|
|
3762
|
+
function asNumber(v,) {
|
|
3763
|
+
return typeof v === 'number' ? v : parseFloat(v,);
|
|
3764
|
+
}
|
|
3880
3765
|
var valueTypes = [...dimensionValueTypes, color, complex,];
|
|
3881
3766
|
var findValueType = (v) => valueTypes.find(testValueType(v,),);
|
|
3882
3767
|
function chooseLayerType(valueName,) {
|
|
@@ -4163,6 +4048,281 @@ var cancelSync = stepsOrder.reduce((acc, key7,) => {
|
|
|
4163
4048
|
acc[key7] = (process2) => cancelFrame(process2,);
|
|
4164
4049
|
return acc;
|
|
4165
4050
|
}, {},);
|
|
4051
|
+
var MotionConfigContext = createContext({
|
|
4052
|
+
transformPagePoint: (p) => p,
|
|
4053
|
+
isStatic: false,
|
|
4054
|
+
reducedMotion: 'never',
|
|
4055
|
+
},);
|
|
4056
|
+
function usePresence(subscribe = true,) {
|
|
4057
|
+
const context = useContext(PresenceContext,);
|
|
4058
|
+
if (context === null) return [true, null,];
|
|
4059
|
+
const {
|
|
4060
|
+
isPresent: isPresent2,
|
|
4061
|
+
onExitComplete,
|
|
4062
|
+
register,
|
|
4063
|
+
} = context;
|
|
4064
|
+
const id4 = useId();
|
|
4065
|
+
useEffect(() => {
|
|
4066
|
+
if (subscribe) {
|
|
4067
|
+
return register(id4,);
|
|
4068
|
+
}
|
|
4069
|
+
}, [subscribe,],);
|
|
4070
|
+
const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id4,), [id4, onExitComplete, subscribe,],);
|
|
4071
|
+
return !isPresent2 && onExitComplete ? [false, safeToRemove,] : [true,];
|
|
4072
|
+
}
|
|
4073
|
+
function useIsPresent() {
|
|
4074
|
+
return isPresent(useContext(PresenceContext,),);
|
|
4075
|
+
}
|
|
4076
|
+
function isPresent(context,) {
|
|
4077
|
+
return context === null ? true : context.isPresent;
|
|
4078
|
+
}
|
|
4079
|
+
function useConstant(init,) {
|
|
4080
|
+
const ref = useRef3(null,);
|
|
4081
|
+
if (ref.current === null) {
|
|
4082
|
+
ref.current = init();
|
|
4083
|
+
}
|
|
4084
|
+
return ref.current;
|
|
4085
|
+
}
|
|
4086
|
+
var PopChildMeasure = class extends React2.Component {
|
|
4087
|
+
getSnapshotBeforeUpdate(prevProps,) {
|
|
4088
|
+
const element = this.props.childRef.current;
|
|
4089
|
+
if (element && prevProps.isPresent && !this.props.isPresent) {
|
|
4090
|
+
const parent = element.offsetParent;
|
|
4091
|
+
const parentWidth = isHTMLElement(parent,) ? parent.offsetWidth || 0 : 0;
|
|
4092
|
+
const size = this.props.sizeRef.current;
|
|
4093
|
+
size.height = element.offsetHeight || 0;
|
|
4094
|
+
size.width = element.offsetWidth || 0;
|
|
4095
|
+
size.top = element.offsetTop;
|
|
4096
|
+
size.left = element.offsetLeft;
|
|
4097
|
+
size.right = parentWidth - size.width - size.left;
|
|
4098
|
+
}
|
|
4099
|
+
return null;
|
|
4100
|
+
}
|
|
4101
|
+
/**
|
|
4102
|
+
* Required with getSnapshotBeforeUpdate to stop React complaining.
|
|
4103
|
+
*/
|
|
4104
|
+
componentDidUpdate() {}
|
|
4105
|
+
render() {
|
|
4106
|
+
return this.props.children;
|
|
4107
|
+
}
|
|
4108
|
+
};
|
|
4109
|
+
function PopChild({
|
|
4110
|
+
children,
|
|
4111
|
+
isPresent: isPresent2,
|
|
4112
|
+
anchorX,
|
|
4113
|
+
},) {
|
|
4114
|
+
const id4 = useId();
|
|
4115
|
+
const ref = useRef3(null,);
|
|
4116
|
+
const size = useRef3({
|
|
4117
|
+
width: 0,
|
|
4118
|
+
height: 0,
|
|
4119
|
+
top: 0,
|
|
4120
|
+
left: 0,
|
|
4121
|
+
right: 0,
|
|
4122
|
+
},);
|
|
4123
|
+
const {
|
|
4124
|
+
nonce,
|
|
4125
|
+
} = useContext(MotionConfigContext,);
|
|
4126
|
+
useInsertionEffect(() => {
|
|
4127
|
+
const {
|
|
4128
|
+
width,
|
|
4129
|
+
height,
|
|
4130
|
+
top,
|
|
4131
|
+
left,
|
|
4132
|
+
right,
|
|
4133
|
+
} = size.current;
|
|
4134
|
+
if (isPresent2 || !ref.current || !width || !height) return;
|
|
4135
|
+
const x = anchorX === 'left' ? `left: ${left}` : `right: ${right}`;
|
|
4136
|
+
ref.current.dataset.motionPopId = id4;
|
|
4137
|
+
const style2 = document.createElement('style',);
|
|
4138
|
+
if (nonce) style2.nonce = nonce;
|
|
4139
|
+
document.head.appendChild(style2,);
|
|
4140
|
+
if (style2.sheet) {
|
|
4141
|
+
style2.sheet.insertRule(`
|
|
4142
|
+
[data-motion-pop-id="${id4}"] {
|
|
4143
|
+
position: absolute !important;
|
|
4144
|
+
width: ${width}px !important;
|
|
4145
|
+
height: ${height}px !important;
|
|
4146
|
+
${x}px !important;
|
|
4147
|
+
top: ${top}px !important;
|
|
4148
|
+
}
|
|
4149
|
+
`,);
|
|
4150
|
+
}
|
|
4151
|
+
return () => {
|
|
4152
|
+
if (document.head.contains(style2,)) {
|
|
4153
|
+
document.head.removeChild(style2,);
|
|
4154
|
+
}
|
|
4155
|
+
};
|
|
4156
|
+
}, [isPresent2,],);
|
|
4157
|
+
return jsx3(PopChildMeasure, {
|
|
4158
|
+
isPresent: isPresent2,
|
|
4159
|
+
childRef: ref,
|
|
4160
|
+
sizeRef: size,
|
|
4161
|
+
children: React2.cloneElement(children, {
|
|
4162
|
+
ref,
|
|
4163
|
+
},),
|
|
4164
|
+
},);
|
|
4165
|
+
}
|
|
4166
|
+
var PresenceChild = ({
|
|
4167
|
+
children,
|
|
4168
|
+
initial,
|
|
4169
|
+
isPresent: isPresent2,
|
|
4170
|
+
onExitComplete,
|
|
4171
|
+
custom,
|
|
4172
|
+
presenceAffectsLayout,
|
|
4173
|
+
mode,
|
|
4174
|
+
anchorX,
|
|
4175
|
+
},) => {
|
|
4176
|
+
const presenceChildren = useConstant(newChildrenMap,);
|
|
4177
|
+
const id4 = useId();
|
|
4178
|
+
let isReusedContext = true;
|
|
4179
|
+
let context = useMemo2(() => {
|
|
4180
|
+
isReusedContext = false;
|
|
4181
|
+
return {
|
|
4182
|
+
id: id4,
|
|
4183
|
+
initial,
|
|
4184
|
+
isPresent: isPresent2,
|
|
4185
|
+
custom,
|
|
4186
|
+
onExitComplete: (childId) => {
|
|
4187
|
+
presenceChildren.set(childId, true,);
|
|
4188
|
+
for (const isComplete of presenceChildren.values()) {
|
|
4189
|
+
if (!isComplete) return;
|
|
4190
|
+
}
|
|
4191
|
+
onExitComplete && onExitComplete();
|
|
4192
|
+
},
|
|
4193
|
+
register: (childId) => {
|
|
4194
|
+
presenceChildren.set(childId, false,);
|
|
4195
|
+
return () => presenceChildren.delete(childId,);
|
|
4196
|
+
},
|
|
4197
|
+
};
|
|
4198
|
+
}, [isPresent2, presenceChildren, onExitComplete,],);
|
|
4199
|
+
if (presenceAffectsLayout && isReusedContext) {
|
|
4200
|
+
context = {
|
|
4201
|
+
...context,
|
|
4202
|
+
};
|
|
4203
|
+
}
|
|
4204
|
+
useMemo2(() => {
|
|
4205
|
+
presenceChildren.forEach((_, key7,) => presenceChildren.set(key7, false,));
|
|
4206
|
+
}, [isPresent2,],);
|
|
4207
|
+
React2.useEffect(() => {
|
|
4208
|
+
!isPresent2 && !presenceChildren.size && onExitComplete && onExitComplete();
|
|
4209
|
+
}, [isPresent2,],);
|
|
4210
|
+
if (mode === 'popLayout') {
|
|
4211
|
+
children = jsx3(PopChild, {
|
|
4212
|
+
isPresent: isPresent2,
|
|
4213
|
+
anchorX,
|
|
4214
|
+
children,
|
|
4215
|
+
},);
|
|
4216
|
+
}
|
|
4217
|
+
return jsx3(PresenceContext.Provider, {
|
|
4218
|
+
value: context,
|
|
4219
|
+
children,
|
|
4220
|
+
},);
|
|
4221
|
+
};
|
|
4222
|
+
function newChildrenMap() {
|
|
4223
|
+
return /* @__PURE__ */ new Map();
|
|
4224
|
+
}
|
|
4225
|
+
var getChildKey = (child) => child.key || '';
|
|
4226
|
+
function onlyElements(children,) {
|
|
4227
|
+
const filtered = [];
|
|
4228
|
+
Children.forEach(children, (child) => {
|
|
4229
|
+
if (isValidElement(child,)) filtered.push(child,);
|
|
4230
|
+
},);
|
|
4231
|
+
return filtered;
|
|
4232
|
+
}
|
|
4233
|
+
var AnimatePresence = ({
|
|
4234
|
+
children,
|
|
4235
|
+
custom,
|
|
4236
|
+
initial = true,
|
|
4237
|
+
onExitComplete,
|
|
4238
|
+
presenceAffectsLayout = true,
|
|
4239
|
+
mode = 'sync',
|
|
4240
|
+
propagate = false,
|
|
4241
|
+
anchorX = 'left',
|
|
4242
|
+
},) => {
|
|
4243
|
+
const [isParentPresent, safeToRemove,] = usePresence(propagate,);
|
|
4244
|
+
const presentChildren = useMemo2(() => onlyElements(children,), [children,],);
|
|
4245
|
+
const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey,);
|
|
4246
|
+
const isInitialRender = useRef3(true,);
|
|
4247
|
+
const pendingPresentChildren = useRef3(presentChildren,);
|
|
4248
|
+
const exitComplete = useConstant(() => /* @__PURE__ */ new Map());
|
|
4249
|
+
const [diffedChildren, setDiffedChildren,] = useState(presentChildren,);
|
|
4250
|
+
const [renderedChildren, setRenderedChildren,] = useState(presentChildren,);
|
|
4251
|
+
useIsomorphicLayoutEffect(() => {
|
|
4252
|
+
isInitialRender.current = false;
|
|
4253
|
+
pendingPresentChildren.current = presentChildren;
|
|
4254
|
+
for (let i = 0; i < renderedChildren.length; i++) {
|
|
4255
|
+
const key7 = getChildKey(renderedChildren[i],);
|
|
4256
|
+
if (!presentKeys.includes(key7,)) {
|
|
4257
|
+
if (exitComplete.get(key7,) !== true) {
|
|
4258
|
+
exitComplete.set(key7, false,);
|
|
4259
|
+
}
|
|
4260
|
+
} else {
|
|
4261
|
+
exitComplete.delete(key7,);
|
|
4262
|
+
}
|
|
4263
|
+
}
|
|
4264
|
+
}, [renderedChildren, presentKeys.length, presentKeys.join('-',),],);
|
|
4265
|
+
const exitingChildren = [];
|
|
4266
|
+
if (presentChildren !== diffedChildren) {
|
|
4267
|
+
let nextChildren = [...presentChildren,];
|
|
4268
|
+
for (let i = 0; i < renderedChildren.length; i++) {
|
|
4269
|
+
const child = renderedChildren[i];
|
|
4270
|
+
const key7 = getChildKey(child,);
|
|
4271
|
+
if (!presentKeys.includes(key7,)) {
|
|
4272
|
+
nextChildren.splice(i, 0, child,);
|
|
4273
|
+
exitingChildren.push(child,);
|
|
4274
|
+
}
|
|
4275
|
+
}
|
|
4276
|
+
if (mode === 'wait' && exitingChildren.length) {
|
|
4277
|
+
nextChildren = exitingChildren;
|
|
4278
|
+
}
|
|
4279
|
+
setRenderedChildren(onlyElements(nextChildren,),);
|
|
4280
|
+
setDiffedChildren(presentChildren,);
|
|
4281
|
+
return null;
|
|
4282
|
+
}
|
|
4283
|
+
if (false) {
|
|
4284
|
+
console.warn(
|
|
4285
|
+
`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`,
|
|
4286
|
+
);
|
|
4287
|
+
}
|
|
4288
|
+
const {
|
|
4289
|
+
forceRender,
|
|
4290
|
+
} = useContext(LayoutGroupContext,);
|
|
4291
|
+
return jsx3(Fragment, {
|
|
4292
|
+
children: renderedChildren.map((child) => {
|
|
4293
|
+
const key7 = getChildKey(child,);
|
|
4294
|
+
const isPresent2 = propagate && !isParentPresent ? false : presentChildren === renderedChildren || presentKeys.includes(key7,);
|
|
4295
|
+
const onExit = () => {
|
|
4296
|
+
if (exitComplete.has(key7,)) {
|
|
4297
|
+
exitComplete.set(key7, true,);
|
|
4298
|
+
} else {
|
|
4299
|
+
return;
|
|
4300
|
+
}
|
|
4301
|
+
let isEveryExitComplete = true;
|
|
4302
|
+
exitComplete.forEach((isExitComplete) => {
|
|
4303
|
+
if (!isExitComplete) isEveryExitComplete = false;
|
|
4304
|
+
},);
|
|
4305
|
+
if (isEveryExitComplete) {
|
|
4306
|
+
forceRender == null ? void 0 : forceRender();
|
|
4307
|
+
setRenderedChildren(pendingPresentChildren.current,);
|
|
4308
|
+
propagate && (safeToRemove == null ? void 0 : safeToRemove());
|
|
4309
|
+
onExitComplete && onExitComplete();
|
|
4310
|
+
}
|
|
4311
|
+
};
|
|
4312
|
+
return jsx3(PresenceChild, {
|
|
4313
|
+
isPresent: isPresent2,
|
|
4314
|
+
initial: !isInitialRender.current || initial ? void 0 : false,
|
|
4315
|
+
custom,
|
|
4316
|
+
presenceAffectsLayout,
|
|
4317
|
+
mode,
|
|
4318
|
+
onExitComplete: isPresent2 ? void 0 : onExit,
|
|
4319
|
+
anchorX,
|
|
4320
|
+
children: child,
|
|
4321
|
+
}, key7,);
|
|
4322
|
+
},),
|
|
4323
|
+
},);
|
|
4324
|
+
};
|
|
4325
|
+
var DeprecatedLayoutGroupContext = createContext(null,);
|
|
4166
4326
|
function useIsMounted() {
|
|
4167
4327
|
const isMounted = useRef3(false,);
|
|
4168
4328
|
useIsomorphicLayoutEffect(() => {
|
|
@@ -4376,9 +4536,9 @@ function MotionConfig({
|
|
|
4376
4536
|
},);
|
|
4377
4537
|
}
|
|
4378
4538
|
var MotionContext = /* @__PURE__ */ createContext({},);
|
|
4379
|
-
var
|
|
4539
|
+
var camelToDash2 = (str) => str.replace(/([a-z])([A-Z])/gu, '$1-$2',).toLowerCase();
|
|
4380
4540
|
var optimizedAppearDataId = 'framerAppearId';
|
|
4381
|
-
var optimizedAppearDataAttribute = 'data-' +
|
|
4541
|
+
var optimizedAppearDataAttribute = 'data-' + camelToDash2(optimizedAppearDataId,);
|
|
4382
4542
|
var SwitchLayoutGroupContext = createContext({},);
|
|
4383
4543
|
function isAnimationControls(v,) {
|
|
4384
4544
|
return v !== null && typeof v === 'object' && typeof v.start === 'function';
|
|
@@ -4649,7 +4809,6 @@ function addScaleCorrector(correctors,) {
|
|
|
4649
4809
|
}
|
|
4650
4810
|
}
|
|
4651
4811
|
}
|
|
4652
|
-
var isMotionValue = (value) => Boolean(value && value.getVelocity,);
|
|
4653
4812
|
var translateAlias2 = {
|
|
4654
4813
|
x: 'translateX',
|
|
4655
4814
|
y: 'translateY',
|
|
@@ -4901,60 +5060,6 @@ function useHTMLProps(props, visualState,) {
|
|
|
4901
5060
|
htmlProps.style = style2;
|
|
4902
5061
|
return htmlProps;
|
|
4903
5062
|
}
|
|
4904
|
-
var lowercaseSVGElements = [
|
|
4905
|
-
'animate',
|
|
4906
|
-
'circle',
|
|
4907
|
-
'defs',
|
|
4908
|
-
'desc',
|
|
4909
|
-
'ellipse',
|
|
4910
|
-
'g',
|
|
4911
|
-
'image',
|
|
4912
|
-
'line',
|
|
4913
|
-
'filter',
|
|
4914
|
-
'marker',
|
|
4915
|
-
'mask',
|
|
4916
|
-
'metadata',
|
|
4917
|
-
'path',
|
|
4918
|
-
'pattern',
|
|
4919
|
-
'polygon',
|
|
4920
|
-
'polyline',
|
|
4921
|
-
'rect',
|
|
4922
|
-
'stop',
|
|
4923
|
-
'switch',
|
|
4924
|
-
'symbol',
|
|
4925
|
-
'svg',
|
|
4926
|
-
'text',
|
|
4927
|
-
'tspan',
|
|
4928
|
-
'use',
|
|
4929
|
-
'view',
|
|
4930
|
-
];
|
|
4931
|
-
function isSVGComponent(Component33,) {
|
|
4932
|
-
if (
|
|
4933
|
-
/**
|
|
4934
|
-
* If it's not a string, it's a custom React component. Currently we only support
|
|
4935
|
-
* HTML custom React components.
|
|
4936
|
-
*/
|
|
4937
|
-
typeof Component33 !== 'string' ||
|
|
4938
|
-
/**
|
|
4939
|
-
* If it contains a dash, the element is a custom HTML webcomponent.
|
|
4940
|
-
*/
|
|
4941
|
-
Component33.includes('-',)
|
|
4942
|
-
) {
|
|
4943
|
-
return false;
|
|
4944
|
-
} else if (
|
|
4945
|
-
/**
|
|
4946
|
-
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
4947
|
-
*/
|
|
4948
|
-
lowercaseSVGElements.indexOf(Component33,) > -1 ||
|
|
4949
|
-
/**
|
|
4950
|
-
* If it contains a capital letter, it's an SVG component
|
|
4951
|
-
*/
|
|
4952
|
-
/[A-Z]/u.test(Component33,)
|
|
4953
|
-
) {
|
|
4954
|
-
return true;
|
|
4955
|
-
}
|
|
4956
|
-
return false;
|
|
4957
|
-
}
|
|
4958
5063
|
var dashKeys = {
|
|
4959
5064
|
offset: 'stroke-dashoffset',
|
|
4960
5065
|
array: 'stroke-dasharray',
|
|
@@ -5045,6 +5150,60 @@ function useSVGProps(props, visualState, _isStatic, Component33,) {
|
|
|
5045
5150
|
}
|
|
5046
5151
|
return visualProps;
|
|
5047
5152
|
}
|
|
5153
|
+
var lowercaseSVGElements = [
|
|
5154
|
+
'animate',
|
|
5155
|
+
'circle',
|
|
5156
|
+
'defs',
|
|
5157
|
+
'desc',
|
|
5158
|
+
'ellipse',
|
|
5159
|
+
'g',
|
|
5160
|
+
'image',
|
|
5161
|
+
'line',
|
|
5162
|
+
'filter',
|
|
5163
|
+
'marker',
|
|
5164
|
+
'mask',
|
|
5165
|
+
'metadata',
|
|
5166
|
+
'path',
|
|
5167
|
+
'pattern',
|
|
5168
|
+
'polygon',
|
|
5169
|
+
'polyline',
|
|
5170
|
+
'rect',
|
|
5171
|
+
'stop',
|
|
5172
|
+
'switch',
|
|
5173
|
+
'symbol',
|
|
5174
|
+
'svg',
|
|
5175
|
+
'text',
|
|
5176
|
+
'tspan',
|
|
5177
|
+
'use',
|
|
5178
|
+
'view',
|
|
5179
|
+
];
|
|
5180
|
+
function isSVGComponent(Component33,) {
|
|
5181
|
+
if (
|
|
5182
|
+
/**
|
|
5183
|
+
* If it's not a string, it's a custom React component. Currently we only support
|
|
5184
|
+
* HTML custom React components.
|
|
5185
|
+
*/
|
|
5186
|
+
typeof Component33 !== 'string' ||
|
|
5187
|
+
/**
|
|
5188
|
+
* If it contains a dash, the element is a custom HTML webcomponent.
|
|
5189
|
+
*/
|
|
5190
|
+
Component33.includes('-',)
|
|
5191
|
+
) {
|
|
5192
|
+
return false;
|
|
5193
|
+
} else if (
|
|
5194
|
+
/**
|
|
5195
|
+
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
5196
|
+
*/
|
|
5197
|
+
lowercaseSVGElements.indexOf(Component33,) > -1 ||
|
|
5198
|
+
/**
|
|
5199
|
+
* If it contains a capital letter, it's an SVG component
|
|
5200
|
+
*/
|
|
5201
|
+
/[A-Z]/u.test(Component33,)
|
|
5202
|
+
) {
|
|
5203
|
+
return true;
|
|
5204
|
+
}
|
|
5205
|
+
return false;
|
|
5206
|
+
}
|
|
5048
5207
|
function createUseRender(forwardMotionProps = false,) {
|
|
5049
5208
|
const useRender = (Component33, props, ref, {
|
|
5050
5209
|
latestValues,
|
|
@@ -7438,12 +7597,9 @@ function animateSingleValue(value, keyframes2, options,) {
|
|
|
7438
7597
|
motionValue$1.start(animateMotionValue('', motionValue$1, keyframes2, options,),);
|
|
7439
7598
|
return motionValue$1.animation;
|
|
7440
7599
|
}
|
|
7441
|
-
function isSVGElement(element,) {
|
|
7442
|
-
return element instanceof SVGElement && element.tagName !== 'svg';
|
|
7443
|
-
}
|
|
7444
7600
|
var borders = ['TopLeft', 'TopRight', 'BottomLeft', 'BottomRight',];
|
|
7445
7601
|
var numBorders = borders.length;
|
|
7446
|
-
var
|
|
7602
|
+
var asNumber2 = (value) => typeof value === 'string' ? parseFloat(value,) : value;
|
|
7447
7603
|
var isPx = (value) => typeof value === 'number' || px.test(value,);
|
|
7448
7604
|
function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOnlyMember,) {
|
|
7449
7605
|
if (shouldCrossfadeOpacity) {
|
|
@@ -7461,7 +7617,7 @@ function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOn
|
|
|
7461
7617
|
leadRadius || (leadRadius = 0);
|
|
7462
7618
|
const canMix = followRadius === 0 || leadRadius === 0 || isPx(followRadius,) === isPx(leadRadius,);
|
|
7463
7619
|
if (canMix) {
|
|
7464
|
-
target[borderLabel] = Math.max(mixNumber(
|
|
7620
|
+
target[borderLabel] = Math.max(mixNumber(asNumber2(followRadius,), asNumber2(leadRadius,), progress2,), 0,);
|
|
7465
7621
|
if (percent.test(leadRadius,) || percent.test(followRadius,)) {
|
|
7466
7622
|
target[borderLabel] += '%';
|
|
7467
7623
|
}
|
|
@@ -7811,7 +7967,7 @@ function createProjectionNode2({
|
|
|
7811
7967
|
*/
|
|
7812
7968
|
mount(instance,) {
|
|
7813
7969
|
if (this.instance) return;
|
|
7814
|
-
this.isSVG = isSVGElement(instance,);
|
|
7970
|
+
this.isSVG = isSVGElement(instance,) && !isSVGSVGElement(instance,);
|
|
7815
7971
|
this.instance = instance;
|
|
7816
7972
|
const {
|
|
7817
7973
|
layoutId,
|
|
@@ -7869,7 +8025,6 @@ function createProjectionNode2({
|
|
|
7869
8025
|
this.resumingFrom = this.resumeFrom;
|
|
7870
8026
|
this.resumingFrom.resumingFrom = void 0;
|
|
7871
8027
|
}
|
|
7872
|
-
this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged,);
|
|
7873
8028
|
const animationOptions = {
|
|
7874
8029
|
...getValueTransition(layoutTransition, 'layout',),
|
|
7875
8030
|
onPlay: onLayoutAnimationStart,
|
|
@@ -7880,6 +8035,7 @@ function createProjectionNode2({
|
|
|
7880
8035
|
animationOptions.type = false;
|
|
7881
8036
|
}
|
|
7882
8037
|
this.startAnimation(animationOptions,);
|
|
8038
|
+
this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged,);
|
|
7883
8039
|
} else {
|
|
7884
8040
|
if (!hasLayoutChanged) {
|
|
7885
8041
|
finishAnimation(this,);
|
|
@@ -8408,8 +8564,8 @@ function createProjectionNode2({
|
|
|
8408
8564
|
startAnimation(options,) {
|
|
8409
8565
|
var _a, _b, _c;
|
|
8410
8566
|
this.notifyListeners('animationStart',);
|
|
8411
|
-
(_a = this.currentAnimation) == null ? void 0 : _a.stop(
|
|
8412
|
-
(_c = (_b = this.resumingFrom) == null ? void 0 : _b.currentAnimation) == null ? void 0 : _c.stop(
|
|
8567
|
+
(_a = this.currentAnimation) == null ? void 0 : _a.stop();
|
|
8568
|
+
(_c = (_b = this.resumingFrom) == null ? void 0 : _b.currentAnimation) == null ? void 0 : _c.stop();
|
|
8413
8569
|
if (this.pendingAnimation) {
|
|
8414
8570
|
cancelFrame(this.pendingAnimation,);
|
|
8415
8571
|
this.pendingAnimation = void 0;
|
|
@@ -8453,7 +8609,7 @@ function createProjectionNode2({
|
|
|
8453
8609
|
finishAnimation() {
|
|
8454
8610
|
if (this.currentAnimation) {
|
|
8455
8611
|
this.mixTargetDelta && this.mixTargetDelta(animationTarget,);
|
|
8456
|
-
this.currentAnimation.stop(
|
|
8612
|
+
this.currentAnimation.stop();
|
|
8457
8613
|
}
|
|
8458
8614
|
this.completeAnimation();
|
|
8459
8615
|
}
|
|
@@ -8662,7 +8818,7 @@ function createProjectionNode2({
|
|
|
8662
8818
|
resetTree() {
|
|
8663
8819
|
this.root.nodes.forEach((node) => {
|
|
8664
8820
|
var _a;
|
|
8665
|
-
return (_a = node.currentAnimation) == null ? void 0 : _a.stop(
|
|
8821
|
+
return (_a = node.currentAnimation) == null ? void 0 : _a.stop();
|
|
8666
8822
|
},);
|
|
8667
8823
|
this.root.nodes.forEach(clearMeasurements,);
|
|
8668
8824
|
this.root.sharedNodes.clear();
|
|
@@ -9212,7 +9368,7 @@ var camelCaseAttributes = /* @__PURE__ */ new Set([
|
|
|
9212
9368
|
function renderSVG(element, renderState, _styleProp, projection,) {
|
|
9213
9369
|
renderHTML(element, renderState, void 0, projection,);
|
|
9214
9370
|
for (const key7 in renderState.attrs) {
|
|
9215
|
-
element.setAttribute(!camelCaseAttributes.has(key7,) ?
|
|
9371
|
+
element.setAttribute(!camelCaseAttributes.has(key7,) ? camelToDash2(key7,) : key7, renderState.attrs[key7],);
|
|
9216
9372
|
}
|
|
9217
9373
|
}
|
|
9218
9374
|
var SVGVisualElement = class extends DOMVisualElement {
|
|
@@ -9230,7 +9386,7 @@ var SVGVisualElement = class extends DOMVisualElement {
|
|
|
9230
9386
|
const defaultType = getDefaultValueType(key7,);
|
|
9231
9387
|
return defaultType ? defaultType.default || 0 : 0;
|
|
9232
9388
|
}
|
|
9233
|
-
key7 = !camelCaseAttributes.has(key7,) ?
|
|
9389
|
+
key7 = !camelCaseAttributes.has(key7,) ? camelToDash2(key7,) : key7;
|
|
9234
9390
|
return instance.getAttribute(key7,);
|
|
9235
9391
|
}
|
|
9236
9392
|
scrapeMotionValuesFromProps(props, prevProps, visualElement,) {
|
|
@@ -9291,7 +9447,7 @@ function getElementSize(target, borderBoxSize,) {
|
|
|
9291
9447
|
width: inlineSize,
|
|
9292
9448
|
height: blockSize,
|
|
9293
9449
|
};
|
|
9294
|
-
} else if (target
|
|
9450
|
+
} else if (isSVGElement(target,) && 'getBBox' in target) {
|
|
9295
9451
|
return target.getBBox();
|
|
9296
9452
|
} else {
|
|
9297
9453
|
return {
|
|
@@ -9430,7 +9586,7 @@ function calcInset(element, container,) {
|
|
|
9430
9586
|
};
|
|
9431
9587
|
let current2 = element;
|
|
9432
9588
|
while (current2 && current2 !== container) {
|
|
9433
|
-
if (current2
|
|
9589
|
+
if (isHTMLElement(current2,)) {
|
|
9434
9590
|
inset2.x += current2.offsetLeft;
|
|
9435
9591
|
inset2.y += current2.offsetTop;
|
|
9436
9592
|
current2 = current2.offsetParent;
|
|
@@ -9590,8 +9746,8 @@ function measure(container, target = container, info,) {
|
|
|
9590
9746
|
}
|
|
9591
9747
|
function createOnScrollHandler(element, onScroll, info, options = {},) {
|
|
9592
9748
|
return {
|
|
9593
|
-
measure: () =>
|
|
9594
|
-
|
|
9749
|
+
measure: (time2) => {
|
|
9750
|
+
measure(element, options.target, info,);
|
|
9595
9751
|
updateScrollInfo(element, info, time2,);
|
|
9596
9752
|
if (options.offset || options.target) {
|
|
9597
9753
|
resolveOffsets(element, info, options,);
|
|
@@ -9619,21 +9775,17 @@ function scrollInfo(onScroll, {
|
|
|
9619
9775
|
containerHandlers.add(containerHandler,);
|
|
9620
9776
|
if (!scrollListeners.has(container,)) {
|
|
9621
9777
|
const measureAll = () => {
|
|
9622
|
-
for (const handler of containerHandlers) handler.measure();
|
|
9623
|
-
};
|
|
9624
|
-
const updateAll = () => {
|
|
9625
9778
|
for (const handler of containerHandlers) {
|
|
9626
|
-
handler.
|
|
9779
|
+
handler.measure(frameData.timestamp,);
|
|
9627
9780
|
}
|
|
9781
|
+
frame.preUpdate(notifyAll2,);
|
|
9628
9782
|
};
|
|
9629
9783
|
const notifyAll2 = () => {
|
|
9630
|
-
for (const handler of containerHandlers)
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
frame.read(measureAll,);
|
|
9634
|
-
frame.read(updateAll,);
|
|
9635
|
-
frame.preUpdate(notifyAll2,);
|
|
9784
|
+
for (const handler of containerHandlers) {
|
|
9785
|
+
handler.notify();
|
|
9786
|
+
}
|
|
9636
9787
|
};
|
|
9788
|
+
const listener2 = () => frame.read(measureAll,);
|
|
9637
9789
|
scrollListeners.set(container, listener2,);
|
|
9638
9790
|
const target = getEventTarget(container,);
|
|
9639
9791
|
window.addEventListener('resize', listener2, {
|
|
@@ -9837,55 +9989,47 @@ function useMotionTemplate(fragments, ...values) {
|
|
|
9837
9989
|
}
|
|
9838
9990
|
return useCombineMotionValues(values.filter(isMotionValue,), buildValue,);
|
|
9839
9991
|
}
|
|
9840
|
-
function
|
|
9992
|
+
function useComputed(compute,) {
|
|
9993
|
+
collectMotionValues.current = [];
|
|
9994
|
+
compute();
|
|
9995
|
+
const value = useCombineMotionValues(collectMotionValues.current, compute,);
|
|
9996
|
+
collectMotionValues.current = void 0;
|
|
9997
|
+
return value;
|
|
9998
|
+
}
|
|
9999
|
+
function useTransform(input, inputRangeOrTransformer, outputRange, options,) {
|
|
10000
|
+
if (typeof input === 'function') {
|
|
10001
|
+
return useComputed(input,);
|
|
10002
|
+
}
|
|
10003
|
+
const transformer = typeof inputRangeOrTransformer === 'function'
|
|
10004
|
+
? inputRangeOrTransformer
|
|
10005
|
+
: transform(inputRangeOrTransformer, outputRange, options,);
|
|
10006
|
+
return Array.isArray(input,) ? useListTransform(input, transformer,) : useListTransform([input,], ([latest,],) => transformer(latest,),);
|
|
10007
|
+
}
|
|
10008
|
+
function useListTransform(values, transformer,) {
|
|
10009
|
+
const latest = useConstant(() => []);
|
|
10010
|
+
return useCombineMotionValues(values, () => {
|
|
10011
|
+
latest.length = 0;
|
|
10012
|
+
const numValues = values.length;
|
|
10013
|
+
for (let i = 0; i < numValues; i++) {
|
|
10014
|
+
latest[i] = values[i].get();
|
|
10015
|
+
}
|
|
10016
|
+
return transformer(latest,);
|
|
10017
|
+
},);
|
|
10018
|
+
}
|
|
10019
|
+
function useSpring(source, options = {},) {
|
|
9841
10020
|
const {
|
|
9842
10021
|
isStatic,
|
|
9843
10022
|
} = useContext(MotionConfigContext,);
|
|
9844
|
-
const
|
|
9845
|
-
|
|
9846
|
-
|
|
9847
|
-
|
|
9848
|
-
const
|
|
9849
|
-
const latestSetter = useRef3(noop,);
|
|
9850
|
-
const startAnimation2 = () => {
|
|
9851
|
-
stopAnimation2();
|
|
9852
|
-
activeSpringAnimation.current = new JSAnimation({
|
|
9853
|
-
keyframes: [asNumber2(value.get(),), asNumber2(latestValue.current,),],
|
|
9854
|
-
velocity: value.getVelocity(),
|
|
9855
|
-
type: 'spring',
|
|
9856
|
-
restDelta: 1e-3,
|
|
9857
|
-
restSpeed: 0.01,
|
|
9858
|
-
...config,
|
|
9859
|
-
onUpdate: latestSetter.current,
|
|
9860
|
-
},);
|
|
9861
|
-
};
|
|
9862
|
-
const stopAnimation2 = () => {
|
|
9863
|
-
if (activeSpringAnimation.current) {
|
|
9864
|
-
activeSpringAnimation.current.stop();
|
|
9865
|
-
}
|
|
9866
|
-
};
|
|
10023
|
+
const getFromSource = () => isMotionValue(source,) ? source.get() : source;
|
|
10024
|
+
if (isStatic) {
|
|
10025
|
+
return useTransform(getFromSource,);
|
|
10026
|
+
}
|
|
10027
|
+
const value = useMotionValue(getFromSource(),);
|
|
9867
10028
|
useInsertionEffect(() => {
|
|
9868
|
-
return value
|
|
9869
|
-
|
|
9870
|
-
latestValue.current = v;
|
|
9871
|
-
latestSetter.current = (latest) => set(parseValue(latest, unit,),);
|
|
9872
|
-
frame.postRender(startAnimation2,);
|
|
9873
|
-
return value.get();
|
|
9874
|
-
}, stopAnimation2,);
|
|
9875
|
-
}, [JSON.stringify(config,),],);
|
|
9876
|
-
useIsomorphicLayoutEffect(() => {
|
|
9877
|
-
if (isMotionValue(source,)) {
|
|
9878
|
-
return source.on('change', (v) => value.set(parseValue(v, unit,),),);
|
|
9879
|
-
}
|
|
9880
|
-
}, [value, unit,],);
|
|
10029
|
+
return attachSpring(value, source, options,);
|
|
10030
|
+
}, [value, JSON.stringify(options,),],);
|
|
9881
10031
|
return value;
|
|
9882
10032
|
}
|
|
9883
|
-
function parseValue(v, unit,) {
|
|
9884
|
-
return unit ? v + unit : v;
|
|
9885
|
-
}
|
|
9886
|
-
function asNumber2(v,) {
|
|
9887
|
-
return typeof v === 'number' ? v : parseFloat(v,);
|
|
9888
|
-
}
|
|
9889
10033
|
function useAnimationFrame(callback,) {
|
|
9890
10034
|
const initialTimestamp = useRef3(0,);
|
|
9891
10035
|
const {
|
|
@@ -9909,33 +10053,6 @@ function useTime() {
|
|
|
9909
10053
|
useAnimationFrame((t) => time2.set(t,));
|
|
9910
10054
|
return time2;
|
|
9911
10055
|
}
|
|
9912
|
-
function useComputed(compute,) {
|
|
9913
|
-
collectMotionValues.current = [];
|
|
9914
|
-
compute();
|
|
9915
|
-
const value = useCombineMotionValues(collectMotionValues.current, compute,);
|
|
9916
|
-
collectMotionValues.current = void 0;
|
|
9917
|
-
return value;
|
|
9918
|
-
}
|
|
9919
|
-
function useTransform(input, inputRangeOrTransformer, outputRange, options,) {
|
|
9920
|
-
if (typeof input === 'function') {
|
|
9921
|
-
return useComputed(input,);
|
|
9922
|
-
}
|
|
9923
|
-
const transformer = typeof inputRangeOrTransformer === 'function'
|
|
9924
|
-
? inputRangeOrTransformer
|
|
9925
|
-
: transform(inputRangeOrTransformer, outputRange, options,);
|
|
9926
|
-
return Array.isArray(input,) ? useListTransform(input, transformer,) : useListTransform([input,], ([latest,],) => transformer(latest,),);
|
|
9927
|
-
}
|
|
9928
|
-
function useListTransform(values, transformer,) {
|
|
9929
|
-
const latest = useConstant(() => []);
|
|
9930
|
-
return useCombineMotionValues(values, () => {
|
|
9931
|
-
latest.length = 0;
|
|
9932
|
-
const numValues = values.length;
|
|
9933
|
-
for (let i = 0; i < numValues; i++) {
|
|
9934
|
-
latest[i] = values[i].get();
|
|
9935
|
-
}
|
|
9936
|
-
return transformer(latest,);
|
|
9937
|
-
},);
|
|
9938
|
-
}
|
|
9939
10056
|
function useVelocity(value,) {
|
|
9940
10057
|
const velocity = useMotionValue(value.getVelocity(),);
|
|
9941
10058
|
const updateVelocity = () => {
|
|
@@ -10359,7 +10476,7 @@ function createDOMVisualElement(element,) {
|
|
|
10359
10476
|
latestValues: {},
|
|
10360
10477
|
},
|
|
10361
10478
|
};
|
|
10362
|
-
const node = isSVGElement(element,) ? new SVGVisualElement(options,) : new HTMLVisualElement(options,);
|
|
10479
|
+
const node = isSVGElement(element,) && !isSVGSVGElement(element,) ? new SVGVisualElement(options,) : new HTMLVisualElement(options,);
|
|
10363
10480
|
node.mount(element,);
|
|
10364
10481
|
visualElementStore.set(element, node,);
|
|
10365
10482
|
}
|
|
@@ -11104,7 +11221,7 @@ function stagger(duration = 0.1, {
|
|
|
11104
11221
|
};
|
|
11105
11222
|
}
|
|
11106
11223
|
|
|
11107
|
-
// /:https://app.framerstatic.com/framer.
|
|
11224
|
+
// /:https://app.framerstatic.com/framer.C2MZBAEL.mjs
|
|
11108
11225
|
import { lazy as ReactLazy, } from 'react';
|
|
11109
11226
|
import React4 from 'react';
|
|
11110
11227
|
import { startTransition as startTransition2, } from 'react';
|
|
@@ -11112,6 +11229,7 @@ import { Suspense as Suspense2, } from 'react';
|
|
|
11112
11229
|
import { memo as memo2, } from 'react';
|
|
11113
11230
|
import ReactDOM from 'react-dom';
|
|
11114
11231
|
import { createRef, } from 'react';
|
|
11232
|
+
import { useTransition, } from 'react';
|
|
11115
11233
|
import { cloneElement as cloneElement32, } from 'react';
|
|
11116
11234
|
var __unframerNavigator2 = typeof window !== 'undefined' ? navigator : void 0;
|
|
11117
11235
|
var require_hsluv = __commonJS({
|
|
@@ -12273,9 +12391,9 @@ function useCurrentRouteId() {
|
|
|
12273
12391
|
}
|
|
12274
12392
|
function useOnRouteChange(cb,) {
|
|
12275
12393
|
const currentRoute = useCurrentRoute();
|
|
12276
|
-
const
|
|
12277
|
-
if (isEqual(lastRoute, currentRoute,) || !currentRoute) return;
|
|
12278
|
-
|
|
12394
|
+
const lastRoute = React4.useRef(currentRoute,);
|
|
12395
|
+
if (isEqual(lastRoute.current, currentRoute,) || !currentRoute) return;
|
|
12396
|
+
lastRoute.current = currentRoute;
|
|
12279
12397
|
cb(currentRoute,);
|
|
12280
12398
|
}
|
|
12281
12399
|
function useRoute(routeId,) {
|
|
@@ -12344,7 +12462,7 @@ function isNumber2(value,) {
|
|
|
12344
12462
|
function isArray(value,) {
|
|
12345
12463
|
return Array.isArray(value,);
|
|
12346
12464
|
}
|
|
12347
|
-
function
|
|
12465
|
+
function isObject2(value,) {
|
|
12348
12466
|
return value !== null && typeof value === 'object' && !isArray(value,);
|
|
12349
12467
|
}
|
|
12350
12468
|
function isUndefined(value,) {
|
|
@@ -12360,7 +12478,7 @@ function isValidDate(value,) {
|
|
|
12360
12478
|
return value instanceof Date && !Number.isNaN(value.getTime(),);
|
|
12361
12479
|
}
|
|
12362
12480
|
function isGenerator2(value,) {
|
|
12363
|
-
return
|
|
12481
|
+
return isObject2(value,) && isFunction(value.return,);
|
|
12364
12482
|
}
|
|
12365
12483
|
var noop2 = () => {};
|
|
12366
12484
|
var isWindow = typeof window !== 'undefined';
|
|
@@ -12462,9 +12580,14 @@ function yieldUnlessUrgent(options,) {
|
|
|
12462
12580
|
function interactionResponse(options,) {
|
|
12463
12581
|
return new Promise((resolve) => {
|
|
12464
12582
|
setTimeout(resolve, 100,);
|
|
12465
|
-
frame.read(
|
|
12466
|
-
|
|
12467
|
-
|
|
12583
|
+
frame.read(
|
|
12584
|
+
() => {
|
|
12585
|
+
void schedulerYield(options,).then(resolve,);
|
|
12586
|
+
},
|
|
12587
|
+
false,
|
|
12588
|
+
// In some cases, interactionResponse might be called in a rAF. This means, we should right away call `schedulerYield`, as the next paint follows immediately.
|
|
12589
|
+
true,
|
|
12590
|
+
);
|
|
12468
12591
|
},);
|
|
12469
12592
|
}
|
|
12470
12593
|
function schedulerYield(options,) {
|
|
@@ -13424,7 +13547,7 @@ async function pushRouteState(routeId, route, {
|
|
|
13424
13547
|
}
|
|
13425
13548
|
function isHistoryState(data2,) {
|
|
13426
13549
|
const routeIdKey = 'routeId';
|
|
13427
|
-
return
|
|
13550
|
+
return isObject2(data2,) && isString(data2[routeIdKey],);
|
|
13428
13551
|
}
|
|
13429
13552
|
function replaceHistoryState(data2, url, ignoreReplaceStateWrapper = false,) {
|
|
13430
13553
|
performance.mark('framer-history-replace',);
|
|
@@ -13512,7 +13635,7 @@ function usePopStateHandler(currentRouteId, setCurrentRouteId,) {
|
|
|
13512
13635
|
((_a = window.navigation) == null ? void 0 : _a.transition) &&
|
|
13513
13636
|
((_c = (_b = window.navigation) == null ? void 0 : _b.transition) == null ? void 0 : _c.navigationType) !== 'traverse'
|
|
13514
13637
|
) return;
|
|
13515
|
-
if (!
|
|
13638
|
+
if (!isObject2(state,)) return;
|
|
13516
13639
|
const {
|
|
13517
13640
|
routeId,
|
|
13518
13641
|
hash: hash2,
|
|
@@ -13530,7 +13653,7 @@ function usePopStateHandler(currentRouteId, setCurrentRouteId,) {
|
|
|
13530
13653
|
routeId,
|
|
13531
13654
|
isString(localeId,) ? localeId : void 0,
|
|
13532
13655
|
isString(hash2,) ? hash2 : void 0,
|
|
13533
|
-
|
|
13656
|
+
isObject2(pathVariables,) ? pathVariables : void 0,
|
|
13534
13657
|
true,
|
|
13535
13658
|
nextRender,
|
|
13536
13659
|
false,
|
|
@@ -13578,7 +13701,7 @@ function getHashForRoute(hash2, route, hashVariables,) {
|
|
|
13578
13701
|
const resolvedHash = getRouteElementId(route, hash2,);
|
|
13579
13702
|
if (!resolvedHash) return void 0;
|
|
13580
13703
|
const variables = Object.assign({}, route == null ? void 0 : route.elements, hashVariables,);
|
|
13581
|
-
return resolvedHash.replace(pathVariablesRegExp, (m2, p1,) =>
|
|
13704
|
+
return resolvedHash.replace(pathVariablesRegExp, (m2, p1,) => variables[p1] ?? m2,);
|
|
13582
13705
|
}
|
|
13583
13706
|
function getPathForRoute(route, {
|
|
13584
13707
|
currentRoutePath,
|
|
@@ -14430,16 +14553,6 @@ function getVariantsFromServerTiming() {
|
|
|
14430
14553
|
}
|
|
14431
14554
|
return new URLSearchParams();
|
|
14432
14555
|
}
|
|
14433
|
-
var cookieValueRegex = /[^|; ]?framerAbTestingOverrides=(?<value>[^;]*)[;|$]?/u;
|
|
14434
|
-
function getVariantsFromCookie() {
|
|
14435
|
-
var _a;
|
|
14436
|
-
let value = '';
|
|
14437
|
-
try {
|
|
14438
|
-
const matches = cookieValueRegex.exec(document.cookie,);
|
|
14439
|
-
value = ((_a = matches == null ? void 0 : matches.groups) == null ? void 0 : _a.value) ?? '';
|
|
14440
|
-
} catch {}
|
|
14441
|
-
return new URLSearchParams(value,);
|
|
14442
|
-
}
|
|
14443
14556
|
function patchRoute(routes, abTestId, abTestingVariantId,) {
|
|
14444
14557
|
const route = routes[abTestingVariantId];
|
|
14445
14558
|
if (!route) return;
|
|
@@ -14508,7 +14621,6 @@ function patchRoutesForABTesting(routes, initialRouteId,) {
|
|
|
14508
14621
|
}
|
|
14509
14622
|
}
|
|
14510
14623
|
patchRoutesFromSearchParams(routes, getVariantsFromServerTiming(),);
|
|
14511
|
-
patchRoutesFromSearchParams(routes, getVariantsFromCookie(),);
|
|
14512
14624
|
removeRoutesVariants(routes,);
|
|
14513
14625
|
return resolvedInitialRouteId;
|
|
14514
14626
|
}
|
|
@@ -14821,6 +14933,27 @@ function Point(x, y,) {
|
|
|
14821
14933
|
}
|
|
14822
14934
|
Point2.sortClockwise = sortClockwise;
|
|
14823
14935
|
})(Point || (Point = {}),);
|
|
14936
|
+
function assert(condition, ...msg) {
|
|
14937
|
+
var _a, _b;
|
|
14938
|
+
if (condition) return;
|
|
14939
|
+
const e = Error('Assertion Error' + (msg.length > 0 ? ': ' + msg.join(' ',) : ''),);
|
|
14940
|
+
if (e.stack) {
|
|
14941
|
+
try {
|
|
14942
|
+
const lines = e.stack.split('\n',);
|
|
14943
|
+
if ((_a = lines[1]) == null ? void 0 : _a.includes('assert',)) {
|
|
14944
|
+
lines.splice(1, 1,);
|
|
14945
|
+
e.stack = lines.join('\n',);
|
|
14946
|
+
} else if ((_b = lines[0]) == null ? void 0 : _b.includes('assert',)) {
|
|
14947
|
+
lines.splice(0, 1,);
|
|
14948
|
+
e.stack = lines.join('\n',);
|
|
14949
|
+
}
|
|
14950
|
+
} catch {}
|
|
14951
|
+
}
|
|
14952
|
+
throw e;
|
|
14953
|
+
}
|
|
14954
|
+
function assertNever(x, error,) {
|
|
14955
|
+
throw error || new Error(x ? `Unexpected value: ${x}` : 'Application entered invalid state',);
|
|
14956
|
+
}
|
|
14824
14957
|
var BezierDefaults = {
|
|
14825
14958
|
curve: 'ease',
|
|
14826
14959
|
duration: 1,
|
|
@@ -14854,6 +14987,7 @@ var BezierAnimator = class {
|
|
|
14854
14987
|
} = this.options;
|
|
14855
14988
|
this.progress += delta / duration;
|
|
14856
14989
|
const value = this.unitBezier.solve(this.progress, this.solveEpsilon(duration,),);
|
|
14990
|
+
assert(this.interpolator !== void 0, 'setFrom() or setTo() must be called before next()',);
|
|
14857
14991
|
this.current = this.interpolator(value,);
|
|
14858
14992
|
return this.current;
|
|
14859
14993
|
},);
|
|
@@ -15035,7 +15169,7 @@ var Interpolation = {
|
|
|
15035
15169
|
var NumberInterpolation = {
|
|
15036
15170
|
interpolate(from, to,) {
|
|
15037
15171
|
[from, to,] = Interpolation.handleUndefined(from, to,);
|
|
15038
|
-
const a1 =
|
|
15172
|
+
const a1 = from;
|
|
15039
15173
|
const b1 = to - a1;
|
|
15040
15174
|
return (progress2) => {
|
|
15041
15175
|
const value = a1 + b1 * progress2;
|
|
@@ -15188,6 +15322,7 @@ var SpringAnimator = class {
|
|
|
15188
15322
|
}
|
|
15189
15323
|
next(delta,) {
|
|
15190
15324
|
this.state = this.integrator.integrateState(this.state, delta,);
|
|
15325
|
+
assert(this.interpolator !== void 0, 'setFrom() or setTo() must be called before next()',);
|
|
15191
15326
|
const value = this.interpolator(this.progress(),);
|
|
15192
15327
|
return value;
|
|
15193
15328
|
}
|
|
@@ -15204,12 +15339,14 @@ var SpringAnimator = class {
|
|
|
15204
15339
|
this.state.v = velocity;
|
|
15205
15340
|
}
|
|
15206
15341
|
progress() {
|
|
15342
|
+
assert(this.difference !== void 0, 'setTo() must be called before progress()',);
|
|
15207
15343
|
return 1 - this.state.x / this.difference;
|
|
15208
15344
|
}
|
|
15209
15345
|
// The spring always settles to 0, so we create an interpolation to the destination
|
|
15210
15346
|
// And calculate the progress based on the current state and the span of the interpolation
|
|
15211
15347
|
// This lets us integrate over state.x, even though Value is generic
|
|
15212
15348
|
setTo(value,) {
|
|
15349
|
+
assert(this.current !== void 0, 'setFrom() must be called before setTo()',);
|
|
15213
15350
|
this.destination = value;
|
|
15214
15351
|
this.difference = this.interpolation.difference(this.destination, this.current,);
|
|
15215
15352
|
this.state.x = this.difference;
|
|
@@ -15744,7 +15881,7 @@ function rgbToHsv(r, g, b,) {
|
|
|
15744
15881
|
const max = Math.max(r, g, b,);
|
|
15745
15882
|
const min = Math.min(r, g, b,);
|
|
15746
15883
|
const d = max - min;
|
|
15747
|
-
let h;
|
|
15884
|
+
let h = 0;
|
|
15748
15885
|
const s = max === 0 ? 0 : d / max;
|
|
15749
15886
|
const v = max;
|
|
15750
15887
|
if (max === min) {
|
|
@@ -16169,7 +16306,7 @@ function convertP3ToRgb(color2,) {
|
|
|
16169
16306
|
}
|
|
16170
16307
|
var P3Color = class _P3Color {
|
|
16171
16308
|
constructor(color2,) {
|
|
16172
|
-
__publicField(this, 'format',);
|
|
16309
|
+
__publicField(this, 'format', 'p3',);
|
|
16173
16310
|
__publicField(this, 'r',);
|
|
16174
16311
|
__publicField(this, 'g',);
|
|
16175
16312
|
__publicField(this, 'b',);
|
|
@@ -16332,7 +16469,7 @@ var Color = /* @__PURE__ */ (() => {
|
|
|
16332
16469
|
return false;
|
|
16333
16470
|
};
|
|
16334
16471
|
Color2.isColorObject = (color2) => {
|
|
16335
|
-
return
|
|
16472
|
+
return isObject2(color2,) && typeof color2.r === 'number' && typeof color2.g === 'number' && typeof color2.b === 'number' &&
|
|
16336
16473
|
typeof color2.h === 'number' && typeof color2.s === 'number' && typeof color2.l === 'number' && typeof color2.a === 'number' &&
|
|
16337
16474
|
typeof color2.roundA === 'number' && typeof color2.format === 'string';
|
|
16338
16475
|
};
|
|
@@ -16859,9 +16996,12 @@ var PrecalculatedAnimator = class {
|
|
|
16859
16996
|
this.totalTime = this.values.length * delta;
|
|
16860
16997
|
}
|
|
16861
16998
|
indexForTime(time2,) {
|
|
16999
|
+
assert(this.values !== void 0, 'values must be set before calling indexForTime()',);
|
|
17000
|
+
assert(this.totalTime !== void 0, 'totalTime must be set before calling indexForTime()',);
|
|
16862
17001
|
return Math.max(0, Math.min(this.values.length - 1, Math.round(this.values.length * (time2 / this.totalTime),) - 1,),);
|
|
16863
17002
|
}
|
|
16864
17003
|
valueForTime(time2,) {
|
|
17004
|
+
assert(this.values !== void 0, 'values must be set before calling valueForTime()',);
|
|
16865
17005
|
const index = this.indexForTime(time2,);
|
|
16866
17006
|
const value = this.values[index];
|
|
16867
17007
|
return value;
|
|
@@ -16875,6 +17015,7 @@ var PrecalculatedAnimator = class {
|
|
|
16875
17015
|
this.preCalculate();
|
|
16876
17016
|
}
|
|
16877
17017
|
isReady() {
|
|
17018
|
+
assert(this.totalTime !== void 0, 'totalTime must be set before calling isReady()',);
|
|
16878
17019
|
return this.values !== void 0 && this.values.length > 0 && this.totalTime > 0;
|
|
16879
17020
|
}
|
|
16880
17021
|
next(delta,) {
|
|
@@ -16882,11 +17023,14 @@ var PrecalculatedAnimator = class {
|
|
|
16882
17023
|
return this.valueForTime(this.currentTime,);
|
|
16883
17024
|
}
|
|
16884
17025
|
isFinished() {
|
|
17026
|
+
assert(this.totalTime !== void 0, 'totalTime must be set before calling isFinished()',);
|
|
16885
17027
|
return this.totalTime === 0 || this.currentTime >= this.totalTime;
|
|
16886
17028
|
}
|
|
16887
17029
|
get endValue() {
|
|
16888
17030
|
this.preCalculate();
|
|
17031
|
+
assert(this.totalTime !== void 0, 'expecting totalTime to be set after calling preCalculate()',);
|
|
16889
17032
|
const value = this.valueForTime(this.totalTime,);
|
|
17033
|
+
assert(this.values !== void 0, 'expecting values to be set after calling preCalculate()',);
|
|
16890
17034
|
return this.values.length > 0 ? value : this.animator.next(0,);
|
|
16891
17035
|
}
|
|
16892
17036
|
};
|
|
@@ -17226,10 +17370,10 @@ var FramerAnimation = class _FramerAnimation {
|
|
|
17226
17370
|
__publicField(this, 'onfinish',);
|
|
17227
17371
|
__publicField(this, 'oncancel',);
|
|
17228
17372
|
__publicField(this, 'readyPromise', Promise.resolve(),);
|
|
17229
|
-
__publicField(this, 'readyResolve',);
|
|
17230
|
-
__publicField(this, 'finishedPromise',);
|
|
17231
|
-
__publicField(this, 'finishedResolve',);
|
|
17232
|
-
__publicField(this, 'finishedReject',);
|
|
17373
|
+
__publicField(this, 'readyResolve', null,);
|
|
17374
|
+
__publicField(this, 'finishedPromise', Promise.resolve(),);
|
|
17375
|
+
__publicField(this, 'finishedResolve', null,);
|
|
17376
|
+
__publicField(this, 'finishedReject', null,);
|
|
17233
17377
|
this.resetFinishedPromise();
|
|
17234
17378
|
const deprecatedAnimationOptions = {
|
|
17235
17379
|
...DefaultDeprecatedAnimationOptions,
|
|
@@ -17539,27 +17683,6 @@ var animate2 = /* @__PURE__ */ (() => {
|
|
|
17539
17683
|
};
|
|
17540
17684
|
return animate3;
|
|
17541
17685
|
})();
|
|
17542
|
-
function assert(condition, ...msg) {
|
|
17543
|
-
var _a, _b;
|
|
17544
|
-
if (condition) return;
|
|
17545
|
-
const e = Error('Assertion Error' + (msg.length > 0 ? ': ' + msg.join(' ',) : ''),);
|
|
17546
|
-
if (e.stack) {
|
|
17547
|
-
try {
|
|
17548
|
-
const lines = e.stack.split('\n',);
|
|
17549
|
-
if ((_a = lines[1]) == null ? void 0 : _a.includes('assert',)) {
|
|
17550
|
-
lines.splice(1, 1,);
|
|
17551
|
-
e.stack = lines.join('\n',);
|
|
17552
|
-
} else if ((_b = lines[0]) == null ? void 0 : _b.includes('assert',)) {
|
|
17553
|
-
lines.splice(0, 1,);
|
|
17554
|
-
e.stack = lines.join('\n',);
|
|
17555
|
-
}
|
|
17556
|
-
} catch {}
|
|
17557
|
-
}
|
|
17558
|
-
throw e;
|
|
17559
|
-
}
|
|
17560
|
-
function assertNever(x, error,) {
|
|
17561
|
-
throw error || new Error(x ? `Unexpected value: ${x}` : 'Application entered invalid state',);
|
|
17562
|
-
}
|
|
17563
17686
|
var LayoutIdContext = /* @__PURE__ */ React4.createContext({
|
|
17564
17687
|
getLayoutId: (args) => null,
|
|
17565
17688
|
persistLayoutIdCache: () => {},
|
|
@@ -20898,7 +21021,7 @@ function injectComponentCSSRules() {
|
|
|
20898
21021
|
}
|
|
20899
21022
|
}
|
|
20900
21023
|
function isReactComponent(component,) {
|
|
20901
|
-
return
|
|
21024
|
+
return isObject2(component,) || isFunction(component,);
|
|
20902
21025
|
}
|
|
20903
21026
|
var optionalKey = 'optional';
|
|
20904
21027
|
function controlIsOptional(control,) {
|
|
@@ -20928,14 +21051,14 @@ function getControlDefaultValue(control,) {
|
|
|
20928
21051
|
case 'number':
|
|
20929
21052
|
return isNumber2(control.defaultValue,) ? control.defaultValue : void 0;
|
|
20930
21053
|
case 'transition':
|
|
20931
|
-
return
|
|
21054
|
+
return isObject2(control.defaultValue,) ? control.defaultValue : void 0;
|
|
20932
21055
|
case 'border':
|
|
20933
|
-
return
|
|
21056
|
+
return isObject2(control.defaultValue,) ? control.defaultValue : void 0;
|
|
20934
21057
|
case 'font':
|
|
20935
|
-
return
|
|
21058
|
+
return isObject2(control.defaultValue,) ? control.defaultValue : void 0;
|
|
20936
21059
|
case 'object': {
|
|
20937
|
-
const value =
|
|
20938
|
-
if (
|
|
21060
|
+
const value = isObject2(control.defaultValue,) ? control.defaultValue : {};
|
|
21061
|
+
if (isObject2(control.controls,)) {
|
|
20939
21062
|
applyControlDefaultsToDefaultProps(value, control.controls,);
|
|
20940
21063
|
}
|
|
20941
21064
|
return value;
|
|
@@ -20979,7 +21102,7 @@ function applyControlDefaultsToDefaultProps(defaultProps, controls,) {
|
|
|
20979
21102
|
}
|
|
20980
21103
|
}
|
|
20981
21104
|
function getDefaultProps(component,) {
|
|
20982
|
-
if (
|
|
21105
|
+
if (isObject2(component.defaultProps,)) {
|
|
20983
21106
|
return component.defaultProps;
|
|
20984
21107
|
}
|
|
20985
21108
|
const defaultProps = {};
|
|
@@ -23320,7 +23443,7 @@ function useMeasureLayout(props, ref, getChildren = () => [], options = {},) {
|
|
|
23320
23443
|
const {
|
|
23321
23444
|
skipHook = false,
|
|
23322
23445
|
} = options;
|
|
23323
|
-
const inCodeComponent =
|
|
23446
|
+
const inCodeComponent = useContext(ComponentContainerContext,);
|
|
23324
23447
|
const onCanvas = RenderTarget.current() === RenderTarget.canvas;
|
|
23325
23448
|
useIsomorphicLayoutEffect2(() => {
|
|
23326
23449
|
if (!onCanvas || inCodeComponent || skipHook) {
|
|
@@ -23609,7 +23732,7 @@ var LinearGradient = {
|
|
|
23609
23732
|
* @param value -
|
|
23610
23733
|
*/
|
|
23611
23734
|
isLinearGradient: (value) => {
|
|
23612
|
-
return
|
|
23735
|
+
return isObject2(value,) && linearGradientKeys.every((key7) => key7 in value) &&
|
|
23613
23736
|
(isSimpleGradient(value,) || isMultiStopGradient(value,));
|
|
23614
23737
|
},
|
|
23615
23738
|
/** @internal */
|
|
@@ -23633,7 +23756,7 @@ var RadialGradient = {
|
|
|
23633
23756
|
* @public
|
|
23634
23757
|
*/
|
|
23635
23758
|
isRadialGradient: (value) => {
|
|
23636
|
-
return
|
|
23759
|
+
return isObject2(value,) && radialGradientKeys.every((key7) => key7 in value) &&
|
|
23637
23760
|
(isSimpleGradient(value,) || isMultiStopGradient(value,));
|
|
23638
23761
|
},
|
|
23639
23762
|
/** @internal */
|
|
@@ -23873,7 +23996,7 @@ function useStyleAndRect(props,) {
|
|
|
23873
23996
|
React4.useInsertionEffect(() => {
|
|
23874
23997
|
injectComponentCSSRules();
|
|
23875
23998
|
}, [],);
|
|
23876
|
-
const inCodeComponent =
|
|
23999
|
+
const inCodeComponent = useContext(ComponentContainerContext,);
|
|
23877
24000
|
const {
|
|
23878
24001
|
style: style2,
|
|
23879
24002
|
_initialStyle,
|
|
@@ -24047,7 +24170,7 @@ var VisibleFrame = /* @__PURE__ */ forwardRef(function VisibleFrame2(props, forw
|
|
|
24047
24170
|
}
|
|
24048
24171
|
useMeasureLayout(props, ref,);
|
|
24049
24172
|
const backgroundImage = backgroundImageFromProps(props,);
|
|
24050
|
-
const inCodeComponent =
|
|
24173
|
+
const inCodeComponent = useContext(ComponentContainerContext,);
|
|
24051
24174
|
const parentSize = resolveParentSize(propsWithOverrides, unwrappedProps, rect, inCodeComponent,);
|
|
24052
24175
|
const wrappedContent = useProvideParentSize(
|
|
24053
24176
|
/* @__PURE__ */ jsxs(Fragment, {
|
|
@@ -24263,7 +24386,7 @@ var SharedLayoutRoot = class extends Component2 {
|
|
|
24263
24386
|
getSnapshotBeforeUpdate() {
|
|
24264
24387
|
var _a;
|
|
24265
24388
|
if (!this.scheduledPromotion || !this.lead || !this.follow) return null;
|
|
24266
|
-
const needsReset =
|
|
24389
|
+
const needsReset = ((_a = this.lead) == null ? void 0 : _a.layoutMaybeMutated) && !this.shouldAnimate;
|
|
24267
24390
|
this.lead.projectionNodes.forEach((projectionNode) => {
|
|
24268
24391
|
var _a2;
|
|
24269
24392
|
projectionNode == null ? void 0 : projectionNode.promote({
|
|
@@ -24335,7 +24458,7 @@ function setRef(ref, value,) {
|
|
|
24335
24458
|
}
|
|
24336
24459
|
}
|
|
24337
24460
|
function isMutableRef(ref,) {
|
|
24338
|
-
return
|
|
24461
|
+
return isObject2(ref,) && 'current' in ref;
|
|
24339
24462
|
}
|
|
24340
24463
|
function refHasValue(ref,) {
|
|
24341
24464
|
return isMutableRef(ref,) && ref.current !== null;
|
|
@@ -24439,6 +24562,21 @@ var SharedIntersectionObserver = class {
|
|
|
24439
24562
|
}
|
|
24440
24563
|
};
|
|
24441
24564
|
var SharedIntersectionObserverContext = /* @__PURE__ */ createContext(/* @__PURE__ */ new Map(),);
|
|
24565
|
+
function observeElement(observers2, key7, element, root, callback, rootMargin, threshold,) {
|
|
24566
|
+
let observer2 = observers2.get(key7,);
|
|
24567
|
+
if (!observer2 || observer2.root !== (root == null ? void 0 : root.current)) {
|
|
24568
|
+
observer2 = new SharedIntersectionObserver({
|
|
24569
|
+
root: root == null ? void 0 : root.current,
|
|
24570
|
+
rootMargin,
|
|
24571
|
+
threshold,
|
|
24572
|
+
},);
|
|
24573
|
+
observers2.set(key7, observer2,);
|
|
24574
|
+
}
|
|
24575
|
+
observer2.observeElementWithCallback(element, callback,);
|
|
24576
|
+
return () => {
|
|
24577
|
+
observer2.unobserve(element,);
|
|
24578
|
+
};
|
|
24579
|
+
}
|
|
24442
24580
|
function _useSharedIntersectionObserver(ref, callback, options,) {
|
|
24443
24581
|
const key7 = useConstant2(() => `${options.rootMargin}`);
|
|
24444
24582
|
const observers2 = useContext(SharedIntersectionObserverContext,);
|
|
@@ -24451,19 +24589,7 @@ function _useSharedIntersectionObserver(ref, callback, options,) {
|
|
|
24451
24589
|
useRefEffect(ref, (element) => {
|
|
24452
24590
|
if (!enabled) return;
|
|
24453
24591
|
if (element === null) return;
|
|
24454
|
-
|
|
24455
|
-
if (!observer2 || observer2.root !== (root == null ? void 0 : root.current)) {
|
|
24456
|
-
observer2 = new SharedIntersectionObserver({
|
|
24457
|
-
root: root == null ? void 0 : root.current,
|
|
24458
|
-
rootMargin,
|
|
24459
|
-
threshold,
|
|
24460
|
-
},);
|
|
24461
|
-
observers2.set(key7, observer2,);
|
|
24462
|
-
}
|
|
24463
|
-
observer2.observeElementWithCallback(element, callback,);
|
|
24464
|
-
return () => {
|
|
24465
|
-
observer2 == null ? void 0 : observer2.unobserve(element,);
|
|
24466
|
-
};
|
|
24592
|
+
return observeElement(observers2, key7, element, root, callback, rootMargin, threshold,);
|
|
24467
24593
|
}, [enabled, callback, root, rootMargin, threshold,],);
|
|
24468
24594
|
}
|
|
24469
24595
|
var useSharedIntersectionObserver = typeof IntersectionObserver === 'undefined' ? noop2 : _useSharedIntersectionObserver;
|
|
@@ -24521,7 +24647,7 @@ function isIntersectingWithThreshold({
|
|
|
24521
24647
|
var LayoutTree = class extends Component2 {
|
|
24522
24648
|
constructor() {
|
|
24523
24649
|
super(...arguments,);
|
|
24524
|
-
__publicField(this, 'layoutMaybeMutated',);
|
|
24650
|
+
__publicField(this, 'layoutMaybeMutated', false,);
|
|
24525
24651
|
__publicField(this, 'projectionNodes', /* @__PURE__ */ new Map(),);
|
|
24526
24652
|
__publicField(this, 'rootProjectionNode',);
|
|
24527
24653
|
__publicField(this, 'isExiting',);
|
|
@@ -24552,7 +24678,7 @@ var LayoutTree = class extends Component2 {
|
|
|
24552
24678
|
} = nextProps;
|
|
24553
24679
|
this.isExiting = isExiting;
|
|
24554
24680
|
if (isLead === void 0) return true;
|
|
24555
|
-
const hasBecomeLead = !this.props.isLead &&
|
|
24681
|
+
const hasBecomeLead = !this.props.isLead && isLead;
|
|
24556
24682
|
const hasExitBeenCancelled = this.props.isExiting && !isExiting;
|
|
24557
24683
|
const shouldPromote = hasBecomeLead || hasExitBeenCancelled;
|
|
24558
24684
|
const shouldDemote = !!this.props.isLead && !isLead;
|
|
@@ -25965,7 +26091,7 @@ function containerContent(item,) {
|
|
|
25965
26091
|
const position = (_a = item == null ? void 0 : item.transition) == null ? void 0 : _a.position;
|
|
25966
26092
|
const shouldStretchWidth = !position || position.left !== void 0 && position.right !== void 0;
|
|
25967
26093
|
const shouldStretchHeight = !position || position.top !== void 0 && position.bottom !== void 0;
|
|
25968
|
-
const canStretchStyle = 'style' in child.props ?
|
|
26094
|
+
const canStretchStyle = 'style' in child.props ? isObject2(child.props.style,) : true;
|
|
25969
26095
|
if (shouldStretchWidth) {
|
|
25970
26096
|
const canStretchWidth = 'width' in child.props;
|
|
25971
26097
|
if (canStretchWidth) props.width = '100%';
|
|
@@ -26252,11 +26378,11 @@ function WithDragging(Component17,) {
|
|
|
26252
26378
|
__publicField(this, 'isMoving', false,);
|
|
26253
26379
|
__publicField(this, 'isAnimating', false,);
|
|
26254
26380
|
__publicField(this, 'directionLockAxis', null,);
|
|
26255
|
-
__publicField(this, 'layerStartPoint',);
|
|
26256
|
-
__publicField(this, 'correctedLayerStartPoint',);
|
|
26257
|
-
__publicField(this, 'previousPoint',);
|
|
26381
|
+
__publicField(this, 'layerStartPoint', null,);
|
|
26382
|
+
__publicField(this, 'correctedLayerStartPoint', null,);
|
|
26383
|
+
__publicField(this, 'previousPoint', null,);
|
|
26258
26384
|
__publicField(this, '_constraints', null,);
|
|
26259
|
-
__publicField(this, 'animation',);
|
|
26385
|
+
__publicField(this, 'animation', null,);
|
|
26260
26386
|
__publicField(this, 'panStart', (event) => {
|
|
26261
26387
|
if (!this.props.enabled) {
|
|
26262
26388
|
return;
|
|
@@ -26301,6 +26427,7 @@ function WithDragging(Component17,) {
|
|
|
26301
26427
|
if (!enabled) {
|
|
26302
26428
|
return;
|
|
26303
26429
|
}
|
|
26430
|
+
assert(this.previousPoint !== null, 'previousPoint must be set in panStart()',);
|
|
26304
26431
|
let point2 = {
|
|
26305
26432
|
...this.previousPoint,
|
|
26306
26433
|
};
|
|
@@ -26320,6 +26447,7 @@ function WithDragging(Component17,) {
|
|
|
26320
26447
|
this.updatedirectionLock(offset,);
|
|
26321
26448
|
return;
|
|
26322
26449
|
} else {
|
|
26450
|
+
assert(this.layerStartPoint !== null, 'layerStartPoint must be set in panStart()',);
|
|
26323
26451
|
if (this.directionLockAxis === 'y') {
|
|
26324
26452
|
point2.x = this.layerStartPoint.x;
|
|
26325
26453
|
}
|
|
@@ -26833,27 +26961,18 @@ function WithDragging(Component17,) {
|
|
|
26833
26961
|
};
|
|
26834
26962
|
}
|
|
26835
26963
|
render() {
|
|
26836
|
-
const {
|
|
26837
|
-
onPanStart,
|
|
26838
|
-
onPan,
|
|
26839
|
-
onPanEnd,
|
|
26840
|
-
onMouseWheelStart,
|
|
26841
|
-
onMouseWheel,
|
|
26842
|
-
onMouseWheelEnd,
|
|
26843
|
-
...attributes
|
|
26844
|
-
} = this.props;
|
|
26845
26964
|
const originalProps = {
|
|
26846
|
-
...
|
|
26965
|
+
...this.props,
|
|
26847
26966
|
};
|
|
26848
26967
|
Object.keys(_WithDraggingHOC2.draggingDefaultProps,).forEach((key7) => {
|
|
26849
26968
|
delete asRecord(originalProps,)[key7];
|
|
26850
26969
|
},);
|
|
26851
|
-
originalProps.onPanStart = this.wrapHandler(this.panStart, onPanStart,);
|
|
26852
|
-
originalProps.onPan = this.wrapHandler(this.pan, onPan,);
|
|
26853
|
-
originalProps.onPanEnd = this.wrapHandler(this.panEnd, onPanEnd,);
|
|
26854
|
-
originalProps.onMouseWheelStart = this.wrapHandler(this.mouseWheelStart, onMouseWheelStart,);
|
|
26855
|
-
originalProps.onMouseWheel = this.wrapHandler(this.mouseWheel, onMouseWheel,);
|
|
26856
|
-
originalProps.onMouseWheelEnd = this.wrapHandler(this.mouseWheelEnd, onMouseWheelEnd,);
|
|
26970
|
+
originalProps.onPanStart = this.wrapHandler(this.panStart, originalProps.onPanStart,);
|
|
26971
|
+
originalProps.onPan = this.wrapHandler(this.pan, originalProps.onPan,);
|
|
26972
|
+
originalProps.onPanEnd = this.wrapHandler(this.panEnd, originalProps.onPanEnd,);
|
|
26973
|
+
originalProps.onMouseWheelStart = this.wrapHandler(this.mouseWheelStart, originalProps.onMouseWheelStart,);
|
|
26974
|
+
originalProps.onMouseWheel = this.wrapHandler(this.mouseWheel, originalProps.onMouseWheel,);
|
|
26975
|
+
originalProps.onMouseWheelEnd = this.wrapHandler(this.mouseWheelEnd, originalProps.onMouseWheelEnd,);
|
|
26857
26976
|
originalProps.left = this.x;
|
|
26858
26977
|
originalProps.top = this.y;
|
|
26859
26978
|
return /* @__PURE__ */ jsx3(DraggingContext.Provider, {
|
|
@@ -27171,7 +27290,7 @@ function hasRadius(props,) {
|
|
|
27171
27290
|
}
|
|
27172
27291
|
function getRadiusValue(value,) {
|
|
27173
27292
|
let num = Number(value,);
|
|
27174
|
-
if (typeof value === 'string' && Number.isNaN(
|
|
27293
|
+
if (typeof value === 'string' && Number.isNaN(num,)) {
|
|
27175
27294
|
return value;
|
|
27176
27295
|
} else if (isAnimatable2(value,)) {
|
|
27177
27296
|
num = Animatable.getNumber(value,);
|
|
@@ -27989,6 +28108,7 @@ var DeprecatedFrame = /* @__PURE__ */ (() => {
|
|
|
27989
28108
|
return React4.cloneElement(child, {
|
|
27990
28109
|
parentSize: this.state.size,
|
|
27991
28110
|
_forwardedOverrides,
|
|
28111
|
+
// biome-ignore lint/suspicious/noExplicitAny: deprecated code
|
|
27992
28112
|
},);
|
|
27993
28113
|
} else if (_forwardedOverrides && child) {
|
|
27994
28114
|
return React4.cloneElement(child, {
|
|
@@ -28337,7 +28457,7 @@ var Stack = /* @__PURE__ */ (() => {
|
|
|
28337
28457
|
__contentWrapperStyle,
|
|
28338
28458
|
...containerProps
|
|
28339
28459
|
} = stackProps;
|
|
28340
|
-
const useFlexboxGap =
|
|
28460
|
+
const useFlexboxGap = externalUseFlexboxGap || wrap2;
|
|
28341
28461
|
const stackRef = React4.useRef(null,);
|
|
28342
28462
|
const flexDirection = toFlexDirection(direction,);
|
|
28343
28463
|
const isReverse = isReverseDirection(flexDirection,);
|
|
@@ -28799,7 +28919,7 @@ var Page = /* @__PURE__ */ React4.forwardRef(function Page2(props, forwardedRef,
|
|
|
28799
28919
|
containerSizeRef.current.height = containerProps.height;
|
|
28800
28920
|
}
|
|
28801
28921
|
const updateOnResize = React4.useCallback(() => {
|
|
28802
|
-
if (!hasFixedSize) setForceUpdateCount((v) => v + 1);
|
|
28922
|
+
if (!hasFixedSize) startTransition2(() => setForceUpdateCount((v) => v + 1));
|
|
28803
28923
|
}, [hasFixedSize,],);
|
|
28804
28924
|
React4.useEffect(() => {
|
|
28805
28925
|
if (RenderTarget.current() !== RenderTarget.preview) return;
|
|
@@ -29520,7 +29640,7 @@ var GestureRecognizer = class {
|
|
|
29520
29640
|
constructor() {
|
|
29521
29641
|
__publicField(this, '_state', 2,/* Possible */
|
|
29522
29642
|
);
|
|
29523
|
-
__publicField(this, 'handler',);
|
|
29643
|
+
__publicField(this, 'handler', null,);
|
|
29524
29644
|
__publicField(this, 'preventers', [],);
|
|
29525
29645
|
}
|
|
29526
29646
|
get state() {
|
|
@@ -29595,7 +29715,7 @@ var GestureRecognizer = class {
|
|
|
29595
29715
|
var MouseWheelGestureRecognizer = class extends GestureRecognizer {
|
|
29596
29716
|
constructor() {
|
|
29597
29717
|
super(...arguments,);
|
|
29598
|
-
__publicField(this, 'startEvent',);
|
|
29718
|
+
__publicField(this, 'startEvent', null,);
|
|
29599
29719
|
__publicField(this, 'eventType', 'mousewheel',);
|
|
29600
29720
|
__publicField(
|
|
29601
29721
|
this,
|
|
@@ -29640,7 +29760,7 @@ var MouseWheelGestureRecognizer = class extends GestureRecognizer {
|
|
|
29640
29760
|
var PanGestureRecognizer = class extends GestureRecognizer {
|
|
29641
29761
|
constructor() {
|
|
29642
29762
|
super(...arguments,);
|
|
29643
|
-
__publicField(this, 'startEvent',);
|
|
29763
|
+
__publicField(this, 'startEvent', null,);
|
|
29644
29764
|
__publicField(this, 'eventType', 'pan',);
|
|
29645
29765
|
}
|
|
29646
29766
|
pointerSessionBegan(session, event,) {
|
|
@@ -30032,7 +30152,7 @@ var useUpdateChildSize = ({
|
|
|
30032
30152
|
: updatedSize;
|
|
30033
30153
|
return React4.cloneElement(child, update,);
|
|
30034
30154
|
},);
|
|
30035
|
-
}, [dragDirection, children,],);
|
|
30155
|
+
}, [dragDirection, children, fromCanvasComponent,],);
|
|
30036
30156
|
};
|
|
30037
30157
|
var numberFromOptionalMotionValue = (value) => {
|
|
30038
30158
|
return typeof value === 'number' ? value : value.get();
|
|
@@ -30325,7 +30445,6 @@ var EmulatedScroll = /* @__PURE__ */ React4.forwardRef(function EmulatedScroll2(
|
|
|
30325
30445
|
preserve3d: containerProps.preserve3d,
|
|
30326
30446
|
children: [
|
|
30327
30447
|
/* @__PURE__ */ jsx3(EmptyState, {
|
|
30328
|
-
children,
|
|
30329
30448
|
size: {
|
|
30330
30449
|
width: isFiniteNumber(containerProps.width,) ? containerProps.width : '100%',
|
|
30331
30450
|
height: isFiniteNumber(containerProps.height,) ? containerProps.height : '100%',
|
|
@@ -30333,6 +30452,7 @@ var EmulatedScroll = /* @__PURE__ */ React4.forwardRef(function EmulatedScroll2(
|
|
|
30333
30452
|
insideUserCodeComponent: !containerProps.__fromCodeComponentNode,
|
|
30334
30453
|
title: 'Scroll',
|
|
30335
30454
|
description: 'Click and drag the connector to any frame on the canvas \u2192',
|
|
30455
|
+
children,
|
|
30336
30456
|
},),
|
|
30337
30457
|
useUpdateChildSize({
|
|
30338
30458
|
dragDirection: direction,
|
|
@@ -31532,8 +31652,8 @@ var AnimationCollector = class {
|
|
|
31532
31652
|
const initial = props.__framer__presenceInitial ?? props.initial;
|
|
31533
31653
|
const animate3 = props.__framer__presenceAnimate ?? props.animate;
|
|
31534
31654
|
const config = {
|
|
31535
|
-
initial:
|
|
31536
|
-
animate:
|
|
31655
|
+
initial: isObject2(initial,) ? initial : void 0,
|
|
31656
|
+
animate: isObject2(animate3,) ? animate3 : void 0,
|
|
31537
31657
|
transformTemplate: isString(transformTemplate2,) ? transformTemplate2 : void 0,
|
|
31538
31658
|
};
|
|
31539
31659
|
for (const variantId of variants) this.setHash(id3, this.variantHash(variantId, info,), config,);
|
|
@@ -31703,6 +31823,7 @@ function useLoop({
|
|
|
31703
31823
|
const values = useConstant2(makeFXValues,);
|
|
31704
31824
|
const mirrorStateRef = useRef3(false,);
|
|
31705
31825
|
const delay2 = useDelay();
|
|
31826
|
+
const animationPromiseRef = useRef3(null,);
|
|
31706
31827
|
const animateValues = useCallback(async () => {
|
|
31707
31828
|
if (!loop) return;
|
|
31708
31829
|
const transition = loopTransition || void 0;
|
|
@@ -31710,9 +31831,9 @@ function useLoop({
|
|
|
31710
31831
|
const to = mirror ? defaultFXValues : loop;
|
|
31711
31832
|
const from = mirror ? loop : defaultFXValues;
|
|
31712
31833
|
mirrorStateRef.current = !mirrorStateRef.current;
|
|
31713
|
-
|
|
31834
|
+
animationPromiseRef.current = Promise.all(effectValuesKeys.map((key7) => {
|
|
31714
31835
|
if (shouldReduceMotion && key7 !== 'opacity') return;
|
|
31715
|
-
values[key7].
|
|
31836
|
+
values[key7].jump(from[key7] ?? defaultFXValues[key7],);
|
|
31716
31837
|
return new Promise((resolve) => {
|
|
31717
31838
|
const opts = {
|
|
31718
31839
|
...transition,
|
|
@@ -31724,6 +31845,7 @@ function useLoop({
|
|
|
31724
31845
|
}
|
|
31725
31846
|
},);
|
|
31726
31847
|
},),);
|
|
31848
|
+
return animationPromiseRef.current;
|
|
31727
31849
|
}, [loop, loopRepeatType, loopTransition, shouldReduceMotion,],);
|
|
31728
31850
|
const [isRunning, setIsRunning,] = useState(false,);
|
|
31729
31851
|
const shouldRunRef = useRef3(false,);
|
|
@@ -31731,7 +31853,7 @@ function useLoop({
|
|
|
31731
31853
|
if (!loopEffectEnabled || !shouldRunRef.current) return;
|
|
31732
31854
|
await animateValues();
|
|
31733
31855
|
await delay2(loopRepeatDelay ?? 0,);
|
|
31734
|
-
|
|
31856
|
+
void animateLoop();
|
|
31735
31857
|
}, [animateValues, delay2, loopEffectEnabled, loopRepeatDelay,],);
|
|
31736
31858
|
const start2 = useCallback(() => {
|
|
31737
31859
|
if (shouldRunRef.current) return;
|
|
@@ -31778,14 +31900,23 @@ function useLoop({
|
|
|
31778
31900
|
}, [start2, stop, loopPauseOffscreen, hasLoop,],);
|
|
31779
31901
|
useEffect(() => {
|
|
31780
31902
|
return () => stop();
|
|
31781
|
-
}, [],);
|
|
31903
|
+
}, [stop,],);
|
|
31904
|
+
const isIntersectingRef = useRef3(false,);
|
|
31905
|
+
const stopAfterAnimationEnds = useCallback(async () => {
|
|
31906
|
+
if (!animationPromiseRef.current) return;
|
|
31907
|
+
await animationPromiseRef.current;
|
|
31908
|
+
if (isIntersectingRef.current) return;
|
|
31909
|
+
stop();
|
|
31910
|
+
}, [stop,],);
|
|
31782
31911
|
const startAndStopBasedOnIntersection = useCallback((entry) => {
|
|
31783
31912
|
if (entry.isIntersecting) {
|
|
31913
|
+
isIntersectingRef.current = true;
|
|
31784
31914
|
start2();
|
|
31785
31915
|
} else {
|
|
31786
|
-
|
|
31916
|
+
isIntersectingRef.current = false;
|
|
31917
|
+
void stopAfterAnimationEnds();
|
|
31787
31918
|
}
|
|
31788
|
-
}, [start2,
|
|
31919
|
+
}, [start2, stopAfterAnimationEnds,],);
|
|
31789
31920
|
useSharedIntersectionObserver(ref, startAndStopBasedOnIntersection, {
|
|
31790
31921
|
enabled: hasLoop && loopPauseOffscreen,
|
|
31791
31922
|
},);
|
|
@@ -31851,7 +31982,7 @@ function useParallax(options, ref, visibilityStyle,) {
|
|
|
31851
31982
|
};
|
|
31852
31983
|
}
|
|
31853
31984
|
function getTransition(value,) {
|
|
31854
|
-
if (isString(value,) || !
|
|
31985
|
+
if (isString(value,) || !isObject2(value,)) return void 0;
|
|
31855
31986
|
return value == null ? void 0 : value.transition;
|
|
31856
31987
|
}
|
|
31857
31988
|
function runEffectAnimation(target, effect, shouldReduceMotion, ref, appearId, instant,) {
|
|
@@ -31861,7 +31992,7 @@ function runEffectAnimation(target, effect, shouldReduceMotion, ref, appearId, i
|
|
|
31861
31992
|
if (shouldReduceMotion && key7 !== 'opacity') return resolve();
|
|
31862
31993
|
const motionValue2 = effect.values[key7];
|
|
31863
31994
|
motionValue2.stop();
|
|
31864
|
-
let value = !
|
|
31995
|
+
let value = !isObject2(target,) ? defaultFXValues[key7] : (target == null ? void 0 : target[key7]) ?? defaultFXValues[key7];
|
|
31865
31996
|
if (isMotionValue(value,)) value = value.get();
|
|
31866
31997
|
if (!isNumber2(value,)) return resolve();
|
|
31867
31998
|
const visualElement = visualElementStore.get(ref.current,);
|
|
@@ -31913,14 +32044,14 @@ function usePresenceAnimation(
|
|
|
31913
32044
|
},);
|
|
31914
32045
|
const effect = useConstant2(() => {
|
|
31915
32046
|
const base = initial ?? style2;
|
|
31916
|
-
if (!
|
|
32047
|
+
if (!isObject2(base,)) {
|
|
31917
32048
|
return {
|
|
31918
32049
|
values: makeFXValues(),
|
|
31919
32050
|
};
|
|
31920
32051
|
}
|
|
31921
32052
|
const defaults = {};
|
|
31922
32053
|
for (const key7 in base) {
|
|
31923
|
-
const value =
|
|
32054
|
+
const value = isObject2(base,) ? base[key7] : void 0;
|
|
31924
32055
|
if (!isNumber2(value,)) continue;
|
|
31925
32056
|
defaults[key7] = value;
|
|
31926
32057
|
}
|
|
@@ -32490,10 +32621,10 @@ var add2 = (values) => values.reduce((sum, value,) => sum += value, 0,);
|
|
|
32490
32621
|
var multiply = (values) => values.reduce((sum, value,) => sum = sum * value, 1,);
|
|
32491
32622
|
var reactRefObjectKey = 'current';
|
|
32492
32623
|
function isReactRefObject(value,) {
|
|
32493
|
-
return
|
|
32624
|
+
return isObject2(value,) && reactRefObjectKey in value;
|
|
32494
32625
|
}
|
|
32495
32626
|
function addMotionValueStyle(style2, values,) {
|
|
32496
|
-
if (!style2 || !
|
|
32627
|
+
if (!style2 || !isObject2(style2,)) return values;
|
|
32497
32628
|
for (const key7 in style2) {
|
|
32498
32629
|
const value = style2[key7];
|
|
32499
32630
|
if (!isMotionValue(value,) || !isFXValuesKey(key7,)) continue;
|
|
@@ -32724,7 +32855,7 @@ var SynchronousSuspenseErrorBoundary = class extends Component2 {
|
|
|
32724
32855
|
error,
|
|
32725
32856
|
'\n\nComponent stack:\n',
|
|
32726
32857
|
componentStack,
|
|
32727
|
-
'\n\nThis error indicates a state update wasn\u2019t wrapped with startTransition. Some of the UI might flash as a result. If you are the author of this website, check recently added custom code, and if the issue persists, report it to the Framer team via https://www.framer.
|
|
32858
|
+
'\n\nThis error indicates a state update wasn\u2019t wrapped with startTransition. Some of the UI might flash as a result. If you are the author of this website, check recently added custom code, and if the issue persists, report it to the Framer team via https://www.framer.com/contact/.',
|
|
32728
32859
|
);
|
|
32729
32860
|
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : void 0;
|
|
32730
32861
|
sendTrackingEvent('published_site_load_recoverable_error', {
|
|
@@ -32797,7 +32928,7 @@ function shouldEnableCodeBoundaries() {
|
|
|
32797
32928
|
return RenderTarget.current() !== RenderTarget.canvas;
|
|
32798
32929
|
}
|
|
32799
32930
|
function CodeComponentBoundary({
|
|
32800
|
-
|
|
32931
|
+
getErrorMessage,
|
|
32801
32932
|
fallback,
|
|
32802
32933
|
children,
|
|
32803
32934
|
},) {
|
|
@@ -32808,7 +32939,7 @@ function CodeComponentBoundary({
|
|
|
32808
32939
|
fallback,
|
|
32809
32940
|
children: /* @__PURE__ */ jsx3(ClientSideErrorBoundary, {
|
|
32810
32941
|
fallback,
|
|
32811
|
-
|
|
32942
|
+
getErrorMessage,
|
|
32812
32943
|
children,
|
|
32813
32944
|
},),
|
|
32814
32945
|
},);
|
|
@@ -32826,7 +32957,7 @@ var ClientSideErrorBoundary = class extends Component2 {
|
|
|
32826
32957
|
};
|
|
32827
32958
|
}
|
|
32828
32959
|
componentDidCatch(error, errorInfo,) {
|
|
32829
|
-
logError(this.props.
|
|
32960
|
+
logError(this.props.getErrorMessage(), errorInfo == null ? void 0 : errorInfo.componentStack,);
|
|
32830
32961
|
collectErrorToAnalytics(error, errorInfo,);
|
|
32831
32962
|
}
|
|
32832
32963
|
render() {
|
|
@@ -33008,7 +33139,7 @@ function useMaybeWrapComponentWithCodeBoundary(children, scopeId, nodeId, isAuth
|
|
|
33008
33139
|
);
|
|
33009
33140
|
if (shouldWrapWithBoundary) {
|
|
33010
33141
|
children = /* @__PURE__ */ jsx3(CodeComponentBoundary, {
|
|
33011
|
-
|
|
33142
|
+
getErrorMessage: getErrorMessageForComponent.bind(null, scopeId, nodeId,),
|
|
33012
33143
|
fallback: null,
|
|
33013
33144
|
children,
|
|
33014
33145
|
},);
|
|
@@ -33876,7 +34007,7 @@ function childrenWithOrigin(child, {
|
|
|
33876
34007
|
y,
|
|
33877
34008
|
},) {
|
|
33878
34009
|
if (!child || !isReactChild(child,) || !isReactElement(child,)) return null;
|
|
33879
|
-
if (!
|
|
34010
|
+
if (!isObject2(child.props.style,) && !isUndefined(child.props.style,)) return null;
|
|
33880
34011
|
const style2 = {
|
|
33881
34012
|
...child.props.style,
|
|
33882
34013
|
originX: x,
|
|
@@ -34037,6 +34168,17 @@ function Floating({
|
|
|
34037
34168
|
getPortalContainer(portalSelector, inComponent,),
|
|
34038
34169
|
);
|
|
34039
34170
|
}
|
|
34171
|
+
var Instance = /* @__PURE__ */ React4.forwardRef(function Instance2({
|
|
34172
|
+
Component: Component17,
|
|
34173
|
+
...props
|
|
34174
|
+
}, ref,) {
|
|
34175
|
+
return Component17
|
|
34176
|
+
? /* @__PURE__ */ jsx3(Component17, {
|
|
34177
|
+
...props,
|
|
34178
|
+
ref,
|
|
34179
|
+
},)
|
|
34180
|
+
: null;
|
|
34181
|
+
},);
|
|
34040
34182
|
var GracefullyDegradingErrorBoundary = class extends Component2 {
|
|
34041
34183
|
constructor() {
|
|
34042
34184
|
super(...arguments,);
|
|
@@ -34048,7 +34190,7 @@ var GracefullyDegradingErrorBoundary = class extends Component2 {
|
|
|
34048
34190
|
__publicField(
|
|
34049
34191
|
this,
|
|
34050
34192
|
'messageReport',
|
|
34051
|
-
'If you are the author of this website, please report this issue to the Framer team via https://www.framer.
|
|
34193
|
+
'If you are the author of this website, please report this issue to the Framer team via https://www.framer.com/contact/',
|
|
34052
34194
|
);
|
|
34053
34195
|
}
|
|
34054
34196
|
static getDerivedStateFromError(error,) {
|
|
@@ -34068,7 +34210,7 @@ var GracefullyDegradingErrorBoundary = class extends Component2 {
|
|
|
34068
34210
|
error,
|
|
34069
34211
|
);
|
|
34070
34212
|
const sampleRate = Math.random();
|
|
34071
|
-
if (sampleRate > 0.
|
|
34213
|
+
if (sampleRate > 0.5) return;
|
|
34072
34214
|
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
34073
34215
|
sendTrackingEvent('published_site_load_error', {
|
|
34074
34216
|
message: String(error,),
|
|
@@ -35479,7 +35621,7 @@ async function submitForm(action, data2, projectHash,) {
|
|
|
35479
35621
|
}
|
|
35480
35622
|
}
|
|
35481
35623
|
function responseHasError(response,) {
|
|
35482
|
-
return typeof response === 'object' && response !== null && 'error' in response &&
|
|
35624
|
+
return typeof response === 'object' && response !== null && 'error' in response && isObject2(response.error,) &&
|
|
35483
35625
|
'message' in response.error && typeof response.error.message === 'string';
|
|
35484
35626
|
}
|
|
35485
35627
|
function isSamePage(a, b,) {
|
|
@@ -35679,7 +35821,7 @@ function Router({
|
|
|
35679
35821
|
let localeId;
|
|
35680
35822
|
if (isString(localeOrLocaleId,)) {
|
|
35681
35823
|
localeId = localeOrLocaleId;
|
|
35682
|
-
} else if (
|
|
35824
|
+
} else if (isObject2(localeOrLocaleId,)) {
|
|
35683
35825
|
localeId = localeOrLocaleId.id;
|
|
35684
35826
|
}
|
|
35685
35827
|
const defaultLocale = locales.find(({
|
|
@@ -35704,7 +35846,6 @@ function Router({
|
|
|
35704
35846
|
preserveQueryParams,
|
|
35705
35847
|
},);
|
|
35706
35848
|
if (!localeResult) return;
|
|
35707
|
-
const currentPathVariables2 = currentPathVariablesRef.current;
|
|
35708
35849
|
const currentStatePaginationInfo = isHistoryState(window.history.state,) ? window.history.state.paginationInfo : void 0;
|
|
35709
35850
|
const currentPath = localeResult.path;
|
|
35710
35851
|
currentPathVariablesRef.current = localeResult.pathVariables;
|
|
@@ -35714,7 +35855,7 @@ function Router({
|
|
|
35714
35855
|
return pushHistoryState(
|
|
35715
35856
|
{
|
|
35716
35857
|
routeId: currentRouteId2,
|
|
35717
|
-
pathVariables:
|
|
35858
|
+
pathVariables: localeResult.pathVariables,
|
|
35718
35859
|
localeId: nextLocale.id,
|
|
35719
35860
|
paginationInfo: currentStatePaginationInfo,
|
|
35720
35861
|
},
|
|
@@ -36407,14 +36548,13 @@ _subscribers2 = /* @__PURE__ */ new WeakMap();
|
|
|
36407
36548
|
_results = /* @__PURE__ */ new WeakMap();
|
|
36408
36549
|
_SSRResults = /* @__PURE__ */ new WeakMap();
|
|
36409
36550
|
_onlyPrefetched = /* @__PURE__ */ new WeakMap();
|
|
36410
|
-
function
|
|
36551
|
+
function useFetchRequestsForChildren(requests, disabled, children,) {
|
|
36411
36552
|
const fetchClient = React2.useContext(FetchClientContext,);
|
|
36412
36553
|
if (!fetchClient) {
|
|
36413
36554
|
throw new Error('useFetchRequest must be used within a FetchClientProvider',);
|
|
36414
36555
|
}
|
|
36415
36556
|
const isRestoringCache = React2.useContext(IsRestoringCacheContext,);
|
|
36416
36557
|
const [observer2,] = React2.useState(() => new RequestsObserver(fetchClient, requests,));
|
|
36417
|
-
const [result, setResult,] = React2.useState(() => observer2.getServerResults());
|
|
36418
36558
|
React2.useLayoutEffect(() => {
|
|
36419
36559
|
if (disabled) return;
|
|
36420
36560
|
observer2.setRequests(requests, {
|
|
@@ -36422,18 +36562,15 @@ function useFetchRequests(requests, disabled,) {
|
|
|
36422
36562
|
},);
|
|
36423
36563
|
}, [requests, observer2, disabled,],);
|
|
36424
36564
|
React2.useEffect(() => {
|
|
36425
|
-
|
|
36426
|
-
|
|
36427
|
-
|
|
36428
|
-
|
|
36429
|
-
|
|
36430
|
-
|
|
36431
|
-
|
|
36432
|
-
|
|
36433
|
-
|
|
36434
|
-
};
|
|
36435
|
-
}, [observer2, disabled, isRestoringCache,],);
|
|
36436
|
-
return result;
|
|
36565
|
+
return () => observer2.unmount();
|
|
36566
|
+
}, [observer2,],);
|
|
36567
|
+
const subscribe = React2.useCallback((onChange) => {
|
|
36568
|
+
if (isRestoringCache || disabled) return noop4;
|
|
36569
|
+
return observer2.subscribe(onChange,);
|
|
36570
|
+
}, [disabled, observer2, isRestoringCache,],);
|
|
36571
|
+
const synchronousData = React2.useSyncExternalStore(subscribe, observer2.getResults, observer2.getServerResults,);
|
|
36572
|
+
const deferredData = React2.useDeferredValue(synchronousData,);
|
|
36573
|
+
return useMemoOne(() => children(deferredData.data, deferredData.status,), [deferredData, children,],);
|
|
36437
36574
|
}
|
|
36438
36575
|
function usePrefetch() {
|
|
36439
36576
|
const fetchClient = React2.useContext(FetchClientContext,);
|
|
@@ -36601,11 +36738,7 @@ var Fetcher = /* @__PURE__ */ React2.forwardRef(function Fetcher2({
|
|
|
36601
36738
|
...rest
|
|
36602
36739
|
}, ref,) {
|
|
36603
36740
|
const cloneWithPropsAndRef = useCloneChildrenWithPropsAndRef(ref,);
|
|
36604
|
-
const
|
|
36605
|
-
data: data2,
|
|
36606
|
-
status,
|
|
36607
|
-
} = useFetchRequests(requests, disabled,);
|
|
36608
|
-
const childrenWithValues = children(data2, status,);
|
|
36741
|
+
const childrenWithValues = useFetchRequestsForChildren(requests, disabled, children,);
|
|
36609
36742
|
return cloneWithPropsAndRef(childrenWithValues, rest,);
|
|
36610
36743
|
},);
|
|
36611
36744
|
var callEach = (...fns) => fns.forEach((fn) => fn && fn());
|
|
@@ -36637,19 +36770,19 @@ function isAnyCollection(value,) {
|
|
|
36637
36770
|
return isAnyLegacyCollection(value,) || isAnyDatabaseCollection(value,);
|
|
36638
36771
|
}
|
|
36639
36772
|
function isLegacyCollection(value,) {
|
|
36640
|
-
return isArray(value,) && value.every(
|
|
36773
|
+
return isArray(value,) && value.every(isObject2,);
|
|
36641
36774
|
}
|
|
36642
36775
|
function isLegacyLocalizedCollection(value,) {
|
|
36643
|
-
return
|
|
36776
|
+
return isObject2(value,) && isFunction(value.read,) && isFunction(value.preload,);
|
|
36644
36777
|
}
|
|
36645
36778
|
function isAnyLegacyCollection(value,) {
|
|
36646
36779
|
return isLegacyCollection(value,) || isLegacyLocalizedCollection(value,);
|
|
36647
36780
|
}
|
|
36648
36781
|
function isDatabaseCollection(value,) {
|
|
36649
|
-
return
|
|
36782
|
+
return isObject2(value,) && isObject2(value.schema,);
|
|
36650
36783
|
}
|
|
36651
36784
|
function isLocalizedDatabaseCollection(value,) {
|
|
36652
|
-
return
|
|
36785
|
+
return isObject2(value,) && isObject2(value.collectionByLocaleId,);
|
|
36653
36786
|
}
|
|
36654
36787
|
function isAnyDatabaseCollection(value,) {
|
|
36655
36788
|
return isDatabaseCollection(value,) || isLocalizedDatabaseCollection(value,);
|
|
@@ -37487,7 +37620,7 @@ function Hash(value,) {
|
|
|
37487
37620
|
return value;
|
|
37488
37621
|
}
|
|
37489
37622
|
function isHashable(value,) {
|
|
37490
|
-
return
|
|
37623
|
+
return isObject2(value,) && isFunction(value.getHash,);
|
|
37491
37624
|
}
|
|
37492
37625
|
function calculateHash(name, ...values) {
|
|
37493
37626
|
const hashes = values.map((value) => {
|
|
@@ -41130,7 +41263,7 @@ function getCollectionId(collection,) {
|
|
|
41130
41263
|
return id3;
|
|
41131
41264
|
}
|
|
41132
41265
|
function replaceCollection(_, value,) {
|
|
41133
|
-
if (
|
|
41266
|
+
if (isObject2(value,) && value.type === 'Collection' && isAnyCollection(value.data,)) {
|
|
41134
41267
|
return getCollectionId(value.data,);
|
|
41135
41268
|
}
|
|
41136
41269
|
return value;
|
|
@@ -41364,7 +41497,7 @@ function useDataRecord(collection, variables,) {
|
|
|
41364
41497
|
const pageRecord = collection.find((record2) => {
|
|
41365
41498
|
return Object.entries(variables,).every(([key7, value,],) => {
|
|
41366
41499
|
const recordValue = record2[key7];
|
|
41367
|
-
if (value === void 0 || recordValue === void 0 ||
|
|
41500
|
+
if (value === void 0 || recordValue === void 0 || isObject2(value,) || isObject2(recordValue,)) {
|
|
41368
41501
|
return false;
|
|
41369
41502
|
}
|
|
41370
41503
|
return String(value,) === String(recordValue,);
|
|
@@ -41406,7 +41539,7 @@ function useSiteRefs() {
|
|
|
41406
41539
|
}, [path,],);
|
|
41407
41540
|
}
|
|
41408
41541
|
function isFramerGamepadKeydownData(value,) {
|
|
41409
|
-
return
|
|
41542
|
+
return isObject2(value,) && value.mapping !== void 0;
|
|
41410
41543
|
}
|
|
41411
41544
|
function gamepadInputsHaveChanged(previous, current2,) {
|
|
41412
41545
|
if (previous.length !== current2.length) return true;
|
|
@@ -41650,13 +41783,8 @@ function useOnAppear(callback,) {
|
|
|
41650
41783
|
default: callback,
|
|
41651
41784
|
},);
|
|
41652
41785
|
}
|
|
41653
|
-
|
|
41786
|
+
function setOverflow(blockDocumentScrolling, show,) {
|
|
41654
41787
|
if (blockDocumentScrolling === false) return;
|
|
41655
|
-
if (yieldBefore) {
|
|
41656
|
-
await yieldToMain({
|
|
41657
|
-
continueAfter: 'paint',
|
|
41658
|
-
},);
|
|
41659
|
-
}
|
|
41660
41788
|
frame.render(() => {
|
|
41661
41789
|
const htmlStyle = document.documentElement.style;
|
|
41662
41790
|
if (show) {
|
|
@@ -41670,18 +41798,27 @@ function useOverlayState({
|
|
|
41670
41798
|
blockDocumentScrolling = true,
|
|
41671
41799
|
} = {},) {
|
|
41672
41800
|
const [showOverlay, setShowOverlay,] = React4.useState(false,);
|
|
41673
|
-
const callback = React4.useCallback((show) => {
|
|
41674
|
-
|
|
41675
|
-
|
|
41801
|
+
const callback = React4.useCallback(async (show) => {
|
|
41802
|
+
await yieldToMain({
|
|
41803
|
+
priority: 'user-blocking',
|
|
41804
|
+
continueAfter: 'paint',
|
|
41805
|
+
},);
|
|
41806
|
+
startTransition2(() => setShowOverlay(show,));
|
|
41807
|
+
setOverflow(blockDocumentScrolling, show,);
|
|
41676
41808
|
}, [blockDocumentScrolling,],);
|
|
41677
41809
|
React4.useEffect(() => () => {
|
|
41678
|
-
void
|
|
41810
|
+
void yieldToMain({
|
|
41811
|
+
priority: 'user-blocking',
|
|
41812
|
+
continueAfter: 'paint',
|
|
41813
|
+
},).then(() => {
|
|
41814
|
+
setOverflow(blockDocumentScrolling, false,);
|
|
41815
|
+
},);
|
|
41679
41816
|
}, [blockDocumentScrolling,],);
|
|
41680
41817
|
return [showOverlay, callback,];
|
|
41681
41818
|
}
|
|
41682
41819
|
var key4 = 'page';
|
|
41683
41820
|
function isRoute(route,) {
|
|
41684
|
-
return
|
|
41821
|
+
return isObject2(route,) && key4 in route && route.page !== void 0;
|
|
41685
41822
|
}
|
|
41686
41823
|
async function componentForRoute(route,) {
|
|
41687
41824
|
if (!isRoute(route,)) return;
|
|
@@ -41697,7 +41834,7 @@ async function componentForRoute(route,) {
|
|
|
41697
41834
|
}
|
|
41698
41835
|
var preloadKey2 = 'preload';
|
|
41699
41836
|
function withPreload(component,) {
|
|
41700
|
-
return !!component &&
|
|
41837
|
+
return !!component && isObject2(component,) && preloadKey2 in component;
|
|
41701
41838
|
}
|
|
41702
41839
|
function usePrototypeNavigate({
|
|
41703
41840
|
preload,
|
|
@@ -41819,7 +41956,7 @@ function usePreloadQuery() {
|
|
|
41819
41956
|
function getWhereExpressionFromPathVariables(pathVariables, collection,) {
|
|
41820
41957
|
const entries = Object.entries(pathVariables ?? {},).filter(([, value,],) => {
|
|
41821
41958
|
if (isUndefined(value,)) return false;
|
|
41822
|
-
if (
|
|
41959
|
+
if (isObject2(value,)) return false;
|
|
41823
41960
|
return true;
|
|
41824
41961
|
},);
|
|
41825
41962
|
const expressions = entries.map(([name, value,],) => ({
|
|
@@ -41854,62 +41991,44 @@ function getWhereExpressionFromPathVariables(pathVariables, collection,) {
|
|
|
41854
41991
|
}));
|
|
41855
41992
|
}
|
|
41856
41993
|
function useLoadMorePagination(totalSize, pageSize, hash2, paginateWithSuspendedLoadingState = false,) {
|
|
41994
|
+
var _a, _b, _c, _d;
|
|
41995
|
+
const [isPending, startLoadingTransition,] = useTransition();
|
|
41857
41996
|
const totalPages = Math.ceil(totalSize / pageSize,);
|
|
41858
|
-
const [
|
|
41859
|
-
|
|
41860
|
-
const currentPage = ((_d = (_c = (_b = (_a = globalThis == null ? void 0 : globalThis.history) == null ? void 0 : _a.state) == null
|
|
41997
|
+
const [currentPage, setCurrentPage,] = useState(
|
|
41998
|
+
((_d = (_c = (_b = (_a = globalThis == null ? void 0 : globalThis.history) == null ? void 0 : _a.state) == null
|
|
41861
41999
|
? void 0
|
|
41862
42000
|
: _b.paginationInfo) == null
|
|
41863
42001
|
? void 0
|
|
41864
42002
|
: _c[hash2]) == null
|
|
41865
42003
|
? void 0
|
|
41866
|
-
: _d.currentPage) ?? 1
|
|
42004
|
+
: _d.currentPage) ?? 1,
|
|
42005
|
+
);
|
|
42006
|
+
const paginationInfo = useMemo2(() => {
|
|
41867
42007
|
return {
|
|
41868
42008
|
currentPage,
|
|
41869
42009
|
totalPages,
|
|
41870
|
-
isLoading:
|
|
42010
|
+
isLoading: isPending,
|
|
41871
42011
|
};
|
|
41872
|
-
},);
|
|
41873
|
-
useEffect(() => {
|
|
41874
|
-
startTransition2(() => {
|
|
41875
|
-
setPaginationInfo((current2) => {
|
|
41876
|
-
if (current2.totalPages === totalPages) return current2;
|
|
41877
|
-
return {
|
|
41878
|
-
...current2,
|
|
41879
|
-
totalPages,
|
|
41880
|
-
};
|
|
41881
|
-
},);
|
|
41882
|
-
},);
|
|
41883
|
-
}, [totalPages,],);
|
|
42012
|
+
}, [currentPage, totalPages, isPending,],);
|
|
41884
42013
|
useEffect(() => {
|
|
41885
42014
|
pushLoadMoreHistory(hash2, paginationInfo,);
|
|
41886
42015
|
}, [hash2, paginationInfo,],);
|
|
41887
42016
|
const onCanvas = useIsOnFramerCanvas();
|
|
41888
|
-
const loadMore = useCallback(() => {
|
|
42017
|
+
const loadMore = useCallback(async () => {
|
|
41889
42018
|
if (onCanvas) return;
|
|
41890
|
-
if (
|
|
41891
|
-
|
|
41892
|
-
|
|
41893
|
-
|
|
41894
|
-
...info,
|
|
41895
|
-
currentPage: Math.min(info.currentPage + 1, info.totalPages,),
|
|
41896
|
-
isLoading: false,
|
|
41897
|
-
}));
|
|
41898
|
-
},);
|
|
41899
|
-
return;
|
|
41900
|
-
}
|
|
41901
|
-
setPaginationInfo((info) => ({
|
|
41902
|
-
...info,
|
|
41903
|
-
isLoading: true,
|
|
41904
|
-
}));
|
|
41905
|
-
requestAnimationFrame(() => {
|
|
41906
|
-
setPaginationInfo((info) => ({
|
|
41907
|
-
...info,
|
|
41908
|
-
currentPage: Math.min(info.currentPage + 1, info.totalPages,),
|
|
41909
|
-
isLoading: false,
|
|
41910
|
-
}));
|
|
42019
|
+
if (currentPage >= totalPages) return;
|
|
42020
|
+
await yieldToMain({
|
|
42021
|
+
priority: 'user-blocking',
|
|
42022
|
+
continueAfter: 'paint',
|
|
41911
42023
|
},);
|
|
41912
|
-
|
|
42024
|
+
const renderNextPage = (startTransition14) => {
|
|
42025
|
+
startTransition14(() => {
|
|
42026
|
+
setCurrentPage((_currentPage) => Math.min(_currentPage + 1, totalPages,));
|
|
42027
|
+
},);
|
|
42028
|
+
};
|
|
42029
|
+
if (!paginateWithSuspendedLoadingState) return renderNextPage(startTransition2,);
|
|
42030
|
+
return renderNextPage(startLoadingTransition,);
|
|
42031
|
+
}, [currentPage, totalPages, paginateWithSuspendedLoadingState,],);
|
|
41913
42032
|
return {
|
|
41914
42033
|
paginationInfo,
|
|
41915
42034
|
loadMore,
|
|
@@ -42024,15 +42143,16 @@ function useRunCallbackIfPageIsVisible() {
|
|
|
42024
42143
|
}, [clean,],);
|
|
42025
42144
|
}
|
|
42026
42145
|
function useRunCallbackIfElementIsInView() {
|
|
42027
|
-
const
|
|
42146
|
+
const observerRefCleanup = useRef3();
|
|
42028
42147
|
const isInViewRef = useRef3(false,);
|
|
42029
42148
|
const callbackRef = useRef3();
|
|
42149
|
+
const observers2 = useContext(SharedIntersectionObserverContext,);
|
|
42030
42150
|
useEffect(() => {
|
|
42031
42151
|
return () => {
|
|
42032
42152
|
var _a;
|
|
42033
|
-
(_a =
|
|
42153
|
+
(_a = observerRefCleanup.current) == null ? void 0 : _a.call(observerRefCleanup,);
|
|
42034
42154
|
callbackRef.current = void 0;
|
|
42035
|
-
|
|
42155
|
+
observerRefCleanup.current = void 0;
|
|
42036
42156
|
};
|
|
42037
42157
|
}, [],);
|
|
42038
42158
|
return useCallback((callback, ref,) => {
|
|
@@ -42041,21 +42161,21 @@ function useRunCallbackIfElementIsInView() {
|
|
|
42041
42161
|
return;
|
|
42042
42162
|
}
|
|
42043
42163
|
callbackRef.current = callback;
|
|
42044
|
-
if (
|
|
42045
|
-
|
|
42046
|
-
|
|
42047
|
-
|
|
42048
|
-
|
|
42049
|
-
|
|
42050
|
-
|
|
42051
|
-
|
|
42052
|
-
|
|
42053
|
-
|
|
42054
|
-
|
|
42055
|
-
|
|
42056
|
-
|
|
42057
|
-
|
|
42058
|
-
}, [],);
|
|
42164
|
+
if (observerRefCleanup.current) return;
|
|
42165
|
+
let queuedMicrotask = false;
|
|
42166
|
+
const observerCallback = (entry) => {
|
|
42167
|
+
isInViewRef.current = entry.isIntersecting;
|
|
42168
|
+
if (queuedMicrotask) return;
|
|
42169
|
+
queuedMicrotask = true;
|
|
42170
|
+
queueMicrotask(() => {
|
|
42171
|
+
var _a;
|
|
42172
|
+
if (!isInViewRef.current) return;
|
|
42173
|
+
queuedMicrotask = false;
|
|
42174
|
+
(_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef,);
|
|
42175
|
+
},);
|
|
42176
|
+
};
|
|
42177
|
+
observerRefCleanup.current = observeElement(observers2, 'undefined', ref.current, null, observerCallback,);
|
|
42178
|
+
}, [observers2,],);
|
|
42059
42179
|
}
|
|
42060
42180
|
function useUpdateIfVisible(ref,) {
|
|
42061
42181
|
const runUpdateIfPageIsVisible = useRunCallbackIfPageIsVisible();
|
|
@@ -42073,20 +42193,26 @@ var globalWaitingForClickPromise;
|
|
|
42073
42193
|
var globalWaitingForClickResolve;
|
|
42074
42194
|
async function getPromiseWithFallback() {
|
|
42075
42195
|
return new Promise((resolve) => {
|
|
42076
|
-
|
|
42196
|
+
let resolveFn = resolve;
|
|
42197
|
+
setTimeout(() => {
|
|
42198
|
+
if (!resolveFn) return;
|
|
42199
|
+
performance.mark('wait-for-click-fallback',);
|
|
42200
|
+
resolveFn();
|
|
42201
|
+
}, 150,);
|
|
42202
|
+
globalWaitingForClickResolve = () => {
|
|
42077
42203
|
resolve();
|
|
42078
|
-
|
|
42204
|
+
resolveFn = void 0;
|
|
42079
42205
|
};
|
|
42080
|
-
const timeout = setTimeout(resolveFn, 150,);
|
|
42081
|
-
globalWaitingForClickResolve = resolveFn;
|
|
42082
42206
|
},);
|
|
42083
42207
|
}
|
|
42084
42208
|
function globalWaitForClickListener(event,) {
|
|
42085
42209
|
if (event.button === 0) {
|
|
42210
|
+
performance.mark('pointerdown-listener',);
|
|
42086
42211
|
globalWaitingForClickPromise = getPromiseWithFallback();
|
|
42087
42212
|
}
|
|
42088
42213
|
}
|
|
42089
42214
|
function globalClickReceivedListener() {
|
|
42215
|
+
performance.mark('click-received-listener',);
|
|
42090
42216
|
globalWaitingForClickPromise = void 0;
|
|
42091
42217
|
globalWaitingForClickResolve == null ? void 0 : globalWaitingForClickResolve();
|
|
42092
42218
|
globalWaitingForClickResolve = void 0;
|
|
@@ -42164,13 +42290,17 @@ function useVariantState({
|
|
|
42164
42290
|
internalState.current.gestureVariant = nextGesture;
|
|
42165
42291
|
const yieldOnTap = yieldOnTapFeatureOn && internalState.current.isPressedHasUpdated;
|
|
42166
42292
|
if (yieldOnTap && globalWaitingForClickPromise) {
|
|
42293
|
+
performance.mark('wait-for-tap-start',);
|
|
42167
42294
|
await globalWaitingForClickPromise;
|
|
42295
|
+
performance.measure('wait-for-tap', 'wait-for-tap-start',);
|
|
42168
42296
|
}
|
|
42169
42297
|
if (yieldOnTap) {
|
|
42298
|
+
performance.mark('yield-on-tap-start',);
|
|
42170
42299
|
await yieldToMain({
|
|
42171
42300
|
priority: 'user-blocking',
|
|
42172
42301
|
continueAfter: 'paint',
|
|
42173
42302
|
},);
|
|
42303
|
+
performance.measure('yield-on-tap', 'yield-on-tap-start',);
|
|
42174
42304
|
}
|
|
42175
42305
|
const {
|
|
42176
42306
|
isHovered: isHovered2,
|
|
@@ -42337,7 +42467,7 @@ function withCodeBoundaryForOverrides(Component17, {
|
|
|
42337
42467
|
if (shouldWrapWithBoundary) {
|
|
42338
42468
|
if (appliedOverride.status === 'success') {
|
|
42339
42469
|
return /* @__PURE__ */ jsx3(CodeComponentBoundary, {
|
|
42340
|
-
|
|
42470
|
+
getErrorMessage: getErrorMessageForOverride.bind(null, scopeId, nodeId,),
|
|
42341
42471
|
fallback: /* @__PURE__ */ jsx3(Component17, {
|
|
42342
42472
|
...props,
|
|
42343
42473
|
ref,
|
|
@@ -42570,7 +42700,7 @@ var withVariantAppearEffect = (Component17) =>
|
|
|
42570
42700
|
},);
|
|
42571
42701
|
},);
|
|
42572
42702
|
}, [animateOnce, threshold, targets, props.variant, scrollDirection, exitTarget,],);
|
|
42573
|
-
useScrollDirectionChange(scrollDirection, setVariant, {
|
|
42703
|
+
useScrollDirectionChange(scrollDirection, (variant) => React4.startTransition(() => setVariant(variant,)), {
|
|
42574
42704
|
enabled: variantAppearEffectEnabled,
|
|
42575
42705
|
repeat: !animateOnce,
|
|
42576
42706
|
},);
|
|
@@ -42578,7 +42708,7 @@ var withVariantAppearEffect = (Component17) =>
|
|
|
42578
42708
|
if (!variantAppearEffectEnabled) return;
|
|
42579
42709
|
const useObscuredVariant = !options.targets && !options.scrollDirection;
|
|
42580
42710
|
const target = useObscuredVariant ? options.obscuredVariantId : void 0;
|
|
42581
|
-
|
|
42711
|
+
startTransition2(() => setVariant(target,));
|
|
42582
42712
|
},);
|
|
42583
42713
|
if (!('variantAppearEffectEnabled' in options) || variantAppearEffectEnabled === true) {
|
|
42584
42714
|
return /* @__PURE__ */ jsx3(Component17, {
|
|
@@ -44415,10 +44545,10 @@ function loadVariationAxes(source,) {
|
|
|
44415
44545
|
}
|
|
44416
44546
|
}
|
|
44417
44547
|
function isValidVariationAxesData(data2,) {
|
|
44418
|
-
return
|
|
44548
|
+
return isObject2(data2,) && Object.values(data2,).every(isValidVariationAxes,);
|
|
44419
44549
|
}
|
|
44420
44550
|
function isVariationAxis2(data2,) {
|
|
44421
|
-
return
|
|
44551
|
+
return isObject2(data2,) && isString(data2.tag,);
|
|
44422
44552
|
}
|
|
44423
44553
|
function isValidVariationAxes(data2,) {
|
|
44424
44554
|
return Array.isArray(data2,) && data2.every(isVariationAxis2,);
|
|
@@ -44427,10 +44557,17 @@ var FontStore = class {
|
|
|
44427
44557
|
constructor() {
|
|
44428
44558
|
__publicField(this, 'enabled', false,);
|
|
44429
44559
|
__publicField(this, 'bySelector', /* @__PURE__ */ new Map(),);
|
|
44560
|
+
__publicField(this, 'loadedSelectors', /* @__PURE__ */ new Set(),);
|
|
44430
44561
|
__publicField(this, 'getGoogleFontsListPromise',);
|
|
44431
44562
|
__publicField(this, 'getFontshareFontsListPromise',);
|
|
44432
44563
|
__publicField(this, 'getBuiltInFontsListPromise',);
|
|
44433
|
-
__publicField(
|
|
44564
|
+
__publicField(
|
|
44565
|
+
this,
|
|
44566
|
+
'customFontsImportPromise',
|
|
44567
|
+
new Promise((resolve) => {
|
|
44568
|
+
this.resolveCustomFontsImportPromise = resolve;
|
|
44569
|
+
},),
|
|
44570
|
+
);
|
|
44434
44571
|
__publicField(this, 'local',);
|
|
44435
44572
|
__publicField(this, 'google',);
|
|
44436
44573
|
__publicField(this, 'fontshare',);
|
|
@@ -44513,9 +44650,13 @@ var FontStore = class {
|
|
|
44513
44650
|
this.bySelector.delete(key7,);
|
|
44514
44651
|
}
|
|
44515
44652
|
},);
|
|
44516
|
-
|
|
44653
|
+
const importedFonts = this.custom.importFonts(assets,);
|
|
44654
|
+
for (const font of importedFonts) {
|
|
44517
44655
|
this.addFont(font,);
|
|
44518
44656
|
}
|
|
44657
|
+
if (importedFonts.length > 0) {
|
|
44658
|
+
this.resolveCustomFontsImportPromise();
|
|
44659
|
+
}
|
|
44519
44660
|
}
|
|
44520
44661
|
getFontFamily(info,) {
|
|
44521
44662
|
const fontFamily = this[info.source].getFontFamilyByName(info.name,);
|
|
@@ -44675,6 +44816,12 @@ var FontStore = class {
|
|
|
44675
44816
|
},),
|
|
44676
44817
|
);
|
|
44677
44818
|
}
|
|
44819
|
+
const shouldImportCustomFonts = selectors.some((selector) => selector.startsWith(customFontSelectorPrefix,));
|
|
44820
|
+
if (shouldImportCustomFonts) {
|
|
44821
|
+
importPromises.push(this.customFontsImportPromise.catch((error) => {
|
|
44822
|
+
warnOnce2('Failed to load custom fonts:', error,);
|
|
44823
|
+
},),);
|
|
44824
|
+
}
|
|
44678
44825
|
if (importPromises.length > 0) {
|
|
44679
44826
|
await Promise.all(importPromises,);
|
|
44680
44827
|
}
|
|
@@ -45006,10 +45153,9 @@ var PlainTextInput = /* @__PURE__ */ forwardRef(function FormPlainTextInput(prop
|
|
|
45006
45153
|
className: cx(textInputWrapperClassName, inputWrapperClassName, className2,),
|
|
45007
45154
|
...rest,
|
|
45008
45155
|
children: type === 'textarea'
|
|
45009
|
-
? /* @__PURE__ */
|
|
45156
|
+
? /* @__PURE__ */ jsx3(motion.textarea, {
|
|
45010
45157
|
...dataProps,
|
|
45011
45158
|
...eventHandlers,
|
|
45012
|
-
key: defaultValue,
|
|
45013
45159
|
required,
|
|
45014
45160
|
autoFocus,
|
|
45015
45161
|
name: inputName,
|
|
@@ -45017,11 +45163,10 @@ var PlainTextInput = /* @__PURE__ */ forwardRef(function FormPlainTextInput(prop
|
|
|
45017
45163
|
className: inputClassName,
|
|
45018
45164
|
defaultValue,
|
|
45019
45165
|
maxLength,
|
|
45020
|
-
},)
|
|
45021
|
-
: /* @__PURE__ */
|
|
45166
|
+
}, defaultValue,)
|
|
45167
|
+
: /* @__PURE__ */ jsx3(motion.input, {
|
|
45022
45168
|
...dataProps,
|
|
45023
45169
|
...eventHandlers,
|
|
45024
|
-
key: defaultValue,
|
|
45025
45170
|
type,
|
|
45026
45171
|
required,
|
|
45027
45172
|
autoFocus,
|
|
@@ -45033,7 +45178,7 @@ var PlainTextInput = /* @__PURE__ */ forwardRef(function FormPlainTextInput(prop
|
|
|
45033
45178
|
max,
|
|
45034
45179
|
step: step2,
|
|
45035
45180
|
maxLength,
|
|
45036
|
-
},),
|
|
45181
|
+
}, defaultValue,),
|
|
45037
45182
|
},);
|
|
45038
45183
|
},);
|
|
45039
45184
|
var iconSize2 = 16;
|
|
@@ -46459,7 +46604,7 @@ var RichText2 = /* @__PURE__ */ forwardRef(function RichText3({
|
|
|
46459
46604
|
}, ref,) {
|
|
46460
46605
|
const content = html || children || htmlFromDesign;
|
|
46461
46606
|
if (isString(content,)) {
|
|
46462
|
-
if (!props.stylesPresetsClassName &&
|
|
46607
|
+
if (!props.stylesPresetsClassName && isObject2(props.stylesPresetsClassNames,)) {
|
|
46463
46608
|
props.stylesPresetsClassName = Object.values(props.stylesPresetsClassNames,).join(' ',);
|
|
46464
46609
|
}
|
|
46465
46610
|
const contentProp = {
|
|
@@ -48649,7 +48794,7 @@ var VectorGroup = /* @__PURE__ */ (() => {
|
|
|
48649
48794
|
})();
|
|
48650
48795
|
var key6 = 'calculatedPaths';
|
|
48651
48796
|
function withShape(target,) {
|
|
48652
|
-
if (!
|
|
48797
|
+
if (!isObject2(target,)) return false;
|
|
48653
48798
|
return key6 in target;
|
|
48654
48799
|
}
|
|
48655
48800
|
var Size = /* @__PURE__ */ (() => {
|
|
@@ -48886,7 +49031,7 @@ function inspect(item, max, l,) {
|
|
|
48886
49031
|
if (item === void 0) {
|
|
48887
49032
|
return 'undefined';
|
|
48888
49033
|
}
|
|
48889
|
-
if (
|
|
49034
|
+
if (isObject2(item,) && isFunction(item.toInspect,)) {
|
|
48890
49035
|
return item.toInspect();
|
|
48891
49036
|
}
|
|
48892
49037
|
if (isString(item,)) {
|
|
@@ -48899,7 +49044,7 @@ function inspect(item, max, l,) {
|
|
|
48899
49044
|
let code = item.toString().slice('function '.length,).replace(/\n/gu, '',).replace(/\s+/gu, ' ',);
|
|
48900
49045
|
const limit = 50;
|
|
48901
49046
|
if (code.length > limit && l > 0) {
|
|
48902
|
-
code = `${code.slice(0,
|
|
49047
|
+
code = `${code.slice(0, limit + 1,).trim()}\u2026 }`;
|
|
48903
49048
|
}
|
|
48904
49049
|
return `<Function ${code}>`;
|
|
48905
49050
|
}
|
|
@@ -48909,7 +49054,7 @@ function inspect(item, max, l,) {
|
|
|
48909
49054
|
}
|
|
48910
49055
|
return `[${item.map((i) => inspect(i, max, (l || 0) + 1,)).join(', ',)}]`;
|
|
48911
49056
|
}
|
|
48912
|
-
if (
|
|
49057
|
+
if (isObject2(item,)) {
|
|
48913
49058
|
let objectInfo;
|
|
48914
49059
|
const objectType = inspectObjectType(item,);
|
|
48915
49060
|
if (/HTML\w+?Element/u.test(objectType,)) {
|
|
@@ -48985,8 +49130,8 @@ var package_default = {
|
|
|
48985
49130
|
'@types/react': '^18.2.67',
|
|
48986
49131
|
'@types/react-dom': '^18.2.22',
|
|
48987
49132
|
'@types/yargs': '^17.0.33',
|
|
48988
|
-
'@typescript-eslint/eslint-plugin': '^8.
|
|
48989
|
-
'@typescript-eslint/parser': '^8.
|
|
49133
|
+
'@typescript-eslint/eslint-plugin': '^8.32.1',
|
|
49134
|
+
'@typescript-eslint/parser': '^8.32.1',
|
|
48990
49135
|
chalk: '^4.1.2',
|
|
48991
49136
|
eslint: '^8.57.1',
|
|
48992
49137
|
'eslint-plugin-framer-studio': 'workspace:*',
|
|
@@ -49002,7 +49147,7 @@ var package_default = {
|
|
|
49002
49147
|
yargs: '^17.7.2',
|
|
49003
49148
|
},
|
|
49004
49149
|
peerDependencies: {
|
|
49005
|
-
'framer-motion': '12.
|
|
49150
|
+
'framer-motion': '12.14.0',
|
|
49006
49151
|
react: '^18.2.0',
|
|
49007
49152
|
'react-dom': '^18.2.0',
|
|
49008
49153
|
},
|
|
@@ -49027,11 +49172,13 @@ export {
|
|
|
49027
49172
|
acceleratedValues2 as acceleratedValues,
|
|
49028
49173
|
activeAnimations,
|
|
49029
49174
|
addActionControls,
|
|
49175
|
+
addAttrValue,
|
|
49030
49176
|
addFonts,
|
|
49031
49177
|
addPointerEvent,
|
|
49032
49178
|
addPointerInfo,
|
|
49033
49179
|
addPropertyControls,
|
|
49034
49180
|
addScaleCorrector,
|
|
49181
|
+
addStyleValue,
|
|
49035
49182
|
addUniqueItem,
|
|
49036
49183
|
alpha,
|
|
49037
49184
|
analyseComplexValue,
|
|
@@ -49052,6 +49199,8 @@ export {
|
|
|
49052
49199
|
AnyInterpolation,
|
|
49053
49200
|
applyPxDefaults,
|
|
49054
49201
|
AsyncMotionValueAnimation,
|
|
49202
|
+
attachSpring,
|
|
49203
|
+
attrEffect,
|
|
49055
49204
|
AutomaticLayoutIds,
|
|
49056
49205
|
BackgroundImage,
|
|
49057
49206
|
backgroundImageFromProps,
|
|
@@ -49220,6 +49369,7 @@ export {
|
|
|
49220
49369
|
inferInitialRouteFromPath,
|
|
49221
49370
|
injectComponentCSSRules,
|
|
49222
49371
|
installFlexboxGapWorkaroundIfNeeded,
|
|
49372
|
+
Instance,
|
|
49223
49373
|
InternalID,
|
|
49224
49374
|
interpolate,
|
|
49225
49375
|
invariant,
|
|
@@ -49241,10 +49391,12 @@ export {
|
|
|
49241
49391
|
isFramerPageLink,
|
|
49242
49392
|
isGapEnabled,
|
|
49243
49393
|
isGenerator,
|
|
49394
|
+
isHTMLElement,
|
|
49244
49395
|
isMotionComponent,
|
|
49245
49396
|
isMotionValue2 as isMotionValue,
|
|
49246
49397
|
isNodeOrChild,
|
|
49247
49398
|
isNumericalString,
|
|
49399
|
+
isObject,
|
|
49248
49400
|
isOfAnnotatedType,
|
|
49249
49401
|
isOverride,
|
|
49250
49402
|
isPrimaryPointer,
|
|
@@ -49253,6 +49405,8 @@ export {
|
|
|
49253
49405
|
isShallowEqualArray,
|
|
49254
49406
|
isStaticRenderer,
|
|
49255
49407
|
isStraightCurve,
|
|
49408
|
+
isSVGElement,
|
|
49409
|
+
isSVGSVGElement,
|
|
49256
49410
|
isValidMotionProp,
|
|
49257
49411
|
isWaapiSupportedEasing,
|
|
49258
49412
|
isZeroValueString,
|
|
@@ -49347,6 +49501,7 @@ export {
|
|
|
49347
49501
|
print,
|
|
49348
49502
|
progress,
|
|
49349
49503
|
progressPercentage,
|
|
49504
|
+
propEffect,
|
|
49350
49505
|
PropertyOverrides2 as PropertyOverrides,
|
|
49351
49506
|
PropertyStore,
|
|
49352
49507
|
propsForLink,
|
|
@@ -49390,6 +49545,7 @@ export {
|
|
|
49390
49545
|
SmartComponentScopedContainer,
|
|
49391
49546
|
spring,
|
|
49392
49547
|
SpringAnimator,
|
|
49548
|
+
springValue,
|
|
49393
49549
|
SSRVariants,
|
|
49394
49550
|
Stack,
|
|
49395
49551
|
stagger,
|
|
@@ -49408,6 +49564,7 @@ export {
|
|
|
49408
49564
|
supportsPartialKeyframes,
|
|
49409
49565
|
supportsScrollTimeline,
|
|
49410
49566
|
SVG,
|
|
49567
|
+
svgEffect,
|
|
49411
49568
|
SwitchLayoutGroupContext,
|
|
49412
49569
|
sync,
|
|
49413
49570
|
systemFontFamilyName,
|