@dabalabs/agent 0.0.1-beta → 0.0.4-beta
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 +56 -3
- package/dist/chunk-3BQ6LE6X.cjs +222 -0
- package/dist/chunk-3BQ6LE6X.cjs.map +1 -0
- package/dist/chunk-ETI4LRM7.js +5936 -0
- package/dist/chunk-ETI4LRM7.js.map +1 -0
- package/dist/chunk-TYOHYQDK.js +220 -0
- package/dist/chunk-TYOHYQDK.js.map +1 -0
- package/dist/chunk-VAIC5ACS.cjs +5939 -0
- package/dist/chunk-VAIC5ACS.cjs.map +1 -0
- package/dist/custom-element.cjs +4 -4
- package/dist/custom-element.d.cts +191 -2
- package/dist/custom-element.d.ts +191 -2
- package/dist/custom-element.js +2 -2
- package/dist/daba-agent.cjs +5 -14
- package/dist/daba-agent.d.cts +2 -4
- package/dist/daba-agent.d.ts +2 -4
- package/dist/daba-agent.js +2 -3
- package/dist/daba-agent.min.js +1847 -215
- package/dist/daba-agent.min.js.map +1 -1
- package/dist/react.cjs +41 -14
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +38 -2
- package/dist/react.js.map +1 -1
- package/dist/types-BQRgqD4n.d.cts +305 -0
- package/dist/types-BQRgqD4n.d.ts +305 -0
- package/package.json +2 -2
- package/dist/chunk-EF6D33VT.cjs +0 -103
- package/dist/chunk-EF6D33VT.cjs.map +0 -1
- package/dist/chunk-G22V7GGM.js +0 -1667
- package/dist/chunk-G22V7GGM.js.map +0 -1
- package/dist/chunk-N4TBGDUO.cjs +0 -1669
- package/dist/chunk-N4TBGDUO.cjs.map +0 -1
- package/dist/chunk-QM6HDEVV.js +0 -39
- package/dist/chunk-QM6HDEVV.js.map +0 -1
- package/dist/chunk-WJQ444GI.js +0 -100
- package/dist/chunk-WJQ444GI.js.map +0 -1
- package/dist/chunk-ZXZX2D55.cjs +0 -45
- package/dist/chunk-ZXZX2D55.cjs.map +0 -1
- package/dist/custom-element-CpPr7b2Z.d.ts +0 -66
- package/dist/custom-element-XiZg8UN8.d.cts +0 -66
- package/dist/types-DYRGPzyp.d.cts +0 -76
- package/dist/types-DYRGPzyp.d.ts +0 -76
package/dist/custom-element.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunk3BQ6LE6X_cjs = require('./chunk-3BQ6LE6X.cjs');
|
|
4
|
+
require('./chunk-VAIC5ACS.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "DabaAgentElement", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunk3BQ6LE6X_cjs.DabaAgentElement; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "defineDabaAgentElement", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk3BQ6LE6X_cjs.defineDabaAgentElement; }
|
|
15
15
|
});
|
|
16
16
|
//# sourceMappingURL=custom-element.cjs.map
|
|
17
17
|
//# sourceMappingURL=custom-element.cjs.map
|
|
@@ -1,2 +1,191 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { D as DabaAgentOptions, a as DabaAgentStatus } from './types-BQRgqD4n.cjs';
|
|
2
|
+
|
|
3
|
+
interface StoredConversation {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
/** When the last message was added, not when the thread started — the
|
|
7
|
+
* list is ordered by recency, which is what "go back to my chat" means. */
|
|
8
|
+
updatedAt: number;
|
|
9
|
+
messageCount: number;
|
|
10
|
+
/** Path only, never the query string: a search page's URL can carry what
|
|
11
|
+
* the visitor typed, and this record outlives their session. */
|
|
12
|
+
path: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare class DabaAgent {
|
|
16
|
+
private readonly options;
|
|
17
|
+
private readonly position;
|
|
18
|
+
private mode;
|
|
19
|
+
private readonly badge;
|
|
20
|
+
private readonly badgeLabel;
|
|
21
|
+
private readonly chatWindow;
|
|
22
|
+
private readonly messagesContainer;
|
|
23
|
+
private readonly inputElement;
|
|
24
|
+
private readonly micBtn;
|
|
25
|
+
/** The shortcut as a visitor reads it, or null when the embed disabled
|
|
26
|
+
* it. Computed once and reused by the badge so the tooltip, the panel
|
|
27
|
+
* hint and the accessible name can never name different keys. */
|
|
28
|
+
private readonly hotkeyText;
|
|
29
|
+
/** Parsed once. Re-parsing inside the keydown handler ran the whole
|
|
30
|
+
* string through split/find on every keystroke the visitor typed. */
|
|
31
|
+
private readonly parsedHotkey;
|
|
32
|
+
private readonly heldModifier;
|
|
33
|
+
private readonly keydownHandler;
|
|
34
|
+
private readonly keyupHandler;
|
|
35
|
+
private readonly blurHandler;
|
|
36
|
+
private holdTimer;
|
|
37
|
+
/** Set the moment a hold activates and cleared only on the matching
|
|
38
|
+
* keyup, so one physical press cannot start two sessions if the browser
|
|
39
|
+
* repeats the modifier keydown. */
|
|
40
|
+
private holdFired;
|
|
41
|
+
private readonly restricted;
|
|
42
|
+
private status;
|
|
43
|
+
private isOpen;
|
|
44
|
+
private destroyed;
|
|
45
|
+
private ws;
|
|
46
|
+
private audioContext;
|
|
47
|
+
private mic;
|
|
48
|
+
private player;
|
|
49
|
+
private bargeInStreak;
|
|
50
|
+
private isReattaching;
|
|
51
|
+
private messages;
|
|
52
|
+
private currentStreamBubble;
|
|
53
|
+
private currentStreamRole;
|
|
54
|
+
private currentStreamText;
|
|
55
|
+
private readonly ui;
|
|
56
|
+
private readonly strings;
|
|
57
|
+
private readonly uiLang;
|
|
58
|
+
private conversationId;
|
|
59
|
+
private chatInFlight;
|
|
60
|
+
private remoteConfig;
|
|
61
|
+
private live;
|
|
62
|
+
constructor(options: DabaAgentOptions);
|
|
63
|
+
/** Put back what this thread already showed, so a reload or a
|
|
64
|
+
* navigate() lands the visitor mid-conversation, not on a blank intro
|
|
65
|
+
* while the model silently remembers the last four turns. */
|
|
66
|
+
private restoreTranscript;
|
|
67
|
+
/** Put a stored thread on screen and into `messages`. Shared by the
|
|
68
|
+
* reload path and by opening something out of the archive, so a
|
|
69
|
+
* reopened conversation behaves exactly like a resumed one. */
|
|
70
|
+
private renderMessages;
|
|
71
|
+
private saveTranscript;
|
|
72
|
+
/** The archive, newest first. Empty unless the embed opted in. */
|
|
73
|
+
listConversations(): StoredConversation[];
|
|
74
|
+
/**
|
|
75
|
+
* Reopen an archived conversation as the LIVE one.
|
|
76
|
+
*
|
|
77
|
+
* Resuming rather than previewing: the gateway keeps its own thread
|
|
78
|
+
* state keyed on the conversation id, so restoring the id means the
|
|
79
|
+
* model still has the context the visitor is looking at. A read-only
|
|
80
|
+
* view would show a conversation they cannot continue, which is the one
|
|
81
|
+
* thing "go back to my chat" does not mean.
|
|
82
|
+
*/
|
|
83
|
+
openConversation(id: string): void;
|
|
84
|
+
deleteConversation(id: string): void;
|
|
85
|
+
clearHistory(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Pull the project's own mode, theme, intro and locale from the gateway.
|
|
88
|
+
*
|
|
89
|
+
* Fire-and-forget on purpose: the widget is fully usable before this
|
|
90
|
+
* resolves and stays usable if it never does. A visitor must never be
|
|
91
|
+
* left unable to type because a styling fetch was slow, so every failure
|
|
92
|
+
* path here is a silent fall back to the built-in brand kit rather than
|
|
93
|
+
* an error the visitor has to read.
|
|
94
|
+
*/
|
|
95
|
+
private loadRemoteConfig;
|
|
96
|
+
/** Show or hide the voice controls to match the resolved mode. Removing
|
|
97
|
+
* them rather than disabling them: a greyed-out microphone still
|
|
98
|
+
* promises voice the project has switched off. */
|
|
99
|
+
private applyMode;
|
|
100
|
+
private handleKeydown;
|
|
101
|
+
private handleKeyup;
|
|
102
|
+
/**
|
|
103
|
+
* What a completed hold does: START talking, never stop.
|
|
104
|
+
*
|
|
105
|
+
* The panel advertises this as "Hold ^ to talk". A visitor who keeps
|
|
106
|
+
* holding while they speak — which is what those words invite — was
|
|
107
|
+
* hanging up on themselves, because the hold used to call toggle() and
|
|
108
|
+
* the second completed hold ended the session. Ending a conversation is
|
|
109
|
+
* the badge's job, and the badge tooltip already says so.
|
|
110
|
+
*/
|
|
111
|
+
private activate;
|
|
112
|
+
/** Releasing early, pressing another key, or leaving the tab all mean the
|
|
113
|
+
* hold did not happen. Letting a stale timer survive any of those is how
|
|
114
|
+
* a widget opens itself for no reason the visitor can see. */
|
|
115
|
+
private cancelHold;
|
|
116
|
+
private setStatus;
|
|
117
|
+
private emitError;
|
|
118
|
+
get currentStatus(): DabaAgentStatus;
|
|
119
|
+
get isActive(): boolean;
|
|
120
|
+
get isChatOpen(): boolean;
|
|
121
|
+
openChat(): void;
|
|
122
|
+
closeChat(): void;
|
|
123
|
+
toggleChat(): void;
|
|
124
|
+
/**
|
|
125
|
+
* Send one typed message.
|
|
126
|
+
*
|
|
127
|
+
* This used to call `startSession()`, which opens the Realtime
|
|
128
|
+
* WebSocket, and `onSocketOpen` then unconditionally grabbed the
|
|
129
|
+
* microphone — so typing a sentence demanded microphone permission and
|
|
130
|
+
* was billed as voice minutes. Typing now goes over plain HTTP and
|
|
131
|
+
* touches neither the mic, the AudioContext nor the socket.
|
|
132
|
+
*
|
|
133
|
+
* The one exception is a voice session that is ALREADY live: injecting
|
|
134
|
+
* the text there keeps a single continuous conversation, which is what a
|
|
135
|
+
* visitor switching medium mid-sentence expects. It is not a reason to
|
|
136
|
+
* start a session that does not exist.
|
|
137
|
+
*/
|
|
138
|
+
sendText(text: string): Promise<void>;
|
|
139
|
+
private sendChatMessage;
|
|
140
|
+
/**
|
|
141
|
+
* Start a new conversation: clear the transcript, forget the history the
|
|
142
|
+
* gateway is keyed on, and put the intro back. A fresh id rather than a
|
|
143
|
+
* reset flag, so the old thread simply expires on its own TTL instead of
|
|
144
|
+
* needing a round trip to delete.
|
|
145
|
+
*/
|
|
146
|
+
resetConversation(): void;
|
|
147
|
+
/** Voice, explicitly. Never reached in chat mode — the controls that
|
|
148
|
+
* would call it are not rendered there. */
|
|
149
|
+
private toggleVoice;
|
|
150
|
+
private handleTranscriptDelta;
|
|
151
|
+
toggle(): Promise<void>;
|
|
152
|
+
private get usesLiveEngine();
|
|
153
|
+
private startLiveSession;
|
|
154
|
+
private runVoiceTool;
|
|
155
|
+
private startSession;
|
|
156
|
+
private tryReattach;
|
|
157
|
+
private attachWebSocket;
|
|
158
|
+
private onSocketOpen;
|
|
159
|
+
private onMicFrame;
|
|
160
|
+
private onSocketMessage;
|
|
161
|
+
private executeTool;
|
|
162
|
+
private handleToolCall;
|
|
163
|
+
private stopSession;
|
|
164
|
+
private handleSocketClose;
|
|
165
|
+
private flashBadgeError;
|
|
166
|
+
private cleanupAfterClose;
|
|
167
|
+
destroy(): void;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
type DabaAgentElementConstructor = new () => DabaAgentElement;
|
|
171
|
+
/**
|
|
172
|
+
* The element's public shape.
|
|
173
|
+
*
|
|
174
|
+
* A type, not a class: `class ... extends HTMLElement` evaluates its
|
|
175
|
+
* extends clause the moment the module does, and on a server there is no
|
|
176
|
+
* HTMLElement — which is why importing the package root from a Next.js
|
|
177
|
+
* layout threw "HTMLElement is not defined" and forced every integrator
|
|
178
|
+
* into a dynamic import inside an effect. The real class is built by
|
|
179
|
+
* defineDabaAgentElement(), which only ever runs in a browser.
|
|
180
|
+
*/
|
|
181
|
+
interface DabaAgentElement extends HTMLElement {
|
|
182
|
+
readonly dabaAgent: DabaAgent | null;
|
|
183
|
+
sendText(text: string): Promise<void> | undefined;
|
|
184
|
+
openChat(): void;
|
|
185
|
+
closeChat(): void;
|
|
186
|
+
toggleChat(): void;
|
|
187
|
+
}
|
|
188
|
+
declare let DabaAgentElement: DabaAgentElementConstructor | undefined;
|
|
189
|
+
declare function defineDabaAgentElement(tagName?: string): void;
|
|
190
|
+
|
|
191
|
+
export { DabaAgent as D, DabaAgentElement, type DabaAgentElementConstructor, type StoredConversation as S, defineDabaAgentElement };
|
package/dist/custom-element.d.ts
CHANGED
|
@@ -1,2 +1,191 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { D as DabaAgentOptions, a as DabaAgentStatus } from './types-BQRgqD4n.js';
|
|
2
|
+
|
|
3
|
+
interface StoredConversation {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
/** When the last message was added, not when the thread started — the
|
|
7
|
+
* list is ordered by recency, which is what "go back to my chat" means. */
|
|
8
|
+
updatedAt: number;
|
|
9
|
+
messageCount: number;
|
|
10
|
+
/** Path only, never the query string: a search page's URL can carry what
|
|
11
|
+
* the visitor typed, and this record outlives their session. */
|
|
12
|
+
path: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare class DabaAgent {
|
|
16
|
+
private readonly options;
|
|
17
|
+
private readonly position;
|
|
18
|
+
private mode;
|
|
19
|
+
private readonly badge;
|
|
20
|
+
private readonly badgeLabel;
|
|
21
|
+
private readonly chatWindow;
|
|
22
|
+
private readonly messagesContainer;
|
|
23
|
+
private readonly inputElement;
|
|
24
|
+
private readonly micBtn;
|
|
25
|
+
/** The shortcut as a visitor reads it, or null when the embed disabled
|
|
26
|
+
* it. Computed once and reused by the badge so the tooltip, the panel
|
|
27
|
+
* hint and the accessible name can never name different keys. */
|
|
28
|
+
private readonly hotkeyText;
|
|
29
|
+
/** Parsed once. Re-parsing inside the keydown handler ran the whole
|
|
30
|
+
* string through split/find on every keystroke the visitor typed. */
|
|
31
|
+
private readonly parsedHotkey;
|
|
32
|
+
private readonly heldModifier;
|
|
33
|
+
private readonly keydownHandler;
|
|
34
|
+
private readonly keyupHandler;
|
|
35
|
+
private readonly blurHandler;
|
|
36
|
+
private holdTimer;
|
|
37
|
+
/** Set the moment a hold activates and cleared only on the matching
|
|
38
|
+
* keyup, so one physical press cannot start two sessions if the browser
|
|
39
|
+
* repeats the modifier keydown. */
|
|
40
|
+
private holdFired;
|
|
41
|
+
private readonly restricted;
|
|
42
|
+
private status;
|
|
43
|
+
private isOpen;
|
|
44
|
+
private destroyed;
|
|
45
|
+
private ws;
|
|
46
|
+
private audioContext;
|
|
47
|
+
private mic;
|
|
48
|
+
private player;
|
|
49
|
+
private bargeInStreak;
|
|
50
|
+
private isReattaching;
|
|
51
|
+
private messages;
|
|
52
|
+
private currentStreamBubble;
|
|
53
|
+
private currentStreamRole;
|
|
54
|
+
private currentStreamText;
|
|
55
|
+
private readonly ui;
|
|
56
|
+
private readonly strings;
|
|
57
|
+
private readonly uiLang;
|
|
58
|
+
private conversationId;
|
|
59
|
+
private chatInFlight;
|
|
60
|
+
private remoteConfig;
|
|
61
|
+
private live;
|
|
62
|
+
constructor(options: DabaAgentOptions);
|
|
63
|
+
/** Put back what this thread already showed, so a reload or a
|
|
64
|
+
* navigate() lands the visitor mid-conversation, not on a blank intro
|
|
65
|
+
* while the model silently remembers the last four turns. */
|
|
66
|
+
private restoreTranscript;
|
|
67
|
+
/** Put a stored thread on screen and into `messages`. Shared by the
|
|
68
|
+
* reload path and by opening something out of the archive, so a
|
|
69
|
+
* reopened conversation behaves exactly like a resumed one. */
|
|
70
|
+
private renderMessages;
|
|
71
|
+
private saveTranscript;
|
|
72
|
+
/** The archive, newest first. Empty unless the embed opted in. */
|
|
73
|
+
listConversations(): StoredConversation[];
|
|
74
|
+
/**
|
|
75
|
+
* Reopen an archived conversation as the LIVE one.
|
|
76
|
+
*
|
|
77
|
+
* Resuming rather than previewing: the gateway keeps its own thread
|
|
78
|
+
* state keyed on the conversation id, so restoring the id means the
|
|
79
|
+
* model still has the context the visitor is looking at. A read-only
|
|
80
|
+
* view would show a conversation they cannot continue, which is the one
|
|
81
|
+
* thing "go back to my chat" does not mean.
|
|
82
|
+
*/
|
|
83
|
+
openConversation(id: string): void;
|
|
84
|
+
deleteConversation(id: string): void;
|
|
85
|
+
clearHistory(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Pull the project's own mode, theme, intro and locale from the gateway.
|
|
88
|
+
*
|
|
89
|
+
* Fire-and-forget on purpose: the widget is fully usable before this
|
|
90
|
+
* resolves and stays usable if it never does. A visitor must never be
|
|
91
|
+
* left unable to type because a styling fetch was slow, so every failure
|
|
92
|
+
* path here is a silent fall back to the built-in brand kit rather than
|
|
93
|
+
* an error the visitor has to read.
|
|
94
|
+
*/
|
|
95
|
+
private loadRemoteConfig;
|
|
96
|
+
/** Show or hide the voice controls to match the resolved mode. Removing
|
|
97
|
+
* them rather than disabling them: a greyed-out microphone still
|
|
98
|
+
* promises voice the project has switched off. */
|
|
99
|
+
private applyMode;
|
|
100
|
+
private handleKeydown;
|
|
101
|
+
private handleKeyup;
|
|
102
|
+
/**
|
|
103
|
+
* What a completed hold does: START talking, never stop.
|
|
104
|
+
*
|
|
105
|
+
* The panel advertises this as "Hold ^ to talk". A visitor who keeps
|
|
106
|
+
* holding while they speak — which is what those words invite — was
|
|
107
|
+
* hanging up on themselves, because the hold used to call toggle() and
|
|
108
|
+
* the second completed hold ended the session. Ending a conversation is
|
|
109
|
+
* the badge's job, and the badge tooltip already says so.
|
|
110
|
+
*/
|
|
111
|
+
private activate;
|
|
112
|
+
/** Releasing early, pressing another key, or leaving the tab all mean the
|
|
113
|
+
* hold did not happen. Letting a stale timer survive any of those is how
|
|
114
|
+
* a widget opens itself for no reason the visitor can see. */
|
|
115
|
+
private cancelHold;
|
|
116
|
+
private setStatus;
|
|
117
|
+
private emitError;
|
|
118
|
+
get currentStatus(): DabaAgentStatus;
|
|
119
|
+
get isActive(): boolean;
|
|
120
|
+
get isChatOpen(): boolean;
|
|
121
|
+
openChat(): void;
|
|
122
|
+
closeChat(): void;
|
|
123
|
+
toggleChat(): void;
|
|
124
|
+
/**
|
|
125
|
+
* Send one typed message.
|
|
126
|
+
*
|
|
127
|
+
* This used to call `startSession()`, which opens the Realtime
|
|
128
|
+
* WebSocket, and `onSocketOpen` then unconditionally grabbed the
|
|
129
|
+
* microphone — so typing a sentence demanded microphone permission and
|
|
130
|
+
* was billed as voice minutes. Typing now goes over plain HTTP and
|
|
131
|
+
* touches neither the mic, the AudioContext nor the socket.
|
|
132
|
+
*
|
|
133
|
+
* The one exception is a voice session that is ALREADY live: injecting
|
|
134
|
+
* the text there keeps a single continuous conversation, which is what a
|
|
135
|
+
* visitor switching medium mid-sentence expects. It is not a reason to
|
|
136
|
+
* start a session that does not exist.
|
|
137
|
+
*/
|
|
138
|
+
sendText(text: string): Promise<void>;
|
|
139
|
+
private sendChatMessage;
|
|
140
|
+
/**
|
|
141
|
+
* Start a new conversation: clear the transcript, forget the history the
|
|
142
|
+
* gateway is keyed on, and put the intro back. A fresh id rather than a
|
|
143
|
+
* reset flag, so the old thread simply expires on its own TTL instead of
|
|
144
|
+
* needing a round trip to delete.
|
|
145
|
+
*/
|
|
146
|
+
resetConversation(): void;
|
|
147
|
+
/** Voice, explicitly. Never reached in chat mode — the controls that
|
|
148
|
+
* would call it are not rendered there. */
|
|
149
|
+
private toggleVoice;
|
|
150
|
+
private handleTranscriptDelta;
|
|
151
|
+
toggle(): Promise<void>;
|
|
152
|
+
private get usesLiveEngine();
|
|
153
|
+
private startLiveSession;
|
|
154
|
+
private runVoiceTool;
|
|
155
|
+
private startSession;
|
|
156
|
+
private tryReattach;
|
|
157
|
+
private attachWebSocket;
|
|
158
|
+
private onSocketOpen;
|
|
159
|
+
private onMicFrame;
|
|
160
|
+
private onSocketMessage;
|
|
161
|
+
private executeTool;
|
|
162
|
+
private handleToolCall;
|
|
163
|
+
private stopSession;
|
|
164
|
+
private handleSocketClose;
|
|
165
|
+
private flashBadgeError;
|
|
166
|
+
private cleanupAfterClose;
|
|
167
|
+
destroy(): void;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
type DabaAgentElementConstructor = new () => DabaAgentElement;
|
|
171
|
+
/**
|
|
172
|
+
* The element's public shape.
|
|
173
|
+
*
|
|
174
|
+
* A type, not a class: `class ... extends HTMLElement` evaluates its
|
|
175
|
+
* extends clause the moment the module does, and on a server there is no
|
|
176
|
+
* HTMLElement — which is why importing the package root from a Next.js
|
|
177
|
+
* layout threw "HTMLElement is not defined" and forced every integrator
|
|
178
|
+
* into a dynamic import inside an effect. The real class is built by
|
|
179
|
+
* defineDabaAgentElement(), which only ever runs in a browser.
|
|
180
|
+
*/
|
|
181
|
+
interface DabaAgentElement extends HTMLElement {
|
|
182
|
+
readonly dabaAgent: DabaAgent | null;
|
|
183
|
+
sendText(text: string): Promise<void> | undefined;
|
|
184
|
+
openChat(): void;
|
|
185
|
+
closeChat(): void;
|
|
186
|
+
toggleChat(): void;
|
|
187
|
+
}
|
|
188
|
+
declare let DabaAgentElement: DabaAgentElementConstructor | undefined;
|
|
189
|
+
declare function defineDabaAgentElement(tagName?: string): void;
|
|
190
|
+
|
|
191
|
+
export { DabaAgent as D, DabaAgentElement, type DabaAgentElementConstructor, type StoredConversation as S, defineDabaAgentElement };
|
package/dist/custom-element.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DabaAgentElement, defineDabaAgentElement } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { DabaAgentElement, defineDabaAgentElement } from './chunk-TYOHYQDK.js';
|
|
2
|
+
import './chunk-ETI4LRM7.js';
|
|
3
3
|
//# sourceMappingURL=custom-element.js.map
|
|
4
4
|
//# sourceMappingURL=custom-element.js.map
|
package/dist/daba-agent.cjs
CHANGED
|
@@ -1,30 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var chunkN4TBGDUO_cjs = require('./chunk-N4TBGDUO.cjs');
|
|
3
|
+
var chunk3BQ6LE6X_cjs = require('./chunk-3BQ6LE6X.cjs');
|
|
4
|
+
var chunkVAIC5ACS_cjs = require('./chunk-VAIC5ACS.cjs');
|
|
6
5
|
|
|
7
6
|
|
|
8
7
|
|
|
9
|
-
Object.defineProperty(exports, "DabaAgentComponent", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () { return chunkZXZX2D55_cjs.DabaAgentComponent; }
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "DabaAgentReact", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () { return chunkZXZX2D55_cjs.DabaAgentComponent; }
|
|
16
|
-
});
|
|
17
8
|
Object.defineProperty(exports, "DabaAgentElement", {
|
|
18
9
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunk3BQ6LE6X_cjs.DabaAgentElement; }
|
|
20
11
|
});
|
|
21
12
|
Object.defineProperty(exports, "defineDabaAgentElement", {
|
|
22
13
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk3BQ6LE6X_cjs.defineDabaAgentElement; }
|
|
24
15
|
});
|
|
25
16
|
Object.defineProperty(exports, "DabaAgent", {
|
|
26
17
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkVAIC5ACS_cjs.DabaAgent; }
|
|
28
19
|
});
|
|
29
20
|
//# sourceMappingURL=daba-agent.cjs.map
|
|
30
21
|
//# sourceMappingURL=daba-agent.cjs.map
|
package/dist/daba-agent.d.cts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export { D as DabaAgent,
|
|
2
|
-
export {
|
|
3
|
-
export { C as ChatMessage, D as DabaAgentMode, a as DabaAgentOptions, b as DabaAgentPosition, c as DabaAgentStatus, d as DabaError } from './types-DYRGPzyp.cjs';
|
|
4
|
-
import 'react';
|
|
1
|
+
export { D as DabaAgent, DabaAgentElement, DabaAgentElementConstructor, S as StoredConversation, defineDabaAgentElement } from './custom-element.cjs';
|
|
2
|
+
export { C as ChatMessage, b as DabaAgentMode, D as DabaAgentOptions, c as DabaAgentPosition, a as DabaAgentStatus, d as DabaCard, e as DabaCardKind, f as DabaCardMeta, g as DabaChatReply, h as DabaDirection, i as DabaError, j as DabaIntro, k as DabaLauncher, l as DabaLauncherShape, m as DabaPanel, n as DabaRemoteConfig, o as DabaTheme, p as DabaThemePreference, q as DabaVoiceEngine } from './types-BQRgqD4n.cjs';
|
package/dist/daba-agent.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export { D as DabaAgent,
|
|
2
|
-
export {
|
|
3
|
-
export { C as ChatMessage, D as DabaAgentMode, a as DabaAgentOptions, b as DabaAgentPosition, c as DabaAgentStatus, d as DabaError } from './types-DYRGPzyp.js';
|
|
4
|
-
import 'react';
|
|
1
|
+
export { D as DabaAgent, DabaAgentElement, DabaAgentElementConstructor, S as StoredConversation, defineDabaAgentElement } from './custom-element.js';
|
|
2
|
+
export { C as ChatMessage, b as DabaAgentMode, D as DabaAgentOptions, c as DabaAgentPosition, a as DabaAgentStatus, d as DabaCard, e as DabaCardKind, f as DabaCardMeta, g as DabaChatReply, h as DabaDirection, i as DabaError, j as DabaIntro, k as DabaLauncher, l as DabaLauncherShape, m as DabaPanel, n as DabaRemoteConfig, o as DabaTheme, p as DabaThemePreference, q as DabaVoiceEngine } from './types-BQRgqD4n.js';
|
package/dist/daba-agent.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export { DabaAgent } from './chunk-G22V7GGM.js';
|
|
1
|
+
export { DabaAgentElement, defineDabaAgentElement } from './chunk-TYOHYQDK.js';
|
|
2
|
+
export { DabaAgent } from './chunk-ETI4LRM7.js';
|
|
4
3
|
//# sourceMappingURL=daba-agent.js.map
|
|
5
4
|
//# sourceMappingURL=daba-agent.js.map
|