@lunora/angular 1.0.0-alpha.213 → 1.0.0-alpha.215
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 +29 -0
- package/dist/index.d.mts +64 -3
- package/dist/index.d.ts +64 -3
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/liveTopic-Cz1BDkMP.mjs +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -82,6 +82,35 @@ liveQuery(api.messages.list, () => ({ channelId: this.channelId() }), {
|
|
|
82
82
|
});
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
+
## Live topics
|
|
86
|
+
|
|
87
|
+
`liveTopic` follows one topic a `defineLiveStream` declares, and mirrors the last
|
|
88
|
+
payload and any refusal into two signals: `lastEvent` and `error`. Pass the
|
|
89
|
+
reference `_generated/live.ts` hands out; the stream's route is resolved against
|
|
90
|
+
the injected `LunoraClient`, and `lastEvent` and `onEvent` are typed by the payload
|
|
91
|
+
the topic declares. It subscribes when the component is created and unsubscribes
|
|
92
|
+
on `DestroyRef`.
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
import { input } from "@angular/core";
|
|
96
|
+
import { liveTopic } from "@lunora/angular";
|
|
97
|
+
|
|
98
|
+
import { live } from "../lunora/_generated/live";
|
|
99
|
+
|
|
100
|
+
export class PostComponent {
|
|
101
|
+
readonly postId = input.required<string>();
|
|
102
|
+
|
|
103
|
+
readonly comments = liveTopic(() => live.posts.comments({ postId: this.postId() }));
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
A function makes the topic reactive: a new topic resubscribes, while a new
|
|
108
|
+
`onEvent` or `onError` callback is read at call time and does not. A plain
|
|
109
|
+
reference resolves once. Pass `{ client, destroyRef, injector }` as the second
|
|
110
|
+
argument when calling outside an injection context, as with `liveQuery`; the
|
|
111
|
+
options also take `shardKey` and `sessionKey` (each a string or a signal, which resubscribes on change) and the transport tuning `headers`,
|
|
112
|
+
`withCredentials`, `retryDelay` and `maxDelayMs`.
|
|
113
|
+
|
|
85
114
|
## Mutations
|
|
86
115
|
|
|
87
116
|
```ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DestroyRef, Signal, InjectionToken, EnvironmentProviders, Injector } from '@angular/core';
|
|
2
|
-
import { FunctionReference, LunoraClient, SubscriptionErrorCallback, SubscriptionError, User, LunoraClientOptions, ConnectionStatus, Preloaded, ArgsOf, ReturnOf, MutationCallOptions, MutatorHandle, ActionCallOptions } from '@lunora/client';
|
|
2
|
+
import { FunctionReference, LunoraClient, SubscriptionErrorCallback, SubscriptionError, User, LunoraClientOptions, ConnectionStatus, Preloaded, ArgsOf, ReturnOf, LiveTopicOptions as LiveTopicOptions$1, LiveTopicRef, LiveStreamSubscribeError, MutationCallOptions, MutatorHandle, ActionCallOptions } from '@lunora/client';
|
|
3
3
|
export type { ArgsOf, ConnectionStatus, FunctionReference, LunoraClient, LunoraClientOptions, MutationCallOptions, Preloaded, ReturnOf, SubscriptionError, Unsubscribe } from '@lunora/client';
|
|
4
4
|
import { AuthStatus } from '@lunora/client/auth';
|
|
5
5
|
import { PaginationStatus } from '@lunora/client/pagination';
|
|
@@ -840,6 +840,67 @@ interface LiveQueryOptions {
|
|
|
840
840
|
* @experimental
|
|
841
841
|
*/
|
|
842
842
|
declare const liveQuery: <F extends FunctionReference>(reference: F, args: ArgsOf<F> | "skip" | (() => ArgsOf<F> | "skip"), options?: LiveQueryOptions) => Signal<ReturnOf<F> | undefined>;
|
|
843
|
+
/**
|
|
844
|
+
* `LiveTopicOptions` is part of the experimental `@lunora/angular` API and may change without a major version bump.
|
|
845
|
+
* @experimental
|
|
846
|
+
*/
|
|
847
|
+
interface LiveTopicOptions<Payload = unknown> extends Omit<LiveTopicOptions$1<Payload>, "sessionKey" | "shardKey"> {
|
|
848
|
+
/**
|
|
849
|
+
* The client the stream's route is resolved against. Defaults to `LUNORA_CLIENT`, read in the
|
|
850
|
+
* ambient injection context, so pass it when calling outside one (with an explicit `destroyRef`).
|
|
851
|
+
*/
|
|
852
|
+
client?: LunoraClient;
|
|
853
|
+
/**
|
|
854
|
+
* `DestroyRef` whose `onDestroy` tears the subscription down. Defaults to
|
|
855
|
+
* `inject(DestroyRef)` — the calling component/service.
|
|
856
|
+
*/
|
|
857
|
+
destroyRef?: DestroyRef;
|
|
858
|
+
/**
|
|
859
|
+
* `Injector` to create the reactive-args `effect()` from. Only needed when the
|
|
860
|
+
* topic is a function AND `liveTopic` is called outside an injection context
|
|
861
|
+
* with an explicit `destroyRef`. Unused for the static form.
|
|
862
|
+
*/
|
|
863
|
+
injector?: Injector;
|
|
864
|
+
/**
|
|
865
|
+
* Partitions the shared live connection, as `sessionKey` does on `subscribeLiveTopic`: a changed value opens a new
|
|
866
|
+
* connection and closes the old one. Pass a signal (or any function) to make it reactive, e.g. to move to a new
|
|
867
|
+
* key on sign-out.
|
|
868
|
+
*/
|
|
869
|
+
sessionKey?: string | (() => string | undefined);
|
|
870
|
+
/**
|
|
871
|
+
* Follow the topic on this shard, as `shardKey` does on the other adapters. Pass a signal (or any function) when the
|
|
872
|
+
* shard comes from an input or other state that changes: a new value reopens the subscription on the new shard.
|
|
873
|
+
*/
|
|
874
|
+
shardKey?: string | (() => string | undefined);
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Follow one live topic on the connection shared by its stream's route, and mirror its
|
|
878
|
+
* payloads into an Angular `signal`. Pass the reference `_generated/live.ts` hands out
|
|
879
|
+
* (`live.posts.post({ postId })`); the route is resolved against the injected `LunoraClient`,
|
|
880
|
+
* and `lastEvent` and `onEvent` are typed by the payload the topic declares.
|
|
881
|
+
*
|
|
882
|
+
* `lastEvent` reads `undefined` until the first event lands; `error` carries the
|
|
883
|
+
* shard's refusal of the subscription. The subscription is torn down when the
|
|
884
|
+
* owning `DestroyRef` fires, so there is no leaked subscriber.
|
|
885
|
+
*
|
|
886
|
+
* ```ts
|
|
887
|
+
* export class PostComponent {
|
|
888
|
+
* readonly postId = input.required<string>();
|
|
889
|
+
*
|
|
890
|
+
* readonly comments = liveTopic(() => live.posts.post({ postId: this.postId() }));
|
|
891
|
+
* }
|
|
892
|
+
* ```
|
|
893
|
+
*
|
|
894
|
+
* Pass a function when the topic reads a signal, as above: an input is not bound while a field
|
|
895
|
+
* initializer runs, so a plain reference would read `this.postId` too early. A new topic, or a new
|
|
896
|
+
* `sessionKey` or `shardKey` signal value, resubscribes, while a new `onEvent` / `onError` identity is read at
|
|
897
|
+
* call time and does not reopen the subscription.
|
|
898
|
+
* @experimental
|
|
899
|
+
*/
|
|
900
|
+
declare const liveTopic: <Payload>(topic: LiveTopicRef<Payload> | (() => LiveTopicRef<Payload>), options?: LiveTopicOptions<Payload>) => {
|
|
901
|
+
error: Signal<LiveStreamSubscribeError | undefined>;
|
|
902
|
+
lastEvent: Signal<Payload | undefined>;
|
|
903
|
+
};
|
|
843
904
|
/**
|
|
844
905
|
* `MutateOptions` is part of the experimental `@lunora/angular` API and may change without a major version bump.
|
|
845
906
|
* @experimental
|
|
@@ -1499,7 +1560,7 @@ interface VoiceAgentResult {
|
|
|
1499
1560
|
* @experimental
|
|
1500
1561
|
*/
|
|
1501
1562
|
declare const voiceAgent: (options: VoiceAgentOptions) => VoiceAgentResult;
|
|
1502
|
-
export { type AgentApi, type AgentChatApi, type AgentChatMessage, type AgentChatOptions, type AgentChatResult, type AgentLiveEvent, type AgentOptions, type AgentProgressEvent, type AgentResult, type AgentStateApi, type AgentStateOptions, type AgentStateResult, type AgentThreadRecord, type AgentThreadStatus, type AgentTokenDelta, type AgentTokenStreamReference, type AgentToolEvent, type AgentToolEventsApi, type AgentToolEventsOptions, type AgentToolEventsResult, type AuthGateResult, type AuthOptions, type AuthResult, type ConnectionStatusOptions, type FlagOptions, type FlagValue, type FlagsOptions, type HeartbeatReference, type HydratePreloadedOptions, type HydratePreloadedResult, type InfiniteQueryResult, LUNORA_CLIENT, type ListPresentReference, type LiveQueryOptions, type MutateOptions, type MutatorResult, type PaginatedQueryOptions, type PaginatedQueryResult, type PresenceOptions, type PresenceResult,
|
|
1563
|
+
export { type AgentApi, type AgentChatApi, type AgentChatMessage, type AgentChatOptions, type AgentChatResult, type AgentLiveEvent, type AgentOptions, type AgentProgressEvent, type AgentResult, type AgentStateApi, type AgentStateOptions, type AgentStateResult, type AgentThreadRecord, type AgentThreadStatus, type AgentTokenDelta, type AgentTokenStreamReference, type AgentToolEvent, type AgentToolEventsApi, type AgentToolEventsOptions, type AgentToolEventsResult, type AuthGateResult, type AuthOptions, type AuthResult, type ConnectionStatusOptions, type FlagOptions, type FlagValue, type FlagsOptions, type HeartbeatReference, type HydratePreloadedOptions, type HydratePreloadedResult, type InfiniteQueryResult, LUNORA_CLIENT, type ListPresentReference, type LiveQueryOptions, type LiveTopicOptions, type MutateOptions, type MutatorResult, type PaginatedQueryOptions, type PaginatedQueryResult, type PresenceOptions, type PresenceResult,
|
|
1503
1564
|
/**
|
|
1504
1565
|
* The Angular adapter for Lunora.
|
|
1505
1566
|
*
|
|
@@ -1515,4 +1576,4 @@ export { type AgentApi, type AgentChatApi, type AgentChatMessage, type AgentChat
|
|
|
1515
1576
|
* queue pass through to the client). `connectionStatus` is a `signal` of the
|
|
1516
1577
|
* aggregate live-socket status.
|
|
1517
1578
|
*/
|
|
1518
|
-
type ProvideLunoraOptions, type RateLimitOptions, type RateLimitResult, type RunActionOptions, type StreamOptions, type StreamResult, type StreamStatus, type SubscriptionOptions, type SubscriptionResult, type VoiceAgentOptions, type VoiceAgentResult, type VoiceAudioFormat, type VoiceReference, type VoiceStatus, agent, agentChat, agentState, agentToolEvents, auth, authGate, connectionStatus, flag, flags, hydratePreloaded, infiniteQuery, injectLunoraClient, liveQuery, mutate, mutator, paginatedQuery, presence, provideLunora, rateLimit, runAction, stream, subscription, voiceAgent };
|
|
1579
|
+
type ProvideLunoraOptions, type RateLimitOptions, type RateLimitResult, type RunActionOptions, type StreamOptions, type StreamResult, type StreamStatus, type SubscriptionOptions, type SubscriptionResult, type VoiceAgentOptions, type VoiceAgentResult, type VoiceAudioFormat, type VoiceReference, type VoiceStatus, agent, agentChat, agentState, agentToolEvents, auth, authGate, connectionStatus, flag, flags, hydratePreloaded, infiniteQuery, injectLunoraClient, liveQuery, liveTopic, mutate, mutator, paginatedQuery, presence, provideLunora, rateLimit, runAction, stream, subscription, voiceAgent };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DestroyRef, Signal, InjectionToken, EnvironmentProviders, Injector } from '@angular/core';
|
|
2
|
-
import { FunctionReference, LunoraClient, SubscriptionErrorCallback, SubscriptionError, User, LunoraClientOptions, ConnectionStatus, Preloaded, ArgsOf, ReturnOf, MutationCallOptions, MutatorHandle, ActionCallOptions } from '@lunora/client';
|
|
2
|
+
import { FunctionReference, LunoraClient, SubscriptionErrorCallback, SubscriptionError, User, LunoraClientOptions, ConnectionStatus, Preloaded, ArgsOf, ReturnOf, LiveTopicOptions as LiveTopicOptions$1, LiveTopicRef, LiveStreamSubscribeError, MutationCallOptions, MutatorHandle, ActionCallOptions } from '@lunora/client';
|
|
3
3
|
export type { ArgsOf, ConnectionStatus, FunctionReference, LunoraClient, LunoraClientOptions, MutationCallOptions, Preloaded, ReturnOf, SubscriptionError, Unsubscribe } from '@lunora/client';
|
|
4
4
|
import { AuthStatus } from '@lunora/client/auth';
|
|
5
5
|
import { PaginationStatus } from '@lunora/client/pagination';
|
|
@@ -840,6 +840,67 @@ interface LiveQueryOptions {
|
|
|
840
840
|
* @experimental
|
|
841
841
|
*/
|
|
842
842
|
declare const liveQuery: <F extends FunctionReference>(reference: F, args: ArgsOf<F> | "skip" | (() => ArgsOf<F> | "skip"), options?: LiveQueryOptions) => Signal<ReturnOf<F> | undefined>;
|
|
843
|
+
/**
|
|
844
|
+
* `LiveTopicOptions` is part of the experimental `@lunora/angular` API and may change without a major version bump.
|
|
845
|
+
* @experimental
|
|
846
|
+
*/
|
|
847
|
+
interface LiveTopicOptions<Payload = unknown> extends Omit<LiveTopicOptions$1<Payload>, "sessionKey" | "shardKey"> {
|
|
848
|
+
/**
|
|
849
|
+
* The client the stream's route is resolved against. Defaults to `LUNORA_CLIENT`, read in the
|
|
850
|
+
* ambient injection context, so pass it when calling outside one (with an explicit `destroyRef`).
|
|
851
|
+
*/
|
|
852
|
+
client?: LunoraClient;
|
|
853
|
+
/**
|
|
854
|
+
* `DestroyRef` whose `onDestroy` tears the subscription down. Defaults to
|
|
855
|
+
* `inject(DestroyRef)` — the calling component/service.
|
|
856
|
+
*/
|
|
857
|
+
destroyRef?: DestroyRef;
|
|
858
|
+
/**
|
|
859
|
+
* `Injector` to create the reactive-args `effect()` from. Only needed when the
|
|
860
|
+
* topic is a function AND `liveTopic` is called outside an injection context
|
|
861
|
+
* with an explicit `destroyRef`. Unused for the static form.
|
|
862
|
+
*/
|
|
863
|
+
injector?: Injector;
|
|
864
|
+
/**
|
|
865
|
+
* Partitions the shared live connection, as `sessionKey` does on `subscribeLiveTopic`: a changed value opens a new
|
|
866
|
+
* connection and closes the old one. Pass a signal (or any function) to make it reactive, e.g. to move to a new
|
|
867
|
+
* key on sign-out.
|
|
868
|
+
*/
|
|
869
|
+
sessionKey?: string | (() => string | undefined);
|
|
870
|
+
/**
|
|
871
|
+
* Follow the topic on this shard, as `shardKey` does on the other adapters. Pass a signal (or any function) when the
|
|
872
|
+
* shard comes from an input or other state that changes: a new value reopens the subscription on the new shard.
|
|
873
|
+
*/
|
|
874
|
+
shardKey?: string | (() => string | undefined);
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Follow one live topic on the connection shared by its stream's route, and mirror its
|
|
878
|
+
* payloads into an Angular `signal`. Pass the reference `_generated/live.ts` hands out
|
|
879
|
+
* (`live.posts.post({ postId })`); the route is resolved against the injected `LunoraClient`,
|
|
880
|
+
* and `lastEvent` and `onEvent` are typed by the payload the topic declares.
|
|
881
|
+
*
|
|
882
|
+
* `lastEvent` reads `undefined` until the first event lands; `error` carries the
|
|
883
|
+
* shard's refusal of the subscription. The subscription is torn down when the
|
|
884
|
+
* owning `DestroyRef` fires, so there is no leaked subscriber.
|
|
885
|
+
*
|
|
886
|
+
* ```ts
|
|
887
|
+
* export class PostComponent {
|
|
888
|
+
* readonly postId = input.required<string>();
|
|
889
|
+
*
|
|
890
|
+
* readonly comments = liveTopic(() => live.posts.post({ postId: this.postId() }));
|
|
891
|
+
* }
|
|
892
|
+
* ```
|
|
893
|
+
*
|
|
894
|
+
* Pass a function when the topic reads a signal, as above: an input is not bound while a field
|
|
895
|
+
* initializer runs, so a plain reference would read `this.postId` too early. A new topic, or a new
|
|
896
|
+
* `sessionKey` or `shardKey` signal value, resubscribes, while a new `onEvent` / `onError` identity is read at
|
|
897
|
+
* call time and does not reopen the subscription.
|
|
898
|
+
* @experimental
|
|
899
|
+
*/
|
|
900
|
+
declare const liveTopic: <Payload>(topic: LiveTopicRef<Payload> | (() => LiveTopicRef<Payload>), options?: LiveTopicOptions<Payload>) => {
|
|
901
|
+
error: Signal<LiveStreamSubscribeError | undefined>;
|
|
902
|
+
lastEvent: Signal<Payload | undefined>;
|
|
903
|
+
};
|
|
843
904
|
/**
|
|
844
905
|
* `MutateOptions` is part of the experimental `@lunora/angular` API and may change without a major version bump.
|
|
845
906
|
* @experimental
|
|
@@ -1499,7 +1560,7 @@ interface VoiceAgentResult {
|
|
|
1499
1560
|
* @experimental
|
|
1500
1561
|
*/
|
|
1501
1562
|
declare const voiceAgent: (options: VoiceAgentOptions) => VoiceAgentResult;
|
|
1502
|
-
export { type AgentApi, type AgentChatApi, type AgentChatMessage, type AgentChatOptions, type AgentChatResult, type AgentLiveEvent, type AgentOptions, type AgentProgressEvent, type AgentResult, type AgentStateApi, type AgentStateOptions, type AgentStateResult, type AgentThreadRecord, type AgentThreadStatus, type AgentTokenDelta, type AgentTokenStreamReference, type AgentToolEvent, type AgentToolEventsApi, type AgentToolEventsOptions, type AgentToolEventsResult, type AuthGateResult, type AuthOptions, type AuthResult, type ConnectionStatusOptions, type FlagOptions, type FlagValue, type FlagsOptions, type HeartbeatReference, type HydratePreloadedOptions, type HydratePreloadedResult, type InfiniteQueryResult, LUNORA_CLIENT, type ListPresentReference, type LiveQueryOptions, type MutateOptions, type MutatorResult, type PaginatedQueryOptions, type PaginatedQueryResult, type PresenceOptions, type PresenceResult,
|
|
1563
|
+
export { type AgentApi, type AgentChatApi, type AgentChatMessage, type AgentChatOptions, type AgentChatResult, type AgentLiveEvent, type AgentOptions, type AgentProgressEvent, type AgentResult, type AgentStateApi, type AgentStateOptions, type AgentStateResult, type AgentThreadRecord, type AgentThreadStatus, type AgentTokenDelta, type AgentTokenStreamReference, type AgentToolEvent, type AgentToolEventsApi, type AgentToolEventsOptions, type AgentToolEventsResult, type AuthGateResult, type AuthOptions, type AuthResult, type ConnectionStatusOptions, type FlagOptions, type FlagValue, type FlagsOptions, type HeartbeatReference, type HydratePreloadedOptions, type HydratePreloadedResult, type InfiniteQueryResult, LUNORA_CLIENT, type ListPresentReference, type LiveQueryOptions, type LiveTopicOptions, type MutateOptions, type MutatorResult, type PaginatedQueryOptions, type PaginatedQueryResult, type PresenceOptions, type PresenceResult,
|
|
1503
1564
|
/**
|
|
1504
1565
|
* The Angular adapter for Lunora.
|
|
1505
1566
|
*
|
|
@@ -1515,4 +1576,4 @@ export { type AgentApi, type AgentChatApi, type AgentChatMessage, type AgentChat
|
|
|
1515
1576
|
* queue pass through to the client). `connectionStatus` is a `signal` of the
|
|
1516
1577
|
* aggregate live-socket status.
|
|
1517
1578
|
*/
|
|
1518
|
-
type ProvideLunoraOptions, type RateLimitOptions, type RateLimitResult, type RunActionOptions, type StreamOptions, type StreamResult, type StreamStatus, type SubscriptionOptions, type SubscriptionResult, type VoiceAgentOptions, type VoiceAgentResult, type VoiceAudioFormat, type VoiceReference, type VoiceStatus, agent, agentChat, agentState, agentToolEvents, auth, authGate, connectionStatus, flag, flags, hydratePreloaded, infiniteQuery, injectLunoraClient, liveQuery, mutate, mutator, paginatedQuery, presence, provideLunora, rateLimit, runAction, stream, subscription, voiceAgent };
|
|
1579
|
+
type ProvideLunoraOptions, type RateLimitOptions, type RateLimitResult, type RunActionOptions, type StreamOptions, type StreamResult, type StreamStatus, type SubscriptionOptions, type SubscriptionResult, type VoiceAgentOptions, type VoiceAgentResult, type VoiceAudioFormat, type VoiceReference, type VoiceStatus, agent, agentChat, agentState, agentToolEvents, auth, authGate, connectionStatus, flag, flags, hydratePreloaded, infiniteQuery, injectLunoraClient, liveQuery, liveTopic, mutate, mutator, paginatedQuery, presence, provideLunora, rateLimit, runAction, stream, subscription, voiceAgent };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{agent as
|
|
1
|
+
import{agent as e}from"./packem_shared/agent-DjMQf-yE.mjs";import{agentChat as p}from"./packem_shared/agentChat-DyJrje49.mjs";import{agentState as f}from"./packem_shared/agentState-Bjqf9q2f.mjs";import{agentToolEvents as x}from"./packem_shared/agentToolEvents-VuBRpS6v.mjs";import{auth as i,authGate as u}from"./packem_shared/auth-C3dB8sYS.mjs";import{LUNORA_CLIENT as g,injectLunoraClient as l,provideLunora as s}from"./packem_shared/LUNORA_CLIENT-B0toApHY.mjs";import{connectionStatus as v}from"./packem_shared/connectionStatus-UhmuwzMa.mjs";import{flag as h,flags as y}from"./packem_shared/flag-BDKBQGos.mjs";import{hydratePreloaded as C}from"./packem_shared/hydratePreloaded-QPAo50Am.mjs";import{liveQuery as S}from"./packem_shared/liveQuery-eE9zMaxo.mjs";import{liveTopic as E}from"./packem_shared/liveTopic-Cz1BDkMP.mjs";import{mutate as N}from"./packem_shared/mutate-BZvLQLyu.mjs";import{mutator as b}from"./packem_shared/mutator-DjG1yGk8.mjs";import{infiniteQuery as G,paginatedQuery as K}from"./packem_shared/infiniteQuery-DGYdgFHW.mjs";import{presence as R}from"./packem_shared/presence-1T4-U8ij.mjs";import{rateLimit as _}from"./packem_shared/rateLimit-B3h9qzh-.mjs";import{runAction as q}from"./packem_shared/runAction-BfiPq4Xz.mjs";import{stream as z}from"./packem_shared/stream-BuhiwhIH.mjs";import{subscription as D}from"./packem_shared/subscription-zJv48q6C.mjs";import{voiceAgent as H}from"./packem_shared/voiceAgent-CH--tRWP.mjs";import{SKIP as M}from"@lunora/client/query";export{g as LUNORA_CLIENT,M as SKIP,e as agent,p as agentChat,f as agentState,x as agentToolEvents,i as auth,u as authGate,v as connectionStatus,h as flag,y as flags,C as hydratePreloaded,G as infiniteQuery,l as injectLunoraClient,S as liveQuery,E as liveTopic,N as mutate,b as mutator,K as paginatedQuery,R as presence,s as provideLunora,_ as rateLimit,q as runAction,z as stream,D as subscription,H as voiceAgent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as D,DestroyRef as E,signal as d}from"@angular/core";import{liveTopicSubscription as K,subscribeLiveTopic as p}from"@lunora/client";import{resolveLunoraClient as j}from"./LUNORA_CLIENT-B0toApHY.mjs";import{s as x,a as C}from"./platform-DGTu4Ucl.mjs";const v=e=>({headers:e.headers,maxDelayMs:e.maxDelayMs,retryDelay:e.retryDelay,sessionKey:e.sessionKey,topic:e.topic,url:e.url,withCredentials:e.withCredentials}),L=(e,t={})=>{const u=j(t.client),m=t.destroyRef===void 0,i=t.destroyRef??D(E),n=d(void 0),s=d(void 0),h=typeof e=="function"?e:()=>e,{sessionKey:c,shardKey:y}=t,f=r=>typeof r=="function"?r():r,a=()=>K(u,h(),{...t,sessionKey:f(c),shardKey:f(y)}),l=(r,b)=>{n.set(void 0),s.set(void 0);const R=p({...r,onError:o=>{s.set(o),t.onError?.(o)},onEvent:o=>{n.set(o),s.set(void 0),t.onEvent?.(o)}});b(R)};return x(m)&&(typeof e=="function"||typeof c=="function"||typeof y=="function"?C(()=>v(a()),{destroyRef:i,injector:t.injector},l):l(v(a()),r=>i.onDestroy(r))),{error:s.asReadonly(),lastEvent:n.asReadonly()}};export{L as liveTopic};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/angular",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.215",
|
|
4
4
|
"description": "Angular reactive adapter for Lunora — signal-based live queries and mutations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@lunora/client": "1.0.0-alpha.
|
|
57
|
-
"@lunora/ratelimit": "1.0.0-alpha.
|
|
56
|
+
"@lunora/client": "1.0.0-alpha.229",
|
|
57
|
+
"@lunora/ratelimit": "1.0.0-alpha.152",
|
|
58
58
|
"@lunora/wire": "1.0.0-alpha.1",
|
|
59
59
|
"@visulima/storage-client": "1.0.9"
|
|
60
60
|
},
|