@lostgradient/cinder 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.
- package/CHANGELOG.md +6 -0
- package/README.md +3 -3
- package/components.json +2 -143
- package/dist/components/access-gate/index.js +379 -327
- package/dist/components/alert-dialog/index.js +170 -172
- package/dist/components/confirm-dialog/index.js +170 -172
- package/dist/components/drawer/index.js +11 -11
- package/dist/components/focus-trap/index.d.ts +1 -0
- package/dist/components/focus-trap/index.js +171 -1
- package/dist/components/icons/index.d.ts +80 -1
- package/dist/components/icons/index.js +1256 -0
- package/dist/components/markdown-editor/index.js +170 -170
- package/dist/components/modal/index.js +20 -20
- package/dist/components/review-editor/index.js +170 -187
- package/dist/components/sheet/index.js +11 -11
- package/dist/components/sidebar/index.js +37 -37
- package/dist/index.d.ts +0 -8
- package/dist/index.js +23202 -30173
- package/dist/server/components/access-gate/index.js +7 -10
- package/dist/server/components/alert-dialog/index.js +4 -4
- package/dist/server/components/approval-card/index.js +6 -6
- package/dist/server/components/autocomplete/index.js +4 -4
- package/dist/server/components/choice-grid/index.js +2 -2
- package/dist/server/components/color-field/index.js +2 -2
- package/dist/server/components/combobox/index.js +3 -3
- package/dist/server/components/command-item/index.js +3 -5
- package/dist/server/components/command-menu/index.js +3 -5
- package/dist/server/components/confirm-dialog/index.js +4 -4
- package/dist/server/components/context-menu/index.js +7 -7
- package/dist/server/components/data-table/index.js +3 -3
- package/dist/server/components/date-picker/index.js +4 -4
- package/dist/server/components/date-range-field/index.js +4 -4
- package/dist/server/components/diff-viewer/index.js +9 -11
- package/dist/server/components/drawer/index.js +4 -4
- package/dist/server/components/dropdown/index.js +7 -7
- package/dist/server/components/faceted-filter-bar/index.js +2 -2
- package/dist/server/components/focus-trap/index.js +7 -2
- package/dist/server/components/icons/index.js +156 -0
- package/dist/server/components/inline-loading/index.js +1 -1
- package/dist/server/components/json-schema-editor/index.js +11 -13
- package/dist/server/components/load-more/index.js +2 -3
- package/dist/server/components/markdown-editor/index.js +13 -12
- package/dist/server/components/menu-bar/index.js +4 -4
- package/dist/server/components/modal/index.js +4 -4
- package/dist/server/components/popover/index.js +3 -3
- package/dist/server/components/review-editor/index.js +169 -122
- package/dist/server/components/schedule-builder/index.js +5 -5
- package/dist/server/components/schema-form/index.js +1 -1
- package/dist/server/components/segment/index.js +3 -3
- package/dist/server/components/segmented-control/index.js +4 -4
- package/dist/server/components/selection-popover/index.js +3 -3
- package/dist/server/components/sheet/index.js +3 -3
- package/dist/server/components/sidebar/index.js +4 -4
- package/dist/server/components/table/index.js +3 -3
- package/dist/server/components/tag-input/index.js +2 -2
- package/dist/server/index.js +272 -316
- package/dist/server/{index.server-dwwqssey.js → index.server-0qh3v3nq.js} +1 -1
- package/dist/server/index.server-25wmev4e.js +2 -0
- package/dist/server/{index.server-zdm63dt8.js → index.server-2c56kqws.js} +107 -25
- package/dist/server/{index.server-y4n8vc08.js → index.server-2pc5cv6c.js} +1 -1
- package/dist/server/{index.server-1vsv7ngz.js → index.server-3g76h7z7.js} +12 -2
- package/dist/server/{index.server-xz99aed4.js → index.server-45n4s30n.js} +12 -12
- package/dist/server/{index.server-zzd5wpbw.js → index.server-4dfs3xwn.js} +1 -1
- package/dist/server/{index.server-vhyjjx9z.js → index.server-4jkqgp17.js} +7 -9
- package/dist/server/{index.server-bmxbsk4y.js → index.server-51sxnete.js} +18 -18
- package/dist/server/{index.server-1bwvsnjk.js → index.server-6rv1rfwq.js} +37 -14
- package/dist/server/{index.server-np3c7kx0.js → index.server-7798gc22.js} +1 -1
- package/dist/server/{index.server-2m1kenak.js → index.server-7kjw6qw5.js} +1 -1
- package/dist/server/{index.server-tfftb7hs.js → index.server-7zpzspk6.js} +1 -1
- package/dist/server/{index.server-7yvpb6z7.js → index.server-894t97kv.js} +4 -4
- package/dist/server/{index.server-47v2fhp4.js → index.server-8b35ekqg.js} +1 -1
- package/dist/server/{index.server-j5hn2qds.js → index.server-8nm871y8.js} +80 -30
- package/dist/server/{index.server-h0cvwvhy.js → index.server-9drzqktm.js} +1 -1
- package/dist/server/{index.server-x9s4m9eg.js → index.server-agsdwg53.js} +1 -1
- package/dist/server/{index.server-hpeavvnq.js → index.server-b4gp066a.js} +1 -1
- package/dist/server/{index.server-gkazv439.js → index.server-bf7d81b4.js} +7 -7
- package/dist/server/{index.server-krqvnt6p.js → index.server-d4ft97bx.js} +4 -2
- package/dist/server/{index.server-t1x9h8cb.js → index.server-dg19y3m7.js} +1 -1
- package/dist/server/{index.server-jt1twhgk.js → index.server-dq0k0qf6.js} +10 -10
- package/dist/server/{index.server-pxq277t5.js → index.server-frb9e55d.js} +1 -1
- package/dist/server/{index.server-9kz37z89.js → index.server-g3726bja.js} +1 -1
- package/dist/server/index.server-gyzmkrnz.js +2 -0
- package/dist/server/{index.server-mr68brd6.js → index.server-jgdtsvz2.js} +1 -1
- package/dist/server/{index.server-p56xxef1.js → index.server-m8ya4p7w.js} +1 -1
- package/dist/server/{index.server-1nq7z1qw.js → index.server-mda2y5g6.js} +1 -1
- package/dist/server/{index.server-jdcq5zza.js → index.server-mehav5vs.js} +7 -7
- package/dist/server/{index.server-e89qfamd.js → index.server-mknhgg07.js} +4 -4
- package/dist/server/{index.server-j570vb03.js → index.server-mvjzcna5.js} +1 -1
- package/dist/server/index.server-n4jxy52q.js +2 -0
- package/dist/server/{index.server-h89zk5ev.js → index.server-ne4gzxvz.js} +7 -7
- package/dist/server/{index.server-eftvmq3f.js → index.server-pfbzz3x7.js} +1 -1
- package/dist/server/{index.server-zrh23kty.js → index.server-pyjzfjfn.js} +1 -1
- package/dist/server/{index.server-rga8sc7j.js → index.server-q1d48s9t.js} +40 -36
- package/dist/server/{index.server-46cjwcqw.js → index.server-qv0kkre4.js} +5 -5
- package/dist/server/{index.server-yhzydqxe.js → index.server-r82zjq88.js} +5 -5
- package/dist/server/{index.server-9ykk1kbg.js → index.server-rbd5ys4z.js} +1 -1
- package/dist/server/{index.server-tcay903b.js → index.server-tnecnach.js} +4 -4
- package/dist/server/{index.server-9ra3xv88.js → index.server-x66zvjfc.js} +9 -9
- package/dist/server/{index.server-6sh11ap6.js → index.server-y4kfz0er.js} +1 -1
- package/dist/server/{index.server-n82rcv0m.js → index.server-z721a5gp.js} +4 -4
- package/dist/server/{index.server-mm1xa3kr.js → index.server-zdhv33ph.js} +51 -20
- package/dist/server/{index.server-t3hknp1c.js → index.server-zm04d9eq.js} +4 -4
- package/dist/server/{index.server-nx9c2ep1.js → index.server-zncgb7mw.js} +2 -2
- package/package.json +10 -130
- package/src/components/focus-trap/index.ts +1 -0
- package/src/components/icons/index.ts +82 -40
- package/src/index.ts +0 -34
- package/src/styles/components.css +0 -4
- package/dist/components/chat/adapter/chat-adapter.d.ts +0 -123
- package/dist/components/chat/adapter/index.d.ts +0 -8
- package/dist/components/chat/artifact/artifact-panel.svelte.d.ts +0 -15
- package/dist/components/chat/artifact/artifact-viewer.svelte.d.ts +0 -10
- package/dist/components/chat/artifact/chat-artifact-layout.svelte.d.ts +0 -23
- package/dist/components/chat/artifact/index.d.ts +0 -3
- package/dist/components/chat/builders.d.ts +0 -25
- package/dist/components/chat/chat.css +0 -16
- package/dist/components/chat/chat.css.d.ts +0 -1
- package/dist/components/chat/chat.schema.d.ts +0 -3
- package/dist/components/chat/chat.schema.js +0 -366
- package/dist/components/chat/chat.svelte.d.ts +0 -31
- package/dist/components/chat/chat.types.d.ts +0 -268
- package/dist/components/chat/chat.variables.d.ts +0 -2
- package/dist/components/chat/chat.variables.js +0 -61
- package/dist/components/chat/container/chat-events.d.ts +0 -22
- package/dist/components/chat/container/chat-history-trigger.svelte.d.ts +0 -15
- package/dist/components/chat/container/chat-jump-controls.svelte.d.ts +0 -24
- package/dist/components/chat/container/chat-participant-typing.svelte.d.ts +0 -31
- package/dist/components/chat/container/chat-search-bar.svelte.d.ts +0 -38
- package/dist/components/chat/container/chat-status-announcer.svelte.d.ts +0 -21
- package/dist/components/chat/container/chat.svelte.d.ts +0 -17
- package/dist/components/chat/container/index.d.ts +0 -12
- package/dist/components/chat/container/scroll-utilities.d.ts +0 -119
- package/dist/components/chat/container/use-chat-disclosure-state.svelte.d.ts +0 -58
- package/dist/components/chat/container/use-chat-keyboard-nav.svelte.d.ts +0 -57
- package/dist/components/chat/container/use-chat-message-groups.svelte.d.ts +0 -74
- package/dist/components/chat/container/use-chat-read-receipts.svelte.d.ts +0 -51
- package/dist/components/chat/container/use-chat-scroll-state.svelte.d.ts +0 -111
- package/dist/components/chat/container/use-chat-search.svelte.d.ts +0 -82
- package/dist/components/chat/container/use-chat-typing-indicator.svelte.d.ts +0 -76
- package/dist/components/chat/container/use-chat-unread-state.svelte.d.ts +0 -80
- package/dist/components/chat/container/use-chat-virtualizer.svelte.d.ts +0 -47
- package/dist/components/chat/conversation-model.d.ts +0 -16
- package/dist/components/chat/export/conversation-export-actions.svelte.d.ts +0 -17
- package/dist/components/chat/export/index.d.ts +0 -8
- package/dist/components/chat/index.d.ts +0 -25
- package/dist/components/chat/index.js +0 -11319
- package/dist/components/chat/input/attachment-kind.d.ts +0 -10
- package/dist/components/chat/input/chat-attachment-preview.svelte.d.ts +0 -8
- package/dist/components/chat/input/chat-attachment-serialization.d.ts +0 -9
- package/dist/components/chat/input/chat-attachment.d.ts +0 -11
- package/dist/components/chat/input/chat-input.svelte.d.ts +0 -79
- package/dist/components/chat/input/index.d.ts +0 -5
- package/dist/components/chat/message/chat-date-separator.svelte.d.ts +0 -12
- package/dist/components/chat/message/chat-message-parts-renderer.svelte.d.ts +0 -4
- package/dist/components/chat/message/chat-message-parts.d.ts +0 -96
- package/dist/components/chat/message/chat-message.svelte.d.ts +0 -91
- package/dist/components/chat/message/chat-read-receipt.svelte.d.ts +0 -27
- package/dist/components/chat/message/image-lightbox.svelte.d.ts +0 -17
- package/dist/components/chat/message/index.d.ts +0 -6
- package/dist/components/chat/message/markdown-preview.svelte.d.ts +0 -8
- package/dist/components/chat/message/message-attachments.svelte.d.ts +0 -17
- package/dist/components/chat/message/message-content.svelte.d.ts +0 -18
- package/dist/components/chat/message/parts/image-part.svelte.d.ts +0 -17
- package/dist/components/chat/message/parts/markdown-part.svelte.d.ts +0 -8
- package/dist/components/chat/message/parts/reasoning-part.svelte.d.ts +0 -12
- package/dist/components/chat/message/parts/step-part.svelte.d.ts +0 -8
- package/dist/components/chat/message/parts/suggestion-part.svelte.d.ts +0 -18
- package/dist/components/chat/message/parts/tool-approval-part.svelte.d.ts +0 -12
- package/dist/components/chat/message/parts/tool-call-part.svelte.d.ts +0 -12
- package/dist/components/chat/message/parts/tool-result-part.svelte.d.ts +0 -8
- package/dist/components/chat/message/tool-call-group.svelte.d.ts +0 -15
- package/dist/components/chat/message/tool-payload-code.svelte.d.ts +0 -9
- package/dist/components/chat/utilities/conversation.d.ts +0 -12
- package/dist/components/chat/utilities/index.d.ts +0 -9
- package/dist/components/chat/utilities/types.d.ts +0 -262
- package/dist/components/chat/utilities/utilities.d.ts +0 -140
- package/dist/components/chat-composer-popover/chat-composer-popover-filter.d.ts +0 -11
- package/dist/components/chat-composer-popover/chat-composer-popover.css +0 -7
- package/dist/components/chat-composer-popover/chat-composer-popover.css.d.ts +0 -1
- package/dist/components/chat-composer-popover/chat-composer-popover.schema.d.ts +0 -3
- package/dist/components/chat-composer-popover/chat-composer-popover.schema.js +0 -150
- package/dist/components/chat-composer-popover/chat-composer-popover.svelte.d.ts +0 -46
- package/dist/components/chat-composer-popover/chat-composer-popover.types.d.ts +0 -77
- package/dist/components/chat-composer-popover/chat-composer-popover.variables.d.ts +0 -2
- package/dist/components/chat-composer-popover/chat-composer-popover.variables.js +0 -61
- package/dist/components/chat-composer-popover/index.d.ts +0 -6
- package/dist/components/chat-composer-popover/index.js +0 -3285
- package/dist/components/chat-conversation-header/chat-conversation-header.css +0 -51
- package/dist/components/chat-conversation-header/chat-conversation-header.css.d.ts +0 -1
- package/dist/components/chat-conversation-header/chat-conversation-header.schema.d.ts +0 -3
- package/dist/components/chat-conversation-header/chat-conversation-header.schema.js +0 -94
- package/dist/components/chat-conversation-header/chat-conversation-header.svelte.d.ts +0 -19
- package/dist/components/chat-conversation-header/chat-conversation-header.types.d.ts +0 -18
- package/dist/components/chat-conversation-header/chat-conversation-header.variables.d.ts +0 -2
- package/dist/components/chat-conversation-header/chat-conversation-header.variables.js +0 -61
- package/dist/components/chat-conversation-header/index.d.ts +0 -5
- package/dist/components/chat-conversation-header/index.js +0 -4278
- package/dist/components/chat-conversation-list/chat-conversation-list.css +0 -127
- package/dist/components/chat-conversation-list/chat-conversation-list.css.d.ts +0 -1
- package/dist/components/chat-conversation-list/chat-conversation-list.schema.d.ts +0 -3
- package/dist/components/chat-conversation-list/chat-conversation-list.schema.js +0 -105
- package/dist/components/chat-conversation-list/chat-conversation-list.svelte.d.ts +0 -21
- package/dist/components/chat-conversation-list/chat-conversation-list.types.d.ts +0 -17
- package/dist/components/chat-conversation-list/chat-conversation-list.variables.d.ts +0 -2
- package/dist/components/chat-conversation-list/chat-conversation-list.variables.js +0 -61
- package/dist/components/chat-conversation-list/conversation-summary.d.ts +0 -30
- package/dist/components/chat-conversation-list/index.d.ts +0 -6
- package/dist/components/chat-conversation-list/index.js +0 -536
- package/dist/server/components/chat/index.js +0 -131
- package/dist/server/components/chat-composer-popover/index.js +0 -26
- package/dist/server/components/chat-conversation-header/index.js +0 -41
- package/dist/server/components/chat-conversation-list/index.js +0 -19
- package/dist/server/index.server-2bbwajb2.js +0 -54
- package/dist/server/index.server-2hqrv7ca.js +0 -9
- package/dist/server/index.server-67qgdypc.js +0 -9
- package/dist/server/index.server-6hnfzc7f.js +0 -263
- package/dist/server/index.server-8rmtb8vx.js +0 -175
- package/dist/server/index.server-a59y47rw.js +0 -59
- package/dist/server/index.server-bfkka7x4.js +0 -2
- package/dist/server/index.server-czf35aba.js +0 -4241
- package/dist/server/index.server-kb6w1a7c.js +0 -27
- package/dist/server/index.server-nphtb2ey.js +0 -76
- package/dist/server/index.server-qkfd0qa7.js +0 -2
- package/dist/server/index.server-rf67m8v5.js +0 -2
- package/dist/server/index.server-rqe5bqgm.js +0 -37
- package/dist/server/index.server-xtjjmsyq.js +0 -315
- package/dist/server/index.server-yq9evnp4.js +0 -38
- package/dist/server/index.server-z1qvwaem.js +0 -74
- package/dist/server/index.server-z7hxtqs1.js +0 -83
- package/src/components/chat/adapter/chat-adapter.ts +0 -132
- package/src/components/chat/adapter/index.ts +0 -15
- package/src/components/chat/artifact/artifact-panel.svelte +0 -112
- package/src/components/chat/artifact/artifact-viewer.svelte +0 -101
- package/src/components/chat/artifact/chat-artifact-layout.svelte +0 -56
- package/src/components/chat/artifact/index.ts +0 -3
- package/src/components/chat/builders.ts +0 -464
- package/src/components/chat/chat.css +0 -16
- package/src/components/chat/chat.examples.json +0 -67
- package/src/components/chat/chat.schema.json +0 -290
- package/src/components/chat/chat.schema.ts +0 -335
- package/src/components/chat/chat.svelte +0 -67
- package/src/components/chat/chat.types.ts +0 -284
- package/src/components/chat/chat.variables.json +0 -1
- package/src/components/chat/chat.variables.ts +0 -3
- package/src/components/chat/container/chat-events.ts +0 -26
- package/src/components/chat/container/chat-history-trigger.svelte +0 -95
- package/src/components/chat/container/chat-jump-controls.svelte +0 -191
- package/src/components/chat/container/chat-participant-typing.svelte +0 -128
- package/src/components/chat/container/chat-search-bar.svelte +0 -219
- package/src/components/chat/container/chat-status-announcer.svelte +0 -22
- package/src/components/chat/container/chat.svelte +0 -1879
- package/src/components/chat/container/index.ts +0 -64
- package/src/components/chat/container/scroll-utilities.ts +0 -204
- package/src/components/chat/container/use-chat-disclosure-state.svelte.ts +0 -62
- package/src/components/chat/container/use-chat-keyboard-nav.svelte.ts +0 -153
- package/src/components/chat/container/use-chat-message-groups.svelte.ts +0 -146
- package/src/components/chat/container/use-chat-read-receipts.svelte.ts +0 -62
- package/src/components/chat/container/use-chat-scroll-state.svelte.ts +0 -292
- package/src/components/chat/container/use-chat-search.svelte.ts +0 -116
- package/src/components/chat/container/use-chat-typing-indicator.svelte.ts +0 -153
- package/src/components/chat/container/use-chat-unread-state.svelte.ts +0 -170
- package/src/components/chat/container/use-chat-virtualizer.svelte.ts +0 -260
- package/src/components/chat/conversation-model.ts +0 -56
- package/src/components/chat/export/conversation-export-actions.svelte +0 -174
- package/src/components/chat/export/index.ts +0 -9
- package/src/components/chat/index.ts +0 -160
- package/src/components/chat/input/attachment-kind.ts +0 -28
- package/src/components/chat/input/chat-attachment-preview.svelte +0 -223
- package/src/components/chat/input/chat-attachment-serialization.ts +0 -63
- package/src/components/chat/input/chat-attachment.ts +0 -12
- package/src/components/chat/input/chat-input.svelte +0 -810
- package/src/components/chat/input/index.ts +0 -9
- package/src/components/chat/message/chat-date-separator.svelte +0 -87
- package/src/components/chat/message/chat-message-parts-renderer.svelte +0 -139
- package/src/components/chat/message/chat-message-parts.ts +0 -163
- package/src/components/chat/message/chat-message.svelte +0 -861
- package/src/components/chat/message/chat-read-receipt.svelte +0 -85
- package/src/components/chat/message/image-lightbox.svelte +0 -255
- package/src/components/chat/message/index.ts +0 -6
- package/src/components/chat/message/markdown-preview.svelte +0 -77
- package/src/components/chat/message/message-attachments.svelte +0 -178
- package/src/components/chat/message/message-content.svelte +0 -132
- package/src/components/chat/message/parts/image-part.svelte +0 -11
- package/src/components/chat/message/parts/markdown-part.svelte +0 -17
- package/src/components/chat/message/parts/reasoning-part.svelte +0 -274
- package/src/components/chat/message/parts/step-part.svelte +0 -127
- package/src/components/chat/message/parts/suggestion-part.svelte +0 -83
- package/src/components/chat/message/parts/tool-approval-part.svelte +0 -298
- package/src/components/chat/message/parts/tool-call-part.svelte +0 -19
- package/src/components/chat/message/parts/tool-result-part.svelte +0 -65
- package/src/components/chat/message/tool-call-group.svelte +0 -274
- package/src/components/chat/message/tool-payload-code.svelte +0 -35
- package/src/components/chat/utilities/conversation.ts +0 -44
- package/src/components/chat/utilities/index.ts +0 -33
- package/src/components/chat/utilities/types.ts +0 -288
- package/src/components/chat/utilities/utilities.ts +0 -507
- package/src/components/chat-composer-popover/chat-composer-popover-filter.ts +0 -68
- package/src/components/chat-composer-popover/chat-composer-popover.css +0 -7
- package/src/components/chat-composer-popover/chat-composer-popover.examples.json +0 -13
- package/src/components/chat-composer-popover/chat-composer-popover.schema.json +0 -90
- package/src/components/chat-composer-popover/chat-composer-popover.schema.ts +0 -95
- package/src/components/chat-composer-popover/chat-composer-popover.svelte +0 -234
- package/src/components/chat-composer-popover/chat-composer-popover.types.ts +0 -88
- package/src/components/chat-composer-popover/chat-composer-popover.variables.json +0 -1
- package/src/components/chat-composer-popover/chat-composer-popover.variables.ts +0 -3
- package/src/components/chat-composer-popover/index.ts +0 -19
- package/src/components/chat-conversation-header/chat-conversation-header.css +0 -51
- package/src/components/chat-conversation-header/chat-conversation-header.examples.json +0 -13
- package/src/components/chat-conversation-header/chat-conversation-header.schema.json +0 -34
- package/src/components/chat-conversation-header/chat-conversation-header.schema.ts +0 -38
- package/src/components/chat-conversation-header/chat-conversation-header.svelte +0 -49
- package/src/components/chat-conversation-header/chat-conversation-header.types.ts +0 -20
- package/src/components/chat-conversation-header/chat-conversation-header.variables.json +0 -1
- package/src/components/chat-conversation-header/chat-conversation-header.variables.ts +0 -3
- package/src/components/chat-conversation-header/index.ts +0 -9
- package/src/components/chat-conversation-list/chat-conversation-list.css +0 -127
- package/src/components/chat-conversation-list/chat-conversation-list.examples.json +0 -13
- package/src/components/chat-conversation-list/chat-conversation-list.schema.json +0 -45
- package/src/components/chat-conversation-list/chat-conversation-list.schema.ts +0 -52
- package/src/components/chat-conversation-list/chat-conversation-list.svelte +0 -75
- package/src/components/chat-conversation-list/chat-conversation-list.types.ts +0 -18
- package/src/components/chat-conversation-list/chat-conversation-list.variables.json +0 -1
- package/src/components/chat-conversation-list/chat-conversation-list.variables.ts +0 -3
- package/src/components/chat-conversation-list/conversation-summary.ts +0 -88
- package/src/components/chat-conversation-list/index.ts +0 -11
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
import type { Snippet } from 'svelte';
|
|
2
|
-
import type { Attachment } from 'svelte/attachments';
|
|
3
|
-
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
-
import type { ChatAdapter, ChatAdapterErrorEvent, ChatReadReceiptEvent } from './adapter/chat-adapter.ts';
|
|
5
|
-
import type { ChatScrollStateChangeEvent, ChatStopGeneratingEvent, ChatSubmitEvent, ChatUnreadIndicatorChangeEvent } from './container/chat-events.ts';
|
|
6
|
-
import type { ConversationHistory, Message } from './conversation-model.ts';
|
|
7
|
-
import type { ChatAttachment } from './input/chat-attachment.ts';
|
|
8
|
-
import type { MessagePartOverride } from './message/chat-message-parts.ts';
|
|
9
|
-
import type { StepInfo } from './utilities/types.ts';
|
|
10
|
-
/**
|
|
11
|
-
* A participant who is currently typing. Out-of-band UI state — NOT stored on
|
|
12
|
-
* `Message` or `ConversationHistory`. Flows in as a plain (non-bindable) prop or
|
|
13
|
-
* via the adapter's `onTypingChange` push handler.
|
|
14
|
-
*/
|
|
15
|
-
export type TypingParticipant = {
|
|
16
|
-
/** Unique identifier for the participant (e.g. user id). */
|
|
17
|
-
id: string;
|
|
18
|
-
/** Display name shown in the typing indicator label. */
|
|
19
|
-
name: string;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Read-receipt state for a single message. Out-of-band UI state — NOT stored on
|
|
23
|
-
* `Message`. Flows in as a plain (non-bindable) `readReceipts` prop keyed by
|
|
24
|
-
* message id, or accumulated from the adapter's `onReadReceipt` push handler.
|
|
25
|
-
*
|
|
26
|
-
* Render rules: shown only on `user` messages; color alone never conveys state
|
|
27
|
-
* (icon + text label always present).
|
|
28
|
-
*/
|
|
29
|
-
export type ReadReceipt = {
|
|
30
|
-
/** Delivery/read status for this message. */
|
|
31
|
-
status: 'sent' | 'delivered' | 'read';
|
|
32
|
-
/**
|
|
33
|
-
* Names of participants who have read the message. Used to compose the
|
|
34
|
-
* accessible text (e.g. "Read by Alice, Bob"). May be empty when status is
|
|
35
|
-
* `sent` or `delivered`.
|
|
36
|
-
*/
|
|
37
|
-
readBy?: string[];
|
|
38
|
-
};
|
|
39
|
-
/** Live-region channel for imperative Chat announcements. */
|
|
40
|
-
export type ChatAnnounceLevel = 'polite' | 'assertive';
|
|
41
|
-
/**
|
|
42
|
-
* Full-row override snippet. Inversion of control: receives the message AND a
|
|
43
|
-
* `renderDefault` snippet that renders the built-in row, so a consumer can wrap
|
|
44
|
-
* or replace a row while still delegating to the default when it chooses.
|
|
45
|
-
*/
|
|
46
|
-
export type ChatRowOverride = Snippet<[message: Message, renderDefault: Snippet]>;
|
|
47
|
-
/**
|
|
48
|
-
* Feature-capability flags for the Chat component. Grouped here so consumers
|
|
49
|
-
* pass a single object instead of five scattered boolean props.
|
|
50
|
-
*
|
|
51
|
-
* All flags default to `true` when the `capabilities` prop is omitted or when
|
|
52
|
-
* an individual key is absent from the object.
|
|
53
|
-
*/
|
|
54
|
-
export type ChatCapabilities = {
|
|
55
|
-
/** Whether file attachments are enabled in the composer. When `false`, the attachment button is hidden and drag-and-drop onto the chat surface is suppressed. Default `true`. */
|
|
56
|
-
attachments?: boolean;
|
|
57
|
-
/** Whether in-conversation search is enabled. When `true`, pressing Ctrl+F / Cmd+F opens a search bar that highlights matching messages. Default `true`. */
|
|
58
|
-
search?: boolean;
|
|
59
|
-
/** Whether per-message copy buttons are shown in the message action bar. Default `true`. */
|
|
60
|
-
copy?: boolean;
|
|
61
|
-
/** Whether user messages can be edited inline. Default `true`. */
|
|
62
|
-
editing?: boolean;
|
|
63
|
-
/** Whether failed assistant messages show a retry button. Default `true`. */
|
|
64
|
-
retry?: boolean;
|
|
65
|
-
};
|
|
66
|
-
/** Props for the Chat component. */
|
|
67
|
-
export type ChatProps = Omit<HTMLAttributes<HTMLElement>, 'class' | 'onsubmit'> & {
|
|
68
|
-
/** Unique identifier used to scope accessibility attributes across the chat surface. */
|
|
69
|
-
id: string;
|
|
70
|
-
/**
|
|
71
|
-
* The conversation transcript to render. Pass a {@link ConversationHistory}
|
|
72
|
-
* snapshot; consumers holding a stateful conversation object pass its current
|
|
73
|
-
* snapshot (e.g. `conversation.current`).
|
|
74
|
-
*/
|
|
75
|
-
conversation: ConversationHistory;
|
|
76
|
-
/** Whether the message viewport is scrolled to the bottom. Bindable; updated automatically as the user scrolls. Default `true`. */
|
|
77
|
-
atBottom?: boolean;
|
|
78
|
-
/** Number of messages received while the viewport was scrolled away from the bottom. Bindable; resets to `0` when the user scrolls to the bottom. Default `0`. */
|
|
79
|
-
unreadCount?: number;
|
|
80
|
-
/** Whether the "new messages" indicator is currently visible above the composer. Bindable; cleared automatically when the viewport reaches the bottom. Default `false`. */
|
|
81
|
-
newMessageIndicatorVisible?: boolean;
|
|
82
|
-
/** Additional class name merged onto the `.chat-container` root element. */
|
|
83
|
-
class?: string;
|
|
84
|
-
/** Controls the background of the chat surface. Use `'transparent'` to inherit the host element's background when embedding chat inside a card or panel. Default `'default'`. */
|
|
85
|
-
surfaceMode?: 'default' | 'transparent';
|
|
86
|
-
/**
|
|
87
|
-
* Controls spacing density of the message timeline.
|
|
88
|
-
* - `'comfortable'` (default): standard padding and gap.
|
|
89
|
-
* - `'compact'`: tighter spacing for data-dense contexts (e.g., embedded panels).
|
|
90
|
-
* Action buttons keep `min-height: var(--cinder-touch-target-min)` regardless.
|
|
91
|
-
*/
|
|
92
|
-
density?: 'comfortable' | 'compact';
|
|
93
|
-
/**
|
|
94
|
-
* Visual treatment for message bubbles.
|
|
95
|
-
* - `'bubble'` (default): colored backgrounds differentiate user from assistant.
|
|
96
|
-
* - `'flat'`: no bubble backgrounds; role is communicated via alignment and role label.
|
|
97
|
-
* Text-on-surface contrast meets WCAG AA via `--cinder-text` on `--cinder-surface-inset`.
|
|
98
|
-
*/
|
|
99
|
-
variant?: 'bubble' | 'flat';
|
|
100
|
-
/** Distance in pixels from the bottom of the scroll viewport within which the chat is considered "at bottom" and will auto-scroll on new messages. Default `150`. */
|
|
101
|
-
bottomThreshold?: number;
|
|
102
|
-
/** Distance in pixels scrolled up from the bottom required before the jump-to-latest button appears. Must be greater than `bottomThreshold` to prevent button flickering. Default `200`. */
|
|
103
|
-
jumpThreshold?: number;
|
|
104
|
-
/** Whether a streaming response is currently in progress. When `true`, the composer is disabled and a stop-generating button is shown. Default `false`. */
|
|
105
|
-
streaming?: boolean;
|
|
106
|
-
/** Optional status label displayed in the typing indicator while `streaming` is `true` and no streaming content has arrived yet (e.g. `"Thinking…"` or `"Analyzing file…"`). When omitted, three animated dots are shown. */
|
|
107
|
-
streamingStatus?: string;
|
|
108
|
-
/**
|
|
109
|
-
* Feature-capability flags. Pass a `ChatCapabilities` object to enable or disable
|
|
110
|
-
* individual Chat features (attachments, search, copy, editing, retry) as a group
|
|
111
|
-
* rather than as five separate boolean props.
|
|
112
|
-
*/
|
|
113
|
-
capabilities?: ChatCapabilities;
|
|
114
|
-
/** Explicit role for the composer textarea, for overlay patterns such as ARIA comboboxes. */
|
|
115
|
-
composerRole?: string | undefined;
|
|
116
|
-
/** `aria-expanded` passed to the composer textarea for overlays such as slash-command menus. */
|
|
117
|
-
composerAriaExpanded?: boolean | 'true' | 'false' | undefined;
|
|
118
|
-
/** `aria-controls` passed to the composer textarea for overlays such as slash-command menus. */
|
|
119
|
-
composerAriaControls?: string | undefined;
|
|
120
|
-
/** `aria-activedescendant` passed to the composer textarea for overlays such as slash-command menus. */
|
|
121
|
-
composerAriaActiveDescendant?: string | undefined;
|
|
122
|
-
/** `aria-autocomplete` passed to the composer textarea for overlays such as slash-command menus. */
|
|
123
|
-
composerAriaAutocomplete?: 'none' | 'inline' | 'list' | 'both' | undefined;
|
|
124
|
-
/** Use the virtualized message render path for long transcripts. The complete `ConversationHistory` remains unchanged; only the DOM window is reduced. Default `false`. */
|
|
125
|
-
virtualized?: boolean;
|
|
126
|
-
/** Estimated row height in pixels for virtualized message rows. Default `88`. */
|
|
127
|
-
virtualizationEstimatedRowHeight?: number;
|
|
128
|
-
/** Number of extra virtual rows rendered before and after the viewport. Default `3`. */
|
|
129
|
-
virtualizationOverscan?: number;
|
|
130
|
-
/** Initial virtualized viewport height used before measurement. Default `640`. */
|
|
131
|
-
virtualizationInitialHeight?: number;
|
|
132
|
-
/** Whether the explicit "Load earlier messages" trigger is shown when a load handler exists. Default `true`. */
|
|
133
|
-
moreHistoryAvailable?: boolean;
|
|
134
|
-
/** Label for the history pagination trigger. Default `"Load earlier messages"`. */
|
|
135
|
-
loadEarlierLabel?: string;
|
|
136
|
-
/** Status text while older messages are loading. Default `"Loading earlier messages"`. */
|
|
137
|
-
loadingEarlierLabel?: string;
|
|
138
|
-
header?: Snippet;
|
|
139
|
-
empty?: Snippet;
|
|
140
|
-
/** List of suggested starter prompt strings shown as clickable buttons in the default empty state. Clicking a prompt submits it immediately as a user message. Has no effect when a custom `empty` snippet is provided. */
|
|
141
|
-
emptyPrompts?: string[];
|
|
142
|
-
messageActions?: Snippet<[Message]>;
|
|
143
|
-
messageStatus?: Snippet<[Message]>;
|
|
144
|
-
/**
|
|
145
|
-
* Full-row override. Renders an entire message row; receives the message and
|
|
146
|
-
* a `renderDefault` snippet for the built-in row (inversion of control), so a
|
|
147
|
-
* consumer can wrap or fully replace specific rows.
|
|
148
|
-
*/
|
|
149
|
-
row?: ChatRowOverride;
|
|
150
|
-
/**
|
|
151
|
-
* Per-message-part override. Replaces the rendering of an individual body part
|
|
152
|
-
* (markdown, tool call, tool result) while delegating the rest to the built-ins
|
|
153
|
-
* via the `renderDefault` snippet it receives. Image parts are excluded — they
|
|
154
|
-
* render through the grouped attachment grid, not this override.
|
|
155
|
-
*/
|
|
156
|
-
messagePart?: MessagePartOverride;
|
|
157
|
-
viewportAttachment?: Attachment<HTMLElement>;
|
|
158
|
-
/**
|
|
159
|
-
* Participants who are currently typing. Out-of-band UI state — NOT stored on
|
|
160
|
-
* `Message`. Pass an array of {@link TypingParticipant} objects; the component
|
|
161
|
-
* renders a per-participant typing indicator above the input. The adapter's
|
|
162
|
-
* `onTypingChange` push handler feeds the same indicator when an adapter is
|
|
163
|
-
* wired. Default `undefined` (indicator hidden).
|
|
164
|
-
*/
|
|
165
|
-
typingParticipants?: TypingParticipant[];
|
|
166
|
-
/**
|
|
167
|
-
* Per-message read receipt state. Out-of-band UI state — NOT stored on `Message`.
|
|
168
|
-
* Pass a `Map` keyed by message id with a {@link ReadReceipt} value; the
|
|
169
|
-
* component renders a receipt badge on USER messages only. The adapter's
|
|
170
|
-
* `onReadReceipt` push handler populates the same state when an adapter is wired.
|
|
171
|
-
* Default `undefined` (no receipts shown).
|
|
172
|
-
*/
|
|
173
|
-
readReceipts?: Map<string, ReadReceipt>;
|
|
174
|
-
/**
|
|
175
|
-
* Optional command/transport boundary around `conversation`. Its methods take
|
|
176
|
-
* precedence over the matching callback props (e.g. `sendMessage` over
|
|
177
|
-
* `onsubmit`); omit it and Chat behaves exactly as with plain callbacks.
|
|
178
|
-
*/
|
|
179
|
-
adapter?: ChatAdapter;
|
|
180
|
-
/** Called when an adapter command fails — either a rejected promise or a synchronous throw from the method. */
|
|
181
|
-
onadaptererror?: (event: ChatAdapterErrorEvent) => void;
|
|
182
|
-
/** Forwarded from the adapter's real-time `onMessage` push (consumer owns the transcript). */
|
|
183
|
-
onpushmessage?: (message: Message) => void;
|
|
184
|
-
/** Forwarded from the adapter's real-time `onTypingChange` push. */
|
|
185
|
-
ontypingchange?: (isTyping: boolean) => void;
|
|
186
|
-
/** Forwarded from the adapter's real-time `onReadReceipt` push. */
|
|
187
|
-
onreadreceipt?: (event: ChatReadReceiptEvent) => void;
|
|
188
|
-
onsubmit?: (event: ChatSubmitEvent) => void;
|
|
189
|
-
onretry?: (messageId: string) => void;
|
|
190
|
-
onedit?: (event: {
|
|
191
|
-
messageId: string;
|
|
192
|
-
content: string;
|
|
193
|
-
}) => void;
|
|
194
|
-
/**
|
|
195
|
-
* Called when the user approves an action-required tool call. The
|
|
196
|
-
* consumer is responsible for updating its transcript (e.g. calling
|
|
197
|
-
* conversationalist to unblock the pending tool) and triggering a new
|
|
198
|
-
* generation. When an adapter is also wired, Chat calls
|
|
199
|
-
* `adapter.approveToolCall(toolCallId)` first and then this callback.
|
|
200
|
-
*/
|
|
201
|
-
onapprove?: (toolCallId: string) => void;
|
|
202
|
-
/**
|
|
203
|
-
* Called when the user denies an action-required tool call. When an
|
|
204
|
-
* adapter is also wired, Chat calls `adapter.denyToolCall(toolCallId)` first
|
|
205
|
-
* and then this callback.
|
|
206
|
-
*/
|
|
207
|
-
ondeny?: (toolCallId: string) => void;
|
|
208
|
-
/**
|
|
209
|
-
* Override or supplement the reasoning text for a message. Called per-message;
|
|
210
|
-
* return a non-empty string to show a reasoning block, `undefined` to fall back
|
|
211
|
-
* to `message.metadata['cinder:reasoning']`, empty string to suppress reasoning.
|
|
212
|
-
*/
|
|
213
|
-
messageReasoning?: (message: Message) => string | undefined;
|
|
214
|
-
/**
|
|
215
|
-
* Override or supplement the step list for a message. Called per-message;
|
|
216
|
-
* return an array to show step indicators, `undefined` to fall back to
|
|
217
|
-
* `message.metadata['cinder:steps']`. An empty array suppresses steps.
|
|
218
|
-
*/
|
|
219
|
-
messageSteps?: (message: Message) => StepInfo[] | undefined;
|
|
220
|
-
/**
|
|
221
|
-
* Override or supplement the suggestion list for a message. Called
|
|
222
|
-
* per-message; return an array of label strings to show suggestion chips,
|
|
223
|
-
* `undefined` to fall back to `message.metadata['cinder:suggestions']`. An
|
|
224
|
-
* empty array suppresses suggestions.
|
|
225
|
-
*/
|
|
226
|
-
messageSuggestions?: (message: Message) => string[] | undefined;
|
|
227
|
-
/**
|
|
228
|
-
* Called when the user selects a suggestion chip. The label string is
|
|
229
|
-
* passed back. The consumer is responsible for submitting it as a new user
|
|
230
|
-
* message.
|
|
231
|
-
*/
|
|
232
|
-
onsuggestionselect?: (label: string) => void;
|
|
233
|
-
/** Called when the explicit history trigger is activated. The consumer prepends compatible messages into `conversation`. */
|
|
234
|
-
onloadhistory?: () => void | Promise<void>;
|
|
235
|
-
onstopgenerating?: (event: ChatStopGeneratingEvent) => void;
|
|
236
|
-
onjumptolatest?: () => void;
|
|
237
|
-
onscrollstatechange?: (event: ChatScrollStateChangeEvent) => void;
|
|
238
|
-
onunreadindicatorchange?: (event: ChatUnreadIndicatorChangeEvent) => void;
|
|
239
|
-
onexpandedchange?: (expanded: boolean) => void;
|
|
240
|
-
onattachmentadd?: (attachment: ChatAttachment) => void;
|
|
241
|
-
onattachmentremove?: (attachment: ChatAttachment) => void;
|
|
242
|
-
onattachmentfailure?: (file: File, error: string) => void;
|
|
243
|
-
/**
|
|
244
|
-
* Called with the composer's current plain-text value on every composer
|
|
245
|
-
* input event. The optional event exposes the textarea for composer-bound
|
|
246
|
-
* overlays without reaching into `.chat-input-editor` DOM directly.
|
|
247
|
-
*/
|
|
248
|
-
oncomposerinput?: (value: string, event?: Event) => void;
|
|
249
|
-
/**
|
|
250
|
-
* Called before Chat's internal composer key handling when a keydown
|
|
251
|
-
* originates from the composer textarea. Call `event.preventDefault()` to
|
|
252
|
-
* let an overlay consume Arrow keys, Enter, or Escape before Enter-to-send.
|
|
253
|
-
* Chat does not call this hook during IME composition, so Enter can still
|
|
254
|
-
* confirm the active candidate instead of sending.
|
|
255
|
-
*/
|
|
256
|
-
oncomposerkeydown?: (event: KeyboardEvent) => void;
|
|
257
|
-
/**
|
|
258
|
-
* Called after pointer or selection activity may have moved the composer
|
|
259
|
-
* caret without changing text. Overlay primitives can resync their active
|
|
260
|
-
* token from the textarea selection.
|
|
261
|
-
*/
|
|
262
|
-
oncomposerselectionchange?: (event: Event) => void;
|
|
263
|
-
/**
|
|
264
|
-
* Called when focus leaves the composer textarea. Overlay primitives can use
|
|
265
|
-
* this to dismiss without preventing native focus movement.
|
|
266
|
-
*/
|
|
267
|
-
oncomposerblur?: (event: FocusEvent) => void;
|
|
268
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
function __accessProp(key) {
|
|
7
|
-
return this[key];
|
|
8
|
-
}
|
|
9
|
-
var __toESMCache_node;
|
|
10
|
-
var __toESMCache_esm;
|
|
11
|
-
var __toESM = (mod, isNodeMode, target) => {
|
|
12
|
-
var canCache = mod != null && typeof mod === "object";
|
|
13
|
-
if (canCache) {
|
|
14
|
-
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
15
|
-
var cached = cache.get(mod);
|
|
16
|
-
if (cached)
|
|
17
|
-
return cached;
|
|
18
|
-
}
|
|
19
|
-
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
20
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
-
for (let key of __getOwnPropNames(mod))
|
|
22
|
-
if (!__hasOwnProp.call(to, key))
|
|
23
|
-
__defProp(to, key, {
|
|
24
|
-
get: __accessProp.bind(mod, key),
|
|
25
|
-
enumerable: true
|
|
26
|
-
});
|
|
27
|
-
if (canCache)
|
|
28
|
-
cache.set(mod, to);
|
|
29
|
-
return to;
|
|
30
|
-
};
|
|
31
|
-
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
32
|
-
var __returnValue = (v) => v;
|
|
33
|
-
function __exportSetter(name, newValue) {
|
|
34
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
35
|
-
}
|
|
36
|
-
var __export = (target, all) => {
|
|
37
|
-
for (var name in all)
|
|
38
|
-
__defProp(target, name, {
|
|
39
|
-
get: all[name],
|
|
40
|
-
enumerable: true,
|
|
41
|
-
configurable: true,
|
|
42
|
-
set: __exportSetter.bind(all, name)
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
46
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
47
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
48
|
-
}) : x)(function(x) {
|
|
49
|
-
if (typeof require !== "undefined")
|
|
50
|
-
return require.apply(this, arguments);
|
|
51
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
// src/components/chat/chat.variables.ts
|
|
55
|
-
var variables = [];
|
|
56
|
-
var chat_variables_default = variables;
|
|
57
|
-
export {
|
|
58
|
-
chat_variables_default as default
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
//# debugId=3F716B6A999EA50E64756E2164756E21
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { MessageInput } from '../conversation-model.ts';
|
|
2
|
-
import type { ChatAttachment } from '../input/chat-attachment.ts';
|
|
3
|
-
/** Event fired when a message is submitted. */
|
|
4
|
-
export type ChatSubmitEvent = {
|
|
5
|
-
message: MessageInput;
|
|
6
|
-
attachments: ChatAttachment[];
|
|
7
|
-
};
|
|
8
|
-
/** Event fired when stop generating is requested. */
|
|
9
|
-
export type ChatStopGeneratingEvent = {
|
|
10
|
-
messageId: string;
|
|
11
|
-
};
|
|
12
|
-
/** Event fired when scroll state changes. */
|
|
13
|
-
export type ChatScrollStateChangeEvent = {
|
|
14
|
-
atBottom: boolean;
|
|
15
|
-
scrollTop: number;
|
|
16
|
-
scrollHeight: number;
|
|
17
|
-
};
|
|
18
|
-
/** Event fired when unread indicator state changes. */
|
|
19
|
-
export type ChatUnreadIndicatorChangeEvent = {
|
|
20
|
-
unreadCount: number;
|
|
21
|
-
newMessageIndicatorVisible: boolean;
|
|
22
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type ChatHistoryTriggerProps = {
|
|
2
|
-
/** Whether the history request is in flight. */
|
|
3
|
-
loading?: boolean;
|
|
4
|
-
/** Button label while idle. */
|
|
5
|
-
label?: string;
|
|
6
|
-
/** Button label while loading. */
|
|
7
|
-
loadingLabel?: string;
|
|
8
|
-
/** Called when the user requests older messages. */
|
|
9
|
-
onload?: () => void;
|
|
10
|
-
};
|
|
11
|
-
declare const ChatHistoryTrigger: import("svelte").Component<ChatHistoryTriggerProps, {
|
|
12
|
-
focus: (options?: FocusOptions | undefined) => void;
|
|
13
|
-
}, "">;
|
|
14
|
-
type ChatHistoryTrigger = ReturnType<typeof ChatHistoryTrigger>;
|
|
15
|
-
export default ChatHistoryTrigger;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Jump-to-latest button and new message indicator for the chat container.
|
|
3
|
-
*
|
|
4
|
-
* Displays:
|
|
5
|
-
* - A jump button when scrolled far enough from bottom
|
|
6
|
-
* - A centered "new messages" indicator in the hysteresis zone
|
|
7
|
-
*/
|
|
8
|
-
export type ChatJumpControlsProps = {
|
|
9
|
-
/** Whether the jump button should be visible */
|
|
10
|
-
showJumpButton: boolean;
|
|
11
|
-
/** Whether the new message indicator should be visible */
|
|
12
|
-
hasNewMessageIndicator: boolean;
|
|
13
|
-
/** Current unread message count */
|
|
14
|
-
unreadCount: number;
|
|
15
|
-
/** Formatted unread count for display (caps at "99+") */
|
|
16
|
-
displayUnreadCount: string;
|
|
17
|
-
/** Whether the count exceeds 99 (for compact badge styling) */
|
|
18
|
-
hasLargeCount: boolean;
|
|
19
|
-
/** Callback when jump-to-latest is clicked */
|
|
20
|
-
onjumptolatest?: () => void;
|
|
21
|
-
};
|
|
22
|
-
declare const ChatJumpControls: import("svelte").Component<ChatJumpControlsProps, {}, "">;
|
|
23
|
-
type ChatJumpControls = ReturnType<typeof ChatJumpControls>;
|
|
24
|
-
export default ChatJumpControls;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Per-participant typing indicator for the Chat component.
|
|
3
|
-
*
|
|
4
|
-
* A single always-in-DOM outer `<div>` wrapper sits above the bottom sentinel in
|
|
5
|
-
* the message timeline. Its text is empty when nobody is typing (the outer wrapper
|
|
6
|
-
* is never removed from the DOM). The inner `.chat-participant-typing-indicator`
|
|
7
|
-
* div mounts/unmounts via `{#if isActive}` — this is intentional so the
|
|
8
|
-
* entrance animation replays on each new typing event.
|
|
9
|
-
*
|
|
10
|
-
* The aria-live announcement region is NOT emitted by this component. It lives in
|
|
11
|
-
* chat.svelte as a sibling of `ChatStatusAnnouncer`, outside the `role="log"` div,
|
|
12
|
-
* to prevent double-announcement from nested live regions. This component handles
|
|
13
|
-
* the visual rendering only.
|
|
14
|
-
*
|
|
15
|
-
* Accessibility:
|
|
16
|
-
* - The outer wrapper is `aria-hidden="true"` — AT users receive the typing
|
|
17
|
-
* announcement from the dedicated live region in the container.
|
|
18
|
-
* - data-cinder-participant-typing set when participantCount > 0.
|
|
19
|
-
* - data-cinder-participant-count reflects the exact count.
|
|
20
|
-
*
|
|
21
|
-
* Reduced motion: switches the entrance animation to an opacity fade.
|
|
22
|
-
*/
|
|
23
|
-
export type ChatParticipantTypingProps = {
|
|
24
|
-
/** The visible typing label (e.g. "Alice is typing…"). Empty string when nobody is typing. */
|
|
25
|
-
typingLabel: string;
|
|
26
|
-
/** Total number of currently-typing participants. */
|
|
27
|
-
participantCount: number;
|
|
28
|
-
};
|
|
29
|
-
declare const ChatParticipantTyping: import("svelte").Component<ChatParticipantTypingProps, {}, "">;
|
|
30
|
-
type ChatParticipantTyping = ReturnType<typeof ChatParticipantTyping>;
|
|
31
|
-
export default ChatParticipantTyping;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Search bar for in-conversation message search.
|
|
3
|
-
*
|
|
4
|
-
* Renders an input field, match counter, navigation buttons, and a close button.
|
|
5
|
-
* Auto-focuses the input when mounted.
|
|
6
|
-
*
|
|
7
|
-
* Keyboard shortcuts:
|
|
8
|
-
* - Enter: next match
|
|
9
|
-
* - Shift+Enter: previous match
|
|
10
|
-
* - Escape: close
|
|
11
|
-
*/
|
|
12
|
-
export type ChatSearchBarProps = {
|
|
13
|
-
/**
|
|
14
|
-
* Unique namespace for this search bar's ARIA IDs.
|
|
15
|
-
* Must match the `id` prop of the parent chat component so that multiple
|
|
16
|
-
* chat instances on the same page do not produce duplicate DOM IDs.
|
|
17
|
-
*/
|
|
18
|
-
instanceId: string;
|
|
19
|
-
/** Current search query */
|
|
20
|
-
query: string;
|
|
21
|
-
/** Total number of matches */
|
|
22
|
-
matchCount: number;
|
|
23
|
-
/** Zero-based index of the current match */
|
|
24
|
-
currentMatchIndex: number;
|
|
25
|
-
/** Called when the user changes the query */
|
|
26
|
-
onquerychange: (query: string) => void;
|
|
27
|
-
/** Called when the user requests the next match */
|
|
28
|
-
onnext: () => void;
|
|
29
|
-
/** Called when the user requests the previous match */
|
|
30
|
-
onprevious: () => void;
|
|
31
|
-
/** Called when the user closes the search bar */
|
|
32
|
-
onclose: () => void;
|
|
33
|
-
};
|
|
34
|
-
declare const ChatSearchBar: import("svelte").Component<ChatSearchBarProps, {
|
|
35
|
-
focusInput: () => void;
|
|
36
|
-
}, "">;
|
|
37
|
-
type ChatSearchBar = ReturnType<typeof ChatSearchBar>;
|
|
38
|
-
export default ChatSearchBar;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Screen reader status regions for the chat container.
|
|
3
|
-
*
|
|
4
|
-
* Provides:
|
|
5
|
-
* - A status region showing message count
|
|
6
|
-
* - A polite live region for announcing new messages
|
|
7
|
-
* - An assertive live region for urgent action-required announcements
|
|
8
|
-
*/
|
|
9
|
-
export type ChatStatusAnnouncerProps = {
|
|
10
|
-
/** ID for the status element (used by aria-describedby) */
|
|
11
|
-
statusId: string;
|
|
12
|
-
/** Total number of messages in the conversation */
|
|
13
|
-
messageCount: number;
|
|
14
|
-
/** Current screen reader announcement message */
|
|
15
|
-
announcerMessage: string;
|
|
16
|
-
/** Urgent announcement for assertive live region (tool approval, etc.) */
|
|
17
|
-
assertiveMessage?: string;
|
|
18
|
-
};
|
|
19
|
-
declare const ChatStatusAnnouncer: import("svelte").Component<ChatStatusAnnouncerProps, {}, "">;
|
|
20
|
-
type ChatStatusAnnouncer = ReturnType<typeof ChatStatusAnnouncer>;
|
|
21
|
-
export default ChatStatusAnnouncer;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ChatAnnounceLevel, ChatProps } from '../chat.types.ts';
|
|
2
|
-
export type { ChatAnnounceLevel, ChatProps };
|
|
3
|
-
export type { ChatScrollStateChangeEvent, ChatStopGeneratingEvent, ChatSubmitEvent, ChatUnreadIndicatorChangeEvent, } from './chat-events.ts';
|
|
4
|
-
declare const Chat: import("svelte").Component<ChatProps, {
|
|
5
|
-
announce: (message: string, level?: ChatAnnounceLevel) => void;
|
|
6
|
-
scrollToBottom: () => void;
|
|
7
|
-
scrollToTop: () => void;
|
|
8
|
-
focusInput: () => void;
|
|
9
|
-
clearInput: () => void;
|
|
10
|
-
getComposerValue: () => string;
|
|
11
|
-
getEditorElement: () => HTMLTextAreaElement | null;
|
|
12
|
-
beginStreaming: (messageId: string) => void;
|
|
13
|
-
pushToken: (token: string) => void;
|
|
14
|
-
endStreaming: () => void;
|
|
15
|
-
}, "unreadCount" | "atBottom" | "newMessageIndicatorVisible">;
|
|
16
|
-
type Chat = ReturnType<typeof Chat>;
|
|
17
|
-
export default Chat;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type { ChatScrollStateChangeEvent, ChatStopGeneratingEvent, ChatSubmitEvent, ChatUnreadIndicatorChangeEvent, } from './chat-events.ts';
|
|
2
|
-
export { default as Chat } from './chat.svelte';
|
|
3
|
-
export { DEFAULT_SCROLL_CONFIGURATION, calculateScrollToBottom, calculateUnreadCount, extractTimestamp, findUnreadBoundaryIndex, formatUnreadCount, isAtBottom, isLargeCount, shouldShowJumpToLatest, } from './scroll-utilities';
|
|
4
|
-
export type { ScrollConfiguration, ScrollState } from './scroll-utilities';
|
|
5
|
-
export { useChatScrollState, type UseChatScrollStateOptions, type UseChatScrollStateReturn, } from './use-chat-scroll-state.svelte';
|
|
6
|
-
export { useChatUnreadState, type UseChatUnreadStateOptions, type UseChatUnreadStateReturn, } from './use-chat-unread-state.svelte';
|
|
7
|
-
export { useChatKeyboardNav, type UseChatKeyboardNavOptions, type UseChatKeyboardNavReturn, } from './use-chat-keyboard-nav.svelte';
|
|
8
|
-
export { useChatMessageGroups, type DateItem, type MessageItem, type MessageWithDateItem, type ToolCallPair, type UseChatMessageGroupsOptions, type UseChatMessageGroupsReturn, } from './use-chat-message-groups.svelte';
|
|
9
|
-
export { default as ChatJumpControls } from './chat-jump-controls.svelte';
|
|
10
|
-
export { default as ChatStatusAnnouncer } from './chat-status-announcer.svelte';
|
|
11
|
-
export { default as ChatSearchBar } from './chat-search-bar.svelte';
|
|
12
|
-
export { useChatSearch, type ChatSearchMatch, type UseChatSearchOptions, type UseChatSearchReturn, } from './use-chat-search.svelte';
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure utility functions for scroll position calculations and unread tracking.
|
|
3
|
-
*
|
|
4
|
-
* These functions are intentionally pure (no DOM access) for testability.
|
|
5
|
-
* They accept scroll state as input and return computed values.
|
|
6
|
-
*/
|
|
7
|
-
import type { Message } from '../conversation-model.ts';
|
|
8
|
-
/**
|
|
9
|
-
* Represents the scroll state of a container element.
|
|
10
|
-
* These values come from HTMLElement scroll properties.
|
|
11
|
-
*/
|
|
12
|
-
export type ScrollState = {
|
|
13
|
-
/** Current scroll position from top (scrollTop) */
|
|
14
|
-
scrollTop: number;
|
|
15
|
-
/** Total scrollable height (scrollHeight) */
|
|
16
|
-
scrollHeight: number;
|
|
17
|
-
/** Visible viewport height (clientHeight) */
|
|
18
|
-
clientHeight: number;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Configuration for scroll behavior thresholds.
|
|
22
|
-
*/
|
|
23
|
-
export type ScrollConfiguration = {
|
|
24
|
-
/**
|
|
25
|
-
* Pixels from bottom to consider "at bottom".
|
|
26
|
-
* A generous threshold handles:
|
|
27
|
-
* - Fractional pixel values on high-DPI displays
|
|
28
|
-
* - Imprecise touch scrolling
|
|
29
|
-
* - Small layout shifts from loading content
|
|
30
|
-
* @default 150
|
|
31
|
-
*/
|
|
32
|
-
bottomThreshold: number;
|
|
33
|
-
/**
|
|
34
|
-
* Pixels scrolled up before showing jump-to-latest button.
|
|
35
|
-
* Slightly larger than bottomThreshold to create hysteresis
|
|
36
|
-
* (prevents button flickering near the threshold).
|
|
37
|
-
* @default 200
|
|
38
|
-
*/
|
|
39
|
-
jumpThreshold: number;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Default scroll configuration values.
|
|
43
|
-
*
|
|
44
|
-
* The 150px bottom threshold accommodates 2-3 message previews,
|
|
45
|
-
* which matches user mental models of "being at the end".
|
|
46
|
-
*/
|
|
47
|
-
export declare const DEFAULT_SCROLL_CONFIGURATION: ScrollConfiguration;
|
|
48
|
-
/**
|
|
49
|
-
* Determines if the scroll position is at or near the bottom.
|
|
50
|
-
*
|
|
51
|
-
* Used to decide whether to auto-scroll when new messages arrive.
|
|
52
|
-
* If true, new messages should trigger scroll-to-bottom.
|
|
53
|
-
* If false, the user is reading history and scroll should not change.
|
|
54
|
-
*
|
|
55
|
-
* @param state - Current scroll state from the container
|
|
56
|
-
* @param threshold - Pixels from bottom to consider "at bottom"
|
|
57
|
-
* @returns true if within threshold of the bottom
|
|
58
|
-
*/
|
|
59
|
-
export declare function isAtBottom(state: ScrollState, threshold: number): boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Determines if the jump-to-latest button should be visible.
|
|
62
|
-
*
|
|
63
|
-
* Uses a separate (larger) threshold than isAtBottom to create hysteresis,
|
|
64
|
-
* preventing the button from flickering when scrolling near the threshold.
|
|
65
|
-
*
|
|
66
|
-
* @param state - Current scroll state from the container
|
|
67
|
-
* @param threshold - Pixels from bottom before showing button
|
|
68
|
-
* @returns true if scrolled far enough from bottom to show button
|
|
69
|
-
*/
|
|
70
|
-
export declare function shouldShowJumpToLatest(state: ScrollState, threshold: number): boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Calculates the number of unread messages based on timestamp.
|
|
73
|
-
*
|
|
74
|
-
* @param messages - Array of messages with timestamps
|
|
75
|
-
* @param lastReadTimestamp - Timestamp of the last read message in milliseconds (0 if none read)
|
|
76
|
-
* @returns Count of messages with timestamp > lastReadTimestamp
|
|
77
|
-
*/
|
|
78
|
-
export declare function calculateUnreadCount(messages: Message[], lastReadTimestamp: number): number;
|
|
79
|
-
/**
|
|
80
|
-
* Finds the index where unread messages begin.
|
|
81
|
-
*
|
|
82
|
-
* This is used to insert the "unread divider" in the message list.
|
|
83
|
-
*
|
|
84
|
-
* @param messages - Array of messages with timestamps
|
|
85
|
-
* @param lastReadTimestamp - Timestamp of the last read message in milliseconds
|
|
86
|
-
* @returns Index of first unread message, or -1 if all messages are read
|
|
87
|
-
*/
|
|
88
|
-
export declare function findUnreadBoundaryIndex(messages: Message[], lastReadTimestamp: number): number;
|
|
89
|
-
/**
|
|
90
|
-
* Calculates the scroll position needed to scroll to bottom.
|
|
91
|
-
*
|
|
92
|
-
* @param state - Current scroll state
|
|
93
|
-
* @returns The scrollTop value that would scroll to bottom
|
|
94
|
-
*/
|
|
95
|
-
export declare function calculateScrollToBottom(state: ScrollState): number;
|
|
96
|
-
/**
|
|
97
|
-
* Formats the unread count for display.
|
|
98
|
-
* Caps at 99+ to prevent badge overflow.
|
|
99
|
-
*
|
|
100
|
-
* @param count - Raw unread count
|
|
101
|
-
* @returns Formatted string for display ("1", "50", "99+")
|
|
102
|
-
*/
|
|
103
|
-
export declare function formatUnreadCount(count: number): string;
|
|
104
|
-
/**
|
|
105
|
-
* Determines if a count should be displayed with compact styling.
|
|
106
|
-
* Used to adjust badge styling for large numbers.
|
|
107
|
-
*
|
|
108
|
-
* @param count - Raw unread count
|
|
109
|
-
* @returns true if count exceeds 99
|
|
110
|
-
*/
|
|
111
|
-
export declare function isLargeCount(count: number): boolean;
|
|
112
|
-
/**
|
|
113
|
-
* Extracts a numeric timestamp from a message for comparison.
|
|
114
|
-
* Exported for use in components that need to track last-read timestamps.
|
|
115
|
-
*
|
|
116
|
-
* @param message - Message to extract timestamp from
|
|
117
|
-
* @returns Timestamp as milliseconds since epoch, or current time if not available
|
|
118
|
-
*/
|
|
119
|
-
export declare function extractTimestamp(message: Message): number;
|