@aparte/core 0.15.1 → 0.16.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/dist/client/aparte-client.d.ts +53 -51
- package/dist/client/aparte-client.d.ts.map +1 -1
- package/dist/client/lifecycle-events.d.ts +0 -12
- package/dist/client/lifecycle-events.d.ts.map +1 -1
- package/dist/client/stream-adapter.d.ts +2 -12
- package/dist/client/stream-adapter.d.ts.map +1 -1
- package/dist/components/bubble/aparte-chat-bubble.d.ts +45 -1
- package/dist/components/bubble/aparte-chat-bubble.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer-attachments.d.ts +0 -1
- package/dist/components/composer/aparte-composer-attachments.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer-send.d.ts +11 -11
- package/dist/components/composer/aparte-composer-send.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer.d.ts +20 -11
- package/dist/components/composer/aparte-composer.d.ts.map +1 -1
- package/dist/components/context/aparte-context.d.ts +31 -8
- package/dist/components/context/aparte-context.d.ts.map +1 -1
- package/dist/components/conversation-list/aparte-conversation-list.d.ts +93 -36
- package/dist/components/conversation-list/aparte-conversation-list.d.ts.map +1 -1
- package/dist/components/conversation-list/index.d.ts +1 -1
- package/dist/components/conversation-list/index.d.ts.map +1 -1
- package/dist/components/elicitation/aparte-elicitation.d.ts +19 -1
- package/dist/components/elicitation/aparte-elicitation.d.ts.map +1 -1
- package/dist/components/index.d.ts +7 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/scroll-rail/aparte-scroll-rail.d.ts +105 -0
- package/dist/components/scroll-rail/aparte-scroll-rail.d.ts.map +1 -0
- package/dist/components/scroll-rail/index.d.ts +3 -0
- package/dist/components/scroll-rail/index.d.ts.map +1 -0
- package/dist/components/sidebar/aparte-sidebar.d.ts +186 -0
- package/dist/components/sidebar/aparte-sidebar.d.ts.map +1 -0
- package/dist/components/sidebar/index.d.ts +3 -0
- package/dist/components/sidebar/index.d.ts.map +1 -0
- package/dist/components/split/aparte-split.d.ts +354 -0
- package/dist/components/split/aparte-split.d.ts.map +1 -0
- package/dist/components/split/geometry.d.ts +65 -0
- package/dist/components/split/geometry.d.ts.map +1 -0
- package/dist/components/split/index.d.ts +3 -0
- package/dist/components/split/index.d.ts.map +1 -0
- package/dist/components/suggestions/aparte-suggestions.d.ts +7 -1
- package/dist/components/suggestions/aparte-suggestions.d.ts.map +1 -1
- package/dist/components/viewport/aparte-chat-viewport.d.ts +52 -2
- package/dist/components/viewport/aparte-chat-viewport.d.ts.map +1 -1
- package/dist/config/aparte-config.d.ts +95 -33
- package/dist/config/aparte-config.d.ts.map +1 -1
- package/dist/config/icon-provider.d.ts +6 -0
- package/dist/config/icon-provider.d.ts.map +1 -1
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/locale.d.ts +140 -27
- package/dist/config/locale.d.ts.map +1 -1
- package/dist/config/sanitize.d.ts +9 -0
- package/dist/config/sanitize.d.ts.map +1 -1
- package/dist/conversations/conversation-controller.d.ts +13 -1
- package/dist/conversations/conversation-controller.d.ts.map +1 -1
- package/dist/conversations/conversation-manager.d.ts +9 -0
- package/dist/conversations/conversation-manager.d.ts.map +1 -1
- package/dist/custom-elements.json +9219 -6730
- package/dist/{is-awaiting-reply-BZ_iJ3s3.js → dialog-triggers-CVCxqKg3.js} +718 -1182
- package/dist/dialog-triggers-CVCxqKg3.js.map +1 -0
- package/dist/elicitation/approval-panel.d.ts +1 -1
- package/dist/elicitation/approval-panel.d.ts.map +1 -1
- package/dist/elicitation/panel.d.ts +24 -16
- package/dist/elicitation/panel.d.ts.map +1 -1
- package/dist/elicitation/types.d.ts +31 -0
- package/dist/elicitation/types.d.ts.map +1 -1
- package/dist/generated/element-attributes.d.ts +47 -1
- package/dist/generated/element-attributes.d.ts.map +1 -1
- package/dist/{glyphs-B3BZ2TIb.js → glyphs-DQTeOj4w.js} +22 -13
- package/dist/{glyphs-B3BZ2TIb.js.map → glyphs-DQTeOj4w.js.map} +1 -1
- package/dist/host/aparte-chat-host.d.ts +10 -2
- package/dist/host/aparte-chat-host.d.ts.map +1 -1
- package/dist/icons/extended.d.ts +4 -2
- package/dist/icons/extended.d.ts.map +1 -1
- package/dist/icons/glyphs.d.ts +9 -0
- package/dist/icons/glyphs.d.ts.map +1 -1
- package/dist/icons.js +16 -15
- package/dist/icons.js.map +1 -1
- package/dist/index.css +1217 -396
- package/dist/index.d.ts +26 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2097 -295
- package/dist/index.js.map +1 -1
- package/dist/index.node.d.ts +21 -5
- package/dist/index.node.d.ts.map +1 -1
- package/dist/index.node.js +39 -34
- package/dist/index.node.js.map +1 -1
- package/dist/interop/dialog-triggers.d.ts +27 -0
- package/dist/interop/dialog-triggers.d.ts.map +1 -0
- package/dist/interop/element-props.d.ts +16 -8
- package/dist/interop/element-props.d.ts.map +1 -1
- package/dist/parsers/aparte-stream-parser.d.ts +52 -22
- package/dist/parsers/aparte-stream-parser.d.ts.map +1 -1
- package/dist/parsers/index.d.ts +1 -1
- package/dist/parsers/index.d.ts.map +1 -1
- package/dist/primitives/select/aparte-select.d.ts.map +1 -1
- package/dist/renderers/segment-renderers.d.ts.map +1 -1
- package/dist/renderers/segments/code.d.ts.map +1 -1
- package/dist/renderers/segments/tool-call.d.ts.map +1 -1
- package/dist/runtime/message-repository.d.ts.map +1 -1
- package/dist/transport/backend-handler.d.ts.map +1 -1
- package/dist/transport/backend-transport.d.ts +6 -1
- package/dist/transport/backend-transport.d.ts.map +1 -1
- package/dist/types/chat.d.ts +8 -14
- package/dist/types/chat.d.ts.map +1 -1
- package/dist/types/element-map.d.ts +54 -4
- package/dist/types/element-map.d.ts.map +1 -1
- package/dist/types/event-map.d.ts +16 -10
- package/dist/types/event-map.d.ts.map +1 -1
- package/dist/types/events.d.ts +59 -117
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/imperative-api.d.ts +3 -1
- package/dist/types/imperative-api.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/models.d.ts +11 -31
- package/dist/types/models.d.ts.map +1 -1
- package/dist/types/segments.d.ts +11 -47
- package/dist/types/segments.d.ts.map +1 -1
- package/dist/types/stream-blocks.d.ts +57 -0
- package/dist/types/stream-blocks.d.ts.map +1 -0
- package/dist/types/tools.d.ts +57 -0
- package/dist/types/tools.d.ts.map +1 -1
- package/dist/utils/copy-text.d.ts +24 -0
- package/dist/utils/copy-text.d.ts.map +1 -0
- package/dist/utils/css-escape.d.ts +5 -0
- package/dist/utils/css-escape.d.ts.map +1 -1
- package/dist/utils/tool-input.d.ts +20 -0
- package/dist/utils/tool-input.d.ts.map +1 -0
- package/package.json +10 -3
- package/dist/is-awaiting-reply-BZ_iJ3s3.js.map +0 -1
- package/dist/renderers/segments/artifact/binary-file.d.ts +0 -45
- package/dist/renderers/segments/artifact/binary-file.d.ts.map +0 -1
- package/dist/renderers/segments/artifact/card.d.ts +0 -3
- package/dist/renderers/segments/artifact/card.d.ts.map +0 -1
- package/dist/renderers/segments/artifact/preview-document.d.ts +0 -27
- package/dist/renderers/segments/artifact/preview-document.d.ts.map +0 -1
- package/dist/renderers/segments/artifact/shared.d.ts +0 -29
- package/dist/renderers/segments/artifact/shared.d.ts.map +0 -1
package/dist/types/chat.d.ts
CHANGED
|
@@ -117,17 +117,12 @@ export interface AparteChatRequest {
|
|
|
117
117
|
*/
|
|
118
118
|
_meta?: AparteRequestMeta;
|
|
119
119
|
}
|
|
120
|
-
/** A `{ mimeType, kind }` artifact hint for the `_meta` artifact modes. */
|
|
121
|
-
export interface AparteArtifactHint {
|
|
122
|
-
mimeType: string;
|
|
123
|
-
kind: string;
|
|
124
|
-
}
|
|
125
120
|
/**
|
|
126
|
-
* The well-known keys of `AparteChatRequest._meta`.
|
|
127
|
-
*
|
|
121
|
+
* The well-known keys of `AparteChatRequest._meta`. One, read by core's client and
|
|
122
|
+
* not by the loop; the rest of the bag is the consumer's (index signature).
|
|
128
123
|
* `pipeline`, `artifactRaw` and `artifactXml` used to sit here too and were removed
|
|
129
|
-
* (audit 2026-08-28, D2):
|
|
130
|
-
*
|
|
124
|
+
* (audit 2026-08-28, D2), then `artifactHint` (D7): an artifact is a plugin's
|
|
125
|
+
* convention now, and a promoted code fence had no consumer.
|
|
131
126
|
*/
|
|
132
127
|
export interface AparteRequestMeta {
|
|
133
128
|
/**
|
|
@@ -138,12 +133,11 @@ export interface AparteRequestMeta {
|
|
|
138
133
|
*/
|
|
139
134
|
prefixSegments?: AparteSegment[];
|
|
140
135
|
/**
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* (a "make me a page" turn) sets it per request.
|
|
136
|
+
* Set by `@aparte/plugin-compaction` on the summarisation request, and on nothing
|
|
137
|
+
* else. A backend transport can route it — a cheaper model, a shorter timeout —
|
|
138
|
+
* without inspecting the messages to guess what the request is for.
|
|
145
139
|
*/
|
|
146
|
-
|
|
140
|
+
compaction?: true;
|
|
147
141
|
/** Consumer-specific context (open channel). */
|
|
148
142
|
[key: string]: unknown;
|
|
149
143
|
}
|
package/dist/types/chat.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/types/chat.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAMnD,8BAA8B;AAC9B,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED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,EAAE,MAAM,CAAC;IACzB,kGAAkG;IAClG,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;CAC1B;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAM;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3B,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3B,oFAAoF;IACpF,IAAI,EAAM;QAAE,KAAK,CAAC,EAAE,WAAW,CAAA;KAAE,CAAA;IACjC,KAAK,EAAK;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;IAC7B,QAAQ,EAAE,cAAc,CAAA;CAC3B;AAED,2FAA2F;AAC3F,MAAM,MAAM,iBAAiB,GAAG;KAC3B,CAAC,IAAI,MAAM,oBAAoB,GAAG;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,GAAG,oBAAoB,CAAC,CAAC,CAAC;CAC3E,CAAC,MAAM,oBAAoB,CAAC,CAAA;AAE7B,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC"}
|
|
@@ -15,15 +15,28 @@
|
|
|
15
15
|
*
|
|
16
16
|
* One file instead of eighteen for one reason: a per-component convention cannot be
|
|
17
17
|
* enforced, and it was not. Here the whole element surface is in one place, next to
|
|
18
|
-
* the `customElements.define` calls it has to agree with
|
|
19
|
-
*
|
|
18
|
+
* the `customElements.define` calls it has to agree with.
|
|
19
|
+
*
|
|
20
|
+
* Completeness is not a convention either. It is pinned at the bottom of this file by a
|
|
21
|
+
* type assertion against the GENERATED `AparteElementTagName`, which is built from the
|
|
22
|
+
* custom-elements manifest and therefore carries every tag by construction. A missing
|
|
23
|
+
* entry is a type error naming the tag, so it fails `nx typecheck` and with it the
|
|
24
|
+
* pre-commit hook; the converse — a key here no element backs — is checked at runtime by
|
|
25
|
+
* `types/__tests__/element-map.test.ts`, for the reason given beside the assertion.
|
|
26
|
+
* The docstring used to promise a `pnpm check:element-map` script instead; that script
|
|
27
|
+
* was never written, and while it was promised the map sat at 21 of 24 —
|
|
28
|
+
* `aparte-context`, `aparte-split` and `aparte-suggestions` were missing, so
|
|
29
|
+
* `querySelector('aparte-split')` returned `Element` and every `event.detail` off them
|
|
30
|
+
* was untyped.
|
|
20
31
|
*
|
|
21
32
|
* Every import is `import type`, so nothing is emitted and this cannot introduce a
|
|
22
33
|
* runtime cycle — the same reason `event-map.ts` can name a component-coupled detail
|
|
23
34
|
* type from the types layer.
|
|
24
35
|
*
|
|
25
|
-
*
|
|
26
|
-
* `
|
|
36
|
+
* `declare global` DECLARES `HTMLElementTagNameMap` where the DOM lib is absent rather
|
|
37
|
+
* than requiring it, so `index.node.ts` imports this file too — deliberately, and
|
|
38
|
+
* `check-node-barrel-types.mjs` asserts it does — and a server-side program gets the
|
|
39
|
+
* same tag typing. The docstring used to claim the opposite.
|
|
27
40
|
*/
|
|
28
41
|
import type { AparteChat } from '../components/chat/aparte-chat.js';
|
|
29
42
|
import type { AparteChatBubble } from '../components/bubble/aparte-chat-bubble.js';
|
|
@@ -39,11 +52,17 @@ import type { AparteComposerAction } from '../components/composer/aparte-compose
|
|
|
39
52
|
import type { AparteComposerToolbar } from '../components/composer/aparte-composer-toolbar.js';
|
|
40
53
|
import type { AparteConversationList } from '../components/conversation-list/aparte-conversation-list.js';
|
|
41
54
|
import type { AparteElicitation } from '../components/elicitation/aparte-elicitation.js';
|
|
55
|
+
import type { AparteScrollRail } from '../components/scroll-rail/aparte-scroll-rail.js';
|
|
56
|
+
import type { AparteSidebar } from '../components/sidebar/aparte-sidebar.js';
|
|
57
|
+
import type { AparteSplit } from '../components/split/aparte-split.js';
|
|
58
|
+
import type { AparteSuggestions } from '../components/suggestions/aparte-suggestions.js';
|
|
59
|
+
import type { AparteContext } from '../components/context/aparte-context.js';
|
|
42
60
|
import type { AparteSelect } from '../primitives/select/aparte-select.js';
|
|
43
61
|
import type { AparteOption } from '../primitives/select/aparte-option.js';
|
|
44
62
|
import type { AparteOptgroup } from '../primitives/select/aparte-optgroup.js';
|
|
45
63
|
import type { AparteProgressSpinner } from '../primitives/progress-spinner/aparte-progress-spinner.js';
|
|
46
64
|
import type { AparteIcon } from '../primitives/icon/aparte-icon.js';
|
|
65
|
+
import type { AparteElementTagName } from './element-attributes.js';
|
|
47
66
|
declare global {
|
|
48
67
|
interface HTMLElementTagNameMap {
|
|
49
68
|
'aparte-chat': AparteChat;
|
|
@@ -60,6 +79,11 @@ declare global {
|
|
|
60
79
|
'aparte-composer-toolbar': AparteComposerToolbar;
|
|
61
80
|
'aparte-conversation-list': AparteConversationList;
|
|
62
81
|
'aparte-elicitation': AparteElicitation;
|
|
82
|
+
'aparte-scroll-rail': AparteScrollRail;
|
|
83
|
+
'aparte-sidebar': AparteSidebar;
|
|
84
|
+
'aparte-split': AparteSplit;
|
|
85
|
+
'aparte-suggestions': AparteSuggestions;
|
|
86
|
+
'aparte-context': AparteContext;
|
|
63
87
|
'aparte-select': AparteSelect;
|
|
64
88
|
'aparte-option': AparteOption;
|
|
65
89
|
'aparte-optgroup': AparteOptgroup;
|
|
@@ -67,5 +91,31 @@ declare global {
|
|
|
67
91
|
'aparte-icon': AparteIcon;
|
|
68
92
|
}
|
|
69
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* The pin. `AparteElementTagName` is generated from the manifest, so it is total by
|
|
96
|
+
* construction, and this alias stops compiling the moment an element core defines is
|
|
97
|
+
* missing from the map above. The failure names the tag: dropping `aparte-split` reads
|
|
98
|
+
* `Type '{ unmapped: "aparte-split"; }' does not satisfy the constraint 'true'`.
|
|
99
|
+
*
|
|
100
|
+
* A type assertion rather than a script, because this runs where the mistake is made —
|
|
101
|
+
* in the editor, and in `nx typecheck`, which is what the pre-commit hook runs. Nothing
|
|
102
|
+
* is emitted: it is a type.
|
|
103
|
+
*
|
|
104
|
+
* The OTHER direction — a key here that no element backs — cannot be checked this way,
|
|
105
|
+
* and the attempt is instructive: `HTMLElementTagNameMap` is a global open interface,
|
|
106
|
+
* and the plugins augment it too, so `keyof` sees `aparte-ask-user` and
|
|
107
|
+
* `aparte-model-selector` the moment a program contains both packages. That direction
|
|
108
|
+
* is checked at runtime instead, against the `customElements.define` literals, in
|
|
109
|
+
* `types/__tests__/element-map.test.ts`.
|
|
110
|
+
*/
|
|
111
|
+
type Assert<T extends true> = T;
|
|
112
|
+
/** Every `aparte-*` key visible on `HTMLElementTagNameMap` — this file's, and any plugin's. */
|
|
113
|
+
type MappedAparteTag = Extract<keyof HTMLElementTagNameMap, `aparte-${string}`>;
|
|
114
|
+
type _EveryDefinedTagIsMapped = Assert<[
|
|
115
|
+
Exclude<AparteElementTagName, MappedAparteTag>
|
|
116
|
+
] extends [never] ? true : {
|
|
117
|
+
unmapped: Exclude<AparteElementTagName, MappedAparteTag>;
|
|
118
|
+
}>;
|
|
119
|
+
export type { _EveryDefinedTagIsMapped };
|
|
70
120
|
export {};
|
|
71
121
|
//# sourceMappingURL=element-map.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element-map.d.ts","sourceRoot":"","sources":["../../src/types/element-map.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"element-map.d.ts","sourceRoot":"","sources":["../../src/types/element-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AA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,eAAe,GAAG,OAAO,CAAC,MAAM,qBAAqB,EAAE,UAAU,MAAM,EAAE,CAAC,CAAC;AAEhF,KAAK,wBAAwB,GAAG,MAAM,CAClC;IAAC,OAAO,CAAC,oBAAoB,EAAE,eAAe,CAAC;CAAC,SAAS,CAAC,KAAK,CAAC,GAC1D,IAAI,GACJ;IAAE,QAAQ,EAAE,OAAO,CAAC,oBAAoB,EAAE,eAAe,CAAC,CAAA;CAAE,CACrE,CAAC;AAEF,YAAY,EAAE,wBAAwB,EAAE,CAAC;AAEzC,OAAO,EAAE,CAAC"}
|
|
@@ -21,24 +21,27 @@
|
|
|
21
21
|
*
|
|
22
22
|
* Events that carry NO detail stay out, and that is the whole exclusion:
|
|
23
23
|
* `aparte-composer-submit`, `aparte-cancel`, `aparte-reset`, `aparte-reset-done`,
|
|
24
|
-
* `aparte-
|
|
25
|
-
*
|
|
24
|
+
* `aparte-select-open`, `aparte-select-close` are all dispatched as a bare
|
|
25
|
+
* `new CustomEvent(name)`. A map entry would type `e.detail`
|
|
26
26
|
* as `null` and gain nothing.
|
|
27
27
|
*
|
|
28
28
|
* All names are kebab-case (`aparte-*`) so every framework can bind them in a
|
|
29
29
|
* template (Angular parses a `:` in an event name as a `target:event` selector,
|
|
30
30
|
* so a colon name could never be `(aparte:x)`-bound there).
|
|
31
31
|
*/
|
|
32
|
-
import type { AparteSendEventDetail, AparteRetryEventDetail, AparteEditEventDetail, AparteActionEventDetail, ApartePathChangedEventDetail, AparteBranchNavigateEventDetail, AparteFeedbackEventDetail, AparteMessageInfoEventDetail, AparteMessageDoneEventDetail, AparteModelChangeEventDetail,
|
|
32
|
+
import type { AparteSendEventDetail, AparteRetryEventDetail, AparteEditEventDetail, AparteActionEventDetail, ApartePathChangedEventDetail, AparteBranchNavigateEventDetail, AparteFeedbackEventDetail, AparteMessageInfoEventDetail, AparteMessageDoneEventDetail, AparteModelChangeEventDetail, AparteApprovalModeChangeEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessageAbortedEventDetail, AparteAbortEventDetail, AparteCompactEventDetail, AparteCompactDoneEventDetail, AparteCompactStartEventDetail, AparteCompactErrorEventDetail, AparteAttachmentPreviewEventDetail, AparteLinkClickEventDetail } from './events.js';
|
|
33
33
|
import type { AparteActionClickEventDetail } from '../components/composer/aparte-composer-action.js';
|
|
34
34
|
import type { AparteSuggestionEventDetail } from '../components/suggestions/aparte-suggestions.js';
|
|
35
35
|
import type { AparteContextThresholdEventDetail } from '../components/context/aparte-context.js';
|
|
36
|
+
import type { AparteScrollRailJumpDetail } from '../components/scroll-rail/aparte-scroll-rail.js';
|
|
37
|
+
import type { AparteSidebarToggleDetail } from '../components/sidebar/aparte-sidebar.js';
|
|
38
|
+
import type { AparteSplitResizeDetail } from '../components/split/aparte-split.js';
|
|
36
39
|
import type { AparteOptgroupToggleEventDetail } from '../primitives/select/aparte-optgroup.js';
|
|
37
40
|
import type { AparteConfigChangeEventDetail } from '../config/aparte-config.js';
|
|
38
41
|
import type { AparteToolApprovalRequestDetail } from './tools.js';
|
|
39
42
|
import type { AparteSegmentUpdateEventDetail } from './segments.js';
|
|
40
43
|
import type { AparteSelectChangeDetail } from '../primitives/select/aparte-select.js';
|
|
41
|
-
import type { AparteConversationSelectDetail, AparteConversationDeleteDetail, AparteConversationArchiveDetail } from '../components/conversation-list/aparte-conversation-list.js';
|
|
44
|
+
import type { AparteConversationSelectDetail, AparteConversationDeleteDetail, AparteConversationArchiveDetail, AparteConversationPinDetail, AparteConversationRenameDetail } from '../components/conversation-list/aparte-conversation-list.js';
|
|
42
45
|
import type { AparteComposerChangeEventDetail } from '../components/composer/aparte-composer.js';
|
|
43
46
|
/**
|
|
44
47
|
* Declared once, applied to all three targets below.
|
|
@@ -60,14 +63,12 @@ interface AparteEventMap {
|
|
|
60
63
|
'aparte-action': CustomEvent<AparteActionEventDetail>;
|
|
61
64
|
'aparte-path-changed': CustomEvent<ApartePathChangedEventDetail>;
|
|
62
65
|
'aparte-branch-navigate': CustomEvent<AparteBranchNavigateEventDetail>;
|
|
66
|
+
'aparte-link-click': CustomEvent<AparteLinkClickEventDetail>;
|
|
63
67
|
'aparte-feedback': CustomEvent<AparteFeedbackEventDetail>;
|
|
64
68
|
'aparte-message-info': CustomEvent<AparteMessageInfoEventDetail>;
|
|
65
69
|
'aparte-message-done': CustomEvent<AparteMessageDoneEventDetail>;
|
|
66
70
|
'aparte-model-change': CustomEvent<AparteModelChangeEventDetail>;
|
|
67
|
-
'aparte-
|
|
68
|
-
'aparte-artifact-delta': CustomEvent<AparteArtifactDeltaEventDetail>;
|
|
69
|
-
'aparte-artifact-ready': CustomEvent<AparteArtifactReadyEventDetail>;
|
|
70
|
-
'aparte-artifact-redownload': CustomEvent<AparteArtifactRedownloadEventDetail>;
|
|
71
|
+
'aparte-approval-mode-change': CustomEvent<AparteApprovalModeChangeEventDetail>;
|
|
71
72
|
'aparte-tool-approval-request': CustomEvent<AparteToolApprovalRequestDetail>;
|
|
72
73
|
'aparte-composer-change': CustomEvent<AparteComposerChangeEventDetail>;
|
|
73
74
|
'aparte-select-change': CustomEvent<AparteSelectChangeDetail>;
|
|
@@ -76,19 +77,24 @@ interface AparteEventMap {
|
|
|
76
77
|
'aparte-delete-conversation': CustomEvent<AparteConversationDeleteDetail>;
|
|
77
78
|
'aparte-archive-conversation': CustomEvent<AparteConversationArchiveDetail>;
|
|
78
79
|
'aparte-unarchive-conversation': CustomEvent<AparteConversationArchiveDetail>;
|
|
80
|
+
'aparte-rename-conversation': CustomEvent<AparteConversationRenameDetail>;
|
|
81
|
+
'aparte-pin-conversation': CustomEvent<AparteConversationPinDetail>;
|
|
82
|
+
'aparte-unpin-conversation': CustomEvent<AparteConversationPinDetail>;
|
|
79
83
|
'aparte-message-start': CustomEvent<AparteMessageStartEventDetail>;
|
|
80
84
|
'aparte-message-error': CustomEvent<AparteMessageErrorEventDetail>;
|
|
81
85
|
'aparte-message-aborted': CustomEvent<AparteMessageAbortedEventDetail>;
|
|
82
86
|
'aparte-abort': CustomEvent<AparteAbortEventDetail>;
|
|
83
87
|
'aparte-compact': CustomEvent<AparteCompactEventDetail>;
|
|
88
|
+
'aparte-compact-start': CustomEvent<AparteCompactStartEventDetail>;
|
|
84
89
|
'aparte-compact-done': CustomEvent<AparteCompactDoneEventDetail>;
|
|
85
90
|
'aparte-compact-error': CustomEvent<AparteCompactErrorEventDetail>;
|
|
86
|
-
'aparte-file-gen-ready': CustomEvent<AparteFileGenReadyEventDetail>;
|
|
87
|
-
'aparte-file-gen-error': CustomEvent<AparteFileGenErrorEventDetail>;
|
|
88
91
|
'aparte-attachment-preview': CustomEvent<AparteAttachmentPreviewEventDetail>;
|
|
89
92
|
'aparte-action-click': CustomEvent<AparteActionClickEventDetail>;
|
|
90
93
|
'aparte-suggestion': CustomEvent<AparteSuggestionEventDetail>;
|
|
91
94
|
'aparte-context-threshold': CustomEvent<AparteContextThresholdEventDetail>;
|
|
95
|
+
'aparte-scroll-rail-jump': CustomEvent<AparteScrollRailJumpDetail>;
|
|
96
|
+
'aparte-sidebar-toggle': CustomEvent<AparteSidebarToggleDetail>;
|
|
97
|
+
'aparte-split-resize': CustomEvent<AparteSplitResizeDetail>;
|
|
92
98
|
'aparte-optgroup-toggle': CustomEvent<AparteOptgroupToggleEventDetail>;
|
|
93
99
|
'aparte-config-change': CustomEvent<AparteConfigChangeEventDetail>;
|
|
94
100
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-map.d.ts","sourceRoot":"","sources":["../../src/types/event-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EACR,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,EAC5B,+BAA+B,EAC/B,yBAAyB,EACzB,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,
|
|
1
|
+
{"version":3,"file":"event-map.d.ts","sourceRoot":"","sources":["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** 0-based position of this message among its siblings. */
|
|
94
94
|
index: number;
|
|
95
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* Detail payload for `aparte-link-click`.
|
|
98
|
+
* Dispatched by the bubble, cancelable, when a link in a message body is about to be
|
|
99
|
+
* followed — a link the MODEL wrote. `preventDefault()` on the event keeps the browser
|
|
100
|
+
* from navigating, so a host routes the link itself (an external browser, a
|
|
101
|
+
* confirmation, an embedded view) without intercepting the DOM. With no listener the
|
|
102
|
+
* browser follows it; the sanitizer has made an external URL open in a new tab.
|
|
103
|
+
*
|
|
104
|
+
* @event aparte-link-click
|
|
105
|
+
*/
|
|
106
|
+
export interface AparteLinkClickEventDetail {
|
|
107
|
+
/** The `href` as written on the anchor, after sanitization. */
|
|
108
|
+
href: string;
|
|
109
|
+
/** The anchor itself, for a host that wants its text or its `rel`. */
|
|
110
|
+
anchor: HTMLAnchorElement;
|
|
111
|
+
/** The message the link sits in, or `null` for a bubble mounted without one. */
|
|
112
|
+
messageId: string | null;
|
|
113
|
+
}
|
|
96
114
|
/**
|
|
97
115
|
* Detail payload for `aparte-branch-navigate`.
|
|
98
116
|
* Dispatched by the bubble's branch-picker buttons; the viewport listens
|
|
@@ -134,85 +152,6 @@ export interface AparteRetryEventDetail {
|
|
|
134
152
|
/** Optional id of the host element (aparte-chat) — used by `scopeToTargetId`. */
|
|
135
153
|
targetId?: string;
|
|
136
154
|
}
|
|
137
|
-
/**
|
|
138
|
-
* Detail payload for `aparte-artifact-start`.
|
|
139
|
-
* Dispatched by the stream loop the moment an opening `<artifact …>` tag is parsed.
|
|
140
|
-
* Apps typically use this to open a side panel and prepare a streaming code view.
|
|
141
|
-
*
|
|
142
|
-
* @event aparte-artifact-start
|
|
143
|
-
*/
|
|
144
|
-
export interface AparteArtifactStartEventDetail {
|
|
145
|
-
/** Owning message id */
|
|
146
|
-
messageId: string;
|
|
147
|
-
/** Owning segment id (matches the segment dispatched to the bubble) */
|
|
148
|
-
segmentId: string;
|
|
149
|
-
/** Standard MIME from the `type=` attribute (e.g. `application/vnd.ant.react`) */
|
|
150
|
-
mimeType: string;
|
|
151
|
-
/** Convenience kind ('react'|'html'|'svg'|'js'|'css'|…) derived from `mimeType` */
|
|
152
|
-
artifactType: string;
|
|
153
|
-
/** Optional human title from the `title=` attribute */
|
|
154
|
-
title?: string;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Detail payload for `aparte-artifact-delta`.
|
|
158
|
-
* Dispatched once per chunk routed into an open artifact body.
|
|
159
|
-
* Consumers append to the displayed buffer in real time.
|
|
160
|
-
*
|
|
161
|
-
* @event aparte-artifact-delta
|
|
162
|
-
*/
|
|
163
|
-
export interface AparteArtifactDeltaEventDetail {
|
|
164
|
-
/** Owning segment id */
|
|
165
|
-
segmentId: string;
|
|
166
|
-
/** New content fragment to append */
|
|
167
|
-
chunk: string;
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Detail payload for `aparte-artifact-ready`.
|
|
171
|
-
* Dispatched when the closing `</artifact>` tag is parsed (or the stream ends with
|
|
172
|
-
* an active artifact segment). The full content is now available; consumers can
|
|
173
|
-
* switch from streaming view to a final preview.
|
|
174
|
-
*
|
|
175
|
-
* @event aparte-artifact-ready
|
|
176
|
-
*/
|
|
177
|
-
export interface AparteArtifactReadyEventDetail {
|
|
178
|
-
/** Owning message id */
|
|
179
|
-
messageId: string;
|
|
180
|
-
/** Owning segment id */
|
|
181
|
-
segmentId: string;
|
|
182
|
-
/** MIME type */
|
|
183
|
-
mimeType: string;
|
|
184
|
-
/** Convenience kind */
|
|
185
|
-
artifactType: string;
|
|
186
|
-
/** Optional title */
|
|
187
|
-
title?: string;
|
|
188
|
-
/** Final, complete content */
|
|
189
|
-
content: string;
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Detail payload for `aparte-artifact-redownload`.
|
|
193
|
-
* Dispatched by an artifact card's Download button when the artifact is a BINARY
|
|
194
|
-
* kind: core cannot produce the bytes itself, so it asks the host to re-run the
|
|
195
|
-
* generation and save the file. Enable it with
|
|
196
|
-
* `setHostHandlers({ artifactRedownload: true })` — ratified decision #8, tier (b).
|
|
197
|
-
*
|
|
198
|
-
* It was declared for `aparte-artifact-open` and said so, an event that exists
|
|
199
|
-
* nowhere in the repo. The shape is field-for-field what the Download button really
|
|
200
|
-
* dispatches, so the type moved rather than being deleted.
|
|
201
|
-
*
|
|
202
|
-
* @event aparte-artifact-redownload
|
|
203
|
-
*/
|
|
204
|
-
export interface AparteArtifactRedownloadEventDetail {
|
|
205
|
-
/** Owning segment id */
|
|
206
|
-
segmentId: string;
|
|
207
|
-
/** MIME type */
|
|
208
|
-
mimeType: string;
|
|
209
|
-
/** Convenience kind */
|
|
210
|
-
artifactType: string;
|
|
211
|
-
/** Optional title */
|
|
212
|
-
title?: string;
|
|
213
|
-
/** Complete content */
|
|
214
|
-
content: string;
|
|
215
|
-
}
|
|
216
155
|
/**
|
|
217
156
|
* Detail payload for `aparte-edit`.
|
|
218
157
|
* Dispatched by the user bubble after the user confirms an inline edit.
|
|
@@ -335,10 +274,12 @@ export interface AparteAbortEventDetail {
|
|
|
335
274
|
targetId?: string;
|
|
336
275
|
}
|
|
337
276
|
/**
|
|
338
|
-
* Detail payload for `aparte-compact` — a COMMAND
|
|
339
|
-
*
|
|
277
|
+
* Detail payload for `aparte-compact` — a COMMAND dispatched on `window` to ask for
|
|
278
|
+
* the conversation so far to be summarised.
|
|
340
279
|
*
|
|
341
|
-
*
|
|
280
|
+
* `<aparte-context auto-compact>` dispatches it on reaching `danger`, and a host
|
|
281
|
+
* dispatches it from a button; `@aparte/plugin-compaction` is what answers it. Core
|
|
282
|
+
* itself neither listens for it nor compacts — the events below are the plugin's.
|
|
342
283
|
*
|
|
343
284
|
* @event aparte-compact
|
|
344
285
|
*/
|
|
@@ -346,22 +287,43 @@ export interface AparteCompactEventDetail {
|
|
|
346
287
|
/** Which chat to compact. Omit on a single-chat page. */
|
|
347
288
|
targetId?: string;
|
|
348
289
|
}
|
|
290
|
+
/**
|
|
291
|
+
* Detail payload for `aparte-compact-start` — the summarisation began. The point for a
|
|
292
|
+
* host to show a spinner: summarising a long conversation is a model call and takes as
|
|
293
|
+
* long as one.
|
|
294
|
+
*
|
|
295
|
+
* @event aparte-compact-start
|
|
296
|
+
*/
|
|
297
|
+
export interface AparteCompactStartEventDetail {
|
|
298
|
+
/** The chat being compacted, when it has an id. */
|
|
299
|
+
targetId?: string;
|
|
300
|
+
}
|
|
349
301
|
/**
|
|
350
302
|
* Detail payload for `aparte-compact-done`.
|
|
351
303
|
*
|
|
352
304
|
* A union flattened to optional fields, because the two outcomes carry different
|
|
353
305
|
* payloads and a consumer cannot guess which: nothing to compact sends
|
|
354
|
-
* `{ skipped: true }`, a real compaction sends `{ summary, kept }`.
|
|
306
|
+
* `{ skipped: true, reason }`, a real compaction sends `{ summary, kept, dropped }`.
|
|
355
307
|
*
|
|
356
308
|
* @event aparte-compact-done
|
|
357
309
|
*/
|
|
358
310
|
export interface AparteCompactDoneEventDetail {
|
|
359
311
|
/** `true` when there was nothing worth summarising; the other two are absent. */
|
|
360
312
|
skipped?: boolean;
|
|
313
|
+
/**
|
|
314
|
+
* Why it was skipped: `empty` (no messages), `nothing-to-drop` (the selector kept
|
|
315
|
+
* everything), `running` (a compaction was already in flight), `streaming` (a turn
|
|
316
|
+
* is in flight in the transcript).
|
|
317
|
+
*/
|
|
318
|
+
reason?: 'empty' | 'nothing-to-drop' | 'running' | 'streaming';
|
|
361
319
|
/** The summary that replaced the compacted turns. */
|
|
362
320
|
summary?: string;
|
|
363
321
|
/** How many messages were kept verbatim after the summary. */
|
|
364
322
|
kept?: number;
|
|
323
|
+
/** How many messages the summary replaced. */
|
|
324
|
+
dropped?: number;
|
|
325
|
+
/** The chat that was compacted, when it has an id — so a gauge on a multi-chat page resets only its own. */
|
|
326
|
+
targetId?: string;
|
|
365
327
|
}
|
|
366
328
|
/**
|
|
367
329
|
* Detail payload for `aparte-compact-error`.
|
|
@@ -374,6 +336,8 @@ export interface AparteCompactDoneEventDetail {
|
|
|
374
336
|
export interface AparteCompactErrorEventDetail {
|
|
375
337
|
/** Human-readable failure reason. */
|
|
376
338
|
error: string;
|
|
339
|
+
/** The chat the compaction was for, when it has an id. */
|
|
340
|
+
targetId?: string;
|
|
377
341
|
}
|
|
378
342
|
/**
|
|
379
343
|
* Detail payload for `aparte-attachment-preview`.
|
|
@@ -390,42 +354,20 @@ export interface AparteAttachmentPreviewEventDetail {
|
|
|
390
354
|
name: string;
|
|
391
355
|
}
|
|
392
356
|
/**
|
|
393
|
-
* Detail
|
|
357
|
+
* Detail for `aparte-approval-mode-change` — dispatched by `@aparte/plugin-approval`'s
|
|
358
|
+
* `<aparte-approval-mode>` after the person switched the approval mode. Bubbles and
|
|
359
|
+
* crosses shadow roots, so a host can persist the choice from any ancestor.
|
|
394
360
|
*
|
|
395
|
-
*
|
|
396
|
-
*
|
|
397
|
-
*
|
|
398
|
-
* the repo dispatches it: the contract is entirely yours to fulfil, which is why
|
|
399
|
-
* this type is the one most worth having.
|
|
400
|
-
*
|
|
401
|
-
* @event aparte-file-gen-ready
|
|
402
|
-
*/
|
|
403
|
-
export interface AparteFileGenReadyEventDetail {
|
|
404
|
-
/** Must match the artifact segment's id, or the event is ignored. */
|
|
405
|
-
segmentId: string;
|
|
406
|
-
/** File name to show and to download as. */
|
|
407
|
-
filename: string;
|
|
408
|
-
/** Size in bytes, for the card's label. */
|
|
409
|
-
bytes: number;
|
|
410
|
-
/** MIME type of the produced file. */
|
|
411
|
-
mime: string;
|
|
412
|
-
/** The file itself. */
|
|
413
|
-
buffer: Uint8Array | ArrayBuffer;
|
|
414
|
-
/** Optional HTML preview to show inside the card; `null` for none. */
|
|
415
|
-
previewHtml: string | null;
|
|
416
|
-
}
|
|
417
|
-
/**
|
|
418
|
-
* Detail payload for `aparte-file-gen-error` — dispatched by YOU.
|
|
419
|
-
* Its twin: without it a failed sandbox run leaves the card spinning forever.
|
|
361
|
+
* Declared here, like `aparte-model-change`, because a listener in any framework reads
|
|
362
|
+
* `e.detail` through the typed event map. The values are the plugin's four modes
|
|
363
|
+
* (`plan`, `ask`, `auto-edit`, `auto`); typed as strings so core names none of them.
|
|
420
364
|
*
|
|
421
|
-
* @event aparte-
|
|
365
|
+
* @event aparte-approval-mode-change
|
|
422
366
|
*/
|
|
423
|
-
export interface
|
|
424
|
-
/**
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
|
|
428
|
-
/** The message shown to the user. Defaults to `'Unknown error'`. */
|
|
429
|
-
error?: string;
|
|
367
|
+
export interface AparteApprovalModeChangeEventDetail {
|
|
368
|
+
/** The mode just switched to. */
|
|
369
|
+
mode: string;
|
|
370
|
+
/** The mode it replaced. */
|
|
371
|
+
previousMode: string;
|
|
430
372
|
}
|
|
431
373
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/types/events.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM/C;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IAClC,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAEhB,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,yEAAyE;IACzE,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IAEf;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0FAA0F;IAC1F,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B;IACzC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE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b,4BAA4B;IAC5B,YAAY,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -43,7 +43,9 @@ export interface AparteChatImperativeApi {
|
|
|
43
43
|
*/
|
|
44
44
|
appendToSegment: (segmentId: string, content: string) => void;
|
|
45
45
|
getMessages: () => AparteMessage[];
|
|
46
|
-
clearMessages: (
|
|
46
|
+
clearMessages: (options?: {
|
|
47
|
+
revokeAttachments?: boolean;
|
|
48
|
+
}) => void;
|
|
47
49
|
addBranch: (messageId: string) => number;
|
|
48
50
|
addSiblingOf: (existingId: string, message: AparteMessage) => string | null;
|
|
49
51
|
truncateFrom: (messageId: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imperative-api.d.ts","sourceRoot":"","sources":["../../src/types/imperative-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;;;;;GASG;AACH,MAAM,WAAW,uBAAuB;IAEpC;;;;;;OAMG;IACH,aAAa,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IACpF,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IAC5E,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7E,UAAU,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IAC5E,aAAa,EAAE,CAAC,SAAS,EAAE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AE;QAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IAEnE,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,YAAY,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,KAAK,MAAM,GAAG,IAAI,CAAC;IAC5E,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,sBAAsB,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAExD;;;;;;;;;;;;OAYG;IACH,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvF,+FAA+F;IAC/F,eAAe,EAAE,MAAM,IAAI,CAAC;IAE5B,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAExD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,wFAAwF;IACxF,WAAW,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;CACzC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,16 +7,17 @@
|
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
9
|
export type { AparteStatus, AparteBubbleRole, AparteAttachment, AparteMessage, AparteMessageBranch, AparteBubbleActionsConfig, AparteBubbleActionName, AparteViewportConfig, AparteInputConfig } from './models.js';
|
|
10
|
-
export type {
|
|
10
|
+
export type { AparteStreamBlock, AparteStreamBlockMatch } from './stream-blocks.js';
|
|
11
|
+
export type { AparteSendEventDetail, AparteSiblingInfo, AparteBranchNavigateEventDetail, AparteLinkClickEventDetail, ApartePathChangedEventDetail, AparteRetryEventDetail, AparteEditEventDetail, AparteFeedbackEventDetail, AparteActionEventDetail } from './events.js';
|
|
11
12
|
export type { AparteContentParser, AparteParserRegistry } from './parsers.js';
|
|
12
|
-
export type { AparteSegmentBase, AparteSegmentDefaults, AparteSegmentTiming, AparteTextSegment, AparteThinkingSegment, AparteCodeSegment, AparteErrorSegment, AparteSegment, AparteCustomSegment, AparteToolCallSegment,
|
|
13
|
+
export type { AparteSegmentBase, AparteSegmentDefaults, AparteSegmentTiming, AparteTextSegment, AparteThinkingSegment, AparteCodeSegment, AparteErrorSegment, AparteSegment, AparteCustomSegment, AparteToolCallSegment, AparteSegmentType, AparteSegmentRenderer, AparteSegmentUpdateEventDetail } from './segments.js';
|
|
13
14
|
export type { AparteThemeVariables } from './theming.js';
|
|
14
15
|
export type { AparteAIModel, AparteAIProvider, AparteAIProviderMetadata, AparteAIProviderConfigField, AparteAIProviderConfigSchema, AparteModelConfig, ModelStatus, ModelLoadProgress } from './model-provider.js';
|
|
15
16
|
export type { AparteChatRequest, AparteChatResponse, AparteChatMessage, AparteContentPart, AparteTextPart, AparteImagePart, AparteFilePart, AparteStreamEvent, AparteStreamEventMap, AparteUsage } from './chat.js';
|
|
16
17
|
export { contentToText } from './chat.js';
|
|
17
|
-
export type { AparteTool, AparteToolCall, AparteToolResult, AparteToolHandler, AparteToolContext, AparteToolRenderer, AparteToolApprovalRequestDetail, } from './tools.js';
|
|
18
|
+
export type { AparteTool, AparteToolCall, AparteApprovalPolicy, AparteApprovalRuling, AparteToolResult, AparteToolHandler, AparteToolContext, AparteToolRenderer, AparteToolApprovalRequestDetail, } from './tools.js';
|
|
18
19
|
export { AparteErrorCode, AparteError } from './errors.js';
|
|
19
|
-
export type { AparteModelChangeEventDetail, AparteMessageDoneEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessageAbortedEventDetail, AparteAbortEventDetail, AparteCompactEventDetail, AparteCompactDoneEventDetail, AparteCompactErrorEventDetail, AparteAttachmentPreviewEventDetail,
|
|
20
|
+
export type { AparteModelChangeEventDetail, AparteApprovalModeChangeEventDetail, AparteMessageDoneEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessageAbortedEventDetail, AparteAbortEventDetail, AparteCompactEventDetail, AparteCompactDoneEventDetail, AparteCompactStartEventDetail, AparteCompactErrorEventDetail, AparteAttachmentPreviewEventDetail, AparteMessageInfoEventDetail, } from './events.js';
|
|
20
21
|
export type { AparteElementAttributes, AparteElementTagName, AparteAttrValue, AparteTemplateAttrs, AparteNoAttributes, AparteChatAttributes, AparteChatViewportAttributes, AparteChatBubbleAttributes, AparteChatStatusAttributes, AparteComposerAttributes, AparteComposerInputAttributes, AparteComposerActionAttributes, AparteComposerAddAttachmentAttributes, AparteComposerToolbarAttributes, AparteConversationListAttributes, AparteSelectAttributes, AparteOptionAttributes, AparteOptgroupAttributes, AparteProgressSpinnerAttributes } from './element-attributes.js';
|
|
21
22
|
export type { AparteChatImperativeApi } from './imperative-api.js';
|
|
22
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,YAAY,EACR,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACpB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,YAAY,EACR,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACpB,MAAM,aAAa,CAAC;AAErB,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;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