@react-motion-router/stack 2.0.0-beta.sha-e8b3d37 → 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.
- package/build/Anchor.d.ts +3 -3
- package/build/Navigation.d.ts +2 -2
- package/build/Router.d.ts +2 -3
- package/build/Screen.d.ts +17 -18
- package/build/animation-configs/animation-presets.d.ts +1 -1
- package/build/common/events.d.ts +2 -2
- package/build/common/hooks.d.ts +5 -5
- package/build/common/types.d.ts +4 -4
- package/build/index.d.ts +0 -1
- package/build/index.js +1631 -2436
- package/build/index.js.map +1 -1
- package/package.json +7 -5
package/build/Anchor.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PlainObject } from
|
|
2
|
-
import { Navigation } from
|
|
3
|
-
import { NavigateOptions, XOR } from
|
|
1
|
+
import { PlainObject } from '../../core/build';
|
|
2
|
+
import { Navigation } from './Navigation';
|
|
3
|
+
import { NavigateOptions, XOR } from './common/types';
|
|
4
4
|
interface BaseAnchorProps extends React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> {
|
|
5
5
|
onClick?: React.MouseEventHandler<HTMLAnchorElement>;
|
|
6
6
|
navigation?: Navigation | null;
|
package/build/Navigation.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NavigationBase } from '
|
|
1
|
+
import { NavigationBase } from '../../core/build';
|
|
2
2
|
import { GoBackOptions, GoForwardOptions, NavigateOptions, NavigationBaseOptions, NavigationProps, RouterEventMap } from './common/types';
|
|
3
3
|
import { HistoryEntry } from './HistoryEntry';
|
|
4
4
|
import { Router } from './Router';
|
|
@@ -16,7 +16,7 @@ export declare class Navigation extends NavigationBase<RouterEventMap> {
|
|
|
16
16
|
private createForwardEvent;
|
|
17
17
|
private createNavigateEvent;
|
|
18
18
|
get committed(): Promise<NavigationHistoryEntry> | null;
|
|
19
|
-
get transition(): NavigationTransition | import(
|
|
19
|
+
get transition(): NavigationTransition | import('../../core/build').LoadNavigationTransition | null;
|
|
20
20
|
get globalEntries(): NavigationHistoryEntry[];
|
|
21
21
|
get entries(): HistoryEntry[];
|
|
22
22
|
get index(): number;
|
package/build/Router.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { RouterBase } from '
|
|
2
|
-
import type { ClonedElementType, LoadEvent, NestedRouterContext, RouterBaseConfig, RouterBaseProps, RouterBaseState, ScreenChild } from '@react-motion-router/core';
|
|
1
|
+
import { RouterBase, ClonedElementType, LoadEvent, NestedRouterContext, RouterBaseConfig, RouterBaseProps, RouterBaseState, ScreenChild } from '../../core/build';
|
|
3
2
|
import { Navigation } from './Navigation';
|
|
4
3
|
import { ScreenProps, Screen, ScreenConfig } from './Screen';
|
|
5
4
|
import { RouterEventMap, ScreenInternalProps, SwipeDirection } from './common/types';
|
|
@@ -53,7 +52,7 @@ export declare class Router extends RouterBase<RouterProps, RouterState, RouterE
|
|
|
53
52
|
private onSwipeEnd;
|
|
54
53
|
get committed(): Promise<NavigationHistoryEntry> | null;
|
|
55
54
|
private get backNavigating();
|
|
56
|
-
protected get screens(): import(
|
|
55
|
+
protected get screens(): import('react').CElement<ScreenProps & Partial<InjectedScreenProps>, Screen & import('react').Component<ScreenProps & Pick<ScreenProps, "config" | "defaultParams"> & ScreenInternalProps, {}, any>>[];
|
|
57
56
|
private screenChildFromPathname;
|
|
58
57
|
private getScreenChildByPathname;
|
|
59
58
|
private getScreenRefByKey;
|
package/build/Screen.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ScreenBase } from '
|
|
2
|
-
import type { PlainObject, RouterContext, ScreenBaseProps, ScreenBaseState, ScreenBaseComponentProps, ScreenBaseConfig } from '@react-motion-router/core';
|
|
1
|
+
import { ScreenBase, PlainObject, RouterContext, ScreenBaseProps, ScreenBaseState, ScreenBaseComponentProps, ScreenBaseConfig } from '../../core/build';
|
|
3
2
|
import { Navigation } from './Navigation';
|
|
4
3
|
import { HistoryEntryState, RouteProp, ScreenInternalProps, SwipeDirection } from './common/types';
|
|
5
4
|
import { Router } from './Router';
|
|
@@ -39,18 +38,18 @@ export declare class Screen extends ScreenBase<ScreenProps, ScreenState, RoutePr
|
|
|
39
38
|
get config(): {
|
|
40
39
|
header?: {
|
|
41
40
|
fallback?: React.ReactNode;
|
|
42
|
-
component: React.JSXElementConstructor<any> | import(
|
|
41
|
+
component: React.JSXElementConstructor<any> | import('../../core/build').LazyExoticComponent<any>;
|
|
43
42
|
};
|
|
44
43
|
footer?: {
|
|
45
44
|
fallback?: React.ReactNode;
|
|
46
|
-
component: React.JSXElementConstructor<any> | import(
|
|
45
|
+
component: React.JSXElementConstructor<any> | import('../../core/build').LazyExoticComponent<any>;
|
|
47
46
|
};
|
|
48
|
-
animation?: import(
|
|
49
|
-
onEnter?: ((props: import(
|
|
50
|
-
onExit?: ((props: import(
|
|
51
|
-
onEntered?: ((props: import(
|
|
52
|
-
onExited?: ((props: import(
|
|
53
|
-
onLoad?: ((props: import(
|
|
47
|
+
animation?: import('../../core/build').AnimationEffectFactory;
|
|
48
|
+
onEnter?: ((props: import('../../core/build').LifecycleProps<import('../../core/build').RoutePropBase<{}, PlainObject<any>>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | ((props: import('../../core/build').LifecycleProps<RouteProp<{}>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | undefined;
|
|
49
|
+
onExit?: ((props: import('../../core/build').LifecycleProps<import('../../core/build').RoutePropBase<{}, PlainObject<any>>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | ((props: import('../../core/build').LifecycleProps<RouteProp<{}>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | undefined;
|
|
50
|
+
onEntered?: ((props: import('../../core/build').LifecycleProps<import('../../core/build').RoutePropBase<{}, PlainObject<any>>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | ((props: import('../../core/build').LifecycleProps<RouteProp<{}>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | undefined;
|
|
51
|
+
onExited?: ((props: import('../../core/build').LifecycleProps<import('../../core/build').RoutePropBase<{}, PlainObject<any>>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | ((props: import('../../core/build').LifecycleProps<RouteProp<{}>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | undefined;
|
|
52
|
+
onLoad?: ((props: import('../../core/build').LifecycleProps<import('../../core/build').RoutePropBase<{}, PlainObject<any>>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | ((props: import('../../core/build').LifecycleProps<RouteProp<{}>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | undefined;
|
|
54
53
|
title?: string;
|
|
55
54
|
presentation?: "default" | "dialog" | "modal";
|
|
56
55
|
keepAlive?: boolean;
|
|
@@ -72,18 +71,18 @@ export declare class Screen extends ScreenBase<ScreenProps, ScreenState, RoutePr
|
|
|
72
71
|
config: {
|
|
73
72
|
header?: {
|
|
74
73
|
fallback?: React.ReactNode;
|
|
75
|
-
component: React.JSXElementConstructor<any> | import(
|
|
74
|
+
component: React.JSXElementConstructor<any> | import('../../core/build').LazyExoticComponent<any>;
|
|
76
75
|
};
|
|
77
76
|
footer?: {
|
|
78
77
|
fallback?: React.ReactNode;
|
|
79
|
-
component: React.JSXElementConstructor<any> | import(
|
|
78
|
+
component: React.JSXElementConstructor<any> | import('../../core/build').LazyExoticComponent<any>;
|
|
80
79
|
};
|
|
81
|
-
animation?: import(
|
|
82
|
-
onEnter?: ((props: import(
|
|
83
|
-
onExit?: ((props: import(
|
|
84
|
-
onEntered?: ((props: import(
|
|
85
|
-
onExited?: ((props: import(
|
|
86
|
-
onLoad?: ((props: import(
|
|
80
|
+
animation?: import('../../core/build').AnimationEffectFactory;
|
|
81
|
+
onEnter?: ((props: import('../../core/build').LifecycleProps<import('../../core/build').RoutePropBase<{}, PlainObject<any>>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | ((props: import('../../core/build').LifecycleProps<RouteProp<{}>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | undefined;
|
|
82
|
+
onExit?: ((props: import('../../core/build').LifecycleProps<import('../../core/build').RoutePropBase<{}, PlainObject<any>>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | ((props: import('../../core/build').LifecycleProps<RouteProp<{}>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | undefined;
|
|
83
|
+
onEntered?: ((props: import('../../core/build').LifecycleProps<import('../../core/build').RoutePropBase<{}, PlainObject<any>>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | ((props: import('../../core/build').LifecycleProps<RouteProp<{}>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | undefined;
|
|
84
|
+
onExited?: ((props: import('../../core/build').LifecycleProps<import('../../core/build').RoutePropBase<{}, PlainObject<any>>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | ((props: import('../../core/build').LifecycleProps<RouteProp<{}>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | undefined;
|
|
85
|
+
onLoad?: ((props: import('../../core/build').LifecycleProps<import('../../core/build').RoutePropBase<{}, PlainObject<any>>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | ((props: import('../../core/build').LifecycleProps<RouteProp<{}>, import('../../core/build').NavigationBase<import('../../core/build').RouterBaseEventMap>>) => void | Promise<void>) | undefined;
|
|
87
86
|
title?: string;
|
|
88
87
|
presentation?: "default" | "dialog" | "modal";
|
|
89
88
|
keepAlive?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnimationEffectFactoryProps } from
|
|
1
|
+
import { AnimationEffectFactoryProps } from '../../../core/build';
|
|
2
2
|
export declare function iOSSlideInFromRight({ ref, direction, playbackRate, index }: AnimationEffectFactoryProps): KeyframeEffect;
|
|
3
3
|
export declare function iOSSlideInFromLeft({ ref, direction, playbackRate, index }: AnimationEffectFactoryProps): KeyframeEffect;
|
|
4
4
|
export declare function iOSSlideInFromBottom({ ref, direction, playbackRate }: AnimationEffectFactoryProps): KeyframeEffect;
|
package/build/common/events.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GestureEvent } from
|
|
2
|
-
import { NavigateOptions, NavigationProps } from
|
|
1
|
+
import { GestureEvent } from 'web-gesture-events';
|
|
2
|
+
import { NavigateOptions, NavigationProps } from './types';
|
|
3
3
|
export declare class NavigateEvent extends Event {
|
|
4
4
|
readonly routerId: string;
|
|
5
5
|
readonly route: string;
|
package/build/common/hooks.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PlainObject } from
|
|
2
|
-
import { Navigation } from
|
|
3
|
-
import { Router } from
|
|
4
|
-
import { RouteProp } from
|
|
1
|
+
import { PlainObject } from '../../../core/build';
|
|
2
|
+
import { Navigation } from '../Navigation';
|
|
3
|
+
import { Router } from '../Router';
|
|
4
|
+
import { RouteProp } from './types';
|
|
5
5
|
export declare function useNavigation(): Navigation;
|
|
6
6
|
export declare function useRouter(): Router;
|
|
7
7
|
export declare function useRoute<T extends PlainObject = PlainObject>(): RouteProp<T>;
|
|
8
|
-
export declare function useParams<K extends string, S>(key: K, initialParams: S | (() => S)): [S, import(
|
|
8
|
+
export declare function useParams<K extends string, S>(key: K, initialParams: S | (() => S)): [S, import('react').Dispatch<import('react').SetStateAction<S>>];
|
package/build/common/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PlainObject, RoutePropBase, RouterBaseEventMap } from
|
|
2
|
-
import { ScreenProps } from
|
|
3
|
-
import { RefObject } from
|
|
4
|
-
import { BackEvent, ForwardEvent, GestureCancelEvent, GestureEndEvent, GestureStartEvent, NavigateEvent } from
|
|
1
|
+
import { PlainObject, RoutePropBase, RouterBaseEventMap } from '../../../core/build';
|
|
2
|
+
import { ScreenProps } from '../Screen';
|
|
3
|
+
import { RefObject } from 'react';
|
|
4
|
+
import { BackEvent, ForwardEvent, GestureCancelEvent, GestureEndEvent, GestureStartEvent, NavigateEvent } from './events';
|
|
5
5
|
export interface NavigationBaseOptions {
|
|
6
6
|
signal?: AbortSignal;
|
|
7
7
|
}
|
package/build/index.d.ts
CHANGED