@lostgradient/cinder 0.15.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -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/data-table/index.js +88 -31
- 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/components/table/index.js +85 -28
- package/dist/components/table/table.css +11 -0
- package/dist/components/table/table.schema.js +10 -1
- package/dist/components/table/table.types.d.ts +24 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.js +23266 -30180
- 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 +4 -4
- 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 +4 -4
- 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-jdcq5zza.js → index.server-gwgm8gqg.js} +8 -8
- 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-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-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-h89zk5ev.js → index.server-wasj5rbh.js} +8 -8
- package/dist/server/{index.server-9ra3xv88.js → index.server-x66zvjfc.js} +9 -9
- package/dist/server/index.server-xanq9ppe.js +119 -0
- 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/components/table/table.css +11 -0
- package/src/components/table/table.examples.json +3 -3
- package/src/components/table/table.schema.json +9 -0
- package/src/components/table/table.schema.ts +11 -0
- package/src/components/table/table.svelte +58 -14
- package/src/components/table/table.types.ts +27 -1
- 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-mzj20rfz.js +0 -77
- 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,132 +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
|
-
import MarkdownPreview from './markdown-preview.svelte';
|
|
8
|
-
let { content, expanded = true, threshold = 500, streaming = false, overrideContent, class: className, ...rest } = $props();
|
|
9
|
-
/**
|
|
10
|
-
* Find a truncation boundary by scanning backward from the threshold
|
|
11
|
-
* for a paragraph break (\n\n). Falls back to the last single newline,
|
|
12
|
-
* then to the threshold itself. This newline-based heuristic helps reduce
|
|
13
|
-
* the chance of truncating in the middle of Markdown structures (like
|
|
14
|
-
* code fences, tables, or links), but does not guarantee well-formed HTML.
|
|
15
|
-
*/
|
|
16
|
-
function findSafeBoundary(text, limit) {
|
|
17
|
-
// Look for the last paragraph break before the limit
|
|
18
|
-
const paragraphBreak = text.lastIndexOf('\n\n', limit);
|
|
19
|
-
if (paragraphBreak > 0)
|
|
20
|
-
return paragraphBreak;
|
|
21
|
-
// Fall back to the last line break
|
|
22
|
-
const lineBreak = text.lastIndexOf('\n', limit);
|
|
23
|
-
if (lineBreak > 0)
|
|
24
|
-
return lineBreak;
|
|
25
|
-
// Last resort: use the limit directly
|
|
26
|
-
return limit;
|
|
27
|
-
}
|
|
28
|
-
function splitStreamingContent(text) {
|
|
29
|
-
const codeFenceCount = (text.match(/```/g) ?? []).length;
|
|
30
|
-
if (codeFenceCount % 2 !== 0) {
|
|
31
|
-
const lastFenceIndex = text.lastIndexOf('```');
|
|
32
|
-
return {
|
|
33
|
-
rendered: text.slice(0, lastFenceIndex),
|
|
34
|
-
tail: text.slice(lastFenceIndex),
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
const boundary = findSafeBoundary(text, text.length);
|
|
38
|
-
return {
|
|
39
|
-
rendered: text.slice(0, boundary),
|
|
40
|
-
tail: text.slice(boundary),
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
// The effective content: use override when streaming, otherwise the message content
|
|
44
|
-
const effectiveContent = $derived(overrideContent ?? content);
|
|
45
|
-
// Streaming mode: split content into rendered markdown and raw tail
|
|
46
|
-
const streamingSplit = $derived.by(() => {
|
|
47
|
-
if (!streaming)
|
|
48
|
-
return null;
|
|
49
|
-
return splitStreamingContent(effectiveContent);
|
|
50
|
-
});
|
|
51
|
-
// Compute display content based on expanded state (non-streaming only)
|
|
52
|
-
const displayContent = $derived.by(() => {
|
|
53
|
-
if (streaming) {
|
|
54
|
-
return streamingSplit?.rendered ?? '';
|
|
55
|
-
}
|
|
56
|
-
if (expanded || effectiveContent.length <= threshold) {
|
|
57
|
-
return effectiveContent;
|
|
58
|
-
}
|
|
59
|
-
const boundary = findSafeBoundary(effectiveContent, threshold);
|
|
60
|
-
return effectiveContent.slice(0, boundary);
|
|
61
|
-
});
|
|
62
|
-
// The raw tail text during streaming (displayed with pre-wrap + cursor)
|
|
63
|
-
const streamingTail = $derived(streaming ? (streamingSplit?.tail ?? '') : '');
|
|
64
|
-
// Whether truncation is active (used by parent to show ellipsis indicator)
|
|
65
|
-
const isTruncated = $derived(!streaming && !expanded && effectiveContent.length > threshold);
|
|
66
|
-
</script>
|
|
67
|
-
|
|
68
|
-
<div
|
|
69
|
-
class={classNames('message-content', streaming && 'message-content-streaming', className)}
|
|
70
|
-
{...rest}
|
|
71
|
-
>
|
|
72
|
-
{#if displayContent}
|
|
73
|
-
<MarkdownPreview content={displayContent} />
|
|
74
|
-
{/if}
|
|
75
|
-
{#if streaming && streamingTail}
|
|
76
|
-
<span class="message-content-tail">{streamingTail}</span>
|
|
77
|
-
{/if}
|
|
78
|
-
{#if streaming}
|
|
79
|
-
<span class="message-content-cursor" aria-hidden="true"></span>
|
|
80
|
-
{/if}
|
|
81
|
-
{#if isTruncated}
|
|
82
|
-
<span class="message-content-ellipsis" aria-hidden="true">...</span>
|
|
83
|
-
{/if}
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
<style>
|
|
87
|
-
.message-content {
|
|
88
|
-
/* Typography inherited from MarkdownPreview component */
|
|
89
|
-
display: block;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.message-content-ellipsis {
|
|
93
|
-
display: block;
|
|
94
|
-
margin-top: var(--cinder-space-1);
|
|
95
|
-
color: var(--cinder-text-muted);
|
|
96
|
-
font-size: var(--cinder-text-sm);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/* Streaming tail: raw text that hasn't been through markdown rendering yet */
|
|
100
|
-
.message-content-tail {
|
|
101
|
-
white-space: pre-wrap;
|
|
102
|
-
word-break: break-word;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/* Blinking cursor during streaming */
|
|
106
|
-
.message-content-cursor {
|
|
107
|
-
display: inline-block;
|
|
108
|
-
width: 2px;
|
|
109
|
-
height: 1.1em;
|
|
110
|
-
background: var(--cinder-text);
|
|
111
|
-
vertical-align: text-bottom;
|
|
112
|
-
margin-inline-start: 1px;
|
|
113
|
-
animation: cursor-blink 1s step-end infinite;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
@keyframes cursor-blink {
|
|
117
|
-
0%,
|
|
118
|
-
100% {
|
|
119
|
-
opacity: 1;
|
|
120
|
-
}
|
|
121
|
-
50% {
|
|
122
|
-
opacity: 0;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
@media (prefers-reduced-motion: reduce) {
|
|
127
|
-
.message-content-cursor {
|
|
128
|
-
animation: none;
|
|
129
|
-
opacity: 1;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
</style>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
export {};
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<script lang="ts">
|
|
6
|
-
import MessageAttachments from '../message-attachments.svelte';
|
|
7
|
-
let { parts } = $props();
|
|
8
|
-
const images = $derived(parts.map((part) => part.image));
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<MessageAttachments {images} />
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
export {};
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<script lang="ts">
|
|
6
|
-
import MessageContent from '../message-content.svelte';
|
|
7
|
-
let { part } = $props();
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<!--
|
|
11
|
-
The body text of a message, rendered through the markdown pipeline. `content`
|
|
12
|
-
is already the effective text (streaming override resolved in by
|
|
13
|
-
`deriveMessageParts`), so this part forwards it straight to MessageContent —
|
|
14
|
-
no `overrideContent` plumbing leaks into the part layer. Streaming and
|
|
15
|
-
expanded are presentation hints carried on the part.
|
|
16
|
-
-->
|
|
17
|
-
<MessageContent content={part.content} streaming={part.streaming} expanded={part.expanded} />
|
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
export {};
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<script lang="ts">
|
|
6
|
-
let { part, expanded = false, ontoggle } = $props();
|
|
7
|
-
const labelId = $derived(`reasoning-label-${part.key.replace(/[^a-z0-9-]/gi, '-')}`);
|
|
8
|
-
const contentId = $derived(`reasoning-content-${part.key.replace(/[^a-z0-9-]/gi, '-')}`);
|
|
9
|
-
// Approximate token count — 1 token ≈ 4 characters (rough heuristic for display).
|
|
10
|
-
const approximateTokenCount = $derived(Math.round(part.content.length / 4));
|
|
11
|
-
const tokenDisplay = $derived(approximateTokenCount > 0 ? ` (${approximateTokenCount.toLocaleString()} tokens)` : '');
|
|
12
|
-
// The polite "Reasoning complete." announcement fires ONLY on a streaming
|
|
13
|
-
// true→false transition — not on a reasoning block that was never streaming
|
|
14
|
-
// (a static historical block must stay silent). We observe the transition edge
|
|
15
|
-
// here: this effect's sole job is to record that a stream just ended, which is
|
|
16
|
-
// observing an external lifecycle ("a stream finished"), not deriving state
|
|
17
|
-
// from state. `announced` flips to true on the edge and back to false when a
|
|
18
|
-
// new stream starts, so the live region fires once per streaming session.
|
|
19
|
-
let wasStreaming = false;
|
|
20
|
-
let announced = $state(false);
|
|
21
|
-
$effect(() => {
|
|
22
|
-
const streaming = part.streaming;
|
|
23
|
-
if (streaming) {
|
|
24
|
-
announced = false;
|
|
25
|
-
}
|
|
26
|
-
else if (wasStreaming) {
|
|
27
|
-
announced = true;
|
|
28
|
-
}
|
|
29
|
-
wasStreaming = streaming;
|
|
30
|
-
});
|
|
31
|
-
const announcementText = $derived(announced ? 'Reasoning complete.' : '');
|
|
32
|
-
function handleToggle() {
|
|
33
|
-
if (!part.streaming) {
|
|
34
|
-
ontoggle?.();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
</script>
|
|
38
|
-
|
|
39
|
-
<!--
|
|
40
|
-
Reasoning disclosure. Collapsed by default; the toggle button is disabled
|
|
41
|
-
while streaming to prevent mid-stream layout jank. The expanded region uses
|
|
42
|
-
aria-live="off" during streaming (token-by-token updates must not interrupt
|
|
43
|
-
the screen reader) — one polite "Reasoning complete." fires when streaming ends.
|
|
44
|
-
The grid-template-rows 0fr→1fr transition avoids max-height clamping artifacts.
|
|
45
|
-
-->
|
|
46
|
-
<div
|
|
47
|
-
class="chat-reasoning"
|
|
48
|
-
data-cinder-reasoning
|
|
49
|
-
data-cinder-streaming={part.streaming ? '' : undefined}
|
|
50
|
-
data-cinder-expanded={expanded ? '' : undefined}
|
|
51
|
-
>
|
|
52
|
-
<button
|
|
53
|
-
type="button"
|
|
54
|
-
class="chat-reasoning-toggle"
|
|
55
|
-
id={labelId}
|
|
56
|
-
aria-expanded={expanded}
|
|
57
|
-
aria-controls={contentId}
|
|
58
|
-
disabled={part.streaming}
|
|
59
|
-
onclick={handleToggle}
|
|
60
|
-
>
|
|
61
|
-
<span class="chat-reasoning-label" aria-hidden="true">
|
|
62
|
-
{#if part.streaming}
|
|
63
|
-
<span class="chat-reasoning-dot" aria-hidden="true"></span>
|
|
64
|
-
{/if}
|
|
65
|
-
Reasoning{tokenDisplay}
|
|
66
|
-
</span>
|
|
67
|
-
<span class="sr-only">
|
|
68
|
-
{#if part.streaming}
|
|
69
|
-
Reasoning in progress
|
|
70
|
-
{:else if expanded}
|
|
71
|
-
Collapse reasoning
|
|
72
|
-
{:else}
|
|
73
|
-
Expand reasoning
|
|
74
|
-
{/if}
|
|
75
|
-
</span>
|
|
76
|
-
<span class="chat-reasoning-chevron" aria-hidden="true">
|
|
77
|
-
{expanded ? '▲' : '▼'}
|
|
78
|
-
</span>
|
|
79
|
-
</button>
|
|
80
|
-
|
|
81
|
-
<!-- The controlled region carries `id`/`aria-hidden` on the SAME element the
|
|
82
|
-
toggle's aria-controls points at, so the relationship is never to an
|
|
83
|
-
element buried inside an aria-hidden subtree. When collapsed it is hidden
|
|
84
|
-
from AT and removed from the tab order. -->
|
|
85
|
-
<div class="chat-reasoning-body">
|
|
86
|
-
<div
|
|
87
|
-
id={contentId}
|
|
88
|
-
class="chat-reasoning-content"
|
|
89
|
-
aria-hidden={!expanded}
|
|
90
|
-
aria-live={part.streaming ? 'off' : undefined}
|
|
91
|
-
aria-busy={part.streaming ? true : undefined}
|
|
92
|
-
>
|
|
93
|
-
{part.content}
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
|
|
97
|
-
<!-- Always-present polite live region. Fires "Reasoning complete." once when
|
|
98
|
-
streaming ends (part.streaming: true→false). Clearing on resume ensures it
|
|
99
|
-
fires again on subsequent streams. The element must be in the DOM before
|
|
100
|
-
content is set so screen readers have already registered it as a live region. -->
|
|
101
|
-
<div class="sr-only" aria-live="polite" aria-atomic="true">{announcementText}</div>
|
|
102
|
-
</div>
|
|
103
|
-
|
|
104
|
-
<style>
|
|
105
|
-
.chat-reasoning {
|
|
106
|
-
--cinder-chat-reasoning-bg: var(--cinder-surface-inset);
|
|
107
|
-
--cinder-chat-reasoning-border: var(--cinder-border);
|
|
108
|
-
--cinder-chat-reasoning-text: var(--cinder-text-muted);
|
|
109
|
-
|
|
110
|
-
display: flex;
|
|
111
|
-
flex-direction: column;
|
|
112
|
-
border-inline-start: 2px solid var(--cinder-chat-reasoning-border);
|
|
113
|
-
background: var(--cinder-chat-reasoning-bg);
|
|
114
|
-
border-radius: 0 var(--cinder-radius-md) var(--cinder-radius-md) 0;
|
|
115
|
-
overflow: hidden;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.chat-reasoning-toggle {
|
|
119
|
-
display: flex;
|
|
120
|
-
align-items: center;
|
|
121
|
-
justify-content: space-between;
|
|
122
|
-
gap: var(--cinder-space-2);
|
|
123
|
-
padding-block: var(--cinder-space-2);
|
|
124
|
-
padding-inline: var(--cinder-space-3);
|
|
125
|
-
min-block-size: var(--cinder-touch-target-min, 44px);
|
|
126
|
-
background: transparent;
|
|
127
|
-
border: none;
|
|
128
|
-
cursor: pointer;
|
|
129
|
-
text-align: start;
|
|
130
|
-
font-size: var(--cinder-text-xs);
|
|
131
|
-
font-weight: var(--cinder-font-medium);
|
|
132
|
-
text-transform: uppercase;
|
|
133
|
-
letter-spacing: 0.05em;
|
|
134
|
-
color: var(--cinder-chat-reasoning-text);
|
|
135
|
-
font-style: italic;
|
|
136
|
-
width: 100%;
|
|
137
|
-
|
|
138
|
-
&:disabled {
|
|
139
|
-
cursor: default;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
@media (hover: hover) {
|
|
143
|
-
&:not(:disabled):hover {
|
|
144
|
-
color: var(--cinder-text);
|
|
145
|
-
background: color-mix(in oklch, var(--cinder-chat-reasoning-bg), transparent 20%);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
&:focus-visible {
|
|
150
|
-
outline: var(--cinder-ring-width) solid transparent;
|
|
151
|
-
outline-offset: -2px;
|
|
152
|
-
box-shadow: var(--_cinder-focus-ring-shadow);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
@media (forced-colors: active) {
|
|
156
|
-
&:focus-visible {
|
|
157
|
-
outline: var(--cinder-ring-width) solid ButtonText;
|
|
158
|
-
outline-offset: 2px;
|
|
159
|
-
box-shadow: none;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.chat-reasoning-label {
|
|
165
|
-
display: flex;
|
|
166
|
-
align-items: center;
|
|
167
|
-
gap: var(--cinder-space-2);
|
|
168
|
-
flex: 1;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.chat-reasoning-chevron {
|
|
172
|
-
flex-shrink: 0;
|
|
173
|
-
font-size: 0.625rem;
|
|
174
|
-
opacity: 0.6;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/* Pulsing dot during streaming — opacity-only, respects prefers-reduced-motion */
|
|
178
|
-
.chat-reasoning-dot {
|
|
179
|
-
display: inline-block;
|
|
180
|
-
width: 0.5rem;
|
|
181
|
-
height: 0.5rem;
|
|
182
|
-
border-radius: 50%;
|
|
183
|
-
background: var(--cinder-chat-reasoning-border);
|
|
184
|
-
animation: chat-reasoning-pulse 1.2s ease-in-out infinite;
|
|
185
|
-
flex-shrink: 0;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
@keyframes chat-reasoning-pulse {
|
|
189
|
-
0%,
|
|
190
|
-
100% {
|
|
191
|
-
opacity: 1;
|
|
192
|
-
}
|
|
193
|
-
50% {
|
|
194
|
-
opacity: 0.25;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
@media (prefers-reduced-motion: reduce) {
|
|
199
|
-
.chat-reasoning-dot {
|
|
200
|
-
animation: none;
|
|
201
|
-
opacity: 0.6;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/* Expand/collapse via grid-template-rows (avoids max-height clamping) */
|
|
206
|
-
.chat-reasoning-body {
|
|
207
|
-
display: grid;
|
|
208
|
-
grid-template-rows: 0fr;
|
|
209
|
-
transition: grid-template-rows var(--cinder-duration) var(--cinder-ease-standard);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
[data-cinder-expanded] .chat-reasoning-body {
|
|
213
|
-
grid-template-rows: 1fr;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
@media (prefers-reduced-motion: reduce) {
|
|
217
|
-
.chat-reasoning-body {
|
|
218
|
-
transition: none;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.chat-reasoning-content {
|
|
223
|
-
max-block-size: 16rem;
|
|
224
|
-
overflow-y: auto;
|
|
225
|
-
/* Hidden + non-focusable while collapsed. A scrollable region with
|
|
226
|
-
overflow-y:auto is keyboard-focusable in some browsers even at zero
|
|
227
|
-
height; visibility:hidden removes it from the tab order (and from AT),
|
|
228
|
-
complementing aria-hidden. The parent grid (0fr) clips it visually. */
|
|
229
|
-
visibility: hidden;
|
|
230
|
-
padding-block: var(--cinder-space-2);
|
|
231
|
-
padding-inline: var(--cinder-space-3);
|
|
232
|
-
font-size: var(--cinder-text-sm);
|
|
233
|
-
color: var(--cinder-chat-reasoning-text);
|
|
234
|
-
line-height: var(--cinder-leading-relaxed, 1.625);
|
|
235
|
-
white-space: pre-wrap;
|
|
236
|
-
word-break: break-word;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
[data-cinder-expanded] .chat-reasoning-content {
|
|
240
|
-
visibility: visible;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
/* Forced-colors: the decorative pulse dot and the accent rail use background/
|
|
244
|
-
border colors the system overrides, so pin them to a system color. The
|
|
245
|
-
box-shadow focus ring also disappears, so fall back to a system outline. */
|
|
246
|
-
@media (forced-colors: active) {
|
|
247
|
-
.chat-reasoning {
|
|
248
|
-
border-inline-start-color: ButtonText;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.chat-reasoning-dot {
|
|
252
|
-
background: ButtonText;
|
|
253
|
-
forced-color-adjust: none;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.chat-reasoning-toggle:focus-visible {
|
|
257
|
-
outline: var(--cinder-ring-width) solid ButtonText;
|
|
258
|
-
outline-offset: -2px;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/* Screen reader only */
|
|
263
|
-
.sr-only {
|
|
264
|
-
position: absolute;
|
|
265
|
-
width: 1px;
|
|
266
|
-
height: 1px;
|
|
267
|
-
padding: 0;
|
|
268
|
-
margin: -1px;
|
|
269
|
-
overflow: hidden;
|
|
270
|
-
clip: rect(0, 0, 0, 0);
|
|
271
|
-
white-space: nowrap;
|
|
272
|
-
border: 0;
|
|
273
|
-
}
|
|
274
|
-
</style>
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
export {};
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<script lang="ts">
|
|
6
|
-
let { part } = $props();
|
|
7
|
-
// Map status to icon shape — shape carries meaning independently of color.
|
|
8
|
-
// Aria-hidden icons; status is also communicated as visually-hidden text.
|
|
9
|
-
const statusIcon = {
|
|
10
|
-
pending: '○',
|
|
11
|
-
running: '◉',
|
|
12
|
-
done: '●',
|
|
13
|
-
error: '✕',
|
|
14
|
-
};
|
|
15
|
-
const statusLabel = {
|
|
16
|
-
pending: 'pending',
|
|
17
|
-
running: 'in progress',
|
|
18
|
-
done: 'complete',
|
|
19
|
-
error: 'failed',
|
|
20
|
-
};
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<!--
|
|
24
|
-
A single step in an ordered stepper. `aria-current="step"` marks the active
|
|
25
|
-
(running) step. Status is communicated via an aria-hidden icon whose SHAPE
|
|
26
|
-
(not just color) carries meaning, plus a visually-hidden status suffix.
|
|
27
|
-
-->
|
|
28
|
-
<li
|
|
29
|
-
class="chat-step"
|
|
30
|
-
data-cinder-step-status={part.status}
|
|
31
|
-
aria-current={part.status === 'running' ? 'step' : undefined}
|
|
32
|
-
>
|
|
33
|
-
<span class="chat-step-indicator" aria-hidden="true">
|
|
34
|
-
{statusIcon[part.status]}
|
|
35
|
-
</span>
|
|
36
|
-
<span class="chat-step-body">
|
|
37
|
-
<span class="chat-step-title">
|
|
38
|
-
{part.title}
|
|
39
|
-
<span class="sr-only"> — {statusLabel[part.status]}</span>
|
|
40
|
-
</span>
|
|
41
|
-
{#if part.content}
|
|
42
|
-
<span class="chat-step-content">{part.content}</span>
|
|
43
|
-
{/if}
|
|
44
|
-
</span>
|
|
45
|
-
</li>
|
|
46
|
-
|
|
47
|
-
<style>
|
|
48
|
-
.chat-step {
|
|
49
|
-
--cinder-chat-step-indicator-color: var(--cinder-text-muted);
|
|
50
|
-
--cinder-chat-step-indicator-color-running: var(--cinder-color-info-fg, var(--cinder-text));
|
|
51
|
-
--cinder-chat-step-indicator-color-done: var(
|
|
52
|
-
--cinder-color-success-fg,
|
|
53
|
-
var(--cinder-text-muted)
|
|
54
|
-
);
|
|
55
|
-
--cinder-chat-step-indicator-color-error: var(
|
|
56
|
-
--cinder-color-danger-fg,
|
|
57
|
-
var(--cinder-text-muted)
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
display: flex;
|
|
61
|
-
align-items: flex-start;
|
|
62
|
-
gap: var(--cinder-space-2);
|
|
63
|
-
padding-block: var(--cinder-space-1);
|
|
64
|
-
list-style: none;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.chat-step-indicator {
|
|
68
|
-
flex-shrink: 0;
|
|
69
|
-
font-size: var(--cinder-text-sm);
|
|
70
|
-
line-height: 1.5;
|
|
71
|
-
color: var(--cinder-chat-step-indicator-color);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
[data-cinder-step-status='running'] .chat-step-indicator {
|
|
75
|
-
color: var(--cinder-chat-step-indicator-color-running);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
[data-cinder-step-status='done'] .chat-step-indicator {
|
|
79
|
-
color: var(--cinder-chat-step-indicator-color-done);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
[data-cinder-step-status='error'] .chat-step-indicator {
|
|
83
|
-
color: var(--cinder-chat-step-indicator-color-error);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.chat-step-body {
|
|
87
|
-
display: flex;
|
|
88
|
-
flex-direction: column;
|
|
89
|
-
gap: var(--cinder-space-1);
|
|
90
|
-
flex: 1;
|
|
91
|
-
min-inline-size: 0;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.chat-step-title {
|
|
95
|
-
font-size: var(--cinder-text-sm);
|
|
96
|
-
font-weight: var(--cinder-font-medium);
|
|
97
|
-
color: var(--cinder-text);
|
|
98
|
-
line-height: 1.5;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
[data-cinder-step-status='done'] .chat-step-title {
|
|
102
|
-
color: var(--cinder-text-muted);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
[data-cinder-step-status='error'] .chat-step-title {
|
|
106
|
-
color: var(--cinder-color-danger-fg, var(--cinder-text));
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.chat-step-content {
|
|
110
|
-
font-size: var(--cinder-text-xs);
|
|
111
|
-
color: var(--cinder-text-muted);
|
|
112
|
-
line-height: var(--cinder-leading-normal, 1.5);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/* Screen reader only */
|
|
116
|
-
.sr-only {
|
|
117
|
-
position: absolute;
|
|
118
|
-
width: 1px;
|
|
119
|
-
height: 1px;
|
|
120
|
-
padding: 0;
|
|
121
|
-
margin: -1px;
|
|
122
|
-
overflow: hidden;
|
|
123
|
-
clip: rect(0, 0, 0, 0);
|
|
124
|
-
white-space: nowrap;
|
|
125
|
-
border: 0;
|
|
126
|
-
}
|
|
127
|
-
</style>
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
export {};
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<script lang="ts">
|
|
6
|
-
let { part, onsuggestionselect, tabindex = 0 } = $props();
|
|
7
|
-
function handleClick() {
|
|
8
|
-
onsuggestionselect?.(part.label);
|
|
9
|
-
}
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<!--
|
|
13
|
-
A single suggested-reply chip. Rendered as a <button type="button"> so it
|
|
14
|
-
activates on both Enter and Space (native button behaviour). The chip is
|
|
15
|
-
part of a `role="toolbar"` container rendered by the parent — individual
|
|
16
|
-
chips do not carry their own toolbar role. The `tabindex` prop enables APG
|
|
17
|
-
toolbar roving-tabindex: the parent sets 0 on the active chip and -1 on the
|
|
18
|
-
rest so Tab enters at the active chip, arrow keys move within the toolbar.
|
|
19
|
-
-->
|
|
20
|
-
<button
|
|
21
|
-
type="button"
|
|
22
|
-
class="chat-suggestion-chip"
|
|
23
|
-
data-cinder-suggestion
|
|
24
|
-
{tabindex}
|
|
25
|
-
onclick={handleClick}
|
|
26
|
-
>
|
|
27
|
-
{part.label}
|
|
28
|
-
</button>
|
|
29
|
-
|
|
30
|
-
<style>
|
|
31
|
-
.chat-suggestion-chip {
|
|
32
|
-
--cinder-chat-suggestion-bg: var(--cinder-surface-raised);
|
|
33
|
-
--cinder-chat-suggestion-border: var(--cinder-border);
|
|
34
|
-
--cinder-chat-suggestion-text: var(--cinder-text);
|
|
35
|
-
--cinder-chat-suggestion-bg-hover: var(--cinder-surface-hover);
|
|
36
|
-
|
|
37
|
-
display: inline-flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
justify-content: center;
|
|
40
|
-
min-block-size: var(--cinder-touch-target-min, 2.75rem);
|
|
41
|
-
/* WCAG 2.5.5 applies to both axes — a single-character suggestion would
|
|
42
|
-
otherwise produce a chip narrower than the 44px target. */
|
|
43
|
-
min-inline-size: var(--cinder-touch-target-min, 2.75rem);
|
|
44
|
-
padding-block: var(--cinder-space-2);
|
|
45
|
-
padding-inline: var(--cinder-space-4);
|
|
46
|
-
background: var(--cinder-chat-suggestion-bg);
|
|
47
|
-
border: 1px solid var(--cinder-chat-suggestion-border);
|
|
48
|
-
border-radius: var(--cinder-radius-full, 9999px);
|
|
49
|
-
color: var(--cinder-chat-suggestion-text);
|
|
50
|
-
font-size: var(--cinder-text-sm);
|
|
51
|
-
line-height: 1.25;
|
|
52
|
-
cursor: pointer;
|
|
53
|
-
white-space: nowrap;
|
|
54
|
-
overflow: hidden;
|
|
55
|
-
text-overflow: ellipsis;
|
|
56
|
-
max-inline-size: 24rem;
|
|
57
|
-
transition: background-color var(--cinder-duration-fast) var(--cinder-ease-standard);
|
|
58
|
-
|
|
59
|
-
/* Focus-visible ring — not just :focus so mouse users don't see the ring. */
|
|
60
|
-
&:focus-visible {
|
|
61
|
-
outline: var(--cinder-ring-width) solid transparent;
|
|
62
|
-
outline-offset: 2px;
|
|
63
|
-
box-shadow: var(--_cinder-focus-ring-shadow);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/* box-shadow is forced to none in forced-colors mode, so the focus ring
|
|
67
|
-
would vanish — fall back to a system-color outline. */
|
|
68
|
-
@media (forced-colors: active) {
|
|
69
|
-
&:focus-visible {
|
|
70
|
-
outline: var(--cinder-ring-width) solid ButtonText;
|
|
71
|
-
outline-offset: 2px;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/* Hover only on pointer devices to avoid sticky hover on touch. */
|
|
76
|
-
@media (hover: hover) {
|
|
77
|
-
&:hover {
|
|
78
|
-
background: var(--cinder-chat-suggestion-bg-hover);
|
|
79
|
-
border-color: var(--cinder-accent, var(--cinder-chat-suggestion-border));
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
</style>
|