unframer 3.0.2 → 3.0.5

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.
Files changed (112) hide show
  1. package/dist/cli.js +1 -0
  2. package/dist/cli.js.map +1 -1
  3. package/dist/cli.test.js +14 -6
  4. package/dist/cli.test.js.map +1 -1
  5. package/dist/example-code.test.js +1 -1
  6. package/dist/exporter.d.ts +0 -14
  7. package/dist/exporter.d.ts.map +1 -1
  8. package/dist/exporter.js +14 -187
  9. package/dist/exporter.js.map +1 -1
  10. package/dist/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.d.ts +115 -0
  11. package/dist/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.d.ts.map +1 -0
  12. package/dist/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.js +8 -0
  13. package/dist/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.js.map +1 -0
  14. package/dist/framer-chunks/fontshare-622CVMZZ-HFPH543A.d.ts +781 -0
  15. package/dist/framer-chunks/fontshare-622CVMZZ-HFPH543A.d.ts.map +1 -0
  16. package/dist/framer-chunks/fontshare-622CVMZZ-HFPH543A.js +8 -0
  17. package/dist/framer-chunks/fontshare-622CVMZZ-HFPH543A.js.map +1 -0
  18. package/dist/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.d.ts +634 -0
  19. package/dist/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.d.ts.map +1 -0
  20. package/dist/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.js +8 -0
  21. package/dist/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.js.map +1 -0
  22. package/dist/framer-chunks/google-3ASCFEEO-3R47BR2A.d.ts +1561 -0
  23. package/dist/framer-chunks/google-3ASCFEEO-3R47BR2A.d.ts.map +1 -0
  24. package/dist/framer-chunks/google-3ASCFEEO-3R47BR2A.js +8 -0
  25. package/dist/framer-chunks/google-3ASCFEEO-3R47BR2A.js.map +1 -0
  26. package/dist/framer-chunks/google-C62SNV32-LCI4F7VO.d.ts +3546 -0
  27. package/dist/framer-chunks/google-C62SNV32-LCI4F7VO.d.ts.map +1 -0
  28. package/dist/framer-chunks/google-C62SNV32-LCI4F7VO.js +8 -0
  29. package/dist/framer-chunks/google-C62SNV32-LCI4F7VO.js.map +1 -0
  30. package/dist/framer-chunks/google-FDB6LUFQ-PFSUZGKF.d.ts +10258 -0
  31. package/dist/framer-chunks/google-FDB6LUFQ-PFSUZGKF.d.ts.map +1 -0
  32. package/dist/framer-chunks/google-FDB6LUFQ-PFSUZGKF.js +8 -0
  33. package/dist/framer-chunks/google-FDB6LUFQ-PFSUZGKF.js.map +1 -0
  34. package/dist/framer.js +1230 -223
  35. package/dist/generated/api-client.js.map +1 -1
  36. package/dist/typescript.d.ts +20 -0
  37. package/dist/typescript.d.ts.map +1 -0
  38. package/dist/typescript.js +169 -0
  39. package/dist/typescript.js.map +1 -0
  40. package/dist/version.d.ts +1 -1
  41. package/dist/version.js +1 -1
  42. package/esm/cli.js +1 -0
  43. package/esm/cli.js.map +1 -1
  44. package/esm/cli.test.js +9 -1
  45. package/esm/cli.test.js.map +1 -1
  46. package/esm/example-code.test.js +1 -1
  47. package/esm/exporter.d.ts +0 -14
  48. package/esm/exporter.d.ts.map +1 -1
  49. package/esm/exporter.js +11 -182
  50. package/esm/exporter.js.map +1 -1
  51. package/esm/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.d.ts +115 -0
  52. package/esm/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.d.ts.map +1 -0
  53. package/esm/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.js +5 -0
  54. package/esm/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.js.map +1 -0
  55. package/esm/framer-chunks/fontshare-622CVMZZ-HFPH543A.d.ts +781 -0
  56. package/esm/framer-chunks/fontshare-622CVMZZ-HFPH543A.d.ts.map +1 -0
  57. package/esm/framer-chunks/fontshare-622CVMZZ-HFPH543A.js +5 -0
  58. package/esm/framer-chunks/fontshare-622CVMZZ-HFPH543A.js.map +1 -0
  59. package/esm/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.d.ts +634 -0
  60. package/esm/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.d.ts.map +1 -0
  61. package/esm/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.js +5 -0
  62. package/esm/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.js.map +1 -0
  63. package/esm/framer-chunks/google-3ASCFEEO-3R47BR2A.d.ts +1561 -0
  64. package/esm/framer-chunks/google-3ASCFEEO-3R47BR2A.d.ts.map +1 -0
  65. package/esm/framer-chunks/google-3ASCFEEO-3R47BR2A.js +5 -0
  66. package/esm/framer-chunks/google-3ASCFEEO-3R47BR2A.js.map +1 -0
  67. package/esm/framer-chunks/google-C62SNV32-LCI4F7VO.d.ts +3546 -0
  68. package/esm/framer-chunks/google-C62SNV32-LCI4F7VO.d.ts.map +1 -0
  69. package/esm/framer-chunks/google-C62SNV32-LCI4F7VO.js +5 -0
  70. package/esm/framer-chunks/google-C62SNV32-LCI4F7VO.js.map +1 -0
  71. package/esm/framer-chunks/google-FDB6LUFQ-PFSUZGKF.d.ts +10258 -0
  72. package/esm/framer-chunks/google-FDB6LUFQ-PFSUZGKF.d.ts.map +1 -0
  73. package/esm/framer-chunks/google-FDB6LUFQ-PFSUZGKF.js +5 -0
  74. package/esm/framer-chunks/google-FDB6LUFQ-PFSUZGKF.js.map +1 -0
  75. package/esm/framer.js +1230 -224
  76. package/esm/generated/api-client.js.map +1 -1
  77. package/esm/typescript.d.ts +20 -0
  78. package/esm/typescript.d.ts.map +1 -0
  79. package/esm/typescript.js +165 -0
  80. package/esm/typescript.js.map +1 -0
  81. package/esm/version.d.ts +1 -1
  82. package/esm/version.js +1 -1
  83. package/package.json +6 -3
  84. package/src/cli.test.ts +8 -1
  85. package/src/cli.ts +1 -1
  86. package/src/example-code.test.ts +1 -1
  87. package/src/exporter.ts +13 -203
  88. package/src/framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.js +7 -0
  89. package/src/framer-chunks/fontshare-622CVMZZ-HFPH543A.js +7 -0
  90. package/src/framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.js +7 -0
  91. package/src/framer-chunks/google-3ASCFEEO-3R47BR2A.js +7 -0
  92. package/src/framer-chunks/google-C62SNV32-LCI4F7VO.js +7 -0
  93. package/src/framer-chunks/google-FDB6LUFQ-PFSUZGKF.js +7 -0
  94. package/src/framer.js +1170 -215
  95. package/src/generated/api-client.d.ts +790 -1042
  96. package/src/generated/api-client.js +5 -5
  97. package/src/styles/framer.css +1963 -0
  98. package/src/styles/reset.css +37 -0
  99. package/src/typescript.ts +196 -0
  100. package/src/version.ts +1 -1
  101. package/dist/generated/api-client.test.d.ts +0 -2
  102. package/dist/generated/api-client.test.d.ts.map +0 -1
  103. package/dist/generated/api-client.test.js +0 -3
  104. package/dist/generated/api-client.test.js.map +0 -1
  105. package/esm/generated/api-client.test.d.ts +0 -1
  106. package/esm/generated/api-client.test.d.ts.map +0 -1
  107. package/esm/generated/api-client.test.js +0 -2
  108. package/esm/generated/api-client.test.js.map +0 -1
  109. package/src/generated/api-client.d.ts.map +0 -1
  110. package/src/generated/api-client.js.map +0 -1
  111. package/src/generated/api-client.test.d.ts +0 -1
  112. package/src/generated/api-client.test.js +0 -1
package/dist/framer.js CHANGED
@@ -302,6 +302,7 @@ exports.useSiteRefs = useSiteRefs;
302
302
  exports.useSpring = useSpring;
303
303
  exports.useSVGTemplate = useSVGTemplate;
304
304
  exports.useTime = useTime;
305
+ exports.useTracking = useTracking;
305
306
  exports.useTransform = useTransform;
306
307
  exports.useUnmountEffect = useUnmountEffect;
307
308
  exports.useVariantState = useVariantState;
@@ -10958,7 +10959,7 @@ function stagger(duration = 0.1, { startDelay = 0, from = 0, ease: ease2, } = {}
10958
10959
  return startDelay + delay2;
10959
10960
  };
10960
10961
  }
10961
- // /:https://app.framerstatic.com/framer.6HDYDFRL.mjs
10962
+ // /:https://app.framerstatic.com/framer.Q6KVMOJP.mjs
10962
10963
  const react_10 = require("react");
10963
10964
  const react_11 = __importDefault(require("react"));
10964
10965
  const react_12 = require("react");
@@ -13376,7 +13377,7 @@ function usePopStateHandler(currentRouteId, setCurrentRouteId) {
13376
13377
  updateCanonicalURL(window.location.href);
13377
13378
  }, [currentRouteId, monitorNextPaintAfterRender, setCurrentRouteId, startViewTransition2,]);
13378
13379
  const traversalHandler = (0, react_3.useCallback)((event) => {
13379
- if (event.navigationType !== 'traverse')
13380
+ if (event.navigationType !== 'traverse' || !event.canIntercept)
13380
13381
  return;
13381
13382
  event.intercept({
13382
13383
  async handler() {
@@ -13501,7 +13502,7 @@ function useNativeLoadingSpinner() {
13501
13502
  const navigationPromise = (0, react_4.useRef)(Promise.resolve());
13502
13503
  const navigationController = (0, react_4.useRef)();
13503
13504
  const navigateListener = (0, react_3.useCallback)((navigateEvent) => {
13504
- if (navigateEvent.navigationType === 'traverse')
13505
+ if (navigateEvent.navigationType === 'traverse' || !navigateEvent.canIntercept)
13505
13506
  return;
13506
13507
  const controller = navigationController.current;
13507
13508
  controller == null ? void 0 : controller.signal.addEventListener('abort', () => {
@@ -13525,6 +13526,38 @@ function useNativeLoadingSpinner() {
13525
13526
  });
13526
13527
  }, [navigateListener,]);
13527
13528
  }
13529
+ var nonSlugCharactersRegExp = /[^\p{Letter}\p{Number}()]+/gu;
13530
+ var trimSlugRegExp = /^-+|-+$/gu;
13531
+ function slugify(value) {
13532
+ return value.toLowerCase().replace(nonSlugCharactersRegExp, '-').replace(trimSlugRegExp, '');
13533
+ }
13534
+ var NodeIdContext = /* @__PURE__ */ react_11.default.createContext(null);
13535
+ function useTracking() {
13536
+ const router = useRouter();
13537
+ const nodeId = (0, react_3.useContext)(NodeIdContext);
13538
+ return (0, react_3.useCallback)((trackingId) => {
13539
+ var _a;
13540
+ if (!((_a = router.pageviewEventData) == null ? void 0 : _a.current))
13541
+ return;
13542
+ if (slugify(trackingId) !== trackingId) {
13543
+ throw new Error(`Invalid tracking ID: ${trackingId}`);
13544
+ }
13545
+ if (router.pageviewEventData.current instanceof Promise) {
13546
+ void router.pageviewEventData.current.then((eventData) => sendCustomTrackingEvent(eventData, nodeId, trackingId));
13547
+ }
13548
+ else {
13549
+ sendCustomTrackingEvent(router.pageviewEventData.current, nodeId, trackingId);
13550
+ }
13551
+ }, [router, nodeId,]);
13552
+ }
13553
+ function sendCustomTrackingEvent(eventData, nodeId, trackingId) {
13554
+ sendTrackingEvent('published_site_custom_event', {
13555
+ ...eventData,
13556
+ nodeId,
13557
+ // Don't attach a tracking ID if it's empty
13558
+ trackingId: trackingId || null,
13559
+ }, 'eager');
13560
+ }
13528
13561
  function useRouteAnchor(routeId, { elementId, hash: linkHash, } = {}) {
13529
13562
  const { navigate, currentPathVariables, preserveQueryParams, siteCanonicalURL, } = useRouter();
13530
13563
  const route = useRoute(routeId);
@@ -22504,6 +22537,7 @@ var isPropValid = /* @__PURE__ */ memoize((prop) => reactPropsRegex.test(prop) |
22504
22537
  /* Z+1 */
22505
22538
  );
22506
22539
  var LibraryFeaturesContext = /* @__PURE__ */ react_11.default.createContext(void 0);
22540
+ LibraryFeaturesContext.displayName = 'LibraryFeaturesContext';
22507
22541
  var LibraryFeaturesProvider = /* @__PURE__ */ (() => LibraryFeaturesContext.Provider)();
22508
22542
  exports.LibraryFeaturesProvider = LibraryFeaturesProvider;
22509
22543
  var useLibraryFeatures = () => {
@@ -22519,17 +22553,22 @@ var mockWithoutWarning = () => {
22519
22553
  return () => { };
22520
22554
  };
22521
22555
  var implementation = {
22522
- // We need a default implementation for useImageSource and useImageElement as it is used for rendering image backgrounds which would break otherwise.
22523
- // The default value is used for HTML export and when using the library without Framer.
22556
+ // We need a default implementation for useImageSource and useImageElement as it is used for
22557
+ // rendering image backgrounds which would break otherwise. The default value is used for HTML
22558
+ // export and when using the library without Framer.
22559
+ 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>`,
22524
22560
  useImageSource(image) {
22525
22561
  return image.src ?? '';
22526
22562
  },
22527
22563
  useImageElement(image, rect, nodeId) {
22528
- const element = new Image();
22529
- element.src = runtime.useImageSource(image, rect, nodeId);
22530
- if (image.srcSet)
22531
- element.srcset = image.srcSet;
22532
- return element;
22564
+ const src = runtime.useImageSource(image, rect, nodeId);
22565
+ return (0, react_4.useMemo)(() => {
22566
+ const element = new Image();
22567
+ element.src = src;
22568
+ if (image.srcSet)
22569
+ element.srcset = image.srcSet;
22570
+ return element;
22571
+ }, [src, image.srcSet,]);
22533
22572
  },
22534
22573
  canRenderOptimizedCanvasImage() {
22535
22574
  return false;
@@ -22564,14 +22603,12 @@ var wrapperStyle = {
22564
22603
  left: 0,
22565
22604
  };
22566
22605
  function getPlaceholderStyle() {
22567
- const placeholderStyle = {
22606
+ return {
22568
22607
  backgroundRepeat: 'repeat',
22569
22608
  backgroundPosition: 'left top',
22570
- backgroundSize: '126px auto',
22571
- backgroundImage: encodeSVGForCSS(`<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="#888" fill-rule="evenodd"/></svg>`),
22572
- opacity: 0.2,
22609
+ backgroundSize: '64px auto',
22610
+ backgroundImage: encodeSVGForCSS(runtime.imagePlaceholderSvg),
22573
22611
  };
22574
- return placeholderStyle;
22575
22612
  }
22576
22613
  function cssObjectFit(imageFit) {
22577
22614
  switch (imageFit) {
@@ -31319,7 +31356,7 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
31319
31356
  const shouldReduceMotion = useReducedMotionConfig();
31320
31357
  const values = useConstant2(makeFXValues);
31321
31358
  const mirrorStateRef = (0, react_4.useRef)(false);
31322
- const delay2 = useDelay();
31359
+ const delay3 = useDelay();
31323
31360
  const animationPromiseRef = (0, react_4.useRef)(null);
31324
31361
  const animateValues = (0, react_3.useCallback)(async () => {
31325
31362
  if (!loop)
@@ -31352,9 +31389,9 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
31352
31389
  if (!loopEffectEnabled || !shouldRunRef.current)
31353
31390
  return;
31354
31391
  await animateValues();
31355
- await delay2(loopRepeatDelay ?? 0);
31392
+ await delay3(loopRepeatDelay ?? 0);
31356
31393
  void animateLoop();
31357
- }, [animateValues, delay2, loopEffectEnabled, loopRepeatDelay,]);
31394
+ }, [animateValues, delay3, loopEffectEnabled, loopRepeatDelay,]);
31358
31395
  const start2 = (0, react_3.useCallback)(() => {
31359
31396
  if (shouldRunRef.current)
31360
31397
  return;
@@ -32568,12 +32605,15 @@ var ContainerInner = /* @__PURE__ */ react_11.default.forwardRef(({ children, la
32568
32605
  ref,
32569
32606
  children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(ComponentContainerContext.Provider, {
32570
32607
  value: true,
32571
- children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(AutomaticLayoutIds, {
32572
- enabled: false,
32573
- children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(LayoutGroup, {
32574
- id: layoutId ?? '',
32575
- inherit: 'id',
32576
- children: childrenWithCodeBoundary,
32608
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NodeIdContext.Provider, {
32609
+ value: nodeId ?? null,
32610
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(AutomaticLayoutIds, {
32611
+ enabled: false,
32612
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(LayoutGroup, {
32613
+ id: layoutId ?? '',
32614
+ inherit: 'id',
32615
+ children: childrenWithCodeBoundary,
32616
+ }),
32577
32617
  }),
32578
32618
  }),
32579
32619
  }),
@@ -32591,26 +32631,28 @@ var SmartComponentScopedContainer = /* @__PURE__ */ react_11.default.forwardRef(
32591
32631
  const tagName = props.as ?? 'div';
32592
32632
  if (props.rendersWithMotion) {
32593
32633
  const Component17 = htmlElementAsMotionComponent(tagName);
32594
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
32595
- ...otherProps,
32596
- ref,
32597
- style: props.style,
32598
- children: childrenWithCodeBoundary,
32634
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NodeIdContext.Provider, {
32635
+ value: nodeId ?? null,
32636
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
32637
+ ...otherProps,
32638
+ ref,
32639
+ style: props.style,
32640
+ children: childrenWithCodeBoundary,
32641
+ }),
32599
32642
  });
32600
32643
  }
32601
32644
  else {
32602
32645
  const Component17 = tagName;
32603
32646
  const { layoutId, layoutDependency, ...plainHTMLRenderableProps } = otherProps;
32604
- return (
32605
- // Passing `props.style` explicitly to allow TypeScript to narrow the type of `props.style` according
32606
- // to the value of `props.rendersWithMotion`.
32607
- /* @__PURE__ */
32608
- (0, jsx_runtime_1.jsx)(Component17, {
32609
- ...plainHTMLRenderableProps,
32610
- ref,
32611
- style: props.style,
32612
- children: childrenWithCodeBoundary,
32613
- }));
32647
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NodeIdContext.Provider, {
32648
+ value: nodeId ?? null,
32649
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
32650
+ ...plainHTMLRenderableProps,
32651
+ ref,
32652
+ style: props.style,
32653
+ children: childrenWithCodeBoundary,
32654
+ }),
32655
+ });
32614
32656
  }
32615
32657
  });
32616
32658
  exports.SmartComponentScopedContainer = SmartComponentScopedContainer;
@@ -32881,18 +32923,20 @@ var CustomCursorComponent = /* @__PURE__ */ (0, react_14.memo)(function CustomCu
32881
32923
  ]);
32882
32924
  if (!hasHoverCapability || !cursor || !Cursor)
32883
32925
  return null;
32884
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Cursor, {
32885
- transformTemplate: transformTemplate2,
32886
- style: {
32887
- ...staticCursorStyle,
32888
- x,
32889
- y,
32890
- opacity,
32891
- },
32892
- globalTapTarget: true,
32893
- variant: cursor == null ? void 0 : cursor.variant,
32894
- ref: cursorRef,
32895
- className: cursorComponentClassName,
32926
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(react_13.Suspense, {
32927
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Cursor, {
32928
+ transformTemplate: transformTemplate2,
32929
+ style: {
32930
+ ...staticCursorStyle,
32931
+ x,
32932
+ y,
32933
+ opacity,
32934
+ },
32935
+ globalTapTarget: true,
32936
+ variant: cursor == null ? void 0 : cursor.variant,
32937
+ ref: cursorRef,
32938
+ className: cursorComponentClassName,
32939
+ }),
32896
32940
  });
32897
32941
  });
32898
32942
  function useCustomCursors(webPageCursors) {
@@ -33633,6 +33677,10 @@ var LazyValue = class _LazyValue {
33633
33677
  static is(value) {
33634
33678
  return value instanceof _LazyValue;
33635
33679
  }
33680
+ get state() {
33681
+ var _a;
33682
+ return ((_a = this.status) == null ? void 0 : _a.type) ?? 'pending';
33683
+ }
33636
33684
  /** Preload the value so it can be read() later. */
33637
33685
  preload() {
33638
33686
  if (this.status) {
@@ -34381,14 +34429,16 @@ function useTrackLinkClick({ nodeId, clickTrackingId, router, href, activeLocale
34381
34429
  var _a, _b, _c, _d, _e;
34382
34430
  if (!((_a = router.pageviewEventData) == null ? void 0 : _a.current))
34383
34431
  return;
34384
- const pageviewEventData = router.pageviewEventData.current;
34432
+ const pageviewEventData = router.pageviewEventData.current instanceof Promise
34433
+ ? await router.pageviewEventData.current
34434
+ : router.pageviewEventData.current;
34385
34435
  const pageLink = isLinkToWebPage(href) ? href : linkFromFramerPageLink(href);
34386
34436
  if (!isLinkToWebPage(pageLink)) {
34387
34437
  return sendTrackingEvent('published_site_click', {
34388
34438
  ...pageviewEventData,
34389
34439
  href: hrefAttribute ? makeUrlAbsolute(hrefAttribute) : null,
34390
34440
  nodeId: nodeId ?? null,
34391
- trackingId: clickTrackingId ?? null,
34441
+ trackingId: clickTrackingId || null,
34392
34442
  targetRoutePath: null,
34393
34443
  targetWebPageId: null,
34394
34444
  targetCollectionItemId: null,
@@ -34781,13 +34831,21 @@ function trackFormSubmit({ router, nodeId, submitTrackingId, }) {
34781
34831
  var _a;
34782
34832
  if (!((_a = router == null ? void 0 : router.pageviewEventData) == null ? void 0 : _a.current))
34783
34833
  return;
34784
- const pageviewEventData = router.pageviewEventData.current;
34785
- const eventData = {
34834
+ if (router.pageviewEventData.current instanceof Promise) {
34835
+ void router.pageviewEventData.current.then((pageviewEventData) => {
34836
+ sendFormSubmitTrackingEvent(pageviewEventData, nodeId, submitTrackingId);
34837
+ });
34838
+ }
34839
+ else {
34840
+ sendFormSubmitTrackingEvent(router.pageviewEventData.current, nodeId, submitTrackingId);
34841
+ }
34842
+ }
34843
+ function sendFormSubmitTrackingEvent(pageviewEventData, nodeId, trackingId) {
34844
+ return sendTrackingEvent('published_site_form_submit', {
34786
34845
  ...pageviewEventData,
34787
34846
  nodeId: nodeId ?? null,
34788
- trackingId: submitTrackingId ?? null,
34789
- };
34790
- return sendTrackingEvent('published_site_form_submit', eventData, 'eager');
34847
+ trackingId: trackingId || null,
34848
+ }, 'eager');
34791
34849
  }
34792
34850
  var pendingState = {
34793
34851
  state: 'pending',
@@ -35045,17 +35103,23 @@ var useSendPageView = (currentRoute, currentRouteId, currentPathVariables, colle
35045
35103
  });
35046
35104
  };
35047
35105
  void (async () => {
35048
- pageviewEventData.current = await getFullPageviewEventData();
35106
+ const pageviewEventDataPromise = getFullPageviewEventData();
35107
+ pageviewEventData.current = pageviewEventDataPromise;
35049
35108
  if (skipFirstPageView.current) {
35050
35109
  skipFirstPageView.current = false;
35051
35110
  return;
35052
35111
  }
35053
- sendTrackingEvent('published_site_pageview', pageviewEventData.current, 'eager');
35112
+ const eventData = await pageviewEventDataPromise;
35113
+ pageviewEventData.current = eventData;
35114
+ sendTrackingEvent('published_site_pageview', eventData, 'eager');
35054
35115
  })();
35055
35116
  const listener = async (event) => {
35056
35117
  if (event.persisted) {
35057
- pageviewEventData.current = await getFullPageviewEventData();
35058
- sendTrackingEvent('published_site_pageview', pageviewEventData.current, 'eager');
35118
+ const pageviewEventDataPromise = getFullPageviewEventData();
35119
+ pageviewEventData.current = pageviewEventDataPromise;
35120
+ const eventData = await getFullPageviewEventData();
35121
+ pageviewEventData.current = eventData;
35122
+ sendTrackingEvent('published_site_pageview', eventData, 'eager');
35059
35123
  }
35060
35124
  };
35061
35125
  window.addEventListener('pageshow', listener);
@@ -35157,6 +35221,13 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
35157
35221
  const scheduleSideEffect = useScheduleRenderSideEffects(dep);
35158
35222
  const startNavigation = useNavigationTransition();
35159
35223
  const monitorNextPaintAfterRender = useMonitorNextPaintAfterRender('framer-route-change');
35224
+ const { synchronousNavigationOnDesktop, } = useLibraryFeatures();
35225
+ const transitionFn = (0, react_4.useMemo)(() => {
35226
+ if (!synchronousNavigationOnDesktop || !isDesktop()) {
35227
+ return react_12.startTransition;
35228
+ }
35229
+ return (fn) => fn();
35230
+ }, [synchronousNavigationOnDesktop,]);
35160
35231
  const isInitialNavigationRef = (0, react_4.useRef)(true);
35161
35232
  const currentRouteRef = (0, react_4.useRef)(initialRoute);
35162
35233
  const currentPathVariablesRef = (0, react_4.useRef)(initialPathVariables);
@@ -35225,7 +35296,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
35225
35296
  }, currentPath, ignorePushStateWrapper);
35226
35297
  };
35227
35298
  void startNavigation(() => {
35228
- void startViewTransition2(currentRouteId2, currentRouteId2, () => (0, react_12.startTransition)(forceUpdate));
35299
+ void startViewTransition2(currentRouteId2, currentRouteId2, () => transitionFn(forceUpdate));
35229
35300
  }, nextRender, updateURL, false);
35230
35301
  }
35231
35302
  catch { }
@@ -35241,6 +35312,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
35241
35312
  startNavigation,
35242
35313
  startViewTransition2,
35243
35314
  monitorNextPaintAfterRender,
35315
+ transitionFn,
35244
35316
  ]);
35245
35317
  const setCurrentRouteId = (0, react_3.useCallback)((routeId, localeId, hash2, pathVariables, isHistoryTransition, nextRender, smoothScroll = false, updateURL) => {
35246
35318
  isInitialNavigationRef.current = false;
@@ -35252,13 +35324,13 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
35252
35324
  updateScrollPosition(hash2, smoothScroll, isHistoryTransition);
35253
35325
  });
35254
35326
  if (isHistoryTransition) {
35255
- (0, react_12.startTransition)(forceUpdate);
35327
+ transitionFn(forceUpdate);
35256
35328
  return;
35257
35329
  }
35258
35330
  void startNavigation((signal) => {
35259
- void startViewTransition2(currentRouteId2, routeId, () => (0, react_12.startTransition)(forceUpdate), signal);
35331
+ void startViewTransition2(currentRouteId2, routeId, () => transitionFn(forceUpdate), signal);
35260
35332
  }, nextRender, updateURL, true);
35261
- }, [forceUpdate, scheduleSideEffect, startNavigation, startViewTransition2,]);
35333
+ }, [forceUpdate, scheduleSideEffect, startNavigation, startViewTransition2, transitionFn,]);
35262
35334
  usePopStateHandler(currentRouteRef, setCurrentRouteId);
35263
35335
  const navigate = (0, react_3.useCallback)(async (routeId, hash2, pathVariables, smoothScroll, beforeUrlUpdate) => {
35264
35336
  var _a, _b;
@@ -40535,18 +40607,34 @@ ${stringifyQuery(query)}`);
40535
40607
  };
40536
40608
  exports.QueryEngine = QueryEngine;
40537
40609
  var QueryCache = class {
40538
- constructor(queryEngine2) {
40610
+ constructor(queryEngine2, maxSize = Infinity) {
40539
40611
  this.queryEngine = queryEngine2;
40612
+ this.maxSize = maxSize;
40540
40613
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'cache', /* @__PURE__ */ new Map());
40541
40614
  }
40615
+ prune() {
40616
+ if (this.cache.size <= this.maxSize)
40617
+ return;
40618
+ for (const [key7, value,] of this.cache) {
40619
+ if (this.cache.size <= this.maxSize)
40620
+ break;
40621
+ if (value.state === 'pending')
40622
+ continue;
40623
+ this.cache.delete(key7);
40624
+ }
40625
+ }
40542
40626
  get(query, locale) {
40543
40627
  const key7 = getCacheKey(query, locale);
40544
40628
  const existing = this.cache.get(key7);
40545
- if (existing)
40629
+ if (existing) {
40630
+ this.cache.delete(key7);
40631
+ this.cache.set(key7, existing);
40546
40632
  return existing;
40633
+ }
40547
40634
  const resolver = () => this.queryEngine.query(query, locale);
40548
40635
  const value = new LazyValue(resolver);
40549
40636
  this.cache.set(key7, value);
40637
+ this.prune();
40550
40638
  return value;
40551
40639
  }
40552
40640
  };
@@ -41738,15 +41826,18 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
41738
41826
  const shouldWrapWithBoundary = shouldWrapOverrideWithBoundary(scopeId, nearestExternalComponent == null ? void 0 : nearestExternalComponent.scopeId, nearestExternalComponent == null ? void 0 : nearestExternalComponent.level, inComponentSlot ?? false);
41739
41827
  if (shouldWrapWithBoundary) {
41740
41828
  if (appliedOverride.status === 'success') {
41741
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(CodeComponentBoundary, {
41742
- getErrorMessage: getErrorMessageForOverride.bind(null, scopeId, nodeId),
41743
- fallback: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
41744
- ...props,
41745
- ref,
41746
- }),
41747
- children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(appliedOverride.Component, {
41748
- ...props,
41749
- ref,
41829
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NodeIdContext.Provider, {
41830
+ value: nodeId,
41831
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(CodeComponentBoundary, {
41832
+ getErrorMessage: getErrorMessageForOverride.bind(null, scopeId, nodeId),
41833
+ fallback: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
41834
+ ...props,
41835
+ ref,
41836
+ }),
41837
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(appliedOverride.Component, {
41838
+ ...props,
41839
+ ref,
41840
+ }),
41750
41841
  }),
41751
41842
  });
41752
41843
  }
@@ -41765,9 +41856,12 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
41765
41856
  }
41766
41857
  else {
41767
41858
  if (appliedOverride.status === 'success') {
41768
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(appliedOverride.Component, {
41769
- ...props,
41770
- ref,
41859
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NodeIdContext.Provider, {
41860
+ value: nodeId,
41861
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(appliedOverride.Component, {
41862
+ ...props,
41863
+ ref,
41864
+ }),
41771
41865
  });
41772
41866
  }
41773
41867
  else {
@@ -42772,6 +42866,789 @@ function createFontFamilyName(font) {
42772
42866
  function createVariableFontFamilyName(familyName) {
42773
42867
  return `${familyName} Variable`;
42774
42868
  }
42869
+ function assert2(condition, ...msg) {
42870
+ var _a, _b;
42871
+ if (condition)
42872
+ return;
42873
+ const e = Error('Assertion Error' + (msg.length > 0 ? ': ' + msg.join(' ') : ''));
42874
+ if (e.stack) {
42875
+ try {
42876
+ const lines = e.stack.split('\n');
42877
+ if ((_a = lines[1]) == null ? void 0 : _a.includes('assert')) {
42878
+ lines.splice(1, 1);
42879
+ e.stack = lines.join('\n');
42880
+ }
42881
+ else if ((_b = lines[0]) == null ? void 0 : _b.includes('assert')) {
42882
+ lines.splice(0, 1);
42883
+ e.stack = lines.join('\n');
42884
+ }
42885
+ }
42886
+ catch { }
42887
+ }
42888
+ throw e;
42889
+ }
42890
+ var missing = Symbol('missing');
42891
+ var frozenEmptyArray = Object.freeze([]);
42892
+ var errorReporter;
42893
+ function reportError({ error: maybeError, tags, extras, critical, caller, }) {
42894
+ assert2(errorReporter, 'Set up an error callback with setErrorReporter, or configure Sentry with initializeEnvironment');
42895
+ const error = reportableError(maybeError, caller);
42896
+ errorReporter({
42897
+ error,
42898
+ tags: {
42899
+ ...error.tags,
42900
+ ...tags,
42901
+ },
42902
+ extras: {
42903
+ ...error.extras,
42904
+ ...extras,
42905
+ },
42906
+ critical: !!critical,
42907
+ });
42908
+ return error;
42909
+ }
42910
+ function reportableError(error, caller = reportableError) {
42911
+ if (error instanceof Error) {
42912
+ return error;
42913
+ }
42914
+ return new UnhandledError(error, caller);
42915
+ }
42916
+ var UnhandledError = class extends Error {
42917
+ constructor(error, caller) {
42918
+ const message = error ? JSON.stringify(error) : 'No error message provided';
42919
+ super(message);
42920
+ this.message = message;
42921
+ if (caller && Error.captureStackTrace) {
42922
+ Error.captureStackTrace(this, caller);
42923
+ }
42924
+ else {
42925
+ try {
42926
+ throw new Error();
42927
+ }
42928
+ catch (e) {
42929
+ this.stack = e.stack;
42930
+ }
42931
+ }
42932
+ }
42933
+ };
42934
+ var hostname = typeof window !== 'undefined' ? window.location.hostname : void 0;
42935
+ var isLocal = Boolean(hostname && ['web.framerlocal.com', 'localhost', '127.0.0.1', '[::1]',].includes(hostname));
42936
+ var hosts = (() => {
42937
+ if (!hostname)
42938
+ return;
42939
+ if (isLocal) {
42940
+ return {
42941
+ main: hostname,
42942
+ previewLink: void 0,
42943
+ };
42944
+ }
42945
+ const previewHostRegex = /^(([^.]+\.)?beta\.)?((?:development\.)?framer\.com)$/u;
42946
+ const match = hostname.match(previewHostRegex);
42947
+ if (!match || !match[3])
42948
+ return;
42949
+ return {
42950
+ previewLink: match[2] && match[0],
42951
+ main: match[3],
42952
+ };
42953
+ })();
42954
+ var hostInfo = {
42955
+ hosts,
42956
+ isDevelopment: (hosts == null ? void 0 : hosts.main) === 'development.framer.com',
42957
+ isProduction: (hosts == null ? void 0 : hosts.main) === 'framer.com',
42958
+ isLocal,
42959
+ };
42960
+ var cachedServiceMap;
42961
+ function getServiceMap() {
42962
+ if (typeof window === 'undefined')
42963
+ return {};
42964
+ if (cachedServiceMap)
42965
+ return cachedServiceMap;
42966
+ cachedServiceMap = extractServiceMap();
42967
+ return cachedServiceMap;
42968
+ }
42969
+ function extractServiceMap() {
42970
+ var _a, _b, _c;
42971
+ const location = window.location;
42972
+ let services = (_a = window == null ? void 0 : window.bootstrap) == null ? void 0 : _a.services;
42973
+ if (services) {
42974
+ return services;
42975
+ }
42976
+ let topOrigin;
42977
+ try {
42978
+ const topWindow = window.top;
42979
+ topOrigin = topWindow.location.origin;
42980
+ services = (_c = (_b = window.top) == null ? void 0 : _b.bootstrap) == null ? void 0 : _c.services;
42981
+ if (services) {
42982
+ return services;
42983
+ }
42984
+ }
42985
+ catch (e) { }
42986
+ if (topOrigin && topOrigin !== location.origin) {
42987
+ throw Error(`Unexpectedly embedded by ${topOrigin} (expected ${location.origin})`);
42988
+ }
42989
+ if (location.origin.endsWith('framer.com') || location.origin.endsWith('framer.dev')) {
42990
+ throw Error('ServiceMap data was not provided in document');
42991
+ }
42992
+ try {
42993
+ const servicesJSON = new URLSearchParams(location.search).get('services') ||
42994
+ new URLSearchParams(location.hash.substring(1)).get('services');
42995
+ if (servicesJSON) {
42996
+ services = JSON.parse(servicesJSON);
42997
+ }
42998
+ }
42999
+ catch (e) { }
43000
+ if (services && typeof services === 'object' && services.api) {
43001
+ return services;
43002
+ }
43003
+ throw Error('ServiceMap requested but not available');
43004
+ }
43005
+ function jsonSafeCopy(obj, depth = 0, seen = /* @__PURE__ */ new Set()) {
43006
+ var _a;
43007
+ if (obj === null)
43008
+ return obj;
43009
+ if (typeof obj === 'function')
43010
+ return `[Function: ${obj.name ?? 'unknown'}]`;
43011
+ if (typeof obj !== 'object')
43012
+ return obj;
43013
+ if (obj instanceof Error)
43014
+ return `[${obj.toString()}]`;
43015
+ if (seen.has(obj))
43016
+ return '[Circular]';
43017
+ if (depth > 2)
43018
+ return '...';
43019
+ seen.add(obj);
43020
+ try {
43021
+ if ('toJSON' in obj && typeof obj.toJSON === 'function') {
43022
+ return jsonSafeCopy(obj.toJSON(), depth + 1, seen);
43023
+ }
43024
+ else if (Array.isArray(obj)) {
43025
+ return obj.map((v) => jsonSafeCopy(v, depth + 1, seen));
43026
+ }
43027
+ else if (Object.getPrototypeOf(obj) !== Object.prototype) {
43028
+ return `[Object: ${'__class' in obj && obj.__class || ((_a = obj.constructor) == null ? void 0 : _a.name)}]`;
43029
+ }
43030
+ else {
43031
+ const result = {};
43032
+ for (const [key7, v,] of Object.entries(obj)) {
43033
+ result[key7] = jsonSafeCopy(v, depth + 1, seen);
43034
+ }
43035
+ return result;
43036
+ }
43037
+ }
43038
+ catch (e) {
43039
+ return `[Throws: ${e instanceof Error ? e.message : e}]`;
43040
+ }
43041
+ finally {
43042
+ seen.delete(obj);
43043
+ }
43044
+ }
43045
+ var levelNames = ['trace', 'debug', 'info', 'warn', 'error',];
43046
+ var postfixNames = [':trace', ':debug', ':info', ':warn', ':error',];
43047
+ function applyLogLevelSpec(spec, all) {
43048
+ const missingSpecs = [];
43049
+ for (const s of spec.split(/[ ,]/u)) {
43050
+ let match = s.trim();
43051
+ if (match.length === 0)
43052
+ continue;
43053
+ let level = 1;
43054
+ let inverted = false;
43055
+ if (match.startsWith('-')) {
43056
+ match = match.slice(1);
43057
+ level = 3;
43058
+ inverted = true;
43059
+ }
43060
+ for (let i = 0; i <= 4; i++) {
43061
+ const postfix = postfixNames[i];
43062
+ if (!postfix)
43063
+ continue;
43064
+ if (match.endsWith(postfix)) {
43065
+ level = i;
43066
+ if (inverted) {
43067
+ level += 1;
43068
+ }
43069
+ match = match.slice(0, match.length - postfix.length);
43070
+ if (match.length === 0) {
43071
+ match = '*';
43072
+ }
43073
+ break;
43074
+ }
43075
+ }
43076
+ const regex2 = new RegExp('^' + escapeRegExp(match).replace(/\\\*/gu, '.*') + '$');
43077
+ let loggersUpdated = 0;
43078
+ for (const logger of all) {
43079
+ if (logger.id.match(regex2)) {
43080
+ logger.level = level;
43081
+ ++loggersUpdated;
43082
+ }
43083
+ }
43084
+ if (loggersUpdated === 0) {
43085
+ missingSpecs.push(s);
43086
+ }
43087
+ }
43088
+ return missingSpecs;
43089
+ }
43090
+ var _LogEntry = class _LogEntry2 {
43091
+ constructor(logger, level, parts) {
43092
+ this.logger = logger;
43093
+ this.level = level;
43094
+ this.parts = parts;
43095
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'id');
43096
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'time');
43097
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'stringPrefix');
43098
+ this.id = _LogEntry2.nextId++;
43099
+ this.time = Date.now();
43100
+ }
43101
+ toMessage() {
43102
+ if (this.stringPrefix)
43103
+ return this.parts;
43104
+ const r = [new Date(this.time).toISOString().substr(-14, 14), levelNames[this.level] + ': [' + this.logger.id + ']',];
43105
+ let i = 0;
43106
+ for (; i < this.parts.length; i++) {
43107
+ const part = this.parts[i];
43108
+ if (typeof part === 'string') {
43109
+ r.push(part);
43110
+ continue;
43111
+ }
43112
+ break;
43113
+ }
43114
+ this.stringPrefix = r.join(' ');
43115
+ this.parts.splice(0, i, this.stringPrefix);
43116
+ return this.parts;
43117
+ }
43118
+ toString() {
43119
+ return this.toMessage().map((part) => {
43120
+ const type = typeof part;
43121
+ if (type === 'string')
43122
+ return part;
43123
+ if (type === 'function')
43124
+ return `[Function: ${part.name ?? 'unknown'}]`;
43125
+ if (part instanceof Error)
43126
+ return part.stack ?? part.toString();
43127
+ const json = JSON.stringify(jsonSafeCopy(part));
43128
+ if ((json == null ? void 0 : json.length) > 253) {
43129
+ return json.slice(0, 250) + '...';
43130
+ }
43131
+ return json;
43132
+ }).join(' ');
43133
+ }
43134
+ };
43135
+ (0, chunk_A2PMVMFI_js_1.__publicField)(_LogEntry, 'nextId', 0);
43136
+ var LogEntry = _LogEntry;
43137
+ var logLevelSpec = '*:app:info,app:info';
43138
+ var isNode = typeof process !== 'undefined' && !!process.kill;
43139
+ var isCI = isNode && false;
43140
+ if (isCI) {
43141
+ logLevelSpec = '-:warn';
43142
+ }
43143
+ else if (isNode) {
43144
+ logLevelSpec = '';
43145
+ }
43146
+ try {
43147
+ if (typeof window !== 'undefined' && window.localStorage) {
43148
+ logLevelSpec = window.localStorage.logLevel || logLevelSpec;
43149
+ }
43150
+ }
43151
+ catch { }
43152
+ try {
43153
+ if (typeof process !== 'undefined') {
43154
+ logLevelSpec = process.env.DEBUG || logLevelSpec;
43155
+ }
43156
+ }
43157
+ catch { }
43158
+ try {
43159
+ if (typeof window !== 'undefined') {
43160
+ Object.assign(window, {
43161
+ setLogLevel,
43162
+ });
43163
+ }
43164
+ }
43165
+ catch { }
43166
+ try {
43167
+ if (typeof window !== 'undefined' && !!window.postMessage && window.top === window) {
43168
+ window.addEventListener('message', (msg) => {
43169
+ if (!msg.data || typeof msg.data !== 'object')
43170
+ return;
43171
+ const { loggerId, level, parts, printed, } = msg.data;
43172
+ if (typeof loggerId !== 'string')
43173
+ return;
43174
+ if (!Array.isArray(parts) || parts.length < 1 || typeof level !== 'number')
43175
+ return;
43176
+ const logger = getLogger2(loggerId);
43177
+ if (level < 0 || level > 5)
43178
+ return;
43179
+ parts[0] = parts[0].replace('[', '*[');
43180
+ const entry = new LogEntry(logger, level, parts);
43181
+ entry.stringPrefix = parts[0];
43182
+ replayBuffer.push(entry);
43183
+ if (printed)
43184
+ return;
43185
+ if (logger.level > level)
43186
+ return;
43187
+ console == null ? void 0 : console.log(...entry.toMessage());
43188
+ });
43189
+ }
43190
+ }
43191
+ catch { }
43192
+ var postLogEntry;
43193
+ try {
43194
+ if (typeof window !== 'undefined' && !!window.postMessage && window.top !== window) {
43195
+ postLogEntry = (entry) => {
43196
+ var _a;
43197
+ try {
43198
+ const parts = entry.toMessage().map((p) => jsonSafeCopy(p));
43199
+ const logger = entry.logger;
43200
+ const level = entry.level;
43201
+ const printed = logger.level <= entry.level;
43202
+ const data2 = {
43203
+ loggerId: logger.id,
43204
+ level,
43205
+ parts,
43206
+ printed,
43207
+ };
43208
+ (_a = window.top) == null ? void 0 : _a.postMessage(data2, getServiceMap().app);
43209
+ }
43210
+ catch { }
43211
+ };
43212
+ }
43213
+ }
43214
+ catch { }
43215
+ var loggers = {};
43216
+ var replayBuffer = [];
43217
+ var maxReplayBufferEntries = 1e3;
43218
+ function createLogEntry(logger, level, parts) {
43219
+ const entry = new LogEntry(logger, level, parts);
43220
+ replayBuffer.push(entry);
43221
+ postLogEntry == null ? void 0 : postLogEntry(entry);
43222
+ while (replayBuffer.length > maxReplayBufferEntries) {
43223
+ replayBuffer.shift();
43224
+ }
43225
+ return entry;
43226
+ }
43227
+ function getLogReplayBuffer(maxEntries) {
43228
+ if (typeof maxEntries === 'number') {
43229
+ maxReplayBufferEntries = maxEntries;
43230
+ }
43231
+ return replayBuffer;
43232
+ }
43233
+ var pathRegex = /\/(?<filename>[^/.]+)(?=\.(?:debug\.)?html$)/u;
43234
+ var cachedFilename;
43235
+ function getFilenameFromWindowPathname() {
43236
+ var _a, _b;
43237
+ if (typeof window === 'undefined' || !window.location)
43238
+ return;
43239
+ cachedFilename ??= (_b = (_a = pathRegex.exec(window.location.pathname)) == null ? void 0 : _a.groups) == null ? void 0 : _b.filename;
43240
+ return cachedFilename;
43241
+ }
43242
+ function getLogger2(id3) {
43243
+ const path = getFilenameFromWindowPathname();
43244
+ id3 = (path ? path + ':' : '') + id3;
43245
+ const existing = loggers[id3];
43246
+ if (existing)
43247
+ return existing;
43248
+ const logger = new Logger(id3);
43249
+ loggers[id3] = logger;
43250
+ applyLogLevelSpec(logLevelSpec, [logger,]);
43251
+ postLogEntry == null ? void 0 : postLogEntry(new LogEntry(logger, -1, []));
43252
+ return logger;
43253
+ }
43254
+ function setLogLevel(spec, replay = true) {
43255
+ try {
43256
+ if (typeof window !== 'undefined' && window.localStorage) {
43257
+ window.localStorage.logLevel = spec;
43258
+ }
43259
+ }
43260
+ catch { }
43261
+ const previousSpec = logLevelSpec;
43262
+ logLevelSpec = spec;
43263
+ const all = Object.values(loggers);
43264
+ for (const logger of all) {
43265
+ logger.level = 3;
43266
+ }
43267
+ const missingSpecs = applyLogLevelSpec(spec, all);
43268
+ if (missingSpecs.length > 0) {
43269
+ console == null ? void 0 : console.warn('Some log level specs matched no loggers:', missingSpecs);
43270
+ }
43271
+ if (replay && replayBuffer.length > 0) {
43272
+ console == null ? void 0 : console.log('--- LOG REPLAY ---');
43273
+ for (const entry of replayBuffer) {
43274
+ if (entry.logger.level > entry.level)
43275
+ continue;
43276
+ if (entry.level >= 3) {
43277
+ console == null ? void 0 : console.warn(...entry.toMessage());
43278
+ }
43279
+ else {
43280
+ console == null ? void 0 : console.log(...entry.toMessage());
43281
+ }
43282
+ }
43283
+ console == null ? void 0 : console.log('--- END OF LOG REPLAY ---');
43284
+ }
43285
+ return previousSpec;
43286
+ }
43287
+ var enrichWithLogs = (extras) => {
43288
+ const result = {
43289
+ ...extras,
43290
+ logs: getLogReplayBuffer().slice(-50).map((entry) => entry.toString().slice(0, 600)).join('\n'),
43291
+ };
43292
+ if (extras.logs) {
43293
+ console == null ? void 0 : console.warn('extras.logs is reserved for log replay buffer, use another key');
43294
+ }
43295
+ return result;
43296
+ };
43297
+ var Logger = class {
43298
+ constructor(id3, errorIsCritical) {
43299
+ this.id = id3;
43300
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'level', 3);
43301
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'didLog', {});
43302
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'errorIsCritical');
43303
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'trace', (...parts) => {
43304
+ if (this.level > 0)
43305
+ return;
43306
+ const entry = createLogEntry(this, 0, parts);
43307
+ console == null ? void 0 : console.log(...entry.toMessage());
43308
+ });
43309
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'debug', (...parts) => {
43310
+ const entry = createLogEntry(this, 1, parts);
43311
+ if (this.level > 1)
43312
+ return;
43313
+ console == null ? void 0 : console.log(...entry.toMessage());
43314
+ });
43315
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'info', (...parts) => {
43316
+ const entry = createLogEntry(this, 2, parts);
43317
+ if (this.level > 2)
43318
+ return;
43319
+ console == null ? void 0 : console.info(...entry.toMessage());
43320
+ });
43321
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'warn', (...parts) => {
43322
+ const entry = createLogEntry(this, 3, parts);
43323
+ if (this.level > 3)
43324
+ return;
43325
+ console == null ? void 0 : console.warn(...entry.toMessage());
43326
+ });
43327
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'warnOncePerMinute', (firstPart, ...parts) => {
43328
+ const lastLoggedTime = this.didLog[firstPart];
43329
+ if (lastLoggedTime && lastLoggedTime > Date.now())
43330
+ return;
43331
+ this.didLog[firstPart] = Date.now() + 1e3 * 60;
43332
+ parts.unshift(firstPart);
43333
+ const entry = createLogEntry(this, 3, parts);
43334
+ if (this.level > 3)
43335
+ return;
43336
+ console == null ? void 0 : console.warn(...entry.toMessage());
43337
+ });
43338
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'error', (...parts) => {
43339
+ const entry = createLogEntry(this, 4, parts);
43340
+ if (this.level > 4)
43341
+ return;
43342
+ console == null ? void 0 : console.error(...entry.toMessage());
43343
+ });
43344
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'errorOncePerMinute', (firstPart, ...parts) => {
43345
+ const lastLoggedTime = this.didLog[firstPart];
43346
+ if (lastLoggedTime && lastLoggedTime > Date.now())
43347
+ return;
43348
+ this.didLog[firstPart] = Date.now() + 1e3 * 60;
43349
+ parts.unshift(firstPart);
43350
+ const entry = createLogEntry(this, 4, parts);
43351
+ if (this.level > 4)
43352
+ return;
43353
+ console == null ? void 0 : console.error(...entry.toMessage());
43354
+ });
43355
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'reportError', (maybeError, extras, tags, critical) => {
43356
+ extras = enrichWithLogs(extras ?? {});
43357
+ const reportedError = reportError({
43358
+ caller: this.reportError,
43359
+ error: maybeError,
43360
+ tags: {
43361
+ ...tags,
43362
+ handler: 'logger',
43363
+ where: this.id,
43364
+ },
43365
+ extras,
43366
+ critical: critical ?? this.errorIsCritical,
43367
+ });
43368
+ extras ? this.error(reportedError, extras) : this.error(reportedError);
43369
+ });
43370
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'reportErrorOncePerMinute', (error, extras) => {
43371
+ if (!isErrorWithMessage(error))
43372
+ return;
43373
+ const lastLoggedTime = this.didLog[error.message];
43374
+ if (lastLoggedTime && lastLoggedTime > Date.now())
43375
+ return;
43376
+ this.didLog[error.message] = Date.now() + 1e3 * 60;
43377
+ this.reportError(error, extras);
43378
+ });
43379
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'reportCriticalError', (maybeError, extras, tags) => this.reportError(maybeError, extras, tags, true));
43380
+ this.errorIsCritical = errorIsCritical ?? (id3 === 'fatal' || id3.endsWith(':fatal'));
43381
+ }
43382
+ extend(name) {
43383
+ const id3 = this.id + ':' + name;
43384
+ return getLogger2(id3);
43385
+ }
43386
+ /** Returns the messages this logger created that are still in the global replay buffer. */
43387
+ getBufferedMessages() {
43388
+ return replayBuffer.filter((entry) => entry.logger === this);
43389
+ }
43390
+ /** Set new level and return previous level. */
43391
+ setLevel(level) {
43392
+ const previous = this.level;
43393
+ this.level = level;
43394
+ return previous;
43395
+ }
43396
+ /** Check if a trace messages will be output. */
43397
+ isLoggingTraceMessages() {
43398
+ return this.level >= 0;
43399
+ }
43400
+ };
43401
+ function isErrorWithMessage(maybeError) {
43402
+ return Object.prototype.hasOwnProperty.call(maybeError, 'message');
43403
+ }
43404
+ function escapeRegExp(string) {
43405
+ return string.replace(/[/\-\\^$*+?.()|[\]{}]/gu, '\\$&');
43406
+ }
43407
+ var Mixed = Symbol('Mixed');
43408
+ var DEPENDENCIES_MODULE_NAME = 'dependencies';
43409
+ var DEPENDENCIES_MODULE_TYPE = 'config';
43410
+ var DEPENDENCIES_MODULE_TYPE_SLASH_NAME = `${DEPENDENCIES_MODULE_TYPE}/${DEPENDENCIES_MODULE_NAME}`;
43411
+ var IMPORT_MAP_FILE_ID = `${DEPENDENCIES_MODULE_TYPE_SLASH_NAME}/importMap.json`;
43412
+ var DEPENDENCIES_FILE_ID = `${DEPENDENCIES_MODULE_TYPE_SLASH_NAME}/dependencies.json`;
43413
+ var USE_FREEZE = false;
43414
+ var List;
43415
+ ((List2) => {
43416
+ function push(ls, ...elements) {
43417
+ return ls.concat(elements);
43418
+ }
43419
+ List2.push = push;
43420
+ function pop(a) {
43421
+ return a.slice(0, -1);
43422
+ }
43423
+ List2.pop = pop;
43424
+ function unshift(ls, ...elements) {
43425
+ return elements.concat(ls);
43426
+ }
43427
+ List2.unshift = unshift;
43428
+ function insert(a, index, ...elements) {
43429
+ const length = a.length;
43430
+ if (index < 0 || index > length)
43431
+ throw Error('index out of range: ' + index);
43432
+ const copy = a.slice();
43433
+ copy.splice(index, 0, ...elements);
43434
+ return copy;
43435
+ }
43436
+ List2.insert = insert;
43437
+ function replace(a, index, replacement) {
43438
+ const length = a.length;
43439
+ if (index < 0 || index >= length)
43440
+ throw Error('index out of range: ' + index);
43441
+ const itemsToAdd = Array.isArray(replacement) ? replacement : [replacement,];
43442
+ const copy = a.slice();
43443
+ copy.splice(index, 1, ...itemsToAdd);
43444
+ return copy;
43445
+ }
43446
+ List2.replace = replace;
43447
+ function remove2(a, index) {
43448
+ const length = a.length;
43449
+ if (index < 0 || index >= length)
43450
+ throw Error('index out of range: ' + index);
43451
+ const copy = a.slice();
43452
+ copy.splice(index, 1);
43453
+ return copy;
43454
+ }
43455
+ List2.remove = remove2;
43456
+ function move(a, from, to) {
43457
+ const length = a.length;
43458
+ if (from < 0 || from >= length)
43459
+ throw Error('from index out of range: ' + from);
43460
+ if (to < 0 || to >= length)
43461
+ throw Error('to index out of range: ' + to);
43462
+ const copy = a.slice();
43463
+ if (to === from)
43464
+ return copy;
43465
+ const element = copy[from];
43466
+ if (from < to) {
43467
+ copy.splice(to + 1, 0, element);
43468
+ copy.splice(from, 1);
43469
+ }
43470
+ else {
43471
+ copy.splice(from, 1);
43472
+ copy.splice(to, 0, element);
43473
+ }
43474
+ return copy;
43475
+ }
43476
+ List2.move = move;
43477
+ function zip(a, b) {
43478
+ const res = [];
43479
+ const length = Math.min(a.length, b.length);
43480
+ for (let i = 0; i < length; i++) {
43481
+ res.push([a[i], b[i],]);
43482
+ }
43483
+ return res;
43484
+ }
43485
+ List2.zip = zip;
43486
+ function update(a, index, body) {
43487
+ const res = a.slice();
43488
+ const targetElement = res[index];
43489
+ if (targetElement === void 0)
43490
+ return res;
43491
+ res[index] = body(targetElement);
43492
+ return res;
43493
+ }
43494
+ List2.update = update;
43495
+ function unique(a) {
43496
+ return Array.from(new Set(a));
43497
+ }
43498
+ List2.unique = unique;
43499
+ function union(a, ...collections) {
43500
+ return Array.from(/* @__PURE__ */ new Set([...a, ...collections.flat(),]));
43501
+ }
43502
+ List2.union = union;
43503
+ function filter2(a, predicate) {
43504
+ return a.filter(predicate);
43505
+ }
43506
+ List2.filter = filter2;
43507
+ })(List || (List = {}));
43508
+ var objectHasOwnProperty = Object.prototype.hasOwnProperty;
43509
+ function hasOwnProperty2(object, property) {
43510
+ return objectHasOwnProperty.call(object, property);
43511
+ }
43512
+ var ValueObject;
43513
+ ((ValueObject2) => {
43514
+ function morphUsingTemplate(values, template) {
43515
+ for (const field of Object.keys(values)) {
43516
+ if (!hasOwnProperty2(template, field)) {
43517
+ delete values[field];
43518
+ }
43519
+ }
43520
+ for (const field of Object.keys(template)) {
43521
+ if (values[field] === void 0) {
43522
+ values[field] = template[field];
43523
+ }
43524
+ }
43525
+ Object.setPrototypeOf(values, Object.getPrototypeOf(template));
43526
+ if (USE_FREEZE) {
43527
+ Object.freeze(values);
43528
+ }
43529
+ return values;
43530
+ }
43531
+ ValueObject2.morphUsingTemplate = morphUsingTemplate;
43532
+ function writeOnce(object, values) {
43533
+ if (values) {
43534
+ Object.assign(object, values);
43535
+ }
43536
+ if (USE_FREEZE) {
43537
+ Object.freeze(object);
43538
+ }
43539
+ }
43540
+ ValueObject2.writeOnce = writeOnce;
43541
+ function update(object, values) {
43542
+ const result = Object.assign(Object.create(Object.getPrototypeOf(object)), object, values);
43543
+ if (USE_FREEZE) {
43544
+ Object.freeze(result);
43545
+ }
43546
+ return result;
43547
+ }
43548
+ ValueObject2.update = update;
43549
+ })(ValueObject || (ValueObject = {}));
43550
+ var ReadonlySet;
43551
+ ((ReadonlySet2) => {
43552
+ function add3(set, ...items) {
43553
+ return /* @__PURE__ */ new Set([...set, ...items,]);
43554
+ }
43555
+ ReadonlySet2.add = add3;
43556
+ function remove2(set, ...items) {
43557
+ const result = new Set(set);
43558
+ for (const item of items) {
43559
+ result.delete(item);
43560
+ }
43561
+ return result;
43562
+ }
43563
+ ReadonlySet2.remove = remove2;
43564
+ function union(...sets) {
43565
+ const result = /* @__PURE__ */ new Set();
43566
+ for (const set of sets) {
43567
+ for (const item of set) {
43568
+ result.add(item);
43569
+ }
43570
+ }
43571
+ return result;
43572
+ }
43573
+ ReadonlySet2.union = union;
43574
+ function toggle(set, item) {
43575
+ if (set.has(item)) {
43576
+ return ReadonlySet2.remove(set, item);
43577
+ }
43578
+ return ReadonlySet2.add(set, item);
43579
+ }
43580
+ ReadonlySet2.toggle = toggle;
43581
+ })(ReadonlySet || (ReadonlySet = {}));
43582
+ var ReadonlyMap;
43583
+ ((ReadonlyMap2) => {
43584
+ function set(map2, key7, value) {
43585
+ const result = new Map(map2);
43586
+ result.set(key7, value);
43587
+ return result;
43588
+ }
43589
+ ReadonlyMap2.set = set;
43590
+ function remove2(map2, key7) {
43591
+ const result = new Map(map2);
43592
+ result.delete(key7);
43593
+ return result;
43594
+ }
43595
+ ReadonlyMap2.remove = remove2;
43596
+ })(ReadonlyMap || (ReadonlyMap = {}));
43597
+ var ResolvablePromise = class extends Promise {
43598
+ constructor() {
43599
+ let res;
43600
+ let rej;
43601
+ super((resolve, reject) => {
43602
+ res = resolve;
43603
+ rej = reject;
43604
+ });
43605
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, '_state', 'initial');
43606
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'resolve');
43607
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'reject');
43608
+ this.resolve = (val) => {
43609
+ this._state = 'fulfilled';
43610
+ res(val);
43611
+ };
43612
+ this.reject = (reason) => {
43613
+ this._state = 'rejected';
43614
+ rej(reason);
43615
+ };
43616
+ }
43617
+ get state() {
43618
+ return this._state;
43619
+ }
43620
+ /**
43621
+ * A function that sets the state to "pending".
43622
+ * Useful for when you want to signal that the task started but is not yet completed.
43623
+ */
43624
+ pending() {
43625
+ this._state = 'pending';
43626
+ return this;
43627
+ }
43628
+ isResolved() {
43629
+ return this._state === 'fulfilled' || this._state === 'rejected';
43630
+ }
43631
+ };
43632
+ ResolvablePromise.prototype.constructor = Promise;
43633
+ var hasNativeYield = false;
43634
+ var hasNativePostTask = false;
43635
+ var hasIsInputPending = false;
43636
+ if (typeof window !== 'undefined' && window.scheduler) {
43637
+ hasNativeYield = 'yield' in window.scheduler;
43638
+ hasNativePostTask = 'postTask' in window.scheduler;
43639
+ hasIsInputPending = 'isInputPending' in window.scheduler;
43640
+ }
43641
+ var log2 = getLogger2('task-queue');
43642
+ function getAssetFilename(asset) {
43643
+ return asset.key + asset.extension;
43644
+ }
43645
+ function createAbsoluteAssetURL(filename) {
43646
+ const serviceMap = getServiceMap();
43647
+ return `${serviceMap.userContent}/assets/${filename}`;
43648
+ }
43649
+ function createAbsoluteAssetURLFromAsset(asset) {
43650
+ return createAbsoluteAssetURL(getAssetFilename(asset));
43651
+ }
42775
43652
  function supportsOpenType(openTypeData) {
42776
43653
  return Boolean(openTypeData && Array.isArray(openTypeData));
42777
43654
  }
@@ -42837,17 +43714,18 @@ var BuiltInFontSource = class {
42837
43714
  if (!this.isValidBuiltInFont(asset))
42838
43715
  continue;
42839
43716
  const { properties, } = asset;
42840
- const fontName = properties.font.preferredFamily || properties.font.fontFamily;
43717
+ const fontName = properties.font.fontFamily;
42841
43718
  const fontFamily = this.createFontFamily(fontName, properties.font.foundryName, properties.font.fontVersion);
42842
43719
  const openTypeData = properties.font.openTypeData;
42843
43720
  const variationAxesData = properties.font.variationAxes;
42844
43721
  const isVariableFont2 = Array.isArray(variationAxesData);
42845
- const variant = isVariableFont2 ? 'variable' : properties.font.preferredSubFamily || properties.font.fontSubFamily || 'regular';
43722
+ const variant = isVariableFont2 ? 'variable' : properties.font.fontSubFamily || 'regular';
43723
+ const url = createAbsoluteAssetURLFromAsset(asset);
42846
43724
  const font = {
42847
43725
  family: fontFamily,
42848
43726
  selector: this.createSelector(fontName, variant, properties.font.fontVersion),
42849
43727
  variant,
42850
- file: asset.url,
43728
+ file: url,
42851
43729
  hasOpenTypeFeatures: supportsOpenType(openTypeData),
42852
43730
  variationAxes: validateVariationAxes(variationAxesData),
42853
43731
  category: properties.font.fontCategory,
@@ -42878,12 +43756,10 @@ var BuiltInFontSource = class {
42878
43756
  style: style2,
42879
43757
  };
42880
43758
  }
42881
- getFontBySelector(selector, createFont = true) {
43759
+ getFontBySelector(selector) {
42882
43760
  const locator = this.parseSelector(selector);
42883
43761
  if (!locator)
42884
43762
  return;
42885
- if (!createFont && !this.byFamilyName.get(locator.name))
42886
- return;
42887
43763
  const fontFamily = this.getFontFamilyByName(locator.name);
42888
43764
  if (!fontFamily)
42889
43765
  return;
@@ -43044,29 +43920,154 @@ function getFontStyle(variant) {
43044
43920
  return 'italic';
43045
43921
  return 'normal';
43046
43922
  }
43923
+ function getRelatedFontVariants(currentVariant, availableVariants) {
43924
+ return {
43925
+ ...pickBoldItalicVariants(currentVariant, availableVariants),
43926
+ ...pickVariableVariants(currentVariant, availableVariants),
43927
+ };
43928
+ }
43929
+ function pickBoldItalicVariants(currentVariant, availableVariants) {
43930
+ if (availableVariants.length === 0) {
43931
+ return {
43932
+ variantBold: void 0,
43933
+ variantBoldItalic: void 0,
43934
+ variantItalic: void 0,
43935
+ };
43936
+ }
43937
+ const { weight: currentWeight, style: currentStyle, } = currentVariant;
43938
+ const variantByWeightAndStyle = /* @__PURE__ */ new Map();
43939
+ const boldVariantByStyle = /* @__PURE__ */ new Map();
43940
+ for (const variant of availableVariants) {
43941
+ if (variant.isVariable !== currentVariant.isVariable)
43942
+ continue;
43943
+ variantByWeightAndStyle.set(`${variant.weight}-${variant.style}`, variant);
43944
+ if (variant.weight <= currentWeight)
43945
+ continue;
43946
+ if (!boldVariantByStyle.has(variant.style)) {
43947
+ boldVariantByStyle.set(variant.style, variant);
43948
+ }
43949
+ }
43950
+ let variantBold = boldVariantByStyle.get(currentStyle);
43951
+ let variantBoldItalic = boldVariantByStyle.get('italic');
43952
+ const currentVariantWeight = currentVariant.weight;
43953
+ if (currentVariantWeight <= 300) {
43954
+ variantBold = variantByWeightAndStyle.get(`400-${currentStyle}`) ?? variantBold;
43955
+ variantBoldItalic = variantByWeightAndStyle.get('400-italic') ?? variantBoldItalic;
43956
+ }
43957
+ else if (currentVariantWeight <= 500) {
43958
+ variantBold = variantByWeightAndStyle.get(`700-${currentStyle}`) ?? variantBold;
43959
+ variantBoldItalic = variantByWeightAndStyle.get('700-italic') ?? variantBoldItalic;
43960
+ }
43961
+ else {
43962
+ variantBold = variantByWeightAndStyle.get(`900-${currentStyle}`) ?? variantBold;
43963
+ variantBoldItalic = variantByWeightAndStyle.get('900-italic') ?? variantBoldItalic;
43964
+ }
43965
+ const variantItalic = variantByWeightAndStyle.get(`${currentWeight}-italic`);
43966
+ return {
43967
+ variantBold,
43968
+ variantItalic,
43969
+ variantBoldItalic,
43970
+ };
43971
+ }
43972
+ function pickVariableVariants(currentVariant, availableVariants) {
43973
+ if (availableVariants.length === 0) {
43974
+ return {
43975
+ variantVariable: void 0,
43976
+ variantVariableItalic: void 0,
43977
+ };
43978
+ }
43979
+ const variantByWeightAndStyle = /* @__PURE__ */ new Map();
43980
+ let variantVariable;
43981
+ let variantVariableItalic;
43982
+ let fallbackVariant;
43983
+ let fallbackItalicVariant;
43984
+ for (const variant of availableVariants) {
43985
+ if (!variant.isVariable)
43986
+ continue;
43987
+ const isSameWeight = variant.weight === currentVariant.weight;
43988
+ const isDefaultWeight = variant.weight === 400;
43989
+ if (variant.style === 'normal') {
43990
+ if (isSameWeight) {
43991
+ variantVariable = variant;
43992
+ }
43993
+ else if (isDefaultWeight) {
43994
+ fallbackVariant = variant;
43995
+ }
43996
+ else if (!fallbackVariant) {
43997
+ fallbackVariant = variant;
43998
+ }
43999
+ }
44000
+ else if (variant.style === 'italic') {
44001
+ if (isSameWeight) {
44002
+ variantVariableItalic = variant;
44003
+ }
44004
+ else if (isDefaultWeight) {
44005
+ fallbackItalicVariant = variant;
44006
+ }
44007
+ else if (!fallbackItalicVariant) {
44008
+ fallbackItalicVariant = variant;
44009
+ }
44010
+ }
44011
+ }
44012
+ return {
44013
+ variantVariable: variantVariable ?? fallbackVariant,
44014
+ variantVariableItalic: variantVariableItalic ?? fallbackItalicVariant,
44015
+ };
44016
+ }
43047
44017
  var customFontSelectorPrefix = 'CUSTOM;';
44018
+ var log3 = getLogger('custom-font-source');
44019
+ function findDuplicateFont(existingFonts, newFont) {
44020
+ for (let i = 0; i < existingFonts.length; i++) {
44021
+ const existingFont = existingFonts[i];
44022
+ if (existingFont && existingFont.selector === newFont.selector && existingFont.weight === newFont.weight &&
44023
+ existingFont.style === newFont.style) {
44024
+ return {
44025
+ existingFont,
44026
+ index: i,
44027
+ };
44028
+ }
44029
+ }
44030
+ return void 0;
44031
+ }
43048
44032
  function getCustomFontName(fileName, properties) {
43049
44033
  if (!properties)
43050
44034
  return fileName.substring(0, fileName.lastIndexOf('.'));
43051
44035
  const { font, } = properties;
43052
- const fontFamily = font.preferredFamily || font.fontFamily;
44036
+ const fontFamily = font.fontFamily;
43053
44037
  const isAssetVariableFont = Array.isArray(font.variationAxes);
43054
44038
  if (isAssetVariableFont && fontFamily.toLowerCase().includes('variable'))
43055
44039
  return fontFamily;
43056
- const variant = isAssetVariableFont ? 'Variable' : (font.preferredSubFamily || font.fontSubFamily).trim();
44040
+ const variant = isAssetVariableFont ? 'Variable' : font.fontSubFamily.trim();
43057
44041
  if (variant === '')
43058
44042
  return fontFamily;
43059
44043
  return `${fontFamily} ${variant}`;
43060
44044
  }
43061
- var CustomFontSource = class {
44045
+ function getCustomFontInfo({ fontFamily, fontSubFamily, variationAxes, faceDescriptors, }) {
44046
+ const rawVariant = fontSubFamily.trim() || 'Regular';
44047
+ const containsVariant = rawVariant.toLocaleLowerCase().includes('variable');
44048
+ const variant = validateVariationAxes(variationAxes) && !containsVariant ? `Variable ${rawVariant}` : rawVariant;
44049
+ let style2 = 'normal';
44050
+ let weight = 400;
44051
+ if (faceDescriptors) {
44052
+ weight = faceDescriptors.weight;
44053
+ style2 = faceDescriptors.italic || faceDescriptors.oblique ? 'italic' : 'normal';
44054
+ }
44055
+ return {
44056
+ family: fontFamily,
44057
+ variant,
44058
+ weight,
44059
+ style: style2,
44060
+ };
44061
+ }
44062
+ var CustomFontSource = class _CustomFontSource {
43062
44063
  constructor() {
43063
44064
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'name', 'custom');
43064
44065
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'fontFamilies', []);
43065
44066
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'byFamilyName', /* @__PURE__ */ new Map());
43066
44067
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'assetsByFamily', /* @__PURE__ */ new Map());
43067
44068
  }
43068
- importFonts(assets) {
43069
- var _a, _b, _c;
44069
+ deprecatedImportFonts(assets) {
44070
+ var _a, _b;
43070
44071
  this.fontFamilies.length = 0;
43071
44072
  this.byFamilyName.clear();
43072
44073
  this.assetsByFamily.clear();
@@ -43081,12 +44082,12 @@ var CustomFontSource = class {
43081
44082
  const fontFamily = this.createFontFamily(fontName);
43082
44083
  const openTypeData = (_b = asset.properties) == null ? void 0 : _b.font.openTypeData;
43083
44084
  const variant = isVariableFont2 ? 'variable' : this.inferVariantName(fontName);
44085
+ const url = createAbsoluteAssetURLFromAsset(asset);
43084
44086
  const font = {
43085
44087
  family: fontFamily,
43086
44088
  selector: `${customFontSelectorPrefix}${fontName}`,
43087
44089
  variant,
43088
- postscriptName: (_c = asset.properties) == null ? void 0 : _c.font.postscriptName,
43089
- file: asset.url,
44090
+ file: url,
43090
44091
  hasOpenTypeFeatures: supportsOpenType(openTypeData),
43091
44092
  variationAxes: validateVariationAxes(variationAxesData),
43092
44093
  };
@@ -43097,6 +44098,61 @@ var CustomFontSource = class {
43097
44098
  }
43098
44099
  return fonts;
43099
44100
  }
44101
+ importFonts(assets, enableFontImprovements) {
44102
+ var _a, _b, _c, _d;
44103
+ if (!enableFontImprovements) {
44104
+ return this.deprecatedImportFonts(assets);
44105
+ }
44106
+ this.fontFamilies.length = 0;
44107
+ this.byFamilyName.clear();
44108
+ this.assetsByFamily.clear();
44109
+ const fonts = {};
44110
+ for (const asset of assets) {
44111
+ if (!this.isValidCustomFontAsset(asset)) {
44112
+ continue;
44113
+ }
44114
+ const { family, variant, weight, style: style2, } = getCustomFontInfo(asset.properties.font);
44115
+ const fontFamily = this.createFontFamily(family);
44116
+ const openTypeData = (_a = asset.properties) == null ? void 0 : _a.font.openTypeData;
44117
+ const url = createAbsoluteAssetURLFromAsset(asset);
44118
+ const font = {
44119
+ family: fontFamily,
44120
+ selector: _CustomFontSource.createSelector(fontFamily.name, variant),
44121
+ variant,
44122
+ weight,
44123
+ style: style2,
44124
+ file: url,
44125
+ hasOpenTypeFeatures: supportsOpenType(openTypeData),
44126
+ variationAxes: validateVariationAxes((_b = asset.properties) == null ? void 0 : _b.font.variationAxes),
44127
+ };
44128
+ const duplicateInfo = findDuplicateFont(fontFamily.fonts, font);
44129
+ if (duplicateInfo) {
44130
+ log3.warn('Duplicate font found for:', font, 'with existing font:', duplicateInfo.existingFont);
44131
+ const existingFont = duplicateInfo.existingFont;
44132
+ const newIsWoff2 = ((_c = font.file) == null ? void 0 : _c.endsWith('.woff2')) ?? false;
44133
+ const existingIsWoff2 = ((_d = existingFont.file) == null ? void 0 : _d.endsWith('.woff2')) ?? false;
44134
+ if (newIsWoff2 && !existingIsWoff2) {
44135
+ fontFamily.fonts[duplicateInfo.index] = font;
44136
+ fonts[font.selector] = font;
44137
+ }
44138
+ }
44139
+ else {
44140
+ fontFamily.fonts.push(font);
44141
+ fonts[font.selector] = font;
44142
+ }
44143
+ fontFamily.owner = asset.ownerType === 'team' ? 'team' : 'project';
44144
+ this.assetsByFamily.set(family, asset);
44145
+ }
44146
+ for (const fontFamily of this.fontFamilies) {
44147
+ if (fontFamily.fonts.length > 0) {
44148
+ updateFontRelationships(fontFamily);
44149
+ }
44150
+ }
44151
+ return Object.values(fonts);
44152
+ }
44153
+ static createSelector(family, variant) {
44154
+ return `${customFontSelectorPrefix}${family}${variant ? ` ${variant}` : ''}`;
44155
+ }
43100
44156
  isValidCustomFontAsset(asset) {
43101
44157
  var _a;
43102
44158
  if (!asset.mimeType.startsWith('font/'))
@@ -43150,125 +44206,72 @@ var CustomFontSource = class {
43150
44206
  this.fontFamilies.push(fontFamily);
43151
44207
  this.byFamilyName.set(fontFamily.name, fontFamily);
43152
44208
  }
43153
- parseSelector(selector) {
44209
+ getFontBySelector(selector) {
43154
44210
  if (!selector.startsWith(customFontSelectorPrefix))
43155
- return null;
43156
- const tokens = selector.split(customFontSelectorPrefix);
43157
- if (tokens[1] === void 0)
43158
- return null;
43159
- const locator = {
43160
- source: 'custom',
43161
- name: tokens[1],
43162
- };
43163
- return locator;
43164
- }
43165
- getFontBySelector(selector, createFont = true) {
43166
- const locator = this.parseSelector(selector);
43167
- if (!locator)
43168
- return;
43169
- if (!createFont && !this.byFamilyName.get(locator.name))
43170
- return;
43171
- const fonts = this.getFontFamilyByName(locator.name).fonts;
43172
- const woff2Font = fonts.find((font) => {
43173
- var _a;
43174
- return (_a = font.file) == null ? void 0 : _a.endsWith('.woff2');
43175
- });
43176
- return woff2Font || fonts[0];
44211
+ return void 0;
44212
+ const remainingSelector = selector.slice(customFontSelectorPrefix.length);
44213
+ if (!remainingSelector)
44214
+ return void 0;
44215
+ const matchingFonts = [];
44216
+ for (const [familyName, fontFamily,] of this.byFamilyName) {
44217
+ if (remainingSelector.startsWith(familyName)) {
44218
+ const exactMatches = fontFamily.fonts.filter((font) => font.selector === selector);
44219
+ matchingFonts.push(...exactMatches);
44220
+ }
44221
+ }
44222
+ if (matchingFonts.length > 0) {
44223
+ if (matchingFonts.length > 1) {
44224
+ const woff2Font = matchingFonts.find((font) => {
44225
+ var _a;
44226
+ return (_a = font.file) == null ? void 0 : _a.endsWith('.woff2');
44227
+ });
44228
+ if (woff2Font)
44229
+ return woff2Font;
44230
+ }
44231
+ return matchingFonts[0];
44232
+ }
44233
+ return void 0;
43177
44234
  }
43178
44235
  getFontFamilyByName(family) {
43179
44236
  const foundFontFamily = this.byFamilyName.get(family);
43180
- if (foundFontFamily)
43181
- return foundFontFamily;
43182
- const fontFamily = {
43183
- source: 'custom',
43184
- name: family,
43185
- fonts: [],
43186
- };
43187
- fontFamily.fonts.push({
43188
- selector: `${customFontSelectorPrefix}${family}`,
43189
- variant: this.inferVariantName(family),
43190
- family: fontFamily,
43191
- });
43192
- return fontFamily;
44237
+ if (!foundFontFamily)
44238
+ return null;
44239
+ return foundFontFamily;
43193
44240
  }
43194
44241
  };
43195
- function getRelatedFontVariants(currentVariant, availableVariants) {
43196
- return {
43197
- ...pickBoldItalicVariants(currentVariant, availableVariants),
43198
- ...pickVariableVariants(currentVariant, availableVariants),
43199
- };
43200
- }
43201
- function pickBoldItalicVariants(currentVariant, availableVariants) {
43202
- if (availableVariants.length === 0) {
43203
- return {
43204
- variantBold: void 0,
43205
- variantBoldItalic: void 0,
43206
- variantItalic: void 0,
43207
- };
43208
- }
43209
- const { weight: currentWeight, style: currentStyle, } = currentVariant;
43210
- const variantByWeightAndStyle = /* @__PURE__ */ new Map();
43211
- const boldVariantByStyle = /* @__PURE__ */ new Map();
43212
- for (const variant of availableVariants) {
43213
- if (variant.isVariable !== currentVariant.isVariable)
43214
- continue;
43215
- variantByWeightAndStyle.set(`${variant.weight}-${variant.style}`, variant);
43216
- if (variant.weight <= currentWeight)
43217
- continue;
43218
- if (!boldVariantByStyle.has(variant.style)) {
43219
- boldVariantByStyle.set(variant.style, variant);
43220
- }
43221
- }
43222
- let variantBold = boldVariantByStyle.get(currentStyle);
43223
- let variantBoldItalic = boldVariantByStyle.get('italic');
43224
- const currentVariantWeight = currentVariant.weight;
43225
- if (currentVariantWeight <= 300) {
43226
- variantBold = variantByWeightAndStyle.get(`400-${currentStyle}`) ?? variantBold;
43227
- variantBoldItalic = variantByWeightAndStyle.get('400-italic') ?? variantBoldItalic;
43228
- }
43229
- else if (currentVariantWeight <= 500) {
43230
- variantBold = variantByWeightAndStyle.get(`700-${currentStyle}`) ?? variantBold;
43231
- variantBoldItalic = variantByWeightAndStyle.get('700-italic') ?? variantBoldItalic;
43232
- }
43233
- else {
43234
- variantBold = variantByWeightAndStyle.get(`900-${currentStyle}`) ?? variantBold;
43235
- variantBoldItalic = variantByWeightAndStyle.get('900-italic') ?? variantBoldItalic;
43236
- }
43237
- const variantItalic = variantByWeightAndStyle.get(`${currentWeight}-italic`);
44242
+ function fontToVariantWithMetadata(font) {
44243
+ if (!font.weight || !font.style)
44244
+ return void 0;
43238
44245
  return {
43239
- variantBold,
43240
- variantItalic,
43241
- variantBoldItalic,
43242
- };
43243
- }
43244
- function pickVariableVariants(currentVariant, availableVariants) {
43245
- if (availableVariants.length === 0) {
43246
- return {
43247
- variantVariable: void 0,
43248
- variantVariableItalic: void 0,
43249
- };
43250
- }
43251
- const variantByWeightAndStyle = /* @__PURE__ */ new Map();
43252
- for (const variant of availableVariants) {
43253
- if (!variant.isVariable)
44246
+ weight: font.weight,
44247
+ style: font.style,
44248
+ isVariable: isVariableFont(font),
44249
+ selector: font.selector,
44250
+ };
44251
+ }
44252
+ function updateFontRelationships(fontFamily) {
44253
+ var _a, _b, _c, _d, _e;
44254
+ const availableVariants = fontFamily.fonts.map((font) => fontToVariantWithMetadata(font)).filter((font) => font !== void 0);
44255
+ for (const font of fontFamily.fonts) {
44256
+ const variant = fontToVariantWithMetadata(font);
44257
+ if (!variant)
43254
44258
  continue;
43255
- variantByWeightAndStyle.set(`${variant.weight}-${variant.style}`, variant);
44259
+ const relatedVariants = getRelatedFontVariants(variant, availableVariants);
44260
+ font.selectorVariable = (_a = relatedVariants.variantVariable) == null ? void 0 : _a.selector;
44261
+ font.selectorVariableItalic = (_b = relatedVariants.variantVariableItalic) == null ? void 0 : _b.selector;
44262
+ font.selectorBold = (_c = relatedVariants.variantBold) == null ? void 0 : _c.selector;
44263
+ font.selectorBoldItalic = (_d = relatedVariants.variantBoldItalic) == null ? void 0 : _d.selector;
44264
+ font.selectorItalic = (_e = relatedVariants.variantItalic) == null ? void 0 : _e.selector;
43256
44265
  }
43257
- return {
43258
- variantVariable: variantByWeightAndStyle.get(`${currentVariant.weight}-normal`) ?? variantByWeightAndStyle.get(`400-normal`) ??
43259
- void 0,
43260
- variantVariableItalic: variantByWeightAndStyle.get(`${currentVariant.weight}-italic`) ?? variantByWeightAndStyle.get(`400-italic`) ??
43261
- void 0,
43262
- };
43263
44266
  }
43264
44267
  async function loadFontsWithOpenType(source) {
43265
44268
  switch (source) {
43266
44269
  case 'google': {
43267
- const supportedFonts = await import('./framer-chunks/google-LHIHIYDX-NVWWNJLR.js');
44270
+ const supportedFonts = await import('./framer-chunks/google-3ASCFEEO-3R47BR2A.js');
43268
44271
  return supportedFonts == null ? void 0 : supportedFonts.default;
43269
44272
  }
43270
44273
  case 'fontshare': {
43271
- const supportedFonts = await import('./framer-chunks/fontshare-GSJIWLGZ-3DSFZVD7.js');
44274
+ const supportedFonts = await import('./framer-chunks/fontshare-4J2ZFRBB-H5VQLZTM.js');
43272
44275
  return supportedFonts == null ? void 0 : supportedFonts.default;
43273
44276
  }
43274
44277
  default:
@@ -43278,11 +44281,11 @@ async function loadFontsWithOpenType(source) {
43278
44281
  async function loadFontToOpenTypeFeatures(source) {
43279
44282
  switch (source) {
43280
44283
  case 'google': {
43281
- const features = await import('./framer-chunks/google-3GQMHAEU-WSITVUPV.js');
44284
+ const features = await import('./framer-chunks/google-FDB6LUFQ-PFSUZGKF.js');
43282
44285
  return features == null ? void 0 : features.default;
43283
44286
  }
43284
44287
  case 'fontshare': {
43285
- const features = await import('./framer-chunks/fontshare-SSHBFVID-JIQZ2OLR.js');
44288
+ const features = await import('./framer-chunks/fontshare-622CVMZZ-HFPH543A.js');
43286
44289
  return features == null ? void 0 : features.default;
43287
44290
  }
43288
44291
  case 'framer': {
@@ -43807,10 +44810,10 @@ function loadVariationAxes(source) {
43807
44810
  const axes = (async () => {
43808
44811
  switch (source) {
43809
44812
  case 'google': {
43810
- return (await import('./framer-chunks/google-42BCYVR5-QT55MZO3.js')).default;
44813
+ return (await import('./framer-chunks/google-C62SNV32-LCI4F7VO.js')).default;
43811
44814
  }
43812
44815
  case 'fontshare': {
43813
- return (await import('./framer-chunks/fontshare-X6MCIXW5-UOB5XTBQ.js')).default;
44816
+ return (await import('./framer-chunks/fontshare-JGEKH7YN-QOX3MC3K.js')).default;
43814
44817
  }
43815
44818
  default:
43816
44819
  assertNever(source);
@@ -43916,13 +44919,13 @@ var FontStore = class {
43916
44919
  this.addFont(font);
43917
44920
  });
43918
44921
  }
43919
- importCustomFonts(assets) {
44922
+ importCustomFonts(assets, enableFontImprovements) {
43920
44923
  this.bySelector.forEach((_, key7) => {
43921
44924
  if (key7.startsWith(customFontSelectorPrefix)) {
43922
44925
  this.bySelector.delete(key7);
43923
44926
  }
43924
44927
  });
43925
- const importedFonts = this.custom.importFonts(assets);
44928
+ const importedFonts = this.custom.importFonts(assets, enableFontImprovements);
43926
44929
  for (const font of importedFonts) {
43927
44930
  this.addFont(font);
43928
44931
  }
@@ -43930,15 +44933,22 @@ var FontStore = class {
43930
44933
  this.resolveCustomFontsImportPromise();
43931
44934
  }
43932
44935
  }
44936
+ /**
44937
+ * Returns a promise that resolves when custom fonts have been imported
44938
+ * @internal
44939
+ */
44940
+ getCustomFontsImportPromise() {
44941
+ return this.customFontsImportPromise;
44942
+ }
43933
44943
  getFontFamily(info) {
43934
44944
  const fontFamily = this[info.source].getFontFamilyByName(info.name);
43935
44945
  return fontFamily;
43936
44946
  }
43937
- getFontBySelector(selector, createFont = true) {
44947
+ getFontBySelector(selector) {
43938
44948
  if (!selector)
43939
44949
  return void 0;
43940
44950
  if (selector.startsWith(customFontSelectorPrefix)) {
43941
- return this.custom.getFontBySelector(selector, createFont);
44951
+ return this.custom.getFontBySelector(selector);
43942
44952
  }
43943
44953
  return this.bySelector.get(selector);
43944
44954
  }
@@ -44763,11 +45773,6 @@ var Image2 = /* @__PURE__ */ react_11.default.forwardRef(function Image3(props,
44763
45773
  });
44764
45774
  });
44765
45775
  exports.Image = Image2;
44766
- var nonSlugCharactersRegExp = /[^\p{Letter}\p{Number}()]+/gu;
44767
- var trimSlugRegExp = /^-+|-+$/gu;
44768
- function slugify(value) {
44769
- return value.toLowerCase().replace(nonSlugCharactersRegExp, '-').replace(trimSlugRegExp, '');
44770
- }
44771
45776
  var frameFromElement = (element) => {
44772
45777
  const frame2 = Rect.fromRect(element.getBoundingClientRect());
44773
45778
  frame2.x = frame2.x + safeWindow.scrollX;
@@ -45932,11 +46937,11 @@ function imagePatternPropsForFill(fill, frame2, id3, includeTransform) {
45932
46937
  };
45933
46938
  }
45934
46939
  var mediaType2 = 'framer/asset-reference,';
45935
- function isAssetReference(value) {
46940
+ function isAssetReference2(value) {
45936
46941
  return value.startsWith(`data:${mediaType2}`);
45937
46942
  }
45938
46943
  function imageUrlForAsset(asset, pixelSize) {
45939
- if (/^\w+:/u.test(asset) && !isAssetReference(asset))
46944
+ if (/^\w+:/u.test(asset) && !isAssetReference2(asset))
45940
46945
  return asset;
45941
46946
  if (typeof pixelSize !== 'number')
45942
46947
  pixelSize = void 0;
@@ -48005,12 +49010,12 @@ var package_default = {
48005
49010
  author: 'Framer',
48006
49011
  license: 'MIT',
48007
49012
  scripts: {
48008
- coverage: 'yarn :jest --coverage',
48009
- lint: 'yarn :eslint ./src --ext .ts,.tsx --format codeframe --quiet --cache',
49013
+ coverage: 'jest --coverage',
49014
+ lint: 'eslint ./src --ext .ts,.tsx --format gha-codeframe --quiet --cache',
48010
49015
  'lint:ci': 'yarn lint --cache-strategy content --cache-location $HOME/.cache/eslint/framer-library',
48011
49016
  'lint:fix': 'yarn lint --fix',
48012
- test: 'yarn :jest',
48013
- watch: 'yarn :jest --watch',
49017
+ test: 'jest',
49018
+ watch: 'jest --watch',
48014
49019
  postinstall: 'node postinstall.cjs',
48015
49020
  },
48016
49021
  dependencies: {
@@ -48027,17 +49032,19 @@ var package_default = {
48027
49032
  '@testing-library/react': '^13.4.0',
48028
49033
  '@testing-library/user-event': '^14.4.3',
48029
49034
  '@types/dom-navigation': '^1.0.5',
48030
- '@types/google.fonts': '^1.0.5',
48031
- '@types/node': '^20.16.5',
48032
- '@types/react': '^18.2.67',
48033
- '@types/react-dom': '^18.2.22',
49035
+ '@types/fontfaceobserver': '2.1',
49036
+ '@types/google.fonts': '1.0',
49037
+ '@types/node': '22.16',
49038
+ '@types/react': '18.2',
49039
+ '@types/react-dom': '18.2',
48034
49040
  '@types/yargs': '^17.0.33',
48035
- '@typescript-eslint/eslint-plugin': '^8.35.0',
48036
- '@typescript-eslint/parser': '^8.35.0',
49041
+ '@typescript-eslint/eslint-plugin': '^8.36.0',
49042
+ '@typescript-eslint/parser': '^8.36.0',
48037
49043
  chalk: '^4.1.2',
48038
49044
  eslint: '^8.57.1',
48039
49045
  'eslint-plugin-framer-studio': 'workspace:*',
48040
49046
  immutable: '^3.8.2',
49047
+ jest: '29.4.1',
48041
49048
  'jest-diff': '^29.3.1',
48042
49049
  'jest-environment-jsdom': '^29.3.1',
48043
49050
  'jest-environment-jsdom-global': '^4.0.0',
@@ -48045,11 +49052,11 @@ var package_default = {
48045
49052
  react: '^18.2.0',
48046
49053
  'react-dom': '^18.2.0',
48047
49054
  semver: '^7.7.1',
48048
- typescript: '^5.7.3',
49055
+ typescript: '^5.8.3',
48049
49056
  yargs: '^17.7.2',
48050
49057
  },
48051
49058
  peerDependencies: {
48052
- 'framer-motion': '12.14.0',
49059
+ 'framer-motion': '>=12.14.0',
48053
49060
  react: '^18.2.0',
48054
49061
  'react-dom': '^18.2.0',
48055
49062
  },