unframer 2.5.1 → 2.5.3
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 +6 -0
- package/dist/esbuild.d.ts +2 -1
- package/dist/esbuild.d.ts.map +1 -1
- package/dist/esbuild.js +7 -1
- package/dist/esbuild.js.map +1 -1
- package/dist/framer.d.ts.map +1 -1
- package/dist/framer.js +927 -450
- package/dist/framer.js.map +1 -1
- package/esm/esbuild.d.ts +2 -1
- package/esm/esbuild.d.ts.map +1 -1
- package/esm/esbuild.js +7 -1
- package/esm/esbuild.js.map +1 -1
- package/esm/framer.d.ts.map +1 -1
- package/esm/framer.js +919 -444
- package/esm/framer.js.map +1 -1
- package/package.json +1 -1
- package/src/esbuild.ts +7 -0
- package/src/framer.js +1003 -469
package/dist/framer.js
CHANGED
|
@@ -48,13 +48,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
48
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
49
|
exports.ComponentViewportProvider = exports.ComponentPresetsProvider = exports.ComponentPresetsConsumer = exports.ComponentContainerContext = exports.complex = exports.combinedCSSRulesForPreview = exports.ColorMixModelType = exports.ColorFormat = exports.color = exports.Color = exports.collectVisualStyleFromProps = exports.clamp = exports.circOut = exports.circInOut = exports.circIn = exports.cancelSync = exports.cancelFrame = exports.callEach = exports.calculateRect = exports.calcLength = exports.buildTransform = exports.BoxShadow = exports.BezierAnimator = exports.backOut = exports.backInOut = exports.backIn = exports.backgroundImageFromProps = exports.BackgroundImage = exports.AutomaticLayoutIds = exports.AnyInterpolation = exports.anticipate = exports.annotateTypeOnStringify = exports.animations = exports.animationControls = exports.animateVisualElement = exports.animateValue = exports.AnimateSharedLayout = exports.AnimatePresence = exports.animate = exports.Animatable = exports.AnchorLinkTarget = exports.addScaleCorrector = exports.addPropertyControls = exports.addPointerInfo = exports.addPointerEvent = exports.addFonts = exports.addActionControls = exports.AcceleratedAnimation = exports._injectRuntime = exports.combinedCSSRules = void 0;
|
|
50
50
|
exports.environment = exports.EmptyState = exports.easeOut = exports.easeInOut = exports.easeIn = exports.Draggable = exports.DragControls = exports.domMax = exports.domAnimation = exports.DOM = exports.distance2D = exports.distance = exports.dispatchKeyDownEvent = exports.disableInstantTransitions = exports.DimensionType = exports.devicePresets = exports.DeviceCodeComponent = exports.Device = exports.LayoutGroupContext = exports.DeprecatedLayoutGroupContext = exports.DeprecatedFrameWithEvents = exports.DeprecatedComponentContainer = exports.delay = exports.degreesToRadians = exports.defaultDeviceProps = exports.debounce = exports.DataObserverContext = exports.DataObserver = exports.DataContext = exports.Data = exports.CycleVariantState = exports.cx = exports.CustomProperties = exports.CustomCursorHost = exports.cubicBezier = exports.cssBackgroundSize = exports.createScopedAnimate = exports.createMotionComponent = exports.createFramerPageLink = exports.createDomMotionComponent = exports.createData = exports.createBox = exports.convertPropsToDeviceOptions = exports.convertPresentationTree = exports.ConvertColor = exports.ControlType = exports.Container = exports.ConstraintValues = exports.constraintsEnabled = exports.ConstraintMask = void 0;
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
54
|
-
exports.
|
|
55
|
-
exports.
|
|
56
|
-
exports.wrap = exports.withVariantFX = exports.withVariantAppearEffect = exports.withStyleAppearEffect = exports.withShape = exports.withPath = exports.withParallaxTransform = exports.WithOverride = exports.withOpacity = exports.WithNavigator = exports.withMeasuredSize = exports.withMappedReactProps = exports.withGeneratedLayoutId = exports.withFX = exports.withCSS = exports.WindowContext = exports.warning = exports.visualElementStore = exports.VisualElement = exports.version = exports.VectorGroup = exports.Vector = exports.VariantSelector = exports.valueToDimensionType = void 0;
|
|
57
|
-
// https :https://app.framerstatic.com/chunk-
|
|
51
|
+
exports.invariant = exports.interpolate = exports.InternalID = exports.installFlexboxGapWorkaroundIfNeeded = exports.injectComponentCSSRules = exports.inferInitialRouteFromPath = exports.imageUrlForAsset = exports.imagePatternPropsForFill = exports.Image = exports.gradientForShape = exports.getWhereExpressionFromPathVariables = exports.getPropertyControls = exports.getMergedConstraintsProps = exports.getMeasurableCodeComponentChildren = exports.getFontsFromSharedStyle = exports.getFontsFromComponentPreset = exports.getFonts = exports.getDevicePreset = exports.getComponentSize = exports.GeneratedComponentContext = exports.GamepadContext = exports.FrameWithMotion = exports.FramerEventSession = exports.FramerEventListener = exports.FramerEvent = exports.framerCSSMarker = exports.framerAppearTransformTemplateToken = exports.framerAppearIdKey = exports.framerAppearEffects = exports.framerAppearAnimationScriptKey = exports.FramerAnimation = exports.frameFromElements = exports.frameFromElement = exports.frameData = exports.frame = exports.Frame = exports.fraction = exports.FormSelect = exports.FormPlainTextInput = exports.FormContainer = exports.FormBooleanInput = exports.forceLayerBackingWithCSSProperties = exports.fontStore = exports.FontSourceNames = exports.Floating = exports.FlatTree = exports.finiteNumber = exports.filterProps = exports.executeInRenderEnvironment = exports.ErrorPlaceholder = void 0;
|
|
52
|
+
exports.motionValue = exports.MotionValue = exports.MotionSetup = exports.MotionGlobalConfig = exports.MotionContext = exports.MotionConfigContext = exports.MotionConfig = exports.motion = exports.modulate = exports.mix = exports.mirrorEasing = exports.memoize = exports.makeUseVisualState = exports.makePaddingString = exports.MainLoop = exports.m = exports.localShadowFrame = exports.localPackageFallbackIdentifier = exports.loadJSON = exports.loadFont = exports.Link = exports.LinearGradient = exports.Line = exports.LibraryFeaturesProvider = exports.LazyValue = exports.LazyMotion = exports.lazy = exports.LayoutIdContext = exports.LayoutGroup = exports.Layer = exports.isValidMotionProp = exports.isStraightCurve = exports.isShallowEqualArray = exports.isRelativeNumber = exports.isReactDefinition = exports.isOverride = exports.isOfAnnotatedType = exports.isMotionValue = exports.isMotionComponent = exports.isGapEnabled = exports.isFramerPageLink = exports.isFramerGamepadKeydownData = exports.isFractionDimension = exports.isFiniteNumber = exports.isEqual = exports.isDragActive = exports.isDesignDefinition = exports.isBrowser = exports.isAnimatable = exports.inView = void 0;
|
|
53
|
+
exports.setGlobalRenderEnvironment = exports.scrollInfo = exports.scroll = exports.Scroll = exports.roundWithOffset = exports.roundedNumberString = exports.roundedNumber = exports.RichText = exports.reverseEasing = exports.resolvePageScope = exports.resolveMotionValue = exports.ResolveLinks = exports.resolveLink = exports.Reorder = exports.RenderTarget = exports.removeHiddenBreakpointLayersV2 = exports.removeHiddenBreakpointLayers = exports.Rect = exports.RadialGradient = exports.QueryEngine = exports.px = exports.pushLoadMoreHistory = exports.propsForLink = exports.PropertyStore = exports.PropertyOverrides = exports.progress = exports.print = exports.PresenceContext = exports.Polygon = exports.Point = exports.pipe = exports.PathVariablesContext = exports.PathSegment = exports.pathDefaults = exports.parseFramerPageLink = exports.ParentSizeState = exports.PageRoot = exports.PageEffectsProvider = exports.Page = exports.paddingFromProps = exports.optimizedAppearDataAttribute = exports.optimizeAppearTransformTemplate = exports.optimizeAppear = exports.ObservableObject = exports.NotFoundError = exports.Navigation = exports.NavigationTransitionType = exports.NavigationConsumer = exports.NavigationCallbackProvider = exports.NavigateTo = void 0;
|
|
54
|
+
exports.useHotkey = exports.useGamepad = exports.useForceUpdate = exports.useElementScroll = exports.useDynamicRefs = exports.useDragControls = exports.useDomEvent = exports.useDataRecord = exports.useCycle = exports.useCustomCursors = exports.useCurrentRouteId = exports.useCurrentPathVariables = exports.useConstant = exports.useComponentViewport = exports.useBreakpointVariants = exports.useAnimationFrame = exports.useAnimationControls = exports.useAnimation = exports.useDeprecatedAnimatedState = exports.useAnimatedState = exports.useAnimate = exports.useAddVariantProps = exports.useActiveVariantCallback = exports.useActiveTargetCallback = exports.unwrapMotionComponent = exports.transformTemplate = exports.transformString = exports.transform = exports.toSVGPath = exports.toJustifyOrAlignment = exports.toFlexDirection = exports.throttle = exports.Text = exports.systemFontFamilyName = exports.sync = exports.SwitchLayoutGroupContext = exports.SVG = exports.StyleSheetContext = exports.steps = exports.startOptimizedAppearAnimation = exports.startAnimation = exports.stagger = exports.Stack = exports.SSRVariants = exports.SpringAnimator = exports.spring = exports.Size = exports.shouldOpenLinkInNewTab = exports.sharedSVGManager = exports.Shadow = void 0;
|
|
55
|
+
exports.useWillChange = exports.useViewportScroll = exports.useVelocity = exports.useVariantState = exports.useUnmountEffect = exports.useTransform = exports.useTime = exports.useSpring = exports.useScroll = exports.useRouter = exports.useRouteHandler = exports.useRouteElementId = exports.useRouteAnchor = exports.useRoute = exports.useResetProjection = exports.useRenderEnvironment = exports.useReducedMotionConfig = exports.useReducedMotion = exports.useQueryData = exports.useProvidedWindow = exports.usePrototypeNavigate = exports.usePresence = exports.usePageEffects = exports.useOverlayState = exports.useOnVariantChange = exports.useOnCurrentTargetChange = exports.useOnAppear = exports.useObserveData = exports.useNavigation = exports.useNavigate = exports.useMotionValueEvent = exports.useMotionValue = exports.useMotionTemplate = exports.useMeasureLayout = exports.useLocalizationInfo = exports.useLocaleInfo = exports.useLocaleCode = exports.useLocale = exports.useLoadMorePaginatedQuery = exports.useIsPresent = exports.useIsOnFramerCanvas = exports.useIsomorphicLayoutEffect = exports.useIsInCurrentNavigationTarget = exports.useInView = exports.useDeprecatedInvertedScale = exports.useInvertedScale = exports.useInstantTransition = exports.useInstantLayoutTransition = exports.useInitialRouteComponent = exports.useHydratedBreakpointVariants = void 0;
|
|
56
|
+
exports.wrap = exports.withVariantFX = exports.withVariantAppearEffect = exports.withStyleAppearEffect = exports.withShape = exports.withPath = exports.withParallaxTransform = exports.WithOverride = exports.withOpacity = exports.WithNavigator = exports.withMeasuredSize = exports.withMappedReactProps = exports.withInfiniteScroll = exports.withGeneratedLayoutId = exports.withFX = exports.withCSS = exports.WindowContext = exports.warning = exports.visualElementStore = exports.VisualElement = exports.version = exports.VectorGroup = exports.Vector = exports.VariantSelector = exports.valueToDimensionType = exports.ValueInterpolation = void 0;
|
|
57
|
+
// https :https://app.framerstatic.com/chunk-DUHOOT7P.js
|
|
58
58
|
const react_1 = require("react");
|
|
59
59
|
const react_2 = require("react");
|
|
60
60
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -1300,6 +1300,9 @@ function hslaToRgba({ hue, saturation, lightness, alpha: alpha2, }) {
|
|
|
1300
1300
|
alpha: alpha2,
|
|
1301
1301
|
};
|
|
1302
1302
|
}
|
|
1303
|
+
function mixImmediate(a, b) {
|
|
1304
|
+
return (p) => p > 0 ? b : a;
|
|
1305
|
+
}
|
|
1303
1306
|
var mixLinearColor = (from, to, v) => {
|
|
1304
1307
|
const fromExpo = from * from;
|
|
1305
1308
|
const expo = v * (to * to - fromExpo) + fromExpo;
|
|
@@ -1309,7 +1312,9 @@ var colorTypes = [hex, rgba, hsla,];
|
|
|
1309
1312
|
var getColorType = (v) => colorTypes.find((type) => type.test(v));
|
|
1310
1313
|
function asRGBA(color2) {
|
|
1311
1314
|
const type = getColorType(color2);
|
|
1312
|
-
|
|
1315
|
+
warning(Boolean(type), `'${color2}' is not an animatable color. Use the equivalent color code instead.`);
|
|
1316
|
+
if (!Boolean(type))
|
|
1317
|
+
return false;
|
|
1313
1318
|
let model = type.parse(color2);
|
|
1314
1319
|
if (type === hsla) {
|
|
1315
1320
|
model = hslaToRgba(model);
|
|
@@ -1319,6 +1324,9 @@ function asRGBA(color2) {
|
|
|
1319
1324
|
var mixColor = (from, to) => {
|
|
1320
1325
|
const fromRGBA = asRGBA(from);
|
|
1321
1326
|
const toRGBA = asRGBA(to);
|
|
1327
|
+
if (!fromRGBA || !toRGBA) {
|
|
1328
|
+
return mixImmediate(from, to);
|
|
1329
|
+
}
|
|
1322
1330
|
const blended = Object.assign({}, fromRGBA);
|
|
1323
1331
|
return (v) => {
|
|
1324
1332
|
blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);
|
|
@@ -1347,9 +1355,6 @@ function mixVisibility(origin, target) {
|
|
|
1347
1355
|
return (p) => p >= 1 ? target : origin;
|
|
1348
1356
|
}
|
|
1349
1357
|
}
|
|
1350
|
-
function mixImmediate(a, b) {
|
|
1351
|
-
return (p) => p > 0 ? b : a;
|
|
1352
|
-
}
|
|
1353
1358
|
function mixNumber2(a, b) {
|
|
1354
1359
|
return (p) => mixNumber(a, b, p);
|
|
1355
1360
|
}
|
|
@@ -2373,14 +2378,17 @@ var DOMKeyframesResolver = class extends KeyframeResolver {
|
|
|
2373
2378
|
return;
|
|
2374
2379
|
super.readKeyframes();
|
|
2375
2380
|
for (let i = 0; i < unresolvedKeyframes.length; i++) {
|
|
2376
|
-
|
|
2377
|
-
if (typeof keyframe === 'string'
|
|
2378
|
-
|
|
2379
|
-
if (
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2381
|
+
let keyframe = unresolvedKeyframes[i];
|
|
2382
|
+
if (typeof keyframe === 'string') {
|
|
2383
|
+
keyframe = keyframe.trim();
|
|
2384
|
+
if (isCSSVariableToken(keyframe)) {
|
|
2385
|
+
const resolved = getVariableValue(keyframe, element.current);
|
|
2386
|
+
if (resolved !== void 0) {
|
|
2387
|
+
unresolvedKeyframes[i] = resolved;
|
|
2388
|
+
}
|
|
2389
|
+
if (i === unresolvedKeyframes.length - 1) {
|
|
2390
|
+
this.finalKeyframe = keyframe;
|
|
2391
|
+
}
|
|
2384
2392
|
}
|
|
2385
2393
|
}
|
|
2386
2394
|
}
|
|
@@ -2780,7 +2788,7 @@ var MotionValue = class {
|
|
|
2780
2788
|
* @internal
|
|
2781
2789
|
*/
|
|
2782
2790
|
constructor(init, options = {}) {
|
|
2783
|
-
this.version = '11.2.
|
|
2791
|
+
this.version = '11.2.10';
|
|
2784
2792
|
this.canTrackVelocity = null;
|
|
2785
2793
|
this.events = {};
|
|
2786
2794
|
this.updateAndNotify = (v, render = true) => {
|
|
@@ -3079,6 +3087,95 @@ function isTransitionDefined(_f) {
|
|
|
3079
3087
|
function getValueTransition(transition, key7) {
|
|
3080
3088
|
return transition[key7] || transition['default'] || transition;
|
|
3081
3089
|
}
|
|
3090
|
+
function observeTimeline(update, timeline) {
|
|
3091
|
+
let prevProgress;
|
|
3092
|
+
const onFrame = () => {
|
|
3093
|
+
const { currentTime, } = timeline;
|
|
3094
|
+
const percentage = currentTime === null ? 0 : currentTime.value;
|
|
3095
|
+
const progress2 = percentage / 100;
|
|
3096
|
+
if (prevProgress !== progress2) {
|
|
3097
|
+
update(progress2);
|
|
3098
|
+
}
|
|
3099
|
+
prevProgress = progress2;
|
|
3100
|
+
};
|
|
3101
|
+
frame.update(onFrame, true);
|
|
3102
|
+
return () => cancelFrame(onFrame);
|
|
3103
|
+
}
|
|
3104
|
+
var supportsScrollTimeline = memo(() => window.ScrollTimeline !== void 0);
|
|
3105
|
+
var GroupPlaybackControls = class {
|
|
3106
|
+
constructor(animations2) {
|
|
3107
|
+
this.stop = () => this.runAll('stop');
|
|
3108
|
+
this.animations = animations2.filter(Boolean);
|
|
3109
|
+
}
|
|
3110
|
+
then(onResolve, onReject) {
|
|
3111
|
+
return Promise.all(this.animations).then(onResolve).catch(onReject);
|
|
3112
|
+
}
|
|
3113
|
+
/**
|
|
3114
|
+
* TODO: Filter out cancelled or stopped animations before returning
|
|
3115
|
+
*/
|
|
3116
|
+
getAll(propName) {
|
|
3117
|
+
return this.animations[0][propName];
|
|
3118
|
+
}
|
|
3119
|
+
setAll(propName, newValue) {
|
|
3120
|
+
for (let i = 0; i < this.animations.length; i++) {
|
|
3121
|
+
this.animations[i][propName] = newValue;
|
|
3122
|
+
}
|
|
3123
|
+
}
|
|
3124
|
+
attachTimeline(timeline) {
|
|
3125
|
+
const cancelAll = this.animations.map((animation) => {
|
|
3126
|
+
if (supportsScrollTimeline() && animation.attachTimeline) {
|
|
3127
|
+
animation.attachTimeline(timeline);
|
|
3128
|
+
}
|
|
3129
|
+
else {
|
|
3130
|
+
animation.pause();
|
|
3131
|
+
return observeTimeline((progress2) => {
|
|
3132
|
+
animation.time = animation.duration * progress2;
|
|
3133
|
+
}, timeline);
|
|
3134
|
+
}
|
|
3135
|
+
});
|
|
3136
|
+
return () => {
|
|
3137
|
+
cancelAll.forEach((cancelTimeline, i) => {
|
|
3138
|
+
if (cancelTimeline)
|
|
3139
|
+
cancelTimeline();
|
|
3140
|
+
this.animations[i].stop();
|
|
3141
|
+
});
|
|
3142
|
+
};
|
|
3143
|
+
}
|
|
3144
|
+
get time() {
|
|
3145
|
+
return this.getAll('time');
|
|
3146
|
+
}
|
|
3147
|
+
set time(time2) {
|
|
3148
|
+
this.setAll('time', time2);
|
|
3149
|
+
}
|
|
3150
|
+
get speed() {
|
|
3151
|
+
return this.getAll('speed');
|
|
3152
|
+
}
|
|
3153
|
+
set speed(speed) {
|
|
3154
|
+
this.setAll('speed', speed);
|
|
3155
|
+
}
|
|
3156
|
+
get duration() {
|
|
3157
|
+
let max = 0;
|
|
3158
|
+
for (let i = 0; i < this.animations.length; i++) {
|
|
3159
|
+
max = Math.max(max, this.animations[i].duration);
|
|
3160
|
+
}
|
|
3161
|
+
return max;
|
|
3162
|
+
}
|
|
3163
|
+
runAll(methodName) {
|
|
3164
|
+
this.animations.forEach((controls) => controls[methodName]());
|
|
3165
|
+
}
|
|
3166
|
+
play() {
|
|
3167
|
+
this.runAll('play');
|
|
3168
|
+
}
|
|
3169
|
+
pause() {
|
|
3170
|
+
this.runAll('pause');
|
|
3171
|
+
}
|
|
3172
|
+
cancel() {
|
|
3173
|
+
this.runAll('cancel');
|
|
3174
|
+
}
|
|
3175
|
+
complete() {
|
|
3176
|
+
this.runAll('complete');
|
|
3177
|
+
}
|
|
3178
|
+
};
|
|
3082
3179
|
var animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {
|
|
3083
3180
|
const valueTransition = getValueTransition(transition, name) || {};
|
|
3084
3181
|
const delay2 = valueTransition.delay || transition.delay || 0;
|
|
@@ -3122,7 +3219,7 @@ var animateMotionValue = (name, value, target, transition = {}, element, isHando
|
|
|
3122
3219
|
options.onUpdate(finalKeyframe);
|
|
3123
3220
|
options.onComplete();
|
|
3124
3221
|
});
|
|
3125
|
-
return;
|
|
3222
|
+
return new GroupPlaybackControls([]);
|
|
3126
3223
|
}
|
|
3127
3224
|
}
|
|
3128
3225
|
if (!isHandoff && AcceleratedAnimation.supports(options)) {
|
|
@@ -3152,6 +3249,9 @@ function setTarget(visualElement, definition) {
|
|
|
3152
3249
|
setMotionValue(visualElement, key7, value);
|
|
3153
3250
|
}
|
|
3154
3251
|
}
|
|
3252
|
+
function getOptimisedAppearId(visualElement) {
|
|
3253
|
+
return visualElement.getProps()[optimizedAppearDataAttribute];
|
|
3254
|
+
}
|
|
3155
3255
|
function shouldBlockAnimation({ protectedKeys, needsAnimating, }, key7) {
|
|
3156
3256
|
const shouldBlock = protectedKeys.hasOwnProperty(key7) && needsAnimating[key7] !== true;
|
|
3157
3257
|
needsAnimating[key7] = false;
|
|
@@ -3174,8 +3274,7 @@ function animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0,
|
|
|
3174
3274
|
const valueTransition = Object.assign({ delay: delay2, elapsed: 0 }, getValueTransition(transition || {}, key7));
|
|
3175
3275
|
let isHandoff = false;
|
|
3176
3276
|
if (window.HandoffAppearAnimations) {
|
|
3177
|
-
const
|
|
3178
|
-
const appearId = props[optimizedAppearDataAttribute];
|
|
3277
|
+
const appearId = getOptimisedAppearId(visualElement);
|
|
3179
3278
|
if (appearId) {
|
|
3180
3279
|
const elapsed = window.HandoffAppearAnimations(appearId, key7, value, frame);
|
|
3181
3280
|
if (elapsed !== null) {
|
|
@@ -3690,7 +3789,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
3690
3789
|
willChange.add(key7);
|
|
3691
3790
|
}
|
|
3692
3791
|
if (false) {
|
|
3693
|
-
warnOnce(nextValue.version === '11.2.
|
|
3792
|
+
warnOnce(nextValue.version === '11.2.10', `Attempting to mix Framer Motion versions ${nextValue.version} with 11.2.10 may not work as expected.`);
|
|
3694
3793
|
}
|
|
3695
3794
|
}
|
|
3696
3795
|
else if (isMotionValue(prevValue)) {
|
|
@@ -5956,6 +6055,24 @@ function resetDistortingTransform(key7, visualElement, values, sharedAnimationVa
|
|
|
5956
6055
|
}
|
|
5957
6056
|
}
|
|
5958
6057
|
}
|
|
6058
|
+
function isOptimisedAppearTree(projectionNode) {
|
|
6059
|
+
projectionNode.hasCheckedOptimisedAppear = true;
|
|
6060
|
+
if (projectionNode.root === projectionNode)
|
|
6061
|
+
return false;
|
|
6062
|
+
const { visualElement, } = projectionNode.options;
|
|
6063
|
+
if (!visualElement) {
|
|
6064
|
+
return false;
|
|
6065
|
+
}
|
|
6066
|
+
else if (getOptimisedAppearId(visualElement)) {
|
|
6067
|
+
return true;
|
|
6068
|
+
}
|
|
6069
|
+
else if (projectionNode.parent && !projectionNode.parent.hasCheckedOptimisedAppear) {
|
|
6070
|
+
return isOptimisedAppearTree(projectionNode.parent);
|
|
6071
|
+
}
|
|
6072
|
+
else {
|
|
6073
|
+
return false;
|
|
6074
|
+
}
|
|
6075
|
+
}
|
|
5959
6076
|
function createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }) {
|
|
5960
6077
|
return class ProjectionNode {
|
|
5961
6078
|
constructor(latestValues = {}, parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent()) {
|
|
@@ -5975,6 +6092,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
5975
6092
|
this.isSVG = false;
|
|
5976
6093
|
this.needsReset = false;
|
|
5977
6094
|
this.shouldResetTransform = false;
|
|
6095
|
+
this.hasCheckedOptimisedAppear = false;
|
|
5978
6096
|
this.treeScale = {
|
|
5979
6097
|
x: 1,
|
|
5980
6098
|
y: 1,
|
|
@@ -6123,9 +6241,6 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6123
6241
|
if (this.isUpdateBlocked())
|
|
6124
6242
|
return;
|
|
6125
6243
|
this.isUpdating = true;
|
|
6126
|
-
if (window.HandoffCancelAllAnimations) {
|
|
6127
|
-
window.HandoffCancelAllAnimations();
|
|
6128
|
-
}
|
|
6129
6244
|
this.nodes && this.nodes.forEach(resetSkewAndRotation);
|
|
6130
6245
|
this.animationId++;
|
|
6131
6246
|
}
|
|
@@ -6139,6 +6254,9 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6139
6254
|
this.options.onExitComplete && this.options.onExitComplete();
|
|
6140
6255
|
return;
|
|
6141
6256
|
}
|
|
6257
|
+
if (window.HandoffCancelAllAnimations && isOptimisedAppearTree(this)) {
|
|
6258
|
+
window.HandoffCancelAllAnimations();
|
|
6259
|
+
}
|
|
6142
6260
|
!this.root.isUpdating && this.root.startUpdate();
|
|
6143
6261
|
if (this.isLayoutDirty)
|
|
6144
6262
|
return;
|
|
@@ -6728,16 +6846,16 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6728
6846
|
if (!this.isVisible) {
|
|
6729
6847
|
return hiddenVisibility;
|
|
6730
6848
|
}
|
|
6731
|
-
const
|
|
6849
|
+
const styles2 = {
|
|
6732
6850
|
visibility: '',
|
|
6733
6851
|
};
|
|
6734
6852
|
const transformTemplate2 = this.getTransformTemplate();
|
|
6735
6853
|
if (this.needsReset) {
|
|
6736
6854
|
this.needsReset = false;
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
return
|
|
6855
|
+
styles2.opacity = '';
|
|
6856
|
+
styles2.pointerEvents = resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || '';
|
|
6857
|
+
styles2.transform = transformTemplate2 ? transformTemplate2(this.latestValues, '') : 'none';
|
|
6858
|
+
return styles2;
|
|
6741
6859
|
}
|
|
6742
6860
|
const lead = this.getLead();
|
|
6743
6861
|
if (!this.projectionDelta || !this.layout || !lead.target) {
|
|
@@ -6755,14 +6873,14 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6755
6873
|
}
|
|
6756
6874
|
const valuesToRender = lead.animationValues || lead.latestValues;
|
|
6757
6875
|
this.applyTransformsToTarget();
|
|
6758
|
-
|
|
6876
|
+
styles2.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);
|
|
6759
6877
|
if (transformTemplate2) {
|
|
6760
|
-
|
|
6878
|
+
styles2.transform = transformTemplate2(valuesToRender, styles2.transform);
|
|
6761
6879
|
}
|
|
6762
6880
|
const { x, y, } = this.projectionDelta;
|
|
6763
|
-
|
|
6881
|
+
styles2.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`;
|
|
6764
6882
|
if (lead.animationValues) {
|
|
6765
|
-
|
|
6883
|
+
styles2.opacity = lead === this
|
|
6766
6884
|
? (_b = (_a = valuesToRender.opacity) !== null && _a !== void 0 ? _a : this.latestValues.opacity) !== null && _b !== void 0
|
|
6767
6885
|
? _b
|
|
6768
6886
|
: 1
|
|
@@ -6771,7 +6889,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6771
6889
|
: valuesToRender.opacityExit;
|
|
6772
6890
|
}
|
|
6773
6891
|
else {
|
|
6774
|
-
|
|
6892
|
+
styles2.opacity = lead === this
|
|
6775
6893
|
? valuesToRender.opacity !== void 0 ? valuesToRender.opacity : ''
|
|
6776
6894
|
: valuesToRender.opacityExit !== void 0
|
|
6777
6895
|
? valuesToRender.opacityExit
|
|
@@ -6781,23 +6899,23 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6781
6899
|
if (valuesToRender[key7] === void 0)
|
|
6782
6900
|
continue;
|
|
6783
6901
|
const { correct, applyTo, } = scaleCorrectors[key7];
|
|
6784
|
-
const corrected =
|
|
6902
|
+
const corrected = styles2.transform === 'none' ? valuesToRender[key7] : correct(valuesToRender[key7], lead);
|
|
6785
6903
|
if (applyTo) {
|
|
6786
6904
|
const num = applyTo.length;
|
|
6787
6905
|
for (let i = 0; i < num; i++) {
|
|
6788
|
-
|
|
6906
|
+
styles2[applyTo[i]] = corrected;
|
|
6789
6907
|
}
|
|
6790
6908
|
}
|
|
6791
6909
|
else {
|
|
6792
|
-
|
|
6910
|
+
styles2[key7] = corrected;
|
|
6793
6911
|
}
|
|
6794
6912
|
}
|
|
6795
6913
|
if (this.options.layoutId) {
|
|
6796
|
-
|
|
6914
|
+
styles2.pointerEvents = lead === this
|
|
6797
6915
|
? resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || ''
|
|
6798
6916
|
: 'none';
|
|
6799
6917
|
}
|
|
6800
|
-
return
|
|
6918
|
+
return styles2;
|
|
6801
6919
|
}
|
|
6802
6920
|
clearSnapshot() {
|
|
6803
6921
|
this.resumeFrom = this.snapshot = void 0;
|
|
@@ -8305,97 +8423,6 @@ var wrap = (min, max, v) => {
|
|
|
8305
8423
|
return ((v - min) % rangeSize + rangeSize) % rangeSize + min;
|
|
8306
8424
|
};
|
|
8307
8425
|
exports.wrap = wrap;
|
|
8308
|
-
function observeTimeline(update, timeline) {
|
|
8309
|
-
let prevProgress;
|
|
8310
|
-
const onFrame = () => {
|
|
8311
|
-
const { currentTime, } = timeline;
|
|
8312
|
-
const percentage = currentTime === null ? 0 : currentTime.value;
|
|
8313
|
-
const progress2 = percentage / 100;
|
|
8314
|
-
if (prevProgress !== progress2) {
|
|
8315
|
-
update(progress2);
|
|
8316
|
-
}
|
|
8317
|
-
prevProgress = progress2;
|
|
8318
|
-
};
|
|
8319
|
-
frame.update(onFrame, true);
|
|
8320
|
-
return () => cancelFrame(onFrame);
|
|
8321
|
-
}
|
|
8322
|
-
var supportsScrollTimeline = memo(() => window.ScrollTimeline !== void 0);
|
|
8323
|
-
var GroupPlaybackControls = class {
|
|
8324
|
-
constructor(animations2) {
|
|
8325
|
-
this.animations = animations2.filter(Boolean);
|
|
8326
|
-
}
|
|
8327
|
-
then(onResolve, onReject) {
|
|
8328
|
-
return Promise.all(this.animations).then(onResolve).catch(onReject);
|
|
8329
|
-
}
|
|
8330
|
-
/**
|
|
8331
|
-
* TODO: Filter out cancelled or stopped animations before returning
|
|
8332
|
-
*/
|
|
8333
|
-
getAll(propName) {
|
|
8334
|
-
return this.animations[0][propName];
|
|
8335
|
-
}
|
|
8336
|
-
setAll(propName, newValue) {
|
|
8337
|
-
for (let i = 0; i < this.animations.length; i++) {
|
|
8338
|
-
this.animations[i][propName] = newValue;
|
|
8339
|
-
}
|
|
8340
|
-
}
|
|
8341
|
-
attachTimeline(timeline) {
|
|
8342
|
-
const cancelAll = this.animations.map((animation) => {
|
|
8343
|
-
if (supportsScrollTimeline() && animation.attachTimeline) {
|
|
8344
|
-
animation.attachTimeline(timeline);
|
|
8345
|
-
}
|
|
8346
|
-
else {
|
|
8347
|
-
animation.pause();
|
|
8348
|
-
return observeTimeline((progress2) => {
|
|
8349
|
-
animation.time = animation.duration * progress2;
|
|
8350
|
-
}, timeline);
|
|
8351
|
-
}
|
|
8352
|
-
});
|
|
8353
|
-
return () => {
|
|
8354
|
-
cancelAll.forEach((cancelTimeline, i) => {
|
|
8355
|
-
if (cancelTimeline)
|
|
8356
|
-
cancelTimeline();
|
|
8357
|
-
this.animations[i].stop();
|
|
8358
|
-
});
|
|
8359
|
-
};
|
|
8360
|
-
}
|
|
8361
|
-
get time() {
|
|
8362
|
-
return this.getAll('time');
|
|
8363
|
-
}
|
|
8364
|
-
set time(time2) {
|
|
8365
|
-
this.setAll('time', time2);
|
|
8366
|
-
}
|
|
8367
|
-
get speed() {
|
|
8368
|
-
return this.getAll('speed');
|
|
8369
|
-
}
|
|
8370
|
-
set speed(speed) {
|
|
8371
|
-
this.setAll('speed', speed);
|
|
8372
|
-
}
|
|
8373
|
-
get duration() {
|
|
8374
|
-
let max = 0;
|
|
8375
|
-
for (let i = 0; i < this.animations.length; i++) {
|
|
8376
|
-
max = Math.max(max, this.animations[i].duration);
|
|
8377
|
-
}
|
|
8378
|
-
return max;
|
|
8379
|
-
}
|
|
8380
|
-
runAll(methodName) {
|
|
8381
|
-
this.animations.forEach((controls) => controls[methodName]());
|
|
8382
|
-
}
|
|
8383
|
-
play() {
|
|
8384
|
-
this.runAll('play');
|
|
8385
|
-
}
|
|
8386
|
-
pause() {
|
|
8387
|
-
this.runAll('pause');
|
|
8388
|
-
}
|
|
8389
|
-
stop() {
|
|
8390
|
-
this.runAll('stop');
|
|
8391
|
-
}
|
|
8392
|
-
cancel() {
|
|
8393
|
-
this.runAll('cancel');
|
|
8394
|
-
}
|
|
8395
|
-
complete() {
|
|
8396
|
-
this.runAll('complete');
|
|
8397
|
-
}
|
|
8398
|
-
};
|
|
8399
8426
|
function isDOMKeyframes(keyframes2) {
|
|
8400
8427
|
return typeof keyframes2 === 'object' && !Array.isArray(keyframes2);
|
|
8401
8428
|
}
|
|
@@ -9118,7 +9145,7 @@ var cancelSync = stepsOrder.reduce((acc, key7) => {
|
|
|
9118
9145
|
return acc;
|
|
9119
9146
|
}, {});
|
|
9120
9147
|
exports.cancelSync = cancelSync;
|
|
9121
|
-
// https :https://app.framerstatic.com/framer.
|
|
9148
|
+
// https :https://app.framerstatic.com/framer.IBCXHSKM.js
|
|
9122
9149
|
const react_12 = __importDefault(require("react"));
|
|
9123
9150
|
const react_13 = require("react");
|
|
9124
9151
|
const react_14 = require("react");
|
|
@@ -10249,11 +10276,11 @@ var require_resize_observer_umd = __commonJS({
|
|
|
10249
10276
|
};
|
|
10250
10277
|
return Scheduler2;
|
|
10251
10278
|
}();
|
|
10252
|
-
var
|
|
10279
|
+
var scheduler2 = new Scheduler();
|
|
10253
10280
|
var updateCount = function (n) {
|
|
10254
|
-
!watching && n > 0 &&
|
|
10281
|
+
!watching && n > 0 && scheduler2.start();
|
|
10255
10282
|
watching += n;
|
|
10256
|
-
!watching &&
|
|
10283
|
+
!watching && scheduler2.stop();
|
|
10257
10284
|
};
|
|
10258
10285
|
var skipNotifyOnElement = function (target) {
|
|
10259
10286
|
return !isSVG(target) && !isReplacedElement(target) && getComputedStyle(target).display === 'inline';
|
|
@@ -10311,7 +10338,7 @@ var require_resize_observer_umd = __commonJS({
|
|
|
10311
10338
|
firstObservation && resizeObservers.push(detail);
|
|
10312
10339
|
detail.observationTargets.push(new ResizeObservation(target, options && options.box));
|
|
10313
10340
|
updateCount(1);
|
|
10314
|
-
|
|
10341
|
+
scheduler2.schedule();
|
|
10315
10342
|
}
|
|
10316
10343
|
};
|
|
10317
10344
|
ResizeObserverController2.unobserve = function (resizeObserver, target) {
|
|
@@ -11051,11 +11078,8 @@ function lazy(factory) {
|
|
|
11051
11078
|
let factoryPromise;
|
|
11052
11079
|
let LoadedComponent;
|
|
11053
11080
|
const Component15 = react_12.default.forwardRef(function LazyWithPreload(props, ref) {
|
|
11054
|
-
return react_12.default.createElement(LoadedComponent !== null && LoadedComponent !== void 0 ? LoadedComponent : LazyComponent,
|
|
11055
|
-
? {
|
|
11056
|
-
ref,
|
|
11057
|
-
}
|
|
11058
|
-
: {}, props));
|
|
11081
|
+
return react_12.default.createElement(LoadedComponent !== null && LoadedComponent !== void 0 ? LoadedComponent : LazyComponent, ref
|
|
11082
|
+
? Object.assign({ ref }, props) : props);
|
|
11059
11083
|
});
|
|
11060
11084
|
Component15.preload = () => {
|
|
11061
11085
|
if (!factoryPromise) {
|
|
@@ -11081,7 +11105,24 @@ function getRouteElementId(route, hash2) {
|
|
|
11081
11105
|
return void 0;
|
|
11082
11106
|
}
|
|
11083
11107
|
function isBot(userAgent) {
|
|
11084
|
-
return /bot|Mediapartners-Google|Google-PageRenderer|yandex|ia_archiver/
|
|
11108
|
+
return /bot|Mediapartners-Google|Google-PageRenderer|yandex|ia_archiver/iu.test(userAgent);
|
|
11109
|
+
}
|
|
11110
|
+
function yieldToMain(isHighPriority) {
|
|
11111
|
+
if ('scheduler' in window) {
|
|
11112
|
+
const options = {
|
|
11113
|
+
priority: isHighPriority ? 'user-blocking' : 'user-visible',
|
|
11114
|
+
};
|
|
11115
|
+
if ('yield' in scheduler)
|
|
11116
|
+
return scheduler.yield(options);
|
|
11117
|
+
if ('postTask' in scheduler)
|
|
11118
|
+
return scheduler.postTask(() => { }, options);
|
|
11119
|
+
}
|
|
11120
|
+
if (isHighPriority) {
|
|
11121
|
+
return Promise.resolve();
|
|
11122
|
+
}
|
|
11123
|
+
return new Promise((resolve) => {
|
|
11124
|
+
setTimeout(resolve, 0);
|
|
11125
|
+
});
|
|
11085
11126
|
}
|
|
11086
11127
|
function replacePathVariables(path, currentLocale, nextLocale, defaultLocale, collectionId, pathVariables, collectionUtils) {
|
|
11087
11128
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -11693,22 +11734,24 @@ function switchLocale(options) {
|
|
|
11693
11734
|
routeId: options.routeId,
|
|
11694
11735
|
pathVariables: result.pathVariables,
|
|
11695
11736
|
localeId: options.nextLocale.id,
|
|
11696
|
-
paginationInfo:
|
|
11737
|
+
paginationInfo: window.history.state.paginationInfo,
|
|
11697
11738
|
}, result.path);
|
|
11698
11739
|
}
|
|
11699
11740
|
catch (_f) { }
|
|
11700
11741
|
return result;
|
|
11701
11742
|
});
|
|
11702
11743
|
}
|
|
11703
|
-
function pushLoadMoreHistory(paginationInfo) {
|
|
11744
|
+
function pushLoadMoreHistory(hash2, paginationInfo) {
|
|
11704
11745
|
try {
|
|
11705
11746
|
const currentHistoryState = window.history.state;
|
|
11706
11747
|
if (!isHistoryState(currentHistoryState))
|
|
11707
11748
|
return;
|
|
11708
|
-
|
|
11749
|
+
const newPaginationInfo = Object.assign(Object.assign({}, currentHistoryState.paginationInfo), { [hash2]: paginationInfo });
|
|
11750
|
+
replaceHistoryState(Object.assign(Object.assign({}, currentHistoryState), { paginationInfo: newPaginationInfo }));
|
|
11709
11751
|
}
|
|
11710
11752
|
catch (_f) { }
|
|
11711
11753
|
}
|
|
11754
|
+
exports.pushLoadMoreHistory = pushLoadMoreHistory;
|
|
11712
11755
|
function isSamePage(a, b) {
|
|
11713
11756
|
if (a.routeId !== b.routeId)
|
|
11714
11757
|
return false;
|
|
@@ -11776,17 +11819,80 @@ function turnOnReactEventHandling() {
|
|
|
11776
11819
|
eventsToStop.forEach((event) => document.body.removeEventListener(event, stopFn, options));
|
|
11777
11820
|
eventsToStop = void 0;
|
|
11778
11821
|
}
|
|
11779
|
-
|
|
11780
|
-
|
|
11822
|
+
function measureSafe(name, start, end) {
|
|
11823
|
+
try {
|
|
11824
|
+
performance.measure(name, start, end);
|
|
11825
|
+
}
|
|
11826
|
+
catch (e) {
|
|
11827
|
+
console.warn(`Could not measure ${name}`, e);
|
|
11828
|
+
}
|
|
11829
|
+
}
|
|
11830
|
+
var hydrationEffectHasRun = false;
|
|
11831
|
+
var hydrationInsertionEffectHasRun = false;
|
|
11832
|
+
var hydrationLayoutEffectHasRun = false;
|
|
11833
|
+
function OnHydrationEnd({ addHydrationMarkers, turnOffEventHandlerHack, }) {
|
|
11834
|
+
const hydrationMarkPrefix = 'framer-hydration-';
|
|
11835
|
+
const hydrationStart = `${hydrationMarkPrefix}start`;
|
|
11836
|
+
const hydrationRenderEnd = `${hydrationMarkPrefix}render-end`;
|
|
11837
|
+
const hydrationLayoutEffectsEnd = `${hydrationMarkPrefix}layout-effects-end`;
|
|
11838
|
+
const hydrationEffectsEnd = `${hydrationMarkPrefix}effects-end`;
|
|
11839
|
+
const hydrationFP = `${hydrationMarkPrefix}first-paint`;
|
|
11840
|
+
(0, react_4.useInsertionEffect)(() => {
|
|
11841
|
+
if (hydrationInsertionEffectHasRun)
|
|
11842
|
+
return;
|
|
11843
|
+
hydrationInsertionEffectHasRun = true;
|
|
11844
|
+
if (addHydrationMarkers) {
|
|
11845
|
+
performance.mark(hydrationRenderEnd);
|
|
11846
|
+
measureSafe(`${hydrationMarkPrefix}render`, hydrationStart, hydrationRenderEnd);
|
|
11847
|
+
}
|
|
11848
|
+
}, []);
|
|
11781
11849
|
(0, react_2.useLayoutEffect)(() => {
|
|
11782
|
-
if (
|
|
11850
|
+
if (hydrationLayoutEffectHasRun)
|
|
11851
|
+
return;
|
|
11852
|
+
hydrationLayoutEffectHasRun = true;
|
|
11853
|
+
if (addHydrationMarkers) {
|
|
11854
|
+
performance.mark(hydrationLayoutEffectsEnd);
|
|
11855
|
+
measureSafe(`${hydrationMarkPrefix}layout-effects`, hydrationRenderEnd, hydrationLayoutEffectsEnd);
|
|
11856
|
+
}
|
|
11857
|
+
requestAnimationFrame(() => {
|
|
11858
|
+
var _a, _b, _c;
|
|
11859
|
+
const browserRenderStart = `${hydrationMarkPrefix}browser-render-start`;
|
|
11860
|
+
if (addHydrationMarkers) {
|
|
11861
|
+
performance.mark(browserRenderStart);
|
|
11862
|
+
measureSafe(`${hydrationMarkPrefix}uho`, (_b = (_a = performance.getEntriesByName(hydrationEffectsEnd)[0]) === null || _a === void 0 ? void 0 : _a.name) !== null &&
|
|
11863
|
+
_b !== void 0
|
|
11864
|
+
? _b
|
|
11865
|
+
: (_c = performance.getEntriesByName(hydrationLayoutEffectsEnd)[0]) === null || _c === void 0
|
|
11866
|
+
? void 0
|
|
11867
|
+
: _c.name, browserRenderStart);
|
|
11868
|
+
}
|
|
11869
|
+
setTimeout(() => {
|
|
11870
|
+
if (turnOffEventHandlerHack) {
|
|
11871
|
+
turnOnReactEventHandling();
|
|
11872
|
+
}
|
|
11873
|
+
if (addHydrationMarkers) {
|
|
11874
|
+
performance.mark(hydrationFP);
|
|
11875
|
+
measureSafe(`${hydrationMarkPrefix}time-to-first-paint`, hydrationStart, hydrationFP);
|
|
11876
|
+
measureSafe(`${hydrationMarkPrefix}browser-render`, browserRenderStart, hydrationFP);
|
|
11877
|
+
}
|
|
11878
|
+
}, 0);
|
|
11879
|
+
});
|
|
11880
|
+
}, []);
|
|
11881
|
+
(0, react_2.useEffect)(() => {
|
|
11882
|
+
var _a, _b, _c;
|
|
11883
|
+
if (hydrationEffectHasRun)
|
|
11783
11884
|
return;
|
|
11784
|
-
|
|
11785
|
-
if (turnOffEventHandlerHack)
|
|
11885
|
+
hydrationEffectHasRun = true;
|
|
11886
|
+
if (turnOffEventHandlerHack) {
|
|
11786
11887
|
turnOnReactEventHandling();
|
|
11787
|
-
|
|
11788
|
-
|
|
11789
|
-
performance.
|
|
11888
|
+
}
|
|
11889
|
+
if (addHydrationMarkers) {
|
|
11890
|
+
performance.mark(hydrationEffectsEnd);
|
|
11891
|
+
measureSafe(`${hydrationMarkPrefix}effects`, (_b = (_a = performance.getEntriesByName(hydrationFP)[0]) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0
|
|
11892
|
+
? _b
|
|
11893
|
+
: (_c = performance.getEntriesByName(hydrationLayoutEffectsEnd)[0]) === null || _c === void 0
|
|
11894
|
+
? void 0
|
|
11895
|
+
: _c.name, hydrationEffectsEnd);
|
|
11790
11896
|
}
|
|
11791
11897
|
}, []);
|
|
11792
11898
|
return null;
|
|
@@ -11862,26 +11968,15 @@ function SuspenseThatPreservesDom({ children, }) {
|
|
|
11862
11968
|
});
|
|
11863
11969
|
}
|
|
11864
11970
|
var defaultLocaleId = 'default';
|
|
11865
|
-
var noopAsync = () => __awaiter(void 0, void 0, void 0, function* () { });
|
|
11866
|
-
var defaultCollectionListPaginationInfo = {
|
|
11867
|
-
paginationInfo: void 0,
|
|
11868
|
-
setPaginationInfo: noopAsync,
|
|
11869
|
-
loadMore: noopAsync,
|
|
11870
|
-
};
|
|
11871
|
-
var CollectionListPaginationInfoContext = /* @__PURE__ */ react_12.default.createContext(defaultCollectionListPaginationInfo);
|
|
11872
|
-
function useCollectionListPaginationInfo() {
|
|
11873
|
-
return react_12.default.useContext(CollectionListPaginationInfoContext);
|
|
11874
|
-
}
|
|
11875
|
-
exports.useCollectionListPaginationInfo = useCollectionListPaginationInfo;
|
|
11876
11971
|
function useForceUpdate2() {
|
|
11877
11972
|
const [_, setForcedRenderCount,] = react_12.default.useState(0);
|
|
11878
11973
|
return [_, react_12.default.useCallback(() => setForcedRenderCount((v) => v + 1), []),];
|
|
11879
11974
|
}
|
|
11880
|
-
var
|
|
11975
|
+
var noopAsync = () => __awaiter(void 0, void 0, void 0, function* () { });
|
|
11881
11976
|
var defaultLocaleInfo = {
|
|
11882
11977
|
activeLocale: null,
|
|
11883
11978
|
locales: [],
|
|
11884
|
-
setLocale:
|
|
11979
|
+
setLocale: noopAsync,
|
|
11885
11980
|
};
|
|
11886
11981
|
var LocaleInfoContext = /* @__PURE__ */ react_12.default.createContext(defaultLocaleInfo);
|
|
11887
11982
|
function useLocaleInfo() {
|
|
@@ -11950,8 +12045,7 @@ function useScheduleRenderSideEffects(dep) {
|
|
|
11950
12045
|
actions.current.push(cb);
|
|
11951
12046
|
}, []);
|
|
11952
12047
|
}
|
|
11953
|
-
function Router({ defaultPageStyle, disableHistory, initialPathVariables, initialRoute, notFoundPage, collectionUtils, routes, initialLocaleId, locales = [], preserveQueryParams = false, enableImproveInpDuringHydration = false,
|
|
11954
|
-
var _a, _b;
|
|
12048
|
+
function Router({ defaultPageStyle, disableHistory, initialPathVariables, initialRoute, notFoundPage, collectionUtils, routes, initialLocaleId, locales = [], preserveQueryParams = false, enableImproveInpDuringHydration = false, addHydrationMarkers = false, }) {
|
|
11955
12049
|
useReplaceInitialState({
|
|
11956
12050
|
disabled: disableHistory,
|
|
11957
12051
|
routeId: initialRoute,
|
|
@@ -11965,41 +12059,16 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
11965
12059
|
const currentLocaleIdRef = react_12.default.useRef(initialLocaleId);
|
|
11966
12060
|
const currentLocaleId = currentLocaleIdRef.current;
|
|
11967
12061
|
const activeLocale = react_12.default.useMemo(() => {
|
|
11968
|
-
var
|
|
11969
|
-
return (
|
|
12062
|
+
var _a;
|
|
12063
|
+
return (_a = locales.find(({ id: id3, }) => {
|
|
11970
12064
|
if (!currentLocaleId)
|
|
11971
12065
|
return id3 === defaultLocaleId;
|
|
11972
12066
|
return id3 === currentLocaleId;
|
|
11973
|
-
})) !== null &&
|
|
11974
|
-
?
|
|
12067
|
+
})) !== null && _a !== void 0
|
|
12068
|
+
? _a
|
|
11975
12069
|
: null;
|
|
11976
12070
|
}, [currentLocaleId, locales,]);
|
|
11977
12071
|
const [dep, forceUpdate,] = useForceUpdate2();
|
|
11978
|
-
const [paginationInfo, setPaginationInfo,] = react_12.default.useState(typeof window !== 'undefined'
|
|
11979
|
-
? (_b = (_a = window === null || window === void 0 ? void 0 : window.history) === null || _a === void 0 ? void 0 : _a.state) ===
|
|
11980
|
-
null || _b === void 0
|
|
11981
|
-
? void 0
|
|
11982
|
-
: _b.pagination
|
|
11983
|
-
: void 0);
|
|
11984
|
-
const collectionListPaginationInfo = react_12.default.useMemo(() => {
|
|
11985
|
-
return {
|
|
11986
|
-
paginationInfo,
|
|
11987
|
-
setPaginationInfo: (newPaginationInfo) => __awaiter(this, void 0, void 0, function* () {
|
|
11988
|
-
(0, react_13.startTransition)(() => {
|
|
11989
|
-
setPaginationInfo(newPaginationInfo);
|
|
11990
|
-
});
|
|
11991
|
-
}),
|
|
11992
|
-
loadMore: () => __awaiter(this, void 0, void 0, function* () {
|
|
11993
|
-
if ((paginationInfo === null || paginationInfo === void 0 ? void 0 : paginationInfo.type) !== 'loadMore')
|
|
11994
|
-
return;
|
|
11995
|
-
const newPaginationInfo = Object.assign(Object.assign({}, paginationInfo), { currentPage: paginationInfo.currentPage + 1 });
|
|
11996
|
-
pushLoadMoreHistory(newPaginationInfo);
|
|
11997
|
-
(0, react_13.startTransition)(() => {
|
|
11998
|
-
setPaginationInfo(newPaginationInfo);
|
|
11999
|
-
});
|
|
12000
|
-
}),
|
|
12001
|
-
};
|
|
12002
|
-
}, [paginationInfo,]);
|
|
12003
12072
|
const localeInfo = react_12.default.useMemo(() => {
|
|
12004
12073
|
return {
|
|
12005
12074
|
activeLocale,
|
|
@@ -12030,7 +12099,6 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
12030
12099
|
pathVariables: currentPathVariablesRef.current,
|
|
12031
12100
|
collectionUtils,
|
|
12032
12101
|
preserveQueryParams,
|
|
12033
|
-
paginationInfo,
|
|
12034
12102
|
});
|
|
12035
12103
|
if (!localeResult)
|
|
12036
12104
|
return;
|
|
@@ -12042,17 +12110,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
12042
12110
|
catch (_f) { }
|
|
12043
12111
|
}),
|
|
12044
12112
|
};
|
|
12045
|
-
}, [
|
|
12046
|
-
activeLocale,
|
|
12047
|
-
collectionUtils,
|
|
12048
|
-
forceUpdate,
|
|
12049
|
-
locales,
|
|
12050
|
-
monitorNextRender,
|
|
12051
|
-
paginationInfo,
|
|
12052
|
-
preserveQueryParams,
|
|
12053
|
-
routes,
|
|
12054
|
-
startViewTransition2,
|
|
12055
|
-
]);
|
|
12113
|
+
}, [activeLocale, collectionUtils, forceUpdate, locales, monitorNextRender, preserveQueryParams, routes, startViewTransition2,]);
|
|
12056
12114
|
const scheduleSideEffect = useScheduleRenderSideEffects(dep);
|
|
12057
12115
|
const setCurrentRouteId = react_12.default.useCallback((routeId, localeId, hash2, pathVariables, smoothScroll = false, isHistoryTransition = false) => {
|
|
12058
12116
|
currentRouteRef.current = routeId;
|
|
@@ -12066,11 +12124,11 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
12066
12124
|
}, [forceUpdate, monitorNextRender, scheduleSideEffect,]);
|
|
12067
12125
|
usePopStateHandler(currentRouteRef, setCurrentRouteId);
|
|
12068
12126
|
const navigate = react_12.default.useCallback((routeId, hash2, pathVariables, smoothScroll) => {
|
|
12069
|
-
var
|
|
12127
|
+
var _a, _b;
|
|
12070
12128
|
const newRoute = routes[routeId];
|
|
12071
12129
|
if (pathVariables) {
|
|
12072
12130
|
const inUse = /* @__PURE__ */ new Set();
|
|
12073
|
-
const path = (
|
|
12131
|
+
const path = (_a = newRoute === null || newRoute === void 0 ? void 0 : newRoute.path) !== null && _a !== void 0 ? _a : '/';
|
|
12074
12132
|
for (const match of path.matchAll(pathVariablesRegExp)) {
|
|
12075
12133
|
const usedVariable = match[1];
|
|
12076
12134
|
if (usedVariable === void 0) {
|
|
@@ -12088,7 +12146,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
12088
12146
|
routeId,
|
|
12089
12147
|
pathVariables,
|
|
12090
12148
|
})) {
|
|
12091
|
-
if (((
|
|
12149
|
+
if (((_b = window.history.state) === null || _b === void 0 ? void 0 : _b.hash) !== hash2) {
|
|
12092
12150
|
if (!disableHistory) {
|
|
12093
12151
|
const route = routes[routeId];
|
|
12094
12152
|
if (route) {
|
|
@@ -12147,26 +12205,23 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
12147
12205
|
api,
|
|
12148
12206
|
children: (0, jsx_runtime_1.jsx)(LocaleInfoContext.Provider, {
|
|
12149
12207
|
value: localeInfo,
|
|
12150
|
-
children: (0, jsx_runtime_1.
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
|
|
12167
|
-
}),
|
|
12168
|
-
],
|
|
12169
|
-
}),
|
|
12208
|
+
children: (0, jsx_runtime_1.jsxs)(SuspenseThatPreservesDom, {
|
|
12209
|
+
children: [
|
|
12210
|
+
(0, jsx_runtime_1.jsx)(ErrorBoundary, {
|
|
12211
|
+
notFoundPage,
|
|
12212
|
+
defaultPageStyle,
|
|
12213
|
+
forceUpdateKey: dep,
|
|
12214
|
+
children: (0, jsx_runtime_1.jsx)(react_12.default.Fragment, {
|
|
12215
|
+
children: pageExistsInCurrentLocale
|
|
12216
|
+
? renderPage(current.page, defaultPageStyle)
|
|
12217
|
+
: notFoundPage && renderPage(notFoundPage, defaultPageStyle),
|
|
12218
|
+
}, remountKey),
|
|
12219
|
+
}),
|
|
12220
|
+
(0, jsx_runtime_1.jsx)(OnHydrationEnd, {
|
|
12221
|
+
addHydrationMarkers,
|
|
12222
|
+
turnOffEventHandlerHack: enableImproveInpDuringHydration,
|
|
12223
|
+
}),
|
|
12224
|
+
],
|
|
12170
12225
|
}),
|
|
12171
12226
|
}),
|
|
12172
12227
|
});
|
|
@@ -12356,22 +12411,30 @@ exports.useRoute = useRoute;
|
|
|
12356
12411
|
var shouldPreloadBasedOnUA = /* @__PURE__ */ (() => typeof window !== 'undefined' && !isBot(navigator.userAgent))();
|
|
12357
12412
|
function useRoutePreloader(routeIds, enabled = true) {
|
|
12358
12413
|
const { getRoute, } = useRouter();
|
|
12359
|
-
|
|
12414
|
+
(0, react_2.useEffect)(() => {
|
|
12360
12415
|
if (!getRoute || !enabled || !shouldPreloadBasedOnUA)
|
|
12361
12416
|
return;
|
|
12362
12417
|
for (const routeId of routeIds) {
|
|
12363
|
-
|
|
12364
|
-
if (route === null || route === void 0 ? void 0 : route.page)
|
|
12365
|
-
preloadComponent(route.page);
|
|
12418
|
+
void preloadRoute(getRoute(routeId));
|
|
12366
12419
|
}
|
|
12367
12420
|
}, [routeIds, getRoute, enabled,]);
|
|
12368
12421
|
}
|
|
12369
|
-
function
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
|
|
12373
|
-
|
|
12374
|
-
|
|
12422
|
+
function preloadRoute(route) {
|
|
12423
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12424
|
+
if (!shouldPreloadBasedOnUA || !route)
|
|
12425
|
+
return;
|
|
12426
|
+
const component = route.page;
|
|
12427
|
+
if (!component || !isLazyComponentType(component))
|
|
12428
|
+
return;
|
|
12429
|
+
yield yieldToMain();
|
|
12430
|
+
try {
|
|
12431
|
+
yield component.preload();
|
|
12432
|
+
}
|
|
12433
|
+
catch (e) {
|
|
12434
|
+
if (false)
|
|
12435
|
+
console.warn('Preload failed', route, e);
|
|
12436
|
+
}
|
|
12437
|
+
});
|
|
12375
12438
|
}
|
|
12376
12439
|
function useRouteAnchor(routeId, { elementId, hash: linkHash, } = {}) {
|
|
12377
12440
|
const { navigate, currentPathVariables, preserveQueryParams, } = useRouter();
|
|
@@ -17915,8 +17978,8 @@ function injectComponentCSSRules() {
|
|
|
17915
17978
|
if (didInject)
|
|
17916
17979
|
return;
|
|
17917
17980
|
didInject = true;
|
|
17918
|
-
const
|
|
17919
|
-
for (const rule of
|
|
17981
|
+
const styles2 = RenderTarget.current() === RenderTarget.preview ? combinedCSSRulesForPreview : exports.combinedCSSRules;
|
|
17982
|
+
for (const rule of styles2) {
|
|
17920
17983
|
injectCSSRule(rule, void 0, void 0);
|
|
17921
17984
|
}
|
|
17922
17985
|
}
|
|
@@ -20000,26 +20063,26 @@ function backgroundImageFromProps(props) {
|
|
|
20000
20063
|
}
|
|
20001
20064
|
exports.backgroundImageFromProps = backgroundImageFromProps;
|
|
20002
20065
|
function collectBorderStyleForProps(props, style, collapseEqualBorders = true) {
|
|
20003
|
-
const { borderWidth, borderStyle, borderColor, } = props;
|
|
20004
|
-
if (!
|
|
20066
|
+
const { borderWidth: borderWidth2, borderStyle, borderColor, } = props;
|
|
20067
|
+
if (!borderWidth2) {
|
|
20005
20068
|
return;
|
|
20006
20069
|
}
|
|
20007
20070
|
let borderTop;
|
|
20008
20071
|
let borderBottom;
|
|
20009
20072
|
let borderLeft;
|
|
20010
20073
|
let borderRight;
|
|
20011
|
-
if (typeof
|
|
20074
|
+
if (typeof borderWidth2 === 'number') {
|
|
20012
20075
|
borderTop =
|
|
20013
20076
|
borderBottom =
|
|
20014
20077
|
borderLeft =
|
|
20015
20078
|
borderRight =
|
|
20016
|
-
|
|
20079
|
+
borderWidth2;
|
|
20017
20080
|
}
|
|
20018
20081
|
else {
|
|
20019
|
-
borderTop =
|
|
20020
|
-
borderBottom =
|
|
20021
|
-
borderLeft =
|
|
20022
|
-
borderRight =
|
|
20082
|
+
borderTop = borderWidth2.top || 0;
|
|
20083
|
+
borderBottom = borderWidth2.bottom || 0;
|
|
20084
|
+
borderLeft = borderWidth2.left || 0;
|
|
20085
|
+
borderRight = borderWidth2.right || 0;
|
|
20023
20086
|
}
|
|
20024
20087
|
if (borderTop === 0 && borderBottom === 0 && borderLeft === 0 && borderRight === 0) {
|
|
20025
20088
|
return;
|
|
@@ -20063,7 +20126,7 @@ function Border(props) {
|
|
|
20063
20126
|
});
|
|
20064
20127
|
}
|
|
20065
20128
|
function htmlElementAsMotionComponent(asElem) {
|
|
20066
|
-
return asElem && asElem !== 'search' && asElem !== 'slot' && asElem !== 'template' ? motion
|
|
20129
|
+
return asElem && asElem !== 'search' && asElem !== 'slot' && asElem !== 'template' ? motion[asElem] : motion['div'];
|
|
20067
20130
|
}
|
|
20068
20131
|
var isChrome2 = /* @__PURE__ */ isChrome();
|
|
20069
20132
|
function layoutHintDataPropsForCenter(center) {
|
|
@@ -20100,23 +20163,7 @@ function processOverrideForwarding(props, children) {
|
|
|
20100
20163
|
};
|
|
20101
20164
|
}
|
|
20102
20165
|
}
|
|
20103
|
-
|
|
20104
|
-
const extractions = props._overrideForwardingDescription;
|
|
20105
|
-
if (extractions) {
|
|
20106
|
-
_forwardedOverrides = void 0;
|
|
20107
|
-
for (const key7 in extractions) {
|
|
20108
|
-
const propName = extractions[key7];
|
|
20109
|
-
const value = props[propName];
|
|
20110
|
-
if (value !== void 0) {
|
|
20111
|
-
if (!_forwardedOverrides) {
|
|
20112
|
-
_forwardedOverrides = {};
|
|
20113
|
-
props = Object.assign({}, props);
|
|
20114
|
-
}
|
|
20115
|
-
_forwardedOverrides[key7] = props[propName];
|
|
20116
|
-
delete props[propName];
|
|
20117
|
-
}
|
|
20118
|
-
}
|
|
20119
|
-
}
|
|
20166
|
+
const _forwardedOverrides = props._forwardedOverrides;
|
|
20120
20167
|
if (!_forwardedOverrides) {
|
|
20121
20168
|
return {
|
|
20122
20169
|
props,
|
|
@@ -23270,7 +23317,7 @@ var DeprecatedFrame = /* @__PURE__ */ (() => {
|
|
|
23270
23317
|
}
|
|
23271
23318
|
render() {
|
|
23272
23319
|
countNodeRender();
|
|
23273
|
-
const { visible, id: id3, className, } = this.props;
|
|
23320
|
+
const { visible, id: id3, className: className2, } = this.props;
|
|
23274
23321
|
if (!visible) {
|
|
23275
23322
|
return null;
|
|
23276
23323
|
}
|
|
@@ -23284,7 +23331,7 @@ var DeprecatedFrame = /* @__PURE__ */ (() => {
|
|
|
23284
23331
|
id: id3,
|
|
23285
23332
|
style,
|
|
23286
23333
|
ref: this.setElement,
|
|
23287
|
-
className,
|
|
23334
|
+
className: className2,
|
|
23288
23335
|
children: [
|
|
23289
23336
|
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(ProvideParentSize, {
|
|
23290
23337
|
parentSize,
|
|
@@ -23295,19 +23342,7 @@ var DeprecatedFrame = /* @__PURE__ */ (() => {
|
|
|
23295
23342
|
});
|
|
23296
23343
|
}
|
|
23297
23344
|
layoutChildren() {
|
|
23298
|
-
|
|
23299
|
-
const extractions = this.props._overrideForwardingDescription;
|
|
23300
|
-
if (extractions) {
|
|
23301
|
-
let added = false;
|
|
23302
|
-
_forwardedOverrides = {};
|
|
23303
|
-
for (const [key7, value,] of Object.entries(extractions)) {
|
|
23304
|
-
added = true;
|
|
23305
|
-
_forwardedOverrides[key7] = asRecord(this.props)[value];
|
|
23306
|
-
}
|
|
23307
|
-
if (!added) {
|
|
23308
|
-
_forwardedOverrides = void 0;
|
|
23309
|
-
}
|
|
23310
|
-
}
|
|
23345
|
+
const _forwardedOverrides = this.props._forwardedOverrides;
|
|
23311
23346
|
let children = react_12.default.Children.map(this.props.children, (child) => {
|
|
23312
23347
|
if (isConstraintSupportingChild(child)) {
|
|
23313
23348
|
return react_12.default.cloneElement(child, {
|
|
@@ -24742,17 +24777,14 @@ function backdropTapAction(transition, goBackAction) {
|
|
|
24742
24777
|
if (transition.goBackOnTapOutside !== false)
|
|
24743
24778
|
return goBackAction;
|
|
24744
24779
|
}
|
|
24745
|
-
function NavigationStyleSheet() {
|
|
24746
|
-
react_12.default.useInsertionEffect(() => {
|
|
24747
|
-
injectComponentCSSRules();
|
|
24748
|
-
}, []);
|
|
24749
|
-
return null;
|
|
24750
|
-
}
|
|
24751
24780
|
function NavigationWrapper(props) {
|
|
24752
24781
|
const resetProjection = useResetProjection();
|
|
24753
24782
|
const skipLayoutAnimation = useInstantLayoutTransition();
|
|
24754
|
-
|
|
24755
|
-
|
|
24783
|
+
react_12.default.useInsertionEffect(() => {
|
|
24784
|
+
injectComponentCSSRules();
|
|
24785
|
+
}, []);
|
|
24786
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Navigation, Object.assign(Object.assign({}, props), { resetProjection,
|
|
24787
|
+
skipLayoutAnimation, children: props.children }));
|
|
24756
24788
|
}
|
|
24757
24789
|
exports.Navigation = NavigationWrapper;
|
|
24758
24790
|
var import_hoist_non_react_statics3 = __toESM(require_hoist_non_react_statics_cjs(), 1);
|
|
@@ -24849,6 +24881,41 @@ var AnimateSharedLayout = (props) => props.children;
|
|
|
24849
24881
|
exports.AnimateSharedLayout = AnimateSharedLayout;
|
|
24850
24882
|
var Draggable = /* @__PURE__ */ WithDragging(DeprecatedFrameWithEvents);
|
|
24851
24883
|
exports.Draggable = Draggable;
|
|
24884
|
+
function useInfiniteScroll({ ref: elementRef, loadMore, rootMargin = '0px', threshold, paginationInfo, }) {
|
|
24885
|
+
const callback = react_12.default.useCallback((entries) => {
|
|
24886
|
+
const entry = entries[0];
|
|
24887
|
+
const isIntersecting = entry == null ? void 0 : entry.isIntersecting;
|
|
24888
|
+
if (isIntersecting)
|
|
24889
|
+
loadMore();
|
|
24890
|
+
}, [loadMore,]);
|
|
24891
|
+
react_12.default.useEffect(() => {
|
|
24892
|
+
if (!elementRef.current)
|
|
24893
|
+
return;
|
|
24894
|
+
const observer2 = new IntersectionObserver(callback, {
|
|
24895
|
+
rootMargin,
|
|
24896
|
+
threshold,
|
|
24897
|
+
});
|
|
24898
|
+
observer2.observe(elementRef.current);
|
|
24899
|
+
return () => {
|
|
24900
|
+
observer2.disconnect();
|
|
24901
|
+
};
|
|
24902
|
+
}, [elementRef, callback, rootMargin, threshold, paginationInfo.currentPage,]);
|
|
24903
|
+
}
|
|
24904
|
+
function withInfiniteScroll(Component15) {
|
|
24905
|
+
return react_12.default.forwardRef((_f, ref) => {
|
|
24906
|
+
var { __paginationInfo, __loadMore } = _f, props = __rest(_f, ["__paginationInfo", "__loadMore"]);
|
|
24907
|
+
const backupRef = react_12.default.useRef(null);
|
|
24908
|
+
const infiniteScrollRef = ref !== null && ref !== void 0 ? ref : backupRef;
|
|
24909
|
+
useInfiniteScroll({
|
|
24910
|
+
rootMargin: '500px',
|
|
24911
|
+
loadMore: __loadMore,
|
|
24912
|
+
ref: infiniteScrollRef,
|
|
24913
|
+
paginationInfo: __paginationInfo,
|
|
24914
|
+
});
|
|
24915
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component15, Object.assign(Object.assign({}, props), { ref: infiniteScrollRef }));
|
|
24916
|
+
});
|
|
24917
|
+
}
|
|
24918
|
+
exports.withInfiniteScroll = withInfiniteScroll;
|
|
24852
24919
|
var import_process2 = __toESM(require_browser(), 1);
|
|
24853
24920
|
function debounce(fn, time2) {
|
|
24854
24921
|
let timeout;
|
|
@@ -25007,7 +25074,7 @@ function useSafariGapFix(gap, ref, display) {
|
|
|
25007
25074
|
var Stack = /* @__PURE__ */ (() => {
|
|
25008
25075
|
const StackInner = react_12.default.forwardRef(function StackInner2(stackProps, forwardedRef) {
|
|
25009
25076
|
var _f, _j;
|
|
25010
|
-
const { as = 'div', direction = 'vertical', distribution = 'start', alignment = 'center', gap = 10, wrap: wrap2 = false, useFlexboxGap: externalUseFlexboxGap = true, children, style: styleProp, className, willChangeTransform, __fromCodeComponentNode, parentSize, __contentWrapperStyle } = stackProps, containerProps = __rest(stackProps, ["as", "direction", "distribution", "alignment", "gap", "wrap", "useFlexboxGap", "children", "style", "className", "willChangeTransform", "__fromCodeComponentNode", "parentSize", "__contentWrapperStyle"]);
|
|
25077
|
+
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 } = stackProps, containerProps = __rest(stackProps, ["as", "direction", "distribution", "alignment", "gap", "wrap", "useFlexboxGap", "children", "style", "className", "willChangeTransform", "__fromCodeComponentNode", "parentSize", "__contentWrapperStyle"]);
|
|
25011
25078
|
const useFlexboxGap = Boolean(externalUseFlexboxGap || wrap2);
|
|
25012
25079
|
const stackRef = react_12.default.useRef(null);
|
|
25013
25080
|
const onBeforeLayoutMeasure = useSafariGapFix(gap, stackRef, 'flex');
|
|
@@ -25066,8 +25133,7 @@ var Stack = /* @__PURE__ */ (() => {
|
|
|
25066
25133
|
if (styleProp == null ? void 0 : styleProp.height)
|
|
25067
25134
|
contentWrapperStyle.height = styleProp == null ? void 0 : styleProp.height;
|
|
25068
25135
|
}
|
|
25069
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(FrameWithMotion, Object.assign(Object.assign(Object.assign(Object.assign({ as, background: fromCanvasComponent ? void 0 : 'none' }, props), { layoutId, ref: useForwardedRef(forwardedRef, stackRef) }), attributes), { style,
|
|
25070
|
-
className, layoutScroll: true, children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, {
|
|
25136
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(FrameWithMotion, Object.assign(Object.assign(Object.assign(Object.assign({ as, background: fromCanvasComponent ? void 0 : 'none' }, props), { layoutId, ref: useForwardedRef(forwardedRef, stackRef) }), attributes), { style, className: className2, layoutScroll: true, children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, {
|
|
25071
25137
|
'data-framer-stack-content-wrapper': true,
|
|
25072
25138
|
'data-framer-stack-direction-reverse': isReverse,
|
|
25073
25139
|
'data-framer-stack-gap-enabled': gapEnabled,
|
|
@@ -27235,7 +27301,7 @@ function useUpdateScrollOffset(ref, side, offset, cancelEmulatedTouchScrollAnima
|
|
|
27235
27301
|
[offset,]);
|
|
27236
27302
|
}
|
|
27237
27303
|
var NativeScroll = /* @__PURE__ */ react_12.default.forwardRef(function NativeScroll2(props, forwardedRef) {
|
|
27238
|
-
const { direction = 'vertical', scrollBarVisible = false, dragEnabled = true, contentOffsetX = 0, contentOffsetY = 0, contentWidth: _contentWidth, contentHeight: _contentHeight, children, resetOffset, onScroll, className,
|
|
27304
|
+
const { direction = 'vertical', scrollBarVisible = false, dragEnabled = true, contentOffsetX = 0, contentOffsetY = 0, contentWidth: _contentWidth, contentHeight: _contentHeight, children, resetOffset, onScroll, className: className2,
|
|
27239
27305
|
// Not (yet) supported
|
|
27240
27306
|
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 } = props,
|
|
27241
27307
|
// Rest
|
|
@@ -27282,7 +27348,7 @@ var NativeScroll = /* @__PURE__ */ react_12.default.forwardRef(function NativeSc
|
|
|
27282
27348
|
}
|
|
27283
27349
|
: {};
|
|
27284
27350
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsxs)(FrameWithMotion, Object.assign(Object.assign(Object.assign({ ref, 'data-framer-component-type': 'NativeScroll', background: 'none' }, containerProps), size), { onScroll,
|
|
27285
|
-
layoutId, onBeforeLayoutMeasure: updateScrollOffsetHandler, layoutScroll: true, className: cx(
|
|
27351
|
+
layoutId, onBeforeLayoutMeasure: updateScrollOffsetHandler, layoutScroll: true, className: cx(className2, `direction-${direction}`, !scrollBarVisible && 'scrollbar-hidden'), children: [
|
|
27286
27352
|
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(EmptyState, {
|
|
27287
27353
|
children,
|
|
27288
27354
|
size: {
|
|
@@ -28427,6 +28493,31 @@ function ComponentPresetsConsumer({ componentIdentifier, children, }) {
|
|
|
28427
28493
|
return children(presetProps);
|
|
28428
28494
|
}
|
|
28429
28495
|
exports.ComponentPresetsConsumer = ComponentPresetsConsumer;
|
|
28496
|
+
function setRef(ref, value) {
|
|
28497
|
+
if (isFunction(ref)) {
|
|
28498
|
+
ref(value);
|
|
28499
|
+
}
|
|
28500
|
+
else if (isMutableRef(ref)) {
|
|
28501
|
+
ref.current = value;
|
|
28502
|
+
}
|
|
28503
|
+
}
|
|
28504
|
+
function isMutableRef(ref) {
|
|
28505
|
+
return isObject2(ref) && 'current' in ref;
|
|
28506
|
+
}
|
|
28507
|
+
function createRefWithCallback(ref, callback) {
|
|
28508
|
+
return {
|
|
28509
|
+
get current() {
|
|
28510
|
+
return ref.current;
|
|
28511
|
+
},
|
|
28512
|
+
set current(value) {
|
|
28513
|
+
ref.current = value;
|
|
28514
|
+
callback(value);
|
|
28515
|
+
},
|
|
28516
|
+
};
|
|
28517
|
+
}
|
|
28518
|
+
function mergeRefs(...refs) {
|
|
28519
|
+
return (value) => refs.forEach((ref) => setRef(ref, value));
|
|
28520
|
+
}
|
|
28430
28521
|
function useCloneChildrenWithPropsAndRef(forwardedRef) {
|
|
28431
28522
|
const hook = useConstant2(() => createHook(forwardedRef));
|
|
28432
28523
|
hook.useSetup(forwardedRef);
|
|
@@ -28509,17 +28600,6 @@ function createRefFunction(state) {
|
|
|
28509
28600
|
setRef(prevForwardedRef, value);
|
|
28510
28601
|
};
|
|
28511
28602
|
}
|
|
28512
|
-
function setRef(ref, value) {
|
|
28513
|
-
if (isFunction(ref)) {
|
|
28514
|
-
ref(value);
|
|
28515
|
-
}
|
|
28516
|
-
else if (isMutableRef(ref)) {
|
|
28517
|
-
ref.current = value;
|
|
28518
|
-
}
|
|
28519
|
-
}
|
|
28520
|
-
function isMutableRef(ref) {
|
|
28521
|
-
return isObject2(ref) && 'current' in ref;
|
|
28522
|
-
}
|
|
28523
28603
|
var ComponentViewportContext = /* @__PURE__ */ react_12.default.createContext({});
|
|
28524
28604
|
function useComponentViewport() {
|
|
28525
28605
|
return react_12.default.useContext(ComponentViewportContext);
|
|
@@ -28622,8 +28702,8 @@ var withCSS = (Component15, escapedCSS, componentSerializationId) => react_12.de
|
|
|
28622
28702
|
react_12.default.useInsertionEffect(() => {
|
|
28623
28703
|
if (componentSerializationId && componentsWithServerRenderedStyles.has(componentSerializationId))
|
|
28624
28704
|
return;
|
|
28625
|
-
const
|
|
28626
|
-
|
|
28705
|
+
const css2 = Array.isArray(escapedCSS) ? escapedCSS : escapedCSS.split('\n');
|
|
28706
|
+
css2.forEach((rule) => rule && injectCSSRule(rule, sheet, cache2));
|
|
28627
28707
|
}, []);
|
|
28628
28708
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component15, Object.assign(Object.assign({}, props), { ref }));
|
|
28629
28709
|
});
|
|
@@ -29377,7 +29457,7 @@ function childrenWithOrigin(child, { x, y, }) {
|
|
|
29377
29457
|
}
|
|
29378
29458
|
function Floating(_f) {
|
|
29379
29459
|
var _j;
|
|
29380
|
-
var { alignment, placement, safeArea, offsetX, offsetY, anchorRef, className, children, portalSelector, zIndex, collisionDetection = false, collisionDetectionPadding, onDismiss } = _f, rest = __rest(_f, ["alignment", "placement", "safeArea", "offsetX", "offsetY", "anchorRef", "className", "children", "portalSelector", "zIndex", "collisionDetection", "collisionDetectionPadding", "onDismiss"]);
|
|
29460
|
+
var { alignment, placement, safeArea, offsetX, offsetY, anchorRef, className: className2, children, portalSelector, zIndex, collisionDetection = false, collisionDetectionPadding, onDismiss } = _f, rest = __rest(_f, ["alignment", "placement", "safeArea", "offsetX", "offsetY", "anchorRef", "className", "children", "portalSelector", "zIndex", "collisionDetection", "collisionDetectionPadding", "onDismiss"]);
|
|
29381
29461
|
const floatingPositionRef = react_12.default.useRef(null);
|
|
29382
29462
|
const safeAreaRef = react_12.default.useRef(null);
|
|
29383
29463
|
const contentRef = react_12.default.useRef(null);
|
|
@@ -29447,7 +29527,7 @@ function Floating(_f) {
|
|
|
29447
29527
|
onDismiss,
|
|
29448
29528
|
});
|
|
29449
29529
|
return react_dom_1.default.createPortal(
|
|
29450
|
-
/* @__PURE__ */ (0, jsx_runtime_1.jsxs)('div', Object.assign(Object.assign({ ref: floatingPositionRef, className, style: {
|
|
29530
|
+
/* @__PURE__ */ (0, jsx_runtime_1.jsxs)('div', Object.assign(Object.assign({ ref: floatingPositionRef, className: className2, style: {
|
|
29451
29531
|
// Initially rendered as hidden, but the layout effect will set
|
|
29452
29532
|
// to visible when the position is calculated.
|
|
29453
29533
|
visibility: 'hidden',
|
|
@@ -29639,6 +29719,102 @@ function navigateFromAttributes(navigate, element, implicitPathVariables) {
|
|
|
29639
29719
|
navigate(routeId, elementId, Object.assign({}, implicitPathVariables, pathVariables), smoothScroll);
|
|
29640
29720
|
return true;
|
|
29641
29721
|
}
|
|
29722
|
+
var PRELOAD_AFTER_MS = 500;
|
|
29723
|
+
var OBSERVER_THRESHOLD = 0.9;
|
|
29724
|
+
var LOW_MEMORY_THRESHOLD = 1.7;
|
|
29725
|
+
var MAX_CONCURRENT_PRELOADS_SLOW_NETWORK = 4;
|
|
29726
|
+
var MAX_CONCURRENT_PRELOADS_FAST_NETWORK = Infinity;
|
|
29727
|
+
var nodeToRoute = /* @__PURE__ */ new WeakMap();
|
|
29728
|
+
var preloadedRoutes = /* @__PURE__ */ new Set();
|
|
29729
|
+
var routeToNodesInViewport = /* @__PURE__ */ new Map();
|
|
29730
|
+
function getObserveRouteForPreloadingFn() {
|
|
29731
|
+
var _a;
|
|
29732
|
+
const connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection || {};
|
|
29733
|
+
const lowDeviceMemory = navigator.deviceMemory && navigator.deviceMemory > LOW_MEMORY_THRESHOLD;
|
|
29734
|
+
let effectiveType, preloadDisabled, maxPreloadAmount;
|
|
29735
|
+
function updateConnection() {
|
|
29736
|
+
effectiveType = connection.effectiveType || '';
|
|
29737
|
+
preloadDisabled = connection.saveData || effectiveType.includes('2g');
|
|
29738
|
+
maxPreloadAmount = effectiveType === '3g' || lowDeviceMemory
|
|
29739
|
+
? MAX_CONCURRENT_PRELOADS_SLOW_NETWORK
|
|
29740
|
+
: MAX_CONCURRENT_PRELOADS_FAST_NETWORK;
|
|
29741
|
+
}
|
|
29742
|
+
(_a = connection.addEventListener) == null ? void 0 : _a.call(connection, 'change', updateConnection);
|
|
29743
|
+
updateConnection();
|
|
29744
|
+
const observer2 = new IntersectionObserver(onPreloadIntersectionChange, {
|
|
29745
|
+
threshold: OBSERVER_THRESHOLD,
|
|
29746
|
+
});
|
|
29747
|
+
let activePreloadsAmount = 0;
|
|
29748
|
+
function preloadTimeout(route, target) {
|
|
29749
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29750
|
+
if (preloadDisabled)
|
|
29751
|
+
return;
|
|
29752
|
+
const nodesInViewport = routeToNodesInViewport.get(route);
|
|
29753
|
+
if (!(nodesInViewport == null ? void 0 : nodesInViewport.size) || preloadedRoutes.has(route))
|
|
29754
|
+
return;
|
|
29755
|
+
++activePreloadsAmount;
|
|
29756
|
+
preloadedRoutes.add(route);
|
|
29757
|
+
const preloadDone = preloadRoute(route).catch(() => {
|
|
29758
|
+
if (false) {
|
|
29759
|
+
throw new Error('Error in preloadRoute during preloadTimeout. This should never happen as it introduces bugs. Please make sure preloadRoute does not throw.');
|
|
29760
|
+
}
|
|
29761
|
+
});
|
|
29762
|
+
observer2.unobserve(target);
|
|
29763
|
+
nodeToRoute.delete(target);
|
|
29764
|
+
for (const node of nodesInViewport) {
|
|
29765
|
+
observer2.unobserve(node);
|
|
29766
|
+
nodeToRoute.delete(node);
|
|
29767
|
+
}
|
|
29768
|
+
nodesInViewport.clear();
|
|
29769
|
+
routeToNodesInViewport.delete(route);
|
|
29770
|
+
yield preloadDone;
|
|
29771
|
+
--activePreloadsAmount;
|
|
29772
|
+
});
|
|
29773
|
+
}
|
|
29774
|
+
function onPreloadIntersectionChange(entries) {
|
|
29775
|
+
var _f;
|
|
29776
|
+
var _a2;
|
|
29777
|
+
for (const entry of entries) {
|
|
29778
|
+
const target = entry.target;
|
|
29779
|
+
const route = nodeToRoute.get(target);
|
|
29780
|
+
if (!route || preloadedRoutes.has(route)) {
|
|
29781
|
+
observer2.unobserve(target);
|
|
29782
|
+
nodeToRoute.delete(target);
|
|
29783
|
+
continue;
|
|
29784
|
+
}
|
|
29785
|
+
const nodes = routeToNodesInViewport.get(route);
|
|
29786
|
+
const amountOfNodesInViewport = (_f = ((_a2 = routeToNodesInViewport.get(route)) == null ? void 0 : _a2.size)) !== null && _f !== void 0 ? _f : 0;
|
|
29787
|
+
if (entry.isIntersecting) {
|
|
29788
|
+
if (activePreloadsAmount >= maxPreloadAmount)
|
|
29789
|
+
continue;
|
|
29790
|
+
if (nodes)
|
|
29791
|
+
nodes.add(target);
|
|
29792
|
+
else
|
|
29793
|
+
routeToNodesInViewport.set(route, /* @__PURE__ */ new Set([target,]));
|
|
29794
|
+
setTimeout(preloadTimeout.bind(void 0, route, target), PRELOAD_AFTER_MS);
|
|
29795
|
+
}
|
|
29796
|
+
else {
|
|
29797
|
+
if (nodes)
|
|
29798
|
+
nodes.delete(target);
|
|
29799
|
+
if (amountOfNodesInViewport <= 1)
|
|
29800
|
+
routeToNodesInViewport.delete(route);
|
|
29801
|
+
}
|
|
29802
|
+
}
|
|
29803
|
+
}
|
|
29804
|
+
return (route, node) => {
|
|
29805
|
+
if (preloadedRoutes.has(route))
|
|
29806
|
+
return;
|
|
29807
|
+
nodeToRoute.set(node, route);
|
|
29808
|
+
observer2.observe(node);
|
|
29809
|
+
return () => {
|
|
29810
|
+
nodeToRoute.delete(node);
|
|
29811
|
+
observer2.unobserve(node);
|
|
29812
|
+
};
|
|
29813
|
+
};
|
|
29814
|
+
}
|
|
29815
|
+
var observeRouteForPreloading =
|
|
29816
|
+
// this also guards `window`
|
|
29817
|
+
!shouldPreloadBasedOnUA || typeof IntersectionObserver === 'undefined' ? null : /* @__PURE__ */ getObserveRouteForPreloadingFn();
|
|
29642
29818
|
var noLocale = {};
|
|
29643
29819
|
var resolveSlugCache = /* @__PURE__ */ new WeakMap();
|
|
29644
29820
|
function resolveSlug(unresolvedSlug, utilsByCollectionId, activeLocale) {
|
|
@@ -29705,11 +29881,11 @@ function linkFromFramerPageLink(link) {
|
|
|
29705
29881
|
};
|
|
29706
29882
|
}
|
|
29707
29883
|
var pathVariablesRegExp2 = /:([a-z]\w*)/gi;
|
|
29708
|
-
var PathVariablesContext = /* @__PURE__ */
|
|
29884
|
+
var PathVariablesContext = /* @__PURE__ */ (0, react_1.createContext)(void 0);
|
|
29709
29885
|
exports.PathVariablesContext = PathVariablesContext;
|
|
29710
29886
|
function useImplicitPathVariables() {
|
|
29711
29887
|
var _a;
|
|
29712
|
-
const contextPathVariables =
|
|
29888
|
+
const contextPathVariables = (0, react_3.useContext)(PathVariablesContext);
|
|
29713
29889
|
const currentPathVariables = (_a = useCurrentRoute()) == null ? void 0 : _a.pathVariables;
|
|
29714
29890
|
const pathVariables = contextPathVariables || currentPathVariables;
|
|
29715
29891
|
return pathVariables;
|
|
@@ -29733,7 +29909,7 @@ function linkMatchesRoute(route, { webPageId, hash: hash2, pathVariables, }, imp
|
|
|
29733
29909
|
}
|
|
29734
29910
|
function useLinkMatchesRoute(link) {
|
|
29735
29911
|
const route = useCurrentRoute();
|
|
29736
|
-
const contextPathVariables =
|
|
29912
|
+
const contextPathVariables = (0, react_3.useContext)(PathVariablesContext);
|
|
29737
29913
|
if (!route)
|
|
29738
29914
|
return false;
|
|
29739
29915
|
const pageLink = isString22(link) ? linkFromFramerPageLink(link) : link;
|
|
@@ -29792,41 +29968,6 @@ function createOnClickLinkHandler(router, routeId, elementId, combinedPathVariab
|
|
|
29792
29968
|
(_b = router.navigate) == null ? void 0 : _b.call(router, routeId, elementId, combinedPathVariables, smoothScroll);
|
|
29793
29969
|
});
|
|
29794
29970
|
}
|
|
29795
|
-
function propsForRoutePath(href, openInNewTab, router, currentRoute, implicitPathVariables, smoothScroll) {
|
|
29796
|
-
const isInternal = isInternalURL(href);
|
|
29797
|
-
if (!router.routes || !router.getRoute || !currentRoute || !isInternal) {
|
|
29798
|
-
return propsForLink(href, openInNewTab);
|
|
29799
|
-
}
|
|
29800
|
-
try {
|
|
29801
|
-
const [pathnameWithQueryParams, hash2,] = href.split('#', 2);
|
|
29802
|
-
assert(pathnameWithQueryParams !== void 0, 'A href must have a defined pathname.');
|
|
29803
|
-
const [pathname,] = pathnameWithQueryParams.split('?', 2);
|
|
29804
|
-
assert(pathname !== void 0, 'A href must have a defined pathname.');
|
|
29805
|
-
const { routeId, pathVariables, } = inferInitialRouteFromPath(router.routes, pathname);
|
|
29806
|
-
const route = router.getRoute(routeId);
|
|
29807
|
-
if (route) {
|
|
29808
|
-
preloadComponent(route.page);
|
|
29809
|
-
const combinedPathVariables = Object.assign({}, implicitPathVariables, pathVariables);
|
|
29810
|
-
const path = getPathForRoute(route, {
|
|
29811
|
-
currentRoutePath: currentRoute.path,
|
|
29812
|
-
currentPathVariables: currentRoute.pathVariables,
|
|
29813
|
-
// The hash value is already fully resolved so we don't need to
|
|
29814
|
-
// provide any hashVariables.
|
|
29815
|
-
hash: hash2 || void 0,
|
|
29816
|
-
pathVariables: combinedPathVariables,
|
|
29817
|
-
preserveQueryParams: router.preserveQueryParams,
|
|
29818
|
-
});
|
|
29819
|
-
const anchorTarget = getTargetAttrValue(openInNewTab, true);
|
|
29820
|
-
return {
|
|
29821
|
-
href: path,
|
|
29822
|
-
target: anchorTarget,
|
|
29823
|
-
onClick: createOnClickLinkHandler(router, routeId, hash2 || void 0, combinedPathVariables, smoothScroll),
|
|
29824
|
-
};
|
|
29825
|
-
}
|
|
29826
|
-
}
|
|
29827
|
-
catch (_f) { }
|
|
29828
|
-
return propsForLink(href, openInNewTab);
|
|
29829
|
-
}
|
|
29830
29971
|
function resolveSlugs(unresolvedPathSlugs, unresolvedHashSlugs, collectionUtils, activeLocale) {
|
|
29831
29972
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29832
29973
|
function handleSlugs(unresolvedSlugs) {
|
|
@@ -29886,14 +30027,92 @@ function resolveSlugsWithSuspense(unresolvedPathSlugs, unresolvedHashSlugs, coll
|
|
|
29886
30027
|
}
|
|
29887
30028
|
return result;
|
|
29888
30029
|
}
|
|
29889
|
-
|
|
30030
|
+
function propsForRoutePath(href, openInNewTab, router, currentRoute, implicitPathVariables, smoothScroll) {
|
|
30031
|
+
const isInternal = isInternalURL(href);
|
|
30032
|
+
if (!router.routes || !router.getRoute || !currentRoute || !isInternal) {
|
|
30033
|
+
return propsForLink(href, openInNewTab);
|
|
30034
|
+
}
|
|
30035
|
+
try {
|
|
30036
|
+
const [pathnameWithQueryParams, hash2,] = href.split('#', 2);
|
|
30037
|
+
assert(pathnameWithQueryParams !== void 0, 'A href must have a defined pathname.');
|
|
30038
|
+
const [pathname,] = pathnameWithQueryParams.split('?', 2);
|
|
30039
|
+
assert(pathname !== void 0, 'A href must have a defined pathname.');
|
|
30040
|
+
const { routeId, pathVariables, } = inferInitialRouteFromPath(router.routes, pathname);
|
|
30041
|
+
const route = router.getRoute(routeId);
|
|
30042
|
+
if (route) {
|
|
30043
|
+
const combinedPathVariables = Object.assign({}, implicitPathVariables, pathVariables);
|
|
30044
|
+
const path = getPathForRoute(route, {
|
|
30045
|
+
currentRoutePath: currentRoute.path,
|
|
30046
|
+
currentPathVariables: currentRoute.pathVariables,
|
|
30047
|
+
// The hash value is already fully resolved so we don't need to
|
|
30048
|
+
// provide any hashVariables.
|
|
30049
|
+
hash: hash2 || void 0,
|
|
30050
|
+
pathVariables: combinedPathVariables,
|
|
30051
|
+
preserveQueryParams: router.preserveQueryParams,
|
|
30052
|
+
});
|
|
30053
|
+
const anchorTarget = getTargetAttrValue(openInNewTab, true);
|
|
30054
|
+
return {
|
|
30055
|
+
href: path,
|
|
30056
|
+
target: anchorTarget,
|
|
30057
|
+
onClick: createOnClickLinkHandler(router, routeId, hash2 || void 0, combinedPathVariables, smoothScroll),
|
|
30058
|
+
};
|
|
30059
|
+
}
|
|
30060
|
+
}
|
|
30061
|
+
catch (_f) { }
|
|
30062
|
+
return propsForLink(href, openInNewTab);
|
|
30063
|
+
}
|
|
30064
|
+
function getRouteFromPageLink(pageLink, router, currentRoute) {
|
|
30065
|
+
var _a;
|
|
30066
|
+
if (isString22(pageLink)) {
|
|
30067
|
+
const isInternal = isInternalURL(pageLink);
|
|
30068
|
+
if (!router.routes || !router.getRoute || !currentRoute || !isInternal) {
|
|
30069
|
+
return;
|
|
30070
|
+
}
|
|
30071
|
+
const [pathnameWithQueryParams,] = pageLink.split('#', 2);
|
|
30072
|
+
if (pathnameWithQueryParams === void 0)
|
|
30073
|
+
return;
|
|
30074
|
+
const [pathname,] = pathnameWithQueryParams.split('?', 2);
|
|
30075
|
+
if (pathname === void 0)
|
|
30076
|
+
return;
|
|
30077
|
+
const { routeId, } = inferInitialRouteFromPath(router.routes, pathname);
|
|
30078
|
+
return router.getRoute(routeId);
|
|
30079
|
+
}
|
|
30080
|
+
const { webPageId, } = pageLink;
|
|
30081
|
+
return (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId);
|
|
30082
|
+
}
|
|
30083
|
+
var Link = /* @__PURE__ */ (0, react_3.forwardRef)((_f, forwardedRef) => {
|
|
29890
30084
|
var { children, href, openInNewTab, smoothScroll } = _f, restProps = __rest(_f, ["children", "href", "openInNewTab", "smoothScroll"]);
|
|
29891
30085
|
const router = useRouter();
|
|
29892
30086
|
const currentRoute = useCurrentRoute();
|
|
29893
30087
|
const implicitPathVariables = useImplicitPathVariables();
|
|
29894
30088
|
const { activeLocale, } = useLocaleInfo();
|
|
30089
|
+
const fallbackRef = (0, react_4.useRef)(null);
|
|
30090
|
+
const stableObserverChildRef = (0, react_6.useMemo)(() => {
|
|
30091
|
+
let cleanupFn;
|
|
30092
|
+
const observerCallback = (node) => {
|
|
30093
|
+
var _a;
|
|
30094
|
+
if (node === null) {
|
|
30095
|
+
cleanupFn == null ? void 0 : cleanupFn();
|
|
30096
|
+
cleanupFn = void 0;
|
|
30097
|
+
return;
|
|
30098
|
+
}
|
|
30099
|
+
const pageLink = isLinkToWebPage(href) ? href : linkFromFramerPageLink(href);
|
|
30100
|
+
if (!pageLink)
|
|
30101
|
+
return;
|
|
30102
|
+
const route = getRouteFromPageLink(pageLink, router, currentRoute);
|
|
30103
|
+
if (!route)
|
|
30104
|
+
return;
|
|
30105
|
+
cleanupFn = (_a = observeRouteForPreloading) == null ? void 0 : _a(route, node);
|
|
30106
|
+
};
|
|
30107
|
+
const hasRef = (0, react_11.isValidElement)(children) && 'ref' in children;
|
|
30108
|
+
if (hasRef && isMutableRef(children.ref))
|
|
30109
|
+
return createRefWithCallback(children.ref, observerCallback);
|
|
30110
|
+
if (hasRef && isFunction(children.ref))
|
|
30111
|
+
return mergeRefs(children.ref, observerCallback);
|
|
30112
|
+
return createRefWithCallback(fallbackRef, observerCallback);
|
|
30113
|
+
}, [href, router, currentRoute, children,]);
|
|
29895
30114
|
const clone = useCloneChildrenWithPropsAndRef(forwardedRef);
|
|
29896
|
-
const props =
|
|
30115
|
+
const props = (0, react_6.useMemo)(() => {
|
|
29897
30116
|
var _a;
|
|
29898
30117
|
if (!href)
|
|
29899
30118
|
return {};
|
|
@@ -29904,13 +30123,11 @@ var Link = /* @__PURE__ */ react_12.default.forwardRef((_f, forwardedRef) => {
|
|
|
29904
30123
|
return propsForRoutePath(pageLink, openInNewTab, router, currentRoute, implicitPathVariables, smoothScroll);
|
|
29905
30124
|
}
|
|
29906
30125
|
const { webPageId, hash: hash2, pathVariables, hashVariables, unresolvedHashSlugs, unresolvedPathSlugs, } = pageLink;
|
|
29907
|
-
const route = (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId);
|
|
29908
30126
|
const resolvedSlugs = resolveSlugsWithSuspense(unresolvedPathSlugs, unresolvedHashSlugs, router.collectionUtils, activeLocale);
|
|
29909
|
-
|
|
29910
|
-
|
|
29911
|
-
const combinedPathVariable = Object.assign({}, implicitPathVariables, pathVariables, resolvedSlugs == null ? void 0 : resolvedSlugs.path);
|
|
29912
|
-
const combinedHashVariable = Object.assign({}, implicitPathVariables, hashVariables, resolvedSlugs == null ? void 0 : resolvedSlugs.hash);
|
|
30127
|
+
const combinedPathVariable = Object.assign(Object.assign(Object.assign({}, implicitPathVariables), pathVariables), (resolvedSlugs == null ? void 0 : resolvedSlugs.path));
|
|
30128
|
+
const combinedHashVariable = Object.assign(Object.assign(Object.assign({}, implicitPathVariables), hashVariables), (resolvedSlugs == null ? void 0 : resolvedSlugs.hash));
|
|
29913
30129
|
const anchorTarget = getTargetAttrValue(openInNewTab, true);
|
|
30130
|
+
const route = (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId);
|
|
29914
30131
|
const resolvedHref = getPathForRoute(route, {
|
|
29915
30132
|
currentRoutePath: currentRoute == null ? void 0 : currentRoute.path,
|
|
29916
30133
|
currentPathVariables: currentRoute == null ? void 0 : currentRoute.pathVariables,
|
|
@@ -29927,7 +30144,7 @@ var Link = /* @__PURE__ */ react_12.default.forwardRef((_f, forwardedRef) => {
|
|
|
29927
30144
|
'data-framer-page-link-current': currentRoute && linkMatchesRoute(currentRoute, pageLink, implicitPathVariables) || void 0,
|
|
29928
30145
|
};
|
|
29929
30146
|
}, [href, router, activeLocale, implicitPathVariables, openInNewTab, currentRoute, smoothScroll,]);
|
|
29930
|
-
return clone(children, Object.assign(Object.assign({}, restProps), props));
|
|
30147
|
+
return clone(children, Object.assign(Object.assign(Object.assign({}, restProps), props), { ref: stableObserverChildRef }));
|
|
29931
30148
|
});
|
|
29932
30149
|
exports.Link = Link;
|
|
29933
30150
|
function resolveLink(href, router, implicitPathVariables) {
|
|
@@ -29972,7 +30189,7 @@ function resolvePageScope(pageLink, router) {
|
|
|
29972
30189
|
});
|
|
29973
30190
|
}
|
|
29974
30191
|
exports.resolvePageScope = resolvePageScope;
|
|
29975
|
-
function PageRoot({ RootComponent, isWebsite, routeId, pathVariables, routes, collectionUtils, notFoundPage, isReducedMotion = false, includeDataObserver = false, localeId, locales, preserveQueryParams, enableImproveInpDuringHydration,
|
|
30192
|
+
function PageRoot({ RootComponent, isWebsite, routeId, pathVariables, routes, collectionUtils, notFoundPage, isReducedMotion = false, includeDataObserver = false, localeId, locales, preserveQueryParams, enableImproveInpDuringHydration, addHydrationMarkers = false, }) {
|
|
29976
30193
|
react_12.default.useEffect(() => {
|
|
29977
30194
|
if (isWebsite)
|
|
29978
30195
|
return;
|
|
@@ -29996,7 +30213,7 @@ function PageRoot({ RootComponent, isWebsite, routeId, pathVariables, routes, co
|
|
|
29996
30213
|
},
|
|
29997
30214
|
preserveQueryParams,
|
|
29998
30215
|
enableImproveInpDuringHydration,
|
|
29999
|
-
|
|
30216
|
+
addHydrationMarkers,
|
|
30000
30217
|
}),
|
|
30001
30218
|
}),
|
|
30002
30219
|
});
|
|
@@ -33042,7 +33259,8 @@ function useQueryData(query) {
|
|
|
33042
33259
|
}
|
|
33043
33260
|
exports.useQueryData = useQueryData;
|
|
33044
33261
|
function useQueryCount(query) {
|
|
33045
|
-
const
|
|
33262
|
+
const countQuery = Object.assign(Object.assign({}, query), { select: [] });
|
|
33263
|
+
const collection = useQueryData(countQuery);
|
|
33046
33264
|
return collection.length;
|
|
33047
33265
|
}
|
|
33048
33266
|
function getWhereExpressionFromPathVariables(pathVariables) {
|
|
@@ -33084,25 +33302,30 @@ function getWhereExpressionFromPathVariables(pathVariables) {
|
|
|
33084
33302
|
}));
|
|
33085
33303
|
}
|
|
33086
33304
|
exports.getWhereExpressionFromPathVariables = getWhereExpressionFromPathVariables;
|
|
33087
|
-
function useLoadMorePaginatedQuery(query, pageSize) {
|
|
33088
|
-
const { paginationInfo, setPaginationInfo, } = useCollectionListPaginationInfo();
|
|
33305
|
+
function useLoadMorePaginatedQuery(query, pageSize, hash2) {
|
|
33089
33306
|
const count = useQueryCount(query);
|
|
33090
|
-
const
|
|
33307
|
+
const [paginationInfo, setPaginationInfo,] = (0, react_10.useState)(() => {
|
|
33308
|
+
var _f;
|
|
33309
|
+
var _a, _b, _c, _d;
|
|
33091
33310
|
const totalPages = Math.ceil(count / pageSize);
|
|
33311
|
+
const currentPage = (_f = ((_d = (_c = (_b = (_a = globalThis == null ? void 0 : globalThis.history) == null ? void 0 : _a.state) == null
|
|
33312
|
+
? void 0
|
|
33313
|
+
: _b.paginationInfo) == null
|
|
33314
|
+
? void 0
|
|
33315
|
+
: _c[hash2]) == null
|
|
33316
|
+
? void 0
|
|
33317
|
+
: _d.currentPage)) !== null && _f !== void 0 ? _f : 1;
|
|
33092
33318
|
return {
|
|
33093
|
-
currentPage
|
|
33319
|
+
currentPage,
|
|
33094
33320
|
totalPages,
|
|
33095
|
-
|
|
33321
|
+
isLoading: false,
|
|
33096
33322
|
};
|
|
33097
|
-
}
|
|
33323
|
+
});
|
|
33098
33324
|
(0, react_2.useEffect)(() => {
|
|
33099
|
-
|
|
33100
|
-
|
|
33101
|
-
}
|
|
33102
|
-
}, [count, initialPaginationInfo, paginationInfo, setPaginationInfo,]);
|
|
33325
|
+
pushLoadMoreHistory(hash2, paginationInfo);
|
|
33326
|
+
}, [hash2, paginationInfo,]);
|
|
33103
33327
|
const paginatedQuery = (0, react_6.useMemo)(() => {
|
|
33104
|
-
|
|
33105
|
-
let limit = pageSize * currentPaginationInfo.currentPage;
|
|
33328
|
+
let limit = pageSize * paginationInfo.currentPage;
|
|
33106
33329
|
if (query.limit) {
|
|
33107
33330
|
if (query.limit.type !== 'LiteralValue' || typeof query.limit.value !== 'number') {
|
|
33108
33331
|
throw new Error('Unexpected type for query limit');
|
|
@@ -33113,8 +33336,23 @@ function useLoadMorePaginatedQuery(query, pageSize) {
|
|
|
33113
33336
|
type: 'LiteralValue',
|
|
33114
33337
|
value: limit,
|
|
33115
33338
|
} });
|
|
33116
|
-
}, [
|
|
33117
|
-
|
|
33339
|
+
}, [query, pageSize, paginationInfo,]);
|
|
33340
|
+
const onCanvas = useIsOnFramerCanvas();
|
|
33341
|
+
const loadMore = (0, react_5.useCallback)(() => {
|
|
33342
|
+
if (onCanvas)
|
|
33343
|
+
return;
|
|
33344
|
+
if (paginationInfo.currentPage >= paginationInfo.totalPages)
|
|
33345
|
+
return;
|
|
33346
|
+
setPaginationInfo((info) => (Object.assign(Object.assign({}, info), { isLoading: true })));
|
|
33347
|
+
requestAnimationFrame(() => {
|
|
33348
|
+
setPaginationInfo((info) => (Object.assign(Object.assign({}, info), { currentPage: Math.min(info.currentPage + 1, info.totalPages), isLoading: false })));
|
|
33349
|
+
});
|
|
33350
|
+
}, [onCanvas, paginationInfo.currentPage, paginationInfo.totalPages,]);
|
|
33351
|
+
return {
|
|
33352
|
+
paginatedQuery,
|
|
33353
|
+
paginationInfo,
|
|
33354
|
+
loadMore,
|
|
33355
|
+
};
|
|
33118
33356
|
}
|
|
33119
33357
|
exports.useLoadMorePaginatedQuery = useLoadMorePaginatedQuery;
|
|
33120
33358
|
function createGestureVariant(variant, type) {
|
|
@@ -33170,9 +33408,10 @@ exports.CycleVariantState = CycleVariantState;
|
|
|
33170
33408
|
function useVariantState({ variant, defaultVariant: externalDefaultVariant, transitions: externalTransitions, enabledGestures: externalEnabledGestures, cycleOrder: externalCycleOrder = [], variantProps: variantProps2 = {}, variantClassNames = {}, }) {
|
|
33171
33409
|
const forceUpdate = useForceUpdate3();
|
|
33172
33410
|
const validBaseVariants = useConstant2(() => new Set(externalCycleOrder));
|
|
33173
|
-
const internalState =
|
|
33411
|
+
const internalState = react_12.default.useRef({
|
|
33174
33412
|
isHovered: false,
|
|
33175
33413
|
isPressed: false,
|
|
33414
|
+
hasPressedVariants: true,
|
|
33176
33415
|
baseVariant: safeBaseVariant(variant, externalDefaultVariant, validBaseVariants),
|
|
33177
33416
|
lastVariant: variant,
|
|
33178
33417
|
gestureVariant: void 0,
|
|
@@ -33184,14 +33423,14 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
|
|
|
33184
33423
|
cycleOrder: externalCycleOrder,
|
|
33185
33424
|
transitions: externalTransitions,
|
|
33186
33425
|
});
|
|
33187
|
-
const resolveNextVariant =
|
|
33426
|
+
const resolveNextVariant = react_12.default.useCallback((targetBaseVariant) => {
|
|
33188
33427
|
const { isHovered: isHovered2, isPressed: isPressed2, enabledGestures: enabledGestures2, defaultVariant: defaultVariant2, } = internalState.current;
|
|
33189
33428
|
const nextBaseVariant = safeBaseVariant(targetBaseVariant, defaultVariant2, validBaseVariants);
|
|
33190
33429
|
const gesture = getGesture(enabledGestures2 == null ? void 0 : enabledGestures2[nextBaseVariant], isHovered2, isPressed2);
|
|
33191
33430
|
const nextGestureVariant = gesture ? createGestureVariant(nextBaseVariant, gesture) : void 0;
|
|
33192
33431
|
return [nextBaseVariant, nextGestureVariant,];
|
|
33193
33432
|
}, [validBaseVariants,]);
|
|
33194
|
-
const setGestureState =
|
|
33433
|
+
const setGestureState = react_12.default.useCallback(({ isHovered: isHovered2, isPressed: isPressed2, }) => {
|
|
33195
33434
|
if (isHovered2 !== void 0)
|
|
33196
33435
|
internalState.current.isHovered = isHovered2;
|
|
33197
33436
|
if (isPressed2 !== void 0)
|
|
@@ -33201,10 +33440,10 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
|
|
|
33201
33440
|
if (nextBase !== baseVariant2 || nextGesture !== gestureVariant2) {
|
|
33202
33441
|
internalState.current.baseVariant = nextBase || defaultVariant2;
|
|
33203
33442
|
internalState.current.gestureVariant = nextGesture;
|
|
33204
|
-
(
|
|
33443
|
+
forceUpdate();
|
|
33205
33444
|
}
|
|
33206
33445
|
}, [resolveNextVariant, forceUpdate,]);
|
|
33207
|
-
const setVariant =
|
|
33446
|
+
const setVariant = react_12.default.useCallback((proposedVariant) => {
|
|
33208
33447
|
const { defaultVariant: defaultVariant2, cycleOrder, baseVariant: baseVariant2, gestureVariant: gestureVariant2, } = internalState.current;
|
|
33209
33448
|
const nextBaseVariant = proposedVariant === CycleVariantState
|
|
33210
33449
|
? nextVariant(cycleOrder || [], baseVariant2 || defaultVariant2)
|
|
@@ -33213,7 +33452,7 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
|
|
|
33213
33452
|
if (nextBase !== baseVariant2 || nextGesture !== gestureVariant2) {
|
|
33214
33453
|
internalState.current.baseVariant = nextBase || defaultVariant2;
|
|
33215
33454
|
internalState.current.gestureVariant = nextGesture;
|
|
33216
|
-
(
|
|
33455
|
+
forceUpdate();
|
|
33217
33456
|
}
|
|
33218
33457
|
}, [resolveNextVariant, forceUpdate,]);
|
|
33219
33458
|
if (variant !== internalState.current.lastVariant) {
|
|
@@ -33226,12 +33465,37 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
|
|
|
33226
33465
|
}
|
|
33227
33466
|
const { baseVariant, gestureVariant, defaultVariant, enabledGestures, isHovered, isPressed, } = internalState.current;
|
|
33228
33467
|
const addVariantProps = useAddVariantProps(internalState.current.baseVariant, internalState.current.gestureVariant, variantProps2);
|
|
33229
|
-
return
|
|
33468
|
+
return react_12.default.useMemo(() => {
|
|
33230
33469
|
const variants = [];
|
|
33231
33470
|
if (baseVariant !== defaultVariant)
|
|
33232
33471
|
variants.push(baseVariant);
|
|
33233
33472
|
if (gestureVariant)
|
|
33234
33473
|
variants.push(gestureVariant);
|
|
33474
|
+
const gestures = enabledGestures == null ? void 0 : enabledGestures[baseVariant];
|
|
33475
|
+
const gestureHandlers = {};
|
|
33476
|
+
if (gestures == null ? void 0 : gestures.hover) {
|
|
33477
|
+
Object.assign(gestureHandlers, {
|
|
33478
|
+
onMouseEnter: () => setGestureState({
|
|
33479
|
+
isHovered: true,
|
|
33480
|
+
}),
|
|
33481
|
+
onMouseLeave: () => setGestureState({
|
|
33482
|
+
isHovered: false,
|
|
33483
|
+
}),
|
|
33484
|
+
});
|
|
33485
|
+
}
|
|
33486
|
+
if (gestures == null ? void 0 : gestures.pressed) {
|
|
33487
|
+
Object.assign(gestureHandlers, {
|
|
33488
|
+
onTapStart: () => setGestureState({
|
|
33489
|
+
isPressed: true,
|
|
33490
|
+
}),
|
|
33491
|
+
onTapCancel: () => setGestureState({
|
|
33492
|
+
isPressed: false,
|
|
33493
|
+
}),
|
|
33494
|
+
onTap: () => setGestureState({
|
|
33495
|
+
isPressed: false,
|
|
33496
|
+
}),
|
|
33497
|
+
});
|
|
33498
|
+
}
|
|
33235
33499
|
return {
|
|
33236
33500
|
variants,
|
|
33237
33501
|
baseVariant,
|
|
@@ -33240,7 +33504,8 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
|
|
|
33240
33504
|
setVariant,
|
|
33241
33505
|
setGestureState,
|
|
33242
33506
|
addVariantProps,
|
|
33243
|
-
|
|
33507
|
+
gestureHandlers,
|
|
33508
|
+
classNames: cx(createVariantClassName(baseVariant, variantClassNames), getGesture(gestures, isHovered, isPressed)),
|
|
33244
33509
|
};
|
|
33245
33510
|
}, [
|
|
33246
33511
|
baseVariant,
|
|
@@ -34091,8 +34356,8 @@ var LocalFontSource = class {
|
|
|
34091
34356
|
};
|
|
34092
34357
|
const aliases = /* @__PURE__ */ new Map();
|
|
34093
34358
|
const weights = [400, 100, 200, 300, 500, 600, 700, 800, 900,];
|
|
34094
|
-
const
|
|
34095
|
-
for (const style of
|
|
34359
|
+
const styles2 = ['normal', 'italic',];
|
|
34360
|
+
for (const style of styles2) {
|
|
34096
34361
|
for (const weight of weights) {
|
|
34097
34362
|
const variant = createVariantName(weight, style);
|
|
34098
34363
|
const alias = `__SystemDefault-${weight}-${style}__`;
|
|
@@ -35004,13 +35269,10 @@ var DeprecatedComponentContainer = /* @__PURE__ */ (() => {
|
|
|
35004
35269
|
},
|
|
35005
35270
|
});
|
|
35006
35271
|
}
|
|
35007
|
-
renderErrorPlaceholder(
|
|
35272
|
+
renderErrorPlaceholder(error) {
|
|
35008
35273
|
const { RenderPlaceholder, } = runtime;
|
|
35009
35274
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(FrameWithMotion, Object.assign(Object.assign({}, this.props), { background: null, children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(RenderPlaceholder, {
|
|
35010
|
-
error
|
|
35011
|
-
error,
|
|
35012
|
-
file,
|
|
35013
|
-
},
|
|
35275
|
+
error,
|
|
35014
35276
|
}) }));
|
|
35015
35277
|
}
|
|
35016
35278
|
render() {
|
|
@@ -35023,13 +35285,23 @@ var DeprecatedComponentContainer = /* @__PURE__ */ (() => {
|
|
|
35023
35285
|
if (noChildren) {
|
|
35024
35286
|
const errorComponent = runtime.componentLoader.errorForIdentifier(componentIdentifier);
|
|
35025
35287
|
if (errorComponent) {
|
|
35026
|
-
|
|
35288
|
+
const title = `Error in ${errorComponent.file}`;
|
|
35289
|
+
const message = errorComponent.error;
|
|
35290
|
+
return this.renderErrorPlaceholder({
|
|
35291
|
+
title,
|
|
35292
|
+
message,
|
|
35293
|
+
});
|
|
35027
35294
|
}
|
|
35028
35295
|
}
|
|
35029
35296
|
if (error && error.children === children) {
|
|
35030
35297
|
const component = runtime.componentLoader.componentForIdentifier(componentIdentifier);
|
|
35031
35298
|
const file = component ? component.file : '???';
|
|
35032
|
-
|
|
35299
|
+
const title = `Error in ${file}`;
|
|
35300
|
+
const message = error.message;
|
|
35301
|
+
return this.renderErrorPlaceholder({
|
|
35302
|
+
title,
|
|
35303
|
+
message,
|
|
35304
|
+
});
|
|
35033
35305
|
}
|
|
35034
35306
|
(_b = (_a2 = asRecord(safeWindow))['__checkComponentBudget__']) == null ? void 0 : _b.call(_a2);
|
|
35035
35307
|
let frameProps = this.props;
|
|
@@ -35181,8 +35453,8 @@ function formReducer(_state, { type, }) {
|
|
|
35181
35453
|
function preventDefault(e) {
|
|
35182
35454
|
e.preventDefault();
|
|
35183
35455
|
}
|
|
35184
|
-
var FormContainer = (_f) => {
|
|
35185
|
-
var { action, formId, disabled, children, redirectUrl } = _f, props = __rest(_f, ["action", "formId", "disabled", "children", "redirectUrl"]);
|
|
35456
|
+
var FormContainer = /* @__PURE__ */ react_12.default.forwardRef((_f, ref) => {
|
|
35457
|
+
var { action, formId, disabled, children, redirectUrl, onSuccess, onError } = _f, props = __rest(_f, ["action", "formId", "disabled", "children", "redirectUrl", "onSuccess", "onError"]);
|
|
35186
35458
|
const [state, dispatch,] = react_12.default.useReducer(formReducer, {
|
|
35187
35459
|
state: disabled ? 'disabled' : void 0,
|
|
35188
35460
|
});
|
|
@@ -35228,6 +35500,7 @@ var FormContainer = (_f) => {
|
|
|
35228
35500
|
dispatch({
|
|
35229
35501
|
type: 'success',
|
|
35230
35502
|
});
|
|
35503
|
+
onSuccess == null ? void 0 : onSuccess();
|
|
35231
35504
|
if (redirectUrl) {
|
|
35232
35505
|
yield redirectTo(redirectUrl);
|
|
35233
35506
|
}
|
|
@@ -35236,6 +35509,7 @@ var FormContainer = (_f) => {
|
|
|
35236
35509
|
dispatch({
|
|
35237
35510
|
type: 'error',
|
|
35238
35511
|
});
|
|
35512
|
+
onError == null ? void 0 : onError();
|
|
35239
35513
|
}
|
|
35240
35514
|
});
|
|
35241
35515
|
const handleKeyDown = (event) => {
|
|
@@ -35248,8 +35522,8 @@ var FormContainer = (_f) => {
|
|
|
35248
35522
|
void handleSubmit(event);
|
|
35249
35523
|
}
|
|
35250
35524
|
};
|
|
35251
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.form, Object.assign(Object.assign({}, props), { 'data-formid': formId, onSubmit: isSubmitEnabled ? handleSubmit : preventDefault, onKeyDown: handleKeyDown, children: children(state) }));
|
|
35252
|
-
};
|
|
35525
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.form, Object.assign(Object.assign({}, props), { 'data-formid': formId, onSubmit: isSubmitEnabled ? handleSubmit : preventDefault, onKeyDown: handleKeyDown, ref, children: children(state) }));
|
|
35526
|
+
});
|
|
35253
35527
|
exports.FormContainer = FormContainer;
|
|
35254
35528
|
function submitForm(action, data2) {
|
|
35255
35529
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -35304,21 +35578,56 @@ var FormInputStyleVariableNames = /* @__PURE__ */ ((FormInputStyleVariableNames2
|
|
|
35304
35578
|
FormInputStyleVariableNames2['FontLineHeight'] = '--framer-input-font-line-height';
|
|
35305
35579
|
FormInputStyleVariableNames2['PlaceholderColor'] = '--framer-input-placeholder-color';
|
|
35306
35580
|
FormInputStyleVariableNames2['BoxShadow'] = '--framer-input-box-shadow';
|
|
35307
|
-
FormInputStyleVariableNames2['ZIndex'] = '--framer-input-z-index';
|
|
35308
35581
|
FormInputStyleVariableNames2['FocusedBorderColor'] = '--framer-input-focused-border-color';
|
|
35309
35582
|
FormInputStyleVariableNames2['FocusedBorderWidth'] = '--framer-input-focused-border-width';
|
|
35310
35583
|
FormInputStyleVariableNames2['FocusedBorderStyle'] = '--framer-input-focused-border-style';
|
|
35311
35584
|
FormInputStyleVariableNames2['FocusedBackground'] = '--framer-input-focused-background';
|
|
35312
35585
|
FormInputStyleVariableNames2['FocusedBoxShadow'] = '--framer-input-focused-box-shadow';
|
|
35313
35586
|
FormInputStyleVariableNames2['FocusedTransition'] = '--framer-input-focused-transition';
|
|
35587
|
+
FormInputStyleVariableNames2['BooleanCheckedIconURL'] = '--framer-input-boolean-icon';
|
|
35588
|
+
FormInputStyleVariableNames2['BooleanCheckedBackground'] = '--framer-input-boolean-checked-background';
|
|
35589
|
+
FormInputStyleVariableNames2['BooleanCheckedBorderColor'] = '--framer-input-boolean-checked-border-color';
|
|
35590
|
+
FormInputStyleVariableNames2['BooleanCheckedBorderWidth'] = '--framer-input-boolean-checked-border-width';
|
|
35591
|
+
FormInputStyleVariableNames2['BooleanCheckedBorderStyle'] = '--framer-input-boolean-checked-border-style';
|
|
35592
|
+
FormInputStyleVariableNames2['BooleanCheckedBoxShadow'] = '--framer-input-boolean-checked-box-shadow';
|
|
35593
|
+
FormInputStyleVariableNames2['BooleanCheckedTransition'] = '--framer-input-boolean-checked-transition';
|
|
35594
|
+
FormInputStyleVariableNames2['InvalidTextColor'] = '--framer-input-invalid-text-color';
|
|
35314
35595
|
return FormInputStyleVariableNames2;
|
|
35315
35596
|
})(FormInputStyleVariableNames || {});
|
|
35316
35597
|
var Var = FormInputStyleVariableNames;
|
|
35317
|
-
var inputClassName = 'framer-form-input';
|
|
35318
|
-
var inputWrapperClassName = 'framer-form-input-wrapper';
|
|
35319
|
-
|
|
35320
|
-
|
|
35598
|
+
var inputClassName = /* @__PURE__ */ (() => 'framer-form-input')();
|
|
35599
|
+
var inputWrapperClassName = /* @__PURE__ */ (() => 'framer-form-input-wrapper')();
|
|
35600
|
+
var emptyValueClassName = /* @__PURE__ */ (() => 'framer-form-input-empty')();
|
|
35601
|
+
var forcedFocusClassName = /* @__PURE__ */ (() => 'framer-form-input-forced-focus')();
|
|
35602
|
+
var forcedCheckedClassName = /* @__PURE__ */ (() => 'framer-form-input-forced-checked')();
|
|
35603
|
+
function cssValue(value) {
|
|
35604
|
+
if (typeof value === 'number')
|
|
35605
|
+
return value;
|
|
35606
|
+
if (value.startsWith('--'))
|
|
35607
|
+
return css.variable(value);
|
|
35608
|
+
if (value === '')
|
|
35609
|
+
return '""';
|
|
35610
|
+
return value;
|
|
35611
|
+
}
|
|
35612
|
+
function css(selector, declaration) {
|
|
35613
|
+
let output = ' ';
|
|
35614
|
+
for (const key7 in declaration) {
|
|
35615
|
+
output += `${key7.replace(/([A-Z])/gu, '-$1').toLowerCase()}: ${cssValue(declaration[key7])}; `;
|
|
35616
|
+
}
|
|
35617
|
+
return selector + ' {' + output + '}';
|
|
35321
35618
|
}
|
|
35619
|
+
((css2) => {
|
|
35620
|
+
function variable(...variables) {
|
|
35621
|
+
const lastItem = variables[variables.length - 1];
|
|
35622
|
+
let value = lastItem.startsWith('--') ? `var(${lastItem})` : lastItem;
|
|
35623
|
+
for (let index = variables.length - 2; index >= 0; index--) {
|
|
35624
|
+
const element = variables[index];
|
|
35625
|
+
value = `var(${element}, ${value})`;
|
|
35626
|
+
}
|
|
35627
|
+
return value;
|
|
35628
|
+
}
|
|
35629
|
+
css2.variable = variable;
|
|
35630
|
+
})(css || (css = {}));
|
|
35322
35631
|
var sharedInputCSS = [`.${inputClassName} {
|
|
35323
35632
|
padding: var(${Var.Padding});
|
|
35324
35633
|
background: var(${Var.Background});
|
|
@@ -35337,28 +35646,28 @@ var sharedInputCSS = [`.${inputClassName} {
|
|
|
35337
35646
|
border-top-right-radius: var(${Var.BorderRadiusTopRight});
|
|
35338
35647
|
border-bottom-right-radius: var(${Var.BorderRadiusBottomRight});
|
|
35339
35648
|
border-bottom-left-radius: var(${Var.BorderRadiusBottomLeft});
|
|
35340
|
-
z-index: var(${Var.ZIndex});
|
|
35341
35649
|
letter-spacing: var(${Var.FontLetterSpacing});
|
|
35342
35650
|
text-align: var(${Var.FontTextAlignment});
|
|
35343
35651
|
line-height: var(${Var.FontLineHeight});
|
|
35344
35652
|
transition: var(${Var.FocusedTransition});
|
|
35345
35653
|
transition-property: background, box-shadow;
|
|
35346
35654
|
}`,];
|
|
35347
|
-
var focusInputCSS =
|
|
35655
|
+
var focusInputCSS =
|
|
35656
|
+
/* @__PURE__ */ (() => [
|
|
35348
35657
|
`.${inputClassName}:focus-visible { outline: none; }`,
|
|
35349
|
-
`.${inputClassName}:focus {
|
|
35350
|
-
background: ${
|
|
35351
|
-
box-shadow: ${
|
|
35658
|
+
`.${inputClassName}:focus, .${inputClassName}.${forcedFocusClassName} {
|
|
35659
|
+
background: ${css.variable(Var.FocusedBackground, Var.Background)};
|
|
35660
|
+
box-shadow: ${css.variable(Var.FocusedBoxShadow, Var.BoxShadow)};
|
|
35352
35661
|
}`,
|
|
35353
|
-
`.${inputWrapperClassName}:focus-within::after {
|
|
35354
|
-
border-color: ${
|
|
35355
|
-
border-style: ${
|
|
35356
|
-
border-top-width: ${
|
|
35357
|
-
border-right-width: ${
|
|
35358
|
-
border-bottom-width: ${
|
|
35359
|
-
border-left-width: ${
|
|
35662
|
+
`.${inputWrapperClassName}:focus-within::after, .${inputWrapperClassName}.${forcedFocusClassName}::after {
|
|
35663
|
+
border-color: ${css.variable(Var.FocusedBorderColor, Var.BorderColor)};
|
|
35664
|
+
border-style: ${css.variable(Var.FocusedBorderStyle, Var.BorderStyle)};
|
|
35665
|
+
border-top-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderTopWidth)};
|
|
35666
|
+
border-right-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderRightWidth)};
|
|
35667
|
+
border-bottom-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderBottomWidth)};
|
|
35668
|
+
border-left-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderLeftWidth)};
|
|
35360
35669
|
}`,
|
|
35361
|
-
];
|
|
35670
|
+
])();
|
|
35362
35671
|
var inputBorderCSS = [
|
|
35363
35672
|
`.${inputWrapperClassName} {
|
|
35364
35673
|
position: relative;
|
|
@@ -35391,13 +35700,26 @@ var passwordManagerIgnoreDataProps = {
|
|
|
35391
35700
|
'data-1p-ignore': true,
|
|
35392
35701
|
// LastPass
|
|
35393
35702
|
'data-lpignore': true,
|
|
35394
|
-
|
|
35395
|
-
|
|
35703
|
+
// Dashlane
|
|
35704
|
+
// https://support.dashlane.com/hc/en-us/articles/4420122792594-Optimize-your-web-forms-for-Dashlane-Autofill
|
|
35705
|
+
'data-form-type': 'other',
|
|
35706
|
+
// autocomplete="off" is a generic property that disables autofilling. It
|
|
35707
|
+
// is not always respected by some browsers or password managers.
|
|
35396
35708
|
autocomplete: 'off',
|
|
35397
35709
|
};
|
|
35398
35710
|
var PlainTextInput = /* @__PURE__ */ react_12.default.forwardRef(function FormPlainTextInput(props, ref) {
|
|
35399
|
-
const {
|
|
35400
|
-
const
|
|
35711
|
+
const { autoFocus, className: className2, inputName, max, min, onBlur, onFocus, onInvalid, placeholder, required, step: step2, style, type, value, autofillEnabled, canvasPreviewClassName } = props, rest = __rest(props, ["autoFocus", "className", "inputName", "max", "min", "onBlur", "onFocus", "onInvalid", "placeholder", "required", "step", "style", "type", "value", "autofillEnabled", "canvasPreviewClassName"]);
|
|
35712
|
+
const [hasValue, setHasValue,] = react_12.default.useState(!!value);
|
|
35713
|
+
const dataProps = autofillEnabled === false ? passwordManagerIgnoreDataProps : void 0;
|
|
35714
|
+
const eventProps = {
|
|
35715
|
+
onBlur,
|
|
35716
|
+
onFocus,
|
|
35717
|
+
onInvalid,
|
|
35718
|
+
};
|
|
35719
|
+
const onChange = react_12.default.useCallback((e) => {
|
|
35720
|
+
const newValue = e.target.value;
|
|
35721
|
+
setHasValue(!!newValue);
|
|
35722
|
+
}, []);
|
|
35401
35723
|
switch (type) {
|
|
35402
35724
|
case 'hidden':
|
|
35403
35725
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.input, {
|
|
@@ -35407,17 +35729,24 @@ var PlainTextInput = /* @__PURE__ */ react_12.default.forwardRef(function FormPl
|
|
|
35407
35729
|
});
|
|
35408
35730
|
case 'textarea':
|
|
35409
35731
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, Object.assign(Object.assign({ ref,
|
|
35410
|
-
style
|
|
35411
|
-
autoFocus, name: inputName, placeholder, className: inputClassName, value })) }));
|
|
35732
|
+
style, className: cx(inputWrapperClassName, canvasPreviewClassName, className2) }, rest), { children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.textarea, Object.assign(Object.assign(Object.assign({ id: inputName }, dataProps), eventProps), { required,
|
|
35733
|
+
autoFocus, name: inputName, placeholder, className: cx(inputClassName, canvasPreviewClassName), value })) }));
|
|
35412
35734
|
default:
|
|
35413
35735
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, Object.assign(Object.assign({ ref,
|
|
35414
|
-
style
|
|
35736
|
+
style, className: cx(inputWrapperClassName, canvasPreviewClassName, className2) }, rest), { children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.input, Object.assign(Object.assign(Object.assign({ id: inputName }, dataProps), eventProps), { type,
|
|
35415
35737
|
required,
|
|
35416
|
-
autoFocus, name: inputName, placeholder, className: inputClassName,
|
|
35738
|
+
autoFocus, name: inputName, placeholder, className: cx(inputClassName, canvasPreviewClassName, !hasValue && emptyValueClassName), onChange,
|
|
35739
|
+
value,
|
|
35417
35740
|
min,
|
|
35418
35741
|
max, step: step2 })) }));
|
|
35419
35742
|
}
|
|
35420
35743
|
});
|
|
35744
|
+
var iconSpacing = /* @__PURE__ */ (() => 10)();
|
|
35745
|
+
var iconSize = /* @__PURE__ */ (() => 14)();
|
|
35746
|
+
var defaultDateIcon =
|
|
35747
|
+
/* @__PURE__ */ (() => `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${iconSize}' height='${iconSize}'%3E%3Cpath d='M2 4a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2H2Z' fill='currentColor' opacity='.3'/%3E%3Cpath d='M2.25 4.25a2 2 0 0 1 2-2h5.5a2 2 0 0 1 2 2v5.5a2 2 0 0 1-2 2h-5.5a2 2 0 0 1-2-2ZM2 5.75h9.5' fill='transparent' stroke-width='1.5' stroke='currentColor'/%3E%3C/svg%3E`)();
|
|
35748
|
+
var defaultTimeIcon =
|
|
35749
|
+
/* @__PURE__ */ (() => `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${iconSize}' height='${iconSize}'%3E%3Cpath d='M1.5 7a5.5 5.5 0 1 1 11 0 5.5 5.5 0 1 1-11 0Z' fill='transparent' stroke-width='1.5' stroke='currentColor'/%3E%3Cpath d='M6.75 7.25v-3m0 3h2' fill='transparent' stroke-width='1.5' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E`)();
|
|
35421
35750
|
var FormPlainTextInput2 =
|
|
35422
35751
|
/* @__PURE__ */ (() => withCSS(PlainTextInput, [
|
|
35423
35752
|
...sharedInputCSS,
|
|
@@ -35430,21 +35759,168 @@ var FormPlainTextInput2 =
|
|
|
35430
35759
|
resize: var(${'--framer-textarea-resize'});
|
|
35431
35760
|
min-height: var(${'--framer-textarea-min-height'});
|
|
35432
35761
|
}`,
|
|
35762
|
+
`.${inputClassName}.${emptyValueClassName}::-webkit-datetime-edit {
|
|
35763
|
+
color:var(${'--framer-input-placeholder-color'});
|
|
35764
|
+
-webkit-text-fill-color: var(${'--framer-input-placeholder-color'});
|
|
35765
|
+
}`,
|
|
35766
|
+
`.${inputClassName}[type="date"]::before, .${inputClassName}[type="time"]::before {
|
|
35767
|
+
content: "";
|
|
35768
|
+
display: block;
|
|
35769
|
+
position: absolute;
|
|
35770
|
+
padding: var(${'--framer-input-padding'});
|
|
35771
|
+
padding-left: ${iconSpacing}px;
|
|
35772
|
+
right: 0;
|
|
35773
|
+
top: 0;
|
|
35774
|
+
bottom: 0;
|
|
35775
|
+
width: ${iconSize}px;
|
|
35776
|
+
box-sizing: content-box;
|
|
35777
|
+
|
|
35778
|
+
pointer-events: none;
|
|
35779
|
+
mask-repeat: no-repeat;
|
|
35780
|
+
mask-position: ${iconSpacing}px center;
|
|
35781
|
+
border: none;
|
|
35782
|
+
background-color: #999;
|
|
35783
|
+
}`,
|
|
35784
|
+
`.${inputClassName}[type="date"]::before {
|
|
35785
|
+
mask-image: url("${defaultDateIcon}");
|
|
35786
|
+
}`,
|
|
35787
|
+
`.${inputClassName}[type="time"]::before {
|
|
35788
|
+
mask-image: url("${defaultTimeIcon}");
|
|
35789
|
+
}`,
|
|
35790
|
+
// Hide the native date picker icon, but still allow the user to click it.
|
|
35791
|
+
`.${inputClassName}::-webkit-calendar-picker-indicator {
|
|
35792
|
+
opacity: 0;
|
|
35793
|
+
padding: var(${'--framer-input-padding'});
|
|
35794
|
+
padding-right: 0;
|
|
35795
|
+
padding-left: ${iconSpacing}px;
|
|
35796
|
+
width: ${iconSize}px;
|
|
35797
|
+
height: ${iconSize}px;
|
|
35798
|
+
}`,
|
|
35433
35799
|
]))();
|
|
35434
35800
|
exports.FormPlainTextInput = FormPlainTextInput2;
|
|
35801
|
+
var className = 'framer-form-boolean-input';
|
|
35802
|
+
var BooleanInput = /* @__PURE__ */ react_12.default.forwardRef(function FormPlainTextInput3(props, ref) {
|
|
35803
|
+
const { inputName, type = 'checkbox', defaultChecked, canvasPreviewClassName } = props, rest = __rest(props, ["inputName", "type", "defaultChecked", "canvasPreviewClassName"]);
|
|
35804
|
+
const isCanvas = useIsOnFramerCanvas();
|
|
35805
|
+
const attributes = isCanvas
|
|
35806
|
+
? {
|
|
35807
|
+
checked: defaultChecked,
|
|
35808
|
+
}
|
|
35809
|
+
: {
|
|
35810
|
+
defaultChecked,
|
|
35811
|
+
};
|
|
35812
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.input, Object.assign(Object.assign(Object.assign({}, rest), attributes), { readOnly: isCanvas, ref, id: inputName, type, name: inputName, className: cx(className, props.className, canvasPreviewClassName) }));
|
|
35813
|
+
});
|
|
35814
|
+
var defaultCheckedIcon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M 4 8 L 6.5 10.5 L 11.5 5.5" fill="transparent" stroke-width="2" stroke="rgb(255, 255, 255)" stroke-linecap="round" stroke-linejoin="round"></path></svg>`;
|
|
35815
|
+
var borderWidth = `var(${'--framer-input-border-top-width'}) var(${'--framer-input-border-right-width'}) var(${'--framer-input-border-bottom-width'}) var(${'--framer-input-border-left-width'})`;
|
|
35816
|
+
var borderRadius = `var(${'--framer-input-border-radius-top-left'}) var(${'--framer-input-border-radius-top-right'}) var(${'--framer-input-border-radius-bottom-right'}) var(${'--framer-input-border-radius-bottom-left'})`;
|
|
35817
|
+
var styles = /* @__PURE__ */ (() => [
|
|
35818
|
+
css(`.${className}`, {
|
|
35819
|
+
'-webkit-appearance': 'none',
|
|
35820
|
+
// background-color: #fff; fixes a bug on iOS where the checkbox shows
|
|
35821
|
+
// through the appearance: none;
|
|
35822
|
+
alignItems: 'center',
|
|
35823
|
+
appearance: 'none',
|
|
35824
|
+
backgroundColor: '#fff',
|
|
35825
|
+
background: '--framer-input-background',
|
|
35826
|
+
borderRadius,
|
|
35827
|
+
boxShadow: '--framer-input-box-shadow',
|
|
35828
|
+
display: 'flex',
|
|
35829
|
+
justifyContent: 'center',
|
|
35830
|
+
margin: 0,
|
|
35831
|
+
overflow: 'hidden',
|
|
35832
|
+
position: 'relative',
|
|
35833
|
+
transition: '--framer-input-boolean-checked-transition',
|
|
35834
|
+
transitionProperty: 'box-shadow, background',
|
|
35835
|
+
}),
|
|
35836
|
+
// The after element styles the border of the checkbox to conform to
|
|
35837
|
+
// framer's inset border model.
|
|
35838
|
+
css(`.${className}::after`, {
|
|
35839
|
+
background: 'transparent',
|
|
35840
|
+
borderColor: css.variable('--framer-input-border-color', 'transparent'),
|
|
35841
|
+
borderRadius,
|
|
35842
|
+
borderStyle: '--framer-input-border-style',
|
|
35843
|
+
borderWidth,
|
|
35844
|
+
boxSizing: 'border-box',
|
|
35845
|
+
content: '',
|
|
35846
|
+
display: 'block',
|
|
35847
|
+
inset: 0,
|
|
35848
|
+
position: 'absolute',
|
|
35849
|
+
transition: '--framer-input-boolean-checked-transition',
|
|
35850
|
+
transitionProperty: 'border-color, border-width, border-style',
|
|
35851
|
+
}),
|
|
35852
|
+
// The before element is used to display the check mark icon. It is
|
|
35853
|
+
// faded in when the input is checked.
|
|
35854
|
+
css(`.${className}::before`, {
|
|
35855
|
+
// Use the icon url if it's provided, falling back to a default check
|
|
35856
|
+
// mark. Radio inputs will be code-generated with a "none" value for the
|
|
35857
|
+
// variable if an image isn't provided which will prevent this fallback
|
|
35858
|
+
// in those cases.
|
|
35859
|
+
backgroundImage: css.variable('--framer-input-boolean-icon', `url('${defaultCheckedIcon}')`),
|
|
35860
|
+
backgroundPosition: 'center',
|
|
35861
|
+
backgroundRepeat: 'no-repeat',
|
|
35862
|
+
backgroundSize: 'contain',
|
|
35863
|
+
content: '',
|
|
35864
|
+
display: 'block',
|
|
35865
|
+
height: '100%',
|
|
35866
|
+
opacity: 0,
|
|
35867
|
+
transition: '--framer-input-boolean-checked-transition',
|
|
35868
|
+
transitionProperty: 'opacity',
|
|
35869
|
+
width: '100%',
|
|
35870
|
+
}),
|
|
35871
|
+
css(`.${className}:checked, .${className}.${forcedCheckedClassName}`, {
|
|
35872
|
+
// When not set, the styles when checked shouldn't clear the default
|
|
35873
|
+
// styles.
|
|
35874
|
+
backgroundColor: css.variable('--framer-input-boolean-checked-background', '--framer-input-background'),
|
|
35875
|
+
boxShadow: css.variable('--framer-input-boolean-checked-box-shadow', '--framer-input-box-shadow'),
|
|
35876
|
+
}),
|
|
35877
|
+
css(`.${className}:checked::before, .${className}.${forcedCheckedClassName}::before`, {
|
|
35878
|
+
opacity: 1,
|
|
35879
|
+
}),
|
|
35880
|
+
css(`.${className}:checked::after, .${className}.${forcedCheckedClassName}::after`, {
|
|
35881
|
+
// When not set, the styles when checked shouldn't clear the default
|
|
35882
|
+
// styles.
|
|
35883
|
+
borderColor: css.variable('--framer-input-boolean-checked-border-color', '--framer-input-border-color', 'transparent'),
|
|
35884
|
+
borderStyle: css.variable('--framer-input-boolean-checked-border-style', '--framer-input-border-style', 'solid'),
|
|
35885
|
+
borderWidth: css.variable('--framer-input-boolean-checked-border-width', borderWidth),
|
|
35886
|
+
}),
|
|
35887
|
+
css(`.${className}:focus, .${className}.${forcedFocusClassName}`, {
|
|
35888
|
+
backgroundColor: css.variable('--framer-input-focused-background', '--framer-input-background'),
|
|
35889
|
+
boxShadow: css.variable('--framer-input-focused-box-shadow', '--framer-input-box-shadow'),
|
|
35890
|
+
}),
|
|
35891
|
+
css(`.${className}:focus-visible`, {
|
|
35892
|
+
outline: 'none',
|
|
35893
|
+
}),
|
|
35894
|
+
css(`.${className}:focus::after, .${className}.${forcedFocusClassName}::after`, {
|
|
35895
|
+
// When not set, the styles when focused shouldn't clear the checked
|
|
35896
|
+
// styles.
|
|
35897
|
+
borderColor: css.variable('--framer-input-focused-border-color', '--framer-input-border-color', 'transparent'),
|
|
35898
|
+
borderStyle: css.variable('--framer-input-focused-border-style', '--framer-input-border-style', 'solid'),
|
|
35899
|
+
borderWidth: css.variable('--framer-input-focused-border-width', borderWidth),
|
|
35900
|
+
}),
|
|
35901
|
+
css(`.${className}:focus:checked`, {
|
|
35902
|
+
backgroundColor: css.variable('--framer-input-focused-background', '--framer-input-boolean-checked-background', '--framer-input-background'),
|
|
35903
|
+
boxShadow: css.variable('--framer-input-focused-box-shadow', '--framer-input-boolean-checked-box-shadow', '--framer-input-box-shadow'),
|
|
35904
|
+
}),
|
|
35905
|
+
css(`.${className}:focus:checked::after`, {
|
|
35906
|
+
borderStyle: css.variable('--framer-input-focused-border-style', '--framer-input-boolean-checked-border-style', '--framer-input-border-style', 'solid'),
|
|
35907
|
+
borderWidth: css.variable('--framer-input-focused-border-width', '--framer-input-boolean-checked-border-width', borderWidth),
|
|
35908
|
+
}),
|
|
35909
|
+
])();
|
|
35910
|
+
var FormBooleanInput = /* @__PURE__ */ withCSS(BooleanInput, styles);
|
|
35911
|
+
exports.FormBooleanInput = FormBooleanInput;
|
|
35435
35912
|
var Select = /* @__PURE__ */ react_12.default.forwardRef(function Select2(props, measureRef) {
|
|
35436
|
-
const {
|
|
35437
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, {
|
|
35438
|
-
ref: measureRef,
|
|
35439
|
-
style,
|
|
35440
|
-
className: cx(inputWrapperClassName, selectWrapperClassName, props.className),
|
|
35441
|
-
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.select, {
|
|
35913
|
+
const { autoFocus, className: className2, inputName, onBlur, onFocus, onInvalid, required, selectDefaultValue, selectOptions, style, canvasPreviewClassName } = props, rest = __rest(props, ["autoFocus", "className", "inputName", "onBlur", "onFocus", "onInvalid", "required", "selectDefaultValue", "selectOptions", "style", "canvasPreviewClassName"]);
|
|
35914
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, Object.assign(Object.assign({ ref: measureRef, style, className: cx(inputWrapperClassName, selectWrapperClassName, canvasPreviewClassName, className2) }, rest), { children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.select, {
|
|
35442
35915
|
id: inputName,
|
|
35443
35916
|
name: inputName,
|
|
35444
35917
|
autoFocus,
|
|
35445
35918
|
required,
|
|
35446
|
-
className: inputClassName,
|
|
35919
|
+
className: cx(inputClassName, canvasPreviewClassName),
|
|
35447
35920
|
defaultValue: selectDefaultValue,
|
|
35921
|
+
onBlur,
|
|
35922
|
+
onFocus,
|
|
35923
|
+
onInvalid,
|
|
35448
35924
|
children: selectOptions == null ? void 0 : selectOptions.map((option, index) => {
|
|
35449
35925
|
var _f, _j;
|
|
35450
35926
|
switch (option.type) {
|
|
@@ -35458,8 +35934,7 @@ var Select = /* @__PURE__ */ react_12.default.forwardRef(function Select2(props,
|
|
|
35458
35934
|
}, index);
|
|
35459
35935
|
}
|
|
35460
35936
|
}),
|
|
35461
|
-
}, selectDefaultValue)
|
|
35462
|
-
});
|
|
35937
|
+
}, selectDefaultValue) }));
|
|
35463
35938
|
});
|
|
35464
35939
|
var selectWrapperClassName = 'framer-form-select-wrapper';
|
|
35465
35940
|
var selectArrowSize = 16;
|
|
@@ -35488,6 +35963,9 @@ var FormSelect = /* @__PURE__ */ (() => withCSS(Select, [
|
|
|
35488
35963
|
background-position: center center;
|
|
35489
35964
|
border: none;
|
|
35490
35965
|
}`,
|
|
35966
|
+
`select.${inputClassName}:required:invalid {
|
|
35967
|
+
color: var(${'--framer-input-invalid-text-color'});
|
|
35968
|
+
}`,
|
|
35491
35969
|
]))();
|
|
35492
35970
|
exports.FormSelect = FormSelect;
|
|
35493
35971
|
var Image2 = /* @__PURE__ */ react_12.default.forwardRef(function Image3(props, ref) {
|
|
@@ -35658,7 +36136,7 @@ var deprecatedRichTextPlaceholder = '{{ text-placeholder }}';
|
|
|
35658
36136
|
var richTextWrapperClassName = 'rich-text-wrapper';
|
|
35659
36137
|
var DeprecatedRichText = /* @__PURE__ */ React2.forwardRef(function Text(props, forwardedRef) {
|
|
35660
36138
|
var _f, _j;
|
|
35661
|
-
const { id: id3, name, html, htmlFromDesign, text, textFromDesign, fonts = [], width, height, left, right, top, bottom, center, className, stylesPresetsClassName, visible = true, opacity, rotation = 0, verticalAlignment = 'top', isEditable = false, willChangeTransform, environment: environment2 = RenderTarget.current, withExternalLayout = false, positionSticky, positionStickyTop, positionStickyRight, positionStickyBottom, positionStickyLeft, __htmlStructure, __fromCanvasComponent = false, _forwardedOverrideId, _forwardedOverrides, _usesDOMRect, children: _children } = props, rest = __rest(props, ["id", "name", "html", "htmlFromDesign", "text", "textFromDesign", "fonts", "width", "height", "left", "right", "top", "bottom", "center", "className", "stylesPresetsClassName", "visible", "opacity", "rotation", "verticalAlignment", "isEditable", "willChangeTransform", "environment", "withExternalLayout", "positionSticky", "positionStickyTop", "positionStickyRight", "positionStickyBottom", "positionStickyLeft", "__htmlStructure", "__fromCanvasComponent", "_forwardedOverrideId", "_forwardedOverrides", "_usesDOMRect", "children"]);
|
|
36139
|
+
const { id: id3, name, html, htmlFromDesign, text, textFromDesign, fonts = [], width, height, left, right, top, bottom, center, className: className2, stylesPresetsClassName, visible = true, opacity, rotation = 0, verticalAlignment = 'top', isEditable = false, willChangeTransform, environment: environment2 = RenderTarget.current, withExternalLayout = false, positionSticky, positionStickyTop, positionStickyRight, positionStickyBottom, positionStickyLeft, __htmlStructure, __fromCanvasComponent = false, _forwardedOverrideId, _forwardedOverrides, _usesDOMRect, children: _children } = props, rest = __rest(props, ["id", "name", "html", "htmlFromDesign", "text", "textFromDesign", "fonts", "width", "height", "left", "right", "top", "bottom", "center", "className", "stylesPresetsClassName", "visible", "opacity", "rotation", "verticalAlignment", "isEditable", "willChangeTransform", "environment", "withExternalLayout", "positionSticky", "positionStickyTop", "positionStickyRight", "positionStickyBottom", "positionStickyLeft", "__htmlStructure", "__fromCanvasComponent", "_forwardedOverrideId", "_forwardedOverrides", "_usesDOMRect", "children"]);
|
|
35662
36140
|
const parentSize = useParentSize();
|
|
35663
36141
|
const layoutId = useLayoutId2(props);
|
|
35664
36142
|
const fallbackLayoutRef = (0, react_4.useRef)(null);
|
|
@@ -35775,7 +36253,7 @@ var DeprecatedRichText = /* @__PURE__ */ React2.forwardRef(function Text(props,
|
|
|
35775
36253
|
}
|
|
35776
36254
|
Object.assign(style, props.style);
|
|
35777
36255
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, Object.assign(Object.assign({ id: id3, ref: layoutRef }, rest), { style,
|
|
35778
|
-
layoutId, 'data-framer-name': name, 'data-framer-component-type': 'DeprecatedRichText', 'data-center': center, className: cx(
|
|
36256
|
+
layoutId, 'data-framer-name': name, 'data-framer-component-type': 'DeprecatedRichText', 'data-center': center, className: cx(className2, stylesPresetsClassName, richTextWrapperClassName), transformTemplate: template, dangerouslySetInnerHTML: {
|
|
35779
36257
|
__html: innerHTMLWithReplacedFramerPageLinks,
|
|
35780
36258
|
} }));
|
|
35781
36259
|
});
|
|
@@ -36562,7 +37040,7 @@ var SVGComponent = /* @__PURE__ */ (() => {
|
|
|
36562
37040
|
render() {
|
|
36563
37041
|
var _f;
|
|
36564
37042
|
countNodeRender();
|
|
36565
|
-
const _j = this.props, { id: id3, visible, style, fill, svg, intrinsicHeight, intrinsicWidth, title, description, layoutId, className, variants, withExternalLayout, innerRef, svgContentId, height: _height, opacity: _opacity, width: _width } = _j, rest = __rest(_j, ["id", "visible", "style", "fill", "svg", "intrinsicHeight", "intrinsicWidth", "title", "description", "layoutId", "className", "variants", "withExternalLayout", "innerRef", "svgContentId", "height", "opacity", "width"]);
|
|
37043
|
+
const _j = this.props, { id: id3, visible, style, fill, svg, intrinsicHeight, intrinsicWidth, title, description, layoutId, className: className2, variants, withExternalLayout, innerRef, svgContentId, height: _height, opacity: _opacity, width: _width } = _j, rest = __rest(_j, ["id", "visible", "style", "fill", "svg", "intrinsicHeight", "intrinsicWidth", "title", "description", "layoutId", "className", "variants", "withExternalLayout", "innerRef", "svgContentId", "height", "opacity", "width"]);
|
|
36566
37044
|
if (!withExternalLayout && (!visible || !id3))
|
|
36567
37045
|
return null;
|
|
36568
37046
|
const identifier = (_f = id3 !== null && id3 !== void 0 ? id3 : layoutId) !== null && _f !== void 0 ? _f : 'svg';
|
|
@@ -36699,8 +37177,7 @@ var SVGComponent = /* @__PURE__ */ (() => {
|
|
|
36699
37177
|
}
|
|
36700
37178
|
const MotionComponent = htmlElementAsMotionComponent(this.props.as);
|
|
36701
37179
|
const { href, target, rel, onClick, } = this.props;
|
|
36702
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsxs)(MotionComponent, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, dataProps), rest), { layoutId, transformTemplate: hasTransformTemplate ? transformTemplate(this.props.center) : void 0, id: id3, ref: innerRef, style: outerStyle, className,
|
|
36703
|
-
variants, tabIndex: this.props.tabIndex, role: title || description ? 'img' : void 0, 'aria-label': title, 'aria-description': description }), {
|
|
37180
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsxs)(MotionComponent, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, dataProps), rest), { layoutId, transformTemplate: hasTransformTemplate ? transformTemplate(this.props.center) : void 0, id: id3, ref: innerRef, style: outerStyle, className: className2, variants, tabIndex: this.props.tabIndex, role: title || description ? 'img' : void 0, 'aria-label': title, 'aria-description': description }), {
|
|
36704
37181
|
href,
|
|
36705
37182
|
target,
|
|
36706
37183
|
rel,
|
|
@@ -36821,7 +37298,7 @@ var TextComponent = /* @__PURE__ */ (() => {
|
|
|
36821
37298
|
});
|
|
36822
37299
|
__publicField(this, 'renderMain', (inCodeComponent) => {
|
|
36823
37300
|
countNodeRender();
|
|
36824
|
-
const _f = this.props, { font, visible, alignment, willChangeTransform, opacity, id: id3, layoutId, className, transition, variants, name, __fromCanvasComponent, _initialStyle, widthType: _widthType, heightType: _heightType, _usesDOMRect, autoSize, style: styleProp, fontLoadStatus, matchesCurrentRoute, preload: _preload, tabIndex } = _f, rest = __rest(_f, ["font", "visible", "alignment", "willChangeTransform", "opacity", "id", "layoutId", "className", "transition", "variants", "name", "__fromCanvasComponent", "_initialStyle", "widthType", "heightType", "_usesDOMRect", "autoSize", "style", "fontLoadStatus", "matchesCurrentRoute", "preload", "tabIndex"]);
|
|
37301
|
+
const _f = this.props, { font, visible, alignment, willChangeTransform, opacity, id: id3, layoutId, className: className2, transition, variants, name, __fromCanvasComponent, _initialStyle, widthType: _widthType, heightType: _heightType, _usesDOMRect, autoSize, style: styleProp, fontLoadStatus, matchesCurrentRoute, preload: _preload, tabIndex } = _f, rest = __rest(_f, ["font", "visible", "alignment", "willChangeTransform", "opacity", "id", "layoutId", "className", "transition", "variants", "name", "__fromCanvasComponent", "_initialStyle", "widthType", "heightType", "_usesDOMRect", "autoSize", "style", "fontLoadStatus", "matchesCurrentRoute", "preload", "tabIndex"]);
|
|
36825
37302
|
if (!visible) {
|
|
36826
37303
|
return null;
|
|
36827
37304
|
}
|
|
@@ -36889,7 +37366,7 @@ var TextComponent = /* @__PURE__ */ (() => {
|
|
|
36889
37366
|
const tabIndexProps = getTabIndexProps(tabIndex);
|
|
36890
37367
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, Object.assign(Object.assign(Object.assign(Object.assign({ layoutId, id: id3 }, tabIndexProps), dataProps), rest), { style, transformTemplate: centeringTransformTemplate, dangerouslySetInnerHTML: {
|
|
36891
37368
|
__html: rawHTML,
|
|
36892
|
-
}, 'data-center': this.props.center, className: cx(
|
|
37369
|
+
}, 'data-center': this.props.center, className: cx(className2, matchesCurrentRoute && 'isCurrent'), transition,
|
|
36893
37370
|
variants, ref: this.setElement }));
|
|
36894
37371
|
}
|
|
36895
37372
|
});
|
|
@@ -37967,7 +38444,7 @@ function loadJSON(url) {
|
|
|
37967
38444
|
}
|
|
37968
38445
|
exports.loadJSON = loadJSON;
|
|
37969
38446
|
function inspectObjectType(item) {
|
|
37970
|
-
let
|
|
38447
|
+
let className2;
|
|
37971
38448
|
if ((item.constructor !== null ? item.constructor.name : void 0) !== null &&
|
|
37972
38449
|
(item.constructor !== null ? item.constructor.name : void 0) !== 'Object') {
|
|
37973
38450
|
return item.constructor.name;
|
|
@@ -37984,15 +38461,15 @@ function inspectObjectType(item) {
|
|
|
37984
38461
|
return null;
|
|
37985
38462
|
};
|
|
37986
38463
|
if (item.toString) {
|
|
37987
|
-
|
|
37988
|
-
if (
|
|
37989
|
-
return
|
|
38464
|
+
className2 = extract(item.toString());
|
|
38465
|
+
if (className2) {
|
|
38466
|
+
return className2;
|
|
37990
38467
|
}
|
|
37991
38468
|
}
|
|
37992
38469
|
if (item.constructor !== null ? item.constructor.toString : void 0) {
|
|
37993
|
-
|
|
37994
|
-
if (
|
|
37995
|
-
return
|
|
38470
|
+
className2 = extract(item.constructor !== null ? item.constructor.toString() : void 0);
|
|
38471
|
+
if (className2) {
|
|
38472
|
+
return className2.replace('Constructor', '');
|
|
37996
38473
|
}
|
|
37997
38474
|
}
|
|
37998
38475
|
return 'Object';
|
|
@@ -38137,7 +38614,7 @@ var package_default = {
|
|
|
38137
38614
|
yargs: '^17.6.2',
|
|
38138
38615
|
},
|
|
38139
38616
|
peerDependencies: {
|
|
38140
|
-
'framer-motion': '11.2.
|
|
38617
|
+
'framer-motion': '11.2.10',
|
|
38141
38618
|
react: '^18.2.0',
|
|
38142
38619
|
'react-dom': '^18.2.0',
|
|
38143
38620
|
},
|
|
@@ -38206,7 +38683,7 @@ react-is/cjs/react-is.production.min.js:
|
|
|
38206
38683
|
*)
|
|
38207
38684
|
*/
|
|
38208
38685
|
if (typeof document !== 'undefined') {
|
|
38209
|
-
for (const node of document.querySelectorAll('style[data-framer-css-ssr]')) {
|
|
38686
|
+
for (const node of document.querySelectorAll('body style[data-framer-css-ssr]')) {
|
|
38210
38687
|
document.head.appendChild(node);
|
|
38211
38688
|
}
|
|
38212
38689
|
}
|