@molecule/app-angular 3.16.1 → 4.0.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.
- package/README.md +19 -356
- package/dist/ai-models.d.ts +2 -0
- package/dist/ai-models.d.ts.map +1 -0
- package/dist/ai-models.js +2 -0
- package/dist/ai-models.js.map +1 -0
- package/dist/chat/index.d.ts +5 -0
- package/dist/chat/index.d.ts.map +1 -0
- package/dist/chat/index.js +5 -0
- package/dist/chat/index.js.map +1 -0
- package/dist/chat-context.d.ts +7 -0
- package/dist/chat-context.d.ts.map +1 -0
- package/dist/chat-context.js +6 -0
- package/dist/chat-context.js.map +1 -0
- package/dist/chat-provider.d.ts +10 -0
- package/dist/chat-provider.d.ts.map +1 -0
- package/dist/chat-provider.js +12 -0
- package/dist/chat-provider.js.map +1 -0
- package/dist/chat.js +1 -1
- package/dist/chat.js.map +1 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/use-native.d.ts +1 -93
- package/dist/hooks/use-native.d.ts.map +1 -1
- package/dist/hooks/use-native.js +2 -87
- package/dist/hooks/use-native.js.map +1 -1
- package/dist/hooks/use-push.d.ts +99 -0
- package/dist/hooks/use-push.d.ts.map +1 -0
- package/dist/hooks/use-push.js +92 -0
- package/dist/hooks/use-push.js.map +1 -0
- package/dist/hooks/use-translation.d.ts +2 -4
- package/dist/hooks/use-translation.d.ts.map +1 -1
- package/dist/hooks/use-translation.js.map +1 -1
- package/dist/i18n-reactive.d.ts +2 -2
- package/dist/i18n-reactive.d.ts.map +1 -1
- package/dist/i18n-reactive.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts +0 -8
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +1 -13
- package/dist/providers.js.map +1 -1
- package/dist/push.d.ts +3 -0
- package/dist/push.d.ts.map +1 -0
- package/dist/push.js +3 -0
- package/dist/push.js.map +1 -0
- package/dist/services/index.d.ts +0 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +0 -1
- package/dist/services/index.js.map +1 -1
- package/dist/tokens.d.ts +0 -5
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +0 -4
- package/dist/tokens.js.map +1 -1
- package/dist/types.d.ts +0 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +26 -4
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-
|
|
6
|
+
Generated: 2026-11-28T05:19:59.480Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-angular
|
|
@@ -101,7 +101,7 @@ Pass `awaitSession: false` to render before the restore settles.
|
|
|
101
101
|
## Installation
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
|
-
npm install @molecule/app-angular @angular/core @molecule/app-
|
|
104
|
+
npm install @molecule/app-angular @angular/core @molecule/app-auth @molecule/app-device @molecule/app-forms @molecule/app-http @molecule/app-i18n @molecule/app-logger @molecule/app-platform @molecule/app-routing @molecule/app-state @molecule/app-storage @molecule/app-theme @molecule/app-ui @molecule/app-utilities @molecule/app-version rxjs
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
## API
|
|
@@ -875,7 +875,7 @@ interface I18nProvider {
|
|
|
875
875
|
*
|
|
876
876
|
* @returns The translated string, or the default value / key if not found.
|
|
877
877
|
*/
|
|
878
|
-
t
|
|
878
|
+
t: TranslateFunction
|
|
879
879
|
|
|
880
880
|
/**
|
|
881
881
|
* Checks if a translation key exists.
|
|
@@ -1660,31 +1660,6 @@ interface SlotReader {
|
|
|
1660
1660
|
|
|
1661
1661
|
**Returns:** Whether the slot has content.
|
|
1662
1662
|
|
|
1663
|
-
#### `UseAIModelsResult`
|
|
1664
|
-
|
|
1665
|
-
Result returned by {@link useAIModels}: every field as a signal.
|
|
1666
|
-
|
|
1667
|
-
```typescript
|
|
1668
|
-
interface UseAIModelsResult {
|
|
1669
|
-
/**
|
|
1670
|
-
* Available models, or an empty array while loading or after a failed fetch. The list keeps its identity
|
|
1671
|
-
* until the catalog changes, the empty one included, so it can key a computed or an effect.
|
|
1672
|
-
*/
|
|
1673
|
-
readonly models: Signal<AppModelDefinition[]>
|
|
1674
|
-
/**
|
|
1675
|
-
* Per-mode server default model ids for the requester's tier, or `undefined`
|
|
1676
|
-
* while loading or on servers that don't provide them.
|
|
1677
|
-
*/
|
|
1678
|
-
readonly defaults: Signal<AppModeModelDefaults | undefined>
|
|
1679
|
-
/** The single model marked `freeTier: true`, or `undefined`. */
|
|
1680
|
-
readonly freeTierModel: Signal<AppModelDefinition | undefined>
|
|
1681
|
-
/** `true` while the initial fetch is in flight. */
|
|
1682
|
-
readonly loading: Signal<boolean>
|
|
1683
|
-
/** Error from the initial fetch, or `null`. */
|
|
1684
|
-
readonly error: Signal<Error | null>
|
|
1685
|
-
}
|
|
1686
|
-
```
|
|
1687
|
-
|
|
1688
1663
|
#### `UsePromiseState`
|
|
1689
1664
|
|
|
1690
1665
|
The state of the latest {@link usePromise} call.
|
|
@@ -2431,90 +2406,6 @@ interface UseCapacitorAppResult {
|
|
|
2431
2406
|
}
|
|
2432
2407
|
```
|
|
2433
2408
|
|
|
2434
|
-
#### `UsePushOptions`
|
|
2435
|
-
|
|
2436
|
-
Options for {@link usePush} (e.g. check permission on mount).
|
|
2437
|
-
|
|
2438
|
-
```typescript
|
|
2439
|
-
interface UsePushOptions {
|
|
2440
|
-
/** Whether to check permission status on mount. */
|
|
2441
|
-
checkOnMount?: boolean
|
|
2442
|
-
}
|
|
2443
|
-
```
|
|
2444
|
-
|
|
2445
|
-
#### `UsePushResult`
|
|
2446
|
-
|
|
2447
|
-
What {@link usePush} returns: the permission and token as signals and every
|
|
2448
|
-
action as a plain function.
|
|
2449
|
-
|
|
2450
|
-
```typescript
|
|
2451
|
-
interface UsePushResult {
|
|
2452
|
-
/** The known permission status, `null` until one is read. */
|
|
2453
|
-
readonly permission: Signal<PermissionStatus | null>
|
|
2454
|
-
/** The registered token, `null` while unregistered. */
|
|
2455
|
-
readonly token: Signal<PushToken | null>
|
|
2456
|
-
/**
|
|
2457
|
-
* Reads the permission status and stores it.
|
|
2458
|
-
*
|
|
2459
|
-
* @returns The status.
|
|
2460
|
-
*/
|
|
2461
|
-
checkPermission: () => Promise<PermissionStatus>
|
|
2462
|
-
/**
|
|
2463
|
-
* Asks for permission and stores the status.
|
|
2464
|
-
*
|
|
2465
|
-
* @returns The status.
|
|
2466
|
-
*/
|
|
2467
|
-
requestPermission: () => Promise<PermissionStatus>
|
|
2468
|
-
/**
|
|
2469
|
-
* Registers for push notifications and stores the token.
|
|
2470
|
-
*
|
|
2471
|
-
* @param options - Registration options.
|
|
2472
|
-
* @returns The token.
|
|
2473
|
-
*/
|
|
2474
|
-
register: (options?: PushRegisterOptions) => Promise<PushToken>
|
|
2475
|
-
/**
|
|
2476
|
-
* Unregisters and clears the token.
|
|
2477
|
-
*
|
|
2478
|
-
* @returns Resolves once unregistered.
|
|
2479
|
-
*/
|
|
2480
|
-
unregister: () => Promise<void>
|
|
2481
|
-
/**
|
|
2482
|
-
* Subscribes to received notifications.
|
|
2483
|
-
*
|
|
2484
|
-
* @param listener - Called for every notification.
|
|
2485
|
-
* @returns A function that removes the listener.
|
|
2486
|
-
*/
|
|
2487
|
-
onNotificationReceived: (listener: NotificationReceivedListener) => () => void
|
|
2488
|
-
/**
|
|
2489
|
-
* Subscribes to notification actions.
|
|
2490
|
-
*
|
|
2491
|
-
* @param listener - Called for every action.
|
|
2492
|
-
* @returns A function that removes the listener.
|
|
2493
|
-
*/
|
|
2494
|
-
onNotificationAction: (listener: NotificationActionListener) => () => void
|
|
2495
|
-
/**
|
|
2496
|
-
* Subscribes to token changes.
|
|
2497
|
-
*
|
|
2498
|
-
* @param listener - Called for every new token.
|
|
2499
|
-
* @returns A function that removes the listener.
|
|
2500
|
-
*/
|
|
2501
|
-
onTokenChange: (listener: TokenChangeListener) => () => void
|
|
2502
|
-
/**
|
|
2503
|
-
* Sets the badge count.
|
|
2504
|
-
*
|
|
2505
|
-
* @param count - The count to set.
|
|
2506
|
-
* @returns Resolves once set.
|
|
2507
|
-
*/
|
|
2508
|
-
setBadge: (count: number) => Promise<void>
|
|
2509
|
-
/**
|
|
2510
|
-
* Clears the badge count.
|
|
2511
|
-
*
|
|
2512
|
-
* @returns Resolves once cleared.
|
|
2513
|
-
*/
|
|
2514
|
-
clearBadge: () => Promise<void>
|
|
2515
|
-
}
|
|
2516
|
-
```
|
|
2517
|
-
|
|
2518
2409
|
#### `UseOptimisticToggleOptions`
|
|
2519
2410
|
|
|
2520
2411
|
Options for {@link useOptimisticToggle}.
|
|
@@ -3217,29 +3108,6 @@ interface PromiseStateManager<T, Args extends unknown[] = unknown[]> {
|
|
|
3217
3108
|
}
|
|
3218
3109
|
```
|
|
3219
3110
|
|
|
3220
|
-
#### `PushService`
|
|
3221
|
-
|
|
3222
|
-
Push service interface.
|
|
3223
|
-
|
|
3224
|
-
```typescript
|
|
3225
|
-
interface PushService {
|
|
3226
|
-
permission$: Observable<PermissionStatus | null>
|
|
3227
|
-
token$: Observable<PushToken | null>
|
|
3228
|
-
getPermission: () => PermissionStatus | null
|
|
3229
|
-
getToken: () => PushToken | null
|
|
3230
|
-
checkPermission: () => Promise<PermissionStatus>
|
|
3231
|
-
requestPermission: () => Promise<PermissionStatus>
|
|
3232
|
-
register: (options?: PushRegisterOptions) => Promise<PushToken>
|
|
3233
|
-
unregister: () => Promise<void>
|
|
3234
|
-
onNotificationReceived: (listener: NotificationReceivedListener) => () => void
|
|
3235
|
-
onNotificationAction: (listener: NotificationActionListener) => () => void
|
|
3236
|
-
onTokenChange: (listener: TokenChangeListener) => () => void
|
|
3237
|
-
setBadge: (count: number) => Promise<void>
|
|
3238
|
-
clearBadge: () => Promise<void>
|
|
3239
|
-
destroy: () => void
|
|
3240
|
-
}
|
|
3241
|
-
```
|
|
3242
|
-
|
|
3243
3111
|
#### `SignupStateManager`
|
|
3244
3112
|
|
|
3245
3113
|
Signup state manager.
|
|
@@ -3330,8 +3198,6 @@ interface MoleculeModuleConfig {
|
|
|
3330
3198
|
http?: HttpClient
|
|
3331
3199
|
storage?: StorageProvider
|
|
3332
3200
|
logger?: LoggerProvider
|
|
3333
|
-
/** The AI chat provider useChat and useChatProvider use. */
|
|
3334
|
-
chat?: ChatProvider
|
|
3335
3201
|
/** The IDE workspace provider useWorkspace and useWorkspaceProvider use. */
|
|
3336
3202
|
workspace?: WorkspaceProvider
|
|
3337
3203
|
/** The code editor provider useEditor and useEditorProvider use. */
|
|
@@ -3355,7 +3221,6 @@ interface MoleculeTokens {
|
|
|
3355
3221
|
HTTP_CLIENT: symbol
|
|
3356
3222
|
STORAGE_PROVIDER: symbol
|
|
3357
3223
|
LOGGER_PROVIDER: symbol
|
|
3358
|
-
CHAT_PROVIDER: symbol
|
|
3359
3224
|
WORKSPACE_PROVIDER: symbol
|
|
3360
3225
|
EDITOR_PROVIDER: symbol
|
|
3361
3226
|
PREVIEW_PROVIDER: symbol
|
|
@@ -3380,44 +3245,6 @@ URL query string parameter map (single values or arrays for repeated keys).
|
|
|
3380
3245
|
type QueryParams = Record<string, string | string[] | undefined>
|
|
3381
3246
|
```
|
|
3382
3247
|
|
|
3383
|
-
#### `AgentIdentity`
|
|
3384
|
-
|
|
3385
|
-
Display identity for the AI coding agent and the host product, used to
|
|
3386
|
-
interpolate the `{{agentName}}` / `{{productName}}` tokens in shared chat/IDE
|
|
3387
|
-
copy. A consuming app sets these to its own agent + product brand names; the
|
|
3388
|
-
shared packages fall back to {@link DEFAULT_AGENT_IDENTITY} when it does not.
|
|
3389
|
-
|
|
3390
|
-
```typescript
|
|
3391
|
-
type AgentIdentity = ChatAgentIdentity
|
|
3392
|
-
```
|
|
3393
|
-
|
|
3394
|
-
#### `UseChatOptions`
|
|
3395
|
-
|
|
3396
|
-
Options for {@link useChat} (the shared chat session's options).
|
|
3397
|
-
|
|
3398
|
-
```typescript
|
|
3399
|
-
type UseChatOptions = ChatSessionOptions
|
|
3400
|
-
```
|
|
3401
|
-
|
|
3402
|
-
#### `SendMessageOptions`
|
|
3403
|
-
|
|
3404
|
-
Options for one `sendMessage` call.
|
|
3405
|
-
|
|
3406
|
-
```typescript
|
|
3407
|
-
type SendMessageOptions = ChatSendOptions
|
|
3408
|
-
```
|
|
3409
|
-
|
|
3410
|
-
#### `UseChatResult`
|
|
3411
|
-
|
|
3412
|
-
What {@link useChat} returns: each chat state field as a signal, and the
|
|
3413
|
-
session's controls as plain functions (stable for the component's life).
|
|
3414
|
-
|
|
3415
|
-
```typescript
|
|
3416
|
-
type UseChatResult = {
|
|
3417
|
-
readonly [K in keyof ChatSessionState]: Signal<ChatSessionState[K]>
|
|
3418
|
-
} & ChatSessionControls
|
|
3419
|
-
```
|
|
3420
|
-
|
|
3421
3248
|
#### `AsyncSetState`
|
|
3422
3249
|
|
|
3423
3250
|
An async-capable setState function: a value, an updater receiving the
|
|
@@ -3469,9 +3296,7 @@ Two compatible call forms:
|
|
|
3469
3296
|
English `defaultValue`, with optional `count` for pluralization.
|
|
3470
3297
|
|
|
3471
3298
|
```typescript
|
|
3472
|
-
type UseTFunction =
|
|
3473
|
-
(key: string, fallback: string, options?: UseTShorthandOptions): string
|
|
3474
|
-
}
|
|
3299
|
+
type UseTFunction = TranslateFunctionWithFallback
|
|
3475
3300
|
```
|
|
3476
3301
|
|
|
3477
3302
|
#### `VerifyPaymentReturnStatus`
|
|
@@ -5128,35 +4953,6 @@ copy.view.destroy() else (copy.node as ChildNode).remove() } }
|
|
|
5128
4953
|
|
|
5129
4954
|
### Functions
|
|
5130
4955
|
|
|
5131
|
-
#### `useChatProvider()`
|
|
5132
|
-
|
|
5133
|
-
The chat provider registered by `provideMolecule({ chat })` or `provideChat`.
|
|
5134
|
-
Call it in an injection context.
|
|
5135
|
-
|
|
5136
|
-
```typescript
|
|
5137
|
-
function useChatProvider(): ChatProvider
|
|
5138
|
-
```
|
|
5139
|
-
|
|
5140
|
-
**Returns:** The chat provider.
|
|
5141
|
-
|
|
5142
|
-
#### `useChat(options)`
|
|
5143
|
-
|
|
5144
|
-
AI chat with streaming: the transcript, loading and error state, mode, and
|
|
5145
|
-
the controls (send, abort, queue edits, history). Call it in an injection
|
|
5146
|
-
context (a component field initializer or constructor).
|
|
5147
|
-
|
|
5148
|
-
The options may be a signal: a new `endpoint` switches conversation and a
|
|
5149
|
-
new `projectId` moves to that project's transcript, on the same component,
|
|
5150
|
-
the way React re-renders `useChat`.
|
|
5151
|
-
|
|
5152
|
-
```typescript
|
|
5153
|
-
function useChat(options: UseChatOptions | Signal<UseChatOptions>): UseChatResult
|
|
5154
|
-
```
|
|
5155
|
-
|
|
5156
|
-
- `options` — Chat options (or a signal of them): endpoint, project id, history loading, callbacks.
|
|
5157
|
-
|
|
5158
|
-
**Returns:** Each state field as a signal, and the chat controls.
|
|
5159
|
-
|
|
5160
4956
|
#### `setHostRoot(host, root, options)`
|
|
5161
4957
|
|
|
5162
4958
|
Names the element that stands for the calling component's host: React's
|
|
@@ -5465,34 +5261,6 @@ function useExternalStore<T>(
|
|
|
5465
5261
|
|
|
5466
5262
|
**Returns:** A signal of the store's current snapshot.
|
|
5467
5263
|
|
|
5468
|
-
#### `resetAIModelsCache()`
|
|
5469
|
-
|
|
5470
|
-
Test-only: drops every cached model list so the next {@link useAIModels}
|
|
5471
|
-
call refetches. Exposed for unit tests; do not call from production code.
|
|
5472
|
-
|
|
5473
|
-
```typescript
|
|
5474
|
-
function resetAIModelsCache(): void
|
|
5475
|
-
```
|
|
5476
|
-
|
|
5477
|
-
#### `useAIModels(projectId)`
|
|
5478
|
-
|
|
5479
|
-
Subscribes to the cached AI model catalog. The first mount of a scope
|
|
5480
|
-
triggers a single `GET /ai/models` fetch; subsequent mounts return the
|
|
5481
|
-
cached result. Call it in an injection context.
|
|
5482
|
-
|
|
5483
|
-
The project id may be a signal: the hook then switches to that project's
|
|
5484
|
-
scope on the same component — resubscribing, resyncing from the new scope's
|
|
5485
|
-
cache and fetching it when it is not cached — the way React re-renders
|
|
5486
|
-
`useAIModels` with a new `projectId`.
|
|
5487
|
-
|
|
5488
|
-
```typescript
|
|
5489
|
-
function useAIModels(projectId?: MaybeSignal<string | undefined>): UseAIModelsResult
|
|
5490
|
-
```
|
|
5491
|
-
|
|
5492
|
-
- `projectId` — Optional project scope: includes that project's custom ("bring your own AI") models on servers that support them (or a signal of it).
|
|
5493
|
-
|
|
5494
|
-
**Returns:** Models, free-tier model, loading flag, and error as signals.
|
|
5495
|
-
|
|
5496
5264
|
#### `usePromise(asyncFn)`
|
|
5497
5265
|
|
|
5498
5266
|
Wraps an async function with the state of its latest call. Call it in an
|
|
@@ -6055,25 +5823,6 @@ function useCapacitorApp(options?: CapacitorAppOptions): UseCapacitorAppResult
|
|
|
6055
5823
|
|
|
6056
5824
|
**Returns:** The current app state as signals and an `initialize` function.
|
|
6057
5825
|
|
|
6058
|
-
#### `usePush(options)`
|
|
6059
|
-
|
|
6060
|
-
Push notification state and actions. Call it in an injection context.
|
|
6061
|
-
|
|
6062
|
-
Uses module-level `getProvider()` — push is a singleton, not
|
|
6063
|
-
registration-provided.
|
|
6064
|
-
|
|
6065
|
-
The options may be a signal: `checkOnMount` turning on through it checks the
|
|
6066
|
-
permission once more (when it was off before), the way React re-renders
|
|
6067
|
-
`usePush` with the new option.
|
|
6068
|
-
|
|
6069
|
-
```typescript
|
|
6070
|
-
function usePush(options?: MaybeSignal<UsePushOptions>): UsePushResult
|
|
6071
|
-
```
|
|
6072
|
-
|
|
6073
|
-
- `options` — Hook options (or a signal of them).
|
|
6074
|
-
|
|
6075
|
-
**Returns:** The permission and token as signals and the action functions.
|
|
6076
|
-
|
|
6077
5826
|
#### `useOptimisticToggle(options)`
|
|
6078
5827
|
|
|
6079
5828
|
Owns the state and save ordering of a follow, favorite, star or subscription control
|
|
@@ -6657,7 +6406,11 @@ dependency, so template bindings that call this function will be
|
|
|
6657
6406
|
re-evaluated when the locale changes.
|
|
6658
6407
|
|
|
6659
6408
|
```typescript
|
|
6660
|
-
function t(
|
|
6409
|
+
function t(
|
|
6410
|
+
key: string,
|
|
6411
|
+
values: InterpolationValues | undefined,
|
|
6412
|
+
options: TranslateOptions | undefined,
|
|
6413
|
+
): string
|
|
6661
6414
|
```
|
|
6662
6415
|
|
|
6663
6416
|
- `key` — Translation key
|
|
@@ -6877,18 +6630,6 @@ function provideLogger(provider: LoggerProvider): EnvironmentProviders
|
|
|
6877
6630
|
|
|
6878
6631
|
**Returns:** Environment providers
|
|
6879
6632
|
|
|
6880
|
-
#### `provideChat(provider)`
|
|
6881
|
-
|
|
6882
|
-
Registers the AI chat provider useChat and useChatProvider use.
|
|
6883
|
-
|
|
6884
|
-
```typescript
|
|
6885
|
-
function provideChat(provider: ChatProvider): EnvironmentProviders
|
|
6886
|
-
```
|
|
6887
|
-
|
|
6888
|
-
- `provider` — Chat provider
|
|
6889
|
-
|
|
6890
|
-
**Returns:** Environment providers
|
|
6891
|
-
|
|
6892
6633
|
#### `provideWorkspace(provider)`
|
|
6893
6634
|
|
|
6894
6635
|
Registers the IDE workspace provider useWorkspace and useWorkspaceProvider use.
|
|
@@ -7056,16 +6797,6 @@ function createPromiseState<Args extends unknown[], T>(
|
|
|
7056
6797
|
|
|
7057
6798
|
**Returns:** Promise state manager with observable state
|
|
7058
6799
|
|
|
7059
|
-
#### `createPushService()`
|
|
7060
|
-
|
|
7061
|
-
Creates an Angular push notifications service with reactive state.
|
|
7062
|
-
|
|
7063
|
-
```typescript
|
|
7064
|
-
function createPushService(): PushService
|
|
7065
|
-
```
|
|
7066
|
-
|
|
7067
|
-
**Returns:** Push service with observables and action methods
|
|
7068
|
-
|
|
7069
6800
|
#### `createSignupState(client)`
|
|
7070
6801
|
|
|
7071
6802
|
Creates a signup state manager with async state tracking.
|
|
@@ -7090,69 +6821,6 @@ function createVersionService(): VersionService
|
|
|
7090
6821
|
|
|
7091
6822
|
### Constants
|
|
7092
6823
|
|
|
7093
|
-
#### `DEFAULT_AGENT_NAME`
|
|
7094
|
-
|
|
7095
|
-
Neutral, product-agnostic agent name used when the host supplies none.
|
|
7096
|
-
|
|
7097
|
-
```typescript
|
|
7098
|
-
const DEFAULT_AGENT_NAME: typeof CHAT_DEFAULT_AGENT_NAME
|
|
7099
|
-
```
|
|
7100
|
-
|
|
7101
|
-
#### `DEFAULT_PRODUCT_NAME`
|
|
7102
|
-
|
|
7103
|
-
Neutral, product-agnostic product/IDE name used when the host supplies none.
|
|
7104
|
-
|
|
7105
|
-
```typescript
|
|
7106
|
-
const DEFAULT_PRODUCT_NAME: typeof CHAT_DEFAULT_PRODUCT_NAME
|
|
7107
|
-
```
|
|
7108
|
-
|
|
7109
|
-
#### `DEFAULT_AGENT_IDENTITY`
|
|
7110
|
-
|
|
7111
|
-
The neutral default identity ({@link DEFAULT_AGENT_NAME} +
|
|
7112
|
-
{@link DEFAULT_PRODUCT_NAME}) the shared packages use until a consuming app
|
|
7113
|
-
passes its own.
|
|
7114
|
-
|
|
7115
|
-
```typescript
|
|
7116
|
-
const DEFAULT_AGENT_IDENTITY: AgentIdentity
|
|
7117
|
-
```
|
|
7118
|
-
|
|
7119
|
-
#### `convergeHistory`
|
|
7120
|
-
|
|
7121
|
-
Converges the local transcript with authoritative server history. See
|
|
7122
|
-
`convergeHistory` in `@molecule/app-ai-chat`.
|
|
7123
|
-
|
|
7124
|
-
```typescript
|
|
7125
|
-
const convergeHistory: typeof coreConvergeHistory
|
|
7126
|
-
```
|
|
7127
|
-
|
|
7128
|
-
- `prev` — The local transcript.
|
|
7129
|
-
- `history` — The server's history.
|
|
7130
|
-
|
|
7131
|
-
**Returns:** The converged transcript.
|
|
7132
|
-
|
|
7133
|
-
#### `localOnlyMessages`
|
|
7134
|
-
|
|
7135
|
-
The local messages server history does not carry yet. See
|
|
7136
|
-
`localOnlyMessages` in `@molecule/app-ai-chat`.
|
|
7137
|
-
|
|
7138
|
-
```typescript
|
|
7139
|
-
const localOnlyMessages: typeof coreLocalOnlyMessages
|
|
7140
|
-
```
|
|
7141
|
-
|
|
7142
|
-
- `prev` — The local transcript.
|
|
7143
|
-
- `history` — The server's history.
|
|
7144
|
-
|
|
7145
|
-
**Returns:** The local-only messages.
|
|
7146
|
-
|
|
7147
|
-
#### `resetChatStoresForTests`
|
|
7148
|
-
|
|
7149
|
-
Clears every chat session store. Tests only: each test starts with no
|
|
7150
|
-
transcript, queue or stream left by the previous one.
|
|
7151
|
-
|
|
7152
|
-
```typescript
|
|
7153
|
-
const resetChatStoresForTests: typeof coreResetChatStoresForTests
|
|
7154
|
-
```
|
|
7155
|
-
|
|
7156
6824
|
#### `STATE_PROVIDER`
|
|
7157
6825
|
|
|
7158
6826
|
Injection token for state provider.
|
|
@@ -7217,14 +6885,6 @@ Injection token for logger provider.
|
|
|
7217
6885
|
const LOGGER_PROVIDER: InjectionToken<LoggerProvider>
|
|
7218
6886
|
```
|
|
7219
6887
|
|
|
7220
|
-
#### `CHAT_PROVIDER`
|
|
7221
|
-
|
|
7222
|
-
Injection token for the AI chat provider.
|
|
7223
|
-
|
|
7224
|
-
```typescript
|
|
7225
|
-
const CHAT_PROVIDER: InjectionToken<ChatProvider>
|
|
7226
|
-
```
|
|
7227
|
-
|
|
7228
6888
|
#### `WORKSPACE_PROVIDER`
|
|
7229
6889
|
|
|
7230
6890
|
Injection token for the IDE workspace provider.
|
|
@@ -7256,19 +6916,19 @@ const PREVIEW_PROVIDER: InjectionToken<PreviewProvider>
|
|
|
7256
6916
|
Peer dependencies:
|
|
7257
6917
|
|
|
7258
6918
|
- `@angular/core` ^22.0.0
|
|
7259
|
-
- `@molecule/app-ai-chat` ^1.8.0
|
|
7260
|
-
- `@molecule/app-ai-models` ^1.0.1
|
|
6919
|
+
- `@molecule/app-ai-chat` ^1.8.0 _(optional)_
|
|
6920
|
+
- `@molecule/app-ai-models` ^1.0.1 _(optional)_
|
|
7261
6921
|
- `@molecule/app-auth` ^3.0.0
|
|
7262
6922
|
- `@molecule/app-code-editor` ^1.0.1 _(optional)_
|
|
7263
6923
|
- `@molecule/app-device` ^1.0.1
|
|
7264
6924
|
- `@molecule/app-forms` ^2.4.0
|
|
7265
6925
|
- `@molecule/app-http` ^1.0.1
|
|
7266
|
-
- `@molecule/app-i18n` ^1.
|
|
6926
|
+
- `@molecule/app-i18n` ^1.4.0
|
|
7267
6927
|
- `@molecule/app-ide` ^1.1.0 _(optional)_
|
|
7268
6928
|
- `@molecule/app-live-preview` ^1.0.1 _(optional)_
|
|
7269
6929
|
- `@molecule/app-logger` ^1.0.1
|
|
7270
6930
|
- `@molecule/app-platform` ^1.0.1
|
|
7271
|
-
- `@molecule/app-push` ^1.0.1
|
|
6931
|
+
- `@molecule/app-push` ^1.0.1 _(optional)_
|
|
7272
6932
|
- `@molecule/app-routing` ^1.4.0
|
|
7273
6933
|
- `@molecule/app-routing-angular-router` >=1.4.0 _(optional)_
|
|
7274
6934
|
- `@molecule/app-state` ^1.2.0
|
|
@@ -7282,8 +6942,8 @@ Peer dependencies:
|
|
|
7282
6942
|
### Runtime Dependencies
|
|
7283
6943
|
|
|
7284
6944
|
- `@angular/core`
|
|
7285
|
-
- `@molecule/app-ai-chat`
|
|
7286
|
-
- `@molecule/app-ai-models`
|
|
6945
|
+
- `@molecule/app-ai-chat` _(optional)_
|
|
6946
|
+
- `@molecule/app-ai-models` _(optional)_
|
|
7287
6947
|
- `@molecule/app-auth`
|
|
7288
6948
|
- `@molecule/app-code-editor` _(optional)_
|
|
7289
6949
|
- `@molecule/app-device`
|
|
@@ -7294,7 +6954,7 @@ Peer dependencies:
|
|
|
7294
6954
|
- `@molecule/app-live-preview` _(optional)_
|
|
7295
6955
|
- `@molecule/app-logger`
|
|
7296
6956
|
- `@molecule/app-platform`
|
|
7297
|
-
- `@molecule/app-push`
|
|
6957
|
+
- `@molecule/app-push` _(optional)_
|
|
7298
6958
|
- `@molecule/app-routing`
|
|
7299
6959
|
- `@molecule/app-routing-angular-router` _(optional)_
|
|
7300
6960
|
- `@molecule/app-state`
|
|
@@ -7331,6 +6991,9 @@ Peer dependencies:
|
|
|
7331
6991
|
`<a href>` reloads the page; a hand-written `(click)` handler that calls `navigate()`
|
|
7332
6992
|
breaks ctrl/cmd-click (new tab) unless it repeats those rules.
|
|
7333
6993
|
|
|
6994
|
+
Use `@molecule/app-angular/chat`, `@molecule/app-angular/ai-models`, and
|
|
6995
|
+
`@molecule/app-angular/push` for those features.
|
|
6996
|
+
|
|
7334
6997
|
## Translations
|
|
7335
6998
|
|
|
7336
6999
|
Translation strings are provided by `@molecule/app-locales-angular`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-models.d.ts","sourceRoot":"","sources":["../src/ai-models.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-models.js","sourceRoot":"","sources":["../src/ai-models.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/chat/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/chat/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import type { ChatProvider } from '@molecule/app-ai-chat';
|
|
3
|
+
/**
|
|
4
|
+
* Injection token for the AI chat provider.
|
|
5
|
+
*/
|
|
6
|
+
export declare const CHAT_PROVIDER: InjectionToken<ChatProvider>;
|
|
7
|
+
//# sourceMappingURL=chat-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-context.d.ts","sourceRoot":"","sources":["../src/chat-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD;;GAEG;AACH,eAAO,MAAM,aAAa,8BAA6D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-context.js","sourceRoot":"","sources":["../src/chat-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAI9C;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,cAAc,CAAe,wBAAwB,CAAC,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type EnvironmentProviders } from '@angular/core';
|
|
2
|
+
import type { ChatProvider } from '@molecule/app-ai-chat';
|
|
3
|
+
/**
|
|
4
|
+
* Registers the AI chat provider useChat and useChatProvider use.
|
|
5
|
+
*
|
|
6
|
+
* @param provider - Chat provider
|
|
7
|
+
* @returns Environment providers
|
|
8
|
+
*/
|
|
9
|
+
export declare function provideChat(provider: ChatProvider): EnvironmentProviders;
|
|
10
|
+
//# sourceMappingURL=chat-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-provider.d.ts","sourceRoot":"","sources":["../src/chat-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAA4B,MAAM,eAAe,CAAA;AAEnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAIzD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,YAAY,GAAG,oBAAoB,CAExE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { makeEnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { CHAT_PROVIDER } from './chat-context.js';
|
|
3
|
+
/**
|
|
4
|
+
* Registers the AI chat provider useChat and useChatProvider use.
|
|
5
|
+
*
|
|
6
|
+
* @param provider - Chat provider
|
|
7
|
+
* @returns Environment providers
|
|
8
|
+
*/
|
|
9
|
+
export function provideChat(provider) {
|
|
10
|
+
return makeEnvironmentProviders([{ provide: CHAT_PROVIDER, useValue: provider }]);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=chat-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-provider.js","sourceRoot":"","sources":["../src/chat-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,wBAAwB,EAAE,MAAM,eAAe,CAAA;AAInF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,QAAsB;IAChD,OAAO,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAA;AACnF,CAAC"}
|
package/dist/chat.js
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
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 { CHAT_PROVIDER } from './chat-context.js';
|
|
10
11
|
import { readMaybeSignal } from './maybe-signal.js';
|
|
11
|
-
import { CHAT_PROVIDER } from './tokens.js';
|
|
12
12
|
/**
|
|
13
13
|
* Converges the local transcript with authoritative server history. See
|
|
14
14
|
* `convergeHistory` in `@molecule/app-ai-chat`.
|
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,oBAAoB,CAAA;AAEtC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../src/chat.ts"],"names":[],"mappings":"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"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,qBAAqB,CAAA;AACnC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kBAAkB,CAAA"}
|
package/dist/hooks/index.js
CHANGED
package/dist/hooks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,qBAAqB,CAAA;AACnC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kBAAkB,CAAA"}
|