@aparte/core 0.26.0 → 0.27.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.
Files changed (69) hide show
  1. package/dist/client/aparte-client.d.ts +2 -0
  2. package/dist/client/aparte-client.d.ts.map +1 -1
  3. package/dist/components/bubble/aparte-chat-bubble.d.ts +2 -2
  4. package/dist/components/composer/accepts-file.d.ts +10 -0
  5. package/dist/components/composer/accepts-file.d.ts.map +1 -0
  6. package/dist/components/composer/aparte-composer-add-attachment.d.ts +5 -1
  7. package/dist/components/composer/aparte-composer-add-attachment.d.ts.map +1 -1
  8. package/dist/components/composer/aparte-composer-attachments.d.ts +9 -4
  9. package/dist/components/composer/aparte-composer-attachments.d.ts.map +1 -1
  10. package/dist/components/composer/aparte-composer-input.d.ts.map +1 -1
  11. package/dist/components/context/aparte-context.d.ts +15 -0
  12. package/dist/components/context/aparte-context.d.ts.map +1 -1
  13. package/dist/components/elicitation/aparte-elicitation.d.ts +2 -2
  14. package/dist/components/index.d.ts +2 -0
  15. package/dist/components/index.d.ts.map +1 -1
  16. package/dist/components/launcher/aparte-launcher.d.ts +167 -0
  17. package/dist/components/launcher/aparte-launcher.d.ts.map +1 -0
  18. package/dist/components/launcher/index.d.ts +3 -0
  19. package/dist/components/launcher/index.d.ts.map +1 -0
  20. package/dist/config/aparte-config.d.ts +6 -1
  21. package/dist/config/aparte-config.d.ts.map +1 -1
  22. package/dist/config/error-renderer.d.ts +21 -10
  23. package/dist/config/error-renderer.d.ts.map +1 -1
  24. package/dist/config/icon-provider.d.ts +2 -0
  25. package/dist/config/icon-provider.d.ts.map +1 -1
  26. package/dist/config/locale.d.ts +23 -1
  27. package/dist/config/locale.d.ts.map +1 -1
  28. package/dist/custom-elements.json +12808 -12224
  29. package/dist/{defer-hydration-8vI8xNNx.js → defer-hydration-DSZE-bKi.js} +107 -21
  30. package/dist/defer-hydration-DSZE-bKi.js.map +1 -0
  31. package/dist/generated/element-attributes.d.ts +13 -1
  32. package/dist/generated/element-attributes.d.ts.map +1 -1
  33. package/dist/{glyphs-2bym5jl5.js → glyphs-DFp-825O.js} +33 -30
  34. package/dist/{glyphs-2bym5jl5.js.map → glyphs-DFp-825O.js.map} +1 -1
  35. package/dist/icons/extended.d.ts +2 -2
  36. package/dist/icons/extended.d.ts.map +1 -1
  37. package/dist/icons/glyphs.d.ts +3 -0
  38. package/dist/icons/glyphs.d.ts.map +1 -1
  39. package/dist/icons.js +29 -30
  40. package/dist/icons.js.map +1 -1
  41. package/dist/index.css +1 -1
  42. package/dist/index.d.ts +4 -1
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +326 -19
  45. package/dist/index.js.map +1 -1
  46. package/dist/index.node.d.ts +3 -2
  47. package/dist/index.node.d.ts.map +1 -1
  48. package/dist/index.node.js +1 -1
  49. package/dist/index.node.js.map +1 -1
  50. package/dist/interop/element-props.d.ts +1 -1
  51. package/dist/interop/element-props.d.ts.map +1 -1
  52. package/dist/renderers/segments/error.d.ts.map +1 -1
  53. package/dist/renderers/segments/tool-call.d.ts.map +1 -1
  54. package/dist/types/element-map.d.ts +2 -0
  55. package/dist/types/element-map.d.ts.map +1 -1
  56. package/dist/types/errors.d.ts +7 -0
  57. package/dist/types/errors.d.ts.map +1 -1
  58. package/dist/types/event-map.d.ts +2 -0
  59. package/dist/types/event-map.d.ts.map +1 -1
  60. package/dist/types/index.d.ts +1 -1
  61. package/dist/types/index.d.ts.map +1 -1
  62. package/dist/types/segments.d.ts +12 -4
  63. package/dist/types/segments.d.ts.map +1 -1
  64. package/dist/types/tools.d.ts +6 -1
  65. package/dist/types/tools.d.ts.map +1 -1
  66. package/dist/utils/error-sentence.d.ts +21 -0
  67. package/dist/utils/error-sentence.d.ts.map +1 -0
  68. package/package.json +2 -2
  69. package/dist/defer-hydration-8vI8xNNx.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -59,12 +59,13 @@
59
59
 
60
60
 
61
61
 
62
+
62
63
 
63
64
 
64
65
  import './types/event-map.js';
65
66
  import './types/element-map.js';
66
67
  export { AparteSelect, AparteOption, AparteOptgroup, type AparteSelectChangeDetail, type AparteOptgroupToggleEventDetail, AparteProgressSpinner, AparteIcon } from './primitives/index.js';
67
- export type { AparteBubbleRole, AparteMessage, AparteContextSummary, AparteCompactor, AparteCompactorRequest, AparteCompactorOutcome, AparteCompactorReason, AparteContentParser, AparteStreamBlock, AparteStreamBlockMatch, AparteSendEventDetail, AparteViewportConfig, AparteInputConfig, AparteThemeVariables, AparteStatus, AparteAttachment, AparteMessageBranch, AparteBubbleActionsConfig, AparteBubbleActionName, AparteSegment, AparteSegmentTypes, AparteSegmentType, AparteTextSegment, AparteThinkingSegment, AparteCodeSegment, AparteSegmentRenderer, AparteSegmentMount, AparteCustomSegment, AparteToolCallSegment, AparteSegmentBase, AparteSegmentDefaults, AparteSegmentTiming, AparteErrorSegment, AparteSegmentUpdateEventDetail, AparteAIProvider, AparteAIModel, AparteAIProviderConfigField, AparteAIProviderMetadata, AparteAIProviderConfigSchema, AparteModelConfig, ModelStatus, ModelLoadProgress, AparteModelChangeEventDetail, AparteApprovalModeChangeEventDetail, AparteMessageDoneEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessageAbortedEventDetail, AparteMessagePausedEventDetail, AparteMessageResumedEventDetail, 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, AparteFinishReason, AparteTool, AparteToolCall, AparteApprovalPolicy, AparteApprovalRuling, AparteToolResult, AparteToolHandler, AparteToolContext, AparteToolRenderer, AparteToolSummary, AparteToolInputFormatter, AparteToolMatcher, AparteToolDisplay, AparteToolDetails, AparteToolCallView, AparteMountedView, AparteToolMount, 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';
68
+ export type { AparteBubbleRole, AparteMessage, AparteContextSummary, AparteCompactor, AparteCompactorRequest, AparteCompactorOutcome, AparteCompactorReason, AparteContentParser, AparteStreamBlock, AparteStreamBlockMatch, AparteSendEventDetail, AparteViewportConfig, AparteInputConfig, AparteThemeVariables, AparteStatus, AparteAttachment, AparteMessageBranch, AparteBubbleActionsConfig, AparteBubbleActionName, AparteSegment, AparteSegmentTypes, AparteSegmentType, AparteTextSegment, AparteThinkingSegment, AparteCodeSegment, AparteSegmentRenderer, AparteSegmentMount, AparteCustomSegment, AparteToolCallSegment, AparteSegmentBase, AparteSegmentDefaults, AparteSegmentTiming, AparteErrorSegment, AparteSegmentUpdateEventDetail, AparteAIProvider, AparteAIModel, AparteAIProviderConfigField, AparteAIProviderMetadata, AparteAIProviderConfigSchema, AparteModelConfig, ModelStatus, ModelLoadProgress, AparteModelChangeEventDetail, AparteApprovalModeChangeEventDetail, AparteMessageDoneEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessageAbortedEventDetail, AparteMessagePausedEventDetail, AparteMessageResumedEventDetail, 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, AparteFinishReason, AparteTool, AparteToolCall, AparteApprovalPolicy, AparteApprovalRuling, AparteToolResult, AparteToolHandler, AparteToolContext, AparteToolRenderer, AparteToolSummary, AparteToolInputFormatter, AparteToolMatcher, AparteToolDisplay, AparteToolDetails, AparteToolCallView, AparteMountedView, AparteToolMount, 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, AparteLauncherAttributes, AparteSuggestionsAttributes, } from './types/index.js';
68
69
  export { AparteErrorCode, AparteError, contentToText } from './types/index.js';
69
70
  export { registerSegmentRenderer, unregisterSegmentRenderer, getSegmentRenderer, collectRendererStyles, registerDefaultRenderers, installDefaultRenderersOnce, declineDefaultRenderers, getAllRenderers, overrideSegmentRenderer, defineMountedToolRenderer, defineMountedSegmentRenderer, toToolCallView } from './renderers/index.js';
70
71
  export { AparteChat } from './components/index.js';
@@ -84,6 +85,8 @@ export { AparteSidebar } from './components/index.js';
84
85
  export type { AparteSidebarToggleDetail } from './components/index.js';
85
86
  export { AparteSplit } from './components/index.js';
86
87
  export type { AparteSplitResizeDetail } from './components/index.js';
88
+ export { AparteLauncher } from './components/index.js';
89
+ export type { AparteLauncherToggleDetail } from './components/index.js';
87
90
  export { AparteConversationList } from './components/index.js';
88
91
  export type { AparteConversationListItem, AparteConversationSelectDetail, AparteConversationDeleteDetail, AparteConversationArchiveDetail, AparteConversationPinDetail, AparteConversationRenameDetail, AparteConversationStatus, AparteConversationStatusDetail } from './components/index.js';
89
92
  export type { AparteConversation, AparteConversationMeta, AparteStorageAdapter, AparteAttachmentRow, AparteConversationLoadedDetail, } from './conversations/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,6BAA6B,CAAC;AACrC,OAAO,2BAA2B,CAAC;AACnC,OAAO,4BAA4B,CAAC;AACpC,OAAO,0BAA0B,CAAC;AAClC,OAAO,gCAAgC,CAAC;AACxC,OAAO,8BAA8B,CAAC;AACtC,OAAO,+BAA+B,CAAC;AACvC,OAAO,+BAA+B,CAAC;AACvC,OAAO,8BAA8B,CAAC;AACtC,OAAO,8BAA8B,CAAC;AACtC,OAAO,4BAA4B,CAAC;AACpC,OAAO,2BAA2B,CAAC;AACnC,OAAO,0BAA0B,CAAC;AAClC,OAAO,2BAA2B,CAAC;AACnC,OAAO,2BAA2B,CAAC;AACnC,OAAO,gCAAgC,CAAC;AACxC,OAAO,2BAA2B,CAAC;AACnC,OAAO,8BAA8B,CAAC;AACtC,OAAO,6BAA6B,CAAC;AACrC,OAAO,8BAA8B,CAAC;AACtC,OAAO,gCAAgC,CAAC;AACxC,OAAO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,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;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAS5C;AAKD,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAGrC,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { K as deferHydrationOf, aa as resolveConfig, ak as eventOrigin, al as activeElementIn, af as subscribeConfigChange, ac as runWithConfig, o as AparteElicitationAbortError, w as buildApprovalPanel, x as buildElicitationPanel, am as gateGlide, O as escapeAttr, an as chatBoundaryOf, ao as toolCallRenderer, ap as toolRendererThatDrew, t as aparteGlobalConfig, aq as isMountedRenderer, ar as renderingVersionOf, H as cssEscape, as as onRenderersChange, at as mergeSegmentUpdate, P as escapeHtml, $ as isSegmentSettled, au as writeStreamedMarkdown, _ as isSafeUrl, C as copyText, U as getSegmentRenderer, W as installDefaultRenderersOnce, r as AparteMessageRepository, av as CheckpointStateWatcher, aw as chatIdOf, ax as stampSegmentActivity, ay as stampSegmentOnInsert, az as stampSegmentOnUpdate, aA as renumberSegments, aB as openSegmentIds, aC as isTerminalStatus, aD as adoptMessageSegments, Y as isAwaitingReply, a4 as populateBubbleFromMessage, aj as uuid, ab as revokeAttachmentUrls, a3 as parseMarkdownToSegments, aE as APARTE_DERIVED_SEGMENTS, aF as rememberConversationStatus, aG as tellConversationStatus, aH as conversationStatusOf, e as APARTE_DEFAULT_LOCALE, aI as usageTokens, q as AparteErrorCode, a0 as measureContext, aJ as rootOf, X as installDialogTriggersOnce } from "./defer-hydration-8vI8xNNx.js";
2
- import { A, a, b, c, d, f, g, h, i, j, k, l, m, n, p, s, u, v, y, z, B, D, E, F, G, I, J, L, M, N, Q, R, S, T, V, Z, a1, a2, a5, a6, a7, a8, a9, ad, ae, ag, ah, ai } from "./defer-hydration-8vI8xNNx.js";
1
+ import { K as deferHydrationOf, aa as resolveConfig, ak as eventOrigin, al as activeElementIn, af as subscribeConfigChange, ac as runWithConfig, o as AparteElicitationAbortError, w as buildApprovalPanel, x as buildElicitationPanel, am as gateGlide, O as escapeAttr, an as chatBoundaryOf, ao as toolCallRenderer, ap as toolRendererThatDrew, t as aparteGlobalConfig, aq as isMountedRenderer, ar as renderingVersionOf, H as cssEscape, as as onRenderersChange, at as mergeSegmentUpdate, P as escapeHtml, $ as isSegmentSettled, au as writeStreamedMarkdown, _ as isSafeUrl, C as copyText, U as getSegmentRenderer, W as installDefaultRenderersOnce, r as AparteMessageRepository, av as CheckpointStateWatcher, aw as chatIdOf, ax as stampSegmentActivity, ay as stampSegmentOnInsert, az as stampSegmentOnUpdate, aA as renumberSegments, aB as openSegmentIds, aC as isTerminalStatus, aD as adoptMessageSegments, Y as isAwaitingReply, a4 as populateBubbleFromMessage, aj as uuid, ab as revokeAttachmentUrls, a3 as parseMarkdownToSegments, aE as APARTE_DERIVED_SEGMENTS, aF as rememberConversationStatus, aG as tellConversationStatus, aH as conversationStatusOf, e as APARTE_DEFAULT_LOCALE, aI as usageTokens, q as AparteErrorCode, a0 as measureContext, aJ as rootOf, g as APARTE_HOST_ATTR, X as installDialogTriggersOnce } from "./defer-hydration-DSZE-bKi.js";
2
+ import { A, a, b, c, d, f, h, i, j, k, l, m, n, p, s, u, v, y, z, B, D, E, F, G, I, J, L, M, N, Q, R, S, T, V, Z, a1, a2, a5, a6, a7, a8, a9, ad, ae, ag, ah, ai } from "./defer-hydration-DSZE-bKi.js";
3
3
  function presenceOn(value) {
4
4
  return value === "" ? true : Boolean(value);
5
5
  }
@@ -5456,6 +5456,13 @@ deferHydrationOf(AparteComposer);
5456
5456
  if (!customElements.get("aparte-composer")) {
5457
5457
  customElements.define("aparte-composer", AparteComposer);
5458
5458
  }
5459
+ function acceptsFile(accept, file) {
5460
+ const tokens = (accept ?? "").split(",").map((token) => token.trim().toLowerCase()).filter(Boolean);
5461
+ if (tokens.length === 0) return true;
5462
+ const name = file.name.toLowerCase();
5463
+ const type = file.type.toLowerCase();
5464
+ return tokens.some((token) => token.startsWith(".") ? name.endsWith(token) : token.endsWith("/*") ? type.startsWith(token.slice(0, -1)) : type === token);
5465
+ }
5459
5466
  class AparteComposerInput extends HTMLElement {
5460
5467
  _editor = null;
5461
5468
  _maxHeight = 200;
@@ -5647,8 +5654,9 @@ class AparteComposerInput extends HTMLElement {
5647
5654
  const cd = e.clipboardData;
5648
5655
  if (!cd) return;
5649
5656
  const root = this._getRoot();
5650
- const imageFile = root?.querySelector("aparte-composer-add-attachment") ? Array.from(cd.items).find((i2) => i2.type.startsWith("image/"))?.getAsFile() : void 0;
5651
- if (imageFile) {
5657
+ const picker = root?.querySelector("aparte-composer-add-attachment");
5658
+ const imageFile = picker ? Array.from(cd.items).find((i2) => i2.type.startsWith("image/"))?.getAsFile() : void 0;
5659
+ if (imageFile && acceptsFile(picker?.getAttribute("accept"), imageFile)) {
5652
5660
  root?.addAttachments([imageFile]);
5653
5661
  return;
5654
5662
  }
@@ -6106,11 +6114,16 @@ class AparteComposerAddAttachment extends HTMLElement {
6106
6114
  input.style.display = "none";
6107
6115
  document.body.appendChild(input);
6108
6116
  input.addEventListener("change", () => {
6109
- if (input.files?.length) this._getRoot()?.addAttachments(input.files);
6117
+ if (input.files?.length) this._admit(input.files);
6110
6118
  document.body.removeChild(input);
6111
6119
  }, { once: true });
6112
6120
  input.click();
6113
6121
  }
6122
+ /** Attach the files `accept` admits: the dialog's "All files" and a drop both bypass the browser's filter. */
6123
+ _admit(files) {
6124
+ const admitted = Array.from(files).filter((file) => acceptsFile(this.getAttribute("accept"), file));
6125
+ if (admitted.length) this._getRoot()?.addAttachments(admitted);
6126
+ }
6114
6127
  _setupDragDrop() {
6115
6128
  const root = this._getRoot();
6116
6129
  if (!root) return;
@@ -6132,7 +6145,7 @@ class AparteComposerAddAttachment extends HTMLElement {
6132
6145
  root.classList.remove("aparte-is-dragover");
6133
6146
  if (root.disabled) return;
6134
6147
  const files = e.dataTransfer?.files;
6135
- if (files?.length) this._getRoot()?.addAttachments(files);
6148
+ if (files?.length) this._admit(files);
6136
6149
  };
6137
6150
  root.addEventListener("dragover", onDragOver);
6138
6151
  root.addEventListener("dragleave", onDragLeave);
@@ -6497,7 +6510,7 @@ class AparteConversationList extends HTMLElement {
6497
6510
  return;
6498
6511
  }
6499
6512
  const line = this.querySelector(":scope > .aparte-conv-list-no-match");
6500
- const groups = this._groups().map((g2) => this._renderGroup(g2)).join("");
6513
+ const groups = this._groups().map((g) => this._renderGroup(g)).join("");
6501
6514
  if (line) {
6502
6515
  for (const child of Array.from(this.childNodes)) if (child !== line) child.remove();
6503
6516
  line.insertAdjacentHTML("beforebegin", groups);
@@ -6578,12 +6591,12 @@ class AparteConversationList extends HTMLElement {
6578
6591
  const tag = resolveConfig(this).getLocale().tag;
6579
6592
  const buckets = /* @__PURE__ */ new Map();
6580
6593
  const push = (key, label, item) => {
6581
- let g2 = buckets.get(key);
6582
- if (!g2) {
6583
- g2 = { key, label, items: [] };
6584
- buckets.set(key, g2);
6594
+ let g = buckets.get(key);
6595
+ if (!g) {
6596
+ g = { key, label, items: [] };
6597
+ buckets.set(key, g);
6585
6598
  }
6586
- g2.items.push(item);
6599
+ g.items.push(item);
6587
6600
  };
6588
6601
  for (const c2 of items) {
6589
6602
  if (c2.pinnedAt) {
@@ -6607,7 +6620,7 @@ class AparteConversationList extends HTMLElement {
6607
6620
  push(`m-${d2.getFullYear()}-${String(d2.getMonth()).padStart(2, "0")}`, label, c2);
6608
6621
  }
6609
6622
  }
6610
- const fixed = ["pinned", "today", "yesterday", "week", "month"].map((k2) => buckets.get(k2)).filter((g2) => !!g2);
6623
+ const fixed = ["pinned", "today", "yesterday", "week", "month"].map((k2) => buckets.get(k2)).filter((g) => !!g);
6611
6624
  const months = [...buckets.keys()].filter((k2) => k2.startsWith("m-")).sort((a3, b2) => b2.localeCompare(a3)).map((k2) => buckets.get(k2));
6612
6625
  const undated = buckets.get("undated");
6613
6626
  return [...fixed, ...months, ...undated ? [undated] : []];
@@ -7478,6 +7491,7 @@ class AparteContext extends HTMLElement {
7478
7491
  window.addEventListener("aparte-conversation-loaded", this._onLoaded);
7479
7492
  window.addEventListener("aparte-config-change", this._onRerender);
7480
7493
  this.addEventListener("click", this._onClick);
7494
+ this.addEventListener("keydown", this._onKeydown);
7481
7495
  this._render();
7482
7496
  }
7483
7497
  disconnectedCallback() {
@@ -7490,6 +7504,7 @@ class AparteContext extends HTMLElement {
7490
7504
  window.removeEventListener("aparte-conversation-loaded", this._onLoaded);
7491
7505
  window.removeEventListener("aparte-config-change", this._onRerender);
7492
7506
  this.removeEventListener("click", this._onClick);
7507
+ this.removeEventListener("keydown", this._onKeydown);
7493
7508
  this._stopListeningWhileOpen();
7494
7509
  }
7495
7510
  attributeChangedCallback(name) {
@@ -7821,11 +7836,29 @@ class AparteContext extends HTMLElement {
7821
7836
  _onDocumentClick = (event) => {
7822
7837
  if (!event.composedPath().includes(this)) this._setOpen(false);
7823
7838
  };
7839
+ /**
7840
+ * Escape from inside the gauge — the toggle, the panel — is the gauge's, and it is
7841
+ * answered HERE, on the element, not on the document. An ancestor that also answers
7842
+ * Escape (a launcher closing its card, a dialog) listens on its own element, which runs
7843
+ * before any listener on the document, so a press consumed only there had already
7844
+ * closed the card around the panel it was meant for. Taken means stopped, so nothing
7845
+ * above answers it too, and prevented, so a listener that still sees it — one on this
7846
+ * element, a capture listener — knows it is spoken for, and a dialog around does not
7847
+ * take it as its own close request.
7848
+ */
7849
+ _onKeydown = (event) => {
7850
+ if (!this._open || event.key !== "Escape") return;
7851
+ event.preventDefault();
7852
+ event.stopPropagation();
7853
+ this._setOpen(false, true);
7854
+ };
7855
+ /**
7856
+ * A press elsewhere still closes the panel, but is left to whatever else listens for
7857
+ * Escape (a dialog, the composer).
7858
+ */
7824
7859
  _onDocumentKeydown = (event) => {
7825
7860
  if (event.key !== "Escape") return;
7826
- const inside = event.composedPath().includes(this);
7827
- if (inside) event.stopPropagation();
7828
- this._setOpen(false, inside || this.contains(document.activeElement));
7861
+ this._setOpen(false, this.contains(document.activeElement));
7829
7862
  };
7830
7863
  _listenWhileOpen() {
7831
7864
  document.addEventListener("click", this._onDocumentClick);
@@ -8656,7 +8689,7 @@ class AparteSidebar extends HTMLElement {
8656
8689
  }
8657
8690
  }
8658
8691
  let sidebarIdSeq = 0;
8659
- const FOCUSABLE = [
8692
+ const FOCUSABLE$1 = [
8660
8693
  "a[href]",
8661
8694
  "button:not([disabled])",
8662
8695
  'input:not([disabled]):not([type="hidden"])',
@@ -8665,7 +8698,7 @@ const FOCUSABLE = [
8665
8698
  '[tabindex]:not([tabindex="-1"])'
8666
8699
  ].join(",");
8667
8700
  function visibleFocusable(root) {
8668
- return Array.from(root.querySelectorAll(FOCUSABLE)).filter((el2) => !el2.closest("[hidden]") && el2.checkVisibility?.() !== false);
8701
+ return Array.from(root.querySelectorAll(FOCUSABLE$1)).filter((el2) => !el2.closest("[hidden]") && el2.checkVisibility?.() !== false);
8669
8702
  }
8670
8703
  function nearestSidebar(control) {
8671
8704
  return control.closest("aparte-sidebar") ?? rootOf(control).querySelector("aparte-sidebar") ?? document.querySelector("aparte-sidebar");
@@ -9453,6 +9486,278 @@ deferHydrationOf(AparteSplit);
9453
9486
  if (!customElements.get("aparte-split")) {
9454
9487
  customElements.define("aparte-split", AparteSplit);
9455
9488
  }
9489
+ const SHEET_QUERY = "(max-width: 30rem), (max-height: 30rem)";
9490
+ const FOCUSABLE = [
9491
+ "a[href]",
9492
+ "button:not([disabled])",
9493
+ 'input:not([disabled]):not([type="hidden"])',
9494
+ "select:not([disabled])",
9495
+ "textarea:not([disabled])",
9496
+ '[tabindex]:not([tabindex="-1"])'
9497
+ ].join(",");
9498
+ class AparteLauncher extends HTMLElement {
9499
+ static get observedAttributes() {
9500
+ return ["open", "label", "breakpoint"];
9501
+ }
9502
+ _button = null;
9503
+ /**
9504
+ * Watches the element's own children. The button is the one child that is not the host's,
9505
+ * so it is the one a framework reconciling the others knows nothing about: Vue's
9506
+ * hydration removes "more child nodes than client vdom", Svelte 4's removes what its
9507
+ * claim did not take. Without this it stays removed — a closed launcher then shows
9508
+ * nothing, and nothing can open the chat.
9509
+ */
9510
+ _childWatch = null;
9511
+ /**
9512
+ * Watches for a config boundary appearing, changing or leaving inside the element. A
9513
+ * framework wrapper attaches its chat's `config` from a post-mount hook, after the
9514
+ * launcher has connected and drawn its button, and `attachConfig` tells the elements
9515
+ * INSIDE the boundary, never the launcher around it.
9516
+ */
9517
+ _hostWatch = null;
9518
+ _media = null;
9519
+ _lastOpen = null;
9520
+ /**
9521
+ * `connectedCallback` has run. During an UPGRADE `attributeChangedCallback` fires for
9522
+ * every authored attribute before it — `<aparte-launcher open>` server-rendered and
9523
+ * upgraded when the module loads — and announcing a toggle there tells the host its
9524
+ * chat just opened when all that happened is that the markup was read.
9525
+ */
9526
+ _ready = false;
9527
+ /** The chat is open. */
9528
+ get open() {
9529
+ return this.hasAttribute("open");
9530
+ }
9531
+ set open(value) {
9532
+ this.toggleAttribute("open", presenceOn(value));
9533
+ }
9534
+ /** True while the window is under the breakpoint, where the open chat fills it. */
9535
+ get sheet() {
9536
+ return this.hasAttribute("data-sheet");
9537
+ }
9538
+ connectedCallback() {
9539
+ if (!this.classList.contains("aparte-launcher")) this.classList.add("aparte-launcher");
9540
+ if (!this._button) {
9541
+ this._button = document.createElement("button");
9542
+ this._button.type = "button";
9543
+ this._button.addEventListener("click", this._onButtonClick);
9544
+ }
9545
+ this.appendChild(this._button);
9546
+ if (typeof MutationObserver === "function") {
9547
+ this._childWatch ??= new MutationObserver(() => this._keepButton());
9548
+ this._childWatch.observe(this, { childList: true });
9549
+ this._hostWatch ??= new MutationObserver(() => this._renderButton());
9550
+ this._hostWatch.observe(this, { attributes: true, attributeFilter: [APARTE_HOST_ATTR], subtree: true });
9551
+ }
9552
+ this.addEventListener("click", this._onClick);
9553
+ this.addEventListener("keydown", this._onKeydown);
9554
+ window.addEventListener("aparte-config-change", this._onConfigChange);
9555
+ this._watchBreakpoint();
9556
+ this._lastOpen = this.open;
9557
+ this._renderButton();
9558
+ this._ready = true;
9559
+ }
9560
+ disconnectedCallback() {
9561
+ this.removeEventListener("click", this._onClick);
9562
+ this.removeEventListener("keydown", this._onKeydown);
9563
+ window.removeEventListener("aparte-config-change", this._onConfigChange);
9564
+ this._childWatch?.disconnect();
9565
+ this._hostWatch?.disconnect();
9566
+ this._media?.removeEventListener("change", this._onMediaChange);
9567
+ this._media = null;
9568
+ this._ready = false;
9569
+ }
9570
+ attributeChangedCallback(name) {
9571
+ if (!this._ready) return;
9572
+ if (name === "breakpoint") {
9573
+ this._watchBreakpoint();
9574
+ return;
9575
+ }
9576
+ this._renderButton();
9577
+ if (name !== "open") return;
9578
+ const open = this.open;
9579
+ if (open === this._lastOpen) return;
9580
+ this._lastOpen = open;
9581
+ if (!open && this._button && this.contains(activeElementIn(this))) this._button.focus();
9582
+ this._announce();
9583
+ }
9584
+ _announce() {
9585
+ this.dispatchEvent(new CustomEvent("aparte-launcher-toggle", {
9586
+ detail: { open: this.open, sheet: this.sheet },
9587
+ bubbles: true,
9588
+ composed: true
9589
+ }));
9590
+ }
9591
+ // ─── Public API ───────────────────────────────────────────────────────
9592
+ /** Open the chat. */
9593
+ show() {
9594
+ this.open = true;
9595
+ }
9596
+ /** Close the chat. */
9597
+ close() {
9598
+ this.open = false;
9599
+ }
9600
+ /** Open the chat when it is closed, close it when it is open. */
9601
+ toggle() {
9602
+ this.open = !this.open;
9603
+ }
9604
+ // ─── Button ───────────────────────────────────────────────────────────
9605
+ /**
9606
+ * The one opening that is a person's: the composer takes the focus, since they opened the
9607
+ * chat to write. `show()` and `open` are a script's — a page restoring the state it saved,
9608
+ * a host driving `open` from its own state — and a focus that jumps on page load is
9609
+ * unasked for, and on a phone raises the keyboard over a sheet nobody pressed. An authored
9610
+ * `open` never took the focus either, so the three ways of starting open now agree.
9611
+ */
9612
+ _onButtonClick = () => {
9613
+ const opening = !this.open;
9614
+ this.toggle();
9615
+ if (opening) this._focusChat();
9616
+ };
9617
+ _onConfigChange = () => this._renderButton();
9618
+ /**
9619
+ * The config the button answers to: the chat's own when the chat inside carries an
9620
+ * instance config (a wrapper's `config` prop, `attachConfig(chat, config)`), else the
9621
+ * one at the launcher's own place — an ancestor's boundary, or the page's. The button
9622
+ * labels and draws a control of THAT chat, and the chat's boundary is below the launcher,
9623
+ * so resolving from the launcher alone read the page's locale and icons next to a chat
9624
+ * in another language. Resolved live, never kept: the boundary may arrive after connect.
9625
+ */
9626
+ _config() {
9627
+ return resolveConfig(this.querySelector(`[${APARTE_HOST_ATTR}]`) ?? this);
9628
+ }
9629
+ /**
9630
+ * The button is a child of the element, whatever was done to the children since: put
9631
+ * back at the end when something took it out. A button that is still a child stays
9632
+ * where it is, since the host may have placed it. Called on every render, and from the
9633
+ * observer for the removal that comes with no render at all.
9634
+ */
9635
+ _keepButton() {
9636
+ if (this._button && this._button.parentNode !== this) this.appendChild(this._button);
9637
+ }
9638
+ /**
9639
+ * The button, for the state it is in: the bubble (and the label, as a pill) while
9640
+ * closed, a close glyph while open. Its name comes from the locale when it shows no
9641
+ * text, and from that text when it does — a visible label the name did not contain
9642
+ * is what speech users cannot say to press it. `aria-expanded` is the disclosure's whole
9643
+ * contract: there is no `aria-controls`, since the one element it could name without
9644
+ * writing an id on the host's card is the launcher itself, the button's own ancestor.
9645
+ */
9646
+ _renderButton() {
9647
+ const button = this._button;
9648
+ if (!button) return;
9649
+ this._keepButton();
9650
+ const config = this._config();
9651
+ const locale = config.getLocale();
9652
+ const open = this.open;
9653
+ const label = open ? "" : (this.getAttribute("label") ?? "").trim();
9654
+ const shape = label ? "aparte-btn--pill" : "aparte-btn--circle";
9655
+ button.className = ["aparte-btn", "aparte-btn--primary", "aparte-btn--solid", "aparte-btn--lg", shape, "aparte-launcher__button"].join(" ");
9656
+ button.setAttribute("aria-expanded", String(open));
9657
+ if (label) button.removeAttribute("aria-label");
9658
+ else button.setAttribute("aria-label", open ? locale.launcherClose ?? "Close the chat" : locale.launcherOpen ?? "Open the chat");
9659
+ const icon = document.createElement("span");
9660
+ icon.className = "aparte-launcher__icon";
9661
+ icon.setAttribute("aria-hidden", "true");
9662
+ icon.innerHTML = open ? config.getIcon("launcherClose") ?? config.getIcon("close") : config.getIcon("launcherOpen") ?? config.getIcon("messageSquare");
9663
+ const parts = [icon];
9664
+ if (label) {
9665
+ const text = document.createElement("span");
9666
+ text.className = "aparte-launcher__label";
9667
+ text.textContent = label;
9668
+ parts.push(text);
9669
+ }
9670
+ button.replaceChildren(...parts);
9671
+ }
9672
+ // ─── Sheet ────────────────────────────────────────────────────────────
9673
+ _onMediaChange = (e) => this._applySheet(e.matches);
9674
+ /** The sheet's media query, from `breakpoint`: a length, or `none` for a card at any width. */
9675
+ _watchBreakpoint() {
9676
+ this._media?.removeEventListener("change", this._onMediaChange);
9677
+ this._media = null;
9678
+ const attr = (this.getAttribute("breakpoint") ?? "").trim();
9679
+ if (attr === "none" || typeof matchMedia !== "function") {
9680
+ this._applySheet(false);
9681
+ return;
9682
+ }
9683
+ this._media = matchMedia(attr ? `(max-width: ${attr})` : SHEET_QUERY);
9684
+ this._media.addEventListener("change", this._onMediaChange);
9685
+ this._applySheet(this._media.matches);
9686
+ }
9687
+ /**
9688
+ * An open chat that turns into a sheet now covers the page, and one that turns back no
9689
+ * longer does: announced, so a host that takes its page out of reach under the sheet
9690
+ * follows the window without a media query of its own, which would be a second copy
9691
+ * of `breakpoint` to keep in step.
9692
+ */
9693
+ _applySheet(sheet) {
9694
+ if (sheet === this.sheet) return;
9695
+ this.toggleAttribute("data-sheet", sheet);
9696
+ if (this._ready && this.open) this._announce();
9697
+ }
9698
+ // ─── Focus and keys ───────────────────────────────────────────────────
9699
+ /** What the chat lets the focus land on: yours to decide, so only what is visible. */
9700
+ _focusables() {
9701
+ return Array.from(this.querySelectorAll(FOCUSABLE)).filter((el2) => !el2.closest("[hidden]") && el2.checkVisibility?.() !== false);
9702
+ }
9703
+ /**
9704
+ * The composer when there is one — the person opened the chat to write — else the
9705
+ * first thing in the card that holds focus. The button itself never: it is what the
9706
+ * person just pressed.
9707
+ */
9708
+ _focusChat() {
9709
+ const composer = Array.from(this.querySelectorAll('[role="textbox"]:not([aria-disabled="true"])')).find((el2) => !el2.closest("[hidden]") && el2.checkVisibility?.() !== false);
9710
+ const target = composer ?? this._focusables().find((el2) => el2 !== this._button);
9711
+ target?.focus();
9712
+ }
9713
+ /** A `[data-aparte-launcher-close]` inside closes the chat — no script in your card. */
9714
+ _onClick = (e) => {
9715
+ const control = eventOrigin(e)?.closest?.("[data-aparte-launcher-close]");
9716
+ if (control && this.contains(control)) this.close();
9717
+ };
9718
+ /**
9719
+ * A modal dialog open inside the card, with the key pressed inside it. The browser
9720
+ * closes it on Escape — unless the keydown was cancelled, which is what closing the
9721
+ * launcher would do: the dialog refused its close request and the card hidden under it.
9722
+ * An engine that cannot tell a modal dialog from one opened with `show()` (no `:modal`)
9723
+ * leaves the key to the dialog, which is the answer that loses nothing.
9724
+ */
9725
+ _inModalDialog(e) {
9726
+ const dialog = eventOrigin(e)?.closest?.("dialog[open]");
9727
+ if (!dialog || !this.contains(dialog)) return false;
9728
+ try {
9729
+ return dialog.matches(":modal");
9730
+ } catch {
9731
+ return true;
9732
+ }
9733
+ }
9734
+ _onKeydown = (e) => {
9735
+ if (!this.open) return;
9736
+ if (e.key === "Escape") {
9737
+ if (e.defaultPrevented || e.isComposing || e.keyCode === 229 || this._inModalDialog(e)) return;
9738
+ e.preventDefault();
9739
+ this.close();
9740
+ return;
9741
+ }
9742
+ if (e.key !== "Tab" || !this.sheet) return;
9743
+ const focusable = this._focusables();
9744
+ if (focusable.length === 0) return;
9745
+ const first = focusable[0];
9746
+ const last = focusable[focusable.length - 1];
9747
+ const active = activeElementIn(this);
9748
+ if (e.shiftKey && active === first) {
9749
+ e.preventDefault();
9750
+ last.focus();
9751
+ } else if (!e.shiftKey && active === last) {
9752
+ e.preventDefault();
9753
+ first.focus();
9754
+ }
9755
+ };
9756
+ }
9757
+ deferHydrationOf(AparteLauncher);
9758
+ if (!customElements.get("aparte-launcher")) {
9759
+ customElements.define("aparte-launcher", AparteLauncher);
9760
+ }
9456
9761
  const APARTE_ELEMENTS = [
9457
9762
  // Chat shell + transcript
9458
9763
  ["aparte-chat", AparteChat],
@@ -9474,6 +9779,7 @@ const APARTE_ELEMENTS = [
9474
9779
  ["aparte-scroll-rail", AparteScrollRail],
9475
9780
  ["aparte-sidebar", AparteSidebar],
9476
9781
  ["aparte-split", AparteSplit],
9782
+ ["aparte-launcher", AparteLauncher],
9477
9783
  ["aparte-suggestions", AparteSuggestions],
9478
9784
  ["aparte-context", AparteContext],
9479
9785
  // Primitives
@@ -9500,7 +9806,7 @@ export {
9500
9806
  d as APARTE_DEFAULT_ICON_FALLBACKS,
9501
9807
  APARTE_DEFAULT_LOCALE,
9502
9808
  f as APARTE_DEFAULT_UI_EVENTS,
9503
- g as APARTE_HOST_ATTR,
9809
+ APARTE_HOST_ATTR,
9504
9810
  h as AparteBackendTransport,
9505
9811
  AparteChat,
9506
9812
  AparteChatBubble,
@@ -9527,6 +9833,7 @@ export {
9527
9833
  p as AparteError,
9528
9834
  AparteErrorCode,
9529
9835
  AparteIcon,
9836
+ AparteLauncher,
9530
9837
  AparteMessageRepository,
9531
9838
  AparteOptgroup,
9532
9839
  AparteOption,