@aparte/core 0.19.2 → 0.19.3
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 +6 -1
- package/dist/client/aparte-client.d.ts +10 -2
- package/dist/client/aparte-client.d.ts.map +1 -1
- package/dist/client/stream-adapter.d.ts.map +1 -1
- package/dist/components/bubble/aparte-chat-bubble.d.ts +1 -1
- package/dist/components/bubble/bubble-sync.d.ts +1 -1
- package/dist/components/composer/aparte-composer-action.d.ts +1 -1
- package/dist/components/composer/aparte-composer-add-attachment.d.ts +1 -1
- package/dist/components/composer/aparte-composer-cancel.d.ts +1 -1
- package/dist/components/composer/aparte-composer-input.d.ts +3 -2
- package/dist/components/composer/aparte-composer-input.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer-send.d.ts +1 -1
- package/dist/components/composer/aparte-composer.d.ts +2 -0
- package/dist/components/composer/aparte-composer.d.ts.map +1 -1
- package/dist/components/context/aparte-context.d.ts +5 -4
- package/dist/components/context/aparte-context.d.ts.map +1 -1
- package/dist/components/conversation-list/aparte-conversation-list.d.ts +2 -0
- package/dist/components/conversation-list/aparte-conversation-list.d.ts.map +1 -1
- package/dist/components/elicitation/aparte-elicitation.d.ts.map +1 -1
- package/dist/components/status/aparte-chat-status.d.ts +5 -3
- package/dist/components/status/aparte-chat-status.d.ts.map +1 -1
- package/dist/components/suggestions/aparte-suggestions.d.ts.map +1 -1
- package/dist/components/viewport/aparte-chat-viewport.d.ts +7 -0
- package/dist/components/viewport/aparte-chat-viewport.d.ts.map +1 -1
- package/dist/config/aparte-config.d.ts +86 -79
- package/dist/config/aparte-config.d.ts.map +1 -1
- package/dist/config/locale.d.ts +4 -0
- package/dist/config/locale.d.ts.map +1 -1
- package/dist/conversations/conversation-manager.d.ts +3 -3
- package/dist/conversations/conversation-manager.d.ts.map +1 -1
- package/dist/conversations/index.d.ts +1 -1
- package/dist/conversations/index.d.ts.map +1 -1
- package/dist/custom-elements.json +12103 -11926
- package/dist/{dialog-triggers-CEazY76J.js → dialog-triggers-ChnPFG9M.js} +113 -90
- package/dist/dialog-triggers-ChnPFG9M.js.map +1 -0
- package/dist/elicitation/approval-panel.d.ts.map +1 -1
- package/dist/generated/element-attributes.d.ts +5 -5
- package/dist/generated/element-attributes.d.ts.map +1 -1
- package/dist/host/aparte-chat-host.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +96 -13
- package/dist/index.js.map +1 -1
- package/dist/index.node.d.ts +2 -2
- package/dist/index.node.d.ts.map +1 -1
- package/dist/index.node.js +1 -1
- package/dist/index.node.js.map +1 -1
- package/dist/parsers/aparte-stream-parser.d.ts.map +1 -1
- package/dist/renderers/segments/thinking.d.ts.map +1 -1
- package/dist/transport/agent-handler.d.ts +2 -0
- package/dist/transport/agent-handler.d.ts.map +1 -1
- package/dist/transport/backend-transport.d.ts +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 +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/segments.d.ts +8 -0
- package/dist/types/segments.d.ts.map +1 -1
- package/dist/types/tools.d.ts +1 -1
- package/package.json +3 -3
- package/dist/dialog-triggers-CEazY76J.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
import './types/event-map.js';
|
|
61
61
|
import './types/element-map.js';
|
|
62
62
|
export { AparteSelect, AparteOption, AparteOptgroup, type AparteSelectChangeDetail, type AparteOptgroupToggleEventDetail, AparteProgressSpinner, AparteIcon } from './primitives/index.js';
|
|
63
|
-
export type { AparteBubbleRole, AparteMessage, AparteContentParser, AparteStreamBlock, AparteStreamBlockMatch, AparteSendEventDetail, AparteViewportConfig, AparteInputConfig, AparteThemeVariables, AparteStatus, AparteAttachment, AparteMessageBranch, AparteBubbleActionsConfig, AparteBubbleActionName, AparteSegment, AparteSegmentType, AparteTextSegment, AparteThinkingSegment, AparteCodeSegment, AparteSegmentRenderer, AparteCustomSegment, AparteToolCallSegment, AparteSegmentBase, AparteSegmentDefaults, AparteSegmentTiming, AparteErrorSegment, AparteSegmentUpdateEventDetail, AparteAIProvider, AparteAIModel, AparteAIProviderConfigField, AparteAIProviderMetadata, AparteAIProviderConfigSchema, AparteModelConfig, ModelStatus, ModelLoadProgress, AparteModelChangeEventDetail, AparteApprovalModeChangeEventDetail, AparteMessageDoneEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessageAbortedEventDetail, AparteMessagePausedEventDetail, AparteAbortEventDetail, AparteCompactEventDetail, AparteCompactDoneEventDetail, AparteCompactStartEventDetail, AparteCompactErrorEventDetail, AparteAttachmentPreviewEventDetail, AparteLinkClickEventDetail, AparteMessageInfoEventDetail, AparteSiblingInfo, AparteBranchNavigateEventDetail, ApartePathChangedEventDetail, AparteRetryEventDetail, AparteEditEventDetail, AparteFeedbackEventDetail, AparteActionEventDetail, AparteChatRequest, AparteChatResponse, AparteChatMessage, AparteContentPart, AparteTextPart, AparteImagePart, AparteStreamEvent, AparteStreamEventMap, AparteUsage, AparteTool, AparteToolCall, AparteApprovalPolicy, AparteApprovalRuling, AparteToolResult, AparteToolHandler, AparteToolContext, AparteToolRenderer, AparteToolSummary, AparteToolApprovalRequestDetail, AparteChatImperativeApi, AparteUiHandle, AparteElementAttributes, AparteElementTagName, AparteAttrValue, AparteTemplateAttrs, AparteNoAttributes, AparteChatAttributes, AparteChatViewportAttributes, AparteChatBubbleAttributes, AparteChatStatusAttributes, AparteComposerAttributes, AparteComposerInputAttributes, AparteComposerActionAttributes, AparteComposerAddAttachmentAttributes, AparteComposerToolbarAttributes, AparteConversationListAttributes, AparteSelectAttributes, AparteOptionAttributes, AparteOptgroupAttributes, AparteProgressSpinnerAttributes, } from './types/index.js';
|
|
63
|
+
export type { AparteBubbleRole, AparteMessage, AparteContentParser, AparteStreamBlock, AparteStreamBlockMatch, AparteSendEventDetail, AparteViewportConfig, AparteInputConfig, AparteThemeVariables, AparteStatus, AparteAttachment, AparteMessageBranch, AparteBubbleActionsConfig, AparteBubbleActionName, AparteSegment, AparteSegmentType, AparteTextSegment, AparteThinkingSegment, AparteCodeSegment, AparteSegmentRenderer, AparteCustomSegment, AparteToolCallSegment, AparteSegmentBase, AparteSegmentDefaults, AparteSegmentTiming, AparteErrorSegment, AparteSegmentUpdateEventDetail, AparteAIProvider, AparteAIModel, AparteAIProviderConfigField, AparteAIProviderMetadata, AparteAIProviderConfigSchema, AparteModelConfig, ModelStatus, ModelLoadProgress, AparteModelChangeEventDetail, AparteApprovalModeChangeEventDetail, AparteMessageDoneEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessageAbortedEventDetail, AparteMessagePausedEventDetail, AparteAbortEventDetail, AparteCompactEventDetail, AparteCompactDoneEventDetail, AparteCompactStartEventDetail, AparteCompactErrorEventDetail, AparteAttachmentPreviewEventDetail, AparteLinkClickEventDetail, AparteMessageInfoEventDetail, AparteSiblingInfo, AparteBranchNavigateEventDetail, ApartePathChangedEventDetail, AparteRetryEventDetail, AparteEditEventDetail, AparteFeedbackEventDetail, AparteActionEventDetail, AparteChatRequest, AparteRequestMeta, AparteChatResponse, AparteChatMessage, AparteContentPart, AparteTextPart, AparteImagePart, AparteStreamEvent, AparteStreamEventMap, AparteUsage, AparteTool, AparteToolCall, AparteApprovalPolicy, AparteApprovalRuling, AparteToolResult, AparteToolHandler, AparteToolContext, AparteToolRenderer, AparteToolSummary, AparteToolApprovalRequestDetail, AparteChatImperativeApi, AparteUiHandle, AparteElementAttributes, AparteElementTagName, AparteAttrValue, AparteTemplateAttrs, AparteNoAttributes, AparteChatAttributes, AparteChatViewportAttributes, AparteChatBubbleAttributes, AparteChatStatusAttributes, AparteComposerAttributes, AparteComposerInputAttributes, AparteComposerActionAttributes, AparteComposerAddAttachmentAttributes, AparteComposerToolbarAttributes, AparteConversationListAttributes, AparteSelectAttributes, AparteOptionAttributes, AparteOptgroupAttributes, AparteProgressSpinnerAttributes, AparteContextAttributes, AparteIconAttributes, AparteScrollRailAttributes, AparteSidebarAttributes, AparteSplitAttributes, AparteSuggestionsAttributes, } from './types/index.js';
|
|
64
64
|
export { AparteErrorCode, AparteError, contentToText } from './types/index.js';
|
|
65
65
|
export { registerSegmentRenderer, unregisterSegmentRenderer, getSegmentRenderer, collectRendererStyles, registerDefaultRenderers, installDefaultRenderersOnce, declineDefaultRenderers, getAllRenderers } from './renderers/index.js';
|
|
66
66
|
export { AparteChat } from './components/index.js';
|
|
@@ -84,7 +84,7 @@ export { AparteConversationList } from './components/index.js';
|
|
|
84
84
|
export type { AparteConversationListItem, AparteConversationSelectDetail, AparteConversationDeleteDetail, AparteConversationArchiveDetail, AparteConversationPinDetail, AparteConversationRenameDetail } from './components/index.js';
|
|
85
85
|
export type { AparteConversation, AparteConversationMeta, AparteStorageAdapter, AparteAttachmentRow, AparteConversationLoadedDetail, } from './conversations/index.js';
|
|
86
86
|
export { APARTE_CONVERSATION_SCHEMA_VERSION } from './conversations/index.js';
|
|
87
|
-
export { AparteConversationManager, type ConversationManagerOptions, type AparteConversationTitleProvider, } from './conversations/index.js';
|
|
87
|
+
export { AparteConversationManager, type ConversationManagerOptions, type AparteConversationsListener, type AparteConversationTitleProvider, } from './conversations/index.js';
|
|
88
88
|
export { AparteConversationController, type AparteChatBinding, type AparteConversationControllerOptions, } from './conversations/index.js';
|
|
89
89
|
export { AparteChatHost, type AparteChatHostBinding, type AparteChatHostOptions, } from './host/index.js';
|
|
90
90
|
export { AparteStreamParser, parseMarkdownToSegments } from './parsers/index.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,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,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACzJ,YAAY,EAAE,eAAe,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAG7Q,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,YAAY,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAGjF,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAClI,YAAY,EACR,uBAAuB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC7B,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,GACxB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AA8FnF;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAS5C;AAKD,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a1 as resolveConfig, a9 as eventOrigin, aa as activeElementIn, a6 as subscribeConfigChange, a3 as runWithConfig, o as AparteElicitationAbortError, w as buildApprovalPanel, x as buildElicitationPanel, L as escapeAttr, H as cssEscape, ab as mergeSegmentUpdate, M as escapeHtml, ac as writeStreamedMarkdown, U as isSafeUrl, C as copyText, P as getSegmentRenderer, Q as installDefaultRenderersOnce, r as AparteMessageRepository, ad as stampSegmentActivity, ae as stampSegmentOnInsert, af as stampSegmentOnUpdate, ag as renumberSegments, ah as openSegmentIds, ai as isTerminalStatus, aj as adoptMessageSegments, S as isAwaitingReply, Y as populateBubbleFromMessage, a8 as uuid, a2 as revokeAttachmentUrls, X as parseMarkdownToSegments, ak as APARTE_DERIVED_SEGMENTS, e as APARTE_DEFAULT_LOCALE, al as chatBoundaryOf, am as rootOf, R as installDialogTriggersOnce } from "./dialog-triggers-
|
|
2
|
-
import { A, a, b, c, d, f, g, h, i, j, k, l, m, n, p, q, s, t, u, v, y, z, B, D, E, F, G, I, J, K, N, O, T, V, W, Z, _, $, a0, a4, a5, a7 } from "./dialog-triggers-
|
|
1
|
+
import { a1 as resolveConfig, a9 as eventOrigin, aa as activeElementIn, a6 as subscribeConfigChange, a3 as runWithConfig, o as AparteElicitationAbortError, w as buildApprovalPanel, x as buildElicitationPanel, L as escapeAttr, H as cssEscape, ab as mergeSegmentUpdate, M as escapeHtml, ac as writeStreamedMarkdown, U as isSafeUrl, C as copyText, P as getSegmentRenderer, Q as installDefaultRenderersOnce, r as AparteMessageRepository, ad as stampSegmentActivity, ae as stampSegmentOnInsert, af as stampSegmentOnUpdate, ag as renumberSegments, ah as openSegmentIds, ai as isTerminalStatus, aj as adoptMessageSegments, S as isAwaitingReply, Y as populateBubbleFromMessage, a8 as uuid, a2 as revokeAttachmentUrls, X as parseMarkdownToSegments, ak as APARTE_DERIVED_SEGMENTS, e as APARTE_DEFAULT_LOCALE, al as chatBoundaryOf, am as rootOf, R as installDialogTriggersOnce } from "./dialog-triggers-ChnPFG9M.js";
|
|
2
|
+
import { A, a, b, c, d, f, g, h, i, j, k, l, m, n, p, q, s, t, u, v, y, z, B, D, E, F, G, I, J, K, N, O, T, V, W, Z, _, $, a0, a4, a5, a7 } from "./dialog-triggers-ChnPFG9M.js";
|
|
3
3
|
function presenceOn(value) {
|
|
4
4
|
return value === "" ? true : Boolean(value);
|
|
5
5
|
}
|
|
@@ -756,6 +756,17 @@ class AparteIcon extends HTMLElement {
|
|
|
756
756
|
if (!customElements.get("aparte-icon")) {
|
|
757
757
|
customElements.define("aparte-icon", AparteIcon);
|
|
758
758
|
}
|
|
759
|
+
function deepActiveElement(root) {
|
|
760
|
+
let active = root.activeElement;
|
|
761
|
+
while (active?.shadowRoot?.activeElement) active = active.shadowRoot.activeElement;
|
|
762
|
+
return active;
|
|
763
|
+
}
|
|
764
|
+
function isWithin(node, ancestor) {
|
|
765
|
+
for (let n2 = node; n2; n2 = n2.parentNode ?? (n2 instanceof ShadowRoot ? n2.host : null)) {
|
|
766
|
+
if (n2 === ancestor) return true;
|
|
767
|
+
}
|
|
768
|
+
return false;
|
|
769
|
+
}
|
|
759
770
|
class AparteElicitation extends HTMLElement {
|
|
760
771
|
_pending = null;
|
|
761
772
|
/**
|
|
@@ -830,16 +841,60 @@ class AparteElicitation extends HTMLElement {
|
|
|
830
841
|
return new Promise((resolve, reject) => {
|
|
831
842
|
let done = false;
|
|
832
843
|
const slot = {};
|
|
833
|
-
const focusedBefore = document
|
|
844
|
+
const focusedBefore = deepActiveElement(document);
|
|
845
|
+
const messageText = () => {
|
|
846
|
+
const m2 = request.message;
|
|
847
|
+
return typeof m2 === "function" ? String(m2()) : String(m2 ?? "");
|
|
848
|
+
};
|
|
849
|
+
const CHAT = "aparte-chat, [data-aparte-chat], [data-aparte-host]";
|
|
850
|
+
const EDITABLE = 'input, textarea, select, [contenteditable]:not([contenteditable="false"])';
|
|
851
|
+
const chatRoot = composer.closest(CHAT) ?? composer.parentElement ?? composer;
|
|
852
|
+
const fromNobody = !(focusedBefore instanceof HTMLElement) || focusedBefore === document.body;
|
|
853
|
+
const before = fromNobody ? null : focusedBefore;
|
|
854
|
+
const inChat = before !== null && isWithin(before, chatRoot);
|
|
855
|
+
const typing = before !== null && before.matches(EDITABLE);
|
|
856
|
+
const busyElsewhere = before !== null && !inChat && (typing || before.tagName === "IFRAME" || before.closest(CHAT) !== null);
|
|
857
|
+
const status = (text) => {
|
|
858
|
+
let region = composer.querySelector(":scope > .aparte-elic-status");
|
|
859
|
+
if (!region) {
|
|
860
|
+
region = document.createElement("span");
|
|
861
|
+
region.className = "aparte-sr-only aparte-elic-status";
|
|
862
|
+
region.setAttribute("role", "status");
|
|
863
|
+
composer.appendChild(region);
|
|
864
|
+
}
|
|
865
|
+
const live = region;
|
|
866
|
+
live.textContent = "";
|
|
867
|
+
if (text) setTimeout(() => {
|
|
868
|
+
if (live.isConnected) live.textContent = text;
|
|
869
|
+
}, 60);
|
|
870
|
+
};
|
|
871
|
+
const focusPanel = (panel2, message) => {
|
|
872
|
+
if (busyElsewhere) {
|
|
873
|
+
status(message);
|
|
874
|
+
return;
|
|
875
|
+
}
|
|
876
|
+
const x = window.scrollX, y2 = window.scrollY;
|
|
877
|
+
if (typing && inChat) {
|
|
878
|
+
if (!panel2.el.hasAttribute("tabindex")) panel2.el.setAttribute("tabindex", "-1");
|
|
879
|
+
if (!panel2.el.hasAttribute("role")) panel2.el.setAttribute("role", "group");
|
|
880
|
+
if (message && !panel2.el.hasAttribute("aria-label")) panel2.el.setAttribute("aria-label", message);
|
|
881
|
+
panel2.el.focus();
|
|
882
|
+
} else {
|
|
883
|
+
panel2.focus();
|
|
884
|
+
}
|
|
885
|
+
if (fromNobody && (window.scrollX !== x || window.scrollY !== y2)) window.scrollTo(x, y2);
|
|
886
|
+
};
|
|
834
887
|
const close = () => {
|
|
835
888
|
if (done) return false;
|
|
836
889
|
done = true;
|
|
837
890
|
this._pending = null;
|
|
838
|
-
const active = document
|
|
839
|
-
const focusWasInPanel = active instanceof Node &&
|
|
891
|
+
const active = deepActiveElement(document);
|
|
892
|
+
const focusWasInPanel = active instanceof Node && isWithin(active, composer);
|
|
840
893
|
composer.hidePanel(slot.token);
|
|
841
|
-
|
|
842
|
-
|
|
894
|
+
status("");
|
|
895
|
+
if (focusWasInPanel) {
|
|
896
|
+
const back = !busyElsewhere && before !== null && before.isConnected && !isWithin(before, composer) ? before : null;
|
|
897
|
+
(back ?? composer).focus();
|
|
843
898
|
}
|
|
844
899
|
return true;
|
|
845
900
|
};
|
|
@@ -872,7 +927,7 @@ class AparteElicitation extends HTMLElement {
|
|
|
872
927
|
},
|
|
873
928
|
onEvict: () => fail()
|
|
874
929
|
});
|
|
875
|
-
panel2
|
|
930
|
+
focusPanel(panel2, messageText());
|
|
876
931
|
return;
|
|
877
932
|
}
|
|
878
933
|
const schema = request.schema ?? { type: "string" };
|
|
@@ -910,7 +965,7 @@ class AparteElicitation extends HTMLElement {
|
|
|
910
965
|
if (panel.isComplete()) settle({ action: "accept", content: panel.getContent() });
|
|
911
966
|
}
|
|
912
967
|
});
|
|
913
|
-
panel
|
|
968
|
+
focusPanel(panel, messageText());
|
|
914
969
|
});
|
|
915
970
|
};
|
|
916
971
|
_cancelPending() {
|
|
@@ -2398,6 +2453,10 @@ class AparteChatStatus extends HTMLElement {
|
|
|
2398
2453
|
get _cfg() {
|
|
2399
2454
|
return resolveConfig(this);
|
|
2400
2455
|
}
|
|
2456
|
+
/** The word said when no `text` is set: the locale's `typing`, never an English literal. */
|
|
2457
|
+
_word() {
|
|
2458
|
+
return this._cfg.t("typing");
|
|
2459
|
+
}
|
|
2401
2460
|
constructor() {
|
|
2402
2461
|
super();
|
|
2403
2462
|
}
|
|
@@ -2454,7 +2513,7 @@ class AparteChatStatus extends HTMLElement {
|
|
|
2454
2513
|
return this.hasAttribute("visible");
|
|
2455
2514
|
}
|
|
2456
2515
|
_render() {
|
|
2457
|
-
const text = this.getAttribute("text") ||
|
|
2516
|
+
const text = this.getAttribute("text") || this._word();
|
|
2458
2517
|
const visible = this.hasAttribute("visible");
|
|
2459
2518
|
if (this.querySelector(".aparte-status-container")) return;
|
|
2460
2519
|
const custom = this._cfg?.getStatusRenderer?.();
|
|
@@ -2525,7 +2584,7 @@ class AparteChatStatus extends HTMLElement {
|
|
|
2525
2584
|
const srEl = this.querySelector(".aparte-status-sr");
|
|
2526
2585
|
if (!srEl) return;
|
|
2527
2586
|
const dotsOnly = !this.getAttribute("text");
|
|
2528
|
-
srEl.textContent = dotsOnly && this.hasAttribute("visible") ?
|
|
2587
|
+
srEl.textContent = dotsOnly && this.hasAttribute("visible") ? this._word() : "";
|
|
2529
2588
|
}
|
|
2530
2589
|
_updateVisibility(visible) {
|
|
2531
2590
|
const container = this.querySelector(".aparte-status-container");
|
|
@@ -2538,7 +2597,7 @@ class AparteChatStatus extends HTMLElement {
|
|
|
2538
2597
|
const container = this.querySelector(".aparte-status-container");
|
|
2539
2598
|
if (!container) return;
|
|
2540
2599
|
this._writeText(text);
|
|
2541
|
-
container.setAttribute("aria-label", text ||
|
|
2600
|
+
container.setAttribute("aria-label", text || this._word());
|
|
2542
2601
|
}
|
|
2543
2602
|
}
|
|
2544
2603
|
if (!customElements.get("aparte-chat-status")) {
|
|
@@ -2630,6 +2689,15 @@ class AparteChatViewport extends HTMLElement {
|
|
|
2630
2689
|
_maxRenderedBubbles = 1e3;
|
|
2631
2690
|
_resizeObserver = null;
|
|
2632
2691
|
_mutationObserver = null;
|
|
2692
|
+
/**
|
|
2693
|
+
* Opening or closing a `<details>` — a tool row, a reasoning block, an artifact card, a host's
|
|
2694
|
+
* own — changes the transcript's height through an ATTRIBUTE, which neither observer sees: the
|
|
2695
|
+
* mutation observer watches children, and the resize observer leaves the wrapper out on
|
|
2696
|
+
* purpose. `toggle` does not bubble, so it is caught on the way down (#105).
|
|
2697
|
+
*/
|
|
2698
|
+
_onDisclosureToggle = () => {
|
|
2699
|
+
this._scheduleSpacerUpdate();
|
|
2700
|
+
};
|
|
2633
2701
|
/** The `[overlay-composer]` shell this viewport floats in, if any. Read at observer setup, like `framework-managed`. */
|
|
2634
2702
|
_overlayRoot = null;
|
|
2635
2703
|
/** Watches the overlay shell's childList, so a stack child that mounts later (elicitation) gets observed too. */
|
|
@@ -3702,6 +3770,7 @@ class AparteChatViewport extends HTMLElement {
|
|
|
3702
3770
|
}
|
|
3703
3771
|
this._scheduleSpacerUpdate();
|
|
3704
3772
|
});
|
|
3773
|
+
this.addEventListener("toggle", this._onDisclosureToggle, true);
|
|
3705
3774
|
const observeTarget = this._frameworkManagedDOM ? this : wrapper;
|
|
3706
3775
|
if (observeTarget) {
|
|
3707
3776
|
this._mutationObserver.observe(observeTarget, {
|
|
@@ -4037,6 +4106,7 @@ class AparteChatViewport extends HTMLElement {
|
|
|
4037
4106
|
this.removeEventListener("aparte-branch-navigate", this._onBranchNavigate);
|
|
4038
4107
|
this._resizeObserver?.disconnect();
|
|
4039
4108
|
this._mutationObserver?.disconnect();
|
|
4109
|
+
this.removeEventListener("toggle", this._onDisclosureToggle, true);
|
|
4040
4110
|
this._overlayObserver?.disconnect();
|
|
4041
4111
|
this._overlayObserver = null;
|
|
4042
4112
|
this._overlayRoot = null;
|
|
@@ -4484,6 +4554,7 @@ class AparteComposer extends HTMLElement {
|
|
|
4484
4554
|
input?.focus();
|
|
4485
4555
|
}
|
|
4486
4556
|
// ── Internal pub/sub ────────────────────────────────────────────────────
|
|
4557
|
+
/** @internal The composer parts' own bus. From outside, listen for `aparte-composer-change`. */
|
|
4487
4558
|
_emit(event, payload) {
|
|
4488
4559
|
this._listeners.get(event)?.forEach((cb) => cb(payload));
|
|
4489
4560
|
if (AparteComposer._STATE_EVENTS.has(event)) {
|
|
@@ -4494,6 +4565,7 @@ class AparteComposer extends HTMLElement {
|
|
|
4494
4565
|
}));
|
|
4495
4566
|
}
|
|
4496
4567
|
}
|
|
4568
|
+
/** @internal The composer parts' own bus. From outside, listen for `aparte-composer-change`. */
|
|
4497
4569
|
_on(event, cb) {
|
|
4498
4570
|
if (!this._listeners.has(event)) this._listeners.set(event, /* @__PURE__ */ new Set());
|
|
4499
4571
|
this._listeners.get(event).add(cb);
|
|
@@ -5525,7 +5597,14 @@ class AparteConversationList extends HTMLElement {
|
|
|
5525
5597
|
if (this.isConnected) this._render();
|
|
5526
5598
|
}, 0);
|
|
5527
5599
|
};
|
|
5600
|
+
/** The name this element last wrote, so one the app wrote — before or after connect — is left alone. */
|
|
5601
|
+
_ownLabel = null;
|
|
5528
5602
|
_render() {
|
|
5603
|
+
const current = this.getAttribute("aria-label");
|
|
5604
|
+
if (!this.hasAttribute("aria-labelledby") && (current === null || current === this._ownLabel)) {
|
|
5605
|
+
this._ownLabel = this._t("conversationList");
|
|
5606
|
+
this.setAttribute("aria-label", this._ownLabel);
|
|
5607
|
+
}
|
|
5529
5608
|
if (this._pressed) {
|
|
5530
5609
|
this._renderAfterPress = true;
|
|
5531
5610
|
return;
|
|
@@ -6254,9 +6333,13 @@ class AparteSuggestions extends HTMLElement {
|
|
|
6254
6333
|
return;
|
|
6255
6334
|
}
|
|
6256
6335
|
if (composer !== this._composer) this._watchComposer();
|
|
6336
|
+
const chipHadFocus = this.contains(document.activeElement);
|
|
6257
6337
|
composer.setValue(detail.prompt);
|
|
6258
6338
|
if (this.getAttribute("mode") === "fill") composer.focus();
|
|
6259
|
-
else
|
|
6339
|
+
else {
|
|
6340
|
+
composer.submit();
|
|
6341
|
+
if (chipHadFocus) composer.focus();
|
|
6342
|
+
}
|
|
6260
6343
|
}
|
|
6261
6344
|
}
|
|
6262
6345
|
if (!customElements.get("aparte-suggestions")) {
|