@aparte/core 0.15.0 → 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.
Files changed (138) hide show
  1. package/dist/client/aparte-client.d.ts +53 -51
  2. package/dist/client/aparte-client.d.ts.map +1 -1
  3. package/dist/client/lifecycle-events.d.ts +0 -12
  4. package/dist/client/lifecycle-events.d.ts.map +1 -1
  5. package/dist/client/stream-adapter.d.ts +2 -12
  6. package/dist/client/stream-adapter.d.ts.map +1 -1
  7. package/dist/components/bubble/aparte-chat-bubble.d.ts +45 -1
  8. package/dist/components/bubble/aparte-chat-bubble.d.ts.map +1 -1
  9. package/dist/components/composer/aparte-composer-attachments.d.ts +0 -1
  10. package/dist/components/composer/aparte-composer-attachments.d.ts.map +1 -1
  11. package/dist/components/composer/aparte-composer-send.d.ts +11 -11
  12. package/dist/components/composer/aparte-composer-send.d.ts.map +1 -1
  13. package/dist/components/composer/aparte-composer.d.ts +20 -11
  14. package/dist/components/composer/aparte-composer.d.ts.map +1 -1
  15. package/dist/components/context/aparte-context.d.ts +31 -8
  16. package/dist/components/context/aparte-context.d.ts.map +1 -1
  17. package/dist/components/conversation-list/aparte-conversation-list.d.ts +93 -36
  18. package/dist/components/conversation-list/aparte-conversation-list.d.ts.map +1 -1
  19. package/dist/components/conversation-list/index.d.ts +1 -1
  20. package/dist/components/conversation-list/index.d.ts.map +1 -1
  21. package/dist/components/elicitation/aparte-elicitation.d.ts +19 -1
  22. package/dist/components/elicitation/aparte-elicitation.d.ts.map +1 -1
  23. package/dist/components/index.d.ts +7 -1
  24. package/dist/components/index.d.ts.map +1 -1
  25. package/dist/components/scroll-rail/aparte-scroll-rail.d.ts +105 -0
  26. package/dist/components/scroll-rail/aparte-scroll-rail.d.ts.map +1 -0
  27. package/dist/components/scroll-rail/index.d.ts +3 -0
  28. package/dist/components/scroll-rail/index.d.ts.map +1 -0
  29. package/dist/components/sidebar/aparte-sidebar.d.ts +186 -0
  30. package/dist/components/sidebar/aparte-sidebar.d.ts.map +1 -0
  31. package/dist/components/sidebar/index.d.ts +3 -0
  32. package/dist/components/sidebar/index.d.ts.map +1 -0
  33. package/dist/components/split/aparte-split.d.ts +354 -0
  34. package/dist/components/split/aparte-split.d.ts.map +1 -0
  35. package/dist/components/split/geometry.d.ts +65 -0
  36. package/dist/components/split/geometry.d.ts.map +1 -0
  37. package/dist/components/split/index.d.ts +3 -0
  38. package/dist/components/split/index.d.ts.map +1 -0
  39. package/dist/components/suggestions/aparte-suggestions.d.ts +7 -1
  40. package/dist/components/suggestions/aparte-suggestions.d.ts.map +1 -1
  41. package/dist/components/viewport/aparte-chat-viewport.d.ts +52 -2
  42. package/dist/components/viewport/aparte-chat-viewport.d.ts.map +1 -1
  43. package/dist/config/aparte-config.d.ts +95 -33
  44. package/dist/config/aparte-config.d.ts.map +1 -1
  45. package/dist/config/icon-provider.d.ts +6 -0
  46. package/dist/config/icon-provider.d.ts.map +1 -1
  47. package/dist/config/index.d.ts +2 -2
  48. package/dist/config/index.d.ts.map +1 -1
  49. package/dist/config/locale.d.ts +140 -27
  50. package/dist/config/locale.d.ts.map +1 -1
  51. package/dist/config/sanitize.d.ts +9 -0
  52. package/dist/config/sanitize.d.ts.map +1 -1
  53. package/dist/conversations/conversation-controller.d.ts +13 -1
  54. package/dist/conversations/conversation-controller.d.ts.map +1 -1
  55. package/dist/conversations/conversation-manager.d.ts +9 -0
  56. package/dist/conversations/conversation-manager.d.ts.map +1 -1
  57. package/dist/custom-elements.json +9838 -7333
  58. package/dist/{is-awaiting-reply-BZ_iJ3s3.js → dialog-triggers-CVCxqKg3.js} +718 -1182
  59. package/dist/dialog-triggers-CVCxqKg3.js.map +1 -0
  60. package/dist/elicitation/approval-panel.d.ts +1 -1
  61. package/dist/elicitation/approval-panel.d.ts.map +1 -1
  62. package/dist/elicitation/panel.d.ts +24 -16
  63. package/dist/elicitation/panel.d.ts.map +1 -1
  64. package/dist/elicitation/types.d.ts +31 -0
  65. package/dist/elicitation/types.d.ts.map +1 -1
  66. package/dist/generated/element-attributes.d.ts +47 -1
  67. package/dist/generated/element-attributes.d.ts.map +1 -1
  68. package/dist/{glyphs-B3BZ2TIb.js → glyphs-DQTeOj4w.js} +22 -13
  69. package/dist/{glyphs-B3BZ2TIb.js.map → glyphs-DQTeOj4w.js.map} +1 -1
  70. package/dist/host/aparte-chat-host.d.ts +10 -2
  71. package/dist/host/aparte-chat-host.d.ts.map +1 -1
  72. package/dist/icons/extended.d.ts +4 -2
  73. package/dist/icons/extended.d.ts.map +1 -1
  74. package/dist/icons/glyphs.d.ts +9 -0
  75. package/dist/icons/glyphs.d.ts.map +1 -1
  76. package/dist/icons.js +16 -15
  77. package/dist/icons.js.map +1 -1
  78. package/dist/index.css +1217 -396
  79. package/dist/index.d.ts +26 -15
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +2097 -295
  82. package/dist/index.js.map +1 -1
  83. package/dist/index.node.d.ts +21 -5
  84. package/dist/index.node.d.ts.map +1 -1
  85. package/dist/index.node.js +39 -34
  86. package/dist/index.node.js.map +1 -1
  87. package/dist/interop/dialog-triggers.d.ts +27 -0
  88. package/dist/interop/dialog-triggers.d.ts.map +1 -0
  89. package/dist/interop/element-props.d.ts +16 -8
  90. package/dist/interop/element-props.d.ts.map +1 -1
  91. package/dist/parsers/aparte-stream-parser.d.ts +52 -22
  92. package/dist/parsers/aparte-stream-parser.d.ts.map +1 -1
  93. package/dist/parsers/index.d.ts +1 -1
  94. package/dist/parsers/index.d.ts.map +1 -1
  95. package/dist/primitives/select/aparte-select.d.ts.map +1 -1
  96. package/dist/renderers/segment-renderers.d.ts.map +1 -1
  97. package/dist/renderers/segments/code.d.ts.map +1 -1
  98. package/dist/renderers/segments/tool-call.d.ts.map +1 -1
  99. package/dist/runtime/message-repository.d.ts.map +1 -1
  100. package/dist/transport/backend-handler.d.ts.map +1 -1
  101. package/dist/transport/backend-transport.d.ts +6 -1
  102. package/dist/transport/backend-transport.d.ts.map +1 -1
  103. package/dist/types/chat.d.ts +8 -14
  104. package/dist/types/chat.d.ts.map +1 -1
  105. package/dist/types/element-map.d.ts +54 -4
  106. package/dist/types/element-map.d.ts.map +1 -1
  107. package/dist/types/event-map.d.ts +16 -10
  108. package/dist/types/event-map.d.ts.map +1 -1
  109. package/dist/types/events.d.ts +59 -117
  110. package/dist/types/events.d.ts.map +1 -1
  111. package/dist/types/imperative-api.d.ts +3 -1
  112. package/dist/types/imperative-api.d.ts.map +1 -1
  113. package/dist/types/index.d.ts +5 -4
  114. package/dist/types/index.d.ts.map +1 -1
  115. package/dist/types/models.d.ts +11 -31
  116. package/dist/types/models.d.ts.map +1 -1
  117. package/dist/types/segments.d.ts +11 -47
  118. package/dist/types/segments.d.ts.map +1 -1
  119. package/dist/types/stream-blocks.d.ts +57 -0
  120. package/dist/types/stream-blocks.d.ts.map +1 -0
  121. package/dist/types/tools.d.ts +57 -0
  122. package/dist/types/tools.d.ts.map +1 -1
  123. package/dist/utils/copy-text.d.ts +24 -0
  124. package/dist/utils/copy-text.d.ts.map +1 -0
  125. package/dist/utils/css-escape.d.ts +5 -0
  126. package/dist/utils/css-escape.d.ts.map +1 -1
  127. package/dist/utils/tool-input.d.ts +20 -0
  128. package/dist/utils/tool-input.d.ts.map +1 -0
  129. package/package.json +10 -3
  130. package/dist/is-awaiting-reply-BZ_iJ3s3.js.map +0 -1
  131. package/dist/renderers/segments/artifact/binary-file.d.ts +0 -45
  132. package/dist/renderers/segments/artifact/binary-file.d.ts.map +0 -1
  133. package/dist/renderers/segments/artifact/card.d.ts +0 -3
  134. package/dist/renderers/segments/artifact/card.d.ts.map +0 -1
  135. package/dist/renderers/segments/artifact/preview-document.d.ts +0 -27
  136. package/dist/renderers/segments/artifact/preview-document.d.ts.map +0 -1
  137. package/dist/renderers/segments/artifact/shared.d.ts +0 -29
  138. package/dist/renderers/segments/artifact/shared.d.ts.map +0 -1
@@ -15,11 +15,16 @@
15
15
  * TypeScript consumers fully typed on the server; `registerAllComponents()` is a
16
16
  * no-op here (there is nothing to register without a DOM).
17
17
  */
18
- export type { AparteBubbleRole, AparteMessage, AparteContentParser, AparteSendEventDetail, AparteViewportConfig, AparteInputConfig, AparteThemeVariables, AparteStatus, AparteAttachment, AparteMessageBranch, AparteBubbleActionsConfig, AparteBubbleActionName, AparteSegment, AparteSegmentType, AparteTextSegment, AparteThinkingSegment, AparteCodeSegment, AparteSegmentRenderer, AparteCustomSegment, AparteToolCallSegment, AparteArtifactSegment, AparteSegmentBase, AparteSegmentDefaults, AparteSegmentTiming, AparteErrorSegment, AparteSegmentUpdateEventDetail, AparteAIProvider, AparteAIModel, AparteAIProviderConfigField, AparteAIProviderConfigSchema, AparteModelConfig, ModelStatus, ModelLoadProgress, AparteModelChangeEventDetail, AparteMessageDoneEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessageAbortedEventDetail, AparteAbortEventDetail, AparteCompactEventDetail, AparteCompactDoneEventDetail, AparteCompactErrorEventDetail, AparteAttachmentPreviewEventDetail, AparteFileGenReadyEventDetail, AparteFileGenErrorEventDetail, AparteMessageInfoEventDetail, AparteSiblingInfo, AparteBranchNavigateEventDetail, ApartePathChangedEventDetail, AparteRetryEventDetail, AparteEditEventDetail, AparteFeedbackEventDetail, AparteActionEventDetail, AparteArtifactStartEventDetail, AparteArtifactDeltaEventDetail, AparteArtifactReadyEventDetail, AparteArtifactRedownloadEventDetail, AparteChatRequest, AparteChatResponse, AparteChatMessage, AparteContentPart, AparteTextPart, AparteImagePart, AparteFilePart, AparteStreamEvent, AparteStreamEventMap, AparteUsage, AparteTool, AparteToolCall, AparteToolResult, AparteToolHandler, AparteToolContext, AparteToolRenderer, AparteToolApprovalRequestDetail, AparteChatImperativeApi, AparteElementAttributes, AparteElementTagName, AparteAttrValue, AparteTemplateAttrs, AparteNoAttributes, AparteChatAttributes, AparteChatViewportAttributes, AparteChatBubbleAttributes, AparteChatStatusAttributes, AparteComposerAttributes, AparteComposerInputAttributes, AparteComposerActionAttributes, AparteComposerAddAttachmentAttributes, AparteComposerToolbarAttributes, AparteConversationListAttributes, AparteSelectAttributes, AparteOptionAttributes, AparteOptgroupAttributes, AparteProgressSpinnerAttributes, } from './types/index.js';
18
+ 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, AparteAbortEventDetail, AparteCompactEventDetail, AparteCompactDoneEventDetail, AparteCompactStartEventDetail, AparteCompactErrorEventDetail, AparteAttachmentPreviewEventDetail, AparteLinkClickEventDetail, AparteMessageInfoEventDetail, AparteSiblingInfo, AparteBranchNavigateEventDetail, ApartePathChangedEventDetail, AparteRetryEventDetail, AparteEditEventDetail, AparteFeedbackEventDetail, AparteActionEventDetail, AparteChatRequest, AparteChatResponse, AparteChatMessage, AparteContentPart, AparteTextPart, AparteImagePart, AparteFilePart, AparteStreamEvent, AparteStreamEventMap, AparteUsage, AparteTool, AparteToolCall, AparteApprovalPolicy, AparteApprovalRuling, AparteToolResult, AparteToolHandler, AparteToolContext, AparteToolRenderer, AparteToolApprovalRequestDetail, AparteChatImperativeApi, AparteElementAttributes, AparteElementTagName, AparteAttrValue, AparteTemplateAttrs, AparteNoAttributes, AparteChatAttributes, AparteChatViewportAttributes, AparteChatBubbleAttributes, AparteChatStatusAttributes, AparteComposerAttributes, AparteComposerInputAttributes, AparteComposerActionAttributes, AparteComposerAddAttachmentAttributes, AparteComposerToolbarAttributes, AparteConversationListAttributes, AparteSelectAttributes, AparteOptionAttributes, AparteOptgroupAttributes, AparteProgressSpinnerAttributes, } from './types/index.js';
19
19
  export { AparteErrorCode, AparteError, contentToText } from './types/index.js';
20
+ export type { AparteChat, AparteChatBubble, AparteChatViewport, AparteChatStatus, AparteComposer, AparteComposerInput, AparteComposerSend, AparteComposerCancel, AparteComposerAttachments, AparteComposerAddAttachment, AparteComposerAction, AparteComposerToolbar, AparteSuggestions, AparteContext, AparteConversationList, AparteScrollRail, AparteSidebar, AparteSplit, } from './components/index.js';
21
+ export type { AparteScrollRailJumpDetail, AparteScrollRailEvery, AparteSidebarToggleDetail } from './components/index.js';
22
+ export type { AparteSplitResizeDetail } from './components/index.js';
23
+ export type { AparteElicitation } from './components/elicitation/aparte-elicitation.js';
24
+ export type { AparteSelect, AparteOption, AparteOptgroup, AparteIcon, AparteProgressSpinner } from './primitives/index.js';
20
25
  export type { AparteSelectChangeDetail, AparteOptgroupToggleEventDetail } from './primitives/index.js';
21
26
  export type { SyncableBubble, AparteComposerEventMap, AparteComposerEventType, AparteComposerState, AparteComposerChangeEventDetail, AparteComposerPanelMode, AparteActionClickEventDetail } from './components/index.js';
22
- export type { AparteConversationListItem, AparteConversationSelectDetail, AparteConversationDeleteDetail, AparteConversationArchiveDetail } from './components/index.js';
27
+ export type { AparteConversationListItem, AparteConversationSelectDetail, AparteConversationDeleteDetail, AparteConversationArchiveDetail, AparteConversationPinDetail, AparteConversationRenameDetail } from './components/index.js';
23
28
  export type { AparteSuggestion, AparteSuggestionEventDetail } from './components/index.js';
24
29
  export type { AparteContextLevel, AparteContextThresholdEventDetail } from './components/index.js';
25
30
  export { registerSegmentRenderer, unregisterSegmentRenderer, getSegmentRenderer, collectRendererStyles, registerDefaultRenderers, installDefaultRenderersOnce, declineDefaultRenderers, getAllRenderers, } from './renderers/index.js';
@@ -29,7 +34,7 @@ export { APARTE_CONVERSATION_SCHEMA_VERSION } from './conversations/index.js';
29
34
  export { AparteConversationManager, type ConversationManagerOptions } from './conversations/index.js';
30
35
  export { AparteConversationController, type AparteChatBinding, type AparteConversationControllerOptions, } from './conversations/index.js';
31
36
  export { AparteChatHost, type AparteChatHostBinding, type AparteChatHostOptions, } from './host/index.js';
32
- export { AparteStreamParser, parseMarkdownToSegments, deriveArtifactKind, parseAparteEventStream } from './parsers/index.js';
37
+ export { AparteStreamParser, parseMarkdownToSegments, parseAparteEventStream } from './parsers/index.js';
33
38
  export type { AparteStreamParserOptions, AparteThinkingDelimiterPair, AparteParserState, AparteParserResult } from './parsers/index.js';
34
39
  export { AparteDirectTransport, AparteBackendTransport, createAparteChatHandler, isFormatAdapter } from './transport/index.js';
35
40
  export type { AparteTransport, AparteTransportContext, AparteFormatAdapter, AparteVendorRequest, BackendTransportOptions, DirectTransportOptions, AparteChatHandlerOptions, } from './transport/index.js';
@@ -38,10 +43,10 @@ export type { AparteConfigChangeEventDetail } from './config/index.js';
38
43
  export { resolveConfig, attachConfig, detachConfig, runWithConfig, contextConfig, APARTE_HOST_ATTR } from './config/index.js';
39
44
  export { subscribeConfigChange, APARTE_CONFIG_CHANGE } from './config/index.js';
40
45
  export type { AparteConfigAware } from './config/index.js';
41
- export type { AparteMarkdownProvider, AparteStreamingMarkdownProvider, AparteStreamingMarkdownRenderer, AparteHighlightProvider, AparteSystemPromptVarsProvider, AparteLocale, AparteAction, AparteActionZone, AparteIconProvider, AparteIconName, AparteAvatarProvider, AparteStatusRenderer, AparteErrorRenderer, AparteAttachmentRenderer, AparteElicitationFieldRenderer, AparteElicitationFieldContext, AparteElicitationFieldControl, AparteSiblingNavRenderer, AparteBubbleShellRenderer, AparteModelPreference, AparteModelPreferenceProvider, AparteArtifactPreviewBuilder, AparteSanitizer, } from './config/index.js';
46
+ export type { AparteMarkdownProvider, AparteStreamingMarkdownProvider, AparteStreamingMarkdownRenderer, AparteHighlightProvider, AparteSystemPromptVarsProvider, AparteLocale, AparteLocaleExtensions, AparteAction, AparteActionZone, AparteIconProvider, AparteIconName, AparteAvatarProvider, AparteStatusRenderer, AparteErrorRenderer, AparteAttachmentRenderer, AparteElicitationFieldRenderer, AparteElicitationFieldContext, AparteElicitationFieldControl, AparteSiblingNavRenderer, AparteBubbleShellRenderer, AparteModelPreference, AparteModelPreferenceProvider, AparteSanitizer, } from './config/index.js';
42
47
  export { APARTE_DEFAULT_ICON_FALLBACKS, APARTE_DEFAULT_LOCALE, defaultSanitizer, isSafeUrl } from './config/index.js';
43
48
  export { AparteClient } from './client/aparte-client.js';
44
- export type { AparteClientOptions, AparteToolApprovalResolver, AparteCompactionSelector } from './client/aparte-client.js';
49
+ export type { AparteClientOptions, AparteToolApprovalResolver } from './client/aparte-client.js';
45
50
  export { createStreamAdapter, readableToAsyncIterable } from './client/stream-adapter.js';
46
51
  export type { AparteStreamRunEvent, AparteStreamRunEmitter, StreamAdapterTarget, CreateStreamAdapterOptions, AparteStreamRunner, AparteStreamRunOptions } from './client/stream-adapter.js';
47
52
  export { AparteMessageRepository } from './runtime/message-repository.js';
@@ -55,6 +60,7 @@ export { isAwaitingReply } from './utils/is-awaiting-reply.js';
55
60
  export { escapeHtml, escapeAttr } from './utils/escape.js';
56
61
  export { cssEscape } from './utils/css-escape.js';
57
62
  export { uuid } from './utils/uuid.js';
63
+ export { copyText } from './utils/copy-text.js';
58
64
  export { isSegmentSettled, segmentTiming, segmentDuration } from './utils/segments.js';
59
65
  export type { AparteHostHandlersConfig } from './types/models.js';
60
66
  export type { AparteKeyProvider } from './config/aparte-config.js';
@@ -64,6 +70,16 @@ export type { AparteElicitationSchema, AparteElicitationField, AparteElicitation
64
70
  * No-op on the server: custom elements only exist in the browser, where the
65
71
  * real `index.ts` registers them at import time. Wrappers can call this
66
72
  * unconditionally without a `typeof window` guard.
73
+ *
74
+ * With ONE thing to say. A `customElements` here means a DOM is present and this
75
+ * DOM-free entry was still the one that resolved — which is a test runner: vitest,
76
+ * jest and friends run on Node, so they take the `node` export condition, and jsdom
77
+ * then supplies the registry. Nothing upgrades, `<aparte-chat>` stays an
78
+ * `HTMLElement`, and every assertion about an element's own properties fails for a
79
+ * reason nothing on the page explains. The escape is `@aparte/core/browser`, which is
80
+ * why that entry exists; before it, the only way out was to reach into this package's
81
+ * `src/`. One warning, not a throw: the environment is legal, only surprising.
67
82
  */
68
83
  export declare function registerAllComponents(): void;
84
+ export { installDialogTriggersOnce } from './interop/dialog-triggers.js';
69
85
  //# sourceMappingURL=index.node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../src/index.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,YAAY,EACR,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EAOrB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAIlB,8BAA8B,EAC9B,gBAAgB,EAChB,aAAa,EACb,2BAA2B,EAC3B,4BAA4B,EAC5B,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,4BAA4B,EAC5B,4BAA4B,EAC5B,6BAA6B,EAC7B,6BAA6B,EAC7B,+BAA+B,EAC/B,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,kCAAkC,EAClC,6BAA6B,EAC7B,6BAA6B,EAC7B,4BAA4B,EAC5B,iBAAiB,EACjB,+BAA+B,EAC/B,4BAA4B,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AAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAIvF,YAAY,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAClE,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,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;AAEhC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAS5C;AAED,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -1,6 +1,10 @@
1
- import { A, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4 } from "./is-awaiting-reply-BZ_iJ3s3.js";
2
- import { deriveArtifactKind } from "@aparte/engine";
1
+ import { A, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6 } from "./dialog-triggers-CVCxqKg3.js";
3
2
  function registerAllComponents() {
3
+ if (typeof customElements !== "undefined") {
4
+ console.warn(
5
+ "[aparte] A DOM is present but '@aparte/core' resolved to its DOM-free Node entry, so no <aparte-*> element will upgrade. Test runners hit this: they run on Node, so they take the 'node' export condition. Point your runner at '@aparte/core/browser' (vitest: test.alias { '@aparte/core': '@aparte/core/browser' })."
6
+ );
7
+ }
4
8
  }
5
9
  export {
6
10
  A as APARTE_CONFIG_CHANGE,
@@ -31,38 +35,39 @@ export {
31
35
  y as collectRendererStyles,
32
36
  z as contentToText,
33
37
  B as contextConfig,
34
- C as createAparteChatHandler,
35
- D as createStreamAdapter,
36
- E as cssEscape,
37
- F as declineDefaultRenderers,
38
- G as defaultSanitizer,
39
- deriveArtifactKind,
40
- H as detachConfig,
41
- I as escapeAttr,
42
- J as escapeHtml,
43
- K as filesToAttachments,
44
- L as getAllRenderers,
45
- M as getSegmentRenderer,
46
- N as installDefaultRenderersOnce,
47
- O as isAwaitingReply,
48
- P as isFormatAdapter,
49
- Q as isSafeUrl,
50
- R as isSegmentSettled,
51
- S as parseAparteEventStream,
52
- T as parseMarkdownToSegments,
53
- U as populateBubbleFromMessage,
54
- V as readableToAsyncIterable,
38
+ C as copyText,
39
+ D as createAparteChatHandler,
40
+ E as createStreamAdapter,
41
+ F as cssEscape,
42
+ G as declineDefaultRenderers,
43
+ H as defaultSanitizer,
44
+ I as detachConfig,
45
+ J as escapeAttr,
46
+ K as escapeHtml,
47
+ L as filesToAttachments,
48
+ M as getAllRenderers,
49
+ N as getSegmentRenderer,
50
+ O as installDefaultRenderersOnce,
51
+ P as installDialogTriggersOnce,
52
+ Q as isAwaitingReply,
53
+ R as isFormatAdapter,
54
+ S as isSafeUrl,
55
+ T as isSegmentSettled,
56
+ U as parseAparteEventStream,
57
+ V as parseMarkdownToSegments,
58
+ W as populateBubbleFromMessage,
59
+ X as readableToAsyncIterable,
55
60
  registerAllComponents,
56
- W as registerDefaultRenderers,
57
- X as registerSegmentRenderer,
58
- Y as requestUserInput,
59
- Z as resolveConfig,
60
- _ as revokeAttachmentUrls,
61
- $ as runWithConfig,
62
- a0 as segmentDuration,
63
- a1 as segmentTiming,
64
- a2 as subscribeConfigChange,
65
- a3 as unregisterSegmentRenderer,
66
- a4 as uuid
61
+ Y as registerDefaultRenderers,
62
+ Z as registerSegmentRenderer,
63
+ _ as requestUserInput,
64
+ $ as resolveConfig,
65
+ a0 as revokeAttachmentUrls,
66
+ a1 as runWithConfig,
67
+ a2 as segmentDuration,
68
+ a3 as segmentTiming,
69
+ a4 as subscribeConfigChange,
70
+ a5 as unregisterSegmentRenderer,
71
+ a6 as uuid
67
72
  };
68
73
  //# sourceMappingURL=index.node.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.node.js","sources":["../src/index.node.ts"],"sourcesContent":["/**\n * @aparte/core — Node.js / SSR-safe entry point.\n *\n * Resolved via the `node` export condition, so `import '@aparte/core'` in Node\n * (Next.js / Nuxt / Angular Universal / SvelteKit server, tsx, CLI tools) loads\n * THIS module instead of the browser entry. It exposes the same public API\n * surface MINUS the Web Components and CSS side-effects — importing the real\n * `index.ts` in Node throws `HTMLElement is not defined` because the custom\n * elements extend `HTMLElement` at module scope.\n *\n * Everything re-exported here is DOM-free at import time. Custom-element CLASSES\n * (AparteChatBubble, AparteComposer*, AparteSelect, …) are intentionally NOT exported\n * as runtime values — they only exist in the browser build. Their TYPES are\n * re-exported (types are erased, so they never pull DOM at runtime), which keeps\n * TypeScript consumers fully typed on the server; `registerAllComponents()` is a\n * no-op here (there is nothing to register without a DOM).\n */\n\n// ── Types (erased at runtime — always safe, mirror index.ts) ────────────────\nexport type {\n AparteBubbleRole,\n AparteMessage,\n AparteContentParser,\n AparteSendEventDetail,\n AparteViewportConfig,\n AparteInputConfig,\n AparteThemeVariables,\n AparteStatus,\n AparteAttachment,\n AparteMessageBranch,\n AparteBubbleActionsConfig,\n AparteBubbleActionName,\n AparteSegment,\n AparteSegmentType,\n AparteTextSegment,\n AparteThinkingSegment,\n AparteCodeSegment,\n AparteSegmentRenderer,\n AparteCustomSegment,\n AparteToolCallSegment,\n AparteArtifactSegment,\n // The same five the browser barrel gained, and they belong here for the same reason:\n // a type has no DOM. `AparteSegmentBase` is the constraint on the exported\n // `AparteSegmentRenderer<T>`, so an SSR consumer writing a renderer for a segment type\n // of its own could not name what it extends. `check:node-barrel-types` is what caught\n // the omission — the browser barrel alone would have compiled fine and failed on the\n // `node` condition only.\n AparteSegmentBase,\n AparteSegmentDefaults,\n AparteSegmentTiming,\n AparteErrorSegment,\n // The detail of the `aparte-segment-update` event. It reached types/index.ts and\n // stopped there — and types/index.ts is not an entry point, so a consumer could\n // bind the event (it is in the published event table) and never name its detail.\n AparteSegmentUpdateEventDetail,\n AparteAIProvider,\n AparteAIModel,\n AparteAIProviderConfigField,\n AparteAIProviderConfigSchema,\n AparteModelConfig,\n ModelStatus,\n ModelLoadProgress,\n AparteModelChangeEventDetail,\n AparteMessageDoneEventDetail,\n AparteMessageStartEventDetail,\n AparteMessageErrorEventDetail,\n AparteMessageAbortedEventDetail,\n AparteAbortEventDetail,\n AparteCompactEventDetail,\n AparteCompactDoneEventDetail,\n AparteCompactErrorEventDetail,\n AparteAttachmentPreviewEventDetail,\n AparteFileGenReadyEventDetail,\n AparteFileGenErrorEventDetail,\n AparteMessageInfoEventDetail,\n AparteSiblingInfo,\n AparteBranchNavigateEventDetail,\n ApartePathChangedEventDetail,\n AparteRetryEventDetail,\n AparteEditEventDetail,\n AparteFeedbackEventDetail,\n AparteActionEventDetail,\n AparteArtifactStartEventDetail,\n AparteArtifactDeltaEventDetail,\n AparteArtifactReadyEventDetail,\n AparteArtifactRedownloadEventDetail,\n AparteChatRequest,\n AparteChatResponse,\n AparteChatMessage,\n AparteContentPart,\n AparteTextPart,\n AparteImagePart,\n AparteFilePart,\n AparteStreamEvent,\n AparteStreamEventMap,\n AparteUsage,\n AparteTool,\n AparteToolCall,\n AparteToolResult,\n AparteToolHandler,\n AparteToolContext,\n AparteToolRenderer,\n AparteToolApprovalRequestDetail,\n AparteChatImperativeApi,\n AparteElementAttributes,\n AparteElementTagName,\n AparteAttrValue,\n AparteTemplateAttrs,\n AparteNoAttributes,\n AparteChatAttributes,\n AparteChatViewportAttributes,\n AparteChatBubbleAttributes,\n AparteChatStatusAttributes,\n AparteComposerAttributes,\n AparteComposerInputAttributes,\n AparteComposerActionAttributes,\n AparteComposerAddAttachmentAttributes,\n AparteComposerToolbarAttributes,\n AparteConversationListAttributes,\n AparteSelectAttributes,\n AparteOptionAttributes,\n AparteOptgroupAttributes,\n AparteProgressSpinnerAttributes,\n} from './types/index.js';\nexport { AparteErrorCode, AparteError, contentToText } from './types/index.js';\n\n// Custom-element TYPES (erased) — keep server consumers fully typed.\nexport type { AparteSelectChangeDetail, AparteOptgroupToggleEventDetail } from './primitives/index.js';\nexport type { SyncableBubble, AparteComposerEventMap, AparteComposerEventType, AparteComposerState, AparteComposerChangeEventDetail, AparteComposerPanelMode, AparteActionClickEventDetail } from './components/index.js';\nexport type { AparteConversationListItem, AparteConversationSelectDetail, AparteConversationDeleteDetail, AparteConversationArchiveDetail } from './components/index.js';\nexport type { AparteSuggestion, AparteSuggestionEventDetail } from './components/index.js';\nexport type { AparteContextLevel, AparteContextThresholdEventDetail } from './components/index.js';\n\n// ── Renderers (produce HTML strings; DOM-free at import) ────────────────────\nexport {\n registerSegmentRenderer,\n unregisterSegmentRenderer,\n getSegmentRenderer,\n collectRendererStyles,\n registerDefaultRenderers,\n installDefaultRenderersOnce,\n declineDefaultRenderers,\n getAllRenderers,\n} from './renderers/index.js';\n\n// `populateBubbleFromMessage` is a plain helper — import it from its own module,\n// NOT the components barrel (which would pull in the HTMLElement classes).\nexport { populateBubbleFromMessage } from './components/bubble/bubble-sync.js';\n\n// ── Conversations (types, adapter contract, manager, controller) ────────────\nexport type {\n AparteConversation,\n AparteConversationMeta,\n AparteStorageAdapter,\n AparteAttachmentRow,\n} from './conversations/index.js';\nexport { APARTE_CONVERSATION_SCHEMA_VERSION } from './conversations/index.js';\nexport { AparteConversationManager, type ConversationManagerOptions } from './conversations/index.js';\nexport {\n AparteConversationController,\n type AparteChatBinding,\n type AparteConversationControllerOptions,\n} from './conversations/index.js';\n\n// ── Framework-agnostic chat-host orchestrator (every wrapper binds to it) ───\nexport {\n AparteChatHost,\n type AparteChatHostBinding,\n type AparteChatHostOptions,\n} from './host/index.js';\n\n// ── Parsers ─────────────────────────────────────────────────────────────────\nexport { AparteStreamParser, parseMarkdownToSegments, deriveArtifactKind, parseAparteEventStream } from './parsers/index.js';\nexport type { AparteStreamParserOptions, AparteThinkingDelimiterPair, AparteParserState, AparteParserResult } from './parsers/index.js';\n\n// Transport seam — DOM-free (fetch-based), so the whole seam is SSR-safe. The\n// server-side `/api/chat` handler AND both client transports live here; a browser\n// never runs the handler, and the transports touch no DOM at import. Mirrored in\n// full so a wrapper barrel re-exporting a transport can't crash under SSR.\nexport { AparteDirectTransport, AparteBackendTransport, createAparteChatHandler, isFormatAdapter } from './transport/index.js';\nexport type {\n AparteTransport,\n AparteTransportContext,\n AparteFormatAdapter,\n AparteVendorRequest,\n BackendTransportOptions,\n DirectTransportOptions,\n AparteChatHandlerOptions,\n} from './transport/index.js';\n\n// ── Config ──────────────────────────────────────────────────────────────────\nexport { aparteGlobalConfig, AparteConfig, APARTE_DEFAULT_BUBBLE_ACTIONS, APARTE_DEFAULT_HOST_HANDLERS } from './config/index.js';\nexport type { AparteConfigChangeEventDetail } from './config/index.js';\nexport { resolveConfig, attachConfig, detachConfig, runWithConfig, contextConfig, APARTE_HOST_ATTR } from './config/index.js';\nexport { subscribeConfigChange, APARTE_CONFIG_CHANGE } from './config/index.js';\nexport type { AparteConfigAware } from './config/index.js';\nexport type {\n AparteMarkdownProvider,\n AparteStreamingMarkdownProvider,\n AparteStreamingMarkdownRenderer,\n AparteHighlightProvider,\n AparteSystemPromptVarsProvider,\n AparteLocale,\n AparteAction,\n AparteActionZone,\n AparteIconProvider,\n AparteIconName,\n AparteAvatarProvider,\n AparteStatusRenderer,\n AparteErrorRenderer,\n AparteAttachmentRenderer,\n AparteElicitationFieldRenderer,\n AparteElicitationFieldContext,\n AparteElicitationFieldControl,\n AparteSiblingNavRenderer,\n AparteBubbleShellRenderer,\n AparteModelPreference,\n AparteModelPreferenceProvider,\n AparteArtifactPreviewBuilder,\n AparteSanitizer,\n} from './config/index.js';\nexport { APARTE_DEFAULT_ICON_FALLBACKS, APARTE_DEFAULT_LOCALE, defaultSanitizer, isSafeUrl } from './config/index.js';\n\n// ── Client + runtime ─────────────────────────────────────────────────────────\nexport { AparteClient } from './client/aparte-client.js';\nexport type { AparteClientOptions, AparteToolApprovalResolver, AparteCompactionSelector } from './client/aparte-client.js';\nexport { createStreamAdapter, readableToAsyncIterable } from './client/stream-adapter.js';\nexport type { AparteStreamRunEvent, AparteStreamRunEmitter, StreamAdapterTarget, CreateStreamAdapterOptions, AparteStreamRunner, AparteStreamRunOptions } from './client/stream-adapter.js';\nexport { AparteMessageRepository } from './runtime/message-repository.js';\nexport type { ExportedMessageRepository } from './runtime/message-repository.js';\n\n// ── Wrapper interop (DOM-free helpers the four wrappers' AparteUi value-imports) ─\n// `applyElementProps`/`APARTE_DEFAULT_UI_EVENTS` are pure (a string array + a function that\n// only touches its `HTMLElement` argument when CALLED, never at import). They MUST be\n// on the Node surface: every wrapper barrel re-exports `AparteUi`, which value-imports\n// these two — omit them here and any SSR toolchain resolving the `node` condition\n// crashes the whole barrel with \"does not provide an export named 'applyElementProps'\".\nexport { applyElementProps, APARTE_DEFAULT_UI_EVENTS } from './interop/element-props.js';\n// A type, so it costs nothing here and its absence WAS a compile error for an SSR\n// consumer — `check:node-barrel-types` caught it the moment the browser barrel gained it.\nexport type { AparteUiEventName } from './interop/element-props.js';\n// Same rule: DOM-free at import (it only reaches for `URL.createObjectURL` when\n// CALLED, which is a browser-side concern), so it belongs on the SSR surface too.\nexport { filesToAttachments, revokeAttachmentUrls } from './utils/files-to-attachments.js';\n\n/*\n * The global type augmentations, which only the BROWSER entry pulled in.\n *\n * TypeScript applies the `node` export condition under `moduleResolution: node16`\n * / `nodenext`, so a consumer in that mode resolves `index.node.d.ts` — and\n * silently lost typed `e.detail` on every aparté event and typed\n * `querySelector('aparte-…')`. Not a runtime concern and not an SSR hazard: both\n * modules are `import type` throughout, so nothing is emitted and no DOM global is\n * touched. `check:node-barrel-types` diffed export NAMES, which an augmentation\n * has none of, so it saw nothing.\n */\nimport './types/event-map.js';\nimport './types/element-map.js';\n// Is a message waiting for a reply? Shared by the viewport, the four wrappers and\n// any consumer rendering its own bubble — one rule, so they can't disagree.\nexport { isAwaitingReply } from './utils/is-awaiting-reply.js';\nexport { escapeHtml, escapeAttr } from './utils/escape.js';\n// Same reasoning as the browser barrel: the gate script and the customization\n// guide both tell a renderer author to use `cssEscape` for a selector, so it has to\n// be importable. It touches no DOM, so the SSR barrel carries it too.\nexport { cssEscape } from './utils/css-escape.js';\nexport { uuid } from './utils/uuid.js';\n// Pure and DOM-free, so the SSR barrel carries it too — and that is the point: a\n// consumer can assert their own duration logic in Node, with no browser.\nexport { isSegmentSettled, segmentTiming, segmentDuration } from './utils/segments.js';\n// The PARAMETER types of two documented setters. They existed and were the declared\n// argument types, but were not exported — so anyone typing a settings layer over\n// `setHostHandlers` / `setKeyProvider` had to re-declare the shape by hand.\nexport type { AparteHostHandlersConfig } from './types/models.js';\nexport type { AparteKeyProvider } from './config/aparte-config.js';\n\n// Elicitation (human-in-the-loop typed input) — DOM-free at import.\nexport { requestUserInput, buildElicitationPanel, buildApprovalPanel, AparteElicitationAbortError } from './elicitation/index.js';\nexport type {\n AparteElicitationSchema,\n AparteElicitationField,\n AparteElicitationEnumField,\n AparteElicitationBooleanField,\n AparteElicitationStringField,\n AparteElicitationObjectSchema,\n AparteElicitationRequest,\n AparteElicitationResult,\n AparteElicitationPresenter,\n AparteApprovalOption,\n AparteApprovalAnswer,\n BuiltApprovalPanel,\n BuiltElicitationPanel,\n} from './elicitation/index.js';\n\n/**\n * No-op on the server: custom elements only exist in the browser, where the\n * real `index.ts` registers them at import time. Wrappers can call this\n * unconditionally without a `typeof window` guard.\n */\nexport function registerAllComponents(): void {\n /* browser-only — nothing to register without a DOM */\n}\n"],"names":[],"mappings":";;AA2SO,SAAS,wBAA8B;AAE9C;"}
1
+ {"version":3,"file":"index.node.js","sources":["../src/index.node.ts"],"sourcesContent":["/**\n * @aparte/core — Node.js / SSR-safe entry point.\n *\n * Resolved via the `node` export condition, so `import '@aparte/core'` in Node\n * (Next.js / Nuxt / Angular Universal / SvelteKit server, tsx, CLI tools) loads\n * THIS module instead of the browser entry. It exposes the same public API\n * surface MINUS the Web Components and CSS side-effects — importing the real\n * `index.ts` in Node throws `HTMLElement is not defined` because the custom\n * elements extend `HTMLElement` at module scope.\n *\n * Everything re-exported here is DOM-free at import time. Custom-element CLASSES\n * (AparteChatBubble, AparteComposer*, AparteSelect, …) are intentionally NOT exported\n * as runtime values — they only exist in the browser build. Their TYPES are\n * re-exported (types are erased, so they never pull DOM at runtime), which keeps\n * TypeScript consumers fully typed on the server; `registerAllComponents()` is a\n * no-op here (there is nothing to register without a DOM).\n */\n\n// ── Types (erased at runtime — always safe, mirror index.ts) ────────────────\nexport type {\n AparteBubbleRole,\n AparteMessage,\n AparteContentParser,\n AparteStreamBlock,\n AparteStreamBlockMatch,\n AparteSendEventDetail,\n AparteViewportConfig,\n AparteInputConfig,\n AparteThemeVariables,\n AparteStatus,\n AparteAttachment,\n AparteMessageBranch,\n AparteBubbleActionsConfig,\n AparteBubbleActionName,\n AparteSegment,\n AparteSegmentType,\n AparteTextSegment,\n AparteThinkingSegment,\n AparteCodeSegment,\n AparteSegmentRenderer,\n AparteCustomSegment,\n AparteToolCallSegment,\n // The same five the browser barrel gained, and they belong here for the same reason:\n // a type has no DOM. `AparteSegmentBase` is the constraint on the exported\n // `AparteSegmentRenderer<T>`, so an SSR consumer writing a renderer for a segment type\n // of its own could not name what it extends. `check:node-barrel-types` is what caught\n // the omission — the browser barrel alone would have compiled fine and failed on the\n // `node` condition only.\n AparteSegmentBase,\n AparteSegmentDefaults,\n AparteSegmentTiming,\n AparteErrorSegment,\n // The detail of the `aparte-segment-update` event. It reached types/index.ts and\n // stopped there — and types/index.ts is not an entry point, so a consumer could\n // bind the event (it is in the published event table) and never name its detail.\n AparteSegmentUpdateEventDetail,\n AparteAIProvider,\n AparteAIModel,\n AparteAIProviderConfigField,\n AparteAIProviderMetadata,\n AparteAIProviderConfigSchema,\n AparteModelConfig,\n ModelStatus,\n ModelLoadProgress,\n AparteModelChangeEventDetail,\n AparteApprovalModeChangeEventDetail,\n AparteMessageDoneEventDetail,\n AparteMessageStartEventDetail,\n AparteMessageErrorEventDetail,\n AparteMessageAbortedEventDetail,\n AparteAbortEventDetail,\n AparteCompactEventDetail,\n AparteCompactDoneEventDetail,\n AparteCompactStartEventDetail,\n AparteCompactErrorEventDetail,\n AparteAttachmentPreviewEventDetail,\n AparteLinkClickEventDetail,\n AparteMessageInfoEventDetail,\n AparteSiblingInfo,\n AparteBranchNavigateEventDetail,\n ApartePathChangedEventDetail,\n AparteRetryEventDetail,\n AparteEditEventDetail,\n AparteFeedbackEventDetail,\n AparteActionEventDetail,\n AparteChatRequest,\n AparteChatResponse,\n AparteChatMessage,\n AparteContentPart,\n AparteTextPart,\n AparteImagePart,\n AparteFilePart,\n AparteStreamEvent,\n AparteStreamEventMap,\n AparteUsage,\n AparteTool,\n AparteToolCall,\n AparteApprovalPolicy,\n AparteApprovalRuling,\n AparteToolResult,\n AparteToolHandler,\n AparteToolContext,\n AparteToolRenderer,\n AparteToolApprovalRequestDetail,\n AparteChatImperativeApi,\n AparteElementAttributes,\n AparteElementTagName,\n AparteAttrValue,\n AparteTemplateAttrs,\n AparteNoAttributes,\n AparteChatAttributes,\n AparteChatViewportAttributes,\n AparteChatBubbleAttributes,\n AparteChatStatusAttributes,\n AparteComposerAttributes,\n AparteComposerInputAttributes,\n AparteComposerActionAttributes,\n AparteComposerAddAttachmentAttributes,\n AparteComposerToolbarAttributes,\n AparteConversationListAttributes,\n AparteSelectAttributes,\n AparteOptionAttributes,\n AparteOptgroupAttributes,\n AparteProgressSpinnerAttributes,\n} from './types/index.js';\nexport { AparteErrorCode, AparteError, contentToText } from './types/index.js';\n\n// Custom-element TYPES (erased) — keep server consumers fully typed.\n//\n// The element CLASSES too, as types: `frameworks/elements.md` promises the `node`\n// condition keeps \"every type\", and a server-side consumer typing a ref\n// (`ref: AparteChat`) or a wrapper's imperative surface needs the class's instance\n// type without its `HTMLElement` runtime. `export type` erases the value, so nothing\n// here touches the DOM at import.\nexport type {\n AparteChat, AparteChatBubble, AparteChatViewport, AparteChatStatus,\n AparteComposer, AparteComposerInput, AparteComposerSend, AparteComposerCancel,\n AparteComposerAttachments, AparteComposerAddAttachment, AparteComposerAction, AparteComposerToolbar,\n AparteSuggestions, AparteContext, AparteConversationList, AparteScrollRail, AparteSidebar,\n AparteSplit,\n} from './components/index.js';\nexport type { AparteScrollRailJumpDetail, AparteScrollRailEvery, AparteSidebarToggleDetail } from './components/index.js';\nexport type { AparteSplitResizeDetail } from './components/index.js';\nexport type { AparteElicitation } from './components/elicitation/aparte-elicitation.js';\nexport type { AparteSelect, AparteOption, AparteOptgroup, AparteIcon, AparteProgressSpinner } from './primitives/index.js';\nexport type { AparteSelectChangeDetail, AparteOptgroupToggleEventDetail } from './primitives/index.js';\nexport type { SyncableBubble, AparteComposerEventMap, AparteComposerEventType, AparteComposerState, AparteComposerChangeEventDetail, AparteComposerPanelMode, AparteActionClickEventDetail } from './components/index.js';\nexport type { AparteConversationListItem, AparteConversationSelectDetail, AparteConversationDeleteDetail, AparteConversationArchiveDetail, AparteConversationPinDetail, AparteConversationRenameDetail } from './components/index.js';\nexport type { AparteSuggestion, AparteSuggestionEventDetail } from './components/index.js';\nexport type { AparteContextLevel, AparteContextThresholdEventDetail } from './components/index.js';\n\n// ── Renderers (produce HTML strings; DOM-free at import) ────────────────────\nexport {\n registerSegmentRenderer,\n unregisterSegmentRenderer,\n getSegmentRenderer,\n collectRendererStyles,\n registerDefaultRenderers,\n installDefaultRenderersOnce,\n declineDefaultRenderers,\n getAllRenderers,\n} from './renderers/index.js';\n\n// `populateBubbleFromMessage` is a plain helper — import it from its own module,\n// NOT the components barrel (which would pull in the HTMLElement classes).\nexport { populateBubbleFromMessage } from './components/bubble/bubble-sync.js';\n\n// ── Conversations (types, adapter contract, manager, controller) ────────────\nexport type {\n AparteConversation,\n AparteConversationMeta,\n AparteStorageAdapter,\n AparteAttachmentRow,\n} from './conversations/index.js';\nexport { APARTE_CONVERSATION_SCHEMA_VERSION } from './conversations/index.js';\nexport { AparteConversationManager, type ConversationManagerOptions } from './conversations/index.js';\nexport {\n AparteConversationController,\n type AparteChatBinding,\n type AparteConversationControllerOptions,\n} from './conversations/index.js';\n\n// ── Framework-agnostic chat-host orchestrator (every wrapper binds to it) ───\nexport {\n AparteChatHost,\n type AparteChatHostBinding,\n type AparteChatHostOptions,\n} from './host/index.js';\n\n// ── Parsers ─────────────────────────────────────────────────────────────────\nexport { AparteStreamParser, parseMarkdownToSegments, parseAparteEventStream } from './parsers/index.js';\nexport type { AparteStreamParserOptions, AparteThinkingDelimiterPair, AparteParserState, AparteParserResult } from './parsers/index.js';\n\n// Transport seam — DOM-free (fetch-based), so the whole seam is SSR-safe. The\n// server-side `/api/chat` handler AND both client transports live here; a browser\n// never runs the handler, and the transports touch no DOM at import. Mirrored in\n// full so a wrapper barrel re-exporting a transport can't crash under SSR.\nexport { AparteDirectTransport, AparteBackendTransport, createAparteChatHandler, isFormatAdapter } from './transport/index.js';\nexport type {\n AparteTransport,\n AparteTransportContext,\n AparteFormatAdapter,\n AparteVendorRequest,\n BackendTransportOptions,\n DirectTransportOptions,\n AparteChatHandlerOptions,\n} from './transport/index.js';\n\n// ── Config ──────────────────────────────────────────────────────────────────\nexport { aparteGlobalConfig, AparteConfig, APARTE_DEFAULT_BUBBLE_ACTIONS, APARTE_DEFAULT_HOST_HANDLERS } from './config/index.js';\nexport type { AparteConfigChangeEventDetail } from './config/index.js';\nexport { resolveConfig, attachConfig, detachConfig, runWithConfig, contextConfig, APARTE_HOST_ATTR } from './config/index.js';\nexport { subscribeConfigChange, APARTE_CONFIG_CHANGE } from './config/index.js';\nexport type { AparteConfigAware } from './config/index.js';\nexport type {\n AparteMarkdownProvider,\n AparteStreamingMarkdownProvider,\n AparteStreamingMarkdownRenderer,\n AparteHighlightProvider,\n AparteSystemPromptVarsProvider,\n AparteLocale,\n AparteLocaleExtensions,\n AparteAction,\n AparteActionZone,\n AparteIconProvider,\n AparteIconName,\n AparteAvatarProvider,\n AparteStatusRenderer,\n AparteErrorRenderer,\n AparteAttachmentRenderer,\n AparteElicitationFieldRenderer,\n AparteElicitationFieldContext,\n AparteElicitationFieldControl,\n AparteSiblingNavRenderer,\n AparteBubbleShellRenderer,\n AparteModelPreference,\n AparteModelPreferenceProvider,\n AparteSanitizer,\n} from './config/index.js';\nexport { APARTE_DEFAULT_ICON_FALLBACKS, APARTE_DEFAULT_LOCALE, defaultSanitizer, isSafeUrl } from './config/index.js';\n\n// ── Client + runtime ─────────────────────────────────────────────────────────\nexport { AparteClient } from './client/aparte-client.js';\nexport type { AparteClientOptions, AparteToolApprovalResolver } from './client/aparte-client.js';\nexport { createStreamAdapter, readableToAsyncIterable } from './client/stream-adapter.js';\nexport type { AparteStreamRunEvent, AparteStreamRunEmitter, StreamAdapterTarget, CreateStreamAdapterOptions, AparteStreamRunner, AparteStreamRunOptions } from './client/stream-adapter.js';\nexport { AparteMessageRepository } from './runtime/message-repository.js';\nexport type { ExportedMessageRepository } from './runtime/message-repository.js';\n\n// ── Wrapper interop (DOM-free helpers the four wrappers' AparteUi value-imports) ─\n// `applyElementProps`/`APARTE_DEFAULT_UI_EVENTS` are pure (a string array + a function that\n// only touches its `HTMLElement` argument when CALLED, never at import). They MUST be\n// on the Node surface: every wrapper barrel re-exports `AparteUi`, which value-imports\n// these two — omit them here and any SSR toolchain resolving the `node` condition\n// crashes the whole barrel with \"does not provide an export named 'applyElementProps'\".\nexport { applyElementProps, APARTE_DEFAULT_UI_EVENTS } from './interop/element-props.js';\n// A type, so it costs nothing here and its absence WAS a compile error for an SSR\n// consumer — `check:node-barrel-types` caught it the moment the browser barrel gained it.\nexport type { AparteUiEventName } from './interop/element-props.js';\n// Same rule: DOM-free at import (it only reaches for `URL.createObjectURL` when\n// CALLED, which is a browser-side concern), so it belongs on the SSR surface too.\nexport { filesToAttachments, revokeAttachmentUrls } from './utils/files-to-attachments.js';\n\n/*\n * The global type augmentations, which only the BROWSER entry pulled in.\n *\n * TypeScript applies the `node` export condition under `moduleResolution: node16`\n * / `nodenext`, so a consumer in that mode resolves `index.node.d.ts` — and\n * silently lost typed `e.detail` on every aparté event and typed\n * `querySelector('aparte-…')`. Not a runtime concern and not an SSR hazard: both\n * modules are `import type` throughout, so nothing is emitted and no DOM global is\n * touched. `check:node-barrel-types` diffed export NAMES, which an augmentation\n * has none of, so it saw nothing.\n */\nimport './types/event-map.js';\nimport './types/element-map.js';\n// Is a message waiting for a reply? Shared by the viewport, the four wrappers and\n// any consumer rendering its own bubble — one rule, so they can't disagree.\nexport { isAwaitingReply } from './utils/is-awaiting-reply.js';\nexport { escapeHtml, escapeAttr } from './utils/escape.js';\n// Same reasoning as the browser barrel: the gate script and the customization\n// guide both tell a renderer author to use `cssEscape` for a selector, so it has to\n// be importable. It touches no DOM, so the SSR barrel carries it too.\nexport { cssEscape } from './utils/css-escape.js';\nexport { uuid } from './utils/uuid.js';\nexport { copyText } from './utils/copy-text.js';\n// Pure and DOM-free, so the SSR barrel carries it too — and that is the point: a\n// consumer can assert their own duration logic in Node, with no browser.\nexport { isSegmentSettled, segmentTiming, segmentDuration } from './utils/segments.js';\n// The PARAMETER types of two documented setters. They existed and were the declared\n// argument types, but were not exported — so anyone typing a settings layer over\n// `setHostHandlers` / `setKeyProvider` had to re-declare the shape by hand.\nexport type { AparteHostHandlersConfig } from './types/models.js';\nexport type { AparteKeyProvider } from './config/aparte-config.js';\n\n// Elicitation (human-in-the-loop typed input) — DOM-free at import.\nexport { requestUserInput, buildElicitationPanel, buildApprovalPanel, AparteElicitationAbortError } from './elicitation/index.js';\nexport type {\n AparteElicitationSchema,\n AparteElicitationField,\n AparteElicitationEnumField,\n AparteElicitationBooleanField,\n AparteElicitationStringField,\n AparteElicitationObjectSchema,\n AparteElicitationRequest,\n AparteElicitationResult,\n AparteElicitationPresenter,\n AparteApprovalOption,\n AparteApprovalAnswer,\n BuiltApprovalPanel,\n BuiltElicitationPanel,\n} from './elicitation/index.js';\n\n/**\n * No-op on the server: custom elements only exist in the browser, where the\n * real `index.ts` registers them at import time. Wrappers can call this\n * unconditionally without a `typeof window` guard.\n *\n * With ONE thing to say. A `customElements` here means a DOM is present and this\n * DOM-free entry was still the one that resolved — which is a test runner: vitest,\n * jest and friends run on Node, so they take the `node` export condition, and jsdom\n * then supplies the registry. Nothing upgrades, `<aparte-chat>` stays an\n * `HTMLElement`, and every assertion about an element's own properties fails for a\n * reason nothing on the page explains. The escape is `@aparte/core/browser`, which is\n * why that entry exists; before it, the only way out was to reach into this package's\n * `src/`. One warning, not a throw: the environment is legal, only surprising.\n */\nexport function registerAllComponents(): void {\n if (typeof customElements !== 'undefined') {\n console.warn(\n \"[aparte] A DOM is present but '@aparte/core' resolved to its DOM-free Node entry, \"\n + 'so no <aparte-*> element will upgrade. Test runners hit this: they run on Node, '\n + \"so they take the 'node' export condition. Point your runner at '@aparte/core/browser' \"\n + \"(vitest: test.alias { '@aparte/core': '@aparte/core/browser' }).\",\n );\n }\n}\n// Pure until called; the browser entry calls it at import.\nexport { installDialogTriggersOnce } from './interop/dialog-triggers.js';\n"],"names":[],"mappings":";AAuUO,SAAS,wBAA8B;AAC1C,MAAI,OAAO,mBAAmB,aAAa;AACvC,YAAQ;AAAA,MACJ;AAAA,IAAA;AAAA,EAKR;AACJ;"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The dialog wiring: three attributes, one delegated listener, no element.
3
+ *
4
+ * The kit's dialog is the browser's `<dialog>` wearing `.aparte-dialog`
5
+ * (`styles/surface/dialog.css`): `showModal()` gives the top layer, the focus trap,
6
+ * Escape and the focus return, so there is no behaviour left for a custom element to
7
+ * own — and wrapping the host's content in one would have moved children a framework
8
+ * renders, which is the one thing a light-DOM element must not do. What the browser
9
+ * does NOT give is a way to open a dialog from a button without a line of script, or
10
+ * to close it from the backdrop. That is what this installs, once per document:
11
+ *
12
+ * - a click on `[data-aparte-dialog-open="id"]` calls `showModal()` on the dialog
13
+ * with that id;
14
+ * - a click on `[data-aparte-dialog-close]` inside a dialog closes it — the
15
+ * attribute's value, if any, becomes the dialog's `returnValue`;
16
+ * - a click on the backdrop (the `<dialog>` itself, outside its box) closes an
17
+ * `.aparte-dialog`, unless it carries `data-aparte-dialog-static`.
18
+ *
19
+ * Installed by the browser entry at import, like the default renderers; exported for
20
+ * a host that builds the page before importing core, and idempotent.
21
+ */
22
+ /**
23
+ * Wire `data-aparte-dialog-open` / `-close` and the backdrop click on this document.
24
+ * Called once by `@aparte/core` at import; safe to call again.
25
+ */
26
+ export declare function installDialogTriggersOnce(doc?: Document): void;
27
+ //# sourceMappingURL=dialog-triggers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog-triggers.d.ts","sourceRoot":"","sources":["../../src/interop/dialog-triggers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAmEH;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,GAAE,QAAmB,GAAG,IAAI,CASxE"}
@@ -20,16 +20,24 @@
20
20
  * so listing ours would privilege our packages over theirs. Pass the names you need —
21
21
  * `events: ['aparte-model-change']` — which is one line for everyone equally.
22
22
  *
23
- * Two events are deliberately NOT here for a different reason. `aparte-abort` and
24
- * `aparte-message-aborted` go out through `window.dispatchEvent` — they concern the whole page, not one subtree —
25
- * so an element-level listener can never receive them and listing them would promise a
26
- * forward that cannot happen.
23
+ * Three events are deliberately NOT here for a different reason: `aparte-abort`,
24
+ * `aparte-compact` and `aparte-config-change` go out through `window.dispatchEvent` —
25
+ * they concern the whole page, not one subtree — so an element-level listener can never
26
+ * receive them and listing them would promise a forward that cannot happen.
27
27
  *
28
- * Keep in step with `packages/core/dist/custom-elements.json`: this list is what a
29
- * consumer gets without passing their own, so an event missing here is an event they
30
- * cannot hear through the proxy.
28
+ * `aparte-message-aborted` used to be named in that sentence, and it was wrong.
29
+ * `dispatchLifecycleEvent` dispatches it with the other four lifecycle events on the
30
+ * HOST ELEMENT, bubbling and composed (`client/lifecycle-events.ts`), and the composer's
31
+ * `window` dispatch is a SECOND, page-wide broadcast, not the only one. So the proxy
32
+ * could have forwarded it all along, and a wrapper consumer watching a turn end had to
33
+ * reach past `<AparteUi>` to `window` for no reason. The five lifecycle events are here
34
+ * now; the sentence above lists only what a `window` dispatch is the sole path for.
35
+ *
36
+ * `scripts/check-event-map.mjs` now asserts this list against every non-`window`
37
+ * dispatch in core, so "verified against core" is a check rather than a claim — which
38
+ * is what the first version of this docblock said while carrying seven of twenty-five.
31
39
  */
32
- export declare const APARTE_DEFAULT_UI_EVENTS: readonly ["aparte-send", "aparte-cancel", "aparte-composer-change", "aparte-composer-submit", "aparte-action-click", "aparte-attachment-preview", "aparte-action", "aparte-retry", "aparte-edit", "aparte-feedback", "aparte-message-info", "aparte-branch-navigate", "aparte-segment-update", "aparte-reset-done", "aparte-path-changed", "aparte-select-conversation", "aparte-delete-conversation", "aparte-archive-conversation", "aparte-unarchive-conversation", "aparte-select-change", "aparte-select-open", "aparte-select-close", "aparte-optgroup-toggle"];
40
+ export declare const APARTE_DEFAULT_UI_EVENTS: readonly ["aparte-send", "aparte-cancel", "aparte-composer-change", "aparte-composer-submit", "aparte-action-click", "aparte-attachment-preview", "aparte-action", "aparte-retry", "aparte-edit", "aparte-feedback", "aparte-message-info", "aparte-branch-navigate", "aparte-link-click", "aparte-segment-update", "aparte-reset-done", "aparte-path-changed", "aparte-select-conversation", "aparte-delete-conversation", "aparte-archive-conversation", "aparte-unarchive-conversation", "aparte-rename-conversation", "aparte-pin-conversation", "aparte-unpin-conversation", "aparte-select-change", "aparte-select-open", "aparte-select-close", "aparte-optgroup-toggle", "aparte-suggestion", "aparte-context-threshold", "aparte-scroll-rail-jump", "aparte-sidebar-toggle", "aparte-split-resize", "aparte-message-start", "aparte-message-done", "aparte-message-error", "aparte-message-aborted", "aparte-tool-approval-request"];
33
41
  /**
34
42
  * Every event name aparté dispatches ON an element, as a type.
35
43
  *
@@ -1 +1 @@
1
- {"version":3,"file":"element-props.d.ts","sourceRoot":"","sources":["../../src/interop/element-props.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,wBAAwB,uiBA6BC,CAAC;AAEvC;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAExE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC7B,EAAE,EAAE,WAAW,EACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,cAAc,GAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAA0B,GAC/D,IAAI,CA+DN"}
1
+ {"version":3,"file":"element-props.d.ts","sourceRoot":"","sources":["../../src/interop/element-props.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,wBAAwB,+4BA6CC,CAAC;AAEvC;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAExE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC7B,EAAE,EAAE,WAAW,EACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,cAAc,GAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAA0B,GAC/D,IAAI,CA+DN"}
@@ -9,7 +9,7 @@
9
9
  * - Plain text → AparteTextSegment
10
10
  * - <think>…</think> or <thinking>…</thinking> → AparteThinkingSegment (configurable)
11
11
  */
12
- import { deriveArtifactKind } from '@aparte/engine';
12
+ import type { AparteStreamBlock } from '../types/stream-blocks.js';
13
13
  import type { AparteSegment } from '../types/index.js';
14
14
  /** One inline thinking-block delimiter pair (open/close tag). */
15
15
  export interface AparteThinkingDelimiterPair {
@@ -26,6 +26,13 @@ export interface AparteStreamParserOptions {
26
26
  * `<thinking>…</thinking>` (Claude-style). Pass your own to override.
27
27
  */
28
28
  thinkingDelimiters?: AparteThinkingDelimiterPair | AparteThinkingDelimiterPair[];
29
+ /**
30
+ * Tagged blocks to recognise in the prose — `<tag attr="…">…</tag>` — each turned
31
+ * into the segment its grammar builds. The stream adapter passes the blocks
32
+ * registered on the config (`registerStreamBlock`); pass your own when you drive
33
+ * the parser yourself. See {@link AparteStreamBlock}.
34
+ */
35
+ blocks?: AparteStreamBlock[];
29
36
  /** Auto-generate segment IDs (default: true) */
30
37
  autoGenerateIds?: boolean;
31
38
  /** ID prefix for generated segments */
@@ -33,13 +40,15 @@ export interface AparteStreamParserOptions {
33
40
  }
34
41
  export interface AparteParserState {
35
42
  /** Current parser mode */
36
- mode: 'text' | 'code' | 'thinking' | 'artifact';
43
+ mode: 'text' | 'code' | 'thinking' | 'block';
37
44
  /** Buffer for incomplete patterns */
38
45
  buffer: string;
39
46
  /** Current code block language */
40
47
  codeLanguage?: string;
41
48
  /** Close delimiter of the thinking pair currently open (multi-delimiter support) */
42
49
  thinkingEnd?: string;
50
+ /** Closing tag of the registered block currently open (`</tag>`). */
51
+ blockEnd?: string;
43
52
  /** Accumulated segments */
44
53
  segments: AparteSegment[];
45
54
  /** Current active segment being built */
@@ -59,7 +68,17 @@ export declare class AparteStreamParser {
59
68
  private _options;
60
69
  /** Normalized to an array; the parser matches whichever pair opens first. */
61
70
  private _thinkingDelimiters;
71
+ /** The registered block grammars, in registration order. */
72
+ private _blocks;
62
73
  private _state;
74
+ /**
75
+ * A block already BUILT and waiting for its turn to be emitted — a self-closing
76
+ * tag that followed prose, whose text run has to go out first. One segment per
77
+ * step, but `toSegment` is still called exactly once, as `AparteStreamBlock`
78
+ * documents: re-reading the tag on the next step called a consumer's grammar
79
+ * twice for one tag.
80
+ */
81
+ private _pendingSegment;
63
82
  constructor(options?: AparteStreamParserOptions);
64
83
  /**
65
84
  * Parse a chunk of streamed content
@@ -85,23 +104,42 @@ export declare class AparteStreamParser {
85
104
  private _startThinkingBlock;
86
105
  private _parseThinkingMode;
87
106
  /**
88
- * Start an artifact block. Buffer must start with `<artifact`.
89
- * The full opening tag must be present (`>`); otherwise we return null and wait
90
- * for more chunks.
107
+ * Where `<tag` opens a block in `buffer`, or -1. A hit needs the name to END
108
+ * there: `<artifacts>` is not `<artifact>`, so the character after the name must
109
+ * be whitespace, `/` or `>`. A `<tag` sitting at the very end of the buffer is
110
+ * undecidable and reported as -1 — the partial-match hold in `_parseTextMode`
111
+ * keeps it for the next chunk.
112
+ */
113
+ private _indexOfTag;
114
+ /**
115
+ * Where the opening `<tag …>` ends, or -1 while it is still incomplete.
91
116
  *
92
- * Supported attributes (Anthropic-style, single or double quotes):
93
- * - type — required (MIME type, verbatim)
94
- * - title — optional human label
117
+ * The first `>` is not the answer: `<note title="v1 -> v2">` carries one inside
118
+ * a quoted value, and cutting there loses every attribute AND leaks the rest of
119
+ * the tag into the body as raw markup. A quote only OPENS after an `=`, so a
120
+ * stray `"` written in an attribute-less tag cannot hold the buffer open.
95
121
  *
96
- * Any other attributes are ignored gracefully.
122
+ * A quote the model never closes must not hold it open either. `-1` means
123
+ * "wait", and waiting on a value that runs to the end of the reply freezes the
124
+ * stream: nothing is emitted until `finalize()` flushes the whole tail as raw
125
+ * text. These tag conventions are single-line, so a newline reached inside an
126
+ * open value says the quote was a typo — and the tag is then read the way it
127
+ * has always been read, at its first `>`.
128
+ */
129
+ private _tagEnd;
130
+ /**
131
+ * Open a registered block. The buffer starts with `<tag`; the whole opening tag
132
+ * must be present (its `>`) or we wait. Attributes are read as written —
133
+ * `a="x"`, `a='x'`, `a=x` — and a self-closing `<tag …/>` is a block with no
134
+ * body, returned closed at once.
97
135
  */
98
- private _startArtifactBlock;
136
+ private _startBlock;
99
137
  /**
100
- * Stream content into the active artifact segment until `</artifact>` is seen.
101
- * Mirrors `_parseThinkingMode` so partial matches at chunk boundaries don't
102
- * split the closing tag across two updates.
138
+ * Stream the body of the open block until its closing tag — the same
139
+ * partial-delimiter handling the thinking mode uses, so a closing
140
+ * tag split across two chunks is never emitted as content.
103
141
  */
104
- private _parseArtifactMode;
142
+ private _parseBlockMode;
105
143
  private _createInitialState;
106
144
  private _generateId;
107
145
  /**
@@ -132,7 +170,6 @@ export declare class AparteStreamParser {
132
170
  private _createTextSegment;
133
171
  private _createCodeSegment;
134
172
  private _createThinkingSegment;
135
- private _createArtifactSegment;
136
173
  private _isPartialMatch;
137
174
  private _getPartialMatchLength;
138
175
  }
@@ -141,11 +178,4 @@ export declare class AparteStreamParser {
141
178
  * Use this for non-streaming scenarios
142
179
  */
143
180
  export declare function parseMarkdownToSegments(content: string, options?: AparteStreamParserOptions): AparteSegment[];
144
- /**
145
- * Artifact kind from a MIME type — the engine's implementation, re-exported so the
146
- * name stays on core's surface. Core used to keep the canonical copy and engine a
147
- * byte-identical one, locked together by a parity test; with core depending on
148
- * engine (D1) there is one function object and nothing to lock.
149
- */
150
- export { deriveArtifactKind };
151
181
  //# sourceMappingURL=aparte-stream-parser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aparte-stream-parser.d.ts","sourceRoot":"","sources":["../../src/parsers/aparte-stream-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EACR,aAAa,EAKhB,MAAM,mBAAmB,CAAC;AAO3B,iEAAiE;AACjE,MAAM,WAAW,2BAA2B;IACxC,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C,OAAO,CAAC,UAAU;IAuBlB,OAAO,CAAC,cAAc;IA8GtB,OAAO,CAAC,eAAe;IAgCvB,OAAO,CAAC,cAAc;IA0CtB,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,kBAAkB;IAgD1B;;;;;;OAMG;IACH,OAAO,CAAC,WAAW;IAanB;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,OAAO;IAoBf;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IA0BnB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IA8BvB,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,WAAW;IAKnB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,kBAAkB;IAQ1B,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,sBAAsB;IAS9B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,sBAAsB;CAQjC;AAMD;;;GAGG;AACH,wBAAgB,uBAAuB,CACnC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,yBAAyB,GACpC,aAAa,EAAE,CAKjB"}
@@ -1,4 +1,4 @@
1
- export { AparteStreamParser, parseMarkdownToSegments, deriveArtifactKind } from './aparte-stream-parser.js';
1
+ export { AparteStreamParser, parseMarkdownToSegments } from './aparte-stream-parser.js';
2
2
  export type { AparteStreamParserOptions, AparteThinkingDelimiterPair, AparteParserState, AparteParserResult } from './aparte-stream-parser.js';
3
3
  export { parseAparteEventStream } from './aparte-event-stream.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parsers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC5G,YAAY,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAO/I,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parsers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACxF,YAAY,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAO/I,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"aparte-select.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/aparte-select.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,sBAAsB,CAAC;AAG9B,MAAM,WAAW,wBAAwB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,qBAAa,YAAa,SAAQ,WAAW;IACzC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAK;IAC7B,mFAAmF;IACnF,OAAO,CAAC,MAAM,CAAC,WAAW,CAAK;IAE/B,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,YAAY,CAAM;IAC1B,OAAO,CAAC,QAAQ,CAA4B;IAC5C,OAAO,CAAC,SAAS,CAA4B;IAC7C,OAAO,CAAC,YAAY,CAAiC;IACrD,OAAO,CAAC,SAAS,CAAiC;IAGlD;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,uBAAuB,CAAsC;IACrE,OAAO,CAAC,yBAAyB,CAAwC;IACzE,OAAO,CAAC,mBAAmB,CAAkC;IAE7D,MAAM,KAAK,kBAAkB,I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AA8B,GAAG,SAAS,qBAAqB,EAAE,CAExG;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,GAAE,YAA8B,GAAG,MAAM,CAKpF;AAoBD,wBAAgB,oBAAoB,CAAC,MAAM,GAAE,YAA8B,GAAG,IAAI,CAwBjF;AAGD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,MAAM,CAAA;CAAE,GAAG,IAAI,CAUvG;AAED,wBAAgB,wBAAwB,CAAC,MAAM,GAAE,YAA8B,GAAG,IAAI,CAiBrF"}
@@ -1 +1 @@
1
- {"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../src/renderers/segments/code.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACR,qBAAqB,EACrB,iBAAiB,EACpB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,YAAY,EAAE,qBAAqB,CAAC,iBAAiB,CA6FjE,CAAC"}
1
+ {"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../src/renderers/segments/code.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACR,qBAAqB,EACrB,iBAAiB,EACpB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,YAAY,EAAE,qBAAqB,CAAC,iBAAiB,CA6FjE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tool-call.d.ts","sourceRoot":"","sources":["../../../src/renderers/segments/tool-call.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACR,qBAAqB,EACrB,qBAAqB,EACxB,MAAM,sBAAsB,CAAC;AAiI9B,eAAO,MAAM,gBAAgB,EAAE,qBAAqB,CAAC,qBAAqB,CAmMzE,CAAC"}
1
+ {"version":3,"file":"tool-call.d.ts","sourceRoot":"","sources":["../../../src/renderers/segments/tool-call.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACR,qBAAqB,EACrB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AAO,GAAG,QAAQ,GAAG,OAAO,CAAC,OAAO,GAAG,QAAQ,CAAC,CAAC;IAC9E;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACtF;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,uBAAuB,CACnC,OAAO,EAAE,wBAAwB,GAClC,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CA8HrC"}
1
+ {"version":3,"file":"backend-handler.d.ts","sourceRoot":"","sources":["../../src/transport/backend-handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,MAAM,WAAW,wBAAwB;IACrC;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC5C;;;;;;;;;;;;;;;OAeG;IACH,SAAS,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC,OAAO,GAAG,QAAQ,CAAC,CAAC;IAC9E;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACtF;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,uBAAuB,CACnC,OAAO,EAAE,wBAAwB,GAClC,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAwIrC"}
@@ -4,7 +4,12 @@ import type { AparteTransport, AparteTransportContext } from './types.js';
4
4
  export interface BackendTransportOptions {
5
5
  /** Your backend chat endpoint, e.g. `/api/chat`. */
6
6
  endpoint: string;
7
- /** Extra headers to send with each request (session cookie is automatic). */
7
+ /**
8
+ * Extra headers to send with each request. A session cookie rides along
9
+ * automatically only for a SAME-ORIGIN `endpoint` — the request uses fetch's
10
+ * default `credentials: 'same-origin'`, so a cross-origin endpoint sends no
11
+ * cookie; authenticate it with a header here instead.
12
+ */
8
13
  headers?: Record<string, string>;
9
14
  /**
10
15
  * Override how the request is serialised to your backend. Default body is
@@ -1 +1 @@
1
- {"version":3,"file":"backend-transport.d.ts","sourceRoot":"","sources":["../../src/transport/backend-transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAI1E,MAAM,WAAW,uBAAuB;IACpC,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;CAC3E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,sBAAuB,YAAW,eAAe;IAC9C,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,uBAAuB;IAEvD,IAAI,CACN,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,iBAAiB,EAC1B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAClD,GAAG,EAAE,sBAAsB,GAC5B,OAAO,CAAC,kBAAkB,CAAC;CA4BjC"}
1
+ {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