@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,9 +0,0 @@
|
|
|
1
|
-
export { deriveAttachmentKind, type AttachmentKind } from './attachment-kind.js';
|
|
2
|
-
export { default as ChatAttachmentPreview } from './chat-attachment-preview.svelte';
|
|
3
|
-
export {
|
|
4
|
-
serializeChatAttachment,
|
|
5
|
-
serializeChatAttachments,
|
|
6
|
-
type SerializedChatAttachment,
|
|
7
|
-
} from './chat-attachment-serialization.ts';
|
|
8
|
-
export type { ChatAttachment } from './chat-attachment.ts';
|
|
9
|
-
export { default as ChatInput } from './chat-input.svelte';
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
export {};
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<script lang="ts">
|
|
6
|
-
import { classNames } from '../../../utilities/class-names.ts';
|
|
7
|
-
let { date, dateFormatter, class: className, ...rest } = $props();
|
|
8
|
-
// Normalize date to Date object
|
|
9
|
-
const dateObj = $derived(typeof date === 'string' ? new Date(date) : date);
|
|
10
|
-
// Check if the date is valid
|
|
11
|
-
const isValidDate = $derived(!isNaN(dateObj.getTime()));
|
|
12
|
-
// Format the date for display
|
|
13
|
-
const formattedDate = $derived.by(() => {
|
|
14
|
-
if (!isValidDate) {
|
|
15
|
-
return 'Invalid date';
|
|
16
|
-
}
|
|
17
|
-
if (dateFormatter) {
|
|
18
|
-
return dateFormatter(dateObj);
|
|
19
|
-
}
|
|
20
|
-
const now = new Date();
|
|
21
|
-
const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
|
22
|
-
// Use date arithmetic instead of ms subtraction to handle DST transitions correctly
|
|
23
|
-
const yesterday = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 1);
|
|
24
|
-
const dateOnly = new Date(dateObj.getFullYear(), dateObj.getMonth(), dateObj.getDate());
|
|
25
|
-
if (dateOnly.getTime() === today.getTime()) {
|
|
26
|
-
return 'Today';
|
|
27
|
-
}
|
|
28
|
-
if (dateOnly.getTime() === yesterday.getTime()) {
|
|
29
|
-
return 'Yesterday';
|
|
30
|
-
}
|
|
31
|
-
// Use Intl for other dates
|
|
32
|
-
return new Intl.DateTimeFormat(undefined, {
|
|
33
|
-
weekday: 'long',
|
|
34
|
-
month: 'long',
|
|
35
|
-
day: 'numeric',
|
|
36
|
-
}).format(dateObj);
|
|
37
|
-
});
|
|
38
|
-
// ISO date for machine readability (fallback to empty string for invalid dates)
|
|
39
|
-
const isoDate = $derived(isValidDate ? dateObj.toISOString().split('T')[0] : '');
|
|
40
|
-
</script>
|
|
41
|
-
|
|
42
|
-
<div
|
|
43
|
-
class={classNames('chat-date-separator', className)}
|
|
44
|
-
role="separator"
|
|
45
|
-
aria-label={`Messages from ${formattedDate}`}
|
|
46
|
-
{...rest}
|
|
47
|
-
>
|
|
48
|
-
<span class="chat-date-separator-line" aria-hidden="true"></span>
|
|
49
|
-
{#if isValidDate}
|
|
50
|
-
<time class="chat-date-separator-text" datetime={isoDate}>
|
|
51
|
-
{formattedDate}
|
|
52
|
-
</time>
|
|
53
|
-
{:else}
|
|
54
|
-
<span class="chat-date-separator-text">
|
|
55
|
-
{formattedDate}
|
|
56
|
-
</span>
|
|
57
|
-
{/if}
|
|
58
|
-
<span class="chat-date-separator-line" aria-hidden="true"></span>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
<style>
|
|
62
|
-
.chat-date-separator {
|
|
63
|
-
display: flex;
|
|
64
|
-
align-items: center;
|
|
65
|
-
gap: var(--cinder-space-3);
|
|
66
|
-
padding: var(--cinder-space-4) 0;
|
|
67
|
-
|
|
68
|
-
/* Performance: Skip rendering for off-screen separators in long conversations */
|
|
69
|
-
content-visibility: auto;
|
|
70
|
-
contain-intrinsic-size: auto 48px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.chat-date-separator-line {
|
|
74
|
-
flex: 1;
|
|
75
|
-
height: 1px;
|
|
76
|
-
background: var(--cinder-border-muted);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.chat-date-separator-text {
|
|
80
|
-
font-size: var(--cinder-text-xs);
|
|
81
|
-
font-weight: var(--cinder-font-medium);
|
|
82
|
-
color: var(--cinder-text-subtle);
|
|
83
|
-
text-transform: uppercase;
|
|
84
|
-
letter-spacing: 0.05em;
|
|
85
|
-
white-space: nowrap;
|
|
86
|
-
}
|
|
87
|
-
</style>
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { toRenderUnits, } from './chat-message-parts.ts';
|
|
3
|
-
import MarkdownPart from './parts/markdown-part.svelte';
|
|
4
|
-
import ToolCallPart from './parts/tool-call-part.svelte';
|
|
5
|
-
import ToolResultPart from './parts/tool-result-part.svelte';
|
|
6
|
-
import ToolApprovalPart from './parts/tool-approval-part.svelte';
|
|
7
|
-
import ReasoningPart from './parts/reasoning-part.svelte';
|
|
8
|
-
import StepPart from './parts/step-part.svelte';
|
|
9
|
-
import SuggestionPart from './parts/suggestion-part.svelte';
|
|
10
|
-
import ImagePart from './parts/image-part.svelte';
|
|
11
|
-
let { parts, messagePart, expanded = false, ontoggle, onapprove, ondeny, reasoningExpanded = false, onreasoning, onsuggestionselect, } = $props();
|
|
12
|
-
const units = $derived(toRenderUnits(parts));
|
|
13
|
-
// APG toolbar roving-tabindex for suggestion chips. `activeIndex` tracks the
|
|
14
|
-
// chip that holds tabindex=0. ArrowRight/ArrowLeft move focus (wrapping);
|
|
15
|
-
// Home/End jump to first/last. Tab and all other keys pass through.
|
|
16
|
-
let activeIndex = $state(0);
|
|
17
|
-
// The chip count can shrink between renders (a new assistant turn with fewer
|
|
18
|
-
// suggestions, or streaming). A raw `activeIndex` left beyond a toolbar's range
|
|
19
|
-
// would leave NO chip with tabindex=0, making that toolbar unreachable by Tab.
|
|
20
|
-
// Clamp against EACH toolbar's own length (not the total across units) so every
|
|
21
|
-
// rendered toolbar always has exactly one tabindex=0 entry point — floored at 0
|
|
22
|
-
// for the empty case.
|
|
23
|
-
function activeChipIndex(count) {
|
|
24
|
-
return count === 0 ? 0 : Math.min(activeIndex, count - 1);
|
|
25
|
-
}
|
|
26
|
-
function handleToolbarKeydown(event, toolbar, count) {
|
|
27
|
-
if (count === 0)
|
|
28
|
-
return;
|
|
29
|
-
const current = Math.min(activeIndex, count - 1);
|
|
30
|
-
let next = current;
|
|
31
|
-
if (event.key === 'ArrowRight') {
|
|
32
|
-
next = (current + 1) % count;
|
|
33
|
-
}
|
|
34
|
-
else if (event.key === 'ArrowLeft') {
|
|
35
|
-
next = (current - 1 + count) % count;
|
|
36
|
-
}
|
|
37
|
-
else if (event.key === 'Home') {
|
|
38
|
-
next = 0;
|
|
39
|
-
}
|
|
40
|
-
else if (event.key === 'End') {
|
|
41
|
-
next = count - 1;
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
event.preventDefault();
|
|
47
|
-
activeIndex = next;
|
|
48
|
-
const chips = toolbar.querySelectorAll('[data-cinder-suggestion]');
|
|
49
|
-
chips[next]?.focus();
|
|
50
|
-
}
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<!--
|
|
54
|
-
Built-in renderer for a single body part. A static `{#if part.type === ...}`
|
|
55
|
-
switch (not a dynamic component map) so the bundler can tree-shake unused part
|
|
56
|
-
components and TypeScript narrows each branch. Image parts and step parts never
|
|
57
|
-
reach here — they render through the grouped `{#each}` path below. The trailing
|
|
58
|
-
`{:else}` is the exhaustiveness sentinel: `part.type` narrows to `never` there,
|
|
59
|
-
so a later Chat task that widens ChatMessagePart without adding a branch surfaces
|
|
60
|
-
a visible dev marker in the DOM rather than silently rendering nothing.
|
|
61
|
-
-->
|
|
62
|
-
{#snippet renderDefault(part: BodyMessagePart)}
|
|
63
|
-
{#if part.type === 'markdown'}
|
|
64
|
-
<MarkdownPart {part} />
|
|
65
|
-
{:else if part.type === 'tool-call'}
|
|
66
|
-
<ToolCallPart {part} {expanded} {ontoggle} />
|
|
67
|
-
{:else if part.type === 'tool-result'}
|
|
68
|
-
<ToolResultPart {part} />
|
|
69
|
-
{:else if part.type === 'tool-approval'}
|
|
70
|
-
<ToolApprovalPart {part} {onapprove} {ondeny} />
|
|
71
|
-
{:else if part.type === 'reasoning'}
|
|
72
|
-
<ReasoningPart {part} expanded={reasoningExpanded} ontoggle={onreasoning} />
|
|
73
|
-
{:else}
|
|
74
|
-
<!-- Unhandled part type — a new ChatMessagePart variant was added without a
|
|
75
|
-
renderer branch. `part` narrows to `never` here, so svelte-check flags
|
|
76
|
-
the unreachable branch when the union widens, and this sentinel makes
|
|
77
|
-
the omission visible in the DOM. -->
|
|
78
|
-
<span data-cinder-unhandled-part aria-hidden="true"></span>
|
|
79
|
-
{/if}
|
|
80
|
-
{/snippet}
|
|
81
|
-
|
|
82
|
-
{#each units as unit (unit.key)}
|
|
83
|
-
{#if unit.kind === 'images'}
|
|
84
|
-
<ImagePart parts={unit.images} />
|
|
85
|
-
{:else if unit.kind === 'steps'}
|
|
86
|
-
<!-- Step parts are grouped and wrapped in a single <ol> stepper. -->
|
|
87
|
-
<ol class="chat-step-list" aria-label="Steps">
|
|
88
|
-
{#each unit.steps as step (step.key)}
|
|
89
|
-
<StepPart part={step} />
|
|
90
|
-
{/each}
|
|
91
|
-
</ol>
|
|
92
|
-
{:else if unit.kind === 'suggestions'}
|
|
93
|
-
<!-- Suggestion chips are grouped into a single toolbar. APG toolbar pattern:
|
|
94
|
-
Tab enters → active chip (tabindex=0); Left/Right arrows move focus
|
|
95
|
-
within (roving tabindex); Tab exits. Home/End jump to first/last.
|
|
96
|
-
[data-cinder-suggested-replies] is the selector used by useChatKeyboardNav
|
|
97
|
-
to suppress message ArrowUp/ArrowDown while focus is inside here. -->
|
|
98
|
-
<div
|
|
99
|
-
class="chat-suggestions"
|
|
100
|
-
role="toolbar"
|
|
101
|
-
aria-label="Suggested replies"
|
|
102
|
-
data-cinder-suggested-replies
|
|
103
|
-
onkeydown={(event) => {
|
|
104
|
-
handleToolbarKeydown(event, event.currentTarget as HTMLElement, unit.suggestions.length);
|
|
105
|
-
}}
|
|
106
|
-
>
|
|
107
|
-
{#each unit.suggestions as suggestion, index (suggestion.key)}
|
|
108
|
-
<SuggestionPart
|
|
109
|
-
part={suggestion}
|
|
110
|
-
{onsuggestionselect}
|
|
111
|
-
tabindex={index === activeChipIndex(unit.suggestions.length) ? 0 : -1}
|
|
112
|
-
/>
|
|
113
|
-
{/each}
|
|
114
|
-
</div>
|
|
115
|
-
{:else if messagePart}
|
|
116
|
-
{@render messagePart(unit.part, renderDefault)}
|
|
117
|
-
{:else}
|
|
118
|
-
{@render renderDefault(unit.part)}
|
|
119
|
-
{/if}
|
|
120
|
-
{/each}
|
|
121
|
-
|
|
122
|
-
<style>
|
|
123
|
-
.chat-step-list {
|
|
124
|
-
display: flex;
|
|
125
|
-
flex-direction: column;
|
|
126
|
-
gap: 0;
|
|
127
|
-
padding: 0;
|
|
128
|
-
margin: 0;
|
|
129
|
-
list-style: none;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.chat-suggestions {
|
|
133
|
-
/* No padding-block-start: the parent .chat-message-body flex column now
|
|
134
|
-
supplies inter-part gap, so an own top padding here would double it. */
|
|
135
|
-
display: flex;
|
|
136
|
-
flex-wrap: wrap;
|
|
137
|
-
gap: var(--cinder-space-2);
|
|
138
|
-
}
|
|
139
|
-
</style>
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Plain-TS support module for the message parts renderer.
|
|
3
|
-
*
|
|
4
|
-
* Types and the pure `toRenderUnits` grouping live here (not in the `.svelte`
|
|
5
|
-
* file) so they are importable under plain `tsc`/`svelte-check` — symbols
|
|
6
|
-
* exported from a `.svelte` `<script module>` are not reliably resolvable
|
|
7
|
-
* outside the Svelte language service.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import type { Snippet } from 'svelte';
|
|
11
|
-
|
|
12
|
-
import type {
|
|
13
|
-
ChatMessagePart,
|
|
14
|
-
ImageMessagePart,
|
|
15
|
-
StepMessagePart,
|
|
16
|
-
SuggestionMessagePart,
|
|
17
|
-
} from '../utilities/types.ts';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* A body part — every renderable part EXCEPT image, step, and suggestion.
|
|
21
|
-
* Image parts render through the grouped attachment path (the grid lays out
|
|
22
|
-
* by total count). Step parts are grouped into the stepper render unit and
|
|
23
|
-
* bypass the per-part override entirely — they never reach `messagePart` or
|
|
24
|
-
* `renderDefault`. Suggestion parts render through the grouped `suggestions`
|
|
25
|
-
* toolbar path so all chips appear inside a single `role="toolbar"` wrapper.
|
|
26
|
-
* None of these flow through the per-part override; the override's type
|
|
27
|
-
* excludes them so a consumer can't write dead branches for them.
|
|
28
|
-
*/
|
|
29
|
-
export type BodyMessagePart = Exclude<
|
|
30
|
-
ChatMessagePart,
|
|
31
|
-
ImageMessagePart | StepMessagePart | SuggestionMessagePart
|
|
32
|
-
>;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Per-part override snippet. Inversion of control: the consumer receives the
|
|
36
|
-
* part AND a `renderDefault` snippet, and decides whether to render its own
|
|
37
|
-
* markup or delegate to the built-in renderer by calling
|
|
38
|
-
* `{@render renderDefault(part)}`. There is no "render empty to fall through"
|
|
39
|
-
* magic — Svelte snippets render DOM and have no inspectable return value, so
|
|
40
|
-
* the fallback is always explicit and SSR-safe.
|
|
41
|
-
*
|
|
42
|
-
* The part is a {@link BodyMessagePart} (image parts are excluded — see above),
|
|
43
|
-
* so the type matches what the override can actually intercept.
|
|
44
|
-
*/
|
|
45
|
-
export type MessagePartOverride = Snippet<
|
|
46
|
-
[part: BodyMessagePart, renderDefault: Snippet<[BodyMessagePart]>]
|
|
47
|
-
>;
|
|
48
|
-
|
|
49
|
-
/** Props for {@link ChatMessagePartsRenderer}. */
|
|
50
|
-
export type ChatMessagePartsRendererProps = {
|
|
51
|
-
/** The ordered render parts for one message. */
|
|
52
|
-
parts: ChatMessagePart[];
|
|
53
|
-
/**
|
|
54
|
-
* Optional per-part override. Applies to body parts (markdown, tool-call,
|
|
55
|
-
* tool-result, tool-approval, reasoning). Image parts, step parts, and
|
|
56
|
-
* suggestion parts always render through the grouped default paths; they are
|
|
57
|
-
* excluded from this override's type and never flow through it. In
|
|
58
|
-
* particular, step parts are accumulated into the stepper render unit and
|
|
59
|
-
* bypass this override entirely — a consumer cannot intercept individual
|
|
60
|
-
* step parts via `messagePart`.
|
|
61
|
-
*/
|
|
62
|
-
messagePart?: MessagePartOverride | undefined;
|
|
63
|
-
/** Disclosure state for tool-call parts. Owned by the message. */
|
|
64
|
-
expanded?: boolean;
|
|
65
|
-
/** Called when a tool-call part's disclosure toggle is activated. */
|
|
66
|
-
ontoggle?: (() => void) | undefined;
|
|
67
|
-
/** Called when the user approves an action-required tool call. */
|
|
68
|
-
onapprove?: ((toolCallId: string) => void) | undefined;
|
|
69
|
-
/** Called when the user denies an action-required tool call. */
|
|
70
|
-
ondeny?: ((toolCallId: string) => void) | undefined;
|
|
71
|
-
/** Whether the reasoning block for this message is expanded. */
|
|
72
|
-
reasoningExpanded?: boolean | undefined;
|
|
73
|
-
/** Called when the reasoning disclosure toggle is activated. */
|
|
74
|
-
onreasoning?: (() => void) | undefined;
|
|
75
|
-
/** Called when the user selects a suggestion chip. */
|
|
76
|
-
onsuggestionselect?: ((label: string) => void) | undefined;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
/** A renderable unit: a single body part, a contiguous run of image parts, a group of step parts, or a group of suggestion chips. */
|
|
80
|
-
export type RenderUnit =
|
|
81
|
-
| {
|
|
82
|
-
kind: 'part';
|
|
83
|
-
part: Exclude<ChatMessagePart, ImageMessagePart | StepMessagePart | SuggestionMessagePart>;
|
|
84
|
-
key: string;
|
|
85
|
-
}
|
|
86
|
-
| { kind: 'images'; images: ImageMessagePart[]; key: string }
|
|
87
|
-
| { kind: 'steps'; steps: StepMessagePart[]; key: string }
|
|
88
|
-
| { kind: 'suggestions'; suggestions: SuggestionMessagePart[]; key: string };
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Collapses a parts array into render units, grouping each maximal run of
|
|
92
|
-
* adjacent image parts into one unit, each maximal run of adjacent step parts
|
|
93
|
-
* into one stepper unit, and each maximal run of adjacent suggestion parts into
|
|
94
|
-
* one toolbar unit. Keeps non-image, non-step, non-suggestion parts individual
|
|
95
|
-
* so the per-part override applies to them; groups images so the attachment
|
|
96
|
-
* grid lays out by total count; groups steps so they render inside a single
|
|
97
|
-
* `<ol>`; groups suggestions so they render inside a single `role="toolbar"`.
|
|
98
|
-
*
|
|
99
|
-
* @param parts - The ordered render parts for one message
|
|
100
|
-
* @returns Render units in order, with image, step, and suggestion runs collapsed
|
|
101
|
-
*/
|
|
102
|
-
export function toRenderUnits(parts: ChatMessagePart[]): RenderUnit[] {
|
|
103
|
-
const units: RenderUnit[] = [];
|
|
104
|
-
let imageRun: ImageMessagePart[] = [];
|
|
105
|
-
let stepRun: StepMessagePart[] = [];
|
|
106
|
-
let suggestionRun: SuggestionMessagePart[] = [];
|
|
107
|
-
|
|
108
|
-
const flushImages = (): void => {
|
|
109
|
-
if (imageRun.length > 0) {
|
|
110
|
-
// The run's key is its first image key — stable as long as the run's
|
|
111
|
-
// leading image keeps identity, which it does (index-based keys).
|
|
112
|
-
units.push({ kind: 'images', images: imageRun, key: `images:${imageRun[0]!.key}` });
|
|
113
|
-
imageRun = [];
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
const flushSteps = (): void => {
|
|
118
|
-
if (stepRun.length > 0) {
|
|
119
|
-
units.push({ kind: 'steps', steps: stepRun, key: `steps:${stepRun[0]!.key}` });
|
|
120
|
-
stepRun = [];
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
const flushSuggestions = (): void => {
|
|
125
|
-
if (suggestionRun.length > 0) {
|
|
126
|
-
units.push({
|
|
127
|
-
kind: 'suggestions',
|
|
128
|
-
suggestions: suggestionRun,
|
|
129
|
-
key: `suggestions:${suggestionRun[0]!.key}`,
|
|
130
|
-
});
|
|
131
|
-
suggestionRun = [];
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
for (const part of parts) {
|
|
136
|
-
if (part.type === 'image') {
|
|
137
|
-
flushSteps();
|
|
138
|
-
flushSuggestions();
|
|
139
|
-
imageRun.push(part);
|
|
140
|
-
continue;
|
|
141
|
-
}
|
|
142
|
-
if (part.type === 'step') {
|
|
143
|
-
flushImages();
|
|
144
|
-
flushSuggestions();
|
|
145
|
-
stepRun.push(part);
|
|
146
|
-
continue;
|
|
147
|
-
}
|
|
148
|
-
if (part.type === 'suggestion') {
|
|
149
|
-
flushImages();
|
|
150
|
-
flushSteps();
|
|
151
|
-
suggestionRun.push(part);
|
|
152
|
-
continue;
|
|
153
|
-
}
|
|
154
|
-
flushImages();
|
|
155
|
-
flushSteps();
|
|
156
|
-
flushSuggestions();
|
|
157
|
-
units.push({ kind: 'part', part, key: part.key });
|
|
158
|
-
}
|
|
159
|
-
flushImages();
|
|
160
|
-
flushSteps();
|
|
161
|
-
flushSuggestions();
|
|
162
|
-
return units;
|
|
163
|
-
}
|