unframer 3.0.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1 -0
- package/dist/cli.js.map +1 -1
- package/dist/cli.test.js +14 -6
- package/dist/cli.test.js.map +1 -1
- package/dist/example-code.test.js +1 -1
- package/dist/exporter.d.ts +0 -14
- package/dist/exporter.d.ts.map +1 -1
- package/dist/exporter.js +13 -186
- package/dist/exporter.js.map +1 -1
- package/dist/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.d.ts +115 -0
- package/dist/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.d.ts.map +1 -0
- package/dist/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.js +8 -0
- package/dist/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.js.map +1 -0
- package/dist/framer-chunks/fontshare-622CVMZZ-HFPH543A.d.ts +781 -0
- package/dist/framer-chunks/fontshare-622CVMZZ-HFPH543A.d.ts.map +1 -0
- package/dist/framer-chunks/fontshare-622CVMZZ-HFPH543A.js +8 -0
- package/dist/framer-chunks/fontshare-622CVMZZ-HFPH543A.js.map +1 -0
- package/dist/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.d.ts +634 -0
- package/dist/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.d.ts.map +1 -0
- package/dist/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.js +8 -0
- package/dist/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.js.map +1 -0
- package/dist/framer-chunks/google-3ASCFEEO-3R47BR2A.d.ts +1561 -0
- package/dist/framer-chunks/google-3ASCFEEO-3R47BR2A.d.ts.map +1 -0
- package/dist/framer-chunks/google-3ASCFEEO-3R47BR2A.js +8 -0
- package/dist/framer-chunks/google-3ASCFEEO-3R47BR2A.js.map +1 -0
- package/dist/framer-chunks/google-C62SNV32-LCI4F7VO.d.ts +3546 -0
- package/dist/framer-chunks/google-C62SNV32-LCI4F7VO.d.ts.map +1 -0
- package/dist/framer-chunks/google-C62SNV32-LCI4F7VO.js +8 -0
- package/dist/framer-chunks/google-C62SNV32-LCI4F7VO.js.map +1 -0
- package/dist/framer-chunks/google-FDB6LUFQ-PFSUZGKF.d.ts +10258 -0
- package/dist/framer-chunks/google-FDB6LUFQ-PFSUZGKF.d.ts.map +1 -0
- package/dist/framer-chunks/google-FDB6LUFQ-PFSUZGKF.js +8 -0
- package/dist/framer-chunks/google-FDB6LUFQ-PFSUZGKF.js.map +1 -0
- package/dist/framer.js +1230 -223
- package/dist/generated/api-client.js.map +1 -1
- package/dist/typescript.d.ts +20 -0
- package/dist/typescript.d.ts.map +1 -0
- package/dist/typescript.js +169 -0
- package/dist/typescript.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/cli.js +1 -0
- package/esm/cli.js.map +1 -1
- package/esm/cli.test.js +9 -1
- package/esm/cli.test.js.map +1 -1
- package/esm/example-code.test.js +1 -1
- package/esm/exporter.d.ts +0 -14
- package/esm/exporter.d.ts.map +1 -1
- package/esm/exporter.js +10 -181
- package/esm/exporter.js.map +1 -1
- package/esm/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.d.ts +115 -0
- package/esm/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.d.ts.map +1 -0
- package/esm/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.js +5 -0
- package/esm/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.js.map +1 -0
- package/esm/framer-chunks/fontshare-622CVMZZ-HFPH543A.d.ts +781 -0
- package/esm/framer-chunks/fontshare-622CVMZZ-HFPH543A.d.ts.map +1 -0
- package/esm/framer-chunks/fontshare-622CVMZZ-HFPH543A.js +5 -0
- package/esm/framer-chunks/fontshare-622CVMZZ-HFPH543A.js.map +1 -0
- package/esm/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.d.ts +634 -0
- package/esm/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.d.ts.map +1 -0
- package/esm/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.js +5 -0
- package/esm/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.js.map +1 -0
- package/esm/framer-chunks/google-3ASCFEEO-3R47BR2A.d.ts +1561 -0
- package/esm/framer-chunks/google-3ASCFEEO-3R47BR2A.d.ts.map +1 -0
- package/esm/framer-chunks/google-3ASCFEEO-3R47BR2A.js +5 -0
- package/esm/framer-chunks/google-3ASCFEEO-3R47BR2A.js.map +1 -0
- package/esm/framer-chunks/google-C62SNV32-LCI4F7VO.d.ts +3546 -0
- package/esm/framer-chunks/google-C62SNV32-LCI4F7VO.d.ts.map +1 -0
- package/esm/framer-chunks/google-C62SNV32-LCI4F7VO.js +5 -0
- package/esm/framer-chunks/google-C62SNV32-LCI4F7VO.js.map +1 -0
- package/esm/framer-chunks/google-FDB6LUFQ-PFSUZGKF.d.ts +10258 -0
- package/esm/framer-chunks/google-FDB6LUFQ-PFSUZGKF.d.ts.map +1 -0
- package/esm/framer-chunks/google-FDB6LUFQ-PFSUZGKF.js +5 -0
- package/esm/framer-chunks/google-FDB6LUFQ-PFSUZGKF.js.map +1 -0
- package/esm/framer.js +1230 -224
- package/esm/generated/api-client.js.map +1 -1
- package/esm/typescript.d.ts +20 -0
- package/esm/typescript.d.ts.map +1 -0
- package/esm/typescript.js +165 -0
- package/esm/typescript.js.map +1 -0
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/package.json +6 -3
- package/src/cli.test.ts +8 -1
- package/src/cli.ts +1 -1
- package/src/example-code.test.ts +1 -1
- package/src/exporter.ts +12 -202
- package/src/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.js +7 -0
- package/src/framer-chunks/fontshare-622CVMZZ-HFPH543A.js +7 -0
- package/src/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.js +7 -0
- package/src/framer-chunks/google-3ASCFEEO-3R47BR2A.js +7 -0
- package/src/framer-chunks/google-C62SNV32-LCI4F7VO.js +7 -0
- package/src/framer-chunks/google-FDB6LUFQ-PFSUZGKF.js +7 -0
- package/src/framer.js +1170 -215
- package/src/generated/api-client.d.ts +790 -1042
- package/src/generated/api-client.js +5 -5
- package/src/styles/framer.css +1963 -0
- package/src/styles/reset.css +33 -0
- package/src/typescript.ts +196 -0
- package/src/version.ts +1 -1
- package/dist/generated/api-client.test.d.ts +0 -2
- package/dist/generated/api-client.test.d.ts.map +0 -1
- package/dist/generated/api-client.test.js +0 -3
- package/dist/generated/api-client.test.js.map +0 -1
- package/esm/generated/api-client.test.d.ts +0 -1
- package/esm/generated/api-client.test.d.ts.map +0 -1
- package/esm/generated/api-client.test.js +0 -2
- package/esm/generated/api-client.test.js.map +0 -1
- package/src/generated/api-client.d.ts.map +0 -1
- package/src/generated/api-client.js.map +0 -1
- package/src/generated/api-client.test.d.ts +0 -1
- package/src/generated/api-client.test.js +0 -1
package/esm/framer.js
CHANGED
|
@@ -10499,7 +10499,7 @@ function stagger(duration = 0.1, { startDelay = 0, from = 0, ease: ease2, } = {}
|
|
|
10499
10499
|
return startDelay + delay2;
|
|
10500
10500
|
};
|
|
10501
10501
|
}
|
|
10502
|
-
// /:https://app.framerstatic.com/framer.
|
|
10502
|
+
// /:https://app.framerstatic.com/framer.Q6KVMOJP.mjs
|
|
10503
10503
|
import { lazy as ReactLazy, } from 'react';
|
|
10504
10504
|
import React4 from 'react';
|
|
10505
10505
|
import { startTransition as startTransition2, } from 'react';
|
|
@@ -12917,7 +12917,7 @@ function usePopStateHandler(currentRouteId, setCurrentRouteId) {
|
|
|
12917
12917
|
updateCanonicalURL(window.location.href);
|
|
12918
12918
|
}, [currentRouteId, monitorNextPaintAfterRender, setCurrentRouteId, startViewTransition2,]);
|
|
12919
12919
|
const traversalHandler = useCallback((event) => {
|
|
12920
|
-
if (event.navigationType !== 'traverse')
|
|
12920
|
+
if (event.navigationType !== 'traverse' || !event.canIntercept)
|
|
12921
12921
|
return;
|
|
12922
12922
|
event.intercept({
|
|
12923
12923
|
async handler() {
|
|
@@ -13042,7 +13042,7 @@ function useNativeLoadingSpinner() {
|
|
|
13042
13042
|
const navigationPromise = useRef3(Promise.resolve());
|
|
13043
13043
|
const navigationController = useRef3();
|
|
13044
13044
|
const navigateListener = useCallback((navigateEvent) => {
|
|
13045
|
-
if (navigateEvent.navigationType === 'traverse')
|
|
13045
|
+
if (navigateEvent.navigationType === 'traverse' || !navigateEvent.canIntercept)
|
|
13046
13046
|
return;
|
|
13047
13047
|
const controller = navigationController.current;
|
|
13048
13048
|
controller == null ? void 0 : controller.signal.addEventListener('abort', () => {
|
|
@@ -13066,6 +13066,38 @@ function useNativeLoadingSpinner() {
|
|
|
13066
13066
|
});
|
|
13067
13067
|
}, [navigateListener,]);
|
|
13068
13068
|
}
|
|
13069
|
+
var nonSlugCharactersRegExp = /[^\p{Letter}\p{Number}()]+/gu;
|
|
13070
|
+
var trimSlugRegExp = /^-+|-+$/gu;
|
|
13071
|
+
function slugify(value) {
|
|
13072
|
+
return value.toLowerCase().replace(nonSlugCharactersRegExp, '-').replace(trimSlugRegExp, '');
|
|
13073
|
+
}
|
|
13074
|
+
var NodeIdContext = /* @__PURE__ */ React4.createContext(null);
|
|
13075
|
+
function useTracking() {
|
|
13076
|
+
const router = useRouter();
|
|
13077
|
+
const nodeId = useContext(NodeIdContext);
|
|
13078
|
+
return useCallback((trackingId) => {
|
|
13079
|
+
var _a;
|
|
13080
|
+
if (!((_a = router.pageviewEventData) == null ? void 0 : _a.current))
|
|
13081
|
+
return;
|
|
13082
|
+
if (slugify(trackingId) !== trackingId) {
|
|
13083
|
+
throw new Error(`Invalid tracking ID: ${trackingId}`);
|
|
13084
|
+
}
|
|
13085
|
+
if (router.pageviewEventData.current instanceof Promise) {
|
|
13086
|
+
void router.pageviewEventData.current.then((eventData) => sendCustomTrackingEvent(eventData, nodeId, trackingId));
|
|
13087
|
+
}
|
|
13088
|
+
else {
|
|
13089
|
+
sendCustomTrackingEvent(router.pageviewEventData.current, nodeId, trackingId);
|
|
13090
|
+
}
|
|
13091
|
+
}, [router, nodeId,]);
|
|
13092
|
+
}
|
|
13093
|
+
function sendCustomTrackingEvent(eventData, nodeId, trackingId) {
|
|
13094
|
+
sendTrackingEvent('published_site_custom_event', {
|
|
13095
|
+
...eventData,
|
|
13096
|
+
nodeId,
|
|
13097
|
+
// Don't attach a tracking ID if it's empty
|
|
13098
|
+
trackingId: trackingId || null,
|
|
13099
|
+
}, 'eager');
|
|
13100
|
+
}
|
|
13069
13101
|
function useRouteAnchor(routeId, { elementId, hash: linkHash, } = {}) {
|
|
13070
13102
|
const { navigate, currentPathVariables, preserveQueryParams, siteCanonicalURL, } = useRouter();
|
|
13071
13103
|
const route = useRoute(routeId);
|
|
@@ -22018,6 +22050,7 @@ var isPropValid = /* @__PURE__ */ memoize((prop) => reactPropsRegex.test(prop) |
|
|
|
22018
22050
|
/* Z+1 */
|
|
22019
22051
|
);
|
|
22020
22052
|
var LibraryFeaturesContext = /* @__PURE__ */ React4.createContext(void 0);
|
|
22053
|
+
LibraryFeaturesContext.displayName = 'LibraryFeaturesContext';
|
|
22021
22054
|
var LibraryFeaturesProvider = /* @__PURE__ */ (() => LibraryFeaturesContext.Provider)();
|
|
22022
22055
|
var useLibraryFeatures = () => {
|
|
22023
22056
|
const context = React4.useContext(LibraryFeaturesContext);
|
|
@@ -22032,17 +22065,22 @@ var mockWithoutWarning = () => {
|
|
|
22032
22065
|
return () => { };
|
|
22033
22066
|
};
|
|
22034
22067
|
var implementation = {
|
|
22035
|
-
// We need a default implementation for useImageSource and useImageElement as it is used for
|
|
22036
|
-
// The default value is used for HTML
|
|
22068
|
+
// We need a default implementation for useImageSource and useImageElement as it is used for
|
|
22069
|
+
// rendering image backgrounds which would break otherwise. The default value is used for HTML
|
|
22070
|
+
// export and when using the library without Framer.
|
|
22071
|
+
imagePlaceholderSvg: `<svg xmlns="http://www.w3.org/2000/svg" width="126" height="126"><path id="a" d="M126 0v21.584L21.584 126H0v-17.585L108.415 0H126Zm0 108.414V126h-17.586L126 108.414Zm0-84v39.171L63.585 126H24.414L126 24.414Zm0 42v39.17L105.584 126h-39.17L126 66.414ZM105.586 0 0 105.586V66.415L66.415 0h39.171Zm-42 0L0 63.586V24.415L24.415 0h39.171Zm-42 0L0 21.586V0h21.586Z" fill="rgb(136, 136, 136, 0.2)" fill-rule="evenodd"/></svg>`,
|
|
22037
22072
|
useImageSource(image) {
|
|
22038
22073
|
return image.src ?? '';
|
|
22039
22074
|
},
|
|
22040
22075
|
useImageElement(image, rect, nodeId) {
|
|
22041
|
-
const
|
|
22042
|
-
|
|
22043
|
-
|
|
22044
|
-
element.
|
|
22045
|
-
|
|
22076
|
+
const src = runtime.useImageSource(image, rect, nodeId);
|
|
22077
|
+
return useMemo2(() => {
|
|
22078
|
+
const element = new Image();
|
|
22079
|
+
element.src = src;
|
|
22080
|
+
if (image.srcSet)
|
|
22081
|
+
element.srcset = image.srcSet;
|
|
22082
|
+
return element;
|
|
22083
|
+
}, [src, image.srcSet,]);
|
|
22046
22084
|
},
|
|
22047
22085
|
canRenderOptimizedCanvasImage() {
|
|
22048
22086
|
return false;
|
|
@@ -22077,14 +22115,12 @@ var wrapperStyle = {
|
|
|
22077
22115
|
left: 0,
|
|
22078
22116
|
};
|
|
22079
22117
|
function getPlaceholderStyle() {
|
|
22080
|
-
|
|
22118
|
+
return {
|
|
22081
22119
|
backgroundRepeat: 'repeat',
|
|
22082
22120
|
backgroundPosition: 'left top',
|
|
22083
|
-
backgroundSize: '
|
|
22084
|
-
backgroundImage: encodeSVGForCSS(
|
|
22085
|
-
opacity: 0.2,
|
|
22121
|
+
backgroundSize: '64px auto',
|
|
22122
|
+
backgroundImage: encodeSVGForCSS(runtime.imagePlaceholderSvg),
|
|
22086
22123
|
};
|
|
22087
|
-
return placeholderStyle;
|
|
22088
22124
|
}
|
|
22089
22125
|
function cssObjectFit(imageFit) {
|
|
22090
22126
|
switch (imageFit) {
|
|
@@ -30789,7 +30825,7 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
|
|
|
30789
30825
|
const shouldReduceMotion = useReducedMotionConfig();
|
|
30790
30826
|
const values = useConstant2(makeFXValues);
|
|
30791
30827
|
const mirrorStateRef = useRef3(false);
|
|
30792
|
-
const
|
|
30828
|
+
const delay3 = useDelay();
|
|
30793
30829
|
const animationPromiseRef = useRef3(null);
|
|
30794
30830
|
const animateValues = useCallback(async () => {
|
|
30795
30831
|
if (!loop)
|
|
@@ -30822,9 +30858,9 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
|
|
|
30822
30858
|
if (!loopEffectEnabled || !shouldRunRef.current)
|
|
30823
30859
|
return;
|
|
30824
30860
|
await animateValues();
|
|
30825
|
-
await
|
|
30861
|
+
await delay3(loopRepeatDelay ?? 0);
|
|
30826
30862
|
void animateLoop();
|
|
30827
|
-
}, [animateValues,
|
|
30863
|
+
}, [animateValues, delay3, loopEffectEnabled, loopRepeatDelay,]);
|
|
30828
30864
|
const start2 = useCallback(() => {
|
|
30829
30865
|
if (shouldRunRef.current)
|
|
30830
30866
|
return;
|
|
@@ -32033,12 +32069,15 @@ var ContainerInner = /* @__PURE__ */ React4.forwardRef(({ children, layoutId, as
|
|
|
32033
32069
|
ref,
|
|
32034
32070
|
children: /* @__PURE__ */ jsx3(ComponentContainerContext.Provider, {
|
|
32035
32071
|
value: true,
|
|
32036
|
-
children: /* @__PURE__ */ jsx3(
|
|
32037
|
-
|
|
32038
|
-
children: /* @__PURE__ */ jsx3(
|
|
32039
|
-
|
|
32040
|
-
|
|
32041
|
-
|
|
32072
|
+
children: /* @__PURE__ */ jsx3(NodeIdContext.Provider, {
|
|
32073
|
+
value: nodeId ?? null,
|
|
32074
|
+
children: /* @__PURE__ */ jsx3(AutomaticLayoutIds, {
|
|
32075
|
+
enabled: false,
|
|
32076
|
+
children: /* @__PURE__ */ jsx3(LayoutGroup, {
|
|
32077
|
+
id: layoutId ?? '',
|
|
32078
|
+
inherit: 'id',
|
|
32079
|
+
children: childrenWithCodeBoundary,
|
|
32080
|
+
}),
|
|
32042
32081
|
}),
|
|
32043
32082
|
}),
|
|
32044
32083
|
}),
|
|
@@ -32055,26 +32094,28 @@ var SmartComponentScopedContainer = /* @__PURE__ */ React4.forwardRef((props, re
|
|
|
32055
32094
|
const tagName = props.as ?? 'div';
|
|
32056
32095
|
if (props.rendersWithMotion) {
|
|
32057
32096
|
const Component17 = htmlElementAsMotionComponent(tagName);
|
|
32058
|
-
return /* @__PURE__ */ jsx3(
|
|
32059
|
-
|
|
32060
|
-
|
|
32061
|
-
|
|
32062
|
-
|
|
32097
|
+
return /* @__PURE__ */ jsx3(NodeIdContext.Provider, {
|
|
32098
|
+
value: nodeId ?? null,
|
|
32099
|
+
children: /* @__PURE__ */ jsx3(Component17, {
|
|
32100
|
+
...otherProps,
|
|
32101
|
+
ref,
|
|
32102
|
+
style: props.style,
|
|
32103
|
+
children: childrenWithCodeBoundary,
|
|
32104
|
+
}),
|
|
32063
32105
|
});
|
|
32064
32106
|
}
|
|
32065
32107
|
else {
|
|
32066
32108
|
const Component17 = tagName;
|
|
32067
32109
|
const { layoutId, layoutDependency, ...plainHTMLRenderableProps } = otherProps;
|
|
32068
|
-
return (
|
|
32069
|
-
|
|
32070
|
-
|
|
32071
|
-
|
|
32072
|
-
|
|
32073
|
-
|
|
32074
|
-
|
|
32075
|
-
|
|
32076
|
-
|
|
32077
|
-
}));
|
|
32110
|
+
return /* @__PURE__ */ jsx3(NodeIdContext.Provider, {
|
|
32111
|
+
value: nodeId ?? null,
|
|
32112
|
+
children: /* @__PURE__ */ jsx3(Component17, {
|
|
32113
|
+
...plainHTMLRenderableProps,
|
|
32114
|
+
ref,
|
|
32115
|
+
style: props.style,
|
|
32116
|
+
children: childrenWithCodeBoundary,
|
|
32117
|
+
}),
|
|
32118
|
+
});
|
|
32078
32119
|
}
|
|
32079
32120
|
});
|
|
32080
32121
|
var CustomCursorContext = /* @__PURE__ */ createContext({
|
|
@@ -32343,18 +32384,20 @@ var CustomCursorComponent = /* @__PURE__ */ memo2(function CustomCursorComponent
|
|
|
32343
32384
|
]);
|
|
32344
32385
|
if (!hasHoverCapability || !cursor || !Cursor)
|
|
32345
32386
|
return null;
|
|
32346
|
-
return /* @__PURE__ */ jsx3(
|
|
32347
|
-
|
|
32348
|
-
|
|
32349
|
-
|
|
32350
|
-
|
|
32351
|
-
|
|
32352
|
-
|
|
32353
|
-
|
|
32354
|
-
|
|
32355
|
-
|
|
32356
|
-
|
|
32357
|
-
|
|
32387
|
+
return /* @__PURE__ */ jsx3(Suspense2, {
|
|
32388
|
+
children: /* @__PURE__ */ jsx3(Cursor, {
|
|
32389
|
+
transformTemplate: transformTemplate2,
|
|
32390
|
+
style: {
|
|
32391
|
+
...staticCursorStyle,
|
|
32392
|
+
x,
|
|
32393
|
+
y,
|
|
32394
|
+
opacity,
|
|
32395
|
+
},
|
|
32396
|
+
globalTapTarget: true,
|
|
32397
|
+
variant: cursor == null ? void 0 : cursor.variant,
|
|
32398
|
+
ref: cursorRef,
|
|
32399
|
+
className: cursorComponentClassName,
|
|
32400
|
+
}),
|
|
32358
32401
|
});
|
|
32359
32402
|
});
|
|
32360
32403
|
function useCustomCursors(webPageCursors) {
|
|
@@ -33092,6 +33135,10 @@ var LazyValue = class _LazyValue {
|
|
|
33092
33135
|
static is(value) {
|
|
33093
33136
|
return value instanceof _LazyValue;
|
|
33094
33137
|
}
|
|
33138
|
+
get state() {
|
|
33139
|
+
var _a;
|
|
33140
|
+
return ((_a = this.status) == null ? void 0 : _a.type) ?? 'pending';
|
|
33141
|
+
}
|
|
33095
33142
|
/** Preload the value so it can be read() later. */
|
|
33096
33143
|
preload() {
|
|
33097
33144
|
if (this.status) {
|
|
@@ -33836,14 +33883,16 @@ function useTrackLinkClick({ nodeId, clickTrackingId, router, href, activeLocale
|
|
|
33836
33883
|
var _a, _b, _c, _d, _e;
|
|
33837
33884
|
if (!((_a = router.pageviewEventData) == null ? void 0 : _a.current))
|
|
33838
33885
|
return;
|
|
33839
|
-
const pageviewEventData = router.pageviewEventData.current
|
|
33886
|
+
const pageviewEventData = router.pageviewEventData.current instanceof Promise
|
|
33887
|
+
? await router.pageviewEventData.current
|
|
33888
|
+
: router.pageviewEventData.current;
|
|
33840
33889
|
const pageLink = isLinkToWebPage(href) ? href : linkFromFramerPageLink(href);
|
|
33841
33890
|
if (!isLinkToWebPage(pageLink)) {
|
|
33842
33891
|
return sendTrackingEvent('published_site_click', {
|
|
33843
33892
|
...pageviewEventData,
|
|
33844
33893
|
href: hrefAttribute ? makeUrlAbsolute(hrefAttribute) : null,
|
|
33845
33894
|
nodeId: nodeId ?? null,
|
|
33846
|
-
trackingId: clickTrackingId
|
|
33895
|
+
trackingId: clickTrackingId || null,
|
|
33847
33896
|
targetRoutePath: null,
|
|
33848
33897
|
targetWebPageId: null,
|
|
33849
33898
|
targetCollectionItemId: null,
|
|
@@ -34234,13 +34283,21 @@ function trackFormSubmit({ router, nodeId, submitTrackingId, }) {
|
|
|
34234
34283
|
var _a;
|
|
34235
34284
|
if (!((_a = router == null ? void 0 : router.pageviewEventData) == null ? void 0 : _a.current))
|
|
34236
34285
|
return;
|
|
34237
|
-
|
|
34238
|
-
|
|
34286
|
+
if (router.pageviewEventData.current instanceof Promise) {
|
|
34287
|
+
void router.pageviewEventData.current.then((pageviewEventData) => {
|
|
34288
|
+
sendFormSubmitTrackingEvent(pageviewEventData, nodeId, submitTrackingId);
|
|
34289
|
+
});
|
|
34290
|
+
}
|
|
34291
|
+
else {
|
|
34292
|
+
sendFormSubmitTrackingEvent(router.pageviewEventData.current, nodeId, submitTrackingId);
|
|
34293
|
+
}
|
|
34294
|
+
}
|
|
34295
|
+
function sendFormSubmitTrackingEvent(pageviewEventData, nodeId, trackingId) {
|
|
34296
|
+
return sendTrackingEvent('published_site_form_submit', {
|
|
34239
34297
|
...pageviewEventData,
|
|
34240
34298
|
nodeId: nodeId ?? null,
|
|
34241
|
-
trackingId:
|
|
34242
|
-
};
|
|
34243
|
-
return sendTrackingEvent('published_site_form_submit', eventData, 'eager');
|
|
34299
|
+
trackingId: trackingId || null,
|
|
34300
|
+
}, 'eager');
|
|
34244
34301
|
}
|
|
34245
34302
|
var pendingState = {
|
|
34246
34303
|
state: 'pending',
|
|
@@ -34496,17 +34553,23 @@ var useSendPageView = (currentRoute, currentRouteId, currentPathVariables, colle
|
|
|
34496
34553
|
});
|
|
34497
34554
|
};
|
|
34498
34555
|
void (async () => {
|
|
34499
|
-
|
|
34556
|
+
const pageviewEventDataPromise = getFullPageviewEventData();
|
|
34557
|
+
pageviewEventData.current = pageviewEventDataPromise;
|
|
34500
34558
|
if (skipFirstPageView.current) {
|
|
34501
34559
|
skipFirstPageView.current = false;
|
|
34502
34560
|
return;
|
|
34503
34561
|
}
|
|
34504
|
-
|
|
34562
|
+
const eventData = await pageviewEventDataPromise;
|
|
34563
|
+
pageviewEventData.current = eventData;
|
|
34564
|
+
sendTrackingEvent('published_site_pageview', eventData, 'eager');
|
|
34505
34565
|
})();
|
|
34506
34566
|
const listener = async (event) => {
|
|
34507
34567
|
if (event.persisted) {
|
|
34508
|
-
|
|
34509
|
-
|
|
34568
|
+
const pageviewEventDataPromise = getFullPageviewEventData();
|
|
34569
|
+
pageviewEventData.current = pageviewEventDataPromise;
|
|
34570
|
+
const eventData = await getFullPageviewEventData();
|
|
34571
|
+
pageviewEventData.current = eventData;
|
|
34572
|
+
sendTrackingEvent('published_site_pageview', eventData, 'eager');
|
|
34510
34573
|
}
|
|
34511
34574
|
};
|
|
34512
34575
|
window.addEventListener('pageshow', listener);
|
|
@@ -34608,6 +34671,13 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
34608
34671
|
const scheduleSideEffect = useScheduleRenderSideEffects(dep);
|
|
34609
34672
|
const startNavigation = useNavigationTransition();
|
|
34610
34673
|
const monitorNextPaintAfterRender = useMonitorNextPaintAfterRender('framer-route-change');
|
|
34674
|
+
const { synchronousNavigationOnDesktop, } = useLibraryFeatures();
|
|
34675
|
+
const transitionFn = useMemo2(() => {
|
|
34676
|
+
if (!synchronousNavigationOnDesktop || !isDesktop()) {
|
|
34677
|
+
return startTransition2;
|
|
34678
|
+
}
|
|
34679
|
+
return (fn) => fn();
|
|
34680
|
+
}, [synchronousNavigationOnDesktop,]);
|
|
34611
34681
|
const isInitialNavigationRef = useRef3(true);
|
|
34612
34682
|
const currentRouteRef = useRef3(initialRoute);
|
|
34613
34683
|
const currentPathVariablesRef = useRef3(initialPathVariables);
|
|
@@ -34676,7 +34746,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
34676
34746
|
}, currentPath, ignorePushStateWrapper);
|
|
34677
34747
|
};
|
|
34678
34748
|
void startNavigation(() => {
|
|
34679
|
-
void startViewTransition2(currentRouteId2, currentRouteId2, () =>
|
|
34749
|
+
void startViewTransition2(currentRouteId2, currentRouteId2, () => transitionFn(forceUpdate));
|
|
34680
34750
|
}, nextRender, updateURL, false);
|
|
34681
34751
|
}
|
|
34682
34752
|
catch { }
|
|
@@ -34692,6 +34762,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
34692
34762
|
startNavigation,
|
|
34693
34763
|
startViewTransition2,
|
|
34694
34764
|
monitorNextPaintAfterRender,
|
|
34765
|
+
transitionFn,
|
|
34695
34766
|
]);
|
|
34696
34767
|
const setCurrentRouteId = useCallback((routeId, localeId, hash2, pathVariables, isHistoryTransition, nextRender, smoothScroll = false, updateURL) => {
|
|
34697
34768
|
isInitialNavigationRef.current = false;
|
|
@@ -34703,13 +34774,13 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
34703
34774
|
updateScrollPosition(hash2, smoothScroll, isHistoryTransition);
|
|
34704
34775
|
});
|
|
34705
34776
|
if (isHistoryTransition) {
|
|
34706
|
-
|
|
34777
|
+
transitionFn(forceUpdate);
|
|
34707
34778
|
return;
|
|
34708
34779
|
}
|
|
34709
34780
|
void startNavigation((signal) => {
|
|
34710
|
-
void startViewTransition2(currentRouteId2, routeId, () =>
|
|
34781
|
+
void startViewTransition2(currentRouteId2, routeId, () => transitionFn(forceUpdate), signal);
|
|
34711
34782
|
}, nextRender, updateURL, true);
|
|
34712
|
-
}, [forceUpdate, scheduleSideEffect, startNavigation, startViewTransition2,]);
|
|
34783
|
+
}, [forceUpdate, scheduleSideEffect, startNavigation, startViewTransition2, transitionFn,]);
|
|
34713
34784
|
usePopStateHandler(currentRouteRef, setCurrentRouteId);
|
|
34714
34785
|
const navigate = useCallback(async (routeId, hash2, pathVariables, smoothScroll, beforeUrlUpdate) => {
|
|
34715
34786
|
var _a, _b;
|
|
@@ -39981,18 +40052,34 @@ ${stringifyQuery(query)}`);
|
|
|
39981
40052
|
}
|
|
39982
40053
|
};
|
|
39983
40054
|
var QueryCache = class {
|
|
39984
|
-
constructor(queryEngine2) {
|
|
40055
|
+
constructor(queryEngine2, maxSize = Infinity) {
|
|
39985
40056
|
this.queryEngine = queryEngine2;
|
|
40057
|
+
this.maxSize = maxSize;
|
|
39986
40058
|
__publicField(this, 'cache', /* @__PURE__ */ new Map());
|
|
39987
40059
|
}
|
|
40060
|
+
prune() {
|
|
40061
|
+
if (this.cache.size <= this.maxSize)
|
|
40062
|
+
return;
|
|
40063
|
+
for (const [key7, value,] of this.cache) {
|
|
40064
|
+
if (this.cache.size <= this.maxSize)
|
|
40065
|
+
break;
|
|
40066
|
+
if (value.state === 'pending')
|
|
40067
|
+
continue;
|
|
40068
|
+
this.cache.delete(key7);
|
|
40069
|
+
}
|
|
40070
|
+
}
|
|
39988
40071
|
get(query, locale) {
|
|
39989
40072
|
const key7 = getCacheKey(query, locale);
|
|
39990
40073
|
const existing = this.cache.get(key7);
|
|
39991
|
-
if (existing)
|
|
40074
|
+
if (existing) {
|
|
40075
|
+
this.cache.delete(key7);
|
|
40076
|
+
this.cache.set(key7, existing);
|
|
39992
40077
|
return existing;
|
|
40078
|
+
}
|
|
39993
40079
|
const resolver = () => this.queryEngine.query(query, locale);
|
|
39994
40080
|
const value = new LazyValue(resolver);
|
|
39995
40081
|
this.cache.set(key7, value);
|
|
40082
|
+
this.prune();
|
|
39996
40083
|
return value;
|
|
39997
40084
|
}
|
|
39998
40085
|
};
|
|
@@ -41180,15 +41267,18 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
|
|
|
41180
41267
|
const shouldWrapWithBoundary = shouldWrapOverrideWithBoundary(scopeId, nearestExternalComponent == null ? void 0 : nearestExternalComponent.scopeId, nearestExternalComponent == null ? void 0 : nearestExternalComponent.level, inComponentSlot ?? false);
|
|
41181
41268
|
if (shouldWrapWithBoundary) {
|
|
41182
41269
|
if (appliedOverride.status === 'success') {
|
|
41183
|
-
return /* @__PURE__ */ jsx3(
|
|
41184
|
-
|
|
41185
|
-
|
|
41186
|
-
|
|
41187
|
-
|
|
41188
|
-
|
|
41189
|
-
|
|
41190
|
-
|
|
41191
|
-
|
|
41270
|
+
return /* @__PURE__ */ jsx3(NodeIdContext.Provider, {
|
|
41271
|
+
value: nodeId,
|
|
41272
|
+
children: /* @__PURE__ */ jsx3(CodeComponentBoundary, {
|
|
41273
|
+
getErrorMessage: getErrorMessageForOverride.bind(null, scopeId, nodeId),
|
|
41274
|
+
fallback: /* @__PURE__ */ jsx3(Component17, {
|
|
41275
|
+
...props,
|
|
41276
|
+
ref,
|
|
41277
|
+
}),
|
|
41278
|
+
children: /* @__PURE__ */ jsx3(appliedOverride.Component, {
|
|
41279
|
+
...props,
|
|
41280
|
+
ref,
|
|
41281
|
+
}),
|
|
41192
41282
|
}),
|
|
41193
41283
|
});
|
|
41194
41284
|
}
|
|
@@ -41207,9 +41297,12 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
|
|
|
41207
41297
|
}
|
|
41208
41298
|
else {
|
|
41209
41299
|
if (appliedOverride.status === 'success') {
|
|
41210
|
-
return /* @__PURE__ */ jsx3(
|
|
41211
|
-
|
|
41212
|
-
|
|
41300
|
+
return /* @__PURE__ */ jsx3(NodeIdContext.Provider, {
|
|
41301
|
+
value: nodeId,
|
|
41302
|
+
children: /* @__PURE__ */ jsx3(appliedOverride.Component, {
|
|
41303
|
+
...props,
|
|
41304
|
+
ref,
|
|
41305
|
+
}),
|
|
41213
41306
|
});
|
|
41214
41307
|
}
|
|
41215
41308
|
else {
|
|
@@ -42206,6 +42299,789 @@ function createFontFamilyName(font) {
|
|
|
42206
42299
|
function createVariableFontFamilyName(familyName) {
|
|
42207
42300
|
return `${familyName} Variable`;
|
|
42208
42301
|
}
|
|
42302
|
+
function assert2(condition, ...msg) {
|
|
42303
|
+
var _a, _b;
|
|
42304
|
+
if (condition)
|
|
42305
|
+
return;
|
|
42306
|
+
const e = Error('Assertion Error' + (msg.length > 0 ? ': ' + msg.join(' ') : ''));
|
|
42307
|
+
if (e.stack) {
|
|
42308
|
+
try {
|
|
42309
|
+
const lines = e.stack.split('\n');
|
|
42310
|
+
if ((_a = lines[1]) == null ? void 0 : _a.includes('assert')) {
|
|
42311
|
+
lines.splice(1, 1);
|
|
42312
|
+
e.stack = lines.join('\n');
|
|
42313
|
+
}
|
|
42314
|
+
else if ((_b = lines[0]) == null ? void 0 : _b.includes('assert')) {
|
|
42315
|
+
lines.splice(0, 1);
|
|
42316
|
+
e.stack = lines.join('\n');
|
|
42317
|
+
}
|
|
42318
|
+
}
|
|
42319
|
+
catch { }
|
|
42320
|
+
}
|
|
42321
|
+
throw e;
|
|
42322
|
+
}
|
|
42323
|
+
var missing = Symbol('missing');
|
|
42324
|
+
var frozenEmptyArray = Object.freeze([]);
|
|
42325
|
+
var errorReporter;
|
|
42326
|
+
function reportError({ error: maybeError, tags, extras, critical, caller, }) {
|
|
42327
|
+
assert2(errorReporter, 'Set up an error callback with setErrorReporter, or configure Sentry with initializeEnvironment');
|
|
42328
|
+
const error = reportableError(maybeError, caller);
|
|
42329
|
+
errorReporter({
|
|
42330
|
+
error,
|
|
42331
|
+
tags: {
|
|
42332
|
+
...error.tags,
|
|
42333
|
+
...tags,
|
|
42334
|
+
},
|
|
42335
|
+
extras: {
|
|
42336
|
+
...error.extras,
|
|
42337
|
+
...extras,
|
|
42338
|
+
},
|
|
42339
|
+
critical: !!critical,
|
|
42340
|
+
});
|
|
42341
|
+
return error;
|
|
42342
|
+
}
|
|
42343
|
+
function reportableError(error, caller = reportableError) {
|
|
42344
|
+
if (error instanceof Error) {
|
|
42345
|
+
return error;
|
|
42346
|
+
}
|
|
42347
|
+
return new UnhandledError(error, caller);
|
|
42348
|
+
}
|
|
42349
|
+
var UnhandledError = class extends Error {
|
|
42350
|
+
constructor(error, caller) {
|
|
42351
|
+
const message = error ? JSON.stringify(error) : 'No error message provided';
|
|
42352
|
+
super(message);
|
|
42353
|
+
this.message = message;
|
|
42354
|
+
if (caller && Error.captureStackTrace) {
|
|
42355
|
+
Error.captureStackTrace(this, caller);
|
|
42356
|
+
}
|
|
42357
|
+
else {
|
|
42358
|
+
try {
|
|
42359
|
+
throw new Error();
|
|
42360
|
+
}
|
|
42361
|
+
catch (e) {
|
|
42362
|
+
this.stack = e.stack;
|
|
42363
|
+
}
|
|
42364
|
+
}
|
|
42365
|
+
}
|
|
42366
|
+
};
|
|
42367
|
+
var hostname = typeof window !== 'undefined' ? window.location.hostname : void 0;
|
|
42368
|
+
var isLocal = Boolean(hostname && ['web.framerlocal.com', 'localhost', '127.0.0.1', '[::1]',].includes(hostname));
|
|
42369
|
+
var hosts = (() => {
|
|
42370
|
+
if (!hostname)
|
|
42371
|
+
return;
|
|
42372
|
+
if (isLocal) {
|
|
42373
|
+
return {
|
|
42374
|
+
main: hostname,
|
|
42375
|
+
previewLink: void 0,
|
|
42376
|
+
};
|
|
42377
|
+
}
|
|
42378
|
+
const previewHostRegex = /^(([^.]+\.)?beta\.)?((?:development\.)?framer\.com)$/u;
|
|
42379
|
+
const match = hostname.match(previewHostRegex);
|
|
42380
|
+
if (!match || !match[3])
|
|
42381
|
+
return;
|
|
42382
|
+
return {
|
|
42383
|
+
previewLink: match[2] && match[0],
|
|
42384
|
+
main: match[3],
|
|
42385
|
+
};
|
|
42386
|
+
})();
|
|
42387
|
+
var hostInfo = {
|
|
42388
|
+
hosts,
|
|
42389
|
+
isDevelopment: (hosts == null ? void 0 : hosts.main) === 'development.framer.com',
|
|
42390
|
+
isProduction: (hosts == null ? void 0 : hosts.main) === 'framer.com',
|
|
42391
|
+
isLocal,
|
|
42392
|
+
};
|
|
42393
|
+
var cachedServiceMap;
|
|
42394
|
+
function getServiceMap() {
|
|
42395
|
+
if (typeof window === 'undefined')
|
|
42396
|
+
return {};
|
|
42397
|
+
if (cachedServiceMap)
|
|
42398
|
+
return cachedServiceMap;
|
|
42399
|
+
cachedServiceMap = extractServiceMap();
|
|
42400
|
+
return cachedServiceMap;
|
|
42401
|
+
}
|
|
42402
|
+
function extractServiceMap() {
|
|
42403
|
+
var _a, _b, _c;
|
|
42404
|
+
const location = window.location;
|
|
42405
|
+
let services = (_a = window == null ? void 0 : window.bootstrap) == null ? void 0 : _a.services;
|
|
42406
|
+
if (services) {
|
|
42407
|
+
return services;
|
|
42408
|
+
}
|
|
42409
|
+
let topOrigin;
|
|
42410
|
+
try {
|
|
42411
|
+
const topWindow = window.top;
|
|
42412
|
+
topOrigin = topWindow.location.origin;
|
|
42413
|
+
services = (_c = (_b = window.top) == null ? void 0 : _b.bootstrap) == null ? void 0 : _c.services;
|
|
42414
|
+
if (services) {
|
|
42415
|
+
return services;
|
|
42416
|
+
}
|
|
42417
|
+
}
|
|
42418
|
+
catch (e) { }
|
|
42419
|
+
if (topOrigin && topOrigin !== location.origin) {
|
|
42420
|
+
throw Error(`Unexpectedly embedded by ${topOrigin} (expected ${location.origin})`);
|
|
42421
|
+
}
|
|
42422
|
+
if (location.origin.endsWith('framer.com') || location.origin.endsWith('framer.dev')) {
|
|
42423
|
+
throw Error('ServiceMap data was not provided in document');
|
|
42424
|
+
}
|
|
42425
|
+
try {
|
|
42426
|
+
const servicesJSON = new URLSearchParams(location.search).get('services') ||
|
|
42427
|
+
new URLSearchParams(location.hash.substring(1)).get('services');
|
|
42428
|
+
if (servicesJSON) {
|
|
42429
|
+
services = JSON.parse(servicesJSON);
|
|
42430
|
+
}
|
|
42431
|
+
}
|
|
42432
|
+
catch (e) { }
|
|
42433
|
+
if (services && typeof services === 'object' && services.api) {
|
|
42434
|
+
return services;
|
|
42435
|
+
}
|
|
42436
|
+
throw Error('ServiceMap requested but not available');
|
|
42437
|
+
}
|
|
42438
|
+
function jsonSafeCopy(obj, depth = 0, seen = /* @__PURE__ */ new Set()) {
|
|
42439
|
+
var _a;
|
|
42440
|
+
if (obj === null)
|
|
42441
|
+
return obj;
|
|
42442
|
+
if (typeof obj === 'function')
|
|
42443
|
+
return `[Function: ${obj.name ?? 'unknown'}]`;
|
|
42444
|
+
if (typeof obj !== 'object')
|
|
42445
|
+
return obj;
|
|
42446
|
+
if (obj instanceof Error)
|
|
42447
|
+
return `[${obj.toString()}]`;
|
|
42448
|
+
if (seen.has(obj))
|
|
42449
|
+
return '[Circular]';
|
|
42450
|
+
if (depth > 2)
|
|
42451
|
+
return '...';
|
|
42452
|
+
seen.add(obj);
|
|
42453
|
+
try {
|
|
42454
|
+
if ('toJSON' in obj && typeof obj.toJSON === 'function') {
|
|
42455
|
+
return jsonSafeCopy(obj.toJSON(), depth + 1, seen);
|
|
42456
|
+
}
|
|
42457
|
+
else if (Array.isArray(obj)) {
|
|
42458
|
+
return obj.map((v) => jsonSafeCopy(v, depth + 1, seen));
|
|
42459
|
+
}
|
|
42460
|
+
else if (Object.getPrototypeOf(obj) !== Object.prototype) {
|
|
42461
|
+
return `[Object: ${'__class' in obj && obj.__class || ((_a = obj.constructor) == null ? void 0 : _a.name)}]`;
|
|
42462
|
+
}
|
|
42463
|
+
else {
|
|
42464
|
+
const result = {};
|
|
42465
|
+
for (const [key7, v,] of Object.entries(obj)) {
|
|
42466
|
+
result[key7] = jsonSafeCopy(v, depth + 1, seen);
|
|
42467
|
+
}
|
|
42468
|
+
return result;
|
|
42469
|
+
}
|
|
42470
|
+
}
|
|
42471
|
+
catch (e) {
|
|
42472
|
+
return `[Throws: ${e instanceof Error ? e.message : e}]`;
|
|
42473
|
+
}
|
|
42474
|
+
finally {
|
|
42475
|
+
seen.delete(obj);
|
|
42476
|
+
}
|
|
42477
|
+
}
|
|
42478
|
+
var levelNames = ['trace', 'debug', 'info', 'warn', 'error',];
|
|
42479
|
+
var postfixNames = [':trace', ':debug', ':info', ':warn', ':error',];
|
|
42480
|
+
function applyLogLevelSpec(spec, all) {
|
|
42481
|
+
const missingSpecs = [];
|
|
42482
|
+
for (const s of spec.split(/[ ,]/u)) {
|
|
42483
|
+
let match = s.trim();
|
|
42484
|
+
if (match.length === 0)
|
|
42485
|
+
continue;
|
|
42486
|
+
let level = 1;
|
|
42487
|
+
let inverted = false;
|
|
42488
|
+
if (match.startsWith('-')) {
|
|
42489
|
+
match = match.slice(1);
|
|
42490
|
+
level = 3;
|
|
42491
|
+
inverted = true;
|
|
42492
|
+
}
|
|
42493
|
+
for (let i = 0; i <= 4; i++) {
|
|
42494
|
+
const postfix = postfixNames[i];
|
|
42495
|
+
if (!postfix)
|
|
42496
|
+
continue;
|
|
42497
|
+
if (match.endsWith(postfix)) {
|
|
42498
|
+
level = i;
|
|
42499
|
+
if (inverted) {
|
|
42500
|
+
level += 1;
|
|
42501
|
+
}
|
|
42502
|
+
match = match.slice(0, match.length - postfix.length);
|
|
42503
|
+
if (match.length === 0) {
|
|
42504
|
+
match = '*';
|
|
42505
|
+
}
|
|
42506
|
+
break;
|
|
42507
|
+
}
|
|
42508
|
+
}
|
|
42509
|
+
const regex2 = new RegExp('^' + escapeRegExp(match).replace(/\\\*/gu, '.*') + '$');
|
|
42510
|
+
let loggersUpdated = 0;
|
|
42511
|
+
for (const logger of all) {
|
|
42512
|
+
if (logger.id.match(regex2)) {
|
|
42513
|
+
logger.level = level;
|
|
42514
|
+
++loggersUpdated;
|
|
42515
|
+
}
|
|
42516
|
+
}
|
|
42517
|
+
if (loggersUpdated === 0) {
|
|
42518
|
+
missingSpecs.push(s);
|
|
42519
|
+
}
|
|
42520
|
+
}
|
|
42521
|
+
return missingSpecs;
|
|
42522
|
+
}
|
|
42523
|
+
var _LogEntry = class _LogEntry2 {
|
|
42524
|
+
constructor(logger, level, parts) {
|
|
42525
|
+
this.logger = logger;
|
|
42526
|
+
this.level = level;
|
|
42527
|
+
this.parts = parts;
|
|
42528
|
+
__publicField(this, 'id');
|
|
42529
|
+
__publicField(this, 'time');
|
|
42530
|
+
__publicField(this, 'stringPrefix');
|
|
42531
|
+
this.id = _LogEntry2.nextId++;
|
|
42532
|
+
this.time = Date.now();
|
|
42533
|
+
}
|
|
42534
|
+
toMessage() {
|
|
42535
|
+
if (this.stringPrefix)
|
|
42536
|
+
return this.parts;
|
|
42537
|
+
const r = [new Date(this.time).toISOString().substr(-14, 14), levelNames[this.level] + ': [' + this.logger.id + ']',];
|
|
42538
|
+
let i = 0;
|
|
42539
|
+
for (; i < this.parts.length; i++) {
|
|
42540
|
+
const part = this.parts[i];
|
|
42541
|
+
if (typeof part === 'string') {
|
|
42542
|
+
r.push(part);
|
|
42543
|
+
continue;
|
|
42544
|
+
}
|
|
42545
|
+
break;
|
|
42546
|
+
}
|
|
42547
|
+
this.stringPrefix = r.join(' ');
|
|
42548
|
+
this.parts.splice(0, i, this.stringPrefix);
|
|
42549
|
+
return this.parts;
|
|
42550
|
+
}
|
|
42551
|
+
toString() {
|
|
42552
|
+
return this.toMessage().map((part) => {
|
|
42553
|
+
const type = typeof part;
|
|
42554
|
+
if (type === 'string')
|
|
42555
|
+
return part;
|
|
42556
|
+
if (type === 'function')
|
|
42557
|
+
return `[Function: ${part.name ?? 'unknown'}]`;
|
|
42558
|
+
if (part instanceof Error)
|
|
42559
|
+
return part.stack ?? part.toString();
|
|
42560
|
+
const json = JSON.stringify(jsonSafeCopy(part));
|
|
42561
|
+
if ((json == null ? void 0 : json.length) > 253) {
|
|
42562
|
+
return json.slice(0, 250) + '...';
|
|
42563
|
+
}
|
|
42564
|
+
return json;
|
|
42565
|
+
}).join(' ');
|
|
42566
|
+
}
|
|
42567
|
+
};
|
|
42568
|
+
__publicField(_LogEntry, 'nextId', 0);
|
|
42569
|
+
var LogEntry = _LogEntry;
|
|
42570
|
+
var logLevelSpec = '*:app:info,app:info';
|
|
42571
|
+
var isNode = typeof process !== 'undefined' && !!process.kill;
|
|
42572
|
+
var isCI = isNode && false;
|
|
42573
|
+
if (isCI) {
|
|
42574
|
+
logLevelSpec = '-:warn';
|
|
42575
|
+
}
|
|
42576
|
+
else if (isNode) {
|
|
42577
|
+
logLevelSpec = '';
|
|
42578
|
+
}
|
|
42579
|
+
try {
|
|
42580
|
+
if (typeof window !== 'undefined' && window.localStorage) {
|
|
42581
|
+
logLevelSpec = window.localStorage.logLevel || logLevelSpec;
|
|
42582
|
+
}
|
|
42583
|
+
}
|
|
42584
|
+
catch { }
|
|
42585
|
+
try {
|
|
42586
|
+
if (typeof process !== 'undefined') {
|
|
42587
|
+
logLevelSpec = process.env.DEBUG || logLevelSpec;
|
|
42588
|
+
}
|
|
42589
|
+
}
|
|
42590
|
+
catch { }
|
|
42591
|
+
try {
|
|
42592
|
+
if (typeof window !== 'undefined') {
|
|
42593
|
+
Object.assign(window, {
|
|
42594
|
+
setLogLevel,
|
|
42595
|
+
});
|
|
42596
|
+
}
|
|
42597
|
+
}
|
|
42598
|
+
catch { }
|
|
42599
|
+
try {
|
|
42600
|
+
if (typeof window !== 'undefined' && !!window.postMessage && window.top === window) {
|
|
42601
|
+
window.addEventListener('message', (msg) => {
|
|
42602
|
+
if (!msg.data || typeof msg.data !== 'object')
|
|
42603
|
+
return;
|
|
42604
|
+
const { loggerId, level, parts, printed, } = msg.data;
|
|
42605
|
+
if (typeof loggerId !== 'string')
|
|
42606
|
+
return;
|
|
42607
|
+
if (!Array.isArray(parts) || parts.length < 1 || typeof level !== 'number')
|
|
42608
|
+
return;
|
|
42609
|
+
const logger = getLogger2(loggerId);
|
|
42610
|
+
if (level < 0 || level > 5)
|
|
42611
|
+
return;
|
|
42612
|
+
parts[0] = parts[0].replace('[', '*[');
|
|
42613
|
+
const entry = new LogEntry(logger, level, parts);
|
|
42614
|
+
entry.stringPrefix = parts[0];
|
|
42615
|
+
replayBuffer.push(entry);
|
|
42616
|
+
if (printed)
|
|
42617
|
+
return;
|
|
42618
|
+
if (logger.level > level)
|
|
42619
|
+
return;
|
|
42620
|
+
console == null ? void 0 : console.log(...entry.toMessage());
|
|
42621
|
+
});
|
|
42622
|
+
}
|
|
42623
|
+
}
|
|
42624
|
+
catch { }
|
|
42625
|
+
var postLogEntry;
|
|
42626
|
+
try {
|
|
42627
|
+
if (typeof window !== 'undefined' && !!window.postMessage && window.top !== window) {
|
|
42628
|
+
postLogEntry = (entry) => {
|
|
42629
|
+
var _a;
|
|
42630
|
+
try {
|
|
42631
|
+
const parts = entry.toMessage().map((p) => jsonSafeCopy(p));
|
|
42632
|
+
const logger = entry.logger;
|
|
42633
|
+
const level = entry.level;
|
|
42634
|
+
const printed = logger.level <= entry.level;
|
|
42635
|
+
const data2 = {
|
|
42636
|
+
loggerId: logger.id,
|
|
42637
|
+
level,
|
|
42638
|
+
parts,
|
|
42639
|
+
printed,
|
|
42640
|
+
};
|
|
42641
|
+
(_a = window.top) == null ? void 0 : _a.postMessage(data2, getServiceMap().app);
|
|
42642
|
+
}
|
|
42643
|
+
catch { }
|
|
42644
|
+
};
|
|
42645
|
+
}
|
|
42646
|
+
}
|
|
42647
|
+
catch { }
|
|
42648
|
+
var loggers = {};
|
|
42649
|
+
var replayBuffer = [];
|
|
42650
|
+
var maxReplayBufferEntries = 1e3;
|
|
42651
|
+
function createLogEntry(logger, level, parts) {
|
|
42652
|
+
const entry = new LogEntry(logger, level, parts);
|
|
42653
|
+
replayBuffer.push(entry);
|
|
42654
|
+
postLogEntry == null ? void 0 : postLogEntry(entry);
|
|
42655
|
+
while (replayBuffer.length > maxReplayBufferEntries) {
|
|
42656
|
+
replayBuffer.shift();
|
|
42657
|
+
}
|
|
42658
|
+
return entry;
|
|
42659
|
+
}
|
|
42660
|
+
function getLogReplayBuffer(maxEntries) {
|
|
42661
|
+
if (typeof maxEntries === 'number') {
|
|
42662
|
+
maxReplayBufferEntries = maxEntries;
|
|
42663
|
+
}
|
|
42664
|
+
return replayBuffer;
|
|
42665
|
+
}
|
|
42666
|
+
var pathRegex = /\/(?<filename>[^/.]+)(?=\.(?:debug\.)?html$)/u;
|
|
42667
|
+
var cachedFilename;
|
|
42668
|
+
function getFilenameFromWindowPathname() {
|
|
42669
|
+
var _a, _b;
|
|
42670
|
+
if (typeof window === 'undefined' || !window.location)
|
|
42671
|
+
return;
|
|
42672
|
+
cachedFilename ??= (_b = (_a = pathRegex.exec(window.location.pathname)) == null ? void 0 : _a.groups) == null ? void 0 : _b.filename;
|
|
42673
|
+
return cachedFilename;
|
|
42674
|
+
}
|
|
42675
|
+
function getLogger2(id3) {
|
|
42676
|
+
const path = getFilenameFromWindowPathname();
|
|
42677
|
+
id3 = (path ? path + ':' : '') + id3;
|
|
42678
|
+
const existing = loggers[id3];
|
|
42679
|
+
if (existing)
|
|
42680
|
+
return existing;
|
|
42681
|
+
const logger = new Logger(id3);
|
|
42682
|
+
loggers[id3] = logger;
|
|
42683
|
+
applyLogLevelSpec(logLevelSpec, [logger,]);
|
|
42684
|
+
postLogEntry == null ? void 0 : postLogEntry(new LogEntry(logger, -1, []));
|
|
42685
|
+
return logger;
|
|
42686
|
+
}
|
|
42687
|
+
function setLogLevel(spec, replay = true) {
|
|
42688
|
+
try {
|
|
42689
|
+
if (typeof window !== 'undefined' && window.localStorage) {
|
|
42690
|
+
window.localStorage.logLevel = spec;
|
|
42691
|
+
}
|
|
42692
|
+
}
|
|
42693
|
+
catch { }
|
|
42694
|
+
const previousSpec = logLevelSpec;
|
|
42695
|
+
logLevelSpec = spec;
|
|
42696
|
+
const all = Object.values(loggers);
|
|
42697
|
+
for (const logger of all) {
|
|
42698
|
+
logger.level = 3;
|
|
42699
|
+
}
|
|
42700
|
+
const missingSpecs = applyLogLevelSpec(spec, all);
|
|
42701
|
+
if (missingSpecs.length > 0) {
|
|
42702
|
+
console == null ? void 0 : console.warn('Some log level specs matched no loggers:', missingSpecs);
|
|
42703
|
+
}
|
|
42704
|
+
if (replay && replayBuffer.length > 0) {
|
|
42705
|
+
console == null ? void 0 : console.log('--- LOG REPLAY ---');
|
|
42706
|
+
for (const entry of replayBuffer) {
|
|
42707
|
+
if (entry.logger.level > entry.level)
|
|
42708
|
+
continue;
|
|
42709
|
+
if (entry.level >= 3) {
|
|
42710
|
+
console == null ? void 0 : console.warn(...entry.toMessage());
|
|
42711
|
+
}
|
|
42712
|
+
else {
|
|
42713
|
+
console == null ? void 0 : console.log(...entry.toMessage());
|
|
42714
|
+
}
|
|
42715
|
+
}
|
|
42716
|
+
console == null ? void 0 : console.log('--- END OF LOG REPLAY ---');
|
|
42717
|
+
}
|
|
42718
|
+
return previousSpec;
|
|
42719
|
+
}
|
|
42720
|
+
var enrichWithLogs = (extras) => {
|
|
42721
|
+
const result = {
|
|
42722
|
+
...extras,
|
|
42723
|
+
logs: getLogReplayBuffer().slice(-50).map((entry) => entry.toString().slice(0, 600)).join('\n'),
|
|
42724
|
+
};
|
|
42725
|
+
if (extras.logs) {
|
|
42726
|
+
console == null ? void 0 : console.warn('extras.logs is reserved for log replay buffer, use another key');
|
|
42727
|
+
}
|
|
42728
|
+
return result;
|
|
42729
|
+
};
|
|
42730
|
+
var Logger = class {
|
|
42731
|
+
constructor(id3, errorIsCritical) {
|
|
42732
|
+
this.id = id3;
|
|
42733
|
+
__publicField(this, 'level', 3);
|
|
42734
|
+
__publicField(this, 'didLog', {});
|
|
42735
|
+
__publicField(this, 'errorIsCritical');
|
|
42736
|
+
__publicField(this, 'trace', (...parts) => {
|
|
42737
|
+
if (this.level > 0)
|
|
42738
|
+
return;
|
|
42739
|
+
const entry = createLogEntry(this, 0, parts);
|
|
42740
|
+
console == null ? void 0 : console.log(...entry.toMessage());
|
|
42741
|
+
});
|
|
42742
|
+
__publicField(this, 'debug', (...parts) => {
|
|
42743
|
+
const entry = createLogEntry(this, 1, parts);
|
|
42744
|
+
if (this.level > 1)
|
|
42745
|
+
return;
|
|
42746
|
+
console == null ? void 0 : console.log(...entry.toMessage());
|
|
42747
|
+
});
|
|
42748
|
+
__publicField(this, 'info', (...parts) => {
|
|
42749
|
+
const entry = createLogEntry(this, 2, parts);
|
|
42750
|
+
if (this.level > 2)
|
|
42751
|
+
return;
|
|
42752
|
+
console == null ? void 0 : console.info(...entry.toMessage());
|
|
42753
|
+
});
|
|
42754
|
+
__publicField(this, 'warn', (...parts) => {
|
|
42755
|
+
const entry = createLogEntry(this, 3, parts);
|
|
42756
|
+
if (this.level > 3)
|
|
42757
|
+
return;
|
|
42758
|
+
console == null ? void 0 : console.warn(...entry.toMessage());
|
|
42759
|
+
});
|
|
42760
|
+
__publicField(this, 'warnOncePerMinute', (firstPart, ...parts) => {
|
|
42761
|
+
const lastLoggedTime = this.didLog[firstPart];
|
|
42762
|
+
if (lastLoggedTime && lastLoggedTime > Date.now())
|
|
42763
|
+
return;
|
|
42764
|
+
this.didLog[firstPart] = Date.now() + 1e3 * 60;
|
|
42765
|
+
parts.unshift(firstPart);
|
|
42766
|
+
const entry = createLogEntry(this, 3, parts);
|
|
42767
|
+
if (this.level > 3)
|
|
42768
|
+
return;
|
|
42769
|
+
console == null ? void 0 : console.warn(...entry.toMessage());
|
|
42770
|
+
});
|
|
42771
|
+
__publicField(this, 'error', (...parts) => {
|
|
42772
|
+
const entry = createLogEntry(this, 4, parts);
|
|
42773
|
+
if (this.level > 4)
|
|
42774
|
+
return;
|
|
42775
|
+
console == null ? void 0 : console.error(...entry.toMessage());
|
|
42776
|
+
});
|
|
42777
|
+
__publicField(this, 'errorOncePerMinute', (firstPart, ...parts) => {
|
|
42778
|
+
const lastLoggedTime = this.didLog[firstPart];
|
|
42779
|
+
if (lastLoggedTime && lastLoggedTime > Date.now())
|
|
42780
|
+
return;
|
|
42781
|
+
this.didLog[firstPart] = Date.now() + 1e3 * 60;
|
|
42782
|
+
parts.unshift(firstPart);
|
|
42783
|
+
const entry = createLogEntry(this, 4, parts);
|
|
42784
|
+
if (this.level > 4)
|
|
42785
|
+
return;
|
|
42786
|
+
console == null ? void 0 : console.error(...entry.toMessage());
|
|
42787
|
+
});
|
|
42788
|
+
__publicField(this, 'reportError', (maybeError, extras, tags, critical) => {
|
|
42789
|
+
extras = enrichWithLogs(extras ?? {});
|
|
42790
|
+
const reportedError = reportError({
|
|
42791
|
+
caller: this.reportError,
|
|
42792
|
+
error: maybeError,
|
|
42793
|
+
tags: {
|
|
42794
|
+
...tags,
|
|
42795
|
+
handler: 'logger',
|
|
42796
|
+
where: this.id,
|
|
42797
|
+
},
|
|
42798
|
+
extras,
|
|
42799
|
+
critical: critical ?? this.errorIsCritical,
|
|
42800
|
+
});
|
|
42801
|
+
extras ? this.error(reportedError, extras) : this.error(reportedError);
|
|
42802
|
+
});
|
|
42803
|
+
__publicField(this, 'reportErrorOncePerMinute', (error, extras) => {
|
|
42804
|
+
if (!isErrorWithMessage(error))
|
|
42805
|
+
return;
|
|
42806
|
+
const lastLoggedTime = this.didLog[error.message];
|
|
42807
|
+
if (lastLoggedTime && lastLoggedTime > Date.now())
|
|
42808
|
+
return;
|
|
42809
|
+
this.didLog[error.message] = Date.now() + 1e3 * 60;
|
|
42810
|
+
this.reportError(error, extras);
|
|
42811
|
+
});
|
|
42812
|
+
__publicField(this, 'reportCriticalError', (maybeError, extras, tags) => this.reportError(maybeError, extras, tags, true));
|
|
42813
|
+
this.errorIsCritical = errorIsCritical ?? (id3 === 'fatal' || id3.endsWith(':fatal'));
|
|
42814
|
+
}
|
|
42815
|
+
extend(name) {
|
|
42816
|
+
const id3 = this.id + ':' + name;
|
|
42817
|
+
return getLogger2(id3);
|
|
42818
|
+
}
|
|
42819
|
+
/** Returns the messages this logger created that are still in the global replay buffer. */
|
|
42820
|
+
getBufferedMessages() {
|
|
42821
|
+
return replayBuffer.filter((entry) => entry.logger === this);
|
|
42822
|
+
}
|
|
42823
|
+
/** Set new level and return previous level. */
|
|
42824
|
+
setLevel(level) {
|
|
42825
|
+
const previous = this.level;
|
|
42826
|
+
this.level = level;
|
|
42827
|
+
return previous;
|
|
42828
|
+
}
|
|
42829
|
+
/** Check if a trace messages will be output. */
|
|
42830
|
+
isLoggingTraceMessages() {
|
|
42831
|
+
return this.level >= 0;
|
|
42832
|
+
}
|
|
42833
|
+
};
|
|
42834
|
+
function isErrorWithMessage(maybeError) {
|
|
42835
|
+
return Object.prototype.hasOwnProperty.call(maybeError, 'message');
|
|
42836
|
+
}
|
|
42837
|
+
function escapeRegExp(string) {
|
|
42838
|
+
return string.replace(/[/\-\\^$*+?.()|[\]{}]/gu, '\\$&');
|
|
42839
|
+
}
|
|
42840
|
+
var Mixed = Symbol('Mixed');
|
|
42841
|
+
var DEPENDENCIES_MODULE_NAME = 'dependencies';
|
|
42842
|
+
var DEPENDENCIES_MODULE_TYPE = 'config';
|
|
42843
|
+
var DEPENDENCIES_MODULE_TYPE_SLASH_NAME = `${DEPENDENCIES_MODULE_TYPE}/${DEPENDENCIES_MODULE_NAME}`;
|
|
42844
|
+
var IMPORT_MAP_FILE_ID = `${DEPENDENCIES_MODULE_TYPE_SLASH_NAME}/importMap.json`;
|
|
42845
|
+
var DEPENDENCIES_FILE_ID = `${DEPENDENCIES_MODULE_TYPE_SLASH_NAME}/dependencies.json`;
|
|
42846
|
+
var USE_FREEZE = false;
|
|
42847
|
+
var List;
|
|
42848
|
+
((List2) => {
|
|
42849
|
+
function push(ls, ...elements) {
|
|
42850
|
+
return ls.concat(elements);
|
|
42851
|
+
}
|
|
42852
|
+
List2.push = push;
|
|
42853
|
+
function pop(a) {
|
|
42854
|
+
return a.slice(0, -1);
|
|
42855
|
+
}
|
|
42856
|
+
List2.pop = pop;
|
|
42857
|
+
function unshift(ls, ...elements) {
|
|
42858
|
+
return elements.concat(ls);
|
|
42859
|
+
}
|
|
42860
|
+
List2.unshift = unshift;
|
|
42861
|
+
function insert(a, index, ...elements) {
|
|
42862
|
+
const length = a.length;
|
|
42863
|
+
if (index < 0 || index > length)
|
|
42864
|
+
throw Error('index out of range: ' + index);
|
|
42865
|
+
const copy = a.slice();
|
|
42866
|
+
copy.splice(index, 0, ...elements);
|
|
42867
|
+
return copy;
|
|
42868
|
+
}
|
|
42869
|
+
List2.insert = insert;
|
|
42870
|
+
function replace(a, index, replacement) {
|
|
42871
|
+
const length = a.length;
|
|
42872
|
+
if (index < 0 || index >= length)
|
|
42873
|
+
throw Error('index out of range: ' + index);
|
|
42874
|
+
const itemsToAdd = Array.isArray(replacement) ? replacement : [replacement,];
|
|
42875
|
+
const copy = a.slice();
|
|
42876
|
+
copy.splice(index, 1, ...itemsToAdd);
|
|
42877
|
+
return copy;
|
|
42878
|
+
}
|
|
42879
|
+
List2.replace = replace;
|
|
42880
|
+
function remove2(a, index) {
|
|
42881
|
+
const length = a.length;
|
|
42882
|
+
if (index < 0 || index >= length)
|
|
42883
|
+
throw Error('index out of range: ' + index);
|
|
42884
|
+
const copy = a.slice();
|
|
42885
|
+
copy.splice(index, 1);
|
|
42886
|
+
return copy;
|
|
42887
|
+
}
|
|
42888
|
+
List2.remove = remove2;
|
|
42889
|
+
function move(a, from, to) {
|
|
42890
|
+
const length = a.length;
|
|
42891
|
+
if (from < 0 || from >= length)
|
|
42892
|
+
throw Error('from index out of range: ' + from);
|
|
42893
|
+
if (to < 0 || to >= length)
|
|
42894
|
+
throw Error('to index out of range: ' + to);
|
|
42895
|
+
const copy = a.slice();
|
|
42896
|
+
if (to === from)
|
|
42897
|
+
return copy;
|
|
42898
|
+
const element = copy[from];
|
|
42899
|
+
if (from < to) {
|
|
42900
|
+
copy.splice(to + 1, 0, element);
|
|
42901
|
+
copy.splice(from, 1);
|
|
42902
|
+
}
|
|
42903
|
+
else {
|
|
42904
|
+
copy.splice(from, 1);
|
|
42905
|
+
copy.splice(to, 0, element);
|
|
42906
|
+
}
|
|
42907
|
+
return copy;
|
|
42908
|
+
}
|
|
42909
|
+
List2.move = move;
|
|
42910
|
+
function zip(a, b) {
|
|
42911
|
+
const res = [];
|
|
42912
|
+
const length = Math.min(a.length, b.length);
|
|
42913
|
+
for (let i = 0; i < length; i++) {
|
|
42914
|
+
res.push([a[i], b[i],]);
|
|
42915
|
+
}
|
|
42916
|
+
return res;
|
|
42917
|
+
}
|
|
42918
|
+
List2.zip = zip;
|
|
42919
|
+
function update(a, index, body) {
|
|
42920
|
+
const res = a.slice();
|
|
42921
|
+
const targetElement = res[index];
|
|
42922
|
+
if (targetElement === void 0)
|
|
42923
|
+
return res;
|
|
42924
|
+
res[index] = body(targetElement);
|
|
42925
|
+
return res;
|
|
42926
|
+
}
|
|
42927
|
+
List2.update = update;
|
|
42928
|
+
function unique(a) {
|
|
42929
|
+
return Array.from(new Set(a));
|
|
42930
|
+
}
|
|
42931
|
+
List2.unique = unique;
|
|
42932
|
+
function union(a, ...collections) {
|
|
42933
|
+
return Array.from(/* @__PURE__ */ new Set([...a, ...collections.flat(),]));
|
|
42934
|
+
}
|
|
42935
|
+
List2.union = union;
|
|
42936
|
+
function filter2(a, predicate) {
|
|
42937
|
+
return a.filter(predicate);
|
|
42938
|
+
}
|
|
42939
|
+
List2.filter = filter2;
|
|
42940
|
+
})(List || (List = {}));
|
|
42941
|
+
var objectHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
42942
|
+
function hasOwnProperty2(object, property) {
|
|
42943
|
+
return objectHasOwnProperty.call(object, property);
|
|
42944
|
+
}
|
|
42945
|
+
var ValueObject;
|
|
42946
|
+
((ValueObject2) => {
|
|
42947
|
+
function morphUsingTemplate(values, template) {
|
|
42948
|
+
for (const field of Object.keys(values)) {
|
|
42949
|
+
if (!hasOwnProperty2(template, field)) {
|
|
42950
|
+
delete values[field];
|
|
42951
|
+
}
|
|
42952
|
+
}
|
|
42953
|
+
for (const field of Object.keys(template)) {
|
|
42954
|
+
if (values[field] === void 0) {
|
|
42955
|
+
values[field] = template[field];
|
|
42956
|
+
}
|
|
42957
|
+
}
|
|
42958
|
+
Object.setPrototypeOf(values, Object.getPrototypeOf(template));
|
|
42959
|
+
if (USE_FREEZE) {
|
|
42960
|
+
Object.freeze(values);
|
|
42961
|
+
}
|
|
42962
|
+
return values;
|
|
42963
|
+
}
|
|
42964
|
+
ValueObject2.morphUsingTemplate = morphUsingTemplate;
|
|
42965
|
+
function writeOnce(object, values) {
|
|
42966
|
+
if (values) {
|
|
42967
|
+
Object.assign(object, values);
|
|
42968
|
+
}
|
|
42969
|
+
if (USE_FREEZE) {
|
|
42970
|
+
Object.freeze(object);
|
|
42971
|
+
}
|
|
42972
|
+
}
|
|
42973
|
+
ValueObject2.writeOnce = writeOnce;
|
|
42974
|
+
function update(object, values) {
|
|
42975
|
+
const result = Object.assign(Object.create(Object.getPrototypeOf(object)), object, values);
|
|
42976
|
+
if (USE_FREEZE) {
|
|
42977
|
+
Object.freeze(result);
|
|
42978
|
+
}
|
|
42979
|
+
return result;
|
|
42980
|
+
}
|
|
42981
|
+
ValueObject2.update = update;
|
|
42982
|
+
})(ValueObject || (ValueObject = {}));
|
|
42983
|
+
var ReadonlySet;
|
|
42984
|
+
((ReadonlySet2) => {
|
|
42985
|
+
function add3(set, ...items) {
|
|
42986
|
+
return /* @__PURE__ */ new Set([...set, ...items,]);
|
|
42987
|
+
}
|
|
42988
|
+
ReadonlySet2.add = add3;
|
|
42989
|
+
function remove2(set, ...items) {
|
|
42990
|
+
const result = new Set(set);
|
|
42991
|
+
for (const item of items) {
|
|
42992
|
+
result.delete(item);
|
|
42993
|
+
}
|
|
42994
|
+
return result;
|
|
42995
|
+
}
|
|
42996
|
+
ReadonlySet2.remove = remove2;
|
|
42997
|
+
function union(...sets) {
|
|
42998
|
+
const result = /* @__PURE__ */ new Set();
|
|
42999
|
+
for (const set of sets) {
|
|
43000
|
+
for (const item of set) {
|
|
43001
|
+
result.add(item);
|
|
43002
|
+
}
|
|
43003
|
+
}
|
|
43004
|
+
return result;
|
|
43005
|
+
}
|
|
43006
|
+
ReadonlySet2.union = union;
|
|
43007
|
+
function toggle(set, item) {
|
|
43008
|
+
if (set.has(item)) {
|
|
43009
|
+
return ReadonlySet2.remove(set, item);
|
|
43010
|
+
}
|
|
43011
|
+
return ReadonlySet2.add(set, item);
|
|
43012
|
+
}
|
|
43013
|
+
ReadonlySet2.toggle = toggle;
|
|
43014
|
+
})(ReadonlySet || (ReadonlySet = {}));
|
|
43015
|
+
var ReadonlyMap;
|
|
43016
|
+
((ReadonlyMap2) => {
|
|
43017
|
+
function set(map2, key7, value) {
|
|
43018
|
+
const result = new Map(map2);
|
|
43019
|
+
result.set(key7, value);
|
|
43020
|
+
return result;
|
|
43021
|
+
}
|
|
43022
|
+
ReadonlyMap2.set = set;
|
|
43023
|
+
function remove2(map2, key7) {
|
|
43024
|
+
const result = new Map(map2);
|
|
43025
|
+
result.delete(key7);
|
|
43026
|
+
return result;
|
|
43027
|
+
}
|
|
43028
|
+
ReadonlyMap2.remove = remove2;
|
|
43029
|
+
})(ReadonlyMap || (ReadonlyMap = {}));
|
|
43030
|
+
var ResolvablePromise = class extends Promise {
|
|
43031
|
+
constructor() {
|
|
43032
|
+
let res;
|
|
43033
|
+
let rej;
|
|
43034
|
+
super((resolve, reject) => {
|
|
43035
|
+
res = resolve;
|
|
43036
|
+
rej = reject;
|
|
43037
|
+
});
|
|
43038
|
+
__publicField(this, '_state', 'initial');
|
|
43039
|
+
__publicField(this, 'resolve');
|
|
43040
|
+
__publicField(this, 'reject');
|
|
43041
|
+
this.resolve = (val) => {
|
|
43042
|
+
this._state = 'fulfilled';
|
|
43043
|
+
res(val);
|
|
43044
|
+
};
|
|
43045
|
+
this.reject = (reason) => {
|
|
43046
|
+
this._state = 'rejected';
|
|
43047
|
+
rej(reason);
|
|
43048
|
+
};
|
|
43049
|
+
}
|
|
43050
|
+
get state() {
|
|
43051
|
+
return this._state;
|
|
43052
|
+
}
|
|
43053
|
+
/**
|
|
43054
|
+
* A function that sets the state to "pending".
|
|
43055
|
+
* Useful for when you want to signal that the task started but is not yet completed.
|
|
43056
|
+
*/
|
|
43057
|
+
pending() {
|
|
43058
|
+
this._state = 'pending';
|
|
43059
|
+
return this;
|
|
43060
|
+
}
|
|
43061
|
+
isResolved() {
|
|
43062
|
+
return this._state === 'fulfilled' || this._state === 'rejected';
|
|
43063
|
+
}
|
|
43064
|
+
};
|
|
43065
|
+
ResolvablePromise.prototype.constructor = Promise;
|
|
43066
|
+
var hasNativeYield = false;
|
|
43067
|
+
var hasNativePostTask = false;
|
|
43068
|
+
var hasIsInputPending = false;
|
|
43069
|
+
if (typeof window !== 'undefined' && window.scheduler) {
|
|
43070
|
+
hasNativeYield = 'yield' in window.scheduler;
|
|
43071
|
+
hasNativePostTask = 'postTask' in window.scheduler;
|
|
43072
|
+
hasIsInputPending = 'isInputPending' in window.scheduler;
|
|
43073
|
+
}
|
|
43074
|
+
var log2 = getLogger2('task-queue');
|
|
43075
|
+
function getAssetFilename(asset) {
|
|
43076
|
+
return asset.key + asset.extension;
|
|
43077
|
+
}
|
|
43078
|
+
function createAbsoluteAssetURL(filename) {
|
|
43079
|
+
const serviceMap = getServiceMap();
|
|
43080
|
+
return `${serviceMap.userContent}/assets/${filename}`;
|
|
43081
|
+
}
|
|
43082
|
+
function createAbsoluteAssetURLFromAsset(asset) {
|
|
43083
|
+
return createAbsoluteAssetURL(getAssetFilename(asset));
|
|
43084
|
+
}
|
|
42209
43085
|
function supportsOpenType(openTypeData) {
|
|
42210
43086
|
return Boolean(openTypeData && Array.isArray(openTypeData));
|
|
42211
43087
|
}
|
|
@@ -42271,17 +43147,18 @@ var BuiltInFontSource = class {
|
|
|
42271
43147
|
if (!this.isValidBuiltInFont(asset))
|
|
42272
43148
|
continue;
|
|
42273
43149
|
const { properties, } = asset;
|
|
42274
|
-
const fontName = properties.font.
|
|
43150
|
+
const fontName = properties.font.fontFamily;
|
|
42275
43151
|
const fontFamily = this.createFontFamily(fontName, properties.font.foundryName, properties.font.fontVersion);
|
|
42276
43152
|
const openTypeData = properties.font.openTypeData;
|
|
42277
43153
|
const variationAxesData = properties.font.variationAxes;
|
|
42278
43154
|
const isVariableFont2 = Array.isArray(variationAxesData);
|
|
42279
|
-
const variant = isVariableFont2 ? 'variable' : properties.font.
|
|
43155
|
+
const variant = isVariableFont2 ? 'variable' : properties.font.fontSubFamily || 'regular';
|
|
43156
|
+
const url = createAbsoluteAssetURLFromAsset(asset);
|
|
42280
43157
|
const font = {
|
|
42281
43158
|
family: fontFamily,
|
|
42282
43159
|
selector: this.createSelector(fontName, variant, properties.font.fontVersion),
|
|
42283
43160
|
variant,
|
|
42284
|
-
file:
|
|
43161
|
+
file: url,
|
|
42285
43162
|
hasOpenTypeFeatures: supportsOpenType(openTypeData),
|
|
42286
43163
|
variationAxes: validateVariationAxes(variationAxesData),
|
|
42287
43164
|
category: properties.font.fontCategory,
|
|
@@ -42312,12 +43189,10 @@ var BuiltInFontSource = class {
|
|
|
42312
43189
|
style: style2,
|
|
42313
43190
|
};
|
|
42314
43191
|
}
|
|
42315
|
-
getFontBySelector(selector
|
|
43192
|
+
getFontBySelector(selector) {
|
|
42316
43193
|
const locator = this.parseSelector(selector);
|
|
42317
43194
|
if (!locator)
|
|
42318
43195
|
return;
|
|
42319
|
-
if (!createFont && !this.byFamilyName.get(locator.name))
|
|
42320
|
-
return;
|
|
42321
43196
|
const fontFamily = this.getFontFamilyByName(locator.name);
|
|
42322
43197
|
if (!fontFamily)
|
|
42323
43198
|
return;
|
|
@@ -42478,29 +43353,154 @@ function getFontStyle(variant) {
|
|
|
42478
43353
|
return 'italic';
|
|
42479
43354
|
return 'normal';
|
|
42480
43355
|
}
|
|
43356
|
+
function getRelatedFontVariants(currentVariant, availableVariants) {
|
|
43357
|
+
return {
|
|
43358
|
+
...pickBoldItalicVariants(currentVariant, availableVariants),
|
|
43359
|
+
...pickVariableVariants(currentVariant, availableVariants),
|
|
43360
|
+
};
|
|
43361
|
+
}
|
|
43362
|
+
function pickBoldItalicVariants(currentVariant, availableVariants) {
|
|
43363
|
+
if (availableVariants.length === 0) {
|
|
43364
|
+
return {
|
|
43365
|
+
variantBold: void 0,
|
|
43366
|
+
variantBoldItalic: void 0,
|
|
43367
|
+
variantItalic: void 0,
|
|
43368
|
+
};
|
|
43369
|
+
}
|
|
43370
|
+
const { weight: currentWeight, style: currentStyle, } = currentVariant;
|
|
43371
|
+
const variantByWeightAndStyle = /* @__PURE__ */ new Map();
|
|
43372
|
+
const boldVariantByStyle = /* @__PURE__ */ new Map();
|
|
43373
|
+
for (const variant of availableVariants) {
|
|
43374
|
+
if (variant.isVariable !== currentVariant.isVariable)
|
|
43375
|
+
continue;
|
|
43376
|
+
variantByWeightAndStyle.set(`${variant.weight}-${variant.style}`, variant);
|
|
43377
|
+
if (variant.weight <= currentWeight)
|
|
43378
|
+
continue;
|
|
43379
|
+
if (!boldVariantByStyle.has(variant.style)) {
|
|
43380
|
+
boldVariantByStyle.set(variant.style, variant);
|
|
43381
|
+
}
|
|
43382
|
+
}
|
|
43383
|
+
let variantBold = boldVariantByStyle.get(currentStyle);
|
|
43384
|
+
let variantBoldItalic = boldVariantByStyle.get('italic');
|
|
43385
|
+
const currentVariantWeight = currentVariant.weight;
|
|
43386
|
+
if (currentVariantWeight <= 300) {
|
|
43387
|
+
variantBold = variantByWeightAndStyle.get(`400-${currentStyle}`) ?? variantBold;
|
|
43388
|
+
variantBoldItalic = variantByWeightAndStyle.get('400-italic') ?? variantBoldItalic;
|
|
43389
|
+
}
|
|
43390
|
+
else if (currentVariantWeight <= 500) {
|
|
43391
|
+
variantBold = variantByWeightAndStyle.get(`700-${currentStyle}`) ?? variantBold;
|
|
43392
|
+
variantBoldItalic = variantByWeightAndStyle.get('700-italic') ?? variantBoldItalic;
|
|
43393
|
+
}
|
|
43394
|
+
else {
|
|
43395
|
+
variantBold = variantByWeightAndStyle.get(`900-${currentStyle}`) ?? variantBold;
|
|
43396
|
+
variantBoldItalic = variantByWeightAndStyle.get('900-italic') ?? variantBoldItalic;
|
|
43397
|
+
}
|
|
43398
|
+
const variantItalic = variantByWeightAndStyle.get(`${currentWeight}-italic`);
|
|
43399
|
+
return {
|
|
43400
|
+
variantBold,
|
|
43401
|
+
variantItalic,
|
|
43402
|
+
variantBoldItalic,
|
|
43403
|
+
};
|
|
43404
|
+
}
|
|
43405
|
+
function pickVariableVariants(currentVariant, availableVariants) {
|
|
43406
|
+
if (availableVariants.length === 0) {
|
|
43407
|
+
return {
|
|
43408
|
+
variantVariable: void 0,
|
|
43409
|
+
variantVariableItalic: void 0,
|
|
43410
|
+
};
|
|
43411
|
+
}
|
|
43412
|
+
const variantByWeightAndStyle = /* @__PURE__ */ new Map();
|
|
43413
|
+
let variantVariable;
|
|
43414
|
+
let variantVariableItalic;
|
|
43415
|
+
let fallbackVariant;
|
|
43416
|
+
let fallbackItalicVariant;
|
|
43417
|
+
for (const variant of availableVariants) {
|
|
43418
|
+
if (!variant.isVariable)
|
|
43419
|
+
continue;
|
|
43420
|
+
const isSameWeight = variant.weight === currentVariant.weight;
|
|
43421
|
+
const isDefaultWeight = variant.weight === 400;
|
|
43422
|
+
if (variant.style === 'normal') {
|
|
43423
|
+
if (isSameWeight) {
|
|
43424
|
+
variantVariable = variant;
|
|
43425
|
+
}
|
|
43426
|
+
else if (isDefaultWeight) {
|
|
43427
|
+
fallbackVariant = variant;
|
|
43428
|
+
}
|
|
43429
|
+
else if (!fallbackVariant) {
|
|
43430
|
+
fallbackVariant = variant;
|
|
43431
|
+
}
|
|
43432
|
+
}
|
|
43433
|
+
else if (variant.style === 'italic') {
|
|
43434
|
+
if (isSameWeight) {
|
|
43435
|
+
variantVariableItalic = variant;
|
|
43436
|
+
}
|
|
43437
|
+
else if (isDefaultWeight) {
|
|
43438
|
+
fallbackItalicVariant = variant;
|
|
43439
|
+
}
|
|
43440
|
+
else if (!fallbackItalicVariant) {
|
|
43441
|
+
fallbackItalicVariant = variant;
|
|
43442
|
+
}
|
|
43443
|
+
}
|
|
43444
|
+
}
|
|
43445
|
+
return {
|
|
43446
|
+
variantVariable: variantVariable ?? fallbackVariant,
|
|
43447
|
+
variantVariableItalic: variantVariableItalic ?? fallbackItalicVariant,
|
|
43448
|
+
};
|
|
43449
|
+
}
|
|
42481
43450
|
var customFontSelectorPrefix = 'CUSTOM;';
|
|
43451
|
+
var log3 = getLogger('custom-font-source');
|
|
43452
|
+
function findDuplicateFont(existingFonts, newFont) {
|
|
43453
|
+
for (let i = 0; i < existingFonts.length; i++) {
|
|
43454
|
+
const existingFont = existingFonts[i];
|
|
43455
|
+
if (existingFont && existingFont.selector === newFont.selector && existingFont.weight === newFont.weight &&
|
|
43456
|
+
existingFont.style === newFont.style) {
|
|
43457
|
+
return {
|
|
43458
|
+
existingFont,
|
|
43459
|
+
index: i,
|
|
43460
|
+
};
|
|
43461
|
+
}
|
|
43462
|
+
}
|
|
43463
|
+
return void 0;
|
|
43464
|
+
}
|
|
42482
43465
|
function getCustomFontName(fileName, properties) {
|
|
42483
43466
|
if (!properties)
|
|
42484
43467
|
return fileName.substring(0, fileName.lastIndexOf('.'));
|
|
42485
43468
|
const { font, } = properties;
|
|
42486
|
-
const fontFamily = font.
|
|
43469
|
+
const fontFamily = font.fontFamily;
|
|
42487
43470
|
const isAssetVariableFont = Array.isArray(font.variationAxes);
|
|
42488
43471
|
if (isAssetVariableFont && fontFamily.toLowerCase().includes('variable'))
|
|
42489
43472
|
return fontFamily;
|
|
42490
|
-
const variant = isAssetVariableFont ? 'Variable' :
|
|
43473
|
+
const variant = isAssetVariableFont ? 'Variable' : font.fontSubFamily.trim();
|
|
42491
43474
|
if (variant === '')
|
|
42492
43475
|
return fontFamily;
|
|
42493
43476
|
return `${fontFamily} ${variant}`;
|
|
42494
43477
|
}
|
|
42495
|
-
|
|
43478
|
+
function getCustomFontInfo({ fontFamily, fontSubFamily, variationAxes, faceDescriptors, }) {
|
|
43479
|
+
const rawVariant = fontSubFamily.trim() || 'Regular';
|
|
43480
|
+
const containsVariant = rawVariant.toLocaleLowerCase().includes('variable');
|
|
43481
|
+
const variant = validateVariationAxes(variationAxes) && !containsVariant ? `Variable ${rawVariant}` : rawVariant;
|
|
43482
|
+
let style2 = 'normal';
|
|
43483
|
+
let weight = 400;
|
|
43484
|
+
if (faceDescriptors) {
|
|
43485
|
+
weight = faceDescriptors.weight;
|
|
43486
|
+
style2 = faceDescriptors.italic || faceDescriptors.oblique ? 'italic' : 'normal';
|
|
43487
|
+
}
|
|
43488
|
+
return {
|
|
43489
|
+
family: fontFamily,
|
|
43490
|
+
variant,
|
|
43491
|
+
weight,
|
|
43492
|
+
style: style2,
|
|
43493
|
+
};
|
|
43494
|
+
}
|
|
43495
|
+
var CustomFontSource = class _CustomFontSource {
|
|
42496
43496
|
constructor() {
|
|
42497
43497
|
__publicField(this, 'name', 'custom');
|
|
42498
43498
|
__publicField(this, 'fontFamilies', []);
|
|
42499
43499
|
__publicField(this, 'byFamilyName', /* @__PURE__ */ new Map());
|
|
42500
43500
|
__publicField(this, 'assetsByFamily', /* @__PURE__ */ new Map());
|
|
42501
43501
|
}
|
|
42502
|
-
|
|
42503
|
-
var _a, _b
|
|
43502
|
+
deprecatedImportFonts(assets) {
|
|
43503
|
+
var _a, _b;
|
|
42504
43504
|
this.fontFamilies.length = 0;
|
|
42505
43505
|
this.byFamilyName.clear();
|
|
42506
43506
|
this.assetsByFamily.clear();
|
|
@@ -42515,12 +43515,12 @@ var CustomFontSource = class {
|
|
|
42515
43515
|
const fontFamily = this.createFontFamily(fontName);
|
|
42516
43516
|
const openTypeData = (_b = asset.properties) == null ? void 0 : _b.font.openTypeData;
|
|
42517
43517
|
const variant = isVariableFont2 ? 'variable' : this.inferVariantName(fontName);
|
|
43518
|
+
const url = createAbsoluteAssetURLFromAsset(asset);
|
|
42518
43519
|
const font = {
|
|
42519
43520
|
family: fontFamily,
|
|
42520
43521
|
selector: `${customFontSelectorPrefix}${fontName}`,
|
|
42521
43522
|
variant,
|
|
42522
|
-
|
|
42523
|
-
file: asset.url,
|
|
43523
|
+
file: url,
|
|
42524
43524
|
hasOpenTypeFeatures: supportsOpenType(openTypeData),
|
|
42525
43525
|
variationAxes: validateVariationAxes(variationAxesData),
|
|
42526
43526
|
};
|
|
@@ -42531,6 +43531,61 @@ var CustomFontSource = class {
|
|
|
42531
43531
|
}
|
|
42532
43532
|
return fonts;
|
|
42533
43533
|
}
|
|
43534
|
+
importFonts(assets, enableFontImprovements) {
|
|
43535
|
+
var _a, _b, _c, _d;
|
|
43536
|
+
if (!enableFontImprovements) {
|
|
43537
|
+
return this.deprecatedImportFonts(assets);
|
|
43538
|
+
}
|
|
43539
|
+
this.fontFamilies.length = 0;
|
|
43540
|
+
this.byFamilyName.clear();
|
|
43541
|
+
this.assetsByFamily.clear();
|
|
43542
|
+
const fonts = {};
|
|
43543
|
+
for (const asset of assets) {
|
|
43544
|
+
if (!this.isValidCustomFontAsset(asset)) {
|
|
43545
|
+
continue;
|
|
43546
|
+
}
|
|
43547
|
+
const { family, variant, weight, style: style2, } = getCustomFontInfo(asset.properties.font);
|
|
43548
|
+
const fontFamily = this.createFontFamily(family);
|
|
43549
|
+
const openTypeData = (_a = asset.properties) == null ? void 0 : _a.font.openTypeData;
|
|
43550
|
+
const url = createAbsoluteAssetURLFromAsset(asset);
|
|
43551
|
+
const font = {
|
|
43552
|
+
family: fontFamily,
|
|
43553
|
+
selector: _CustomFontSource.createSelector(fontFamily.name, variant),
|
|
43554
|
+
variant,
|
|
43555
|
+
weight,
|
|
43556
|
+
style: style2,
|
|
43557
|
+
file: url,
|
|
43558
|
+
hasOpenTypeFeatures: supportsOpenType(openTypeData),
|
|
43559
|
+
variationAxes: validateVariationAxes((_b = asset.properties) == null ? void 0 : _b.font.variationAxes),
|
|
43560
|
+
};
|
|
43561
|
+
const duplicateInfo = findDuplicateFont(fontFamily.fonts, font);
|
|
43562
|
+
if (duplicateInfo) {
|
|
43563
|
+
log3.warn('Duplicate font found for:', font, 'with existing font:', duplicateInfo.existingFont);
|
|
43564
|
+
const existingFont = duplicateInfo.existingFont;
|
|
43565
|
+
const newIsWoff2 = ((_c = font.file) == null ? void 0 : _c.endsWith('.woff2')) ?? false;
|
|
43566
|
+
const existingIsWoff2 = ((_d = existingFont.file) == null ? void 0 : _d.endsWith('.woff2')) ?? false;
|
|
43567
|
+
if (newIsWoff2 && !existingIsWoff2) {
|
|
43568
|
+
fontFamily.fonts[duplicateInfo.index] = font;
|
|
43569
|
+
fonts[font.selector] = font;
|
|
43570
|
+
}
|
|
43571
|
+
}
|
|
43572
|
+
else {
|
|
43573
|
+
fontFamily.fonts.push(font);
|
|
43574
|
+
fonts[font.selector] = font;
|
|
43575
|
+
}
|
|
43576
|
+
fontFamily.owner = asset.ownerType === 'team' ? 'team' : 'project';
|
|
43577
|
+
this.assetsByFamily.set(family, asset);
|
|
43578
|
+
}
|
|
43579
|
+
for (const fontFamily of this.fontFamilies) {
|
|
43580
|
+
if (fontFamily.fonts.length > 0) {
|
|
43581
|
+
updateFontRelationships(fontFamily);
|
|
43582
|
+
}
|
|
43583
|
+
}
|
|
43584
|
+
return Object.values(fonts);
|
|
43585
|
+
}
|
|
43586
|
+
static createSelector(family, variant) {
|
|
43587
|
+
return `${customFontSelectorPrefix}${family}${variant ? ` ${variant}` : ''}`;
|
|
43588
|
+
}
|
|
42534
43589
|
isValidCustomFontAsset(asset) {
|
|
42535
43590
|
var _a;
|
|
42536
43591
|
if (!asset.mimeType.startsWith('font/'))
|
|
@@ -42584,125 +43639,72 @@ var CustomFontSource = class {
|
|
|
42584
43639
|
this.fontFamilies.push(fontFamily);
|
|
42585
43640
|
this.byFamilyName.set(fontFamily.name, fontFamily);
|
|
42586
43641
|
}
|
|
42587
|
-
|
|
43642
|
+
getFontBySelector(selector) {
|
|
42588
43643
|
if (!selector.startsWith(customFontSelectorPrefix))
|
|
42589
|
-
return
|
|
42590
|
-
const
|
|
42591
|
-
if (
|
|
42592
|
-
return
|
|
42593
|
-
const
|
|
42594
|
-
|
|
42595
|
-
|
|
42596
|
-
|
|
42597
|
-
|
|
42598
|
-
|
|
42599
|
-
|
|
42600
|
-
|
|
42601
|
-
|
|
42602
|
-
|
|
42603
|
-
|
|
42604
|
-
|
|
42605
|
-
|
|
42606
|
-
|
|
42607
|
-
|
|
42608
|
-
|
|
42609
|
-
|
|
42610
|
-
|
|
43644
|
+
return void 0;
|
|
43645
|
+
const remainingSelector = selector.slice(customFontSelectorPrefix.length);
|
|
43646
|
+
if (!remainingSelector)
|
|
43647
|
+
return void 0;
|
|
43648
|
+
const matchingFonts = [];
|
|
43649
|
+
for (const [familyName, fontFamily,] of this.byFamilyName) {
|
|
43650
|
+
if (remainingSelector.startsWith(familyName)) {
|
|
43651
|
+
const exactMatches = fontFamily.fonts.filter((font) => font.selector === selector);
|
|
43652
|
+
matchingFonts.push(...exactMatches);
|
|
43653
|
+
}
|
|
43654
|
+
}
|
|
43655
|
+
if (matchingFonts.length > 0) {
|
|
43656
|
+
if (matchingFonts.length > 1) {
|
|
43657
|
+
const woff2Font = matchingFonts.find((font) => {
|
|
43658
|
+
var _a;
|
|
43659
|
+
return (_a = font.file) == null ? void 0 : _a.endsWith('.woff2');
|
|
43660
|
+
});
|
|
43661
|
+
if (woff2Font)
|
|
43662
|
+
return woff2Font;
|
|
43663
|
+
}
|
|
43664
|
+
return matchingFonts[0];
|
|
43665
|
+
}
|
|
43666
|
+
return void 0;
|
|
42611
43667
|
}
|
|
42612
43668
|
getFontFamilyByName(family) {
|
|
42613
43669
|
const foundFontFamily = this.byFamilyName.get(family);
|
|
42614
|
-
if (foundFontFamily)
|
|
42615
|
-
return
|
|
42616
|
-
|
|
42617
|
-
source: 'custom',
|
|
42618
|
-
name: family,
|
|
42619
|
-
fonts: [],
|
|
42620
|
-
};
|
|
42621
|
-
fontFamily.fonts.push({
|
|
42622
|
-
selector: `${customFontSelectorPrefix}${family}`,
|
|
42623
|
-
variant: this.inferVariantName(family),
|
|
42624
|
-
family: fontFamily,
|
|
42625
|
-
});
|
|
42626
|
-
return fontFamily;
|
|
43670
|
+
if (!foundFontFamily)
|
|
43671
|
+
return null;
|
|
43672
|
+
return foundFontFamily;
|
|
42627
43673
|
}
|
|
42628
43674
|
};
|
|
42629
|
-
function
|
|
42630
|
-
|
|
42631
|
-
|
|
42632
|
-
...pickVariableVariants(currentVariant, availableVariants),
|
|
42633
|
-
};
|
|
42634
|
-
}
|
|
42635
|
-
function pickBoldItalicVariants(currentVariant, availableVariants) {
|
|
42636
|
-
if (availableVariants.length === 0) {
|
|
42637
|
-
return {
|
|
42638
|
-
variantBold: void 0,
|
|
42639
|
-
variantBoldItalic: void 0,
|
|
42640
|
-
variantItalic: void 0,
|
|
42641
|
-
};
|
|
42642
|
-
}
|
|
42643
|
-
const { weight: currentWeight, style: currentStyle, } = currentVariant;
|
|
42644
|
-
const variantByWeightAndStyle = /* @__PURE__ */ new Map();
|
|
42645
|
-
const boldVariantByStyle = /* @__PURE__ */ new Map();
|
|
42646
|
-
for (const variant of availableVariants) {
|
|
42647
|
-
if (variant.isVariable !== currentVariant.isVariable)
|
|
42648
|
-
continue;
|
|
42649
|
-
variantByWeightAndStyle.set(`${variant.weight}-${variant.style}`, variant);
|
|
42650
|
-
if (variant.weight <= currentWeight)
|
|
42651
|
-
continue;
|
|
42652
|
-
if (!boldVariantByStyle.has(variant.style)) {
|
|
42653
|
-
boldVariantByStyle.set(variant.style, variant);
|
|
42654
|
-
}
|
|
42655
|
-
}
|
|
42656
|
-
let variantBold = boldVariantByStyle.get(currentStyle);
|
|
42657
|
-
let variantBoldItalic = boldVariantByStyle.get('italic');
|
|
42658
|
-
const currentVariantWeight = currentVariant.weight;
|
|
42659
|
-
if (currentVariantWeight <= 300) {
|
|
42660
|
-
variantBold = variantByWeightAndStyle.get(`400-${currentStyle}`) ?? variantBold;
|
|
42661
|
-
variantBoldItalic = variantByWeightAndStyle.get('400-italic') ?? variantBoldItalic;
|
|
42662
|
-
}
|
|
42663
|
-
else if (currentVariantWeight <= 500) {
|
|
42664
|
-
variantBold = variantByWeightAndStyle.get(`700-${currentStyle}`) ?? variantBold;
|
|
42665
|
-
variantBoldItalic = variantByWeightAndStyle.get('700-italic') ?? variantBoldItalic;
|
|
42666
|
-
}
|
|
42667
|
-
else {
|
|
42668
|
-
variantBold = variantByWeightAndStyle.get(`900-${currentStyle}`) ?? variantBold;
|
|
42669
|
-
variantBoldItalic = variantByWeightAndStyle.get('900-italic') ?? variantBoldItalic;
|
|
42670
|
-
}
|
|
42671
|
-
const variantItalic = variantByWeightAndStyle.get(`${currentWeight}-italic`);
|
|
43675
|
+
function fontToVariantWithMetadata(font) {
|
|
43676
|
+
if (!font.weight || !font.style)
|
|
43677
|
+
return void 0;
|
|
42672
43678
|
return {
|
|
42673
|
-
|
|
42674
|
-
|
|
42675
|
-
|
|
42676
|
-
|
|
42677
|
-
}
|
|
42678
|
-
|
|
42679
|
-
|
|
42680
|
-
|
|
42681
|
-
|
|
42682
|
-
|
|
42683
|
-
|
|
42684
|
-
|
|
42685
|
-
const variantByWeightAndStyle = /* @__PURE__ */ new Map();
|
|
42686
|
-
for (const variant of availableVariants) {
|
|
42687
|
-
if (!variant.isVariable)
|
|
43679
|
+
weight: font.weight,
|
|
43680
|
+
style: font.style,
|
|
43681
|
+
isVariable: isVariableFont(font),
|
|
43682
|
+
selector: font.selector,
|
|
43683
|
+
};
|
|
43684
|
+
}
|
|
43685
|
+
function updateFontRelationships(fontFamily) {
|
|
43686
|
+
var _a, _b, _c, _d, _e;
|
|
43687
|
+
const availableVariants = fontFamily.fonts.map((font) => fontToVariantWithMetadata(font)).filter((font) => font !== void 0);
|
|
43688
|
+
for (const font of fontFamily.fonts) {
|
|
43689
|
+
const variant = fontToVariantWithMetadata(font);
|
|
43690
|
+
if (!variant)
|
|
42688
43691
|
continue;
|
|
42689
|
-
|
|
43692
|
+
const relatedVariants = getRelatedFontVariants(variant, availableVariants);
|
|
43693
|
+
font.selectorVariable = (_a = relatedVariants.variantVariable) == null ? void 0 : _a.selector;
|
|
43694
|
+
font.selectorVariableItalic = (_b = relatedVariants.variantVariableItalic) == null ? void 0 : _b.selector;
|
|
43695
|
+
font.selectorBold = (_c = relatedVariants.variantBold) == null ? void 0 : _c.selector;
|
|
43696
|
+
font.selectorBoldItalic = (_d = relatedVariants.variantBoldItalic) == null ? void 0 : _d.selector;
|
|
43697
|
+
font.selectorItalic = (_e = relatedVariants.variantItalic) == null ? void 0 : _e.selector;
|
|
42690
43698
|
}
|
|
42691
|
-
return {
|
|
42692
|
-
variantVariable: variantByWeightAndStyle.get(`${currentVariant.weight}-normal`) ?? variantByWeightAndStyle.get(`400-normal`) ??
|
|
42693
|
-
void 0,
|
|
42694
|
-
variantVariableItalic: variantByWeightAndStyle.get(`${currentVariant.weight}-italic`) ?? variantByWeightAndStyle.get(`400-italic`) ??
|
|
42695
|
-
void 0,
|
|
42696
|
-
};
|
|
42697
43699
|
}
|
|
42698
43700
|
async function loadFontsWithOpenType(source) {
|
|
42699
43701
|
switch (source) {
|
|
42700
43702
|
case 'google': {
|
|
42701
|
-
const supportedFonts = await import('./framer-chunks/google-
|
|
43703
|
+
const supportedFonts = await import('./framer-chunks/google-3ASCFEEO-3R47BR2A.js');
|
|
42702
43704
|
return supportedFonts == null ? void 0 : supportedFonts.default;
|
|
42703
43705
|
}
|
|
42704
43706
|
case 'fontshare': {
|
|
42705
|
-
const supportedFonts = await import('./framer-chunks/fontshare-
|
|
43707
|
+
const supportedFonts = await import('./framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.js');
|
|
42706
43708
|
return supportedFonts == null ? void 0 : supportedFonts.default;
|
|
42707
43709
|
}
|
|
42708
43710
|
default:
|
|
@@ -42712,11 +43714,11 @@ async function loadFontsWithOpenType(source) {
|
|
|
42712
43714
|
async function loadFontToOpenTypeFeatures(source) {
|
|
42713
43715
|
switch (source) {
|
|
42714
43716
|
case 'google': {
|
|
42715
|
-
const features = await import('./framer-chunks/google-
|
|
43717
|
+
const features = await import('./framer-chunks/google-FDB6LUFQ-PFSUZGKF.js');
|
|
42716
43718
|
return features == null ? void 0 : features.default;
|
|
42717
43719
|
}
|
|
42718
43720
|
case 'fontshare': {
|
|
42719
|
-
const features = await import('./framer-chunks/fontshare-
|
|
43721
|
+
const features = await import('./framer-chunks/fontshare-622CVMZZ-HFPH543A.js');
|
|
42720
43722
|
return features == null ? void 0 : features.default;
|
|
42721
43723
|
}
|
|
42722
43724
|
case 'framer': {
|
|
@@ -43240,10 +44242,10 @@ function loadVariationAxes(source) {
|
|
|
43240
44242
|
const axes = (async () => {
|
|
43241
44243
|
switch (source) {
|
|
43242
44244
|
case 'google': {
|
|
43243
|
-
return (await import('./framer-chunks/google-
|
|
44245
|
+
return (await import('./framer-chunks/google-C62SNV32-LCI4F7VO.js')).default;
|
|
43244
44246
|
}
|
|
43245
44247
|
case 'fontshare': {
|
|
43246
|
-
return (await import('./framer-chunks/fontshare-
|
|
44248
|
+
return (await import('./framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.js')).default;
|
|
43247
44249
|
}
|
|
43248
44250
|
default:
|
|
43249
44251
|
assertNever(source);
|
|
@@ -43349,13 +44351,13 @@ var FontStore = class {
|
|
|
43349
44351
|
this.addFont(font);
|
|
43350
44352
|
});
|
|
43351
44353
|
}
|
|
43352
|
-
importCustomFonts(assets) {
|
|
44354
|
+
importCustomFonts(assets, enableFontImprovements) {
|
|
43353
44355
|
this.bySelector.forEach((_, key7) => {
|
|
43354
44356
|
if (key7.startsWith(customFontSelectorPrefix)) {
|
|
43355
44357
|
this.bySelector.delete(key7);
|
|
43356
44358
|
}
|
|
43357
44359
|
});
|
|
43358
|
-
const importedFonts = this.custom.importFonts(assets);
|
|
44360
|
+
const importedFonts = this.custom.importFonts(assets, enableFontImprovements);
|
|
43359
44361
|
for (const font of importedFonts) {
|
|
43360
44362
|
this.addFont(font);
|
|
43361
44363
|
}
|
|
@@ -43363,15 +44365,22 @@ var FontStore = class {
|
|
|
43363
44365
|
this.resolveCustomFontsImportPromise();
|
|
43364
44366
|
}
|
|
43365
44367
|
}
|
|
44368
|
+
/**
|
|
44369
|
+
* Returns a promise that resolves when custom fonts have been imported
|
|
44370
|
+
* @internal
|
|
44371
|
+
*/
|
|
44372
|
+
getCustomFontsImportPromise() {
|
|
44373
|
+
return this.customFontsImportPromise;
|
|
44374
|
+
}
|
|
43366
44375
|
getFontFamily(info) {
|
|
43367
44376
|
const fontFamily = this[info.source].getFontFamilyByName(info.name);
|
|
43368
44377
|
return fontFamily;
|
|
43369
44378
|
}
|
|
43370
|
-
getFontBySelector(selector
|
|
44379
|
+
getFontBySelector(selector) {
|
|
43371
44380
|
if (!selector)
|
|
43372
44381
|
return void 0;
|
|
43373
44382
|
if (selector.startsWith(customFontSelectorPrefix)) {
|
|
43374
|
-
return this.custom.getFontBySelector(selector
|
|
44383
|
+
return this.custom.getFontBySelector(selector);
|
|
43375
44384
|
}
|
|
43376
44385
|
return this.bySelector.get(selector);
|
|
43377
44386
|
}
|
|
@@ -44190,11 +45199,6 @@ var Image2 = /* @__PURE__ */ React4.forwardRef(function Image3(props, ref) {
|
|
|
44190
45199
|
],
|
|
44191
45200
|
});
|
|
44192
45201
|
});
|
|
44193
|
-
var nonSlugCharactersRegExp = /[^\p{Letter}\p{Number}()]+/gu;
|
|
44194
|
-
var trimSlugRegExp = /^-+|-+$/gu;
|
|
44195
|
-
function slugify(value) {
|
|
44196
|
-
return value.toLowerCase().replace(nonSlugCharactersRegExp, '-').replace(trimSlugRegExp, '');
|
|
44197
|
-
}
|
|
44198
45202
|
var frameFromElement = (element) => {
|
|
44199
45203
|
const frame2 = Rect.fromRect(element.getBoundingClientRect());
|
|
44200
45204
|
frame2.x = frame2.x + safeWindow.scrollX;
|
|
@@ -45354,11 +46358,11 @@ function imagePatternPropsForFill(fill, frame2, id3, includeTransform) {
|
|
|
45354
46358
|
};
|
|
45355
46359
|
}
|
|
45356
46360
|
var mediaType2 = 'framer/asset-reference,';
|
|
45357
|
-
function
|
|
46361
|
+
function isAssetReference2(value) {
|
|
45358
46362
|
return value.startsWith(`data:${mediaType2}`);
|
|
45359
46363
|
}
|
|
45360
46364
|
function imageUrlForAsset(asset, pixelSize) {
|
|
45361
|
-
if (/^\w+:/u.test(asset) && !
|
|
46365
|
+
if (/^\w+:/u.test(asset) && !isAssetReference2(asset))
|
|
45362
46366
|
return asset;
|
|
45363
46367
|
if (typeof pixelSize !== 'number')
|
|
45364
46368
|
pixelSize = void 0;
|
|
@@ -47418,12 +48422,12 @@ var package_default = {
|
|
|
47418
48422
|
author: 'Framer',
|
|
47419
48423
|
license: 'MIT',
|
|
47420
48424
|
scripts: {
|
|
47421
|
-
coverage: '
|
|
47422
|
-
lint: '
|
|
48425
|
+
coverage: 'jest --coverage',
|
|
48426
|
+
lint: 'eslint ./src --ext .ts,.tsx --format gha-codeframe --quiet --cache',
|
|
47423
48427
|
'lint:ci': 'yarn lint --cache-strategy content --cache-location $HOME/.cache/eslint/framer-library',
|
|
47424
48428
|
'lint:fix': 'yarn lint --fix',
|
|
47425
|
-
test: '
|
|
47426
|
-
watch: '
|
|
48429
|
+
test: 'jest',
|
|
48430
|
+
watch: 'jest --watch',
|
|
47427
48431
|
postinstall: 'node postinstall.cjs',
|
|
47428
48432
|
},
|
|
47429
48433
|
dependencies: {
|
|
@@ -47440,17 +48444,19 @@ var package_default = {
|
|
|
47440
48444
|
'@testing-library/react': '^13.4.0',
|
|
47441
48445
|
'@testing-library/user-event': '^14.4.3',
|
|
47442
48446
|
'@types/dom-navigation': '^1.0.5',
|
|
47443
|
-
'@types/
|
|
47444
|
-
'@types/
|
|
47445
|
-
'@types/
|
|
47446
|
-
'@types/react
|
|
48447
|
+
'@types/fontfaceobserver': '2.1',
|
|
48448
|
+
'@types/google.fonts': '1.0',
|
|
48449
|
+
'@types/node': '22.16',
|
|
48450
|
+
'@types/react': '18.2',
|
|
48451
|
+
'@types/react-dom': '18.2',
|
|
47447
48452
|
'@types/yargs': '^17.0.33',
|
|
47448
|
-
'@typescript-eslint/eslint-plugin': '^8.
|
|
47449
|
-
'@typescript-eslint/parser': '^8.
|
|
48453
|
+
'@typescript-eslint/eslint-plugin': '^8.36.0',
|
|
48454
|
+
'@typescript-eslint/parser': '^8.36.0',
|
|
47450
48455
|
chalk: '^4.1.2',
|
|
47451
48456
|
eslint: '^8.57.1',
|
|
47452
48457
|
'eslint-plugin-framer-studio': 'workspace:*',
|
|
47453
48458
|
immutable: '^3.8.2',
|
|
48459
|
+
jest: '29.4.1',
|
|
47454
48460
|
'jest-diff': '^29.3.1',
|
|
47455
48461
|
'jest-environment-jsdom': '^29.3.1',
|
|
47456
48462
|
'jest-environment-jsdom-global': '^4.0.0',
|
|
@@ -47458,11 +48464,11 @@ var package_default = {
|
|
|
47458
48464
|
react: '^18.2.0',
|
|
47459
48465
|
'react-dom': '^18.2.0',
|
|
47460
48466
|
semver: '^7.7.1',
|
|
47461
|
-
typescript: '^5.
|
|
48467
|
+
typescript: '^5.8.3',
|
|
47462
48468
|
yargs: '^17.7.2',
|
|
47463
48469
|
},
|
|
47464
48470
|
peerDependencies: {
|
|
47465
|
-
'framer-motion': '12.14.0',
|
|
48471
|
+
'framer-motion': '>=12.14.0',
|
|
47466
48472
|
react: '^18.2.0',
|
|
47467
48473
|
'react-dom': '^18.2.0',
|
|
47468
48474
|
},
|
|
@@ -47480,7 +48486,7 @@ MotionValue.prototype.addChild = function ({ transformer = (v) => v, }) {
|
|
|
47480
48486
|
if (false) {
|
|
47481
48487
|
MainLoop2.start();
|
|
47482
48488
|
}
|
|
47483
|
-
export { _injectRuntime, acceleratedValues2 as acceleratedValues, activeAnimations, addActionControls, addAttrValue, addFonts, addPointerEvent, addPointerInfo, addPropertyControls, addScaleCorrector, addStyleValue, addUniqueItem, alpha, analyseComplexValue, AnchorLinkTarget, Animatable, animate2 as animate, animateMini, AnimatePresence, AnimateSharedLayout, animateValue, animateView, animateVisualElement, animationControls, animationMapKey, animations, annotateTypeOnStringify, anticipate, AnyInterpolation, applyPxDefaults, AsyncMotionValueAnimation, attachSpring, attrEffect, AutomaticLayoutIds, BackgroundImage, backgroundImageFromProps, backIn, backInOut, backOut, BezierAnimator, BoxShadow, buildTransform2 as buildTransform, calcGeneratorDuration, calcLength, calculateRect, callEach, cancelFrame, cancelMicrotask, cancelSync, ChildrenCanSuspend, circIn, circInOut, circOut, clamp, clampRGB, collectMotionValues, collectVisualStyleFromProps, Color, color, ColorFormat, ColorMixModelType, combinedCSSRulesForPreview, complex, ComponentContainerContext, ComponentPresetsConsumer, ComponentPresetsProvider, ComponentViewportProvider, ConstraintMask, constraintsEnabled, ConstraintValues, Container, ControlType, ConvertColor, convertOffsetToTimes, convertPropsToDeviceOptions, createBox, createData, createFramerPageLink, createGeneratorEasing, createRenderBatcher, createRendererMotionComponent, createScopedAnimate, cssBackgroundSize, cubicBezier, cubicBezierAsString, CustomCursorHost, CustomProperties, cx, CycleVariantState, Data, DataContext, DataObserver, DataObserverContext, debounce, defaultDeviceProps, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, degrees, degreesToRadians, delay, DeprecatedComponentContainer, DeprecatedFrameWithEvents, DeprecatedLayoutGroupContext, DeprecatedLayoutGroupContext as LayoutGroupContext, Device, DeviceCodeComponent, devicePresets, DimensionType, dimensionValueTypes, disableInstantTransitions, dispatchKeyDownEvent, distance, distance2D, DOM, domAnimation, DOMKeyframesResolver, domMax, domMin, DragControls, Draggable, easeIn, easeInOut, easeOut, easingDefinitionToFunction, EmptyState, environment, ErrorPlaceholder, executeInRenderEnvironment, Fetcher, fillOffset, fillWildcards, filterProps, findDimensionValueType, findValueType, finiteNumber, FlatTree, Floating, flushKeyframeResolvers, FontSourceNames, fontStore, forceLayerBackingWithCSSProperties, FormBooleanInput, FormContainer, FormPlainTextInput2 as FormPlainTextInput, FormSelect, fraction, Frame, frame, frameData, frameFromElement, frameFromElements, FramerAnimation, framerAppearAnimationScriptKey, framerAppearEffects, framerAppearIdKey, framerAppearTransformTemplateToken, framerCSSMarker, FramerEvent, FramerEventListener, FramerEventSession, frameSteps, FrameWithMotion, GamepadContext, GeneratedComponentContext, generateLinearEasing, getAnimatableNone2 as getAnimatableNone, getAnimationMap, getComponentSize, getComputedStyle2 as getComputedStyle, getDefaultValueType, getDevicePreset, getEasingForSegment, getFonts, getFontsFromComponentPreset, getFontsFromSharedStyle, getLoadingLazyAtYPosition, getMeasurableCodeComponentChildren, getMixer, getPropertyControls, getValueAsType, getValueTransition, getVariableValue, getWhereExpressionFromPathVariables, GracefullyDegradingErrorBoundary, gradientForShape, GroupAnimation, GroupAnimationWithThen, hasWarned, hex, hover, hsla, hslaToRgba, Image2 as Image, imagePatternPropsForFill, imageUrlForAsset, inertia, inferInitialRouteFromPath, injectComponentCSSRules, installFlexboxGapWorkaroundIfNeeded, Instance, InternalID, interpolate, invariant, inView, invisibleValues, isAnimatable2 as isAnimatable, isBezierDefinition, isBrowser, isCSSVariableName, isCSSVariableToken, isDesignDefinition, isDragActive, isDragging, isEasingArray, isEqual, isFiniteNumber, isFractionDimension, isFramerGamepadKeydownData, isFramerPageLink, isGapEnabled, isGenerator, isHTMLElement, isMotionComponent, isMotionValue2 as isMotionValue, isNodeOrChild, isNumericalString, isObject, isOfAnnotatedType, isOverride, isPrimaryPointer, isReactDefinition, isRelativeNumber, isShallowEqualArray, isStaticRenderer, isStraightCurve, isSVGElement, isSVGSVGElement, isValidMotionProp, isWaapiSupportedEasing, isZeroValueString, JSAnimation, KeyframeResolver, keyframes, Layer, LayoutGroup, LayoutIdContext, lazy, LazyMotion, LazyValue, LibraryFeaturesProvider, Line, LinearGradient, Link, loadFont, loadJSON, localPackageFallbackIdentifier, localShadowFrame, m, MainLoop, makePaddingString, makeUseVisualState, mapEasingToNativeEasing, mapValue, markHydrationStart, maxGeneratorDuration, memo, memoize2 as memoize, microtask, millisecondsToSeconds, mirrorEasing, mix, mixArray, mixColor, mixComplex, mixImmediate, mixLinearColor, mixNumber, mixObject, mixVisibility, modulate, motion, MotionConfig, MotionConfigContext, MotionContext, MotionGlobalConfig, MotionSetup, MotionValue, motionValue, moveItem, namespace_exports as Reorder, NativeAnimation, NativeAnimationExtended, NativeAnimationWrapper, NavigateTo, NavigationCallbackProvider, NavigationConsumer, NavigationTransitionType, NavigationWrapper as Navigation, nestedLinksCollector, noop, NotFoundError, number, numberValueTypes, ObservableObject, observeTimeline, optimizeAppear, optimizeAppearTransformTemplate, optimizedAppearDataAttribute, paddingFromProps, Page3 as Page, PageEffectsProvider, PageRoot, ParentSizeState, parseCSSVariable, parseFramerPageLink, parseValueFromTransform, patchRoutesForABTesting, pathDefaults, PathSegment, PathVariablesContext, percent, pipe, Point, Polygon, positionalKeys, preloadImage, PresenceContext, press, print, progress, progressPercentage, propEffect, PropertyOverrides2 as PropertyOverrides, PropertyStore, propsForLink, pushLoadMoreHistory, px, QueryCache, QueryEngine, RadialGradient, readTransformValue, recordStats, Rect, removeHiddenBreakpointLayers, removeHiddenBreakpointLayersV2, removeItem, RenderTarget, resize, resolveElements, resolveLink, ResolveLinks, resolveMotionValue, resolvePageScope, reverseEasing, rgba, rgbUnit, RichText, roundedNumber, roundedNumberString, roundWithOffset, safeCSSValue, scale, Scroll, scroll, scrollInfo, secondsToMilliseconds, setDragLock, setGlobalRenderEnvironment, setStyle, Shadow, sharedSVGManager, shouldOpenLinkInNewTab, Size, SmartComponentScopedContainer, spring, SpringAnimator, springValue, SSRVariants, Stack, stagger, startAnimation, startOptimizedAppearAnimation, startWaapiAnimation, statsBuffer, steps, styleEffect, StyleSheetContext, SubscriptionManager, supportedWaapiEasing, supportsBrowserAnimation, supportsFlags, supportsLinearEasing, supportsPartialKeyframes, supportsScrollTimeline, SVG, svgEffect, SwitchLayoutGroupContext, sync, systemFontFamilyName, testValueType, Text2 as Text, throttle, time, toFlexDirection, toJustifyOrAlignment, toSVGPath, transform, transformPropOrder, transformProps, transformString2 as transformString, transformTemplate, transformValue, transformValueTypes, turnOffReactEventHandling, unwrapMotionComponent, useActiveTargetCallback, useActiveVariantCallback, useAddVariantProps, useAnimate, useAnimatedState, useAnimatedState as useDeprecatedAnimatedState, useAnimateMini, useAnimation, useAnimationControls, useAnimationFrame, useBreakpointVariants, useComponentViewport, useConstant2 as useConstant, useCurrentPathVariables, useCurrentRoute, useCurrentRouteId, useCustomCursors, useCycle, useDataRecord, useDomEvent, useDragControls, useDynamicRefs, useElementScroll, useForceUpdate, useGamepad, useHotkey, useHydratedBreakpointVariants, useInitialRouteComponent, useInstantLayoutTransition, useInstantTransition, useInvertedScale, useInvertedScale as useDeprecatedInvertedScale, useInView, useIsInCurrentNavigationTarget, useIsomorphicLayoutEffect, useIsOnFramerCanvas, useIsPresent, useIsStaticRenderer, useLoadMorePaginatedQuery, useLoadMorePagination, useLocale, useLocaleCode, useLocaleInfo, useLocalesForCurrentRoute, useLocalizationInfo, useMeasureLayout, useMetadata, useMotionTemplate, useMotionValue, useMotionValueEvent, useNavigate, useNavigation, useObserveData, useOnAppear, useOnCurrentTargetChange, useOnVariantChange, useOverlayState, usePageEffects, usePrefetch, usePreloadQuery, usePresence, usePresenceData, usePrototypeNavigate, useProvidedWindow, useQueryData, useReducedMotion, useReducedMotionConfig, useRenderEnvironment, useResetProjection, useRoute, useRouteAnchor, useRouteElementId, useRouteHandler, useRouter, useScroll, useSiteRefs, useSpring, useSVGTemplate, useTime, useTransform, useUnmountEffect, useVariantState, useVelocity, useViewportScroll, useWillChange, ValueInterpolation, valueToDimensionType, VariantSelector, Vector, VectorGroup, velocityPerSecond, version, vh, ViewTransitionBuilder, VisualElement, visualElementStore, vw, warning, warnOnce, WillChangeMotionValue, WindowContext, withCodeBoundaryForOverrides, withCSS, withFX, withGeneratedLayoutId, withInfiniteScroll, withMappedReactProps, withMeasuredSize, WithNavigator, withOpacity, withOptimizedAppearEffect, WithOverride, withParallaxTransform, withPath, withPerformanceMarks, withShape, withStyleAppearEffect, withV1StrokeFX, withVariantAppearEffect, withVariantFX, wrap, yieldToMain, };
|
|
48489
|
+
export { _injectRuntime, acceleratedValues2 as acceleratedValues, activeAnimations, addActionControls, addAttrValue, addFonts, addPointerEvent, addPointerInfo, addPropertyControls, addScaleCorrector, addStyleValue, addUniqueItem, alpha, analyseComplexValue, AnchorLinkTarget, Animatable, animate2 as animate, animateMini, AnimatePresence, AnimateSharedLayout, animateValue, animateView, animateVisualElement, animationControls, animationMapKey, animations, annotateTypeOnStringify, anticipate, AnyInterpolation, applyPxDefaults, AsyncMotionValueAnimation, attachSpring, attrEffect, AutomaticLayoutIds, BackgroundImage, backgroundImageFromProps, backIn, backInOut, backOut, BezierAnimator, BoxShadow, buildTransform2 as buildTransform, calcGeneratorDuration, calcLength, calculateRect, callEach, cancelFrame, cancelMicrotask, cancelSync, ChildrenCanSuspend, circIn, circInOut, circOut, clamp, clampRGB, collectMotionValues, collectVisualStyleFromProps, Color, color, ColorFormat, ColorMixModelType, combinedCSSRulesForPreview, complex, ComponentContainerContext, ComponentPresetsConsumer, ComponentPresetsProvider, ComponentViewportProvider, ConstraintMask, constraintsEnabled, ConstraintValues, Container, ControlType, ConvertColor, convertOffsetToTimes, convertPropsToDeviceOptions, createBox, createData, createFramerPageLink, createGeneratorEasing, createRenderBatcher, createRendererMotionComponent, createScopedAnimate, cssBackgroundSize, cubicBezier, cubicBezierAsString, CustomCursorHost, CustomProperties, cx, CycleVariantState, Data, DataContext, DataObserver, DataObserverContext, debounce, defaultDeviceProps, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, degrees, degreesToRadians, delay, DeprecatedComponentContainer, DeprecatedFrameWithEvents, DeprecatedLayoutGroupContext, DeprecatedLayoutGroupContext as LayoutGroupContext, Device, DeviceCodeComponent, devicePresets, DimensionType, dimensionValueTypes, disableInstantTransitions, dispatchKeyDownEvent, distance, distance2D, DOM, domAnimation, DOMKeyframesResolver, domMax, domMin, DragControls, Draggable, easeIn, easeInOut, easeOut, easingDefinitionToFunction, EmptyState, environment, ErrorPlaceholder, executeInRenderEnvironment, Fetcher, fillOffset, fillWildcards, filterProps, findDimensionValueType, findValueType, finiteNumber, FlatTree, Floating, flushKeyframeResolvers, FontSourceNames, fontStore, forceLayerBackingWithCSSProperties, FormBooleanInput, FormContainer, FormPlainTextInput2 as FormPlainTextInput, FormSelect, fraction, Frame, frame, frameData, frameFromElement, frameFromElements, FramerAnimation, framerAppearAnimationScriptKey, framerAppearEffects, framerAppearIdKey, framerAppearTransformTemplateToken, framerCSSMarker, FramerEvent, FramerEventListener, FramerEventSession, frameSteps, FrameWithMotion, GamepadContext, GeneratedComponentContext, generateLinearEasing, getAnimatableNone2 as getAnimatableNone, getAnimationMap, getComponentSize, getComputedStyle2 as getComputedStyle, getDefaultValueType, getDevicePreset, getEasingForSegment, getFonts, getFontsFromComponentPreset, getFontsFromSharedStyle, getLoadingLazyAtYPosition, getMeasurableCodeComponentChildren, getMixer, getPropertyControls, getValueAsType, getValueTransition, getVariableValue, getWhereExpressionFromPathVariables, GracefullyDegradingErrorBoundary, gradientForShape, GroupAnimation, GroupAnimationWithThen, hasWarned, hex, hover, hsla, hslaToRgba, Image2 as Image, imagePatternPropsForFill, imageUrlForAsset, inertia, inferInitialRouteFromPath, injectComponentCSSRules, installFlexboxGapWorkaroundIfNeeded, Instance, InternalID, interpolate, invariant, inView, invisibleValues, isAnimatable2 as isAnimatable, isBezierDefinition, isBrowser, isCSSVariableName, isCSSVariableToken, isDesignDefinition, isDragActive, isDragging, isEasingArray, isEqual, isFiniteNumber, isFractionDimension, isFramerGamepadKeydownData, isFramerPageLink, isGapEnabled, isGenerator, isHTMLElement, isMotionComponent, isMotionValue2 as isMotionValue, isNodeOrChild, isNumericalString, isObject, isOfAnnotatedType, isOverride, isPrimaryPointer, isReactDefinition, isRelativeNumber, isShallowEqualArray, isStaticRenderer, isStraightCurve, isSVGElement, isSVGSVGElement, isValidMotionProp, isWaapiSupportedEasing, isZeroValueString, JSAnimation, KeyframeResolver, keyframes, Layer, LayoutGroup, LayoutIdContext, lazy, LazyMotion, LazyValue, LibraryFeaturesProvider, Line, LinearGradient, Link, loadFont, loadJSON, localPackageFallbackIdentifier, localShadowFrame, m, MainLoop, makePaddingString, makeUseVisualState, mapEasingToNativeEasing, mapValue, markHydrationStart, maxGeneratorDuration, memo, memoize2 as memoize, microtask, millisecondsToSeconds, mirrorEasing, mix, mixArray, mixColor, mixComplex, mixImmediate, mixLinearColor, mixNumber, mixObject, mixVisibility, modulate, motion, MotionConfig, MotionConfigContext, MotionContext, MotionGlobalConfig, MotionSetup, MotionValue, motionValue, moveItem, namespace_exports as Reorder, NativeAnimation, NativeAnimationExtended, NativeAnimationWrapper, NavigateTo, NavigationCallbackProvider, NavigationConsumer, NavigationTransitionType, NavigationWrapper as Navigation, nestedLinksCollector, noop, NotFoundError, number, numberValueTypes, ObservableObject, observeTimeline, optimizeAppear, optimizeAppearTransformTemplate, optimizedAppearDataAttribute, paddingFromProps, Page3 as Page, PageEffectsProvider, PageRoot, ParentSizeState, parseCSSVariable, parseFramerPageLink, parseValueFromTransform, patchRoutesForABTesting, pathDefaults, PathSegment, PathVariablesContext, percent, pipe, Point, Polygon, positionalKeys, preloadImage, PresenceContext, press, print, progress, progressPercentage, propEffect, PropertyOverrides2 as PropertyOverrides, PropertyStore, propsForLink, pushLoadMoreHistory, px, QueryCache, QueryEngine, RadialGradient, readTransformValue, recordStats, Rect, removeHiddenBreakpointLayers, removeHiddenBreakpointLayersV2, removeItem, RenderTarget, resize, resolveElements, resolveLink, ResolveLinks, resolveMotionValue, resolvePageScope, reverseEasing, rgba, rgbUnit, RichText, roundedNumber, roundedNumberString, roundWithOffset, safeCSSValue, scale, Scroll, scroll, scrollInfo, secondsToMilliseconds, setDragLock, setGlobalRenderEnvironment, setStyle, Shadow, sharedSVGManager, shouldOpenLinkInNewTab, Size, SmartComponentScopedContainer, spring, SpringAnimator, springValue, SSRVariants, Stack, stagger, startAnimation, startOptimizedAppearAnimation, startWaapiAnimation, statsBuffer, steps, styleEffect, StyleSheetContext, SubscriptionManager, supportedWaapiEasing, supportsBrowserAnimation, supportsFlags, supportsLinearEasing, supportsPartialKeyframes, supportsScrollTimeline, SVG, svgEffect, SwitchLayoutGroupContext, sync, systemFontFamilyName, testValueType, Text2 as Text, throttle, time, toFlexDirection, toJustifyOrAlignment, toSVGPath, transform, transformPropOrder, transformProps, transformString2 as transformString, transformTemplate, transformValue, transformValueTypes, turnOffReactEventHandling, unwrapMotionComponent, useActiveTargetCallback, useActiveVariantCallback, useAddVariantProps, useAnimate, useAnimatedState, useAnimatedState as useDeprecatedAnimatedState, useAnimateMini, useAnimation, useAnimationControls, useAnimationFrame, useBreakpointVariants, useComponentViewport, useConstant2 as useConstant, useCurrentPathVariables, useCurrentRoute, useCurrentRouteId, useCustomCursors, useCycle, useDataRecord, useDomEvent, useDragControls, useDynamicRefs, useElementScroll, useForceUpdate, useGamepad, useHotkey, useHydratedBreakpointVariants, useInitialRouteComponent, useInstantLayoutTransition, useInstantTransition, useInvertedScale, useInvertedScale as useDeprecatedInvertedScale, useInView, useIsInCurrentNavigationTarget, useIsomorphicLayoutEffect, useIsOnFramerCanvas, useIsPresent, useIsStaticRenderer, useLoadMorePaginatedQuery, useLoadMorePagination, useLocale, useLocaleCode, useLocaleInfo, useLocalesForCurrentRoute, useLocalizationInfo, useMeasureLayout, useMetadata, useMotionTemplate, useMotionValue, useMotionValueEvent, useNavigate, useNavigation, useObserveData, useOnAppear, useOnCurrentTargetChange, useOnVariantChange, useOverlayState, usePageEffects, usePrefetch, usePreloadQuery, usePresence, usePresenceData, usePrototypeNavigate, useProvidedWindow, useQueryData, useReducedMotion, useReducedMotionConfig, useRenderEnvironment, useResetProjection, useRoute, useRouteAnchor, useRouteElementId, useRouteHandler, useRouter, useScroll, useSiteRefs, useSpring, useSVGTemplate, useTime, useTracking, useTransform, useUnmountEffect, useVariantState, useVelocity, useViewportScroll, useWillChange, ValueInterpolation, valueToDimensionType, VariantSelector, Vector, VectorGroup, velocityPerSecond, version, vh, ViewTransitionBuilder, VisualElement, visualElementStore, vw, warning, warnOnce, WillChangeMotionValue, WindowContext, withCodeBoundaryForOverrides, withCSS, withFX, withGeneratedLayoutId, withInfiniteScroll, withMappedReactProps, withMeasuredSize, WithNavigator, withOpacity, withOptimizedAppearEffect, WithOverride, withParallaxTransform, withPath, withPerformanceMarks, withShape, withStyleAppearEffect, withV1StrokeFX, withVariantAppearEffect, withVariantFX, wrap, yieldToMain, };
|
|
47484
48490
|
//! Credit to Astro | MIT License
|
|
47485
48491
|
/**
|
|
47486
48492
|
* @license Emotion v11.0.0
|