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

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.
@@ -1,4 +1,4 @@
1
- import { MetaType } from "./common/types";
1
+ import { MetaType } from './common/types';
2
2
  export declare class MetaData {
3
3
  #private;
4
4
  private mutationObserver;
@@ -8,8 +8,8 @@ export declare class MetaData {
8
8
  has(key: string | MetaType): boolean;
9
9
  delete(key: string | MetaType): void;
10
10
  clear(): void;
11
- entries(): IterableIterator<[`name=${string}` | `http-equiv=${string}` | `itemprop=${string}` | `property=${string}` | `charset=${string}`, string | undefined]>;
12
- [Symbol.iterator](): IterableIterator<[`name=${string}` | `http-equiv=${string}` | `itemprop=${string}` | `property=${string}` | `charset=${string}`, string | undefined]>;
11
+ entries(): MapIterator<[`http-equiv=${string}` | `name=${string}` | `itemprop=${string}` | `property=${string}` | `charset=${string}`, string | undefined]>;
12
+ [Symbol.iterator](): MapIterator<[`http-equiv=${string}` | `name=${string}` | `itemprop=${string}` | `property=${string}` | `charset=${string}`, string | undefined]>;
13
13
  get size(): number;
14
14
  private observeMutations;
15
15
  private metaDataFromNode;
@@ -1 +1 @@
1
- export declare const MotionContext: import("react").Context<number>;
1
+ export declare const MotionContext: import('react').Context<number>;
@@ -1,6 +1,6 @@
1
- import { RouterHTMLElement, RouterBaseEventMap } from "./common/types";
2
- import { MetaData } from "./MetaData";
3
- import { RouterBase } from "./RouterBase";
1
+ import { RouterHTMLElement, RouterBaseEventMap } from './common/types';
2
+ import { MetaData } from './MetaData';
3
+ import { RouterBase } from './RouterBase';
4
4
  export declare abstract class NavigationBase<E extends RouterBaseEventMap = RouterBaseEventMap> {
5
5
  protected abstract readonly router: RouterBase;
6
6
  private static rootNavigatorRef;
@@ -1,2 +1,2 @@
1
- import { RoutePropBase } from "./common/types";
2
- export declare const RoutePropContext: import("react").Context<RoutePropBase<{}, import("./common/types").PlainObject<any>>>;
1
+ import { RoutePropBase } from './common/types';
2
+ export declare const RoutePropContext: import('react').Context<RoutePropBase<{}, import('./common/types').PlainObject<any>>>;
@@ -17,15 +17,15 @@ export interface RouterBaseState {
17
17
  }
18
18
  export declare abstract class RouterBase<P extends RouterBaseProps = RouterBaseProps, S extends RouterBaseState = RouterBaseState, E extends RouterBaseEventMap = RouterBaseEventMap> extends Component<P, S> {
19
19
  #private;
20
- protected readonly ref: import("react").RefObject<RouterHTMLElement<E>>;
21
- protected screenTransitionLayer: import("react").RefObject<ScreenTransitionLayer>;
20
+ protected readonly ref: import('react').RefObject<RouterHTMLElement<E>>;
21
+ protected screenTransitionLayer: import('react').RefObject<ScreenTransitionLayer>;
22
22
  abstract readonly navigation: NavigationBase;
23
23
  readonly parent: RouterBase | null;
24
24
  private loadDispatched;
25
25
  private hasUAVisualTransition;
26
26
  readonly parentScreen: ScreenBase | null;
27
27
  private static rootRouterRef;
28
- static readonly contextType: import("react").Context<{
28
+ static readonly contextType: import('react').Context<{
29
29
  parentRouter: RouterBase;
30
30
  parentScreen: ScreenBase;
31
31
  } | null>;
@@ -1,7 +1,7 @@
1
1
  import { ScreenBase } from './ScreenBase';
2
2
  import { RouterBase } from './RouterBase';
3
- export declare const NestedRouterContext: import("react").Context<{
3
+ export declare const NestedRouterContext: import('react').Context<{
4
4
  parentRouter: RouterBase;
5
5
  parentScreen: ScreenBase;
6
6
  } | null>;
7
- export declare const RouterContext: import("react").Context<RouterBase<import("./RouterBase").RouterBaseProps<ScreenBase<import("./ScreenBase").ScreenBaseProps, import("./ScreenBase").ScreenBaseState<import("./ScreenBase").ScreenBaseConfig<import(".").RoutePropBase<{}, import(".").PlainObject<any>>, import("./NavigationBase").NavigationBase<import(".").RouterBaseEventMap>> | undefined, import(".").PlainObject>, import(".").RoutePropBase<import("./ScreenBase").ScreenBaseConfig<import(".").RoutePropBase<{}, import(".").PlainObject<any>>, import("./NavigationBase").NavigationBase<import(".").RouterBaseEventMap>> | undefined, import(".").PlainObject<any>>>>, import("./RouterBase").RouterBaseState, import(".").RouterBaseEventMap>>;
7
+ export declare const RouterContext: import('react').Context<RouterBase<import('./RouterBase').RouterBaseProps<ScreenBase<import('./ScreenBase').ScreenBaseProps, import('./ScreenBase').ScreenBaseState<import('./ScreenBase').ScreenBaseConfig<import('.').RoutePropBase<{}, import('.').PlainObject<any>>, import('./NavigationBase').NavigationBase<import('.').RouterBaseEventMap>> | undefined, import('.').PlainObject>, import('.').RoutePropBase<import('./ScreenBase').ScreenBaseConfig<import('.').RoutePropBase<{}, import('.').PlainObject<any>>, import('./NavigationBase').NavigationBase<import('.').RouterBaseEventMap>> | undefined, import('.').PlainObject<any>>>>, import('./RouterBase').RouterBaseState, import('.').RouterBaseEventMap>>;
@@ -1,9 +1,9 @@
1
- import { Component, ElementType } from "react";
2
- import { ScreenTransitionProvider } from "./ScreenTransitionProvider";
3
- import { AnimationEffectFactory, LazyExoticComponent, PlainObject, RoutePropBase } from "./common/types";
4
- import { RouterContext } from "./RouterContext";
5
- import { NavigationBase } from "./NavigationBase";
6
- import { SharedElementScene } from "./SharedElementScene";
1
+ import { Component, ElementType } from 'react';
2
+ import { ScreenTransitionProvider } from './ScreenTransitionProvider';
3
+ import { AnimationEffectFactory, LazyExoticComponent, PlainObject, RoutePropBase } from './common/types';
4
+ import { RouterContext } from './RouterContext';
5
+ import { NavigationBase } from './NavigationBase';
6
+ import { SharedElementScene } from './SharedElementScene';
7
7
  export interface ScreenBaseComponentProps<R extends RoutePropBase = RoutePropBase, N extends NavigationBase = NavigationBase> {
8
8
  route: R;
9
9
  navigation: N;
@@ -45,12 +45,12 @@ export interface ScreenBaseState<C extends ScreenBaseProps["config"] = ScreenBas
45
45
  export declare abstract class ScreenBase<P extends ScreenBaseProps = ScreenBaseProps, S extends ScreenBaseState<P["config"]> = ScreenBaseState<P["config"]>, R extends RoutePropBase<P["config"]> = RoutePropBase<P["config"]>> extends Component<P, S> {
46
46
  #private;
47
47
  readonly sharedElementScene: SharedElementScene;
48
- protected readonly ref: import("react").RefObject<HTMLDivElement>;
48
+ protected readonly ref: import('react').RefObject<HTMLDivElement>;
49
49
  protected readonly nestedRouterData: {
50
50
  parentScreen: ScreenBase;
51
- parentRouter: import("./RouterBase").RouterBase<import("./RouterBase").RouterBaseProps<ScreenBase<ScreenBaseProps, ScreenBaseState<ScreenBaseConfig<RoutePropBase<{}, PlainObject<any>>, NavigationBase<import("./common/types").RouterBaseEventMap>> | undefined, PlainObject>, RoutePropBase<ScreenBaseConfig<RoutePropBase<{}, PlainObject<any>>, NavigationBase<import("./common/types").RouterBaseEventMap>> | undefined, PlainObject<any>>>>, import("./RouterBase").RouterBaseState, import("./common/types").RouterBaseEventMap>;
51
+ parentRouter: import('./RouterBase').RouterBase<import('./RouterBase').RouterBaseProps<ScreenBase<ScreenBaseProps, ScreenBaseState<ScreenBaseConfig<RoutePropBase<{}, PlainObject<any>>, NavigationBase<import('./common/types').RouterBaseEventMap>> | undefined, PlainObject>, RoutePropBase<ScreenBaseConfig<RoutePropBase<{}, PlainObject<any>>, NavigationBase<import('./common/types').RouterBaseEventMap>> | undefined, PlainObject<any>>>>, import('./RouterBase').RouterBaseState, import('./common/types').RouterBaseEventMap>;
52
52
  };
53
- static readonly contextType: import("react").Context<import("./RouterBase").RouterBase<import("./RouterBase").RouterBaseProps<ScreenBase<ScreenBaseProps, ScreenBaseState<ScreenBaseConfig<RoutePropBase<{}, PlainObject<any>>, NavigationBase<import("./common/types").RouterBaseEventMap>> | undefined, PlainObject>, RoutePropBase<ScreenBaseConfig<RoutePropBase<{}, PlainObject<any>>, NavigationBase<import("./common/types").RouterBaseEventMap>> | undefined, PlainObject<any>>>>, import("./RouterBase").RouterBaseState, import("./common/types").RouterBaseEventMap>>;
53
+ static readonly contextType: import('react').Context<import('./RouterBase').RouterBase<import('./RouterBase').RouterBaseProps<ScreenBase<ScreenBaseProps, ScreenBaseState<ScreenBaseConfig<RoutePropBase<{}, PlainObject<any>>, NavigationBase<import('./common/types').RouterBaseEventMap>> | undefined, PlainObject>, RoutePropBase<ScreenBaseConfig<RoutePropBase<{}, PlainObject<any>>, NavigationBase<import('./common/types').RouterBaseEventMap>> | undefined, PlainObject<any>>>>, import('./RouterBase').RouterBaseState, import('./common/types').RouterBaseEventMap>>;
54
54
  context: React.ContextType<typeof RouterContext>;
55
55
  state: S;
56
56
  constructor(props: P, context: React.ContextType<typeof RouterContext>);
@@ -73,6 +73,6 @@ export declare abstract class ScreenBase<P extends ScreenBaseProps = ScreenBaseP
73
73
  onEnter(signal: AbortSignal): Promise<void>;
74
74
  onEntered(signal: AbortSignal): Promise<void>;
75
75
  get path(): P["path"];
76
- get transitionProvider(): import("react").RefObject<ScreenTransitionProvider>;
76
+ get transitionProvider(): import('react').RefObject<ScreenTransitionProvider>;
77
77
  render(): JSX.Element;
78
78
  }
@@ -1,6 +1,6 @@
1
1
  import { Component, RefObject } from 'react';
2
2
  import { SharedElementTransitionLayer } from './SharedElementTransitionLayer';
3
- import { Animation } from 'web-animations-extension';
3
+ import { Animation } from '../../web-animations-extension/build';
4
4
  import { ScreenChild } from './common/types';
5
5
  import { NavigationBase } from './NavigationBase';
6
6
  import { ScreenBase } from './ScreenBase';
@@ -1,2 +1,2 @@
1
- import { ScreenTransitionLayer } from "./ScreenTransitionLayer";
2
- export declare const ScreenTransitionLayerContext: import("react").Context<ScreenTransitionLayer>;
1
+ import { ScreenTransitionLayer } from './ScreenTransitionLayer';
2
+ export declare const ScreenTransitionLayerContext: import('react').Context<ScreenTransitionLayer>;
@@ -14,8 +14,8 @@ interface ScreenTransitionProviderState {
14
14
  zIndex: React.CSSProperties["zIndex"];
15
15
  }
16
16
  export declare class ScreenTransitionProvider extends Component<ScreenTransitionProviderProps, ScreenTransitionProviderState> {
17
- readonly ref: import("react").RefObject<HTMLElement>;
18
- static readonly contextType: import("react").Context<import("./ScreenTransitionLayer").ScreenTransitionLayer>;
17
+ readonly ref: import('react').RefObject<HTMLElement>;
18
+ static readonly contextType: import('react').Context<import('./ScreenTransitionLayer').ScreenTransitionLayer>;
19
19
  context: React.ContextType<typeof ScreenTransitionLayerContext>;
20
20
  index: number;
21
21
  exiting: boolean;
@@ -16,15 +16,15 @@ interface SharedElementProps {
16
16
  interface SharedElementState {
17
17
  }
18
18
  export declare class SharedElement extends Component<SharedElementProps, SharedElementState> {
19
- readonly ref: import("react").RefObject<HTMLDivElement>;
20
- static readonly contextType: import("react").Context<import("./SharedElementScene").SharedElementScene>;
19
+ readonly ref: import('react').RefObject<HTMLDivElement>;
20
+ static readonly contextType: import('react').Context<import('./SharedElementScene').SharedElementScene>;
21
21
  context: React.ContextType<typeof SharedElementSceneContext>;
22
22
  componentDidMount(): void;
23
23
  componentDidUpdate(prevProps: SharedElementProps): void;
24
24
  componentWillUnmount(): void;
25
25
  get styles(): StyleKeyList;
26
26
  get canTransition(): boolean;
27
- get scene(): import("./SharedElementScene").SharedElementScene;
27
+ get scene(): import('./SharedElementScene').SharedElementScene;
28
28
  get id(): string;
29
29
  get transitionType(): SharedElementTransitionType;
30
30
  getBoundingClientRect(): DOMRect;
@@ -1,4 +1,4 @@
1
- import { SharedElement } from "./SharedElement";
1
+ import { SharedElement } from './SharedElement';
2
2
  export declare class SharedElementScene {
3
3
  readonly id: string;
4
4
  readonly nodes: Map<string, SharedElement>;
@@ -1,2 +1,2 @@
1
- import { SharedElementScene } from "./SharedElementScene";
2
- export declare const SharedElementSceneContext: import("react").Context<SharedElementScene>;
1
+ import { SharedElementScene } from './SharedElementScene';
2
+ export declare const SharedElementSceneContext: import('react').Context<SharedElementScene>;
@@ -2,7 +2,7 @@ import { StylableElement, StyleKeyList } from './common/types';
2
2
  import { Component, RefObject } from 'react';
3
3
  import { NavigationBase } from './NavigationBase';
4
4
  import { ScreenBase } from './ScreenBase';
5
- import { ParallelEffect } from 'web-animations-extension';
5
+ import { ParallelEffect } from '../../web-animations-extension/build';
6
6
  import { SharedElement } from './SharedElement';
7
7
  interface SharedElementTransitionLayerProps {
8
8
  navigation: NavigationBase;
@@ -1,4 +1,4 @@
1
- import { LoadNavigationTransition } from "./types";
1
+ import { LoadNavigationTransition } from './types';
2
2
  export declare class TransitionStartEvent extends Event {
3
3
  constructor();
4
4
  }
@@ -1,6 +1,6 @@
1
- import { NavigationBase } from "../NavigationBase";
2
- import { RouterBase } from "../RouterBase";
3
- import { RoutePropBase } from "./types";
1
+ import { NavigationBase } from '../NavigationBase';
2
+ import { RouterBase } from '../RouterBase';
3
+ import { RoutePropBase } from './types';
4
4
  export declare function useNavigationBase<T extends NavigationBase = NavigationBase>(): T;
5
5
  export declare function useRouterBase<T extends RouterBase = RouterBase>(): T;
6
6
  export declare function useMotion(): number;
@@ -1,4 +1,4 @@
1
- import { ClonedElementType, ElementPropType, LazyExoticComponent, MatchedRoute, PathPattern } from "./types";
1
+ import { ClonedElementType, ElementPropType, LazyExoticComponent, MatchedRoute, PathPattern } from './types';
2
2
  export declare function resolveBaseURLFromPattern(pattern: string, pathname: string): URL | null;
3
3
  export declare function matchRoute(pathnamePattern: string, pathname: string, baseURLPattern?: string, caseSensitive?: boolean): MatchedRoute | null;
4
4
  export declare function includesRoute(pathnamePatterns: PathPattern[], pathname: string, baseURL?: string): boolean;