@tangle-network/agent-app 0.49.24 → 0.49.26

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.
@@ -1,12 +1,10 @@
1
1
  import {
2
2
  ChatEmptyState,
3
3
  ChatMessages
4
- } from "../chunk-WHHMYVDB.js";
4
+ } from "../chunk-VIL6MHHQ.js";
5
5
  import "../chunk-F32T3DRJ.js";
6
6
  import "../chunk-3HUFJ5LO.js";
7
- import {
8
- AsyncView
9
- } from "../chunk-3UBAO3N5.js";
7
+ import "../chunk-BATKJP3P.js";
10
8
  import "../chunk-FBVLEGEG.js";
11
9
  import "../chunk-ENLRJYVW.js";
12
10
  import "../chunk-GEYACSFW.js";
@@ -18,7 +16,9 @@ import {
18
16
  ModelPicker
19
17
  } from "../chunk-4I76LTZS.js";
20
18
  import "../chunk-SJWIZT7B.js";
21
- import "../chunk-BATKJP3P.js";
19
+ import {
20
+ AsyncView
21
+ } from "../chunk-3UBAO3N5.js";
22
22
  import "../chunk-FQYAJYPW.js";
23
23
  import "../chunk-NU7QSZBR.js";
24
24
  import "../chunk-MCYJON3F.js";
@@ -0,0 +1,37 @@
1
+ import type { Line, LineTransport } from './types';
2
+ /** User-facing deep links, not provider API calls. Invalid addresses render as text only. */
3
+ export declare function channelMessageLink(line: Line, instruction: string): string | null;
4
+ /** Delivery evidence comes exclusively from the host. An acquired line is not proof. */
5
+ export declare function ChannelVerificationPanel({ lineId, className }: {
6
+ lineId: string;
7
+ className?: string;
8
+ }): import("react").JSX.Element;
9
+ export interface ChannelConnectProps {
10
+ transport: LineTransport;
11
+ initialLineId?: string;
12
+ className?: string;
13
+ }
14
+ /** Select an existing line or connect an owned source, then verify it. */
15
+ export declare function ChannelConnect({ transport, initialLineId, className }: ChannelConnectProps): import("react").JSX.Element;
16
+ type TransportPanelProps = Omit<ChannelConnectProps, 'transport'>;
17
+ export declare function IMessageChannel(props: TransportPanelProps): import("react").JSX.Element;
18
+ export declare function WhatsAppChannel(props: TransportPanelProps): import("react").JSX.Element;
19
+ export declare function EmailChannel(props: TransportPanelProps): import("react").JSX.Element;
20
+ export declare function SMSChannel(props: TransportPanelProps): import("react").JSX.Element;
21
+ /** A transport's managed number activation, with explicit consent and cancellation. */
22
+ export declare function NumberChannel({ transport, className }: {
23
+ transport: 'sms' | 'imessage';
24
+ className?: string;
25
+ }): import("react").JSX.Element;
26
+ /** Read-only history. Messages stay on their original channel; no synthetic composer. */
27
+ export declare function ChannelConversation({ lineId, threadId, className }: {
28
+ lineId: string;
29
+ threadId: string;
30
+ className?: string;
31
+ }): import("react").JSX.Element;
32
+ /** A channel's separate member threads. Changing line never reuses another line's selection. */
33
+ export declare function ChannelConversations({ lineId, className }: {
34
+ lineId: string;
35
+ className?: string;
36
+ }): import("react").JSX.Element;
37
+ export {};
@@ -0,0 +1,14 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { ChannelsClient } from './types';
3
+ /** Mount below authentication. Changing scope remounts all channel state. */
4
+ export declare function ChannelsProvider({ client, pollInterval, children }: {
5
+ client: ChannelsClient;
6
+ /** Poll after a read settles, never concurrently. false disables polling. */
7
+ pollInterval?: number | false;
8
+ children: ReactNode;
9
+ }): import("react").JSX.Element;
10
+ export declare function useChannelsClient(): ChannelsClient;
11
+ export declare function useChannelsContext(): {
12
+ client: ChannelsClient;
13
+ pollInterval: number | false;
14
+ };
@@ -0,0 +1,35 @@
1
+ import type { AsyncLoadContext, AsyncResourceState, MutationOutcome } from '../web-react/async';
2
+ import type { ChannelVerification, ConnectChannelInput, Line, LineTransport } from './types';
3
+ /** Reuse the kit's abort/sequence-aware read machine; polling never overlaps a read. */
4
+ export declare function useChannelResource<T>(load: (context: AsyncLoadContext) => Promise<T>, deps: readonly unknown[], enabled?: boolean, poll?: boolean): AsyncResourceState<T>;
5
+ /** Single-flight on top of the shared confirmed-write primitive. */
6
+ export declare function useChannelMutation<I, O>(mutate: (input: I, context: AsyncLoadContext) => Promise<O>, onSucceeded?: (value: O) => void): {
7
+ state: import("../web-react/async").MutationState<O>;
8
+ reset: () => void;
9
+ run: (input: I) => Promise<MutationOutcome<O>>;
10
+ };
11
+ export declare function useChannels(): AsyncResourceState<Line[]>;
12
+ export declare function useChannelConnections(transport: LineTransport): AsyncResourceState<import("./types").ChannelConnection[]>;
13
+ export declare function useWhatsAppNumbers(connectionId: string): AsyncResourceState<import("./types").ChannelNumber[]>;
14
+ /** Connect only acquires/binds a line. It never labels it verified or activates replies. */
15
+ export declare function useConnectChannel(onConnected?: (line: Line) => void): {
16
+ state: import("../web-react/async").MutationState<Line>;
17
+ reset: () => void;
18
+ run: (input: ConnectChannelInput) => Promise<MutationOutcome<Line>>;
19
+ };
20
+ export declare function verificationExpired(test: ChannelVerification, now?: number): boolean;
21
+ export type VerificationAction = 'start' | 'resume' | 'send' | 'activate' | 'reset';
22
+ export declare function useChannel(lineId: string): {
23
+ state: import("../web-react/async").MutationState<void>;
24
+ reset: () => void;
25
+ run: (input: {
26
+ action: VerificationAction;
27
+ confirm?: boolean;
28
+ }) => Promise<MutationOutcome<void>>;
29
+ resource: AsyncResourceState<{
30
+ line: Line;
31
+ verification: ChannelVerification | null;
32
+ }>;
33
+ };
34
+ export declare function useChannelConversations(lineId: string): AsyncResourceState<import("@tangle-network/sandbox").LineThread[]>;
35
+ export declare function useChannelConversation(lineId: string, threadId: string): AsyncResourceState<import("@tangle-network/sandbox").LineMessage[]>;
@@ -0,0 +1,7 @@
1
+ /** Browser-safe channel UI. Supply one authenticated ChannelsClient; no server wiring is bundled. */
2
+ export type { ChannelsClient, ChannelConnection, ChannelNumber, ChannelReadContext, ChannelVerification, ConnectChannelInput, LinePayment, Line, LineAttachment, LineFromConnectionInput, LineMessage, LineThread, LineTransport, HubNumberOrder, HubNumberQuote, HubNumberReadiness, } from './types';
3
+ export { ChannelsProvider, useChannelsClient } from './context';
4
+ export { useChannels, useChannelConnections, useWhatsAppNumbers, useConnectChannel, useChannel, useChannelConversations, useChannelConversation, verificationExpired, type VerificationAction, } from './hooks';
5
+ export { ChannelConnect, ChannelVerificationPanel, IMessageChannel, WhatsAppChannel, SMSChannel, EmailChannel, NumberChannel, ChannelConversation, ChannelConversations, channelMessageLink, type ChannelConnectProps, } from './components';
6
+ export { useNumberChannel, holdsNumber, numberStage, NUMBER_CHARGE_NOTICE, NUMBER_RETRY_NOTICE } from './numbers';
7
+ export { useLinePayment, LinePayPage, safeCheckoutUrl } from './payment';