@sigx/lynx-navigation 0.1.3 → 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 (196) hide show
  1. package/README.md +189 -7
  2. package/dist/components/EntryScope.d.ts +1 -1
  3. package/dist/components/EntryScope.d.ts.map +1 -1
  4. package/dist/components/Layer.d.ts +34 -0
  5. package/dist/components/Layer.d.ts.map +1 -0
  6. package/dist/components/Link.d.ts +2 -2
  7. package/dist/components/Link.d.ts.map +1 -1
  8. package/dist/components/NavigationRoot.d.ts +2 -2
  9. package/dist/components/NavigationRoot.d.ts.map +1 -1
  10. package/dist/components/Screen.d.ts +6 -6
  11. package/dist/components/Screen.d.ts.map +1 -1
  12. package/dist/components/Stack.d.ts +83 -13
  13. package/dist/components/Stack.d.ts.map +1 -1
  14. package/dist/components/TabBar.d.ts +19 -20
  15. package/dist/components/TabBar.d.ts.map +1 -1
  16. package/dist/components/Tabs.d.ts +30 -21
  17. package/dist/components/Tabs.d.ts.map +1 -1
  18. package/dist/define-routes.d.ts +1 -1
  19. package/dist/define-routes.d.ts.map +1 -1
  20. package/dist/hooks/use-focus.d.ts.map +1 -1
  21. package/dist/hooks/use-hardware-back.d.ts +9 -2
  22. package/dist/hooks/use-hardware-back.d.ts.map +1 -1
  23. package/dist/hooks/use-linking-nav.d.ts +3 -3
  24. package/dist/hooks/use-linking-nav.d.ts.map +1 -1
  25. package/dist/hooks/use-nav-internal.d.ts +21 -3
  26. package/dist/hooks/use-nav-internal.d.ts.map +1 -1
  27. package/dist/hooks/use-nav-serializer.d.ts +1 -1
  28. package/dist/hooks/use-nav-serializer.d.ts.map +1 -1
  29. package/dist/hooks/use-nav.d.ts +38 -3
  30. package/dist/hooks/use-nav.d.ts.map +1 -1
  31. package/dist/hooks/use-params.d.ts +1 -1
  32. package/dist/hooks/use-params.d.ts.map +1 -1
  33. package/dist/hooks/use-screen-chrome.d.ts +19 -0
  34. package/dist/hooks/use-screen-chrome.d.ts.map +1 -0
  35. package/dist/hooks/use-screen-options.d.ts +1 -1
  36. package/dist/hooks/use-screen-options.d.ts.map +1 -1
  37. package/dist/hooks/use-search.d.ts +1 -1
  38. package/dist/hooks/use-search.d.ts.map +1 -1
  39. package/dist/href.d.ts +2 -2
  40. package/dist/href.d.ts.map +1 -1
  41. package/dist/index.d.ts +33 -31
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +1160 -29
  44. package/dist/index.js.map +1 -1
  45. package/dist/internal/layer-plan.d.ts +69 -0
  46. package/dist/internal/layer-plan.d.ts.map +1 -0
  47. package/dist/internal/screen-registry.d.ts +1 -1
  48. package/dist/internal/screen-registry.d.ts.map +1 -1
  49. package/dist/internal/screen-width.d.ts +9 -7
  50. package/dist/internal/screen-width.d.ts.map +1 -1
  51. package/dist/navigator/core.d.ts +31 -4
  52. package/dist/navigator/core.d.ts.map +1 -1
  53. package/dist/register.d.ts +1 -1
  54. package/dist/register.d.ts.map +1 -1
  55. package/dist/url/index.d.ts +6 -6
  56. package/dist/url/index.d.ts.map +1 -1
  57. package/dist/url/parse.d.ts +1 -1
  58. package/dist/url/parse.d.ts.map +1 -1
  59. package/dist/url/registry.d.ts +2 -2
  60. package/dist/url/registry.d.ts.map +1 -1
  61. package/dist/url/validate.d.ts +1 -1
  62. package/dist/url/validate.d.ts.map +1 -1
  63. package/package.json +11 -10
  64. package/src/components/Drawer.d.ts +55 -0
  65. package/src/components/EdgeBackHandle.d.ts +1 -0
  66. package/src/components/EdgeBackHandle.tsx +2 -2
  67. package/{dist/components/EntryScope.js → src/components/EntryScope.d.ts} +7 -15
  68. package/src/components/EntryScope.tsx +15 -4
  69. package/src/components/Header.d.ts +6 -0
  70. package/src/components/Header.tsx +3 -3
  71. package/src/components/Layer.d.ts +33 -0
  72. package/src/components/Layer.tsx +96 -0
  73. package/src/components/Link.d.ts +60 -0
  74. package/src/components/Link.tsx +4 -4
  75. package/src/components/NavigationRoot.d.ts +36 -0
  76. package/src/components/NavigationRoot.tsx +6 -6
  77. package/src/components/Screen.d.ts +97 -0
  78. package/src/components/Screen.tsx +13 -11
  79. package/src/components/Stack.d.ts +90 -0
  80. package/src/components/Stack.tsx +333 -92
  81. package/src/components/TabBar.d.ts +38 -0
  82. package/src/components/TabBar.tsx +22 -22
  83. package/src/components/Tabs.d.ts +109 -0
  84. package/src/components/Tabs.tsx +54 -22
  85. package/{dist/define-routes.js → src/define-routes.d.ts} +2 -4
  86. package/src/define-routes.ts +1 -1
  87. package/{dist/hooks/use-focus.js → src/hooks/use-focus.d.ts} +3 -39
  88. package/src/hooks/use-focus.ts +9 -3
  89. package/src/hooks/use-hardware-back.d.ts +37 -0
  90. package/src/hooks/use-hardware-back.ts +43 -9
  91. package/src/hooks/use-linking-nav.d.ts +91 -0
  92. package/src/hooks/use-linking-nav.ts +4 -4
  93. package/src/hooks/use-nav-internal.d.ts +91 -0
  94. package/src/hooks/use-nav-internal.ts +24 -3
  95. package/src/hooks/use-nav-serializer.d.ts +82 -0
  96. package/src/hooks/use-nav-serializer.ts +3 -3
  97. package/src/hooks/use-nav.d.ts +111 -0
  98. package/src/hooks/use-nav.ts +40 -3
  99. package/{dist/hooks/use-params.js → src/hooks/use-params.d.ts} +2 -6
  100. package/src/hooks/use-params.ts +2 -2
  101. package/src/hooks/use-screen-chrome.d.ts +18 -0
  102. package/src/hooks/use-screen-chrome.ts +122 -0
  103. package/src/hooks/use-screen-options.d.ts +2 -0
  104. package/src/hooks/use-screen-options.ts +3 -3
  105. package/{dist/hooks/use-search.js → src/hooks/use-search.d.ts} +2 -6
  106. package/src/hooks/use-search.ts +2 -2
  107. package/src/href.d.ts +54 -0
  108. package/src/href.ts +6 -6
  109. package/src/index.d.ts +39 -0
  110. package/src/index.ts +33 -31
  111. package/src/internal/layer-plan.d.ts +68 -0
  112. package/src/internal/layer-plan.ts +187 -0
  113. package/{dist/internal/screen-registry.js → src/internal/screen-registry.d.ts} +21 -32
  114. package/src/internal/screen-registry.ts +1 -1
  115. package/src/internal/screen-width.d.ts +17 -0
  116. package/src/internal/screen-width.ts +22 -14
  117. package/src/navigator/core.d.ts +96 -0
  118. package/src/navigator/core.ts +90 -10
  119. package/src/register.d.ts +37 -0
  120. package/src/register.ts +1 -1
  121. package/src/types.d.ts +217 -0
  122. package/src/url/build.d.ts +15 -0
  123. package/src/url/build.ts +2 -2
  124. package/src/url/compile.d.ts +34 -0
  125. package/src/url/format.d.ts +28 -0
  126. package/src/url/index.ts +6 -6
  127. package/src/url/parse.d.ts +20 -0
  128. package/src/url/parse.ts +6 -6
  129. package/{dist/url/registry.js → src/url/registry.d.ts} +12 -28
  130. package/src/url/registry.ts +3 -3
  131. package/src/url/validate.d.ts +23 -0
  132. package/src/url/validate.ts +1 -1
  133. package/dist/components/Drawer.js +0 -74
  134. package/dist/components/Drawer.js.map +0 -1
  135. package/dist/components/EdgeBackHandle.js +0 -144
  136. package/dist/components/EdgeBackHandle.js.map +0 -1
  137. package/dist/components/EntryScope.js.map +0 -1
  138. package/dist/components/Header.js +0 -103
  139. package/dist/components/Header.js.map +0 -1
  140. package/dist/components/Link.js +0 -51
  141. package/dist/components/Link.js.map +0 -1
  142. package/dist/components/NavigationRoot.js +0 -67
  143. package/dist/components/NavigationRoot.js.map +0 -1
  144. package/dist/components/Screen.js +0 -94
  145. package/dist/components/Screen.js.map +0 -1
  146. package/dist/components/ScreenContainer.d.ts +0 -18
  147. package/dist/components/ScreenContainer.d.ts.map +0 -1
  148. package/dist/components/ScreenContainer.js +0 -77
  149. package/dist/components/ScreenContainer.js.map +0 -1
  150. package/dist/components/Stack.js +0 -75
  151. package/dist/components/Stack.js.map +0 -1
  152. package/dist/components/TabBar.js +0 -63
  153. package/dist/components/TabBar.js.map +0 -1
  154. package/dist/components/Tabs.js +0 -140
  155. package/dist/components/Tabs.js.map +0 -1
  156. package/dist/define-routes.js.map +0 -1
  157. package/dist/hooks/use-focus.js.map +0 -1
  158. package/dist/hooks/use-hardware-back.js +0 -50
  159. package/dist/hooks/use-hardware-back.js.map +0 -1
  160. package/dist/hooks/use-linking-nav.js +0 -109
  161. package/dist/hooks/use-linking-nav.js.map +0 -1
  162. package/dist/hooks/use-nav-internal.js +0 -44
  163. package/dist/hooks/use-nav-internal.js.map +0 -1
  164. package/dist/hooks/use-nav-serializer.js +0 -181
  165. package/dist/hooks/use-nav-serializer.js.map +0 -1
  166. package/dist/hooks/use-nav.js +0 -11
  167. package/dist/hooks/use-nav.js.map +0 -1
  168. package/dist/hooks/use-params.js.map +0 -1
  169. package/dist/hooks/use-screen-options.js +0 -43
  170. package/dist/hooks/use-screen-options.js.map +0 -1
  171. package/dist/hooks/use-search.js.map +0 -1
  172. package/dist/href.js +0 -57
  173. package/dist/href.js.map +0 -1
  174. package/dist/internal/screen-registry.js.map +0 -1
  175. package/dist/internal/screen-width.js +0 -30
  176. package/dist/internal/screen-width.js.map +0 -1
  177. package/dist/navigator/core.js +0 -344
  178. package/dist/navigator/core.js.map +0 -1
  179. package/dist/register.js +0 -2
  180. package/dist/register.js.map +0 -1
  181. package/dist/types.js +0 -9
  182. package/dist/types.js.map +0 -1
  183. package/dist/url/build.js +0 -30
  184. package/dist/url/build.js.map +0 -1
  185. package/dist/url/compile.js +0 -83
  186. package/dist/url/compile.js.map +0 -1
  187. package/dist/url/format.js +0 -102
  188. package/dist/url/format.js.map +0 -1
  189. package/dist/url/index.js +0 -13
  190. package/dist/url/index.js.map +0 -1
  191. package/dist/url/parse.js +0 -94
  192. package/dist/url/parse.js.map +0 -1
  193. package/dist/url/registry.js.map +0 -1
  194. package/dist/url/validate.js +0 -37
  195. package/dist/url/validate.js.map +0 -1
  196. package/src/components/ScreenContainer.tsx +0 -114
@@ -3,13 +3,20 @@
3
3
  *
4
4
  * Listens for `hardwareBackPress` events from `@sigx/lynx-linking`'s
5
5
  * `BackHandler` (which the native side dispatches from
6
- * `MainActivity.onBackPressed`). On press:
6
+ * `MainActivity.onBackPressed`). On press the handler walks to the
7
+ * deepest currently-focused navigator (per-tab `<Stack>`s register with
8
+ * their parent), then walks back up the `parent` chain looking for the
9
+ * first nav that `canGoBack`:
7
10
  *
8
- * - If `nav.canGoBack` → `nav.pop()`.
11
+ * - If any nav in the chain can go back → `nav.pop()` on that nav.
9
12
  * - Otherwise → `BackHandler.exitApp()` (Android: `moveTaskToBack(true)`,
10
13
  * keeps the bundle warm; iOS: rejects, since iOS doesn't permit
11
14
  * programmatic termination).
12
15
  *
16
+ * The traversal means you only need to call this once at the root — a
17
+ * back press from inside a tab pops that tab's nested stack first, only
18
+ * exiting the app once every level is at its base entry.
19
+ *
13
20
  * Call this once in any component under `<NavigationRoot>` (typically a
14
21
  * thin wrapper sibling to `<Stack />`). iOS doesn't fire the event so the
15
22
  * hook is a no-op there.
@@ -1 +1 @@
1
- {"version":3,"file":"use-hardware-back.d.ts","sourceRoot":"","sources":["../../src/hooks/use-hardware-back.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAgBtC"}
1
+ {"version":3,"file":"use-hardware-back.d.ts","sourceRoot":"","sources":["../../src/hooks/use-hardware-back.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,eAAe,IAAI,IAAI,CA2CtC"}
@@ -1,6 +1,6 @@
1
- import { type Href } from '../href.js';
2
- import { type Nav } from './use-nav.js';
3
- import type { RouteMap } from '../types.js';
1
+ import { type Href } from '../href';
2
+ import { type Nav } from './use-nav';
3
+ import type { RouteMap } from '../types';
4
4
  export interface UseLinkingNavOptions {
5
5
  /**
6
6
  * Schemes/prefixes to strip before parsing. Matched in order; the first
@@ -1 +1 @@
1
- {"version":3,"file":"use-linking-nav.d.ts","sourceRoot":"","sources":["../../src/hooks/use-linking-nav.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAU,KAAK,GAAG,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AE,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAExC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAEpC;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,aAAa,CAAC,IAAI,GAAE,oBAAyB,GAAG,IAAI,CA0BnE;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CASrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC3B,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,QAAQ,EAChB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,MAAM,GAAG,SAAS,GACzB,IAAI,CAkBN"}
@@ -1,6 +1,6 @@
1
1
  import { type SharedValue } from '@sigx/lynx';
2
- import type { ScreenRegistry } from '../internal/screen-registry.js';
3
- import type { RouteMap, StackEntry } from '../types.js';
2
+ import type { ScreenRegistry } from '../internal/screen-registry';
3
+ import type { RouteMap, StackEntry } from '../types';
4
4
  /**
5
5
  * Internal injectable: the `StackEntry` the calling screen was rendered for.
6
6
  *
@@ -13,6 +13,17 @@ import type { RouteMap, StackEntry } from '../types.js';
13
13
  * navigator surfaces a clear error rather than silently returning `false`.
14
14
  */
15
15
  export declare const useCurrentEntry: import("@sigx/runtime-core").InjectableFunction<StackEntry<string, unknown, unknown>>;
16
+ /**
17
+ * Soft companion to {@link useCurrentEntry} — returns the current scope's
18
+ * entry if any, `null` when called outside an `<EntryScope>` instead of
19
+ * throwing. Provided alongside the strict version by `<EntryScope>`.
20
+ *
21
+ * Used by chrome consumers (`useScreenChrome`) where "no scoped entry"
22
+ * is a legitimate state (a Stack chrome slot lives outside the screen's
23
+ * EntryScope) and the caller wants to soft-fallback to the navigator's
24
+ * destination entry rather than crash.
25
+ */
26
+ export declare const useCurrentEntryOptional: import("@sigx/runtime-core").InjectableFunction<StackEntry<string, unknown, unknown> | null>;
16
27
  /**
17
28
  * Internal injectable: the route registry passed into `<NavigationRoot>`.
18
29
  * Components (Stack, Screen) read this to look up route definitions by name.
@@ -53,7 +64,14 @@ export interface NavInternals {
53
64
  */
54
65
  readonly screens: {
55
66
  register(registry: ScreenRegistry): void;
56
- unregister(entryKey: string): void;
67
+ /**
68
+ * Identity-checked: only removes the entry if `registry` is the
69
+ * one currently registered under its `entry.key`. A no-op when
70
+ * a newer registry has already taken that slot (which happens
71
+ * at the transition→idle handoff, where a fresh `<EntryScope>`
72
+ * for the same entry mounts before the old one's unmount fires).
73
+ */
74
+ unregister(registry: ScreenRegistry): void;
57
75
  get(entryKey: string): ScreenRegistry | undefined;
58
76
  };
59
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"use-nav-internal.d.ts","sourceRoot":"","sources":["../../src/hooks/use-nav-internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAExD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,uFAI1B,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,2DAIvB,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IACzB,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAC9C;;;;OAIG;IACH,gBAAgB,IAAI,IAAI,CAAC;IACzB,iEAAiE;IACjE,iBAAiB,IAAI,IAAI,CAAC;IAC1B,iEAAiE;IACjE,iBAAiB,IAAI,IAAI,CAAC;IAC1B,+DAA+D;IAC/D,QAA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EAAE,cAAc,GAAG,IAAI,CAAC;QACzC;;;;;;WAMG;QACH,UAAU,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;QAC3C,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAAC;KACrD,CAAC;CACL;AAED,eAAO,MAAM,eAAe,+DAI1B,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,iEAI5B,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { StackEntry } from '../types.js';
1
+ import type { StackEntry } from '../types';
2
2
  /**
3
3
  * Plain JSON snapshot of a navigator. The whole point of holding navigation
4
4
  * state in signals is that this is a one-liner — `JSON.stringify(nav.stack)`.
@@ -1 +1 @@
1
- {"version":3,"file":"use-nav-serializer.d.ts","sourceRoot":"","sources":["../../src/hooks/use-nav-serializer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,UAAU,EAAE,CAAC;CACvB;AAED,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,iBAAiB;IAC9B,IAAI,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,WAAW,GAAG,IAAI,CAAC;IACzD,IAAI,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,uBAAuB;IACpC,OAAO,EAAE,iBAAiB,CAAC;IAC3B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7C;;;OAGG;IACH,cAAc,CAAC,EAAE,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{ RegisteredRoutes, RouteId, RouteParams, RouteSearch } from '../register.js';
2
- import type { PopOptions, PushOptions, RouteRequiresParams, StackEntry, TransitionState } from '../types.js';
1
+ import type { RegisteredRoutes, RouteId, RouteParams, RouteSearch } from '../register';
2
+ import type { PopOptions, PushOptions, RouteRequiresParams, StackEntry, TransitionState } from '../types';
3
3
  /**
4
4
  * Subset of registered route names that declare a `params` schema (and so
5
5
  * require a `params` argument when navigating).
@@ -57,8 +57,43 @@ export interface Nav {
57
57
  readonly stack: ReadonlyArray<StackEntry>;
58
58
  /** Whether the user can go back from the current entry. Reactive. */
59
59
  readonly canGoBack: boolean;
60
- /** Parent navigator (e.g. the Tabs above this Stack), or null at the root. */
60
+ /**
61
+ * Parent navigator (e.g. the root nav above a per-tab `<Stack>`), or null
62
+ * at the root. Set when a `<Stack>` mints its own navigator via
63
+ * `<Stack initialRoute="…">` — that stack's `useNav()` returns a nav
64
+ * whose `parent` is the enclosing nav.
65
+ *
66
+ * `push` calls for routes whose resolved presentation is non-`card`
67
+ * (`modal` / `fullScreen` / `transparent-modal`) escalate up the
68
+ * `parent` chain automatically — you don't normally need to reach
69
+ * through `parent` to present modals. `parent` is exposed as an escape
70
+ * hatch for power users (e.g. imperative `parent.pop()` from a child
71
+ * stack). Avoid pushing card routes onto `parent` directly — that
72
+ * defeats per-tab stack isolation.
73
+ */
61
74
  readonly parent: Nav | null;
75
+ /**
76
+ * Whether this navigator is part of the currently-focused chain. True
77
+ * for the root nav at all times; for a nested nav (e.g. a per-tab
78
+ * stack), true only when its host entry is the top of `parent`, the
79
+ * parent itself is locally focused, and any extra gate (e.g. the
80
+ * enclosing tab is active) reports active.
81
+ *
82
+ * Reactive. `useIsFocused()` ANDs `nav.current.key === myKey` with
83
+ * `nav.isLocallyFocused`.
84
+ */
85
+ readonly isLocallyFocused: boolean;
86
+ /**
87
+ * @internal
88
+ * Set of child navigators (per-tab `<Stack>` instances) that have
89
+ * registered themselves under this nav. Used by `useHardwareBack` to
90
+ * find the deepest currently-focused nav and route the back press
91
+ * there before falling back up the chain.
92
+ *
93
+ * Not part of the public API — leading-underscore marks it as
94
+ * implementation detail.
95
+ */
96
+ readonly _children: Set<Nav>;
62
97
  /**
63
98
  * In-flight transition, or null when navigation is at rest. Reactive —
64
99
  * `<Stack>` reads this to decide whether to render one screen or two
@@ -1 +1 @@
1
- {"version":3,"file":"use-nav.d.ts","sourceRoot":"","sources":["../../src/hooks/use-nav.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC1F,OAAO,KAAK,EACR,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,UAAU,EACV,eAAe,EAClB,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,gBAAgB,GAAG;KAC1B,CAAC,IAAI,OAAO,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,CAAC,GAAG,KAAK;CACpF,CAAC,OAAO,CAAC,CAAC;AAEX,mDAAmD;AACnD,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AAErE;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,GAAG;IAChB,8CAA8C;IAC9C,IAAI,CAAC,CAAC,SAAS,mBAAmB,EAC9B,IAAI,EAAE,CAAC,EACP,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,EACvB,OAAO,CAAC,EAAE,WAAW,GACtB,IAAI,CAAC;IACR,yCAAyC;IACzC,IAAI,CAAC,CAAC,SAAS,gBAAgB,EAC3B,IAAI,EAAE,CAAC,EACP,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,EACtB,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,EACvB,OAAO,CAAC,EAAE,WAAW,GACtB,IAAI,CAAC;IAER,6DAA6D;IAC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AW,CAAC,CAAC,CAAC,EACvB,OAAO,CAAC,EAAE,WAAW,GACtB,IAAI,CAAC;IAER,wDAAwD;IACxD,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAEhD,uDAAuD;IACvD,KAAK,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;IAExC,yCAAyC;IACzC,SAAS,IAAI,IAAI,CAAC;IAElB,mCAAmC;IACnC,KAAK,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,aAAa,CAAC,UAAU,CAAC,CAAA;KAAE,GAAG,IAAI,CAAC;IAEzD,8DAA8D;IAC9D,OAAO,IAAI,IAAI,CAAC;IAEhB,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAE7B,sCAAsC;IACtC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IAE1C,qEAAqE;IACrE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAE5B;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAAC;IAE5B;;;;;;;;;OASG;IACH,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IAEnC;;;;;;;;;OASG;IACH,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IAE7B;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI,CAAC;CAC/C;AAED;;;;;GAKG;AACH,eAAO,MAAM,MAAM,sDAIjB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { RouteId, RouteParams } from '../register.js';
1
+ import type { RouteId, RouteParams } from '../register';
2
2
  /**
3
3
  * Read the typed params for the current screen, asserted against the named
4
4
  * route from the registry.
@@ -1 +1 @@
1
- {"version":3,"file":"use-params.d.ts","sourceRoot":"","sources":["../../src/hooks/use-params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG3D;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAGrE"}
1
+ {"version":3,"file":"use-params.d.ts","sourceRoot":"","sources":["../../src/hooks/use-params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGxD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAGrE"}
@@ -0,0 +1,19 @@
1
+ import type { ScreenSlotFills } from '../types';
2
+ export interface ScreenChrome {
3
+ /** Resolved screen title — `options.title` (string or getter) or the route name as fallback. Reactive. */
4
+ readonly title: string;
5
+ /** Whether the header should render. Defaults to true unless the screen set `headerShown: false`. Reactive. */
6
+ readonly headerShown: boolean;
7
+ /** True when the current stack has more than one entry — i.e. there's something to pop back to. Reactive. */
8
+ readonly canGoBack: boolean;
9
+ /** Pop the top entry. No-op when `!canGoBack`. */
10
+ pop(): void;
11
+ /** Full header override slot, if `<Screen.Header>` was set. Render its return value in place of the default layout. */
12
+ readonly header: ScreenSlotFills['header'] | undefined;
13
+ /** Left-aligned slot (typically a back button). Reactive. */
14
+ readonly headerLeft: ScreenSlotFills['headerLeft'] | undefined;
15
+ /** Right-aligned slot (typically actions). Reactive. */
16
+ readonly headerRight: ScreenSlotFills['headerRight'] | undefined;
17
+ }
18
+ export declare function useScreenChrome(): ScreenChrome;
19
+ //# sourceMappingURL=use-screen-chrome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-screen-chrome.d.ts","sourceRoot":"","sources":["../../src/hooks/use-screen-chrome.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,eAAe,EAAc,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,YAAY;IACzB,0GAA0G;IAC1G,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,+GAA+G;IAC/G,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,6GAA6G;IAC7G,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,kDAAkD;IAClD,GAAG,IAAI,IAAI,CAAC;IACZ,uHAAuH;IACvH,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;IACvD,6DAA6D;IAC7D,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;IAC/D,wDAAwD;IACxD,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAC,aAAa,CAAC,GAAG,SAAS,CAAC;CACpE;AAED,wBAAgB,eAAe,IAAI,YAAY,CAuE9C"}
@@ -1,3 +1,3 @@
1
- import type { ScreenOptions } from '../types.js';
1
+ import type { ScreenOptions } from '../types';
2
2
  export declare function useScreenOptions(optionsOrFn: ScreenOptions | (() => ScreenOptions)): void;
3
3
  //# sourceMappingURL=use-screen-options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-screen-options.d.ts","sourceRoot":"","sources":["../../src/hooks/use-screen-options.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,wBAAgB,gBAAgB,CAC5B,WAAW,EAAE,aAAa,GAAG,CAAC,MAAM,aAAa,CAAC,GACnD,IAAI,CAiBN"}
1
+ {"version":3,"file":"use-screen-options.d.ts","sourceRoot":"","sources":["../../src/hooks/use-screen-options.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,wBAAgB,gBAAgB,CAC5B,WAAW,EAAE,aAAa,GAAG,CAAC,MAAM,aAAa,CAAC,GACnD,IAAI,CAiBN"}
@@ -1,4 +1,4 @@
1
- import type { RouteId, RouteSearch } from '../register.js';
1
+ import type { RouteId, RouteSearch } from '../register';
2
2
  /**
3
3
  * Read the typed search/query params for the current screen, asserted against
4
4
  * the named route from the registry.
@@ -1 +1 @@
1
- {"version":3,"file":"use-search.d.ts","sourceRoot":"","sources":["../../src/hooks/use-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG3D;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAGrE"}
1
+ {"version":3,"file":"use-search.d.ts","sourceRoot":"","sources":["../../src/hooks/use-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGxD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAGrE"}
package/dist/href.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { RouteId, RouteParams, RouteSearch } from './register.js';
2
- import type { RoutesWithoutParams, RoutesWithParams } from './hooks/use-nav.js';
1
+ import type { RouteId, RouteParams, RouteSearch } from './register';
2
+ import type { RoutesWithoutParams, RoutesWithParams } from './hooks/use-nav';
3
3
  /**
4
4
  * A typed reference to a navigation target — what `<Link to={...}>` consumes
5
5
  * and what `hrefFor()` produces.
@@ -1 +1 @@
1
- {"version":3,"file":"href.d.ts","sourceRoot":"","sources":["../src/href.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAA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AAC,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAChC,mEAAmE;IACnE,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,mBAAmB,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AAClG,wBAAgB,OAAO,CAAC,CAAC,SAAS,gBAAgB,EAC9C,IAAI,EAAE,CAAC,EACP,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,EACtB,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GACxB,IAAI,CAAC,CAAC,CAAC,CAAC;AAkDX;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAElD"}
package/dist/index.d.ts CHANGED
@@ -4,35 +4,37 @@
4
4
  * Phase 0.1 (current): typed registry, stack runtime, NavigationRoot + Stack.
5
5
  * Coming next: Screen with slot-based header API, MTS transitions, Tabs.
6
6
  */
7
- export { defineRoutes } from './define-routes.js';
8
- export type { Register, RegisteredRoutes, RouteId, RouteParams, RouteSearch } from './register.js';
9
- export { useNav } from './hooks/use-nav.js';
10
- export type { Nav, RoutesWithoutParams, RoutesWithParams } from './hooks/use-nav.js';
11
- export { useParams } from './hooks/use-params.js';
12
- export { useSearch } from './hooks/use-search.js';
13
- export { useHardwareBack } from './hooks/use-hardware-back.js';
14
- export { useLinkingNav } from './hooks/use-linking-nav.js';
15
- export type { UseLinkingNavOptions } from './hooks/use-linking-nav.js';
16
- export { useIsFocused, useFocusEffect } from './hooks/use-focus.js';
17
- export { useScreenOptions } from './hooks/use-screen-options.js';
18
- export { useNavSerializer, NAV_SNAPSHOT_VERSION, } from './hooks/use-nav-serializer.js';
19
- export type { NavSnapshot, NavStorageAdapter, UseNavSerializerOptions, } from './hooks/use-nav-serializer.js';
20
- export { hrefFor, parseHref } from './href.js';
21
- export type { Href } from './href.js';
22
- export { _setRouteRegistry, _clearRouteRegistry } from './url/registry.js';
23
- export { compilePath } from './url/compile.js';
24
- export type { CompiledPath } from './url/compile.js';
25
- export { NavigationRoot } from './components/NavigationRoot.js';
26
- export { Stack } from './components/Stack.js';
27
- export { Screen } from './components/Screen.js';
28
- export { Header } from './components/Header.js';
29
- export { Tabs, useTabs } from './components/Tabs.js';
30
- export type { TabInfo, TabsNav } from './components/Tabs.js';
31
- export { TabBar } from './components/TabBar.js';
32
- export type { TabRenderContext } from './components/TabBar.js';
33
- export { Drawer, useDrawer } from './components/Drawer.js';
34
- export type { DrawerNav } from './components/Drawer.js';
35
- export { Link } from './components/Link.js';
36
- export type { LinkProps } from './components/Link.js';
37
- export type { ComponentLike, EmptyParams, InferOutput, ParamsOf, PopOptions, Presentation, PushOptions, RouteDefinition, RouteMap, RouteRequiresParams, ScreenOptions, ScreenSlotFills, SearchOf, StackEntry, StandardSchemaV1, TransitionKind, TransitionRole, TransitionState, } from './types.js';
7
+ export { defineRoutes } from './define-routes';
8
+ export type { Register, RegisteredRoutes, RouteId, RouteParams, RouteSearch } from './register';
9
+ export { useNav } from './hooks/use-nav';
10
+ export type { Nav, RoutesWithoutParams, RoutesWithParams } from './hooks/use-nav';
11
+ export { useParams } from './hooks/use-params';
12
+ export { useSearch } from './hooks/use-search';
13
+ export { useHardwareBack } from './hooks/use-hardware-back';
14
+ export { useLinkingNav } from './hooks/use-linking-nav';
15
+ export type { UseLinkingNavOptions } from './hooks/use-linking-nav';
16
+ export { useIsFocused, useFocusEffect } from './hooks/use-focus';
17
+ export { useScreenOptions } from './hooks/use-screen-options';
18
+ export { useScreenChrome } from './hooks/use-screen-chrome';
19
+ export type { ScreenChrome } from './hooks/use-screen-chrome';
20
+ export { useNavSerializer, NAV_SNAPSHOT_VERSION, } from './hooks/use-nav-serializer';
21
+ export type { NavSnapshot, NavStorageAdapter, UseNavSerializerOptions, } from './hooks/use-nav-serializer';
22
+ export { hrefFor, parseHref } from './href';
23
+ export type { Href } from './href';
24
+ export { _setRouteRegistry, _clearRouteRegistry } from './url/registry';
25
+ export { compilePath } from './url/compile';
26
+ export type { CompiledPath } from './url/compile';
27
+ export { NavigationRoot } from './components/NavigationRoot';
28
+ export { Stack } from './components/Stack';
29
+ export { Screen } from './components/Screen';
30
+ export { Header } from './components/Header';
31
+ export { Tabs, useTabs } from './components/Tabs';
32
+ export type { TabInfo, TabsNav } from './components/Tabs';
33
+ export { TabBar } from './components/TabBar';
34
+ export type { TabRenderContext } from './components/TabBar';
35
+ export { Drawer, useDrawer } from './components/Drawer';
36
+ export type { DrawerNav } from './components/Drawer';
37
+ export { Link } from './components/Link';
38
+ export type { LinkProps } from './components/Link';
39
+ export type { ComponentLike, EmptyParams, InferOutput, ParamsOf, PopOptions, Presentation, PushOptions, RouteDefinition, RouteMap, RouteRequiresParams, ScreenOptions, ScreenSlotFills, SearchOf, StackEntry, StandardSchemaV1, TransitionKind, TransitionRole, TransitionState, } from './types';
38
40
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,YAAY,EAAE,GAAG,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,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