@react-motion-router/core 2.0.0-beta.sha-dc429ba → 2.0.0-beta.sha-05b2475

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.
@@ -23,6 +23,7 @@ export declare class SharedElementTransitionLayer extends Component<SharedElemen
23
23
  getAnimationEffect<T extends {
24
24
  instance: SharedElement;
25
25
  clone: HTMLElement;
26
+ rect: DOMRect;
26
27
  }>(start: T, end: T): ParallelEffect;
27
28
  get animationEffect(): ParallelEffect | null;
28
29
  render(): JSX.Element;
package/build/index.js CHANGED
@@ -775,16 +775,14 @@ class SharedElementTransitionLayer extends external_react_.Component {
775
775
  }
776
776
  getAnimationEffect(start, end) {
777
777
  const keyframeEffects = new Array();
778
- const startRect = start.instance.getBoundingClientRect();
779
- const endRect = end.instance.getBoundingClientRect();
780
778
  const config = {
781
779
  fill: "both",
782
780
  duration: "auto",
783
781
  easing: "ease",
784
782
  };
785
783
  const transitionType = end.instance.transitionType;
786
- const startTransform = `translate(${startRect.x}px, ${startRect.y}px)`;
787
- const endTransform = `translate(${endRect.x}px, ${endRect.y}px)`;
784
+ const startTransform = `translate(${start.rect.x}px, ${start.rect.y}px)`;
785
+ const endTransform = `translate(${end.rect.x}px, ${end.rect.y}px)`;
788
786
  switch (transitionType) {
789
787
  case "fade":
790
788
  keyframeEffects.push(new KeyframeEffect(start.clone, [
@@ -825,15 +823,15 @@ class SharedElementTransitionLayer extends external_react_.Component {
825
823
  {
826
824
  ...Object.fromEntries((start.instance.ref.current?.firstElementChild).attributeStyleMap),
827
825
  transform: startTransform,
828
- width: `${startRect.width}px`,
829
- height: `${startRect.height}px`,
826
+ width: `${start.rect.width}px`,
827
+ height: `${start.rect.height}px`,
830
828
  },
831
829
  {
832
830
  ...Object.fromEntries((end.instance.ref.current?.firstElementChild).attributeStyleMap),
833
831
  ...this.getKeyframeProperties(end.instance.ref.current?.firstElementChild, styleList),
834
832
  transform: endTransform,
835
- width: `${endRect.width}px`,
836
- height: `${endRect.height}px`,
833
+ width: `${end.rect.width}px`,
834
+ height: `${end.rect.height}px`,
837
835
  }
838
836
  ], config));
839
837
  break;
@@ -852,28 +850,38 @@ class SharedElementTransitionLayer extends external_react_.Component {
852
850
  nextScene.previousScene = currentScene;
853
851
  const parallelEffects = new Array();
854
852
  for (const [id, end] of Array.from(nextScene.nodes.entries())) {
853
+ const endRect = end.getBoundingClientRect();
855
854
  const start = currentScene.nodes.get(id);
856
855
  if (!start?.canTransition || !end.canTransition)
857
856
  continue;
857
+ const startRect = start.getBoundingClientRect();
858
858
  const endClone = end.clone();
859
859
  const startClone = start.clone();
860
860
  if (!startClone || !endClone)
861
861
  continue;
862
- const styleList = Array.from(new Set([...start.styles, ...end.styles, 'width', 'height']));
862
+ const styleList = Array.from(new Set([...start.styles, ...end.styles]));
863
863
  if (end.transitionType !== "morph") {
864
864
  startClone.id = `${id}-start`;
865
865
  startClone.style.position = "absolute";
866
866
  startClone.style.gridArea = "1 / 1";
867
+ startClone.style.margin = "0";
867
868
  this.copyStyles(start.ref.current?.firstElementChild, startClone, styleList);
868
869
  this.copyStyles(end.ref.current?.firstElementChild, endClone, styleList);
870
+ startClone.style.width = `${startRect.width}px`;
871
+ startClone.style.height = `${startRect.height}px`;
872
+ endClone.style.width = `${endRect.width}px`;
873
+ endClone.style.height = `${endRect.height}px`;
869
874
  this.ref.current?.prepend(startClone);
870
875
  }
871
876
  else {
872
877
  this.copyStyles(start.ref.current?.firstElementChild, endClone, styleList);
878
+ endClone.style.width = `${startRect.width}px`;
879
+ endClone.style.height = `${startRect.height}px`;
873
880
  }
874
881
  endClone.id = `${id}${end.transitionType === "morph" ? '' : '-end'}`;
875
882
  endClone.style.position = "absolute";
876
883
  endClone.style.gridArea = "1 / 1";
884
+ endClone.style.margin = "0";
877
885
  this.ref.current?.prepend(endClone);
878
886
  start.hide();
879
887
  end.hide();
@@ -887,7 +895,7 @@ class SharedElementTransitionLayer extends external_react_.Component {
887
895
  };
888
896
  this.props.navigation.addEventListener('transition-end', onFinish, { once: true });
889
897
  this.props.navigation.addEventListener('transition-cancel', onFinish, { once: true });
890
- parallelEffects.push(this.getAnimationEffect({ instance: start, clone: startClone }, { instance: end, clone: endClone }));
898
+ parallelEffects.push(this.getAnimationEffect({ instance: start, clone: startClone, rect: startRect }, { instance: end, clone: endClone, rect: endRect }));
891
899
  }
892
900
  return new external_web_animations_extension_namespaceObject.ParallelEffect(parallelEffects);
893
901
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa,MAAM,mBAAO,CAAC,GAAO,6KAA6K;AAC/M,kBAAkB,UAAU,eAAe,qBAAqB,6BAA6B,0BAA0B,0DAA0D,4EAA4E,OAAO,wDAAwD,gBAAgB,GAAG,WAAW,GAAG,YAAY;;;;;;;;ACV5V;;AAEb,IAAI,IAAqC;AACzC,EAAE,yCAAqE;AACvE,EAAE,KAAK,EAEN;;;;;;;;;;;;;;;;;;;;;;;ACNuD;AAIjD,SAAS,yBAAyB,CAAC,OAAe,EAAE,QAAgB;IACvE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,IAAI,CAAC,CAAC,mCAAmC;IACjF,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;IACtC,MAAM,YAAY,GAAG,IAAI,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC5E,IAAI,CAAC,YAAY;QAAE,OAAO,IAAI,CAAC;IAE/B,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC;SACnD,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;SACpC,GAAG,CAAC,CAAC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U,CAAC;AAC/B,MAAM,YAAY,GAAG,GAAG,CAAC;AACzB,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,MAAM,iBAAiB,GAAG,CAAC,CAAC;;;ACJnC,6CAA6C;AACb;AACH;AACA;AACI;AACD;AACA;AACD;AACA;AACC;AACD;AACI","sources":["webpack://@react-motion-router/core/../../node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://@react-motion-router/core/../../node_modules/react/jsx-runtime.js","webpack://@react-motion-router/core/./src/common/utils.ts","webpack://@react-motion-router/core/external module \"react\"","webpack://@react-motion-router/core/webpack/bootstrap","webpack://@react-motion-router/core/webpack/runtime/define property getters","webpack://@react-motion-router/core/webpack/runtime/hasOwnProperty shorthand","webpack://@react-motion-router/core/./src/SharedElementSceneContext.ts","webpack://@react-motion-router/core/./src/SharedElement.tsx","webpack://@react-motion-router/core/./src/common/events.ts","webpack://@react-motion-router/core/./src/ScreenTransitionLayerContext.tsx","webpack://@react-motion-router/core/./src/ScreenTransitionProvider.tsx","webpack://@react-motion-router/core/./src/RouterContext.ts","webpack://@react-motion-router/core/./src/RoutePropContext.ts","webpack://@react-motion-router/core/./src/SharedElementScene.ts","webpack://@react-motion-router/core/./src/ScreenBase.tsx","webpack://@react-motion-router/core/./src/common/types.ts","webpack://@react-motion-router/core/external module \"web-animations-extension\"","webpack://@react-motion-router/core/./src/SharedElementTransitionLayer.tsx","webpack://@react-motion-router/core/./src/MotionContext.ts","webpack://@react-motion-router/core/./src/ScreenTransitionLayer.tsx","webpack://@react-motion-router/core/./src/RouterBase.tsx","webpack://@react-motion-router/core/./src/MetaData.ts","webpack://@react-motion-router/core/./src/NavigationBase.ts","webpack://@react-motion-router/core/./src/common/hooks.ts","webpack://@react-motion-router/core/./src/common/constants.ts","webpack://@react-motion-router/core/./src/index.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import { cloneElement, lazy as ReactLazy } from \"react\";\nimport { ClonedElementType, ElementPropType, LazyExoticComponent, MatchedRoute, PathPattern } from \"./types\";\nimport { RouterBase } from \"../RouterBase\";\n\nexport function resolveBaseURLFromPattern(pattern: string, pathname: string) {\n if (!pattern.endsWith(\"**\")) pattern += '**'; // allows us to match nested routes\n const origin = window.location.origin;\n const baseURLMatch = new URLPattern(pattern, origin).exec(pathname, origin);\n if (!baseURLMatch) return null;\n\n const groups = Object.keys(baseURLMatch.pathname.groups)\n .filter((key) => !isNaN(Number(key)))\n .map((key) => baseURLMatch.pathname.groups[key])\n .filter((group) => group !== undefined);\n const nestedPathnameGroup = groups.at(-1) ?? '';\n // derive concrete baseURL\n return new URL(pathname.replace(nestedPathnameGroup, ''), window.location.origin);\n}\n\nexport function matchRoute(\n pathnamePattern: string,\n pathname: string,\n baseURLPattern: string = `${window.location.origin}/`,\n caseSensitive: boolean = true\n): MatchedRoute | null {\n if (!caseSensitive) {\n pathnamePattern = pathnamePattern.toLowerCase();\n pathname = pathname.toLowerCase();\n }\n\n const baseURL = resolveBaseURLFromPattern(baseURLPattern, pathname)?.href;\n if (!baseURL) return null;\n\n const match = new URLPattern({ baseURL, pathname: pathnamePattern }).exec({ pathname, baseURL });\n const params = match?.pathname.groups ?? {};\n if (match) {\n return {\n params\n };\n }\n return null;\n}\n\nexport function includesRoute(pathnamePatterns: PathPattern[], pathname: string, baseURL: string = window.location.origin) {\n return pathnamePatterns.some(({ pattern, caseSensitive }) => matchRoute(pattern, pathname, baseURL, caseSensitive));\n}\n\nexport function dispatchEvent<T>(event: CustomEvent<T> | Event, target: HTMLElement | EventTarget = window) {\n return new Promise<boolean>((resolve) => {\n queueMicrotask(() => resolve(\n target.dispatchEvent(event)\n ));\n });\n}\n\nexport function lazy<T extends React.ComponentType<any>>(\n factory: () => Promise<{ default: T }>\n): LazyExoticComponent<T> {\n const Component = ReactLazy(factory) as LazyExoticComponent<T>;\n Component.load = async () => {\n Component.module ??= await factory();\n return Component.module;\n };\n return Component;\n}\n\nexport function isNavigationSupported() {\n return Boolean(window.navigation);\n}\n\nexport function isURLPatternSupported() {\n // @ts-ignore: Property 'UrlPattern' does not exist \n return Boolean(globalThis.URLPattern);\n}\n\nexport async function polyfillURLPattern() {\n const { URLPattern } = await import(/*webpackIgnore: true*/ \"urlpattern-polyfill\");\n // @ts-ignore: Property 'UrlPattern' does not exist \n globalThis.URLPattern = URLPattern;\n}\n\nexport async function polyfillNavigation() {\n const { applyPolyfill } = await import(/*webpackIgnore: true*/ \"@virtualstate/navigation\");\n applyPolyfill({\n history: true,\n interceptEvents: true,\n patch: true,\n persist: true,\n persistState: true\n });\n}\n\nexport async function PromiseAllDynamic<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]> {\n const awaited = [];\n for (const value of values) {\n awaited.push(await value);\n }\n\n return awaited;\n}\n\nexport function toCamelCase(value: string) {\n return value.replace(/-([a-z])/g, (g) => g[1].toUpperCase())\n}\n\nexport function cloneAndInject<\n C extends React.CElement<any, any>,\n IP extends Partial<ElementPropType<C>>\n>(element: C, injectProps: IP) {\n return cloneElement(element, injectProps) as ClonedElementType<C, IP>;\n}","var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }\nvar y = x => () => x\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_react__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import { createContext } from \"react\";\nimport { SharedElementScene } from \"./SharedElementScene\";\n\nexport const SharedElementSceneContext = createContext<SharedElementScene>(null!);","import { Component, createRef } from 'react';\nimport { SharedElementTransitionType, StyleKeyList } from './common/types';\nimport { SharedElementSceneContext } from './SharedElementSceneContext';\n\ninterface SharedElementConfig extends OptionalEffectTiming {\n type?: SharedElementTransitionType;\n transformOrigin?: React.CSSProperties[\"transformOrigin\"];\n styles?: StyleKeyList;\n deepClone?: boolean;\n}\n\ninterface SharedElementProps {\n id: string;\n children: React.ReactElement;\n disabled?: boolean;\n config?: SharedElementConfig;\n}\n\ninterface SharedElementState {}\n\nexport class SharedElement extends Component<SharedElementProps, SharedElementState> {\n public readonly ref = createRef<HTMLDivElement>();\n static readonly contextType = SharedElementSceneContext;\n declare context: React.ContextType<typeof SharedElementSceneContext>;\n\n componentDidMount(): void {\n this.scene.addNode(this);\n }\n\n componentDidUpdate(prevProps: SharedElementProps) {\n if (this.props.id !== prevProps.id) {\n this.scene.removeNode(prevProps.id.toString());\n this.scene.addNode(this);\n }\n }\n\n componentWillUnmount(): void {\n this.scene.removeNode(this.id);\n }\n\n get styles(): StyleKeyList {\n if (this.props.config?.styles) {\n return this.props.config.styles;\n }\n return [];\n }\n\n get canTransition() {\n return !this.props.disabled\n && this.scene.canTransition;\n }\n\n get scene() {\n return this.context;\n }\n\n get id() {\n return `shared-element-${this.props.id.toString()}`;\n }\n\n get transitionType(): SharedElementTransitionType {\n return this.props.config?.type ?? this.scene.previousScene?.nodes.get(this.id)?.transitionType ?? \"morph\";\n }\n\n getBoundingClientRect() {\n return this.ref.current?.firstElementChild?.getBoundingClientRect() ?? new DOMRect();\n }\n\n public clone() {\n if (!this.ref.current) return null;\n const deepClone = this.props.config?.deepClone ?? true;\n return this.ref.current.firstElementChild?.cloneNode(deepClone) as HTMLElement;\n }\n\n public hide() {\n if (!this.ref.current) return;\n this.ref.current.style.visibility = 'hidden';\n }\n\n public unhide() {\n if (!this.ref.current) return;\n this.ref.current.style.visibility = 'visible';\n }\n\n render() {\n return (\n <div\n ref={this.ref}\n id={this.id}\n style={{ display: \"contents\" }}\n >\n {this.props.children}\n </div>\n );\n }\n}","import { LoadNavigationTransition } from \"./types\";\nimport { PromiseAllDynamic } from \"./utils\";\n\nexport class TransitionStartEvent extends Event {\n\tconstructor() {\n\t\tsuper('transition-start');\n\t}\n}\n\nexport class TransitionCancelEvent extends Event {\n\tconstructor() {\n\t\tsuper('transition-cancel');\n\t}\n}\n\nexport class TransitionEndEvent extends Event {\n\tconstructor() {\n\t\tsuper('transition-end');\n\t}\n}\n\nexport class MotionProgressStartEvent extends Event {\n\tconstructor() {\n\t\tsuper('motion-progress-start');\n\t}\n}\n\nexport class MotionProgressEvent extends Event {\n\treadonly progress: number;\n\n\tconstructor(progress: number) {\n\t\tsuper('motion-progress');\n\t\tthis.progress = progress;\n\t}\n}\n\nexport class MotionProgressEndEvent extends Event {\n\tconstructor() {\n\t\tsuper('motion-progress-end');\n\t}\n}\n\nexport class LoadEvent extends Event implements Omit<NavigateEvent, 'navigationType' | 'commit'> {\n\t#navigationType = \"load\" as const;\n\t#userInitiated: boolean = false;\n\t#canIntercept: boolean = true;\n\t#hashChange: boolean = false;\n\t#formData: FormData | null = null;\n\t#downloadRequest: string | null = null;\n\t#destination: NavigationDestination;\n\t#signal: AbortSignal;\n\t#abortable = new AbortController();\n\t#intercepted = false;\n\t#thenables: Promise<void>[] = [];\n\t#transition: LoadNavigationTransition | null = null;\n\treadonly hasUAVisualTransition = false;\n\n\tconstructor() {\n\t\tsuper('navigate', { cancelable: false, bubbles: false, composed: false });\n\t\tconst currentEntry = window.navigation.currentEntry;\n\t\tif (!currentEntry) throw new Error(\"Current entry is null\");\n\t\tthis.#destination = {\n\t\t\tgetState() {\n\t\t\t\treturn currentEntry.getState();\n\t\t\t},\n\t\t\turl: currentEntry.url ?? new URL(window.location.href).href,\n\t\t\tkey: currentEntry.key,\n\t\t\tindex: currentEntry.index,\n\t\t\tid: currentEntry.id,\n\t\t\tsameDocument: true\n\t\t};\n\n\t\tthis.#signal = this.#abortable.signal;\n\t\twindow.navigation.addEventListener('navigate', this.#onNavigate, { signal: this.#signal });\n\t}\n\n\t#onNavigate = (e: Event) => {\n\t\tif (e !== this) {\n\t\t\tthis.#abortable.abort();\n\t\t} else if (!this.#thenables.length) {\n\t\t\twindow.navigation.removeEventListener('navigate', this.#onNavigate);\n\t\t}\n\t}\n\n\tintercept(options?: NavigationInterceptOptions | undefined): void {\n\t\tif (this.#intercepted) throw new DOMException(\"Failed to execute 'intercept' on 'NavigateEvent': intercept() may only be called while the navigate event is being dispatched.\");\n\t\tlet finish: Function | null = null;\n\t\tif (!this.#transition) {\n\t\t\tthis.#transition = {\n\t\t\t\tfinished: new Promise((resolve) => finish = resolve),\n\t\t\t\tfrom: window.navigation.currentEntry!,\n\t\t\t\tnavigationType: \"load\" as const\n\t\t\t};\n\t\t}\n\t\tconst thenable = options?.handler?.();\n\t\tif (thenable) this.#thenables.push(thenable);\n\t\tif (this.#thenables.length === 1) {\n\t\t\tPromiseAllDynamic(this.#thenables).then(() => {\n\t\t\t\tthis.#intercepted = true;\n\t\t\t\twindow.removeEventListener('navigate', this.#onNavigate);\n\t\t\t\tfinish?.();\n\t\t\t});\n\t\t}\n\t}\n\n\tscroll(): void {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tget transition() {\n\t\treturn this.#transition;\n\t}\n\n\tget navigationType() {\n\t\treturn this.#navigationType;\n\t}\n\n\tget userInitiated() {\n\t\treturn this.#userInitiated;\n\t}\n\n\tget canIntercept() {\n\t\treturn this.#canIntercept;\n\t}\n\n\tget hashChange() {\n\t\treturn this.#hashChange;\n\t}\n\n\tget formData() {\n\t\treturn this.#formData;\n\t}\n\n\tget downloadRequest() {\n\t\treturn this.#downloadRequest;\n\t}\n\n\tget destination() {\n\t\treturn this.#destination;\n\t}\n\n\tget signal() {\n\t\treturn this.#signal;\n\t}\n}","import { createContext } from \"react\";\nimport { ScreenTransitionLayer } from \"./ScreenTransitionLayer\";\n\nexport const ScreenTransitionLayerContext = createContext<ScreenTransitionLayer>(null!);\n","import { ScreenTransitionLayerContext } from './ScreenTransitionLayerContext';\nimport { AnimationEffectFactory } from './common/types';\nimport { NavigationBase } from './NavigationBase';\nimport { Component, ElementType, createRef } from 'react';\n\ninterface ScreenTransitionProviderProps {\n id: string;\n animation?: AnimationEffectFactory;\n children: React.ReactNode\n navigation: NavigationBase;\n renderAs: ElementType;\n focused: boolean;\n}\n\ninterface ScreenTransitionProviderState {\n zIndex: React.CSSProperties[\"zIndex\"];\n}\n\nexport class ScreenTransitionProvider extends Component<ScreenTransitionProviderProps, ScreenTransitionProviderState> {\n public readonly ref = createRef<HTMLElement>();\n static readonly contextType = ScreenTransitionLayerContext;\n declare context: React.ContextType<typeof ScreenTransitionLayerContext>;\n public index = 0;\n public exiting = false;\n\n state: ScreenTransitionProviderState = {\n zIndex: 'unset',\n }\n\n private onAnimationEnd = () => {\n if (this.ref.current) {\n this.ref.current.style.willChange = 'auto';\n this.ref.current.style.pointerEvents = 'auto';\n }\n }\n\n private onAnimationStart = () => {\n if (this.ref.current) {\n this.ref.current.style.willChange = 'transform, opacity';\n this.ref.current.style.pointerEvents = 'none';\n }\n }\n\n componentDidMount() {\n this.props.navigation.addEventListener('transition-start', this.onAnimationStart);\n this.props.navigation.addEventListener('transition-end', this.onAnimationEnd);\n this.props.navigation.addEventListener('transition-cancel', this.onAnimationEnd);\n }\n\n componentWillUnmount() {\n this.props.navigation.removeEventListener('transition-start', this.onAnimationStart);\n this.props.navigation.removeEventListener('transition-end', this.onAnimationEnd);\n this.props.navigation.removeEventListener('transition-cancel', this.onAnimationEnd);\n }\n\n get animationEffect() {\n const animationEffectFactory = this.props.animation;\n const { animation, direction, hasUAVisualTransition } = this.context;\n const { timeline, playbackRate } = animation;\n const { index, exiting, ref } = this;\n\n return animationEffectFactory?.({\n ref: ref.current,\n index,\n exiting,\n timeline,\n direction,\n playbackRate,\n hasUAVisualTransition\n }) ?? null;\n }\n\n setZIndex(zIndex: React.CSSProperties[\"zIndex\"]) {\n return new Promise<void>(resolve => this.setState({ zIndex }, resolve));\n }\n\n render() {\n const Element = this.props.renderAs;\n const inert = !this.props.focused ? '' : undefined;\n return (\n <Element\n id={this.props.id}\n className=\"screen-transition-provider\"\n ref={this.ref}\n {...{ inert }}\n style={{\n gridArea: '1 / 1',\n width: '100%',\n height: '100%',\n transformOrigin: 'center center',\n zIndex: this.state.zIndex\n }}\n >\n {this.props.children}\n </Element>\n );\n }\n}","import { createContext } from 'react';\nimport { ScreenBase } from './ScreenBase';\nimport { RouterBase } from './RouterBase';\n\nexport const NestedRouterContext = createContext<{parentRouter: RouterBase, parentScreen: ScreenBase} | null>(null);\nexport const RouterContext = createContext<RouterBase>(null!);","import { createContext } from \"react\";\nimport { RoutePropBase } from \"./common/types\";\n\nexport const RoutePropContext = createContext<RoutePropBase>(null!);","import { SharedElement } from \"./SharedElement\";\n\nexport class SharedElementScene {\n\tpublic readonly id: string;\n\tpublic readonly nodes = new Map<string, SharedElement>();\n\tpublic getScreenRect: () => DOMRect = () => new DOMRect();\n\tpublic keepAlive: boolean = false;\n\tpublic previousScene: SharedElementScene | null = null;\n\tpublic canTransition: boolean = true; // should be false if page animation already started\n\n\tconstructor(id: string) {\n\t\tthis.id = id;\n\t}\n\n\taddNode(node: SharedElement | null) {\n\t\tif (!node) return;\n\t\tconsole.assert(!this.nodes.has(node.id), `Duplicate Shared Element ID: ${node.id} in ${this.id}`);\n\t\tthis.nodes.set(node.id, node);\n\t}\n\n\tremoveNode(_id: string) {\n\t\tthis.nodes.delete(_id);\n\t}\n\n\tget xRatio() {\n\t\tconst screenRect = this.getScreenRect();\n\t\tconst xRatio = (screenRect.width / window.innerWidth).toFixed(2);\n\t\treturn parseFloat(xRatio);\n\t}\n\n\tget yRatio() {\n\t\tconst screenRect = this.getScreenRect();\n\t\tconst yRatio = (screenRect.height / window.innerHeight).toFixed(2);\n\t\treturn parseFloat(yRatio);\n\t}\n\n\tget x() {\n\t\treturn this.getScreenRect().x;\n\t}\n\n\tget y() {\n\t\treturn this.getScreenRect().y;\n\t}\n\n\tisEmpty() {\n\t\treturn !Boolean(this.nodes.size);\n\t}\n}","import { Component, ElementType, Suspense, cloneElement, createRef, isValidElement } from \"react\";\nimport { ScreenTransitionProvider } from \"./ScreenTransitionProvider\";\nimport {\n AnimationEffectFactory,\n LazyExoticComponent,\n PlainObject,\n RoutePropBase,\n isLazyExoticComponent,\n isNativeLazyExoticComponent,\n} from \"./common/types\";\nimport { NestedRouterContext, RouterContext } from \"./RouterContext\";\nimport { RoutePropContext } from \"./RoutePropContext\";\nimport { NavigationBase } from \"./NavigationBase\";\nimport { SharedElementSceneContext } from \"./SharedElementSceneContext\";\nimport { SharedElementScene } from \"./SharedElementScene\";\n\nexport interface ScreenBaseComponentProps<\n R extends RoutePropBase = RoutePropBase,\n N extends NavigationBase = NavigationBase\n> {\n route: R;\n navigation: N;\n}\n\nexport interface LifecycleProps<R extends RoutePropBase, N extends NavigationBase = NavigationBase> extends ScreenBaseComponentProps<R, N> {\n signal: AbortSignal;\n}\n\nexport interface ScreenBaseConfig<R extends RoutePropBase = RoutePropBase, N extends NavigationBase = NavigationBase> {\n header?: {\n fallback?: React.ReactNode;\n component: React.JSXElementConstructor<any> | LazyExoticComponent<any>\n };\n footer?: {\n fallback?: React.ReactNode;\n component: React.JSXElementConstructor<any> | LazyExoticComponent<any>\n };\n animation?: AnimationEffectFactory;\n onEnter?: (props: LifecycleProps<R, N>) => void | Promise<void>;\n onExit?: (props: LifecycleProps<R, N>) => void | Promise<void>;\n onEntered?: (props: LifecycleProps<R, N>) => void | Promise<void>;\n onExited?: (props: LifecycleProps<R, N>) => void | Promise<void>;\n onLoad?: (props: LifecycleProps<R, N>) => void | Promise<void>;\n}\n\nexport interface ScreenBaseProps {\n path: string;\n component: React.JSXElementConstructor<any> | LazyExoticComponent<any>;\n fallback?: React.ReactNode;\n name?: string;\n defaultParams?: PlainObject;\n caseSensitive?: boolean;\n config?: ScreenBaseConfig;\n}\n\nexport interface ScreenBaseState<C extends ScreenBaseProps[\"config\"] = ScreenBaseProps[\"config\"], P extends PlainObject = PlainObject> {\n focused: boolean;\n config: C;\n params: P;\n elementType: ElementType;\n}\n\nexport abstract class ScreenBase<\n P extends ScreenBaseProps = ScreenBaseProps,\n S extends ScreenBaseState<P[\"config\"]> = ScreenBaseState<P[\"config\"]>,\n R extends RoutePropBase<P[\"config\"]> = RoutePropBase<P[\"config\"]>\n> extends Component<P, S> {\n public readonly sharedElementScene: SharedElementScene;\n #transitionProvider = createRef<ScreenTransitionProvider>();\n protected readonly ref = createRef<HTMLDivElement>();\n protected readonly nestedRouterData;\n static readonly contextType = RouterContext;\n declare context: React.ContextType<typeof RouterContext>;\n\n state: S = {\n focused: false,\n config: {},\n params: {},\n elementType: 'div'\n } as S;\n\n constructor(props: P, context: React.ContextType<typeof RouterContext>) {\n super(props);\n\n this.sharedElementScene = new SharedElementScene(`${this.name}-shared-element-scene`);\n this.sharedElementScene.getScreenRect = () => this.ref.current?.getBoundingClientRect() || new DOMRect();\n this.nestedRouterData = { parentScreen: this as ScreenBase, parentRouter: context };\n }\n\n protected setParams(newParams: PlainObject) {\n this.setState(({ params }) => ({ params: { ...params, ...newParams } }));\n }\n\n protected setConfig(newConfig: R['config']) {\n this.setState(({ config }) => ({ config: { ...config, ...newConfig } }));\n }\n\n get focused() {\n return this.state.focused;\n }\n\n get name() {\n if (this.props.name)\n return this.props.name\n .toLowerCase()\n .replace(/[^\\w-]/g, '-') // Remove non-alphanumeric chars\n .replace(/-+/g, '-') // Replace multiple hyphens with a single one\n .replace(/^-|-$/g, ''); // Remove leading and trailing hyphens;\n else if (isLazyExoticComponent(this.props.component))\n return this.props.component.module?.default.name.toLowerCase();\n return this.props.component.name.toLowerCase();\n }\n\n blur() {\n return new Promise<void>(resolve => this.setState({ focused: false }, resolve));\n }\n\n focus() {\n return new Promise<void>(resolve => this.setState({ focused: true }, resolve));\n }\n\n async load(signal: AbortSignal) {\n let Component = this.props.component;\n let result;\n if ('load' in Component) {\n result = await Component.load();\n } else {\n result = { default: Component };\n }\n\n const navigation = this.context.navigation;\n const route = this.routeProp;\n await this.props.config?.onLoad?.({ navigation, route, signal });\n\n return result;\n }\n\n protected abstract get routeProp(): R;\n abstract get config(): R[\"config\"];\n abstract get params(): R[\"params\"];\n abstract get resolvedPathname(): string;\n abstract get id(): string;\n\n async onExited(signal: AbortSignal): Promise<void> {\n await this.routeProp.config.onExited?.({\n route: this.routeProp,\n navigation: this.context.navigation,\n signal\n });\n }\n\n async onExit(signal: AbortSignal): Promise<void> {\n await this.routeProp.config.onExit?.({\n route: this.routeProp,\n navigation: this.context.navigation,\n signal\n });\n }\n\n async onEnter(signal: AbortSignal): Promise<void> {\n await this.routeProp.config.onEnter?.({\n route: this.routeProp,\n navigation: this.context.navigation,\n signal\n });\n }\n\n async onEntered(signal: AbortSignal): Promise<void> {\n await this.routeProp.config.onEntered?.({\n route: this.routeProp,\n navigation: this.context.navigation,\n signal\n });\n }\n\n get path() {\n return this.props.path;\n }\n\n get transitionProvider() {\n return this.#transitionProvider;\n }\n\n render() {\n const navigation = this.context.navigation;\n const routeProp = this.routeProp;\n const Component = this.props.component;\n const HeaderComponent = routeProp.config.header?.component;\n const FooterComponent = routeProp.config.footer?.component;\n\n return (\n <ScreenTransitionProvider\n ref={this.#transitionProvider}\n renderAs={this.state.elementType}\n id={`${this.context.id}-${this.name}-transition-provider`}\n animation={routeProp.config.animation}\n navigation={navigation}\n focused={this.state.focused}\n >\n <div\n id={`${this.context.id}-${this.name}`}\n ref={this.ref}\n className=\"screen\"\n style={{\n height: '100%',\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n pointerEvents: 'inherit'\n }}\n >\n <SharedElementSceneContext.Provider value={this.sharedElementScene}>\n <RoutePropContext.Provider value={routeProp}>\n <NestedRouterContext.Provider value={this.nestedRouterData}>\n <Suspense fallback={<ComponentWithRouteProps component={routeProp.config.header?.fallback} route={routeProp} navigation={navigation} />}>\n <ComponentWithRouteProps component={HeaderComponent} route={routeProp} navigation={navigation} />\n </Suspense>\n <Suspense fallback={<ComponentWithRouteProps component={this.props.fallback} route={routeProp} navigation={navigation} />}>\n <ComponentWithRouteProps component={Component} route={routeProp} navigation={navigation} />\n </Suspense>\n <Suspense fallback={<ComponentWithRouteProps component={routeProp.config.footer?.fallback} route={routeProp} navigation={navigation} />}>\n <ComponentWithRouteProps component={FooterComponent} route={routeProp} navigation={navigation} />\n </Suspense>\n </NestedRouterContext.Provider>\n </RoutePropContext.Provider>\n </SharedElementSceneContext.Provider>\n </div>\n </ScreenTransitionProvider>\n );\n }\n}\n\ninterface ComponentWithRoutePropsProps extends ScreenBaseComponentProps<RoutePropBase, NavigationBase> {\n component: React.JSXElementConstructor<any> | LazyExoticComponent<any> | React.ReactNode;\n}\nfunction ComponentWithRouteProps({ component, route, navigation }: ComponentWithRoutePropsProps) {\n if (isLazyExoticComponent(component) && component.module?.default) {\n component = component.module.default;\n }\n const Component = component ?? null;\n if (typeof Component === \"function\" || isNativeLazyExoticComponent(Component)) {\n return (\n <Component\n navigation={navigation}\n route={route}\n />\n );\n } else if (isValidElement(Component)) {\n return cloneElement<any>(Component, {\n navigation,\n route\n });\n }\n return <>{Component}</>;\n}","import { isValidElement } from 'react';\nimport { ScreenBase, ScreenBaseProps } from '../ScreenBase';\nimport {\n MotionProgressEndEvent,\n MotionProgressEvent,\n MotionProgressStartEvent,\n TransitionCancelEvent,\n TransitionEndEvent,\n TransitionStartEvent\n} from './events';\nimport { SharedElement } from '../SharedElement';\nimport { StandardPropertiesHyphen } from 'csstype';\n\nexport type ScreenChild<E extends ScreenBase = ScreenBase> = E extends ScreenBase<infer P> ? React.CElement<P, E> : never;\n\nexport interface AnimationEffectFactoryProps<R extends HTMLElement = HTMLElement> {\n ref: R | null;\n index: number;\n exiting: boolean;\n timeline: AnimationTimeline | null;\n playbackRate: number;\n direction: PlaybackDirection;\n hasUAVisualTransition: boolean;\n}\n\nexport type AnimationEffectFactory<R extends HTMLElement = HTMLElement> = (props: AnimationEffectFactoryProps<R>) => AnimationEffect;\n\nexport type MetaTypeKey = 'http-equiv' | 'name' | 'itemprop' | 'property' | 'charset';\nexport type MetaType = [MetaTypeKey, string];\nexport type MetaKey = `${MetaTypeKey}=${string}`;\n\nexport interface LazyExoticComponent<T extends React.ComponentType<any>> extends React.LazyExoticComponent<T> {\n load: () => Promise<{ default: T }>;\n module?: { default: T };\n}\n\nexport type ScreenState<P extends ScreenBaseProps = ScreenBaseProps> = Map<string, Pick<RoutePropBase<P[\"config\"], PlainObject>, \"config\" | \"params\">>;\n\nexport interface RoutePropBase<C extends ScreenBaseProps[\"config\"] = {}, P extends PlainObject = PlainObject> {\n path: string;\n resolvedPathname?: string;\n config: NonNullable<C>;\n focused: boolean;\n params: P;\n setParams(params: Partial<P>): void;\n setConfig(config: Partial<NonNullable<C>>): void;\n}\n\nexport function isValidScreenChild<S extends ScreenBase>(value: any): value is ScreenChild<S> {\n if (!isValidElement(value)) return false;\n return Object.getPrototypeOf(value.type) === ScreenBase;\n}\n\nexport type PlainObject<T = any> = { [key: string]: T };\n\nexport interface RouterBaseEventMap extends HTMLElementEventMap {\n \"transition-start\": TransitionStartEvent;\n \"transition-cancel\": TransitionCancelEvent;\n \"transition-end\": TransitionEndEvent;\n \"motion-progress-start\": MotionProgressStartEvent;\n \"motion-progress\": MotionProgressEvent;\n \"motion-progress-end\": MotionProgressEndEvent;\n}\n\nexport type RouterHTMLElement<E extends RouterBaseEventMap, T extends HTMLElement = HTMLDivElement> = T & {\n addEventListener<K extends keyof E>(type: K, listener: (this: T, ev: E[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener<K extends keyof E>(type: K, listener: (this: T, ev: E[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\nexport type CustomElementType = `${string}-${string}`;\n\nexport interface MatchedRoute {\n params?: PlainObject<string | undefined>;\n}\n\nexport interface PathPattern {\n pattern: string;\n caseSensitive: boolean;\n}\n\nexport type AnimationDirection = \"normal\" | \"reverse\";\n\nenum SharedElementTransitionTypeEnum {\n \"morph\",\n \"fade-through\",\n \"fade\",\n \"cross-fade\"\n}\n\nexport type SharedElementTransitionType = keyof typeof SharedElementTransitionTypeEnum;\n\nexport interface SharedElementNode {\n id: string;\n instance: SharedElement;\n}\n\nexport type SharedElementNodeMap = Map<string, SharedElementNode>;\n\nexport type StyleKeyList = (keyof StandardPropertiesHyphen | string)[];\n\nexport function isNativeLazyExoticComponent(value: any): value is React.LazyExoticComponent<any> {\n return typeof value === \"object\"\n && value !== null\n && value.$$typeof === Symbol.for('react.lazy');\n}\n\nexport function isLazyExoticComponent(value: any): value is LazyExoticComponent<any> {\n return isNativeLazyExoticComponent(value) && 'load' in value;\n}\n\nexport type StylableElement = Element & { style: CSSStyleDeclaration };\n\nexport function isStylableElement(element: any): element is StylableElement {\n return 'style' in element && element.style instanceof CSSStyleDeclaration;\n}\n\nexport interface LoadNavigationTransition extends Omit<NavigationTransition, \"navigationType\"> {\n navigationType: \"load\";\n}\n\ndeclare global {\n interface NavigateEvent extends Event {\n commit?(): void; // not in spec yet, see https://github.com/WICG/navigation-api/issues/66\n }\n}\n\nexport type ElementPropType<C> = C extends React.CElement<infer P, infer T> ? P & React.ClassAttributes<T> : never;\nexport type ClonedElementType<C, IP extends Partial<ElementPropType<C>>> = C extends React.CElement<infer P, infer T> ? React.CElement<P & Partial<IP>, T & React.Component<P & IP>> : never;","var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }\nvar y = x => () => x\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"Animation\"]: () => __WEBPACK_EXTERNAL_MODULE_web_animations_extension_74b2916c__.Animation, [\"ParallelEffect\"]: () => __WEBPACK_EXTERNAL_MODULE_web_animations_extension_74b2916c__.ParallelEffect });","import { StylableElement, StyleKeyList, isStylableElement } from './common/types';\nimport { Component, RefObject, createRef } from 'react';\nimport { NavigationBase } from './NavigationBase';\nimport { ScreenBase } from './ScreenBase';\nimport { ParallelEffect } from 'web-animations-extension';\nimport { SharedElement } from './SharedElement';\nimport { toCamelCase } from './common/utils';\n\ninterface SharedElementTransitionLayerProps {\n navigation: NavigationBase;\n direction: \"forwards\" | \"backwards\";\n}\n\ninterface SharedElementTransitionLayerState { }\n\nexport class SharedElementTransitionLayer extends Component<SharedElementTransitionLayerProps, SharedElementTransitionLayerState> {\n public readonly ref = createRef<HTMLDialogElement>();\n #outgoingScreen: RefObject<ScreenBase> | null = null;\n #incomingScreen: RefObject<ScreenBase> | null = null;\n\n state: SharedElementTransitionLayerState = {\n transitioning: false\n }\n\n set outgoingScreen(outgoingScreen: RefObject<ScreenBase> | null) {\n this.#outgoingScreen = outgoingScreen;\n }\n\n set incomingScreen(incomingScreen: RefObject<ScreenBase> | null) {\n this.#incomingScreen = incomingScreen;\n }\n\n get outgoingScreen() {\n return this.#outgoingScreen;\n }\n\n get incomingScreen() {\n return this.#incomingScreen;\n }\n\n getKeyframeProperties(element: Element, styleList: StyleKeyList) {\n const computedStyles: Record<string, string> = {};\n const computedStyle = window.getComputedStyle(element);\n for (const key of styleList) {\n let transformedKey;\n if (key === \"offset\")\n transformedKey = \"cssOffset\";\n else if (key === \"float\")\n transformedKey = \"cssFloat\";\n else\n transformedKey = toCamelCase(key);\n computedStyles[transformedKey] = computedStyle.getPropertyValue(key);\n }\n return computedStyles;\n }\n\n copyStyles(srcElement: Element | null | undefined, cloneElement: StylableElement, styleList: StyleKeyList) {\n if (!isStylableElement(srcElement)) return;\n const computedStyles = window.getComputedStyle(srcElement);\n for (const key of styleList) {\n const value = computedStyles.getPropertyValue(key);\n const priority = computedStyles.getPropertyPriority(key);\n cloneElement.style.setProperty(key, value, priority);\n }\n }\n\n getAnimationEffect<T extends { instance: SharedElement, clone: HTMLElement }>(start: T, end: T) {\n const keyframeEffects = new Array<KeyframeEffect>();\n const startRect = start.instance.getBoundingClientRect();\n const endRect = end.instance.getBoundingClientRect();\n const config: KeyframeEffectOptions = {\n fill: \"both\" as const,\n duration: \"auto\",\n easing: \"ease\",\n };\n const transitionType = end.instance.transitionType;\n const startTransform = `translate(${startRect.x}px, ${startRect.y}px)`;\n const endTransform = `translate(${endRect.x}px, ${endRect.y}px)`;\n switch (transitionType) {\n case \"fade\":\n keyframeEffects.push(\n new KeyframeEffect(\n start.clone,\n [\n { transform: startTransform, opacity: 1 },\n { transform: endTransform, opacity: 0 }\n ],\n config\n ),\n );\n keyframeEffects.push(\n new KeyframeEffect(\n end.clone,\n [\n { transform: startTransform },\n { transform: endTransform }\n ],\n config\n ),\n\n );\n break;\n case \"fade-through\":\n keyframeEffects.push(\n new KeyframeEffect(\n start.clone,\n [\n { transform: startTransform, opacity: 1 },\n { opacity: 0, offset: 0.5 },\n { transform: endTransform, opacity: 0 }\n ],\n config\n ),\n\n );\n keyframeEffects.push(\n new KeyframeEffect(\n end.clone,\n [\n { transform: startTransform, opacity: 0 },\n { opacity: 0, offset: 0.5 },\n { transform: endTransform, opacity: 1 }\n ],\n config\n ),\n\n );\n break;\n case \"cross-fade\":\n end.clone.style.mixBlendMode = \"plus-lighter\";\n keyframeEffects.push(\n new KeyframeEffect(\n start.clone,\n [\n { transform: startTransform, opacity: 1 },\n { transform: endTransform, opacity: 0 }\n ],\n config\n ),\n\n );\n keyframeEffects.push(\n new KeyframeEffect(\n end.clone,\n [\n { transform: startTransform },\n { transform: endTransform }\n ],\n config\n ),\n\n );\n break;\n case \"morph\": {\n const styleList = Array.from(new Set([...start.instance.styles, ...end.instance.styles]));\n keyframeEffects.push(\n new KeyframeEffect(\n end.clone,\n [\n {\n ...Object.fromEntries((start.instance.ref.current?.firstElementChild as HTMLElement).attributeStyleMap),\n transform: startTransform,\n width: `${startRect.width}px`,\n height: `${startRect.height}px`,\n },\n {\n ...Object.fromEntries((end.instance.ref.current?.firstElementChild as HTMLElement).attributeStyleMap),\n ...this.getKeyframeProperties(end.instance.ref.current?.firstElementChild as HTMLElement, styleList),\n transform: endTransform,\n width: `${endRect.width}px`,\n height: `${endRect.height}px`,\n }\n ],\n config\n )\n );\n break;\n }\n }\n return new ParallelEffect(keyframeEffects);\n }\n\n get animationEffect() {\n const currentScene = this.outgoingScreen?.current?.sharedElementScene;\n const nextScene = this.incomingScreen?.current?.sharedElementScene;\n if (!currentScene || !nextScene) return null;\n if (currentScene === nextScene) return null;\n currentScene.previousScene = null;\n nextScene.previousScene = currentScene;\n const parallelEffects = new Array<ParallelEffect>();\n for (const [id, end] of Array.from(nextScene.nodes.entries())) {\n const start = currentScene.nodes.get(id);\n if (!start?.canTransition || !end.canTransition) continue;\n const endClone = end.clone();\n const startClone = start.clone();\n if (!startClone || !endClone) continue;\n const styleList = Array.from(new Set([...start.styles, ...end.styles, 'width', 'height']));\n if (end.transitionType !== \"morph\") {\n startClone.id = `${id}-start`;\n startClone.style.position = \"absolute\";\n startClone.style.gridArea = \"1 / 1\";\n this.copyStyles(start.ref.current?.firstElementChild, startClone, styleList);\n this.copyStyles(end.ref.current?.firstElementChild, endClone, styleList);\n this.ref.current?.prepend(startClone);\n } else {\n this.copyStyles(start.ref.current?.firstElementChild, endClone, styleList);\n }\n\n endClone.id = `${id}${end.transitionType === \"morph\" ? '' : '-end'}`;\n endClone.style.position = \"absolute\";\n endClone.style.gridArea = \"1 / 1\";\n this.ref.current?.prepend(endClone);\n start.hide();\n end.hide();\n const onFinish = async () => {\n if (this.props.direction === \"forwards\")\n end.unhide();\n else\n start.unhide();\n endClone.remove();\n startClone.remove();\n };\n this.props.navigation.addEventListener('transition-end', onFinish, { once: true });\n this.props.navigation.addEventListener('transition-cancel', onFinish, { once: true });\n\n parallelEffects.push(this.getAnimationEffect(\n { instance: start, clone: startClone },\n { instance: end, clone: endClone }\n ));\n }\n\n return new ParallelEffect(parallelEffects);\n }\n\n render() {\n return (\n <dialog className=\"shared-element-layer\" ref={this.ref} style={{\n maxWidth: 'unset',\n maxHeight: 'unset',\n width: '100vw',\n height: '100vh',\n contain: 'strict',\n padding: 0,\n border: 'none',\n backgroundColor: 'transparent',\n isolation: 'isolate',\n }}>\n <style>\n {`\n .shared-element-layer::backdrop {display: none}\n .shared-element-layer[open] {display:grid}\n `}\n </style>\n </dialog>\n );\n }\n}","import { createContext } from \"react\";\n\nexport const MotionContext = createContext(0);","import { Component, RefObject, createRef } from 'react';\nimport { MotionProgressEvent, TransitionCancelEvent, TransitionEndEvent, TransitionStartEvent } from './common/events';\nimport { SharedElementTransitionLayer } from './SharedElementTransitionLayer';\nimport { ParallelEffect, Animation } from 'web-animations-extension';\nimport { ScreenTransitionLayerContext } from './ScreenTransitionLayerContext';\nimport { ScreenChild } from './common/types';\nimport { NavigationBase } from './NavigationBase';\nimport { ScreenBase } from './ScreenBase';\nimport { MotionContext } from './MotionContext';\n\ninterface ScreenTransitionLayerProps {\n children: ScreenChild | ScreenChild[];\n navigation: NavigationBase;\n hasUAVisualTransition: boolean;\n}\n\ninterface ScreenTransitionLayerState {\n gestureNavigating: boolean;\n progress: number;\n}\n\nexport class ScreenTransitionLayer extends Component<ScreenTransitionLayerProps, ScreenTransitionLayerState> {\n public readonly sharedElementTransitionLayer = createRef<SharedElementTransitionLayer>();\n public readonly animation: Animation = new Animation();\n #direction: PlaybackDirection = \"normal\";\n #screens: RefObject<ScreenBase>[] = new Array();\n\n state: ScreenTransitionLayerState = {\n gestureNavigating: false,\n progress: 1\n }\n\n private onAnimationFrame() {\n const progress = this.animation.effect?.getComputedTiming().progress;\n\n if (progress)\n this.onProgress(progress);\n\n if (this.animation.playState === \"running\")\n requestAnimationFrame(this.onAnimationFrame.bind(this));\n }\n\n private onTransitionCancel() {\n this.props.navigation.dispatchEvent(new TransitionCancelEvent());\n }\n\n private onTransitionStart() {\n this.props.navigation.dispatchEvent(new TransitionStartEvent());\n\n this.onAnimationFrame();\n }\n\n private onTransitionEnd() {\n this.props.navigation.dispatchEvent(new TransitionEndEvent());\n }\n\n private onProgress(progress: number) {\n this.setState({ progress });\n this.props.navigation.dispatchEvent(new MotionProgressEvent(progress));\n }\n\n get screens() {\n return this.#screens;\n }\n\n set screens(screens: RefObject<ScreenBase>[]) {\n this.#screens = screens;\n }\n\n set direction(direction: PlaybackDirection) {\n this.#direction = direction;\n this.animation.effect?.updateTiming({ direction });\n }\n\n get direction() {\n return this.#direction;\n }\n\n get hasUAVisualTransition() {\n return this.props.hasUAVisualTransition;\n }\n\n public transition() {\n const effect = new ParallelEffect(\n this.screens.map(screen => {\n return screen.current?.transitionProvider?.current?.animationEffect ?? null;\n }).filter((effect): effect is AnimationEffect => effect !== null)\n );\n\n const sharedElementEffect = this.sharedElementTransitionLayer.current?.animationEffect;\n const duration = effect.getComputedTiming().duration;\n if (sharedElementEffect) {\n sharedElementEffect.updateTiming({\n duration: duration instanceof CSSNumericValue ? duration.to('ms').value : duration\n });\n effect.append(sharedElementEffect);\n this.sharedElementTransitionLayer.current?.ref.current?.showModal();\n }\n\n this.animation.effect = effect;\n\n this.animation.play();\n this.onTransitionStart();\n\n this.animation.oncancel = () => {\n this.sharedElementTransitionLayer.current?.ref.current?.close();\n this.onTransitionCancel();\n this.animation.effect = null;\n }\n this.animation.finished.then(() => {\n this.animation.commitStyles();\n this.onTransitionEnd();\n this.sharedElementTransitionLayer.current?.ref.current?.close();\n this.animation.effect = null;\n });\n\n return this.animation;\n }\n\n render() {\n return (\n <ScreenTransitionLayerContext.Provider value={this}>\n <SharedElementTransitionLayer\n ref={this.sharedElementTransitionLayer}\n navigation={this.props.navigation}\n direction={this.animation.playbackRate > 0 ? \"forwards\" : \"backwards\"}\n />\n <div\n className=\"screen-transition-layer\"\n style={{\n width: '100%',\n height: '100%',\n display: 'grid',\n contain: 'layout',\n isolation: 'isolate',\n '--motion-progress': this.state.progress\n } as React.CSSProperties}\n >\n <MotionContext.Provider value={this.state.progress}>\n {this.props.children}\n </MotionContext.Provider>\n </div>\n </ScreenTransitionLayerContext.Provider>\n );\n }\n}","import { NavigationBase } from './NavigationBase';\nimport { ScreenTransitionLayer } from './ScreenTransitionLayer';\nimport {\n ScreenChild,\n RouterBaseEventMap,\n RouterHTMLElement,\n} from './common/types';\nimport { NestedRouterContext, RouterContext } from './RouterContext';\nimport { dispatchEvent, matchRoute, resolveBaseURLFromPattern } from './common/utils';\nimport { Component, createRef, isValidElement, Children } from 'react';\nimport { ScreenBase, ScreenBaseConfig } from './ScreenBase';\nimport { LoadEvent } from './common/events';\n\nexport interface RouterBaseConfig {\n screenConfig?: ScreenBaseConfig;\n basePath?: string;\n}\n\nexport interface RouterBaseProps<S extends ScreenBase = ScreenBase> {\n id?: string;\n config?: RouterBaseConfig;\n children: ScreenChild<S> | ScreenChild<S>[];\n}\n\nexport interface RouterBaseState {}\n\nexport abstract class RouterBase<P extends RouterBaseProps = RouterBaseProps, S extends RouterBaseState = RouterBaseState, E extends RouterBaseEventMap = RouterBaseEventMap> extends Component<P, S> {\n protected readonly ref = createRef<RouterHTMLElement<E>>();\n protected screenTransitionLayer = createRef<ScreenTransitionLayer>();\n public abstract readonly navigation: NavigationBase;\n public readonly parent: RouterBase | null = null;\n #child: WeakRef<RouterBase> | null = null;\n private loadDispatched = false;\n private hasUAVisualTransition = false;\n public readonly parentScreen: ScreenBase | null = null;\n private static rootRouterRef: WeakRef<RouterBase> | null = null;\n static readonly contextType = NestedRouterContext;\n declare context: React.ContextType<typeof NestedRouterContext>;\n\n constructor(props: P, context: React.ContextType<typeof NestedRouterContext>) {\n super(props);\n\n this.parentScreen = context?.parentScreen ?? null;\n this.parent = context?.parentRouter ?? null;\n if (this.parent) {\n this.parent.child = this;\n }\n if (this.isRoot) {\n RouterBase.rootRouterRef = new WeakRef(this);\n }\n }\n\n componentDidMount() {\n if (this.isRoot) {\n window.navigation.addEventListener('navigate', this.handleNavigationDispatch);\n }\n\n if (!this.loadDispatched) {\n window.navigation.dispatchEvent(new LoadEvent());\n this.loadDispatched = true;\n }\n }\n\n componentWillUnmount() {\n if (this.isRoot) {\n window.navigation.removeEventListener('navigate', this.handleNavigationDispatch);\n }\n }\n\n private handleNavigationDispatch = (e: NavigateEvent) => {\n const activeRouters = [...this.#activeRoutersIter()];\n // travel down router tree to find a router that can intercept\n const interceptor = activeRouters.findLast(router => router.canIntercept(e));\n if (interceptor) {\n interceptor.intercept(e);\n this.hasUAVisualTransition = e.hasUAVisualTransition;\n }\n }\n\n *#activeRoutersIter() {\n let router: RouterBase | null = this;\n while (router) {\n yield router;\n router = router.child;\n }\n }\n\n getRouterById(routerId: string, target?: RouterBase): RouterBase | null {\n const router = target ?? RouterBase.rootRouterRef?.deref();\n if (router!.id === routerId) {\n return router ?? null;\n } else if (router?.child) {\n return this.getRouterById(routerId, router!.child);\n } else {\n return null;\n }\n }\n\n dispatchEvent(event: Event) {\n const ref = this.ref.current ?? undefined;\n return dispatchEvent(event, ref);\n }\n\n addEventListener<K extends keyof E>(type: K, listener: (this: RouterHTMLElement<E>, ev: E[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n\taddEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void {\n return this.ref.current?.addEventListener(type, listener, options);\n }\n\n removeEventListener<K extends keyof E>(type: K, listener: (this: RouterHTMLElement<E>, ev: E[K]) => any, options?: boolean | EventListenerOptions | undefined): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions) {\n return this.ref.current?.removeEventListener(type, listener, options);\n }\n\n public preloadRoute(pathname: string) {\n return new Promise<boolean>((resolve, reject) => {\n let found = false;\n const routes = this.props.children;\n Children.forEach<ScreenChild>(routes, (route) => {\n if (found) return; // stop after first\n if (!isValidElement(route)) return;\n const { path, caseSensitive } = route.props;\n const baseURLPattern = this.baseURLPattern.pathname;\n const matchInfo = matchRoute(path, pathname, baseURLPattern, caseSensitive);\n if (!matchInfo) return;\n found = true;\n const config = route.props.config;\n queueMicrotask(async () => {\n const preloadTasks = [];\n if ('load' in route.props.component) {\n preloadTasks.push(route.props.component.load());\n }\n if (config?.header?.component && 'load' in config?.header?.component) {\n preloadTasks.push(config?.header?.component.load());\n }\n if (config?.footer?.component && 'load' in config?.footer?.component) {\n preloadTasks.push(config?.footer?.component.load());\n }\n try {\n await Promise.all(preloadTasks);\n resolve(found);\n } catch (e) {\n reject(e);\n }\n });\n });\n if (!found)\n resolve(false);\n });\n }\n\n get id(): string {\n if (this.props.id) return this.props.id;\n const prefix = this.parent?.id;\n const id = this.parentScreen?.id ?? 'root';\n return [prefix, id].filter(Boolean).join('-');\n }\n\n get isRoot() {\n return !this.parent;\n }\n\n get baseURL() {\n const pathname = this.isRoot ? window.location.pathname : this.parentScreen?.resolvedPathname!;\n const pattern = this.baseURLPattern.pathname;\n\n return resolveBaseURLFromPattern(pattern, pathname)!;\n }\n\n get baseURLPattern() {\n let baseURL = window.location.origin + \"/\";\n let basePath = this.props.config?.basePath;\n if (!basePath) {\n if (this.isRoot) {\n basePath = \"/\";\n } else {\n basePath = \".\";\n }\n }\n\n if (this.parent && this.parentScreen) {\n const { resolvedPathname = window.location.pathname, path } = this.parentScreen;\n const parentBaseURL = this.parent.baseURL?.href;\n const pattern = new URLPattern({ baseURL: parentBaseURL, pathname: path });\n baseURL = resolveBaseURLFromPattern(\n pattern.pathname,\n resolvedPathname\n )!.href;\n }\n\n return new URLPattern({ baseURL, pathname: basePath });\n }\n\n get pathPatterns() {\n return Children.map(this.props.children, (child) => {\n return { pattern: child.props.path, caseSensitive: Boolean(child.props.caseSensitive) };\n });\n }\n\n get mounted() {\n return Boolean(this.ref.current);\n }\n\n get child() {\n return this.#child?.deref() ?? null;\n }\n\n set child(child: RouterBase | null) {\n const currentChildRouter = this.#child?.deref();\n if (\n currentChildRouter\n && child?.id !== currentChildRouter?.id\n && currentChildRouter?.mounted\n ) {\n throw new Error(\"It looks like you have two navigators at the same level. Try simplifying your navigation structure by using a nested router instead.\");\n }\n if (child)\n this.#child = new WeakRef(child);\n else\n this.#child = null;\n }\n\n protected abstract canIntercept(navigateEvent: NavigateEvent): boolean;\n protected abstract shouldIntercept(navigateEvent: NavigateEvent): boolean;\n protected abstract intercept(navigateEvent: NavigateEvent): void;\n protected abstract get screens(): P[\"children\"];\n\n render() {\n if (!this.navigation) return;\n return (\n <div\n id={this.id}\n className=\"react-motion-router\"\n style={{ width: '100%', height: '100%' }}\n ref={this.ref}\n >\n <RouterContext.Provider value={this}>\n <ScreenTransitionLayer\n ref={this.screenTransitionLayer}\n navigation={this.navigation}\n hasUAVisualTransition={this.hasUAVisualTransition}\n >\n {this.screens}\n </ScreenTransitionLayer>\n </RouterContext.Provider>\n </div>\n );\n }\n}","import { MetaKey, MetaType, MetaTypeKey } from \"./common/types\";\n\nexport class MetaData {\n #map = new Map<MetaKey, string | undefined>();\n private mutationObserver: MutationObserver;\n\n constructor() {\n this.mutationObserver = new MutationObserver(this.observeMutations.bind(this));\n const {head} = document;\n this.mutationObserver.observe(head, {\n childList: true\n });\n\n Array.from(head.querySelectorAll('meta')).forEach(node => {\n this.mutationObserver.observe(node, {\n attributes: true\n });\n });\n\n Array.from(head.querySelectorAll('meta')).forEach(this.metaDataFromNode.bind(this));\n }\n\n get(key: string | MetaType) {\n const metaKey = this.getMetaKey(key);\n\n const metaContent = this.#map.get(metaKey);\n if (!metaContent) return undefined;\n\n let content: string | [string, string][];\n if (metaContent.includes(',') && metaContent.includes('=')) {\n content = metaContent.split(/,\\s*/).map(keyVal => keyVal.split('=') as [string, string]);\n } else {\n content = metaContent;\n }\n\n return content;\n }\n\n set(key: string | MetaType, content?: string | [string, string][]) {\n const metaKey = this.getMetaKey(key);\n const metaContent = this.getMetaContent(content);\n\n this.#map.set(metaKey, metaContent);\n this.updateMetaElement(metaKey, metaContent);\n }\n\n has(key: string | MetaType) {\n const metaKey = this.getMetaKey(key);\n\n return this.#map.has(metaKey);\n }\n\n delete(key: string | MetaType) {\n const metaKey = this.getMetaKey(key);\n\n this.#map.delete(metaKey);\n document.head.querySelector(`meta[${metaKey}]`)?.remove();\n }\n\n clear() {\n document.head.querySelectorAll('meta').forEach(node => node.remove());\n }\n\n entries() {\n return this.#map.entries();\n }\n\n [Symbol.iterator]() {\n return this.entries();\n }\n\n get size() {\n return this.#map.size;\n }\n \n private observeMutations(mutations: MutationRecord[]) {\n for (const mutation of mutations) {\n if (mutation.type === 'attributes') {\n const node = mutation.target;\n\n this.metaDataFromNode(node as HTMLMetaElement);\n }\n\n if (mutation.type !== 'childList') return;\n\n mutation.removedNodes.forEach((node) => {\n if (node.nodeName === 'META') {\n const [type] = Array.from((node as HTMLMetaElement).attributes).filter(attribute => attribute.nodeName !== \"content\");\n const metaType: MetaType = [type.nodeName as MetaTypeKey, type.value];\n\n const key = metaType.join('=') as MetaKey;\n if (this.#map.has(key)) {\n this.#map.delete(key);\n }\n }\n });\n mutation.addedNodes.forEach(node => {\n if (node.nodeName === 'META') {\n this.metaDataFromNode(node as HTMLMetaElement);\n }\n });\n }\n }\n\n private metaDataFromNode(node: HTMLMetaElement) {\n const [type] = Array.from((node as HTMLMetaElement).attributes).filter(attribute => attribute.nodeName !== \"content\");\n const [content] = Array.from((node as HTMLMetaElement).attributes).filter(attribute => attribute.nodeName === \"content\");\n const metaType: MetaType = [type.nodeName as MetaTypeKey, type.value];\n\n const key = metaType.join('=') as MetaKey;\n this.#map.set(key, content?.value);\n }\n\n private getMetaKey(key: string | MetaType) {\n let metaKey: MetaKey;\n if (typeof key === \"string\") {\n metaKey = `name=${key}` as MetaKey;\n } else {\n metaKey = key.join('=') as MetaKey;\n }\n\n return metaKey;\n }\n\n private getMetaContent(content: string | [string, string][] | undefined) {\n if (!content) return undefined;\n\n let metaContent: string;\n if (typeof content === \"string\") {\n metaContent = content;\n } else {\n metaContent = content.map(contentTuple => contentTuple.join('=')).join(', ');\n }\n\n return metaContent;\n }\n\n private updateMetaElement(key: MetaKey, content?: string) {\n const meta = document.querySelector(`meta[${key}]`) || document.createElement('meta');\n const metaType = key.split('=') as MetaType;\n\n meta.setAttribute(...metaType);\n if (content) meta.setAttribute('content', content);\n else meta.removeAttribute('content');\n\n if (!meta.parentElement) {\n document.head.appendChild(meta);\n }\n }\n}","import { RouterHTMLElement, RouterBaseEventMap } from \"./common/types\";\nimport { MetaData } from \"./MetaData\";\nimport { RouterBase } from \"./RouterBase\";\n\nexport abstract class NavigationBase<E extends RouterBaseEventMap = RouterBaseEventMap> {\n protected abstract readonly router: RouterBase;\n private static rootNavigatorRef: WeakRef<NavigationBase> | null = null;\n public readonly metaData = new MetaData();\n\n constructor() {\n const rootNavigator = NavigationBase.rootNavigatorRef?.deref();\n if (!rootNavigator || !rootNavigator.isInDocument)\n NavigationBase.rootNavigatorRef = new WeakRef(this);\n }\n\n addEventListener<K extends keyof E>(type: K, listener: (this: RouterHTMLElement<E>, ev: E[K]) => any, options?: boolean | AddEventListenerOptions): () => void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): () => void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): () => void {\n this.router.addEventListener(type, listener, options);\n return () => this.router.removeEventListener(type, listener, options);\n }\n\n removeEventListener<K extends keyof E>(type: K, listener: (this: RouterHTMLElement<E>, ev: E[K]) => any, options?: boolean | EventListenerOptions | undefined): void\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void {\n return this.router.removeEventListener(type, listener, options);\n }\n\n dispatchEvent(event: Event) {\n return this.router.dispatchEvent?.(event);\n }\n\n get parent(): NavigationBase | null {\n return this.router.parent?.navigation ?? null;\n }\n\n get routerId() {\n return this.router.id;\n }\n\n get baseURL() {\n return this.router.baseURL;\n }\n\n get baseURLPattern() {\n return this.router.baseURLPattern;\n }\n\n public getNavigatorById(routerId: string) {\n return this.router.getRouterById(routerId)?.navigation ?? null;\n }\n\n public preloadRoute(path: string) {\n const { pathname } = new URL(path, this.baseURL);\n return this.router.preloadRoute(pathname);\n }\n\n private get isInDocument() {\n return Boolean(document.getElementById(`${this.routerId}`));\n }\n}","import { useContext, useDebugValue } from \"react\";\nimport { MotionContext } from \"../MotionContext\";\nimport { NavigationBase } from \"../NavigationBase\";\nimport { RouterContext } from \"../RouterContext\";\nimport { RoutePropContext } from \"../RoutePropContext\";\nimport { RouterBase } from \"../RouterBase\";\nimport { RoutePropBase } from \"./types\";\n\nexport function useNavigationBase<T extends NavigationBase = NavigationBase>() {\n const router = useContext(RouterContext);\n if (router) {\n return router.navigation as T;\n } else {\n throw new Error(\"Router is null. You may be trying to call useNavigation outside a Router.\");\n }\n}\n\nexport function useRouterBase<T extends RouterBase = RouterBase>() {\n return useContext(RouterContext) as T;\n}\n\nexport function useMotion() {\n useDebugValue(\"Motion\");\n return useContext(MotionContext);\n}\n\nexport function useRouteBase<R extends RoutePropBase>() {\n const routeProp = useContext(RoutePropContext);\n if (routeProp) {\n return routeProp as R;\n } else {\n throw new Error(\"Router is null. You may be trying to call useRoute outside a Router.\");\n }\n}\n\nexport function useParamsBase<K extends string, S>(key: K, initialParams: S | (() => S)): [S, React.Dispatch<React.SetStateAction<S>>] {\n\tconst route = useRouteBase();\n\tinitialParams = initialParams instanceof Function ? initialParams() : initialParams;\n\n\tconst setParams = (params: S | ((prevState: S) => S)) => {\n\t\tif (params instanceof Function)\n\t\t\tparams = params(route.params[key] ?? initialParams);\n\t\troute.setParams({ [key]: params });\n\t}\n\n\treturn [route.params[key] ?? initialParams, setParams] as const;\n}","export const MAX_Z_INDEX = 2147483647;\nexport const MAX_PROGRESS = 100;\nexport const MIN_PROGRESS = 0;\nexport const MIN_NORM_PROGRESS = 0;\nexport const MAX_NORM_PROGRESS = 1;","/// <reference types=\"urlpattern-polyfill\" />\nexport * from './SharedElement';\nexport * from './RouterBase';\nexport * from './ScreenBase';\nexport * from './NavigationBase';\nexport * from './MotionContext';\nexport * from './RouterContext';\nexport * from './common/hooks';\nexport * from './common/types';\nexport * from './common/events';\nexport * from './common/utils';\nexport * from './common/constants';"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"index.js","mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa,MAAM,mBAAO,CAAC,GAAO,6KAA6K;AAC/M,kBAAkB,UAAU,eAAe,qBAAqB,6BAA6B,0BAA0B,0DAA0D,4EA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AAS,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,aAAa,EAAE,SAAS,CAAU,CAAC;AACjE,CAAC;;;AC9CM,MAAM,WAAW,GAAG,UAAU,CAAC;AAC/B,MAAM,YAAY,GAAG,GAAG,CAAC;AACzB,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,MAAM,iBAAiB,GAAG,CAAC,CAAC;;;ACJnC,6CAA6C;AACb;AACH;AACA;AACI;AACD;AACA;AACD;AACA;AACC;AACD;AACI","sources":["webpack://@react-motion-router/core/../../node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://@react-motion-router/core/../../node_modules/react/jsx-runtime.js","webpack://@react-motion-router/core/./src/common/utils.ts","webpack://@react-motion-router/core/external module \"react\"","webpack://@react-motion-router/core/webpack/bootstrap","webpack://@react-motion-router/core/webpack/runtime/define property getters","webpack://@react-motion-router/core/webpack/runtime/hasOwnProperty shorthand","webpack://@react-motion-router/core/./src/SharedElementSceneContext.ts","webpack://@react-motion-router/core/./src/SharedElement.tsx","webpack://@react-motion-router/core/./src/common/events.ts","webpack://@react-motion-router/core/./src/ScreenTransitionLayerContext.tsx","webpack://@react-motion-router/core/./src/ScreenTransitionProvider.tsx","webpack://@react-motion-router/core/./src/RouterContext.ts","webpack://@react-motion-router/core/./src/RoutePropContext.ts","webpack://@react-motion-router/core/./src/SharedElementScene.ts","webpack://@react-motion-router/core/./src/ScreenBase.tsx","webpack://@react-motion-router/core/./src/common/types.ts","webpack://@react-motion-router/core/external module \"web-animations-extension\"","webpack://@react-motion-router/core/./src/SharedElementTransitionLayer.tsx","webpack://@react-motion-router/core/./src/MotionContext.ts","webpack://@react-motion-router/core/./src/ScreenTransitionLayer.tsx","webpack://@react-motion-router/core/./src/RouterBase.tsx","webpack://@react-motion-router/core/./src/MetaData.ts","webpack://@react-motion-router/core/./src/NavigationBase.ts","webpack://@react-motion-router/core/./src/common/hooks.ts","webpack://@react-motion-router/core/./src/common/constants.ts","webpack://@react-motion-router/core/./src/index.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import { cloneElement, lazy as ReactLazy } from \"react\";\nimport { ClonedElementType, ElementPropType, LazyExoticComponent, MatchedRoute, PathPattern } from \"./types\";\nimport { RouterBase } from \"../RouterBase\";\n\nexport function resolveBaseURLFromPattern(pattern: string, pathname: string) {\n if (!pattern.endsWith(\"**\")) pattern += '**'; // allows us to match nested routes\n const origin = window.location.origin;\n const baseURLMatch = new URLPattern(pattern, origin).exec(pathname, origin);\n if (!baseURLMatch) return null;\n\n const groups = Object.keys(baseURLMatch.pathname.groups)\n .filter((key) => !isNaN(Number(key)))\n .map((key) => baseURLMatch.pathname.groups[key])\n .filter((group) => group !== undefined);\n const nestedPathnameGroup = groups.at(-1) ?? '';\n // derive concrete baseURL\n return new URL(pathname.replace(nestedPathnameGroup, ''), window.location.origin);\n}\n\nexport function matchRoute(\n pathnamePattern: string,\n pathname: string,\n baseURLPattern: string = `${window.location.origin}/`,\n caseSensitive: boolean = true\n): MatchedRoute | null {\n if (!caseSensitive) {\n pathnamePattern = pathnamePattern.toLowerCase();\n pathname = pathname.toLowerCase();\n }\n\n const baseURL = resolveBaseURLFromPattern(baseURLPattern, pathname)?.href;\n if (!baseURL) return null;\n\n const match = new URLPattern({ baseURL, pathname: pathnamePattern }).exec({ pathname, baseURL });\n const params = match?.pathname.groups ?? {};\n if (match) {\n return {\n params\n };\n }\n return null;\n}\n\nexport function includesRoute(pathnamePatterns: PathPattern[], pathname: string, baseURL: string = window.location.origin) {\n return pathnamePatterns.some(({ pattern, caseSensitive }) => matchRoute(pattern, pathname, baseURL, caseSensitive));\n}\n\nexport function dispatchEvent<T>(event: CustomEvent<T> | Event, target: HTMLElement | EventTarget = window) {\n return new Promise<boolean>((resolve) => {\n queueMicrotask(() => resolve(\n target.dispatchEvent(event)\n ));\n });\n}\n\nexport function lazy<T extends React.ComponentType<any>>(\n factory: () => Promise<{ default: T }>\n): LazyExoticComponent<T> {\n const Component = ReactLazy(factory) as LazyExoticComponent<T>;\n Component.load = async () => {\n Component.module ??= await factory();\n return Component.module;\n };\n return Component;\n}\n\nexport function isNavigationSupported() {\n return Boolean(window.navigation);\n}\n\nexport function isURLPatternSupported() {\n // @ts-ignore: Property 'UrlPattern' does not exist \n return Boolean(globalThis.URLPattern);\n}\n\nexport async function polyfillURLPattern() {\n const { URLPattern } = await import(/*webpackIgnore: true*/ \"urlpattern-polyfill\");\n // @ts-ignore: Property 'UrlPattern' does not exist \n globalThis.URLPattern = URLPattern;\n}\n\nexport async function polyfillNavigation() {\n const { applyPolyfill } = await import(/*webpackIgnore: true*/ \"@virtualstate/navigation\");\n applyPolyfill({\n history: true,\n interceptEvents: true,\n patch: true,\n persist: true,\n persistState: true\n });\n}\n\nexport async function PromiseAllDynamic<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]> {\n const awaited = [];\n for (const value of values) {\n awaited.push(await value);\n }\n\n return awaited;\n}\n\nexport function toCamelCase(value: string) {\n return value.replace(/-([a-z])/g, (g) => g[1].toUpperCase())\n}\n\nexport function cloneAndInject<\n C extends React.CElement<any, any>,\n IP extends Partial<ElementPropType<C>>\n>(element: C, injectProps: IP) {\n return cloneElement(element, injectProps) as ClonedElementType<C, IP>;\n}","var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }\nvar y = x => () => x\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_react__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import { createContext } from \"react\";\nimport { SharedElementScene } from \"./SharedElementScene\";\n\nexport const SharedElementSceneContext = createContext<SharedElementScene>(null!);","import { Component, createRef } from 'react';\nimport { SharedElementTransitionType, StyleKeyList } from './common/types';\nimport { SharedElementSceneContext } from './SharedElementSceneContext';\n\ninterface SharedElementConfig extends OptionalEffectTiming {\n type?: SharedElementTransitionType;\n transformOrigin?: React.CSSProperties[\"transformOrigin\"];\n styles?: StyleKeyList;\n deepClone?: boolean;\n}\n\ninterface SharedElementProps {\n id: string;\n children: React.ReactElement;\n disabled?: boolean;\n config?: SharedElementConfig;\n}\n\ninterface SharedElementState {}\n\nexport class SharedElement extends Component<SharedElementProps, SharedElementState> {\n public readonly ref = createRef<HTMLDivElement>();\n static readonly contextType = SharedElementSceneContext;\n declare context: React.ContextType<typeof SharedElementSceneContext>;\n\n componentDidMount(): void {\n this.scene.addNode(this);\n }\n\n componentDidUpdate(prevProps: SharedElementProps) {\n if (this.props.id !== prevProps.id) {\n this.scene.removeNode(prevProps.id.toString());\n this.scene.addNode(this);\n }\n }\n\n componentWillUnmount(): void {\n this.scene.removeNode(this.id);\n }\n\n get styles(): StyleKeyList {\n if (this.props.config?.styles) {\n return this.props.config.styles;\n }\n return [];\n }\n\n get canTransition() {\n return !this.props.disabled\n && this.scene.canTransition;\n }\n\n get scene() {\n return this.context;\n }\n\n get id() {\n return `shared-element-${this.props.id.toString()}`;\n }\n\n get transitionType(): SharedElementTransitionType {\n return this.props.config?.type ?? this.scene.previousScene?.nodes.get(this.id)?.transitionType ?? \"morph\";\n }\n\n getBoundingClientRect() {\n return this.ref.current?.firstElementChild?.getBoundingClientRect() ?? new DOMRect();\n }\n\n public clone() {\n if (!this.ref.current) return null;\n const deepClone = this.props.config?.deepClone ?? true;\n return this.ref.current.firstElementChild?.cloneNode(deepClone) as HTMLElement;\n }\n\n public hide() {\n if (!this.ref.current) return;\n this.ref.current.style.visibility = 'hidden';\n }\n\n public unhide() {\n if (!this.ref.current) return;\n this.ref.current.style.visibility = 'visible';\n }\n\n render() {\n return (\n <div\n ref={this.ref}\n id={this.id}\n style={{ display: \"contents\" }}\n >\n {this.props.children}\n </div>\n );\n }\n}","import { LoadNavigationTransition } from \"./types\";\nimport { PromiseAllDynamic } from \"./utils\";\n\nexport class TransitionStartEvent extends Event {\n\tconstructor() {\n\t\tsuper('transition-start');\n\t}\n}\n\nexport class TransitionCancelEvent extends Event {\n\tconstructor() {\n\t\tsuper('transition-cancel');\n\t}\n}\n\nexport class TransitionEndEvent extends Event {\n\tconstructor() {\n\t\tsuper('transition-end');\n\t}\n}\n\nexport class MotionProgressStartEvent extends Event {\n\tconstructor() {\n\t\tsuper('motion-progress-start');\n\t}\n}\n\nexport class MotionProgressEvent extends Event {\n\treadonly progress: number;\n\n\tconstructor(progress: number) {\n\t\tsuper('motion-progress');\n\t\tthis.progress = progress;\n\t}\n}\n\nexport class MotionProgressEndEvent extends Event {\n\tconstructor() {\n\t\tsuper('motion-progress-end');\n\t}\n}\n\nexport class LoadEvent extends Event implements Omit<NavigateEvent, 'navigationType' | 'commit'> {\n\t#navigationType = \"load\" as const;\n\t#userInitiated: boolean = false;\n\t#canIntercept: boolean = true;\n\t#hashChange: boolean = false;\n\t#formData: FormData | null = null;\n\t#downloadRequest: string | null = null;\n\t#destination: NavigationDestination;\n\t#signal: AbortSignal;\n\t#abortable = new AbortController();\n\t#intercepted = false;\n\t#thenables: Promise<void>[] = [];\n\t#transition: LoadNavigationTransition | null = null;\n\treadonly hasUAVisualTransition = false;\n\n\tconstructor() {\n\t\tsuper('navigate', { cancelable: false, bubbles: false, composed: false });\n\t\tconst currentEntry = window.navigation.currentEntry;\n\t\tif (!currentEntry) throw new Error(\"Current entry is null\");\n\t\tthis.#destination = {\n\t\t\tgetState() {\n\t\t\t\treturn currentEntry.getState();\n\t\t\t},\n\t\t\turl: currentEntry.url ?? new URL(window.location.href).href,\n\t\t\tkey: currentEntry.key,\n\t\t\tindex: currentEntry.index,\n\t\t\tid: currentEntry.id,\n\t\t\tsameDocument: true\n\t\t};\n\n\t\tthis.#signal = this.#abortable.signal;\n\t\twindow.navigation.addEventListener('navigate', this.#onNavigate, { signal: this.#signal });\n\t}\n\n\t#onNavigate = (e: Event) => {\n\t\tif (e !== this) {\n\t\t\tthis.#abortable.abort();\n\t\t} else if (!this.#thenables.length) {\n\t\t\twindow.navigation.removeEventListener('navigate', this.#onNavigate);\n\t\t}\n\t}\n\n\tintercept(options?: NavigationInterceptOptions | undefined): void {\n\t\tif (this.#intercepted) throw new DOMException(\"Failed to execute 'intercept' on 'NavigateEvent': intercept() may only be called while the navigate event is being dispatched.\");\n\t\tlet finish: Function | null = null;\n\t\tif (!this.#transition) {\n\t\t\tthis.#transition = {\n\t\t\t\tfinished: new Promise((resolve) => finish = resolve),\n\t\t\t\tfrom: window.navigation.currentEntry!,\n\t\t\t\tnavigationType: \"load\" as const\n\t\t\t};\n\t\t}\n\t\tconst thenable = options?.handler?.();\n\t\tif (thenable) this.#thenables.push(thenable);\n\t\tif (this.#thenables.length === 1) {\n\t\t\tPromiseAllDynamic(this.#thenables).then(() => {\n\t\t\t\tthis.#intercepted = true;\n\t\t\t\twindow.removeEventListener('navigate', this.#onNavigate);\n\t\t\t\tfinish?.();\n\t\t\t});\n\t\t}\n\t}\n\n\tscroll(): void {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tget transition() {\n\t\treturn this.#transition;\n\t}\n\n\tget navigationType() {\n\t\treturn this.#navigationType;\n\t}\n\n\tget userInitiated() {\n\t\treturn this.#userInitiated;\n\t}\n\n\tget canIntercept() {\n\t\treturn this.#canIntercept;\n\t}\n\n\tget hashChange() {\n\t\treturn this.#hashChange;\n\t}\n\n\tget formData() {\n\t\treturn this.#formData;\n\t}\n\n\tget downloadRequest() {\n\t\treturn this.#downloadRequest;\n\t}\n\n\tget destination() {\n\t\treturn this.#destination;\n\t}\n\n\tget signal() {\n\t\treturn this.#signal;\n\t}\n}","import { createContext } from \"react\";\nimport { ScreenTransitionLayer } from \"./ScreenTransitionLayer\";\n\nexport const ScreenTransitionLayerContext = createContext<ScreenTransitionLayer>(null!);\n","import { ScreenTransitionLayerContext } from './ScreenTransitionLayerContext';\nimport { AnimationEffectFactory } from './common/types';\nimport { NavigationBase } from './NavigationBase';\nimport { Component, ElementType, createRef } from 'react';\n\ninterface ScreenTransitionProviderProps {\n id: string;\n animation?: AnimationEffectFactory;\n children: React.ReactNode\n navigation: NavigationBase;\n renderAs: ElementType;\n focused: boolean;\n}\n\ninterface ScreenTransitionProviderState {\n zIndex: React.CSSProperties[\"zIndex\"];\n}\n\nexport class ScreenTransitionProvider extends Component<ScreenTransitionProviderProps, ScreenTransitionProviderState> {\n public readonly ref = createRef<HTMLElement>();\n static readonly contextType = ScreenTransitionLayerContext;\n declare context: React.ContextType<typeof ScreenTransitionLayerContext>;\n public index = 0;\n public exiting = false;\n\n state: ScreenTransitionProviderState = {\n zIndex: 'unset',\n }\n\n private onAnimationEnd = () => {\n if (this.ref.current) {\n this.ref.current.style.willChange = 'auto';\n this.ref.current.style.pointerEvents = 'auto';\n }\n }\n\n private onAnimationStart = () => {\n if (this.ref.current) {\n this.ref.current.style.willChange = 'transform, opacity';\n this.ref.current.style.pointerEvents = 'none';\n }\n }\n\n componentDidMount() {\n this.props.navigation.addEventListener('transition-start', this.onAnimationStart);\n this.props.navigation.addEventListener('transition-end', this.onAnimationEnd);\n this.props.navigation.addEventListener('transition-cancel', this.onAnimationEnd);\n }\n\n componentWillUnmount() {\n this.props.navigation.removeEventListener('transition-start', this.onAnimationStart);\n this.props.navigation.removeEventListener('transition-end', this.onAnimationEnd);\n this.props.navigation.removeEventListener('transition-cancel', this.onAnimationEnd);\n }\n\n get animationEffect() {\n const animationEffectFactory = this.props.animation;\n const { animation, direction, hasUAVisualTransition } = this.context;\n const { timeline, playbackRate } = animation;\n const { index, exiting, ref } = this;\n\n return animationEffectFactory?.({\n ref: ref.current,\n index,\n exiting,\n timeline,\n direction,\n playbackRate,\n hasUAVisualTransition\n }) ?? null;\n }\n\n setZIndex(zIndex: React.CSSProperties[\"zIndex\"]) {\n return new Promise<void>(resolve => this.setState({ zIndex }, resolve));\n }\n\n render() {\n const Element = this.props.renderAs;\n const inert = !this.props.focused ? '' : undefined;\n return (\n <Element\n id={this.props.id}\n className=\"screen-transition-provider\"\n ref={this.ref}\n {...{ inert }}\n style={{\n gridArea: '1 / 1',\n width: '100%',\n height: '100%',\n transformOrigin: 'center center',\n zIndex: this.state.zIndex\n }}\n >\n {this.props.children}\n </Element>\n );\n }\n}","import { createContext } from 'react';\nimport { ScreenBase } from './ScreenBase';\nimport { RouterBase } from './RouterBase';\n\nexport const NestedRouterContext = createContext<{parentRouter: RouterBase, parentScreen: ScreenBase} | null>(null);\nexport const RouterContext = createContext<RouterBase>(null!);","import { createContext } from \"react\";\nimport { RoutePropBase } from \"./common/types\";\n\nexport const RoutePropContext = createContext<RoutePropBase>(null!);","import { SharedElement } from \"./SharedElement\";\n\nexport class SharedElementScene {\n\tpublic readonly id: string;\n\tpublic readonly nodes = new Map<string, SharedElement>();\n\tpublic getScreenRect: () => DOMRect = () => new DOMRect();\n\tpublic keepAlive: boolean = false;\n\tpublic previousScene: SharedElementScene | null = null;\n\tpublic canTransition: boolean = true; // should be false if page animation already started\n\n\tconstructor(id: string) {\n\t\tthis.id = id;\n\t}\n\n\taddNode(node: SharedElement | null) {\n\t\tif (!node) return;\n\t\tconsole.assert(!this.nodes.has(node.id), `Duplicate Shared Element ID: ${node.id} in ${this.id}`);\n\t\tthis.nodes.set(node.id, node);\n\t}\n\n\tremoveNode(_id: string) {\n\t\tthis.nodes.delete(_id);\n\t}\n\n\tget xRatio() {\n\t\tconst screenRect = this.getScreenRect();\n\t\tconst xRatio = (screenRect.width / window.innerWidth).toFixed(2);\n\t\treturn parseFloat(xRatio);\n\t}\n\n\tget yRatio() {\n\t\tconst screenRect = this.getScreenRect();\n\t\tconst yRatio = (screenRect.height / window.innerHeight).toFixed(2);\n\t\treturn parseFloat(yRatio);\n\t}\n\n\tget x() {\n\t\treturn this.getScreenRect().x;\n\t}\n\n\tget y() {\n\t\treturn this.getScreenRect().y;\n\t}\n\n\tisEmpty() {\n\t\treturn !Boolean(this.nodes.size);\n\t}\n}","import { Component, ElementType, Suspense, cloneElement, createRef, isValidElement } from \"react\";\nimport { ScreenTransitionProvider } from \"./ScreenTransitionProvider\";\nimport {\n AnimationEffectFactory,\n LazyExoticComponent,\n PlainObject,\n RoutePropBase,\n isLazyExoticComponent,\n isNativeLazyExoticComponent,\n} from \"./common/types\";\nimport { NestedRouterContext, RouterContext } from \"./RouterContext\";\nimport { RoutePropContext } from \"./RoutePropContext\";\nimport { NavigationBase } from \"./NavigationBase\";\nimport { SharedElementSceneContext } from \"./SharedElementSceneContext\";\nimport { SharedElementScene } from \"./SharedElementScene\";\n\nexport interface ScreenBaseComponentProps<\n R extends RoutePropBase = RoutePropBase,\n N extends NavigationBase = NavigationBase\n> {\n route: R;\n navigation: N;\n}\n\nexport interface LifecycleProps<R extends RoutePropBase, N extends NavigationBase = NavigationBase> extends ScreenBaseComponentProps<R, N> {\n signal: AbortSignal;\n}\n\nexport interface ScreenBaseConfig<R extends RoutePropBase = RoutePropBase, N extends NavigationBase = NavigationBase> {\n header?: {\n fallback?: React.ReactNode;\n component: React.JSXElementConstructor<any> | LazyExoticComponent<any>\n };\n footer?: {\n fallback?: React.ReactNode;\n component: React.JSXElementConstructor<any> | LazyExoticComponent<any>\n };\n animation?: AnimationEffectFactory;\n onEnter?: (props: LifecycleProps<R, N>) => void | Promise<void>;\n onExit?: (props: LifecycleProps<R, N>) => void | Promise<void>;\n onEntered?: (props: LifecycleProps<R, N>) => void | Promise<void>;\n onExited?: (props: LifecycleProps<R, N>) => void | Promise<void>;\n onLoad?: (props: LifecycleProps<R, N>) => void | Promise<void>;\n}\n\nexport interface ScreenBaseProps {\n path: string;\n component: React.JSXElementConstructor<any> | LazyExoticComponent<any>;\n fallback?: React.ReactNode;\n name?: string;\n defaultParams?: PlainObject;\n caseSensitive?: boolean;\n config?: ScreenBaseConfig;\n}\n\nexport interface ScreenBaseState<C extends ScreenBaseProps[\"config\"] = ScreenBaseProps[\"config\"], P extends PlainObject = PlainObject> {\n focused: boolean;\n config: C;\n params: P;\n elementType: ElementType;\n}\n\nexport abstract class ScreenBase<\n P extends ScreenBaseProps = ScreenBaseProps,\n S extends ScreenBaseState<P[\"config\"]> = ScreenBaseState<P[\"config\"]>,\n R extends RoutePropBase<P[\"config\"]> = RoutePropBase<P[\"config\"]>\n> extends Component<P, S> {\n public readonly sharedElementScene: SharedElementScene;\n #transitionProvider = createRef<ScreenTransitionProvider>();\n protected readonly ref = createRef<HTMLDivElement>();\n protected readonly nestedRouterData;\n static readonly contextType = RouterContext;\n declare context: React.ContextType<typeof RouterContext>;\n\n state: S = {\n focused: false,\n config: {},\n params: {},\n elementType: 'div'\n } as S;\n\n constructor(props: P, context: React.ContextType<typeof RouterContext>) {\n super(props);\n\n this.sharedElementScene = new SharedElementScene(`${this.name}-shared-element-scene`);\n this.sharedElementScene.getScreenRect = () => this.ref.current?.getBoundingClientRect() || new DOMRect();\n this.nestedRouterData = { parentScreen: this as ScreenBase, parentRouter: context };\n }\n\n protected setParams(newParams: PlainObject) {\n this.setState(({ params }) => ({ params: { ...params, ...newParams } }));\n }\n\n protected setConfig(newConfig: R['config']) {\n this.setState(({ config }) => ({ config: { ...config, ...newConfig } }));\n }\n\n get focused() {\n return this.state.focused;\n }\n\n get name() {\n if (this.props.name)\n return this.props.name\n .toLowerCase()\n .replace(/[^\\w-]/g, '-') // Remove non-alphanumeric chars\n .replace(/-+/g, '-') // Replace multiple hyphens with a single one\n .replace(/^-|-$/g, ''); // Remove leading and trailing hyphens;\n else if (isLazyExoticComponent(this.props.component))\n return this.props.component.module?.default.name.toLowerCase();\n return this.props.component.name.toLowerCase();\n }\n\n blur() {\n return new Promise<void>(resolve => this.setState({ focused: false }, resolve));\n }\n\n focus() {\n return new Promise<void>(resolve => this.setState({ focused: true }, resolve));\n }\n\n async load(signal: AbortSignal) {\n let Component = this.props.component;\n let result;\n if ('load' in Component) {\n result = await Component.load();\n } else {\n result = { default: Component };\n }\n\n const navigation = this.context.navigation;\n const route = this.routeProp;\n await this.props.config?.onLoad?.({ navigation, route, signal });\n\n return result;\n }\n\n protected abstract get routeProp(): R;\n abstract get config(): R[\"config\"];\n abstract get params(): R[\"params\"];\n abstract get resolvedPathname(): string;\n abstract get id(): string;\n\n async onExited(signal: AbortSignal): Promise<void> {\n await this.routeProp.config.onExited?.({\n route: this.routeProp,\n navigation: this.context.navigation,\n signal\n });\n }\n\n async onExit(signal: AbortSignal): Promise<void> {\n await this.routeProp.config.onExit?.({\n route: this.routeProp,\n navigation: this.context.navigation,\n signal\n });\n }\n\n async onEnter(signal: AbortSignal): Promise<void> {\n await this.routeProp.config.onEnter?.({\n route: this.routeProp,\n navigation: this.context.navigation,\n signal\n });\n }\n\n async onEntered(signal: AbortSignal): Promise<void> {\n await this.routeProp.config.onEntered?.({\n route: this.routeProp,\n navigation: this.context.navigation,\n signal\n });\n }\n\n get path() {\n return this.props.path;\n }\n\n get transitionProvider() {\n return this.#transitionProvider;\n }\n\n render() {\n const navigation = this.context.navigation;\n const routeProp = this.routeProp;\n const Component = this.props.component;\n const HeaderComponent = routeProp.config.header?.component;\n const FooterComponent = routeProp.config.footer?.component;\n\n return (\n <ScreenTransitionProvider\n ref={this.#transitionProvider}\n renderAs={this.state.elementType}\n id={`${this.context.id}-${this.name}-transition-provider`}\n animation={routeProp.config.animation}\n navigation={navigation}\n focused={this.state.focused}\n >\n <div\n id={`${this.context.id}-${this.name}`}\n ref={this.ref}\n className=\"screen\"\n style={{\n height: '100%',\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n pointerEvents: 'inherit'\n }}\n >\n <SharedElementSceneContext.Provider value={this.sharedElementScene}>\n <RoutePropContext.Provider value={routeProp}>\n <NestedRouterContext.Provider value={this.nestedRouterData}>\n <Suspense fallback={<ComponentWithRouteProps component={routeProp.config.header?.fallback} route={routeProp} navigation={navigation} />}>\n <ComponentWithRouteProps component={HeaderComponent} route={routeProp} navigation={navigation} />\n </Suspense>\n <Suspense fallback={<ComponentWithRouteProps component={this.props.fallback} route={routeProp} navigation={navigation} />}>\n <ComponentWithRouteProps component={Component} route={routeProp} navigation={navigation} />\n </Suspense>\n <Suspense fallback={<ComponentWithRouteProps component={routeProp.config.footer?.fallback} route={routeProp} navigation={navigation} />}>\n <ComponentWithRouteProps component={FooterComponent} route={routeProp} navigation={navigation} />\n </Suspense>\n </NestedRouterContext.Provider>\n </RoutePropContext.Provider>\n </SharedElementSceneContext.Provider>\n </div>\n </ScreenTransitionProvider>\n );\n }\n}\n\ninterface ComponentWithRoutePropsProps extends ScreenBaseComponentProps<RoutePropBase, NavigationBase> {\n component: React.JSXElementConstructor<any> | LazyExoticComponent<any> | React.ReactNode;\n}\nfunction ComponentWithRouteProps({ component, route, navigation }: ComponentWithRoutePropsProps) {\n if (isLazyExoticComponent(component) && component.module?.default) {\n component = component.module.default;\n }\n const Component = component ?? null;\n if (typeof Component === \"function\" || isNativeLazyExoticComponent(Component)) {\n return (\n <Component\n navigation={navigation}\n route={route}\n />\n );\n } else if (isValidElement(Component)) {\n return cloneElement<any>(Component, {\n navigation,\n route\n });\n }\n return <>{Component}</>;\n}","import { isValidElement } from 'react';\nimport { ScreenBase, ScreenBaseProps } from '../ScreenBase';\nimport {\n MotionProgressEndEvent,\n MotionProgressEvent,\n MotionProgressStartEvent,\n TransitionCancelEvent,\n TransitionEndEvent,\n TransitionStartEvent\n} from './events';\nimport { SharedElement } from '../SharedElement';\nimport { StandardPropertiesHyphen } from 'csstype';\n\nexport type ScreenChild<E extends ScreenBase = ScreenBase> = E extends ScreenBase<infer P> ? React.CElement<P, E> : never;\n\nexport interface AnimationEffectFactoryProps<R extends HTMLElement = HTMLElement> {\n ref: R | null;\n index: number;\n exiting: boolean;\n timeline: AnimationTimeline | null;\n playbackRate: number;\n direction: PlaybackDirection;\n hasUAVisualTransition: boolean;\n}\n\nexport type AnimationEffectFactory<R extends HTMLElement = HTMLElement> = (props: AnimationEffectFactoryProps<R>) => AnimationEffect;\n\nexport type MetaTypeKey = 'http-equiv' | 'name' | 'itemprop' | 'property' | 'charset';\nexport type MetaType = [MetaTypeKey, string];\nexport type MetaKey = `${MetaTypeKey}=${string}`;\n\nexport interface LazyExoticComponent<T extends React.ComponentType<any>> extends React.LazyExoticComponent<T> {\n load: () => Promise<{ default: T }>;\n module?: { default: T };\n}\n\nexport type ScreenState<P extends ScreenBaseProps = ScreenBaseProps> = Map<string, Pick<RoutePropBase<P[\"config\"], PlainObject>, \"config\" | \"params\">>;\n\nexport interface RoutePropBase<C extends ScreenBaseProps[\"config\"] = {}, P extends PlainObject = PlainObject> {\n path: string;\n resolvedPathname?: string;\n config: NonNullable<C>;\n focused: boolean;\n params: P;\n setParams(params: Partial<P>): void;\n setConfig(config: Partial<NonNullable<C>>): void;\n}\n\nexport function isValidScreenChild<S extends ScreenBase>(value: any): value is ScreenChild<S> {\n if (!isValidElement(value)) return false;\n return Object.getPrototypeOf(value.type) === ScreenBase;\n}\n\nexport type PlainObject<T = any> = { [key: string]: T };\n\nexport interface RouterBaseEventMap extends HTMLElementEventMap {\n \"transition-start\": TransitionStartEvent;\n \"transition-cancel\": TransitionCancelEvent;\n \"transition-end\": TransitionEndEvent;\n \"motion-progress-start\": MotionProgressStartEvent;\n \"motion-progress\": MotionProgressEvent;\n \"motion-progress-end\": MotionProgressEndEvent;\n}\n\nexport type RouterHTMLElement<E extends RouterBaseEventMap, T extends HTMLElement = HTMLDivElement> = T & {\n addEventListener<K extends keyof E>(type: K, listener: (this: T, ev: E[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener<K extends keyof E>(type: K, listener: (this: T, ev: E[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\nexport type CustomElementType = `${string}-${string}`;\n\nexport interface MatchedRoute {\n params?: PlainObject<string | undefined>;\n}\n\nexport interface PathPattern {\n pattern: string;\n caseSensitive: boolean;\n}\n\nexport type AnimationDirection = \"normal\" | \"reverse\";\n\nenum SharedElementTransitionTypeEnum {\n \"morph\",\n \"fade-through\",\n \"fade\",\n \"cross-fade\"\n}\n\nexport type SharedElementTransitionType = keyof typeof SharedElementTransitionTypeEnum;\n\nexport interface SharedElementNode {\n id: string;\n instance: SharedElement;\n}\n\nexport type SharedElementNodeMap = Map<string, SharedElementNode>;\n\nexport type StyleKeyList = (keyof StandardPropertiesHyphen | string)[];\n\nexport function isNativeLazyExoticComponent(value: any): value is React.LazyExoticComponent<any> {\n return typeof value === \"object\"\n && value !== null\n && value.$$typeof === Symbol.for('react.lazy');\n}\n\nexport function isLazyExoticComponent(value: any): value is LazyExoticComponent<any> {\n return isNativeLazyExoticComponent(value) && 'load' in value;\n}\n\nexport type StylableElement = Element & { style: CSSStyleDeclaration };\n\nexport function isStylableElement(element: any): element is StylableElement {\n return 'style' in element && element.style instanceof CSSStyleDeclaration;\n}\n\nexport interface LoadNavigationTransition extends Omit<NavigationTransition, \"navigationType\"> {\n navigationType: \"load\";\n}\n\ndeclare global {\n interface NavigateEvent extends Event {\n commit?(): void; // not in spec yet, see https://github.com/WICG/navigation-api/issues/66\n }\n}\n\nexport type ElementPropType<C> = C extends React.CElement<infer P, infer T> ? P & React.ClassAttributes<T> : never;\nexport type ClonedElementType<C, IP extends Partial<ElementPropType<C>>> = C extends React.CElement<infer P, infer T> ? React.CElement<P & Partial<IP>, T & React.Component<P & IP>> : never;","var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }\nvar y = x => () => x\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"Animation\"]: () => __WEBPACK_EXTERNAL_MODULE_web_animations_extension_74b2916c__.Animation, [\"ParallelEffect\"]: () => __WEBPACK_EXTERNAL_MODULE_web_animations_extension_74b2916c__.ParallelEffect });","import { StylableElement, StyleKeyList, isStylableElement } from './common/types';\nimport { Component, RefObject, createRef } from 'react';\nimport { NavigationBase } from './NavigationBase';\nimport { ScreenBase } from './ScreenBase';\nimport { ParallelEffect } from 'web-animations-extension';\nimport { SharedElement } from './SharedElement';\nimport { toCamelCase } from './common/utils';\n\ninterface SharedElementTransitionLayerProps {\n navigation: NavigationBase;\n direction: \"forwards\" | \"backwards\";\n}\n\ninterface SharedElementTransitionLayerState { }\n\nexport class SharedElementTransitionLayer extends Component<SharedElementTransitionLayerProps, SharedElementTransitionLayerState> {\n public readonly ref = createRef<HTMLDialogElement>();\n #outgoingScreen: RefObject<ScreenBase> | null = null;\n #incomingScreen: RefObject<ScreenBase> | null = null;\n\n state: SharedElementTransitionLayerState = {\n transitioning: false\n }\n\n set outgoingScreen(outgoingScreen: RefObject<ScreenBase> | null) {\n this.#outgoingScreen = outgoingScreen;\n }\n\n set incomingScreen(incomingScreen: RefObject<ScreenBase> | null) {\n this.#incomingScreen = incomingScreen;\n }\n\n get outgoingScreen() {\n return this.#outgoingScreen;\n }\n\n get incomingScreen() {\n return this.#incomingScreen;\n }\n\n getKeyframeProperties(element: Element, styleList: StyleKeyList) {\n const computedStyles: Record<string, string> = {};\n const computedStyle = window.getComputedStyle(element);\n for (const key of styleList) {\n let transformedKey;\n if (key === \"offset\")\n transformedKey = \"cssOffset\";\n else if (key === \"float\")\n transformedKey = \"cssFloat\";\n else\n transformedKey = toCamelCase(key);\n computedStyles[transformedKey] = computedStyle.getPropertyValue(key);\n }\n return computedStyles;\n }\n\n copyStyles(srcElement: Element | null | undefined, cloneElement: StylableElement, styleList: StyleKeyList) {\n if (!isStylableElement(srcElement)) return;\n const computedStyles = window.getComputedStyle(srcElement);\n for (const key of styleList) {\n const value = computedStyles.getPropertyValue(key);\n const priority = computedStyles.getPropertyPriority(key);\n cloneElement.style.setProperty(key, value, priority);\n }\n }\n\n getAnimationEffect<T extends { instance: SharedElement, clone: HTMLElement, rect: DOMRect }>(start: T, end: T) {\n const keyframeEffects = new Array<KeyframeEffect>();\n const config: KeyframeEffectOptions = {\n fill: \"both\" as const,\n duration: \"auto\",\n easing: \"ease\",\n };\n const transitionType = end.instance.transitionType;\n const startTransform = `translate(${start.rect.x}px, ${start.rect.y}px)`;\n const endTransform = `translate(${end.rect.x}px, ${end.rect.y}px)`;\n switch (transitionType) {\n case \"fade\":\n keyframeEffects.push(\n new KeyframeEffect(\n start.clone,\n [\n { transform: startTransform, opacity: 1 },\n { transform: endTransform, opacity: 0 }\n ],\n config\n ),\n );\n keyframeEffects.push(\n new KeyframeEffect(\n end.clone,\n [\n { transform: startTransform },\n { transform: endTransform }\n ],\n config\n ),\n\n );\n break;\n case \"fade-through\":\n keyframeEffects.push(\n new KeyframeEffect(\n start.clone,\n [\n { transform: startTransform, opacity: 1 },\n { opacity: 0, offset: 0.5 },\n { transform: endTransform, opacity: 0 }\n ],\n config\n ),\n\n );\n keyframeEffects.push(\n new KeyframeEffect(\n end.clone,\n [\n { transform: startTransform, opacity: 0 },\n { opacity: 0, offset: 0.5 },\n { transform: endTransform, opacity: 1 }\n ],\n config\n ),\n\n );\n break;\n case \"cross-fade\":\n end.clone.style.mixBlendMode = \"plus-lighter\";\n keyframeEffects.push(\n new KeyframeEffect(\n start.clone,\n [\n { transform: startTransform, opacity: 1 },\n { transform: endTransform, opacity: 0 }\n ],\n config\n ),\n\n );\n keyframeEffects.push(\n new KeyframeEffect(\n end.clone,\n [\n { transform: startTransform },\n { transform: endTransform }\n ],\n config\n ),\n\n );\n break;\n case \"morph\": {\n const styleList = Array.from(new Set([...start.instance.styles, ...end.instance.styles]));\n keyframeEffects.push(\n new KeyframeEffect(\n end.clone,\n [\n {\n ...Object.fromEntries((start.instance.ref.current?.firstElementChild as HTMLElement).attributeStyleMap),\n transform: startTransform,\n width: `${start.rect.width}px`,\n height: `${start.rect.height}px`,\n },\n {\n ...Object.fromEntries((end.instance.ref.current?.firstElementChild as HTMLElement).attributeStyleMap),\n ...this.getKeyframeProperties(end.instance.ref.current?.firstElementChild as HTMLElement, styleList),\n transform: endTransform,\n width: `${end.rect.width}px`,\n height: `${end.rect.height}px`,\n }\n ],\n config\n )\n );\n break;\n }\n }\n return new ParallelEffect(keyframeEffects);\n }\n\n get animationEffect() {\n const currentScene = this.outgoingScreen?.current?.sharedElementScene;\n const nextScene = this.incomingScreen?.current?.sharedElementScene;\n if (!currentScene || !nextScene) return null;\n if (currentScene === nextScene) return null;\n currentScene.previousScene = null;\n nextScene.previousScene = currentScene;\n const parallelEffects = new Array<ParallelEffect>();\n for (const [id, end] of Array.from(nextScene.nodes.entries())) {\n const endRect = end.getBoundingClientRect();\n const start = currentScene.nodes.get(id);\n if (!start?.canTransition || !end.canTransition) continue;\n const startRect = start.getBoundingClientRect();\n const endClone = end.clone();\n const startClone = start.clone();\n if (!startClone || !endClone) continue;\n const styleList = Array.from(new Set([...start.styles, ...end.styles]));\n if (end.transitionType !== \"morph\") {\n startClone.id = `${id}-start`;\n startClone.style.position = \"absolute\";\n startClone.style.gridArea = \"1 / 1\";\n startClone.style.margin = \"0\";\n this.copyStyles(start.ref.current?.firstElementChild, startClone, styleList);\n this.copyStyles(end.ref.current?.firstElementChild, endClone, styleList);\n startClone.style.width = `${startRect.width}px`;\n startClone.style.height = `${startRect.height}px`;\n endClone.style.width = `${endRect.width}px`;\n endClone.style.height = `${endRect.height}px`;\n this.ref.current?.prepend(startClone);\n } else {\n this.copyStyles(start.ref.current?.firstElementChild, endClone, styleList);\n endClone.style.width = `${startRect.width}px`;\n endClone.style.height = `${startRect.height}px`;\n }\n\n endClone.id = `${id}${end.transitionType === \"morph\" ? '' : '-end'}`;\n endClone.style.position = \"absolute\";\n endClone.style.gridArea = \"1 / 1\";\n endClone.style.margin = \"0\";\n this.ref.current?.prepend(endClone);\n start.hide();\n end.hide();\n const onFinish = async () => {\n if (this.props.direction === \"forwards\")\n end.unhide();\n else\n start.unhide();\n endClone.remove();\n startClone.remove();\n };\n this.props.navigation.addEventListener('transition-end', onFinish, { once: true });\n this.props.navigation.addEventListener('transition-cancel', onFinish, { once: true });\n\n parallelEffects.push(this.getAnimationEffect(\n { instance: start, clone: startClone, rect: startRect },\n { instance: end, clone: endClone, rect: endRect }\n ));\n }\n\n return new ParallelEffect(parallelEffects);\n }\n\n render() {\n return (\n <dialog className=\"shared-element-layer\" ref={this.ref} style={{\n maxWidth: 'unset',\n maxHeight: 'unset',\n width: '100vw',\n height: '100vh',\n contain: 'strict',\n padding: 0,\n border: 'none',\n backgroundColor: 'transparent',\n isolation: 'isolate',\n }}>\n <style>\n {`\n .shared-element-layer::backdrop {display: none}\n .shared-element-layer[open] {display:grid}\n `}\n </style>\n </dialog>\n );\n }\n}","import { createContext } from \"react\";\n\nexport const MotionContext = createContext(0);","import { Component, RefObject, createRef } from 'react';\nimport { MotionProgressEvent, TransitionCancelEvent, TransitionEndEvent, TransitionStartEvent } from './common/events';\nimport { SharedElementTransitionLayer } from './SharedElementTransitionLayer';\nimport { ParallelEffect, Animation } from 'web-animations-extension';\nimport { ScreenTransitionLayerContext } from './ScreenTransitionLayerContext';\nimport { ScreenChild } from './common/types';\nimport { NavigationBase } from './NavigationBase';\nimport { ScreenBase } from './ScreenBase';\nimport { MotionContext } from './MotionContext';\n\ninterface ScreenTransitionLayerProps {\n children: ScreenChild | ScreenChild[];\n navigation: NavigationBase;\n hasUAVisualTransition: boolean;\n}\n\ninterface ScreenTransitionLayerState {\n gestureNavigating: boolean;\n progress: number;\n}\n\nexport class ScreenTransitionLayer extends Component<ScreenTransitionLayerProps, ScreenTransitionLayerState> {\n public readonly sharedElementTransitionLayer = createRef<SharedElementTransitionLayer>();\n public readonly animation: Animation = new Animation();\n #direction: PlaybackDirection = \"normal\";\n #screens: RefObject<ScreenBase>[] = new Array();\n\n state: ScreenTransitionLayerState = {\n gestureNavigating: false,\n progress: 1\n }\n\n private onAnimationFrame() {\n const progress = this.animation.effect?.getComputedTiming().progress;\n\n if (progress)\n this.onProgress(progress);\n\n if (this.animation.playState === \"running\")\n requestAnimationFrame(this.onAnimationFrame.bind(this));\n }\n\n private onTransitionCancel() {\n this.props.navigation.dispatchEvent(new TransitionCancelEvent());\n }\n\n private onTransitionStart() {\n this.props.navigation.dispatchEvent(new TransitionStartEvent());\n\n this.onAnimationFrame();\n }\n\n private onTransitionEnd() {\n this.props.navigation.dispatchEvent(new TransitionEndEvent());\n }\n\n private onProgress(progress: number) {\n this.setState({ progress });\n this.props.navigation.dispatchEvent(new MotionProgressEvent(progress));\n }\n\n get screens() {\n return this.#screens;\n }\n\n set screens(screens: RefObject<ScreenBase>[]) {\n this.#screens = screens;\n }\n\n set direction(direction: PlaybackDirection) {\n this.#direction = direction;\n this.animation.effect?.updateTiming({ direction });\n }\n\n get direction() {\n return this.#direction;\n }\n\n get hasUAVisualTransition() {\n return this.props.hasUAVisualTransition;\n }\n\n public transition() {\n const effect = new ParallelEffect(\n this.screens.map(screen => {\n return screen.current?.transitionProvider?.current?.animationEffect ?? null;\n }).filter((effect): effect is AnimationEffect => effect !== null)\n );\n\n const sharedElementEffect = this.sharedElementTransitionLayer.current?.animationEffect;\n const duration = effect.getComputedTiming().duration;\n if (sharedElementEffect) {\n sharedElementEffect.updateTiming({\n duration: duration instanceof CSSNumericValue ? duration.to('ms').value : duration\n });\n effect.append(sharedElementEffect);\n this.sharedElementTransitionLayer.current?.ref.current?.showModal();\n }\n\n this.animation.effect = effect;\n\n this.animation.play();\n this.onTransitionStart();\n\n this.animation.oncancel = () => {\n this.sharedElementTransitionLayer.current?.ref.current?.close();\n this.onTransitionCancel();\n this.animation.effect = null;\n }\n this.animation.finished.then(() => {\n this.animation.commitStyles();\n this.onTransitionEnd();\n this.sharedElementTransitionLayer.current?.ref.current?.close();\n this.animation.effect = null;\n });\n\n return this.animation;\n }\n\n render() {\n return (\n <ScreenTransitionLayerContext.Provider value={this}>\n <SharedElementTransitionLayer\n ref={this.sharedElementTransitionLayer}\n navigation={this.props.navigation}\n direction={this.animation.playbackRate > 0 ? \"forwards\" : \"backwards\"}\n />\n <div\n className=\"screen-transition-layer\"\n style={{\n width: '100%',\n height: '100%',\n display: 'grid',\n contain: 'layout',\n isolation: 'isolate',\n '--motion-progress': this.state.progress\n } as React.CSSProperties}\n >\n <MotionContext.Provider value={this.state.progress}>\n {this.props.children}\n </MotionContext.Provider>\n </div>\n </ScreenTransitionLayerContext.Provider>\n );\n }\n}","import { NavigationBase } from './NavigationBase';\nimport { ScreenTransitionLayer } from './ScreenTransitionLayer';\nimport {\n ScreenChild,\n RouterBaseEventMap,\n RouterHTMLElement,\n} from './common/types';\nimport { NestedRouterContext, RouterContext } from './RouterContext';\nimport { dispatchEvent, matchRoute, resolveBaseURLFromPattern } from './common/utils';\nimport { Component, createRef, isValidElement, Children } from 'react';\nimport { ScreenBase, ScreenBaseConfig } from './ScreenBase';\nimport { LoadEvent } from './common/events';\n\nexport interface RouterBaseConfig {\n screenConfig?: ScreenBaseConfig;\n basePath?: string;\n}\n\nexport interface RouterBaseProps<S extends ScreenBase = ScreenBase> {\n id?: string;\n config?: RouterBaseConfig;\n children: ScreenChild<S> | ScreenChild<S>[];\n}\n\nexport interface RouterBaseState {}\n\nexport abstract class RouterBase<P extends RouterBaseProps = RouterBaseProps, S extends RouterBaseState = RouterBaseState, E extends RouterBaseEventMap = RouterBaseEventMap> extends Component<P, S> {\n protected readonly ref = createRef<RouterHTMLElement<E>>();\n protected screenTransitionLayer = createRef<ScreenTransitionLayer>();\n public abstract readonly navigation: NavigationBase;\n public readonly parent: RouterBase | null = null;\n #child: WeakRef<RouterBase> | null = null;\n private loadDispatched = false;\n private hasUAVisualTransition = false;\n public readonly parentScreen: ScreenBase | null = null;\n private static rootRouterRef: WeakRef<RouterBase> | null = null;\n static readonly contextType = NestedRouterContext;\n declare context: React.ContextType<typeof NestedRouterContext>;\n\n constructor(props: P, context: React.ContextType<typeof NestedRouterContext>) {\n super(props);\n\n this.parentScreen = context?.parentScreen ?? null;\n this.parent = context?.parentRouter ?? null;\n if (this.parent) {\n this.parent.child = this;\n }\n if (this.isRoot) {\n RouterBase.rootRouterRef = new WeakRef(this);\n }\n }\n\n componentDidMount() {\n if (this.isRoot) {\n window.navigation.addEventListener('navigate', this.handleNavigationDispatch);\n }\n\n if (!this.loadDispatched) {\n window.navigation.dispatchEvent(new LoadEvent());\n this.loadDispatched = true;\n }\n }\n\n componentWillUnmount() {\n if (this.isRoot) {\n window.navigation.removeEventListener('navigate', this.handleNavigationDispatch);\n }\n }\n\n private handleNavigationDispatch = (e: NavigateEvent) => {\n const activeRouters = [...this.#activeRoutersIter()];\n // travel down router tree to find a router that can intercept\n const interceptor = activeRouters.findLast(router => router.canIntercept(e));\n if (interceptor) {\n interceptor.intercept(e);\n this.hasUAVisualTransition = e.hasUAVisualTransition;\n }\n }\n\n *#activeRoutersIter() {\n let router: RouterBase | null = this;\n while (router) {\n yield router;\n router = router.child;\n }\n }\n\n getRouterById(routerId: string, target?: RouterBase): RouterBase | null {\n const router = target ?? RouterBase.rootRouterRef?.deref();\n if (router!.id === routerId) {\n return router ?? null;\n } else if (router?.child) {\n return this.getRouterById(routerId, router!.child);\n } else {\n return null;\n }\n }\n\n dispatchEvent(event: Event) {\n const ref = this.ref.current ?? undefined;\n return dispatchEvent(event, ref);\n }\n\n addEventListener<K extends keyof E>(type: K, listener: (this: RouterHTMLElement<E>, ev: E[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n\taddEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void {\n return this.ref.current?.addEventListener(type, listener, options);\n }\n\n removeEventListener<K extends keyof E>(type: K, listener: (this: RouterHTMLElement<E>, ev: E[K]) => any, options?: boolean | EventListenerOptions | undefined): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions) {\n return this.ref.current?.removeEventListener(type, listener, options);\n }\n\n public preloadRoute(pathname: string) {\n return new Promise<boolean>((resolve, reject) => {\n let found = false;\n const routes = this.props.children;\n Children.forEach<ScreenChild>(routes, (route) => {\n if (found) return; // stop after first\n if (!isValidElement(route)) return;\n const { path, caseSensitive } = route.props;\n const baseURLPattern = this.baseURLPattern.pathname;\n const matchInfo = matchRoute(path, pathname, baseURLPattern, caseSensitive);\n if (!matchInfo) return;\n found = true;\n const config = route.props.config;\n queueMicrotask(async () => {\n const preloadTasks = [];\n if ('load' in route.props.component) {\n preloadTasks.push(route.props.component.load());\n }\n if (config?.header?.component && 'load' in config?.header?.component) {\n preloadTasks.push(config?.header?.component.load());\n }\n if (config?.footer?.component && 'load' in config?.footer?.component) {\n preloadTasks.push(config?.footer?.component.load());\n }\n try {\n await Promise.all(preloadTasks);\n resolve(found);\n } catch (e) {\n reject(e);\n }\n });\n });\n if (!found)\n resolve(false);\n });\n }\n\n get id(): string {\n if (this.props.id) return this.props.id;\n const prefix = this.parent?.id;\n const id = this.parentScreen?.id ?? 'root';\n return [prefix, id].filter(Boolean).join('-');\n }\n\n get isRoot() {\n return !this.parent;\n }\n\n get baseURL() {\n const pathname = this.isRoot ? window.location.pathname : this.parentScreen?.resolvedPathname!;\n const pattern = this.baseURLPattern.pathname;\n\n return resolveBaseURLFromPattern(pattern, pathname)!;\n }\n\n get baseURLPattern() {\n let baseURL = window.location.origin + \"/\";\n let basePath = this.props.config?.basePath;\n if (!basePath) {\n if (this.isRoot) {\n basePath = \"/\";\n } else {\n basePath = \".\";\n }\n }\n\n if (this.parent && this.parentScreen) {\n const { resolvedPathname = window.location.pathname, path } = this.parentScreen;\n const parentBaseURL = this.parent.baseURL?.href;\n const pattern = new URLPattern({ baseURL: parentBaseURL, pathname: path });\n baseURL = resolveBaseURLFromPattern(\n pattern.pathname,\n resolvedPathname\n )!.href;\n }\n\n return new URLPattern({ baseURL, pathname: basePath });\n }\n\n get pathPatterns() {\n return Children.map(this.props.children, (child) => {\n return { pattern: child.props.path, caseSensitive: Boolean(child.props.caseSensitive) };\n });\n }\n\n get mounted() {\n return Boolean(this.ref.current);\n }\n\n get child() {\n return this.#child?.deref() ?? null;\n }\n\n set child(child: RouterBase | null) {\n const currentChildRouter = this.#child?.deref();\n if (\n currentChildRouter\n && child?.id !== currentChildRouter?.id\n && currentChildRouter?.mounted\n ) {\n throw new Error(\"It looks like you have two navigators at the same level. Try simplifying your navigation structure by using a nested router instead.\");\n }\n if (child)\n this.#child = new WeakRef(child);\n else\n this.#child = null;\n }\n\n protected abstract canIntercept(navigateEvent: NavigateEvent): boolean;\n protected abstract shouldIntercept(navigateEvent: NavigateEvent): boolean;\n protected abstract intercept(navigateEvent: NavigateEvent): void;\n protected abstract get screens(): P[\"children\"];\n\n render() {\n if (!this.navigation) return;\n return (\n <div\n id={this.id}\n className=\"react-motion-router\"\n style={{ width: '100%', height: '100%' }}\n ref={this.ref}\n >\n <RouterContext.Provider value={this}>\n <ScreenTransitionLayer\n ref={this.screenTransitionLayer}\n navigation={this.navigation}\n hasUAVisualTransition={this.hasUAVisualTransition}\n >\n {this.screens}\n </ScreenTransitionLayer>\n </RouterContext.Provider>\n </div>\n );\n }\n}","import { MetaKey, MetaType, MetaTypeKey } from \"./common/types\";\n\nexport class MetaData {\n #map = new Map<MetaKey, string | undefined>();\n private mutationObserver: MutationObserver;\n\n constructor() {\n this.mutationObserver = new MutationObserver(this.observeMutations.bind(this));\n const {head} = document;\n this.mutationObserver.observe(head, {\n childList: true\n });\n\n Array.from(head.querySelectorAll('meta')).forEach(node => {\n this.mutationObserver.observe(node, {\n attributes: true\n });\n });\n\n Array.from(head.querySelectorAll('meta')).forEach(this.metaDataFromNode.bind(this));\n }\n\n get(key: string | MetaType) {\n const metaKey = this.getMetaKey(key);\n\n const metaContent = this.#map.get(metaKey);\n if (!metaContent) return undefined;\n\n let content: string | [string, string][];\n if (metaContent.includes(',') && metaContent.includes('=')) {\n content = metaContent.split(/,\\s*/).map(keyVal => keyVal.split('=') as [string, string]);\n } else {\n content = metaContent;\n }\n\n return content;\n }\n\n set(key: string | MetaType, content?: string | [string, string][]) {\n const metaKey = this.getMetaKey(key);\n const metaContent = this.getMetaContent(content);\n\n this.#map.set(metaKey, metaContent);\n this.updateMetaElement(metaKey, metaContent);\n }\n\n has(key: string | MetaType) {\n const metaKey = this.getMetaKey(key);\n\n return this.#map.has(metaKey);\n }\n\n delete(key: string | MetaType) {\n const metaKey = this.getMetaKey(key);\n\n this.#map.delete(metaKey);\n document.head.querySelector(`meta[${metaKey}]`)?.remove();\n }\n\n clear() {\n document.head.querySelectorAll('meta').forEach(node => node.remove());\n }\n\n entries() {\n return this.#map.entries();\n }\n\n [Symbol.iterator]() {\n return this.entries();\n }\n\n get size() {\n return this.#map.size;\n }\n \n private observeMutations(mutations: MutationRecord[]) {\n for (const mutation of mutations) {\n if (mutation.type === 'attributes') {\n const node = mutation.target;\n\n this.metaDataFromNode(node as HTMLMetaElement);\n }\n\n if (mutation.type !== 'childList') return;\n\n mutation.removedNodes.forEach((node) => {\n if (node.nodeName === 'META') {\n const [type] = Array.from((node as HTMLMetaElement).attributes).filter(attribute => attribute.nodeName !== \"content\");\n const metaType: MetaType = [type.nodeName as MetaTypeKey, type.value];\n\n const key = metaType.join('=') as MetaKey;\n if (this.#map.has(key)) {\n this.#map.delete(key);\n }\n }\n });\n mutation.addedNodes.forEach(node => {\n if (node.nodeName === 'META') {\n this.metaDataFromNode(node as HTMLMetaElement);\n }\n });\n }\n }\n\n private metaDataFromNode(node: HTMLMetaElement) {\n const [type] = Array.from((node as HTMLMetaElement).attributes).filter(attribute => attribute.nodeName !== \"content\");\n const [content] = Array.from((node as HTMLMetaElement).attributes).filter(attribute => attribute.nodeName === \"content\");\n const metaType: MetaType = [type.nodeName as MetaTypeKey, type.value];\n\n const key = metaType.join('=') as MetaKey;\n this.#map.set(key, content?.value);\n }\n\n private getMetaKey(key: string | MetaType) {\n let metaKey: MetaKey;\n if (typeof key === \"string\") {\n metaKey = `name=${key}` as MetaKey;\n } else {\n metaKey = key.join('=') as MetaKey;\n }\n\n return metaKey;\n }\n\n private getMetaContent(content: string | [string, string][] | undefined) {\n if (!content) return undefined;\n\n let metaContent: string;\n if (typeof content === \"string\") {\n metaContent = content;\n } else {\n metaContent = content.map(contentTuple => contentTuple.join('=')).join(', ');\n }\n\n return metaContent;\n }\n\n private updateMetaElement(key: MetaKey, content?: string) {\n const meta = document.querySelector(`meta[${key}]`) || document.createElement('meta');\n const metaType = key.split('=') as MetaType;\n\n meta.setAttribute(...metaType);\n if (content) meta.setAttribute('content', content);\n else meta.removeAttribute('content');\n\n if (!meta.parentElement) {\n document.head.appendChild(meta);\n }\n }\n}","import { RouterHTMLElement, RouterBaseEventMap } from \"./common/types\";\nimport { MetaData } from \"./MetaData\";\nimport { RouterBase } from \"./RouterBase\";\n\nexport abstract class NavigationBase<E extends RouterBaseEventMap = RouterBaseEventMap> {\n protected abstract readonly router: RouterBase;\n private static rootNavigatorRef: WeakRef<NavigationBase> | null = null;\n public readonly metaData = new MetaData();\n\n constructor() {\n const rootNavigator = NavigationBase.rootNavigatorRef?.deref();\n if (!rootNavigator || !rootNavigator.isInDocument)\n NavigationBase.rootNavigatorRef = new WeakRef(this);\n }\n\n addEventListener<K extends keyof E>(type: K, listener: (this: RouterHTMLElement<E>, ev: E[K]) => any, options?: boolean | AddEventListenerOptions): () => void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): () => void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): () => void {\n this.router.addEventListener(type, listener, options);\n return () => this.router.removeEventListener(type, listener, options);\n }\n\n removeEventListener<K extends keyof E>(type: K, listener: (this: RouterHTMLElement<E>, ev: E[K]) => any, options?: boolean | EventListenerOptions | undefined): void\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void {\n return this.router.removeEventListener(type, listener, options);\n }\n\n dispatchEvent(event: Event) {\n return this.router.dispatchEvent?.(event);\n }\n\n get parent(): NavigationBase | null {\n return this.router.parent?.navigation ?? null;\n }\n\n get routerId() {\n return this.router.id;\n }\n\n get baseURL() {\n return this.router.baseURL;\n }\n\n get baseURLPattern() {\n return this.router.baseURLPattern;\n }\n\n public getNavigatorById(routerId: string) {\n return this.router.getRouterById(routerId)?.navigation ?? null;\n }\n\n public preloadRoute(path: string) {\n const { pathname } = new URL(path, this.baseURL);\n return this.router.preloadRoute(pathname);\n }\n\n private get isInDocument() {\n return Boolean(document.getElementById(`${this.routerId}`));\n }\n}","import { useContext, useDebugValue } from \"react\";\nimport { MotionContext } from \"../MotionContext\";\nimport { NavigationBase } from \"../NavigationBase\";\nimport { RouterContext } from \"../RouterContext\";\nimport { RoutePropContext } from \"../RoutePropContext\";\nimport { RouterBase } from \"../RouterBase\";\nimport { RoutePropBase } from \"./types\";\n\nexport function useNavigationBase<T extends NavigationBase = NavigationBase>() {\n const router = useContext(RouterContext);\n if (router) {\n return router.navigation as T;\n } else {\n throw new Error(\"Router is null. You may be trying to call useNavigation outside a Router.\");\n }\n}\n\nexport function useRouterBase<T extends RouterBase = RouterBase>() {\n return useContext(RouterContext) as T;\n}\n\nexport function useMotion() {\n useDebugValue(\"Motion\");\n return useContext(MotionContext);\n}\n\nexport function useRouteBase<R extends RoutePropBase>() {\n const routeProp = useContext(RoutePropContext);\n if (routeProp) {\n return routeProp as R;\n } else {\n throw new Error(\"Router is null. You may be trying to call useRoute outside a Router.\");\n }\n}\n\nexport function useParamsBase<K extends string, S>(key: K, initialParams: S | (() => S)): [S, React.Dispatch<React.SetStateAction<S>>] {\n\tconst route = useRouteBase();\n\tinitialParams = initialParams instanceof Function ? initialParams() : initialParams;\n\n\tconst setParams = (params: S | ((prevState: S) => S)) => {\n\t\tif (params instanceof Function)\n\t\t\tparams = params(route.params[key] ?? initialParams);\n\t\troute.setParams({ [key]: params });\n\t}\n\n\treturn [route.params[key] ?? initialParams, setParams] as const;\n}","export const MAX_Z_INDEX = 2147483647;\nexport const MAX_PROGRESS = 100;\nexport const MIN_PROGRESS = 0;\nexport const MIN_NORM_PROGRESS = 0;\nexport const MAX_NORM_PROGRESS = 1;","/// <reference types=\"urlpattern-polyfill\" />\nexport * from './SharedElement';\nexport * from './RouterBase';\nexport * from './ScreenBase';\nexport * from './NavigationBase';\nexport * from './MotionContext';\nexport * from './RouterContext';\nexport * from './common/hooks';\nexport * from './common/types';\nexport * from './common/events';\nexport * from './common/utils';\nexport * from './common/constants';"],"names":[],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-motion-router/core",
3
- "version": "2.0.0-beta.sha-dc429ba",
3
+ "version": "2.0.0-beta.sha-05b2475",
4
4
  "main": "build/index.js",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -62,5 +62,5 @@
62
62
  "webpack": "^5.72.0",
63
63
  "webpack-cli": "^4.9.2"
64
64
  },
65
- "gitHead": "dc429ba7919e3d43d197406d532562a64d03cd4c"
65
+ "gitHead": "05b24757d4c44519bf3c57ce4ef5eb613da62a01"
66
66
  }