unframer 3.2.0 → 3.2.4
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/README.md +4 -4
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +106 -7
- package/dist/cli.js.map +1 -1
- package/dist/css.d.ts +5 -0
- package/dist/css.d.ts.map +1 -1
- package/dist/css.js +25 -0
- package/dist/css.js.map +1 -1
- package/dist/exporter.d.ts.map +1 -1
- package/dist/exporter.js +38 -4
- package/dist/exporter.js.map +1 -1
- package/dist/framer-chunks/chunk-VUHWYTYT.d.ts +15 -0
- package/dist/framer-chunks/chunk-VUHWYTYT.d.ts.map +1 -0
- package/dist/framer-chunks/chunk-VUHWYTYT.js +111 -0
- package/dist/framer-chunks/chunk-VUHWYTYT.js.map +1 -0
- package/dist/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.d.ts +634 -0
- package/dist/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.d.ts.map +1 -0
- package/dist/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.js +8 -0
- package/dist/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.js.map +1 -0
- package/dist/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.d.ts +115 -0
- package/dist/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.d.ts.map +1 -0
- package/dist/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.js +8 -0
- package/dist/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.js.map +1 -0
- package/dist/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.d.ts +781 -0
- package/dist/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.d.ts.map +1 -0
- package/dist/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.js +8 -0
- package/dist/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.js.map +1 -0
- package/dist/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.d.ts +18 -0
- package/dist/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.d.ts.map +1 -0
- package/dist/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.js +8 -0
- package/dist/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.js.map +1 -0
- package/dist/framer-chunks/google-63PUBKA6-AMAUIPXM.d.ts +1566 -0
- package/dist/framer-chunks/google-63PUBKA6-AMAUIPXM.d.ts.map +1 -0
- package/dist/framer-chunks/google-63PUBKA6-AMAUIPXM.js +8 -0
- package/dist/framer-chunks/google-63PUBKA6-AMAUIPXM.js.map +1 -0
- package/dist/framer-chunks/google-7QNFQWAU-FKX5MRKV.d.ts +3588 -0
- package/dist/framer-chunks/google-7QNFQWAU-FKX5MRKV.d.ts.map +1 -0
- package/dist/framer-chunks/google-7QNFQWAU-FKX5MRKV.js +8 -0
- package/dist/framer-chunks/google-7QNFQWAU-FKX5MRKV.js.map +1 -0
- package/dist/framer-chunks/google-KTMKGB4J-RA7CAZTC.d.ts +10293 -0
- package/dist/framer-chunks/google-KTMKGB4J-RA7CAZTC.d.ts.map +1 -0
- package/dist/framer-chunks/google-KTMKGB4J-RA7CAZTC.js +8 -0
- package/dist/framer-chunks/google-KTMKGB4J-RA7CAZTC.js.map +1 -0
- package/dist/framer.js +1480 -907
- package/dist/generated/api-client.d.ts +1 -1
- package/dist/generated/api-client.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/package-manager.d.ts +1 -1
- package/dist/package-manager.d.ts.map +1 -1
- package/dist/package-manager.js.map +1 -1
- package/dist/stackblitz.d.ts +9 -0
- package/dist/stackblitz.d.ts.map +1 -0
- package/dist/stackblitz.js +182 -0
- package/dist/stackblitz.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/cli.d.ts.map +1 -1
- package/esm/cli.js +108 -9
- package/esm/cli.js.map +1 -1
- package/esm/css.d.ts +5 -0
- package/esm/css.d.ts.map +1 -1
- package/esm/css.js +24 -0
- package/esm/css.js.map +1 -1
- package/esm/exporter.d.ts.map +1 -1
- package/esm/exporter.js +38 -4
- package/esm/exporter.js.map +1 -1
- package/esm/framer-chunks/chunk-VUHWYTYT.d.ts +15 -0
- package/esm/framer-chunks/chunk-VUHWYTYT.d.ts.map +1 -0
- package/esm/framer-chunks/chunk-VUHWYTYT.js +96 -0
- package/esm/framer-chunks/chunk-VUHWYTYT.js.map +1 -0
- package/esm/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.d.ts +634 -0
- package/esm/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.d.ts.map +1 -0
- package/esm/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.js +5 -0
- package/esm/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.js.map +1 -0
- package/esm/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.d.ts +115 -0
- package/esm/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.d.ts.map +1 -0
- package/esm/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.js +5 -0
- package/esm/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.js.map +1 -0
- package/esm/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.d.ts +781 -0
- package/esm/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.d.ts.map +1 -0
- package/esm/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.js +5 -0
- package/esm/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.js.map +1 -0
- package/esm/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.d.ts +18 -0
- package/esm/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.d.ts.map +1 -0
- package/esm/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.js +5 -0
- package/esm/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.js.map +1 -0
- package/esm/framer-chunks/google-63PUBKA6-AMAUIPXM.d.ts +1566 -0
- package/esm/framer-chunks/google-63PUBKA6-AMAUIPXM.d.ts.map +1 -0
- package/esm/framer-chunks/google-63PUBKA6-AMAUIPXM.js +5 -0
- package/esm/framer-chunks/google-63PUBKA6-AMAUIPXM.js.map +1 -0
- package/esm/framer-chunks/google-7QNFQWAU-FKX5MRKV.d.ts +3588 -0
- package/esm/framer-chunks/google-7QNFQWAU-FKX5MRKV.d.ts.map +1 -0
- package/esm/framer-chunks/google-7QNFQWAU-FKX5MRKV.js +5 -0
- package/esm/framer-chunks/google-7QNFQWAU-FKX5MRKV.js.map +1 -0
- package/esm/framer-chunks/google-KTMKGB4J-RA7CAZTC.d.ts +10293 -0
- package/esm/framer-chunks/google-KTMKGB4J-RA7CAZTC.d.ts.map +1 -0
- package/esm/framer-chunks/google-KTMKGB4J-RA7CAZTC.js +5 -0
- package/esm/framer-chunks/google-KTMKGB4J-RA7CAZTC.js.map +1 -0
- package/esm/framer.js +1217 -647
- package/esm/index.d.ts +3 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +4 -0
- package/esm/index.js.map +1 -1
- package/esm/package-manager.d.ts +1 -1
- package/esm/package-manager.d.ts.map +1 -1
- package/esm/package-manager.js.map +1 -1
- package/esm/stackblitz.d.ts +9 -0
- package/esm/stackblitz.d.ts.map +1 -0
- package/esm/stackblitz.js +179 -0
- package/esm/stackblitz.js.map +1 -0
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/package.json +3 -3
- package/src/cli.ts +122 -11
- package/src/{css.ts → css.tsx} +38 -0
- package/src/exporter.ts +45 -4
- package/src/framer-chunks/chunk-VUHWYTYT.js +105 -0
- package/src/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.js +7 -0
- package/src/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.js +7 -0
- package/src/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.js +7 -0
- package/src/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.js +7 -0
- package/src/framer-chunks/google-63PUBKA6-AMAUIPXM.js +7 -0
- package/src/framer-chunks/google-7QNFQWAU-FKX5MRKV.js +7 -0
- package/src/framer-chunks/google-KTMKGB4J-RA7CAZTC.js +7 -0
- package/src/framer.js +1210 -632
- package/src/index.ts +6 -0
- package/src/package-manager.ts +2 -4
- package/src/stackblitz.ts +193 -0
- package/src/styles/framer.css +24 -0
- 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 = exports.withV1StrokeFX = exports.withStyleAppearEffect = exports.withParallaxTransform = exports.withMeasuredSize = exports.withGeneratedLayoutId = exports.withFX = exports.withCSS = void 0;
|
|
39
|
+
exports.cubicBezierAsString = exports.cssCollector = 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.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 = exports.CustomCursorHost = void 0;
|
|
41
|
+
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 = exports.framerAppearTransformTemplateToken = void 0;
|
|
42
|
+
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 = exports.millisecondsToSeconds = void 0;
|
|
43
|
+
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 = exports.ResolveLinks = 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 = exports.WindowContext = void 0;
|
|
45
45
|
exports._injectRuntime = _injectRuntime;
|
|
46
46
|
exports.addActionControls = addActionControls;
|
|
47
47
|
exports.addFonts = addFonts;
|
|
@@ -193,6 +193,7 @@ exports.recordStats = recordStats;
|
|
|
193
193
|
exports.removeHiddenBreakpointLayers = removeHiddenBreakpointLayers;
|
|
194
194
|
exports.removeHiddenBreakpointLayersV2 = removeHiddenBreakpointLayersV2;
|
|
195
195
|
exports.removeItem = removeItem;
|
|
196
|
+
exports.ResetOuterLinkContext = ResetOuterLinkContext;
|
|
196
197
|
exports.resize = resize;
|
|
197
198
|
exports.resolveElements = resolveElements;
|
|
198
199
|
exports.resolveLink = resolveLink;
|
|
@@ -282,6 +283,7 @@ exports.useOnCurrentTargetChange = useOnCurrentTargetChange;
|
|
|
282
283
|
exports.useOnVariantChange = useOnVariantChange;
|
|
283
284
|
exports.useOverlayState = useOverlayState;
|
|
284
285
|
exports.usePageEffects = usePageEffects;
|
|
286
|
+
exports.usePageInView = usePageInView;
|
|
285
287
|
exports.usePrefetch = usePrefetch;
|
|
286
288
|
exports.usePreloadQuery = usePreloadQuery;
|
|
287
289
|
exports.usePresence = usePresence;
|
|
@@ -325,7 +327,7 @@ exports.withShape = withShape;
|
|
|
325
327
|
exports.yieldToMain = yieldToMain;
|
|
326
328
|
exports.Router = Router;
|
|
327
329
|
const chunk_A2PMVMFI_js_1 = require("./framer-chunks/chunk-A2PMVMFI.js");
|
|
328
|
-
// /:https://app.framerstatic.com/chunk-
|
|
330
|
+
// /:https://app.framerstatic.com/chunk-VDW2YK33.mjs
|
|
329
331
|
const react_1 = require("react");
|
|
330
332
|
const react_2 = require("react");
|
|
331
333
|
const react_3 = require("react");
|
|
@@ -698,11 +700,11 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
|
698
700
|
isProcessing: false,
|
|
699
701
|
};
|
|
700
702
|
const flagRunNextFrame = () => runNextFrame = true;
|
|
701
|
-
const
|
|
703
|
+
const steps22 = stepsOrder.reduce((acc, key7) => {
|
|
702
704
|
acc[key7] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key7 : void 0);
|
|
703
705
|
return acc;
|
|
704
706
|
}, {});
|
|
705
|
-
const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } =
|
|
707
|
+
const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps22;
|
|
706
708
|
const processBatch = () => {
|
|
707
709
|
const timestamp = MotionGlobalConfig.useManualTiming ? state.timestamp : performance.now();
|
|
708
710
|
runNextFrame = false;
|
|
@@ -733,7 +735,7 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
|
733
735
|
}
|
|
734
736
|
};
|
|
735
737
|
const schedule = stepsOrder.reduce((acc, key7) => {
|
|
736
|
-
const step2 =
|
|
738
|
+
const step2 = steps22[key7];
|
|
737
739
|
acc[key7] = (process2, keepAlive = false, immediate = false) => {
|
|
738
740
|
if (!runNextFrame)
|
|
739
741
|
wake();
|
|
@@ -743,14 +745,14 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
|
743
745
|
}, {});
|
|
744
746
|
const cancel = (process2) => {
|
|
745
747
|
for (let i = 0; i < stepsOrder.length; i++) {
|
|
746
|
-
|
|
748
|
+
steps22[stepsOrder[i]].cancel(process2);
|
|
747
749
|
}
|
|
748
750
|
};
|
|
749
751
|
return {
|
|
750
752
|
schedule,
|
|
751
753
|
cancel,
|
|
752
754
|
state,
|
|
753
|
-
steps:
|
|
755
|
+
steps: steps22,
|
|
754
756
|
};
|
|
755
757
|
}
|
|
756
758
|
var { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== 'undefined' ? requestAnimationFrame : noop, true);
|
|
@@ -923,6 +925,11 @@ var color = {
|
|
|
923
925
|
transform: (v) => {
|
|
924
926
|
return typeof v === 'string' ? v : v.hasOwnProperty('red') ? rgba.transform(v) : hsla.transform(v);
|
|
925
927
|
},
|
|
928
|
+
getAnimatableNone: (v) => {
|
|
929
|
+
const parsed = color.parse(v);
|
|
930
|
+
parsed.alpha = 0;
|
|
931
|
+
return color.transform(parsed);
|
|
932
|
+
},
|
|
926
933
|
};
|
|
927
934
|
exports.color = color;
|
|
928
935
|
var colorRegex = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
@@ -1001,7 +1008,7 @@ function createTransformer(source) {
|
|
|
1001
1008
|
return output;
|
|
1002
1009
|
};
|
|
1003
1010
|
}
|
|
1004
|
-
var convertNumbersToZero = (v) => typeof v === 'number' ? 0 : v;
|
|
1011
|
+
var convertNumbersToZero = (v) => typeof v === 'number' ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;
|
|
1005
1012
|
function getAnimatableNone(v) {
|
|
1006
1013
|
const parsed = parseComplexValue(v);
|
|
1007
1014
|
const transformer = createTransformer(v);
|
|
@@ -1198,7 +1205,7 @@ var generateLinearEasing = (easing, duration, resolution = 10) => {
|
|
|
1198
1205
|
let points = '';
|
|
1199
1206
|
const numPoints = Math.max(Math.round(duration / resolution), 2);
|
|
1200
1207
|
for (let i = 0; i < numPoints; i++) {
|
|
1201
|
-
points += easing(i / (numPoints - 1)) + ', ';
|
|
1208
|
+
points += Math.round(easing(i / (numPoints - 1)) * 1e4) / 1e4 + ', ';
|
|
1202
1209
|
}
|
|
1203
1210
|
return `linear(${points.substring(0, points.length - 2)})`;
|
|
1204
1211
|
};
|
|
@@ -4327,7 +4334,7 @@ function addToQueue(builder) {
|
|
|
4327
4334
|
}
|
|
4328
4335
|
var ViewTransitionBuilder = class {
|
|
4329
4336
|
constructor(update, options = {}) {
|
|
4330
|
-
this.
|
|
4337
|
+
this.currentSubject = 'root';
|
|
4331
4338
|
this.targets = /* @__PURE__ */ new Map();
|
|
4332
4339
|
this.notifyReady = noop;
|
|
4333
4340
|
this.readyPromise = new Promise((resolve) => {
|
|
@@ -4340,8 +4347,8 @@ var ViewTransitionBuilder = class {
|
|
|
4340
4347
|
};
|
|
4341
4348
|
addToQueue(this);
|
|
4342
4349
|
}
|
|
4343
|
-
get(
|
|
4344
|
-
this.
|
|
4350
|
+
get(subject) {
|
|
4351
|
+
this.currentSubject = subject;
|
|
4345
4352
|
return this;
|
|
4346
4353
|
}
|
|
4347
4354
|
layout(keyframes2, options) {
|
|
@@ -4374,11 +4381,11 @@ var ViewTransitionBuilder = class {
|
|
|
4374
4381
|
return this;
|
|
4375
4382
|
}
|
|
4376
4383
|
updateTarget(target, keyframes2, options = {}) {
|
|
4377
|
-
const {
|
|
4378
|
-
if (!targets.has(
|
|
4379
|
-
targets.set(
|
|
4384
|
+
const { currentSubject, targets, } = this;
|
|
4385
|
+
if (!targets.has(currentSubject)) {
|
|
4386
|
+
targets.set(currentSubject, {});
|
|
4380
4387
|
}
|
|
4381
|
-
const targetData = targets.get(
|
|
4388
|
+
const targetData = targets.get(currentSubject);
|
|
4382
4389
|
targetData[target] = {
|
|
4383
4390
|
keyframes: keyframes2,
|
|
4384
4391
|
options,
|
|
@@ -4455,7 +4462,7 @@ var PopChildMeasure = class extends React2.Component {
|
|
|
4455
4462
|
return this.props.children;
|
|
4456
4463
|
}
|
|
4457
4464
|
};
|
|
4458
|
-
function PopChild({ children, isPresent: isPresent2, anchorX, }) {
|
|
4465
|
+
function PopChild({ children, isPresent: isPresent2, anchorX, root, }) {
|
|
4459
4466
|
const id4 = (0, react_3.useId)();
|
|
4460
4467
|
const ref = (0, react_4.useRef)(null);
|
|
4461
4468
|
const size = (0, react_4.useRef)({
|
|
@@ -4475,7 +4482,8 @@ function PopChild({ children, isPresent: isPresent2, anchorX, }) {
|
|
|
4475
4482
|
const style2 = document.createElement('style');
|
|
4476
4483
|
if (nonce)
|
|
4477
4484
|
style2.nonce = nonce;
|
|
4478
|
-
document.head
|
|
4485
|
+
const parent = root ?? document.head;
|
|
4486
|
+
parent.appendChild(style2);
|
|
4479
4487
|
if (style2.sheet) {
|
|
4480
4488
|
style2.sheet.insertRule(`
|
|
4481
4489
|
[data-motion-pop-id="${id4}"] {
|
|
@@ -4488,8 +4496,9 @@ function PopChild({ children, isPresent: isPresent2, anchorX, }) {
|
|
|
4488
4496
|
`);
|
|
4489
4497
|
}
|
|
4490
4498
|
return () => {
|
|
4491
|
-
|
|
4492
|
-
|
|
4499
|
+
parent.removeChild(style2);
|
|
4500
|
+
if (parent.contains(style2)) {
|
|
4501
|
+
parent.removeChild(style2);
|
|
4493
4502
|
}
|
|
4494
4503
|
};
|
|
4495
4504
|
}, [isPresent2,]);
|
|
@@ -4502,7 +4511,7 @@ function PopChild({ children, isPresent: isPresent2, anchorX, }) {
|
|
|
4502
4511
|
}),
|
|
4503
4512
|
});
|
|
4504
4513
|
}
|
|
4505
|
-
var PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, }) => {
|
|
4514
|
+
var PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, root, }) => {
|
|
4506
4515
|
const presenceChildren = useConstant(newChildrenMap);
|
|
4507
4516
|
const id4 = (0, react_3.useId)();
|
|
4508
4517
|
let isReusedContext = true;
|
|
@@ -4542,6 +4551,7 @@ var PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete,
|
|
|
4542
4551
|
children = (0, jsx_runtime_1.jsx)(PopChild, {
|
|
4543
4552
|
isPresent: isPresent2,
|
|
4544
4553
|
anchorX,
|
|
4554
|
+
root,
|
|
4545
4555
|
children,
|
|
4546
4556
|
});
|
|
4547
4557
|
}
|
|
@@ -4562,7 +4572,7 @@ function onlyElements(children) {
|
|
|
4562
4572
|
});
|
|
4563
4573
|
return filtered;
|
|
4564
4574
|
}
|
|
4565
|
-
var AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = 'sync', propagate = false, anchorX = 'left', }) => {
|
|
4575
|
+
var AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = 'sync', propagate = false, anchorX = 'left', root, }) => {
|
|
4566
4576
|
const [isParentPresent, safeToRemove,] = usePresence(propagate);
|
|
4567
4577
|
const presentChildren = (0, react_4.useMemo)(() => onlyElements(children), [children,]);
|
|
4568
4578
|
const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);
|
|
@@ -4637,6 +4647,7 @@ var AnimatePresence = ({ children, custom, initial = true, onExitComplete, prese
|
|
|
4637
4647
|
custom,
|
|
4638
4648
|
presenceAffectsLayout,
|
|
4639
4649
|
mode,
|
|
4650
|
+
root,
|
|
4640
4651
|
onExitComplete: isPresent2 ? void 0 : onExit,
|
|
4641
4652
|
anchorX,
|
|
4642
4653
|
children: child,
|
|
@@ -4810,7 +4821,7 @@ function isValidMotionProp(key7) {
|
|
|
4810
4821
|
}
|
|
4811
4822
|
var shouldForward = (key7) => !isValidMotionProp(key7);
|
|
4812
4823
|
function loadExternalIsValidProp(isValidProp) {
|
|
4813
|
-
if (
|
|
4824
|
+
if (typeof isValidProp !== 'function')
|
|
4814
4825
|
return;
|
|
4815
4826
|
shouldForward = (key7) => key7.startsWith('on') ? !isValidMotionProp(key7) : isValidProp(key7);
|
|
4816
4827
|
}
|
|
@@ -7894,6 +7905,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
|
|
|
7894
7905
|
constructor(latestValues = {}, parent = defaultParent == null ? void 0 : defaultParent()) {
|
|
7895
7906
|
this.id = id2++;
|
|
7896
7907
|
this.animationId = 0;
|
|
7908
|
+
this.animationCommitId = 0;
|
|
7897
7909
|
this.children = /* @__PURE__ */ new Set();
|
|
7898
7910
|
this.options = {};
|
|
7899
7911
|
this.isTreeAnimating = false;
|
|
@@ -8113,9 +8125,14 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
|
|
|
8113
8125
|
this.nodes.forEach(clearMeasurements);
|
|
8114
8126
|
return;
|
|
8115
8127
|
}
|
|
8128
|
+
if (this.animationId <= this.animationCommitId) {
|
|
8129
|
+
this.nodes.forEach(clearIsLayoutDirty);
|
|
8130
|
+
return;
|
|
8131
|
+
}
|
|
8116
8132
|
if (!this.isUpdating) {
|
|
8117
8133
|
this.nodes.forEach(clearIsLayoutDirty);
|
|
8118
8134
|
}
|
|
8135
|
+
this.animationCommitId = this.animationId;
|
|
8119
8136
|
this.isUpdating = false;
|
|
8120
8137
|
this.nodes.forEach(resetTransformStyle);
|
|
8121
8138
|
this.nodes.forEach(updateLayout);
|
|
@@ -9997,6 +10014,9 @@ function calcNextTime(current2, next2, prev, labels) {
|
|
|
9997
10014
|
else if (next2 === '<') {
|
|
9998
10015
|
return prev;
|
|
9999
10016
|
}
|
|
10017
|
+
else if (next2.startsWith('<')) {
|
|
10018
|
+
return Math.max(0, prev + parseFloat(next2.slice(1)));
|
|
10019
|
+
}
|
|
10000
10020
|
else {
|
|
10001
10021
|
return labels.get(next2) ?? current2;
|
|
10002
10022
|
}
|
|
@@ -10069,7 +10089,7 @@ function createAnimationsFromSequence(sequence2, { defaultTransition = {}, ...se
|
|
|
10069
10089
|
let { ease: ease2 = defaultTransition.ease || 'easeOut', duration, } = valueTransition;
|
|
10070
10090
|
const calculatedDelay = typeof delay2 === 'function' ? delay2(elementIndex, numSubjects) : delay2;
|
|
10071
10091
|
const numKeyframes = valueKeyframesAsList.length;
|
|
10072
|
-
const createGenerator = isGenerator(type) ? type : generators == null ? void 0 : generators[type];
|
|
10092
|
+
const createGenerator = isGenerator(type) ? type : generators == null ? void 0 : generators[type || 'keyframes'];
|
|
10073
10093
|
if (numKeyframes <= 2 && createGenerator) {
|
|
10074
10094
|
let absoluteDelta = 100;
|
|
10075
10095
|
if (numKeyframes === 2 && isNumberKeyframesArray(valueKeyframesAsList)) {
|
|
@@ -10328,6 +10348,9 @@ function createScopedAnimate(scope) {
|
|
|
10328
10348
|
const animation = new GroupAnimationWithThen(animations2);
|
|
10329
10349
|
if (scope) {
|
|
10330
10350
|
scope.animations.push(animation);
|
|
10351
|
+
animation.finished.then(() => {
|
|
10352
|
+
removeItem(scope.animations, animation);
|
|
10353
|
+
});
|
|
10331
10354
|
}
|
|
10332
10355
|
return animation;
|
|
10333
10356
|
}
|
|
@@ -10343,6 +10366,7 @@ function useAnimate() {
|
|
|
10343
10366
|
const animate22 = useConstant(() => createScopedAnimate(scope));
|
|
10344
10367
|
useUnmountEffect(() => {
|
|
10345
10368
|
scope.animations.forEach((animation) => animation.stop());
|
|
10369
|
+
scope.animations.length = 0;
|
|
10346
10370
|
});
|
|
10347
10371
|
return [scope, animate22,];
|
|
10348
10372
|
}
|
|
@@ -10603,6 +10627,20 @@ function useInstantTransition() {
|
|
|
10603
10627
|
function disableInstantTransitions() {
|
|
10604
10628
|
MotionGlobalConfig.instantAnimations = false;
|
|
10605
10629
|
}
|
|
10630
|
+
function usePageInView() {
|
|
10631
|
+
const [isInView, setIsInView,] = (0, react_4.useState)(true);
|
|
10632
|
+
(0, react_2.useEffect)(() => {
|
|
10633
|
+
const handleVisibilityChange = () => setIsInView(!document.hidden);
|
|
10634
|
+
if (document.hidden) {
|
|
10635
|
+
handleVisibilityChange();
|
|
10636
|
+
}
|
|
10637
|
+
document.addEventListener('visibilitychange', handleVisibilityChange);
|
|
10638
|
+
return () => {
|
|
10639
|
+
document.removeEventListener('visibilitychange', handleVisibilityChange);
|
|
10640
|
+
};
|
|
10641
|
+
}, []);
|
|
10642
|
+
return isInView;
|
|
10643
|
+
}
|
|
10606
10644
|
var appearAnimationStore = /* @__PURE__ */ new Map();
|
|
10607
10645
|
var appearComplete = /* @__PURE__ */ new Map();
|
|
10608
10646
|
var appearStoreId = (elementId, valueName) => {
|
|
@@ -10959,15 +10997,16 @@ function stagger(duration = 0.1, { startDelay = 0, from = 0, ease: ease2, } = {}
|
|
|
10959
10997
|
return startDelay + delay2;
|
|
10960
10998
|
};
|
|
10961
10999
|
}
|
|
10962
|
-
// /:https://app.framerstatic.com/framer.
|
|
10963
|
-
const react_10 = require("react");
|
|
10964
|
-
const react_11 =
|
|
11000
|
+
// /:https://app.framerstatic.com/framer.L7DRXRFF.mjs
|
|
11001
|
+
const react_10 = __importDefault(require("react"));
|
|
11002
|
+
const react_11 = require("react");
|
|
10965
11003
|
const react_12 = require("react");
|
|
10966
11004
|
const react_13 = require("react");
|
|
10967
|
-
const react_14 = require("react");
|
|
10968
11005
|
const react_dom_1 = __importDefault(require("react-dom"));
|
|
11006
|
+
const react_14 = require("react");
|
|
10969
11007
|
const react_15 = require("react");
|
|
10970
11008
|
const react_16 = require("react");
|
|
11009
|
+
const react_dom_2 = require("react-dom");
|
|
10971
11010
|
const react_17 = require("react");
|
|
10972
11011
|
var __unframerNavigator2 = typeof window !== 'undefined' ? navigator : void 0;
|
|
10973
11012
|
var require_hsluv = (0, chunk_A2PMVMFI_js_1.__commonJS)({
|
|
@@ -11903,37 +11942,47 @@ var preloadKey = 'preload';
|
|
|
11903
11942
|
function isLazyComponentType(componentType) {
|
|
11904
11943
|
return typeof componentType === 'object' && componentType !== null && !(0, react_6.isValidElement)(componentType) && preloadKey in componentType;
|
|
11905
11944
|
}
|
|
11906
|
-
function lazy(factory) {
|
|
11907
|
-
const LazyComponent = (0, react_10.lazy)(factory);
|
|
11945
|
+
function lazy(factory, moduleName = 'default') {
|
|
11908
11946
|
let factoryPromise;
|
|
11909
11947
|
let LoadedComponent;
|
|
11910
11948
|
let hasRendered = false;
|
|
11911
|
-
|
|
11912
|
-
|
|
11913
|
-
hasRendered = true;
|
|
11914
|
-
}, []);
|
|
11915
|
-
const Comp = LoadedComponent ?? LazyComponent;
|
|
11916
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Comp, {
|
|
11917
|
-
ref,
|
|
11918
|
-
...props,
|
|
11919
|
-
});
|
|
11920
|
-
});
|
|
11921
|
-
Component17.preload = () => {
|
|
11949
|
+
let error;
|
|
11950
|
+
const load = () => {
|
|
11922
11951
|
if (!factoryPromise) {
|
|
11923
11952
|
factoryPromise = factory().then((module) => {
|
|
11924
|
-
|
|
11953
|
+
if (!(moduleName in module))
|
|
11954
|
+
throw new Error(`Module does not contain export '${moduleName}'`);
|
|
11955
|
+
LoadedComponent = module[moduleName];
|
|
11925
11956
|
return LoadedComponent;
|
|
11957
|
+
}).catch((err) => {
|
|
11958
|
+
error = err;
|
|
11926
11959
|
});
|
|
11927
11960
|
}
|
|
11928
11961
|
return factoryPromise;
|
|
11929
11962
|
};
|
|
11930
|
-
|
|
11963
|
+
const Component18 = (0, react_7.forwardRef)(function LazyWithPreload(props, ref) {
|
|
11964
|
+
(0, react_2.useEffect)(() => {
|
|
11965
|
+
hasRendered = true;
|
|
11966
|
+
}, []);
|
|
11967
|
+
if (error) {
|
|
11968
|
+
throw error;
|
|
11969
|
+
}
|
|
11970
|
+
if (!LoadedComponent) {
|
|
11971
|
+
throw load();
|
|
11972
|
+
}
|
|
11973
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(LoadedComponent, {
|
|
11974
|
+
ref,
|
|
11975
|
+
...props,
|
|
11976
|
+
});
|
|
11977
|
+
});
|
|
11978
|
+
Component18.preload = load;
|
|
11979
|
+
Component18.getStatus = () => {
|
|
11931
11980
|
return {
|
|
11932
11981
|
hasLoaded: LoadedComponent !== void 0,
|
|
11933
11982
|
hasRendered,
|
|
11934
11983
|
};
|
|
11935
11984
|
};
|
|
11936
|
-
return
|
|
11985
|
+
return Component18;
|
|
11937
11986
|
}
|
|
11938
11987
|
var objectKeys = Object.keys;
|
|
11939
11988
|
function hasProp(o, prop) {
|
|
@@ -12113,9 +12162,9 @@ function isEqual(a, b, deep = true) {
|
|
|
12113
12162
|
}
|
|
12114
12163
|
}
|
|
12115
12164
|
function useGetRouteCallback(routes) {
|
|
12116
|
-
return
|
|
12165
|
+
return react_10.default.useCallback((routeId) => routes[routeId], [routes,]);
|
|
12117
12166
|
}
|
|
12118
|
-
var RouterContext = /* @__PURE__ */ (() =>
|
|
12167
|
+
var RouterContext = /* @__PURE__ */ (() => react_10.default.createContext({}))();
|
|
12119
12168
|
function RouterAPIProvider({ api, children, }) {
|
|
12120
12169
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(RouterContext.Provider, {
|
|
12121
12170
|
value: api,
|
|
@@ -12123,7 +12172,7 @@ function RouterAPIProvider({ api, children, }) {
|
|
|
12123
12172
|
});
|
|
12124
12173
|
}
|
|
12125
12174
|
function useRouter() {
|
|
12126
|
-
return
|
|
12175
|
+
return react_10.default.useContext(RouterContext);
|
|
12127
12176
|
}
|
|
12128
12177
|
function RoutesProvider({ routes, children, }) {
|
|
12129
12178
|
const getRoute = useGetRouteCallback(routes);
|
|
@@ -12135,7 +12184,7 @@ function RoutesProvider({ routes, children, }) {
|
|
|
12135
12184
|
children,
|
|
12136
12185
|
});
|
|
12137
12186
|
}
|
|
12138
|
-
var CurrentRouteContext = /* @__PURE__ */ (() =>
|
|
12187
|
+
var CurrentRouteContext = /* @__PURE__ */ (() => react_10.default.createContext({}))();
|
|
12139
12188
|
function useCurrentRoute() {
|
|
12140
12189
|
var _a;
|
|
12141
12190
|
const router = useRouter();
|
|
@@ -12165,7 +12214,7 @@ function useCurrentRouteId() {
|
|
|
12165
12214
|
}
|
|
12166
12215
|
function useOnRouteChange(cb) {
|
|
12167
12216
|
const currentRoute = useCurrentRoute();
|
|
12168
|
-
const lastRoute =
|
|
12217
|
+
const lastRoute = react_10.default.useRef(currentRoute);
|
|
12169
12218
|
if (isEqual(lastRoute.current, currentRoute) || !currentRoute)
|
|
12170
12219
|
return;
|
|
12171
12220
|
lastRoute.current = currentRoute;
|
|
@@ -12216,7 +12265,7 @@ function monitorINPRelatedInputs(signal) {
|
|
|
12216
12265
|
function useRouteElementId(id3, targetRouteId) {
|
|
12217
12266
|
const currentRoute = useCurrentRoute();
|
|
12218
12267
|
const route = useRoute(targetRouteId) ?? currentRoute;
|
|
12219
|
-
return
|
|
12268
|
+
return react_10.default.useMemo(() => {
|
|
12220
12269
|
if (!route)
|
|
12221
12270
|
return id3;
|
|
12222
12271
|
return getRouteElementId(route, id3);
|
|
@@ -12428,7 +12477,7 @@ async function preloadRoute(route) {
|
|
|
12428
12477
|
function useRouteHandler(routeId, preload = false, elementId) {
|
|
12429
12478
|
const { navigate, } = useRouter();
|
|
12430
12479
|
useRoutePreloader([routeId,], preload);
|
|
12431
|
-
const handler =
|
|
12480
|
+
const handler = react_10.default.useCallback(() => navigate == null ? void 0 : navigate(routeId, elementId), [navigate, elementId, routeId,]);
|
|
12432
12481
|
return handler;
|
|
12433
12482
|
}
|
|
12434
12483
|
var pageviewEventVersion = 2;
|
|
@@ -12627,23 +12676,28 @@ function forwardCurrentQueryParams(href) {
|
|
|
12627
12676
|
}
|
|
12628
12677
|
return forwardQueryParams(queryParamsString, href);
|
|
12629
12678
|
}
|
|
12679
|
+
var FRAMER_VARIANT_KEY = 'framer_variant';
|
|
12630
12680
|
function forwardQueryParams(queryParamsString, href) {
|
|
12631
12681
|
const startOfHash = href.indexOf('#');
|
|
12632
12682
|
const hrefWithoutHash = startOfHash === -1 ? href : href.substring(0, startOfHash);
|
|
12633
12683
|
const hash2 = startOfHash === -1 ? '' : href.substring(startOfHash);
|
|
12634
12684
|
const startOfSearch = hrefWithoutHash.indexOf('?');
|
|
12635
|
-
|
|
12636
|
-
|
|
12637
|
-
|
|
12685
|
+
const baseUrl = startOfSearch === -1 ? hrefWithoutHash : hrefWithoutHash.substring(0, startOfSearch);
|
|
12686
|
+
const searchString = startOfSearch === -1 ? '' : hrefWithoutHash.substring(startOfSearch);
|
|
12687
|
+
const newSearchParams = new URLSearchParams(searchString);
|
|
12638
12688
|
const currentSearchParams = new URLSearchParams(queryParamsString);
|
|
12639
|
-
const newSearchString = hrefWithoutHash.substring(startOfSearch + 1);
|
|
12640
|
-
const newSearchParams = new URLSearchParams(newSearchString);
|
|
12641
12689
|
for (const [key7, value,] of currentSearchParams) {
|
|
12642
|
-
if (
|
|
12643
|
-
|
|
12644
|
-
|
|
12690
|
+
if (newSearchParams.has(key7))
|
|
12691
|
+
continue;
|
|
12692
|
+
if (key7 === FRAMER_VARIANT_KEY)
|
|
12693
|
+
continue;
|
|
12694
|
+
newSearchParams.append(key7, value);
|
|
12695
|
+
}
|
|
12696
|
+
const newSearchString = newSearchParams.toString();
|
|
12697
|
+
if (newSearchString === '') {
|
|
12698
|
+
return hrefWithoutHash + hash2;
|
|
12645
12699
|
}
|
|
12646
|
-
return
|
|
12700
|
+
return baseUrl + '?' + newSearchString + hash2;
|
|
12647
12701
|
}
|
|
12648
12702
|
async function replacePathVariables(path, currentLocale, nextLocale, defaultLocale, collectionId, pathVariables, collectionUtils) {
|
|
12649
12703
|
var _a;
|
|
@@ -12748,7 +12802,7 @@ var defaultSitePageEffects = {
|
|
|
12748
12802
|
global: void 0,
|
|
12749
12803
|
routes: {},
|
|
12750
12804
|
};
|
|
12751
|
-
var PageEffectsContext = /* @__PURE__ */
|
|
12805
|
+
var PageEffectsContext = /* @__PURE__ */ react_10.default.createContext(defaultSitePageEffects);
|
|
12752
12806
|
function PageEffectsProvider({ children, value, }) {
|
|
12753
12807
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(PageEffectsContext.Provider, {
|
|
12754
12808
|
value,
|
|
@@ -12756,7 +12810,7 @@ function PageEffectsProvider({ children, value, }) {
|
|
|
12756
12810
|
});
|
|
12757
12811
|
}
|
|
12758
12812
|
function usePageEffects() {
|
|
12759
|
-
return
|
|
12813
|
+
return react_10.default.useContext(PageEffectsContext);
|
|
12760
12814
|
}
|
|
12761
12815
|
function getPageEffectForRoute(currentRouteId, nextRouteId, { global, routes, }) {
|
|
12762
12816
|
var _a;
|
|
@@ -13508,7 +13562,7 @@ var trimSlugRegExp = /^-+|-+$/gu;
|
|
|
13508
13562
|
function slugify(value) {
|
|
13509
13563
|
return value.toLowerCase().replace(nonSlugCharactersRegExp, '-').replace(trimSlugRegExp, '');
|
|
13510
13564
|
}
|
|
13511
|
-
var NodeIdContext = /* @__PURE__ */
|
|
13565
|
+
var NodeIdContext = /* @__PURE__ */ react_10.default.createContext(null);
|
|
13512
13566
|
function useTracking() {
|
|
13513
13567
|
const router = useRouter();
|
|
13514
13568
|
const nodeId = (0, react_3.useContext)(NodeIdContext);
|
|
@@ -13542,15 +13596,15 @@ function useRouteAnchor(routeId, { elementId, hash: linkHash, } = {}) {
|
|
|
13542
13596
|
const currentRoute = useRoute(currentRouteId ?? '');
|
|
13543
13597
|
useRoutePreloader([routeId,], true);
|
|
13544
13598
|
const hash2 = linkHash ?? elementId;
|
|
13545
|
-
const href =
|
|
13599
|
+
const href = react_10.default.useMemo(() => getPathForRoute(route, {
|
|
13546
13600
|
currentRoutePath: currentRoute == null ? void 0 : currentRoute.path,
|
|
13547
13601
|
currentPathVariables,
|
|
13548
13602
|
hash: hash2,
|
|
13549
13603
|
preserveQueryParams,
|
|
13550
13604
|
siteCanonicalURL,
|
|
13551
13605
|
}), [currentRoute, currentPathVariables, hash2, preserveQueryParams, route, siteCanonicalURL,]);
|
|
13552
|
-
const navigateToRoute =
|
|
13553
|
-
const onClick =
|
|
13606
|
+
const navigateToRoute = react_10.default.useCallback(() => navigate == null ? void 0 : navigate(routeId, hash2), [hash2, navigate, routeId,]);
|
|
13607
|
+
const onClick = react_10.default.useCallback((event) => {
|
|
13554
13608
|
event.preventDefault();
|
|
13555
13609
|
navigateToRoute();
|
|
13556
13610
|
}, [navigateToRoute,]);
|
|
@@ -13625,22 +13679,22 @@ var defaultLocaleInfo = {
|
|
|
13625
13679
|
locales: [],
|
|
13626
13680
|
setLocale: noopAsync,
|
|
13627
13681
|
};
|
|
13628
|
-
var LocaleInfoContext = /* @__PURE__ */
|
|
13682
|
+
var LocaleInfoContext = /* @__PURE__ */ react_10.default.createContext(defaultLocaleInfo);
|
|
13629
13683
|
exports.LocaleInfoContext = LocaleInfoContext;
|
|
13630
13684
|
function useLocaleInfo() {
|
|
13631
|
-
return
|
|
13685
|
+
return react_10.default.useContext(LocaleInfoContext);
|
|
13632
13686
|
}
|
|
13633
13687
|
function useLocalesForCurrentRoute() {
|
|
13634
13688
|
const { currentRouteId, routes, collectionUtils, currentPathVariables, } = useRouter();
|
|
13635
13689
|
const { activeLocale, locales, } = useLocaleInfo();
|
|
13636
|
-
const [localesForCurrentRoute, setLocalesForCurrentRoute,] =
|
|
13690
|
+
const [localesForCurrentRoute, setLocalesForCurrentRoute,] = react_10.default.useState(() => activeLocale ? [activeLocale,] : []);
|
|
13637
13691
|
const currentRoute = currentRouteId ? routes == null ? void 0 : routes[currentRouteId] : void 0;
|
|
13638
|
-
|
|
13692
|
+
react_10.default.useEffect(() => {
|
|
13639
13693
|
let active = true;
|
|
13640
13694
|
getLocalesForCurrentRoute(activeLocale, locales, currentRoute, currentPathVariables, collectionUtils).then((localesSubset) => {
|
|
13641
13695
|
if (!active)
|
|
13642
13696
|
return;
|
|
13643
|
-
|
|
13697
|
+
react_10.default.startTransition(() => {
|
|
13644
13698
|
if (localesSubset) {
|
|
13645
13699
|
setLocalesForCurrentRoute(localesSubset);
|
|
13646
13700
|
}
|
|
@@ -13994,7 +14048,7 @@ function renderPage(Page4, defaultPageStyle) {
|
|
|
13994
14048
|
style: defaultPageStyle,
|
|
13995
14049
|
'data-framer-root': '',
|
|
13996
14050
|
};
|
|
13997
|
-
return
|
|
14051
|
+
return react_10.default.isValidElement(Page4) ? react_10.default.cloneElement(Page4, props) : /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Page4, {
|
|
13998
14052
|
...props,
|
|
13999
14053
|
});
|
|
14000
14054
|
}
|
|
@@ -17488,7 +17542,7 @@ var animate2 = /* @__PURE__ */ (() => {
|
|
|
17488
17542
|
return animate3;
|
|
17489
17543
|
})();
|
|
17490
17544
|
exports.animate = animate2;
|
|
17491
|
-
var LayoutIdContext = /* @__PURE__ */
|
|
17545
|
+
var LayoutIdContext = /* @__PURE__ */ react_10.default.createContext({
|
|
17492
17546
|
getLayoutId: (args) => null,
|
|
17493
17547
|
persistLayoutIdCache: () => { },
|
|
17494
17548
|
top: false,
|
|
@@ -17869,15 +17923,15 @@ var ErrorBoundary = class extends react_9.Component {
|
|
|
17869
17923
|
};
|
|
17870
17924
|
function Device({ canResize = false, children, ResizeObserver: ResizeObserver2 = safeWindow.ResizeObserver, ...options }) {
|
|
17871
17925
|
var _a, _b;
|
|
17872
|
-
const optionsRef =
|
|
17926
|
+
const optionsRef = react_10.default.useRef(void 0);
|
|
17873
17927
|
if (optionsRef.current === void 0)
|
|
17874
17928
|
optionsRef.current = options;
|
|
17875
17929
|
const deviceAppearance = (_a = options.deviceOptions) == null ? void 0 : _a.appearance.type;
|
|
17876
|
-
const scaleDataRef =
|
|
17877
|
-
const containerRef =
|
|
17878
|
-
const deviceRef =
|
|
17879
|
-
const screenRef =
|
|
17880
|
-
const updateImperativeScale =
|
|
17930
|
+
const scaleDataRef = react_10.default.useRef();
|
|
17931
|
+
const containerRef = react_10.default.useRef(null);
|
|
17932
|
+
const deviceRef = react_10.default.useRef(null);
|
|
17933
|
+
const screenRef = react_10.default.useRef(null);
|
|
17934
|
+
const updateImperativeScale = react_10.default.useCallback(({ scale: scale2, screenScalePixelFix, }) => {
|
|
17881
17935
|
if (!scaleDataRef.current || !deviceRef.current || !screenRef.current)
|
|
17882
17936
|
return;
|
|
17883
17937
|
deviceRef.current.style.transform = `scale(${scale2})`;
|
|
@@ -17887,7 +17941,7 @@ function Device({ canResize = false, children, ResizeObserver: ResizeObserver2 =
|
|
|
17887
17941
|
const scale2 = scaleDataRef.current = getScaleData(options.deviceOptions, options.scaleTo);
|
|
17888
17942
|
updateImperativeScale(scale2);
|
|
17889
17943
|
}
|
|
17890
|
-
const invertScale2 =
|
|
17944
|
+
const invertScale2 = react_10.default.useCallback((point2) => {
|
|
17891
17945
|
if (!scaleDataRef.current)
|
|
17892
17946
|
return point2;
|
|
17893
17947
|
const { scale: scale2 = 1, } = scaleDataRef.current;
|
|
@@ -17896,7 +17950,7 @@ function Device({ canResize = false, children, ResizeObserver: ResizeObserver2 =
|
|
|
17896
17950
|
y: point2.y / scale2,
|
|
17897
17951
|
};
|
|
17898
17952
|
}, []);
|
|
17899
|
-
const updateScale =
|
|
17953
|
+
const updateScale = react_10.default.useCallback(() => {
|
|
17900
17954
|
const { deviceOptions, scaleTo, } = optionsRef.current ?? {};
|
|
17901
17955
|
if (!deviceOptions || !scaleTo || scaleTo !== 'dynamic' || !containerRef.current)
|
|
17902
17956
|
return;
|
|
@@ -17914,17 +17968,17 @@ function Device({ canResize = false, children, ResizeObserver: ResizeObserver2 =
|
|
|
17914
17968
|
}
|
|
17915
17969
|
return new ResizeObserver2(() => updateScale());
|
|
17916
17970
|
});
|
|
17917
|
-
|
|
17971
|
+
react_10.default.useLayoutEffect(() => {
|
|
17918
17972
|
optionsRef.current = {
|
|
17919
17973
|
deviceOptions: options.deviceOptions,
|
|
17920
17974
|
overrideTheme: options.overrideTheme,
|
|
17921
17975
|
scaleTo: options.scaleTo,
|
|
17922
17976
|
};
|
|
17923
17977
|
}, [options.deviceOptions, options.overrideTheme, options.scaleTo,]);
|
|
17924
|
-
|
|
17978
|
+
react_10.default.useLayoutEffect(() => {
|
|
17925
17979
|
updateScale();
|
|
17926
17980
|
}, [updateScale,]);
|
|
17927
|
-
|
|
17981
|
+
react_10.default.useEffect(() => {
|
|
17928
17982
|
if (!observer2 || !containerRef.current)
|
|
17929
17983
|
return;
|
|
17930
17984
|
observer2.observe(containerRef.current);
|
|
@@ -19342,7 +19396,7 @@ var ParentSizeState = /* @__PURE__ */ ((ParentSizeState2) => {
|
|
|
19342
19396
|
return ParentSizeState2;
|
|
19343
19397
|
})(ParentSizeState || {});
|
|
19344
19398
|
exports.ParentSizeState = ParentSizeState;
|
|
19345
|
-
var ConstraintsContext = /* @__PURE__ */
|
|
19399
|
+
var ConstraintsContext = /* @__PURE__ */ react_10.default.createContext({
|
|
19346
19400
|
parentSize: 0,
|
|
19347
19401
|
/* Unknown */
|
|
19348
19402
|
});
|
|
@@ -19353,7 +19407,7 @@ function deprecatedParentSize(parentSize) {
|
|
|
19353
19407
|
return parentSize;
|
|
19354
19408
|
}
|
|
19355
19409
|
function useParentSize() {
|
|
19356
|
-
return
|
|
19410
|
+
return react_10.default.useContext(ConstraintsContext).parentSize;
|
|
19357
19411
|
}
|
|
19358
19412
|
function isSize(o) {
|
|
19359
19413
|
return typeof o === 'object';
|
|
@@ -19361,7 +19415,7 @@ function isSize(o) {
|
|
|
19361
19415
|
var ProvideParentSize = (props) => {
|
|
19362
19416
|
const currentParentSize = useParentSize();
|
|
19363
19417
|
const { parentSize, children, } = props;
|
|
19364
|
-
const value =
|
|
19418
|
+
const value = react_10.default.useMemo(() => ({
|
|
19365
19419
|
parentSize,
|
|
19366
19420
|
}), [getParentWidth(parentSize), getParentHeight(parentSize),]);
|
|
19367
19421
|
if (currentParentSize === 1) {
|
|
@@ -19806,8 +19860,8 @@ function isInvalid(validity) {
|
|
|
19806
19860
|
return false;
|
|
19807
19861
|
}
|
|
19808
19862
|
function useCustomValidity(onValid, onInvalid, onChange, onBlur, onFocus) {
|
|
19809
|
-
const isValidRef =
|
|
19810
|
-
const handleInvalid =
|
|
19863
|
+
const isValidRef = react_10.default.useRef(null);
|
|
19864
|
+
const handleInvalid = react_10.default.useCallback((e) => {
|
|
19811
19865
|
if (!onInvalid)
|
|
19812
19866
|
return;
|
|
19813
19867
|
if (isValidRef.current === false)
|
|
@@ -19817,7 +19871,7 @@ function useCustomValidity(onValid, onInvalid, onChange, onBlur, onFocus) {
|
|
|
19817
19871
|
e.currentTarget.reportValidity();
|
|
19818
19872
|
onInvalid(e);
|
|
19819
19873
|
}, [onInvalid,]);
|
|
19820
|
-
const handleChange =
|
|
19874
|
+
const handleChange = react_10.default.useCallback((e) => {
|
|
19821
19875
|
onChange == null ? void 0 : onChange(e);
|
|
19822
19876
|
if (!onInvalid && !onValid)
|
|
19823
19877
|
return;
|
|
@@ -19829,7 +19883,7 @@ function useCustomValidity(onValid, onInvalid, onChange, onBlur, onFocus) {
|
|
|
19829
19883
|
onValid == null ? void 0 : onValid();
|
|
19830
19884
|
}
|
|
19831
19885
|
}, [onInvalid, onValid, onChange,]);
|
|
19832
|
-
const handleBlur =
|
|
19886
|
+
const handleBlur = react_10.default.useCallback((e) => {
|
|
19833
19887
|
if (!onInvalid) {
|
|
19834
19888
|
onBlur == null ? void 0 : onBlur(e);
|
|
19835
19889
|
return;
|
|
@@ -19843,7 +19897,7 @@ function useCustomValidity(onValid, onInvalid, onChange, onBlur, onFocus) {
|
|
|
19843
19897
|
}
|
|
19844
19898
|
onBlur == null ? void 0 : onBlur(e);
|
|
19845
19899
|
}, [handleInvalid, onBlur, onInvalid,]);
|
|
19846
|
-
return
|
|
19900
|
+
return react_10.default.useMemo(() => {
|
|
19847
19901
|
return {
|
|
19848
19902
|
onInvalid: handleInvalid,
|
|
19849
19903
|
onChange: handleChange,
|
|
@@ -19875,8 +19929,38 @@ var inputIconCSSDeclaration = {
|
|
|
19875
19929
|
function createRGBVariableFallbacks(variables, fallback) {
|
|
19876
19930
|
return css2.variable(...variables.flatMap((variable) => [`${variable}-rgb`, variable,]), fallback);
|
|
19877
19931
|
}
|
|
19932
|
+
var defaultRichTextContainerStyle = {
|
|
19933
|
+
display: 'flex',
|
|
19934
|
+
flexDirection: 'column',
|
|
19935
|
+
justifyContent: 'flex-start',
|
|
19936
|
+
};
|
|
19937
|
+
var defaultTextFillStyle = {
|
|
19938
|
+
display: 'inline-block',
|
|
19939
|
+
};
|
|
19940
|
+
var defaultImageStyle = {
|
|
19941
|
+
display: 'block',
|
|
19942
|
+
};
|
|
19878
19943
|
var richTextCSSRules = /* @__PURE__ */ (() => [
|
|
19944
|
+
/**
|
|
19945
|
+
* RichTextContainer styles can get overridden by other static or inline styles collected in
|
|
19946
|
+
* style collectors, as well as styles defined directly in the @link{RichText.tsx} component.
|
|
19947
|
+
*
|
|
19948
|
+
* NOTE: `display: flex` can get overridden with `display: -webkit-box` in
|
|
19949
|
+
* @link{collectTextTruncation.ts} if the text is truncated. In this case, the flex-specific
|
|
19950
|
+
* properties are not supported, e.g. `justify-content`. This is ok because truncated text has
|
|
19951
|
+
* auto height and doesn't support vertical alignment. In any case, keep this in mind when
|
|
19952
|
+
* using other flex-specific properties.
|
|
19953
|
+
*/
|
|
19879
19954
|
/* css */
|
|
19955
|
+
`
|
|
19956
|
+
[data-framer-component-type="RichTextContainer"] {
|
|
19957
|
+
display: ${defaultRichTextContainerStyle.display};
|
|
19958
|
+
flex-direction: ${defaultRichTextContainerStyle.flexDirection};
|
|
19959
|
+
justify-content: ${defaultRichTextContainerStyle.justifyContent};
|
|
19960
|
+
outline: none;
|
|
19961
|
+
flex-shrink: 0;
|
|
19962
|
+
}
|
|
19963
|
+
`, /* css */
|
|
19880
19964
|
`
|
|
19881
19965
|
p.framer-text,
|
|
19882
19966
|
div.framer-text,
|
|
@@ -20041,7 +20125,7 @@ var richTextCSSRules = /* @__PURE__ */ (() => [
|
|
|
20041
20125
|
/* css */
|
|
20042
20126
|
`
|
|
20043
20127
|
.framer-text[data-text-fill] {
|
|
20044
|
-
display:
|
|
20128
|
+
display: ${defaultTextFillStyle.display};
|
|
20045
20129
|
background-clip: text;
|
|
20046
20130
|
-webkit-background-clip: text;
|
|
20047
20131
|
/* make this a transparent color if you want to visualise the clipping */
|
|
@@ -20383,7 +20467,7 @@ var richTextCSSRules = /* @__PURE__ */ (() => [
|
|
|
20383
20467
|
`, /* css */
|
|
20384
20468
|
`
|
|
20385
20469
|
.framer-image.framer-text {
|
|
20386
|
-
display:
|
|
20470
|
+
display: ${defaultImageStyle.display};
|
|
20387
20471
|
max-width: 100%;
|
|
20388
20472
|
height: auto;
|
|
20389
20473
|
}
|
|
@@ -20541,6 +20625,40 @@ var richTextCSSRules = /* @__PURE__ */ (() => [
|
|
|
20541
20625
|
}
|
|
20542
20626
|
`,
|
|
20543
20627
|
])();
|
|
20628
|
+
var textTruncationDisplayInlineVariableForSafari16 = '--text-truncation-display-inline-for-safari-16';
|
|
20629
|
+
var textTruncationDisplayNoneVariableForSafari16 = '--text-truncation-display-none-for-safari-16';
|
|
20630
|
+
var textTruncationLineBreakVariableForSafari16 = '--text-truncation-line-break-for-safari-16';
|
|
20631
|
+
var blockLikeElementSelectors = [
|
|
20632
|
+
'div.framer-text',
|
|
20633
|
+
'p.framer-text',
|
|
20634
|
+
'h1.framer-text',
|
|
20635
|
+
'h2.framer-text',
|
|
20636
|
+
'h3.framer-text',
|
|
20637
|
+
'h4.framer-text',
|
|
20638
|
+
'h5.framer-text',
|
|
20639
|
+
'h6.framer-text',
|
|
20640
|
+
'ol.framer-text',
|
|
20641
|
+
'ul.framer-text',
|
|
20642
|
+
'li.framer-text',
|
|
20643
|
+
'blockquote.framer-text',
|
|
20644
|
+
'.framer-text.framer-image',
|
|
20645
|
+
];
|
|
20646
|
+
var anySafariVersion = '(background: -webkit-named-image(i))';
|
|
20647
|
+
var safari17OrGreater = '(contain-intrinsic-size: inherit)';
|
|
20648
|
+
var safari16TextTruncationFix = /* @__PURE__ */ (() => [`@supports ${anySafariVersion} and (not ${safari17OrGreater}) {
|
|
20649
|
+
/* Render block-like elements inline when text is truncated, otherwise default to user agent (revert) */
|
|
20650
|
+
${blockLikeElementSelectors.join(', ')} { display: var(${textTruncationDisplayInlineVariableForSafari16}, revert) }
|
|
20651
|
+
|
|
20652
|
+
/* Add a line break after each block-like element that we render inline, to resemble the block-like behavior */
|
|
20653
|
+
${blockLikeElementSelectors.map((selector) => `${selector}::after`).join(', ')} { content: var(${textTruncationLineBreakVariableForSafari16}); white-space: pre; }
|
|
20654
|
+
|
|
20655
|
+
/* Don't render modules (e.g. videos, code-blocks), or tables when text is truncated, because often these can't be truncated and their children might be block elements */
|
|
20656
|
+
.framer-text.framer-text-module,
|
|
20657
|
+
.framer-text.framer-table-wrapper { display: var(${textTruncationDisplayNoneVariableForSafari16}, revert) }
|
|
20658
|
+
|
|
20659
|
+
/* Render text-fill elements inline when text is truncated, otherwise default to their default value (e.g. inline-block) */
|
|
20660
|
+
p.framer-text[data-text-fill] { display: var(${textTruncationDisplayInlineVariableForSafari16}, ${defaultTextFillStyle.display}) }
|
|
20661
|
+
}`,])();
|
|
20544
20662
|
var defaultCache = /* @__PURE__ */ new Set();
|
|
20545
20663
|
var defaultSheet;
|
|
20546
20664
|
function injectCSSRule(cssRule, sheet, cache2 = defaultCache) {
|
|
@@ -20818,6 +20936,7 @@ var pageContentWrapperWrapperCSSRules = [
|
|
|
20818
20936
|
`[data-framer-component-type="PageContentWrapper"] > *, [data-framer-component-type="PageContentWrapper"] > [data-framer-component-type] { position: relative; }`,
|
|
20819
20937
|
];
|
|
20820
20938
|
var presenceCSS = [`[data-is-present="false"], [data-is-present="false"] * { pointer-events: none !important; }`,];
|
|
20939
|
+
var lightboxCSS = [`.framer-lightbox-container { opacity: 1 !important; pointer-events: auto !important; }`,];
|
|
20821
20940
|
var cursorCSS = [
|
|
20822
20941
|
`[data-framer-cursor="pointer"] { cursor: pointer; }`,
|
|
20823
20942
|
`[data-framer-cursor="grab"] { cursor: grab; }`,
|
|
@@ -20850,12 +20969,12 @@ var hideScrollbars = [
|
|
|
20850
20969
|
];
|
|
20851
20970
|
var willChangeOverrideCSSVariable = '--framer-will-change-override';
|
|
20852
20971
|
var willChangeEffectOverrideCSSVariable = '--framer-will-change-effect-override';
|
|
20853
|
-
var
|
|
20972
|
+
var anySafariVersion2 = '(background: -webkit-named-image(i))';
|
|
20854
20973
|
var safari16OrGreater = '(grid-template-rows: subgrid)';
|
|
20855
20974
|
var willChangeTransformRules = (isPreview) => isPreview
|
|
20856
20975
|
? [
|
|
20857
20976
|
`body { ${willChangeOverrideCSSVariable}: none; }`,
|
|
20858
|
-
`@supports ${
|
|
20977
|
+
`@supports ${anySafariVersion2} and (not ${safari16OrGreater}) { body { ${willChangeOverrideCSSVariable}: transform; } }`,
|
|
20859
20978
|
]
|
|
20860
20979
|
: [`body { ${willChangeOverrideCSSVariable}: none; ${willChangeEffectOverrideCSSVariable}: none; }`,];
|
|
20861
20980
|
var frameCSSRules = (isPreview) => {
|
|
@@ -20885,6 +21004,8 @@ var combineCSSRules = (isPreview) => [
|
|
|
20885
21004
|
...resetCSS,
|
|
20886
21005
|
...hideScrollbars,
|
|
20887
21006
|
...overflowClipFallbackCSSRules,
|
|
21007
|
+
...lightboxCSS,
|
|
21008
|
+
...safari16TextTruncationFix,
|
|
20888
21009
|
];
|
|
20889
21010
|
exports.combinedCSSRules = combineCSSRules(false);
|
|
20890
21011
|
var combinedCSSRulesForPreview = /* @__PURE__ */ combineCSSRules(true);
|
|
@@ -22397,7 +22518,7 @@ function applyMetaTag(name, props) {
|
|
|
22397
22518
|
}
|
|
22398
22519
|
}
|
|
22399
22520
|
function usePrototypingMetaTags() {
|
|
22400
|
-
|
|
22521
|
+
react_10.default.useEffect(() => {
|
|
22401
22522
|
applyMetaTag('mobile-web-app-capable', {
|
|
22402
22523
|
content: 'yes',
|
|
22403
22524
|
});
|
|
@@ -22417,7 +22538,7 @@ var DeviceCodeComponentInner = ({ children, ...props }) => {
|
|
|
22417
22538
|
const deviceOptions = convertPropsToDeviceOptions(props, {
|
|
22418
22539
|
forceOldClay: true,
|
|
22419
22540
|
});
|
|
22420
|
-
|
|
22541
|
+
react_10.default.useInsertionEffect(() => {
|
|
22421
22542
|
injectComponentCSSRules();
|
|
22422
22543
|
}, []);
|
|
22423
22544
|
if (!deviceOptions) {
|
|
@@ -22435,8 +22556,8 @@ var DeviceCodeComponentInner = ({ children, ...props }) => {
|
|
|
22435
22556
|
});
|
|
22436
22557
|
}
|
|
22437
22558
|
const child = Array.isArray(children) ? children[0] : children;
|
|
22438
|
-
const resizedChild = child &&
|
|
22439
|
-
?
|
|
22559
|
+
const resizedChild = child && react_10.default.isValidElement(child)
|
|
22560
|
+
? react_10.default.cloneElement(child, {
|
|
22440
22561
|
width: deviceOptions.screenWidth,
|
|
22441
22562
|
height: deviceOptions.screenHeight,
|
|
22442
22563
|
})
|
|
@@ -22653,12 +22774,12 @@ function _injectRuntime(injectedRuntime) {
|
|
|
22653
22774
|
Object.assign(implementation, injectedRuntime);
|
|
22654
22775
|
isRuntimeInjected = true;
|
|
22655
22776
|
}
|
|
22656
|
-
var LibraryFeaturesContext = /* @__PURE__ */
|
|
22777
|
+
var LibraryFeaturesContext = /* @__PURE__ */ react_10.default.createContext(void 0);
|
|
22657
22778
|
LibraryFeaturesContext.displayName = 'LibraryFeaturesContext';
|
|
22658
22779
|
var LibraryFeaturesProvider = /* @__PURE__ */ (() => LibraryFeaturesContext.Provider)();
|
|
22659
22780
|
exports.LibraryFeaturesProvider = LibraryFeaturesProvider;
|
|
22660
22781
|
var useLibraryFeatures = () => {
|
|
22661
|
-
const context =
|
|
22782
|
+
const context = react_10.default.useContext(LibraryFeaturesContext);
|
|
22662
22783
|
return context ?? {};
|
|
22663
22784
|
};
|
|
22664
22785
|
var wrapperStyle = {
|
|
@@ -22704,16 +22825,35 @@ function getImageStyle(image) {
|
|
|
22704
22825
|
objectFit: cssObjectFit(image.fit),
|
|
22705
22826
|
};
|
|
22706
22827
|
}
|
|
22707
|
-
function
|
|
22828
|
+
function useDecodingAttribute(avoidAsyncDecoding) {
|
|
22829
|
+
const currentDecoding = react_10.default.useRef(avoidAsyncDecoding ? 'auto' : 'async');
|
|
22830
|
+
const switchDecodingToAuto = (0, react_3.useCallback)((node) => {
|
|
22831
|
+
currentDecoding.current = 'auto';
|
|
22832
|
+
node.decoding = 'auto';
|
|
22833
|
+
}, []);
|
|
22834
|
+
const onImageLoad = (0, react_3.useCallback)((event) => {
|
|
22835
|
+
switchDecodingToAuto(event.currentTarget);
|
|
22836
|
+
}, [switchDecodingToAuto,]);
|
|
22837
|
+
const onImageMount = (0, react_3.useCallback)((node) => {
|
|
22838
|
+
if (node == null ? void 0 : node.complete)
|
|
22839
|
+
switchDecodingToAuto(node);
|
|
22840
|
+
}, [switchDecodingToAuto,]);
|
|
22841
|
+
return {
|
|
22842
|
+
decoding: currentDecoding.current,
|
|
22843
|
+
onImageLoad,
|
|
22844
|
+
onImageMount,
|
|
22845
|
+
};
|
|
22846
|
+
}
|
|
22847
|
+
function StaticImage({ image, containerSize, nodeId, alt, draggable, avoidAsyncDecoding, }) {
|
|
22708
22848
|
const source = runtime.useImageSource(image, containerSize, nodeId);
|
|
22709
22849
|
const imageStyle = getImageStyle(image);
|
|
22710
|
-
const
|
|
22850
|
+
const { decoding, onImageLoad, onImageMount, } = useDecodingAttribute(avoidAsyncDecoding);
|
|
22711
22851
|
return (
|
|
22712
22852
|
// eslint-disable-next-line framer-studio/require-async-decoding -- we conditionally apply it
|
|
22713
22853
|
/* @__PURE__ */
|
|
22714
22854
|
(0, jsx_runtime_1.jsx)('img', {
|
|
22715
|
-
ref:
|
|
22716
|
-
decoding
|
|
22855
|
+
ref: onImageMount,
|
|
22856
|
+
decoding,
|
|
22717
22857
|
fetchPriority: image.fetchPriority,
|
|
22718
22858
|
loading: image.loading,
|
|
22719
22859
|
width: image.pixelWidth,
|
|
@@ -22721,16 +22861,17 @@ function StaticImage({ image, containerSize, nodeId, alt, draggable, syncDecodin
|
|
|
22721
22861
|
sizes: image.sizes,
|
|
22722
22862
|
srcSet: image.srcSet,
|
|
22723
22863
|
src: source,
|
|
22864
|
+
onLoad: onImageLoad,
|
|
22724
22865
|
alt: alt ?? image.alt ?? '',
|
|
22725
22866
|
style: imageStyle,
|
|
22726
22867
|
draggable,
|
|
22727
22868
|
}));
|
|
22728
22869
|
}
|
|
22729
22870
|
function CanvasImage({ image, containerSize, nodeId, }) {
|
|
22730
|
-
const wrapperRef =
|
|
22871
|
+
const wrapperRef = react_10.default.useRef(null);
|
|
22731
22872
|
const imageElement = runtime.useImageElement(image, containerSize, nodeId);
|
|
22732
22873
|
const imageStyle = getImageStyle(image);
|
|
22733
|
-
|
|
22874
|
+
react_10.default.useLayoutEffect(() => {
|
|
22734
22875
|
const wrapper = wrapperRef.current;
|
|
22735
22876
|
if (wrapper === null)
|
|
22736
22877
|
return;
|
|
@@ -22749,9 +22890,9 @@ function CanvasImage({ image, containerSize, nodeId, }) {
|
|
|
22749
22890
|
});
|
|
22750
22891
|
}
|
|
22751
22892
|
function OptimizedCanvasImage({ nodeId, image, containerSize, }) {
|
|
22752
|
-
const wrapperRef =
|
|
22893
|
+
const wrapperRef = react_10.default.useRef(null);
|
|
22753
22894
|
const source = runtime.useImageSource(image, containerSize, nodeId);
|
|
22754
|
-
|
|
22895
|
+
react_10.default.useLayoutEffect(() => {
|
|
22755
22896
|
const wrapper = wrapperRef.current;
|
|
22756
22897
|
if (wrapper === null)
|
|
22757
22898
|
return;
|
|
@@ -22798,7 +22939,7 @@ function BackgroundImageComponent({ layoutId, image, ...props }) {
|
|
|
22798
22939
|
else if (RenderTarget.current() !== RenderTarget.canvas) {
|
|
22799
22940
|
imageNode = /* @__PURE__ */ (0, jsx_runtime_1.jsx)(StaticImage, {
|
|
22800
22941
|
image,
|
|
22801
|
-
|
|
22942
|
+
avoidAsyncDecoding: RenderTarget.current() === RenderTarget.export,
|
|
22802
22943
|
...props,
|
|
22803
22944
|
});
|
|
22804
22945
|
}
|
|
@@ -22947,18 +23088,10 @@ function getIntrinsicSizeForBackgroundImage(background) {
|
|
|
22947
23088
|
height: background.pixelHeight,
|
|
22948
23089
|
};
|
|
22949
23090
|
}
|
|
22950
|
-
|
|
22951
|
-
}
|
|
22952
|
-
function parseImageSizeFromSrc(src) {
|
|
22953
|
-
if (!src)
|
|
22954
|
-
return void 0;
|
|
22955
|
-
const url = new URL(src);
|
|
22956
|
-
const width = url.searchParams.get('width');
|
|
22957
|
-
const height = url.searchParams.get('height');
|
|
22958
|
-
if (width && height) {
|
|
23091
|
+
if (background.src === void 0) {
|
|
22959
23092
|
return {
|
|
22960
|
-
width:
|
|
22961
|
-
height:
|
|
23093
|
+
width: 1,
|
|
23094
|
+
height: 1,
|
|
22962
23095
|
};
|
|
22963
23096
|
}
|
|
22964
23097
|
return void 0;
|
|
@@ -23151,10 +23284,10 @@ function processOverrideForwarding(props, children) {
|
|
|
23151
23284
|
children,
|
|
23152
23285
|
};
|
|
23153
23286
|
}
|
|
23154
|
-
children =
|
|
23155
|
-
if (!
|
|
23287
|
+
children = react_10.default.Children.map(children, (child) => {
|
|
23288
|
+
if (!react_10.default.isValidElement(child))
|
|
23156
23289
|
return child;
|
|
23157
|
-
return
|
|
23290
|
+
return react_10.default.cloneElement(child, {
|
|
23158
23291
|
_forwardedOverrides,
|
|
23159
23292
|
});
|
|
23160
23293
|
});
|
|
@@ -23201,11 +23334,11 @@ function useLayoutId2(props, { specificLayoutId, postfix, } = {}) {
|
|
|
23201
23334
|
}, [enabled,]);
|
|
23202
23335
|
}
|
|
23203
23336
|
var useIsomorphicLayoutEffect2 = typeof document !== 'undefined' ? react_2.useLayoutEffect : react_2.useEffect;
|
|
23204
|
-
var ComponentContainerContext = /* @__PURE__ */
|
|
23337
|
+
var ComponentContainerContext = /* @__PURE__ */ react_10.default.createContext(false);
|
|
23205
23338
|
exports.ComponentContainerContext = ComponentContainerContext;
|
|
23206
23339
|
function useForceUpdate2() {
|
|
23207
|
-
const [_, setForcedRenderCount,] =
|
|
23208
|
-
return
|
|
23340
|
+
const [_, setForcedRenderCount,] = react_10.default.useState(0);
|
|
23341
|
+
return react_10.default.useCallback(() => setForcedRenderCount((v) => v + 1), []);
|
|
23209
23342
|
}
|
|
23210
23343
|
var DEFAULT_SIZE = 200;
|
|
23211
23344
|
var SharedObserver = class {
|
|
@@ -23245,7 +23378,7 @@ function useRerenderOnResize(ref) {
|
|
|
23245
23378
|
}
|
|
23246
23379
|
function useMeasuredSize(ref) {
|
|
23247
23380
|
const forceUpdate = useForceUpdate2();
|
|
23248
|
-
const size =
|
|
23381
|
+
const size = react_10.default.useRef(null);
|
|
23249
23382
|
function updateSize(newSize) {
|
|
23250
23383
|
if (newSize.width === 0 && newSize.height === 0)
|
|
23251
23384
|
return;
|
|
@@ -23275,8 +23408,8 @@ function useMeasuredSize(ref) {
|
|
|
23275
23408
|
return size.current;
|
|
23276
23409
|
}
|
|
23277
23410
|
var SIZE_COMPATIBILITY_WRAPPER_ATTRIBUTE = 'data-framer-size-compatibility-wrapper';
|
|
23278
|
-
var withMeasuredSize = (
|
|
23279
|
-
const ref =
|
|
23411
|
+
var withMeasuredSize = (Component18) => (props) => {
|
|
23412
|
+
const ref = react_10.default.useRef(null);
|
|
23280
23413
|
const size = useMeasuredSize(ref);
|
|
23281
23414
|
const dataProps = {
|
|
23282
23415
|
[SIZE_COMPATIBILITY_WRAPPER_ATTRIBUTE]: true,
|
|
@@ -23292,7 +23425,7 @@ var withMeasuredSize = (Component17) => (props) => {
|
|
|
23292
23425
|
},
|
|
23293
23426
|
ref,
|
|
23294
23427
|
...dataProps,
|
|
23295
|
-
children: shouldRender && /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
23428
|
+
children: shouldRender && /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
23296
23429
|
...props,
|
|
23297
23430
|
width: (size == null ? void 0 : size.width) ?? fallbackWidth,
|
|
23298
23431
|
height: (size == null ? void 0 : size.height) ?? fallbackHeight,
|
|
@@ -23882,7 +24015,7 @@ var defaultFrameRect = {
|
|
|
23882
24015
|
height: 200,
|
|
23883
24016
|
};
|
|
23884
24017
|
function useStyleAndRect(props) {
|
|
23885
|
-
|
|
24018
|
+
react_10.default.useInsertionEffect(() => {
|
|
23886
24019
|
injectComponentCSSRules();
|
|
23887
24020
|
}, []);
|
|
23888
24021
|
const inCodeComponent = (0, react_3.useContext)(ComponentContainerContext);
|
|
@@ -23902,7 +24035,7 @@ function useStyleAndRect(props) {
|
|
|
23902
24035
|
if (shouldDisablePointerEvents && safeToEditPointerEvents) {
|
|
23903
24036
|
defaultStyle.pointerEvents = 'none';
|
|
23904
24037
|
}
|
|
23905
|
-
const addTextCentering =
|
|
24038
|
+
const addTextCentering = react_10.default.Children.count(props.children) > 0 && react_10.default.Children.toArray(props.children).every((child) => {
|
|
23906
24039
|
return typeof child === 'string' || typeof child === 'number';
|
|
23907
24040
|
});
|
|
23908
24041
|
const centerTextStyle = addTextCentering && {
|
|
@@ -24130,7 +24263,7 @@ function resolveParentSize(props, unwrappedProps, rect, inCodeComponent) {
|
|
|
24130
24263
|
}
|
|
24131
24264
|
function EmptyState({ title = '', description = 'Click and drag the connector to any frame on the canvas \u2192', children, size, hide, insideUserCodeComponent = false, position = 'absolute', }) {
|
|
24132
24265
|
const { target, } = RenderEnvironment;
|
|
24133
|
-
const childCount =
|
|
24266
|
+
const childCount = react_10.default.Children.count(children);
|
|
24134
24267
|
if (insideUserCodeComponent && childCount === 0) {
|
|
24135
24268
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(FrameWithMotion, {
|
|
24136
24269
|
...size,
|
|
@@ -24213,7 +24346,7 @@ function Description({ children, }) {
|
|
|
24213
24346
|
});
|
|
24214
24347
|
}
|
|
24215
24348
|
var TREE_ROOT_ID = '__LAYOUT_TREE_ROOT';
|
|
24216
|
-
var SharedLayoutContext = /* @__PURE__ */
|
|
24349
|
+
var SharedLayoutContext = /* @__PURE__ */ react_10.default.createContext({
|
|
24217
24350
|
schedulePromoteTree: () => { },
|
|
24218
24351
|
scheduleProjectionDidUpdate: () => { },
|
|
24219
24352
|
initLead: () => { },
|
|
@@ -24491,14 +24624,14 @@ function _useSharedIntersectionObserver(ref, callback, options) {
|
|
|
24491
24624
|
}
|
|
24492
24625
|
var useSharedIntersectionObserver = typeof IntersectionObserver === 'undefined' ? noop2 : _useSharedIntersectionObserver;
|
|
24493
24626
|
var thresholds2 = /* @__PURE__ */ new Array(100).fill(void 0).map((_, i) => i * 0.01);
|
|
24494
|
-
var ViewportContext = /* @__PURE__ */
|
|
24627
|
+
var ViewportContext = /* @__PURE__ */ react_10.default.createContext(null);
|
|
24495
24628
|
function useAppearEffect(ref, appearCallback, options) {
|
|
24496
|
-
const internalState =
|
|
24629
|
+
const internalState = react_10.default.useRef({
|
|
24497
24630
|
isInView: false,
|
|
24498
24631
|
hasAnimatedOnce: false,
|
|
24499
24632
|
});
|
|
24500
24633
|
const { enabled, animateOnce, threshold, rootMargin = `0px 0px 0px 0px`, } = options;
|
|
24501
|
-
const callback =
|
|
24634
|
+
const callback = react_10.default.useCallback((entry) => {
|
|
24502
24635
|
const { isInView, hasAnimatedOnce, } = internalState.current;
|
|
24503
24636
|
const isIntersecting = isIntersectingWithThreshold(entry, (threshold == null ? void 0 : threshold.y) ?? 0);
|
|
24504
24637
|
if (isIntersecting && !isInView) {
|
|
@@ -24607,13 +24740,13 @@ var LayoutTree = class extends react_9.Component {
|
|
|
24607
24740
|
}
|
|
24608
24741
|
};
|
|
24609
24742
|
var SharedLayoutTree = (props) => {
|
|
24610
|
-
const sharedLayoutContext =
|
|
24743
|
+
const sharedLayoutContext = react_10.default.useContext(SharedLayoutContext);
|
|
24611
24744
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(LayoutTree, {
|
|
24612
24745
|
...props,
|
|
24613
24746
|
sharedLayoutContext,
|
|
24614
24747
|
});
|
|
24615
24748
|
};
|
|
24616
|
-
var NavigationContainerContext = /* @__PURE__ */
|
|
24749
|
+
var NavigationContainerContext = /* @__PURE__ */ react_10.default.createContext(true);
|
|
24617
24750
|
function useIsInCurrentNavigationTarget() {
|
|
24618
24751
|
const isInCurrentNavigationTarget = (0, react_3.useContext)(NavigationContainerContext);
|
|
24619
24752
|
return isInCurrentNavigationTarget;
|
|
@@ -24677,7 +24810,7 @@ function useOnCurrentTargetChange(callback, deps = []) {
|
|
|
24677
24810
|
return () => deregister(callback);
|
|
24678
24811
|
}, [register, deregister, ...deps,]);
|
|
24679
24812
|
}
|
|
24680
|
-
var NavigationContainer = /* @__PURE__ */
|
|
24813
|
+
var NavigationContainer = /* @__PURE__ */ react_10.default.memo(function NavigationContainer2({ isLayeredContainer, isCurrent, isPrevious, isOverlayed = false, visible, transitionProps, children, backdropColor, onTapBackdrop, backfaceVisible, exitBackfaceVisible, animation, exitAnimation, instant, initialProps, exitProps, position = {
|
|
24681
24814
|
top: 0,
|
|
24682
24815
|
right: 0,
|
|
24683
24816
|
bottom: 0,
|
|
@@ -25487,10 +25620,10 @@ function sequence(direction, transition, animation) {
|
|
|
25487
25620
|
}
|
|
25488
25621
|
var NavigationConsumer = /* @__PURE__ */ (() => NavigationContext.Consumer)();
|
|
25489
25622
|
exports.NavigationConsumer = NavigationConsumer;
|
|
25490
|
-
var NavigationCallbackContext = /* @__PURE__ */
|
|
25623
|
+
var NavigationCallbackContext = /* @__PURE__ */ react_10.default.createContext(void 0);
|
|
25491
25624
|
var NavigationCallbackProvider = /* @__PURE__ */ (() => NavigationCallbackContext.Provider)();
|
|
25492
25625
|
exports.NavigationCallbackProvider = NavigationCallbackProvider;
|
|
25493
|
-
var IsInitialNavigationContext = /* @__PURE__ */
|
|
25626
|
+
var IsInitialNavigationContext = /* @__PURE__ */ react_10.default.createContext(void 0);
|
|
25494
25627
|
var Navigation = /* @__PURE__ */ (() => {
|
|
25495
25628
|
var _lastEventTimeStamp, _a, _Navigation_instances, getStackState_fn, isSameEventTransition_fn, _navigationAction, transition_fn;
|
|
25496
25629
|
return _a = class extends react_9.Component {
|
|
@@ -25936,7 +26069,7 @@ function containerIsVisible(containerIndex, stackState) {
|
|
|
25936
26069
|
return false;
|
|
25937
26070
|
}
|
|
25938
26071
|
function containerContent(item) {
|
|
25939
|
-
const content =
|
|
26072
|
+
const content = react_10.default.Children.map(item.component, (child) => {
|
|
25940
26073
|
var _a;
|
|
25941
26074
|
if (!isReactChild(child) || !isReactElement(child) || !child.props) {
|
|
25942
26075
|
return child;
|
|
@@ -25962,7 +26095,7 @@ function containerContent(item) {
|
|
|
25962
26095
|
if (canStretchStyle)
|
|
25963
26096
|
props.style.height = '100%';
|
|
25964
26097
|
}
|
|
25965
|
-
return
|
|
26098
|
+
return react_10.default.cloneElement(child, props);
|
|
25966
26099
|
});
|
|
25967
26100
|
return content;
|
|
25968
26101
|
}
|
|
@@ -25973,7 +26106,7 @@ function backdropTapAction(transition, goBackAction) {
|
|
|
25973
26106
|
function NavigationWrapper(props) {
|
|
25974
26107
|
const resetProjection = useResetProjection();
|
|
25975
26108
|
const skipLayoutAnimation = useInstantLayoutTransition();
|
|
25976
|
-
|
|
26109
|
+
react_10.default.useInsertionEffect(() => {
|
|
25977
26110
|
injectComponentCSSRules();
|
|
25978
26111
|
}, []);
|
|
25979
26112
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Navigation, {
|
|
@@ -26001,7 +26134,7 @@ var NavigationTransitionType = /* @__PURE__ */ ((NavigationTransitionType2) => {
|
|
|
26001
26134
|
})(NavigationTransitionType || {});
|
|
26002
26135
|
exports.NavigationTransitionType = NavigationTransitionType;
|
|
26003
26136
|
function WithNavigator(BaseComponent, navigationTransition, navigationTransitionDirection, NavigationTarget, navigationTransitionOptions) {
|
|
26004
|
-
const InternalWithNavigator = class extends
|
|
26137
|
+
const InternalWithNavigator = class extends react_10.default.Component {
|
|
26005
26138
|
render() {
|
|
26006
26139
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NavigationContext.Consumer, {
|
|
26007
26140
|
children: (navigation) => {
|
|
@@ -26221,11 +26354,11 @@ var clamp2 = (value, a, b) => {
|
|
|
26221
26354
|
}
|
|
26222
26355
|
return value;
|
|
26223
26356
|
};
|
|
26224
|
-
var DraggingContext = /* @__PURE__ */
|
|
26357
|
+
var DraggingContext = /* @__PURE__ */ react_10.default.createContext({
|
|
26225
26358
|
dragging: false,
|
|
26226
26359
|
});
|
|
26227
|
-
function WithDragging(
|
|
26228
|
-
const _WithDraggingHOC = class _WithDraggingHOC2 extends
|
|
26360
|
+
function WithDragging(Component18) {
|
|
26361
|
+
const _WithDraggingHOC = class _WithDraggingHOC2 extends react_10.default.Component {
|
|
26229
26362
|
constructor(props, defaultProps) {
|
|
26230
26363
|
super(props, defaultProps);
|
|
26231
26364
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'state', {
|
|
@@ -26794,7 +26927,7 @@ function WithDragging(Component17) {
|
|
|
26794
26927
|
value: {
|
|
26795
26928
|
dragging: this.state.isDragging,
|
|
26796
26929
|
},
|
|
26797
|
-
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
26930
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
26798
26931
|
...originalProps,
|
|
26799
26932
|
}),
|
|
26800
26933
|
});
|
|
@@ -26831,10 +26964,10 @@ function WithDragging(Component17) {
|
|
|
26831
26964
|
constraints: {},
|
|
26832
26965
|
mouseWheel: false,
|
|
26833
26966
|
});
|
|
26834
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(_WithDraggingHOC, 'defaultProps', Object.assign({},
|
|
26967
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(_WithDraggingHOC, 'defaultProps', Object.assign({}, Component18.defaultProps, _WithDraggingHOC.draggingDefaultProps));
|
|
26835
26968
|
let WithDraggingHOC = _WithDraggingHOC;
|
|
26836
26969
|
const withDragging = WithDraggingHOC;
|
|
26837
|
-
(0, import_hoist_non_react_statics2.default)(withDragging,
|
|
26970
|
+
(0, import_hoist_non_react_statics2.default)(withDragging, Component18);
|
|
26838
26971
|
return withDragging;
|
|
26839
26972
|
}
|
|
26840
26973
|
var hoverProps = {
|
|
@@ -26856,13 +26989,13 @@ var eventHandlerMapping = {
|
|
|
26856
26989
|
var tapEventKeys = /* @__PURE__ */ new Set(['tapstart', 'tap', 'tapend',]);
|
|
26857
26990
|
function WithEvents(BaseComponent) {
|
|
26858
26991
|
var _a;
|
|
26859
|
-
const withEvents = (_a = class extends
|
|
26992
|
+
const withEvents = (_a = class extends react_10.default.Component {
|
|
26860
26993
|
constructor() {
|
|
26861
26994
|
super(...arguments);
|
|
26862
26995
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'shouldCancelTap', false);
|
|
26863
26996
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'activeEventListeners', /* @__PURE__ */ new Map());
|
|
26864
26997
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'hasFramerEventListener', false);
|
|
26865
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'component',
|
|
26998
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'component', react_10.default.createRef());
|
|
26866
26999
|
}
|
|
26867
27000
|
get element() {
|
|
26868
27001
|
return this.component.current && this.component.current.element;
|
|
@@ -27938,16 +28071,16 @@ var DeprecatedFrame = /* @__PURE__ */ (() => {
|
|
|
27938
28071
|
}
|
|
27939
28072
|
layoutChildren() {
|
|
27940
28073
|
const _forwardedOverrides = this.props._forwardedOverrides;
|
|
27941
|
-
let children =
|
|
28074
|
+
let children = react_10.default.Children.map(this.props.children, (child) => {
|
|
27942
28075
|
if (isConstraintSupportingChild(child)) {
|
|
27943
|
-
return
|
|
28076
|
+
return react_10.default.cloneElement(child, {
|
|
27944
28077
|
parentSize: this.state.size,
|
|
27945
28078
|
_forwardedOverrides,
|
|
27946
28079
|
// biome-ignore lint/suspicious/noExplicitAny: deprecated code
|
|
27947
28080
|
});
|
|
27948
28081
|
}
|
|
27949
28082
|
else if (_forwardedOverrides && child) {
|
|
27950
|
-
return
|
|
28083
|
+
return react_10.default.cloneElement(child, {
|
|
27951
28084
|
_forwardedOverrides,
|
|
27952
28085
|
});
|
|
27953
28086
|
}
|
|
@@ -28083,7 +28216,7 @@ var Draggable = /* @__PURE__ */ WithDragging(DeprecatedFrameWithEvents);
|
|
|
28083
28216
|
exports.Draggable = Draggable;
|
|
28084
28217
|
function useInfiniteScroll({ ref: observerRef, loadMore, rootMargin = '0px', paginationInfo, }) {
|
|
28085
28218
|
const isVisibleRef = (0, react_4.useRef)(false);
|
|
28086
|
-
const callback =
|
|
28219
|
+
const callback = react_10.default.useCallback((entry) => {
|
|
28087
28220
|
if (!entry.isIntersecting) {
|
|
28088
28221
|
isVisibleRef.current = false;
|
|
28089
28222
|
return;
|
|
@@ -28106,8 +28239,8 @@ function useInfiniteScroll({ ref: observerRef, loadMore, rootMargin = '0px', pag
|
|
|
28106
28239
|
enabled: paginationInfo.currentPage < paginationInfo.totalPages,
|
|
28107
28240
|
});
|
|
28108
28241
|
}
|
|
28109
|
-
function withInfiniteScroll(
|
|
28110
|
-
return
|
|
28242
|
+
function withInfiniteScroll(Component18) {
|
|
28243
|
+
return react_10.default.forwardRef(({ __paginationInfo, __loadMore, ...props }, ref) => {
|
|
28111
28244
|
const infiniteScrollRef = useObserverRef(ref);
|
|
28112
28245
|
useInfiniteScroll({
|
|
28113
28246
|
rootMargin: '500px',
|
|
@@ -28115,7 +28248,7 @@ function withInfiniteScroll(Component17) {
|
|
|
28115
28248
|
ref: infiniteScrollRef,
|
|
28116
28249
|
paginationInfo: __paginationInfo,
|
|
28117
28250
|
});
|
|
28118
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
28251
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
28119
28252
|
...props,
|
|
28120
28253
|
ref: infiniteScrollRef,
|
|
28121
28254
|
});
|
|
@@ -28240,10 +28373,10 @@ function makePaddingString({ top, left, bottom, right, }) {
|
|
|
28240
28373
|
return `${top}px ${right}px ${bottom}px ${left}px`;
|
|
28241
28374
|
}
|
|
28242
28375
|
var Stack = /* @__PURE__ */ (() => {
|
|
28243
|
-
const StackInner =
|
|
28376
|
+
const StackInner = react_10.default.forwardRef(function StackInner2(stackProps, forwardedRef) {
|
|
28244
28377
|
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;
|
|
28245
28378
|
const useFlexboxGap = externalUseFlexboxGap || wrap2;
|
|
28246
|
-
const stackRef =
|
|
28379
|
+
const stackRef = react_10.default.useRef(null);
|
|
28247
28380
|
const flexDirection = toFlexDirection(direction);
|
|
28248
28381
|
const isReverse = isReverseDirection(flexDirection);
|
|
28249
28382
|
const justifyContent = toJustifyOrAlignment(distribution);
|
|
@@ -28383,7 +28516,7 @@ function fraction(dimension) {
|
|
|
28383
28516
|
return isFiniteNumber(value) ? value : 0;
|
|
28384
28517
|
}
|
|
28385
28518
|
function handleFraction(children, direction, widthType, heightType) {
|
|
28386
|
-
return
|
|
28519
|
+
return react_10.default.Children.map(children, (child) => {
|
|
28387
28520
|
if (!isReactChild(child) || !isReactElement(child))
|
|
28388
28521
|
return;
|
|
28389
28522
|
const isVertical = direction === 'vertical';
|
|
@@ -28442,7 +28575,7 @@ function handleFraction(children, direction, widthType, heightType) {
|
|
|
28442
28575
|
...propsStyle,
|
|
28443
28576
|
...style2,
|
|
28444
28577
|
};
|
|
28445
|
-
return
|
|
28578
|
+
return react_10.default.cloneElement(child, {
|
|
28446
28579
|
width: newWidth,
|
|
28447
28580
|
height: newHeight,
|
|
28448
28581
|
style: nextStyle,
|
|
@@ -28577,7 +28710,7 @@ function PageContainer({ children, effect, dragEnabled, direction, contentHeight
|
|
|
28577
28710
|
}, effect ? Object.keys(effect).join('') : ''),
|
|
28578
28711
|
});
|
|
28579
28712
|
}
|
|
28580
|
-
var Page = /* @__PURE__ */
|
|
28713
|
+
var Page = /* @__PURE__ */ react_10.default.forwardRef(function Page2(props, forwardedRef) {
|
|
28581
28714
|
var _a;
|
|
28582
28715
|
const { direction = 'horizontal', contentWidth = 'stretch', contentHeight = 'stretch', alignment = 'start', currentPage = 0, animateCurrentPageUpdate = true, gap: gapValue = 10, padding: _padding = 0, momentum = false, dragEnabled = true, defaultEffect: _defaultEffect = 'none', background = 'transparent', overflow = 'hidden', __fromCodeComponentNode, effect: _effect, children, contentOffsetX, contentOffsetY, onChangePage, onScrollStart, onScroll, onDragStart, onDrag, onDragEnd, directionLock, onScrollEnd, onDirectionLock: _onDirectionLock, onUpdate: _onUpdate, wheelEnabled = false, layoutId: specificLayoutId, ...rest } = props;
|
|
28583
28716
|
const layoutId = useLayoutId2(props, {
|
|
@@ -28588,7 +28721,7 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
|
|
|
28588
28721
|
...rest,
|
|
28589
28722
|
background,
|
|
28590
28723
|
};
|
|
28591
|
-
const hasMountedRef =
|
|
28724
|
+
const hasMountedRef = react_10.default.useRef(false);
|
|
28592
28725
|
const hasFixedSize = RenderTarget.hasRestrictions() && props.__fromCodeComponentNode && isFiniteNumber(containerProps.width) &&
|
|
28593
28726
|
isFiniteNumber(containerProps.height);
|
|
28594
28727
|
if (!hasFixedSize && __fromCodeComponentNode && !containerProps.__fromCanvasComponent) {
|
|
@@ -28598,7 +28731,7 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
|
|
|
28598
28731
|
enabled: true,
|
|
28599
28732
|
};
|
|
28600
28733
|
}
|
|
28601
|
-
const { initial, prev, } =
|
|
28734
|
+
const { initial, prev, } = react_10.default.useRef({
|
|
28602
28735
|
initial: {
|
|
28603
28736
|
x: 0,
|
|
28604
28737
|
y: 0,
|
|
@@ -28614,36 +28747,36 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
|
|
|
28614
28747
|
warnOnce2(`The 'gap' property of Page component can not be negative, but is ${gapValue}.`);
|
|
28615
28748
|
gap = 0;
|
|
28616
28749
|
}
|
|
28617
|
-
|
|
28750
|
+
react_10.default.useInsertionEffect(() => {
|
|
28618
28751
|
injectComponentCSSRules();
|
|
28619
28752
|
}, []);
|
|
28620
|
-
const pageCount =
|
|
28621
|
-
const maxOffsetRef =
|
|
28622
|
-
const constraints =
|
|
28753
|
+
const pageCount = react_10.default.Children.count(children);
|
|
28754
|
+
const maxOffsetRef = react_10.default.useRef(0);
|
|
28755
|
+
const constraints = react_10.default.useRef({
|
|
28623
28756
|
top: 0,
|
|
28624
28757
|
left: 0,
|
|
28625
28758
|
right: 0,
|
|
28626
28759
|
bottom: 0,
|
|
28627
28760
|
});
|
|
28628
|
-
const fallbackContainerRef =
|
|
28761
|
+
const fallbackContainerRef = react_10.default.useRef(null);
|
|
28629
28762
|
const containerRef = forwardedRef || fallbackContainerRef;
|
|
28630
|
-
const scrollableRef =
|
|
28631
|
-
const pageEffectValuesRef =
|
|
28632
|
-
const pageRectsRef =
|
|
28763
|
+
const scrollableRef = react_10.default.useRef(null);
|
|
28764
|
+
const pageEffectValuesRef = react_10.default.useRef([]);
|
|
28765
|
+
const pageRectsRef = react_10.default.useRef([]);
|
|
28633
28766
|
const internalX = useMotionValue(isMotionValue2(contentOffsetX) ? 0 : contentOffsetX ?? 0);
|
|
28634
28767
|
const internalY = useMotionValue(isMotionValue2(contentOffsetY) ? 0 : contentOffsetY ?? 0);
|
|
28635
|
-
const contentOffsetRef =
|
|
28768
|
+
const contentOffsetRef = react_10.default.useRef({
|
|
28636
28769
|
x: isMotionValue2(contentOffsetX) ? contentOffsetX : internalX,
|
|
28637
28770
|
y: isMotionValue2(contentOffsetY) ? contentOffsetY : internalY,
|
|
28638
28771
|
});
|
|
28639
|
-
const currentContentPageRef =
|
|
28640
|
-
const propsBoundedCurrentPageRef =
|
|
28641
|
-
const latestPropsRef =
|
|
28772
|
+
const currentContentPageRef = react_10.default.useRef(currentPage);
|
|
28773
|
+
const propsBoundedCurrentPageRef = react_10.default.useRef(currentPage);
|
|
28774
|
+
const latestPropsRef = react_10.default.useRef(props);
|
|
28642
28775
|
latestPropsRef.current = props;
|
|
28643
|
-
const lastDirectionRef =
|
|
28776
|
+
const lastDirectionRef = react_10.default.useRef(props.direction);
|
|
28644
28777
|
const snapToPage = useSnapToPage(currentContentPageRef, contentOffsetRef, isHorizontal);
|
|
28645
|
-
const [_, setForceUpdateCount,] =
|
|
28646
|
-
const containerSizeRef =
|
|
28778
|
+
const [_, setForceUpdateCount,] = react_10.default.useState(0);
|
|
28779
|
+
const containerSizeRef = react_10.default.useRef({
|
|
28647
28780
|
width: 200,
|
|
28648
28781
|
height: 200,
|
|
28649
28782
|
});
|
|
@@ -28651,11 +28784,11 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
|
|
|
28651
28784
|
containerSizeRef.current.width = containerProps.width;
|
|
28652
28785
|
containerSizeRef.current.height = containerProps.height;
|
|
28653
28786
|
}
|
|
28654
|
-
const updateOnResize =
|
|
28787
|
+
const updateOnResize = react_10.default.useCallback(() => {
|
|
28655
28788
|
if (!hasFixedSize)
|
|
28656
|
-
(0,
|
|
28789
|
+
(0, react_11.startTransition)(() => setForceUpdateCount((v) => v + 1));
|
|
28657
28790
|
}, [hasFixedSize,]);
|
|
28658
|
-
|
|
28791
|
+
react_10.default.useEffect(() => {
|
|
28659
28792
|
if (RenderTarget.current() !== RenderTarget.preview)
|
|
28660
28793
|
return;
|
|
28661
28794
|
globalThis.addEventListener('resize', updateOnResize);
|
|
@@ -28732,7 +28865,7 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
|
|
|
28732
28865
|
updateAndSnapToPage(currentContentPageRef.current, true);
|
|
28733
28866
|
});
|
|
28734
28867
|
}, []);
|
|
28735
|
-
|
|
28868
|
+
react_10.default.useEffect(() => {
|
|
28736
28869
|
if (currentPage !== currentContentPageRef.current)
|
|
28737
28870
|
updateAndSnapToPage(currentPage);
|
|
28738
28871
|
}, [currentPage,]);
|
|
@@ -28830,7 +28963,7 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
|
|
|
28830
28963
|
});
|
|
28831
28964
|
};
|
|
28832
28965
|
pageEffectValuesRef.current = [];
|
|
28833
|
-
const childComponents =
|
|
28966
|
+
const childComponents = react_10.default.Children.map(children, (child, index) => {
|
|
28834
28967
|
if (!isReactChild(child) || !isReactElement(child)) {
|
|
28835
28968
|
return child;
|
|
28836
28969
|
}
|
|
@@ -28882,7 +29015,7 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
|
|
|
28882
29015
|
onDrag: onDragHandler,
|
|
28883
29016
|
onDragEnd: onDragEndHandler,
|
|
28884
29017
|
layoutId: layoutId ? `${layoutId}-${index}` : void 0,
|
|
28885
|
-
children:
|
|
29018
|
+
children: react_10.default.cloneElement(child, update),
|
|
28886
29019
|
}, index);
|
|
28887
29020
|
});
|
|
28888
29021
|
useWheelScroll(scrollableRef, {
|
|
@@ -29838,7 +29971,7 @@ function convertScrollDirectionToDrag(scrollDirection) {
|
|
|
29838
29971
|
}
|
|
29839
29972
|
var useUpdateChildSize = ({ dragDirection, children, fromCanvasComponent, }) => {
|
|
29840
29973
|
return (0, react_4.useMemo)(() => {
|
|
29841
|
-
return
|
|
29974
|
+
return react_10.default.Children.map(children, (child) => {
|
|
29842
29975
|
if (child === null || typeof child !== 'object' || typeof child.type === 'string') {
|
|
29843
29976
|
return child;
|
|
29844
29977
|
}
|
|
@@ -29858,14 +29991,14 @@ var useUpdateChildSize = ({ dragDirection, children, fromCanvasComponent, }) =>
|
|
|
29858
29991
|
style: Object.assign({}, child.props.style, updatedSize),
|
|
29859
29992
|
}
|
|
29860
29993
|
: updatedSize;
|
|
29861
|
-
return
|
|
29994
|
+
return react_10.default.cloneElement(child, update);
|
|
29862
29995
|
});
|
|
29863
29996
|
}, [dragDirection, children, fromCanvasComponent,]);
|
|
29864
29997
|
};
|
|
29865
29998
|
var numberFromOptionalMotionValue = (value) => {
|
|
29866
29999
|
return typeof value === 'number' ? value : value.get();
|
|
29867
30000
|
};
|
|
29868
|
-
var EmulatedScroll = /* @__PURE__ */
|
|
30001
|
+
var EmulatedScroll = /* @__PURE__ */ react_10.default.forwardRef(function EmulatedScroll2(props, forwardedRef) {
|
|
29869
30002
|
const { direction = 'vertical', directionLock = false, dragEnabled = true, dragElastic, dragMomentum, dragTransition, wheelEnabled = true, contentOffsetX = 0, contentOffsetY = 0, contentWidth, contentHeight, onScrollStart, onScroll, onScrollEnd, onDragStart, onDrag, onDragEnd, onUpdate, onDirectionLock, style: style2, children, scrollAnimate, resetOffset, overdragEnabled = true, layoutId: specificLayoutId, native: _native, ...containerProps } = props;
|
|
29870
30003
|
const layoutId = useLayoutId2(props, {
|
|
29871
30004
|
specificLayoutId,
|
|
@@ -29953,7 +30086,7 @@ var EmulatedScroll = /* @__PURE__ */ react_11.default.forwardRef(function Emulat
|
|
|
29953
30086
|
return;
|
|
29954
30087
|
measureAndUpdateScrollOffset();
|
|
29955
30088
|
}, []);
|
|
29956
|
-
|
|
30089
|
+
react_10.default.useEffect(() => {
|
|
29957
30090
|
if (shouldResetScroll(isInTarget))
|
|
29958
30091
|
measureAndUpdateScrollOffset();
|
|
29959
30092
|
if (isInTarget === false)
|
|
@@ -30068,7 +30201,7 @@ var EmulatedScroll = /* @__PURE__ */ react_11.default.forwardRef(function Emulat
|
|
|
30068
30201
|
setScrollY(currentY);
|
|
30069
30202
|
return y.on('change', setScrollY);
|
|
30070
30203
|
}, [y, overdragY, scheduleUpdateScrollListeners, overdragEnabled,]);
|
|
30071
|
-
const nativeOnScroll =
|
|
30204
|
+
const nativeOnScroll = react_10.default.useCallback(() => {
|
|
30072
30205
|
const element = containerRef.current;
|
|
30073
30206
|
if (!(element instanceof HTMLDivElement))
|
|
30074
30207
|
return;
|
|
@@ -30079,7 +30212,7 @@ var EmulatedScroll = /* @__PURE__ */ react_11.default.forwardRef(function Emulat
|
|
|
30079
30212
|
if (yDelta > 1)
|
|
30080
30213
|
y.set(-element.scrollTop);
|
|
30081
30214
|
}, [x, y,]);
|
|
30082
|
-
const isEmpty2 =
|
|
30215
|
+
const isEmpty2 = react_10.default.Children.count(children) === 0;
|
|
30083
30216
|
const width = direction !== 'vertical' && !isEmpty2 ? 'auto' : '100%';
|
|
30084
30217
|
const height = direction !== 'horizontal' && !isEmpty2 ? 'auto' : '100%';
|
|
30085
30218
|
const size = !containerProps.__fromCanvasComponent
|
|
@@ -30313,7 +30446,7 @@ function useEmulateTouchScroll(ref, direction, enabled) {
|
|
|
30313
30446
|
return emptyObject;
|
|
30314
30447
|
if (RenderTarget.current() !== RenderTarget.preview)
|
|
30315
30448
|
return emptyObject;
|
|
30316
|
-
const scrollAnimationControlsRef =
|
|
30449
|
+
const scrollAnimationControlsRef = react_10.default.useRef(null);
|
|
30317
30450
|
(0, react_2.useEffect)(() => {
|
|
30318
30451
|
if (!ref.current)
|
|
30319
30452
|
return;
|
|
@@ -30466,7 +30599,7 @@ function useEmulateTouchScroll(ref, direction, enabled) {
|
|
|
30466
30599
|
(_a = scrollAnimationControlsRef.current) == null ? void 0 : _a.stop();
|
|
30467
30600
|
};
|
|
30468
30601
|
}, [ref, direction, enabled,]);
|
|
30469
|
-
return
|
|
30602
|
+
return react_10.default.useMemo(() => {
|
|
30470
30603
|
return {
|
|
30471
30604
|
cancelEmulatedTouchScrollAnimation: () => {
|
|
30472
30605
|
var _a;
|
|
@@ -30521,7 +30654,7 @@ function useUpdateScrollOffset(ref, side, offset, cancelEmulatedTouchScrollAnima
|
|
|
30521
30654
|
}
|
|
30522
30655
|
}, [offset,]);
|
|
30523
30656
|
}
|
|
30524
|
-
var NativeScroll = /* @__PURE__ */
|
|
30657
|
+
var NativeScroll = /* @__PURE__ */ react_10.default.forwardRef(function NativeScroll2(props, forwardedRef) {
|
|
30525
30658
|
const { direction = 'vertical', scrollBarVisible = false, dragEnabled = true, contentOffsetX = 0, contentOffsetY = 0, contentWidth: _contentWidth, contentHeight: _contentHeight, children, resetOffset, onScroll, className: className2,
|
|
30526
30659
|
// Not (yet) supported
|
|
30527
30660
|
directionLock: _directionLock = false, wheelEnabled: _wheelEnabled = true, scrollAnimate: _scrollAnimate, dragTransition: _dragTransition, dragMomentum: _dragMomentum, dragElastic: _dragElastic, overdragEnabled: _overdragEnabled = true, onScrollStart: _onScrollStart, onScrollEnd: _onScrollEnd, onDragStart: _onDragStart, onDrag: _onDrag, onDragEnd: _onDragEnd, onUpdate: _onUpdate, onDirectionLock: _onDirectionLock, layoutId: specificLayoutId, native: _native,
|
|
@@ -30531,14 +30664,14 @@ var NativeScroll = /* @__PURE__ */ react_11.default.forwardRef(function NativeSc
|
|
|
30531
30664
|
specificLayoutId,
|
|
30532
30665
|
postfix: 'scroll',
|
|
30533
30666
|
});
|
|
30534
|
-
const fallbackRef =
|
|
30667
|
+
const fallbackRef = react_10.default.useRef(null);
|
|
30535
30668
|
const ref = forwardedRef || fallbackRef;
|
|
30536
30669
|
const { cancelEmulatedTouchScrollAnimation, } = useEmulateTouchScroll(ref, direction, dragEnabled);
|
|
30537
30670
|
(0, react_5.useInsertionEffect)(() => {
|
|
30538
30671
|
injectComponentCSSRules();
|
|
30539
30672
|
}, []);
|
|
30540
30673
|
const isInTarget = useIsInCurrentNavigationTarget();
|
|
30541
|
-
const previousIsInTargetRef =
|
|
30674
|
+
const previousIsInTargetRef = react_10.default.useRef(isInTarget);
|
|
30542
30675
|
const updateScrollOffsetHandler = () => {
|
|
30543
30676
|
if (!resetOffset)
|
|
30544
30677
|
return;
|
|
@@ -30595,7 +30728,7 @@ var NativeScroll = /* @__PURE__ */ react_11.default.forwardRef(function NativeSc
|
|
|
30595
30728
|
});
|
|
30596
30729
|
});
|
|
30597
30730
|
var Scroll = /* @__PURE__ */ (() => {
|
|
30598
|
-
const ScrollInner =
|
|
30731
|
+
const ScrollInner = react_10.default.forwardRef(function ScrollInner2(props, forwardedRef) {
|
|
30599
30732
|
if (props.native) {
|
|
30600
30733
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NativeScroll, {
|
|
30601
30734
|
ref: forwardedRef,
|
|
@@ -30787,12 +30920,12 @@ function createData(defaultState2, actions) {
|
|
|
30787
30920
|
var initialState = {
|
|
30788
30921
|
update: 0,
|
|
30789
30922
|
};
|
|
30790
|
-
var DataObserverContext = /* @__PURE__ */
|
|
30923
|
+
var DataObserverContext = /* @__PURE__ */ react_10.default.createContext({
|
|
30791
30924
|
update: NaN,
|
|
30792
30925
|
});
|
|
30793
30926
|
exports.DataObserverContext = DataObserverContext;
|
|
30794
30927
|
function useObserveData() {
|
|
30795
|
-
const context =
|
|
30928
|
+
const context = react_10.default.useContext(DataObserverContext);
|
|
30796
30929
|
return !Number.isNaN(context.update);
|
|
30797
30930
|
}
|
|
30798
30931
|
var DataObserver = class extends react_9.Component {
|
|
@@ -30864,20 +30997,20 @@ function convertColorProps(props) {
|
|
|
30864
30997
|
}
|
|
30865
30998
|
return props;
|
|
30866
30999
|
}
|
|
30867
|
-
function WithOverride(
|
|
31000
|
+
function WithOverride(Component18, override) {
|
|
30868
31001
|
const useOverride = typeof override === 'function' ? (props) => override(convertColorProps(props)) : () => convertColorProps(override);
|
|
30869
31002
|
const ComponentWithOverride = function (props) {
|
|
30870
31003
|
(0, react_3.useContext)(DataObserverContext);
|
|
30871
31004
|
const overrideProps = useOverride(props);
|
|
30872
31005
|
const { style: style2, ...rest } = props;
|
|
30873
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
31006
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
30874
31007
|
...rest,
|
|
30875
31008
|
...overrideProps,
|
|
30876
31009
|
_initialStyle: style2,
|
|
30877
31010
|
});
|
|
30878
31011
|
};
|
|
30879
|
-
(0, import_hoist_non_react_statics4.default)(ComponentWithOverride,
|
|
30880
|
-
ComponentWithOverride['displayName'] = `WithOverride(${
|
|
31012
|
+
(0, import_hoist_non_react_statics4.default)(ComponentWithOverride, Component18);
|
|
31013
|
+
ComponentWithOverride['displayName'] = `WithOverride(${Component18.displayName || Component18.name})`;
|
|
30881
31014
|
return ComponentWithOverride;
|
|
30882
31015
|
}
|
|
30883
31016
|
var prefix = '__framer__';
|
|
@@ -30901,7 +31034,7 @@ function stripPrefixFromPrefixedKey(key7) {
|
|
|
30901
31034
|
}
|
|
30902
31035
|
return void 0;
|
|
30903
31036
|
}
|
|
30904
|
-
var GeneratedComponentContext = /* @__PURE__ */
|
|
31037
|
+
var GeneratedComponentContext = /* @__PURE__ */ react_10.default.createContext(void 0);
|
|
30905
31038
|
exports.GeneratedComponentContext = GeneratedComponentContext;
|
|
30906
31039
|
function cloneChildrenWithProps(children, props, asNode) {
|
|
30907
31040
|
const cloned = React2.Children.map(children, (child) => {
|
|
@@ -31002,7 +31135,7 @@ function createRefFunction(state) {
|
|
|
31002
31135
|
setRef(prevForwardedRef, value);
|
|
31003
31136
|
};
|
|
31004
31137
|
}
|
|
31005
|
-
var StyleSheetContext = /* @__PURE__ */
|
|
31138
|
+
var StyleSheetContext = /* @__PURE__ */ react_10.default.createContext(void 0);
|
|
31006
31139
|
exports.StyleSheetContext = StyleSheetContext;
|
|
31007
31140
|
var framerPostSSRCSSSelector = 'style[data-framer-css-ssr-minified]';
|
|
31008
31141
|
var componentsWithServerRenderedStyles = /* @__PURE__ */ (() => {
|
|
@@ -31018,30 +31151,14 @@ var componentsWithServerRenderedStyles = /* @__PURE__ */ (() => {
|
|
|
31018
31151
|
})();
|
|
31019
31152
|
var framerCSSMarker = 'data-framer-css-ssr';
|
|
31020
31153
|
exports.framerCSSMarker = framerCSSMarker;
|
|
31021
|
-
var withCSS = (
|
|
31022
|
-
const { sheet, cache: cache2, } =
|
|
31154
|
+
var withCSS = (Component18, escapedCSS, componentSerializationId) => react_10.default.forwardRef((props, ref) => {
|
|
31155
|
+
const { sheet, cache: cache2, } = react_10.default.useContext(StyleSheetContext) ?? {};
|
|
31023
31156
|
const id3 = componentSerializationId;
|
|
31024
31157
|
if (!isBrowser2()) {
|
|
31025
31158
|
if (isFunction(escapedCSS))
|
|
31026
31159
|
escapedCSS = escapedCSS(RenderTarget.current());
|
|
31027
31160
|
const concatenatedCSS = Array.isArray(escapedCSS) ? escapedCSS.join('\n') : escapedCSS;
|
|
31028
|
-
|
|
31029
|
-
children: [
|
|
31030
|
-
/* @__PURE__ */ (0, jsx_runtime_1.jsx)('style', {
|
|
31031
|
-
...{
|
|
31032
|
-
[framerCSSMarker]: true,
|
|
31033
|
-
},
|
|
31034
|
-
'data-framer-component': id3,
|
|
31035
|
-
dangerouslySetInnerHTML: {
|
|
31036
|
-
__html: concatenatedCSS,
|
|
31037
|
-
},
|
|
31038
|
-
}),
|
|
31039
|
-
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
|
|
31040
|
-
...props,
|
|
31041
|
-
ref,
|
|
31042
|
-
}),
|
|
31043
|
-
],
|
|
31044
|
-
});
|
|
31161
|
+
cssCollector.add(concatenatedCSS, id3);
|
|
31045
31162
|
}
|
|
31046
31163
|
(0, react_5.useInsertionEffect)(() => {
|
|
31047
31164
|
if (id3 && componentsWithServerRenderedStyles.has(id3))
|
|
@@ -31053,18 +31170,41 @@ var withCSS = (Component17, escapedCSS, componentSerializationId) => react_11.de
|
|
|
31053
31170
|
: escapedCSS.split('\n');
|
|
31054
31171
|
css22.forEach((rule) => rule && injectCSSRule(rule, sheet, cache2));
|
|
31055
31172
|
}, []);
|
|
31056
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
31173
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
31057
31174
|
...props,
|
|
31058
31175
|
ref,
|
|
31059
31176
|
});
|
|
31060
31177
|
});
|
|
31061
31178
|
exports.withCSS = withCSS;
|
|
31062
|
-
var
|
|
31179
|
+
var CSSCollector = class {
|
|
31180
|
+
constructor() {
|
|
31181
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'styles', /* @__PURE__ */ new Set());
|
|
31182
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'componentIds', /* @__PURE__ */ new Set());
|
|
31183
|
+
}
|
|
31184
|
+
add(css22, componentId) {
|
|
31185
|
+
this.styles.add(css22);
|
|
31186
|
+
if (componentId)
|
|
31187
|
+
this.componentIds.add(componentId);
|
|
31188
|
+
}
|
|
31189
|
+
getStyles() {
|
|
31190
|
+
return this.styles;
|
|
31191
|
+
}
|
|
31192
|
+
getComponentIds() {
|
|
31193
|
+
return this.componentIds;
|
|
31194
|
+
}
|
|
31195
|
+
clear() {
|
|
31196
|
+
this.styles.clear();
|
|
31197
|
+
this.componentIds.clear();
|
|
31198
|
+
}
|
|
31199
|
+
};
|
|
31200
|
+
var cssCollector = /* @__PURE__ */ new CSSCollector();
|
|
31201
|
+
exports.cssCollector = cssCollector;
|
|
31202
|
+
var SSRParentVariantsContext = /* @__PURE__ */ react_10.default.createContext(void 0);
|
|
31063
31203
|
var SSRVariantClassName = 'ssr-variant';
|
|
31064
31204
|
function renderBranchedChildrenFromPropertyOverrides(overrides, children, props, variantClassNames, primaryVariantId, parentVariants, cloneChildren, activeVariantId) {
|
|
31065
|
-
const childrenArray =
|
|
31205
|
+
const childrenArray = react_10.default.Children.toArray(children);
|
|
31066
31206
|
const child = childrenArray[0];
|
|
31067
|
-
if (childrenArray.length !== 1 || !
|
|
31207
|
+
if (childrenArray.length !== 1 || !react_10.default.isValidElement(child)) {
|
|
31068
31208
|
console.warn('PropertyOverrides: expected exactly one React element for a child', children);
|
|
31069
31209
|
return cloneChildren(children, props);
|
|
31070
31210
|
}
|
|
@@ -31134,7 +31274,7 @@ function renderBranchedChildrenFromPropertyOverrides(overrides, children, props,
|
|
|
31134
31274
|
assert(!activeVariantId || renderedBranches.length === 1, 'Must render exactly one branch when activeVariantId is given');
|
|
31135
31275
|
return renderedBranches;
|
|
31136
31276
|
}
|
|
31137
|
-
var SSRVariants = /* @__PURE__ */
|
|
31277
|
+
var SSRVariants = /* @__PURE__ */ react_10.default.forwardRef(function SSRVariants2({ id: _nodeId, children, ...props }, ref) {
|
|
31138
31278
|
const cloneWithRefs = useCloneChildrenWithPropsAndRef(ref);
|
|
31139
31279
|
if (isBrowser2()) {
|
|
31140
31280
|
return cloneWithRefs(children, props);
|
|
@@ -31179,10 +31319,10 @@ function propsForBreakpoint(variant, props, overrides) {
|
|
|
31179
31319
|
var noopSubscribe = () => () => { };
|
|
31180
31320
|
var returnTrue = () => true;
|
|
31181
31321
|
var returnFalse = () => false;
|
|
31182
|
-
var PropertyOverridesWithoutCSS = /* @__PURE__ */
|
|
31322
|
+
var PropertyOverridesWithoutCSS = /* @__PURE__ */ react_10.default.forwardRef(function PropertyOverrides(props, ref) {
|
|
31183
31323
|
const cloneWithRefs = useCloneChildrenWithPropsAndRef(ref);
|
|
31184
|
-
const ancestorCtx =
|
|
31185
|
-
const isHydrationOrSSR =
|
|
31324
|
+
const ancestorCtx = react_10.default.useContext(SSRParentVariantsContext);
|
|
31325
|
+
const isHydrationOrSSR = react_10.default.useSyncExternalStore(noopSubscribe, returnFalse, returnTrue);
|
|
31186
31326
|
const action = useConstant2(() => {
|
|
31187
31327
|
if (isHydrationOrSSR) {
|
|
31188
31328
|
if (isBrowser2()) {
|
|
@@ -31196,7 +31336,7 @@ var PropertyOverridesWithoutCSS = /* @__PURE__ */ react_11.default.forwardRef(fu
|
|
|
31196
31336
|
return 0;
|
|
31197
31337
|
}
|
|
31198
31338
|
});
|
|
31199
|
-
const generatedComponentContext =
|
|
31339
|
+
const generatedComponentContext = react_10.default.useContext(GeneratedComponentContext);
|
|
31200
31340
|
return useMemoOne(() => {
|
|
31201
31341
|
const { breakpoint, overrides, children, ...restProps } = props;
|
|
31202
31342
|
if (!generatedComponentContext) {
|
|
@@ -31309,11 +31449,11 @@ var AnimationCollector = class {
|
|
|
31309
31449
|
_variantHashes = /* @__PURE__ */ new WeakMap();
|
|
31310
31450
|
var framerAppearEffects = /* @__PURE__ */ new AnimationCollector();
|
|
31311
31451
|
exports.framerAppearEffects = framerAppearEffects;
|
|
31312
|
-
function withOptimizedAppearEffect(
|
|
31313
|
-
return
|
|
31452
|
+
function withOptimizedAppearEffect(Component18) {
|
|
31453
|
+
return react_10.default.forwardRef(({ optimized, ...props }, ref) => {
|
|
31314
31454
|
var _a;
|
|
31315
|
-
const generatedComponentContext =
|
|
31316
|
-
const variants = (_a =
|
|
31455
|
+
const generatedComponentContext = react_10.default.useContext(GeneratedComponentContext);
|
|
31456
|
+
const variants = (_a = react_10.default.useContext(SSRParentVariantsContext)) == null ? void 0 : _a.variants;
|
|
31317
31457
|
const id3 = props[framerAppearIdKey];
|
|
31318
31458
|
if (id3 && !isBrowser2()) {
|
|
31319
31459
|
framerAppearEffects.setAll(id3, variants,
|
|
@@ -31325,7 +31465,7 @@ function withOptimizedAppearEffect(Component17) {
|
|
|
31325
31465
|
optimized ? props : null, generatedComponentContext);
|
|
31326
31466
|
}
|
|
31327
31467
|
const disabledProps = getDisabledFXPropsInStaticRenderer(props);
|
|
31328
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
31468
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
31329
31469
|
ref,
|
|
31330
31470
|
...props,
|
|
31331
31471
|
...disabledProps,
|
|
@@ -31421,7 +31561,7 @@ function useFXValues(values, enabled) {
|
|
|
31421
31561
|
const effect = useConstant2(() => ({
|
|
31422
31562
|
values: makeFXValues(enabled ? values : void 0),
|
|
31423
31563
|
}));
|
|
31424
|
-
|
|
31564
|
+
react_10.default.useEffect(() => {
|
|
31425
31565
|
if (enabled)
|
|
31426
31566
|
return;
|
|
31427
31567
|
for (const key7 of effectValuesKeys) {
|
|
@@ -31498,7 +31638,7 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
|
|
|
31498
31638
|
if (shouldRunRef.current)
|
|
31499
31639
|
return;
|
|
31500
31640
|
shouldRunRef.current = true;
|
|
31501
|
-
(0,
|
|
31641
|
+
(0, react_11.startTransition)(() => setIsRunning(true));
|
|
31502
31642
|
void animateLoop();
|
|
31503
31643
|
}, [animateLoop,]);
|
|
31504
31644
|
const stop = (0, react_3.useCallback)((overrideRunRef = true) => {
|
|
@@ -31511,7 +31651,7 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
|
|
|
31511
31651
|
mirrorStateRef.current = false;
|
|
31512
31652
|
if (overrideRunRef) {
|
|
31513
31653
|
shouldRunRef.current = false;
|
|
31514
|
-
(0,
|
|
31654
|
+
(0, react_11.startTransition)(() => setIsRunning(false));
|
|
31515
31655
|
}
|
|
31516
31656
|
}, []);
|
|
31517
31657
|
const hasLoop = loopEffectEnabled && loop;
|
|
@@ -31584,9 +31724,9 @@ function parallaxTransform(scrollY, originalPosition, speed, offset, adjustPosit
|
|
|
31584
31724
|
var parallaxOptionsKeys = /* @__PURE__ */ new Set(['speed', 'adjustPosition', 'offset', 'parallaxTransformEnabled',]);
|
|
31585
31725
|
function useParallax(options, ref, visibilityStyle) {
|
|
31586
31726
|
const { speed = 100, offset = 0, adjustPosition = false, parallaxTransformEnabled, } = options;
|
|
31587
|
-
const originalPosition =
|
|
31727
|
+
const originalPosition = react_10.default.useRef(null);
|
|
31588
31728
|
const shouldReduceMotion = useReducedMotionConfig();
|
|
31589
|
-
const transform2 =
|
|
31729
|
+
const transform2 = react_10.default.useCallback((yValue) => {
|
|
31590
31730
|
if (originalPosition.current === null)
|
|
31591
31731
|
return 0;
|
|
31592
31732
|
if (speed === 100)
|
|
@@ -31630,8 +31770,11 @@ function useParallax(options, ref, visibilityStyle) {
|
|
|
31630
31770
|
: effectDisabledStyle,
|
|
31631
31771
|
};
|
|
31632
31772
|
}
|
|
31773
|
+
function isTargetAndTransition(value) {
|
|
31774
|
+
return typeof value === 'object' && value !== null;
|
|
31775
|
+
}
|
|
31633
31776
|
function getTransition(value) {
|
|
31634
|
-
if (
|
|
31777
|
+
if (!isTargetAndTransition(value))
|
|
31635
31778
|
return void 0;
|
|
31636
31779
|
return value == null ? void 0 : value.transition;
|
|
31637
31780
|
}
|
|
@@ -31643,7 +31786,9 @@ function runEffectAnimation(target, effect, shouldReduceMotion, ref, appearId, i
|
|
|
31643
31786
|
return resolve();
|
|
31644
31787
|
const motionValue2 = effect.values[key7];
|
|
31645
31788
|
motionValue2.stop();
|
|
31646
|
-
let value = !
|
|
31789
|
+
let value = !isTargetAndTransition(target)
|
|
31790
|
+
? defaultFXValues[key7]
|
|
31791
|
+
: (target == null ? void 0 : target[key7]) ?? defaultFXValues[key7];
|
|
31647
31792
|
if (isMotionValue(value))
|
|
31648
31793
|
value = value.get();
|
|
31649
31794
|
if (!isNumber2(value))
|
|
@@ -31814,7 +31959,7 @@ function useScrollDirectionChange(scrollDirection, cb, options = {}) {
|
|
|
31814
31959
|
const { direction, target, } = scrollDirection ?? {};
|
|
31815
31960
|
const { repeat = true, enabled = true, } = options;
|
|
31816
31961
|
const currentRouteKey = useCurrentRouteKey();
|
|
31817
|
-
|
|
31962
|
+
react_10.default.useEffect(() => {
|
|
31818
31963
|
if (!direction || !enabled)
|
|
31819
31964
|
return;
|
|
31820
31965
|
const _ = currentRouteKey;
|
|
@@ -31912,7 +32057,7 @@ function makeStyle(defaults) {
|
|
|
31912
32057
|
};
|
|
31913
32058
|
}
|
|
31914
32059
|
function useAnimationVariants({ opacity, targetOpacity, perspective: transformPerspective, enter, exit, animate: animateVariant2, ...defaultStyles }) {
|
|
31915
|
-
return
|
|
32060
|
+
return react_10.default.useMemo(() => ({
|
|
31916
32061
|
initial: enter ?? makeStyle({
|
|
31917
32062
|
...defaultStyles,
|
|
31918
32063
|
opacity: opacity ?? targetOpacity ?? 1,
|
|
@@ -31930,14 +32075,14 @@ function useStyleAppearEffect(options, ref) {
|
|
|
31930
32075
|
const variants = useAnimationVariants(options);
|
|
31931
32076
|
const enabled = options.styleAppearEffectEnabled;
|
|
31932
32077
|
const effect = useFXValues(enabled ? variants.initial : variants.animate, enabled);
|
|
31933
|
-
const playState =
|
|
32078
|
+
const playState = react_10.default.useRef({
|
|
31934
32079
|
isPlaying: false,
|
|
31935
32080
|
scheduledAppearState: void 0,
|
|
31936
32081
|
lastAppearState: !options.styleAppearEffectEnabled,
|
|
31937
32082
|
});
|
|
31938
32083
|
const currentRouteKey = useCurrentRouteKey();
|
|
31939
|
-
const animation =
|
|
31940
|
-
const runAnimation =
|
|
32084
|
+
const animation = react_10.default.useRef();
|
|
32085
|
+
const runAnimation = react_10.default.useCallback(async ({ transition, ...target }, fromInitial) => {
|
|
31941
32086
|
const transitionWithFallback = transition ?? variants.animate.transition ?? options.transition;
|
|
31942
32087
|
await animation.current;
|
|
31943
32088
|
const visualElement = visualElementStore.get(ref.current);
|
|
@@ -31989,7 +32134,7 @@ function useStyleAppearEffect(options, ref) {
|
|
|
31989
32134
|
},
|
|
31990
32135
|
});
|
|
31991
32136
|
const animateWithScrollInfo = options.targets && enabled && !options.scrollDirection;
|
|
31992
|
-
|
|
32137
|
+
react_10.default.useEffect(() => {
|
|
31993
32138
|
if (!animateWithScrollInfo)
|
|
31994
32139
|
return;
|
|
31995
32140
|
const playedState = {
|
|
@@ -32069,8 +32214,8 @@ var defaultRanges2 = () => ({
|
|
|
32069
32214
|
transformPerspective: [],
|
|
32070
32215
|
});
|
|
32071
32216
|
function useAttachOptionalSpring(values, spring2) {
|
|
32072
|
-
const springs =
|
|
32073
|
-
|
|
32217
|
+
const springs = react_10.default.useRef({});
|
|
32218
|
+
react_10.default.useEffect(() => {
|
|
32074
32219
|
if (spring2 === void 0)
|
|
32075
32220
|
return;
|
|
32076
32221
|
for (const key7 of objectKeys(values)) {
|
|
@@ -32185,7 +32330,7 @@ function useStyleTransform({ transformTrigger, styleTransformEffectEnabled, tran
|
|
|
32185
32330
|
effect.values[key7].set((values == null ? void 0 : values[key7]) ?? defaultFXValues[key7]);
|
|
32186
32331
|
}
|
|
32187
32332
|
});
|
|
32188
|
-
return
|
|
32333
|
+
return react_10.default.useMemo(() => {
|
|
32189
32334
|
return {
|
|
32190
32335
|
values: effect.values,
|
|
32191
32336
|
style: styleTransformEffectEnabled ? effectEnabledStyle : effectDisabledStyle,
|
|
@@ -32261,10 +32406,10 @@ function addMotionValueStyle(style2, values) {
|
|
|
32261
32406
|
function isVariantOrVariantList2(value) {
|
|
32262
32407
|
return isString(value) || Array.isArray(value);
|
|
32263
32408
|
}
|
|
32264
|
-
var withFX = (
|
|
32409
|
+
var withFX = (Component18) => react_10.default.forwardRef((props, forwardedRef) => {
|
|
32265
32410
|
var _a;
|
|
32266
32411
|
if (props.__withFX) {
|
|
32267
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
32412
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
32268
32413
|
...props,
|
|
32269
32414
|
animate: void 0,
|
|
32270
32415
|
initial: void 0,
|
|
@@ -32274,7 +32419,7 @@ var withFX = (Component17) => react_11.default.forwardRef((props, forwardedRef)
|
|
|
32274
32419
|
}
|
|
32275
32420
|
const disabledProps = getDisabledFXPropsInStaticRenderer(props);
|
|
32276
32421
|
if (disabledProps) {
|
|
32277
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
32422
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
32278
32423
|
...props,
|
|
32279
32424
|
...disabledProps,
|
|
32280
32425
|
ref: forwardedRef,
|
|
@@ -32287,7 +32432,7 @@ var withFX = (Component17) => react_11.default.forwardRef((props, forwardedRef)
|
|
|
32287
32432
|
const { values: transformValues2, style: scrollStyle, } = useStyleTransform(styleTransform, observerRef);
|
|
32288
32433
|
const { values: appearEffectValues, style: scrollAppearStyle, } = useStyleAppearEffect(styleAppear, observerRef);
|
|
32289
32434
|
const { values: loopValues, style: loopStyle, } = useLoop(loop, observerRef);
|
|
32290
|
-
const fxValues =
|
|
32435
|
+
const fxValues = react_10.default.useMemo(() => {
|
|
32291
32436
|
const layerOpacity = new MotionValue(targetOpacityValue ?? 1);
|
|
32292
32437
|
return {
|
|
32293
32438
|
scale: [appearEffectValues.scale, loopValues.scale, presenceEffectValues.scale, transformValues2.scale,],
|
|
@@ -32342,7 +32487,7 @@ var withFX = (Component17) => react_11.default.forwardRef((props, forwardedRef)
|
|
|
32342
32487
|
exit,
|
|
32343
32488
|
}
|
|
32344
32489
|
: {};
|
|
32345
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
32490
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
32346
32491
|
...forwardedProps,
|
|
32347
32492
|
...motionGestures,
|
|
32348
32493
|
__withFX: true,
|
|
@@ -32380,12 +32525,12 @@ function ComponentPresetsConsumer({ componentIdentifier, children, }) {
|
|
|
32380
32525
|
const presetProps = componentPresets[componentIdentifier] ?? {};
|
|
32381
32526
|
return children(presetProps);
|
|
32382
32527
|
}
|
|
32383
|
-
var ComponentViewportContext = /* @__PURE__ */
|
|
32528
|
+
var ComponentViewportContext = /* @__PURE__ */ react_10.default.createContext({});
|
|
32384
32529
|
function useComponentViewport() {
|
|
32385
|
-
return
|
|
32530
|
+
return react_10.default.useContext(ComponentViewportContext);
|
|
32386
32531
|
}
|
|
32387
|
-
var ComponentViewportProvider = /* @__PURE__ */
|
|
32388
|
-
const componentViewport =
|
|
32532
|
+
var ComponentViewportProvider = /* @__PURE__ */ react_10.default.forwardRef(function ComponentViewportProvider2({ width, height, y, children, ...rest }, ref) {
|
|
32533
|
+
const componentViewport = react_10.default.useMemo(() => {
|
|
32389
32534
|
return {
|
|
32390
32535
|
width,
|
|
32391
32536
|
height,
|
|
@@ -32399,9 +32544,9 @@ var ComponentViewportProvider = /* @__PURE__ */ react_11.default.forwardRef(func
|
|
|
32399
32544
|
});
|
|
32400
32545
|
});
|
|
32401
32546
|
exports.ComponentViewportProvider = ComponentViewportProvider;
|
|
32402
|
-
var withGeneratedLayoutId = (
|
|
32547
|
+
var withGeneratedLayoutId = (Component18) => react_10.default.forwardRef((props, ref) => {
|
|
32403
32548
|
const layoutId = useLayoutId2(props);
|
|
32404
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
32549
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
32405
32550
|
layoutId,
|
|
32406
32551
|
...props,
|
|
32407
32552
|
layoutIdKey: void 0,
|
|
@@ -32432,7 +32577,7 @@ var SynchronousSuspenseErrorBoundary = class extends react_9.Component {
|
|
|
32432
32577
|
if (!isSuspense426Error(error))
|
|
32433
32578
|
return;
|
|
32434
32579
|
const componentStack = errorInfo == null ? void 0 : errorInfo.componentStack;
|
|
32435
|
-
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
|
|
32580
|
+
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, update external components and check recently added custom code or code overrides. In case the issue persists, report it to the Framer team via https://www.framer.com/contact/.');
|
|
32436
32581
|
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : void 0;
|
|
32437
32582
|
sendTrackingEvent('published_site_load_recoverable_error', {
|
|
32438
32583
|
message: String(error),
|
|
@@ -32478,7 +32623,7 @@ function SuspenseThatPreservesDom({ children, }) {
|
|
|
32478
32623
|
children,
|
|
32479
32624
|
});
|
|
32480
32625
|
}
|
|
32481
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
32626
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(react_12.Suspense, {
|
|
32482
32627
|
fallback: suspend,
|
|
32483
32628
|
children,
|
|
32484
32629
|
});
|
|
@@ -32554,7 +32699,7 @@ function ServerSideErrorBoundary({ children, fallback = nullFallback, }) {
|
|
|
32554
32699
|
? // On the server, Suspense fallback is activated by errors. So we use the actual Suspense,
|
|
32555
32700
|
// and render the actual error fallback if Suspense activates.
|
|
32556
32701
|
/* @__PURE__ */
|
|
32557
|
-
(0, jsx_runtime_1.jsx)(
|
|
32702
|
+
(0, jsx_runtime_1.jsx)(react_12.Suspense, {
|
|
32558
32703
|
fallback,
|
|
32559
32704
|
children,
|
|
32560
32705
|
})
|
|
@@ -32591,13 +32736,13 @@ var DeprecatedContainerErrorBoundary = class extends react_9.Component {
|
|
|
32591
32736
|
return hasError ? null : children;
|
|
32592
32737
|
}
|
|
32593
32738
|
};
|
|
32594
|
-
var ExternalComponentContext = /* @__PURE__ */ (() =>
|
|
32739
|
+
var ExternalComponentContext = /* @__PURE__ */ (() => react_10.default.createContext(void 0))();
|
|
32595
32740
|
function useNearestExternalComponent() {
|
|
32596
|
-
return
|
|
32741
|
+
return react_10.default.useContext(ExternalComponentContext);
|
|
32597
32742
|
}
|
|
32598
32743
|
function useFurthestExternalComponent() {
|
|
32599
32744
|
const nearestExternalComponent = useNearestExternalComponent();
|
|
32600
|
-
const furthestExternalComponent =
|
|
32745
|
+
const furthestExternalComponent = react_10.default.useMemo(() => {
|
|
32601
32746
|
if (!nearestExternalComponent)
|
|
32602
32747
|
return void 0;
|
|
32603
32748
|
let item = nearestExternalComponent;
|
|
@@ -32610,7 +32755,7 @@ function useFurthestExternalComponent() {
|
|
|
32610
32755
|
}
|
|
32611
32756
|
function IsExternalComponent({ children, scopeId, nodeId, }) {
|
|
32612
32757
|
const parent = useNearestExternalComponent();
|
|
32613
|
-
const newValue =
|
|
32758
|
+
const newValue = react_10.default.useMemo(() => ({
|
|
32614
32759
|
level: ((parent == null ? void 0 : parent.level) ?? 0) + 1,
|
|
32615
32760
|
scopeId,
|
|
32616
32761
|
nodeId,
|
|
@@ -32690,12 +32835,12 @@ function useMaybeWrapComponentWithCodeBoundary(children, scopeId, nodeId, isAuth
|
|
|
32690
32835
|
}
|
|
32691
32836
|
return children;
|
|
32692
32837
|
}
|
|
32693
|
-
var ContainerInner = /* @__PURE__ */
|
|
32838
|
+
var ContainerInner = /* @__PURE__ */ react_10.default.forwardRef(({ children, layoutId, as, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot, ...props }, ref) => {
|
|
32694
32839
|
const outerLayoutId = useConstant2(() => layoutId ? `${layoutId}-container` : void 0);
|
|
32695
32840
|
const MotionComponent = htmlElementAsMotionComponent(as);
|
|
32696
|
-
const clonedChildren =
|
|
32697
|
-
return
|
|
32698
|
-
?
|
|
32841
|
+
const clonedChildren = react_10.default.Children.map(children, (child) => {
|
|
32842
|
+
return react_10.default.isValidElement(child)
|
|
32843
|
+
? react_10.default.cloneElement(child, {
|
|
32699
32844
|
layoutId,
|
|
32700
32845
|
})
|
|
32701
32846
|
: child;
|
|
@@ -32723,7 +32868,7 @@ var ContainerInner = /* @__PURE__ */ react_11.default.forwardRef(({ children, la
|
|
|
32723
32868
|
});
|
|
32724
32869
|
var Container = /* @__PURE__ */ withGeneratedLayoutId(ContainerInner);
|
|
32725
32870
|
exports.Container = Container;
|
|
32726
|
-
var SmartComponentScopedContainer = /* @__PURE__ */
|
|
32871
|
+
var SmartComponentScopedContainer = /* @__PURE__ */ react_10.default.forwardRef((props, ref) => {
|
|
32727
32872
|
const { as, children,
|
|
32728
32873
|
// Code boundary-specific props
|
|
32729
32874
|
scopeId, nodeId, isAuthoredByUser, rendersWithMotion, isModuleExternal, inComponentSlot,
|
|
@@ -32732,10 +32877,10 @@ var SmartComponentScopedContainer = /* @__PURE__ */ react_11.default.forwardRef(
|
|
|
32732
32877
|
const childrenWithCodeBoundary = useMaybeWrapComponentWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot);
|
|
32733
32878
|
const tagName = props.as ?? 'div';
|
|
32734
32879
|
if (props.rendersWithMotion) {
|
|
32735
|
-
const
|
|
32880
|
+
const Component18 = htmlElementAsMotionComponent(tagName);
|
|
32736
32881
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NodeIdContext.Provider, {
|
|
32737
32882
|
value: nodeId ?? null,
|
|
32738
|
-
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
32883
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
32739
32884
|
...otherProps,
|
|
32740
32885
|
ref,
|
|
32741
32886
|
style: props.style,
|
|
@@ -32744,11 +32889,11 @@ var SmartComponentScopedContainer = /* @__PURE__ */ react_11.default.forwardRef(
|
|
|
32744
32889
|
});
|
|
32745
32890
|
}
|
|
32746
32891
|
else {
|
|
32747
|
-
const
|
|
32892
|
+
const Component18 = tagName;
|
|
32748
32893
|
const { layoutId, layoutDependency, ...plainHTMLRenderableProps } = otherProps;
|
|
32749
32894
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NodeIdContext.Provider, {
|
|
32750
32895
|
value: nodeId ?? null,
|
|
32751
|
-
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
32896
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
32752
32897
|
...plainHTMLRenderableProps,
|
|
32753
32898
|
ref,
|
|
32754
32899
|
style: props.style,
|
|
@@ -32775,7 +32920,7 @@ function getActiveDefinitions(map2, previousDefinitions, newDefinitions) {
|
|
|
32775
32920
|
}
|
|
32776
32921
|
return allCursors;
|
|
32777
32922
|
}
|
|
32778
|
-
var CustomCursorContextProvider = /* @__PURE__ */ (0,
|
|
32923
|
+
var CustomCursorContextProvider = /* @__PURE__ */ (0, react_13.memo)(function CustomCursorList({ children, }) {
|
|
32779
32924
|
const value = useConstant2(() => {
|
|
32780
32925
|
const events = /* @__PURE__ */ new Set();
|
|
32781
32926
|
let allCursors = {};
|
|
@@ -32876,7 +33021,7 @@ function isEmptyObject(object) {
|
|
|
32876
33021
|
return false;
|
|
32877
33022
|
return true;
|
|
32878
33023
|
}
|
|
32879
|
-
var CustomCursorComponent = /* @__PURE__ */ (0,
|
|
33024
|
+
var CustomCursorComponent = /* @__PURE__ */ (0, react_13.memo)(function CustomCursorComponent2() {
|
|
32880
33025
|
const { onRegisterCursors, } = (0, react_3.useContext)(CustomCursorContext);
|
|
32881
33026
|
const [hasHoverCapability, setHasHoverCapability,] = (0, react_4.useState)(false);
|
|
32882
33027
|
const pointerX = useMotionValue(0);
|
|
@@ -32892,7 +33037,7 @@ var CustomCursorComponent = /* @__PURE__ */ (0, react_14.memo)(function CustomCu
|
|
|
32892
33037
|
const noHoverMQ = safeWindow.matchMedia('(any-hover: none)');
|
|
32893
33038
|
function updateRender(e) {
|
|
32894
33039
|
if (e.matches) {
|
|
32895
|
-
(0,
|
|
33040
|
+
(0, react_11.startTransition)(() => setHasHoverCapability(false));
|
|
32896
33041
|
}
|
|
32897
33042
|
else {
|
|
32898
33043
|
setHasHoverCapability(true);
|
|
@@ -33025,7 +33170,7 @@ var CustomCursorComponent = /* @__PURE__ */ (0, react_14.memo)(function CustomCu
|
|
|
33025
33170
|
]);
|
|
33026
33171
|
if (!hasHoverCapability || !cursor || !Cursor)
|
|
33027
33172
|
return null;
|
|
33028
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
33173
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(react_12.Suspense, {
|
|
33029
33174
|
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Cursor, {
|
|
33030
33175
|
transformTemplate: transformTemplate2,
|
|
33031
33176
|
style: {
|
|
@@ -33049,6 +33194,341 @@ function useCustomCursors(webPageCursors) {
|
|
|
33049
33194
|
return registerCursors(cursors, id3);
|
|
33050
33195
|
}, [registerCursors, id3,]);
|
|
33051
33196
|
}
|
|
33197
|
+
var linkKey = 'webPageId';
|
|
33198
|
+
function isLinkToWebPage(link) {
|
|
33199
|
+
return Boolean(link && typeof link === 'object' && linkKey in link);
|
|
33200
|
+
}
|
|
33201
|
+
function linkInfoKey(link) {
|
|
33202
|
+
var _a, _b;
|
|
33203
|
+
return `${link.scopeId}:${link.nodeId}:${(_a = link.furthestExternalComponent) == null ? void 0 : _a.scopeId}:${(_b = link.furthestExternalComponent) == null ? void 0 : _b.nodeId}`;
|
|
33204
|
+
}
|
|
33205
|
+
var NestedLinksCollector = class {
|
|
33206
|
+
constructor() {
|
|
33207
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'collectedLinks', /* @__PURE__ */ new Map());
|
|
33208
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'nestingInfo', /* @__PURE__ */ new Map());
|
|
33209
|
+
}
|
|
33210
|
+
clear() {
|
|
33211
|
+
this.collectedLinks.clear();
|
|
33212
|
+
this.nestingInfo.clear();
|
|
33213
|
+
}
|
|
33214
|
+
/**
|
|
33215
|
+
* Returns a Map of outer links to their inner links.
|
|
33216
|
+
*
|
|
33217
|
+
* NOTE: This function is called in the SSG renderer sandbox (<root>/src/ssg/src/ssg-sandbox-renderer/sandbox/worker/renderer.ts)
|
|
33218
|
+
*/
|
|
33219
|
+
getLinks() {
|
|
33220
|
+
const result = /* @__PURE__ */ new Map();
|
|
33221
|
+
for (const [outerLinkKey, innerLinkKeys,] of this.nestingInfo) {
|
|
33222
|
+
const outerLinkInfo = this.collectedLinks.get(outerLinkKey);
|
|
33223
|
+
assert(outerLinkInfo, `Outer link not found: ${outerLinkKey}`);
|
|
33224
|
+
const links = Array.from(innerLinkKeys).map((innerLinkKey) => {
|
|
33225
|
+
const innerLinkInfo = this.collectedLinks.get(innerLinkKey);
|
|
33226
|
+
assert(innerLinkInfo, `Inner link not found: ${innerLinkKey}`);
|
|
33227
|
+
return innerLinkInfo;
|
|
33228
|
+
});
|
|
33229
|
+
result.set(outerLinkInfo, links);
|
|
33230
|
+
}
|
|
33231
|
+
return result;
|
|
33232
|
+
}
|
|
33233
|
+
collectNestedLink(outerLink, innerLink) {
|
|
33234
|
+
if (isWindow && !isTest() || !outerLink.nodeId || !innerLink.nodeId) {
|
|
33235
|
+
return;
|
|
33236
|
+
}
|
|
33237
|
+
this.collectedLinks.set(linkInfoKey(outerLink), outerLink);
|
|
33238
|
+
this.collectedLinks.set(linkInfoKey(innerLink), innerLink);
|
|
33239
|
+
const outerLinkNestingInfo = this.nestingInfo.get(linkInfoKey(outerLink)) ?? /* @__PURE__ */ new Set();
|
|
33240
|
+
outerLinkNestingInfo.add(linkInfoKey(innerLink));
|
|
33241
|
+
this.nestingInfo.set(linkInfoKey(outerLink), outerLinkNestingInfo);
|
|
33242
|
+
}
|
|
33243
|
+
};
|
|
33244
|
+
var nestedLinksCollector = /* @__PURE__ */ new NestedLinksCollector();
|
|
33245
|
+
exports.nestedLinksCollector = nestedLinksCollector;
|
|
33246
|
+
function useIsOnFramerCanvas() {
|
|
33247
|
+
return RenderTarget.current() === RenderTarget.canvas;
|
|
33248
|
+
}
|
|
33249
|
+
function isInternalURL(href) {
|
|
33250
|
+
if (href === void 0)
|
|
33251
|
+
return false;
|
|
33252
|
+
if (href.startsWith('#') || href.startsWith('/') || href.startsWith('.'))
|
|
33253
|
+
return true;
|
|
33254
|
+
return false;
|
|
33255
|
+
}
|
|
33256
|
+
function isValidURL(href, isInternal) {
|
|
33257
|
+
try {
|
|
33258
|
+
const url = new URL(href);
|
|
33259
|
+
return Boolean(url.protocol);
|
|
33260
|
+
}
|
|
33261
|
+
catch { }
|
|
33262
|
+
return isInternal;
|
|
33263
|
+
}
|
|
33264
|
+
function getRouteFromPageLink(pageLink, router, currentRoute) {
|
|
33265
|
+
var _a;
|
|
33266
|
+
if (isString(pageLink)) {
|
|
33267
|
+
const isInternal = isInternalURL(pageLink);
|
|
33268
|
+
if (!router.routes || !router.getRoute || !currentRoute || !isInternal) {
|
|
33269
|
+
return;
|
|
33270
|
+
}
|
|
33271
|
+
const [pathnameWithQueryParams,] = pageLink.split('#', 2);
|
|
33272
|
+
if (pathnameWithQueryParams === void 0)
|
|
33273
|
+
return;
|
|
33274
|
+
const [pathname,] = pathnameWithQueryParams.split('?', 2);
|
|
33275
|
+
if (pathname === void 0)
|
|
33276
|
+
return;
|
|
33277
|
+
const { routeId, } = inferInitialRouteFromPath(router.routes, pathname);
|
|
33278
|
+
return router.getRoute(routeId);
|
|
33279
|
+
}
|
|
33280
|
+
const { webPageId, } = pageLink;
|
|
33281
|
+
return (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId);
|
|
33282
|
+
}
|
|
33283
|
+
var elementKey = 'element';
|
|
33284
|
+
var collectionKey = 'collection';
|
|
33285
|
+
var collectionItemIdKey = 'collectionItemId';
|
|
33286
|
+
var pathVariablesKey = 'pathVariables';
|
|
33287
|
+
var mediaType = 'framer/page-link,';
|
|
33288
|
+
function isFramerPageLink(value) {
|
|
33289
|
+
return isString(value) && value.startsWith(`data:${mediaType}`);
|
|
33290
|
+
}
|
|
33291
|
+
function createFramerPageLink(targetId = null, options = {}) {
|
|
33292
|
+
const target = targetId ? targetId : 'none';
|
|
33293
|
+
const link = new URL(`data:${mediaType}${target}`);
|
|
33294
|
+
if (options.element) {
|
|
33295
|
+
link.searchParams.append(elementKey, options.element);
|
|
33296
|
+
}
|
|
33297
|
+
if (options.collectionItem) {
|
|
33298
|
+
link.searchParams.append(collectionKey, options.collectionItem.collection);
|
|
33299
|
+
link.searchParams.append(collectionItemIdKey, options.collectionItem.collectionItemId);
|
|
33300
|
+
link.searchParams.append(pathVariablesKey, new URLSearchParams(options.collectionItem.pathVariables).toString());
|
|
33301
|
+
}
|
|
33302
|
+
return link.href;
|
|
33303
|
+
}
|
|
33304
|
+
function parseFramerPageLink(link) {
|
|
33305
|
+
if (!isFramerPageLink(link))
|
|
33306
|
+
return;
|
|
33307
|
+
try {
|
|
33308
|
+
const url = new URL(link);
|
|
33309
|
+
const target = url.pathname.substring(mediaType.length);
|
|
33310
|
+
const searchParams = url.searchParams;
|
|
33311
|
+
const element = searchParams.has(elementKey) ? searchParams.get(elementKey) : void 0;
|
|
33312
|
+
let collectionItem;
|
|
33313
|
+
const collection = searchParams.get(collectionKey);
|
|
33314
|
+
const collectionItemId = searchParams.get(collectionItemIdKey);
|
|
33315
|
+
const pathVariablesValue = searchParams.get(pathVariablesKey);
|
|
33316
|
+
if (collection && collectionItemId && pathVariablesValue) {
|
|
33317
|
+
const pathVariables = Object.fromEntries(new URLSearchParams(pathVariablesValue).entries());
|
|
33318
|
+
collectionItem = {
|
|
33319
|
+
collection,
|
|
33320
|
+
collectionItemId,
|
|
33321
|
+
pathVariables,
|
|
33322
|
+
};
|
|
33323
|
+
}
|
|
33324
|
+
return {
|
|
33325
|
+
target: target === 'none' ? null : target,
|
|
33326
|
+
/**
|
|
33327
|
+
* For historical reason we used to set "element=none" into the
|
|
33328
|
+
* datalink, we no longer do that today, but we still keep this code
|
|
33329
|
+
* so we could parse legacy links correctly.
|
|
33330
|
+
*/
|
|
33331
|
+
element: element === 'none' ? void 0 : element,
|
|
33332
|
+
collectionItem,
|
|
33333
|
+
};
|
|
33334
|
+
}
|
|
33335
|
+
catch {
|
|
33336
|
+
return;
|
|
33337
|
+
}
|
|
33338
|
+
}
|
|
33339
|
+
function shouldOpenLinkInNewTab(link) {
|
|
33340
|
+
return !isFramerPageLink(link);
|
|
33341
|
+
}
|
|
33342
|
+
function navigateFromAttributes(navigate, element, implicitPathVariables) {
|
|
33343
|
+
var _a;
|
|
33344
|
+
let routeId = element.getAttribute('data-framer-page-link-target');
|
|
33345
|
+
let elementId;
|
|
33346
|
+
let pathVariables;
|
|
33347
|
+
if (routeId) {
|
|
33348
|
+
elementId = element.getAttribute('data-framer-page-link-element') ?? void 0;
|
|
33349
|
+
const pathVariablesRaw = element.getAttribute('data-framer-page-link-path-variables');
|
|
33350
|
+
if (pathVariablesRaw) {
|
|
33351
|
+
pathVariables = Object.fromEntries(new URLSearchParams(pathVariablesRaw).entries());
|
|
33352
|
+
}
|
|
33353
|
+
}
|
|
33354
|
+
else {
|
|
33355
|
+
const href = element.getAttribute('href');
|
|
33356
|
+
if (!href)
|
|
33357
|
+
return false;
|
|
33358
|
+
const link = parseFramerPageLink(href);
|
|
33359
|
+
if (!link || !link.target)
|
|
33360
|
+
return false;
|
|
33361
|
+
routeId = link.target;
|
|
33362
|
+
elementId = link.element ?? void 0;
|
|
33363
|
+
pathVariables = (_a = link.collectionItem) == null ? void 0 : _a.pathVariables;
|
|
33364
|
+
}
|
|
33365
|
+
const smoothScroll = elementId ? element.dataset.framerSmoothScroll !== void 0 : void 0;
|
|
33366
|
+
navigate(routeId, elementId, Object.assign({}, implicitPathVariables, pathVariables), smoothScroll);
|
|
33367
|
+
return true;
|
|
33368
|
+
}
|
|
33369
|
+
function linkFromFramerPageLink(link) {
|
|
33370
|
+
if (!isFramerPageLink(link))
|
|
33371
|
+
return link;
|
|
33372
|
+
const parsed = parseFramerPageLink(link);
|
|
33373
|
+
if (!parsed)
|
|
33374
|
+
return void 0;
|
|
33375
|
+
const { target, element, collectionItem, } = parsed;
|
|
33376
|
+
if (!target)
|
|
33377
|
+
return void 0;
|
|
33378
|
+
return {
|
|
33379
|
+
webPageId: target,
|
|
33380
|
+
hash: element ?? void 0,
|
|
33381
|
+
pathVariables: createVariablesFromPageLinkCollectionItem(collectionItem),
|
|
33382
|
+
};
|
|
33383
|
+
}
|
|
33384
|
+
function createVariablesFromPageLinkCollectionItem(collectionItem) {
|
|
33385
|
+
if (!collectionItem)
|
|
33386
|
+
return void 0;
|
|
33387
|
+
const variables = {};
|
|
33388
|
+
for (const pathVariablesKey2 in collectionItem.pathVariables) {
|
|
33389
|
+
const value = collectionItem.pathVariables[pathVariablesKey2];
|
|
33390
|
+
if (value)
|
|
33391
|
+
variables[pathVariablesKey2] = value;
|
|
33392
|
+
}
|
|
33393
|
+
return variables;
|
|
33394
|
+
}
|
|
33395
|
+
var OuterLinkContext = /* @__PURE__ */ (0, react_1.createContext)(void 0);
|
|
33396
|
+
function ResetOuterLinkContext({ children, }) {
|
|
33397
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(OuterLinkContext.Provider, {
|
|
33398
|
+
value: void 0,
|
|
33399
|
+
children,
|
|
33400
|
+
});
|
|
33401
|
+
}
|
|
33402
|
+
function useReplaceNestedLinks(children, scopeId, nodeId, href, propsAddedByLink, observerRef) {
|
|
33403
|
+
const outerLink = (0, react_3.useContext)(OuterLinkContext);
|
|
33404
|
+
const furthestExternalComponent = useFurthestExternalComponent();
|
|
33405
|
+
const innerLink = (0, react_4.useMemo)(() => ({
|
|
33406
|
+
scopeId,
|
|
33407
|
+
nodeId,
|
|
33408
|
+
furthestExternalComponent,
|
|
33409
|
+
}), [scopeId, nodeId, furthestExternalComponent,]);
|
|
33410
|
+
const router = useRouter();
|
|
33411
|
+
const currentRoute = useCurrentRoute();
|
|
33412
|
+
const route = (0, react_4.useMemo)(() => {
|
|
33413
|
+
const pageLink = isLinkToWebPage(href) ? href : linkFromFramerPageLink(href);
|
|
33414
|
+
if (!pageLink)
|
|
33415
|
+
return;
|
|
33416
|
+
return getRouteFromPageLink(pageLink, router, currentRoute);
|
|
33417
|
+
}, [currentRoute, href, router,]);
|
|
33418
|
+
const isOnFramerCanvas = useIsOnFramerCanvas();
|
|
33419
|
+
const shouldReplaceLink = Boolean(!isOnFramerCanvas && (outerLink == null ? void 0 : outerLink.nodeId) && innerLink.nodeId);
|
|
33420
|
+
const onClick = (0, react_3.useCallback)((event) => {
|
|
33421
|
+
var _a;
|
|
33422
|
+
if (!propsAddedByLink.href)
|
|
33423
|
+
return;
|
|
33424
|
+
event.preventDefault();
|
|
33425
|
+
event.stopPropagation();
|
|
33426
|
+
const isAppleDevice = /Mac|iPod|iPhone|iPad/u.test(__unframerNavigator2.userAgent);
|
|
33427
|
+
if (isAppleDevice ? event.metaKey : event.ctrlKey) {
|
|
33428
|
+
openExternalLink(propsAddedByLink.href, '', '_blank');
|
|
33429
|
+
return;
|
|
33430
|
+
}
|
|
33431
|
+
if (route) {
|
|
33432
|
+
(_a = propsAddedByLink.navigate) == null ? void 0 : _a.call(propsAddedByLink);
|
|
33433
|
+
}
|
|
33434
|
+
else {
|
|
33435
|
+
openExternalLink(propsAddedByLink.href, propsAddedByLink.rel, propsAddedByLink.target);
|
|
33436
|
+
}
|
|
33437
|
+
}, [propsAddedByLink, route,]);
|
|
33438
|
+
const onAuxClick = (0, react_3.useCallback)((event) => {
|
|
33439
|
+
if (!propsAddedByLink.href)
|
|
33440
|
+
return;
|
|
33441
|
+
event.preventDefault();
|
|
33442
|
+
event.stopPropagation();
|
|
33443
|
+
openExternalLink(propsAddedByLink.href, '', '_blank');
|
|
33444
|
+
}, [propsAddedByLink,]);
|
|
33445
|
+
const onKeyDown = (0, react_3.useCallback)((event) => {
|
|
33446
|
+
var _a;
|
|
33447
|
+
if (!propsAddedByLink.href)
|
|
33448
|
+
return;
|
|
33449
|
+
if (event.key !== 'Enter')
|
|
33450
|
+
return;
|
|
33451
|
+
event.preventDefault();
|
|
33452
|
+
event.stopPropagation();
|
|
33453
|
+
if (route) {
|
|
33454
|
+
(_a = propsAddedByLink.navigate) == null ? void 0 : _a.call(propsAddedByLink);
|
|
33455
|
+
}
|
|
33456
|
+
else {
|
|
33457
|
+
openExternalLink(propsAddedByLink.href, propsAddedByLink.rel, propsAddedByLink.target);
|
|
33458
|
+
}
|
|
33459
|
+
}, [propsAddedByLink, route,]);
|
|
33460
|
+
useRefEffect(observerRef, (node) => {
|
|
33461
|
+
if (node === null)
|
|
33462
|
+
return;
|
|
33463
|
+
if (!shouldReplaceLink)
|
|
33464
|
+
return;
|
|
33465
|
+
node.dataset.hydrated = 'true';
|
|
33466
|
+
}, [shouldReplaceLink,]);
|
|
33467
|
+
let replacedChildren = children;
|
|
33468
|
+
if (shouldReplaceLink) {
|
|
33469
|
+
react_6.Children.forEach(children, (child) => {
|
|
33470
|
+
if (!isChildReplaceable(child))
|
|
33471
|
+
return;
|
|
33472
|
+
assert(linkInfoIsCollectable(outerLink), 'outerLink must have nodeId defined at this point; this was verified with `shouldReplaceLink` above');
|
|
33473
|
+
assert(linkInfoIsCollectable(innerLink), 'innerLink must have nodeId defined at this point; this was verified with `shouldReplaceLink` above');
|
|
33474
|
+
nestedLinksCollector.collectNestedLink(outerLink, innerLink);
|
|
33475
|
+
});
|
|
33476
|
+
replacedChildren = react_6.Children.map(children, (child) => {
|
|
33477
|
+
if (!isChildReplaceable(child))
|
|
33478
|
+
return child;
|
|
33479
|
+
const tag = maybeReplaceAnchorWithSpan(child.type);
|
|
33480
|
+
const { children: childChildren, ...childProps } = child.props;
|
|
33481
|
+
const props = {
|
|
33482
|
+
...childProps,
|
|
33483
|
+
// This attribute is used in `ssg/src/ssg-sandbox-renderer/worker/nestedLinks.ts` to handle the nested links clicks
|
|
33484
|
+
'data-nested-link': true,
|
|
33485
|
+
role: 'link',
|
|
33486
|
+
tabIndex: 0,
|
|
33487
|
+
onClick,
|
|
33488
|
+
onAuxClick,
|
|
33489
|
+
onKeyDown,
|
|
33490
|
+
as: childProps.as && maybeReplaceAnchorWithSpan(childProps.as),
|
|
33491
|
+
};
|
|
33492
|
+
const ref = 'ref' in child ? child.ref : void 0;
|
|
33493
|
+
return (0, react_8.createElement)(tag, // We need to pass the ref here again, otherwise it will be lost
|
|
33494
|
+
{
|
|
33495
|
+
...props,
|
|
33496
|
+
ref,
|
|
33497
|
+
}, childChildren);
|
|
33498
|
+
});
|
|
33499
|
+
}
|
|
33500
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(OuterLinkContext.Provider, {
|
|
33501
|
+
value: innerLink,
|
|
33502
|
+
children: replacedChildren,
|
|
33503
|
+
});
|
|
33504
|
+
}
|
|
33505
|
+
function linkInfoIsCollectable(linkInfo) {
|
|
33506
|
+
return !isUndefined(linkInfo == null ? void 0 : linkInfo.nodeId);
|
|
33507
|
+
}
|
|
33508
|
+
function isChildReplaceable(child) {
|
|
33509
|
+
return (0, react_6.isValidElement)(child) &&
|
|
33510
|
+
(maybeReplaceAnchorWithSpan(child.type) !== child.type || maybeReplaceAnchorWithSpan(child.props.as) !== child.props.as);
|
|
33511
|
+
}
|
|
33512
|
+
function openExternalLink(href, rel, target) {
|
|
33513
|
+
const link = document.createElement('a');
|
|
33514
|
+
link.href = href;
|
|
33515
|
+
if (rel) {
|
|
33516
|
+
link.rel = rel;
|
|
33517
|
+
}
|
|
33518
|
+
if (target) {
|
|
33519
|
+
link.target = target;
|
|
33520
|
+
}
|
|
33521
|
+
document.body.appendChild(link);
|
|
33522
|
+
link.click();
|
|
33523
|
+
link.remove();
|
|
33524
|
+
}
|
|
33525
|
+
function maybeReplaceAnchorWithSpan(component) {
|
|
33526
|
+
if (component === 'a')
|
|
33527
|
+
return 'span';
|
|
33528
|
+
if (isMotionComponent(component) && unwrapMotionComponent(component) === 'a')
|
|
33529
|
+
return motion.span;
|
|
33530
|
+
return component;
|
|
33531
|
+
}
|
|
33052
33532
|
var Polygon = {
|
|
33053
33533
|
/**
|
|
33054
33534
|
* Determine if the vertices are ordered clockwise or counter-clockwise. This works for simple
|
|
@@ -33445,15 +33925,15 @@ function domWriteUpdatePosition(floatingPositionRef, position, rect, scrollX, sc
|
|
|
33445
33925
|
});
|
|
33446
33926
|
}
|
|
33447
33927
|
var FloatingStackingContext = /* @__PURE__ */ (() => {
|
|
33448
|
-
const Context2 =
|
|
33928
|
+
const Context2 = react_10.default.createContext(/* @__PURE__ */ new Set());
|
|
33449
33929
|
Context2.displayName = 'FloatingStackingContext';
|
|
33450
33930
|
return Context2;
|
|
33451
33931
|
})();
|
|
33452
33932
|
function useDismissFloatingLayer(anchorRef, floatingPositionRef, safeAreaRef, { safeArea, onDismiss, }) {
|
|
33453
33933
|
const descendantStackingContext = useConstant2(() => /* @__PURE__ */ new Set());
|
|
33454
|
-
const ancestorStackingContext =
|
|
33934
|
+
const ancestorStackingContext = react_10.default.useContext(FloatingStackingContext);
|
|
33455
33935
|
const [isPresent2, safeToRemove,] = usePresence();
|
|
33456
|
-
|
|
33936
|
+
react_10.default.useEffect(() => {
|
|
33457
33937
|
if (isPresent2) {
|
|
33458
33938
|
if (!floatingPositionRef.current)
|
|
33459
33939
|
return;
|
|
@@ -33468,7 +33948,7 @@ function useDismissFloatingLayer(anchorRef, floatingPositionRef, safeAreaRef, {
|
|
|
33468
33948
|
safeToRemove();
|
|
33469
33949
|
}
|
|
33470
33950
|
}, [isPresent2, safeToRemove, floatingPositionRef, ancestorStackingContext,]);
|
|
33471
|
-
|
|
33951
|
+
react_10.default.useEffect(() => {
|
|
33472
33952
|
if (!safeArea) {
|
|
33473
33953
|
const handleEscape = (e) => {
|
|
33474
33954
|
if (e.key !== 'Escape')
|
|
@@ -33530,7 +34010,7 @@ function childrenWithOrigin(child, { x, y, }) {
|
|
|
33530
34010
|
originX: x,
|
|
33531
34011
|
originY: y,
|
|
33532
34012
|
};
|
|
33533
|
-
return
|
|
34013
|
+
return react_10.default.cloneElement(child, {
|
|
33534
34014
|
style: style2,
|
|
33535
34015
|
});
|
|
33536
34016
|
}
|
|
@@ -33548,30 +34028,42 @@ function getPortalContainer(deprecatedSelector, inComponent) {
|
|
|
33548
34028
|
return document.body;
|
|
33549
34029
|
}
|
|
33550
34030
|
function Floating({ alignment, placement, safeArea, offsetX, offsetY, anchorRef, className: className2, children, portalSelector, zIndex, collisionDetection = false, collisionDetectionPadding, onDismiss, ...rest }) {
|
|
33551
|
-
const floatingPositionRef =
|
|
33552
|
-
const safeAreaRef =
|
|
33553
|
-
const contentRef =
|
|
34031
|
+
const floatingPositionRef = react_10.default.useRef(null);
|
|
34032
|
+
const safeAreaRef = react_10.default.useRef(null);
|
|
34033
|
+
const contentRef = react_10.default.useRef(null);
|
|
33554
34034
|
const [origin, updateOrigin,] = useDynamicMotionOrigin(placement, alignment);
|
|
33555
|
-
|
|
34035
|
+
react_10.default.useLayoutEffect(() => {
|
|
33556
34036
|
if (!refHasValue(anchorRef) || !contentRef.current || !placement || !alignment)
|
|
33557
34037
|
return;
|
|
33558
34038
|
const offset = {
|
|
33559
34039
|
x: offsetX ?? 0,
|
|
33560
34040
|
y: offsetY ?? 0,
|
|
33561
34041
|
};
|
|
33562
|
-
let getSafePlacementRect;
|
|
33563
|
-
let position;
|
|
33564
34042
|
let cleanup;
|
|
33565
34043
|
let cleanupHasRun = false;
|
|
33566
34044
|
let initialUpdateHasRun = false;
|
|
33567
34045
|
let anchorRect;
|
|
33568
|
-
let elementRect;
|
|
33569
34046
|
let safePlacement;
|
|
33570
34047
|
let calculatedRect;
|
|
33571
34048
|
let latestEvent;
|
|
33572
34049
|
let updateSafeArea;
|
|
33573
34050
|
let scrollX = 0;
|
|
33574
34051
|
let scrollY = 0;
|
|
34052
|
+
const ancestorInfo = domReadGetAncestorInfo(anchorRef);
|
|
34053
|
+
const position = ancestorInfo.position;
|
|
34054
|
+
const elementRect = contentRef.current.getBoundingClientRect();
|
|
34055
|
+
const getSafePlacementRect = makeGetSafePlacementFloatingPositionRect({
|
|
34056
|
+
placement,
|
|
34057
|
+
alignment,
|
|
34058
|
+
offset,
|
|
34059
|
+
collisionDetectionSize: collisionDetection
|
|
34060
|
+
? {
|
|
34061
|
+
width: safeWindow.innerWidth,
|
|
34062
|
+
height: safeWindow.innerHeight,
|
|
34063
|
+
}
|
|
34064
|
+
: void 0,
|
|
34065
|
+
collisionDetectionPadding,
|
|
34066
|
+
});
|
|
33575
34067
|
const onRender = () => {
|
|
33576
34068
|
if (cleanupHasRun)
|
|
33577
34069
|
return;
|
|
@@ -33611,31 +34103,12 @@ function Floating({ alignment, placement, safeArea, offsetX, offsetY, anchorRef,
|
|
|
33611
34103
|
safePlacement = safePlacementAndRect[0];
|
|
33612
34104
|
calculatedRect = safePlacementAndRect[1];
|
|
33613
34105
|
};
|
|
33614
|
-
|
|
33615
|
-
|
|
33616
|
-
|
|
33617
|
-
|
|
33618
|
-
position = ancestorInfo.position;
|
|
33619
|
-
elementRect = contentRef.current.getBoundingClientRect();
|
|
33620
|
-
getSafePlacementRect = makeGetSafePlacementFloatingPositionRect({
|
|
33621
|
-
placement,
|
|
33622
|
-
alignment,
|
|
33623
|
-
offset,
|
|
33624
|
-
collisionDetectionSize: collisionDetection
|
|
33625
|
-
? {
|
|
33626
|
-
width: safeWindow.innerWidth,
|
|
33627
|
-
height: safeWindow.innerHeight,
|
|
33628
|
-
}
|
|
33629
|
-
: void 0,
|
|
33630
|
-
collisionDetectionPadding,
|
|
33631
|
-
});
|
|
33632
|
-
domReadUpdateSafePlacementAndRect();
|
|
33633
|
-
frame.update(onUpdate);
|
|
33634
|
-
frame.render(initialRender);
|
|
33635
|
-
if (!ancestorInfo.scrolls)
|
|
33636
|
-
return;
|
|
34106
|
+
domReadUpdateSafePlacementAndRect();
|
|
34107
|
+
onUpdate();
|
|
34108
|
+
initialRender();
|
|
34109
|
+
if (ancestorInfo.scrolls) {
|
|
33637
34110
|
cleanup = domReadStartAnimationFrameLoop(domReadUpdateSafePlacementAndRect);
|
|
33638
|
-
}
|
|
34111
|
+
}
|
|
33639
34112
|
if (!safeArea) {
|
|
33640
34113
|
return () => {
|
|
33641
34114
|
cleanup == null ? void 0 : cleanup();
|
|
@@ -33701,17 +34174,19 @@ function Floating({ alignment, placement, safeArea, offsetX, offsetY, anchorRef,
|
|
|
33701
34174
|
}),
|
|
33702
34175
|
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(FloatingStackingContext.Provider, {
|
|
33703
34176
|
value: descendantContext,
|
|
33704
|
-
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
33705
|
-
|
|
33706
|
-
|
|
34177
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(ResetOuterLinkContext, {
|
|
34178
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)('div', {
|
|
34179
|
+
ref: contentRef,
|
|
34180
|
+
children: childrenWithOrigin(children, origin),
|
|
34181
|
+
}),
|
|
33707
34182
|
}),
|
|
33708
34183
|
}),
|
|
33709
34184
|
],
|
|
33710
34185
|
}), getPortalContainer(portalSelector, inComponent));
|
|
33711
34186
|
}
|
|
33712
|
-
var Instance = /* @__PURE__ */
|
|
33713
|
-
return
|
|
33714
|
-
? /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
34187
|
+
var Instance = /* @__PURE__ */ react_10.default.forwardRef(function Instance2({ Component: Component18, ...props }, ref) {
|
|
34188
|
+
return Component18
|
|
34189
|
+
? /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
33715
34190
|
...props,
|
|
33716
34191
|
ref,
|
|
33717
34192
|
})
|
|
@@ -33865,20 +34340,16 @@ function ChildrenCanSuspend({ children, }) {
|
|
|
33865
34340
|
children,
|
|
33866
34341
|
});
|
|
33867
34342
|
}
|
|
33868
|
-
function withChildrenCanSuspend(
|
|
34343
|
+
function withChildrenCanSuspend(Component18) {
|
|
33869
34344
|
return (0, react_7.forwardRef)(function withChildrenCanSuspendInner(props, ref) {
|
|
33870
34345
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(ChildrenCanSuspend, {
|
|
33871
|
-
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
34346
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
33872
34347
|
...props,
|
|
33873
34348
|
ref,
|
|
33874
34349
|
}),
|
|
33875
34350
|
});
|
|
33876
34351
|
});
|
|
33877
34352
|
}
|
|
33878
|
-
var linkKey = 'webPageId';
|
|
33879
|
-
function isLinkToWebPage(link) {
|
|
33880
|
-
return Boolean(link && typeof link === 'object' && linkKey in link);
|
|
33881
|
-
}
|
|
33882
34353
|
var PRELOAD_AFTER_MS = 500;
|
|
33883
34354
|
var OBSERVER_THRESHOLD = 0.9;
|
|
33884
34355
|
var LOW_MEMORY_THRESHOLD = 1.7;
|
|
@@ -34064,21 +34535,6 @@ function resolveSlugsWithSuspense(unresolvedPathSlugs, unresolvedHashSlugs, coll
|
|
|
34064
34535
|
}
|
|
34065
34536
|
return result;
|
|
34066
34537
|
}
|
|
34067
|
-
function isInternalURL(href) {
|
|
34068
|
-
if (href === void 0)
|
|
34069
|
-
return false;
|
|
34070
|
-
if (href.startsWith('#') || href.startsWith('/') || href.startsWith('.'))
|
|
34071
|
-
return true;
|
|
34072
|
-
return false;
|
|
34073
|
-
}
|
|
34074
|
-
function isValidURL(href, isInternal) {
|
|
34075
|
-
try {
|
|
34076
|
-
const url = new URL(href);
|
|
34077
|
-
return Boolean(url.protocol);
|
|
34078
|
-
}
|
|
34079
|
-
catch { }
|
|
34080
|
-
return isInternal;
|
|
34081
|
-
}
|
|
34082
34538
|
async function findMatchingRouteAttributesForWebPageLink(router, currentRoute, pageLink, activeLocale, implicitPathVariables) {
|
|
34083
34539
|
const { webPageId, hash: hash2, pathVariables, hashVariables, unresolvedHashSlugs, unresolvedPathSlugs, } = pageLink;
|
|
34084
34540
|
const resolvedSlugs = await resolveSlugs(unresolvedPathSlugs, unresolvedHashSlugs, router.collectionUtils, activeLocale);
|
|
@@ -34150,137 +34606,6 @@ function getRouteAttributes(router, currentRoute, routeId, hash2, implicitPathVa
|
|
|
34150
34606
|
pathVariables: combinedPathVariables,
|
|
34151
34607
|
};
|
|
34152
34608
|
}
|
|
34153
|
-
function getRouteFromPageLink(pageLink, router, currentRoute) {
|
|
34154
|
-
var _a;
|
|
34155
|
-
if (isString(pageLink)) {
|
|
34156
|
-
const isInternal = isInternalURL(pageLink);
|
|
34157
|
-
if (!router.routes || !router.getRoute || !currentRoute || !isInternal) {
|
|
34158
|
-
return;
|
|
34159
|
-
}
|
|
34160
|
-
const [pathnameWithQueryParams,] = pageLink.split('#', 2);
|
|
34161
|
-
if (pathnameWithQueryParams === void 0)
|
|
34162
|
-
return;
|
|
34163
|
-
const [pathname,] = pathnameWithQueryParams.split('?', 2);
|
|
34164
|
-
if (pathname === void 0)
|
|
34165
|
-
return;
|
|
34166
|
-
const { routeId, } = inferInitialRouteFromPath(router.routes, pathname);
|
|
34167
|
-
return router.getRoute(routeId);
|
|
34168
|
-
}
|
|
34169
|
-
const { webPageId, } = pageLink;
|
|
34170
|
-
return (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId);
|
|
34171
|
-
}
|
|
34172
|
-
var elementKey = 'element';
|
|
34173
|
-
var collectionKey = 'collection';
|
|
34174
|
-
var collectionItemIdKey = 'collectionItemId';
|
|
34175
|
-
var pathVariablesKey = 'pathVariables';
|
|
34176
|
-
var mediaType = 'framer/page-link,';
|
|
34177
|
-
function isFramerPageLink(value) {
|
|
34178
|
-
return isString(value) && value.startsWith(`data:${mediaType}`);
|
|
34179
|
-
}
|
|
34180
|
-
function createFramerPageLink(targetId = null, options = {}) {
|
|
34181
|
-
const target = targetId ? targetId : 'none';
|
|
34182
|
-
const link = new URL(`data:${mediaType}${target}`);
|
|
34183
|
-
if (options.element) {
|
|
34184
|
-
link.searchParams.append(elementKey, options.element);
|
|
34185
|
-
}
|
|
34186
|
-
if (options.collectionItem) {
|
|
34187
|
-
link.searchParams.append(collectionKey, options.collectionItem.collection);
|
|
34188
|
-
link.searchParams.append(collectionItemIdKey, options.collectionItem.collectionItemId);
|
|
34189
|
-
link.searchParams.append(pathVariablesKey, new URLSearchParams(options.collectionItem.pathVariables).toString());
|
|
34190
|
-
}
|
|
34191
|
-
return link.href;
|
|
34192
|
-
}
|
|
34193
|
-
function parseFramerPageLink(link) {
|
|
34194
|
-
if (!isFramerPageLink(link))
|
|
34195
|
-
return;
|
|
34196
|
-
try {
|
|
34197
|
-
const url = new URL(link);
|
|
34198
|
-
const target = url.pathname.substring(mediaType.length);
|
|
34199
|
-
const searchParams = url.searchParams;
|
|
34200
|
-
const element = searchParams.has(elementKey) ? searchParams.get(elementKey) : void 0;
|
|
34201
|
-
let collectionItem;
|
|
34202
|
-
const collection = searchParams.get(collectionKey);
|
|
34203
|
-
const collectionItemId = searchParams.get(collectionItemIdKey);
|
|
34204
|
-
const pathVariablesValue = searchParams.get(pathVariablesKey);
|
|
34205
|
-
if (collection && collectionItemId && pathVariablesValue) {
|
|
34206
|
-
const pathVariables = Object.fromEntries(new URLSearchParams(pathVariablesValue).entries());
|
|
34207
|
-
collectionItem = {
|
|
34208
|
-
collection,
|
|
34209
|
-
collectionItemId,
|
|
34210
|
-
pathVariables,
|
|
34211
|
-
};
|
|
34212
|
-
}
|
|
34213
|
-
return {
|
|
34214
|
-
target: target === 'none' ? null : target,
|
|
34215
|
-
/**
|
|
34216
|
-
* For historical reason we used to set "element=none" into the
|
|
34217
|
-
* datalink, we no longer do that today, but we still keep this code
|
|
34218
|
-
* so we could parse legacy links correctly.
|
|
34219
|
-
*/
|
|
34220
|
-
element: element === 'none' ? void 0 : element,
|
|
34221
|
-
collectionItem,
|
|
34222
|
-
};
|
|
34223
|
-
}
|
|
34224
|
-
catch {
|
|
34225
|
-
return;
|
|
34226
|
-
}
|
|
34227
|
-
}
|
|
34228
|
-
function shouldOpenLinkInNewTab(link) {
|
|
34229
|
-
return !isFramerPageLink(link);
|
|
34230
|
-
}
|
|
34231
|
-
function navigateFromAttributes(navigate, element, implicitPathVariables) {
|
|
34232
|
-
var _a;
|
|
34233
|
-
let routeId = element.getAttribute('data-framer-page-link-target');
|
|
34234
|
-
let elementId;
|
|
34235
|
-
let pathVariables;
|
|
34236
|
-
if (routeId) {
|
|
34237
|
-
elementId = element.getAttribute('data-framer-page-link-element') ?? void 0;
|
|
34238
|
-
const pathVariablesRaw = element.getAttribute('data-framer-page-link-path-variables');
|
|
34239
|
-
if (pathVariablesRaw) {
|
|
34240
|
-
pathVariables = Object.fromEntries(new URLSearchParams(pathVariablesRaw).entries());
|
|
34241
|
-
}
|
|
34242
|
-
}
|
|
34243
|
-
else {
|
|
34244
|
-
const href = element.getAttribute('href');
|
|
34245
|
-
if (!href)
|
|
34246
|
-
return false;
|
|
34247
|
-
const link = parseFramerPageLink(href);
|
|
34248
|
-
if (!link || !link.target)
|
|
34249
|
-
return false;
|
|
34250
|
-
routeId = link.target;
|
|
34251
|
-
elementId = link.element ?? void 0;
|
|
34252
|
-
pathVariables = (_a = link.collectionItem) == null ? void 0 : _a.pathVariables;
|
|
34253
|
-
}
|
|
34254
|
-
const smoothScroll = elementId ? element.dataset.framerSmoothScroll !== void 0 : void 0;
|
|
34255
|
-
navigate(routeId, elementId, Object.assign({}, implicitPathVariables, pathVariables), smoothScroll);
|
|
34256
|
-
return true;
|
|
34257
|
-
}
|
|
34258
|
-
function linkFromFramerPageLink(link) {
|
|
34259
|
-
if (!isFramerPageLink(link))
|
|
34260
|
-
return link;
|
|
34261
|
-
const parsed = parseFramerPageLink(link);
|
|
34262
|
-
if (!parsed)
|
|
34263
|
-
return void 0;
|
|
34264
|
-
const { target, element, collectionItem, } = parsed;
|
|
34265
|
-
if (!target)
|
|
34266
|
-
return void 0;
|
|
34267
|
-
return {
|
|
34268
|
-
webPageId: target,
|
|
34269
|
-
hash: element ?? void 0,
|
|
34270
|
-
pathVariables: createVariablesFromPageLinkCollectionItem(collectionItem),
|
|
34271
|
-
};
|
|
34272
|
-
}
|
|
34273
|
-
function createVariablesFromPageLinkCollectionItem(collectionItem) {
|
|
34274
|
-
if (!collectionItem)
|
|
34275
|
-
return void 0;
|
|
34276
|
-
const variables = {};
|
|
34277
|
-
for (const pathVariablesKey2 in collectionItem.pathVariables) {
|
|
34278
|
-
const value = collectionItem.pathVariables[pathVariablesKey2];
|
|
34279
|
-
if (value)
|
|
34280
|
-
variables[pathVariablesKey2] = value;
|
|
34281
|
-
}
|
|
34282
|
-
return variables;
|
|
34283
|
-
}
|
|
34284
34609
|
var pathVariablesRegExp2 = /:([a-z]\w*)/gi;
|
|
34285
34610
|
var PathVariablesContext = /* @__PURE__ */ (0, react_1.createContext)(void 0);
|
|
34286
34611
|
exports.PathVariablesContext = PathVariablesContext;
|
|
@@ -34355,186 +34680,6 @@ function combineRels(rel, otherRel) {
|
|
|
34355
34680
|
return `${rel} ${otherRel}`;
|
|
34356
34681
|
return void 0;
|
|
34357
34682
|
}
|
|
34358
|
-
function linkInfoKey(link) {
|
|
34359
|
-
var _a, _b;
|
|
34360
|
-
return `${link.scopeId}:${link.nodeId}:${(_a = link.furthestExternalComponent) == null ? void 0 : _a.scopeId}:${(_b = link.furthestExternalComponent) == null ? void 0 : _b.nodeId}`;
|
|
34361
|
-
}
|
|
34362
|
-
var NestedLinksCollector = class {
|
|
34363
|
-
constructor() {
|
|
34364
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'collectedLinks', /* @__PURE__ */ new Map());
|
|
34365
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'nestingInfo', /* @__PURE__ */ new Map());
|
|
34366
|
-
}
|
|
34367
|
-
clear() {
|
|
34368
|
-
this.collectedLinks.clear();
|
|
34369
|
-
this.nestingInfo.clear();
|
|
34370
|
-
}
|
|
34371
|
-
/**
|
|
34372
|
-
* Returns a Map of outer links to their inner links.
|
|
34373
|
-
*
|
|
34374
|
-
* NOTE: This function is called in the SSG renderer sandbox (<root>/src/ssg/src/ssg-sandbox-renderer/sandbox/worker/renderer.ts)
|
|
34375
|
-
*/
|
|
34376
|
-
getLinks() {
|
|
34377
|
-
const result = /* @__PURE__ */ new Map();
|
|
34378
|
-
for (const [outerLinkKey, innerLinkKeys,] of this.nestingInfo) {
|
|
34379
|
-
const outerLinkInfo = this.collectedLinks.get(outerLinkKey);
|
|
34380
|
-
assert(outerLinkInfo, `Outer link not found: ${outerLinkKey}`);
|
|
34381
|
-
const links = Array.from(innerLinkKeys).map((innerLinkKey) => {
|
|
34382
|
-
const innerLinkInfo = this.collectedLinks.get(innerLinkKey);
|
|
34383
|
-
assert(innerLinkInfo, `Inner link not found: ${innerLinkKey}`);
|
|
34384
|
-
return innerLinkInfo;
|
|
34385
|
-
});
|
|
34386
|
-
result.set(outerLinkInfo, links);
|
|
34387
|
-
}
|
|
34388
|
-
return result;
|
|
34389
|
-
}
|
|
34390
|
-
collectNestedLink(outerLink, innerLink) {
|
|
34391
|
-
if (isWindow && !isTest() || !outerLink.nodeId || !innerLink.nodeId) {
|
|
34392
|
-
return;
|
|
34393
|
-
}
|
|
34394
|
-
this.collectedLinks.set(linkInfoKey(outerLink), outerLink);
|
|
34395
|
-
this.collectedLinks.set(linkInfoKey(innerLink), innerLink);
|
|
34396
|
-
const outerLinkNestingInfo = this.nestingInfo.get(linkInfoKey(outerLink)) ?? /* @__PURE__ */ new Set();
|
|
34397
|
-
outerLinkNestingInfo.add(linkInfoKey(innerLink));
|
|
34398
|
-
this.nestingInfo.set(linkInfoKey(outerLink), outerLinkNestingInfo);
|
|
34399
|
-
}
|
|
34400
|
-
};
|
|
34401
|
-
var nestedLinksCollector = /* @__PURE__ */ new NestedLinksCollector();
|
|
34402
|
-
exports.nestedLinksCollector = nestedLinksCollector;
|
|
34403
|
-
function useIsOnFramerCanvas() {
|
|
34404
|
-
return RenderTarget.current() === RenderTarget.canvas;
|
|
34405
|
-
}
|
|
34406
|
-
var OuterLinkContext = /* @__PURE__ */ (0, react_1.createContext)(void 0);
|
|
34407
|
-
function useReplaceNestedLinks(children, scopeId, nodeId, href, propsAddedByLink, observerRef) {
|
|
34408
|
-
const outerLink = (0, react_3.useContext)(OuterLinkContext);
|
|
34409
|
-
const furthestExternalComponent = useFurthestExternalComponent();
|
|
34410
|
-
const innerLink = (0, react_4.useMemo)(() => ({
|
|
34411
|
-
scopeId,
|
|
34412
|
-
nodeId,
|
|
34413
|
-
furthestExternalComponent,
|
|
34414
|
-
}), [scopeId, nodeId, furthestExternalComponent,]);
|
|
34415
|
-
const router = useRouter();
|
|
34416
|
-
const currentRoute = useCurrentRoute();
|
|
34417
|
-
const route = (0, react_4.useMemo)(() => {
|
|
34418
|
-
const pageLink = isLinkToWebPage(href) ? href : linkFromFramerPageLink(href);
|
|
34419
|
-
if (!pageLink)
|
|
34420
|
-
return;
|
|
34421
|
-
return getRouteFromPageLink(pageLink, router, currentRoute);
|
|
34422
|
-
}, [currentRoute, href, router,]);
|
|
34423
|
-
const { replaceNestedLinks, } = useLibraryFeatures();
|
|
34424
|
-
const isOnFramerCanvas = useIsOnFramerCanvas();
|
|
34425
|
-
const shouldReplaceLink = Boolean(replaceNestedLinks && !isOnFramerCanvas && (outerLink == null ? void 0 : outerLink.nodeId) && innerLink.nodeId);
|
|
34426
|
-
const onClick = (0, react_3.useCallback)((event) => {
|
|
34427
|
-
var _a;
|
|
34428
|
-
if (!propsAddedByLink.href)
|
|
34429
|
-
return;
|
|
34430
|
-
event.preventDefault();
|
|
34431
|
-
event.stopPropagation();
|
|
34432
|
-
const isAppleDevice = /Mac|iPod|iPhone|iPad/u.test(__unframerNavigator2.userAgent);
|
|
34433
|
-
if (isAppleDevice ? event.metaKey : event.ctrlKey) {
|
|
34434
|
-
openExternalLink(propsAddedByLink.href, '', '_blank');
|
|
34435
|
-
return;
|
|
34436
|
-
}
|
|
34437
|
-
if (route) {
|
|
34438
|
-
(_a = propsAddedByLink.navigate) == null ? void 0 : _a.call(propsAddedByLink);
|
|
34439
|
-
}
|
|
34440
|
-
else {
|
|
34441
|
-
openExternalLink(propsAddedByLink.href, propsAddedByLink.rel, propsAddedByLink.target);
|
|
34442
|
-
}
|
|
34443
|
-
}, [propsAddedByLink, route,]);
|
|
34444
|
-
const onAuxClick = (0, react_3.useCallback)((event) => {
|
|
34445
|
-
if (!propsAddedByLink.href)
|
|
34446
|
-
return;
|
|
34447
|
-
event.preventDefault();
|
|
34448
|
-
event.stopPropagation();
|
|
34449
|
-
openExternalLink(propsAddedByLink.href, '', '_blank');
|
|
34450
|
-
}, [propsAddedByLink,]);
|
|
34451
|
-
const onKeyDown = (0, react_3.useCallback)((event) => {
|
|
34452
|
-
var _a;
|
|
34453
|
-
if (!propsAddedByLink.href)
|
|
34454
|
-
return;
|
|
34455
|
-
if (event.key !== 'Enter')
|
|
34456
|
-
return;
|
|
34457
|
-
event.preventDefault();
|
|
34458
|
-
event.stopPropagation();
|
|
34459
|
-
if (route) {
|
|
34460
|
-
(_a = propsAddedByLink.navigate) == null ? void 0 : _a.call(propsAddedByLink);
|
|
34461
|
-
}
|
|
34462
|
-
else {
|
|
34463
|
-
openExternalLink(propsAddedByLink.href, propsAddedByLink.rel, propsAddedByLink.target);
|
|
34464
|
-
}
|
|
34465
|
-
}, [propsAddedByLink, route,]);
|
|
34466
|
-
useRefEffect(observerRef, (node) => {
|
|
34467
|
-
if (node === null)
|
|
34468
|
-
return;
|
|
34469
|
-
if (!shouldReplaceLink)
|
|
34470
|
-
return;
|
|
34471
|
-
node.dataset.hydrated = 'true';
|
|
34472
|
-
}, [shouldReplaceLink,]);
|
|
34473
|
-
let replacedChildren = children;
|
|
34474
|
-
if (shouldReplaceLink) {
|
|
34475
|
-
react_6.Children.forEach(children, (child) => {
|
|
34476
|
-
if (!isChildReplaceable(child))
|
|
34477
|
-
return;
|
|
34478
|
-
assert(linkInfoIsCollectable(outerLink), 'outerLink must have nodeId defined at this point; this was verified with `shouldReplaceLink` above');
|
|
34479
|
-
assert(linkInfoIsCollectable(innerLink), 'innerLink must have nodeId defined at this point; this was verified with `shouldReplaceLink` above');
|
|
34480
|
-
nestedLinksCollector.collectNestedLink(outerLink, innerLink);
|
|
34481
|
-
});
|
|
34482
|
-
replacedChildren = react_6.Children.map(children, (child) => {
|
|
34483
|
-
if (!isChildReplaceable(child))
|
|
34484
|
-
return child;
|
|
34485
|
-
const tag = maybeReplaceAnchorWithSpan(child.type);
|
|
34486
|
-
const { children: childChildren, ...childProps } = child.props;
|
|
34487
|
-
const props = {
|
|
34488
|
-
...childProps,
|
|
34489
|
-
// This attribute is used in `ssg/src/ssg-sandbox-renderer/worker/nestedLinks.ts` to handle the nested links clicks
|
|
34490
|
-
'data-nested-link': true,
|
|
34491
|
-
role: 'link',
|
|
34492
|
-
tabIndex: 0,
|
|
34493
|
-
onClick,
|
|
34494
|
-
onAuxClick,
|
|
34495
|
-
onKeyDown,
|
|
34496
|
-
as: childProps.as && maybeReplaceAnchorWithSpan(childProps.as),
|
|
34497
|
-
};
|
|
34498
|
-
const ref = 'ref' in child ? child.ref : void 0;
|
|
34499
|
-
return (0, react_8.createElement)(tag, // We need to pass the ref here again, otherwise it will be lost
|
|
34500
|
-
{
|
|
34501
|
-
...props,
|
|
34502
|
-
ref,
|
|
34503
|
-
}, childChildren);
|
|
34504
|
-
});
|
|
34505
|
-
}
|
|
34506
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(OuterLinkContext.Provider, {
|
|
34507
|
-
value: innerLink,
|
|
34508
|
-
children: replacedChildren,
|
|
34509
|
-
});
|
|
34510
|
-
}
|
|
34511
|
-
function linkInfoIsCollectable(linkInfo) {
|
|
34512
|
-
return !isUndefined(linkInfo == null ? void 0 : linkInfo.nodeId);
|
|
34513
|
-
}
|
|
34514
|
-
function isChildReplaceable(child) {
|
|
34515
|
-
return (0, react_6.isValidElement)(child) &&
|
|
34516
|
-
(maybeReplaceAnchorWithSpan(child.type) !== child.type || maybeReplaceAnchorWithSpan(child.props.as) !== child.props.as);
|
|
34517
|
-
}
|
|
34518
|
-
function openExternalLink(href, rel, target) {
|
|
34519
|
-
const link = document.createElement('a');
|
|
34520
|
-
link.href = href;
|
|
34521
|
-
if (rel) {
|
|
34522
|
-
link.rel = rel;
|
|
34523
|
-
}
|
|
34524
|
-
if (target) {
|
|
34525
|
-
link.target = target;
|
|
34526
|
-
}
|
|
34527
|
-
document.body.appendChild(link);
|
|
34528
|
-
link.click();
|
|
34529
|
-
link.remove();
|
|
34530
|
-
}
|
|
34531
|
-
function maybeReplaceAnchorWithSpan(component) {
|
|
34532
|
-
if (component === 'a')
|
|
34533
|
-
return 'span';
|
|
34534
|
-
if (isMotionComponent(component) && unwrapMotionComponent(component) === 'a')
|
|
34535
|
-
return motion.span;
|
|
34536
|
-
return component;
|
|
34537
|
-
}
|
|
34538
34683
|
function useTrackLinkClick({ nodeId, clickTrackingId, router, href, activeLocale, }) {
|
|
34539
34684
|
return (0, react_3.useCallback)(async (hrefAttribute) => {
|
|
34540
34685
|
var _a, _b, _c, _d, _e;
|
|
@@ -34821,24 +34966,6 @@ function resolvePageScope(pageLink, router) {
|
|
|
34821
34966
|
siteCanonicalURL: void 0,
|
|
34822
34967
|
});
|
|
34823
34968
|
}
|
|
34824
|
-
var IgnoreErrors = class extends react_9.Component {
|
|
34825
|
-
constructor() {
|
|
34826
|
-
super(...arguments);
|
|
34827
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'state', {
|
|
34828
|
-
error: void 0,
|
|
34829
|
-
});
|
|
34830
|
-
}
|
|
34831
|
-
static getDerivedStateFromError(error) {
|
|
34832
|
-
return {
|
|
34833
|
-
error,
|
|
34834
|
-
};
|
|
34835
|
-
}
|
|
34836
|
-
render() {
|
|
34837
|
-
if (this.state.error)
|
|
34838
|
-
return null;
|
|
34839
|
-
return this.props.children;
|
|
34840
|
-
}
|
|
34841
|
-
};
|
|
34842
34969
|
var salt = 'framer';
|
|
34843
34970
|
var difficulty = 3;
|
|
34844
34971
|
var tokenLength = 30;
|
|
@@ -35011,18 +35138,18 @@ function openExternalLinkInCurrentTab(link, formRef) {
|
|
|
35011
35138
|
linkElement.click();
|
|
35012
35139
|
linkElement.remove();
|
|
35013
35140
|
}
|
|
35014
|
-
var FormContext =
|
|
35141
|
+
var FormContext = react_10.default.createContext(void 0);
|
|
35015
35142
|
exports.FormContext = FormContext;
|
|
35016
|
-
var FormContainer = /* @__PURE__ */
|
|
35017
|
-
const fallbackRef =
|
|
35143
|
+
var FormContainer = /* @__PURE__ */ react_10.default.forwardRef(function FormContainer2({ action, children, redirectUrl, onSuccess, onError, onLoading, submitTrackingId, nodeId, ...props }, forwardedRef) {
|
|
35144
|
+
const fallbackRef = react_10.default.useRef(null);
|
|
35018
35145
|
const ref = forwardedRef ?? fallbackRef;
|
|
35019
35146
|
const router = useRouter();
|
|
35020
35147
|
const currentRoute = useCurrentRoute();
|
|
35021
35148
|
const implicitPathVariables = useImplicitPathVariables();
|
|
35022
|
-
const [state, dispatch,] =
|
|
35149
|
+
const [state, dispatch,] = react_10.default.useReducer(formReducer, incompleteState);
|
|
35023
35150
|
const { activeLocale, } = useLocaleInfo();
|
|
35024
35151
|
const projectHash = (0, react_3.useContext)(FormContext);
|
|
35025
|
-
const callbacks =
|
|
35152
|
+
const callbacks = react_10.default.useRef({
|
|
35026
35153
|
onSuccess,
|
|
35027
35154
|
onError,
|
|
35028
35155
|
onLoading,
|
|
@@ -35032,6 +35159,7 @@ var FormContainer = /* @__PURE__ */ react_11.default.forwardRef(function FormCon
|
|
|
35032
35159
|
onError,
|
|
35033
35160
|
onLoading,
|
|
35034
35161
|
};
|
|
35162
|
+
const submissionInProgressRef = react_10.default.useRef(false);
|
|
35035
35163
|
async function redirectTo(link) {
|
|
35036
35164
|
var _a, _b;
|
|
35037
35165
|
if (isString(link)) {
|
|
@@ -35052,16 +35180,17 @@ var FormContainer = /* @__PURE__ */ react_11.default.forwardRef(function FormCon
|
|
|
35052
35180
|
const handleSubmit = async (event) => {
|
|
35053
35181
|
var _a, _b, _c, _d, _e, _f;
|
|
35054
35182
|
event.preventDefault();
|
|
35055
|
-
if (!action || !projectHash)
|
|
35183
|
+
if (!action || !projectHash || submissionInProgressRef.current)
|
|
35056
35184
|
return;
|
|
35057
|
-
|
|
35058
|
-
type: 'submit',
|
|
35059
|
-
});
|
|
35185
|
+
submissionInProgressRef.current = true;
|
|
35060
35186
|
const data2 = new FormData(event.currentTarget);
|
|
35061
35187
|
await yieldToMain({
|
|
35062
|
-
priority: 'user-
|
|
35188
|
+
priority: 'user-visible',
|
|
35063
35189
|
continueAfter: 'paint',
|
|
35064
35190
|
});
|
|
35191
|
+
(0, react_11.startTransition)(() => dispatch({
|
|
35192
|
+
type: 'submit',
|
|
35193
|
+
}));
|
|
35065
35194
|
addUTMTagsToFormData(data2, safeWindow.document);
|
|
35066
35195
|
for (const [key7, value,] of data2) {
|
|
35067
35196
|
if (value instanceof File)
|
|
@@ -35076,7 +35205,7 @@ var FormContainer = /* @__PURE__ */ react_11.default.forwardRef(function FormCon
|
|
|
35076
35205
|
activeLocale,
|
|
35077
35206
|
});
|
|
35078
35207
|
await submitForm(action, data2, projectHash);
|
|
35079
|
-
(0,
|
|
35208
|
+
(0, react_11.startTransition)(() => dispatch({
|
|
35080
35209
|
type: 'success',
|
|
35081
35210
|
}));
|
|
35082
35211
|
(_d = (_c = callbacks.current).onSuccess) == null ? void 0 : _d.call(_c);
|
|
@@ -35085,12 +35214,13 @@ var FormContainer = /* @__PURE__ */ react_11.default.forwardRef(function FormCon
|
|
|
35085
35214
|
}
|
|
35086
35215
|
}
|
|
35087
35216
|
catch (error) {
|
|
35088
|
-
(0,
|
|
35217
|
+
(0, react_11.startTransition)(() => dispatch({
|
|
35089
35218
|
type: 'error',
|
|
35090
35219
|
}));
|
|
35091
35220
|
(_f = (_e = callbacks.current).onError) == null ? void 0 : _f.call(_e);
|
|
35092
35221
|
console.error(error);
|
|
35093
35222
|
}
|
|
35223
|
+
submissionInProgressRef.current = false;
|
|
35094
35224
|
};
|
|
35095
35225
|
const handleKeyDown = (event) => {
|
|
35096
35226
|
const { target: input, currentTarget: form, key: key7, } = event;
|
|
@@ -35108,7 +35238,7 @@ var FormContainer = /* @__PURE__ */ react_11.default.forwardRef(function FormCon
|
|
|
35108
35238
|
priority: 'background',
|
|
35109
35239
|
continueAfter: 'paint',
|
|
35110
35240
|
});
|
|
35111
|
-
(0,
|
|
35241
|
+
(0, react_11.startTransition)(() => dispatch({
|
|
35112
35242
|
type: anyEmptyRequiredFields(target) ? 'incomplete' : 'complete',
|
|
35113
35243
|
}));
|
|
35114
35244
|
};
|
|
@@ -35168,6 +35298,61 @@ function responseHasError(response) {
|
|
|
35168
35298
|
return typeof response === 'object' && response !== null && 'error' in response && isObject2(response.error) &&
|
|
35169
35299
|
'message' in response.error && typeof response.error.message === 'string';
|
|
35170
35300
|
}
|
|
35301
|
+
var FORCE_SHOW_EDITORBAR_LOCALSTORAGE_KEY = '__framer_force_showing_editorbar_since';
|
|
35302
|
+
var IgnoreErrors = class extends react_9.Component {
|
|
35303
|
+
constructor() {
|
|
35304
|
+
super(...arguments);
|
|
35305
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'state', {
|
|
35306
|
+
error: void 0,
|
|
35307
|
+
});
|
|
35308
|
+
}
|
|
35309
|
+
static getDerivedStateFromError(error) {
|
|
35310
|
+
return {
|
|
35311
|
+
error,
|
|
35312
|
+
};
|
|
35313
|
+
}
|
|
35314
|
+
render() {
|
|
35315
|
+
if (this.state.error)
|
|
35316
|
+
return null;
|
|
35317
|
+
return this.props.children;
|
|
35318
|
+
}
|
|
35319
|
+
};
|
|
35320
|
+
var isPrioritized = () => {
|
|
35321
|
+
try {
|
|
35322
|
+
return !!localStorage[FORCE_SHOW_EDITORBAR_LOCALSTORAGE_KEY];
|
|
35323
|
+
}
|
|
35324
|
+
catch (e) {
|
|
35325
|
+
return false;
|
|
35326
|
+
}
|
|
35327
|
+
};
|
|
35328
|
+
var isntPrioritized = () => !isPrioritized();
|
|
35329
|
+
var getServerSnapshot = () => false;
|
|
35330
|
+
var noOpSubscribe = () => () => { };
|
|
35331
|
+
function EditorBarLauncher({ EditorBar, fast = false, }) {
|
|
35332
|
+
const libraryFeatures = useLibraryFeatures();
|
|
35333
|
+
const framerSiteId = (0, react_3.useContext)(FormContext);
|
|
35334
|
+
const enabled = (0, react_14.useSyncExternalStore)(noOpSubscribe, fast ? isPrioritized : isntPrioritized, getServerSnapshot);
|
|
35335
|
+
const editorBarFeatures = (0, react_4.useMemo)(() => {
|
|
35336
|
+
const features = {};
|
|
35337
|
+
let key7;
|
|
35338
|
+
for (key7 in libraryFeatures) {
|
|
35339
|
+
if (libraryFeatures.hasOwnProperty(key7) && key7.startsWith('editorBar')) {
|
|
35340
|
+
features[key7] = libraryFeatures[key7];
|
|
35341
|
+
}
|
|
35342
|
+
}
|
|
35343
|
+
return features;
|
|
35344
|
+
}, [libraryFeatures,]);
|
|
35345
|
+
if (!EditorBar || !framerSiteId || !enabled)
|
|
35346
|
+
return null;
|
|
35347
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(IgnoreErrors, {
|
|
35348
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(react_12.Suspense, {
|
|
35349
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(EditorBar, {
|
|
35350
|
+
framerSiteId,
|
|
35351
|
+
features: editorBarFeatures,
|
|
35352
|
+
}),
|
|
35353
|
+
}),
|
|
35354
|
+
});
|
|
35355
|
+
}
|
|
35171
35356
|
function isSamePage(a, b) {
|
|
35172
35357
|
if (a.routeId !== b.routeId)
|
|
35173
35358
|
return false;
|
|
@@ -35264,8 +35449,8 @@ var useSendPageView = (currentRoute, currentRouteId, currentPathnameWithHash, cu
|
|
|
35264
35449
|
};
|
|
35265
35450
|
var defaultLocaleId = 'default';
|
|
35266
35451
|
function useForceUpdate3() {
|
|
35267
|
-
const [_, setForcedRenderCount,] =
|
|
35268
|
-
return [_,
|
|
35452
|
+
const [_, setForcedRenderCount,] = react_10.default.useState(0);
|
|
35453
|
+
return [_, react_10.default.useCallback(() => setForcedRenderCount((v) => v + 1), []),];
|
|
35269
35454
|
}
|
|
35270
35455
|
function updateScrollPosition(hash2, smoothScroll, isHistoryTransition) {
|
|
35271
35456
|
const element = hash2 && document.getElementById(hash2);
|
|
@@ -35341,7 +35526,7 @@ function useNavigationTransition() {
|
|
|
35341
35526
|
announceNavigation();
|
|
35342
35527
|
}, [startNativeSpinner,]);
|
|
35343
35528
|
}
|
|
35344
|
-
function Router({ defaultPageStyle, disableHistory, initialPathVariables, initialRoute, notFoundPage, collectionUtils, routes, initialLocaleId, locales = EMPTY_ARRAY, preserveQueryParams = false, LayoutTemplate,
|
|
35529
|
+
function Router({ defaultPageStyle, disableHistory, initialPathVariables, initialRoute, notFoundPage, collectionUtils, routes, initialLocaleId, locales = EMPTY_ARRAY, preserveQueryParams = false, LayoutTemplate, EditorBar, siteCanonicalURL, }) {
|
|
35345
35530
|
useMarkRouterEffects();
|
|
35346
35531
|
useReplaceInitialState({
|
|
35347
35532
|
disabled: disableHistory,
|
|
@@ -35357,7 +35542,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
35357
35542
|
const { synchronousNavigationOnDesktop, } = useLibraryFeatures();
|
|
35358
35543
|
const transitionFn = (0, react_4.useMemo)(() => {
|
|
35359
35544
|
if (!synchronousNavigationOnDesktop || !isDesktop()) {
|
|
35360
|
-
return
|
|
35545
|
+
return react_11.startTransition;
|
|
35361
35546
|
}
|
|
35362
35547
|
return (fn) => fn();
|
|
35363
35548
|
}, [synchronousNavigationOnDesktop,]);
|
|
@@ -35599,38 +35784,46 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
35599
35784
|
}));
|
|
35600
35785
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(RouterAPIProvider, {
|
|
35601
35786
|
api,
|
|
35602
|
-
children: /* @__PURE__ */ (0,
|
|
35787
|
+
children: /* @__PURE__ */ (0, jsx_runtime_2.jsxs)(LocaleInfoContext.Provider, {
|
|
35603
35788
|
value: localeInfo,
|
|
35604
|
-
children:
|
|
35605
|
-
|
|
35606
|
-
|
|
35607
|
-
|
|
35608
|
-
notFoundPage,
|
|
35609
|
-
defaultPageStyle,
|
|
35610
|
-
forceUpdateKey: dep,
|
|
35611
|
-
children: [
|
|
35612
|
-
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(MarkSuspenseEffects.Start, {}),
|
|
35613
|
-
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(WithLayoutTemplate, {
|
|
35614
|
-
LayoutTemplate,
|
|
35615
|
-
routeId: (currentRoute == null ? void 0 : currentRoute.abTestingVariantId) ?? currentRouteId,
|
|
35616
|
-
style: defaultPageStyle,
|
|
35617
|
-
children: (inLayoutTemplate) => {
|
|
35618
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {
|
|
35619
|
-
children: pageExistsInCurrentLocale
|
|
35620
|
-
? renderPage(currentRoute.page, inLayoutTemplate ? templatePageStyle : defaultPageStyle)
|
|
35621
|
-
: // LAYOUT_TEMPLATE @TODO: display: content for not found page?
|
|
35622
|
-
notFoundPage && renderPage(notFoundPage, defaultPageStyle),
|
|
35623
|
-
}, remountKey);
|
|
35624
|
-
},
|
|
35625
|
-
}),
|
|
35626
|
-
],
|
|
35627
|
-
}),
|
|
35628
|
-
editorBar,
|
|
35629
|
-
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(TurnOnReactEventHandling, {}),
|
|
35630
|
-
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(MarkSuspenseEffects.End, {}),
|
|
35631
|
-
],
|
|
35789
|
+
children: [
|
|
35790
|
+
EditorBar && /* @__PURE__ */ (0, jsx_runtime_1.jsx)(EditorBarLauncher, {
|
|
35791
|
+
EditorBar,
|
|
35792
|
+
fast: true,
|
|
35632
35793
|
}),
|
|
35633
|
-
|
|
35794
|
+
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(SynchronousSuspenseErrorBoundary, {
|
|
35795
|
+
children: /* @__PURE__ */ (0, jsx_runtime_2.jsxs)(SuspenseThatPreservesDom, {
|
|
35796
|
+
children: [
|
|
35797
|
+
/* @__PURE__ */ (0, jsx_runtime_2.jsxs)(NotFoundErrorBoundary, {
|
|
35798
|
+
notFoundPage,
|
|
35799
|
+
defaultPageStyle,
|
|
35800
|
+
forceUpdateKey: dep,
|
|
35801
|
+
children: [
|
|
35802
|
+
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(MarkSuspenseEffects.Start, {}),
|
|
35803
|
+
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(WithLayoutTemplate, {
|
|
35804
|
+
LayoutTemplate,
|
|
35805
|
+
routeId: (currentRoute == null ? void 0 : currentRoute.abTestingVariantId) ?? currentRouteId,
|
|
35806
|
+
style: defaultPageStyle,
|
|
35807
|
+
children: (inLayoutTemplate) => {
|
|
35808
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {
|
|
35809
|
+
children: pageExistsInCurrentLocale
|
|
35810
|
+
? renderPage(currentRoute.page, inLayoutTemplate ? templatePageStyle : defaultPageStyle)
|
|
35811
|
+
: // LAYOUT_TEMPLATE @TODO: display: content for not found page?
|
|
35812
|
+
notFoundPage && renderPage(notFoundPage, defaultPageStyle),
|
|
35813
|
+
}, remountKey);
|
|
35814
|
+
},
|
|
35815
|
+
}),
|
|
35816
|
+
],
|
|
35817
|
+
}),
|
|
35818
|
+
EditorBar && /* @__PURE__ */ (0, jsx_runtime_1.jsx)(EditorBarLauncher, {
|
|
35819
|
+
EditorBar,
|
|
35820
|
+
}),
|
|
35821
|
+
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(TurnOnReactEventHandling, {}),
|
|
35822
|
+
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(MarkSuspenseEffects.End, {}),
|
|
35823
|
+
],
|
|
35824
|
+
}),
|
|
35825
|
+
}),
|
|
35826
|
+
],
|
|
35634
35827
|
}),
|
|
35635
35828
|
});
|
|
35636
35829
|
}
|
|
@@ -35729,20 +35922,12 @@ function resolveFetchDataValue(result, request) {
|
|
|
35729
35922
|
}
|
|
35730
35923
|
return resolvedValue;
|
|
35731
35924
|
}
|
|
35925
|
+
var minimumCacheDurationMs = 5e3;
|
|
35732
35926
|
function isCacheExpired(insertionTimestamp, cacheDuration) {
|
|
35733
35927
|
if (RenderTarget.current() === RenderTarget.canvas) {
|
|
35734
35928
|
return false;
|
|
35735
35929
|
}
|
|
35736
|
-
const cacheDurationMs = cacheDuration
|
|
35737
|
-
? // When the cache is set to 0 seconds we set use a 500ms cache delay
|
|
35738
|
-
// to avoid triggering refetching when a variant switches from
|
|
35739
|
-
// preloading to rendering the component (and
|
|
35740
|
-
// resubscribing to the fetch client). When another component
|
|
35741
|
-
// relying on the same endpoint (eg another page) is mounted again
|
|
35742
|
-
// and the cache time is set to 0, the the data will be fetched
|
|
35743
|
-
// again.
|
|
35744
|
-
500
|
|
35745
|
-
: cacheDuration * 1e3;
|
|
35930
|
+
const cacheDurationMs = Math.max(cacheDuration * 1e3, minimumCacheDurationMs);
|
|
35746
35931
|
const currentTimestamp = Date.now();
|
|
35747
35932
|
const expirationTimestamp = insertionTimestamp + cacheDurationMs;
|
|
35748
35933
|
return currentTimestamp >= expirationTimestamp;
|
|
@@ -36158,7 +36343,7 @@ function usePrefetch() {
|
|
|
36158
36343
|
}
|
|
36159
36344
|
MotionGlobalConfig.WillChange = WillChangeMotionValue;
|
|
36160
36345
|
function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariables, routes, collectionUtils, notFoundPage, isReducedMotion = false, includeDataObserver = false, localeId, locales, preserveQueryParams, EditorBar, defaultPageStyle, disableHistory, LayoutTemplate, siteCanonicalURL, }) {
|
|
36161
|
-
|
|
36346
|
+
react_10.default.useEffect(() => {
|
|
36162
36347
|
if (isWebsite)
|
|
36163
36348
|
return;
|
|
36164
36349
|
MainLoop.start();
|
|
@@ -36183,9 +36368,7 @@ function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariabl
|
|
|
36183
36368
|
width: 'auto',
|
|
36184
36369
|
},
|
|
36185
36370
|
preserveQueryParams,
|
|
36186
|
-
|
|
36187
|
-
EditorBar,
|
|
36188
|
-
}),
|
|
36371
|
+
EditorBar,
|
|
36189
36372
|
disableHistory,
|
|
36190
36373
|
LayoutTemplate,
|
|
36191
36374
|
siteCanonicalURL,
|
|
@@ -36196,12 +36379,12 @@ function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariabl
|
|
|
36196
36379
|
});
|
|
36197
36380
|
}
|
|
36198
36381
|
else {
|
|
36199
|
-
const Wrapper = includeDataObserver ? DataObserver :
|
|
36382
|
+
const Wrapper = includeDataObserver ? DataObserver : react_10.default.Fragment;
|
|
36200
36383
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Wrapper, {
|
|
36201
36384
|
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(RoutesProvider, {
|
|
36202
36385
|
routes,
|
|
36203
36386
|
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NavigationWrapper, {
|
|
36204
|
-
children:
|
|
36387
|
+
children: react_10.default.isValidElement(RootComponent) ? RootComponent : react_10.default.createElement(
|
|
36205
36388
|
// @ts-expect-error to figure out how to type this properly, as tests are using different
|
|
36206
36389
|
// $$typeof symbol and isValidElement fails
|
|
36207
36390
|
RootComponent, {
|
|
@@ -36212,36 +36395,6 @@ function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariabl
|
|
|
36212
36395
|
});
|
|
36213
36396
|
}
|
|
36214
36397
|
}
|
|
36215
|
-
function EditorBarLauncher({ EditorBar, }) {
|
|
36216
|
-
const libraryFeatures = useLibraryFeatures();
|
|
36217
|
-
const [mounted, setMounted,] = (0, react_4.useState)(false);
|
|
36218
|
-
const framerSiteId = (0, react_3.useContext)(FormContext);
|
|
36219
|
-
const editorBarFeatures = (0, react_4.useMemo)(() => {
|
|
36220
|
-
const features = {};
|
|
36221
|
-
let key7;
|
|
36222
|
-
for (key7 in libraryFeatures) {
|
|
36223
|
-
if (libraryFeatures.hasOwnProperty(key7) && key7.startsWith('editorBar')) {
|
|
36224
|
-
features[key7] = libraryFeatures[key7];
|
|
36225
|
-
}
|
|
36226
|
-
}
|
|
36227
|
-
return features;
|
|
36228
|
-
}, [libraryFeatures,]);
|
|
36229
|
-
(0, react_2.useEffect)(() => {
|
|
36230
|
-
(0, react_12.startTransition)(() => {
|
|
36231
|
-
setMounted(true);
|
|
36232
|
-
});
|
|
36233
|
-
}, []);
|
|
36234
|
-
if (!EditorBar || !framerSiteId || !mounted)
|
|
36235
|
-
return null;
|
|
36236
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(IgnoreErrors, {
|
|
36237
|
-
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(react_13.Suspense, {
|
|
36238
|
-
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(EditorBar, {
|
|
36239
|
-
framerSiteId,
|
|
36240
|
-
features: editorBarFeatures,
|
|
36241
|
-
}),
|
|
36242
|
-
}),
|
|
36243
|
-
});
|
|
36244
|
-
}
|
|
36245
36398
|
var ResolveLinks = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ (0, react_7.forwardRef)(function ResolveLinksInner({ links, children, ...rest }, ref) {
|
|
36246
36399
|
const router = useRouter();
|
|
36247
36400
|
const { activeLocale, } = useLocaleInfo();
|
|
@@ -40857,7 +41010,7 @@ function useActiveTargetCallback() {
|
|
|
40857
41010
|
}).current;
|
|
40858
41011
|
}
|
|
40859
41012
|
function useAddVariantProps(baseVariant, gestureVariant, variantProps2) {
|
|
40860
|
-
return
|
|
41013
|
+
return react_10.default.useCallback((id3) => {
|
|
40861
41014
|
var _a, _b, _c;
|
|
40862
41015
|
if (!variantProps2)
|
|
40863
41016
|
return {};
|
|
@@ -40919,7 +41072,7 @@ function useHydratedBreakpointVariants(initial, mediaQueries, hydratedWithInitia
|
|
|
40919
41072
|
if (variant !== baseVariant.current || variant !== basePropsVariant.current) {
|
|
40920
41073
|
let updateStateAndRerender2 = function () {
|
|
40921
41074
|
baseVariant.current = basePropsVariant.current = variant;
|
|
40922
|
-
(0,
|
|
41075
|
+
(0, react_11.startTransition)(() => {
|
|
40923
41076
|
forceUpdate();
|
|
40924
41077
|
});
|
|
40925
41078
|
};
|
|
@@ -41045,7 +41198,7 @@ function useDataRecord(collection, variables) {
|
|
|
41045
41198
|
}
|
|
41046
41199
|
function useDynamicRefs() {
|
|
41047
41200
|
const map2 = useConstant2(() => /* @__PURE__ */ new Map());
|
|
41048
|
-
return
|
|
41201
|
+
return react_10.default.useCallback((key7) => {
|
|
41049
41202
|
const existing = map2.get(key7);
|
|
41050
41203
|
if (existing)
|
|
41051
41204
|
return existing;
|
|
@@ -41066,7 +41219,7 @@ function useSiteRefs() {
|
|
|
41066
41219
|
siteCanonicalURL: void 0,
|
|
41067
41220
|
});
|
|
41068
41221
|
}, [route,]);
|
|
41069
|
-
return
|
|
41222
|
+
return react_10.default.useCallback((key7) => {
|
|
41070
41223
|
if (!key7)
|
|
41071
41224
|
return;
|
|
41072
41225
|
const computedKey = `${path}-${key7}`;
|
|
@@ -41160,7 +41313,7 @@ function createGamepadPoller() {
|
|
|
41160
41313
|
};
|
|
41161
41314
|
}
|
|
41162
41315
|
var gamepadPoller = /* @__PURE__ */ createGamepadPoller();
|
|
41163
|
-
var GamepadContext = /* @__PURE__ */
|
|
41316
|
+
var GamepadContext = /* @__PURE__ */ react_10.default.createContext(gamepadPoller);
|
|
41164
41317
|
exports.GamepadContext = GamepadContext;
|
|
41165
41318
|
function getGamepadInputs() {
|
|
41166
41319
|
let firstConnectedGamepad = null;
|
|
@@ -41210,16 +41363,16 @@ function isButtonPressed(button) {
|
|
|
41210
41363
|
return button.pressed === true || button.value > 0;
|
|
41211
41364
|
}
|
|
41212
41365
|
function useGamepad(input, callback, { mapping, on, } = {}) {
|
|
41213
|
-
const context =
|
|
41366
|
+
const context = react_10.default.useContext(GamepadContext);
|
|
41214
41367
|
const settings = useConstant2(() => ({
|
|
41215
41368
|
mapping: mapping ?? 'standard',
|
|
41216
41369
|
on: on ?? 'keydown',
|
|
41217
41370
|
}));
|
|
41218
|
-
const stateRef =
|
|
41371
|
+
const stateRef = react_10.default.useRef({
|
|
41219
41372
|
pressed: false,
|
|
41220
41373
|
handler: callback,
|
|
41221
41374
|
});
|
|
41222
|
-
const cb =
|
|
41375
|
+
const cb = react_10.default.useCallback((gamepad) => {
|
|
41223
41376
|
const { pressed, handler, } = stateRef.current;
|
|
41224
41377
|
if (gamepad.inputs.includes(input) && settings.mapping === gamepad.mapping) {
|
|
41225
41378
|
settings.on === 'keydown' && handler();
|
|
@@ -41240,10 +41393,10 @@ function useGamepad(input, callback, { mapping, on, } = {}) {
|
|
|
41240
41393
|
}
|
|
41241
41394
|
return () => context.unregister(cb);
|
|
41242
41395
|
}, []);
|
|
41243
|
-
|
|
41396
|
+
react_10.default.useEffect(() => {
|
|
41244
41397
|
return () => context.unregister(cb);
|
|
41245
41398
|
}, [cb, context,]);
|
|
41246
|
-
|
|
41399
|
+
react_10.default.useEffect(() => {
|
|
41247
41400
|
stateRef.current.handler = callback;
|
|
41248
41401
|
}, [callback,]);
|
|
41249
41402
|
}
|
|
@@ -41269,13 +41422,13 @@ function createShortcutDefinition(shortcut) {
|
|
|
41269
41422
|
};
|
|
41270
41423
|
}
|
|
41271
41424
|
function useHotkey(shortcut, callback) {
|
|
41272
|
-
const inTarget =
|
|
41425
|
+
const inTarget = react_10.default.useRef(true);
|
|
41273
41426
|
const shortcutDefinition = useConstant2(() => createShortcutDefinition(shortcut));
|
|
41274
41427
|
useOnCurrentTargetChange((isCurrentTarget, isOverlayed) => {
|
|
41275
41428
|
inTarget.current = isCurrentTarget && !isOverlayed;
|
|
41276
41429
|
return () => inTarget.current = false;
|
|
41277
41430
|
});
|
|
41278
|
-
const eventHandler =
|
|
41431
|
+
const eventHandler = react_10.default.useCallback((event) => {
|
|
41279
41432
|
if (!shortcutDefinition)
|
|
41280
41433
|
return;
|
|
41281
41434
|
if (!inTarget.current)
|
|
@@ -41285,7 +41438,7 @@ function useHotkey(shortcut, callback) {
|
|
|
41285
41438
|
event.preventDefault();
|
|
41286
41439
|
callback();
|
|
41287
41440
|
}, [shortcutDefinition, callback,]);
|
|
41288
|
-
|
|
41441
|
+
react_10.default.useEffect(() => {
|
|
41289
41442
|
document.addEventListener('keydown', eventHandler);
|
|
41290
41443
|
return () => document.removeEventListener('keydown', eventHandler);
|
|
41291
41444
|
}, [eventHandler,]);
|
|
@@ -41313,8 +41466,8 @@ function useOnVariantChange(variant, callbackMap) {
|
|
|
41313
41466
|
const isRenderingStaticContent = isStaticRenderer();
|
|
41314
41467
|
if (isRenderingStaticContent)
|
|
41315
41468
|
return;
|
|
41316
|
-
const isActiveScreenRef =
|
|
41317
|
-
const callbackMapRef =
|
|
41469
|
+
const isActiveScreenRef = react_10.default.useRef(true);
|
|
41470
|
+
const callbackMapRef = react_10.default.useRef(callbackMap);
|
|
41318
41471
|
useOnCurrentTargetChange((isCurrent, isOverlayed) => {
|
|
41319
41472
|
const isActiveScreen = isCurrent && !isOverlayed;
|
|
41320
41473
|
if (!isActiveScreenRef.current && isActiveScreen) {
|
|
@@ -41324,7 +41477,7 @@ function useOnVariantChange(variant, callbackMap) {
|
|
|
41324
41477
|
}
|
|
41325
41478
|
isActiveScreenRef.current = isActiveScreen;
|
|
41326
41479
|
}, []);
|
|
41327
|
-
|
|
41480
|
+
react_10.default.useEffect(() => {
|
|
41328
41481
|
if (isActiveScreenRef.current) {
|
|
41329
41482
|
const callback = callbackForVariant(callbackMapRef.current, variant);
|
|
41330
41483
|
if (callback)
|
|
@@ -41351,16 +41504,16 @@ function setOverflow(blockDocumentScrolling, show) {
|
|
|
41351
41504
|
});
|
|
41352
41505
|
}
|
|
41353
41506
|
function useOverlayState({ blockDocumentScrolling = true, } = {}) {
|
|
41354
|
-
const [showOverlay, setShowOverlay,] =
|
|
41355
|
-
const callback =
|
|
41507
|
+
const [showOverlay, setShowOverlay,] = react_10.default.useState(false);
|
|
41508
|
+
const callback = react_10.default.useCallback(async (show) => {
|
|
41356
41509
|
await yieldToMain({
|
|
41357
41510
|
priority: 'user-blocking',
|
|
41358
41511
|
continueAfter: 'paint',
|
|
41359
41512
|
});
|
|
41360
|
-
(0,
|
|
41513
|
+
(0, react_11.startTransition)(() => setShowOverlay(show));
|
|
41361
41514
|
setOverflow(blockDocumentScrolling, show);
|
|
41362
41515
|
}, [blockDocumentScrolling,]);
|
|
41363
|
-
|
|
41516
|
+
react_10.default.useEffect(() => () => {
|
|
41364
41517
|
void yieldToMain({
|
|
41365
41518
|
priority: 'user-blocking',
|
|
41366
41519
|
continueAfter: 'paint',
|
|
@@ -41380,11 +41533,11 @@ async function componentForRoute(route) {
|
|
|
41380
41533
|
const { page: routeComponent, } = route;
|
|
41381
41534
|
if (!routeComponent)
|
|
41382
41535
|
return;
|
|
41383
|
-
if (
|
|
41536
|
+
if (react_10.default.isValidElement(routeComponent))
|
|
41384
41537
|
return routeComponent;
|
|
41385
41538
|
if (withPreload(routeComponent))
|
|
41386
41539
|
await routeComponent.preload();
|
|
41387
|
-
return
|
|
41540
|
+
return react_10.default.createElement(routeComponent, {
|
|
41388
41541
|
key: route.path,
|
|
41389
41542
|
});
|
|
41390
41543
|
}
|
|
@@ -41396,7 +41549,7 @@ function usePrototypeNavigate({ preload, } = {}) {
|
|
|
41396
41549
|
const navigation = useNavigation();
|
|
41397
41550
|
const { getRoute, } = useRouter();
|
|
41398
41551
|
const onCanvas = useIsOnFramerCanvas();
|
|
41399
|
-
|
|
41552
|
+
react_10.default.useEffect(() => {
|
|
41400
41553
|
if (!navigation || onCanvas)
|
|
41401
41554
|
return;
|
|
41402
41555
|
preload == null ? void 0 : preload.forEach((componentOrRoute) => {
|
|
@@ -41423,51 +41576,51 @@ function usePrototypeNavigate({ preload, } = {}) {
|
|
|
41423
41576
|
navigation.goBack();
|
|
41424
41577
|
return false;
|
|
41425
41578
|
}
|
|
41426
|
-
const
|
|
41579
|
+
const Component18 = typeof target === 'string'
|
|
41427
41580
|
? await componentForRoute(getRoute == null ? void 0 : getRoute(target)).catch(() => { })
|
|
41428
|
-
:
|
|
41581
|
+
: react_10.default.isValidElement(target)
|
|
41429
41582
|
? target
|
|
41430
41583
|
: null;
|
|
41431
|
-
if (!
|
|
41584
|
+
if (!Component18)
|
|
41432
41585
|
return;
|
|
41433
41586
|
const { appearsFrom, backdropColor, animation, } = options;
|
|
41434
41587
|
const transitionType = options.transition || 'instant';
|
|
41435
41588
|
switch (transitionType) {
|
|
41436
41589
|
case 'instant':
|
|
41437
|
-
navigation.instant(
|
|
41590
|
+
navigation.instant(Component18);
|
|
41438
41591
|
break;
|
|
41439
41592
|
case 'fade':
|
|
41440
|
-
navigation.fade(
|
|
41593
|
+
navigation.fade(Component18, {
|
|
41441
41594
|
animation,
|
|
41442
41595
|
});
|
|
41443
41596
|
break;
|
|
41444
41597
|
case 'push':
|
|
41445
|
-
navigation.push(
|
|
41598
|
+
navigation.push(Component18, {
|
|
41446
41599
|
appearsFrom,
|
|
41447
41600
|
animation,
|
|
41448
41601
|
});
|
|
41449
41602
|
break;
|
|
41450
41603
|
case 'flip':
|
|
41451
|
-
navigation.flip(
|
|
41604
|
+
navigation.flip(Component18, {
|
|
41452
41605
|
appearsFrom,
|
|
41453
41606
|
animation,
|
|
41454
41607
|
});
|
|
41455
41608
|
break;
|
|
41456
41609
|
case 'magicMotion':
|
|
41457
|
-
navigation.magicMotion(
|
|
41610
|
+
navigation.magicMotion(Component18, {
|
|
41458
41611
|
animation,
|
|
41459
41612
|
});
|
|
41460
41613
|
break;
|
|
41461
41614
|
// Overlay stack navigation doesn't support updating the browser's
|
|
41462
41615
|
// path.
|
|
41463
41616
|
case 'modal':
|
|
41464
|
-
navigation.modal(
|
|
41617
|
+
navigation.modal(Component18, {
|
|
41465
41618
|
backdropColor,
|
|
41466
41619
|
animation,
|
|
41467
41620
|
});
|
|
41468
41621
|
break;
|
|
41469
41622
|
case 'overlay':
|
|
41470
|
-
navigation.overlay(
|
|
41623
|
+
navigation.overlay(Component18, {
|
|
41471
41624
|
appearsFrom,
|
|
41472
41625
|
backdropColor,
|
|
41473
41626
|
animation,
|
|
@@ -41587,7 +41740,7 @@ function useLoadMorePagination(totalSize, pageSize, hash2, paginateWithSuspended
|
|
|
41587
41740
|
});
|
|
41588
41741
|
};
|
|
41589
41742
|
if (!paginateWithSuspendedLoadingState)
|
|
41590
|
-
return renderNextPage(
|
|
41743
|
+
return renderNextPage(react_11.startTransition);
|
|
41591
41744
|
return renderNextPage(startLoadingTransition);
|
|
41592
41745
|
}, [totalPages, paginateWithSuspendedLoadingState,]);
|
|
41593
41746
|
return {
|
|
@@ -41853,10 +42006,10 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
|
|
|
41853
42006
|
}
|
|
41854
42007
|
const { isHovered: isHovered2, isPressed: isPressed2, isHoveredHasUpdated, isPressedHasUpdated, } = internalState.current;
|
|
41855
42008
|
if (isHovered2 || isHoveredHasUpdated || isPressed2 || isPressedHasUpdated) {
|
|
41856
|
-
(0,
|
|
42009
|
+
(0, react_11.startTransition)(forceUpdate);
|
|
41857
42010
|
return;
|
|
41858
42011
|
}
|
|
41859
|
-
runUpdateIfVisible(() => (0,
|
|
42012
|
+
runUpdateIfVisible(() => (0, react_11.startTransition)(forceUpdate), pauseOffscreenFeatureOn && checkViewport);
|
|
41860
42013
|
}, [resolveNextVariant, forceUpdate, runUpdateIfVisible, pauseOffscreenFeatureOn, yieldOnTapFeatureOn,]);
|
|
41861
42014
|
const setGestureState = (0, react_3.useCallback)(({ isHovered: isHovered2, isPressed: isPressed2, isError: isError2, }) => {
|
|
41862
42015
|
const isPressedHasUpdated = isPressed2 !== internalState.current.isPressed;
|
|
@@ -41882,7 +42035,7 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
|
|
|
41882
42035
|
const clearLoadingGesture = (0, react_3.useCallback)(() => {
|
|
41883
42036
|
const { baseVariant: baseVariant2, } = internalState.current;
|
|
41884
42037
|
internalState.current.loadedBaseVariant[baseVariant2] = true;
|
|
41885
|
-
runUpdateIfVisible(() => (0,
|
|
42038
|
+
runUpdateIfVisible(() => (0, react_11.startTransition)(forceUpdate), true);
|
|
41886
42039
|
}, [forceUpdate, runUpdateIfVisible,]);
|
|
41887
42040
|
if (variant !== internalState.current.lastVariant) {
|
|
41888
42041
|
const [nextBase, nextGesture,] = resolveNextVariant(variant);
|
|
@@ -41962,11 +42115,11 @@ function safeCSSValue(value) {
|
|
|
41962
42115
|
return 'none';
|
|
41963
42116
|
return value;
|
|
41964
42117
|
}
|
|
41965
|
-
function withCodeBoundaryForOverrides(
|
|
42118
|
+
function withCodeBoundaryForOverrides(Component18, { scopeId, nodeId, override, inComponentSlot, }) {
|
|
41966
42119
|
if (!shouldEnableCodeBoundaries()) {
|
|
41967
|
-
return override(
|
|
42120
|
+
return override(Component18);
|
|
41968
42121
|
}
|
|
41969
|
-
const appliedOverride = tryToApplyOverride(
|
|
42122
|
+
const appliedOverride = tryToApplyOverride(Component18, override);
|
|
41970
42123
|
let hasErrorBeenLogged = false;
|
|
41971
42124
|
function CodeBoundaryForOverrides(props, ref) {
|
|
41972
42125
|
const nearestExternalComponent = useNearestExternalComponent();
|
|
@@ -41977,7 +42130,7 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
|
|
|
41977
42130
|
value: nodeId,
|
|
41978
42131
|
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(CodeComponentBoundary, {
|
|
41979
42132
|
getErrorMessage: getErrorMessageForOverride.bind(null, scopeId, nodeId),
|
|
41980
|
-
fallback: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
42133
|
+
fallback: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
41981
42134
|
...props,
|
|
41982
42135
|
ref,
|
|
41983
42136
|
}),
|
|
@@ -41995,7 +42148,7 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
|
|
|
41995
42148
|
collectErrorToAnalytics(appliedOverride.error);
|
|
41996
42149
|
hasErrorBeenLogged = true;
|
|
41997
42150
|
}
|
|
41998
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
42151
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
41999
42152
|
...props,
|
|
42000
42153
|
ref,
|
|
42001
42154
|
});
|
|
@@ -42016,11 +42169,11 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
|
|
|
42016
42169
|
}
|
|
42017
42170
|
}
|
|
42018
42171
|
}
|
|
42019
|
-
return
|
|
42172
|
+
return react_10.default.forwardRef(CodeBoundaryForOverrides);
|
|
42020
42173
|
}
|
|
42021
|
-
function tryToApplyOverride(
|
|
42174
|
+
function tryToApplyOverride(Component18, override) {
|
|
42022
42175
|
try {
|
|
42023
|
-
const ComponentWithOverrides = override(
|
|
42176
|
+
const ComponentWithOverrides = override(Component18);
|
|
42024
42177
|
return {
|
|
42025
42178
|
status: 'success',
|
|
42026
42179
|
Component: ComponentWithOverrides,
|
|
@@ -42041,7 +42194,7 @@ function singleFrame() {
|
|
|
42041
42194
|
frame.postRender(() => resolve());
|
|
42042
42195
|
});
|
|
42043
42196
|
}
|
|
42044
|
-
var withV1StrokeFX = (
|
|
42197
|
+
var withV1StrokeFX = (Component18) => (0, react_7.forwardRef)((props, forwardedRef) => {
|
|
42045
42198
|
const { strokeEffectLength, strokeEffectGap, strokeEffectOffset, strokeEffectLoop, strokeEffectTotalLength, strokeEffectLoopType, pathLengthTransition, ...restProps } = props;
|
|
42046
42199
|
const isCanvas = isStaticRenderer();
|
|
42047
42200
|
const offset = useMotionValue(0);
|
|
@@ -42085,7 +42238,7 @@ var withV1StrokeFX = (Component17) => (0, react_7.forwardRef)((props, forwardedR
|
|
|
42085
42238
|
strokeDashoffset: value,
|
|
42086
42239
|
}
|
|
42087
42240
|
: void 0;
|
|
42088
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
42241
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
42089
42242
|
...restProps,
|
|
42090
42243
|
...effect,
|
|
42091
42244
|
ref: forwardedRef,
|
|
@@ -42104,14 +42257,14 @@ function extractMappingFromInfo(info) {
|
|
|
42104
42257
|
return void 0;
|
|
42105
42258
|
}
|
|
42106
42259
|
}
|
|
42107
|
-
function withMappedReactProps(
|
|
42260
|
+
function withMappedReactProps(Component18, info) {
|
|
42108
42261
|
return (rawProps) => {
|
|
42109
42262
|
const props = {};
|
|
42110
42263
|
const mapping = extractMappingFromInfo(info);
|
|
42111
42264
|
for (const key7 in rawProps) {
|
|
42112
42265
|
asRecord(props)[(mapping == null ? void 0 : mapping[key7]) ?? key7] = rawProps[key7];
|
|
42113
42266
|
}
|
|
42114
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
42267
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
42115
42268
|
...props,
|
|
42116
42269
|
});
|
|
42117
42270
|
};
|
|
@@ -42154,17 +42307,17 @@ function createInputOutputRanges2(transformTargets, threshold, exitTarget) {
|
|
|
42154
42307
|
outputRange: [-1, -1, ...outputRange,],
|
|
42155
42308
|
};
|
|
42156
42309
|
}
|
|
42157
|
-
var withVariantAppearEffect = (
|
|
42310
|
+
var withVariantAppearEffect = (Component18) => react_10.default.forwardRef((props, forwardedRef) => {
|
|
42158
42311
|
if (RenderTarget.current() === RenderTarget.canvas) {
|
|
42159
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
42312
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
42160
42313
|
...props,
|
|
42161
42314
|
ref: forwardedRef,
|
|
42162
42315
|
});
|
|
42163
42316
|
}
|
|
42164
42317
|
const [options, rest,] = extractPrefixedProps(props, keys2);
|
|
42165
42318
|
const { visibleVariantId, obscuredVariantId, animateOnce, threshold, variantAppearEffectEnabled, targets, exitTarget, scrollDirection, } = options;
|
|
42166
|
-
const [activeVariant, setVariant,] =
|
|
42167
|
-
const animateState =
|
|
42319
|
+
const [activeVariant, setVariant,] = react_10.default.useState(obscuredVariantId);
|
|
42320
|
+
const animateState = react_10.default.useRef(false);
|
|
42168
42321
|
const observerRef = useObserverRef(forwardedRef);
|
|
42169
42322
|
useAppearEffect(observerRef, (appears) => {
|
|
42170
42323
|
if (options.targets)
|
|
@@ -42176,7 +42329,7 @@ var withVariantAppearEffect = (Component17) => react_11.default.forwardRef((prop
|
|
|
42176
42329
|
if (animateState.current === appears)
|
|
42177
42330
|
return;
|
|
42178
42331
|
animateState.current = appears;
|
|
42179
|
-
|
|
42332
|
+
react_10.default.startTransition(() => {
|
|
42180
42333
|
setVariant(appears ? visibleVariantId : obscuredVariantId);
|
|
42181
42334
|
});
|
|
42182
42335
|
}, {
|
|
@@ -42186,7 +42339,7 @@ var withVariantAppearEffect = (Component17) => react_11.default.forwardRef((prop
|
|
|
42186
42339
|
y: threshold,
|
|
42187
42340
|
},
|
|
42188
42341
|
});
|
|
42189
|
-
|
|
42342
|
+
react_10.default.useEffect(() => {
|
|
42190
42343
|
if (scrollDirection)
|
|
42191
42344
|
return;
|
|
42192
42345
|
if (!targets)
|
|
@@ -42208,12 +42361,12 @@ var withVariantAppearEffect = (Component17) => react_11.default.forwardRef((prop
|
|
|
42208
42361
|
if (variant === currentVariant)
|
|
42209
42362
|
return;
|
|
42210
42363
|
currentVariant = variant;
|
|
42211
|
-
|
|
42364
|
+
react_10.default.startTransition(() => {
|
|
42212
42365
|
setVariant(variant);
|
|
42213
42366
|
});
|
|
42214
42367
|
});
|
|
42215
42368
|
}, [animateOnce, threshold, targets, props.variant, scrollDirection, exitTarget,]);
|
|
42216
|
-
useScrollDirectionChange(scrollDirection, (variant) =>
|
|
42369
|
+
useScrollDirectionChange(scrollDirection, (variant) => react_10.default.startTransition(() => setVariant(variant)), {
|
|
42217
42370
|
enabled: variantAppearEffectEnabled,
|
|
42218
42371
|
repeat: !animateOnce,
|
|
42219
42372
|
});
|
|
@@ -42222,30 +42375,30 @@ var withVariantAppearEffect = (Component17) => react_11.default.forwardRef((prop
|
|
|
42222
42375
|
return;
|
|
42223
42376
|
const useObscuredVariant = !options.targets && !options.scrollDirection;
|
|
42224
42377
|
const target = useObscuredVariant ? options.obscuredVariantId : void 0;
|
|
42225
|
-
(0,
|
|
42378
|
+
(0, react_11.startTransition)(() => setVariant(target));
|
|
42226
42379
|
});
|
|
42227
42380
|
if (!('variantAppearEffectEnabled' in options) || variantAppearEffectEnabled === true) {
|
|
42228
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
42381
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
42229
42382
|
...rest,
|
|
42230
42383
|
variant: activeVariant ?? props.variant,
|
|
42231
42384
|
ref: observerRef,
|
|
42232
42385
|
});
|
|
42233
42386
|
}
|
|
42234
42387
|
else {
|
|
42235
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
42388
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
42236
42389
|
...rest,
|
|
42237
42390
|
});
|
|
42238
42391
|
}
|
|
42239
42392
|
});
|
|
42240
42393
|
exports.withVariantAppearEffect = withVariantAppearEffect;
|
|
42241
|
-
var withVariantFX = (
|
|
42394
|
+
var withVariantFX = (Component18) => react_10.default.forwardRef(({ initial, animate: animate3, exit, ...props }, forwardedRef) => {
|
|
42242
42395
|
const observerRef = useObserverRef(forwardedRef);
|
|
42243
42396
|
const effect = usePresenceAnimation({
|
|
42244
42397
|
initial,
|
|
42245
42398
|
animate: animate3,
|
|
42246
42399
|
exit,
|
|
42247
42400
|
}, observerRef, true);
|
|
42248
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
42401
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
42249
42402
|
...props,
|
|
42250
42403
|
style: {
|
|
42251
42404
|
...(props == null ? void 0 : props.style),
|
|
@@ -42255,9 +42408,9 @@ var withVariantFX = (Component17) => react_11.default.forwardRef(({ initial, ani
|
|
|
42255
42408
|
});
|
|
42256
42409
|
});
|
|
42257
42410
|
exports.withVariantFX = withVariantFX;
|
|
42258
|
-
var WindowContext = /* @__PURE__ */
|
|
42411
|
+
var WindowContext = /* @__PURE__ */ react_10.default.createContext(void 0);
|
|
42259
42412
|
exports.WindowContext = WindowContext;
|
|
42260
|
-
var useProvidedWindow = () =>
|
|
42413
|
+
var useProvidedWindow = () => react_10.default.useContext(WindowContext);
|
|
42261
42414
|
exports.useProvidedWindow = useProvidedWindow;
|
|
42262
42415
|
function isDesignDefinition(d) {
|
|
42263
42416
|
return d.type === 'master';
|
|
@@ -43001,6 +43154,27 @@ function createVariantName(weight, style2) {
|
|
|
43001
43154
|
}
|
|
43002
43155
|
return `${fontWeightNames[weight]}`;
|
|
43003
43156
|
}
|
|
43157
|
+
var MapWithHash = class extends Map {
|
|
43158
|
+
constructor() {
|
|
43159
|
+
super(...arguments);
|
|
43160
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, '_hash', 0);
|
|
43161
|
+
}
|
|
43162
|
+
get hash() {
|
|
43163
|
+
return this._hash;
|
|
43164
|
+
}
|
|
43165
|
+
set(key7, value) {
|
|
43166
|
+
this._hash++;
|
|
43167
|
+
return super.set(key7, value);
|
|
43168
|
+
}
|
|
43169
|
+
delete(key7) {
|
|
43170
|
+
this._hash++;
|
|
43171
|
+
return super.delete(key7);
|
|
43172
|
+
}
|
|
43173
|
+
clear() {
|
|
43174
|
+
this._hash++;
|
|
43175
|
+
return super.clear();
|
|
43176
|
+
}
|
|
43177
|
+
};
|
|
43004
43178
|
function isVariableFont(font) {
|
|
43005
43179
|
return Boolean(font.variationAxes);
|
|
43006
43180
|
}
|
|
@@ -43560,8 +43734,10 @@ var Mixed = Symbol('Mixed');
|
|
|
43560
43734
|
var DEPENDENCIES_MODULE_NAME = 'dependencies';
|
|
43561
43735
|
var DEPENDENCIES_MODULE_TYPE = 'config';
|
|
43562
43736
|
var DEPENDENCIES_MODULE_TYPE_SLASH_NAME = `${DEPENDENCIES_MODULE_TYPE}/${DEPENDENCIES_MODULE_NAME}`;
|
|
43563
|
-
var
|
|
43564
|
-
var
|
|
43737
|
+
var IMPORT_MAP_FILE_NAME = 'importMap.json';
|
|
43738
|
+
var DEPENDENCIES_FILE_NAME = 'dependencies.json';
|
|
43739
|
+
var IMPORT_MAP_FILE_ID = `${DEPENDENCIES_MODULE_TYPE_SLASH_NAME}/${IMPORT_MAP_FILE_NAME}`;
|
|
43740
|
+
var DEPENDENCIES_FILE_ID = `${DEPENDENCIES_MODULE_TYPE_SLASH_NAME}/${DEPENDENCIES_FILE_NAME}`;
|
|
43565
43741
|
var USE_FREEZE = false;
|
|
43566
43742
|
var List;
|
|
43567
43743
|
((List2) => {
|
|
@@ -45013,7 +45189,7 @@ function isValidVariationAxes(data2) {
|
|
|
45013
45189
|
var FontStore = class {
|
|
45014
45190
|
constructor() {
|
|
45015
45191
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'enabled', false);
|
|
45016
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'bySelector',
|
|
45192
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'bySelector', new MapWithHash());
|
|
45017
45193
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'loadedSelectors', /* @__PURE__ */ new Set());
|
|
45018
45194
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'getGoogleFontsListPromise');
|
|
45019
45195
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'getFontshareFontsListPromise');
|
|
@@ -45027,20 +45203,29 @@ var FontStore = class {
|
|
|
45027
45203
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'builtIn');
|
|
45028
45204
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'framer');
|
|
45029
45205
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'custom');
|
|
45206
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'bySelectorValuesCache');
|
|
45030
45207
|
this.local = new LocalFontSource();
|
|
45031
45208
|
this.google = new GoogleFontSource();
|
|
45032
45209
|
this.fontshare = new FontshareSource();
|
|
45033
45210
|
this.framer = new FramerFontSource();
|
|
45034
45211
|
this.custom = new CustomFontSource();
|
|
45035
45212
|
this.builtIn = new BuiltInFontSource();
|
|
45036
|
-
this.bySelector = /* @__PURE__ */ new Map();
|
|
45037
45213
|
this.importLocalFonts();
|
|
45038
45214
|
}
|
|
45215
|
+
get hash() {
|
|
45216
|
+
return this.bySelector.hash;
|
|
45217
|
+
}
|
|
45039
45218
|
addFont(font) {
|
|
45040
45219
|
this.bySelector.set(font.selector, font);
|
|
45041
45220
|
}
|
|
45042
45221
|
getAvailableFonts() {
|
|
45043
|
-
|
|
45222
|
+
if (!this.bySelectorValuesCache || this.bySelectorValuesCache.hash !== this.bySelector.hash) {
|
|
45223
|
+
this.bySelectorValuesCache = {
|
|
45224
|
+
result: Array.from(this.bySelector.values()),
|
|
45225
|
+
hash: this.bySelector.hash,
|
|
45226
|
+
};
|
|
45227
|
+
}
|
|
45228
|
+
return this.bySelectorValuesCache.result;
|
|
45044
45229
|
}
|
|
45045
45230
|
importLocalFonts() {
|
|
45046
45231
|
for (const font of this.local.importFonts()) {
|
|
@@ -45412,7 +45597,7 @@ var DeprecatedComponentContainer = /* @__PURE__ */ (() => {
|
|
|
45412
45597
|
const { left, right, top, bottom, center, centerX, centerY, aspectRatio: aspectRatio2, parentSize, width, height, rotation, opacity: _opacity, visible, _constraints, _initialStyle, name, positionSticky, positionStickyTop, positionStickyRight, positionStickyBottom, positionStickyLeft,
|
|
45413
45598
|
// Remove the children and the componentIdentifier from the props passed into the component
|
|
45414
45599
|
componentIdentifier: originalComponentIdentifier, children: originalChildren, style: style2, duplicatedFrom, widthType, heightType, ...childProps } = frameProps;
|
|
45415
|
-
children =
|
|
45600
|
+
children = react_10.default.Children.map(originalChildren, (child) => {
|
|
45416
45601
|
if (!isReactChild(child) || !isReactElement(child)) {
|
|
45417
45602
|
return child;
|
|
45418
45603
|
}
|
|
@@ -45422,11 +45607,11 @@ var DeprecatedComponentContainer = /* @__PURE__ */ (() => {
|
|
|
45422
45607
|
id: this.props.__layoutId,
|
|
45423
45608
|
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(AutomaticLayoutIds, {
|
|
45424
45609
|
enabled: false,
|
|
45425
|
-
children:
|
|
45610
|
+
children: react_10.default.cloneElement(child, childProps),
|
|
45426
45611
|
}),
|
|
45427
45612
|
});
|
|
45428
45613
|
}
|
|
45429
|
-
return
|
|
45614
|
+
return react_10.default.cloneElement(child, childProps);
|
|
45430
45615
|
});
|
|
45431
45616
|
frameProps = {
|
|
45432
45617
|
style: style2,
|
|
@@ -45532,7 +45717,7 @@ var PlainTextInput = /* @__PURE__ */ (0, react_7.forwardRef)(function FormPlainT
|
|
|
45532
45717
|
});
|
|
45533
45718
|
const newValue = e.target.value;
|
|
45534
45719
|
onChange == null ? void 0 : onChange(e);
|
|
45535
|
-
(0,
|
|
45720
|
+
(0, react_11.startTransition)(() => setHasValue(!!newValue));
|
|
45536
45721
|
}, [onChange,]);
|
|
45537
45722
|
const eventHandlers = useCustomValidity(onValid, onInvalid, handleChange, onBlur, onFocus);
|
|
45538
45723
|
if (type === 'hidden') {
|
|
@@ -45685,7 +45870,7 @@ var styles = /* @__PURE__ */ (() => [
|
|
|
45685
45870
|
var FormPlainTextInput2 = /* @__PURE__ */ withCSS(PlainTextInput, styles, 'framer-lib-form-plain-text-input');
|
|
45686
45871
|
exports.FormPlainTextInput = FormPlainTextInput2;
|
|
45687
45872
|
var className = 'framer-form-boolean-input';
|
|
45688
|
-
var BooleanInput = /* @__PURE__ */
|
|
45873
|
+
var BooleanInput = /* @__PURE__ */ react_10.default.forwardRef(function FormPlainTextInput3(props, ref) {
|
|
45689
45874
|
const { inputName, type = 'checkbox', defaultChecked, onValid, ...rest } = props;
|
|
45690
45875
|
const isCanvas = useIsOnFramerCanvas();
|
|
45691
45876
|
const attributes = isCanvas
|
|
@@ -45810,7 +45995,7 @@ var styles2 = /* @__PURE__ */ (() => [
|
|
|
45810
45995
|
])();
|
|
45811
45996
|
var FormBooleanInput = /* @__PURE__ */ withCSS(BooleanInput, styles2, 'framer-lib-form-boolean-input');
|
|
45812
45997
|
exports.FormBooleanInput = FormBooleanInput;
|
|
45813
|
-
var Select = /* @__PURE__ */
|
|
45998
|
+
var Select = /* @__PURE__ */ react_10.default.forwardRef(function Select2(props, measureRef) {
|
|
45814
45999
|
const { autoFocus, className: className2, inputName, required, hidden, defaultValue, selectOptions, style: style2, onValid, onChange, onBlur, onInvalid, onFocus, ...rest } = props;
|
|
45815
46000
|
const eventHandlers = useCustomValidity(onValid, onInvalid, onChange, onBlur, onFocus);
|
|
45816
46001
|
const key7 = Array.isArray(defaultValue) ? defaultValue[0] : defaultValue;
|
|
@@ -45921,14 +46106,376 @@ var styles3 = /* @__PURE__ */ (() => [
|
|
|
45921
46106
|
])();
|
|
45922
46107
|
var FormSelect = /* @__PURE__ */ withCSS(Select, styles3, 'framer-lib-form-select');
|
|
45923
46108
|
exports.FormSelect = FormSelect;
|
|
45924
|
-
|
|
46109
|
+
function useEscToClose(isOpen, close) {
|
|
46110
|
+
(0, react_2.useEffect)(() => {
|
|
46111
|
+
function handleKeyDown(e) {
|
|
46112
|
+
if (e.key === 'Escape' && isOpen) {
|
|
46113
|
+
e.preventDefault();
|
|
46114
|
+
e.stopPropagation();
|
|
46115
|
+
close();
|
|
46116
|
+
}
|
|
46117
|
+
}
|
|
46118
|
+
window.addEventListener('keyup', handleKeyDown);
|
|
46119
|
+
return () => window.removeEventListener('keyup', handleKeyDown);
|
|
46120
|
+
}, [isOpen, close,]);
|
|
46121
|
+
}
|
|
46122
|
+
var steps2 = [512, 1024, 2048, 4096,];
|
|
46123
|
+
function calculateImageWidth(aspectRatio2, maxWidth, totalHorizontalPadding, totalVerticalPadding) {
|
|
46124
|
+
const availableHeight = window.innerHeight - totalVerticalPadding;
|
|
46125
|
+
const availableWidth = Math.min(window.innerWidth - totalHorizontalPadding, maxWidth);
|
|
46126
|
+
const maxWidthBasedOnHeight = availableHeight / aspectRatio2;
|
|
46127
|
+
return Math.min(availableWidth, maxWidthBasedOnHeight);
|
|
46128
|
+
}
|
|
46129
|
+
function optimisticallyDecodeImage(image, { width, height, }) {
|
|
46130
|
+
if (!image.src || !image.srcSet)
|
|
46131
|
+
return;
|
|
46132
|
+
const i = new window.Image();
|
|
46133
|
+
i.src = image.src;
|
|
46134
|
+
i.srcset = image.srcSet;
|
|
46135
|
+
i.width = width;
|
|
46136
|
+
i.height = height;
|
|
46137
|
+
return i.decode();
|
|
46138
|
+
}
|
|
46139
|
+
function getPortalContainer2() {
|
|
46140
|
+
return document.getElementById(templateOverlayContainerId) ?? document.getElementById(overlayContainerId) ?? document.body;
|
|
46141
|
+
}
|
|
46142
|
+
function getSidePadding(value, padding) {
|
|
46143
|
+
if (isNumber2(value))
|
|
46144
|
+
return value;
|
|
46145
|
+
return padding ?? 0;
|
|
46146
|
+
}
|
|
46147
|
+
function getTotalVerticalPadding(lightbox) {
|
|
46148
|
+
return getSidePadding(lightbox == null ? void 0 : lightbox.paddingTop, lightbox == null ? void 0 : lightbox.padding) +
|
|
46149
|
+
getSidePadding(lightbox == null ? void 0 : lightbox.paddingBottom, lightbox == null ? void 0 : lightbox.padding);
|
|
46150
|
+
}
|
|
46151
|
+
function getTotalHorizontalPadding(lightbox) {
|
|
46152
|
+
return getSidePadding(lightbox == null ? void 0 : lightbox.paddingLeft, lightbox == null ? void 0 : lightbox.padding) +
|
|
46153
|
+
getSidePadding(lightbox == null ? void 0 : lightbox.paddingRight, lightbox == null ? void 0 : lightbox.padding);
|
|
46154
|
+
}
|
|
46155
|
+
function useStableCallback(callback) {
|
|
46156
|
+
const latest = (0, react_4.useRef)(callback);
|
|
46157
|
+
latest.current = callback;
|
|
46158
|
+
return (0, react_3.useCallback)((...args) => latest.current(...args), []);
|
|
46159
|
+
}
|
|
46160
|
+
function createImageWithSrcSet(lightbox, background) {
|
|
46161
|
+
if (!lightbox || !background || !background.src)
|
|
46162
|
+
return background;
|
|
46163
|
+
const base = new URL(background.src);
|
|
46164
|
+
base.searchParams.delete('scale-down-to');
|
|
46165
|
+
base.searchParams.delete('lossless');
|
|
46166
|
+
return {
|
|
46167
|
+
...background,
|
|
46168
|
+
sizes: `min(100vw, ${lightbox.maxWidth - getTotalHorizontalPadding(lightbox)}px)`,
|
|
46169
|
+
// Use all steps since the lightbox can scale up and down with the viewport.
|
|
46170
|
+
srcSet: steps2.map((size) => {
|
|
46171
|
+
const src = new URL(base);
|
|
46172
|
+
src.searchParams.set('scale-down-to', size.toString());
|
|
46173
|
+
return `${src.toString()} ${size}w`;
|
|
46174
|
+
}).join(', '),
|
|
46175
|
+
};
|
|
46176
|
+
}
|
|
46177
|
+
var distortionTransforms = /* @__PURE__ */ (() => ({
|
|
46178
|
+
x: void 0,
|
|
46179
|
+
y: void 0,
|
|
46180
|
+
z: 0,
|
|
46181
|
+
translateX: void 0,
|
|
46182
|
+
translateY: void 0,
|
|
46183
|
+
translateZ: 0,
|
|
46184
|
+
rotate: void 0,
|
|
46185
|
+
rotateX: 0,
|
|
46186
|
+
rotateY: 0,
|
|
46187
|
+
rotateZ: void 0,
|
|
46188
|
+
scale: 1,
|
|
46189
|
+
scaleX: 1,
|
|
46190
|
+
scaleY: 1,
|
|
46191
|
+
scaleZ: 1,
|
|
46192
|
+
skew: 0,
|
|
46193
|
+
skewX: 0,
|
|
46194
|
+
skewY: 0,
|
|
46195
|
+
originX: void 0,
|
|
46196
|
+
originY: void 0,
|
|
46197
|
+
originZ: void 0,
|
|
46198
|
+
perspective: 0,
|
|
46199
|
+
transformPerspective: 0,
|
|
46200
|
+
}))();
|
|
46201
|
+
function isDistortionTransform(values) {
|
|
46202
|
+
if (!values)
|
|
46203
|
+
return false;
|
|
46204
|
+
for (const k in values) {
|
|
46205
|
+
if (!(k in distortionTransforms))
|
|
46206
|
+
continue;
|
|
46207
|
+
const identityValue = distortionTransforms[k];
|
|
46208
|
+
const value = values[k];
|
|
46209
|
+
if (!isNumber2(identityValue) || !isNumber2(value))
|
|
46210
|
+
continue;
|
|
46211
|
+
if (identityValue === value)
|
|
46212
|
+
continue;
|
|
46213
|
+
return true;
|
|
46214
|
+
}
|
|
46215
|
+
return false;
|
|
46216
|
+
}
|
|
46217
|
+
function isDistorted(ref) {
|
|
46218
|
+
var _a, _b;
|
|
46219
|
+
const element = visualElementStore.get(ref.current);
|
|
46220
|
+
if (!element)
|
|
46221
|
+
return false;
|
|
46222
|
+
if (isDistortionTransform((_a = element.projection) == null ? void 0 : _a.latestValues))
|
|
46223
|
+
return true;
|
|
46224
|
+
const path = (_b = element.projection) == null ? void 0 : _b.path;
|
|
46225
|
+
if (!path || path.length === 0)
|
|
46226
|
+
return false;
|
|
46227
|
+
for (const p of path) {
|
|
46228
|
+
if (isDistortionTransform(p.latestValues))
|
|
46229
|
+
return true;
|
|
46230
|
+
}
|
|
46231
|
+
return false;
|
|
46232
|
+
}
|
|
46233
|
+
var enterExitBackdropAnimation = {
|
|
46234
|
+
opacity: 0,
|
|
46235
|
+
};
|
|
46236
|
+
var targetBackdropAnimation = {
|
|
46237
|
+
opacity: 1,
|
|
46238
|
+
};
|
|
46239
|
+
function withLightboxEffect(Component18) {
|
|
46240
|
+
return (0, react_7.forwardRef)(function LightboxEffect({ lightbox, lightboxClassName, onClick, ...props }, forwardedRef) {
|
|
46241
|
+
const config = (0, react_3.useContext)(MotionConfigContext);
|
|
46242
|
+
const fallbackRef = (0, react_4.useRef)(null);
|
|
46243
|
+
const ref = forwardedRef ?? fallbackRef;
|
|
46244
|
+
const decodePromiseRef = (0, react_4.useRef)();
|
|
46245
|
+
const image = (0, react_4.useMemo)(() => createImageWithSrcSet(lightbox, props.background), [lightbox, props.background,]);
|
|
46246
|
+
const [open, setOpen,] = (0, react_4.useState)(false);
|
|
46247
|
+
const [openOverrides, setOpenOverrides,] = (0, react_4.useState)();
|
|
46248
|
+
const onOpen = (0, react_3.useCallback)(() => {
|
|
46249
|
+
if (!lightbox)
|
|
46250
|
+
return;
|
|
46251
|
+
if (open) {
|
|
46252
|
+
(0, react_11.startTransition)(() => {
|
|
46253
|
+
setOpen(true);
|
|
46254
|
+
});
|
|
46255
|
+
return;
|
|
46256
|
+
}
|
|
46257
|
+
frame.read(() => {
|
|
46258
|
+
if (!ref.current)
|
|
46259
|
+
return;
|
|
46260
|
+
const style22 = getComputedStyle(ref.current);
|
|
46261
|
+
const hasBorder = ref.current.getAttribute('data-border') === 'true';
|
|
46262
|
+
const borderStyle2 = hasBorder ? getComputedStyle(ref.current, '::after') : void 0;
|
|
46263
|
+
const width = ref.current.offsetWidth ?? 1;
|
|
46264
|
+
const height = ref.current.offsetHeight ?? 1;
|
|
46265
|
+
const transition2 = isDistorted(ref)
|
|
46266
|
+
? {
|
|
46267
|
+
duration: 0,
|
|
46268
|
+
}
|
|
46269
|
+
: lightbox.transition;
|
|
46270
|
+
(0, react_11.startTransition)(() => {
|
|
46271
|
+
setOpenOverrides({
|
|
46272
|
+
borderRadius: style22.borderRadius,
|
|
46273
|
+
aspectRatio: width / (height || 1),
|
|
46274
|
+
borderTop: borderStyle2 == null ? void 0 : borderStyle2.borderTopWidth,
|
|
46275
|
+
borderRight: borderStyle2 == null ? void 0 : borderStyle2.borderRightWidth,
|
|
46276
|
+
borderBottom: borderStyle2 == null ? void 0 : borderStyle2.borderBottomWidth,
|
|
46277
|
+
borderLeft: borderStyle2 == null ? void 0 : borderStyle2.borderLeftWidth,
|
|
46278
|
+
borderStyle: borderStyle2 == null ? void 0 : borderStyle2.borderStyle,
|
|
46279
|
+
borderColor: borderStyle2 == null ? void 0 : borderStyle2.borderColor,
|
|
46280
|
+
transition: transition2,
|
|
46281
|
+
imageRendering: style22.imageRendering,
|
|
46282
|
+
filter: style22.filter,
|
|
46283
|
+
});
|
|
46284
|
+
setOpen(true);
|
|
46285
|
+
});
|
|
46286
|
+
});
|
|
46287
|
+
}, [lightbox, open, ref,]);
|
|
46288
|
+
const aspectRatio2 = (openOverrides == null ? void 0 : openOverrides.aspectRatio) ?? 1;
|
|
46289
|
+
const decode = useStableCallback(() => {
|
|
46290
|
+
var _a;
|
|
46291
|
+
if (!lightbox || !image || !image.src)
|
|
46292
|
+
return;
|
|
46293
|
+
const srcDecodePromise = (_a = decodePromiseRef.current) == null ? void 0 : _a[image.src];
|
|
46294
|
+
if (srcDecodePromise)
|
|
46295
|
+
return srcDecodePromise;
|
|
46296
|
+
const width = calculateImageWidth(aspectRatio2, lightbox.maxWidth, getTotalHorizontalPadding(lightbox), getTotalVerticalPadding(lightbox));
|
|
46297
|
+
const promise = optimisticallyDecodeImage(image, {
|
|
46298
|
+
width,
|
|
46299
|
+
height: width * aspectRatio2,
|
|
46300
|
+
});
|
|
46301
|
+
decodePromiseRef.current = {
|
|
46302
|
+
[image.src]: promise,
|
|
46303
|
+
};
|
|
46304
|
+
return promise;
|
|
46305
|
+
});
|
|
46306
|
+
const handleClick = (0, react_3.useCallback)(async (e) => {
|
|
46307
|
+
onClick == null ? void 0 : onClick(e);
|
|
46308
|
+
if (open || !lightbox || !image)
|
|
46309
|
+
return;
|
|
46310
|
+
await decode();
|
|
46311
|
+
onOpen();
|
|
46312
|
+
}, [onClick, onOpen, open, image, lightbox, decode,]);
|
|
46313
|
+
const onClose = (0, react_3.useCallback)((e) => {
|
|
46314
|
+
e == null ? void 0 : e.stopPropagation();
|
|
46315
|
+
(0, react_11.startTransition)(() => {
|
|
46316
|
+
setOpen(false);
|
|
46317
|
+
});
|
|
46318
|
+
}, []);
|
|
46319
|
+
useEscToClose(open, onClose);
|
|
46320
|
+
(0, react_2.useEffect)(() => {
|
|
46321
|
+
if (!lightbox)
|
|
46322
|
+
return;
|
|
46323
|
+
let timer;
|
|
46324
|
+
function enter() {
|
|
46325
|
+
timer = setTimeout(() => {
|
|
46326
|
+
void decode();
|
|
46327
|
+
}, 50);
|
|
46328
|
+
}
|
|
46329
|
+
function clear() {
|
|
46330
|
+
clearTimeout(timer);
|
|
46331
|
+
}
|
|
46332
|
+
const currentRef = ref.current;
|
|
46333
|
+
currentRef == null ? void 0 : currentRef.addEventListener('mouseenter', enter);
|
|
46334
|
+
currentRef == null ? void 0 : currentRef.addEventListener('mouseleave', clear);
|
|
46335
|
+
currentRef == null ? void 0 : currentRef.addEventListener('pointerdown', decode);
|
|
46336
|
+
return () => {
|
|
46337
|
+
clear();
|
|
46338
|
+
currentRef == null ? void 0 : currentRef.removeEventListener('mouseenter', enter);
|
|
46339
|
+
currentRef == null ? void 0 : currentRef.removeEventListener('mouseleave', clear);
|
|
46340
|
+
currentRef == null ? void 0 : currentRef.removeEventListener('pointerdown', decode);
|
|
46341
|
+
};
|
|
46342
|
+
}, [decode, ref, lightbox,]);
|
|
46343
|
+
const fallbackLayoutId = (0, react_3.useId)();
|
|
46344
|
+
const transition = (openOverrides == null ? void 0 : openOverrides.transition) ?? props.transition ?? config.transition;
|
|
46345
|
+
const borderRadius2 = openOverrides == null ? void 0 : openOverrides.borderRadius;
|
|
46346
|
+
const imageRendering = openOverrides == null ? void 0 : openOverrides.imageRendering;
|
|
46347
|
+
const filter2 = openOverrides == null ? void 0 : openOverrides.filter;
|
|
46348
|
+
const borderTop = openOverrides == null ? void 0 : openOverrides.borderTop;
|
|
46349
|
+
const borderRight = openOverrides == null ? void 0 : openOverrides.borderRight;
|
|
46350
|
+
const borderBottom = openOverrides == null ? void 0 : openOverrides.borderBottom;
|
|
46351
|
+
const borderLeft = openOverrides == null ? void 0 : openOverrides.borderLeft;
|
|
46352
|
+
const borderStyle = openOverrides == null ? void 0 : openOverrides.borderStyle;
|
|
46353
|
+
const borderColor = openOverrides == null ? void 0 : openOverrides.borderColor;
|
|
46354
|
+
const hasAnyBorder = Boolean(borderTop || borderRight || borderBottom || borderLeft || borderStyle || borderColor);
|
|
46355
|
+
const border = hasAnyBorder
|
|
46356
|
+
? {
|
|
46357
|
+
'--border-top-width': borderTop,
|
|
46358
|
+
'--border-right-width': borderRight,
|
|
46359
|
+
'--border-bottom-width': borderBottom,
|
|
46360
|
+
'--border-left-width': borderLeft,
|
|
46361
|
+
'--border-style': borderStyle,
|
|
46362
|
+
'--border-color': borderColor,
|
|
46363
|
+
}
|
|
46364
|
+
: void 0;
|
|
46365
|
+
const portalProps = {
|
|
46366
|
+
[portalIdAttribute]: props.id,
|
|
46367
|
+
};
|
|
46368
|
+
const paddingTop = getSidePadding(lightbox == null ? void 0 : lightbox.paddingTop, lightbox == null ? void 0 : lightbox.padding);
|
|
46369
|
+
const paddingBottom = getSidePadding(lightbox == null ? void 0 : lightbox.paddingBottom, lightbox == null ? void 0 : lightbox.padding);
|
|
46370
|
+
const paddingLeft = getSidePadding(lightbox == null ? void 0 : lightbox.paddingLeft, lightbox == null ? void 0 : lightbox.padding);
|
|
46371
|
+
const paddingRight = getSidePadding(lightbox == null ? void 0 : lightbox.paddingRight, lightbox == null ? void 0 : lightbox.padding);
|
|
46372
|
+
const style2 = (openOverrides == null ? void 0 : openOverrides.borderRadius)
|
|
46373
|
+
? {
|
|
46374
|
+
...props.style,
|
|
46375
|
+
borderRadius: openOverrides.borderRadius,
|
|
46376
|
+
}
|
|
46377
|
+
: props.style;
|
|
46378
|
+
const layoutDependency = open ? props.layoutDependency ? `${props.layoutDependency}-open` : 'open' : props.layoutDependency;
|
|
46379
|
+
return /* @__PURE__ */ (0, jsx_runtime_2.jsxs)(jsx_runtime_1.Fragment, {
|
|
46380
|
+
children: [
|
|
46381
|
+
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
46382
|
+
...props,
|
|
46383
|
+
style: style2,
|
|
46384
|
+
onClick: handleClick,
|
|
46385
|
+
layoutId: props.layoutId ?? (lightbox ? fallbackLayoutId : void 0),
|
|
46386
|
+
ref,
|
|
46387
|
+
layoutDependency,
|
|
46388
|
+
transition,
|
|
46389
|
+
}),
|
|
46390
|
+
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(AnimatePresence, {
|
|
46391
|
+
children: open && lightbox && image && /* @__PURE__ */ (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {
|
|
46392
|
+
children: (0, react_dom_2.createPortal)(
|
|
46393
|
+
/* @__PURE__ */ (0, jsx_runtime_2.jsxs)(jsx_runtime_1.Fragment, {
|
|
46394
|
+
children: [
|
|
46395
|
+
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, {
|
|
46396
|
+
...portalProps,
|
|
46397
|
+
className: lightboxClassName,
|
|
46398
|
+
onClick: onClose,
|
|
46399
|
+
style: {
|
|
46400
|
+
position: 'fixed',
|
|
46401
|
+
inset: 0,
|
|
46402
|
+
zIndex: lightbox.zIndex,
|
|
46403
|
+
backgroundColor: lightbox.backdrop ?? 'transparent',
|
|
46404
|
+
},
|
|
46405
|
+
transition,
|
|
46406
|
+
initial: enterExitBackdropAnimation,
|
|
46407
|
+
animate: targetBackdropAnimation,
|
|
46408
|
+
exit: enterExitBackdropAnimation,
|
|
46409
|
+
onTransitionEnd: () => {
|
|
46410
|
+
(0, react_11.startTransition)(() => {
|
|
46411
|
+
setOpenOverrides(void 0);
|
|
46412
|
+
});
|
|
46413
|
+
},
|
|
46414
|
+
}),
|
|
46415
|
+
/* @__PURE__ */ (0, jsx_runtime_1.jsx)('div', {
|
|
46416
|
+
...portalProps,
|
|
46417
|
+
className: lightboxClassName,
|
|
46418
|
+
style: {
|
|
46419
|
+
alignItems: 'center',
|
|
46420
|
+
display: 'flex',
|
|
46421
|
+
inset: `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`,
|
|
46422
|
+
justifyContent: 'center',
|
|
46423
|
+
pointerEvents: 'none',
|
|
46424
|
+
position: 'fixed',
|
|
46425
|
+
zIndex: lightbox.zIndex,
|
|
46426
|
+
},
|
|
46427
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)('div', {
|
|
46428
|
+
style: {
|
|
46429
|
+
alignItems: 'center',
|
|
46430
|
+
aspectRatio: aspectRatio2,
|
|
46431
|
+
display: 'flex',
|
|
46432
|
+
justifyContent: 'center',
|
|
46433
|
+
maxHeight: '100%',
|
|
46434
|
+
position: 'relative',
|
|
46435
|
+
width: '100%',
|
|
46436
|
+
maxWidth: lightbox.maxWidth,
|
|
46437
|
+
},
|
|
46438
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, {
|
|
46439
|
+
layoutId: props.layoutId ?? fallbackLayoutId,
|
|
46440
|
+
transition,
|
|
46441
|
+
onClick: onOpen,
|
|
46442
|
+
className: 'framer-lightbox-container',
|
|
46443
|
+
'data-border': hasAnyBorder,
|
|
46444
|
+
style: {
|
|
46445
|
+
aspectRatio: aspectRatio2,
|
|
46446
|
+
borderRadius: borderRadius2,
|
|
46447
|
+
bottom: 0,
|
|
46448
|
+
position: 'absolute',
|
|
46449
|
+
top: 0,
|
|
46450
|
+
userSelect: 'none',
|
|
46451
|
+
imageRendering,
|
|
46452
|
+
filter: filter2,
|
|
46453
|
+
...border,
|
|
46454
|
+
},
|
|
46455
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(BackgroundImageComponent, {
|
|
46456
|
+
image,
|
|
46457
|
+
alt: image.alt,
|
|
46458
|
+
draggable: props.draggable,
|
|
46459
|
+
}),
|
|
46460
|
+
}),
|
|
46461
|
+
}),
|
|
46462
|
+
}),
|
|
46463
|
+
],
|
|
46464
|
+
}), getPortalContainer2()),
|
|
46465
|
+
}, 'backdrop'),
|
|
46466
|
+
}),
|
|
46467
|
+
],
|
|
46468
|
+
});
|
|
46469
|
+
});
|
|
46470
|
+
}
|
|
46471
|
+
var Component16 = /* @__PURE__ */ react_10.default.forwardRef(function Image2(props, ref) {
|
|
45925
46472
|
const { background, children, alt, draggable, fitImageDimension, style: styleFromProps, ...rest } = props;
|
|
45926
46473
|
const style2 = {
|
|
45927
46474
|
...styleFromProps,
|
|
45928
46475
|
};
|
|
45929
46476
|
const intrinsicSize = (0, react_4.useMemo)(() => getIntrinsicSizeForBackgroundImage(background), [background,]);
|
|
45930
46477
|
const [fallbackIntrinsicSize, setFallbackIntrinsicSize,] = (0, react_4.useState)();
|
|
45931
|
-
|
|
46478
|
+
react_10.default.useLayoutEffect(() => {
|
|
45932
46479
|
if (!(background == null ? void 0 : background.src))
|
|
45933
46480
|
return;
|
|
45934
46481
|
if (!fitImageDimension)
|
|
@@ -45969,7 +46516,8 @@ var Image2 = /* @__PURE__ */ react_11.default.forwardRef(function Image3(props,
|
|
|
45969
46516
|
],
|
|
45970
46517
|
});
|
|
45971
46518
|
});
|
|
45972
|
-
|
|
46519
|
+
var Image3 = /* @__PURE__ */ withLightboxEffect(Component16);
|
|
46520
|
+
exports.Image = Image3;
|
|
45973
46521
|
var frameFromElement = (element) => {
|
|
45974
46522
|
const frame2 = Rect.fromRect(element.getBoundingClientRect());
|
|
45975
46523
|
frame2.x = frame2.x + safeWindow.scrollX;
|
|
@@ -46316,7 +46864,7 @@ var defaultValues2 = {
|
|
|
46316
46864
|
function isEffectKey(key7) {
|
|
46317
46865
|
return key7 in defaultValues2;
|
|
46318
46866
|
}
|
|
46319
|
-
function createKeyframes(effect) {
|
|
46867
|
+
function createKeyframes(effect, shouldReduceMotion) {
|
|
46320
46868
|
const out = {};
|
|
46321
46869
|
for (const key7 in effect) {
|
|
46322
46870
|
if (!isEffectKey(key7))
|
|
@@ -46325,6 +46873,8 @@ function createKeyframes(effect) {
|
|
|
46325
46873
|
const defaultValue = defaultValues2[key7];
|
|
46326
46874
|
if (isUndefined(effectValue) || isUndefined(defaultValue))
|
|
46327
46875
|
continue;
|
|
46876
|
+
if (shouldReduceMotion && key7 !== 'opacity')
|
|
46877
|
+
continue;
|
|
46328
46878
|
out[key7] = [effectValue, defaultValue,];
|
|
46329
46879
|
}
|
|
46330
46880
|
return out;
|
|
@@ -46332,7 +46882,16 @@ function createKeyframes(effect) {
|
|
|
46332
46882
|
var emojiSplitRe = /* @__PURE__ */ (() => {
|
|
46333
46883
|
return new RegExp('\\p{Regional_Indicator}{2}|\\p{Emoji}\\p{Emoji_Modifier}?\\p{Variation_Selector}?(?:\\u{200d}\\p{Emoji}\\p{Emoji_Modifier}?\\p{Variation_Selector}?)*|.', 'gu');
|
|
46334
46884
|
})();
|
|
46335
|
-
function tokenizeText(text, tokenization = 'character', elements, style2) {
|
|
46885
|
+
function tokenizeText(text, tokenization = 'character', elements, shouldReduceMotion, style2) {
|
|
46886
|
+
if (shouldReduceMotion) {
|
|
46887
|
+
const ref = newOverrideableRef();
|
|
46888
|
+
elements.add(ref);
|
|
46889
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)('span', {
|
|
46890
|
+
ref,
|
|
46891
|
+
style: style2,
|
|
46892
|
+
children: text,
|
|
46893
|
+
});
|
|
46894
|
+
}
|
|
46336
46895
|
switch (tokenization) {
|
|
46337
46896
|
case 'character':
|
|
46338
46897
|
// When we want to animate "lines" that aren't split by newlines, but
|
|
@@ -46425,7 +46984,7 @@ function transformString(effect) {
|
|
|
46425
46984
|
transforms.push(`skewY(${effect.skewY}deg)`);
|
|
46426
46985
|
return transforms.join(' ');
|
|
46427
46986
|
}
|
|
46428
|
-
function getInitialEffectStyle(canPlay, canAnimate2, effect) {
|
|
46987
|
+
function getInitialEffectStyle(canPlay, canAnimate2, effect, shouldReduceMotion) {
|
|
46429
46988
|
if (!effect || !effect.effect)
|
|
46430
46989
|
return void 0;
|
|
46431
46990
|
const type = effect.type;
|
|
@@ -46437,8 +46996,8 @@ function getInitialEffectStyle(canPlay, canAnimate2, effect) {
|
|
|
46437
46996
|
return void 0;
|
|
46438
46997
|
return {
|
|
46439
46998
|
opacity: effect.effect.opacity,
|
|
46440
|
-
filter: effect.effect.filter,
|
|
46441
|
-
transform: transformString(effect.effect),
|
|
46999
|
+
filter: shouldReduceMotion ? void 0 : effect.effect.filter,
|
|
47000
|
+
transform: shouldReduceMotion ? void 0 : transformString(effect.effect),
|
|
46442
47001
|
};
|
|
46443
47002
|
case 'line':
|
|
46444
47003
|
case 'word':
|
|
@@ -46452,8 +47011,8 @@ function getInitialEffectStyle(canPlay, canAnimate2, effect) {
|
|
|
46452
47011
|
return {
|
|
46453
47012
|
display: 'inline-block',
|
|
46454
47013
|
opacity: effect.effect.opacity,
|
|
46455
|
-
filter: effect.effect.filter,
|
|
46456
|
-
transform: transformString(effect.effect),
|
|
47014
|
+
filter: shouldReduceMotion ? void 0 : effect.effect.filter,
|
|
47015
|
+
transform: shouldReduceMotion ? void 0 : transformString(effect.effect),
|
|
46457
47016
|
};
|
|
46458
47017
|
}
|
|
46459
47018
|
default:
|
|
@@ -46464,6 +47023,7 @@ function useTextEffect(config, ref, preview) {
|
|
|
46464
47023
|
const elements = useConstant2(() => /* @__PURE__ */ new Set());
|
|
46465
47024
|
const isRenderingStaticContent = isStaticRenderer();
|
|
46466
47025
|
const canPlay = preview || !isRenderingStaticContent;
|
|
47026
|
+
const shouldReduceMotion = useReducedMotionConfig();
|
|
46467
47027
|
const state = React2.useRef({
|
|
46468
47028
|
hasMounted: false,
|
|
46469
47029
|
hasAnimatedOnce: false,
|
|
@@ -46497,7 +47057,7 @@ function useTextEffect(config, ref, preview) {
|
|
|
46497
47057
|
const cleanupRef = {
|
|
46498
47058
|
current: void 0,
|
|
46499
47059
|
};
|
|
46500
|
-
void runAppearEffect(tokenization2, effect.effect, elements, transition, startDelay, repeat, () => {
|
|
47060
|
+
void runAppearEffect(tokenization2, effect.effect, elements, transition, startDelay, repeat, shouldReduceMotion, () => {
|
|
46501
47061
|
Object.assign(state.current, {
|
|
46502
47062
|
isAnimating: false,
|
|
46503
47063
|
});
|
|
@@ -46548,9 +47108,9 @@ function useTextEffect(config, ref, preview) {
|
|
|
46548
47108
|
if (!effectEnabled)
|
|
46549
47109
|
return void 0;
|
|
46550
47110
|
const { hasMounted, hasAnimatedOnce, effect, } = state.current;
|
|
46551
|
-
const effectStyle = getInitialEffectStyle(canPlay, preview || mayAnimate(hasMounted, hasAnimatedOnce, effect), state.current.effect);
|
|
47111
|
+
const effectStyle = getInitialEffectStyle(canPlay, preview || mayAnimate(hasMounted, hasAnimatedOnce, effect), state.current.effect, shouldReduceMotion);
|
|
46552
47112
|
return {
|
|
46553
|
-
text: (text) => tokenizeText(text, tokenization, elements, effectStyle),
|
|
47113
|
+
text: (text) => tokenizeText(text, tokenization, elements, shouldReduceMotion, effectStyle),
|
|
46554
47114
|
props: (style2) => {
|
|
46555
47115
|
if ((effect == null ? void 0 : effect.tokenization) !== 'element')
|
|
46556
47116
|
return void 0;
|
|
@@ -46574,7 +47134,7 @@ function useTextEffect(config, ref, preview) {
|
|
|
46574
47134
|
switch (type) {
|
|
46575
47135
|
case 'appear': {
|
|
46576
47136
|
const { transition, startDelay, } = effect;
|
|
46577
|
-
void runAppearEffect(tokenization, effect.effect, elements, transition, startDelay);
|
|
47137
|
+
void runAppearEffect(tokenization, effect.effect, elements, transition, startDelay, false, shouldReduceMotion);
|
|
46578
47138
|
break;
|
|
46579
47139
|
}
|
|
46580
47140
|
default:
|
|
@@ -46594,8 +47154,8 @@ function mayAnimate(hasMounted, hasAnimatedOnce, effect) {
|
|
|
46594
47154
|
hasAnimatedOnce && !(effect == null ? void 0 : effect.repeat) &&
|
|
46595
47155
|
((effect == null ? void 0 : effect.trigger) === 'onInView' || (effect == null ? void 0 : effect.trigger) === 'onScrollTarget'));
|
|
46596
47156
|
}
|
|
46597
|
-
async function runAppearEffect(tokenization = 'character', effect, elements, transition, startDelay = 0, repeat = false, callback, cleanupRef) {
|
|
46598
|
-
const enter = createKeyframes(effect);
|
|
47157
|
+
async function runAppearEffect(tokenization = 'character', effect, elements, transition, startDelay = 0, repeat = false, shouldReduceMotion, callback, cleanupRef) {
|
|
47158
|
+
const enter = createKeyframes(effect, shouldReduceMotion);
|
|
46599
47159
|
const controller = new AbortController();
|
|
46600
47160
|
if (cleanupRef)
|
|
46601
47161
|
cleanupRef.current = () => controller.abort();
|
|
@@ -46615,13 +47175,20 @@ async function runAppearEffect(tokenization = 'character', effect, elements, tra
|
|
|
46615
47175
|
}).then(() => callback == null ? void 0 : callback());
|
|
46616
47176
|
if (!repeat || !cleanupRef)
|
|
46617
47177
|
return;
|
|
46618
|
-
cleanupRef.current = () =>
|
|
46619
|
-
|
|
46620
|
-
|
|
46621
|
-
|
|
46622
|
-
|
|
46623
|
-
|
|
46624
|
-
|
|
47178
|
+
cleanupRef.current = () => {
|
|
47179
|
+
const actualEffect = shouldReduceMotion
|
|
47180
|
+
? {
|
|
47181
|
+
opacity: effect.opacity,
|
|
47182
|
+
}
|
|
47183
|
+
: effect;
|
|
47184
|
+
void animate(list, actualEffect, {
|
|
47185
|
+
...transition,
|
|
47186
|
+
restDelta: 1e-3,
|
|
47187
|
+
delay: stagger((transition == null ? void 0 : transition.delay) ?? 0, {
|
|
47188
|
+
startDelay,
|
|
47189
|
+
}),
|
|
47190
|
+
});
|
|
47191
|
+
};
|
|
46625
47192
|
return;
|
|
46626
47193
|
}
|
|
46627
47194
|
case 'line': {
|
|
@@ -46658,8 +47225,13 @@ async function runAppearEffect(tokenization = 'character', effect, elements, tra
|
|
|
46658
47225
|
cleanupRef.current = () => {
|
|
46659
47226
|
if (list.length === 0)
|
|
46660
47227
|
return;
|
|
47228
|
+
const actualEffect = shouldReduceMotion
|
|
47229
|
+
? {
|
|
47230
|
+
opacity: effect.opacity,
|
|
47231
|
+
}
|
|
47232
|
+
: effect;
|
|
46661
47233
|
list.forEach((group, i) => {
|
|
46662
|
-
void animate(group,
|
|
47234
|
+
void animate(group, actualEffect, {
|
|
46663
47235
|
...transition,
|
|
46664
47236
|
restDelta: 1e-3,
|
|
46665
47237
|
delay: startDelay + i * ((transition == null ? void 0 : transition.delay) ?? 0),
|
|
@@ -46764,13 +47336,12 @@ var RichTextContainer = /* @__PURE__ */ (0, react_7.forwardRef)(function RichTex
|
|
|
46764
47336
|
return null;
|
|
46765
47337
|
const isHidden = isEditable && environment2() === RenderTarget.canvas;
|
|
46766
47338
|
const containerStyle = {
|
|
46767
|
-
outline: 'none',
|
|
46768
|
-
display: 'flex',
|
|
46769
|
-
flexDirection: 'column',
|
|
46770
|
-
justifyContent: convertVerticalAlignment(verticalAlignment),
|
|
46771
47339
|
opacity: isHidden ? 0 : opacity,
|
|
46772
|
-
flexShrink: 0,
|
|
46773
47340
|
};
|
|
47341
|
+
const justifyContent = convertVerticalAlignment(verticalAlignment);
|
|
47342
|
+
if (justifyContent !== defaultRichTextContainerStyle.justifyContent) {
|
|
47343
|
+
containerStyle.justifyContent = justifyContent;
|
|
47344
|
+
}
|
|
46774
47345
|
const positionStyle = {};
|
|
46775
47346
|
const restrictedRenderTarget = RenderTarget.hasRestrictions();
|
|
46776
47347
|
const frame2 = calculateRect(props, parentSize || 0, false);
|
|
@@ -46816,11 +47387,11 @@ var RichTextContainer = /* @__PURE__ */ (0, react_7.forwardRef)(function RichTex
|
|
|
46816
47387
|
if (layoutId) {
|
|
46817
47388
|
rest.layout = 'preserve-aspect';
|
|
46818
47389
|
}
|
|
46819
|
-
const
|
|
47390
|
+
const Component18 = htmlElementAsMotionComponent(props.as);
|
|
46820
47391
|
const dataFramerName = rest['data-framer-name'] ?? name;
|
|
46821
47392
|
if (isString(props.viewBox)) {
|
|
46822
47393
|
if (props.as !== void 0) {
|
|
46823
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
47394
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
46824
47395
|
...rest,
|
|
46825
47396
|
ref: containerRef,
|
|
46826
47397
|
style: containerStyle,
|
|
@@ -46854,7 +47425,7 @@ var RichTextContainer = /* @__PURE__ */ (0, react_7.forwardRef)(function RichTex
|
|
|
46854
47425
|
});
|
|
46855
47426
|
}
|
|
46856
47427
|
}
|
|
46857
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
47428
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
46858
47429
|
...rest,
|
|
46859
47430
|
ref: containerRef,
|
|
46860
47431
|
style: containerStyle,
|
|
@@ -47443,7 +48014,7 @@ function getSVGSize(svg) {
|
|
|
47443
48014
|
var SVG = /* @__PURE__ */ (0, react_7.forwardRef)(function SVG2(props, forwardedRef) {
|
|
47444
48015
|
const parentSize = useParentSize();
|
|
47445
48016
|
const layoutId = useLayoutId2(props);
|
|
47446
|
-
const layoutRef =
|
|
48017
|
+
const layoutRef = react_10.default.useRef(null);
|
|
47447
48018
|
const ref = forwardedRef ?? layoutRef;
|
|
47448
48019
|
const providedWindow = useProvidedWindow();
|
|
47449
48020
|
useMeasureLayout(props, layoutRef);
|
|
@@ -47501,7 +48072,7 @@ function sizeSVG(container, props) {
|
|
|
47501
48072
|
svg.setAttribute('height', '100%');
|
|
47502
48073
|
}
|
|
47503
48074
|
function SVGStyleSheet() {
|
|
47504
|
-
|
|
48075
|
+
react_10.default.useInsertionEffect(() => {
|
|
47505
48076
|
injectComponentCSSRules();
|
|
47506
48077
|
}, []);
|
|
47507
48078
|
return null;
|
|
@@ -47511,7 +48082,7 @@ var SVGComponent = /* @__PURE__ */ (() => {
|
|
|
47511
48082
|
return _a = class extends Layer {
|
|
47512
48083
|
constructor() {
|
|
47513
48084
|
super(...arguments);
|
|
47514
|
-
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'container',
|
|
48085
|
+
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'container', react_10.default.createRef());
|
|
47515
48086
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'svgElement', null);
|
|
47516
48087
|
(0, chunk_A2PMVMFI_js_1.__publicField)(this, 'setSVGElement', (element) => {
|
|
47517
48088
|
this.svgElement = element;
|
|
@@ -47807,8 +48378,8 @@ var SVGComponent = /* @__PURE__ */ (() => {
|
|
|
47807
48378
|
})();
|
|
47808
48379
|
function useFontLoadStatus(fontSelectors = [], timeout = 5e3) {
|
|
47809
48380
|
const missingFontSelectors = fontSelectors.filter((s) => !fontStore.isSelectorLoaded(s));
|
|
47810
|
-
const [fontLoadStatus, setFontLoadStatus,] =
|
|
47811
|
-
|
|
48381
|
+
const [fontLoadStatus, setFontLoadStatus,] = react_10.default.useState(missingFontSelectors.length ? 'loading' : 'done');
|
|
48382
|
+
react_10.default.useEffect(() => {
|
|
47812
48383
|
if (!missingFontSelectors.length)
|
|
47813
48384
|
return;
|
|
47814
48385
|
setFontLoadStatus('loading');
|
|
@@ -47823,12 +48394,12 @@ function useFontLoadStatus(fontSelectors = [], timeout = 5e3) {
|
|
|
47823
48394
|
return fontLoadStatus;
|
|
47824
48395
|
}
|
|
47825
48396
|
function TextStyleSheet() {
|
|
47826
|
-
|
|
48397
|
+
react_10.default.useInsertionEffect(() => {
|
|
47827
48398
|
injectComponentCSSRules();
|
|
47828
48399
|
}, []);
|
|
47829
48400
|
return null;
|
|
47830
48401
|
}
|
|
47831
|
-
var Text2 = /* @__PURE__ */
|
|
48402
|
+
var Text2 = /* @__PURE__ */ react_10.default.forwardRef(function Text3(props, forwardedRef) {
|
|
47832
48403
|
const parentSize = useParentSize();
|
|
47833
48404
|
const layoutId = useLayoutId2(props);
|
|
47834
48405
|
const fallbackLayoutRef = (0, react_4.useRef)(null);
|
|
@@ -47856,7 +48427,7 @@ var Text2 = /* @__PURE__ */ react_11.default.forwardRef(function Text3(props, fo
|
|
|
47856
48427
|
});
|
|
47857
48428
|
}, [fonts,]);
|
|
47858
48429
|
const implicitPathVariables = useImplicitPathVariables();
|
|
47859
|
-
const interceptPageLinks =
|
|
48430
|
+
const interceptPageLinks = react_10.default.useCallback((event) => {
|
|
47860
48431
|
const anchorElement = findAnchorElement(event.target, layoutRef.current);
|
|
47861
48432
|
if (event.metaKey || !navigate || !anchorElement)
|
|
47862
48433
|
return;
|
|
@@ -47872,7 +48443,7 @@ var Text2 = /* @__PURE__ */ react_11.default.forwardRef(function Text3(props, fo
|
|
|
47872
48443
|
ref.addEventListener('click', interceptPageLinks);
|
|
47873
48444
|
return () => ref.removeEventListener('click', interceptPageLinks);
|
|
47874
48445
|
}, [interceptPageLinks,]);
|
|
47875
|
-
const rawHTML =
|
|
48446
|
+
const rawHTML = react_10.default.useMemo(() => {
|
|
47876
48447
|
if (!props.rawHTML || onCanvas || !getRoute || !currentRoute)
|
|
47877
48448
|
return props.rawHTML;
|
|
47878
48449
|
return replaceFramerPageLinks(props.rawHTML, getRoute, currentRoute, implicitPathVariables);
|
|
@@ -48465,8 +49036,8 @@ function getRadialGradientTransform(heightFactor, widthFactor, centerAnchorX, ce
|
|
|
48465
49036
|
}
|
|
48466
49037
|
var SVGRoot = (props) => {
|
|
48467
49038
|
const { id: id3, children, left, width, height, top, style: style2, _needsMeasure, } = props;
|
|
48468
|
-
const inCodeComponent =
|
|
48469
|
-
const ref =
|
|
49039
|
+
const inCodeComponent = react_10.default.useContext(ComponentContainerContext);
|
|
49040
|
+
const ref = react_10.default.useRef(null);
|
|
48470
49041
|
useMeasureLayout({
|
|
48471
49042
|
id: id3,
|
|
48472
49043
|
// SVGRoot won't be rendered if the node is invisible.
|
|
@@ -49193,10 +49764,13 @@ function initialRouteComponent(component) {
|
|
|
49193
49764
|
function useInitialRouteComponent(routes, homeNodeId) {
|
|
49194
49765
|
var _a;
|
|
49195
49766
|
const InitialRouteComponent = (_a = routes[homeNodeId]) == null ? void 0 : _a.page;
|
|
49196
|
-
const [RouteComponent, setRouteComponent,] = (0, react_4.useState)(initialRouteComponent(InitialRouteComponent));
|
|
49767
|
+
const [RouteComponent, setRouteComponent,] = (0, react_4.useState)(() => initialRouteComponent(InitialRouteComponent));
|
|
49197
49768
|
(0, react_2.useEffect)(() => {
|
|
49198
49769
|
if (withPreload(InitialRouteComponent)) {
|
|
49199
|
-
void
|
|
49770
|
+
void (async () => {
|
|
49771
|
+
await InitialRouteComponent.preload();
|
|
49772
|
+
setRouteComponent(InitialRouteComponent);
|
|
49773
|
+
})();
|
|
49200
49774
|
}
|
|
49201
49775
|
}, []);
|
|
49202
49776
|
return RouteComponent;
|
|
@@ -49233,12 +49807,12 @@ var package_default = {
|
|
|
49233
49807
|
'@types/dom-navigation': '^1.0.5',
|
|
49234
49808
|
'@types/fontfaceobserver': '2.1',
|
|
49235
49809
|
'@types/google.fonts': '1.0',
|
|
49236
|
-
'@types/node': '22.
|
|
49810
|
+
'@types/node': '22.18',
|
|
49237
49811
|
'@types/react': '18.2',
|
|
49238
49812
|
'@types/react-dom': '18.2',
|
|
49239
49813
|
'@types/yargs': '^17.0.33',
|
|
49240
|
-
'@typescript-eslint/eslint-plugin': '^8.
|
|
49241
|
-
'@typescript-eslint/parser': '^8.
|
|
49814
|
+
'@typescript-eslint/eslint-plugin': '^8.40.0',
|
|
49815
|
+
'@typescript-eslint/parser': '^8.40.0',
|
|
49242
49816
|
chalk: '^4.1.2',
|
|
49243
49817
|
eslint: '^8.57.1',
|
|
49244
49818
|
'eslint-plugin-framer-studio': 'workspace:*',
|
|
@@ -49247,15 +49821,14 @@ var package_default = {
|
|
|
49247
49821
|
'jest-diff': '^29.3.1',
|
|
49248
49822
|
'jest-environment-jsdom': '^29.3.1',
|
|
49249
49823
|
'jest-environment-jsdom-global': '^4.0.0',
|
|
49250
|
-
'jest-junit': '^15.0.0',
|
|
49251
49824
|
react: '^18.2.0',
|
|
49252
49825
|
'react-dom': '^18.2.0',
|
|
49253
49826
|
semver: '^7.7.1',
|
|
49254
|
-
typescript: '^5.
|
|
49827
|
+
typescript: '^5.9.2',
|
|
49255
49828
|
yargs: '^17.7.2',
|
|
49256
49829
|
},
|
|
49257
49830
|
peerDependencies: {
|
|
49258
|
-
'framer-motion': '
|
|
49831
|
+
'framer-motion': '12.20.2',
|
|
49259
49832
|
react: '^18.2.0',
|
|
49260
49833
|
'react-dom': '^18.2.0',
|
|
49261
49834
|
},
|