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/dist/framer.js
CHANGED
|
@@ -36,12 +36,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.LocaleInfoContext = exports.FormContext = exports.FetchClientProvider = exports.FramerLink = exports.wrap = exports.withVariantFX = exports.withVariantAppearEffect = void 0;
|
|
39
|
+
exports.CustomCursorHost = exports.cubicBezierAsString = exports.createBox = exports.ConvertColor = exports.ControlType = exports.Container = exports.ConstraintValues = exports.ConstraintMask = exports.ComponentViewportProvider = exports.ComponentContainerContext = exports.complex = exports.combinedCSSRulesForPreview = exports.ColorMixModelType = exports.ColorFormat = exports.color = exports.Color = exports.collectMotionValues = exports.clamp = exports.circOut = exports.circInOut = exports.circIn = exports.cancelSync = exports.cancelMicrotask = exports.cancelFrame = exports.callEach = exports.BoxShadow = exports.BezierAnimator = exports.backOut = exports.backInOut = exports.backIn = exports.BackgroundImage = exports.attrEffect = exports.AsyncMotionValueAnimation = exports.AnyInterpolation = exports.anticipate = exports.animations = exports.animationMapKey = exports.AnimateSharedLayout = exports.AnimatePresence = exports.animateMini = exports.animate = exports.Animatable = exports.AnchorLinkTarget = exports.alpha = exports.addStyleValue = exports.addPointerInfo = exports.addAttrValue = exports.activeAnimations = exports.acceleratedValues = exports.combinedCSSRules = void 0;
|
|
40
|
+
exports.framerAppearTransformTemplateToken = exports.framerAppearIdKey = exports.framerAppearEffects = exports.framerAppearAnimationScriptKey = exports.FramerAnimation = exports.frameFromElements = exports.frameFromElement = exports.frameData = exports.frame = exports.Frame = exports.FormSelect = exports.FormPlainTextInput = exports.FormContainer = exports.FormBooleanInput = exports.fontStore = exports.FontSourceNames = exports.FlatTree = exports.findValueType = exports.findDimensionValueType = exports.Fetcher = exports.environment = exports.easingDefinitionToFunction = exports.easeOut = exports.easeInOut = exports.easeIn = exports.Draggable = exports.DragControls = exports.domMin = exports.domMax = exports.DOMKeyframesResolver = exports.domAnimation = exports.DOM = exports.distance = exports.dispatchKeyDownEvent = exports.dimensionValueTypes = exports.DimensionType = exports.devicePresets = exports.DeviceCodeComponent = exports.LayoutGroupContext = exports.DeprecatedLayoutGroupContext = exports.DeprecatedFrameWithEvents = exports.DeprecatedComponentContainer = exports.degrees = exports.defaultValueTypes = exports.defaultDeviceProps = exports.DataObserverContext = exports.DataObserver = exports.DataContext = exports.Data = exports.CycleVariantState = void 0;
|
|
41
|
+
exports.millisecondsToSeconds = exports.microtask = exports.maxGeneratorDuration = exports.makeUseVisualState = exports.MainLoop = exports.m = exports.localPackageFallbackIdentifier = exports.loadFont = exports.Link = exports.LinearGradient = exports.Line = exports.LibraryFeaturesProvider = exports.LazyValue = exports.LayoutIdContext = exports.LayoutGroup = exports.Layer = exports.KeyframeResolver = exports.JSAnimation = exports.isZeroValueString = exports.isPrimaryPointer = exports.isNumericalString = exports.isNodeOrChild = exports.isMotionValue = exports.isEasingArray = exports.isDragging = exports.isCSSVariableToken = exports.isCSSVariableName = exports.isBrowser = exports.isBezierDefinition = exports.invisibleValues = exports.invariant = exports.InternalID = exports.Instance = exports.Image = exports.hsla = exports.hex = exports.GroupAnimationWithThen = exports.GroupAnimation = exports.GracefullyDegradingErrorBoundary = exports.getValueAsType = exports.getDefaultValueType = exports.generateLinearEasing = exports.GeneratedComponentContext = exports.GamepadContext = exports.FrameWithMotion = exports.frameSteps = exports.FramerEventSession = exports.FramerEventListener = exports.FramerEvent = exports.framerCSSMarker = void 0;
|
|
42
|
+
exports.ResolveLinks = exports.RenderTarget = exports.Rect = exports.readTransformValue = exports.RadialGradient = exports.QueryEngine = exports.QueryCache = exports.px = exports.PropertyStore = exports.PropertyOverrides = exports.propEffect = exports.progressPercentage = exports.progress = exports.PresenceContext = exports.positionalKeys = exports.Polygon = exports.pipe = exports.percent = exports.PathVariablesContext = exports.PathSegment = exports.pathDefaults = exports.ParentSizeState = exports.Page = exports.optimizedAppearDataAttribute = exports.optimizeAppearTransformTemplate = exports.optimizeAppear = exports.ObservableObject = exports.numberValueTypes = exports.number = exports.NotFoundError = exports.noop = exports.nestedLinksCollector = exports.NavigationTransitionType = exports.NavigationConsumer = exports.NavigationCallbackProvider = exports.NavigateTo = exports.NativeAnimationWrapper = exports.NativeAnimationExtended = exports.NativeAnimation = exports.Reorder = exports.MotionValue = exports.MotionGlobalConfig = exports.MotionContext = exports.MotionConfigContext = exports.motion = exports.mixNumber = exports.mixLinearColor = exports.mixComplex = exports.mixColor = exports.mirrorEasing = void 0;
|
|
43
|
+
exports.WindowContext = exports.WillChangeMotionValue = exports.warning = exports.vw = exports.visualElementStore = exports.VisualElement = exports.ViewTransitionBuilder = exports.vh = exports.version = exports.VectorGroup = exports.Vector = exports.VariantSelector = exports.ValueInterpolation = exports.useProvidedWindow = exports.useIsomorphicLayoutEffect = exports.useAnimation = exports.transformValueTypes = exports.transformProps = exports.transformPropOrder = exports.time = exports.Text = exports.testValueType = exports.systemFontFamilyName = exports.sync = exports.SwitchLayoutGroupContext = exports.svgEffect = exports.SVG = exports.supportsScrollTimeline = exports.supportsPartialKeyframes = exports.supportsLinearEasing = exports.supportsFlags = exports.supportedWaapiEasing = exports.SubscriptionManager = exports.StyleSheetContext = exports.styleEffect = exports.statsBuffer = exports.Stack = exports.SSRVariants = exports.SpringAnimator = exports.SmartComponentScopedContainer = exports.Size = exports.sharedSVGManager = exports.Shadow = exports.secondsToMilliseconds = exports.Scroll = exports.scale = exports.RichText = exports.rgbUnit = exports.rgba = exports.reverseEasing = void 0;
|
|
44
|
+
exports.LocaleInfoContext = exports.FormContext = exports.FetchClientProvider = exports.FramerLink = exports.wrap = exports.withVariantFX = exports.withVariantAppearEffect = exports.withV1StrokeFX = exports.withStyleAppearEffect = exports.withParallaxTransform = exports.withMeasuredSize = exports.withGeneratedLayoutId = exports.withFX = exports.withCSS = void 0;
|
|
45
45
|
exports._injectRuntime = _injectRuntime;
|
|
46
46
|
exports.addActionControls = addActionControls;
|
|
47
47
|
exports.addFonts = addFonts;
|
|
@@ -56,6 +56,7 @@ exports.animateVisualElement = animateVisualElement;
|
|
|
56
56
|
exports.animationControls = animationControls;
|
|
57
57
|
exports.annotateTypeOnStringify = annotateTypeOnStringify;
|
|
58
58
|
exports.applyPxDefaults = applyPxDefaults;
|
|
59
|
+
exports.attachSpring = attachSpring;
|
|
59
60
|
exports.AutomaticLayoutIds = AutomaticLayoutIds;
|
|
60
61
|
exports.backgroundImageFromProps = backgroundImageFromProps;
|
|
61
62
|
exports.buildTransform = buildTransform2;
|
|
@@ -138,7 +139,9 @@ exports.isFramerGamepadKeydownData = isFramerGamepadKeydownData;
|
|
|
138
139
|
exports.isFramerPageLink = isFramerPageLink;
|
|
139
140
|
exports.isGapEnabled = isGapEnabled;
|
|
140
141
|
exports.isGenerator = isGenerator;
|
|
142
|
+
exports.isHTMLElement = isHTMLElement;
|
|
141
143
|
exports.isMotionComponent = isMotionComponent;
|
|
144
|
+
exports.isObject = isObject;
|
|
142
145
|
exports.isOfAnnotatedType = isOfAnnotatedType;
|
|
143
146
|
exports.isOverride = isOverride;
|
|
144
147
|
exports.isReactDefinition = isReactDefinition;
|
|
@@ -146,6 +149,8 @@ exports.isRelativeNumber = isRelativeNumber;
|
|
|
146
149
|
exports.isShallowEqualArray = isShallowEqualArray;
|
|
147
150
|
exports.isStaticRenderer = isStaticRenderer;
|
|
148
151
|
exports.isStraightCurve = isStraightCurve;
|
|
152
|
+
exports.isSVGElement = isSVGElement;
|
|
153
|
+
exports.isSVGSVGElement = isSVGSVGElement;
|
|
149
154
|
exports.isValidMotionProp = isValidMotionProp;
|
|
150
155
|
exports.isWaapiSupportedEasing = isWaapiSupportedEasing;
|
|
151
156
|
exports.keyframes = keyframes;
|
|
@@ -203,12 +208,12 @@ exports.setGlobalRenderEnvironment = setGlobalRenderEnvironment;
|
|
|
203
208
|
exports.setStyle = setStyle;
|
|
204
209
|
exports.shouldOpenLinkInNewTab = shouldOpenLinkInNewTab;
|
|
205
210
|
exports.spring = spring;
|
|
211
|
+
exports.springValue = springValue;
|
|
206
212
|
exports.stagger = stagger;
|
|
207
213
|
exports.startAnimation = startAnimation;
|
|
208
214
|
exports.startOptimizedAppearAnimation = startOptimizedAppearAnimation;
|
|
209
215
|
exports.startWaapiAnimation = startWaapiAnimation;
|
|
210
216
|
exports.steps = steps;
|
|
211
|
-
exports.styleEffect = styleEffect;
|
|
212
217
|
exports.supportsBrowserAnimation = supportsBrowserAnimation;
|
|
213
218
|
exports.throttle = throttle;
|
|
214
219
|
exports.toFlexDirection = toFlexDirection;
|
|
@@ -317,7 +322,7 @@ exports.withShape = withShape;
|
|
|
317
322
|
exports.yieldToMain = yieldToMain;
|
|
318
323
|
exports.Router = Router;
|
|
319
324
|
const chunk_A2PMVMFI_js_1 = require("./framer-chunks/chunk-A2PMVMFI.js");
|
|
320
|
-
// /:https://app.framerstatic.com/chunk-
|
|
325
|
+
// /:https://app.framerstatic.com/chunk-A6RUM2JZ.mjs
|
|
321
326
|
const react_1 = require("react");
|
|
322
327
|
const react_2 = require("react");
|
|
323
328
|
const react_3 = require("react");
|
|
@@ -372,255 +377,6 @@ var useIsomorphicLayoutEffect = isBrowser ? react_2.useLayoutEffect : react_2.us
|
|
|
372
377
|
exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
|
|
373
378
|
var PresenceContext = /* @__PURE__ */ (0, react_1.createContext)(null);
|
|
374
379
|
exports.PresenceContext = PresenceContext;
|
|
375
|
-
var MotionConfigContext = (0, react_1.createContext)({
|
|
376
|
-
transformPagePoint: (p) => p,
|
|
377
|
-
isStatic: false,
|
|
378
|
-
reducedMotion: 'never',
|
|
379
|
-
});
|
|
380
|
-
exports.MotionConfigContext = MotionConfigContext;
|
|
381
|
-
function usePresence(subscribe = true) {
|
|
382
|
-
const context = (0, react_3.useContext)(PresenceContext);
|
|
383
|
-
if (context === null)
|
|
384
|
-
return [true, null,];
|
|
385
|
-
const { isPresent: isPresent2, onExitComplete, register, } = context;
|
|
386
|
-
const id4 = (0, react_3.useId)();
|
|
387
|
-
(0, react_2.useEffect)(() => {
|
|
388
|
-
if (subscribe) {
|
|
389
|
-
return register(id4);
|
|
390
|
-
}
|
|
391
|
-
}, [subscribe,]);
|
|
392
|
-
const safeToRemove = (0, react_3.useCallback)(() => subscribe && onExitComplete && onExitComplete(id4), [id4, onExitComplete, subscribe,]);
|
|
393
|
-
return !isPresent2 && onExitComplete ? [false, safeToRemove,] : [true,];
|
|
394
|
-
}
|
|
395
|
-
function useIsPresent() {
|
|
396
|
-
return isPresent((0, react_3.useContext)(PresenceContext));
|
|
397
|
-
}
|
|
398
|
-
function isPresent(context) {
|
|
399
|
-
return context === null ? true : context.isPresent;
|
|
400
|
-
}
|
|
401
|
-
function useConstant(init) {
|
|
402
|
-
const ref = (0, react_4.useRef)(null);
|
|
403
|
-
if (ref.current === null) {
|
|
404
|
-
ref.current = init();
|
|
405
|
-
}
|
|
406
|
-
return ref.current;
|
|
407
|
-
}
|
|
408
|
-
var PopChildMeasure = class extends React2.Component {
|
|
409
|
-
getSnapshotBeforeUpdate(prevProps) {
|
|
410
|
-
const element = this.props.childRef.current;
|
|
411
|
-
if (element && prevProps.isPresent && !this.props.isPresent) {
|
|
412
|
-
const parent = element.offsetParent;
|
|
413
|
-
const parentWidth = parent instanceof HTMLElement ? parent.offsetWidth || 0 : 0;
|
|
414
|
-
const size = this.props.sizeRef.current;
|
|
415
|
-
size.height = element.offsetHeight || 0;
|
|
416
|
-
size.width = element.offsetWidth || 0;
|
|
417
|
-
size.top = element.offsetTop;
|
|
418
|
-
size.left = element.offsetLeft;
|
|
419
|
-
size.right = parentWidth - size.width - size.left;
|
|
420
|
-
}
|
|
421
|
-
return null;
|
|
422
|
-
}
|
|
423
|
-
/**
|
|
424
|
-
* Required with getSnapshotBeforeUpdate to stop React complaining.
|
|
425
|
-
*/
|
|
426
|
-
componentDidUpdate() { }
|
|
427
|
-
render() {
|
|
428
|
-
return this.props.children;
|
|
429
|
-
}
|
|
430
|
-
};
|
|
431
|
-
function PopChild({ children, isPresent: isPresent2, anchorX, }) {
|
|
432
|
-
const id4 = (0, react_3.useId)();
|
|
433
|
-
const ref = (0, react_4.useRef)(null);
|
|
434
|
-
const size = (0, react_4.useRef)({
|
|
435
|
-
width: 0,
|
|
436
|
-
height: 0,
|
|
437
|
-
top: 0,
|
|
438
|
-
left: 0,
|
|
439
|
-
right: 0,
|
|
440
|
-
});
|
|
441
|
-
const { nonce, } = (0, react_3.useContext)(MotionConfigContext);
|
|
442
|
-
(0, react_5.useInsertionEffect)(() => {
|
|
443
|
-
const { width, height, top, left, right, } = size.current;
|
|
444
|
-
if (isPresent2 || !ref.current || !width || !height)
|
|
445
|
-
return;
|
|
446
|
-
const x = anchorX === 'left' ? `left: ${left}` : `right: ${right}`;
|
|
447
|
-
ref.current.dataset.motionPopId = id4;
|
|
448
|
-
const style2 = document.createElement('style');
|
|
449
|
-
if (nonce)
|
|
450
|
-
style2.nonce = nonce;
|
|
451
|
-
document.head.appendChild(style2);
|
|
452
|
-
if (style2.sheet) {
|
|
453
|
-
style2.sheet.insertRule(`
|
|
454
|
-
[data-motion-pop-id="${id4}"] {
|
|
455
|
-
position: absolute !important;
|
|
456
|
-
width: ${width}px !important;
|
|
457
|
-
height: ${height}px !important;
|
|
458
|
-
${x}px !important;
|
|
459
|
-
top: ${top}px !important;
|
|
460
|
-
}
|
|
461
|
-
`);
|
|
462
|
-
}
|
|
463
|
-
return () => {
|
|
464
|
-
if (document.head.contains(style2)) {
|
|
465
|
-
document.head.removeChild(style2);
|
|
466
|
-
}
|
|
467
|
-
};
|
|
468
|
-
}, [isPresent2,]);
|
|
469
|
-
return (0, jsx_runtime_1.jsx)(PopChildMeasure, {
|
|
470
|
-
isPresent: isPresent2,
|
|
471
|
-
childRef: ref,
|
|
472
|
-
sizeRef: size,
|
|
473
|
-
children: React2.cloneElement(children, {
|
|
474
|
-
ref,
|
|
475
|
-
}),
|
|
476
|
-
});
|
|
477
|
-
}
|
|
478
|
-
var PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, }) => {
|
|
479
|
-
const presenceChildren = useConstant(newChildrenMap);
|
|
480
|
-
const id4 = (0, react_3.useId)();
|
|
481
|
-
let isReusedContext = true;
|
|
482
|
-
let context = (0, react_4.useMemo)(() => {
|
|
483
|
-
isReusedContext = false;
|
|
484
|
-
return {
|
|
485
|
-
id: id4,
|
|
486
|
-
initial,
|
|
487
|
-
isPresent: isPresent2,
|
|
488
|
-
custom,
|
|
489
|
-
onExitComplete: (childId) => {
|
|
490
|
-
presenceChildren.set(childId, true);
|
|
491
|
-
for (const isComplete of presenceChildren.values()) {
|
|
492
|
-
if (!isComplete)
|
|
493
|
-
return;
|
|
494
|
-
}
|
|
495
|
-
onExitComplete && onExitComplete();
|
|
496
|
-
},
|
|
497
|
-
register: (childId) => {
|
|
498
|
-
presenceChildren.set(childId, false);
|
|
499
|
-
return () => presenceChildren.delete(childId);
|
|
500
|
-
},
|
|
501
|
-
};
|
|
502
|
-
}, [isPresent2, presenceChildren, onExitComplete,]);
|
|
503
|
-
if (presenceAffectsLayout && isReusedContext) {
|
|
504
|
-
context = {
|
|
505
|
-
...context,
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
|
-
(0, react_4.useMemo)(() => {
|
|
509
|
-
presenceChildren.forEach((_, key7) => presenceChildren.set(key7, false));
|
|
510
|
-
}, [isPresent2,]);
|
|
511
|
-
React2.useEffect(() => {
|
|
512
|
-
!isPresent2 && !presenceChildren.size && onExitComplete && onExitComplete();
|
|
513
|
-
}, [isPresent2,]);
|
|
514
|
-
if (mode === 'popLayout') {
|
|
515
|
-
children = (0, jsx_runtime_1.jsx)(PopChild, {
|
|
516
|
-
isPresent: isPresent2,
|
|
517
|
-
anchorX,
|
|
518
|
-
children,
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
return (0, jsx_runtime_1.jsx)(PresenceContext.Provider, {
|
|
522
|
-
value: context,
|
|
523
|
-
children,
|
|
524
|
-
});
|
|
525
|
-
};
|
|
526
|
-
function newChildrenMap() {
|
|
527
|
-
return /* @__PURE__ */ new Map();
|
|
528
|
-
}
|
|
529
|
-
var getChildKey = (child) => child.key || '';
|
|
530
|
-
function onlyElements(children) {
|
|
531
|
-
const filtered = [];
|
|
532
|
-
react_6.Children.forEach(children, (child) => {
|
|
533
|
-
if ((0, react_6.isValidElement)(child))
|
|
534
|
-
filtered.push(child);
|
|
535
|
-
});
|
|
536
|
-
return filtered;
|
|
537
|
-
}
|
|
538
|
-
var AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = 'sync', propagate = false, anchorX = 'left', }) => {
|
|
539
|
-
const [isParentPresent, safeToRemove,] = usePresence(propagate);
|
|
540
|
-
const presentChildren = (0, react_4.useMemo)(() => onlyElements(children), [children,]);
|
|
541
|
-
const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);
|
|
542
|
-
const isInitialRender = (0, react_4.useRef)(true);
|
|
543
|
-
const pendingPresentChildren = (0, react_4.useRef)(presentChildren);
|
|
544
|
-
const exitComplete = useConstant(() => /* @__PURE__ */ new Map());
|
|
545
|
-
const [diffedChildren, setDiffedChildren,] = (0, react_4.useState)(presentChildren);
|
|
546
|
-
const [renderedChildren, setRenderedChildren,] = (0, react_4.useState)(presentChildren);
|
|
547
|
-
useIsomorphicLayoutEffect(() => {
|
|
548
|
-
isInitialRender.current = false;
|
|
549
|
-
pendingPresentChildren.current = presentChildren;
|
|
550
|
-
for (let i = 0; i < renderedChildren.length; i++) {
|
|
551
|
-
const key7 = getChildKey(renderedChildren[i]);
|
|
552
|
-
if (!presentKeys.includes(key7)) {
|
|
553
|
-
if (exitComplete.get(key7) !== true) {
|
|
554
|
-
exitComplete.set(key7, false);
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
else {
|
|
558
|
-
exitComplete.delete(key7);
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
}, [renderedChildren, presentKeys.length, presentKeys.join('-'),]);
|
|
562
|
-
const exitingChildren = [];
|
|
563
|
-
if (presentChildren !== diffedChildren) {
|
|
564
|
-
let nextChildren = [...presentChildren,];
|
|
565
|
-
for (let i = 0; i < renderedChildren.length; i++) {
|
|
566
|
-
const child = renderedChildren[i];
|
|
567
|
-
const key7 = getChildKey(child);
|
|
568
|
-
if (!presentKeys.includes(key7)) {
|
|
569
|
-
nextChildren.splice(i, 0, child);
|
|
570
|
-
exitingChildren.push(child);
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
if (mode === 'wait' && exitingChildren.length) {
|
|
574
|
-
nextChildren = exitingChildren;
|
|
575
|
-
}
|
|
576
|
-
setRenderedChildren(onlyElements(nextChildren));
|
|
577
|
-
setDiffedChildren(presentChildren);
|
|
578
|
-
return null;
|
|
579
|
-
}
|
|
580
|
-
if (false) {
|
|
581
|
-
console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
582
|
-
}
|
|
583
|
-
const { forceRender, } = (0, react_3.useContext)(LayoutGroupContext);
|
|
584
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {
|
|
585
|
-
children: renderedChildren.map((child) => {
|
|
586
|
-
const key7 = getChildKey(child);
|
|
587
|
-
const isPresent2 = propagate && !isParentPresent ? false : presentChildren === renderedChildren || presentKeys.includes(key7);
|
|
588
|
-
const onExit = () => {
|
|
589
|
-
if (exitComplete.has(key7)) {
|
|
590
|
-
exitComplete.set(key7, true);
|
|
591
|
-
}
|
|
592
|
-
else {
|
|
593
|
-
return;
|
|
594
|
-
}
|
|
595
|
-
let isEveryExitComplete = true;
|
|
596
|
-
exitComplete.forEach((isExitComplete) => {
|
|
597
|
-
if (!isExitComplete)
|
|
598
|
-
isEveryExitComplete = false;
|
|
599
|
-
});
|
|
600
|
-
if (isEveryExitComplete) {
|
|
601
|
-
forceRender == null ? void 0 : forceRender();
|
|
602
|
-
setRenderedChildren(pendingPresentChildren.current);
|
|
603
|
-
propagate && (safeToRemove == null ? void 0 : safeToRemove());
|
|
604
|
-
onExitComplete && onExitComplete();
|
|
605
|
-
}
|
|
606
|
-
};
|
|
607
|
-
return (0, jsx_runtime_1.jsx)(PresenceChild, {
|
|
608
|
-
isPresent: isPresent2,
|
|
609
|
-
initial: !isInitialRender.current || initial ? void 0 : false,
|
|
610
|
-
custom,
|
|
611
|
-
presenceAffectsLayout,
|
|
612
|
-
mode,
|
|
613
|
-
onExitComplete: isPresent2 ? void 0 : onExit,
|
|
614
|
-
anchorX,
|
|
615
|
-
children: child,
|
|
616
|
-
}, key7);
|
|
617
|
-
}),
|
|
618
|
-
});
|
|
619
|
-
};
|
|
620
|
-
exports.AnimatePresence = AnimatePresence;
|
|
621
|
-
var DeprecatedLayoutGroupContext = (0, react_1.createContext)(null);
|
|
622
|
-
exports.DeprecatedLayoutGroupContext = DeprecatedLayoutGroupContext;
|
|
623
|
-
exports.LayoutGroupContext = DeprecatedLayoutGroupContext;
|
|
624
380
|
function addUniqueItem(arr, item) {
|
|
625
381
|
if (arr.indexOf(item) === -1)
|
|
626
382
|
arr.push(item);
|
|
@@ -667,6 +423,9 @@ var MotionGlobalConfig = {};
|
|
|
667
423
|
exports.MotionGlobalConfig = MotionGlobalConfig;
|
|
668
424
|
var isNumericalString = (v) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v);
|
|
669
425
|
exports.isNumericalString = isNumericalString;
|
|
426
|
+
function isObject(value) {
|
|
427
|
+
return typeof value === 'object' && value !== null;
|
|
428
|
+
}
|
|
670
429
|
var isZeroValueString = (v) => /^0[^.\s]+$/u.test(v);
|
|
671
430
|
exports.isZeroValueString = isZeroValueString;
|
|
672
431
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1908,13 +1667,11 @@ var JSAnimation = class extends WithPromise {
|
|
|
1908
1667
|
this.currentTime = 0;
|
|
1909
1668
|
this.holdTime = null;
|
|
1910
1669
|
this.playbackSpeed = 1;
|
|
1911
|
-
this.stop = (
|
|
1670
|
+
this.stop = () => {
|
|
1912
1671
|
var _a, _b;
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
this.tick(time.now());
|
|
1917
|
-
}
|
|
1672
|
+
const { motionValue: motionValue2, } = this.options;
|
|
1673
|
+
if (motionValue2 && motionValue2.updatedAt !== time.now()) {
|
|
1674
|
+
this.tick(time.now());
|
|
1918
1675
|
}
|
|
1919
1676
|
this.isStopped = true;
|
|
1920
1677
|
if (this.state === 'idle')
|
|
@@ -2718,14 +2475,17 @@ var NativeAnimationExtended = class extends NativeAnimation {
|
|
|
2718
2475
|
}
|
|
2719
2476
|
};
|
|
2720
2477
|
exports.NativeAnimationExtended = NativeAnimationExtended;
|
|
2721
|
-
|
|
2722
|
-
|
|
2478
|
+
function isHTMLElement(element) {
|
|
2479
|
+
return isObject(element) && 'offsetHeight' in element;
|
|
2480
|
+
}
|
|
2481
|
+
var acceleratedValues = /* @__PURE__ */ new Set(['opacity', 'clipPath', 'filter', 'transform', // TODO: Could be re-enabled now we have support for linear() easing
|
|
2723
2482
|
// "background-color"
|
|
2724
2483
|
]);
|
|
2725
2484
|
var supportsWaapi = /* @__PURE__ */ memo(() => Object.hasOwnProperty.call(Element.prototype, 'animate'));
|
|
2726
2485
|
function supportsBrowserAnimation(options) {
|
|
2486
|
+
var _a;
|
|
2727
2487
|
const { motionValue: motionValue2, name, repeatDelay, repeatType, damping, type, } = options;
|
|
2728
|
-
if (!motionValue2
|
|
2488
|
+
if (!isHTMLElement((_a = motionValue2 == null ? void 0 : motionValue2.owner) == null ? void 0 : _a.current)) {
|
|
2729
2489
|
return false;
|
|
2730
2490
|
}
|
|
2731
2491
|
const { onUpdate, transformTemplate: transformTemplate2, } = motionValue2.owner.getProps();
|
|
@@ -3362,6 +3122,123 @@ function resolveElements(elementOrSelector, scope, selectorCache) {
|
|
|
3362
3122
|
}
|
|
3363
3123
|
return Array.from(elementOrSelector);
|
|
3364
3124
|
}
|
|
3125
|
+
var getValueAsType = (value, type) => {
|
|
3126
|
+
return type && typeof value === 'number' ? type.transform(value) : value;
|
|
3127
|
+
};
|
|
3128
|
+
exports.getValueAsType = getValueAsType;
|
|
3129
|
+
function camelToDash(str) {
|
|
3130
|
+
return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);
|
|
3131
|
+
}
|
|
3132
|
+
function createSelectorEffect(subjectEffect) {
|
|
3133
|
+
return (subject, values) => {
|
|
3134
|
+
const elements = resolveElements(subject);
|
|
3135
|
+
const subscriptions = [];
|
|
3136
|
+
for (const element of elements) {
|
|
3137
|
+
const remove2 = subjectEffect(element, values);
|
|
3138
|
+
subscriptions.push(remove2);
|
|
3139
|
+
}
|
|
3140
|
+
return () => {
|
|
3141
|
+
for (const remove2 of subscriptions)
|
|
3142
|
+
remove2();
|
|
3143
|
+
};
|
|
3144
|
+
};
|
|
3145
|
+
}
|
|
3146
|
+
var MotionValueState = class {
|
|
3147
|
+
constructor() {
|
|
3148
|
+
this.latest = {};
|
|
3149
|
+
this.values = /* @__PURE__ */ new Map();
|
|
3150
|
+
}
|
|
3151
|
+
set(name, value, render, computed, useDefaultValueType = true) {
|
|
3152
|
+
const existingValue = this.values.get(name);
|
|
3153
|
+
if (existingValue) {
|
|
3154
|
+
existingValue.onRemove();
|
|
3155
|
+
}
|
|
3156
|
+
const onChange = () => {
|
|
3157
|
+
const v = value.get();
|
|
3158
|
+
if (useDefaultValueType) {
|
|
3159
|
+
this.latest[name] = getValueAsType(v, numberValueTypes[name]);
|
|
3160
|
+
}
|
|
3161
|
+
else {
|
|
3162
|
+
this.latest[name] = v;
|
|
3163
|
+
}
|
|
3164
|
+
render && frame.render(render);
|
|
3165
|
+
};
|
|
3166
|
+
onChange();
|
|
3167
|
+
const cancelOnChange = value.on('change', onChange);
|
|
3168
|
+
computed && value.addDependent(computed);
|
|
3169
|
+
const remove2 = () => {
|
|
3170
|
+
cancelOnChange();
|
|
3171
|
+
render && cancelFrame(render);
|
|
3172
|
+
this.values.delete(name);
|
|
3173
|
+
computed && value.removeDependent(computed);
|
|
3174
|
+
};
|
|
3175
|
+
this.values.set(name, {
|
|
3176
|
+
value,
|
|
3177
|
+
onRemove: remove2,
|
|
3178
|
+
});
|
|
3179
|
+
return remove2;
|
|
3180
|
+
}
|
|
3181
|
+
get(name) {
|
|
3182
|
+
var _a;
|
|
3183
|
+
return (_a = this.values.get(name)) == null ? void 0 : _a.value;
|
|
3184
|
+
}
|
|
3185
|
+
destroy() {
|
|
3186
|
+
for (const value of this.values.values()) {
|
|
3187
|
+
value.onRemove();
|
|
3188
|
+
}
|
|
3189
|
+
}
|
|
3190
|
+
};
|
|
3191
|
+
function createEffect(addValue) {
|
|
3192
|
+
const stateCache = /* @__PURE__ */ new WeakMap();
|
|
3193
|
+
const subscriptions = [];
|
|
3194
|
+
return (subject, values) => {
|
|
3195
|
+
const state = stateCache.get(subject) ?? new MotionValueState();
|
|
3196
|
+
stateCache.set(subject, state);
|
|
3197
|
+
for (const key7 in values) {
|
|
3198
|
+
const value = values[key7];
|
|
3199
|
+
const remove2 = addValue(subject, state, key7, value);
|
|
3200
|
+
subscriptions.push(remove2);
|
|
3201
|
+
}
|
|
3202
|
+
return () => {
|
|
3203
|
+
for (const cancel of subscriptions)
|
|
3204
|
+
cancel();
|
|
3205
|
+
};
|
|
3206
|
+
};
|
|
3207
|
+
}
|
|
3208
|
+
function canSetAsProperty(element, name) {
|
|
3209
|
+
if (!(name in element))
|
|
3210
|
+
return false;
|
|
3211
|
+
const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), name) ||
|
|
3212
|
+
Object.getOwnPropertyDescriptor(element, name);
|
|
3213
|
+
return descriptor && typeof descriptor.set === 'function';
|
|
3214
|
+
}
|
|
3215
|
+
var addAttrValue = (element, state, key7, value) => {
|
|
3216
|
+
const isProp = canSetAsProperty(element, key7);
|
|
3217
|
+
const name = isProp ? key7 : key7.startsWith('data') || key7.startsWith('aria') ? camelToDash(key7) : key7;
|
|
3218
|
+
const render = isProp
|
|
3219
|
+
? () => {
|
|
3220
|
+
element[name] = state.latest[key7];
|
|
3221
|
+
}
|
|
3222
|
+
: () => {
|
|
3223
|
+
const v = state.latest[key7];
|
|
3224
|
+
if (v === null || v === void 0) {
|
|
3225
|
+
element.removeAttribute(name);
|
|
3226
|
+
}
|
|
3227
|
+
else {
|
|
3228
|
+
element.setAttribute(name, String(v));
|
|
3229
|
+
}
|
|
3230
|
+
};
|
|
3231
|
+
return state.set(key7, value, render);
|
|
3232
|
+
};
|
|
3233
|
+
exports.addAttrValue = addAttrValue;
|
|
3234
|
+
var attrEffect = /* @__PURE__ */ createSelectorEffect(/* @__PURE__ */ createEffect(addAttrValue));
|
|
3235
|
+
exports.attrEffect = attrEffect;
|
|
3236
|
+
var propEffect = /* @__PURE__ */ createEffect((subject, state, key7, value) => {
|
|
3237
|
+
return state.set(key7, value, () => {
|
|
3238
|
+
subject[key7] = state.latest[key7];
|
|
3239
|
+
}, void 0, false);
|
|
3240
|
+
});
|
|
3241
|
+
exports.propEffect = propEffect;
|
|
3365
3242
|
var MAX_VELOCITY_DELTA = 30;
|
|
3366
3243
|
var isFloat = (value) => {
|
|
3367
3244
|
return !isNaN(parseFloat(value));
|
|
@@ -3654,49 +3531,6 @@ exports.MotionValue = MotionValue;
|
|
|
3654
3531
|
function motionValue(init, options) {
|
|
3655
3532
|
return new MotionValue(init, options);
|
|
3656
3533
|
}
|
|
3657
|
-
var getValueAsType = (value, type) => {
|
|
3658
|
-
return type && typeof value === 'number' ? type.transform(value) : value;
|
|
3659
|
-
};
|
|
3660
|
-
exports.getValueAsType = getValueAsType;
|
|
3661
|
-
var MotionValueState = class {
|
|
3662
|
-
constructor() {
|
|
3663
|
-
this.latest = {};
|
|
3664
|
-
this.values = /* @__PURE__ */ new Map();
|
|
3665
|
-
}
|
|
3666
|
-
set(name, value, render, computed) {
|
|
3667
|
-
const existingValue = this.values.get(name);
|
|
3668
|
-
if (existingValue) {
|
|
3669
|
-
existingValue.onRemove();
|
|
3670
|
-
}
|
|
3671
|
-
const onChange = () => {
|
|
3672
|
-
this.latest[name] = getValueAsType(value.get(), numberValueTypes[name]);
|
|
3673
|
-
render && frame.render(render);
|
|
3674
|
-
};
|
|
3675
|
-
onChange();
|
|
3676
|
-
const cancelOnChange = value.on('change', onChange);
|
|
3677
|
-
computed && value.addDependent(computed);
|
|
3678
|
-
const remove2 = () => {
|
|
3679
|
-
cancelOnChange();
|
|
3680
|
-
render && cancelFrame(render);
|
|
3681
|
-
this.values.delete(name);
|
|
3682
|
-
computed && value.removeDependent(computed);
|
|
3683
|
-
};
|
|
3684
|
-
this.values.set(name, {
|
|
3685
|
-
value,
|
|
3686
|
-
onRemove: remove2,
|
|
3687
|
-
});
|
|
3688
|
-
return remove2;
|
|
3689
|
-
}
|
|
3690
|
-
get(name) {
|
|
3691
|
-
var _a;
|
|
3692
|
-
return (_a = this.values.get(name)) == null ? void 0 : _a.value;
|
|
3693
|
-
}
|
|
3694
|
-
destroy() {
|
|
3695
|
-
for (const value of this.values.values()) {
|
|
3696
|
-
value.onRemove();
|
|
3697
|
-
}
|
|
3698
|
-
}
|
|
3699
|
-
};
|
|
3700
3534
|
var translateAlias = {
|
|
3701
3535
|
x: 'translateX',
|
|
3702
3536
|
y: 'translateY',
|
|
@@ -3727,36 +3561,32 @@ function buildTransform(state) {
|
|
|
3727
3561
|
}
|
|
3728
3562
|
return transformIsDefault ? 'none' : transform2.trim();
|
|
3729
3563
|
}
|
|
3730
|
-
var
|
|
3731
|
-
|
|
3732
|
-
const elements = resolveElements(subject);
|
|
3733
|
-
const subscriptions = [];
|
|
3734
|
-
for (let i = 0; i < elements.length; i++) {
|
|
3735
|
-
const element = elements[i];
|
|
3736
|
-
const state = stateMap.get(element) ?? new MotionValueState();
|
|
3737
|
-
stateMap.set(element, state);
|
|
3738
|
-
for (const key7 in values) {
|
|
3739
|
-
const value = values[key7];
|
|
3740
|
-
const remove2 = addValue(element, state, key7, value);
|
|
3741
|
-
subscriptions.push(remove2);
|
|
3742
|
-
}
|
|
3743
|
-
}
|
|
3744
|
-
return () => {
|
|
3745
|
-
for (const cancel of subscriptions)
|
|
3746
|
-
cancel();
|
|
3747
|
-
};
|
|
3748
|
-
}
|
|
3749
|
-
function addValue(element, state, key7, value) {
|
|
3564
|
+
var originProps = /* @__PURE__ */ new Set(['originX', 'originY', 'originZ',]);
|
|
3565
|
+
var addStyleValue = (element, state, key7, value) => {
|
|
3750
3566
|
let render = void 0;
|
|
3751
3567
|
let computed = void 0;
|
|
3752
3568
|
if (transformProps.has(key7)) {
|
|
3753
3569
|
if (!state.get('transform')) {
|
|
3570
|
+
if (!isHTMLElement(element) && !state.get('transformBox')) {
|
|
3571
|
+
addStyleValue(element, state, 'transformBox', new MotionValue('fill-box'));
|
|
3572
|
+
}
|
|
3754
3573
|
state.set('transform', new MotionValue('none'), () => {
|
|
3755
3574
|
element.style.transform = buildTransform(state);
|
|
3756
3575
|
});
|
|
3757
3576
|
}
|
|
3758
3577
|
computed = state.get('transform');
|
|
3759
3578
|
}
|
|
3579
|
+
else if (originProps.has(key7)) {
|
|
3580
|
+
if (!state.get('transformOrigin')) {
|
|
3581
|
+
state.set('transformOrigin', new MotionValue(''), () => {
|
|
3582
|
+
const originX = state.latest.originX ?? '50%';
|
|
3583
|
+
const originY = state.latest.originY ?? '50%';
|
|
3584
|
+
const originZ = state.latest.originZ ?? 0;
|
|
3585
|
+
element.style.transformOrigin = `${originX} ${originY} ${originZ}`;
|
|
3586
|
+
});
|
|
3587
|
+
}
|
|
3588
|
+
computed = state.get('transformOrigin');
|
|
3589
|
+
}
|
|
3760
3590
|
else if (isCSSVar(key7)) {
|
|
3761
3591
|
render = () => {
|
|
3762
3592
|
element.style.setProperty(key7, state.latest[key7]);
|
|
@@ -3768,6 +3598,40 @@ function addValue(element, state, key7, value) {
|
|
|
3768
3598
|
};
|
|
3769
3599
|
}
|
|
3770
3600
|
return state.set(key7, value, render, computed);
|
|
3601
|
+
};
|
|
3602
|
+
exports.addStyleValue = addStyleValue;
|
|
3603
|
+
var styleEffect = /* @__PURE__ */ createSelectorEffect(/* @__PURE__ */ createEffect(addStyleValue));
|
|
3604
|
+
exports.styleEffect = styleEffect;
|
|
3605
|
+
var toPx = px.transform;
|
|
3606
|
+
function addSVGPathValue(element, state, key7, value) {
|
|
3607
|
+
frame.render(() => element.setAttribute('pathLength', '1'));
|
|
3608
|
+
if (key7 === 'pathOffset') {
|
|
3609
|
+
return state.set(key7, value, () => element.setAttribute('stroke-dashoffset', toPx(-state.latest[key7])));
|
|
3610
|
+
}
|
|
3611
|
+
else {
|
|
3612
|
+
if (!state.get('stroke-dasharray')) {
|
|
3613
|
+
state.set('stroke-dasharray', new MotionValue('1 1'), () => {
|
|
3614
|
+
const { pathLength = 1, pathSpacing, } = state.latest;
|
|
3615
|
+
element.setAttribute('stroke-dasharray', `${toPx(pathLength)} ${toPx(pathSpacing ?? 1 - Number(pathLength))}`);
|
|
3616
|
+
});
|
|
3617
|
+
}
|
|
3618
|
+
return state.set(key7, value, void 0, state.get('stroke-dasharray'));
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
var addSVGValue = (element, state, key7, value) => {
|
|
3622
|
+
if (key7.startsWith('path')) {
|
|
3623
|
+
return addSVGPathValue(element, state, key7, value);
|
|
3624
|
+
}
|
|
3625
|
+
else if (key7.startsWith('attr')) {
|
|
3626
|
+
return addAttrValue(element, state, convertAttrKey(key7), value);
|
|
3627
|
+
}
|
|
3628
|
+
const handler = key7 in element.style ? addStyleValue : addAttrValue;
|
|
3629
|
+
return handler(element, state, key7, value);
|
|
3630
|
+
};
|
|
3631
|
+
var svgEffect = /* @__PURE__ */ createSelectorEffect(/* @__PURE__ */ createEffect(addSVGValue));
|
|
3632
|
+
exports.svgEffect = svgEffect;
|
|
3633
|
+
function convertAttrKey(key7) {
|
|
3634
|
+
return key7.replace(/^attr([A-Z])/, (_, firstChar) => firstChar.toLowerCase());
|
|
3771
3635
|
}
|
|
3772
3636
|
var { schedule: microtask, cancel: cancelMicrotask, } = /* @__PURE__ */ createRenderBatcher(queueMicrotask, false);
|
|
3773
3637
|
exports.microtask = microtask;
|
|
@@ -3935,7 +3799,7 @@ function press(targetOrSelector, onPressStart, options = {}) {
|
|
|
3935
3799
|
targets.forEach((target) => {
|
|
3936
3800
|
const pointerDownTarget = options.useGlobalTarget ? window : target;
|
|
3937
3801
|
pointerDownTarget.addEventListener('pointerdown', startPress, eventOptions);
|
|
3938
|
-
if (target
|
|
3802
|
+
if (isHTMLElement(target)) {
|
|
3939
3803
|
target.addEventListener('focus', (event) => enableKeyboardPress(event, eventOptions));
|
|
3940
3804
|
if (!isElementKeyboardAccessible(target) && !target.hasAttribute('tabindex')) {
|
|
3941
3805
|
target.tabIndex = 0;
|
|
@@ -4070,6 +3934,12 @@ function recordStats() {
|
|
|
4070
3934
|
frame.postRender(record, true);
|
|
4071
3935
|
return reportStats;
|
|
4072
3936
|
}
|
|
3937
|
+
function isSVGElement(element) {
|
|
3938
|
+
return isObject(element) && 'ownerSVGElement' in element;
|
|
3939
|
+
}
|
|
3940
|
+
function isSVGSVGElement(element) {
|
|
3941
|
+
return isSVGElement(element) && element.tagName === 'svg';
|
|
3942
|
+
}
|
|
4073
3943
|
function transform(...args) {
|
|
4074
3944
|
const useImmediate = !Array.isArray(args[0]);
|
|
4075
3945
|
const argOffset = useImmediate ? 0 : -1;
|
|
@@ -4102,6 +3972,56 @@ function mapValue(inputValue, inputRange, outputRange, options) {
|
|
|
4102
3972
|
const map2 = transform(inputRange, outputRange, options);
|
|
4103
3973
|
return transformValue(() => map2(inputValue.get()));
|
|
4104
3974
|
}
|
|
3975
|
+
var isMotionValue = (value) => Boolean(value && value.getVelocity);
|
|
3976
|
+
function springValue(source, options) {
|
|
3977
|
+
const initialValue = isMotionValue(source) ? source.get() : source;
|
|
3978
|
+
const value = motionValue(initialValue);
|
|
3979
|
+
attachSpring(value, source, options);
|
|
3980
|
+
return value;
|
|
3981
|
+
}
|
|
3982
|
+
function attachSpring(value, source, options) {
|
|
3983
|
+
const initialValue = value.get();
|
|
3984
|
+
let activeAnimation = null;
|
|
3985
|
+
let latestValue = initialValue;
|
|
3986
|
+
let latestSetter;
|
|
3987
|
+
const unit = typeof initialValue === 'string' ? initialValue.replace(/[\d.-]/g, '') : void 0;
|
|
3988
|
+
const stopAnimation2 = () => {
|
|
3989
|
+
if (activeAnimation) {
|
|
3990
|
+
activeAnimation.stop();
|
|
3991
|
+
activeAnimation = null;
|
|
3992
|
+
}
|
|
3993
|
+
};
|
|
3994
|
+
const startAnimation2 = () => {
|
|
3995
|
+
stopAnimation2();
|
|
3996
|
+
activeAnimation = new JSAnimation({
|
|
3997
|
+
keyframes: [asNumber(value.get()), asNumber(latestValue),],
|
|
3998
|
+
velocity: value.getVelocity(),
|
|
3999
|
+
type: 'spring',
|
|
4000
|
+
restDelta: 1e-3,
|
|
4001
|
+
restSpeed: 0.01,
|
|
4002
|
+
...options,
|
|
4003
|
+
onUpdate: latestSetter,
|
|
4004
|
+
});
|
|
4005
|
+
};
|
|
4006
|
+
value.attach((v, set) => {
|
|
4007
|
+
latestValue = v;
|
|
4008
|
+
latestSetter = (latest) => set(parseValue(latest, unit));
|
|
4009
|
+
frame.postRender(startAnimation2);
|
|
4010
|
+
return value.get();
|
|
4011
|
+
}, stopAnimation2);
|
|
4012
|
+
let unsubscribe = void 0;
|
|
4013
|
+
if (isMotionValue(source)) {
|
|
4014
|
+
unsubscribe = source.on('change', (v) => value.set(parseValue(v, unit)));
|
|
4015
|
+
value.on('destroy', unsubscribe);
|
|
4016
|
+
}
|
|
4017
|
+
return unsubscribe;
|
|
4018
|
+
}
|
|
4019
|
+
function parseValue(v, unit) {
|
|
4020
|
+
return unit ? v + unit : v;
|
|
4021
|
+
}
|
|
4022
|
+
function asNumber(v) {
|
|
4023
|
+
return typeof v === 'number' ? v : parseFloat(v);
|
|
4024
|
+
}
|
|
4105
4025
|
var valueTypes = [...dimensionValueTypes, color, complex,];
|
|
4106
4026
|
var findValueType = (v) => valueTypes.find(testValueType(v));
|
|
4107
4027
|
exports.findValueType = findValueType;
|
|
@@ -4386,6 +4306,255 @@ var cancelSync = stepsOrder.reduce((acc, key7) => {
|
|
|
4386
4306
|
return acc;
|
|
4387
4307
|
}, {});
|
|
4388
4308
|
exports.cancelSync = cancelSync;
|
|
4309
|
+
var MotionConfigContext = (0, react_1.createContext)({
|
|
4310
|
+
transformPagePoint: (p) => p,
|
|
4311
|
+
isStatic: false,
|
|
4312
|
+
reducedMotion: 'never',
|
|
4313
|
+
});
|
|
4314
|
+
exports.MotionConfigContext = MotionConfigContext;
|
|
4315
|
+
function usePresence(subscribe = true) {
|
|
4316
|
+
const context = (0, react_3.useContext)(PresenceContext);
|
|
4317
|
+
if (context === null)
|
|
4318
|
+
return [true, null,];
|
|
4319
|
+
const { isPresent: isPresent2, onExitComplete, register, } = context;
|
|
4320
|
+
const id4 = (0, react_3.useId)();
|
|
4321
|
+
(0, react_2.useEffect)(() => {
|
|
4322
|
+
if (subscribe) {
|
|
4323
|
+
return register(id4);
|
|
4324
|
+
}
|
|
4325
|
+
}, [subscribe,]);
|
|
4326
|
+
const safeToRemove = (0, react_3.useCallback)(() => subscribe && onExitComplete && onExitComplete(id4), [id4, onExitComplete, subscribe,]);
|
|
4327
|
+
return !isPresent2 && onExitComplete ? [false, safeToRemove,] : [true,];
|
|
4328
|
+
}
|
|
4329
|
+
function useIsPresent() {
|
|
4330
|
+
return isPresent((0, react_3.useContext)(PresenceContext));
|
|
4331
|
+
}
|
|
4332
|
+
function isPresent(context) {
|
|
4333
|
+
return context === null ? true : context.isPresent;
|
|
4334
|
+
}
|
|
4335
|
+
function useConstant(init) {
|
|
4336
|
+
const ref = (0, react_4.useRef)(null);
|
|
4337
|
+
if (ref.current === null) {
|
|
4338
|
+
ref.current = init();
|
|
4339
|
+
}
|
|
4340
|
+
return ref.current;
|
|
4341
|
+
}
|
|
4342
|
+
var PopChildMeasure = class extends React2.Component {
|
|
4343
|
+
getSnapshotBeforeUpdate(prevProps) {
|
|
4344
|
+
const element = this.props.childRef.current;
|
|
4345
|
+
if (element && prevProps.isPresent && !this.props.isPresent) {
|
|
4346
|
+
const parent = element.offsetParent;
|
|
4347
|
+
const parentWidth = isHTMLElement(parent) ? parent.offsetWidth || 0 : 0;
|
|
4348
|
+
const size = this.props.sizeRef.current;
|
|
4349
|
+
size.height = element.offsetHeight || 0;
|
|
4350
|
+
size.width = element.offsetWidth || 0;
|
|
4351
|
+
size.top = element.offsetTop;
|
|
4352
|
+
size.left = element.offsetLeft;
|
|
4353
|
+
size.right = parentWidth - size.width - size.left;
|
|
4354
|
+
}
|
|
4355
|
+
return null;
|
|
4356
|
+
}
|
|
4357
|
+
/**
|
|
4358
|
+
* Required with getSnapshotBeforeUpdate to stop React complaining.
|
|
4359
|
+
*/
|
|
4360
|
+
componentDidUpdate() { }
|
|
4361
|
+
render() {
|
|
4362
|
+
return this.props.children;
|
|
4363
|
+
}
|
|
4364
|
+
};
|
|
4365
|
+
function PopChild({ children, isPresent: isPresent2, anchorX, }) {
|
|
4366
|
+
const id4 = (0, react_3.useId)();
|
|
4367
|
+
const ref = (0, react_4.useRef)(null);
|
|
4368
|
+
const size = (0, react_4.useRef)({
|
|
4369
|
+
width: 0,
|
|
4370
|
+
height: 0,
|
|
4371
|
+
top: 0,
|
|
4372
|
+
left: 0,
|
|
4373
|
+
right: 0,
|
|
4374
|
+
});
|
|
4375
|
+
const { nonce, } = (0, react_3.useContext)(MotionConfigContext);
|
|
4376
|
+
(0, react_5.useInsertionEffect)(() => {
|
|
4377
|
+
const { width, height, top, left, right, } = size.current;
|
|
4378
|
+
if (isPresent2 || !ref.current || !width || !height)
|
|
4379
|
+
return;
|
|
4380
|
+
const x = anchorX === 'left' ? `left: ${left}` : `right: ${right}`;
|
|
4381
|
+
ref.current.dataset.motionPopId = id4;
|
|
4382
|
+
const style2 = document.createElement('style');
|
|
4383
|
+
if (nonce)
|
|
4384
|
+
style2.nonce = nonce;
|
|
4385
|
+
document.head.appendChild(style2);
|
|
4386
|
+
if (style2.sheet) {
|
|
4387
|
+
style2.sheet.insertRule(`
|
|
4388
|
+
[data-motion-pop-id="${id4}"] {
|
|
4389
|
+
position: absolute !important;
|
|
4390
|
+
width: ${width}px !important;
|
|
4391
|
+
height: ${height}px !important;
|
|
4392
|
+
${x}px !important;
|
|
4393
|
+
top: ${top}px !important;
|
|
4394
|
+
}
|
|
4395
|
+
`);
|
|
4396
|
+
}
|
|
4397
|
+
return () => {
|
|
4398
|
+
if (document.head.contains(style2)) {
|
|
4399
|
+
document.head.removeChild(style2);
|
|
4400
|
+
}
|
|
4401
|
+
};
|
|
4402
|
+
}, [isPresent2,]);
|
|
4403
|
+
return (0, jsx_runtime_1.jsx)(PopChildMeasure, {
|
|
4404
|
+
isPresent: isPresent2,
|
|
4405
|
+
childRef: ref,
|
|
4406
|
+
sizeRef: size,
|
|
4407
|
+
children: React2.cloneElement(children, {
|
|
4408
|
+
ref,
|
|
4409
|
+
}),
|
|
4410
|
+
});
|
|
4411
|
+
}
|
|
4412
|
+
var PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, }) => {
|
|
4413
|
+
const presenceChildren = useConstant(newChildrenMap);
|
|
4414
|
+
const id4 = (0, react_3.useId)();
|
|
4415
|
+
let isReusedContext = true;
|
|
4416
|
+
let context = (0, react_4.useMemo)(() => {
|
|
4417
|
+
isReusedContext = false;
|
|
4418
|
+
return {
|
|
4419
|
+
id: id4,
|
|
4420
|
+
initial,
|
|
4421
|
+
isPresent: isPresent2,
|
|
4422
|
+
custom,
|
|
4423
|
+
onExitComplete: (childId) => {
|
|
4424
|
+
presenceChildren.set(childId, true);
|
|
4425
|
+
for (const isComplete of presenceChildren.values()) {
|
|
4426
|
+
if (!isComplete)
|
|
4427
|
+
return;
|
|
4428
|
+
}
|
|
4429
|
+
onExitComplete && onExitComplete();
|
|
4430
|
+
},
|
|
4431
|
+
register: (childId) => {
|
|
4432
|
+
presenceChildren.set(childId, false);
|
|
4433
|
+
return () => presenceChildren.delete(childId);
|
|
4434
|
+
},
|
|
4435
|
+
};
|
|
4436
|
+
}, [isPresent2, presenceChildren, onExitComplete,]);
|
|
4437
|
+
if (presenceAffectsLayout && isReusedContext) {
|
|
4438
|
+
context = {
|
|
4439
|
+
...context,
|
|
4440
|
+
};
|
|
4441
|
+
}
|
|
4442
|
+
(0, react_4.useMemo)(() => {
|
|
4443
|
+
presenceChildren.forEach((_, key7) => presenceChildren.set(key7, false));
|
|
4444
|
+
}, [isPresent2,]);
|
|
4445
|
+
React2.useEffect(() => {
|
|
4446
|
+
!isPresent2 && !presenceChildren.size && onExitComplete && onExitComplete();
|
|
4447
|
+
}, [isPresent2,]);
|
|
4448
|
+
if (mode === 'popLayout') {
|
|
4449
|
+
children = (0, jsx_runtime_1.jsx)(PopChild, {
|
|
4450
|
+
isPresent: isPresent2,
|
|
4451
|
+
anchorX,
|
|
4452
|
+
children,
|
|
4453
|
+
});
|
|
4454
|
+
}
|
|
4455
|
+
return (0, jsx_runtime_1.jsx)(PresenceContext.Provider, {
|
|
4456
|
+
value: context,
|
|
4457
|
+
children,
|
|
4458
|
+
});
|
|
4459
|
+
};
|
|
4460
|
+
function newChildrenMap() {
|
|
4461
|
+
return /* @__PURE__ */ new Map();
|
|
4462
|
+
}
|
|
4463
|
+
var getChildKey = (child) => child.key || '';
|
|
4464
|
+
function onlyElements(children) {
|
|
4465
|
+
const filtered = [];
|
|
4466
|
+
react_6.Children.forEach(children, (child) => {
|
|
4467
|
+
if ((0, react_6.isValidElement)(child))
|
|
4468
|
+
filtered.push(child);
|
|
4469
|
+
});
|
|
4470
|
+
return filtered;
|
|
4471
|
+
}
|
|
4472
|
+
var AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = 'sync', propagate = false, anchorX = 'left', }) => {
|
|
4473
|
+
const [isParentPresent, safeToRemove,] = usePresence(propagate);
|
|
4474
|
+
const presentChildren = (0, react_4.useMemo)(() => onlyElements(children), [children,]);
|
|
4475
|
+
const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);
|
|
4476
|
+
const isInitialRender = (0, react_4.useRef)(true);
|
|
4477
|
+
const pendingPresentChildren = (0, react_4.useRef)(presentChildren);
|
|
4478
|
+
const exitComplete = useConstant(() => /* @__PURE__ */ new Map());
|
|
4479
|
+
const [diffedChildren, setDiffedChildren,] = (0, react_4.useState)(presentChildren);
|
|
4480
|
+
const [renderedChildren, setRenderedChildren,] = (0, react_4.useState)(presentChildren);
|
|
4481
|
+
useIsomorphicLayoutEffect(() => {
|
|
4482
|
+
isInitialRender.current = false;
|
|
4483
|
+
pendingPresentChildren.current = presentChildren;
|
|
4484
|
+
for (let i = 0; i < renderedChildren.length; i++) {
|
|
4485
|
+
const key7 = getChildKey(renderedChildren[i]);
|
|
4486
|
+
if (!presentKeys.includes(key7)) {
|
|
4487
|
+
if (exitComplete.get(key7) !== true) {
|
|
4488
|
+
exitComplete.set(key7, false);
|
|
4489
|
+
}
|
|
4490
|
+
}
|
|
4491
|
+
else {
|
|
4492
|
+
exitComplete.delete(key7);
|
|
4493
|
+
}
|
|
4494
|
+
}
|
|
4495
|
+
}, [renderedChildren, presentKeys.length, presentKeys.join('-'),]);
|
|
4496
|
+
const exitingChildren = [];
|
|
4497
|
+
if (presentChildren !== diffedChildren) {
|
|
4498
|
+
let nextChildren = [...presentChildren,];
|
|
4499
|
+
for (let i = 0; i < renderedChildren.length; i++) {
|
|
4500
|
+
const child = renderedChildren[i];
|
|
4501
|
+
const key7 = getChildKey(child);
|
|
4502
|
+
if (!presentKeys.includes(key7)) {
|
|
4503
|
+
nextChildren.splice(i, 0, child);
|
|
4504
|
+
exitingChildren.push(child);
|
|
4505
|
+
}
|
|
4506
|
+
}
|
|
4507
|
+
if (mode === 'wait' && exitingChildren.length) {
|
|
4508
|
+
nextChildren = exitingChildren;
|
|
4509
|
+
}
|
|
4510
|
+
setRenderedChildren(onlyElements(nextChildren));
|
|
4511
|
+
setDiffedChildren(presentChildren);
|
|
4512
|
+
return null;
|
|
4513
|
+
}
|
|
4514
|
+
if (false) {
|
|
4515
|
+
console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
4516
|
+
}
|
|
4517
|
+
const { forceRender, } = (0, react_3.useContext)(LayoutGroupContext);
|
|
4518
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {
|
|
4519
|
+
children: renderedChildren.map((child) => {
|
|
4520
|
+
const key7 = getChildKey(child);
|
|
4521
|
+
const isPresent2 = propagate && !isParentPresent ? false : presentChildren === renderedChildren || presentKeys.includes(key7);
|
|
4522
|
+
const onExit = () => {
|
|
4523
|
+
if (exitComplete.has(key7)) {
|
|
4524
|
+
exitComplete.set(key7, true);
|
|
4525
|
+
}
|
|
4526
|
+
else {
|
|
4527
|
+
return;
|
|
4528
|
+
}
|
|
4529
|
+
let isEveryExitComplete = true;
|
|
4530
|
+
exitComplete.forEach((isExitComplete) => {
|
|
4531
|
+
if (!isExitComplete)
|
|
4532
|
+
isEveryExitComplete = false;
|
|
4533
|
+
});
|
|
4534
|
+
if (isEveryExitComplete) {
|
|
4535
|
+
forceRender == null ? void 0 : forceRender();
|
|
4536
|
+
setRenderedChildren(pendingPresentChildren.current);
|
|
4537
|
+
propagate && (safeToRemove == null ? void 0 : safeToRemove());
|
|
4538
|
+
onExitComplete && onExitComplete();
|
|
4539
|
+
}
|
|
4540
|
+
};
|
|
4541
|
+
return (0, jsx_runtime_1.jsx)(PresenceChild, {
|
|
4542
|
+
isPresent: isPresent2,
|
|
4543
|
+
initial: !isInitialRender.current || initial ? void 0 : false,
|
|
4544
|
+
custom,
|
|
4545
|
+
presenceAffectsLayout,
|
|
4546
|
+
mode,
|
|
4547
|
+
onExitComplete: isPresent2 ? void 0 : onExit,
|
|
4548
|
+
anchorX,
|
|
4549
|
+
children: child,
|
|
4550
|
+
}, key7);
|
|
4551
|
+
}),
|
|
4552
|
+
});
|
|
4553
|
+
};
|
|
4554
|
+
exports.AnimatePresence = AnimatePresence;
|
|
4555
|
+
var DeprecatedLayoutGroupContext = (0, react_1.createContext)(null);
|
|
4556
|
+
exports.DeprecatedLayoutGroupContext = DeprecatedLayoutGroupContext;
|
|
4557
|
+
exports.LayoutGroupContext = DeprecatedLayoutGroupContext;
|
|
4389
4558
|
function useIsMounted() {
|
|
4390
4559
|
const isMounted = (0, react_4.useRef)(false);
|
|
4391
4560
|
useIsomorphicLayoutEffect(() => {
|
|
@@ -4584,9 +4753,9 @@ function MotionConfig({ children, isValidProp, ...config }) {
|
|
|
4584
4753
|
}
|
|
4585
4754
|
var MotionContext = /* @__PURE__ */ (0, react_1.createContext)({});
|
|
4586
4755
|
exports.MotionContext = MotionContext;
|
|
4587
|
-
var
|
|
4756
|
+
var camelToDash2 = (str) => str.replace(/([a-z])([A-Z])/gu, '$1-$2').toLowerCase();
|
|
4588
4757
|
var optimizedAppearDataId = 'framerAppearId';
|
|
4589
|
-
var optimizedAppearDataAttribute = 'data-' +
|
|
4758
|
+
var optimizedAppearDataAttribute = 'data-' + camelToDash2(optimizedAppearDataId);
|
|
4590
4759
|
exports.optimizedAppearDataAttribute = optimizedAppearDataAttribute;
|
|
4591
4760
|
var SwitchLayoutGroupContext = (0, react_1.createContext)({});
|
|
4592
4761
|
exports.SwitchLayoutGroupContext = SwitchLayoutGroupContext;
|
|
@@ -4812,7 +4981,6 @@ function addScaleCorrector(correctors) {
|
|
|
4812
4981
|
}
|
|
4813
4982
|
}
|
|
4814
4983
|
}
|
|
4815
|
-
var isMotionValue = (value) => Boolean(value && value.getVelocity);
|
|
4816
4984
|
var translateAlias2 = {
|
|
4817
4985
|
x: 'translateX',
|
|
4818
4986
|
y: 'translateY',
|
|
@@ -5047,59 +5215,6 @@ function useHTMLProps(props, visualState) {
|
|
|
5047
5215
|
htmlProps.style = style2;
|
|
5048
5216
|
return htmlProps;
|
|
5049
5217
|
}
|
|
5050
|
-
var lowercaseSVGElements = [
|
|
5051
|
-
'animate',
|
|
5052
|
-
'circle',
|
|
5053
|
-
'defs',
|
|
5054
|
-
'desc',
|
|
5055
|
-
'ellipse',
|
|
5056
|
-
'g',
|
|
5057
|
-
'image',
|
|
5058
|
-
'line',
|
|
5059
|
-
'filter',
|
|
5060
|
-
'marker',
|
|
5061
|
-
'mask',
|
|
5062
|
-
'metadata',
|
|
5063
|
-
'path',
|
|
5064
|
-
'pattern',
|
|
5065
|
-
'polygon',
|
|
5066
|
-
'polyline',
|
|
5067
|
-
'rect',
|
|
5068
|
-
'stop',
|
|
5069
|
-
'switch',
|
|
5070
|
-
'symbol',
|
|
5071
|
-
'svg',
|
|
5072
|
-
'text',
|
|
5073
|
-
'tspan',
|
|
5074
|
-
'use',
|
|
5075
|
-
'view',
|
|
5076
|
-
];
|
|
5077
|
-
function isSVGComponent(Component33) {
|
|
5078
|
-
if (
|
|
5079
|
-
/**
|
|
5080
|
-
* If it's not a string, it's a custom React component. Currently we only support
|
|
5081
|
-
* HTML custom React components.
|
|
5082
|
-
*/
|
|
5083
|
-
typeof Component33 !== 'string' ||
|
|
5084
|
-
/**
|
|
5085
|
-
* If it contains a dash, the element is a custom HTML webcomponent.
|
|
5086
|
-
*/
|
|
5087
|
-
Component33.includes('-')) {
|
|
5088
|
-
return false;
|
|
5089
|
-
}
|
|
5090
|
-
else if (
|
|
5091
|
-
/**
|
|
5092
|
-
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
5093
|
-
*/
|
|
5094
|
-
lowercaseSVGElements.indexOf(Component33) > -1 ||
|
|
5095
|
-
/**
|
|
5096
|
-
* If it contains a capital letter, it's an SVG component
|
|
5097
|
-
*/
|
|
5098
|
-
/[A-Z]/u.test(Component33)) {
|
|
5099
|
-
return true;
|
|
5100
|
-
}
|
|
5101
|
-
return false;
|
|
5102
|
-
}
|
|
5103
5218
|
var dashKeys = {
|
|
5104
5219
|
offset: 'stroke-dashoffset',
|
|
5105
5220
|
array: 'stroke-dasharray',
|
|
@@ -5177,6 +5292,59 @@ function useSVGProps(props, visualState, _isStatic, Component33) {
|
|
|
5177
5292
|
}
|
|
5178
5293
|
return visualProps;
|
|
5179
5294
|
}
|
|
5295
|
+
var lowercaseSVGElements = [
|
|
5296
|
+
'animate',
|
|
5297
|
+
'circle',
|
|
5298
|
+
'defs',
|
|
5299
|
+
'desc',
|
|
5300
|
+
'ellipse',
|
|
5301
|
+
'g',
|
|
5302
|
+
'image',
|
|
5303
|
+
'line',
|
|
5304
|
+
'filter',
|
|
5305
|
+
'marker',
|
|
5306
|
+
'mask',
|
|
5307
|
+
'metadata',
|
|
5308
|
+
'path',
|
|
5309
|
+
'pattern',
|
|
5310
|
+
'polygon',
|
|
5311
|
+
'polyline',
|
|
5312
|
+
'rect',
|
|
5313
|
+
'stop',
|
|
5314
|
+
'switch',
|
|
5315
|
+
'symbol',
|
|
5316
|
+
'svg',
|
|
5317
|
+
'text',
|
|
5318
|
+
'tspan',
|
|
5319
|
+
'use',
|
|
5320
|
+
'view',
|
|
5321
|
+
];
|
|
5322
|
+
function isSVGComponent(Component33) {
|
|
5323
|
+
if (
|
|
5324
|
+
/**
|
|
5325
|
+
* If it's not a string, it's a custom React component. Currently we only support
|
|
5326
|
+
* HTML custom React components.
|
|
5327
|
+
*/
|
|
5328
|
+
typeof Component33 !== 'string' ||
|
|
5329
|
+
/**
|
|
5330
|
+
* If it contains a dash, the element is a custom HTML webcomponent.
|
|
5331
|
+
*/
|
|
5332
|
+
Component33.includes('-')) {
|
|
5333
|
+
return false;
|
|
5334
|
+
}
|
|
5335
|
+
else if (
|
|
5336
|
+
/**
|
|
5337
|
+
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
5338
|
+
*/
|
|
5339
|
+
lowercaseSVGElements.indexOf(Component33) > -1 ||
|
|
5340
|
+
/**
|
|
5341
|
+
* If it contains a capital letter, it's an SVG component
|
|
5342
|
+
*/
|
|
5343
|
+
/[A-Z]/u.test(Component33)) {
|
|
5344
|
+
return true;
|
|
5345
|
+
}
|
|
5346
|
+
return false;
|
|
5347
|
+
}
|
|
5180
5348
|
function createUseRender(forwardMotionProps = false) {
|
|
5181
5349
|
const useRender = (Component33, props, ref, { latestValues, }, isStatic) => {
|
|
5182
5350
|
const useVisualProps = isSVGComponent(Component33) ? useSVGProps : useHTMLProps;
|
|
@@ -7348,12 +7516,9 @@ function animateSingleValue(value, keyframes2, options) {
|
|
|
7348
7516
|
motionValue$1.start(animateMotionValue('', motionValue$1, keyframes2, options));
|
|
7349
7517
|
return motionValue$1.animation;
|
|
7350
7518
|
}
|
|
7351
|
-
function isSVGElement(element) {
|
|
7352
|
-
return element instanceof SVGElement && element.tagName !== 'svg';
|
|
7353
|
-
}
|
|
7354
7519
|
var borders = ['TopLeft', 'TopRight', 'BottomLeft', 'BottomRight',];
|
|
7355
7520
|
var numBorders = borders.length;
|
|
7356
|
-
var
|
|
7521
|
+
var asNumber2 = (value) => typeof value === 'string' ? parseFloat(value) : value;
|
|
7357
7522
|
var isPx = (value) => typeof value === 'number' || px.test(value);
|
|
7358
7523
|
function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOnlyMember) {
|
|
7359
7524
|
if (shouldCrossfadeOpacity) {
|
|
@@ -7373,7 +7538,7 @@ function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOn
|
|
|
7373
7538
|
leadRadius || (leadRadius = 0);
|
|
7374
7539
|
const canMix = followRadius === 0 || leadRadius === 0 || isPx(followRadius) === isPx(leadRadius);
|
|
7375
7540
|
if (canMix) {
|
|
7376
|
-
target[borderLabel] = Math.max(mixNumber(
|
|
7541
|
+
target[borderLabel] = Math.max(mixNumber(asNumber2(followRadius), asNumber2(leadRadius), progress2), 0);
|
|
7377
7542
|
if (percent.test(leadRadius) || percent.test(followRadius)) {
|
|
7378
7543
|
target[borderLabel] += '%';
|
|
7379
7544
|
}
|
|
@@ -7714,7 +7879,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
|
|
|
7714
7879
|
mount(instance) {
|
|
7715
7880
|
if (this.instance)
|
|
7716
7881
|
return;
|
|
7717
|
-
this.isSVG = isSVGElement(instance);
|
|
7882
|
+
this.isSVG = isSVGElement(instance) && !isSVGSVGElement(instance);
|
|
7718
7883
|
this.instance = instance;
|
|
7719
7884
|
const { layoutId, layout: layout2, visualElement, } = this.options;
|
|
7720
7885
|
if (visualElement && !visualElement.current) {
|
|
@@ -7758,7 +7923,6 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
|
|
|
7758
7923
|
this.resumingFrom = this.resumeFrom;
|
|
7759
7924
|
this.resumingFrom.resumingFrom = void 0;
|
|
7760
7925
|
}
|
|
7761
|
-
this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
|
|
7762
7926
|
const animationOptions = {
|
|
7763
7927
|
...getValueTransition(layoutTransition, 'layout'),
|
|
7764
7928
|
onPlay: onLayoutAnimationStart,
|
|
@@ -7769,6 +7933,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
|
|
|
7769
7933
|
animationOptions.type = false;
|
|
7770
7934
|
}
|
|
7771
7935
|
this.startAnimation(animationOptions);
|
|
7936
|
+
this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
|
|
7772
7937
|
}
|
|
7773
7938
|
else {
|
|
7774
7939
|
if (!hasLayoutChanged) {
|
|
@@ -8294,8 +8459,8 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
|
|
|
8294
8459
|
startAnimation(options) {
|
|
8295
8460
|
var _a, _b, _c;
|
|
8296
8461
|
this.notifyListeners('animationStart');
|
|
8297
|
-
(_a = this.currentAnimation) == null ? void 0 : _a.stop(
|
|
8298
|
-
(_c = (_b = this.resumingFrom) == null ? void 0 : _b.currentAnimation) == null ? void 0 : _c.stop(
|
|
8462
|
+
(_a = this.currentAnimation) == null ? void 0 : _a.stop();
|
|
8463
|
+
(_c = (_b = this.resumingFrom) == null ? void 0 : _b.currentAnimation) == null ? void 0 : _c.stop();
|
|
8299
8464
|
if (this.pendingAnimation) {
|
|
8300
8465
|
cancelFrame(this.pendingAnimation);
|
|
8301
8466
|
this.pendingAnimation = void 0;
|
|
@@ -8339,7 +8504,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
|
|
|
8339
8504
|
finishAnimation() {
|
|
8340
8505
|
if (this.currentAnimation) {
|
|
8341
8506
|
this.mixTargetDelta && this.mixTargetDelta(animationTarget);
|
|
8342
|
-
this.currentAnimation.stop(
|
|
8507
|
+
this.currentAnimation.stop();
|
|
8343
8508
|
}
|
|
8344
8509
|
this.completeAnimation();
|
|
8345
8510
|
}
|
|
@@ -8529,7 +8694,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
|
|
|
8529
8694
|
resetTree() {
|
|
8530
8695
|
this.root.nodes.forEach((node) => {
|
|
8531
8696
|
var _a;
|
|
8532
|
-
return (_a = node.currentAnimation) == null ? void 0 : _a.stop(
|
|
8697
|
+
return (_a = node.currentAnimation) == null ? void 0 : _a.stop();
|
|
8533
8698
|
});
|
|
8534
8699
|
this.root.nodes.forEach(clearMeasurements);
|
|
8535
8700
|
this.root.sharedNodes.clear();
|
|
@@ -9027,7 +9192,7 @@ var camelCaseAttributes = /* @__PURE__ */ new Set([
|
|
|
9027
9192
|
function renderSVG(element, renderState, _styleProp, projection) {
|
|
9028
9193
|
renderHTML(element, renderState, void 0, projection);
|
|
9029
9194
|
for (const key7 in renderState.attrs) {
|
|
9030
|
-
element.setAttribute(!camelCaseAttributes.has(key7) ?
|
|
9195
|
+
element.setAttribute(!camelCaseAttributes.has(key7) ? camelToDash2(key7) : key7, renderState.attrs[key7]);
|
|
9031
9196
|
}
|
|
9032
9197
|
}
|
|
9033
9198
|
var SVGVisualElement = class extends DOMVisualElement {
|
|
@@ -9045,7 +9210,7 @@ var SVGVisualElement = class extends DOMVisualElement {
|
|
|
9045
9210
|
const defaultType = getDefaultValueType(key7);
|
|
9046
9211
|
return defaultType ? defaultType.default || 0 : 0;
|
|
9047
9212
|
}
|
|
9048
|
-
key7 = !camelCaseAttributes.has(key7) ?
|
|
9213
|
+
key7 = !camelCaseAttributes.has(key7) ? camelToDash2(key7) : key7;
|
|
9049
9214
|
return instance.getAttribute(key7);
|
|
9050
9215
|
}
|
|
9051
9216
|
scrapeMotionValuesFromProps(props, prevProps, visualElement) {
|
|
@@ -9108,7 +9273,7 @@ function getElementSize(target, borderBoxSize) {
|
|
|
9108
9273
|
height: blockSize,
|
|
9109
9274
|
};
|
|
9110
9275
|
}
|
|
9111
|
-
else if (target
|
|
9276
|
+
else if (isSVGElement(target) && 'getBBox' in target) {
|
|
9112
9277
|
return target.getBBox();
|
|
9113
9278
|
}
|
|
9114
9279
|
else {
|
|
@@ -9244,7 +9409,7 @@ function calcInset(element, container) {
|
|
|
9244
9409
|
};
|
|
9245
9410
|
let current2 = element;
|
|
9246
9411
|
while (current2 && current2 !== container) {
|
|
9247
|
-
if (current2
|
|
9412
|
+
if (isHTMLElement(current2)) {
|
|
9248
9413
|
inset2.x += current2.offsetLeft;
|
|
9249
9414
|
inset2.y += current2.offsetTop;
|
|
9250
9415
|
current2 = current2.offsetParent;
|
|
@@ -9402,8 +9567,8 @@ function measure(container, target = container, info) {
|
|
|
9402
9567
|
}
|
|
9403
9568
|
function createOnScrollHandler(element, onScroll, info, options = {}) {
|
|
9404
9569
|
return {
|
|
9405
|
-
measure: () =>
|
|
9406
|
-
|
|
9570
|
+
measure: (time2) => {
|
|
9571
|
+
measure(element, options.target, info);
|
|
9407
9572
|
updateScrollInfo(element, info, time2);
|
|
9408
9573
|
if (options.offset || options.target) {
|
|
9409
9574
|
resolveOffsets(element, info, options);
|
|
@@ -9429,23 +9594,17 @@ function scrollInfo(onScroll, { container = document.scrollingElement, ...option
|
|
|
9429
9594
|
containerHandlers.add(containerHandler);
|
|
9430
9595
|
if (!scrollListeners.has(container)) {
|
|
9431
9596
|
const measureAll = () => {
|
|
9432
|
-
for (const handler of containerHandlers)
|
|
9433
|
-
handler.measure();
|
|
9434
|
-
};
|
|
9435
|
-
const updateAll = () => {
|
|
9436
9597
|
for (const handler of containerHandlers) {
|
|
9437
|
-
handler.
|
|
9598
|
+
handler.measure(frameData.timestamp);
|
|
9438
9599
|
}
|
|
9600
|
+
frame.preUpdate(notifyAll2);
|
|
9439
9601
|
};
|
|
9440
9602
|
const notifyAll2 = () => {
|
|
9441
|
-
for (const handler of containerHandlers)
|
|
9603
|
+
for (const handler of containerHandlers) {
|
|
9442
9604
|
handler.notify();
|
|
9605
|
+
}
|
|
9443
9606
|
};
|
|
9444
|
-
const listener2 = () =>
|
|
9445
|
-
frame.read(measureAll);
|
|
9446
|
-
frame.read(updateAll);
|
|
9447
|
-
frame.preUpdate(notifyAll2);
|
|
9448
|
-
};
|
|
9607
|
+
const listener2 = () => frame.read(measureAll);
|
|
9449
9608
|
scrollListeners.set(container, listener2);
|
|
9450
9609
|
const target = getEventTarget(container);
|
|
9451
9610
|
window.addEventListener('resize', listener2, {
|
|
@@ -9631,74 +9790,6 @@ function useMotionTemplate(fragments, ...values) {
|
|
|
9631
9790
|
}
|
|
9632
9791
|
return useCombineMotionValues(values.filter(isMotionValue), buildValue);
|
|
9633
9792
|
}
|
|
9634
|
-
function useSpring(source, config = {}) {
|
|
9635
|
-
const { isStatic, } = (0, react_3.useContext)(MotionConfigContext);
|
|
9636
|
-
const activeSpringAnimation = (0, react_4.useRef)(null);
|
|
9637
|
-
const initialValue = useConstant(() => isMotionValue(source) ? source.get() : source);
|
|
9638
|
-
const unit = useConstant(() => typeof initialValue === 'string' ? initialValue.replace(/[\d.-]/g, '') : void 0);
|
|
9639
|
-
const value = useMotionValue(initialValue);
|
|
9640
|
-
const latestValue = (0, react_4.useRef)(initialValue);
|
|
9641
|
-
const latestSetter = (0, react_4.useRef)(noop);
|
|
9642
|
-
const startAnimation2 = () => {
|
|
9643
|
-
stopAnimation2();
|
|
9644
|
-
activeSpringAnimation.current = new JSAnimation({
|
|
9645
|
-
keyframes: [asNumber2(value.get()), asNumber2(latestValue.current),],
|
|
9646
|
-
velocity: value.getVelocity(),
|
|
9647
|
-
type: 'spring',
|
|
9648
|
-
restDelta: 1e-3,
|
|
9649
|
-
restSpeed: 0.01,
|
|
9650
|
-
...config,
|
|
9651
|
-
onUpdate: latestSetter.current,
|
|
9652
|
-
});
|
|
9653
|
-
};
|
|
9654
|
-
const stopAnimation2 = () => {
|
|
9655
|
-
if (activeSpringAnimation.current) {
|
|
9656
|
-
activeSpringAnimation.current.stop();
|
|
9657
|
-
}
|
|
9658
|
-
};
|
|
9659
|
-
(0, react_5.useInsertionEffect)(() => {
|
|
9660
|
-
return value.attach((v, set) => {
|
|
9661
|
-
if (isStatic)
|
|
9662
|
-
return set(v);
|
|
9663
|
-
latestValue.current = v;
|
|
9664
|
-
latestSetter.current = (latest) => set(parseValue(latest, unit));
|
|
9665
|
-
frame.postRender(startAnimation2);
|
|
9666
|
-
return value.get();
|
|
9667
|
-
}, stopAnimation2);
|
|
9668
|
-
}, [JSON.stringify(config),]);
|
|
9669
|
-
useIsomorphicLayoutEffect(() => {
|
|
9670
|
-
if (isMotionValue(source)) {
|
|
9671
|
-
return source.on('change', (v) => value.set(parseValue(v, unit)));
|
|
9672
|
-
}
|
|
9673
|
-
}, [value, unit,]);
|
|
9674
|
-
return value;
|
|
9675
|
-
}
|
|
9676
|
-
function parseValue(v, unit) {
|
|
9677
|
-
return unit ? v + unit : v;
|
|
9678
|
-
}
|
|
9679
|
-
function asNumber2(v) {
|
|
9680
|
-
return typeof v === 'number' ? v : parseFloat(v);
|
|
9681
|
-
}
|
|
9682
|
-
function useAnimationFrame(callback) {
|
|
9683
|
-
const initialTimestamp = (0, react_4.useRef)(0);
|
|
9684
|
-
const { isStatic, } = (0, react_3.useContext)(MotionConfigContext);
|
|
9685
|
-
(0, react_2.useEffect)(() => {
|
|
9686
|
-
if (isStatic)
|
|
9687
|
-
return;
|
|
9688
|
-
const provideTimeSinceStart = ({ timestamp, delta, }) => {
|
|
9689
|
-
if (!initialTimestamp.current)
|
|
9690
|
-
initialTimestamp.current = timestamp;
|
|
9691
|
-
callback(timestamp - initialTimestamp.current, delta);
|
|
9692
|
-
};
|
|
9693
|
-
frame.update(provideTimeSinceStart, true);
|
|
9694
|
-
return () => cancelFrame(provideTimeSinceStart);
|
|
9695
|
-
}, [callback,]);
|
|
9696
|
-
}
|
|
9697
|
-
function useTime() {
|
|
9698
|
-
const time2 = useMotionValue(0);
|
|
9699
|
-
useAnimationFrame((t) => time2.set(t));
|
|
9700
|
-
return time2;
|
|
9701
|
-
}
|
|
9702
9793
|
function useComputed(compute) {
|
|
9703
9794
|
collectMotionValues.current = [];
|
|
9704
9795
|
compute();
|
|
@@ -9726,6 +9817,38 @@ function useListTransform(values, transformer) {
|
|
|
9726
9817
|
return transformer(latest);
|
|
9727
9818
|
});
|
|
9728
9819
|
}
|
|
9820
|
+
function useSpring(source, options = {}) {
|
|
9821
|
+
const { isStatic, } = (0, react_3.useContext)(MotionConfigContext);
|
|
9822
|
+
const getFromSource = () => isMotionValue(source) ? source.get() : source;
|
|
9823
|
+
if (isStatic) {
|
|
9824
|
+
return useTransform(getFromSource);
|
|
9825
|
+
}
|
|
9826
|
+
const value = useMotionValue(getFromSource());
|
|
9827
|
+
(0, react_5.useInsertionEffect)(() => {
|
|
9828
|
+
return attachSpring(value, source, options);
|
|
9829
|
+
}, [value, JSON.stringify(options),]);
|
|
9830
|
+
return value;
|
|
9831
|
+
}
|
|
9832
|
+
function useAnimationFrame(callback) {
|
|
9833
|
+
const initialTimestamp = (0, react_4.useRef)(0);
|
|
9834
|
+
const { isStatic, } = (0, react_3.useContext)(MotionConfigContext);
|
|
9835
|
+
(0, react_2.useEffect)(() => {
|
|
9836
|
+
if (isStatic)
|
|
9837
|
+
return;
|
|
9838
|
+
const provideTimeSinceStart = ({ timestamp, delta, }) => {
|
|
9839
|
+
if (!initialTimestamp.current)
|
|
9840
|
+
initialTimestamp.current = timestamp;
|
|
9841
|
+
callback(timestamp - initialTimestamp.current, delta);
|
|
9842
|
+
};
|
|
9843
|
+
frame.update(provideTimeSinceStart, true);
|
|
9844
|
+
return () => cancelFrame(provideTimeSinceStart);
|
|
9845
|
+
}, [callback,]);
|
|
9846
|
+
}
|
|
9847
|
+
function useTime() {
|
|
9848
|
+
const time2 = useMotionValue(0);
|
|
9849
|
+
useAnimationFrame((t) => time2.set(t));
|
|
9850
|
+
return time2;
|
|
9851
|
+
}
|
|
9729
9852
|
function useVelocity(value) {
|
|
9730
9853
|
const velocity = useMotionValue(value.getVelocity());
|
|
9731
9854
|
const updateVelocity = () => {
|
|
@@ -10128,7 +10251,7 @@ function createDOMVisualElement(element) {
|
|
|
10128
10251
|
latestValues: {},
|
|
10129
10252
|
},
|
|
10130
10253
|
};
|
|
10131
|
-
const node = isSVGElement(element) ? new SVGVisualElement(options) : new HTMLVisualElement(options);
|
|
10254
|
+
const node = isSVGElement(element) && !isSVGSVGElement(element) ? new SVGVisualElement(options) : new HTMLVisualElement(options);
|
|
10132
10255
|
node.mount(element);
|
|
10133
10256
|
visualElementStore.set(element, node);
|
|
10134
10257
|
}
|
|
@@ -10836,7 +10959,7 @@ function stagger(duration = 0.1, { startDelay = 0, from = 0, ease: ease2, } = {}
|
|
|
10836
10959
|
return startDelay + delay2;
|
|
10837
10960
|
};
|
|
10838
10961
|
}
|
|
10839
|
-
// /:https://app.framerstatic.com/framer.
|
|
10962
|
+
// /:https://app.framerstatic.com/framer.C2MZBAEL.mjs
|
|
10840
10963
|
const react_10 = require("react");
|
|
10841
10964
|
const react_11 = __importDefault(require("react"));
|
|
10842
10965
|
const react_12 = require("react");
|
|
@@ -10845,6 +10968,7 @@ const react_14 = require("react");
|
|
|
10845
10968
|
const react_dom_1 = __importDefault(require("react-dom"));
|
|
10846
10969
|
const react_15 = require("react");
|
|
10847
10970
|
const react_16 = require("react");
|
|
10971
|
+
const react_17 = require("react");
|
|
10848
10972
|
var __unframerNavigator2 = typeof window !== 'undefined' ? navigator : void 0;
|
|
10849
10973
|
var require_hsluv = (0, chunk_A2PMVMFI_js_1.__commonJS)({
|
|
10850
10974
|
'../../../node_modules/hsluv/dist/hsluv.cjs'(exports) {
|
|
@@ -12041,10 +12165,10 @@ function useCurrentRouteId() {
|
|
|
12041
12165
|
}
|
|
12042
12166
|
function useOnRouteChange(cb) {
|
|
12043
12167
|
const currentRoute = useCurrentRoute();
|
|
12044
|
-
const
|
|
12045
|
-
if (isEqual(lastRoute, currentRoute) || !currentRoute)
|
|
12168
|
+
const lastRoute = react_11.default.useRef(currentRoute);
|
|
12169
|
+
if (isEqual(lastRoute.current, currentRoute) || !currentRoute)
|
|
12046
12170
|
return;
|
|
12047
|
-
|
|
12171
|
+
lastRoute.current = currentRoute;
|
|
12048
12172
|
cb(currentRoute);
|
|
12049
12173
|
}
|
|
12050
12174
|
function useRoute(routeId) {
|
|
@@ -12117,7 +12241,7 @@ function isNumber2(value) {
|
|
|
12117
12241
|
function isArray(value) {
|
|
12118
12242
|
return Array.isArray(value);
|
|
12119
12243
|
}
|
|
12120
|
-
function
|
|
12244
|
+
function isObject2(value) {
|
|
12121
12245
|
return value !== null && typeof value === 'object' && !isArray(value);
|
|
12122
12246
|
}
|
|
12123
12247
|
function isUndefined(value) {
|
|
@@ -12133,7 +12257,7 @@ function isValidDate(value) {
|
|
|
12133
12257
|
return value instanceof Date && !Number.isNaN(value.getTime());
|
|
12134
12258
|
}
|
|
12135
12259
|
function isGenerator2(value) {
|
|
12136
|
-
return
|
|
12260
|
+
return isObject2(value) && isFunction(value.return);
|
|
12137
12261
|
}
|
|
12138
12262
|
var noop2 = () => { };
|
|
12139
12263
|
var isWindow = typeof window !== 'undefined';
|
|
@@ -12239,7 +12363,9 @@ function interactionResponse(options) {
|
|
|
12239
12363
|
setTimeout(resolve, 100);
|
|
12240
12364
|
frame.read(() => {
|
|
12241
12365
|
void schedulerYield(options).then(resolve);
|
|
12242
|
-
}
|
|
12366
|
+
}, false,
|
|
12367
|
+
// In some cases, interactionResponse might be called in a rAF. This means, we should right away call `schedulerYield`, as the next paint follows immediately.
|
|
12368
|
+
true);
|
|
12243
12369
|
});
|
|
12244
12370
|
}
|
|
12245
12371
|
function schedulerYield(options) {
|
|
@@ -13144,7 +13270,7 @@ async function pushRouteState(routeId, route, { currentRoutePath, currentPathVar
|
|
|
13144
13270
|
}
|
|
13145
13271
|
function isHistoryState(data2) {
|
|
13146
13272
|
const routeIdKey = 'routeId';
|
|
13147
|
-
return
|
|
13273
|
+
return isObject2(data2) && isString(data2[routeIdKey]);
|
|
13148
13274
|
}
|
|
13149
13275
|
function replaceHistoryState(data2, url, ignoreReplaceStateWrapper = false) {
|
|
13150
13276
|
performance.mark('framer-history-replace');
|
|
@@ -13224,7 +13350,7 @@ function usePopStateHandler(currentRouteId, setCurrentRouteId) {
|
|
|
13224
13350
|
if (((_a = window.navigation) == null ? void 0 : _a.transition) &&
|
|
13225
13351
|
((_c = (_b = window.navigation) == null ? void 0 : _b.transition) == null ? void 0 : _c.navigationType) !== 'traverse')
|
|
13226
13352
|
return;
|
|
13227
|
-
if (!
|
|
13353
|
+
if (!isObject2(state))
|
|
13228
13354
|
return;
|
|
13229
13355
|
const { routeId, hash: hash2, pathVariables, localeId, } = state;
|
|
13230
13356
|
if (!isString(routeId))
|
|
@@ -13235,7 +13361,7 @@ function usePopStateHandler(currentRouteId, setCurrentRouteId) {
|
|
|
13235
13361
|
const stopMonitoringINPRelatedInputs = monitorINPRelatedInputs();
|
|
13236
13362
|
void nextRender.promise.finally(stopMonitoringINPRelatedInputs);
|
|
13237
13363
|
const changeRoute = () => {
|
|
13238
|
-
setCurrentRouteId(routeId, isString(localeId) ? localeId : void 0, isString(hash2) ? hash2 : void 0,
|
|
13364
|
+
setCurrentRouteId(routeId, isString(localeId) ? localeId : void 0, isString(hash2) ? hash2 : void 0, isObject2(pathVariables) ? pathVariables : void 0, true, nextRender, false);
|
|
13239
13365
|
};
|
|
13240
13366
|
const viewTransition = await startViewTransition2(currentRouteId.current, routeId, changeRoute);
|
|
13241
13367
|
const navigationTransition = (_d = window.navigation) == null ? void 0 : _d.transition;
|
|
@@ -13282,7 +13408,7 @@ function getHashForRoute(hash2, route, hashVariables) {
|
|
|
13282
13408
|
if (!resolvedHash)
|
|
13283
13409
|
return void 0;
|
|
13284
13410
|
const variables = Object.assign({}, route == null ? void 0 : route.elements, hashVariables);
|
|
13285
|
-
return resolvedHash.replace(pathVariablesRegExp, (m2, p1) =>
|
|
13411
|
+
return resolvedHash.replace(pathVariablesRegExp, (m2, p1) => variables[p1] ?? m2);
|
|
13286
13412
|
}
|
|
13287
13413
|
function getPathForRoute(route, { currentRoutePath, currentPathVariables, hash: hash2, pathVariables, hashVariables, relative: relative2 = true, preserveQueryParams, onlyHash = false, siteCanonicalURL, }) {
|
|
13288
13414
|
const resolvedHash = getHashForRoute(hash2, route, hashVariables);
|
|
@@ -14053,17 +14179,6 @@ function getVariantsFromServerTiming() {
|
|
|
14053
14179
|
}
|
|
14054
14180
|
return new URLSearchParams();
|
|
14055
14181
|
}
|
|
14056
|
-
var cookieValueRegex = /[^|; ]?framerAbTestingOverrides=(?<value>[^;]*)[;|$]?/u;
|
|
14057
|
-
function getVariantsFromCookie() {
|
|
14058
|
-
var _a;
|
|
14059
|
-
let value = '';
|
|
14060
|
-
try {
|
|
14061
|
-
const matches = cookieValueRegex.exec(document.cookie);
|
|
14062
|
-
value = ((_a = matches == null ? void 0 : matches.groups) == null ? void 0 : _a.value) ?? '';
|
|
14063
|
-
}
|
|
14064
|
-
catch { }
|
|
14065
|
-
return new URLSearchParams(value);
|
|
14066
|
-
}
|
|
14067
14182
|
function patchRoute(routes, abTestId, abTestingVariantId) {
|
|
14068
14183
|
const route = routes[abTestingVariantId];
|
|
14069
14184
|
if (!route)
|
|
@@ -14131,7 +14246,6 @@ function patchRoutesForABTesting(routes, initialRouteId) {
|
|
|
14131
14246
|
}
|
|
14132
14247
|
}
|
|
14133
14248
|
patchRoutesFromSearchParams(routes, getVariantsFromServerTiming());
|
|
14134
|
-
patchRoutesFromSearchParams(routes, getVariantsFromCookie());
|
|
14135
14249
|
removeRoutesVariants(routes);
|
|
14136
14250
|
return resolvedInitialRouteId;
|
|
14137
14251
|
}
|
|
@@ -14450,6 +14564,30 @@ function Point(x, y) {
|
|
|
14450
14564
|
}
|
|
14451
14565
|
Point2.sortClockwise = sortClockwise;
|
|
14452
14566
|
})(Point || (exports.Point = Point = {}));
|
|
14567
|
+
function assert(condition, ...msg) {
|
|
14568
|
+
var _a, _b;
|
|
14569
|
+
if (condition)
|
|
14570
|
+
return;
|
|
14571
|
+
const e = Error('Assertion Error' + (msg.length > 0 ? ': ' + msg.join(' ') : ''));
|
|
14572
|
+
if (e.stack) {
|
|
14573
|
+
try {
|
|
14574
|
+
const lines = e.stack.split('\n');
|
|
14575
|
+
if ((_a = lines[1]) == null ? void 0 : _a.includes('assert')) {
|
|
14576
|
+
lines.splice(1, 1);
|
|
14577
|
+
e.stack = lines.join('\n');
|
|
14578
|
+
}
|
|
14579
|
+
else if ((_b = lines[0]) == null ? void 0 : _b.includes('assert')) {
|
|
14580
|
+
lines.splice(0, 1);
|
|
14581
|
+
e.stack = lines.join('\n');
|
|
14582
|
+
}
|
|
14583
|
+
}
|
|
14584
|
+
catch { }
|
|
14585
|
+
}
|
|
14586
|
+
throw e;
|
|
14587
|
+
}
|
|
14588
|
+
function assertNever(x, error) {
|
|
14589
|
+
throw error || new Error(x ? `Unexpected value: ${x}` : 'Application entered invalid state');
|
|
14590
|
+
}
|
|
14453
14591
|
var BezierDefaults = {
|
|
14454
14592
|
curve: 'ease',
|
|
14455
14593
|
duration: 1,
|
|
@@ -14481,6 +14619,7 @@ var BezierAnimator = class {
|
|
|
14481
14619
|
const { duration, } = this.options;
|
|
14482
14620
|
this.progress += delta / duration;
|
|
14483
14621
|
const value = this.unitBezier.solve(this.progress, this.solveEpsilon(duration));
|
|
14622
|
+
assert(this.interpolator !== void 0, 'setFrom() or setTo() must be called before next()');
|
|
14484
14623
|
this.current = this.interpolator(value);
|
|
14485
14624
|
return this.current;
|
|
14486
14625
|
});
|
|
@@ -14671,7 +14810,7 @@ var Interpolation = {
|
|
|
14671
14810
|
var NumberInterpolation = {
|
|
14672
14811
|
interpolate(from, to) {
|
|
14673
14812
|
[from, to,] = Interpolation.handleUndefined(from, to);
|
|
14674
|
-
const a1 =
|
|
14813
|
+
const a1 = from;
|
|
14675
14814
|
const b1 = to - a1;
|
|
14676
14815
|
return (progress2) => {
|
|
14677
14816
|
const value = a1 + b1 * progress2;
|
|
@@ -14827,6 +14966,7 @@ var SpringAnimator = class {
|
|
|
14827
14966
|
}
|
|
14828
14967
|
next(delta) {
|
|
14829
14968
|
this.state = this.integrator.integrateState(this.state, delta);
|
|
14969
|
+
assert(this.interpolator !== void 0, 'setFrom() or setTo() must be called before next()');
|
|
14830
14970
|
const value = this.interpolator(this.progress());
|
|
14831
14971
|
return value;
|
|
14832
14972
|
}
|
|
@@ -14843,12 +14983,14 @@ var SpringAnimator = class {
|
|
|
14843
14983
|
this.state.v = velocity;
|
|
14844
14984
|
}
|
|
14845
14985
|
progress() {
|
|
14986
|
+
assert(this.difference !== void 0, 'setTo() must be called before progress()');
|
|
14846
14987
|
return 1 - this.state.x / this.difference;
|
|
14847
14988
|
}
|
|
14848
14989
|
// The spring always settles to 0, so we create an interpolation to the destination
|
|
14849
14990
|
// And calculate the progress based on the current state and the span of the interpolation
|
|
14850
14991
|
// This lets us integrate over state.x, even though Value is generic
|
|
14851
14992
|
setTo(value) {
|
|
14993
|
+
assert(this.current !== void 0, 'setFrom() must be called before setTo()');
|
|
14852
14994
|
this.destination = value;
|
|
14853
14995
|
this.difference = this.interpolation.difference(this.destination, this.current);
|
|
14854
14996
|
this.state.x = this.difference;
|
|
@@ -15347,7 +15489,7 @@ function rgbToHsv(r, g, b) {
|
|
|
15347
15489
|
const max = Math.max(r, g, b);
|
|
15348
15490
|
const min = Math.min(r, g, b);
|
|
15349
15491
|
const d = max - min;
|
|
15350
|
-
let h;
|
|
15492
|
+
let h = 0;
|
|
15351
15493
|
const s = max === 0 ? 0 : d / max;
|
|
15352
15494
|
const v = max;
|
|
15353
15495
|
if (max === min) {
|
|
@@ -15736,7 +15878,7 @@ function convertP3ToRgb(color2) {
|
|
|
15736
15878
|
}
|
|
15737
15879
|
var P3Color = class _P3Color {
|
|
15738
15880
|
constructor(color2) {
|
|
15739
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'format');
|
|
15881
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'format', 'p3');
|
|
15740
15882
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'r');
|
|
15741
15883
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'g');
|
|
15742
15884
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'b');
|
|
@@ -15910,7 +16052,7 @@ var Color = /* @__PURE__ */ (() => {
|
|
|
15910
16052
|
return false;
|
|
15911
16053
|
};
|
|
15912
16054
|
Color2.isColorObject = (color2) => {
|
|
15913
|
-
return
|
|
16055
|
+
return isObject2(color2) && typeof color2.r === 'number' && typeof color2.g === 'number' && typeof color2.b === 'number' &&
|
|
15914
16056
|
typeof color2.h === 'number' && typeof color2.s === 'number' && typeof color2.l === 'number' && typeof color2.a === 'number' &&
|
|
15915
16057
|
typeof color2.roundA === 'number' && typeof color2.format === 'string';
|
|
15916
16058
|
};
|
|
@@ -16447,9 +16589,12 @@ var PrecalculatedAnimator = class {
|
|
|
16447
16589
|
this.totalTime = this.values.length * delta;
|
|
16448
16590
|
}
|
|
16449
16591
|
indexForTime(time2) {
|
|
16592
|
+
assert(this.values !== void 0, 'values must be set before calling indexForTime()');
|
|
16593
|
+
assert(this.totalTime !== void 0, 'totalTime must be set before calling indexForTime()');
|
|
16450
16594
|
return Math.max(0, Math.min(this.values.length - 1, Math.round(this.values.length * (time2 / this.totalTime)) - 1));
|
|
16451
16595
|
}
|
|
16452
16596
|
valueForTime(time2) {
|
|
16597
|
+
assert(this.values !== void 0, 'values must be set before calling valueForTime()');
|
|
16453
16598
|
const index = this.indexForTime(time2);
|
|
16454
16599
|
const value = this.values[index];
|
|
16455
16600
|
return value;
|
|
@@ -16463,6 +16608,7 @@ var PrecalculatedAnimator = class {
|
|
|
16463
16608
|
this.preCalculate();
|
|
16464
16609
|
}
|
|
16465
16610
|
isReady() {
|
|
16611
|
+
assert(this.totalTime !== void 0, 'totalTime must be set before calling isReady()');
|
|
16466
16612
|
return this.values !== void 0 && this.values.length > 0 && this.totalTime > 0;
|
|
16467
16613
|
}
|
|
16468
16614
|
next(delta) {
|
|
@@ -16470,11 +16616,14 @@ var PrecalculatedAnimator = class {
|
|
|
16470
16616
|
return this.valueForTime(this.currentTime);
|
|
16471
16617
|
}
|
|
16472
16618
|
isFinished() {
|
|
16619
|
+
assert(this.totalTime !== void 0, 'totalTime must be set before calling isFinished()');
|
|
16473
16620
|
return this.totalTime === 0 || this.currentTime >= this.totalTime;
|
|
16474
16621
|
}
|
|
16475
16622
|
get endValue() {
|
|
16476
16623
|
this.preCalculate();
|
|
16624
|
+
assert(this.totalTime !== void 0, 'expecting totalTime to be set after calling preCalculate()');
|
|
16477
16625
|
const value = this.valueForTime(this.totalTime);
|
|
16626
|
+
assert(this.values !== void 0, 'expecting values to be set after calling preCalculate()');
|
|
16478
16627
|
return this.values.length > 0 ? value : this.animator.next(0);
|
|
16479
16628
|
}
|
|
16480
16629
|
};
|
|
@@ -16825,10 +16974,10 @@ var FramerAnimation = class _FramerAnimation {
|
|
|
16825
16974
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'onfinish');
|
|
16826
16975
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'oncancel');
|
|
16827
16976
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'readyPromise', Promise.resolve());
|
|
16828
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'readyResolve');
|
|
16829
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'finishedPromise');
|
|
16830
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'finishedResolve');
|
|
16831
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'finishedReject');
|
|
16977
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'readyResolve', null);
|
|
16978
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'finishedPromise', Promise.resolve());
|
|
16979
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'finishedResolve', null);
|
|
16980
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'finishedReject', null);
|
|
16832
16981
|
this.resetFinishedPromise();
|
|
16833
16982
|
const deprecatedAnimationOptions = {
|
|
16834
16983
|
...DefaultDeprecatedAnimationOptions,
|
|
@@ -17142,30 +17291,6 @@ var animate2 = /* @__PURE__ */ (() => {
|
|
|
17142
17291
|
return animate3;
|
|
17143
17292
|
})();
|
|
17144
17293
|
exports.animate = animate2;
|
|
17145
|
-
function assert(condition, ...msg) {
|
|
17146
|
-
var _a, _b;
|
|
17147
|
-
if (condition)
|
|
17148
|
-
return;
|
|
17149
|
-
const e = Error('Assertion Error' + (msg.length > 0 ? ': ' + msg.join(' ') : ''));
|
|
17150
|
-
if (e.stack) {
|
|
17151
|
-
try {
|
|
17152
|
-
const lines = e.stack.split('\n');
|
|
17153
|
-
if ((_a = lines[1]) == null ? void 0 : _a.includes('assert')) {
|
|
17154
|
-
lines.splice(1, 1);
|
|
17155
|
-
e.stack = lines.join('\n');
|
|
17156
|
-
}
|
|
17157
|
-
else if ((_b = lines[0]) == null ? void 0 : _b.includes('assert')) {
|
|
17158
|
-
lines.splice(0, 1);
|
|
17159
|
-
e.stack = lines.join('\n');
|
|
17160
|
-
}
|
|
17161
|
-
}
|
|
17162
|
-
catch { }
|
|
17163
|
-
}
|
|
17164
|
-
throw e;
|
|
17165
|
-
}
|
|
17166
|
-
function assertNever(x, error) {
|
|
17167
|
-
throw error || new Error(x ? `Unexpected value: ${x}` : 'Application entered invalid state');
|
|
17168
|
-
}
|
|
17169
17294
|
var LayoutIdContext = /* @__PURE__ */ react_11.default.createContext({
|
|
17170
17295
|
getLayoutId: (args) => null,
|
|
17171
17296
|
persistLayoutIdCache: () => { },
|
|
@@ -20438,7 +20563,7 @@ function injectComponentCSSRules() {
|
|
|
20438
20563
|
}
|
|
20439
20564
|
}
|
|
20440
20565
|
function isReactComponent(component) {
|
|
20441
|
-
return
|
|
20566
|
+
return isObject2(component) || isFunction(component);
|
|
20442
20567
|
}
|
|
20443
20568
|
var optionalKey = 'optional';
|
|
20444
20569
|
function controlIsOptional(control) {
|
|
@@ -20469,14 +20594,14 @@ function getControlDefaultValue(control) {
|
|
|
20469
20594
|
case 'number':
|
|
20470
20595
|
return isNumber2(control.defaultValue) ? control.defaultValue : void 0;
|
|
20471
20596
|
case 'transition':
|
|
20472
|
-
return
|
|
20597
|
+
return isObject2(control.defaultValue) ? control.defaultValue : void 0;
|
|
20473
20598
|
case 'border':
|
|
20474
|
-
return
|
|
20599
|
+
return isObject2(control.defaultValue) ? control.defaultValue : void 0;
|
|
20475
20600
|
case 'font':
|
|
20476
|
-
return
|
|
20601
|
+
return isObject2(control.defaultValue) ? control.defaultValue : void 0;
|
|
20477
20602
|
case 'object': {
|
|
20478
|
-
const value =
|
|
20479
|
-
if (
|
|
20603
|
+
const value = isObject2(control.defaultValue) ? control.defaultValue : {};
|
|
20604
|
+
if (isObject2(control.controls)) {
|
|
20480
20605
|
applyControlDefaultsToDefaultProps(value, control.controls);
|
|
20481
20606
|
}
|
|
20482
20607
|
return value;
|
|
@@ -20525,7 +20650,7 @@ function applyControlDefaultsToDefaultProps(defaultProps, controls) {
|
|
|
20525
20650
|
}
|
|
20526
20651
|
}
|
|
20527
20652
|
function getDefaultProps(component) {
|
|
20528
|
-
if (
|
|
20653
|
+
if (isObject2(component.defaultProps)) {
|
|
20529
20654
|
return component.defaultProps;
|
|
20530
20655
|
}
|
|
20531
20656
|
const defaultProps = {};
|
|
@@ -22835,7 +22960,7 @@ function unwrapInlinedDisplayContents(element) {
|
|
|
22835
22960
|
function useMeasureLayout(props, ref, getChildren = () => [], options = {}) {
|
|
22836
22961
|
const { id: id3, visible, _needsMeasure, } = props;
|
|
22837
22962
|
const { skipHook = false, } = options;
|
|
22838
|
-
const inCodeComponent =
|
|
22963
|
+
const inCodeComponent = (0, react_3.useContext)(ComponentContainerContext);
|
|
22839
22964
|
const onCanvas = RenderTarget.current() === RenderTarget.canvas;
|
|
22840
22965
|
useIsomorphicLayoutEffect2(() => {
|
|
22841
22966
|
if (!onCanvas || inCodeComponent || skipHook) {
|
|
@@ -23137,7 +23262,7 @@ var LinearGradient = {
|
|
|
23137
23262
|
* @param value -
|
|
23138
23263
|
*/
|
|
23139
23264
|
isLinearGradient: (value) => {
|
|
23140
|
-
return
|
|
23265
|
+
return isObject2(value) && linearGradientKeys.every((key7) => key7 in value) &&
|
|
23141
23266
|
(isSimpleGradient(value) || isMultiStopGradient(value));
|
|
23142
23267
|
},
|
|
23143
23268
|
/** @internal */
|
|
@@ -23160,7 +23285,7 @@ var RadialGradient = {
|
|
|
23160
23285
|
* @public
|
|
23161
23286
|
*/
|
|
23162
23287
|
isRadialGradient: (value) => {
|
|
23163
|
-
return
|
|
23288
|
+
return isObject2(value) && radialGradientKeys.every((key7) => key7 in value) &&
|
|
23164
23289
|
(isSimpleGradient(value) || isMultiStopGradient(value));
|
|
23165
23290
|
},
|
|
23166
23291
|
/** @internal */
|
|
@@ -23390,7 +23515,7 @@ function useStyleAndRect(props) {
|
|
|
23390
23515
|
react_11.default.useInsertionEffect(() => {
|
|
23391
23516
|
injectComponentCSSRules();
|
|
23392
23517
|
}, []);
|
|
23393
|
-
const inCodeComponent =
|
|
23518
|
+
const inCodeComponent = (0, react_3.useContext)(ComponentContainerContext);
|
|
23394
23519
|
const { style: style2, _initialStyle, __fromCanvasComponent, size, } = props;
|
|
23395
23520
|
const unwrappedProps = unwrapFrameProps(props);
|
|
23396
23521
|
const constraintsRect = useConstraints(unwrappedProps);
|
|
@@ -23554,7 +23679,7 @@ var VisibleFrame = /* @__PURE__ */ (0, react_7.forwardRef)(function VisibleFrame
|
|
|
23554
23679
|
}
|
|
23555
23680
|
useMeasureLayout(props, ref);
|
|
23556
23681
|
const backgroundImage = backgroundImageFromProps(props);
|
|
23557
|
-
const inCodeComponent =
|
|
23682
|
+
const inCodeComponent = (0, react_3.useContext)(ComponentContainerContext);
|
|
23558
23683
|
const parentSize = resolveParentSize(propsWithOverrides, unwrappedProps, rect, inCodeComponent);
|
|
23559
23684
|
const wrappedContent = useProvideParentSize(
|
|
23560
23685
|
/* @__PURE__ */ (0, jsx_runtime_2.jsxs)(jsx_runtime_1.Fragment, {
|
|
@@ -23751,7 +23876,7 @@ var SharedLayoutRoot = class extends react_9.Component {
|
|
|
23751
23876
|
var _a;
|
|
23752
23877
|
if (!this.scheduledPromotion || !this.lead || !this.follow)
|
|
23753
23878
|
return null;
|
|
23754
|
-
const needsReset =
|
|
23879
|
+
const needsReset = ((_a = this.lead) == null ? void 0 : _a.layoutMaybeMutated) && !this.shouldAnimate;
|
|
23755
23880
|
this.lead.projectionNodes.forEach((projectionNode) => {
|
|
23756
23881
|
var _a2;
|
|
23757
23882
|
projectionNode == null ? void 0 : projectionNode.promote({
|
|
@@ -23826,7 +23951,7 @@ function setRef(ref, value) {
|
|
|
23826
23951
|
}
|
|
23827
23952
|
}
|
|
23828
23953
|
function isMutableRef(ref) {
|
|
23829
|
-
return
|
|
23954
|
+
return isObject2(ref) && 'current' in ref;
|
|
23830
23955
|
}
|
|
23831
23956
|
function refHasValue(ref) {
|
|
23832
23957
|
return isMutableRef(ref) && ref.current !== null;
|
|
@@ -23947,6 +24072,21 @@ var SharedIntersectionObserver = class {
|
|
|
23947
24072
|
}
|
|
23948
24073
|
};
|
|
23949
24074
|
var SharedIntersectionObserverContext = /* @__PURE__ */ (0, react_1.createContext)(/* @__PURE__ */ new Map());
|
|
24075
|
+
function observeElement(observers2, key7, element, root, callback, rootMargin, threshold) {
|
|
24076
|
+
let observer2 = observers2.get(key7);
|
|
24077
|
+
if (!observer2 || observer2.root !== (root == null ? void 0 : root.current)) {
|
|
24078
|
+
observer2 = new SharedIntersectionObserver({
|
|
24079
|
+
root: root == null ? void 0 : root.current,
|
|
24080
|
+
rootMargin,
|
|
24081
|
+
threshold,
|
|
24082
|
+
});
|
|
24083
|
+
observers2.set(key7, observer2);
|
|
24084
|
+
}
|
|
24085
|
+
observer2.observeElementWithCallback(element, callback);
|
|
24086
|
+
return () => {
|
|
24087
|
+
observer2.unobserve(element);
|
|
24088
|
+
};
|
|
24089
|
+
}
|
|
23950
24090
|
function _useSharedIntersectionObserver(ref, callback, options) {
|
|
23951
24091
|
const key7 = useConstant2(() => `${options.rootMargin}`);
|
|
23952
24092
|
const observers2 = (0, react_3.useContext)(SharedIntersectionObserverContext);
|
|
@@ -23956,19 +24096,7 @@ function _useSharedIntersectionObserver(ref, callback, options) {
|
|
|
23956
24096
|
return;
|
|
23957
24097
|
if (element === null)
|
|
23958
24098
|
return;
|
|
23959
|
-
|
|
23960
|
-
if (!observer2 || observer2.root !== (root == null ? void 0 : root.current)) {
|
|
23961
|
-
observer2 = new SharedIntersectionObserver({
|
|
23962
|
-
root: root == null ? void 0 : root.current,
|
|
23963
|
-
rootMargin,
|
|
23964
|
-
threshold,
|
|
23965
|
-
});
|
|
23966
|
-
observers2.set(key7, observer2);
|
|
23967
|
-
}
|
|
23968
|
-
observer2.observeElementWithCallback(element, callback);
|
|
23969
|
-
return () => {
|
|
23970
|
-
observer2 == null ? void 0 : observer2.unobserve(element);
|
|
23971
|
-
};
|
|
24099
|
+
return observeElement(observers2, key7, element, root, callback, rootMargin, threshold);
|
|
23972
24100
|
}, [enabled, callback, root, rootMargin, threshold,]);
|
|
23973
24101
|
}
|
|
23974
24102
|
var useSharedIntersectionObserver = typeof IntersectionObserver === 'undefined' ? noop2 : _useSharedIntersectionObserver;
|
|
@@ -24018,7 +24146,7 @@ function isIntersectingWithThreshold({ boundingClientRect, intersectionRect, isI
|
|
|
24018
24146
|
var LayoutTree = class extends react_9.Component {
|
|
24019
24147
|
constructor() {
|
|
24020
24148
|
super(...arguments);
|
|
24021
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'layoutMaybeMutated');
|
|
24149
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'layoutMaybeMutated', false);
|
|
24022
24150
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'projectionNodes', /* @__PURE__ */ new Map());
|
|
24023
24151
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'rootProjectionNode');
|
|
24024
24152
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'isExiting');
|
|
@@ -24043,7 +24171,7 @@ var LayoutTree = class extends react_9.Component {
|
|
|
24043
24171
|
this.isExiting = isExiting;
|
|
24044
24172
|
if (isLead === void 0)
|
|
24045
24173
|
return true;
|
|
24046
|
-
const hasBecomeLead = !this.props.isLead &&
|
|
24174
|
+
const hasBecomeLead = !this.props.isLead && isLead;
|
|
24047
24175
|
const hasExitBeenCancelled = this.props.isExiting && !isExiting;
|
|
24048
24176
|
const shouldPromote = hasBecomeLead || hasExitBeenCancelled;
|
|
24049
24177
|
const shouldDemote = !!this.props.isLead && !isLead;
|
|
@@ -25429,7 +25557,7 @@ function containerContent(item) {
|
|
|
25429
25557
|
const position = (_a = item == null ? void 0 : item.transition) == null ? void 0 : _a.position;
|
|
25430
25558
|
const shouldStretchWidth = !position || position.left !== void 0 && position.right !== void 0;
|
|
25431
25559
|
const shouldStretchHeight = !position || position.top !== void 0 && position.bottom !== void 0;
|
|
25432
|
-
const canStretchStyle = 'style' in child.props ?
|
|
25560
|
+
const canStretchStyle = 'style' in child.props ? isObject2(child.props.style) : true;
|
|
25433
25561
|
if (shouldStretchWidth) {
|
|
25434
25562
|
const canStretchWidth = 'width' in child.props;
|
|
25435
25563
|
if (canStretchWidth)
|
|
@@ -25726,11 +25854,11 @@ function WithDragging(Component17) {
|
|
|
25726
25854
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'isMoving', false);
|
|
25727
25855
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'isAnimating', false);
|
|
25728
25856
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'directionLockAxis', null);
|
|
25729
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'layerStartPoint');
|
|
25730
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'correctedLayerStartPoint');
|
|
25731
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'previousPoint');
|
|
25857
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'layerStartPoint', null);
|
|
25858
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'correctedLayerStartPoint', null);
|
|
25859
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'previousPoint', null);
|
|
25732
25860
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, '_constraints', null);
|
|
25733
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'animation');
|
|
25861
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'animation', null);
|
|
25734
25862
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'panStart', (event) => {
|
|
25735
25863
|
if (!this.props.enabled) {
|
|
25736
25864
|
return;
|
|
@@ -25758,6 +25886,7 @@ function WithDragging(Component17) {
|
|
|
25758
25886
|
if (!enabled) {
|
|
25759
25887
|
return;
|
|
25760
25888
|
}
|
|
25889
|
+
assert(this.previousPoint !== null, 'previousPoint must be set in panStart()');
|
|
25761
25890
|
let point2 = {
|
|
25762
25891
|
...this.previousPoint,
|
|
25763
25892
|
};
|
|
@@ -25778,6 +25907,7 @@ function WithDragging(Component17) {
|
|
|
25778
25907
|
return;
|
|
25779
25908
|
}
|
|
25780
25909
|
else {
|
|
25910
|
+
assert(this.layerStartPoint !== null, 'layerStartPoint must be set in panStart()');
|
|
25781
25911
|
if (this.directionLockAxis === 'y') {
|
|
25782
25912
|
point2.x = this.layerStartPoint.x;
|
|
25783
25913
|
}
|
|
@@ -26256,19 +26386,18 @@ function WithDragging(Component17) {
|
|
|
26256
26386
|
};
|
|
26257
26387
|
}
|
|
26258
26388
|
render() {
|
|
26259
|
-
const { onPanStart, onPan, onPanEnd, onMouseWheelStart, onMouseWheel, onMouseWheelEnd, ...attributes } = this.props;
|
|
26260
26389
|
const originalProps = {
|
|
26261
|
-
...
|
|
26390
|
+
...this.props,
|
|
26262
26391
|
};
|
|
26263
26392
|
Object.keys(_WithDraggingHOC2.draggingDefaultProps).forEach((key7) => {
|
|
26264
26393
|
delete asRecord(originalProps)[key7];
|
|
26265
26394
|
});
|
|
26266
|
-
originalProps.onPanStart = this.wrapHandler(this.panStart, onPanStart);
|
|
26267
|
-
originalProps.onPan = this.wrapHandler(this.pan, onPan);
|
|
26268
|
-
originalProps.onPanEnd = this.wrapHandler(this.panEnd, onPanEnd);
|
|
26269
|
-
originalProps.onMouseWheelStart = this.wrapHandler(this.mouseWheelStart, onMouseWheelStart);
|
|
26270
|
-
originalProps.onMouseWheel = this.wrapHandler(this.mouseWheel, onMouseWheel);
|
|
26271
|
-
originalProps.onMouseWheelEnd = this.wrapHandler(this.mouseWheelEnd, onMouseWheelEnd);
|
|
26395
|
+
originalProps.onPanStart = this.wrapHandler(this.panStart, originalProps.onPanStart);
|
|
26396
|
+
originalProps.onPan = this.wrapHandler(this.pan, originalProps.onPan);
|
|
26397
|
+
originalProps.onPanEnd = this.wrapHandler(this.panEnd, originalProps.onPanEnd);
|
|
26398
|
+
originalProps.onMouseWheelStart = this.wrapHandler(this.mouseWheelStart, originalProps.onMouseWheelStart);
|
|
26399
|
+
originalProps.onMouseWheel = this.wrapHandler(this.mouseWheel, originalProps.onMouseWheel);
|
|
26400
|
+
originalProps.onMouseWheelEnd = this.wrapHandler(this.mouseWheelEnd, originalProps.onMouseWheelEnd);
|
|
26272
26401
|
originalProps.left = this.x;
|
|
26273
26402
|
originalProps.top = this.y;
|
|
26274
26403
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(DraggingContext.Provider, {
|
|
@@ -26596,7 +26725,7 @@ function hasRadius(props) {
|
|
|
26596
26725
|
}
|
|
26597
26726
|
function getRadiusValue(value) {
|
|
26598
26727
|
let num = Number(value);
|
|
26599
|
-
if (typeof value === 'string' && Number.isNaN(
|
|
26728
|
+
if (typeof value === 'string' && Number.isNaN(num)) {
|
|
26600
26729
|
return value;
|
|
26601
26730
|
}
|
|
26602
26731
|
else if (isAnimatable2(value)) {
|
|
@@ -27422,6 +27551,7 @@ var DeprecatedFrame = /* @__PURE__ */ (() => {
|
|
|
27422
27551
|
return react_11.default.cloneElement(child, {
|
|
27423
27552
|
parentSize: this.state.size,
|
|
27424
27553
|
_forwardedOverrides,
|
|
27554
|
+
// biome-ignore lint/suspicious/noExplicitAny: deprecated code
|
|
27425
27555
|
});
|
|
27426
27556
|
}
|
|
27427
27557
|
else if (_forwardedOverrides && child) {
|
|
@@ -27719,7 +27849,7 @@ function makePaddingString({ top, left, bottom, right, }) {
|
|
|
27719
27849
|
var Stack = /* @__PURE__ */ (() => {
|
|
27720
27850
|
const StackInner = react_11.default.forwardRef(function StackInner2(stackProps, forwardedRef) {
|
|
27721
27851
|
const { as = 'div', direction = 'vertical', distribution = 'start', alignment = 'center', gap = 10, wrap: wrap2 = false, useFlexboxGap: externalUseFlexboxGap = true, children, style: styleProp, className: className2, willChangeTransform, __fromCodeComponentNode, parentSize, __contentWrapperStyle, ...containerProps } = stackProps;
|
|
27722
|
-
const useFlexboxGap =
|
|
27852
|
+
const useFlexboxGap = externalUseFlexboxGap || wrap2;
|
|
27723
27853
|
const stackRef = react_11.default.useRef(null);
|
|
27724
27854
|
const flexDirection = toFlexDirection(direction);
|
|
27725
27855
|
const isReverse = isReverseDirection(flexDirection);
|
|
@@ -28130,7 +28260,7 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
|
|
|
28130
28260
|
}
|
|
28131
28261
|
const updateOnResize = react_11.default.useCallback(() => {
|
|
28132
28262
|
if (!hasFixedSize)
|
|
28133
|
-
setForceUpdateCount((v) => v + 1);
|
|
28263
|
+
(0, react_12.startTransition)(() => setForceUpdateCount((v) => v + 1));
|
|
28134
28264
|
}, [hasFixedSize,]);
|
|
28135
28265
|
react_11.default.useEffect(() => {
|
|
28136
28266
|
if (RenderTarget.current() !== RenderTarget.preview)
|
|
@@ -28858,7 +28988,7 @@ function containsBitmask(value, bitmask) {
|
|
|
28858
28988
|
var GestureRecognizer = class {
|
|
28859
28989
|
constructor() {
|
|
28860
28990
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, '_state', 2);
|
|
28861
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'handler');
|
|
28991
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'handler', null);
|
|
28862
28992
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'preventers', []);
|
|
28863
28993
|
}
|
|
28864
28994
|
get state() {
|
|
@@ -28925,7 +29055,7 @@ var GestureRecognizer = class {
|
|
|
28925
29055
|
var MouseWheelGestureRecognizer = class extends GestureRecognizer {
|
|
28926
29056
|
constructor() {
|
|
28927
29057
|
super(...arguments);
|
|
28928
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'startEvent');
|
|
29058
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'startEvent', null);
|
|
28929
29059
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'eventType', 'mousewheel');
|
|
28930
29060
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'onMouseWheelEnd', debounce((event) => {
|
|
28931
29061
|
if (this.handler && this.startEvent) {
|
|
@@ -28958,7 +29088,7 @@ var MouseWheelGestureRecognizer = class extends GestureRecognizer {
|
|
|
28958
29088
|
var PanGestureRecognizer = class extends GestureRecognizer {
|
|
28959
29089
|
constructor() {
|
|
28960
29090
|
super(...arguments);
|
|
28961
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'startEvent');
|
|
29091
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'startEvent', null);
|
|
28962
29092
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'eventType', 'pan');
|
|
28963
29093
|
}
|
|
28964
29094
|
pointerSessionBegan(session, event) {
|
|
@@ -29337,7 +29467,7 @@ var useUpdateChildSize = ({ dragDirection, children, fromCanvasComponent, }) =>
|
|
|
29337
29467
|
: updatedSize;
|
|
29338
29468
|
return react_11.default.cloneElement(child, update);
|
|
29339
29469
|
});
|
|
29340
|
-
}, [dragDirection, children,]);
|
|
29470
|
+
}, [dragDirection, children, fromCanvasComponent,]);
|
|
29341
29471
|
};
|
|
29342
29472
|
var numberFromOptionalMotionValue = (value) => {
|
|
29343
29473
|
return typeof value === 'number' ? value : value.get();
|
|
@@ -29618,7 +29748,6 @@ var EmulatedScroll = /* @__PURE__ */ react_11.default.forwardRef(function Emulat
|
|
|
29618
29748
|
preserve3d: containerProps.preserve3d,
|
|
29619
29749
|
children: [
|
|
29620
29750
|
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(EmptyState, {
|
|
29621
|
-
children,
|
|
29622
29751
|
size: {
|
|
29623
29752
|
width: isFiniteNumber(containerProps.width) ? containerProps.width : '100%',
|
|
29624
29753
|
height: isFiniteNumber(containerProps.height) ? containerProps.height : '100%',
|
|
@@ -29626,6 +29755,7 @@ var EmulatedScroll = /* @__PURE__ */ react_11.default.forwardRef(function Emulat
|
|
|
29626
29755
|
insideUserCodeComponent: !containerProps.__fromCodeComponentNode,
|
|
29627
29756
|
title: 'Scroll',
|
|
29628
29757
|
description: 'Click and drag the connector to any frame on the canvas \u2192',
|
|
29758
|
+
children,
|
|
29629
29759
|
}),
|
|
29630
29760
|
useUpdateChildSize({
|
|
29631
29761
|
dragDirection: direction,
|
|
@@ -30769,8 +30899,8 @@ var AnimationCollector = class {
|
|
|
30769
30899
|
const initial = props.__framer__presenceInitial ?? props.initial;
|
|
30770
30900
|
const animate3 = props.__framer__presenceAnimate ?? props.animate;
|
|
30771
30901
|
const config = {
|
|
30772
|
-
initial:
|
|
30773
|
-
animate:
|
|
30902
|
+
initial: isObject2(initial) ? initial : void 0,
|
|
30903
|
+
animate: isObject2(animate3) ? animate3 : void 0,
|
|
30774
30904
|
transformTemplate: isString(transformTemplate2) ? transformTemplate2 : void 0,
|
|
30775
30905
|
};
|
|
30776
30906
|
for (const variantId of variants)
|
|
@@ -30936,6 +31066,7 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
|
|
|
30936
31066
|
const values = useConstant2(makeFXValues);
|
|
30937
31067
|
const mirrorStateRef = (0, react_4.useRef)(false);
|
|
30938
31068
|
const delay2 = useDelay();
|
|
31069
|
+
const animationPromiseRef = (0, react_4.useRef)(null);
|
|
30939
31070
|
const animateValues = (0, react_3.useCallback)(async () => {
|
|
30940
31071
|
if (!loop)
|
|
30941
31072
|
return;
|
|
@@ -30944,10 +31075,10 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
|
|
|
30944
31075
|
const to = mirror ? defaultFXValues : loop;
|
|
30945
31076
|
const from = mirror ? loop : defaultFXValues;
|
|
30946
31077
|
mirrorStateRef.current = !mirrorStateRef.current;
|
|
30947
|
-
|
|
31078
|
+
animationPromiseRef.current = Promise.all(effectValuesKeys.map((key7) => {
|
|
30948
31079
|
if (shouldReduceMotion && key7 !== 'opacity')
|
|
30949
31080
|
return;
|
|
30950
|
-
values[key7].
|
|
31081
|
+
values[key7].jump(from[key7] ?? defaultFXValues[key7]);
|
|
30951
31082
|
return new Promise((resolve) => {
|
|
30952
31083
|
const opts = {
|
|
30953
31084
|
...transition,
|
|
@@ -30959,6 +31090,7 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
|
|
|
30959
31090
|
}
|
|
30960
31091
|
});
|
|
30961
31092
|
}));
|
|
31093
|
+
return animationPromiseRef.current;
|
|
30962
31094
|
}, [loop, loopRepeatType, loopTransition, shouldReduceMotion,]);
|
|
30963
31095
|
const [isRunning, setIsRunning,] = (0, react_4.useState)(false);
|
|
30964
31096
|
const shouldRunRef = (0, react_4.useRef)(false);
|
|
@@ -30967,7 +31099,7 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
|
|
|
30967
31099
|
return;
|
|
30968
31100
|
await animateValues();
|
|
30969
31101
|
await delay2(loopRepeatDelay ?? 0);
|
|
30970
|
-
|
|
31102
|
+
void animateLoop();
|
|
30971
31103
|
}, [animateValues, delay2, loopEffectEnabled, loopRepeatDelay,]);
|
|
30972
31104
|
const start2 = (0, react_3.useCallback)(() => {
|
|
30973
31105
|
if (shouldRunRef.current)
|
|
@@ -31019,15 +31151,26 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
|
|
|
31019
31151
|
}, [start2, stop, loopPauseOffscreen, hasLoop,]);
|
|
31020
31152
|
(0, react_2.useEffect)(() => {
|
|
31021
31153
|
return () => stop();
|
|
31022
|
-
}, []);
|
|
31154
|
+
}, [stop,]);
|
|
31155
|
+
const isIntersectingRef = (0, react_4.useRef)(false);
|
|
31156
|
+
const stopAfterAnimationEnds = (0, react_3.useCallback)(async () => {
|
|
31157
|
+
if (!animationPromiseRef.current)
|
|
31158
|
+
return;
|
|
31159
|
+
await animationPromiseRef.current;
|
|
31160
|
+
if (isIntersectingRef.current)
|
|
31161
|
+
return;
|
|
31162
|
+
stop();
|
|
31163
|
+
}, [stop,]);
|
|
31023
31164
|
const startAndStopBasedOnIntersection = (0, react_3.useCallback)((entry) => {
|
|
31024
31165
|
if (entry.isIntersecting) {
|
|
31166
|
+
isIntersectingRef.current = true;
|
|
31025
31167
|
start2();
|
|
31026
31168
|
}
|
|
31027
31169
|
else {
|
|
31028
|
-
|
|
31170
|
+
isIntersectingRef.current = false;
|
|
31171
|
+
void stopAfterAnimationEnds();
|
|
31029
31172
|
}
|
|
31030
|
-
}, [start2,
|
|
31173
|
+
}, [start2, stopAfterAnimationEnds,]);
|
|
31031
31174
|
useSharedIntersectionObserver(ref, startAndStopBasedOnIntersection, {
|
|
31032
31175
|
enabled: hasLoop && loopPauseOffscreen,
|
|
31033
31176
|
});
|
|
@@ -31089,7 +31232,7 @@ function useParallax(options, ref, visibilityStyle) {
|
|
|
31089
31232
|
};
|
|
31090
31233
|
}
|
|
31091
31234
|
function getTransition(value) {
|
|
31092
|
-
if (isString(value) || !
|
|
31235
|
+
if (isString(value) || !isObject2(value))
|
|
31093
31236
|
return void 0;
|
|
31094
31237
|
return value == null ? void 0 : value.transition;
|
|
31095
31238
|
}
|
|
@@ -31101,7 +31244,7 @@ function runEffectAnimation(target, effect, shouldReduceMotion, ref, appearId, i
|
|
|
31101
31244
|
return resolve();
|
|
31102
31245
|
const motionValue2 = effect.values[key7];
|
|
31103
31246
|
motionValue2.stop();
|
|
31104
|
-
let value = !
|
|
31247
|
+
let value = !isObject2(target) ? defaultFXValues[key7] : (target == null ? void 0 : target[key7]) ?? defaultFXValues[key7];
|
|
31105
31248
|
if (isMotionValue(value))
|
|
31106
31249
|
value = value.get();
|
|
31107
31250
|
if (!isNumber2(value))
|
|
@@ -31144,14 +31287,14 @@ function usePresenceAnimation({ initial: motionInitial, animate: motionAnimate,
|
|
|
31144
31287
|
});
|
|
31145
31288
|
const effect = useConstant2(() => {
|
|
31146
31289
|
const base = initial ?? style2;
|
|
31147
|
-
if (!
|
|
31290
|
+
if (!isObject2(base)) {
|
|
31148
31291
|
return {
|
|
31149
31292
|
values: makeFXValues(),
|
|
31150
31293
|
};
|
|
31151
31294
|
}
|
|
31152
31295
|
const defaults = {};
|
|
31153
31296
|
for (const key7 in base) {
|
|
31154
|
-
const value =
|
|
31297
|
+
const value = isObject2(base) ? base[key7] : void 0;
|
|
31155
31298
|
if (!isNumber2(value))
|
|
31156
31299
|
continue;
|
|
31157
31300
|
defaults[key7] = value;
|
|
@@ -31697,10 +31840,10 @@ var add2 = (values) => values.reduce((sum, value) => sum += value, 0);
|
|
|
31697
31840
|
var multiply = (values) => values.reduce((sum, value) => sum = sum * value, 1);
|
|
31698
31841
|
var reactRefObjectKey = 'current';
|
|
31699
31842
|
function isReactRefObject(value) {
|
|
31700
|
-
return
|
|
31843
|
+
return isObject2(value) && reactRefObjectKey in value;
|
|
31701
31844
|
}
|
|
31702
31845
|
function addMotionValueStyle(style2, values) {
|
|
31703
|
-
if (!style2 || !
|
|
31846
|
+
if (!style2 || !isObject2(style2))
|
|
31704
31847
|
return values;
|
|
31705
31848
|
for (const key7 in style2) {
|
|
31706
31849
|
const value = style2[key7];
|
|
@@ -31893,7 +32036,7 @@ var SynchronousSuspenseErrorBoundary = class extends react_9.Component {
|
|
|
31893
32036
|
if (!isSuspense426Error(error))
|
|
31894
32037
|
return;
|
|
31895
32038
|
const componentStack = errorInfo == null ? void 0 : errorInfo.componentStack;
|
|
31896
|
-
console.error('Caught an error in SynchronousSuspenseErrorBoundary:\n\n', error, '\n\nComponent stack:\n', componentStack, '\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.
|
|
32039
|
+
console.error('Caught an error in SynchronousSuspenseErrorBoundary:\n\n', error, '\n\nComponent stack:\n', componentStack, '\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/.');
|
|
31897
32040
|
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : void 0;
|
|
31898
32041
|
sendTrackingEvent('published_site_load_recoverable_error', {
|
|
31899
32042
|
message: String(error),
|
|
@@ -31967,7 +32110,7 @@ function logError(...args) {
|
|
|
31967
32110
|
function shouldEnableCodeBoundaries() {
|
|
31968
32111
|
return RenderTarget.current() !== RenderTarget.canvas;
|
|
31969
32112
|
}
|
|
31970
|
-
function CodeComponentBoundary({
|
|
32113
|
+
function CodeComponentBoundary({ getErrorMessage, fallback, children, }) {
|
|
31971
32114
|
if (!shouldEnableCodeBoundaries()) {
|
|
31972
32115
|
return children;
|
|
31973
32116
|
}
|
|
@@ -31975,7 +32118,7 @@ function CodeComponentBoundary({ errorMessage, fallback, children, }) {
|
|
|
31975
32118
|
fallback,
|
|
31976
32119
|
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(ClientSideErrorBoundary, {
|
|
31977
32120
|
fallback,
|
|
31978
|
-
|
|
32121
|
+
getErrorMessage,
|
|
31979
32122
|
children,
|
|
31980
32123
|
}),
|
|
31981
32124
|
});
|
|
@@ -31993,7 +32136,7 @@ var ClientSideErrorBoundary = class extends react_9.Component {
|
|
|
31993
32136
|
};
|
|
31994
32137
|
}
|
|
31995
32138
|
componentDidCatch(error, errorInfo) {
|
|
31996
|
-
logError(this.props.
|
|
32139
|
+
logError(this.props.getErrorMessage(), errorInfo == null ? void 0 : errorInfo.componentStack);
|
|
31997
32140
|
collectErrorToAnalytics(error, errorInfo);
|
|
31998
32141
|
}
|
|
31999
32142
|
render() {
|
|
@@ -32129,7 +32272,7 @@ function useMaybeWrapComponentWithCodeBoundary(children, scopeId, nodeId, isAuth
|
|
|
32129
32272
|
const shouldWrapWithBoundary = shouldWrapComponentWithBoundary(scopeId, nearestExternalComponent == null ? void 0 : nearestExternalComponent.scopeId, nearestExternalComponent == null ? void 0 : nearestExternalComponent.level, isAuthoredByUser ?? false, isModuleExternal ?? false, inComponentSlot ?? false);
|
|
32130
32273
|
if (shouldWrapWithBoundary) {
|
|
32131
32274
|
children = /* @__PURE__ */ (0, jsx_runtime_1.jsx)(CodeComponentBoundary, {
|
|
32132
|
-
|
|
32275
|
+
getErrorMessage: getErrorMessageForComponent.bind(null, scopeId, nodeId),
|
|
32133
32276
|
fallback: null,
|
|
32134
32277
|
children,
|
|
32135
32278
|
});
|
|
@@ -32966,7 +33109,7 @@ function useDynamicMotionOrigin(initialPlacement, alignment) {
|
|
|
32966
33109
|
function childrenWithOrigin(child, { x, y, }) {
|
|
32967
33110
|
if (!child || !isReactChild(child) || !isReactElement(child))
|
|
32968
33111
|
return null;
|
|
32969
|
-
if (!
|
|
33112
|
+
if (!isObject2(child.props.style) && !isUndefined(child.props.style))
|
|
32970
33113
|
return null;
|
|
32971
33114
|
const style2 = {
|
|
32972
33115
|
...child.props.style,
|
|
@@ -33115,6 +33258,15 @@ function Floating({ alignment, placement, safeArea, offsetX, offsetY, anchorRef,
|
|
|
33115
33258
|
],
|
|
33116
33259
|
}), getPortalContainer(portalSelector, inComponent));
|
|
33117
33260
|
}
|
|
33261
|
+
var Instance = /* @__PURE__ */ react_11.default.forwardRef(function Instance2({ Component: Component17, ...props }, ref) {
|
|
33262
|
+
return Component17
|
|
33263
|
+
? /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
|
|
33264
|
+
...props,
|
|
33265
|
+
ref,
|
|
33266
|
+
})
|
|
33267
|
+
: null;
|
|
33268
|
+
});
|
|
33269
|
+
exports.Instance = Instance;
|
|
33118
33270
|
var GracefullyDegradingErrorBoundary = class extends react_9.Component {
|
|
33119
33271
|
constructor() {
|
|
33120
33272
|
super(...arguments);
|
|
@@ -33123,7 +33275,7 @@ var GracefullyDegradingErrorBoundary = class extends react_9.Component {
|
|
|
33123
33275
|
});
|
|
33124
33276
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'message', 'Made UI non-interactive due to an error');
|
|
33125
33277
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'messageFatal', 'Fatal error');
|
|
33126
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'messageReport', 'If you are the author of this website, please report this issue to the Framer team via https://www.framer.
|
|
33278
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'messageReport', 'If you are the author of this website, please report this issue to the Framer team via https://www.framer.com/contact/');
|
|
33127
33279
|
}
|
|
33128
33280
|
static getDerivedStateFromError(error) {
|
|
33129
33281
|
return {
|
|
@@ -33139,7 +33291,7 @@ var GracefullyDegradingErrorBoundary = class extends react_9.Component {
|
|
|
33139
33291
|
|
|
33140
33292
|
`, error);
|
|
33141
33293
|
const sampleRate = Math.random();
|
|
33142
|
-
if (sampleRate > 0.
|
|
33294
|
+
if (sampleRate > 0.5)
|
|
33143
33295
|
return;
|
|
33144
33296
|
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
33145
33297
|
sendTrackingEvent('published_site_load_error', {
|
|
@@ -34483,7 +34635,7 @@ async function submitForm(action, data2, projectHash) {
|
|
|
34483
34635
|
}
|
|
34484
34636
|
}
|
|
34485
34637
|
function responseHasError(response) {
|
|
34486
|
-
return typeof response === 'object' && response !== null && 'error' in response &&
|
|
34638
|
+
return typeof response === 'object' && response !== null && 'error' in response && isObject2(response.error) &&
|
|
34487
34639
|
'message' in response.error && typeof response.error.message === 'string';
|
|
34488
34640
|
}
|
|
34489
34641
|
function isSamePage(a, b) {
|
|
@@ -34671,7 +34823,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
34671
34823
|
if (isString(localeOrLocaleId)) {
|
|
34672
34824
|
localeId = localeOrLocaleId;
|
|
34673
34825
|
}
|
|
34674
|
-
else if (
|
|
34826
|
+
else if (isObject2(localeOrLocaleId)) {
|
|
34675
34827
|
localeId = localeOrLocaleId.id;
|
|
34676
34828
|
}
|
|
34677
34829
|
const defaultLocale = locales.find(({ id: id3, }) => id3 === defaultLocaleId);
|
|
@@ -34695,7 +34847,6 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
34695
34847
|
});
|
|
34696
34848
|
if (!localeResult)
|
|
34697
34849
|
return;
|
|
34698
|
-
const currentPathVariables2 = currentPathVariablesRef.current;
|
|
34699
34850
|
const currentStatePaginationInfo = isHistoryState(window.history.state) ? window.history.state.paginationInfo : void 0;
|
|
34700
34851
|
const currentPath = localeResult.path;
|
|
34701
34852
|
currentPathVariablesRef.current = localeResult.pathVariables;
|
|
@@ -34705,7 +34856,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
34705
34856
|
return;
|
|
34706
34857
|
return pushHistoryState({
|
|
34707
34858
|
routeId: currentRouteId2,
|
|
34708
|
-
pathVariables:
|
|
34859
|
+
pathVariables: localeResult.pathVariables,
|
|
34709
34860
|
localeId: nextLocale.id,
|
|
34710
34861
|
paginationInfo: currentStatePaginationInfo,
|
|
34711
34862
|
}, currentPath, ignorePushStateWrapper);
|
|
@@ -35386,14 +35537,13 @@ _subscribers2 = /* @__PURE__ */ new WeakMap();
|
|
|
35386
35537
|
_results = /* @__PURE__ */ new WeakMap();
|
|
35387
35538
|
_SSRResults = /* @__PURE__ */ new WeakMap();
|
|
35388
35539
|
_onlyPrefetched = /* @__PURE__ */ new WeakMap();
|
|
35389
|
-
function
|
|
35540
|
+
function useFetchRequestsForChildren(requests, disabled, children) {
|
|
35390
35541
|
const fetchClient = React2.useContext(FetchClientContext);
|
|
35391
35542
|
if (!fetchClient) {
|
|
35392
35543
|
throw new Error('useFetchRequest must be used within a FetchClientProvider');
|
|
35393
35544
|
}
|
|
35394
35545
|
const isRestoringCache = React2.useContext(IsRestoringCacheContext);
|
|
35395
35546
|
const [observer2,] = React2.useState(() => new RequestsObserver(fetchClient, requests));
|
|
35396
|
-
const [result, setResult,] = React2.useState(() => observer2.getServerResults());
|
|
35397
35547
|
React2.useLayoutEffect(() => {
|
|
35398
35548
|
if (disabled)
|
|
35399
35549
|
return;
|
|
@@ -35402,19 +35552,16 @@ function useFetchRequests(requests, disabled) {
|
|
|
35402
35552
|
});
|
|
35403
35553
|
}, [requests, observer2, disabled,]);
|
|
35404
35554
|
React2.useEffect(() => {
|
|
35555
|
+
return () => observer2.unmount();
|
|
35556
|
+
}, [observer2,]);
|
|
35557
|
+
const subscribe = React2.useCallback((onChange) => {
|
|
35405
35558
|
if (isRestoringCache || disabled)
|
|
35406
|
-
return;
|
|
35407
|
-
|
|
35408
|
-
|
|
35409
|
-
|
|
35410
|
-
|
|
35411
|
-
|
|
35412
|
-
return () => {
|
|
35413
|
-
unsubscribe();
|
|
35414
|
-
observer2.unmount();
|
|
35415
|
-
};
|
|
35416
|
-
}, [observer2, disabled, isRestoringCache,]);
|
|
35417
|
-
return result;
|
|
35559
|
+
return noop4;
|
|
35560
|
+
return observer2.subscribe(onChange);
|
|
35561
|
+
}, [disabled, observer2, isRestoringCache,]);
|
|
35562
|
+
const synchronousData = React2.useSyncExternalStore(subscribe, observer2.getResults, observer2.getServerResults);
|
|
35563
|
+
const deferredData = React2.useDeferredValue(synchronousData);
|
|
35564
|
+
return useMemoOne(() => children(deferredData.data, deferredData.status), [deferredData, children,]);
|
|
35418
35565
|
}
|
|
35419
35566
|
function usePrefetch() {
|
|
35420
35567
|
const fetchClient = React2.useContext(FetchClientContext);
|
|
@@ -35555,8 +35702,7 @@ var ResolveLinks = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ (0, re
|
|
|
35555
35702
|
exports.ResolveLinks = ResolveLinks;
|
|
35556
35703
|
var Fetcher = /* @__PURE__ */ React2.forwardRef(function Fetcher2({ requests, disabled, children, ...rest }, ref) {
|
|
35557
35704
|
const cloneWithPropsAndRef = useCloneChildrenWithPropsAndRef(ref);
|
|
35558
|
-
const
|
|
35559
|
-
const childrenWithValues = children(data2, status);
|
|
35705
|
+
const childrenWithValues = useFetchRequestsForChildren(requests, disabled, children);
|
|
35560
35706
|
return cloneWithPropsAndRef(childrenWithValues, rest);
|
|
35561
35707
|
});
|
|
35562
35708
|
exports.Fetcher = Fetcher;
|
|
@@ -35590,19 +35736,19 @@ function isAnyCollection(value) {
|
|
|
35590
35736
|
return isAnyLegacyCollection(value) || isAnyDatabaseCollection(value);
|
|
35591
35737
|
}
|
|
35592
35738
|
function isLegacyCollection(value) {
|
|
35593
|
-
return isArray(value) && value.every(
|
|
35739
|
+
return isArray(value) && value.every(isObject2);
|
|
35594
35740
|
}
|
|
35595
35741
|
function isLegacyLocalizedCollection(value) {
|
|
35596
|
-
return
|
|
35742
|
+
return isObject2(value) && isFunction(value.read) && isFunction(value.preload);
|
|
35597
35743
|
}
|
|
35598
35744
|
function isAnyLegacyCollection(value) {
|
|
35599
35745
|
return isLegacyCollection(value) || isLegacyLocalizedCollection(value);
|
|
35600
35746
|
}
|
|
35601
35747
|
function isDatabaseCollection(value) {
|
|
35602
|
-
return
|
|
35748
|
+
return isObject2(value) && isObject2(value.schema);
|
|
35603
35749
|
}
|
|
35604
35750
|
function isLocalizedDatabaseCollection(value) {
|
|
35605
|
-
return
|
|
35751
|
+
return isObject2(value) && isObject2(value.collectionByLocaleId);
|
|
35606
35752
|
}
|
|
35607
35753
|
function isAnyDatabaseCollection(value) {
|
|
35608
35754
|
return isDatabaseCollection(value) || isLocalizedDatabaseCollection(value);
|
|
@@ -36482,7 +36628,7 @@ function Hash(value) {
|
|
|
36482
36628
|
return value;
|
|
36483
36629
|
}
|
|
36484
36630
|
function isHashable(value) {
|
|
36485
|
-
return
|
|
36631
|
+
return isObject2(value) && isFunction(value.getHash);
|
|
36486
36632
|
}
|
|
36487
36633
|
function calculateHash(name, ...values) {
|
|
36488
36634
|
const hashes = values.map((value) => {
|
|
@@ -39995,7 +40141,7 @@ function getCollectionId(collection) {
|
|
|
39995
40141
|
return id3;
|
|
39996
40142
|
}
|
|
39997
40143
|
function replaceCollection(_, value) {
|
|
39998
|
-
if (
|
|
40144
|
+
if (isObject2(value) && value.type === 'Collection' && isAnyCollection(value.data)) {
|
|
39999
40145
|
return getCollectionId(value.data);
|
|
40000
40146
|
}
|
|
40001
40147
|
return value;
|
|
@@ -40233,7 +40379,7 @@ function useDataRecord(collection, variables) {
|
|
|
40233
40379
|
const pageRecord = collection.find((record2) => {
|
|
40234
40380
|
return Object.entries(variables).every(([key7, value,]) => {
|
|
40235
40381
|
const recordValue = record2[key7];
|
|
40236
|
-
if (value === void 0 || recordValue === void 0 ||
|
|
40382
|
+
if (value === void 0 || recordValue === void 0 || isObject2(value) || isObject2(recordValue)) {
|
|
40237
40383
|
return false;
|
|
40238
40384
|
}
|
|
40239
40385
|
return String(value) === String(recordValue);
|
|
@@ -40278,7 +40424,7 @@ function useSiteRefs() {
|
|
|
40278
40424
|
}, [path,]);
|
|
40279
40425
|
}
|
|
40280
40426
|
function isFramerGamepadKeydownData(value) {
|
|
40281
|
-
return
|
|
40427
|
+
return isObject2(value) && value.mapping !== void 0;
|
|
40282
40428
|
}
|
|
40283
40429
|
function gamepadInputsHaveChanged(previous, current2) {
|
|
40284
40430
|
if (previous.length !== current2.length)
|
|
@@ -40536,14 +40682,9 @@ function useOnAppear(callback) {
|
|
|
40536
40682
|
default: callback,
|
|
40537
40683
|
});
|
|
40538
40684
|
}
|
|
40539
|
-
|
|
40685
|
+
function setOverflow(blockDocumentScrolling, show) {
|
|
40540
40686
|
if (blockDocumentScrolling === false)
|
|
40541
40687
|
return;
|
|
40542
|
-
if (yieldBefore) {
|
|
40543
|
-
await yieldToMain({
|
|
40544
|
-
continueAfter: 'paint',
|
|
40545
|
-
});
|
|
40546
|
-
}
|
|
40547
40688
|
frame.render(() => {
|
|
40548
40689
|
const htmlStyle = document.documentElement.style;
|
|
40549
40690
|
if (show) {
|
|
@@ -40556,18 +40697,27 @@ async function setOverflow(blockDocumentScrolling, show, yieldBefore = true) {
|
|
|
40556
40697
|
}
|
|
40557
40698
|
function useOverlayState({ blockDocumentScrolling = true, } = {}) {
|
|
40558
40699
|
const [showOverlay, setShowOverlay,] = react_11.default.useState(false);
|
|
40559
|
-
const callback = react_11.default.useCallback((show) => {
|
|
40560
|
-
|
|
40561
|
-
|
|
40700
|
+
const callback = react_11.default.useCallback(async (show) => {
|
|
40701
|
+
await yieldToMain({
|
|
40702
|
+
priority: 'user-blocking',
|
|
40703
|
+
continueAfter: 'paint',
|
|
40704
|
+
});
|
|
40705
|
+
(0, react_12.startTransition)(() => setShowOverlay(show));
|
|
40706
|
+
setOverflow(blockDocumentScrolling, show);
|
|
40562
40707
|
}, [blockDocumentScrolling,]);
|
|
40563
40708
|
react_11.default.useEffect(() => () => {
|
|
40564
|
-
void
|
|
40709
|
+
void yieldToMain({
|
|
40710
|
+
priority: 'user-blocking',
|
|
40711
|
+
continueAfter: 'paint',
|
|
40712
|
+
}).then(() => {
|
|
40713
|
+
setOverflow(blockDocumentScrolling, false);
|
|
40714
|
+
});
|
|
40565
40715
|
}, [blockDocumentScrolling,]);
|
|
40566
40716
|
return [showOverlay, callback,];
|
|
40567
40717
|
}
|
|
40568
40718
|
var key4 = 'page';
|
|
40569
40719
|
function isRoute(route) {
|
|
40570
|
-
return
|
|
40720
|
+
return isObject2(route) && key4 in route && route.page !== void 0;
|
|
40571
40721
|
}
|
|
40572
40722
|
async function componentForRoute(route) {
|
|
40573
40723
|
if (!isRoute(route))
|
|
@@ -40585,7 +40735,7 @@ async function componentForRoute(route) {
|
|
|
40585
40735
|
}
|
|
40586
40736
|
var preloadKey2 = 'preload';
|
|
40587
40737
|
function withPreload(component) {
|
|
40588
|
-
return !!component &&
|
|
40738
|
+
return !!component && isObject2(component) && preloadKey2 in component;
|
|
40589
40739
|
}
|
|
40590
40740
|
function usePrototypeNavigate({ preload, } = {}) {
|
|
40591
40741
|
const navigation = useNavigation();
|
|
@@ -40703,7 +40853,7 @@ function getWhereExpressionFromPathVariables(pathVariables, collection) {
|
|
|
40703
40853
|
const entries = Object.entries(pathVariables ?? {}).filter(([, value,]) => {
|
|
40704
40854
|
if (isUndefined(value))
|
|
40705
40855
|
return false;
|
|
40706
|
-
if (
|
|
40856
|
+
if (isObject2(value))
|
|
40707
40857
|
return false;
|
|
40708
40858
|
return true;
|
|
40709
40859
|
});
|
|
@@ -40739,65 +40889,45 @@ function getWhereExpressionFromPathVariables(pathVariables, collection) {
|
|
|
40739
40889
|
}));
|
|
40740
40890
|
}
|
|
40741
40891
|
function useLoadMorePagination(totalSize, pageSize, hash2, paginateWithSuspendedLoadingState = false) {
|
|
40892
|
+
var _a, _b, _c, _d;
|
|
40893
|
+
const [isPending, startLoadingTransition,] = (0, react_16.useTransition)();
|
|
40742
40894
|
const totalPages = Math.ceil(totalSize / pageSize);
|
|
40743
|
-
const [
|
|
40744
|
-
|
|
40745
|
-
|
|
40746
|
-
|
|
40747
|
-
|
|
40748
|
-
|
|
40749
|
-
|
|
40750
|
-
|
|
40751
|
-
: _d.currentPage) ?? 1;
|
|
40895
|
+
const [currentPage, setCurrentPage,] = (0, react_4.useState)(((_d = (_c = (_b = (_a = globalThis == null ? void 0 : globalThis.history) == null ? void 0 : _a.state) == null
|
|
40896
|
+
? void 0
|
|
40897
|
+
: _b.paginationInfo) == null
|
|
40898
|
+
? void 0
|
|
40899
|
+
: _c[hash2]) == null
|
|
40900
|
+
? void 0
|
|
40901
|
+
: _d.currentPage) ?? 1);
|
|
40902
|
+
const paginationInfo = (0, react_4.useMemo)(() => {
|
|
40752
40903
|
return {
|
|
40753
40904
|
currentPage,
|
|
40754
40905
|
totalPages,
|
|
40755
|
-
isLoading:
|
|
40906
|
+
isLoading: isPending,
|
|
40756
40907
|
};
|
|
40757
|
-
});
|
|
40758
|
-
(0, react_2.useEffect)(() => {
|
|
40759
|
-
(0, react_12.startTransition)(() => {
|
|
40760
|
-
setPaginationInfo((current2) => {
|
|
40761
|
-
if (current2.totalPages === totalPages)
|
|
40762
|
-
return current2;
|
|
40763
|
-
return {
|
|
40764
|
-
...current2,
|
|
40765
|
-
totalPages,
|
|
40766
|
-
};
|
|
40767
|
-
});
|
|
40768
|
-
});
|
|
40769
|
-
}, [totalPages,]);
|
|
40908
|
+
}, [currentPage, totalPages, isPending,]);
|
|
40770
40909
|
(0, react_2.useEffect)(() => {
|
|
40771
40910
|
pushLoadMoreHistory(hash2, paginationInfo);
|
|
40772
40911
|
}, [hash2, paginationInfo,]);
|
|
40773
40912
|
const onCanvas = useIsOnFramerCanvas();
|
|
40774
|
-
const loadMore = (0, react_3.useCallback)(() => {
|
|
40913
|
+
const loadMore = (0, react_3.useCallback)(async () => {
|
|
40775
40914
|
if (onCanvas)
|
|
40776
40915
|
return;
|
|
40777
|
-
if (
|
|
40916
|
+
if (currentPage >= totalPages)
|
|
40778
40917
|
return;
|
|
40779
|
-
|
|
40780
|
-
|
|
40781
|
-
|
|
40782
|
-
...info,
|
|
40783
|
-
currentPage: Math.min(info.currentPage + 1, info.totalPages),
|
|
40784
|
-
isLoading: false,
|
|
40785
|
-
}));
|
|
40786
|
-
});
|
|
40787
|
-
return;
|
|
40788
|
-
}
|
|
40789
|
-
setPaginationInfo((info) => ({
|
|
40790
|
-
...info,
|
|
40791
|
-
isLoading: true,
|
|
40792
|
-
}));
|
|
40793
|
-
requestAnimationFrame(() => {
|
|
40794
|
-
setPaginationInfo((info) => ({
|
|
40795
|
-
...info,
|
|
40796
|
-
currentPage: Math.min(info.currentPage + 1, info.totalPages),
|
|
40797
|
-
isLoading: false,
|
|
40798
|
-
}));
|
|
40918
|
+
await yieldToMain({
|
|
40919
|
+
priority: 'user-blocking',
|
|
40920
|
+
continueAfter: 'paint',
|
|
40799
40921
|
});
|
|
40800
|
-
|
|
40922
|
+
const renderNextPage = (startTransition14) => {
|
|
40923
|
+
startTransition14(() => {
|
|
40924
|
+
setCurrentPage((_currentPage) => Math.min(_currentPage + 1, totalPages));
|
|
40925
|
+
});
|
|
40926
|
+
};
|
|
40927
|
+
if (!paginateWithSuspendedLoadingState)
|
|
40928
|
+
return renderNextPage(react_12.startTransition);
|
|
40929
|
+
return renderNextPage(startLoadingTransition);
|
|
40930
|
+
}, [currentPage, totalPages, paginateWithSuspendedLoadingState,]);
|
|
40801
40931
|
return {
|
|
40802
40932
|
paginationInfo,
|
|
40803
40933
|
loadMore,
|
|
@@ -40918,15 +41048,16 @@ function useRunCallbackIfPageIsVisible() {
|
|
|
40918
41048
|
}, [clean,]);
|
|
40919
41049
|
}
|
|
40920
41050
|
function useRunCallbackIfElementIsInView() {
|
|
40921
|
-
const
|
|
41051
|
+
const observerRefCleanup = (0, react_4.useRef)();
|
|
40922
41052
|
const isInViewRef = (0, react_4.useRef)(false);
|
|
40923
41053
|
const callbackRef = (0, react_4.useRef)();
|
|
41054
|
+
const observers2 = (0, react_3.useContext)(SharedIntersectionObserverContext);
|
|
40924
41055
|
(0, react_2.useEffect)(() => {
|
|
40925
41056
|
return () => {
|
|
40926
41057
|
var _a;
|
|
40927
|
-
(_a =
|
|
41058
|
+
(_a = observerRefCleanup.current) == null ? void 0 : _a.call(observerRefCleanup);
|
|
40928
41059
|
callbackRef.current = void 0;
|
|
40929
|
-
|
|
41060
|
+
observerRefCleanup.current = void 0;
|
|
40930
41061
|
};
|
|
40931
41062
|
}, []);
|
|
40932
41063
|
return (0, react_3.useCallback)((callback, ref) => {
|
|
@@ -40935,23 +41066,24 @@ function useRunCallbackIfElementIsInView() {
|
|
|
40935
41066
|
return;
|
|
40936
41067
|
}
|
|
40937
41068
|
callbackRef.current = callback;
|
|
40938
|
-
if (
|
|
41069
|
+
if (observerRefCleanup.current)
|
|
40939
41070
|
return;
|
|
40940
|
-
|
|
40941
|
-
|
|
40942
|
-
|
|
40943
|
-
|
|
40944
|
-
const entry = entries[i];
|
|
40945
|
-
isIntersecting = entry.isIntersecting;
|
|
40946
|
-
}
|
|
40947
|
-
isInViewRef.current = isIntersecting;
|
|
40948
|
-
if (!isIntersecting)
|
|
41071
|
+
let queuedMicrotask = false;
|
|
41072
|
+
const observerCallback = (entry) => {
|
|
41073
|
+
isInViewRef.current = entry.isIntersecting;
|
|
41074
|
+
if (queuedMicrotask)
|
|
40949
41075
|
return;
|
|
40950
|
-
|
|
40951
|
-
|
|
40952
|
-
|
|
40953
|
-
|
|
40954
|
-
|
|
41076
|
+
queuedMicrotask = true;
|
|
41077
|
+
queueMicrotask(() => {
|
|
41078
|
+
var _a;
|
|
41079
|
+
if (!isInViewRef.current)
|
|
41080
|
+
return;
|
|
41081
|
+
queuedMicrotask = false;
|
|
41082
|
+
(_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef);
|
|
41083
|
+
});
|
|
41084
|
+
};
|
|
41085
|
+
observerRefCleanup.current = observeElement(observers2, 'undefined', ref.current, null, observerCallback);
|
|
41086
|
+
}, [observers2,]);
|
|
40955
41087
|
}
|
|
40956
41088
|
function useUpdateIfVisible(ref) {
|
|
40957
41089
|
const runUpdateIfPageIsVisible = useRunCallbackIfPageIsVisible();
|
|
@@ -40969,20 +41101,27 @@ var globalWaitingForClickPromise;
|
|
|
40969
41101
|
var globalWaitingForClickResolve;
|
|
40970
41102
|
async function getPromiseWithFallback() {
|
|
40971
41103
|
return new Promise((resolve) => {
|
|
40972
|
-
|
|
41104
|
+
let resolveFn = resolve;
|
|
41105
|
+
setTimeout(() => {
|
|
41106
|
+
if (!resolveFn)
|
|
41107
|
+
return;
|
|
41108
|
+
performance.mark('wait-for-click-fallback');
|
|
41109
|
+
resolveFn();
|
|
41110
|
+
}, 150);
|
|
41111
|
+
globalWaitingForClickResolve = () => {
|
|
40973
41112
|
resolve();
|
|
40974
|
-
|
|
41113
|
+
resolveFn = void 0;
|
|
40975
41114
|
};
|
|
40976
|
-
const timeout = setTimeout(resolveFn, 150);
|
|
40977
|
-
globalWaitingForClickResolve = resolveFn;
|
|
40978
41115
|
});
|
|
40979
41116
|
}
|
|
40980
41117
|
function globalWaitForClickListener(event) {
|
|
40981
41118
|
if (event.button === 0) {
|
|
41119
|
+
performance.mark('pointerdown-listener');
|
|
40982
41120
|
globalWaitingForClickPromise = getPromiseWithFallback();
|
|
40983
41121
|
}
|
|
40984
41122
|
}
|
|
40985
41123
|
function globalClickReceivedListener() {
|
|
41124
|
+
performance.mark('click-received-listener');
|
|
40986
41125
|
globalWaitingForClickPromise = void 0;
|
|
40987
41126
|
globalWaitingForClickResolve == null ? void 0 : globalWaitingForClickResolve();
|
|
40988
41127
|
globalWaitingForClickResolve = void 0;
|
|
@@ -41038,13 +41177,17 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
|
|
|
41038
41177
|
internalState.current.gestureVariant = nextGesture;
|
|
41039
41178
|
const yieldOnTap = yieldOnTapFeatureOn && internalState.current.isPressedHasUpdated;
|
|
41040
41179
|
if (yieldOnTap && globalWaitingForClickPromise) {
|
|
41180
|
+
performance.mark('wait-for-tap-start');
|
|
41041
41181
|
await globalWaitingForClickPromise;
|
|
41182
|
+
performance.measure('wait-for-tap', 'wait-for-tap-start');
|
|
41042
41183
|
}
|
|
41043
41184
|
if (yieldOnTap) {
|
|
41185
|
+
performance.mark('yield-on-tap-start');
|
|
41044
41186
|
await yieldToMain({
|
|
41045
41187
|
priority: 'user-blocking',
|
|
41046
41188
|
continueAfter: 'paint',
|
|
41047
41189
|
});
|
|
41190
|
+
performance.measure('yield-on-tap', 'yield-on-tap-start');
|
|
41048
41191
|
}
|
|
41049
41192
|
const { isHovered: isHovered2, isPressed: isPressed2, isHoveredHasUpdated, isPressedHasUpdated, } = internalState.current;
|
|
41050
41193
|
if (isHovered2 || isHoveredHasUpdated || isPressed2 || isPressedHasUpdated) {
|
|
@@ -41169,7 +41312,7 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
|
|
|
41169
41312
|
if (shouldWrapWithBoundary) {
|
|
41170
41313
|
if (appliedOverride.status === 'success') {
|
|
41171
41314
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(CodeComponentBoundary, {
|
|
41172
|
-
|
|
41315
|
+
getErrorMessage: getErrorMessageForOverride.bind(null, scopeId, nodeId),
|
|
41173
41316
|
fallback: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
|
|
41174
41317
|
...props,
|
|
41175
41318
|
ref,
|
|
@@ -41397,7 +41540,7 @@ var withVariantAppearEffect = (Component17) => react_11.default.forwardRef((prop
|
|
|
41397
41540
|
});
|
|
41398
41541
|
});
|
|
41399
41542
|
}, [animateOnce, threshold, targets, props.variant, scrollDirection, exitTarget,]);
|
|
41400
|
-
useScrollDirectionChange(scrollDirection, setVariant, {
|
|
41543
|
+
useScrollDirectionChange(scrollDirection, (variant) => react_11.default.startTransition(() => setVariant(variant)), {
|
|
41401
41544
|
enabled: variantAppearEffectEnabled,
|
|
41402
41545
|
repeat: !animateOnce,
|
|
41403
41546
|
});
|
|
@@ -41406,7 +41549,7 @@ var withVariantAppearEffect = (Component17) => react_11.default.forwardRef((prop
|
|
|
41406
41549
|
return;
|
|
41407
41550
|
const useObscuredVariant = !options.targets && !options.scrollDirection;
|
|
41408
41551
|
const target = useObscuredVariant ? options.obscuredVariantId : void 0;
|
|
41409
|
-
|
|
41552
|
+
(0, react_12.startTransition)(() => setVariant(target));
|
|
41410
41553
|
});
|
|
41411
41554
|
if (!('variantAppearEffectEnabled' in options) || variantAppearEffectEnabled === true) {
|
|
41412
41555
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
|
|
@@ -43250,10 +43393,10 @@ function loadVariationAxes(source) {
|
|
|
43250
43393
|
}
|
|
43251
43394
|
}
|
|
43252
43395
|
function isValidVariationAxesData(data2) {
|
|
43253
|
-
return
|
|
43396
|
+
return isObject2(data2) && Object.values(data2).every(isValidVariationAxes);
|
|
43254
43397
|
}
|
|
43255
43398
|
function isVariationAxis2(data2) {
|
|
43256
|
-
return
|
|
43399
|
+
return isObject2(data2) && isString(data2.tag);
|
|
43257
43400
|
}
|
|
43258
43401
|
function isValidVariationAxes(data2) {
|
|
43259
43402
|
return Array.isArray(data2) && data2.every(isVariationAxis2);
|
|
@@ -43262,10 +43405,13 @@ var FontStore = class {
|
|
|
43262
43405
|
constructor() {
|
|
43263
43406
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'enabled', false);
|
|
43264
43407
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'bySelector', /* @__PURE__ */ new Map());
|
|
43408
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'loadedSelectors', /* @__PURE__ */ new Set());
|
|
43265
43409
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'getGoogleFontsListPromise');
|
|
43266
43410
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'getFontshareFontsListPromise');
|
|
43267
43411
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'getBuiltInFontsListPromise');
|
|
43268
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, '
|
|
43412
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'customFontsImportPromise', new Promise((resolve) => {
|
|
43413
|
+
this.resolveCustomFontsImportPromise = resolve;
|
|
43414
|
+
}));
|
|
43269
43415
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'local');
|
|
43270
43416
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'google');
|
|
43271
43417
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'fontshare');
|
|
@@ -43342,9 +43488,13 @@ var FontStore = class {
|
|
|
43342
43488
|
this.bySelector.delete(key7);
|
|
43343
43489
|
}
|
|
43344
43490
|
});
|
|
43345
|
-
|
|
43491
|
+
const importedFonts = this.custom.importFonts(assets);
|
|
43492
|
+
for (const font of importedFonts) {
|
|
43346
43493
|
this.addFont(font);
|
|
43347
43494
|
}
|
|
43495
|
+
if (importedFonts.length > 0) {
|
|
43496
|
+
this.resolveCustomFontsImportPromise();
|
|
43497
|
+
}
|
|
43348
43498
|
}
|
|
43349
43499
|
getFontFamily(info) {
|
|
43350
43500
|
const fontFamily = this[info.source].getFontFamilyByName(info.name);
|
|
@@ -43500,6 +43650,12 @@ var FontStore = class {
|
|
|
43500
43650
|
warnOnce2('Failed to load built-in fonts:', error);
|
|
43501
43651
|
}));
|
|
43502
43652
|
}
|
|
43653
|
+
const shouldImportCustomFonts = selectors.some((selector) => selector.startsWith(customFontSelectorPrefix));
|
|
43654
|
+
if (shouldImportCustomFonts) {
|
|
43655
|
+
importPromises.push(this.customFontsImportPromise.catch((error) => {
|
|
43656
|
+
warnOnce2('Failed to load custom fonts:', error);
|
|
43657
|
+
}));
|
|
43658
|
+
}
|
|
43503
43659
|
if (importPromises.length > 0) {
|
|
43504
43660
|
await Promise.all(importPromises);
|
|
43505
43661
|
}
|
|
@@ -43776,10 +43932,9 @@ var PlainTextInput = /* @__PURE__ */ (0, react_7.forwardRef)(function FormPlainT
|
|
|
43776
43932
|
className: cx(textInputWrapperClassName, inputWrapperClassName, className2),
|
|
43777
43933
|
...rest,
|
|
43778
43934
|
children: type === 'textarea'
|
|
43779
|
-
? /* @__PURE__ */ (0,
|
|
43935
|
+
? /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.textarea, {
|
|
43780
43936
|
...dataProps,
|
|
43781
43937
|
...eventHandlers,
|
|
43782
|
-
key: defaultValue,
|
|
43783
43938
|
required,
|
|
43784
43939
|
autoFocus,
|
|
43785
43940
|
name: inputName,
|
|
@@ -43787,11 +43942,10 @@ var PlainTextInput = /* @__PURE__ */ (0, react_7.forwardRef)(function FormPlainT
|
|
|
43787
43942
|
className: inputClassName,
|
|
43788
43943
|
defaultValue,
|
|
43789
43944
|
maxLength,
|
|
43790
|
-
})
|
|
43791
|
-
: /* @__PURE__ */ (0,
|
|
43945
|
+
}, defaultValue)
|
|
43946
|
+
: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.input, {
|
|
43792
43947
|
...dataProps,
|
|
43793
43948
|
...eventHandlers,
|
|
43794
|
-
key: defaultValue,
|
|
43795
43949
|
type,
|
|
43796
43950
|
required,
|
|
43797
43951
|
autoFocus,
|
|
@@ -43803,7 +43957,7 @@ var PlainTextInput = /* @__PURE__ */ (0, react_7.forwardRef)(function FormPlainT
|
|
|
43803
43957
|
max,
|
|
43804
43958
|
step: step2,
|
|
43805
43959
|
maxLength,
|
|
43806
|
-
}),
|
|
43960
|
+
}, defaultValue),
|
|
43807
43961
|
});
|
|
43808
43962
|
});
|
|
43809
43963
|
var iconSize2 = 16;
|
|
@@ -45030,7 +45184,7 @@ function processRichTextChildren(element, stylesPresetsClassNames, plainText, an
|
|
|
45030
45184
|
children = [anchorLink,];
|
|
45031
45185
|
}
|
|
45032
45186
|
}
|
|
45033
|
-
return (0,
|
|
45187
|
+
return (0, react_17.cloneElement)(element, props, ...children);
|
|
45034
45188
|
}
|
|
45035
45189
|
function generateHeadingSlug(children, slugCounters) {
|
|
45036
45190
|
const headingText = children.map(extractTextFromReactNode).join('');
|
|
@@ -45057,7 +45211,7 @@ function extractTextFromReactNode(node) {
|
|
|
45057
45211
|
var RichText2 = /* @__PURE__ */ (0, react_7.forwardRef)(function RichText3({ children, html, htmlFromDesign, ...props }, ref) {
|
|
45058
45212
|
const content = html || children || htmlFromDesign;
|
|
45059
45213
|
if (isString(content)) {
|
|
45060
|
-
if (!props.stylesPresetsClassName &&
|
|
45214
|
+
if (!props.stylesPresetsClassName && isObject2(props.stylesPresetsClassNames)) {
|
|
45061
45215
|
props.stylesPresetsClassName = Object.values(props.stylesPresetsClassNames).join(' ');
|
|
45062
45216
|
}
|
|
45063
45217
|
const contentProp = {
|
|
@@ -47108,7 +47262,7 @@ var VectorGroup = /* @__PURE__ */ (() => {
|
|
|
47108
47262
|
exports.VectorGroup = VectorGroup;
|
|
47109
47263
|
var key6 = 'calculatedPaths';
|
|
47110
47264
|
function withShape(target) {
|
|
47111
|
-
if (!
|
|
47265
|
+
if (!isObject2(target))
|
|
47112
47266
|
return false;
|
|
47113
47267
|
return key6 in target;
|
|
47114
47268
|
}
|
|
@@ -47347,7 +47501,7 @@ function inspect(item, max, l) {
|
|
|
47347
47501
|
if (item === void 0) {
|
|
47348
47502
|
return 'undefined';
|
|
47349
47503
|
}
|
|
47350
|
-
if (
|
|
47504
|
+
if (isObject2(item) && isFunction(item.toInspect)) {
|
|
47351
47505
|
return item.toInspect();
|
|
47352
47506
|
}
|
|
47353
47507
|
if (isString(item)) {
|
|
@@ -47360,7 +47514,7 @@ function inspect(item, max, l) {
|
|
|
47360
47514
|
let code = item.toString().slice('function '.length).replace(/\n/gu, '').replace(/\s+/gu, ' ');
|
|
47361
47515
|
const limit = 50;
|
|
47362
47516
|
if (code.length > limit && l > 0) {
|
|
47363
|
-
code = `${code.slice(0,
|
|
47517
|
+
code = `${code.slice(0, limit + 1).trim()}\u2026 }`;
|
|
47364
47518
|
}
|
|
47365
47519
|
return `<Function ${code}>`;
|
|
47366
47520
|
}
|
|
@@ -47370,7 +47524,7 @@ function inspect(item, max, l) {
|
|
|
47370
47524
|
}
|
|
47371
47525
|
return `[${item.map((i) => inspect(i, max, (l || 0) + 1)).join(', ')}]`;
|
|
47372
47526
|
}
|
|
47373
|
-
if (
|
|
47527
|
+
if (isObject2(item)) {
|
|
47374
47528
|
let objectInfo;
|
|
47375
47529
|
const objectType = inspectObjectType(item);
|
|
47376
47530
|
if (/HTML\w+?Element/u.test(objectType)) {
|
|
@@ -47449,8 +47603,8 @@ var package_default = {
|
|
|
47449
47603
|
'@types/react': '^18.2.67',
|
|
47450
47604
|
'@types/react-dom': '^18.2.22',
|
|
47451
47605
|
'@types/yargs': '^17.0.33',
|
|
47452
|
-
'@typescript-eslint/eslint-plugin': '^8.
|
|
47453
|
-
'@typescript-eslint/parser': '^8.
|
|
47606
|
+
'@typescript-eslint/eslint-plugin': '^8.32.1',
|
|
47607
|
+
'@typescript-eslint/parser': '^8.32.1',
|
|
47454
47608
|
chalk: '^4.1.2',
|
|
47455
47609
|
eslint: '^8.57.1',
|
|
47456
47610
|
'eslint-plugin-framer-studio': 'workspace:*',
|
|
@@ -47466,7 +47620,7 @@ var package_default = {
|
|
|
47466
47620
|
yargs: '^17.7.2',
|
|
47467
47621
|
},
|
|
47468
47622
|
peerDependencies: {
|
|
47469
|
-
'framer-motion': '12.
|
|
47623
|
+
'framer-motion': '12.14.0',
|
|
47470
47624
|
react: '^18.2.0',
|
|
47471
47625
|
'react-dom': '^18.2.0',
|
|
47472
47626
|
},
|