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/dist/framer.js
CHANGED
|
@@ -507197,6 +507197,7 @@ const react_8 = require("react");
|
|
|
507197
507197
|
const react_9 = require("react");
|
|
507198
507198
|
const React2 = __importStar(require("react"));
|
|
507199
507199
|
const react_10 = require("react");
|
|
507200
|
+
var __unframerNavigator = typeof window !== 'undefined' ? navigator : void 0;
|
|
507200
507201
|
var require_memoize_browser_cjs = __commonJS({
|
|
507201
507202
|
'../../../node_modules/@emotion/memoize/dist/memoize.browser.cjs.js'(exports) {
|
|
507202
507203
|
'use strict';
|
|
@@ -513872,7 +513873,8 @@ var defaultLayoutTransition = {
|
|
|
513872
513873
|
duration: 0.45,
|
|
513873
513874
|
ease: [0.4, 0, 0.1, 1,],
|
|
513874
513875
|
};
|
|
513875
|
-
var userAgentContains = (string) => typeof
|
|
513876
|
+
var userAgentContains = (string) => typeof __unframerNavigator !== 'undefined' && __unframerNavigator.userAgent &&
|
|
513877
|
+
__unframerNavigator.userAgent.toLowerCase().includes(string);
|
|
513876
513878
|
var roundPoint = userAgentContains('applewebkit/') && !userAgentContains('chrome/') ? Math.round : noop;
|
|
513877
513879
|
function roundAxis(axis) {
|
|
513878
513880
|
axis.min = roundPoint(axis.min);
|
|
@@ -516934,7 +516936,7 @@ function steps(numSteps, direction = 'end') {
|
|
|
516934
516936
|
return clamp(0, 1, rounded / numSteps);
|
|
516935
516937
|
};
|
|
516936
516938
|
}
|
|
516937
|
-
// /:https://app.framerstatic.com/framer.
|
|
516939
|
+
// /:https://app.framerstatic.com/framer.3KX2OI4Q.mjs
|
|
516938
516940
|
init_chunk_QLPHEVXG();
|
|
516939
516941
|
const react_11 = __importDefault(require("react"));
|
|
516940
516942
|
const react_12 = require("react");
|
|
@@ -516942,6 +516944,7 @@ const react_13 = require("react");
|
|
|
516942
516944
|
const react_dom_1 = __importDefault(require("react-dom"));
|
|
516943
516945
|
const react_14 = require("react");
|
|
516944
516946
|
const react_15 = require("react");
|
|
516947
|
+
var __unframerNavigator2 = typeof window !== 'undefined' ? navigator : void 0;
|
|
516945
516948
|
var require_hsluv = __commonJS({
|
|
516946
516949
|
'../../../node_modules/hsluv/dist/hsluv.cjs'(exports) {
|
|
516947
516950
|
'use strict';
|
|
@@ -518778,7 +518781,7 @@ function isGenerator2(value) {
|
|
|
518778
518781
|
function isBot(userAgent) {
|
|
518779
518782
|
return /bot|-google|google-|yandex|ia_archiver/iu.test(userAgent);
|
|
518780
518783
|
}
|
|
518781
|
-
var shouldPreloadBasedOnUA = /* @__PURE__ */ (() => typeof window !== 'undefined' && !isBot(
|
|
518784
|
+
var shouldPreloadBasedOnUA = /* @__PURE__ */ (() => typeof window !== 'undefined' && !isBot(__unframerNavigator2.userAgent))();
|
|
518782
518785
|
function useRoutePreloader(routeIds, enabled = true) {
|
|
518783
518786
|
const { getRoute, } = useRouter();
|
|
518784
518787
|
(0, react_2.useEffect)(() => {
|
|
@@ -519532,9 +519535,9 @@ function replaceHistoryState(data2, url, ignoreReplaceStateWrapper = false) {
|
|
|
519532
519535
|
}
|
|
519533
519536
|
var maybeHasPopstateBug = true;
|
|
519534
519537
|
var isImpactedPopstateBugChromiumVersion = /* @__PURE__ */ (() => {
|
|
519535
|
-
if (typeof
|
|
519538
|
+
if (typeof __unframerNavigator2 === 'undefined')
|
|
519536
519539
|
return false;
|
|
519537
|
-
const userAgent =
|
|
519540
|
+
const userAgent = __unframerNavigator2.userAgent;
|
|
519538
519541
|
const chromePos = userAgent.indexOf('Chrome/');
|
|
519539
519542
|
const chromiumVersion = +userAgent.slice(chromePos + 7, userAgent.indexOf('.', chromePos));
|
|
519540
519543
|
return chromiumVersion > 101 && chromiumVersion < 128;
|
|
@@ -519562,7 +519565,7 @@ async function pushHistoryState(data2, url, awaitPaintBeforeUpdate = false, isNa
|
|
|
519562
519565
|
console.error(msg);
|
|
519563
519566
|
(_a = window.__framer_events) == null ? void 0 : _a.push(['published_site_load_recoverable_error', {
|
|
519564
519567
|
message: msg,
|
|
519565
|
-
userAgent:
|
|
519568
|
+
userAgent: __unframerNavigator2.userAgent,
|
|
519566
519569
|
},]);
|
|
519567
519570
|
};
|
|
519568
519571
|
window.addEventListener('popstate', popstateListener, {
|
|
@@ -520039,10 +520042,11 @@ var MarkSuspenseEffects = {
|
|
|
520039
520042
|
End: MarkSuspenseEffectsEnd,
|
|
520040
520043
|
};
|
|
520041
520044
|
function renderPage(Page4, defaultPageStyle) {
|
|
520042
|
-
const
|
|
520045
|
+
const props = {
|
|
520043
520046
|
style: defaultPageStyle,
|
|
520047
|
+
'data-framer-root': true,
|
|
520044
520048
|
};
|
|
520045
|
-
return react_11.default.isValidElement(Page4) ? react_11.default.cloneElement(Page4,
|
|
520049
|
+
return react_11.default.isValidElement(Page4) ? react_11.default.cloneElement(Page4, props) : react_11.default.createElement(Page4, props);
|
|
520046
520050
|
}
|
|
520047
520051
|
var NotFoundError = class extends Error {
|
|
520048
520052
|
};
|
|
@@ -524935,10 +524939,7 @@ var ProvideParentSize = (props) => {
|
|
|
524935
524939
|
const { parentSize, children, } = props;
|
|
524936
524940
|
const value = react_11.default.useMemo(() => ({
|
|
524937
524941
|
parentSize,
|
|
524938
|
-
}),
|
|
524939
|
-
// but it should be safe to ignore.
|
|
524940
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
524941
|
-
[getParentWidth(parentSize), getParentHeight(parentSize),]);
|
|
524942
|
+
}), [getParentWidth(parentSize), getParentHeight(parentSize),]);
|
|
524942
524943
|
if (currentParentSize === 1) {
|
|
524943
524944
|
return children
|
|
524944
524945
|
? /* @__PURE__ */ (0, jsx_runtime_1.jsx)(react_8.Fragment, {
|
|
@@ -527594,6 +527595,10 @@ function supportsThemes(presetId, skin) {
|
|
|
527594
527595
|
}
|
|
527595
527596
|
return false;
|
|
527596
527597
|
}
|
|
527598
|
+
function useIsStaticRenderer() {
|
|
527599
|
+
const currentTarget = RenderTarget.current();
|
|
527600
|
+
return currentTarget === RenderTarget.canvas || currentTarget === RenderTarget.export;
|
|
527601
|
+
}
|
|
527597
527602
|
var asRecord = (object) => object;
|
|
527598
527603
|
function memoize(fn) {
|
|
527599
527604
|
const cache2 = Object.create(Object.prototype);
|
|
@@ -527914,7 +527919,7 @@ function htmlElementAsMotionComponent(asElem) {
|
|
|
527914
527919
|
return asElem && asElem !== 'search' && asElem !== 'slot' && asElem !== 'template' ? motion[asElem] : motion['div'];
|
|
527915
527920
|
}
|
|
527916
527921
|
var import_process = __toESM(require_browser(), 1);
|
|
527917
|
-
var safeNavigator = typeof
|
|
527922
|
+
var safeNavigator = typeof __unframerNavigator2 !== 'undefined' ? __unframerNavigator2 : void 0;
|
|
527918
527923
|
var isBrowser2 = () => typeof document === 'object';
|
|
527919
527924
|
var isWebKit = () => {
|
|
527920
527925
|
var _a;
|
|
@@ -529038,9 +529043,9 @@ function useStyleAndRect(props) {
|
|
|
529038
529043
|
...defaultStyle,
|
|
529039
529044
|
};
|
|
529040
529045
|
}
|
|
529041
|
-
const
|
|
529046
|
+
const isRenderingStaticContent = useIsStaticRenderer();
|
|
529042
529047
|
if (props.positionSticky) {
|
|
529043
|
-
if (!
|
|
529048
|
+
if (!isRenderingStaticContent || inCodeComponent) {
|
|
529044
529049
|
resultStyle.position = 'sticky';
|
|
529045
529050
|
resultStyle.willChange = 'transform';
|
|
529046
529051
|
resultStyle.zIndex = 1;
|
|
@@ -529050,7 +529055,7 @@ function useStyleAndRect(props) {
|
|
|
529050
529055
|
resultStyle.left = props.positionStickyLeft;
|
|
529051
529056
|
}
|
|
529052
529057
|
}
|
|
529053
|
-
else if (
|
|
529058
|
+
else if (isRenderingStaticContent && (props.positionFixed || props.positionAbsolute)) {
|
|
529054
529059
|
resultStyle.position = 'absolute';
|
|
529055
529060
|
}
|
|
529056
529061
|
if ('rotate' in resultStyle && resultStyle.rotate === void 0) {
|
|
@@ -529529,8 +529534,6 @@ var SharedIntersectionObserver = class {
|
|
|
529529
529534
|
};
|
|
529530
529535
|
var SharedIntersectionObserverContext = /* @__PURE__ */ (0, react_1.createContext)(/* @__PURE__ */ new Map());
|
|
529531
529536
|
function useSharedIntersectionObserver(ref, callback, options) {
|
|
529532
|
-
if (typeof IntersectionObserver === 'undefined')
|
|
529533
|
-
return;
|
|
529534
529537
|
const key7 = useConstant2(() => `${options.rootMargin}`);
|
|
529535
529538
|
const observers2 = (0, react_2.useContext)(SharedIntersectionObserverContext);
|
|
529536
529539
|
const { enabled, } = options;
|
|
@@ -535591,9 +535594,7 @@ function useUpdateScrollOffset(ref, side, offset, cancelEmulatedTouchScrollAnima
|
|
|
535591
535594
|
cancelEmulatedTouchScrollAnimation == null ? void 0 : cancelEmulatedTouchScrollAnimation();
|
|
535592
535595
|
element[side] = Math.abs(offset);
|
|
535593
535596
|
}
|
|
535594
|
-
},
|
|
535595
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
535596
|
-
[offset,]);
|
|
535597
|
+
}, [offset,]);
|
|
535597
535598
|
}
|
|
535598
535599
|
var NativeScroll = /* @__PURE__ */ react_11.default.forwardRef(function NativeScroll2(props, forwardedRef) {
|
|
535599
535600
|
const { direction = 'vertical', scrollBarVisible = false, dragEnabled = true, contentOffsetX = 0, contentOffsetY = 0, contentWidth: _contentWidth, contentHeight: _contentHeight, children, resetOffset, onScroll, className: className2,
|
|
@@ -536034,10 +536035,6 @@ function useFXValues(values, enabled) {
|
|
|
536034
536035
|
}, [effect, enabled,]);
|
|
536035
536036
|
return effect;
|
|
536036
536037
|
}
|
|
536037
|
-
function useIsStaticRenderer() {
|
|
536038
|
-
const currentTarget = RenderTarget.current();
|
|
536039
|
-
return currentTarget === RenderTarget.canvas || currentTarget === RenderTarget.export;
|
|
536040
|
-
}
|
|
536041
536038
|
var loopOptionsKeys = /* @__PURE__ */ new Set(['loopEffectEnabled', 'loopTransition', 'loop', 'loopRepeatType', 'loopRepeatDelay',]);
|
|
536042
536039
|
var useDelay = () => {
|
|
536043
536040
|
const timeoutRef = (0, react_5.useRef)();
|
|
@@ -536449,7 +536446,8 @@ function useAnimationVariants({ opacity, targetOpacity, perspective: transformPe
|
|
|
536449
536446
|
opacity: targetOpacity,
|
|
536450
536447
|
}),
|
|
536451
536448
|
exit: exit ?? makeStyle(),
|
|
536452
|
-
}),
|
|
536449
|
+
}), // biome-ignore lint/correctness/useExhaustiveDependencies: `defaultStyles` makes this memo re-run on every render, but that appears to be fine.
|
|
536450
|
+
[animateVariant2, defaultStyles, enter, exit, opacity, targetOpacity, transformPerspective,]);
|
|
536453
536451
|
}
|
|
536454
536452
|
function useStyleAppearEffect(options, ref) {
|
|
536455
536453
|
const shouldReduceMotion = useReducedMotionConfig();
|
|
@@ -536491,9 +536489,7 @@ function useStyleAppearEffect(options, ref) {
|
|
|
536491
536489
|
}
|
|
536492
536490
|
});
|
|
536493
536491
|
}));
|
|
536494
|
-
},
|
|
536495
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
536496
|
-
[]);
|
|
536492
|
+
}, []);
|
|
536497
536493
|
const hasAnimatedOnce = options.animateOnce && playState.current.lastAppearState === true;
|
|
536498
536494
|
const animateWithIntersectionObserver = !options.targets && options.styleAppearEffectEnabled && !options.scrollDirection &&
|
|
536499
536495
|
!hasAnimatedOnce;
|
|
@@ -537049,8 +537045,14 @@ var SuspenseErrorBoundary = class extends react_7.Component {
|
|
|
537049
537045
|
};
|
|
537050
537046
|
var suspendPromise = /* @__PURE__ */ (() => typeof window !== 'undefined' ? new Promise(() => { }) : null)();
|
|
537051
537047
|
function Suspend() {
|
|
537052
|
-
if (typeof window === 'undefined' || window.__framer_STPD_OPT_OUT__)
|
|
537053
|
-
return
|
|
537048
|
+
if (typeof window === 'undefined' || window.__framer_STPD_OPT_OUT__) {
|
|
537049
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)('div', {
|
|
537050
|
+
hidden: true,
|
|
537051
|
+
dangerouslySetInnerHTML: {
|
|
537052
|
+
__html: '<!-- SuspenseThatPreservesDOM fallback rendered -->',
|
|
537053
|
+
},
|
|
537054
|
+
});
|
|
537055
|
+
}
|
|
537054
537056
|
throw suspendPromise;
|
|
537055
537057
|
}
|
|
537056
537058
|
function SuspenseThatPreservesDom({ children, }) {
|
|
@@ -537162,14 +537164,21 @@ var DeprecatedContainerErrorBoundary = class extends react_7.Component {
|
|
|
537162
537164
|
return hasError ? null : children;
|
|
537163
537165
|
}
|
|
537164
537166
|
};
|
|
537165
|
-
var
|
|
537166
|
-
|
|
537167
|
-
|
|
537168
|
-
}
|
|
537169
|
-
function
|
|
537170
|
-
|
|
537171
|
-
|
|
537172
|
-
|
|
537167
|
+
var ExternalComponentContext = /* @__PURE__ */ (() => react_11.default.createContext({
|
|
537168
|
+
level: 0,
|
|
537169
|
+
scopeId: void 0,
|
|
537170
|
+
}))();
|
|
537171
|
+
function useNearestExternalComponent() {
|
|
537172
|
+
return react_11.default.useContext(ExternalComponentContext);
|
|
537173
|
+
}
|
|
537174
|
+
function IsExternalComponent({ children, scopeId, }) {
|
|
537175
|
+
const level = react_11.default.useContext(ExternalComponentContext).level;
|
|
537176
|
+
const newValue = react_11.default.useMemo(() => ({
|
|
537177
|
+
level: level + 1,
|
|
537178
|
+
scopeId,
|
|
537179
|
+
}), [level, scopeId,]);
|
|
537180
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(ExternalComponentContext.Provider, {
|
|
537181
|
+
value: newValue,
|
|
537173
537182
|
children,
|
|
537174
537183
|
});
|
|
537175
537184
|
}
|
|
@@ -537186,27 +537195,32 @@ function getErrorMessageForOverride(scopeId, nodeId) {
|
|
|
537186
537195
|
function getErrorMessageFor(element, scopeId, nodeId) {
|
|
537187
537196
|
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.`;
|
|
537188
537197
|
}
|
|
537189
|
-
function shouldWrapComponentWithBoundary(
|
|
537190
|
-
const isLocalComponentInstance =
|
|
537191
|
-
|
|
537192
|
-
|
|
537193
|
-
|
|
537194
|
-
//
|
|
537195
|
-
|
|
537196
|
-
|
|
537197
|
-
|
|
537198
|
-
return (
|
|
537199
|
-
}
|
|
537200
|
-
function
|
|
537201
|
-
|
|
537202
|
-
|
|
537203
|
-
|
|
537204
|
-
|
|
537205
|
-
|
|
537206
|
-
|
|
537207
|
-
//
|
|
537208
|
-
|
|
537209
|
-
|
|
537198
|
+
function shouldWrapComponentWithBoundary(scopeIdOfThisComponent, scopeIdOfNearestExternalComponent, externalComponentLevel, isAuthoredByUser, isExternalComponent, inComponentSlot) {
|
|
537199
|
+
const isLocalComponentInstance = isNodeLocalToProject(scopeIdOfThisComponent, scopeIdOfNearestExternalComponent, externalComponentLevel, inComponentSlot);
|
|
537200
|
+
return (
|
|
537201
|
+
// case 1: all (local instances) of (local) (code components)
|
|
537202
|
+
isLocalComponentInstance && !isExternalComponent && isAuthoredByUser ||
|
|
537203
|
+
// case 2: all (local instances) of (external components)
|
|
537204
|
+
isLocalComponentInstance && isExternalComponent);
|
|
537205
|
+
}
|
|
537206
|
+
function shouldWrapOverrideWithBoundary(scopeIdOfNodeWithOverride, scopeIdOfNearestExternalComponent, externalComponentLevel, inComponentSlot) {
|
|
537207
|
+
return isNodeLocalToProject(scopeIdOfNodeWithOverride, scopeIdOfNearestExternalComponent, externalComponentLevel, inComponentSlot);
|
|
537208
|
+
}
|
|
537209
|
+
function isNodeLocalToProject(scopeIdOfThisNode, scopeIdOfNearestExternalComponent, externalComponentLevel, inComponentSlot) {
|
|
537210
|
+
if (externalComponentLevel === 0)
|
|
537211
|
+
return true;
|
|
537212
|
+
const nodeIsDefinedInSameScopeAsExternalComponent = scopeIdOfThisNode === scopeIdOfNearestExternalComponent;
|
|
537213
|
+
if (
|
|
537214
|
+
// We know a component instance is local when it’s nested inside one external component,
|
|
537215
|
+
externalComponentLevel === 1 &&
|
|
537216
|
+
// and it lives in a slot,
|
|
537217
|
+
inComponentSlot &&
|
|
537218
|
+
// and it’s a slot of *that sole external component* (and not some other local component
|
|
537219
|
+
// with slots that lives inside the external component).
|
|
537220
|
+
nodeIsDefinedInSameScopeAsExternalComponent) {
|
|
537221
|
+
return true;
|
|
537222
|
+
}
|
|
537223
|
+
return false;
|
|
537210
537224
|
}
|
|
537211
537225
|
var ContainerInner = /* @__PURE__ */ react_11.default.forwardRef(({ children, layoutId, as, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot, ...props }, ref) => {
|
|
537212
537226
|
const outerLayoutId = useConstant2(() => layoutId ? `${layoutId}-container` : void 0);
|
|
@@ -537263,7 +537277,7 @@ var SmartComponentScopedContainer = /* @__PURE__ */ react_11.default.forwardRef(
|
|
|
537263
537277
|
});
|
|
537264
537278
|
exports.SmartComponentScopedContainer = SmartComponentScopedContainer;
|
|
537265
537279
|
function useWrapWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, isExternalComponent, inComponentSlot) {
|
|
537266
|
-
const
|
|
537280
|
+
const nearestExternalComponent = useNearestExternalComponent();
|
|
537267
537281
|
if (
|
|
537268
537282
|
// Those props will either be all undefined, which means the Container wasn’t codegenned yet,
|
|
537269
537283
|
// and we should use the old ContainerErrorBoundary –
|
|
@@ -537273,7 +537287,7 @@ function useWrapWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, is
|
|
|
537273
537287
|
children,
|
|
537274
537288
|
});
|
|
537275
537289
|
}
|
|
537276
|
-
const shouldWrapWithBoundary = shouldWrapComponentWithBoundary(
|
|
537290
|
+
const shouldWrapWithBoundary = shouldWrapComponentWithBoundary(scopeId, nearestExternalComponent.scopeId, nearestExternalComponent.level, isAuthoredByUser ?? false, isExternalComponent ?? false, inComponentSlot ?? false);
|
|
537277
537291
|
if (shouldWrapWithBoundary) {
|
|
537278
537292
|
children = /* @__PURE__ */ (0, jsx_runtime_1.jsx)(CodeComponentBoundary, {
|
|
537279
537293
|
errorMessage: getErrorMessageForComponent(scopeId, nodeId),
|
|
@@ -537283,6 +537297,7 @@ function useWrapWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, is
|
|
|
537283
537297
|
}
|
|
537284
537298
|
if (isExternalComponent) {
|
|
537285
537299
|
children = /* @__PURE__ */ (0, jsx_runtime_1.jsx)(IsExternalComponent, {
|
|
537300
|
+
scopeId,
|
|
537286
537301
|
children,
|
|
537287
537302
|
});
|
|
537288
537303
|
}
|
|
@@ -538254,6 +538269,8 @@ var GracefullyDegradingErrorBoundary = class extends react_7.Component {
|
|
|
538254
538269
|
error: void 0,
|
|
538255
538270
|
});
|
|
538256
538271
|
__publicField(this, 'message', 'Made UI non-interactive due to an error');
|
|
538272
|
+
__publicField(this, 'messageFatal', 'Fatal error');
|
|
538273
|
+
__publicField(this, 'messageUser', 'Please check any custom code or code overrides');
|
|
538257
538274
|
__publicField(this, 'messageReport', 'If you are the author of this website, please report this issue to the Framer team via https://www.framer.community/');
|
|
538258
538275
|
}
|
|
538259
538276
|
static getDerivedStateFromError(error) {
|
|
@@ -538262,19 +538279,19 @@ var GracefullyDegradingErrorBoundary = class extends react_7.Component {
|
|
|
538262
538279
|
};
|
|
538263
538280
|
}
|
|
538264
538281
|
componentDidCatch(error) {
|
|
538265
|
-
var _a, _b;
|
|
538282
|
+
var _a, _b, _c;
|
|
538266
538283
|
window.__framer_hadFatalError = true;
|
|
538267
538284
|
if ('cause' in error) {
|
|
538268
538285
|
error = error.cause;
|
|
538269
538286
|
}
|
|
538270
|
-
console.error(`${this.message} (see above). ${this.messageReport}.`);
|
|
538287
|
+
console.error(`${isBot(__unframerNavigator2.userAgent) ? this.message : this.messageFatal} (see above). ${((_a = this.context) == null ? void 0 : _a.codeBoundaries) ? this.messageUser : this.messageReport}.`);
|
|
538271
538288
|
const sampleRate = Math.random();
|
|
538272
|
-
if (!((
|
|
538289
|
+
if (!((_b = this.context) == null ? void 0 : _b.codeBoundaries) && sampleRate > 0.01)
|
|
538273
538290
|
return;
|
|
538274
538291
|
if (sampleRate > 0.25)
|
|
538275
538292
|
return;
|
|
538276
538293
|
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
538277
|
-
(
|
|
538294
|
+
(_c = window.__framer_events) == null ? void 0 : _c.push(['published_site_load_error', {
|
|
538278
538295
|
message: String(error),
|
|
538279
538296
|
stack,
|
|
538280
538297
|
},]);
|
|
@@ -538287,7 +538304,7 @@ var GracefullyDegradingErrorBoundary = class extends react_7.Component {
|
|
|
538287
538304
|
const unwrappedError = 'cause' in error ? error.cause : error;
|
|
538288
538305
|
const closingHTMLComment = /-->/gu;
|
|
538289
538306
|
const closingHTMLCommentReplacement = '--!>';
|
|
538290
|
-
const dom = isBot(
|
|
538307
|
+
const dom = isBot(__unframerNavigator2.userAgent) ? ((_a = document.getElementById('main')) == null ? void 0 : _a.innerHTML) || '' : // @FIXME: We should have a UI for fatal error recovery.
|
|
538291
538308
|
// 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.
|
|
538292
538309
|
// We do render instead of throwing, so that:
|
|
538293
538310
|
// - `componentDidCatch` runs (if we throw here, it does not)
|
|
@@ -538514,8 +538531,8 @@ var preloadedRoutes = /* @__PURE__ */ new Set();
|
|
|
538514
538531
|
var routeToNodesInViewport = /* @__PURE__ */ new Map();
|
|
538515
538532
|
function getObserveRouteForPreloadingFn() {
|
|
538516
538533
|
var _a;
|
|
538517
|
-
const connection =
|
|
538518
|
-
const lowDeviceMemory =
|
|
538534
|
+
const connection = __unframerNavigator2.connection || __unframerNavigator2.mozConnection || __unframerNavigator2.webkitConnection || {};
|
|
538535
|
+
const lowDeviceMemory = __unframerNavigator2.deviceMemory && __unframerNavigator2.deviceMemory > LOW_MEMORY_THRESHOLD;
|
|
538519
538536
|
let effectiveType, preloadDisabled, maxPreloadAmount;
|
|
538520
538537
|
function updateConnection() {
|
|
538521
538538
|
effectiveType = connection.effectiveType || '';
|
|
@@ -539021,7 +539038,7 @@ function useReplaceNestedLinks(nodeId, href, propsAddedByLink) {
|
|
|
539021
539038
|
return;
|
|
539022
539039
|
event.preventDefault();
|
|
539023
539040
|
event.stopPropagation();
|
|
539024
|
-
const isAppleDevice = /Mac|iPod|iPhone|iPad/u.test(
|
|
539041
|
+
const isAppleDevice = /Mac|iPod|iPhone|iPad/u.test(__unframerNavigator2.userAgent);
|
|
539025
539042
|
if (isAppleDevice ? event.metaKey : event.ctrlKey) {
|
|
539026
539043
|
openExternalLink(propsAddedByLink.href, '', '_blank');
|
|
539027
539044
|
return;
|
|
@@ -545252,12 +545269,12 @@ function useHydratedBreakpointVariants(initial, mediaQueries, hydratedWithInitia
|
|
|
545252
545269
|
});
|
|
545253
545270
|
}
|
|
545254
545271
|
}
|
|
545255
|
-
}, [instantTransition, forceUpdate,
|
|
545272
|
+
}, [instantTransition, forceUpdate,]);
|
|
545256
545273
|
useIsomorphicLayoutEffect2(() => {
|
|
545257
545274
|
if (!onCanvas)
|
|
545258
545275
|
return;
|
|
545259
545276
|
setActiveVariantInstant(initial);
|
|
545260
|
-
}, [
|
|
545277
|
+
}, [initial, setActiveVariantInstant,]);
|
|
545261
545278
|
useIsomorphicLayoutEffect2(() => {
|
|
545262
545279
|
if (!hydratedWithInitial || isInitialNavigation !== true)
|
|
545263
545280
|
return;
|
|
@@ -545480,7 +545497,7 @@ var GamepadContext = /* @__PURE__ */ react_11.default.createContext(gamepadPolle
|
|
|
545480
545497
|
exports.GamepadContext = GamepadContext;
|
|
545481
545498
|
function getGamepadInputs() {
|
|
545482
545499
|
let firstConnectedGamepad = null;
|
|
545483
|
-
const gamepads =
|
|
545500
|
+
const gamepads = __unframerNavigator2.getGamepads();
|
|
545484
545501
|
for (const gamepad of gamepads) {
|
|
545485
545502
|
if (!gamepad)
|
|
545486
545503
|
continue;
|
|
@@ -546218,8 +546235,8 @@ function withCodeBoundaryForOverrides(Component18, { scopeId, nodeId, override,
|
|
|
546218
546235
|
const appliedOverride = tryToApplyOverride(Component18, override);
|
|
546219
546236
|
let hasErrorBeenLogged = false;
|
|
546220
546237
|
function CodeBoundaryForOverrides(props, ref) {
|
|
546221
|
-
const
|
|
546222
|
-
const shouldWrapWithBoundary = shouldWrapOverrideWithBoundary(
|
|
546238
|
+
const nearestExternalComponent = useNearestExternalComponent();
|
|
546239
|
+
const shouldWrapWithBoundary = shouldWrapOverrideWithBoundary(scopeId, nearestExternalComponent.scopeId, nearestExternalComponent.level, inComponentSlot ?? false);
|
|
546223
546240
|
if (shouldWrapWithBoundary) {
|
|
546224
546241
|
if (appliedOverride.status === 'success') {
|
|
546225
546242
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(CodeComponentBoundary, {
|
|
@@ -547222,7 +547239,9 @@ function getCustomFontName(fileName, properties) {
|
|
|
547222
547239
|
const isAssetVariableFont = Array.isArray(font.variationAxes);
|
|
547223
547240
|
if (isAssetVariableFont && fontFamily.toLowerCase().includes('variable'))
|
|
547224
547241
|
return fontFamily;
|
|
547225
|
-
const variant = isAssetVariableFont ? 'Variable' : font.preferredSubFamily || font.fontSubFamily;
|
|
547242
|
+
const variant = isAssetVariableFont ? 'Variable' : (font.preferredSubFamily || font.fontSubFamily).trim();
|
|
547243
|
+
if (variant === '')
|
|
547244
|
+
return fontFamily;
|
|
547226
547245
|
return `${fontFamily} ${variant}`;
|
|
547227
547246
|
}
|
|
547228
547247
|
var CustomFontSource = class {
|
|
@@ -548827,12 +548846,14 @@ var styles = /* @__PURE__ */ (() => [
|
|
|
548827
548846
|
backgroundColor: 'transparent',
|
|
548828
548847
|
outline: 'none',
|
|
548829
548848
|
}),
|
|
548849
|
+
css(`.${textInputWrapperClassName} .${inputClassName}::-webkit-datetime-edit`, {
|
|
548850
|
+
// Prevent browsers from improvising the date/time placeholder height.
|
|
548851
|
+
height: css.variable('--framer-input-font-line-height'),
|
|
548852
|
+
}),
|
|
548830
548853
|
css(`.${textInputWrapperClassName} .${inputClassName}.${emptyValueClassName}::-webkit-datetime-edit`, {
|
|
548831
548854
|
color: css.variable('--framer-input-placeholder-color'),
|
|
548832
548855
|
// This tells safari to use the color for the shadow dom elements.
|
|
548833
548856
|
'-webkit-text-fill-color': css.variable('--framer-input-placeholder-color'),
|
|
548834
|
-
// Prevent browsers from improvising the date/time placeholder height.
|
|
548835
|
-
height: css.variable('--framer-input-font-line-height'),
|
|
548836
548857
|
overflow: 'visible',
|
|
548837
548858
|
}),
|
|
548838
548859
|
css(`.${textInputWrapperClassName} .${inputClassName}[type="date"]::before, .${textInputWrapperClassName} .${inputClassName}[type="time"]::before`, {
|
|
@@ -552351,19 +552372,11 @@ function useInitialRouteComponent(routes, homeNodeId) {
|
|
|
552351
552372
|
var package_default = {
|
|
552352
552373
|
name: 'framer',
|
|
552353
552374
|
version: '2.4.1',
|
|
552354
|
-
|
|
552375
|
+
private: true,
|
|
552355
552376
|
type: 'module',
|
|
552356
|
-
exports: {
|
|
552357
|
-
'.': './build/index.js',
|
|
552358
|
-
'./package.json': './package.json',
|
|
552359
|
-
'./*': './build/*',
|
|
552360
|
-
},
|
|
552361
|
-
files: ['build', 'CHANGELOG.md', 'README.md', 'LICENSE.md', 'postinstall.cjs',],
|
|
552362
|
-
types: './build/index.d.ts',
|
|
552363
552377
|
author: 'Framer',
|
|
552364
552378
|
license: 'MIT',
|
|
552365
552379
|
scripts: {
|
|
552366
|
-
prepublishOnly: 'make build',
|
|
552367
552380
|
coverage: 'yarn :jest --coverage',
|
|
552368
552381
|
lint: 'yarn :eslint ./src --ext .ts,.tsx --format codeframe --quiet --cache',
|
|
552369
552382
|
'lint:ci': 'yarn :eslint ./src --ext .ts,.tsx --format codeframe --quiet --cache --cache-strategy content',
|
|
@@ -552415,20 +552428,6 @@ var package_default = {
|
|
|
552415
552428
|
tsdoc: {
|
|
552416
552429
|
tsdocFlavor: 'AEDoc',
|
|
552417
552430
|
},
|
|
552418
|
-
framer: {
|
|
552419
|
-
components: [{
|
|
552420
|
-
name: 'Scroll',
|
|
552421
|
-
children: true,
|
|
552422
|
-
properties: [{
|
|
552423
|
-
key: 'direction',
|
|
552424
|
-
title: 'Direction',
|
|
552425
|
-
kind: 'enum',
|
|
552426
|
-
options: ['horizontal', 'vertical', 'both',],
|
|
552427
|
-
},],
|
|
552428
|
-
}, {
|
|
552429
|
-
name: 'Page',
|
|
552430
|
-
},],
|
|
552431
|
-
},
|
|
552432
552431
|
browserslist: ['extends @framer/browserslist-config/sites',],
|
|
552433
552432
|
};
|
|
552434
552433
|
var version = /* @__PURE__ */ (() => package_default.version)();
|