@molecule/app-angular 3.5.0 → 3.6.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 (65) hide show
  1. package/README.md +262 -84
  2. package/dist/chat.d.ts.map +1 -1
  3. package/dist/chat.js +3 -2
  4. package/dist/chat.js.map +1 -1
  5. package/dist/hooks/use-ai-models.d.ts +10 -3
  6. package/dist/hooks/use-ai-models.d.ts.map +1 -1
  7. package/dist/hooks/use-ai-models.js +40 -15
  8. package/dist/hooks/use-ai-models.js.map +1 -1
  9. package/dist/hooks/use-async.d.ts +10 -6
  10. package/dist/hooks/use-async.d.ts.map +1 -1
  11. package/dist/hooks/use-async.js +38 -33
  12. package/dist/hooks/use-async.js.map +1 -1
  13. package/dist/hooks/use-auth-flows.d.ts +40 -21
  14. package/dist/hooks/use-auth-flows.d.ts.map +1 -1
  15. package/dist/hooks/use-auth-flows.js +59 -38
  16. package/dist/hooks/use-auth-flows.js.map +1 -1
  17. package/dist/hooks/use-auth.d.ts +7 -2
  18. package/dist/hooks/use-auth.d.ts.map +1 -1
  19. package/dist/hooks/use-auth.js +24 -9
  20. package/dist/hooks/use-auth.js.map +1 -1
  21. package/dist/hooks/use-forms.d.ts +8 -11
  22. package/dist/hooks/use-forms.d.ts.map +1 -1
  23. package/dist/hooks/use-forms.js +89 -53
  24. package/dist/hooks/use-forms.js.map +1 -1
  25. package/dist/hooks/use-http.d.ts +40 -32
  26. package/dist/hooks/use-http.d.ts.map +1 -1
  27. package/dist/hooks/use-http.js +79 -93
  28. package/dist/hooks/use-http.js.map +1 -1
  29. package/dist/hooks/use-native.d.ts +7 -2
  30. package/dist/hooks/use-native.d.ts.map +1 -1
  31. package/dist/hooks/use-native.js +27 -12
  32. package/dist/hooks/use-native.js.map +1 -1
  33. package/dist/hooks/use-router.d.ts +11 -4
  34. package/dist/hooks/use-router.d.ts.map +1 -1
  35. package/dist/hooks/use-router.js +21 -6
  36. package/dist/hooks/use-router.js.map +1 -1
  37. package/dist/hooks/use-storage.d.ts +20 -6
  38. package/dist/hooks/use-storage.d.ts.map +1 -1
  39. package/dist/hooks/use-storage.js +147 -65
  40. package/dist/hooks/use-storage.js.map +1 -1
  41. package/dist/hooks/use-store.d.ts +10 -3
  42. package/dist/hooks/use-store.d.ts.map +1 -1
  43. package/dist/hooks/use-store.js +49 -9
  44. package/dist/hooks/use-store.js.map +1 -1
  45. package/dist/hooks/use-translation.d.ts +7 -2
  46. package/dist/hooks/use-translation.d.ts.map +1 -1
  47. package/dist/hooks/use-translation.js +11 -5
  48. package/dist/hooks/use-translation.js.map +1 -1
  49. package/dist/index.d.ts +6 -0
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +6 -0
  52. package/dist/index.js.map +1 -1
  53. package/dist/link.d.ts +63 -0
  54. package/dist/link.d.ts.map +1 -0
  55. package/dist/link.js +82 -0
  56. package/dist/link.js.map +1 -0
  57. package/dist/maybe-signal.d.ts +26 -0
  58. package/dist/maybe-signal.d.ts.map +1 -0
  59. package/dist/maybe-signal.js +20 -0
  60. package/dist/maybe-signal.js.map +1 -0
  61. package/package.json +2 -2
  62. package/dist/site.d.ts +0 -51
  63. package/dist/site.d.ts.map +0 -1
  64. package/dist/site.js +0 -69
  65. package/dist/site.js.map +0 -1
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-11-13T19:22:26.933Z
6
+ Generated: 2026-11-14T17:17:13.716Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-angular
@@ -1550,7 +1550,11 @@ Return type for {@link useOAuth}.
1550
1550
 
1551
1551
  ```typescript
1552
1552
  interface UseOAuthReturn {
1553
- /** The supported provider names. */
1553
+ /**
1554
+ * The supported provider names. A live getter: it reads the config the hook
1555
+ * currently holds, so it follows a config passed as a signal the way React's
1556
+ * re-rendered `providers` list does.
1557
+ */
1554
1558
  providers: string[]
1555
1559
  /**
1556
1560
  * Builds the initiation URL for one provider.
@@ -1578,6 +1582,35 @@ interface UseOAuthReturn {
1578
1582
  }
1579
1583
  ```
1580
1584
 
1585
+ #### `UseOAuthConfig`
1586
+
1587
+ OAuth configuration for {@link useOAuth}: the app's `oauthConfig` (from its `config.ts`),
1588
+ the same type under the same name in every framework binding.
1589
+
1590
+ ```typescript
1591
+ interface UseOAuthConfig {
1592
+ /** Base URL for the API server (e.g. "https://api.example.com"). */
1593
+ baseURL?: string
1594
+ /** List of supported OAuth provider names (e.g. ["google", "github"]). */
1595
+ oauthProviders?: string[]
1596
+ /** Path prefix for OAuth routes (defaults to "/oauth"). */
1597
+ oauthEndpoint?: string
1598
+ /** Path for the OAuth login POST endpoint (defaults to "/users/log-in/oauth"). */
1599
+ loginEndpoint?: string
1600
+ /** Callback after successful OAuth login. */
1601
+ onSuccess?: () => void
1602
+ /** Callback on OAuth login failure. */
1603
+ onError?: (error: string) => void
1604
+ /**
1605
+ * How the page leaves for the provider: {@link UseOAuthReturn.redirect} and the
1606
+ * blocked-popup fallback call it with the provider URL. Defaults to a full-page
1607
+ * navigation (`window.location.href = url`); pass an in-app browser opener on
1608
+ * native, or a router's external navigation.
1609
+ */
1610
+ navigate?: (url: string) => void
1611
+ }
1612
+ ```
1613
+
1581
1614
  #### `UseAuthOptions`
1582
1615
 
1583
1616
  Options for {@link useAuth}.
@@ -1796,9 +1829,11 @@ interface UseHttpResult<T> {
1796
1829
  * Runs the request and resolves with its own data, or `null` on failure,
1797
1830
  * even when a newer request or `reset` has superseded its displayed state.
1798
1831
  *
1799
- * This function is IDENTITY-STABLE for as long as `method`, `url` and the
1800
- * HTTP client do not change, so it is safe as an effect dependency. Its
1801
- * request options are read when it is CALLED.
1832
+ * This function is IDENTITY-STABLE for the component's lifetime — the
1833
+ * request it performs is the one the `method`, `url` and `options` sources
1834
+ * hold when it is CALLED, as React reads the latest committed render's
1835
+ * arguments when its `execute` runs. Its request options are read when it
1836
+ * is CALLED.
1802
1837
  *
1803
1838
  * @returns The response data, or `null` on failure.
1804
1839
  */
@@ -3004,8 +3039,73 @@ How far the return-page verification has got.
3004
3039
  type VerifyPaymentReturnStatus = 'idle' | 'verifying' | 'verified' | 'failed'
3005
3040
  ```
3006
3041
 
3042
+ #### `MaybeSignal`
3043
+
3044
+ A hook argument: the plain value, or a signal holding the value the hook
3045
+ should currently use. A signal holding `undefined` means the argument was
3046
+ omitted, exactly like a missing plain argument: the default applies.
3047
+
3048
+ ```typescript
3049
+ type MaybeSignal<T> = T | Signal<T>
3050
+ ```
3051
+
3007
3052
  ### Classes
3008
3053
 
3054
+ #### `Link`
3055
+
3056
+ `<a molLink="/settings">`: sets the anchor's `href` and navigates in-app
3057
+ through the molecule router, with react-router `<Link>`'s rules
3058
+ (`followRouterLink` from `@molecule/app-routing`): a plain primary click
3059
+ navigates without a page load; a ctrl/cmd, shift or alt click, a `target`
3060
+ other than `_self`, a click the template's own `(click)` handler prevented,
3061
+ and a URL on another origin are left to the browser.
3062
+
3063
+ Inputs: `molLink` (the destination: an app path or a URL), `replace` (replace
3064
+ the current history entry; when unset, a link to the location already shown
3065
+ replaces it and any other link pushes, as with react-router's `<Link>`), and
3066
+ `state` (stored with the new entry). Every other attribute (`class`,
3067
+ `target`, `rel`) is written on the anchor as usual.
3068
+
3069
+ Use it for every internal link instead of an anchor with a `(click)` handler
3070
+ that calls `navigate()`. Needs the router from `provideMolecule({ router })`.
3071
+
3072
+ ```typescript
3073
+ @Directive({
3074
+ selector: 'a[molLink]',
3075
+ standalone: true,
3076
+ inputs: ['molLink', 'replace', 'state'],
3077
+ host: { '[attr.href]': 'molLink' },
3078
+ })
3079
+ export class Link implements OnInit {
3080
+ /** The destination: an app path (`/settings?tab=billing#plan`) or a URL. */
3081
+ molLink = ''
3082
+ /** Replace the current history entry instead of pushing one. */
3083
+ replace?: boolean
3084
+ /** State stored with the new history entry. */
3085
+ state?: unknown
3086
+
3087
+ private readonly router = useRouterInstance()
3088
+ private readonly element = inject<ElementRef<HTMLAnchorElement>>(ElementRef)
3089
+ private readonly renderer = inject(Renderer2)
3090
+ private readonly destroyRef = inject(DestroyRef)
3091
+
3092
+ /**
3093
+ * Starts handling clicks. The listener is added here, after the template
3094
+ * created this anchor's own `(click)` listeners, so those run first and can
3095
+ * prevent the navigation (react-router calls `onClick` first too).
3096
+ */
3097
+ ngOnInit(): void {
3098
+ const stop = this.renderer.listen(this.element.nativeElement, 'click', (event: MouseEvent) => {
3099
+ followRouterLink(event, this.molLink, this.router, {
3100
+ replace: this.replace,
3101
+ state: this.state,
3102
+ })
3103
+ })
3104
+ this.destroyRef.onDestroy(stop)
3105
+ }
3106
+ }
3107
+ ```
3108
+
3009
3109
  #### `MoleculeAuthService`
3010
3110
 
3011
3111
  Angular service for authentication.
@@ -4325,11 +4425,16 @@ Subscribes to the cached AI model catalog. The first mount of a scope
4325
4425
  triggers a single `GET /ai/models` fetch; subsequent mounts return the
4326
4426
  cached result. Call it in an injection context.
4327
4427
 
4428
+ The project id may be a signal: the hook then switches to that project's
4429
+ scope on the same component — resubscribing, resyncing from the new scope's
4430
+ cache and fetching it when it is not cached — the way React re-renders
4431
+ `useAIModels` with a new `projectId`.
4432
+
4328
4433
  ```typescript
4329
- function useAIModels(projectId?: string): UseAIModelsResult
4434
+ function useAIModels(projectId?: MaybeSignal<string | undefined>): UseAIModelsResult
4330
4435
  ```
4331
4436
 
4332
- - `projectId` — Optional project scope: includes that project's custom ("bring your own AI") models on servers that support them.
4437
+ - `projectId` — Optional project scope: includes that project's custom ("bring your own AI") models on servers that support them (or a signal of it).
4333
4438
 
4334
4439
  **Returns:** Models, free-tier model, loading flag, and error as signals.
4335
4440
 
@@ -4388,16 +4493,20 @@ Only a failure of the newest change puts the server value back. A new server
4388
4493
  `value` is taken only while nothing is being saved, so a parent re-render or
4389
4494
  a refetch of older data never flips the control mid-save.
4390
4495
 
4391
- Like React — whose component instance survives an argument change — the
4392
- controller survives this site's re-creation (an input change to the hook):
4393
- the destroyed instance parks it at the site and the next instance adopts it,
4394
- feeding the new server value through `sync()`. See `site.ts`.
4496
+ The options may be a signal, and the controller follows them the way React's
4497
+ re-render does: `commit`, `equals` and `onError` are read from the options
4498
+ the signal holds at the moment they run, and a server `value` that differs
4499
+ (by `equals`) from the last one received is synced in — kept as the fallback
4500
+ while a save runs — with the controller and any pending save kept on the same
4501
+ component.
4395
4502
 
4396
4503
  ```typescript
4397
- function useOptimisticValue<T>(options: OptimisticValueOptions<T>): UseOptimisticValueResult<T>
4504
+ function useOptimisticValue<T>(
4505
+ options: MaybeSignal<OptimisticValueOptions<T>>,
4506
+ ): UseOptimisticValueResult<T>
4398
4507
  ```
4399
4508
 
4400
- - `options` — The server's current value and how to save a change.
4509
+ - `options` — The server's current value and how to save a change (or a signal of them).
4401
4510
 
4402
4511
  **Returns:** The value to render, whether a save is pending, the newest failure, and `set`/`update`.
4403
4512
 
@@ -4461,31 +4570,22 @@ handles OAuth callbacks by detecting `code` and `state` URL parameters and
4461
4570
  exchanging them for a session — and, when the callback is running inside a
4462
4571
  popup we opened, relaying the result to the opener instead.
4463
4572
 
4573
+ The config may be a signal, and the result follows it the way React's
4574
+ re-render does: `providers` reads the config at the moment it is read,
4575
+ `getOAuthUrl` builds from the config at call time, and a flow (`redirect`,
4576
+ `loginViaPopup`, a callback exchange) uses the config it was started with,
4577
+ like the render closure React started it from.
4578
+
4464
4579
  Unmounting does not cancel a flow that has started. A popup result or a
4465
4580
  callback exchange that settles afterwards still establishes the session on
4466
4581
  the shared auth client, because the user did sign in. `onSuccess` and
4467
4582
  `onError` are not called after unmount: they belong to the unmounted view.
4468
4583
 
4469
4584
  ```typescript
4470
- function useOAuth(config?: {
4471
- baseURL?: string
4472
- oauthProviders?: string[]
4473
- oauthEndpoint?: string
4474
- loginEndpoint?: string
4475
- onSuccess?: () => void
4476
- onError?: (error: string) => void
4477
- navigate?: (url: string) => void
4478
- }): UseOAuthReturn
4585
+ function useOAuth(config?: MaybeSignal<UseOAuthConfig>): UseOAuthReturn
4479
4586
  ```
4480
4587
 
4481
- - `config` — Optional OAuth configuration override.
4482
- - `config.baseURL` — Base URL for the API server (e.g. "https://api.example.com").
4483
- - `config.oauthProviders` — List of supported OAuth provider names (e.g. ["google", "github"]).
4484
- - `config.oauthEndpoint` — Path prefix for OAuth routes (defaults to "/oauth").
4485
- - `config.loginEndpoint` — Path for the OAuth login POST endpoint (defaults to "/users/log-in/oauth").
4486
- - `config.onSuccess` — Callback after successful OAuth login.
4487
- - `config.onError` — Callback on OAuth login failure.
4488
- - `config.navigate` — How the page leaves for the provider: {@link UseOAuthReturn.redirect} and the blocked-popup fallback call it with the provider URL. Defaults to a full-page navigation (`window.location.href = url`); pass an in-app browser opener on native, or a router's external navigation.
4588
+ - `config` — Optional OAuth configuration override (see {@link UseOAuthConfig}), or a signal of it.
4489
4589
 
4490
4590
  **Returns:** OAuth helpers: providers, getOAuthUrl, redirect, and loginViaPopup.
4491
4591
 
@@ -4511,14 +4611,18 @@ component field initializer or constructor).
4511
4611
  `status === 'loading'` is undecided; `'unavailable'` keeps the candidate
4512
4612
  session for retry; a restore failure never signs out.
4513
4613
 
4614
+ The options may be a signal: `autoRefresh` turning on through it probes once
4615
+ (when the visitor is signed out and decided), the way React re-renders
4616
+ `useAuth` with the new option.
4617
+
4514
4618
  ```typescript
4515
4619
  function useAuth<
4516
4620
  T = unknown,
4517
4621
  TRegister extends RegisterExtraShape<TRegister> = Record<never, never>,
4518
- >(options?: UseAuthOptions): UseAuthResult<T, TRegister>
4622
+ >(options?: MaybeSignal<UseAuthOptions>): UseAuthResult<T, TRegister>
4519
4623
  ```
4520
4624
 
4521
- - `options` — Hook options (`autoRefresh`).
4625
+ - `options` — Hook options (`autoRefresh`), or a signal of them.
4522
4626
 
4523
4627
  **Returns:** Auth state as signals and the auth actions.
4524
4628
 
@@ -4551,18 +4655,19 @@ Creates its controller through the bonded forms provider, so an app wires a
4551
4655
  form library once (`setProvider` from `@molecule/app-forms`) and every form
4552
4656
  picks it up. Passing `createForm` overrides that for one form.
4553
4657
 
4554
- When `values` changes by content, it becomes the new baseline;
4555
- `resetOptions.keepDirtyValues` retains edited fields while pristine fields
4556
- take the loaded values. A changed `resetKey` starts a fresh form; new
4557
- `defaultValues` without one leave the form alone.
4658
+ The options may be a signal, and the hook follows them the way React's
4659
+ re-render does: when `values` changes by content, it becomes the new
4660
+ baseline; `resetOptions.keepDirtyValues` retains edited fields while
4661
+ pristine fields take the loaded values. A changed `resetKey` starts a fresh
4662
+ form; new `defaultValues` without one leave the form (and its drafts) alone.
4558
4663
 
4559
4664
  ```typescript
4560
4665
  function useForm<T extends FormValuesConstraint<T> = Record<string, unknown>>(
4561
- options?: UseFormOptions<T>,
4666
+ options?: MaybeSignal<UseFormOptions<T>>,
4562
4667
  ): UseFormResult<T>
4563
4668
  ```
4564
4669
 
4565
- - `options` — Form options.
4670
+ - `options` — Form options (or a signal of them).
4566
4671
 
4567
4672
  **Returns:** Form state as signals and the form methods.
4568
4673
 
@@ -4614,11 +4719,16 @@ function useHttpClient(): HttpClient
4614
4719
  HTTP requests with state management. Call it in an injection context (a
4615
4720
  component field initializer or constructor).
4616
4721
 
4617
- `execute` keeps one identity while `method`, `url` and the HTTP client stay
4618
- the same — across the hook's own loading/data updates and inline options or
4619
- callbacks. The current headers, body, `signal` and callbacks are read when
4620
- `execute` is called. Changing `method`, `url` or the client selects a
4621
- different request.
4722
+ `execute` keeps one identity for the component's lifetime; the request it
4723
+ performs is the one the `method`, `url` and `options` sources hold when it
4724
+ is called. The current headers, body, `signal` and callbacks are read when
4725
+ `execute` is called, so an inline options object or callback needs no
4726
+ memoizing.
4727
+
4728
+ The arguments may be signals: `execute` then sends to the url the signal
4729
+ holds at the moment it is called, the way React's re-rendered `useHttp`
4730
+ sends to the latest url. The hook's state (an in-flight request, loaded
4731
+ data) survives an argument change, as React's survives a re-render.
4622
4732
 
4623
4733
  The newest request owns the state: an older request that answers after a
4624
4734
  newer one (or after `reset`) cannot repopulate the displayed state, though
@@ -4626,15 +4736,15 @@ its own callbacks still report its outcome.
4626
4736
 
4627
4737
  ```typescript
4628
4738
  function useHttp<T>(
4629
- method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE',
4630
- url: string,
4631
- options?: UseHttpOptions<T>,
4739
+ method: MaybeSignal<'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'>,
4740
+ url: MaybeSignal<string>,
4741
+ options?: MaybeSignal<UseHttpOptions<T>>,
4632
4742
  ): UseHttpResult<T>
4633
4743
  ```
4634
4744
 
4635
- - `method` — HTTP method.
4636
- - `url` — Request URL.
4637
- - `options` — Request options, read at call time.
4745
+ - `method` — HTTP method (or a signal of it).
4746
+ - `url` — Request URL (or a signal of it).
4747
+ - `options` — Request options, read at call time (or a signal of them).
4638
4748
 
4639
4749
  **Returns:** The request state as signals and the execute/reset functions.
4640
4750
 
@@ -4643,11 +4753,14 @@ function useHttp<T>(
4643
4753
  GET requests.
4644
4754
 
4645
4755
  ```typescript
4646
- function useGet<T>(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
4756
+ function useGet<T>(
4757
+ url: MaybeSignal<string>,
4758
+ options?: MaybeSignal<UseHttpOptions<T>>,
4759
+ ): UseHttpResult<T>
4647
4760
  ```
4648
4761
 
4649
- - `url` — Request URL to fetch from.
4650
- - `options` — HTTP request options including callbacks and request config.
4762
+ - `url` — Request URL to fetch from (or a signal of it).
4763
+ - `options` — HTTP request options including callbacks and request config (or a signal of them).
4651
4764
 
4652
4765
  **Returns:** Request state (data, loading, error) and controls (execute, reset).
4653
4766
 
@@ -4656,11 +4769,14 @@ function useGet<T>(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
4656
4769
  POST requests, with the body in `options.data`.
4657
4770
 
4658
4771
  ```typescript
4659
- function usePost<T>(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
4772
+ function usePost<T>(
4773
+ url: MaybeSignal<string>,
4774
+ options?: MaybeSignal<UseHttpOptions<T>>,
4775
+ ): UseHttpResult<T>
4660
4776
  ```
4661
4777
 
4662
- - `url` — Request URL to post to.
4663
- - `options` — HTTP request options including body data and callbacks.
4778
+ - `url` — Request URL to post to (or a signal of it).
4779
+ - `options` — HTTP request options including body data and callbacks (or a signal of them).
4664
4780
 
4665
4781
  **Returns:** Request state (data, loading, error) and controls (execute, reset).
4666
4782
 
@@ -4669,11 +4785,14 @@ function usePost<T>(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
4669
4785
  PUT requests, with the replacement body.
4670
4786
 
4671
4787
  ```typescript
4672
- function usePut<T>(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
4788
+ function usePut<T>(
4789
+ url: MaybeSignal<string>,
4790
+ options?: MaybeSignal<UseHttpOptions<T>>,
4791
+ ): UseHttpResult<T>
4673
4792
  ```
4674
4793
 
4675
- - `url` — Request URL to send the PUT request to.
4676
- - `options` — HTTP request options including body data and callbacks.
4794
+ - `url` — Request URL to send the PUT request to (or a signal of it).
4795
+ - `options` — HTTP request options including body data and callbacks (or a signal of them).
4677
4796
 
4678
4797
  **Returns:** Request state (data, loading, error) and controls (execute, reset).
4679
4798
 
@@ -4682,11 +4801,14 @@ function usePut<T>(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
4682
4801
  PATCH requests, with the partial body.
4683
4802
 
4684
4803
  ```typescript
4685
- function usePatch<T>(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
4804
+ function usePatch<T>(
4805
+ url: MaybeSignal<string>,
4806
+ options?: MaybeSignal<UseHttpOptions<T>>,
4807
+ ): UseHttpResult<T>
4686
4808
  ```
4687
4809
 
4688
- - `url` — Request URL to send the PATCH request to.
4689
- - `options` — HTTP request options including partial body data and callbacks.
4810
+ - `url` — Request URL to send the PATCH request to (or a signal of it).
4811
+ - `options` — HTTP request options including partial body data and callbacks (or a signal of them).
4690
4812
 
4691
4813
  **Returns:** Request state (data, loading, error) and controls (execute, reset).
4692
4814
 
@@ -4695,11 +4817,14 @@ function usePatch<T>(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
4695
4817
  DELETE requests; a body travels in `options.data`.
4696
4818
 
4697
4819
  ```typescript
4698
- function useDelete<T>(url: string, options?: UseHttpOptions<T>): UseHttpResult<T>
4820
+ function useDelete<T>(
4821
+ url: MaybeSignal<string>,
4822
+ options?: MaybeSignal<UseHttpOptions<T>>,
4823
+ ): UseHttpResult<T>
4699
4824
  ```
4700
4825
 
4701
- - `url` — Request URL of the resource to delete.
4702
- - `options` — HTTP request options including callbacks.
4826
+ - `url` — Request URL of the resource to delete (or a signal of it).
4827
+ - `options` — HTTP request options including callbacks (or a signal of them).
4703
4828
 
4704
4829
  **Returns:** Request state (data, loading, error) and controls (execute, reset).
4705
4830
 
@@ -4904,11 +5029,15 @@ Push notification state and actions. Call it in an injection context.
4904
5029
  Uses module-level `getProvider()` — push is a singleton, not
4905
5030
  registration-provided.
4906
5031
 
5032
+ The options may be a signal: `checkOnMount` turning on through it checks the
5033
+ permission once more (when it was off before), the way React re-renders
5034
+ `usePush` with the new option.
5035
+
4907
5036
  ```typescript
4908
- function usePush(options?: UsePushOptions): UsePushResult
5037
+ function usePush(options?: MaybeSignal<UsePushOptions>): UsePushResult
4909
5038
  ```
4910
5039
 
4911
- - `options` — Hook options.
5040
+ - `options` — Hook options (or a signal of them).
4912
5041
 
4913
5042
  **Returns:** The permission and token as signals and the action functions.
4914
5043
 
@@ -5004,12 +5133,20 @@ function useNavigate(): (path: string, options?: NavigateOptions) => void
5004
5133
  Whether a path is active, re-evaluated on every route change. Call it in an
5005
5134
  injection context.
5006
5135
 
5136
+ The arguments may be signals: the active flag then follows a changed path or
5137
+ `exact` on the same component, the way React re-renders `useIsActive` with
5138
+ new arguments. A signal holding `undefined` for `exact` matches an omitted
5139
+ argument (`false`).
5140
+
5007
5141
  ```typescript
5008
- function useIsActive(path: string, exact?: boolean): Signal<boolean>
5142
+ function useIsActive(
5143
+ path: MaybeSignal<string>,
5144
+ exact?: MaybeSignal<boolean | undefined>,
5145
+ ): Signal<boolean>
5009
5146
  ```
5010
5147
 
5011
- - `path` — The path to check.
5012
- - `exact` — Whether to match exactly (default: `false`).
5148
+ - `path` — The path to check (or a signal of it).
5149
+ - `exact` — Whether to match exactly (default: `false`, or a signal of it).
5013
5150
 
5014
5151
  **Returns:** A signal of whether the path is active.
5015
5152
 
@@ -5032,7 +5169,7 @@ A signed-out visit to a view with `requiresAuth` replaces the entry with
5032
5169
 
5033
5170
  ```typescript
5034
5171
  function useListRoute<Filter extends string = string, Selection extends string = string>(
5035
- options?: ListRouteOptions<Filter, Selection> | Signal<ListRouteOptions<Filter, Selection>>,
5172
+ options?: MaybeSignal<ListRouteOptions<Filter, Selection>>,
5036
5173
  ): UseListRouteResult<Filter, Selection>
5037
5174
  ```
5038
5175
 
@@ -5080,15 +5217,21 @@ loading. `sync` subscribes through the PROVIDER's own change subscription, so
5080
5217
  a non-browser backend propagates the same way instead of being limited to
5081
5218
  the browser `storage` event.
5082
5219
 
5220
+ The arguments may be signals: a new key then starts over on the same
5221
+ component (the value falls back to the default, loading turns true and the
5222
+ new key is read and subscribed), the way React re-renders `useStorageValue`
5223
+ with a new key. The value, its pending write and any error survive the
5224
+ change, as React's state does.
5225
+
5083
5226
  ```typescript
5084
5227
  function useStorageValue<T>(
5085
- key: string,
5086
- options?: UseStorageValueOptions<T>,
5228
+ key: MaybeSignal<string>,
5229
+ options?: MaybeSignal<UseStorageValueOptions<T>>,
5087
5230
  ): UseStorageValueResult<T>
5088
5231
  ```
5089
5232
 
5090
- - `key` — Storage key.
5091
- - `options` — Hook options (`defaultValue`, `sync`).
5233
+ - `key` — Storage key (or a signal of it).
5234
+ - `options` — Hook options (`defaultValue`, `sync`), or a signal of them.
5092
5235
 
5093
5236
  **Returns:** The value, its mutators, and the loading/error state as signals.
5094
5237
 
@@ -5108,15 +5251,20 @@ Pass `null` for `key` while the real key is unknown (no project selected
5108
5251
  yet): the hook then behaves as local state around `defaultValue` and
5109
5252
  persists nothing.
5110
5253
 
5254
+ The arguments may be signals: a new key then re-reads and re-subscribes that
5255
+ key on the same component (its old subscription is dropped, hydration
5256
+ converges it), the way React re-renders `useStoragePreference` with a new
5257
+ key. The shown value survives the change, as React's state does.
5258
+
5111
5259
  ```typescript
5112
5260
  function useStoragePreference<T = unknown>(
5113
- key: string | null | undefined,
5114
- options?: UseStoragePreferenceOptions<T>,
5261
+ key: MaybeSignal<string | null | undefined>,
5262
+ options?: MaybeSignal<UseStoragePreferenceOptions<T>>,
5115
5263
  ): UseStoragePreferenceResult<T>
5116
5264
  ```
5117
5265
 
5118
- - `key` — The storage key, or `null` when there is nothing to persist.
5119
- - `options` — `defaultValue`, reported until the provider supplies one.
5266
+ - `key` — The storage key, or `null` when there is nothing to persist (or a signal of it).
5267
+ - `options` — `defaultValue`, reported until the provider supplies one (or a signal of them).
5120
5268
 
5121
5269
  **Returns:** The current value, its mutators, and whether it is definite yet.
5122
5270
 
@@ -5162,12 +5310,21 @@ the state registration. A store minted outside the `state` bond — the direct
5162
5310
  `createStoreWithActions()` / `createStore()` a provider package exports — is
5163
5311
  therefore as valid here as one `@molecule/app-state`'s `createStore()` made.
5164
5312
 
5313
+ The arguments may be signals: a new store is subscribed in place of the old
5314
+ one (the old subscription is dropped first) and new options are applied on
5315
+ the next read, the way React re-renders `useStore` with new arguments. The
5316
+ previous selected value the equality function compares survives the change,
5317
+ as React's ref does.
5318
+
5165
5319
  ```typescript
5166
- function useStore<T, S = T>(store: Store<T>, options?: UseStoreOptions<T, S>): Signal<S>
5320
+ function useStore<T, S = T>(
5321
+ store: MaybeSignal<Store<T>>,
5322
+ options?: MaybeSignal<UseStoreOptions<T, S>>,
5323
+ ): Signal<S>
5167
5324
  ```
5168
5325
 
5169
- - `store` — The store to subscribe to.
5170
- - `options` — Hook options (`selector`, `equalityFn`).
5326
+ - `store` — The store to subscribe to (or a signal of it).
5327
+ - `options` — Hook options (`selector`, `equalityFn`), or a signal of them.
5171
5328
 
5172
5329
  **Returns:** A signal of the selected state.
5173
5330
 
@@ -5330,11 +5487,14 @@ changes. An `I18nError` is translated through its key (its own message as
5330
5487
  the default value); a plain `Error` returns its message unchanged; no error
5331
5488
  returns `null`. Call it in an injection context.
5332
5489
 
5490
+ The error may be a signal: the message then follows a changed error on the
5491
+ same component, the way React re-renders `useI18nError` with a new argument.
5492
+
5333
5493
  ```typescript
5334
- function useI18nError(error: Error | null | undefined): Signal<string | null>
5494
+ function useI18nError(error: MaybeSignal<Error | null | undefined>): Signal<string | null>
5335
5495
  ```
5336
5496
 
5337
- - `error` — The error to translate, or `null`/`undefined`.
5497
+ - `error` — The error to translate, or `null`/`undefined` (or a signal of it).
5338
5498
 
5339
5499
  **Returns:** A signal of the error's display text, or `null`.
5340
5500
 
@@ -5422,6 +5582,20 @@ function t(key: string, values?: InterpolationValues, options?: TranslateOptions
5422
5582
 
5423
5583
  **Returns:** Translated string
5424
5584
 
5585
+ #### `readMaybeSignal(value)`
5586
+
5587
+ Reads a hook argument's current value. Inside a `computed` or `effect` this
5588
+ TRACKS a signal argument, so the reader re-runs when the argument changes;
5589
+ outside one it is a plain read.
5590
+
5591
+ ```typescript
5592
+ function readMaybeSignal<T>(value: MaybeSignal<T>): T
5593
+ ```
5594
+
5595
+ - `value` — The argument as the hook received it.
5596
+
5597
+ **Returns:** The argument's current value.
5598
+
5425
5599
  #### `provideState(provider)`
5426
5600
 
5427
5601
  Provide state management.
@@ -5910,7 +6084,7 @@ Peer dependencies:
5910
6084
  - `@molecule/app-logger` ^1.0.1
5911
6085
  - `@molecule/app-platform` ^1.0.1
5912
6086
  - `@molecule/app-push` ^1.0.1
5913
- - `@molecule/app-routing` ^1.1.0
6087
+ - `@molecule/app-routing` ^1.3.0
5914
6088
  - `@molecule/app-state` ^1.2.0
5915
6089
  - `@molecule/app-storage` ^1.1.1
5916
6090
  - `@molecule/app-theme` ^1.0.1
@@ -5958,6 +6132,10 @@ Peer dependencies:
5958
6132
  Molecule service whose token was never provided fails at DI time.
5959
6133
  Per-concern helpers (`provideAuth`, `provideTheme`, ...) exist for
5960
6134
  piecemeal setup.
6135
+ - In-app links use the `Link` directive (`<a molLink="/settings">`, `imports: [Link]`): it
6136
+ navigates through the molecule router with react-router `<Link>`'s click rules. A bare
6137
+ `<a href>` reloads the page; a hand-written `(click)` handler that calls `navigate()`
6138
+ breaks ctrl/cmd-click (new tab) unless it repeats those rules.
5961
6139
 
5962
6140
  ## Translations
5963
6141
 
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../src/chat.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAOL,KAAK,MAAM,EAGZ,MAAM,eAAe,CAAA;AAEtB,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,eAAe,IAAI,mBAAmB,EAEtC,iBAAiB,IAAI,qBAAqB,EAC1C,uBAAuB,IAAI,2BAA2B,EACvD,MAAM,uBAAuB,CAAA;AAK9B,uEAAuE;AACvE,MAAM,MAAM,cAAc,GAAG,kBAAkB,CAAA;AAE/C,0CAA0C;AAC1C,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAA;AAEhD;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,CAAC,IAAI,MAAM,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;CACpE,GAAG,mBAAmB,CAAA;AAEvB;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,OAAO,mBAAyC,CAAA;AAE9E;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,OAAO,qBAA6C,CAAA;AAEpF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,OAAO,2B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MAAM,CAAC,cAAc,CAAC,GAAG,aAAa,CAkCvF"}
package/dist/chat.js CHANGED
@@ -7,6 +7,7 @@
7
7
  import { afterNextRender, computed, DestroyRef, effect, inject, isSignal, signal, untracked, } from '@angular/core';
8
8
  import { convergeHistory as coreConvergeHistory, createChatSession, localOnlyMessages as coreLocalOnlyMessages, resetChatStoresForTests as coreResetChatStoresForTests, } from '@molecule/app-ai-chat';
9
9
  import { t } from '@molecule/app-i18n';
10
+ import { readMaybeSignal } from './maybe-signal.js';
10
11
  import { CHAT_PROVIDER } from './tokens.js';
11
12
  /**
12
13
  * Converges the local transcript with authoritative server history. See
@@ -77,7 +78,7 @@ export function useChatProvider() {
77
78
  */
78
79
  export function useChat(options) {
79
80
  const provider = useChatProvider();
80
- let current = untracked(() => (isSignal(options) ? options() : options));
81
+ let current = untracked(() => readMaybeSignal(options));
81
82
  const session = createChatSession({ ...current, provider });
82
83
  const state = signal(session.getState(), /* @ts-ignore */
83
84
  ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
@@ -86,7 +87,7 @@ export function useChat(options) {
86
87
  // endpoint is a conversation change, which the session loads.
87
88
  if (isSignal(options)) {
88
89
  effect(() => {
89
- const next = options();
90
+ const next = readMaybeSignal(options);
90
91
  if (next === current)
91
92
  return;
92
93
  current = next;
package/dist/chat.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"chat.js","sourceRoot":"","sources":["../src/chat.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,eAAe,EACf,QAAQ,EACR,UAAU,EACV,MAAM,EACN,MAAM,EACN,QAAQ,EAER,MAAM,EACN,SAAS,GACV,MAAM,eAAe,CAAA;AAStB,OAAO,EACL,eAAe,IAAI,mBAAmB,EACtC,iBAAiB,EACjB,iBAAiB,IAAI,qBAAqB,EAC1C,uBAAuB,IAAI,2BAA2B,GACvD,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAo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