@sigmela/router 0.3.6 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/LICENSE +2 -1
  3. package/README.md +108 -479
  4. package/dist/Router.d.ts +190 -0
  5. package/dist/Router.d.ts.map +1 -0
  6. package/dist/components/Modal.d.ts +56 -0
  7. package/dist/components/Modal.d.ts.map +1 -0
  8. package/dist/components/OverlayContentScope.d.ts +8 -0
  9. package/dist/components/OverlayContentScope.d.ts.map +1 -0
  10. package/dist/components/RouterCloseButton.d.ts +9 -0
  11. package/dist/components/RouterCloseButton.d.ts.map +1 -0
  12. package/dist/components/Sheet.d.ts +53 -0
  13. package/dist/components/Sheet.d.ts.map +1 -0
  14. package/dist/components/SheetSurface.d.ts +27 -0
  15. package/dist/components/SheetSurface.d.ts.map +1 -0
  16. package/dist/components/index.d.ts +4 -0
  17. package/dist/components/index.d.ts.map +1 -0
  18. package/dist/components/pageScrollLock.d.ts +3 -0
  19. package/dist/components/pageScrollLock.d.ts.map +1 -0
  20. package/dist/components/sheetDragEngine.d.ts +27 -0
  21. package/dist/components/sheetDragEngine.d.ts.map +1 -0
  22. package/dist/index.d.ts +5 -0
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +3649 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/navigationHistory.d.ts +17 -0
  27. package/dist/navigationHistory.d.ts.map +1 -0
  28. package/dist/router.css +971 -0
  29. package/dist/types.d.ts +3 -0
  30. package/dist/types.d.ts.map +1 -0
  31. package/dist/utils/id.d.ts +2 -0
  32. package/dist/utils/id.d.ts.map +1 -0
  33. package/package.json +69 -174
  34. package/lib/module/Drawer/Drawer.js +0 -250
  35. package/lib/module/Drawer/DrawerContext.js +0 -4
  36. package/lib/module/Drawer/DrawerIcon.web.js +0 -47
  37. package/lib/module/Drawer/RenderDrawer.native.js +0 -248
  38. package/lib/module/Drawer/RenderDrawer.web.js +0 -197
  39. package/lib/module/Drawer/useDrawer.js +0 -11
  40. package/lib/module/Navigation.js +0 -79
  41. package/lib/module/NavigationStack.js +0 -254
  42. package/lib/module/Router.js +0 -2171
  43. package/lib/module/RouterContext.js +0 -33
  44. package/lib/module/ScreenStack/ScreenStack.native.js +0 -3
  45. package/lib/module/ScreenStack/ScreenStack.web.js +0 -561
  46. package/lib/module/ScreenStack/ScreenStackContext.js +0 -21
  47. package/lib/module/ScreenStack/animationHelpers.js +0 -87
  48. package/lib/module/ScreenStack/index.js +0 -3
  49. package/lib/module/ScreenStackItem/ScreenStackItem.js +0 -70
  50. package/lib/module/ScreenStackItem/ScreenStackItem.types.js +0 -3
  51. package/lib/module/ScreenStackItem/ScreenStackItem.web.js +0 -171
  52. package/lib/module/ScreenStackItem/index.js +0 -3
  53. package/lib/module/ScreenStackSheetItem/ScreenStackSheetItem.native.js +0 -70
  54. package/lib/module/ScreenStackSheetItem/ScreenStackSheetItem.web.js +0 -5
  55. package/lib/module/ScreenStackSheetItem/index.js +0 -3
  56. package/lib/module/SplitView/RenderSplitView.native.js +0 -101
  57. package/lib/module/SplitView/RenderSplitView.web.js +0 -107
  58. package/lib/module/SplitView/SplitView.js +0 -97
  59. package/lib/module/SplitView/SplitViewContext.js +0 -4
  60. package/lib/module/SplitView/index.js +0 -5
  61. package/lib/module/SplitView/useSplitView.js +0 -11
  62. package/lib/module/StackRenderer.js +0 -42
  63. package/lib/module/TabBar/RenderTabBar.native.js +0 -418
  64. package/lib/module/TabBar/RenderTabBar.web.js +0 -218
  65. package/lib/module/TabBar/TabBar.js +0 -208
  66. package/lib/module/TabBar/TabBarContext.js +0 -4
  67. package/lib/module/TabBar/TabIcon.web.js +0 -47
  68. package/lib/module/TabBar/index.js +0 -6
  69. package/lib/module/TabBar/useTabBar.js +0 -11
  70. package/lib/module/TabBar/useTabBarHeight.js +0 -22
  71. package/lib/module/createController.js +0 -5
  72. package/lib/module/index.js +0 -15
  73. package/lib/module/navigationNode.js +0 -3
  74. package/lib/module/package.json +0 -1
  75. package/lib/module/styles.css +0 -1111
  76. package/lib/module/types.js +0 -13
  77. package/lib/typescript/package.json +0 -1
  78. package/lib/typescript/src/Drawer/Drawer.d.ts +0 -100
  79. package/lib/typescript/src/Drawer/DrawerContext.d.ts +0 -3
  80. package/lib/typescript/src/Drawer/DrawerIcon.web.d.ts +0 -7
  81. package/lib/typescript/src/Drawer/RenderDrawer.native.d.ts +0 -8
  82. package/lib/typescript/src/Drawer/RenderDrawer.web.d.ts +0 -8
  83. package/lib/typescript/src/Drawer/useDrawer.d.ts +0 -2
  84. package/lib/typescript/src/Navigation.d.ts +0 -17
  85. package/lib/typescript/src/NavigationStack.d.ts +0 -46
  86. package/lib/typescript/src/Router.d.ts +0 -232
  87. package/lib/typescript/src/RouterContext.d.ts +0 -18
  88. package/lib/typescript/src/ScreenStack/ScreenStack.native.d.ts +0 -2
  89. package/lib/typescript/src/ScreenStack/ScreenStack.web.d.ts +0 -9
  90. package/lib/typescript/src/ScreenStack/ScreenStackContext.d.ts +0 -31
  91. package/lib/typescript/src/ScreenStack/animationHelpers.d.ts +0 -6
  92. package/lib/typescript/src/ScreenStack/index.d.ts +0 -2
  93. package/lib/typescript/src/ScreenStackItem/ScreenStackItem.d.ts +0 -3
  94. package/lib/typescript/src/ScreenStackItem/ScreenStackItem.types.d.ts +0 -14
  95. package/lib/typescript/src/ScreenStackItem/ScreenStackItem.web.d.ts +0 -3
  96. package/lib/typescript/src/ScreenStackItem/index.d.ts +0 -3
  97. package/lib/typescript/src/ScreenStackSheetItem/ScreenStackSheetItem.native.d.ts +0 -11
  98. package/lib/typescript/src/ScreenStackSheetItem/ScreenStackSheetItem.web.d.ts +0 -2
  99. package/lib/typescript/src/ScreenStackSheetItem/index.d.ts +0 -2
  100. package/lib/typescript/src/SplitView/RenderSplitView.native.d.ts +0 -19
  101. package/lib/typescript/src/SplitView/RenderSplitView.web.d.ts +0 -8
  102. package/lib/typescript/src/SplitView/SplitView.d.ts +0 -33
  103. package/lib/typescript/src/SplitView/SplitViewContext.d.ts +0 -3
  104. package/lib/typescript/src/SplitView/index.d.ts +0 -5
  105. package/lib/typescript/src/SplitView/useSplitView.d.ts +0 -2
  106. package/lib/typescript/src/StackRenderer.d.ts +0 -8
  107. package/lib/typescript/src/TabBar/RenderTabBar.native.d.ts +0 -8
  108. package/lib/typescript/src/TabBar/RenderTabBar.web.d.ts +0 -8
  109. package/lib/typescript/src/TabBar/TabBar.d.ts +0 -112
  110. package/lib/typescript/src/TabBar/TabBarContext.d.ts +0 -3
  111. package/lib/typescript/src/TabBar/TabIcon.web.d.ts +0 -7
  112. package/lib/typescript/src/TabBar/index.d.ts +0 -5
  113. package/lib/typescript/src/TabBar/useTabBar.d.ts +0 -2
  114. package/lib/typescript/src/TabBar/useTabBarHeight.d.ts +0 -18
  115. package/lib/typescript/src/createController.d.ts +0 -15
  116. package/lib/typescript/src/index.d.ts +0 -21
  117. package/lib/typescript/src/navigationNode.d.ts +0 -41
  118. package/lib/typescript/src/types.d.ts +0 -140
@@ -0,0 +1,190 @@
1
+ import { type ComponentType, type ElementType, type Ref, type ReactNode } from 'react';
2
+ import { type DefaultParams } from 'wouter';
3
+ import type { RouterOverlayLayout, RouterShellMode } from './types';
4
+ import './router.css';
5
+ export type StackPresentation = 'push' | 'modal' | 'sheet';
6
+ export type RouterScreenAnimation = 'push' | 'slide_from_bottom';
7
+ export interface RouterNavigateOptions {
8
+ state?: unknown;
9
+ }
10
+ export type RouterNavigateFunction = (to: string | number, options?: RouterNavigateOptions) => void;
11
+ export type RouterReplaceFunction = (to: string, options?: RouterNavigateOptions) => void;
12
+ type RouterGuardValue<T> = T | ((props: RouterRouteRenderProps) => T);
13
+ export type RouterSplitPane = 'primary' | 'secondary';
14
+ export interface RouterRouteRenderProps {
15
+ params: DefaultParams;
16
+ pathname: string;
17
+ search: string;
18
+ historyState: unknown;
19
+ presentation: StackPresentation;
20
+ splitPane?: RouterSplitPane;
21
+ }
22
+ export interface RouterRouteContextValue extends RouterRouteRenderProps {
23
+ searchParams: URLSearchParams;
24
+ }
25
+ export interface RouterTabBarTab {
26
+ id: string;
27
+ path: string;
28
+ label: string;
29
+ icon: ReactNode;
30
+ }
31
+ export interface RouterDrawerItem {
32
+ type: 'item';
33
+ id: string;
34
+ path: string;
35
+ label: string;
36
+ icon?: ReactNode;
37
+ badge?: ReactNode;
38
+ hidden?: boolean;
39
+ }
40
+ export interface RouterDrawerGroup {
41
+ type: 'group';
42
+ id: string;
43
+ label: string;
44
+ icon?: ReactNode;
45
+ chevron?: ReactNode;
46
+ hidden?: boolean;
47
+ items: RouterDrawerItem[];
48
+ }
49
+ export interface RouterDrawerSection {
50
+ type: 'section';
51
+ id: string;
52
+ title: string;
53
+ hidden?: boolean;
54
+ }
55
+ export type RouterDrawerNode = RouterDrawerItem | RouterDrawerGroup | RouterDrawerSection;
56
+ export interface RouterRouteLayoutProps {
57
+ children: ReactNode;
58
+ aside?: ReactNode;
59
+ footer?: ReactNode;
60
+ portal?: boolean;
61
+ tabs?: RouterTabBarTab[];
62
+ activeTab?: string;
63
+ onTabChange?: (id: string) => void;
64
+ items?: RouterDrawerNode[];
65
+ activeItem?: string;
66
+ onItemChange?: (id: string) => void;
67
+ drawer?: RouterDrawerApi;
68
+ primary?: ReactNode;
69
+ secondary?: ReactNode;
70
+ isWide?: boolean;
71
+ hasSecondary?: boolean;
72
+ minWidth?: number;
73
+ primaryMaxWidth?: number;
74
+ secondaryMinWidth?: number;
75
+ splitViewRef?: Ref<HTMLDivElement>;
76
+ splitViewLayoutId?: string;
77
+ }
78
+ type RouterRouteChildren = ReactNode | ((props: RouterRouteRenderProps) => ReactNode);
79
+ type RouterRouteElement = ReactNode | ElementType;
80
+ export interface RouterRouteProps {
81
+ id?: string;
82
+ path?: string;
83
+ stackKey?: string | ((props: RouterRouteRenderProps) => string);
84
+ fallback?: ReactNode;
85
+ animation?: RouterScreenAnimation;
86
+ overlayLayout?: RouterOverlayLayout;
87
+ element?: RouterRouteElement;
88
+ component?: ElementType;
89
+ layout?: ElementType<RouterRouteLayoutProps>;
90
+ children?: RouterRouteChildren;
91
+ }
92
+ export interface RouterTabBarItemProps extends RouterRouteProps {
93
+ path: string;
94
+ label: string;
95
+ icon: ReactNode;
96
+ }
97
+ export interface RouterDrawerItemProps extends RouterRouteProps {
98
+ path: string;
99
+ label: string;
100
+ icon?: ReactNode;
101
+ badge?: ReactNode;
102
+ hidden?: boolean;
103
+ }
104
+ export interface RouterDrawerProps extends RouterRouteProps {
105
+ /** Persistent content rendered to the right of the active Drawer route. */
106
+ aside?: ReactNode;
107
+ /** Persistent content anchored below the navigation items in the Drawer. */
108
+ footer?: ReactNode;
109
+ }
110
+ export interface RouterDrawerGroupProps extends RouterRouteProps {
111
+ label: string;
112
+ icon?: ReactNode;
113
+ chevron?: ReactNode;
114
+ hidden?: boolean;
115
+ }
116
+ export interface RouterDrawerSectionProps extends RouterRouteProps {
117
+ title: string;
118
+ hidden?: boolean;
119
+ }
120
+ export interface RouterSplitViewProps extends RouterRouteProps {
121
+ minWidth?: number;
122
+ primaryMaxWidth?: number;
123
+ secondaryMinWidth?: number;
124
+ }
125
+ export type RouterSplitViewSlotProps = RouterRouteProps;
126
+ export interface RouterProtectedProps extends RouterRouteProps {
127
+ when: RouterGuardValue<boolean>;
128
+ redirectTo: RouterGuardValue<string>;
129
+ }
130
+ export interface RouterRedirectProps extends RouterRouteProps {
131
+ to: RouterGuardValue<string>;
132
+ }
133
+ export interface RouterApi {
134
+ navigate: RouterNavigateFunction;
135
+ /** Replaces the active screen without adding a browser or router history entry. */
136
+ replace: RouterReplaceFunction;
137
+ close: (id: string) => void;
138
+ closeAll: () => void;
139
+ /** Closes the top overlay with animation or pops the active router stack. */
140
+ goBack: () => boolean;
141
+ }
142
+ export interface RouterDrawerApi {
143
+ isOpen: boolean;
144
+ open: () => void;
145
+ close: () => void;
146
+ toggle: () => void;
147
+ }
148
+ interface RouterRootProps {
149
+ children: ReactNode;
150
+ fallback?: ReactNode;
151
+ shell?: RouterShellMode;
152
+ }
153
+ export declare function useRoute(): RouterRouteContextValue;
154
+ export declare function useCurrentRoute(): RouterRouteContextValue;
155
+ export declare function useParams<TParams extends DefaultParams = DefaultParams>(): TParams;
156
+ export declare function useSearchParams(): URLSearchParams;
157
+ export declare function useHistoryState<TState = unknown>(): TState;
158
+ export declare function useRouter(): RouterApi;
159
+ export declare function useDrawer(): RouterDrawerApi;
160
+ export interface CurrentModalApi {
161
+ id: string;
162
+ index: number;
163
+ exiting: boolean;
164
+ /** Begin close: triggers the modal's exit animation. The modal calls `remove()` on animation complete. */
165
+ close: () => void;
166
+ /** Synchronously drop from the stack. Modal implementations use this after their exit animation finishes. */
167
+ remove: () => void;
168
+ }
169
+ export declare function useCurrentModal(): CurrentModalApi;
170
+ declare function RouterRoot(props: RouterRootProps): import("react/jsx-runtime").JSX.Element;
171
+ export declare const Router: typeof RouterRoot & {
172
+ Screen: ComponentType<RouterRouteProps>;
173
+ Stack: ComponentType<RouterRouteProps>;
174
+ Redirect: ComponentType<RouterRedirectProps>;
175
+ Modal: ComponentType<RouterRouteProps>;
176
+ Sheet: ComponentType<RouterRouteProps>;
177
+ TabBar: ComponentType<RouterRouteProps>;
178
+ TabBarItem: ComponentType<RouterTabBarItemProps>;
179
+ Drawer: ComponentType<RouterDrawerProps>;
180
+ DrawerGroup: ComponentType<RouterDrawerGroupProps>;
181
+ DrawerSection: ComponentType<RouterDrawerSectionProps>;
182
+ DrawerItem: ComponentType<RouterDrawerItemProps>;
183
+ SplitView: ComponentType<RouterSplitViewProps> & {
184
+ Primary: ComponentType<RouterRouteProps>;
185
+ Secondary: ComponentType<RouterRouteProps>;
186
+ };
187
+ Protected: ComponentType<RouterProtectedProps>;
188
+ };
189
+ export {};
190
+ //# sourceMappingURL=Router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Router.d.ts","sourceRoot":"","sources":["../src/Router.tsx"],"names":[],"mappings":"AAAA,OAAO,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I,CAAC;IAC5B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,6EAA6E;IAC7E,MAAM,EAAE,MAAM,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAUD,UAAU,eAAe;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB;AA8wDD,wBAAgB,QAAQ,IAAI,uBAAuB,CAMlD;AAED,wBAAgB,eAAe,IAAI,uBAAuB,CAEzD;AAED,wBAAgB,SAAS,CAAC,OAAO,SAAS,aAAa,GAAG,aAAa,KAAK,OAAO,CAElF;AAED,wBAAgB,eAAe,IAAI,eAAe,CAEjD;AAED,wBAAgB,eAAe,CAAC,MAAM,GAAG,OAAO,KAAK,MAAM,CAE1D;AAED,wBAAgB,SAAS,IAAI,SAAS,CA8BrC;AAED,wBAAgB,SAAS,IAAI,eAAe,CAM3C;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,0GAA0G;IAC1G,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,6GAA6G;IAC7G,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,eAAe,IAAI,eAAe,CAMjD;AA41DD,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,2CAUzC;AAiCD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;CAcjB,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { type CSSProperties, type ReactNode } from 'react';
2
+ import type { RouterShellMode } from '../types';
3
+ export declare function useModalSwipeTarget(): (el: HTMLElement | null) => void;
4
+ type ModalPresentation = 'fullscreen' | 'content';
5
+ interface ModalProps {
6
+ children: ReactNode;
7
+ swipeToClose?: boolean;
8
+ ariaLabel?: string;
9
+ size?: 'regular' | 'wide';
10
+ /** 'content' sizes the surface to its content, floored at half the viewport. */
11
+ presentation?: ModalPresentation;
12
+ }
13
+ interface ModalFrameProps {
14
+ children: ReactNode;
15
+ open: boolean;
16
+ onRequestClose: () => void;
17
+ onExitComplete: () => void;
18
+ zIndex: number;
19
+ shell?: RouterShellMode;
20
+ contentSized?: boolean;
21
+ activeContentKey?: string;
22
+ }
23
+ export declare function ModalFrame({ children, open, onRequestClose, onExitComplete, zIndex, shell, contentSized, activeContentKey, }: ModalFrameProps): import("react/jsx-runtime").JSX.Element;
24
+ declare function ModalRoot({ children, swipeToClose, ariaLabel, size, presentation, }: ModalProps): import("react/jsx-runtime").JSX.Element;
25
+ interface ModalHeaderProps {
26
+ title?: string;
27
+ leftAction?: ReactNode;
28
+ rightAction?: ReactNode;
29
+ hideCloseButton?: boolean;
30
+ sticky?: boolean;
31
+ }
32
+ declare function ModalHeader({ title, leftAction, rightAction, hideCloseButton, sticky, }: ModalHeaderProps): import("react/jsx-runtime").JSX.Element;
33
+ interface ModalContentProps {
34
+ children: ReactNode;
35
+ className?: string;
36
+ }
37
+ declare function ModalContent({ children, className }: ModalContentProps): import("react/jsx-runtime").JSX.Element;
38
+ interface ModalScrollViewProps {
39
+ children: ReactNode;
40
+ className?: string;
41
+ style?: CSSProperties;
42
+ }
43
+ declare function ModalScrollView({ children, className, style }: ModalScrollViewProps): import("react/jsx-runtime").JSX.Element;
44
+ interface ModalFooterProps {
45
+ children: ReactNode;
46
+ className?: string;
47
+ }
48
+ declare function ModalFooter({ children, className }: ModalFooterProps): import("react/jsx-runtime").JSX.Element;
49
+ export declare const Modal: typeof ModalRoot & {
50
+ Header: typeof ModalHeader;
51
+ Content: typeof ModalContent;
52
+ ScrollView: typeof ModalScrollView;
53
+ Footer: typeof ModalFooter;
54
+ };
55
+ export {};
56
+ //# sourceMappingURL=Modal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAOf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAkBhD,wBAAgB,mBAAmB,IAAI,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAOtE;AAED,KAAK,iBAAiB,GAAG,YAAY,GAAG,SAAS,CAAC;AAElD,UAAU,UAAU;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B,gFAAgF;IAChF,YAAY,CAAC,EAAE,iBAAiB,CAAC;CAClC;AAcD,UAAU,eAAe;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,IAAI,EACJ,cAAc,EACd,cAAc,EACd,MAAM,EACN,KAA0B,EAC1B,YAAoB,EACpB,gBAA8C,GAC/C,EAAE,eAAe,2CA+EjB;AAED,iBAAS,SAAS,CAAC,EACjB,QAAQ,EACR,YAAmB,EACnB,SAAS,EACT,IAAgB,EAChB,YAA2B,GAC5B,EAAE,UAAU,2CAUZ;AAED,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,iBAAS,WAAW,CAAC,EACnB,KAAK,EACL,UAAU,EACV,WAAW,EACX,eAAe,EACf,MAAa,GACd,EAAE,gBAAgB,2CAelB;AAED,UAAU,iBAAiB;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,iBAAiB,2CAI/D;AAED,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,iBAAS,eAAe,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,oBAAoB,2CAW5E;AAED,UAAU,gBAAgB;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iBAAS,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,gBAAgB,2CAQ7D;AAED,eAAO,MAAM,KAAK;;;;;CAKhB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type ReactNode } from 'react';
2
+ export declare const DEFAULT_OVERLAY_CONTENT_KEY = "router-overlay-content:default";
3
+ export declare function OverlayContentScope({ contentKey, children, }: {
4
+ contentKey: string;
5
+ children: ReactNode;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ export declare function useOverlayContentKey(): string;
8
+ //# sourceMappingURL=OverlayContentScope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OverlayContentScope.d.ts","sourceRoot":"","sources":["../../src/components/OverlayContentScope.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,eAAO,MAAM,2BAA2B,mCAAmC,CAAC;AAI5E,wBAAgB,mBAAmB,CAAC,EAClC,UAAU,EACV,QAAQ,GACT,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,2CAMA;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C"}
@@ -0,0 +1,9 @@
1
+ interface RouterCloseButtonProps {
2
+ onPress: () => void;
3
+ disabled?: boolean;
4
+ tone?: 'default' | 'light';
5
+ ariaLabel?: string;
6
+ }
7
+ export declare function RouterCloseButton({ onPress, disabled, tone, ariaLabel, }: RouterCloseButtonProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=RouterCloseButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RouterCloseButton.d.ts","sourceRoot":"","sources":["../../src/components/RouterCloseButton.tsx"],"names":[],"mappings":"AAAA,UAAU,sBAAsB;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAeD,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,QAAQ,EACR,IAAgB,EAChB,SAAmB,GACpB,EAAE,sBAAsB,2CAoBxB"}
@@ -0,0 +1,53 @@
1
+ import { type CSSProperties, type ReactNode } from 'react';
2
+ import type { RouterShellMode } from '../types';
3
+ type SheetVariant = 'attached' | 'detached';
4
+ interface SheetProps {
5
+ children: ReactNode;
6
+ disableDismiss?: boolean;
7
+ onRequestClose?: () => void;
8
+ variant?: SheetVariant;
9
+ }
10
+ interface SheetFrameProps {
11
+ children: ReactNode;
12
+ open: boolean;
13
+ onRequestClose: () => void;
14
+ onExitComplete: () => void;
15
+ zIndex: number;
16
+ shell?: RouterShellMode;
17
+ activeContentKey?: string;
18
+ }
19
+ export declare function SheetFrame({ children, open, onRequestClose, onExitComplete, zIndex, shell, activeContentKey, }: SheetFrameProps): import("react/jsx-runtime").JSX.Element;
20
+ declare function SheetRoot({ children, disableDismiss, onRequestClose, variant, }: SheetProps): import("react/jsx-runtime").JSX.Element;
21
+ interface SheetHeaderProps {
22
+ title?: string;
23
+ leftAction?: ReactNode;
24
+ rightAction?: ReactNode;
25
+ hideCloseButton?: boolean;
26
+ sticky?: boolean;
27
+ align?: 'start' | 'center';
28
+ }
29
+ declare function SheetHeader({ title, leftAction, rightAction, hideCloseButton, sticky, align, }: SheetHeaderProps): import("react/jsx-runtime").JSX.Element;
30
+ interface SheetContentProps {
31
+ children: ReactNode;
32
+ className?: string;
33
+ }
34
+ declare function SheetContent({ children, className }: SheetContentProps): import("react/jsx-runtime").JSX.Element;
35
+ interface SheetScrollViewProps {
36
+ children: ReactNode;
37
+ className?: string;
38
+ style?: CSSProperties;
39
+ }
40
+ declare function SheetScrollView({ children, className, style }: SheetScrollViewProps): import("react/jsx-runtime").JSX.Element;
41
+ interface SheetFooterProps {
42
+ children: ReactNode;
43
+ className?: string;
44
+ }
45
+ declare function SheetFooter({ children, className }: SheetFooterProps): import("react/jsx-runtime").JSX.Element;
46
+ export declare const Sheet: typeof SheetRoot & {
47
+ Header: typeof SheetHeader;
48
+ Content: typeof SheetContent;
49
+ ScrollView: typeof SheetScrollView;
50
+ Footer: typeof SheetFooter;
51
+ };
52
+ export {};
53
+ //# sourceMappingURL=Sheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../src/components/Sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAOf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,KAAK,YAAY,GAAG,UA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B,2CAE/D;AAED,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,iBAAS,eAAe,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,oBAAoB,2CAgB5E;AAED,UAAU,gBAAgB;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iBAAS,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,gBAAgB,2CAa7D;AAED,eAAO,MAAM,KAAK;;;;;CAKhB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { type CSSProperties, type ReactNode } from 'react';
2
+ import type { RouterShellMode } from '../types';
3
+ export type SheetSurfaceMode = 'content' | 'fullscreen';
4
+ export type SheetSurfaceCloseTarget = 'surface' | 'viewport';
5
+ interface SheetSurfaceProps {
6
+ children: ReactNode;
7
+ open: boolean;
8
+ onRequestClose: () => void;
9
+ onExitComplete: () => void;
10
+ zIndex: number;
11
+ mode: SheetSurfaceMode;
12
+ canDismiss?: boolean;
13
+ swipeToClose?: boolean;
14
+ backdrop?: boolean;
15
+ backdropClassName?: string;
16
+ backdropStyle?: CSSProperties;
17
+ shellClassName?: string;
18
+ surfaceClassName: string;
19
+ surfaceStyle?: CSSProperties;
20
+ scrollElement?: HTMLElement | null;
21
+ ariaLabel?: string;
22
+ shell?: RouterShellMode;
23
+ closeTarget?: SheetSurfaceCloseTarget;
24
+ }
25
+ export declare function SheetSurface({ children, open, onRequestClose, onExitComplete, zIndex, mode, canDismiss, swipeToClose, backdrop, backdropClassName, backdropStyle, shellClassName, surfaceClassName, surfaceStyle, scrollElement, ariaLabel, shell, closeTarget, }: SheetSurfaceProps): import("react/jsx-runtime").JSX.Element;
26
+ export {};
27
+ //# sourceMappingURL=SheetSurface.d.ts.map
@@ -0,0 +1 @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AC1B,WAAuB,GACxB,EAAE,iBAAiB,2CAkJnB"}
@@ -0,0 +1,4 @@
1
+ export { Modal, ModalFrame, useModalSwipeTarget } from './Modal';
2
+ export { Sheet, SheetFrame } from './Sheet';
3
+ export { sheetDragStartsInInteractiveControl, sheetScrollAtTop, useSheetDragEngine, type SheetDragUpdate, } from './sheetDragEngine';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EACL,mCAAmC,EACnC,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,eAAe,GACrB,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function getPageScrollElement(): HTMLElement | null;
2
+ export declare function usePageScrollLock(active: boolean): void;
3
+ //# sourceMappingURL=pageScrollLock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pageScrollLock.d.ts","sourceRoot":"","sources":["../../src/components/pageScrollLock.ts"],"names":[],"mappings":"AAKA,wBAAgB,oBAAoB,IAAI,WAAW,GAAG,IAAI,CAMzD;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,QAmBhD"}
@@ -0,0 +1,27 @@
1
+ import { type RefObject } from 'react';
2
+ export declare const SHEET_DRAG_EPS = 0.5;
3
+ export declare const SHEET_DRAG_START_DISTANCE = 2;
4
+ export interface SheetDragUpdate {
5
+ clientY: number;
6
+ deltaY: number;
7
+ totalY: number;
8
+ velocityY: number;
9
+ event: TouchEvent | PointerEvent;
10
+ }
11
+ interface SheetDragEngineOptions<T extends HTMLElement> {
12
+ targetRef: RefObject<T | null>;
13
+ enabled: boolean;
14
+ minDragDistance?: number;
15
+ ignoreStartTarget?: (target: EventTarget | null) => boolean;
16
+ shouldStart: (update: SheetDragUpdate) => boolean;
17
+ onStart: (update: SheetDragUpdate) => void;
18
+ onMove: (update: SheetDragUpdate) => void;
19
+ onEnd: (update: SheetDragUpdate) => void;
20
+ suppressClickOnDrag?: boolean;
21
+ }
22
+ export declare function sheetScrollAtTop(el: HTMLElement | null): boolean;
23
+ export declare function sheetDragStartsInInteractiveControl(target: EventTarget | null): boolean;
24
+ export declare function sheetDragStartsInTextInput(target: EventTarget | null): boolean;
25
+ export declare function useSheetDragEngine<T extends HTMLElement = HTMLElement>({ targetRef, enabled, minDragDistance, ignoreStartTarget, shouldStart, onStart, onMove, onEnd, suppressClickOnDrag, }: SheetDragEngineOptions<T>): void;
26
+ export {};
27
+ //# sourceMappingURL=sheetDragEngine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheetDragEngine.d.ts","sourceRoot":"","sources":["../../src/components/sheetDragEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElD,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,UAAU,GAAG,YAAY,CAAC;CAClC;AAED,UAAU,sBAAsB,CAAC,CAAC,SAAS,WAAW;IACpD,SAAS,EAAE,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,KAAK,OAAO,CAAC;IAC5D,WAAW,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,OAAO,CAAC;IAClD,OAAO,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,MAAM,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC1C,KAAK,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IACzC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAEhE;AAED,wBAAgB,mCAAmC,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAOvF;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAO9E;AAED,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,EACtE,SAAS,EACT,OAAO,EACP,eAA2C,EAC3C,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,MAAM,EACN,KAAK,EACL,mBAA2B,GAC5B,EAAE,sBAAsB,CAAC,CAAC,CAAC,QA4M3B"}
@@ -0,0 +1,5 @@
1
+ export { Router, useCurrentModal, useCurrentRoute, useDrawer, useHistoryState, useParams, useRoute, useRouter, useSearchParams, type CurrentModalApi, type RouterDrawerApi, type RouterDrawerGroup, type RouterDrawerGroupProps, type RouterDrawerItem, type RouterDrawerItemProps, type RouterDrawerNode, type RouterDrawerSection, type RouterDrawerSectionProps, type RouterDrawerProps, type RouterApi, type RouterNavigateFunction, type RouterReplaceFunction, type RouterRedirectProps, type RouterRouteContextValue, type RouterRouteLayoutProps, type RouterProtectedProps, type RouterRouteRenderProps, type RouterScreenAnimation, type RouterSplitPane, type RouterSplitViewProps, type RouterSplitViewSlotProps, type RouterTabBarTab, } from './Router';
2
+ export type { RouterShellMode } from './types';
3
+ export type { RouterOverlayLayout } from './types';
4
+ export { Modal, ModalFrame } from './components';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,eAAe,EACf,eAAe,EACf,SAAS,EACT,eAAe,EACf,SAAS,EACT,QAAQ,EACR,SAAS,EACT,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,eAAe,GACrB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}