unframer 2.18.0 → 2.18.2
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 +12 -15
- package/dist/esbuild.d.ts.map +1 -1
- package/dist/esbuild.js +3 -0
- package/dist/esbuild.js.map +1 -1
- package/dist/framer.d.ts.map +1 -1
- package/dist/framer.js +100 -101
- package/dist/framer.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/react.d.ts +1 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +26 -1
- package/dist/react.js.map +1 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +5 -0
- package/dist/version.js.map +1 -0
- package/esm/esbuild.d.ts.map +1 -1
- package/esm/esbuild.js +3 -0
- package/esm/esbuild.js.map +1 -1
- package/esm/framer.d.ts.map +1 -1
- package/esm/framer.js +100 -101
- package/esm/framer.js.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/esm/react.d.ts +1 -0
- package/esm/react.d.ts.map +1 -1
- package/esm/react.js +24 -0
- package/esm/react.js.map +1 -1
- package/esm/version.d.ts +2 -0
- package/esm/version.d.ts.map +1 -0
- package/esm/version.js +2 -0
- package/esm/version.js.map +1 -0
- package/package.json +1 -1
- package/src/esbuild.ts +3 -0
- package/src/framer.js +129 -98
- package/src/index.ts +1 -0
- package/src/react.tsx +53 -1
- package/src/version.ts +1 -0
package/esm/framer.js
CHANGED
|
@@ -506934,6 +506934,7 @@ import { createElement, Fragment, } from 'react';
|
|
|
506934
506934
|
import { useState, } from 'react';
|
|
506935
506935
|
import * as React2 from 'react';
|
|
506936
506936
|
import { Children, isValidElement, } from 'react';
|
|
506937
|
+
var __unframerNavigator = typeof window !== 'undefined' ? navigator : void 0;
|
|
506937
506938
|
var require_memoize_browser_cjs = __commonJS({
|
|
506938
506939
|
'../../../node_modules/@emotion/memoize/dist/memoize.browser.cjs.js'(exports) {
|
|
506939
506940
|
'use strict';
|
|
@@ -513567,7 +513568,8 @@ var defaultLayoutTransition = {
|
|
|
513567
513568
|
duration: 0.45,
|
|
513568
513569
|
ease: [0.4, 0, 0.1, 1,],
|
|
513569
513570
|
};
|
|
513570
|
-
var userAgentContains = (string) => typeof
|
|
513571
|
+
var userAgentContains = (string) => typeof __unframerNavigator !== 'undefined' && __unframerNavigator.userAgent &&
|
|
513572
|
+
__unframerNavigator.userAgent.toLowerCase().includes(string);
|
|
513571
513573
|
var roundPoint = userAgentContains('applewebkit/') && !userAgentContains('chrome/') ? Math.round : noop;
|
|
513572
513574
|
function roundAxis(axis) {
|
|
513573
513575
|
axis.min = roundPoint(axis.min);
|
|
@@ -516613,7 +516615,7 @@ function steps(numSteps, direction = 'end') {
|
|
|
516613
516615
|
return clamp(0, 1, rounded / numSteps);
|
|
516614
516616
|
};
|
|
516615
516617
|
}
|
|
516616
|
-
// /:https://app.framerstatic.com/framer.
|
|
516618
|
+
// /:https://app.framerstatic.com/framer.3KX2OI4Q.mjs
|
|
516617
516619
|
init_chunk_QLPHEVXG();
|
|
516618
516620
|
import React4 from 'react';
|
|
516619
516621
|
import { Suspense as Suspense3, } from 'react';
|
|
@@ -516621,6 +516623,7 @@ import { memo as memo2, startTransition as startTransition2, } from 'react';
|
|
|
516621
516623
|
import ReactDOM from 'react-dom';
|
|
516622
516624
|
import { createRef, } from 'react';
|
|
516623
516625
|
import { cloneElement as cloneElement32, } from 'react';
|
|
516626
|
+
var __unframerNavigator2 = typeof window !== 'undefined' ? navigator : void 0;
|
|
516624
516627
|
var require_hsluv = __commonJS({
|
|
516625
516628
|
'../../../node_modules/hsluv/dist/hsluv.cjs'(exports) {
|
|
516626
516629
|
'use strict';
|
|
@@ -518457,7 +518460,7 @@ function isGenerator2(value) {
|
|
|
518457
518460
|
function isBot(userAgent) {
|
|
518458
518461
|
return /bot|-google|google-|yandex|ia_archiver/iu.test(userAgent);
|
|
518459
518462
|
}
|
|
518460
|
-
var shouldPreloadBasedOnUA = /* @__PURE__ */ (() => typeof window !== 'undefined' && !isBot(
|
|
518463
|
+
var shouldPreloadBasedOnUA = /* @__PURE__ */ (() => typeof window !== 'undefined' && !isBot(__unframerNavigator2.userAgent))();
|
|
518461
518464
|
function useRoutePreloader(routeIds, enabled = true) {
|
|
518462
518465
|
const { getRoute, } = useRouter();
|
|
518463
518466
|
useEffect(() => {
|
|
@@ -519211,9 +519214,9 @@ function replaceHistoryState(data2, url, ignoreReplaceStateWrapper = false) {
|
|
|
519211
519214
|
}
|
|
519212
519215
|
var maybeHasPopstateBug = true;
|
|
519213
519216
|
var isImpactedPopstateBugChromiumVersion = /* @__PURE__ */ (() => {
|
|
519214
|
-
if (typeof
|
|
519217
|
+
if (typeof __unframerNavigator2 === 'undefined')
|
|
519215
519218
|
return false;
|
|
519216
|
-
const userAgent =
|
|
519219
|
+
const userAgent = __unframerNavigator2.userAgent;
|
|
519217
519220
|
const chromePos = userAgent.indexOf('Chrome/');
|
|
519218
519221
|
const chromiumVersion = +userAgent.slice(chromePos + 7, userAgent.indexOf('.', chromePos));
|
|
519219
519222
|
return chromiumVersion > 101 && chromiumVersion < 128;
|
|
@@ -519241,7 +519244,7 @@ async function pushHistoryState(data2, url, awaitPaintBeforeUpdate = false, isNa
|
|
|
519241
519244
|
console.error(msg);
|
|
519242
519245
|
(_a = window.__framer_events) == null ? void 0 : _a.push(['published_site_load_recoverable_error', {
|
|
519243
519246
|
message: msg,
|
|
519244
|
-
userAgent:
|
|
519247
|
+
userAgent: __unframerNavigator2.userAgent,
|
|
519245
519248
|
},]);
|
|
519246
519249
|
};
|
|
519247
519250
|
window.addEventListener('popstate', popstateListener, {
|
|
@@ -519717,10 +519720,11 @@ var MarkSuspenseEffects = {
|
|
|
519717
519720
|
End: MarkSuspenseEffectsEnd,
|
|
519718
519721
|
};
|
|
519719
519722
|
function renderPage(Page4, defaultPageStyle) {
|
|
519720
|
-
const
|
|
519723
|
+
const props = {
|
|
519721
519724
|
style: defaultPageStyle,
|
|
519725
|
+
'data-framer-root': true,
|
|
519722
519726
|
};
|
|
519723
|
-
return React4.isValidElement(Page4) ? React4.cloneElement(Page4,
|
|
519727
|
+
return React4.isValidElement(Page4) ? React4.cloneElement(Page4, props) : React4.createElement(Page4, props);
|
|
519724
519728
|
}
|
|
519725
519729
|
var NotFoundError = class extends Error {
|
|
519726
519730
|
};
|
|
@@ -524592,10 +524596,7 @@ var ProvideParentSize = (props) => {
|
|
|
524592
524596
|
const { parentSize, children, } = props;
|
|
524593
524597
|
const value = React4.useMemo(() => ({
|
|
524594
524598
|
parentSize,
|
|
524595
|
-
}),
|
|
524596
|
-
// but it should be safe to ignore.
|
|
524597
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
524598
|
-
[getParentWidth(parentSize), getParentHeight(parentSize),]);
|
|
524599
|
+
}), [getParentWidth(parentSize), getParentHeight(parentSize),]);
|
|
524599
524600
|
if (currentParentSize === 1) {
|
|
524600
524601
|
return children
|
|
524601
524602
|
? /* @__PURE__ */ jsx(Fragment, {
|
|
@@ -527246,6 +527247,10 @@ function supportsThemes(presetId, skin) {
|
|
|
527246
527247
|
}
|
|
527247
527248
|
return false;
|
|
527248
527249
|
}
|
|
527250
|
+
function useIsStaticRenderer() {
|
|
527251
|
+
const currentTarget = RenderTarget.current();
|
|
527252
|
+
return currentTarget === RenderTarget.canvas || currentTarget === RenderTarget.export;
|
|
527253
|
+
}
|
|
527249
527254
|
var asRecord = (object) => object;
|
|
527250
527255
|
function memoize(fn) {
|
|
527251
527256
|
const cache2 = Object.create(Object.prototype);
|
|
@@ -527565,7 +527570,7 @@ function htmlElementAsMotionComponent(asElem) {
|
|
|
527565
527570
|
return asElem && asElem !== 'search' && asElem !== 'slot' && asElem !== 'template' ? motion[asElem] : motion['div'];
|
|
527566
527571
|
}
|
|
527567
527572
|
var import_process = __toESM(require_browser(), 1);
|
|
527568
|
-
var safeNavigator = typeof
|
|
527573
|
+
var safeNavigator = typeof __unframerNavigator2 !== 'undefined' ? __unframerNavigator2 : void 0;
|
|
527569
527574
|
var isBrowser2 = () => typeof document === 'object';
|
|
527570
527575
|
var isWebKit = () => {
|
|
527571
527576
|
var _a;
|
|
@@ -528682,9 +528687,9 @@ function useStyleAndRect(props) {
|
|
|
528682
528687
|
...defaultStyle,
|
|
528683
528688
|
};
|
|
528684
528689
|
}
|
|
528685
|
-
const
|
|
528690
|
+
const isRenderingStaticContent = useIsStaticRenderer();
|
|
528686
528691
|
if (props.positionSticky) {
|
|
528687
|
-
if (!
|
|
528692
|
+
if (!isRenderingStaticContent || inCodeComponent) {
|
|
528688
528693
|
resultStyle.position = 'sticky';
|
|
528689
528694
|
resultStyle.willChange = 'transform';
|
|
528690
528695
|
resultStyle.zIndex = 1;
|
|
@@ -528694,7 +528699,7 @@ function useStyleAndRect(props) {
|
|
|
528694
528699
|
resultStyle.left = props.positionStickyLeft;
|
|
528695
528700
|
}
|
|
528696
528701
|
}
|
|
528697
|
-
else if (
|
|
528702
|
+
else if (isRenderingStaticContent && (props.positionFixed || props.positionAbsolute)) {
|
|
528698
528703
|
resultStyle.position = 'absolute';
|
|
528699
528704
|
}
|
|
528700
528705
|
if ('rotate' in resultStyle && resultStyle.rotate === void 0) {
|
|
@@ -529172,8 +529177,6 @@ var SharedIntersectionObserver = class {
|
|
|
529172
529177
|
};
|
|
529173
529178
|
var SharedIntersectionObserverContext = /* @__PURE__ */ createContext(/* @__PURE__ */ new Map());
|
|
529174
529179
|
function useSharedIntersectionObserver(ref, callback, options) {
|
|
529175
|
-
if (typeof IntersectionObserver === 'undefined')
|
|
529176
|
-
return;
|
|
529177
529180
|
const key7 = useConstant2(() => `${options.rootMargin}`);
|
|
529178
529181
|
const observers2 = useContext(SharedIntersectionObserverContext);
|
|
529179
529182
|
const { enabled, } = options;
|
|
@@ -535218,9 +535221,7 @@ function useUpdateScrollOffset(ref, side, offset, cancelEmulatedTouchScrollAnima
|
|
|
535218
535221
|
cancelEmulatedTouchScrollAnimation == null ? void 0 : cancelEmulatedTouchScrollAnimation();
|
|
535219
535222
|
element[side] = Math.abs(offset);
|
|
535220
535223
|
}
|
|
535221
|
-
},
|
|
535222
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
535223
|
-
[offset,]);
|
|
535224
|
+
}, [offset,]);
|
|
535224
535225
|
}
|
|
535225
535226
|
var NativeScroll = /* @__PURE__ */ React4.forwardRef(function NativeScroll2(props, forwardedRef) {
|
|
535226
535227
|
const { direction = 'vertical', scrollBarVisible = false, dragEnabled = true, contentOffsetX = 0, contentOffsetY = 0, contentWidth: _contentWidth, contentHeight: _contentHeight, children, resetOffset, onScroll, className: className2,
|
|
@@ -535655,10 +535656,6 @@ function useFXValues(values, enabled) {
|
|
|
535655
535656
|
}, [effect, enabled,]);
|
|
535656
535657
|
return effect;
|
|
535657
535658
|
}
|
|
535658
|
-
function useIsStaticRenderer() {
|
|
535659
|
-
const currentTarget = RenderTarget.current();
|
|
535660
|
-
return currentTarget === RenderTarget.canvas || currentTarget === RenderTarget.export;
|
|
535661
|
-
}
|
|
535662
535659
|
var loopOptionsKeys = /* @__PURE__ */ new Set(['loopEffectEnabled', 'loopTransition', 'loop', 'loopRepeatType', 'loopRepeatDelay',]);
|
|
535663
535660
|
var useDelay = () => {
|
|
535664
535661
|
const timeoutRef = useRef();
|
|
@@ -536070,7 +536067,8 @@ function useAnimationVariants({ opacity, targetOpacity, perspective: transformPe
|
|
|
536070
536067
|
opacity: targetOpacity,
|
|
536071
536068
|
}),
|
|
536072
536069
|
exit: exit ?? makeStyle(),
|
|
536073
|
-
}),
|
|
536070
|
+
}), // biome-ignore lint/correctness/useExhaustiveDependencies: `defaultStyles` makes this memo re-run on every render, but that appears to be fine.
|
|
536071
|
+
[animateVariant2, defaultStyles, enter, exit, opacity, targetOpacity, transformPerspective,]);
|
|
536074
536072
|
}
|
|
536075
536073
|
function useStyleAppearEffect(options, ref) {
|
|
536076
536074
|
const shouldReduceMotion = useReducedMotionConfig();
|
|
@@ -536112,9 +536110,7 @@ function useStyleAppearEffect(options, ref) {
|
|
|
536112
536110
|
}
|
|
536113
536111
|
});
|
|
536114
536112
|
}));
|
|
536115
|
-
},
|
|
536116
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
536117
|
-
[]);
|
|
536113
|
+
}, []);
|
|
536118
536114
|
const hasAnimatedOnce = options.animateOnce && playState.current.lastAppearState === true;
|
|
536119
536115
|
const animateWithIntersectionObserver = !options.targets && options.styleAppearEffectEnabled && !options.scrollDirection &&
|
|
536120
536116
|
!hasAnimatedOnce;
|
|
@@ -536665,8 +536661,14 @@ var SuspenseErrorBoundary = class extends Component {
|
|
|
536665
536661
|
};
|
|
536666
536662
|
var suspendPromise = /* @__PURE__ */ (() => typeof window !== 'undefined' ? new Promise(() => { }) : null)();
|
|
536667
536663
|
function Suspend() {
|
|
536668
|
-
if (typeof window === 'undefined' || window.__framer_STPD_OPT_OUT__)
|
|
536669
|
-
return
|
|
536664
|
+
if (typeof window === 'undefined' || window.__framer_STPD_OPT_OUT__) {
|
|
536665
|
+
return /* @__PURE__ */ jsx('div', {
|
|
536666
|
+
hidden: true,
|
|
536667
|
+
dangerouslySetInnerHTML: {
|
|
536668
|
+
__html: '<!-- SuspenseThatPreservesDOM fallback rendered -->',
|
|
536669
|
+
},
|
|
536670
|
+
});
|
|
536671
|
+
}
|
|
536670
536672
|
throw suspendPromise;
|
|
536671
536673
|
}
|
|
536672
536674
|
function SuspenseThatPreservesDom({ children, }) {
|
|
@@ -536778,14 +536780,21 @@ var DeprecatedContainerErrorBoundary = class extends Component {
|
|
|
536778
536780
|
return hasError ? null : children;
|
|
536779
536781
|
}
|
|
536780
536782
|
};
|
|
536781
|
-
var
|
|
536782
|
-
|
|
536783
|
-
|
|
536784
|
-
}
|
|
536785
|
-
function
|
|
536786
|
-
|
|
536787
|
-
|
|
536788
|
-
|
|
536783
|
+
var ExternalComponentContext = /* @__PURE__ */ (() => React4.createContext({
|
|
536784
|
+
level: 0,
|
|
536785
|
+
scopeId: void 0,
|
|
536786
|
+
}))();
|
|
536787
|
+
function useNearestExternalComponent() {
|
|
536788
|
+
return React4.useContext(ExternalComponentContext);
|
|
536789
|
+
}
|
|
536790
|
+
function IsExternalComponent({ children, scopeId, }) {
|
|
536791
|
+
const level = React4.useContext(ExternalComponentContext).level;
|
|
536792
|
+
const newValue = React4.useMemo(() => ({
|
|
536793
|
+
level: level + 1,
|
|
536794
|
+
scopeId,
|
|
536795
|
+
}), [level, scopeId,]);
|
|
536796
|
+
return /* @__PURE__ */ jsx(ExternalComponentContext.Provider, {
|
|
536797
|
+
value: newValue,
|
|
536789
536798
|
children,
|
|
536790
536799
|
});
|
|
536791
536800
|
}
|
|
@@ -536802,27 +536811,32 @@ function getErrorMessageForOverride(scopeId, nodeId) {
|
|
|
536802
536811
|
function getErrorMessageFor(element, scopeId, nodeId) {
|
|
536803
536812
|
return `A code ${element} crashed while rendering due to the error above. To find and fix it, open the project in the editor \u2192 open Quick Actions (press Cmd+K or Ctrl+K) \u2192 paste this: ${formatCodeCrashLocationFromSourceNode(scopeId, nodeId)} \u2192 click \u201CShow Layer\u201D.`;
|
|
536804
536813
|
}
|
|
536805
|
-
function shouldWrapComponentWithBoundary(
|
|
536806
|
-
const isLocalComponentInstance =
|
|
536807
|
-
|
|
536808
|
-
|
|
536809
|
-
|
|
536810
|
-
//
|
|
536811
|
-
|
|
536812
|
-
|
|
536813
|
-
|
|
536814
|
-
return (
|
|
536815
|
-
}
|
|
536816
|
-
function
|
|
536817
|
-
|
|
536818
|
-
|
|
536819
|
-
|
|
536820
|
-
|
|
536821
|
-
|
|
536822
|
-
|
|
536823
|
-
//
|
|
536824
|
-
|
|
536825
|
-
|
|
536814
|
+
function shouldWrapComponentWithBoundary(scopeIdOfThisComponent, scopeIdOfNearestExternalComponent, externalComponentLevel, isAuthoredByUser, isExternalComponent, inComponentSlot) {
|
|
536815
|
+
const isLocalComponentInstance = isNodeLocalToProject(scopeIdOfThisComponent, scopeIdOfNearestExternalComponent, externalComponentLevel, inComponentSlot);
|
|
536816
|
+
return (
|
|
536817
|
+
// case 1: all (local instances) of (local) (code components)
|
|
536818
|
+
isLocalComponentInstance && !isExternalComponent && isAuthoredByUser ||
|
|
536819
|
+
// case 2: all (local instances) of (external components)
|
|
536820
|
+
isLocalComponentInstance && isExternalComponent);
|
|
536821
|
+
}
|
|
536822
|
+
function shouldWrapOverrideWithBoundary(scopeIdOfNodeWithOverride, scopeIdOfNearestExternalComponent, externalComponentLevel, inComponentSlot) {
|
|
536823
|
+
return isNodeLocalToProject(scopeIdOfNodeWithOverride, scopeIdOfNearestExternalComponent, externalComponentLevel, inComponentSlot);
|
|
536824
|
+
}
|
|
536825
|
+
function isNodeLocalToProject(scopeIdOfThisNode, scopeIdOfNearestExternalComponent, externalComponentLevel, inComponentSlot) {
|
|
536826
|
+
if (externalComponentLevel === 0)
|
|
536827
|
+
return true;
|
|
536828
|
+
const nodeIsDefinedInSameScopeAsExternalComponent = scopeIdOfThisNode === scopeIdOfNearestExternalComponent;
|
|
536829
|
+
if (
|
|
536830
|
+
// We know a component instance is local when it’s nested inside one external component,
|
|
536831
|
+
externalComponentLevel === 1 &&
|
|
536832
|
+
// and it lives in a slot,
|
|
536833
|
+
inComponentSlot &&
|
|
536834
|
+
// and it’s a slot of *that sole external component* (and not some other local component
|
|
536835
|
+
// with slots that lives inside the external component).
|
|
536836
|
+
nodeIsDefinedInSameScopeAsExternalComponent) {
|
|
536837
|
+
return true;
|
|
536838
|
+
}
|
|
536839
|
+
return false;
|
|
536826
536840
|
}
|
|
536827
536841
|
var ContainerInner = /* @__PURE__ */ React4.forwardRef(({ children, layoutId, as, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot, ...props }, ref) => {
|
|
536828
536842
|
const outerLayoutId = useConstant2(() => layoutId ? `${layoutId}-container` : void 0);
|
|
@@ -536877,7 +536891,7 @@ var SmartComponentScopedContainer = /* @__PURE__ */ React4.forwardRef((props, re
|
|
|
536877
536891
|
}
|
|
536878
536892
|
});
|
|
536879
536893
|
function useWrapWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, isExternalComponent, inComponentSlot) {
|
|
536880
|
-
const
|
|
536894
|
+
const nearestExternalComponent = useNearestExternalComponent();
|
|
536881
536895
|
if (
|
|
536882
536896
|
// Those props will either be all undefined, which means the Container wasn’t codegenned yet,
|
|
536883
536897
|
// and we should use the old ContainerErrorBoundary –
|
|
@@ -536887,7 +536901,7 @@ function useWrapWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, is
|
|
|
536887
536901
|
children,
|
|
536888
536902
|
});
|
|
536889
536903
|
}
|
|
536890
|
-
const shouldWrapWithBoundary = shouldWrapComponentWithBoundary(
|
|
536904
|
+
const shouldWrapWithBoundary = shouldWrapComponentWithBoundary(scopeId, nearestExternalComponent.scopeId, nearestExternalComponent.level, isAuthoredByUser ?? false, isExternalComponent ?? false, inComponentSlot ?? false);
|
|
536891
536905
|
if (shouldWrapWithBoundary) {
|
|
536892
536906
|
children = /* @__PURE__ */ jsx(CodeComponentBoundary, {
|
|
536893
536907
|
errorMessage: getErrorMessageForComponent(scopeId, nodeId),
|
|
@@ -536897,6 +536911,7 @@ function useWrapWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, is
|
|
|
536897
536911
|
}
|
|
536898
536912
|
if (isExternalComponent) {
|
|
536899
536913
|
children = /* @__PURE__ */ jsx(IsExternalComponent, {
|
|
536914
|
+
scopeId,
|
|
536900
536915
|
children,
|
|
536901
536916
|
});
|
|
536902
536917
|
}
|
|
@@ -537861,6 +537876,8 @@ var GracefullyDegradingErrorBoundary = class extends Component {
|
|
|
537861
537876
|
error: void 0,
|
|
537862
537877
|
});
|
|
537863
537878
|
__publicField(this, 'message', 'Made UI non-interactive due to an error');
|
|
537879
|
+
__publicField(this, 'messageFatal', 'Fatal error');
|
|
537880
|
+
__publicField(this, 'messageUser', 'Please check any custom code or code overrides');
|
|
537864
537881
|
__publicField(this, 'messageReport', 'If you are the author of this website, please report this issue to the Framer team via https://www.framer.community/');
|
|
537865
537882
|
}
|
|
537866
537883
|
static getDerivedStateFromError(error) {
|
|
@@ -537869,19 +537886,19 @@ var GracefullyDegradingErrorBoundary = class extends Component {
|
|
|
537869
537886
|
};
|
|
537870
537887
|
}
|
|
537871
537888
|
componentDidCatch(error) {
|
|
537872
|
-
var _a, _b;
|
|
537889
|
+
var _a, _b, _c;
|
|
537873
537890
|
window.__framer_hadFatalError = true;
|
|
537874
537891
|
if ('cause' in error) {
|
|
537875
537892
|
error = error.cause;
|
|
537876
537893
|
}
|
|
537877
|
-
console.error(`${this.message} (see above). ${this.messageReport}.`);
|
|
537894
|
+
console.error(`${isBot(__unframerNavigator2.userAgent) ? this.message : this.messageFatal} (see above). ${((_a = this.context) == null ? void 0 : _a.codeBoundaries) ? this.messageUser : this.messageReport}.`);
|
|
537878
537895
|
const sampleRate = Math.random();
|
|
537879
|
-
if (!((
|
|
537896
|
+
if (!((_b = this.context) == null ? void 0 : _b.codeBoundaries) && sampleRate > 0.01)
|
|
537880
537897
|
return;
|
|
537881
537898
|
if (sampleRate > 0.25)
|
|
537882
537899
|
return;
|
|
537883
537900
|
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
537884
|
-
(
|
|
537901
|
+
(_c = window.__framer_events) == null ? void 0 : _c.push(['published_site_load_error', {
|
|
537885
537902
|
message: String(error),
|
|
537886
537903
|
stack,
|
|
537887
537904
|
},]);
|
|
@@ -537894,7 +537911,7 @@ var GracefullyDegradingErrorBoundary = class extends Component {
|
|
|
537894
537911
|
const unwrappedError = 'cause' in error ? error.cause : error;
|
|
537895
537912
|
const closingHTMLComment = /-->/gu;
|
|
537896
537913
|
const closingHTMLCommentReplacement = '--!>';
|
|
537897
|
-
const dom = isBot(
|
|
537914
|
+
const dom = isBot(__unframerNavigator2.userAgent) ? ((_a = document.getElementById('main')) == null ? void 0 : _a.innerHTML) || '' : // @FIXME: We should have a UI for fatal error recovery.
|
|
537898
537915
|
// We don't have a UI for fatal error recovery currently, so we just render nothing for regular users. If we were to throw, React would unmount too.
|
|
537899
537916
|
// We do render instead of throwing, so that:
|
|
537900
537917
|
// - `componentDidCatch` runs (if we throw here, it does not)
|
|
@@ -538118,8 +538135,8 @@ var preloadedRoutes = /* @__PURE__ */ new Set();
|
|
|
538118
538135
|
var routeToNodesInViewport = /* @__PURE__ */ new Map();
|
|
538119
538136
|
function getObserveRouteForPreloadingFn() {
|
|
538120
538137
|
var _a;
|
|
538121
|
-
const connection =
|
|
538122
|
-
const lowDeviceMemory =
|
|
538138
|
+
const connection = __unframerNavigator2.connection || __unframerNavigator2.mozConnection || __unframerNavigator2.webkitConnection || {};
|
|
538139
|
+
const lowDeviceMemory = __unframerNavigator2.deviceMemory && __unframerNavigator2.deviceMemory > LOW_MEMORY_THRESHOLD;
|
|
538123
538140
|
let effectiveType, preloadDisabled, maxPreloadAmount;
|
|
538124
538141
|
function updateConnection() {
|
|
538125
538142
|
effectiveType = connection.effectiveType || '';
|
|
@@ -538621,7 +538638,7 @@ function useReplaceNestedLinks(nodeId, href, propsAddedByLink) {
|
|
|
538621
538638
|
return;
|
|
538622
538639
|
event.preventDefault();
|
|
538623
538640
|
event.stopPropagation();
|
|
538624
|
-
const isAppleDevice = /Mac|iPod|iPhone|iPad/u.test(
|
|
538641
|
+
const isAppleDevice = /Mac|iPod|iPhone|iPad/u.test(__unframerNavigator2.userAgent);
|
|
538625
538642
|
if (isAppleDevice ? event.metaKey : event.ctrlKey) {
|
|
538626
538643
|
openExternalLink(propsAddedByLink.href, '', '_blank');
|
|
538627
538644
|
return;
|
|
@@ -544837,12 +544854,12 @@ function useHydratedBreakpointVariants(initial, mediaQueries, hydratedWithInitia
|
|
|
544837
544854
|
});
|
|
544838
544855
|
}
|
|
544839
544856
|
}
|
|
544840
|
-
}, [instantTransition, forceUpdate,
|
|
544857
|
+
}, [instantTransition, forceUpdate,]);
|
|
544841
544858
|
useIsomorphicLayoutEffect2(() => {
|
|
544842
544859
|
if (!onCanvas)
|
|
544843
544860
|
return;
|
|
544844
544861
|
setActiveVariantInstant(initial);
|
|
544845
|
-
}, [
|
|
544862
|
+
}, [initial, setActiveVariantInstant,]);
|
|
544846
544863
|
useIsomorphicLayoutEffect2(() => {
|
|
544847
544864
|
if (!hydratedWithInitial || isInitialNavigation !== true)
|
|
544848
544865
|
return;
|
|
@@ -545064,7 +545081,7 @@ var gamepadPoller = /* @__PURE__ */ createGamepadPoller();
|
|
|
545064
545081
|
var GamepadContext = /* @__PURE__ */ React4.createContext(gamepadPoller);
|
|
545065
545082
|
function getGamepadInputs() {
|
|
545066
545083
|
let firstConnectedGamepad = null;
|
|
545067
|
-
const gamepads =
|
|
545084
|
+
const gamepads = __unframerNavigator2.getGamepads();
|
|
545068
545085
|
for (const gamepad of gamepads) {
|
|
545069
545086
|
if (!gamepad)
|
|
545070
545087
|
continue;
|
|
@@ -545800,8 +545817,8 @@ function withCodeBoundaryForOverrides(Component18, { scopeId, nodeId, override,
|
|
|
545800
545817
|
const appliedOverride = tryToApplyOverride(Component18, override);
|
|
545801
545818
|
let hasErrorBeenLogged = false;
|
|
545802
545819
|
function CodeBoundaryForOverrides(props, ref) {
|
|
545803
|
-
const
|
|
545804
|
-
const shouldWrapWithBoundary = shouldWrapOverrideWithBoundary(
|
|
545820
|
+
const nearestExternalComponent = useNearestExternalComponent();
|
|
545821
|
+
const shouldWrapWithBoundary = shouldWrapOverrideWithBoundary(scopeId, nearestExternalComponent.scopeId, nearestExternalComponent.level, inComponentSlot ?? false);
|
|
545805
545822
|
if (shouldWrapWithBoundary) {
|
|
545806
545823
|
if (appliedOverride.status === 'success') {
|
|
545807
545824
|
return /* @__PURE__ */ jsx(CodeComponentBoundary, {
|
|
@@ -546797,7 +546814,9 @@ function getCustomFontName(fileName, properties) {
|
|
|
546797
546814
|
const isAssetVariableFont = Array.isArray(font.variationAxes);
|
|
546798
546815
|
if (isAssetVariableFont && fontFamily.toLowerCase().includes('variable'))
|
|
546799
546816
|
return fontFamily;
|
|
546800
|
-
const variant = isAssetVariableFont ? 'Variable' : font.preferredSubFamily || font.fontSubFamily;
|
|
546817
|
+
const variant = isAssetVariableFont ? 'Variable' : (font.preferredSubFamily || font.fontSubFamily).trim();
|
|
546818
|
+
if (variant === '')
|
|
546819
|
+
return fontFamily;
|
|
546801
546820
|
return `${fontFamily} ${variant}`;
|
|
546802
546821
|
}
|
|
546803
546822
|
var CustomFontSource = class {
|
|
@@ -548399,12 +548418,14 @@ var styles = /* @__PURE__ */ (() => [
|
|
|
548399
548418
|
backgroundColor: 'transparent',
|
|
548400
548419
|
outline: 'none',
|
|
548401
548420
|
}),
|
|
548421
|
+
css(`.${textInputWrapperClassName} .${inputClassName}::-webkit-datetime-edit`, {
|
|
548422
|
+
// Prevent browsers from improvising the date/time placeholder height.
|
|
548423
|
+
height: css.variable('--framer-input-font-line-height'),
|
|
548424
|
+
}),
|
|
548402
548425
|
css(`.${textInputWrapperClassName} .${inputClassName}.${emptyValueClassName}::-webkit-datetime-edit`, {
|
|
548403
548426
|
color: css.variable('--framer-input-placeholder-color'),
|
|
548404
548427
|
// This tells safari to use the color for the shadow dom elements.
|
|
548405
548428
|
'-webkit-text-fill-color': css.variable('--framer-input-placeholder-color'),
|
|
548406
|
-
// Prevent browsers from improvising the date/time placeholder height.
|
|
548407
|
-
height: css.variable('--framer-input-font-line-height'),
|
|
548408
548429
|
overflow: 'visible',
|
|
548409
548430
|
}),
|
|
548410
548431
|
css(`.${textInputWrapperClassName} .${inputClassName}[type="date"]::before, .${textInputWrapperClassName} .${inputClassName}[type="time"]::before`, {
|
|
@@ -551906,19 +551927,11 @@ function useInitialRouteComponent(routes, homeNodeId) {
|
|
|
551906
551927
|
var package_default = {
|
|
551907
551928
|
name: 'framer',
|
|
551908
551929
|
version: '2.4.1',
|
|
551909
|
-
|
|
551930
|
+
private: true,
|
|
551910
551931
|
type: 'module',
|
|
551911
|
-
exports: {
|
|
551912
|
-
'.': './build/index.js',
|
|
551913
|
-
'./package.json': './package.json',
|
|
551914
|
-
'./*': './build/*',
|
|
551915
|
-
},
|
|
551916
|
-
files: ['build', 'CHANGELOG.md', 'README.md', 'LICENSE.md', 'postinstall.cjs',],
|
|
551917
|
-
types: './build/index.d.ts',
|
|
551918
551932
|
author: 'Framer',
|
|
551919
551933
|
license: 'MIT',
|
|
551920
551934
|
scripts: {
|
|
551921
|
-
prepublishOnly: 'make build',
|
|
551922
551935
|
coverage: 'yarn :jest --coverage',
|
|
551923
551936
|
lint: 'yarn :eslint ./src --ext .ts,.tsx --format codeframe --quiet --cache',
|
|
551924
551937
|
'lint:ci': 'yarn :eslint ./src --ext .ts,.tsx --format codeframe --quiet --cache --cache-strategy content',
|
|
@@ -551970,20 +551983,6 @@ var package_default = {
|
|
|
551970
551983
|
tsdoc: {
|
|
551971
551984
|
tsdocFlavor: 'AEDoc',
|
|
551972
551985
|
},
|
|
551973
|
-
framer: {
|
|
551974
|
-
components: [{
|
|
551975
|
-
name: 'Scroll',
|
|
551976
|
-
children: true,
|
|
551977
|
-
properties: [{
|
|
551978
|
-
key: 'direction',
|
|
551979
|
-
title: 'Direction',
|
|
551980
|
-
kind: 'enum',
|
|
551981
|
-
options: ['horizontal', 'vertical', 'both',],
|
|
551982
|
-
},],
|
|
551983
|
-
}, {
|
|
551984
|
-
name: 'Page',
|
|
551985
|
-
},],
|
|
551986
|
-
},
|
|
551987
551986
|
browserslist: ['extends @framer/browserslist-config/sites',],
|
|
551988
551987
|
};
|
|
551989
551988
|
var version = /* @__PURE__ */ (() => package_default.version)();
|