@marktiderman/genesis-native 0.1.0 → 0.3.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 (87) hide show
  1. package/README.md +354 -10
  2. package/dist/block-C5-noMhB.d.ts +223 -0
  3. package/dist/blocks-a1YQ1Elf.d.ts +1540 -0
  4. package/dist/chunk-65P7RU4V.js +49 -0
  5. package/dist/chunk-65P7RU4V.js.map +1 -0
  6. package/dist/chunk-6BT4PTGH.js +37 -0
  7. package/dist/chunk-6BT4PTGH.js.map +1 -0
  8. package/dist/chunk-75YP72G6.js +374 -0
  9. package/dist/chunk-75YP72G6.js.map +1 -0
  10. package/dist/chunk-NGYNYJPL.js +90 -0
  11. package/dist/chunk-NGYNYJPL.js.map +1 -0
  12. package/dist/chunk-VKTIHNAV.js +95 -0
  13. package/dist/chunk-VKTIHNAV.js.map +1 -0
  14. package/dist/{chunk-MMTPWUWI.js → chunk-VTJDIKFC.js} +9 -6
  15. package/dist/chunk-VTJDIKFC.js.map +1 -0
  16. package/dist/chunk-XE7LC7K6.js +29 -0
  17. package/dist/chunk-XE7LC7K6.js.map +1 -0
  18. package/dist/dev-warnings.d.ts +34 -0
  19. package/dist/dev-warnings.js +15 -0
  20. package/dist/dev-warnings.js.map +1 -0
  21. package/dist/devtools.d.ts +144 -0
  22. package/dist/devtools.js +390 -0
  23. package/dist/devtools.js.map +1 -0
  24. package/dist/index.d.ts +12 -368
  25. package/dist/index.js +88 -191
  26. package/dist/index.js.map +1 -1
  27. package/dist/observability.d.ts +170 -0
  28. package/dist/observability.js +123 -0
  29. package/dist/observability.js.map +1 -0
  30. package/dist/persist.d.ts +1 -1
  31. package/dist/persist.js +1 -1
  32. package/dist/push.d.ts +169 -0
  33. package/dist/push.js +996 -0
  34. package/dist/push.js.map +1 -0
  35. package/dist/{query-DhH3lLFa.d.ts → query-DUmVAfsF.d.ts} +11 -6
  36. package/dist/updates.d.ts +8 -1
  37. package/dist/updates.js +44 -69
  38. package/dist/updates.js.map +1 -1
  39. package/package.json +222 -5
  40. package/src/app.tsx +491 -0
  41. package/src/auth.tsx +176 -0
  42. package/src/blocks.tsx +144 -0
  43. package/src/boot.tsx +188 -0
  44. package/src/dev-warnings.ts +43 -0
  45. package/src/devtools/block.tsx +488 -0
  46. package/src/devtools/gestures.ts +107 -0
  47. package/src/devtools/index.ts +22 -0
  48. package/src/devtools/info.ts +45 -0
  49. package/src/devtools/slots.ts +21 -0
  50. package/src/errors.tsx +195 -0
  51. package/src/held-link.ts +90 -0
  52. package/src/hydration-gate.ts +88 -0
  53. package/src/index.ts +83 -0
  54. package/src/links.ts +140 -0
  55. package/src/nativewind.d.ts +41 -0
  56. package/src/observability/block.tsx +300 -0
  57. package/src/observability/events.ts +89 -0
  58. package/src/observability/index.ts +44 -0
  59. package/src/observability/scrub.ts +166 -0
  60. package/src/observability/sentry.ts +222 -0
  61. package/src/observability/sink.ts +147 -0
  62. package/src/persist.ts +83 -0
  63. package/src/push/backend.ts +129 -0
  64. package/src/push/block.tsx +545 -0
  65. package/src/push/index.ts +102 -0
  66. package/src/push/modules.ts +111 -0
  67. package/src/push/permission.ts +191 -0
  68. package/src/push/preferences.ts +136 -0
  69. package/src/push/quiet-hours.ts +71 -0
  70. package/src/push/registration.ts +189 -0
  71. package/src/push/routing.ts +27 -0
  72. package/src/push/screens.tsx +46 -0
  73. package/src/push/settings.tsx +378 -0
  74. package/src/query.ts +100 -0
  75. package/src/updates/block.tsx +442 -0
  76. package/src/updates/channels.ts +131 -0
  77. package/src/updates/checker.ts +190 -0
  78. package/src/updates/index.ts +87 -0
  79. package/src/updates/modules.ts +64 -0
  80. package/src/updates/policy.ts +314 -0
  81. package/src/updates/screens.tsx +159 -0
  82. package/src/updates/signature.ts +80 -0
  83. package/src/updates/store.ts +33 -0
  84. package/src/updates/version.ts +39 -0
  85. package/src/updates/whats-new.ts +122 -0
  86. package/dist/block-Dh5ny06W.d.ts +0 -535
  87. package/dist/chunk-MMTPWUWI.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,336 +1,14 @@
1
- import * as react from 'react';
2
- import { ReactNode, Component, ComponentType, ErrorInfo } from 'react';
3
- import { QueryClient, QueryClientConfig } from '@tanstack/react-query';
4
- import { CanonicalBrand } from '@marktiderman/genesis-design-system';
5
- import { SupabaseClientInput, DataProvider } from '@marktiderman/genesis-core/provider';
6
- import { Slots, SlotPropsFor } from '@marktiderman/genesis-core/slots';
7
- import { KeyboardScrollProps } from '@marktiderman/genesis-ui-native/layouts';
8
- import { Q as QueryPersistence, a as QueryLifecycleOptions, A as AsyncStorageLike } from './query-DhH3lLFa.js';
9
- export { b as AppStateLike, D as DAY_MS, N as NetInfoLike, c as connectQueryLifecycle, d as createNativeQueryClient } from './query-DhH3lLFa.js';
10
- import { U as UpdatesBlock, a as UpdatesSlots } from './block-Dh5ny06W.js';
11
-
12
- interface BootStepContext {
13
- /**
14
- * Aborted when the step times out. Stop work when it fires: a retry waits
15
- * for a timed-out run to settle before running the step again.
16
- */
17
- signal: AbortSignal;
18
- }
19
- interface BootStep {
20
- /** Unique within the list; names the step in errors. */
21
- id: string;
22
- run: (context: BootStepContext) => Promise<unknown> | unknown;
23
- /** Overrides the boot's `timeoutMs` for this step. */
24
- timeoutMs?: number;
25
- }
26
- type BootStatus = "idle" | "booting" | "ready" | "failed";
27
- interface BootState {
28
- status: BootStatus;
29
- /** Set when `status` is `"failed"`. */
30
- error: Error | null;
31
- /** The id of the step that failed. */
32
- failedStep: string | null;
33
- /** Ids of the steps that have finished, in order. */
34
- completed: readonly string[];
35
- }
36
- interface BootOptions {
37
- /** Shortest time the boot takes, so the splash doesn't flash. Default 0. */
38
- minimumMs?: number;
39
- /** Longest time one step may take. Default 10 000. */
40
- timeoutMs?: number;
41
- }
42
- interface BootController {
43
- getState(): BootState;
44
- subscribe(listener: () => void): () => void;
45
- /** Run the steps not yet finished. Calling it while a run is in flight returns that run. */
46
- start(): Promise<void>;
47
- /** After a failure: run again from the step that failed. */
48
- retry(): Promise<void>;
49
- }
50
- /** Thrown when a step takes longer than its timeout. */
51
- declare class BootTimeoutError extends Error {
52
- readonly step: string;
53
- constructor(step: string, ms: number, reason?: string);
54
- }
55
- /** The boot controller: runs `steps` once each, in order, with a timeout per step. */
56
- declare function createBoot(steps: readonly BootStep[], options?: BootOptions): BootController;
57
- /** Makes a boot readable with `useBoot()`. */
58
- declare function BootProvider({ boot, children }: {
59
- boot: BootController;
60
- children: ReactNode;
61
- }): react.JSX.Element;
62
- interface UseBootReturn extends BootState {
63
- retry: () => void;
64
- }
65
- /** The boot's status, and `retry` after a failure. Inside `GenesisNativeApp` or a `BootProvider`. */
66
- declare function useBoot(): UseBootReturn;
67
-
68
- interface FatalScreenProps {
69
- error: Error;
70
- /** Clears the error and remounts the app below the shell (and re-runs a failed boot). */
71
- retry: () => void;
72
- }
73
- /** The default fatal screen: what went wrong and "Try again". */
74
- declare function FatalScreen({ error, retry }: FatalScreenProps): react.JSX.Element;
75
- /**
76
- * The last-resort fatal screen: React Native primitives only, no theme, no
77
- * context, nothing that can itself fail. Shown when the providers could not
78
- * start, or when the `fatal` slot threw.
79
- */
80
- declare function PlainFatalScreen({ error, retry }: FatalScreenProps): react.JSX.Element;
81
- interface ErrorReport {
82
- /** True when the app could not go on (a render error, a failed boot, a fatal global error). */
83
- fatal: boolean;
84
- source: "boundary" | "global" | "boot" | "rejection";
85
- componentStack?: string;
86
- }
87
- type OnError = (error: Error, report: ErrorReport) => void;
88
- interface GenesisErrorBoundaryProps {
89
- children?: ReactNode;
90
- /** What to render instead of the tree that threw. */
91
- fallback: ComponentType<FatalScreenProps>;
92
- onError?: OnError;
93
- /** Change it to clear a caught error (the tree remounts). */
94
- resetKey?: unknown;
95
- /** Called by the fallback's retry, after the error is cleared. */
96
- onRetry?: () => void;
97
- }
98
- interface BoundaryState {
99
- error: Error | null;
100
- }
101
- /** An error boundary whose fallback gets `{ error, retry }`. */
102
- declare class GenesisErrorBoundary extends Component<GenesisErrorBoundaryProps, BoundaryState> {
103
- state: BoundaryState;
104
- static getDerivedStateFromError(error: unknown): BoundaryState;
105
- componentDidCatch(error: unknown, info: ErrorInfo): void;
106
- componentDidUpdate(previous: GenesisErrorBoundaryProps): void;
107
- retry: () => void;
108
- render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react.JSX.Element | null;
109
- }
110
- /** React Native's `ErrorUtils` (a global in every RN app), or a stand-in. */
111
- interface ErrorUtilsLike {
112
- getGlobalHandler(): ((error: unknown, isFatal?: boolean) => void) | undefined;
113
- setGlobalHandler(handler: (error: unknown, isFatal?: boolean) => void): void;
114
- }
115
- interface GlobalErrorHandlerOptions {
116
- errorUtils: ErrorUtilsLike;
117
- onError?: OnError;
118
- /** A fatal error: show the fatal screen. The previous handler (which would end the app) is not called. */
119
- onFatal: (error: Error) => void;
120
- /**
121
- * True while a fatal screen is already up. Another fatal error then goes to
122
- * the previous handler, which ends the app (it restarts clean) rather than
123
- * leaving it stuck behind a screen that may itself be broken.
124
- */
125
- alreadyFatal?: () => boolean;
126
- }
127
- /**
128
- * Route global errors to `onError`. A fatal one goes to `onFatal` instead of
129
- * React Native's default handler, which would close the app; a non-fatal one
130
- * still reaches the previous handler (LogBox in development). Returns a
131
- * function that puts the previous handler back.
132
- */
133
- declare function installGlobalErrorHandler({ errorUtils, onError, onFatal, alreadyFatal }: GlobalErrorHandlerOptions): () => void;
134
- /** `globalThis.ErrorUtils` in a React Native runtime, undefined elsewhere. */
135
- declare function defaultErrorUtils(): ErrorUtilsLike | undefined;
136
- /** Hermes's `HermesInternal.enablePromiseRejectionTracker`, or a stand-in. */
137
- type EnableRejectionTracker = (options: {
138
- allRejections: boolean;
139
- onUnhandled: (id: number, rejection: unknown) => void;
140
- onHandled: (id: number) => void;
141
- }) => void;
142
- /**
143
- * Hermes's rejection tracker, when the app runs on Hermes. React Native sends
144
- * unhandled rejections to `ExceptionsManager` (LogBox in development), never
145
- * to `ErrorUtils`' global handler, so without this they never reach `onError`.
146
- */
147
- declare function defaultRejectionTracker(): EnableRejectionTracker | undefined;
148
- /**
149
- * Report unhandled promise rejections to `onError` (non-fatal). This replaces
150
- * React Native's own tracker, so each rejection is also written with
151
- * `console.warn`, which LogBox shows in development as before.
152
- */
153
- declare function installRejectionTracker({ enable, onError }: {
154
- enable: EnableRejectionTracker;
155
- onError: OnError;
156
- }): void;
157
-
158
- /** The parts of a Supabase client the gate uses; a `SupabaseClient` fits. */
159
- interface AuthClientLike<S = unknown> {
160
- auth: {
161
- getSession(): Promise<{
162
- data: {
163
- session: S | null;
164
- };
165
- error?: unknown;
166
- }>;
167
- onAuthStateChange(callback: (event: string, session: S | null) => void): {
168
- data: {
169
- subscription: {
170
- unsubscribe(): void;
171
- };
172
- };
173
- };
174
- };
175
- }
176
- type SessionStatus = "loading" | "signedIn" | "signedOut";
177
- interface SessionState<S = unknown> {
178
- status: SessionStatus;
179
- session: S | null;
180
- /** The signed-in user's id, or null. */
181
- userId: string | null;
182
- /** True when the session came from the phone because Supabase couldn't be reached. */
183
- offline: boolean;
184
- }
185
- interface SessionStore<S = unknown> {
186
- getState(): SessionState<S>;
187
- subscribe(listener: () => void): () => void;
188
- /** Read the current session (the boot step). Throws only on a non-network error. */
189
- load(): Promise<void>;
190
- /** Follow sign-in and sign-out; returns the unsubscribe. */
191
- start(): () => void;
192
- }
193
- interface SessionStoreOptions<S = unknown> {
194
- /**
195
- * The signed-in user changed after the session was first known: signed
196
- * out, signed in, or switched account. `previous` and `next` are user ids
197
- * (null when nobody). Clear caches here.
198
- */
199
- onUserChange?: (previous: string | null, next: string | null) => void;
200
- /** Longest wait for `getSession()` before using the stored session. Default 5000 ms. */
201
- waitMs?: number;
202
- /**
203
- * Read the session saved on the phone without refreshing it. Default: from
204
- * the Supabase client's own storage (`auth.storage` under `auth.storageKey`).
205
- */
206
- readStoredSession?: () => Promise<S | null>;
207
- /** The user id in a session. Default `session.user.id`. */
208
- userIdOf?: (session: S) => string | null;
209
- }
210
- /** The Supabase session as a store: `load` reads it once, `start` follows auth events. */
211
- declare function createSessionStore<S = unknown>(client: AuthClientLike<S>, options?: SessionStoreOptions<S>): SessionStore<S>;
212
- /** Makes a session store readable with `useSession()`. */
213
- declare function SessionProvider({ store, children }: {
214
- store: SessionStore;
215
- children: ReactNode;
216
- }): react.JSX.Element;
217
- /** The session and whether it is known yet. Inside `GenesisNativeApp` or a `SessionProvider`. */
218
- declare function useSession<S = unknown>(): SessionState<S>;
219
- interface AuthGateProps {
220
- signedIn: ReactNode;
221
- signedOut: ReactNode;
222
- /** While the session is still being read. Default nothing (the splash is up). */
223
- loading?: ReactNode;
224
- }
225
- /** Render one tree for a signed-in user and another for everyone else. */
226
- declare function AuthGate({ signedIn, signedOut, loading }: AuthGateProps): react.JSX.Element;
227
-
228
- interface LinkHold {
229
- /** Hold `path`, replacing any held one. */
230
- hold(path: string): void;
231
- peek(): string | null;
232
- /** Return the held path and forget it. */
233
- take(): string | null;
234
- clear(): void;
235
- subscribe(listener: () => void): () => void;
236
- }
237
- /** A place to hold one deep link until sign-in completes; lives outside React. */
238
- declare function createLinkHold(): LinkHold;
239
- /** `"pending"` while booting or reading the session. */
240
- type HeldLinkAuth = "pending" | "signedOut" | "signedIn";
241
- interface UseHeldLinkOptions {
242
- auth: HeldLinkAuth;
243
- /** Go there, e.g. `(path) => router.replace(path)`. Called once per link held across a sign-in. */
244
- onRelease: (path: string) => void;
245
- }
246
- /** Follow the held link after a sign-in, drop it otherwise; returns the link still held. */
247
- declare function useHeldLink(hold: LinkHold, { auth, onRelease }: UseHeldLinkOptions): string | null;
248
-
249
- /** `expo-splash-screen`, or a stand-in. Call `preventAutoHideAsync()` at module scope yourself too. */
250
- interface SplashModule {
251
- preventAutoHideAsync?: () => Promise<unknown>;
252
- hideAsync: () => Promise<unknown>;
253
- }
254
- interface BootScreenProps {
255
- status: BootStatus;
256
- }
257
- interface SignedOutProps {
258
- /** Your screens. The default renders them, for an expo-router layout that redirects. */
259
- children: ReactNode;
260
- }
261
- type NativeAppSlots = UpdatesSlots & {
262
- /** Shown while booting: under the splash at launch, on its own after "Try again". Default `BootScreen`. */
263
- boot: BootScreenProps;
264
- /** A failed boot, a fatal global error or a render error. Default `FatalScreen`. */
265
- fatal: FatalScreenProps;
266
- /** The boundary around your screens. Default `GenesisErrorBoundary`. */
267
- errorBoundary: GenesisErrorBoundaryProps;
268
- /** What a signed-out user sees. Default your screens (gate them with `useSession`). */
269
- signedOut: SignedOutProps;
270
- };
271
- interface NativeQueryClientOptions {
272
- /** Your own client. Default `createNativeQueryClient(config)`. */
273
- client?: QueryClient;
274
- config?: QueryClientConfig;
275
- }
276
- interface GenesisNativeAppProps {
277
- brand: CanonicalBrand;
278
- /** A Supabase client (from `createGenesisSupabase` in `@marktiderman/genesis-supabase`). */
279
- supabase: AuthClientLike & SupabaseClientInput;
280
- /** The data provider. Default `createSupabaseProvider(supabase)`. */
281
- provider?: DataProvider;
282
- queryClient?: NativeQueryClientOptions;
283
- /**
284
- * Save queries to the phone: `persistQueries({ storage, keys, buster })`
285
- * from `@marktiderman/genesis-native/persist`. The saved cache belongs to
286
- * one user: it is restored only for that user and cleared when the user
287
- * changes (sign-out, a session that ended while the app was closed, an
288
- * account switch).
289
- */
290
- persist?: (client: QueryClient) => QueryPersistence;
291
- /** `expo-splash-screen`: hidden once boot has finished and the session is known. */
292
- splash?: SplashModule;
293
- /** `KeyboardAwareScrollView` from react-native-keyboard-controller, for form screens. */
294
- keyboardScroll?: ComponentType<KeyboardScrollProps>;
295
- /** Follow a link held while signed out, once the user signs in. */
296
- links?: {
297
- hold: LinkHold;
298
- onRelease: (path: string) => void;
299
- };
300
- /** Run before first render, in order (wipe-on-reinstall, hydrate stores, fonts). Read once. */
301
- steps?: readonly BootStep[];
302
- bootOptions?: BootOptions;
303
- /** Longest wait for Supabase's `getSession()` before using the stored session (offline). Default 5000 ms. */
304
- sessionWaitMs?: number;
305
- /** Default `globalThis.ErrorUtils`. */
306
- errorUtils?: ErrorUtilsLike;
307
- /** Report unhandled promise rejections to `onError`. Default Hermes's tracker; `null` turns it off. */
308
- rejectionTracker?: EnableRejectionTracker | null;
309
- /** `AppState` and NetInfo, so queries refetch on focus and know the network. */
310
- lifecycle?: QueryLifecycleOptions;
311
- /** Every caught error, for reporting (Sentry). */
312
- onError?: OnError;
313
- /** After a signed-in user signs out, once the query cache is cleared. */
314
- onSignedOut?: () => void;
315
- /**
316
- * The updates block: `createUpdates(…)` from `@marktiderman/genesis-native/updates`
317
- * (force upgrade, maintenance, the update banner, what's new). Its policy
318
- * loads behind the splash for at most `policyTimeoutMs` and never fails the
319
- * boot. Read once; leave it out to turn the block off.
320
- */
321
- updates?: UpdatesBlock;
322
- slots?: Slots<NativeAppSlots>;
323
- slotProps?: SlotPropsFor<NativeAppSlots>;
324
- children?: ReactNode;
325
- }
326
- /** The default boot slot: a plain loading view (the splash covers it at launch). */
327
- declare function BootScreen(_props: BootScreenProps): react.JSX.Element;
328
- /**
329
- * The root of an Expo app: theme, keyboard scrolling, data, boot behind the splash, errors, session and held links.
330
- *
331
- * @stability Beta
332
- */
333
- declare function GenesisNativeApp(props: GenesisNativeAppProps): react.JSX.Element;
1
+ export { A as AuthClientLike, b as AuthGate, c as AuthGateProps, B as BlockSettingsSection, d as BootController, e as BootOptions, f as BootProvider, g as BootScreen, h as BootScreenProps, i as BootState, j as BootStatus, k as BootStep, l as BootStepContext, m as BootTimeoutError, E as EnableRejectionTracker, n as ErrorReport, o as ErrorUtilsLike, F as FatalScreen, p as FatalScreenProps, G as GenesisErrorBoundary, q as GenesisErrorBoundaryProps, r as GenesisNativeApp, s as GenesisNativeAppProps, t as GlobalErrorHandlerOptions, H as HeldLinkAuth, L as LinkHold, u as LinkOptions, v as LinkTarget, w as NativeAppSlots, N as NativeBlock, x as NativeBlockRootProps, y as NativeQueryClientOptions, O as OnError, P as PlainFatalScreen, S as SessionProvider, z as SessionState, C as SessionStatus, I as SessionStore, J as SessionStoreOptions, K as SettingsRowLike, M as SignedOutProps, Q as SplashModule, R as UseBlockSettingsOptions, T as UseBootReturn, W as UseHeldLinkOptions, X as createBoot, Y as createLinkHold, Z as createSessionStore, _ as defaultErrorUtils, $ as defaultRejectionTracker, a0 as installGlobalErrorHandler, a1 as installRejectionTracker, a2 as mergeBlockSettings, a3 as normalizeLink, a4 as useBlockSettings, a5 as useBlocks, a6 as useBoot, a7 as useHeldLink, a8 as useSession } from './blocks-a1YQ1Elf.js';
2
+ import { A as AsyncStorageLike } from './query-DUmVAfsF.js';
3
+ export { a as AppStateLike, D as DAY_MS, N as NetInfoLike, Q as QueryLifecycleOptions, b as QueryPersistence, c as connectQueryLifecycle, d as createNativeQueryClient } from './query-DUmVAfsF.js';
4
+ import 'react';
5
+ import '@marktiderman/genesis-core/slots';
6
+ import '@marktiderman/genesis-features/blocks';
7
+ import '@tanstack/react-query';
8
+ import '@marktiderman/genesis-design-system';
9
+ import '@marktiderman/genesis-core/provider';
10
+ import '@marktiderman/genesis-ui-native/layouts';
11
+ import '@marktiderman/genesis-ui-native/components';
334
12
 
335
13
  /**
336
14
  * A hydration gate holds writes until a persisted store has loaded from disk.
@@ -375,38 +53,4 @@ interface HydrationGateOptions {
375
53
  /** A gate that holds writes until a persisted store has hydrated. */
376
54
  declare function createHydrationGate({ onDroppedWrite }?: HydrationGateOptions): HydrationGate;
377
55
 
378
- /**
379
- * Deep links: turn an incoming universal link or app link into an app path.
380
- *
381
- * Meant for expo-router's `app/+native-intent.ts`:
382
- *
383
- * export function redirectSystemPath({ path }: { path: string }) {
384
- * return normalizeLink(path, links);
385
- * }
386
- *
387
- * A link to a path the map doesn't know goes to `"/"` (and `onUnknown`), so a
388
- * stale or mistyped link opens the app instead of a "not found" screen. It
389
- * never throws: anything it can't read is unknown.
390
- */
391
- /** A target path (`"/clients/:id"`, params filled in) or a function of the params. */
392
- type LinkTarget = string | ((params: Record<string, string>) => string);
393
- interface LinkOptions {
394
- /** App schemes, without `://` (`["myapp"]`). `myapp://clients/1` is the path `/clients/1`. */
395
- schemes?: readonly string[];
396
- /** Hosts of universal / app links (`["example.com"]`). Other hosts are unknown. */
397
- hosts?: readonly string[];
398
- /**
399
- * Incoming path pattern → app path. A segment `:name` captures one
400
- * segment, a final `*` captures the rest (as `params["*"]`). The first
401
- * match wins; `"/"` is always known.
402
- */
403
- map: Readonly<Record<string, LinkTarget>>;
404
- /** Patterns to ignore (return `null`, so expo-router doesn't navigate), e.g. an auth callback. */
405
- ignore?: readonly string[];
406
- /** Told about each link that went to `"/"` because nothing matched. */
407
- onUnknown?: (url: string) => void;
408
- }
409
- /** The app path for `url`, `"/"` when it is unknown, or `null` when it is ignored. */
410
- declare function normalizeLink(url: string, options: LinkOptions): string | null;
411
-
412
- export { AsyncStorageLike, type AuthClientLike, AuthGate, type AuthGateProps, type BootController, type BootOptions, BootProvider, BootScreen, type BootScreenProps, type BootState, type BootStatus, type BootStep, type BootStepContext, BootTimeoutError, type EnableRejectionTracker, type ErrorReport, type ErrorUtilsLike, FatalScreen, type FatalScreenProps, GenesisErrorBoundary, type GenesisErrorBoundaryProps, GenesisNativeApp, type GenesisNativeAppProps, type GlobalErrorHandlerOptions, type HeldLinkAuth, type HydrationGate, type HydrationGateOptions, type LinkHold, type LinkOptions, type LinkTarget, type NativeAppSlots, type NativeQueryClientOptions, type OnError, PlainFatalScreen, QueryLifecycleOptions, QueryPersistence, SessionProvider, type SessionState, type SessionStatus, type SessionStore, type SessionStoreOptions, type SignedOutProps, type SplashModule, type UseBootReturn, type UseHeldLinkOptions, createBoot, createHydrationGate, createLinkHold, createSessionStore, defaultErrorUtils, defaultRejectionTracker, installGlobalErrorHandler, installRejectionTracker, normalizeLink, useBoot, useHeldLink, useSession };
56
+ export { AsyncStorageLike, type HydrationGate, type HydrationGateOptions, createHydrationGate };