@molecule/app-react-native 1.0.4 → 2.0.1

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 (2) hide show
  1. package/README.md +152 -87
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-10-23T14:59:33.332Z
6
+ Generated: 2026-10-26T04:14:39.672Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-react-native
@@ -208,9 +208,12 @@ interface AuthClient<T = UserProfile, TRegister extends RegisterExtraShape<TRegi
208
208
  confirmPasswordReset(data: PasswordResetConfirm): Promise<void>;
209
209
  /**
210
210
  * Updates the current user's profile.
211
- * Returns the saved response. If the session is explicitly replaced or ended
212
- * while the request is pending, that response does not replace the current
213
- * session's user or persisted cache.
211
+ * Returns the saved profile: the answer applied onto the signed-in user field
212
+ * by field, with or without an `id` — a field it carries replaces the value
213
+ * (`null` clears it), one it omits or leaves `undefined` is kept, so a field
214
+ * cleared by omission must arrive as `null`. A non-object answer is returned
215
+ * as it came. An answer for a replaced or ended session leaves the current one
216
+ * untouched.
214
217
  */
215
218
  updateProfile(data: Partial<T>): Promise<T>;
216
219
  /**
@@ -266,9 +269,6 @@ interface AuthClient<T = UserProfile, TRegister extends RegisterExtraShape<TRegi
266
269
  * Resolves when the session restore started by `initialize()` has settled — the point
267
270
  * after which the client knows whether this visitor is signed in.
268
271
  *
269
- * Resolves IMMEDIATELY when no restore is in flight: before `initialize()` is ever
270
- * called, and after it has finished. A restore that failed resolves too (it settled the
271
- * question), so an HTTP client can await this before every request without risking one
272
272
  // … truncated — the full declaration is in node_modules/@molecule/app-react-native/dist
273
273
  ```
274
274
 
@@ -476,12 +476,50 @@ interface HttpClient {
476
476
  addErrorInterceptor(interceptor: ErrorInterceptor): () => void
477
477
  /**
478
478
  * Sets the authorization token.
479
+ *
480
+ * A static token: every request carries it until the next `setAuthToken` call. A client
481
+ * that has a {@link HttpClient.setAuthTokenResolver | resolver} (registered through
482
+ * `@molecule/app-http`'s `setAuthTokenSource`) ignores this value when it assembles a
483
+ * request — the resolver IS the session, and reading it per request is what keeps a
484
+ * session adopted without an auth event from sending the previous account's bearer. Once
485
+ * the resolver is removed, the static token is sent again.
479
486
  */
480
487
  setAuthToken(token: string | null): void
481
488
  /**
482
- * Returns the current authorization token, or `null` if not set.
489
+ * Returns the token the client applies to its next request: the resolver's answer when one
490
+ * is registered, else the static token from `setAuthToken`.
483
491
  */
484
492
  getAuthToken(): string | null
493
+ /**
494
+ * Registers the LIVE token resolver every request of this client reads, or clears it with
495
+ * `null`.
496
+ *
497
+ * `@molecule/app-http`'s `setAuthTokenSource()` calls this on every client it bonds, and the
498
+ * client MUST consult the resolver again each time it assembles a request (and report it from
499
+ * `getAuthToken()`). A session can change with no auth event and no observable state change —
500
+ * `authClient.setSession()` with the same profile data, or the OAuth callback's
501
+ * `setAccessToken()` — so a token pushed only at bond time or on `login`/`logout` events
502
+ * leaves every later request carrying the PREVIOUS session's bearer while the UI shows the
503
+ * new one.
504
+ *
505
+ * The resolved token takes the static token's place, with the same precedence: an
506
+ * `Authorization` header passed per request or in the client's default headers wins over it
507
+ * exactly where it won over a static token in this transport.
508
+ *
509
+ * A resolver that returns `null` (or `undefined`) means "this session has no body token": the
510
+ * request carries no `Authorization` header of the client's own. A cookie-session API issues
511
+ * no bearer, and the server prefers the header over the fresh cookie, so a kept bearer
512
+ * authenticates as the prior — possibly deleted — session.
513
+ *
514
+ * Optional, so an implementation written against the previous interface still conforms.
515
+ * `setAuthTokenSource()` follows such a client through a request interceptor instead, pushing
516
+ * the source with `setAuthToken` before each request: that request carries the change only
517
+ * when the transport applies its token after running its interceptors, so a transport that
518
+ * applies it earlier sends a session adopted mid-page from the following request on.
519
+ *
520
+ * @param resolver - Returns the current access token (or null/undefined), or `null` to clear.
521
+ */
522
+ setAuthTokenResolver?(resolver: AuthTokenResolver | null): void
485
523
  /**
486
524
  * Registers a handler for authentication errors (401).
487
525
  *
@@ -1405,7 +1443,7 @@ interface UseAuthResult<
1405
1443
  *
1406
1444
  * `setUser` alone does NOT sign the client in, and `setAccessToken` changes
1407
1445
  * storage only — using those two for a caller-issued session leaves every
1408
- * `authenticated` read signed out (xr-molecule-flash-m178).
1446
+ * `authenticated` read signed out.
1409
1447
  */
1410
1448
  setSession: AuthClient<T>['setSession']
1411
1449
  isAuthenticated: boolean
@@ -1806,6 +1844,34 @@ How far the return-page verification has got.
1806
1844
  type VerifyPaymentReturnStatus = 'idle' | 'verifying' | 'verified' | 'failed'
1807
1845
  ```
1808
1846
 
1847
+ #### `UseTShorthandOptions`
1848
+
1849
+ Options for the shorthand form of {@link UseTFunction}: the fallback text is
1850
+ passed positionally, so only `count` remains here.
1851
+
1852
+ ```typescript
1853
+ type UseTShorthandOptions = Omit<TranslateOptions, 'defaultValue'>
1854
+ ```
1855
+
1856
+ #### `UseTFunction`
1857
+
1858
+ Translation function returned by `useT()`.
1859
+
1860
+ Two compatible call forms:
1861
+
1862
+ - `t(key, values?, options?)` — the {@link I18nProvider.t} signature.
1863
+ - `t(key, fallback, options?)` — a string second argument is the inline
1864
+ English `defaultValue`, with optional `count` for pluralization.
1865
+
1866
+ Its identity is stable while the i18n provider instance is unchanged, so it
1867
+ can be used directly as an effect dependency.
1868
+
1869
+ ```typescript
1870
+ type UseTFunction = I18nProvider['t'] & {
1871
+ (key: string, fallback: string, options?: UseTShorthandOptions): string
1872
+ }
1873
+ ```
1874
+
1809
1875
  ### Functions
1810
1876
 
1811
1877
  #### `useAppState()`
@@ -1893,7 +1959,10 @@ Pass the same generics the client was created with —
1893
1959
  the app's own fields.
1894
1960
 
1895
1961
  ```typescript
1896
- function useAuthClient(): AuthClient<T, TRegister>
1962
+ function useAuthClient<
1963
+ T = unknown,
1964
+ TRegister extends RegisterExtraShape<TRegister> = Record<never, never>,
1965
+ >(): AuthClient<T, TRegister>
1897
1966
  ```
1898
1967
 
1899
1968
  **Returns:** The auth client from context
@@ -1923,7 +1992,10 @@ call (and `requestBody` receives the same payload). Without it, `register`
1923
1992
  accepts only the base fields.
1924
1993
 
1925
1994
  ```typescript
1926
- function useAuth(options?: UseAuthOptions): UseAuthResult<T, TRegister>
1995
+ function useAuth<
1996
+ T = unknown,
1997
+ TRegister extends RegisterExtraShape<TRegister> = Record<never, never>,
1998
+ >(options?: UseAuthOptions): UseAuthResult<T, TRegister>
1927
1999
  ```
1928
2000
 
1929
2001
  - `options` — Hook options
@@ -1935,7 +2007,7 @@ function useAuth(options?: UseAuthOptions): UseAuthResult<T, TRegister>
1935
2007
  Hook to get just the authenticated user.
1936
2008
 
1937
2009
  ```typescript
1938
- function useUser(): T | null
2010
+ function useUser<T = unknown>(): T | null
1939
2011
  ```
1940
2012
 
1941
2013
  **Returns:** The authenticated user or null
@@ -2097,7 +2169,7 @@ wires a form library once (`setProvider` from `@molecule/app-forms`) and
2097
2169
  every form picks it up. Passing `createForm` overrides that for one form.
2098
2170
 
2099
2171
  ```typescript
2100
- function useForm(options?: UseFormOptions<T>): UseFormResult<T>
2172
+ function useForm<T extends Record<string, unknown>>(options?: UseFormOptions<T>): UseFormResult<T>
2101
2173
  ```
2102
2174
 
2103
2175
  - `options` — Form options. `defaultValues`, `mode` and the form-level `validate` are forwarded to the provider; omit the options entirely for a form whose fields are registered with their own defaults.
@@ -2109,7 +2181,10 @@ function useForm(options?: UseFormOptions<T>): UseFormResult<T>
2109
2181
  Hook to watch a specific field value.
2110
2182
 
2111
2183
  ```typescript
2112
- function useWatch(form: FormController<T>, name: K): T[K]
2184
+ function useWatch<T extends Record<string, unknown>, K extends keyof T>(
2185
+ form: FormController<T>,
2186
+ name: K,
2187
+ ): T[K]
2113
2188
  ```
2114
2189
 
2115
2190
  - `form` — Form controller
@@ -2122,7 +2197,10 @@ function useWatch(form: FormController<T>, name: K): T[K]
2122
2197
  Hook to get field-level state.
2123
2198
 
2124
2199
  ```typescript
2125
- function useFieldState(form: FormController<T>, name: keyof T): FieldState<T[keyof T]>
2200
+ function useFieldState<T extends Record<string, unknown>>(
2201
+ form: FormController<T>,
2202
+ name: keyof T,
2203
+ ): FieldState<T[keyof T]>
2126
2204
  ```
2127
2205
 
2128
2206
  - `form` — Form controller
@@ -2154,7 +2232,7 @@ the client does replace `execute` (it selects a different request) and
2154
2232
  re-runs such an effect.
2155
2233
 
2156
2234
  ```typescript
2157
- function useHttp(
2235
+ function useHttp<T>(
2158
2236
  method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE',
2159
2237
  url: string,
2160
2238
  options?: UseHttpOptions<T>,
@@ -2172,7 +2250,7 @@ function useHttp(
2172
2250
  Hook for GET requests.
2173
2251
 
2174
2252
  ```typescript
2175
- function useGet(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
2253
+ function useGet<T>(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
2176
2254
  ```
2177
2255
 
2178
2256
  - `url` — Request URL to fetch from.
@@ -2185,7 +2263,7 @@ function useGet(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
2185
2263
  Hook for POST requests.
2186
2264
 
2187
2265
  ```typescript
2188
- function usePost(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
2266
+ function usePost<T>(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
2189
2267
  ```
2190
2268
 
2191
2269
  - `url` — Request URL to post to.
@@ -2198,7 +2276,7 @@ function usePost(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
2198
2276
  Hook for PUT requests.
2199
2277
 
2200
2278
  ```typescript
2201
- function usePut(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
2279
+ function usePut<T>(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
2202
2280
  ```
2203
2281
 
2204
2282
  - `url` — Request URL to send the PUT request to.
@@ -2211,7 +2289,7 @@ function usePut(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
2211
2289
  Hook for PATCH requests.
2212
2290
 
2213
2291
  ```typescript
2214
- function usePatch(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
2292
+ function usePatch<T>(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
2215
2293
  ```
2216
2294
 
2217
2295
  - `url` — Request URL to send the PATCH request to.
@@ -2224,7 +2302,7 @@ function usePatch(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
2224
2302
  Hook for DELETE requests.
2225
2303
 
2226
2304
  ```typescript
2227
- function useDelete(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
2305
+ function useDelete<T>(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
2228
2306
  ```
2229
2307
 
2230
2308
  - `url` — Request URL of the resource to delete.
@@ -2287,7 +2365,7 @@ no separate `useRegister` hook. Use `usePromise(register)` when the form
2287
2365
  needs the same pending/error tracking as this login hook.
2288
2366
 
2289
2367
  ```typescript
2290
- function useLogin(): UseLoginReturn<T>
2368
+ function useLogin<T = unknown>(): UseLoginReturn<T>
2291
2369
  ```
2292
2370
 
2293
2371
  **Returns:** Login state and action
@@ -2382,7 +2460,7 @@ the clean baseline; edits made while saving remain dirty. No request is made
2382
2460
  for a patch with no fields. A failed request retains the edits and shared user.
2383
2461
 
2384
2462
  ```typescript
2385
- function useProfileForm(
2463
+ function useProfileForm<TUser, TValues extends Record<string, unknown>>(
2386
2464
  options: UseProfileFormOptions<TUser, TValues>,
2387
2465
  ): UseProfileFormResult<TUser, TValues>
2388
2466
  ```
@@ -2440,7 +2518,7 @@ function useLocation(): RouteLocation
2440
2518
  Hook to get route parameters.
2441
2519
 
2442
2520
  ```typescript
2443
- function useParams(): T
2521
+ function useParams<T extends Record<string, string> = RouteParams>(): T
2444
2522
  ```
2445
2523
 
2446
2524
  **Returns:** The current route parameters
@@ -2450,7 +2528,7 @@ function useParams(): T
2450
2528
  Hook to get query parameters.
2451
2529
 
2452
2530
  ```typescript
2453
- function useQuery(): T
2531
+ function useQuery<T extends QueryParams = QueryParams>(): T
2454
2532
  ```
2455
2533
 
2456
2534
  **Returns:** The current query parameters
@@ -2483,7 +2561,10 @@ function useIsActive(path: string, exact?: boolean): boolean
2483
2561
  Hook for user registration with async state tracking.
2484
2562
 
2485
2563
  ```typescript
2486
- function useSignup(): UseSignupReturn<T, TRegister>
2564
+ function useSignup<
2565
+ T = unknown,
2566
+ TRegister extends RegisterExtraShape<TRegister> = Record<never, never>,
2567
+ >(): UseSignupReturn<T, TRegister>
2487
2568
  ```
2488
2569
 
2489
2570
  **Returns:** Signup state and action
@@ -2503,7 +2584,10 @@ function useStorageProvider(): StorageProvider
2503
2584
  Hook to manage a single storage value with React state sync.
2504
2585
 
2505
2586
  ```typescript
2506
- function useStorageValue(key: string, options?: UseStorageValueOptions<T>): UseStorageValueResult<T>
2587
+ function useStorageValue<T>(
2588
+ key: string,
2589
+ options?: UseStorageValueOptions<T>,
2590
+ ): UseStorageValueResult<T>
2507
2591
  ```
2508
2592
 
2509
2593
  - `key` — Storage key
@@ -2555,7 +2639,7 @@ the state context. A store minted outside the `state` bond — the direct
2555
2639
  therefore as valid here as one `@molecule/app-state`'s `createStore()` made.
2556
2640
 
2557
2641
  ```typescript
2558
- function useStore(store: Store<T>, options?: UseStoreOptions<T, S>): S
2642
+ function useStore<T, S = T>(store: Store<T>, options?: UseStoreOptions<T, S>): S
2559
2643
  ```
2560
2644
 
2561
2645
  - `store` — The store to subscribe to
@@ -2568,7 +2652,7 @@ function useStore(store: Store<T>, options?: UseStoreOptions<T, S>): S
2568
2652
  Hook to get the store's setState function.
2569
2653
 
2570
2654
  ```typescript
2571
- function useSetStore(store: Store<T>): (partial: Partial<T> | ((state: T) => Partial<T>)) => void
2655
+ function useSetStore<T>(store: Store<T>): Store<T>['setState']
2572
2656
  ```
2573
2657
 
2574
2658
  - `store` — The store to get setState from
@@ -2580,7 +2664,7 @@ function useSetStore(store: Store<T>): (partial: Partial<T> | ((state: T) => Par
2580
2664
  Hook to create a bound action for a store.
2581
2665
 
2582
2666
  ```typescript
2583
- function useStoreAction(
2667
+ function useStoreAction<T, Args extends unknown[], R>(
2584
2668
  store: Store<T>,
2585
2669
  action: (setState: Store<T>['setState'], getState: Store<T>['getState']) => (...args: Args) => R,
2586
2670
  ): (...args: Args) => R
@@ -2636,7 +2720,7 @@ function useThemeMode(): 'light' | 'dark'
2636
2720
  Hook to get theme colors.
2637
2721
 
2638
2722
  ```typescript
2639
- function useThemeColors(): ThemeColors
2723
+ function useThemeColors(): Theme['colors']
2640
2724
  ```
2641
2725
 
2642
2726
  **Returns:** The current theme colors
@@ -2665,15 +2749,32 @@ function useTranslation(): UseTranslationResult
2665
2749
 
2666
2750
  Hook to get just the translation function.
2667
2751
 
2752
+ The returned function keeps ONE identity for as long as the provider
2753
+ instance is unchanged, so it is safe as an effect dependency: an effect
2754
+ written as `useEffect(..., [t])` does not re-run on ordinary re-renders or on
2755
+ a locale change. The hook still re-renders the calling component on every
2756
+ locale notification (including `addTranslations` for the active locale), so
2757
+ text it reads while rendering is current. A value memoized on `[t]` alone
2758
+ keeps the old text after a locale switch: `useMemo(() => t(...), [t])`, or a
2759
+ `React.memo` child that receives `t` as a prop. Call `useT()` inside that
2760
+ child, or add `useLocale()` to the dependencies.
2761
+
2762
+ Call it in either of two compatible forms:
2763
+
2764
+ - `t(key, values?, options?)` — the provider signature from
2765
+ `@molecule/app-i18n`, e.g. `t('cart.total', { total })`.
2766
+ - `t(key, fallback, options?)` — a shorthand for the common inline-English
2767
+ call: a string second argument is the `defaultValue`, so
2768
+ `t('cart.empty', 'Your cart is empty')` equals
2769
+ `t('cart.empty', undefined, { defaultValue: 'Your cart is empty' })`.
2770
+ Interpolation and pluralization still work:
2771
+ `t('cart.items', '{{count}} items', { count: 3 })`.
2772
+
2668
2773
  ```typescript
2669
- function useT(): (
2670
- key: string,
2671
- values?: InterpolationValues,
2672
- options?: { defaultValue?: string; count?: number },
2673
- ) => string
2774
+ function useT(): UseTFunction
2674
2775
  ```
2675
2776
 
2676
- **Returns:** The translation function
2777
+ **Returns:** The translation function (stable identity while the provider is unchanged).
2677
2778
 
2678
2779
  #### `useLocale()`
2679
2780
 
@@ -2780,10 +2881,7 @@ function useWorkspace(): UseWorkspaceResult
2780
2881
  Provider for state management.
2781
2882
 
2782
2883
  ```typescript
2783
- function StateProvider({
2784
- provider,
2785
- children,
2786
- }: StateProviderProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>
2884
+ function StateProvider({ provider, children }: StateProviderProps): React.ReactElement
2787
2885
  ```
2788
2886
 
2789
2887
  - `props` — Component props (see {@link StateProviderProps}).
@@ -2795,10 +2893,7 @@ function StateProvider({
2795
2893
  Provider for authentication.
2796
2894
 
2797
2895
  ```typescript
2798
- function AuthProvider({
2799
- client,
2800
- children,
2801
- }: AuthProviderProps<T>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>
2896
+ function AuthProvider<T = unknown>({ client, children }: AuthProviderProps<T>): React.ReactElement
2802
2897
  ```
2803
2898
 
2804
2899
  - `props` — Component props (see {@link AuthProviderProps}).
@@ -2810,10 +2905,7 @@ function AuthProvider({
2810
2905
  Provider for theming.
2811
2906
 
2812
2907
  ```typescript
2813
- function ThemeProvider({
2814
- provider,
2815
- children,
2816
- }: ThemeProviderProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>
2908
+ function ThemeProvider({ provider, children }: ThemeProviderProps): React.ReactElement
2817
2909
  ```
2818
2910
 
2819
2911
  - `props` — Component props (see {@link ThemeProviderProps}).
@@ -2825,10 +2917,7 @@ function ThemeProvider({
2825
2917
  Provider for routing.
2826
2918
 
2827
2919
  ```typescript
2828
- function RouterProvider({
2829
- router,
2830
- children,
2831
- }: RouterProviderProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>
2920
+ function RouterProvider({ router, children }: RouterProviderProps): React.ReactElement
2832
2921
  ```
2833
2922
 
2834
2923
  - `props` — Component props (see {@link RouterProviderProps}).
@@ -2840,10 +2929,7 @@ function RouterProvider({
2840
2929
  Provider for internationalization.
2841
2930
 
2842
2931
  ```typescript
2843
- function I18nProvider({
2844
- provider,
2845
- children,
2846
- }: I18nProviderProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>
2932
+ function I18nProvider({ provider, children }: I18nProviderProps): React.ReactElement
2847
2933
  ```
2848
2934
 
2849
2935
  - `props` — Component props (see {@link I18nProviderProps}).
@@ -2855,10 +2941,7 @@ function I18nProvider({
2855
2941
  Provider for HTTP client.
2856
2942
 
2857
2943
  ```typescript
2858
- function HttpProvider({
2859
- client,
2860
- children,
2861
- }: HttpProviderProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>
2944
+ function HttpProvider({ client, children }: HttpProviderProps): React.ReactElement
2862
2945
  ```
2863
2946
 
2864
2947
  - `props` — Component props (see {@link HttpProviderProps}).
@@ -2870,10 +2953,7 @@ function HttpProvider({
2870
2953
  Provider for storage.
2871
2954
 
2872
2955
  ```typescript
2873
- function StorageProvider({
2874
- provider,
2875
- children,
2876
- }: StorageProviderProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>
2956
+ function StorageProvider({ provider, children }: StorageProviderProps): React.ReactElement
2877
2957
  ```
2878
2958
 
2879
2959
  - `props` — Component props (see {@link StorageProviderProps}).
@@ -2885,10 +2965,7 @@ function StorageProvider({
2885
2965
  Provider for logging.
2886
2966
 
2887
2967
  ```typescript
2888
- function LoggerProvider({
2889
- provider,
2890
- children,
2891
- }: LoggerProviderProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>
2968
+ function LoggerProvider({ provider, children }: LoggerProviderProps): React.ReactElement
2892
2969
  ```
2893
2970
 
2894
2971
  - `props` — Component props (see {@link LoggerProviderProps}).
@@ -2900,10 +2977,7 @@ function LoggerProvider({
2900
2977
  Provider for AI chat.
2901
2978
 
2902
2979
  ```typescript
2903
- function ChatProvider({
2904
- provider,
2905
- children,
2906
- }: ChatProviderProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>
2980
+ function ChatProvider({ provider, children }: ChatProviderProps): React.ReactElement
2907
2981
  ```
2908
2982
 
2909
2983
  - `props` — Component props (see {@link ChatProviderProps}).
@@ -2915,10 +2989,7 @@ function ChatProvider({
2915
2989
  Provider for IDE workspace.
2916
2990
 
2917
2991
  ```typescript
2918
- function WorkspaceProvider({
2919
- provider,
2920
- children,
2921
- }: WorkspaceProviderProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>
2992
+ function WorkspaceProvider({ provider, children }: WorkspaceProviderProps): React.ReactElement
2922
2993
  ```
2923
2994
 
2924
2995
  - `props` — Component props (see {@link WorkspaceProviderProps}).
@@ -2930,10 +3001,7 @@ function WorkspaceProvider({
2930
3001
  Provider for code editor.
2931
3002
 
2932
3003
  ```typescript
2933
- function EditorProvider({
2934
- provider,
2935
- children,
2936
- }: EditorProviderProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>
3004
+ function EditorProvider({ provider, children }: EditorProviderProps): React.ReactElement
2937
3005
  ```
2938
3006
 
2939
3007
  - `props` — Component props (see {@link EditorProviderProps}).
@@ -2945,10 +3013,7 @@ function EditorProvider({
2945
3013
  Provider for live preview.
2946
3014
 
2947
3015
  ```typescript
2948
- function PreviewProvider({
2949
- provider,
2950
- children,
2951
- }: PreviewProviderProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>
3016
+ function PreviewProvider({ provider, children }: PreviewProviderProps): React.ReactElement
2952
3017
  ```
2953
3018
 
2954
3019
  - `props` — Component props (see {@link PreviewProviderProps}).
@@ -2980,7 +3045,7 @@ function MoleculeProvider({
2980
3045
  workspace,
2981
3046
  editor,
2982
3047
  preview,
2983
- }: MoleculeProviderProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>
3048
+ }: MoleculeProviderProps): React.ReactElement
2984
3049
  ```
2985
3050
 
2986
3051
  - `props` — Component props (see {@link MoleculeProviderProps}) — each service is optional, and ONLY the services passed are provided to the tree.
@@ -3148,7 +3213,7 @@ Peer dependencies:
3148
3213
 
3149
3214
  - `@molecule/app-keyboard` ^1.0.1
3150
3215
  - `@molecule/app-lifecycle` ^1.0.1
3151
- - `@molecule/app-react` ^1.0.1
3216
+ - `@molecule/app-react` ^2.0.0
3152
3217
  - `react` ^18.0.0 || ^19.0.0
3153
3218
  - `react-native` >=0.72.0
3154
3219
  - `react-native-safe-area-context` >=4.0.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-react-native",
3
- "version": "1.0.4",
3
+ "version": "2.0.1",
4
4
  "description": "React Native framework bindings for molecule.dev",
5
5
  "homepage": "https://www.molecule.dev/packages/app-react-native",
6
6
  "type": "module",
@@ -33,7 +33,7 @@
33
33
  "directory": "packages/app/frameworks/react-native"
34
34
  },
35
35
  "devDependencies": {
36
- "@molecule/app-react": "1.10.1",
36
+ "@molecule/app-react": "2.0.1",
37
37
  "@types/node": "26.6.5",
38
38
  "react": "19.3.1",
39
39
  "typescript": "6.0.3",
@@ -42,7 +42,7 @@
42
42
  "peerDependencies": {
43
43
  "@molecule/app-keyboard": "^1.0.1",
44
44
  "@molecule/app-lifecycle": "^1.0.1",
45
- "@molecule/app-react": "^1.0.1",
45
+ "@molecule/app-react": "^2.0.0",
46
46
  "react": "^18.0.0 || ^19.0.0",
47
47
  "react-native": ">=0.72.0",
48
48
  "react-native-safe-area-context": ">=4.0.0"