unframer 2.7.11 → 2.9.0

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 (58) hide show
  1. package/dist/cli.d.ts +10 -0
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/cli.js +10 -4
  4. package/dist/cli.js.map +1 -1
  5. package/dist/cli.test.js +8 -0
  6. package/dist/cli.test.js.map +1 -1
  7. package/dist/exporter.d.ts +5 -1
  8. package/dist/exporter.d.ts.map +1 -1
  9. package/dist/exporter.js +75 -14
  10. package/dist/exporter.js.map +1 -1
  11. package/dist/framer.d.ts.map +1 -1
  12. package/dist/framer.js +116 -92
  13. package/dist/framer.js.map +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +2 -1
  17. package/dist/index.js.map +1 -1
  18. package/dist/react.d.ts +10 -0
  19. package/dist/react.d.ts.map +1 -1
  20. package/dist/react.js +7 -0
  21. package/dist/react.js.map +1 -1
  22. package/dist/utils.d.ts +1 -0
  23. package/dist/utils.d.ts.map +1 -1
  24. package/dist/utils.js +9 -0
  25. package/dist/utils.js.map +1 -1
  26. package/esm/cli.d.ts +10 -0
  27. package/esm/cli.d.ts.map +1 -1
  28. package/esm/cli.js +11 -5
  29. package/esm/cli.js.map +1 -1
  30. package/esm/cli.test.js +9 -1
  31. package/esm/cli.test.js.map +1 -1
  32. package/esm/exporter.d.ts +5 -1
  33. package/esm/exporter.d.ts.map +1 -1
  34. package/esm/exporter.js +75 -14
  35. package/esm/exporter.js.map +1 -1
  36. package/esm/framer.d.ts.map +1 -1
  37. package/esm/framer.js +113 -92
  38. package/esm/framer.js.map +1 -1
  39. package/esm/index.d.ts +1 -1
  40. package/esm/index.d.ts.map +1 -1
  41. package/esm/index.js +1 -1
  42. package/esm/index.js.map +1 -1
  43. package/esm/react.d.ts +10 -0
  44. package/esm/react.d.ts.map +1 -1
  45. package/esm/react.js +14 -0
  46. package/esm/react.js.map +1 -1
  47. package/esm/utils.d.ts +1 -0
  48. package/esm/utils.d.ts.map +1 -1
  49. package/esm/utils.js +8 -0
  50. package/esm/utils.js.map +1 -1
  51. package/package.json +7 -4
  52. package/src/cli.test.ts +20 -3
  53. package/src/cli.tsx +25 -5
  54. package/src/exporter.ts +94 -18
  55. package/src/framer.js +122 -93
  56. package/src/index.ts +1 -1
  57. package/src/react.tsx +46 -1
  58. package/src/utils.ts +9 -0
package/src/framer.js CHANGED
@@ -15349,7 +15349,7 @@ function steps(numSteps, direction = 'end',) {
15349
15349
  };
15350
15350
  }
15351
15351
 
15352
- // https :https://app.framerstatic.com/framer.ZONHQAMM.mjs
15352
+ // https :https://app.framerstatic.com/framer.K3G2LCX5.mjs
15353
15353
  init_chunk_QLPHEVXG();
15354
15354
  import React4 from 'react';
15355
15355
  import { startTransition as startTransition2, } from 'react';
@@ -17227,7 +17227,7 @@ function lazy(factory,) {
17227
17227
  const LazyComponent = React4.lazy(factory,);
17228
17228
  let factoryPromise;
17229
17229
  let LoadedComponent;
17230
- const Component15 = React4.forwardRef(function LazyWithPreload(props, ref,) {
17230
+ const Component16 = React4.forwardRef(function LazyWithPreload(props, ref,) {
17231
17231
  return React4.createElement(
17232
17232
  LoadedComponent !== null && LoadedComponent !== void 0 ? LoadedComponent : LazyComponent,
17233
17233
  ref
@@ -17238,7 +17238,7 @@ function lazy(factory,) {
17238
17238
  : props,
17239
17239
  );
17240
17240
  },);
17241
- Component15.preload = () => {
17241
+ Component16.preload = () => {
17242
17242
  if (!factoryPromise) {
17243
17243
  factoryPromise = factory().then((module) => {
17244
17244
  LoadedComponent = module.default;
@@ -17247,7 +17247,7 @@ function lazy(factory,) {
17247
17247
  }
17248
17248
  return factoryPromise;
17249
17249
  };
17250
- return Component15;
17250
+ return Component16;
17251
17251
  }
17252
17252
  function getRouteElementId(route, hash2,) {
17253
17253
  if (hash2 && route) {
@@ -17906,7 +17906,7 @@ async function pushRouteState(
17906
17906
  enableAsyncURLUpdate,
17907
17907
  isNavigationTransition,
17908
17908
  );
17909
- if (!enableAsyncURLUpdate) await urlUpdatePromise;
17909
+ return await urlUpdatePromise;
17910
17910
  } catch {}
17911
17911
  }
17912
17912
  function isHistoryState(data2,) {
@@ -18041,6 +18041,7 @@ function usePopStateHandler(currentRouteId, setCurrentRouteId,) {
18041
18041
  reject,
18042
18042
  };
18043
18043
  },);
18044
+ viewTransitionReady.current = void 0;
18044
18045
  },
18045
18046
  scroll: 'after-transition',
18046
18047
  },);
@@ -18579,21 +18580,17 @@ function useNavigationTransition(enableAsyncURLUpdates,) {
18579
18580
  transitionFn(signal,);
18580
18581
  return nextRender;
18581
18582
  }
18582
- transitionFn(signal,);
18583
- await interactionResponse({
18584
- priority: 'user-visible',
18585
- signal,
18586
- },).catch(noop2,);
18587
- await interactionResponse({
18588
- priority: 'user-visible',
18589
- signal,
18590
- },).catch(noop2,);
18591
18583
  let resolveNavigationPromise;
18592
18584
  const navigationPromise = new Promise((resolve, reject,) => {
18593
18585
  resolveNavigationPromise = resolve;
18594
18586
  if (signal === null || signal === void 0 ? void 0 : signal.aborted) reject();
18595
18587
  else signal === null || signal === void 0 ? void 0 : signal.addEventListener('abort', reject,);
18596
18588
  },);
18589
+ await interactionResponse({
18590
+ priority: 'user-blocking',
18591
+ signal,
18592
+ },).catch(noop2,);
18593
+ transitionFn(signal,);
18597
18594
  startNativeSpinner(navigationPromise, updateURL, controller,);
18598
18595
  return nextRender.then(() => {
18599
18596
  resolveNavigationPromise();
@@ -18613,6 +18610,7 @@ function Router({
18613
18610
  preserveQueryParams = false,
18614
18611
  enableAsyncURLUpdates = false,
18615
18612
  LayoutTemplate,
18613
+ editorBar,
18616
18614
  },) {
18617
18615
  useMarkRouterEffects();
18618
18616
  useReplaceInitialState({
@@ -18762,24 +18760,24 @@ function Router({
18762
18760
  pathVariables,
18763
18761
  },)
18764
18762
  ) {
18765
- updateScrollPosition(routeElementId, smoothScroll, false,);
18766
18763
  const route = routes[routeId];
18767
- if (((_b = window.history.state) === null || _b === void 0 ? void 0 : _b.hash) === hash2 || disableHistory || !route) return;
18768
- const updateURLPromise = pushRouteState(
18769
- routeId,
18770
- route,
18771
- {
18772
- currentRoutePath: route.path,
18773
- currentPathVariables: currentPathVariables2,
18774
- pathVariables,
18775
- hash: hash2,
18776
- localeId: currentRouteLocaleId,
18777
- preserveQueryParams,
18778
- },
18779
- // we want to yield as this is called synchronusly from an user interaction.
18780
- enableAsyncURLUpdates,
18781
- );
18782
- if (!enableAsyncURLUpdates) return await updateURLPromise;
18764
+ if (((_b = window.history.state) === null || _b === void 0 ? void 0 : _b.hash) !== hash2 && !disableHistory && route) {
18765
+ await pushRouteState(
18766
+ routeId,
18767
+ route,
18768
+ {
18769
+ currentRoutePath: route.path,
18770
+ currentPathVariables: currentPathVariables2,
18771
+ pathVariables,
18772
+ hash: hash2,
18773
+ localeId: currentRouteLocaleId,
18774
+ preserveQueryParams,
18775
+ },
18776
+ // we want to yield as this is called synchronusly from an user interaction.
18777
+ enableAsyncURLUpdates,
18778
+ );
18779
+ }
18780
+ updateScrollPosition(routeElementId, smoothScroll, false,);
18783
18781
  return;
18784
18782
  }
18785
18783
  if (!newRoute) return;
@@ -18865,6 +18863,7 @@ function Router({
18865
18863
  },),
18866
18864
  jsx(TurnOnReactEventHandling, {},),
18867
18865
  jsx(MarkSuspenseEffects.End, {},),
18866
+ editorBar,
18868
18867
  ],
18869
18868
  },),
18870
18869
  },),
@@ -19763,7 +19762,7 @@ var SpringCurveValueConverter = {
19763
19762
  };
19764
19763
  const initialGuess = 5 / duration;
19765
19764
  const undampedFrequency = approximateRoot2(envelope, derivative, initialGuess,);
19766
- if (!isNaN(undampedFrequency,)) {
19765
+ if (!Number.isNaN(undampedFrequency,)) {
19767
19766
  result.tension = Math.pow(undampedFrequency, 2,) * mass;
19768
19767
  result.friction = dampingRatio * 2 * Math.sqrt(mass * result.tension,);
19769
19768
  }
@@ -20235,7 +20234,7 @@ function modulate(value, rangeA, rangeB, limit = false,) {
20235
20234
  return result;
20236
20235
  }
20237
20236
  function isNumeric(value,) {
20238
- return !isNaN(value,) && isFinite(value,);
20237
+ return !Number.isNaN(value,) && Number.isFinite(value,);
20239
20238
  }
20240
20239
  function percentToFraction(val,) {
20241
20240
  const digits = numberFromString(val,);
@@ -21052,7 +21051,7 @@ function correctAlpha(alphaValue,) {
21052
21051
  if (alphaValue < 0) {
21053
21052
  alphaValue = 0;
21054
21053
  }
21055
- if (isNaN(alphaValue,) || alphaValue > 1) {
21054
+ if (Number.isNaN(alphaValue,) || alphaValue > 1) {
21056
21055
  alphaValue = 1;
21057
21056
  }
21058
21057
  return alphaValue;
@@ -22618,7 +22617,7 @@ function getDeviceStyle({
22618
22617
  };
22619
22618
  }
22620
22619
  function isFiniteNumber(value,) {
22621
- return typeof value === 'number' && isFinite(value,);
22620
+ return Number.isFinite(value,);
22622
22621
  }
22623
22622
  function finiteNumber(value,) {
22624
22623
  return isFiniteNumber(value,) ? value : void 0;
@@ -23066,10 +23065,10 @@ var Rect = {
23066
23065
  if (point2.y > Rect.maxY(rect,)) {
23067
23066
  return false;
23068
23067
  }
23069
- if (isNaN(rect.x,)) {
23068
+ if (Number.isNaN(rect.x,)) {
23070
23069
  return false;
23071
23070
  }
23072
- if (isNaN(rect.y,)) {
23071
+ if (Number.isNaN(rect.y,)) {
23073
23072
  return false;
23074
23073
  }
23075
23074
  return true;
@@ -24896,7 +24895,7 @@ function isNullish2(value,) {
24896
24895
  return value == null;
24897
24896
  }
24898
24897
  function isValidDate(value,) {
24899
- return value instanceof Date && !isNaN(value.getTime(),);
24898
+ return value instanceof Date && !Number.isNaN(value.getTime(),);
24900
24899
  }
24901
24900
  function isGenerator2(value,) {
24902
24901
  return isObject2(value,) && isFunction(value.return,);
@@ -27213,7 +27212,7 @@ function useMeasuredSize(ref,) {
27213
27212
  return size.current;
27214
27213
  }
27215
27214
  var SIZE_COMPATIBILITY_WRAPPER_ATTRIBUTE = 'data-framer-size-compatibility-wrapper';
27216
- var withMeasuredSize = (Component15) => (props) => {
27215
+ var withMeasuredSize = (Component16) => (props) => {
27217
27216
  const ref = React4.useRef(null,);
27218
27217
  const size = useMeasuredSize(ref,);
27219
27218
  const dataProps = {
@@ -27230,7 +27229,7 @@ var withMeasuredSize = (Component15) => (props) => {
27230
27229
  },
27231
27230
  ref,
27232
27231
  ...dataProps,
27233
- children: shouldRender && /* @__PURE__ */ jsx(Component15, {
27232
+ children: shouldRender && /* @__PURE__ */ jsx(Component16, {
27234
27233
  ...props,
27235
27234
  width: (size == null ? void 0 : size.width) ?? fallbackWidth,
27236
27235
  height: (size == null ? void 0 : size.height) ?? fallbackHeight,
@@ -28730,7 +28729,7 @@ var clamp2 = (value, a, b,) => {
28730
28729
  var DraggingContext = /* @__PURE__ */ React4.createContext({
28731
28730
  dragging: false,
28732
28731
  },);
28733
- function WithDragging(Component15,) {
28732
+ function WithDragging(Component16,) {
28734
28733
  const _WithDraggingHOC = class extends React4.Component {
28735
28734
  constructor(props, defaultProps,) {
28736
28735
  super(props, defaultProps,);
@@ -29358,7 +29357,7 @@ function WithDragging(Component15,) {
29358
29357
  value: {
29359
29358
  dragging: this.state.isDragging,
29360
29359
  },
29361
- children: /* @__PURE__ */ jsx(Component15, {
29360
+ children: /* @__PURE__ */ jsx(Component16, {
29362
29361
  ...originalProps,
29363
29362
  },),
29364
29363
  },);
@@ -29396,9 +29395,9 @@ function WithDragging(Component15,) {
29396
29395
  constraints: {},
29397
29396
  mouseWheel: false,
29398
29397
  },);
29399
- __publicField(WithDraggingHOC, 'defaultProps', Object.assign({}, Component15.defaultProps, _WithDraggingHOC.draggingDefaultProps,),);
29398
+ __publicField(WithDraggingHOC, 'defaultProps', Object.assign({}, Component16.defaultProps, _WithDraggingHOC.draggingDefaultProps,),);
29400
29399
  const withDragging = WithDraggingHOC;
29401
- (0, import_hoist_non_react_statics.default)(withDragging, Component15,);
29400
+ (0, import_hoist_non_react_statics.default)(withDragging, Component16,);
29402
29401
  return withDragging;
29403
29402
  }
29404
29403
  var hoverProps = {
@@ -29669,7 +29668,7 @@ function hasRadius(props,) {
29669
29668
  }
29670
29669
  function getRadiusValue(value,) {
29671
29670
  let num = Number(value,);
29672
- if (typeof value === 'string' && isNaN(num,)) {
29671
+ if (typeof value === 'string' && Number.isNaN(Number(num,),)) {
29673
29672
  return value;
29674
29673
  } else if (isAnimatable2(value,)) {
29675
29674
  num = Animatable.getNumber(value,);
@@ -32202,7 +32201,7 @@ function useInfiniteScroll({
32202
32201
  };
32203
32202
  }, [elementRef, callback, rootMargin, threshold, paginationInfo.currentPage,],);
32204
32203
  }
32205
- function withInfiniteScroll(Component15,) {
32204
+ function withInfiniteScroll(Component16,) {
32206
32205
  return React4.forwardRef(({
32207
32206
  __paginationInfo,
32208
32207
  __loadMore,
@@ -32216,7 +32215,7 @@ function withInfiniteScroll(Component15,) {
32216
32215
  ref: infiniteScrollRef,
32217
32216
  paginationInfo: __paginationInfo,
32218
32217
  },);
32219
- return /* @__PURE__ */ jsx(Component15, {
32218
+ return /* @__PURE__ */ jsx(Component16, {
32220
32219
  ...props,
32221
32220
  ref: infiniteScrollRef,
32222
32221
  },);
@@ -35089,7 +35088,7 @@ var DataObserverContext = /* @__PURE__ */ React4.createContext({
35089
35088
  },);
35090
35089
  function useObserveData() {
35091
35090
  const context = React4.useContext(DataObserverContext,);
35092
- return !isNaN(context.update,);
35091
+ return !Number.isNaN(context.update,);
35093
35092
  }
35094
35093
  var DataObserver = class extends Component {
35095
35094
  constructor() {
@@ -35157,7 +35156,7 @@ function convertColorProps(props,) {
35157
35156
  }
35158
35157
  return props;
35159
35158
  }
35160
- function WithOverride(Component15, override,) {
35159
+ function WithOverride(Component16, override,) {
35161
35160
  const useOverride = typeof override === 'function' ? (props) => override(convertColorProps(props,),) : () => convertColorProps(override,);
35162
35161
  const ComponentWithOverride = function (props,) {
35163
35162
  useContext(DataObserverContext,);
@@ -35166,14 +35165,14 @@ function WithOverride(Component15, override,) {
35166
35165
  style,
35167
35166
  ...rest
35168
35167
  } = props;
35169
- return /* @__PURE__ */ jsx(Component15, {
35168
+ return /* @__PURE__ */ jsx(Component16, {
35170
35169
  ...rest,
35171
35170
  ...overrideProps,
35172
35171
  _initialStyle: style,
35173
35172
  },);
35174
35173
  };
35175
- (0, import_hoist_non_react_statics4.default)(ComponentWithOverride, Component15,);
35176
- ComponentWithOverride['displayName'] = `WithOverride(${Component15.displayName || Component15.name})`;
35174
+ (0, import_hoist_non_react_statics4.default)(ComponentWithOverride, Component16,);
35175
+ ComponentWithOverride['displayName'] = `WithOverride(${Component16.displayName || Component16.name})`;
35177
35176
  return ComponentWithOverride;
35178
35177
  }
35179
35178
  var prefix = '__framer__';
@@ -36015,11 +36014,11 @@ function addMotionValueStyle(style, values,) {
36015
36014
  function isVariantOrVariantList(value,) {
36016
36015
  return isString2(value,) || Array.isArray(value,);
36017
36016
  }
36018
- var withFX = (Component15) =>
36017
+ var withFX = (Component16) =>
36019
36018
  React4.forwardRef((props, forwardedRef,) => {
36020
36019
  var _a;
36021
36020
  if (props.__withFX) {
36022
- return /* @__PURE__ */ jsx(Component15, {
36021
+ return /* @__PURE__ */ jsx(Component16, {
36023
36022
  ...props,
36024
36023
  animate: void 0,
36025
36024
  initial: void 0,
@@ -36030,7 +36029,7 @@ var withFX = (Component15) =>
36030
36029
  if (RenderTarget.current() === RenderTarget.canvas) {
36031
36030
  const animate4 = isVariantOrVariantList(props.animate,) ? props.animate : void 0;
36032
36031
  const initial2 = isVariantOrVariantList(props.initial,) ? props.initial : void 0;
36033
- return /* @__PURE__ */ jsx(Component15, {
36032
+ return /* @__PURE__ */ jsx(Component16, {
36034
36033
  ...props,
36035
36034
  animate: animate4,
36036
36035
  initial: initial2,
@@ -36134,7 +36133,7 @@ var withFX = (Component15) =>
36134
36133
  exit,
36135
36134
  }
36136
36135
  : {};
36137
- return /* @__PURE__ */ jsx(Component15, {
36136
+ return /* @__PURE__ */ jsx(Component16, {
36138
36137
  ...forwardedProps,
36139
36138
  ...motionGestures,
36140
36139
  __withFX: true,
@@ -36284,10 +36283,10 @@ var ComponentViewportProvider = /* @__PURE__ */ React4.forwardRef(({
36284
36283
  children: cloneWithPropsAndRef(children, rest,),
36285
36284
  },);
36286
36285
  },);
36287
- var withGeneratedLayoutId = (Component15) =>
36286
+ var withGeneratedLayoutId = (Component16) =>
36288
36287
  React4.forwardRef((props, ref,) => {
36289
36288
  const layoutId = useLayoutId2(props,);
36290
- return /* @__PURE__ */ jsx(Component15, {
36289
+ return /* @__PURE__ */ jsx(Component16, {
36291
36290
  layoutId,
36292
36291
  ...props,
36293
36292
  layoutIdKey: void 0,
@@ -36380,7 +36379,7 @@ var componentsWithServerRenderedStyles = /* @__PURE__ */ (() => {
36380
36379
  return new Set(componentsWithSSRStylesAttr.split(' ',),);
36381
36380
  })();
36382
36381
  var framerCSSMarker = 'data-framer-css-ssr';
36383
- var withCSS = (Component15, escapedCSS, componentSerializationId,) =>
36382
+ var withCSS = (Component16, escapedCSS, componentSerializationId,) =>
36384
36383
  React4.forwardRef((props, ref,) => {
36385
36384
  const {
36386
36385
  sheet,
@@ -36400,7 +36399,7 @@ var withCSS = (Component15, escapedCSS, componentSerializationId,) =>
36400
36399
  __html: concatenatedCSS,
36401
36400
  },
36402
36401
  },),
36403
- /* @__PURE__ */ jsx(Component15, {
36402
+ /* @__PURE__ */ jsx(Component16, {
36404
36403
  ...props,
36405
36404
  ref,
36406
36405
  },),
@@ -36416,7 +36415,7 @@ var withCSS = (Component15, escapedCSS, componentSerializationId,) =>
36416
36415
  : escapedCSS.split('\n',);
36417
36416
  css2.forEach((rule) => rule && injectCSSRule(rule, sheet, cache2,));
36418
36417
  }, [],);
36419
- return /* @__PURE__ */ jsx(Component15, {
36418
+ return /* @__PURE__ */ jsx(Component16, {
36420
36419
  ...props,
36421
36420
  ref,
36422
36421
  },);
@@ -37403,10 +37402,10 @@ function ChildrenCanSuspend({
37403
37402
  children,
37404
37403
  },);
37405
37404
  }
37406
- function withChildrenCanSuspend(Component15,) {
37405
+ function withChildrenCanSuspend(Component16,) {
37407
37406
  return forwardRef(function withChildrenCanSuspendInner(props, ref,) {
37408
37407
  return /* @__PURE__ */ jsx(ChildrenCanSuspend, {
37409
- children: /* @__PURE__ */ jsx(Component15, {
37408
+ children: /* @__PURE__ */ jsx(Component16, {
37410
37409
  ...props,
37411
37410
  ref,
37412
37411
  },),
@@ -38184,6 +38183,23 @@ function maybeReplaceAnchorWithSpan(component,) {
38184
38183
  if (isMotionComponent(component,) && unwrapMotionComponent(component,) === 'a') return motion.span;
38185
38184
  return component;
38186
38185
  }
38186
+ var IgnoreErrors = class extends Component {
38187
+ constructor() {
38188
+ super(...arguments,);
38189
+ __publicField(this, 'state', {
38190
+ error: void 0,
38191
+ },);
38192
+ }
38193
+ static getDerivedStateFromError(error,) {
38194
+ return {
38195
+ error,
38196
+ };
38197
+ }
38198
+ render() {
38199
+ if (this.state.error) return null;
38200
+ return this.props.children;
38201
+ }
38202
+ };
38187
38203
  var salt = 'framer';
38188
38204
  var difficulty = 3;
38189
38205
  var tokenLength = 30;
@@ -38368,17 +38384,21 @@ var FormContainer = /* @__PURE__ */ React4.forwardRef(function FormContainer2({
38368
38384
  try {
38369
38385
  (_b = (_a = callbacks.current).onLoading) == null ? void 0 : _b.call(_a,);
38370
38386
  await submitForm(action, data2, projectHash,);
38371
- dispatch({
38372
- type: 'success',
38373
- },);
38387
+ startTransition2(() =>
38388
+ dispatch({
38389
+ type: 'success',
38390
+ },)
38391
+ );
38374
38392
  (_d = (_c = callbacks.current).onSuccess) == null ? void 0 : _d.call(_c,);
38375
38393
  if (redirectUrl) {
38376
38394
  await redirectTo(redirectUrl,);
38377
38395
  }
38378
38396
  } catch (error) {
38379
- dispatch({
38380
- type: 'error',
38381
- },);
38397
+ startTransition2(() =>
38398
+ dispatch({
38399
+ type: 'error',
38400
+ },)
38401
+ );
38382
38402
  (_f = (_e = callbacks.current).onError) == null ? void 0 : _f.call(_e,);
38383
38403
  console.error(error,);
38384
38404
  }
@@ -38495,7 +38515,7 @@ var loadingFetchResult = {
38495
38515
  data: void 0,
38496
38516
  };
38497
38517
  function isNumberString(value,) {
38498
- return isString2(value,) && !isNaN(Number(value,),);
38518
+ return isString2(value,) && !Number.isNaN(Number(value,),);
38499
38519
  }
38500
38520
  function isValidFetchDataValueResult(type, value,) {
38501
38521
  switch (type) {
@@ -38962,6 +38982,7 @@ function PageRoot({
38962
38982
  localeId,
38963
38983
  locales,
38964
38984
  preserveQueryParams,
38985
+ EditorBar,
38965
38986
  },) {
38966
38987
  const {
38967
38988
  enableAsyncURLUpdates,
@@ -38991,6 +39012,13 @@ function PageRoot({
38991
39012
  },
38992
39013
  preserveQueryParams,
38993
39014
  enableAsyncURLUpdates,
39015
+ editorBar: EditorBar && framerSiteId && /* @__PURE__ */ jsx(IgnoreErrors, {
39016
+ children: /* @__PURE__ */ jsx(Suspense2, {
39017
+ children: /* @__PURE__ */ jsx(EditorBar, {
39018
+ framerSiteId,
39019
+ },),
39020
+ },),
39021
+ },),
38994
39022
  },),
38995
39023
  },),
38996
39024
  },),
@@ -43840,7 +43868,7 @@ var AnimationCollector = class {
43840
43868
  };
43841
43869
  _variantHashes = /* @__PURE__ */ new WeakMap();
43842
43870
  var framerAppearEffects = /* @__PURE__ */ new AnimationCollector();
43843
- function withOptimizedAppearEffect(Component15,) {
43871
+ function withOptimizedAppearEffect(Component16,) {
43844
43872
  return React4.forwardRef(({
43845
43873
  optimized,
43846
43874
  ...props
@@ -43861,7 +43889,7 @@ function withOptimizedAppearEffect(Component15,) {
43861
43889
  generatedComponentContext,
43862
43890
  );
43863
43891
  }
43864
- return /* @__PURE__ */ jsx(Component15, {
43892
+ return /* @__PURE__ */ jsx(Component16, {
43865
43893
  ref,
43866
43894
  ...props,
43867
43895
  },);
@@ -44403,12 +44431,12 @@ function usePrototypeNavigate({
44403
44431
  navigation.goBack();
44404
44432
  return false;
44405
44433
  }
44406
- const Component15 = typeof target === 'string'
44434
+ const Component16 = typeof target === 'string'
44407
44435
  ? await componentForRoute(getRoute == null ? void 0 : getRoute(target,),).catch(() => {},)
44408
44436
  : React4.isValidElement(target,)
44409
44437
  ? target
44410
44438
  : null;
44411
- if (!Component15) return;
44439
+ if (!Component16) return;
44412
44440
  const {
44413
44441
  appearsFrom,
44414
44442
  backdropColor,
@@ -44417,38 +44445,38 @@ function usePrototypeNavigate({
44417
44445
  const transitionType = options.transition || 'instant';
44418
44446
  switch (transitionType) {
44419
44447
  case 'instant':
44420
- navigation.instant(Component15,);
44448
+ navigation.instant(Component16,);
44421
44449
  break;
44422
44450
  case 'fade':
44423
- navigation.fade(Component15, {
44451
+ navigation.fade(Component16, {
44424
44452
  animation,
44425
44453
  },);
44426
44454
  break;
44427
44455
  case 'push':
44428
- navigation.push(Component15, {
44456
+ navigation.push(Component16, {
44429
44457
  appearsFrom,
44430
44458
  animation,
44431
44459
  },);
44432
44460
  break;
44433
44461
  case 'flip':
44434
- navigation.flip(Component15, {
44462
+ navigation.flip(Component16, {
44435
44463
  appearsFrom,
44436
44464
  animation,
44437
44465
  },);
44438
44466
  break;
44439
44467
  case 'magicMotion':
44440
- navigation.magicMotion(Component15, {
44468
+ navigation.magicMotion(Component16, {
44441
44469
  animation,
44442
44470
  },);
44443
44471
  break;
44444
44472
  case 'modal':
44445
- navigation.modal(Component15, {
44473
+ navigation.modal(Component16, {
44446
44474
  backdropColor,
44447
44475
  animation,
44448
44476
  },);
44449
44477
  break;
44450
44478
  case 'overlay':
44451
- navigation.overlay(Component15, {
44479
+ navigation.overlay(Component16, {
44452
44480
  appearsFrom,
44453
44481
  backdropColor,
44454
44482
  animation,
@@ -44870,14 +44898,14 @@ function extractMappingFromInfo(info,) {
44870
44898
  return void 0;
44871
44899
  }
44872
44900
  }
44873
- function withMappedReactProps(Component15, info,) {
44901
+ function withMappedReactProps(Component16, info,) {
44874
44902
  return (rawProps) => {
44875
44903
  const props = {};
44876
44904
  const mapping = extractMappingFromInfo(info,);
44877
44905
  for (const key7 in rawProps) {
44878
44906
  asRecord(props,)[(mapping == null ? void 0 : mapping[key7]) ?? key7] = rawProps[key7];
44879
44907
  }
44880
- return /* @__PURE__ */ jsx(Component15, {
44908
+ return /* @__PURE__ */ jsx(Component16, {
44881
44909
  ...props,
44882
44910
  },);
44883
44911
  };
@@ -44918,10 +44946,10 @@ function createInputOutputRanges2(transformTargets, threshold, exitTarget,) {
44918
44946
  outputRange: [-1, -1, ...outputRange,],
44919
44947
  };
44920
44948
  }
44921
- var withVariantAppearEffect = (Component15) =>
44949
+ var withVariantAppearEffect = (Component16) =>
44922
44950
  React4.forwardRef((props, forwardedRef,) => {
44923
44951
  if (RenderTarget.current() === RenderTarget.canvas) {
44924
- return /* @__PURE__ */ jsx(Component15, {
44952
+ return /* @__PURE__ */ jsx(Component16, {
44925
44953
  ...props,
44926
44954
  ref: forwardedRef,
44927
44955
  },);
@@ -45008,18 +45036,18 @@ var withVariantAppearEffect = (Component15) =>
45008
45036
  repeat: !animateOnce,
45009
45037
  },);
45010
45038
  if (!('variantAppearEffectEnabled' in options) || variantAppearEffectEnabled === true) {
45011
- return /* @__PURE__ */ jsx(Component15, {
45039
+ return /* @__PURE__ */ jsx(Component16, {
45012
45040
  ...rest,
45013
45041
  variant: activeVariant ?? props.variant,
45014
45042
  ref: observerRef,
45015
45043
  },);
45016
45044
  } else {
45017
- return /* @__PURE__ */ jsx(Component15, {
45045
+ return /* @__PURE__ */ jsx(Component16, {
45018
45046
  ...rest,
45019
45047
  },);
45020
45048
  }
45021
45049
  },);
45022
- var withVariantFX = (Component15) =>
45050
+ var withVariantFX = (Component16) =>
45023
45051
  React4.forwardRef(({
45024
45052
  initial,
45025
45053
  animate: animate3,
@@ -45036,7 +45064,7 @@ var withVariantFX = (Component15) =>
45036
45064
  observerRef,
45037
45065
  true,
45038
45066
  );
45039
- return /* @__PURE__ */ jsx(Component15, {
45067
+ return /* @__PURE__ */ jsx(Component16, {
45040
45068
  ...props,
45041
45069
  style: {
45042
45070
  ...(props == null ? void 0 : props.style),
@@ -48723,10 +48751,10 @@ var RichTextContainer = /* @__PURE__ */ forwardRef((props, ref,) => {
48723
48751
  if (layoutId) {
48724
48752
  rest.layout = 'preserve-aspect';
48725
48753
  }
48726
- const Component15 = htmlElementAsMotionComponent(props.as,);
48754
+ const Component16 = htmlElementAsMotionComponent(props.as,);
48727
48755
  if (isString2(props.viewBox,)) {
48728
48756
  if (props.as !== void 0) {
48729
- return /* @__PURE__ */ jsx(Component15, {
48757
+ return /* @__PURE__ */ jsx(Component16, {
48730
48758
  ...rest,
48731
48759
  ref: containerRef,
48732
48760
  style: containerStyle,
@@ -48759,7 +48787,7 @@ var RichTextContainer = /* @__PURE__ */ forwardRef((props, ref,) => {
48759
48787
  },);
48760
48788
  }
48761
48789
  }
48762
- return /* @__PURE__ */ jsx(Component15, {
48790
+ return /* @__PURE__ */ jsx(Component16, {
48763
48791
  ...rest,
48764
48792
  ref: containerRef,
48765
48793
  style: containerStyle,
@@ -51632,6 +51660,7 @@ export {
51632
51660
  useComponentViewport,
51633
51661
  useConstant2 as useConstant,
51634
51662
  useCurrentPathVariables,
51663
+ useCurrentRoute,
51635
51664
  useCurrentRouteId,
51636
51665
  useCustomCursors,
51637
51666
  useCycle,
@@ -51769,4 +51798,4 @@ if (typeof document !== 'undefined') {
51769
51798
  // node.remove()
51770
51799
  }
51771
51800
  document.head.appendChild(fragment);
51772
- }
51801
+ }export { Router, FetchClientProvider, FormContext }
package/src/index.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export * from './framer.js'
2
2
 
3
-
4
3
  export {
5
4
  FramerStyles,
6
5
  UnframerBreakpoint,
7
6
  WithFramerBreakpoints,
7
+ ContextProviders,
8
8
  } from './react.js'