@aparte/core 0.32.0 → 0.32.1
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/components/composer/aparte-composer-send.d.ts.map +1 -1
- package/dist/components/context/aparte-context.d.ts.map +1 -1
- package/dist/components/viewport/aparte-chat-viewport.d.ts +5 -1
- package/dist/components/viewport/aparte-chat-viewport.d.ts.map +1 -1
- package/dist/custom-elements.json +3163 -3163
- package/dist/{defer-hydration-ggxlbvL9.js → defer-hydration-DQKULLmH.js} +22 -8
- package/dist/defer-hydration-DQKULLmH.js.map +1 -0
- package/dist/elicitation/panel.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +16 -5
- package/dist/index.js.map +1 -1
- package/dist/index.node.js +1 -1
- package/dist/renderers/citations.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/defer-hydration-ggxlbvL9.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { K as deferHydrationOf, ad as resolveConfig, ao as eventOrigin, ap as activeElementIn, aj as subscribeConfigChange, af as runWithConfig, o as AparteElicitationAbortError, w as buildApprovalPanel, x as buildElicitationPanel, aq as gateGlide, O as escapeAttr, ar as chatBoundaryOf, as as relabelCodeLanguages, at as relabelCitations, au as toolCallRenderer, av as toolRendererThatDrew, t as aparteGlobalConfig, aw as isMountedRenderer, ax as renderingVersionOf, H as cssEscape, ay as onRenderersChange, az as renderSourceList, aA as mergeSegmentUpdate, P as escapeHtml, a0 as isSegmentSettled, aB as writeStreamedMarkdown, aC as replaceHighlighted, $ as isSafeUrl, C as copyText, V as getSegmentRenderer, X as installDefaultRenderersOnce, r as AparteMessageRepository, aD as CheckpointStateWatcher, aE as chatIdOf, aF as stampSegmentActivity, aG as stampSegmentOnInsert, aH as stampSegmentOnUpdate, aI as renumberSegments, aJ as openSegmentIds, aK as isTerminalStatus, aL as adoptMessageSegments, Z as isAwaitingReply, a5 as populateBubbleFromMessage, an as uuid, ae as revokeAttachmentUrls, a4 as parseMarkdownToSegments, aM as APARTE_DERIVED_SEGMENTS, aN as rememberConversationStatus, aO as tellConversationStatus, aP as conversationStatusOf, e as APARTE_DEFAULT_LOCALE, aQ as usageTokens, q as AparteErrorCode, a1 as measureContext, aR as rootOf, g as APARTE_HOST_ATTR, Y as installDialogTriggersOnce } from "./defer-hydration-
|
|
2
|
-
import { A, a, b, c, d, f, h, i, j, k, l, m, n, p, s, S, u, v, y, z, B, D, E, F, G, I, J, L, M, N, Q, R, T, U, W, _, a2, a3, a6, a7, a8, a9, aa, ab, ac, ag, ah, ai, ak, al, am } from "./defer-hydration-
|
|
1
|
+
import { K as deferHydrationOf, ad as resolveConfig, ao as eventOrigin, ap as activeElementIn, aj as subscribeConfigChange, af as runWithConfig, o as AparteElicitationAbortError, w as buildApprovalPanel, x as buildElicitationPanel, aq as gateGlide, O as escapeAttr, ar as chatBoundaryOf, as as relabelCodeLanguages, at as relabelCitations, au as toolCallRenderer, av as toolRendererThatDrew, t as aparteGlobalConfig, aw as isMountedRenderer, ax as renderingVersionOf, H as cssEscape, ay as onRenderersChange, az as renderSourceList, aA as mergeSegmentUpdate, P as escapeHtml, a0 as isSegmentSettled, aB as writeStreamedMarkdown, aC as replaceHighlighted, $ as isSafeUrl, C as copyText, V as getSegmentRenderer, X as installDefaultRenderersOnce, r as AparteMessageRepository, aD as CheckpointStateWatcher, aE as chatIdOf, aF as stampSegmentActivity, aG as stampSegmentOnInsert, aH as stampSegmentOnUpdate, aI as renumberSegments, aJ as openSegmentIds, aK as isTerminalStatus, aL as adoptMessageSegments, Z as isAwaitingReply, a5 as populateBubbleFromMessage, an as uuid, ae as revokeAttachmentUrls, a4 as parseMarkdownToSegments, aM as APARTE_DERIVED_SEGMENTS, aN as rememberConversationStatus, aO as tellConversationStatus, aP as conversationStatusOf, e as APARTE_DEFAULT_LOCALE, aQ as usageTokens, q as AparteErrorCode, a1 as measureContext, aR as rootOf, g as APARTE_HOST_ATTR, Y as installDialogTriggersOnce } from "./defer-hydration-DQKULLmH.js";
|
|
2
|
+
import { A, a, b, c, d, f, h, i, j, k, l, m, n, p, s, S, u, v, y, z, B, D, E, F, G, I, J, L, M, N, Q, R, T, U, W, _, a2, a3, a6, a7, a8, a9, aa, ab, ac, ag, ah, ai, ak, al, am } from "./defer-hydration-DQKULLmH.js";
|
|
3
3
|
function presenceOn(value) {
|
|
4
4
|
return value === "" ? true : Boolean(value);
|
|
5
5
|
}
|
|
@@ -3630,9 +3630,13 @@ class AparteChatViewport extends HTMLElement {
|
|
|
3630
3630
|
if (!el2.hasAttribute("role")) el2.setAttribute("role", "log");
|
|
3631
3631
|
el2.setAttribute("aria-label", resolveConfig(this).t("transcript"));
|
|
3632
3632
|
}
|
|
3633
|
-
/**
|
|
3633
|
+
/**
|
|
3634
|
+
* Mirror `locale.direction` onto the scroll surface: the container, or the viewport itself
|
|
3635
|
+
* when a framework renders the messages — a wrapper's transcript stayed left to right
|
|
3636
|
+
* under a right-to-left locale while its composer turned.
|
|
3637
|
+
*/
|
|
3634
3638
|
_applyDirection() {
|
|
3635
|
-
const container = this.querySelector(".aparte-viewport-container");
|
|
3639
|
+
const container = this._frameworkManagedDOM ? this : this.querySelector(".aparte-viewport-container");
|
|
3636
3640
|
if (!container) return;
|
|
3637
3641
|
const direction = resolveConfig(this).getLocale().direction;
|
|
3638
3642
|
if (direction) container.setAttribute("dir", direction);
|
|
@@ -4435,6 +4439,7 @@ class AparteChatViewport extends HTMLElement {
|
|
|
4435
4439
|
}
|
|
4436
4440
|
this.classList.add("aparte-viewport--framework");
|
|
4437
4441
|
this._nameScrollSurface(this);
|
|
4442
|
+
this._applyDirection();
|
|
4438
4443
|
const scrollBtn = document.createElement("button");
|
|
4439
4444
|
scrollBtn.className = "aparte-btn aparte-btn--surface aparte-btn--circle aparte-btn--lg aparte-scroll-btn aparte-scroll-btn--hidden";
|
|
4440
4445
|
scrollBtn.setAttribute("type", "button");
|
|
@@ -5803,6 +5808,7 @@ class AparteComposerSend extends HTMLElement {
|
|
|
5803
5808
|
class="aparte-btn aparte-btn--primary aparte-btn--solid aparte-btn--icon aparte-cs-button aparte-send-button"
|
|
5804
5809
|
aria-label="${escapeAttr(label)}"
|
|
5805
5810
|
title="${escapeAttr(label)}"
|
|
5811
|
+
data-act="send"
|
|
5806
5812
|
${disabled ? "disabled" : ""}
|
|
5807
5813
|
>${icon}</button>`;
|
|
5808
5814
|
}
|
|
@@ -5873,6 +5879,7 @@ class AparteComposerSend extends HTMLElement {
|
|
|
5873
5879
|
}
|
|
5874
5880
|
this._button.disabled = !panel.submitEnabled;
|
|
5875
5881
|
this._button.innerHTML = this._getSubmitIcon();
|
|
5882
|
+
this._button.setAttribute("data-act", "submit");
|
|
5876
5883
|
const label = cfg.t("submitButton") || "Submit";
|
|
5877
5884
|
this._button.setAttribute("aria-label", label);
|
|
5878
5885
|
this._button.setAttribute("title", label);
|
|
@@ -5889,6 +5896,7 @@ class AparteComposerSend extends HTMLElement {
|
|
|
5889
5896
|
const isEmpty = root.value.trim() === "" && root.attachments.length === 0;
|
|
5890
5897
|
this._button.disabled = root.disabled || isEmpty;
|
|
5891
5898
|
this._button.innerHTML = this._getSendIcon();
|
|
5899
|
+
this._button.setAttribute("data-act", "send");
|
|
5892
5900
|
const label = resolveConfig(this).t("sendButton") || "Send";
|
|
5893
5901
|
this._button.setAttribute("aria-label", label);
|
|
5894
5902
|
this._button.setAttribute("title", label);
|
|
@@ -5899,6 +5907,7 @@ class AparteComposerSend extends HTMLElement {
|
|
|
5899
5907
|
if (streaming) {
|
|
5900
5908
|
this._button.disabled = false;
|
|
5901
5909
|
this._button.innerHTML = this._getStopIcon();
|
|
5910
|
+
this._button.setAttribute("data-act", "stop");
|
|
5902
5911
|
const label = resolveConfig(this).t("stopButton") || "Stop";
|
|
5903
5912
|
this._button.setAttribute("aria-label", label);
|
|
5904
5913
|
this._button.setAttribute("title", label);
|
|
@@ -7959,7 +7968,9 @@ class AparteContext extends HTMLElement {
|
|
|
7959
7968
|
const anchor = this.getBoundingClientRect();
|
|
7960
7969
|
const box = panel.getBoundingClientRect();
|
|
7961
7970
|
if (box.height > 0 && anchor.top < box.height) panel.setAttribute("data-placement", "below");
|
|
7962
|
-
|
|
7971
|
+
const rtl = getComputedStyle(panel).direction === "rtl";
|
|
7972
|
+
const overflows = rtl ? box.left < 0 : box.right > document.documentElement.clientWidth;
|
|
7973
|
+
if (box.width > 0 && overflows) panel.setAttribute("data-align", "end");
|
|
7963
7974
|
}
|
|
7964
7975
|
}
|
|
7965
7976
|
deferHydrationOf(AparteContext);
|