@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,160 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Chat feature components.
|
|
3
|
-
*
|
|
4
|
-
* Re-exports from all chat subdirectories for convenient access.
|
|
5
|
-
*
|
|
6
|
-
* @module
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
// Top-level Chat wrapper — the public component consumers import as
|
|
10
|
-
// `@lostgradient/cinder/chat`. It composes the inner implementation in container/ with a
|
|
11
|
-
// custom class-merge layer.
|
|
12
|
-
import { CURRENT_SCHEMA_VERSION } from 'conversationalist/versioning';
|
|
13
|
-
import './chat.css';
|
|
14
|
-
import Chat from './chat.svelte';
|
|
15
|
-
|
|
16
|
-
export default Chat;
|
|
17
|
-
export type {
|
|
18
|
-
ChatAnnounceLevel,
|
|
19
|
-
ChatCapabilities,
|
|
20
|
-
ChatProps,
|
|
21
|
-
ReadReceipt,
|
|
22
|
-
TypingParticipant,
|
|
23
|
-
} from './chat.types.ts';
|
|
24
|
-
export { Chat, CURRENT_SCHEMA_VERSION };
|
|
25
|
-
|
|
26
|
-
// Adapter seam — the optional event/transport boundary around <Chat>. Type-only.
|
|
27
|
-
export type {
|
|
28
|
-
ChatAdapter,
|
|
29
|
-
ChatAdapterErrorEvent,
|
|
30
|
-
ChatCommand,
|
|
31
|
-
ChatPushHandlers,
|
|
32
|
-
ChatReadReceiptEvent,
|
|
33
|
-
} from './adapter';
|
|
34
|
-
|
|
35
|
-
// Conversation builders — an ergonomic, immutable way to construct the
|
|
36
|
-
// ConversationHistory Chat renders, for apps without their own conversation state.
|
|
37
|
-
export {
|
|
38
|
-
appendAssistantMessage,
|
|
39
|
-
appendMessages,
|
|
40
|
-
appendUserMessage,
|
|
41
|
-
createConversation,
|
|
42
|
-
} from './builders.ts';
|
|
43
|
-
|
|
44
|
-
// Streaming conversation builders — keep the immutable snapshot and Chat's
|
|
45
|
-
// imperative streaming surface in sync without requiring a direct
|
|
46
|
-
// conversationalist dependency in the consuming application.
|
|
47
|
-
export {
|
|
48
|
-
appendStreamingMessage,
|
|
49
|
-
cancelStreamingMessage,
|
|
50
|
-
finalizeStreamingMessage,
|
|
51
|
-
updateStreamingMessage,
|
|
52
|
-
} from 'conversationalist/streaming';
|
|
53
|
-
|
|
54
|
-
// Conversation data model — published Conversationalist shapes Chat renders.
|
|
55
|
-
// Public so consumers can type the `conversation` prop and construct messages
|
|
56
|
-
// without Cinder maintaining a stale local mirror.
|
|
57
|
-
export type {
|
|
58
|
-
AssistantMessage,
|
|
59
|
-
ContainerUploadContent,
|
|
60
|
-
Conversation,
|
|
61
|
-
ConversationActionType,
|
|
62
|
-
ConversationEnvironment,
|
|
63
|
-
ConversationEvent,
|
|
64
|
-
ConversationEventMap,
|
|
65
|
-
ConversationEventType,
|
|
66
|
-
ConversationHistory,
|
|
67
|
-
ConversationHistoryDraft,
|
|
68
|
-
ConversationNodeSnapshot,
|
|
69
|
-
ConversationSnapshot,
|
|
70
|
-
ConversationStatus,
|
|
71
|
-
ExportOptions,
|
|
72
|
-
ImageContent,
|
|
73
|
-
// JSONValue types the public `ToolCall.arguments` / `metadata` / `content`
|
|
74
|
-
// fields, so consumers constructing those need it. (JSONPrimitive is an
|
|
75
|
-
// internal building block and is intentionally not re-exported.)
|
|
76
|
-
JSONValue,
|
|
77
|
-
Message,
|
|
78
|
-
MessageInput,
|
|
79
|
-
MessageRole,
|
|
80
|
-
MultiModalContent,
|
|
81
|
-
RedactedThinkingContent,
|
|
82
|
-
ServerToolResultContent,
|
|
83
|
-
ServerToolResultType,
|
|
84
|
-
ServerToolUseContent,
|
|
85
|
-
TextContent,
|
|
86
|
-
ThinkingContent,
|
|
87
|
-
TokenUsage,
|
|
88
|
-
ToMarkdownOptions,
|
|
89
|
-
ToolAction,
|
|
90
|
-
ToolCall,
|
|
91
|
-
ToolCallInput,
|
|
92
|
-
ToolCallPair,
|
|
93
|
-
ToolError,
|
|
94
|
-
ToolErrorCategory,
|
|
95
|
-
ToolInteraction,
|
|
96
|
-
ToolResult,
|
|
97
|
-
ToolResultInput,
|
|
98
|
-
WebSearchToolResultContent,
|
|
99
|
-
} from './conversation-model.ts';
|
|
100
|
-
|
|
101
|
-
// Utilities
|
|
102
|
-
export {
|
|
103
|
-
formatMessageAsMarkdown,
|
|
104
|
-
getMessageRoleLabel,
|
|
105
|
-
getMessageText,
|
|
106
|
-
messagesToMarkdown,
|
|
107
|
-
type ChatExportOptions,
|
|
108
|
-
type DeliveryStatus,
|
|
109
|
-
} from './utilities';
|
|
110
|
-
|
|
111
|
-
// Input
|
|
112
|
-
export {
|
|
113
|
-
ChatAttachmentPreview,
|
|
114
|
-
ChatInput,
|
|
115
|
-
deriveAttachmentKind,
|
|
116
|
-
serializeChatAttachment,
|
|
117
|
-
serializeChatAttachments,
|
|
118
|
-
} from './input';
|
|
119
|
-
export type { AttachmentKind, ChatAttachment, SerializedChatAttachment } from './input';
|
|
120
|
-
|
|
121
|
-
// Message
|
|
122
|
-
export {
|
|
123
|
-
ChatDateSeparator,
|
|
124
|
-
ChatMessage,
|
|
125
|
-
MessageAttachments,
|
|
126
|
-
MessageContent,
|
|
127
|
-
ToolCallGroup,
|
|
128
|
-
} from './message';
|
|
129
|
-
|
|
130
|
-
// Container — internal implementation utilities. The inner `Chat`
|
|
131
|
-
// implementation is intentionally NOT re-exported here; consumers should use
|
|
132
|
-
// the wrapper above. (The wrapper provides the documented public API and
|
|
133
|
-
// class-merge behavior the inner implementation lacks.)
|
|
134
|
-
// `formatUnreadCount` and `isLargeCount` are intentionally NOT re-exported:
|
|
135
|
-
// they encode this component's badge presentation policy (e.g. capping at
|
|
136
|
-
// "99+"), not reusable behavior a consumer building a custom chat container
|
|
137
|
-
// would depend on. They remain available internally from ./container.
|
|
138
|
-
export {
|
|
139
|
-
calculateScrollToBottom,
|
|
140
|
-
calculateUnreadCount,
|
|
141
|
-
DEFAULT_SCROLL_CONFIGURATION,
|
|
142
|
-
extractTimestamp,
|
|
143
|
-
findUnreadBoundaryIndex,
|
|
144
|
-
isAtBottom,
|
|
145
|
-
shouldShowJumpToLatest,
|
|
146
|
-
} from './container';
|
|
147
|
-
export type {
|
|
148
|
-
ChatScrollStateChangeEvent,
|
|
149
|
-
ChatStopGeneratingEvent,
|
|
150
|
-
ChatSubmitEvent,
|
|
151
|
-
ChatUnreadIndicatorChangeEvent,
|
|
152
|
-
ScrollConfiguration,
|
|
153
|
-
ScrollState,
|
|
154
|
-
} from './container';
|
|
155
|
-
|
|
156
|
-
// Export
|
|
157
|
-
export { ConversationExportActions } from './export';
|
|
158
|
-
|
|
159
|
-
// Artifact
|
|
160
|
-
export { ArtifactPanel, ArtifactViewer, ChatArtifactLayout } from './artifact';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/** Discriminant for attachment rendering strategy. */
|
|
2
|
-
export type AttachmentKind = 'image' | 'code' | 'document';
|
|
3
|
-
|
|
4
|
-
/** MIME types treated as code beyond `text/*`. */
|
|
5
|
-
const CODE_MIME_TYPES = new Set([
|
|
6
|
-
'application/json',
|
|
7
|
-
'application/javascript',
|
|
8
|
-
'application/typescript',
|
|
9
|
-
'application/xml',
|
|
10
|
-
'application/yaml',
|
|
11
|
-
'application/x-yaml',
|
|
12
|
-
'application/x-sh',
|
|
13
|
-
'application/sql',
|
|
14
|
-
'application/toml',
|
|
15
|
-
]);
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Derive the attachment kind from a MIME type string.
|
|
19
|
-
*
|
|
20
|
-
* - `image/*` → `'image'`
|
|
21
|
-
* - `text/*` and known code MIME types → `'code'`
|
|
22
|
-
* - Everything else → `'document'`
|
|
23
|
-
*/
|
|
24
|
-
export function deriveAttachmentKind(mimeType: string): AttachmentKind {
|
|
25
|
-
if (mimeType.startsWith('image/')) return 'image';
|
|
26
|
-
if (mimeType.startsWith('text/') || CODE_MIME_TYPES.has(mimeType)) return 'code';
|
|
27
|
-
return 'document';
|
|
28
|
-
}
|
|
@@ -1,223 +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 { formatBytes } from '../../../utilities/format-bytes.ts';
|
|
8
|
-
import FileCode from 'lucide-svelte/icons/file-code';
|
|
9
|
-
import FileText from 'lucide-svelte/icons/file-text';
|
|
10
|
-
let { attachment, class: className } = $props();
|
|
11
|
-
const extension = $derived(attachment.file.name.includes('.')
|
|
12
|
-
? attachment.file.name.slice(attachment.file.name.lastIndexOf('.'))
|
|
13
|
-
: '');
|
|
14
|
-
const truncatedName = $derived.by(() => {
|
|
15
|
-
const name = attachment.file.name;
|
|
16
|
-
const maxLength = 18;
|
|
17
|
-
if (name.length <= maxLength)
|
|
18
|
-
return name;
|
|
19
|
-
const ext = extension;
|
|
20
|
-
const base = name.slice(0, name.length - ext.length);
|
|
21
|
-
const availableLength = maxLength - ext.length - 1; // 1 for ellipsis char
|
|
22
|
-
if (availableLength < 3)
|
|
23
|
-
return name.slice(0, maxLength - 1) + '\u2026';
|
|
24
|
-
return base.slice(0, availableLength) + '\u2026' + ext;
|
|
25
|
-
});
|
|
26
|
-
</script>
|
|
27
|
-
|
|
28
|
-
<div
|
|
29
|
-
class={classNames('chat-attachment-preview', className)}
|
|
30
|
-
data-kind={attachment.kind}
|
|
31
|
-
data-error={attachment.status === 'error' || undefined}
|
|
32
|
-
data-pending={attachment.status === 'pending' || undefined}
|
|
33
|
-
>
|
|
34
|
-
{#if attachment.kind === 'image'}
|
|
35
|
-
<img
|
|
36
|
-
src={attachment.previewUrl}
|
|
37
|
-
alt={attachment.file.name}
|
|
38
|
-
class="chat-attachment-preview-image"
|
|
39
|
-
/>
|
|
40
|
-
{:else}
|
|
41
|
-
<div class="chat-attachment-preview-file">
|
|
42
|
-
<div class="chat-attachment-preview-icon">
|
|
43
|
-
{#if attachment.kind === 'code'}
|
|
44
|
-
<FileCode class="cinder-icon-sm" />
|
|
45
|
-
{:else}
|
|
46
|
-
<FileText class="cinder-icon-sm" />
|
|
47
|
-
{/if}
|
|
48
|
-
</div>
|
|
49
|
-
<div class="chat-attachment-preview-info">
|
|
50
|
-
<span class="chat-attachment-preview-name" title={attachment.file.name}>
|
|
51
|
-
{truncatedName}
|
|
52
|
-
</span>
|
|
53
|
-
<span class="chat-attachment-preview-meta">
|
|
54
|
-
{#if extension}
|
|
55
|
-
<span class="chat-attachment-preview-ext">{extension}</span>
|
|
56
|
-
{/if}
|
|
57
|
-
<span class="chat-attachment-preview-size">{formatBytes(attachment.file.size)}</span>
|
|
58
|
-
</span>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
{/if}
|
|
62
|
-
|
|
63
|
-
{#if attachment.status === 'error'}
|
|
64
|
-
<span
|
|
65
|
-
class="chat-attachment-preview-error-badge"
|
|
66
|
-
aria-label={attachment.error ?? 'Attachment error'}>!</span
|
|
67
|
-
>
|
|
68
|
-
{/if}
|
|
69
|
-
|
|
70
|
-
{#if attachment.status === 'pending'}
|
|
71
|
-
<div class="chat-attachment-preview-loading" role="status" aria-label="Reading file">
|
|
72
|
-
<div class="chat-attachment-preview-loading-bar"></div>
|
|
73
|
-
</div>
|
|
74
|
-
{/if}
|
|
75
|
-
</div>
|
|
76
|
-
|
|
77
|
-
<style>
|
|
78
|
-
.chat-attachment-preview {
|
|
79
|
-
position: relative;
|
|
80
|
-
border-radius: var(--cinder-radius-md);
|
|
81
|
-
overflow: hidden;
|
|
82
|
-
border: 1px solid var(--cinder-border);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/* Image kind: square thumbnail */
|
|
86
|
-
.chat-attachment-preview[data-kind='image'] {
|
|
87
|
-
width: 3.5rem;
|
|
88
|
-
height: 3.5rem;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.chat-attachment-preview-image {
|
|
92
|
-
width: 100%;
|
|
93
|
-
height: 100%;
|
|
94
|
-
object-fit: cover;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/* Code/document kind: wider card */
|
|
98
|
-
.chat-attachment-preview[data-kind='code'],
|
|
99
|
-
.chat-attachment-preview[data-kind='document'] {
|
|
100
|
-
display: flex;
|
|
101
|
-
align-items: center;
|
|
102
|
-
min-width: 8rem;
|
|
103
|
-
max-width: 14rem;
|
|
104
|
-
height: 3.5rem;
|
|
105
|
-
background: var(--cinder-surface-raised);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.chat-attachment-preview-file {
|
|
109
|
-
display: flex;
|
|
110
|
-
align-items: center;
|
|
111
|
-
gap: var(--cinder-space-2);
|
|
112
|
-
padding: var(--cinder-space-2);
|
|
113
|
-
width: 100%;
|
|
114
|
-
min-width: 0;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.chat-attachment-preview-icon {
|
|
118
|
-
flex-shrink: 0;
|
|
119
|
-
display: flex;
|
|
120
|
-
align-items: center;
|
|
121
|
-
justify-content: center;
|
|
122
|
-
color: var(--cinder-text-subtle);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.chat-attachment-preview-info {
|
|
126
|
-
display: flex;
|
|
127
|
-
flex-direction: column;
|
|
128
|
-
min-width: 0;
|
|
129
|
-
gap: var(--cinder-space-0-5);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.chat-attachment-preview-name {
|
|
133
|
-
font-size: var(--cinder-text-xs);
|
|
134
|
-
font-weight: var(--cinder-font-medium);
|
|
135
|
-
color: var(--cinder-text);
|
|
136
|
-
white-space: nowrap;
|
|
137
|
-
overflow: hidden;
|
|
138
|
-
text-overflow: ellipsis;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.chat-attachment-preview-meta {
|
|
142
|
-
display: flex;
|
|
143
|
-
align-items: center;
|
|
144
|
-
gap: var(--cinder-space-1);
|
|
145
|
-
font-size: var(--cinder-text-xs);
|
|
146
|
-
color: var(--cinder-text-subtle);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.chat-attachment-preview-ext {
|
|
150
|
-
padding: 0 var(--cinder-space-1);
|
|
151
|
-
background: var(--cinder-surface-inset);
|
|
152
|
-
border-radius: var(--cinder-radius-sm);
|
|
153
|
-
font-family: var(--cinder-font-mono);
|
|
154
|
-
font-size: 0.625rem;
|
|
155
|
-
line-height: 1.25rem;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.chat-attachment-preview-size {
|
|
159
|
-
white-space: nowrap;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/* Error state */
|
|
163
|
-
.chat-attachment-preview[data-error] {
|
|
164
|
-
border-color: var(--cinder-danger);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.chat-attachment-preview[data-error] .chat-attachment-preview-image {
|
|
168
|
-
opacity: 0.5;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.chat-attachment-preview[data-error] .chat-attachment-preview-icon {
|
|
172
|
-
color: var(--cinder-danger);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.chat-attachment-preview-error-badge {
|
|
176
|
-
position: absolute;
|
|
177
|
-
bottom: var(--cinder-space-0-5);
|
|
178
|
-
left: 50%;
|
|
179
|
-
transform: translateX(-50%);
|
|
180
|
-
display: flex;
|
|
181
|
-
align-items: center;
|
|
182
|
-
justify-content: center;
|
|
183
|
-
width: 1rem;
|
|
184
|
-
height: 1rem;
|
|
185
|
-
font-size: var(--cinder-text-xs);
|
|
186
|
-
font-weight: var(--cinder-font-bold);
|
|
187
|
-
color: white;
|
|
188
|
-
background: var(--cinder-danger);
|
|
189
|
-
border-radius: var(--cinder-radius-full);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/* Pending/loading state: dim non-text elements only to preserve text contrast */
|
|
193
|
-
.chat-attachment-preview[data-pending] .chat-attachment-preview-icon,
|
|
194
|
-
.chat-attachment-preview[data-pending] .chat-attachment-preview-image {
|
|
195
|
-
opacity: 0.6;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.chat-attachment-preview-loading {
|
|
199
|
-
position: absolute;
|
|
200
|
-
bottom: 0;
|
|
201
|
-
left: 0;
|
|
202
|
-
right: 0;
|
|
203
|
-
height: 2px;
|
|
204
|
-
background: var(--cinder-surface-inset);
|
|
205
|
-
overflow: hidden;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.chat-attachment-preview-loading-bar {
|
|
209
|
-
width: 40%;
|
|
210
|
-
height: 100%;
|
|
211
|
-
background: var(--cinder-accent);
|
|
212
|
-
animation: loading-slide 1.2s ease-in-out infinite;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
@keyframes loading-slide {
|
|
216
|
-
0% {
|
|
217
|
-
transform: translateX(-100%);
|
|
218
|
-
}
|
|
219
|
-
100% {
|
|
220
|
-
transform: translateX(350%);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
</style>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { ChatAttachment } from './chat-attachment.ts';
|
|
2
|
-
|
|
3
|
-
const BASE64_CHUNK_SIZE = 0x8000;
|
|
4
|
-
|
|
5
|
-
type Base64Runtime = typeof globalThis & {
|
|
6
|
-
btoa?: (data: string) => string;
|
|
7
|
-
Buffer?: {
|
|
8
|
-
from: (data: Uint8Array) => { toString: (encoding: 'base64') => string };
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export interface SerializedChatAttachment {
|
|
13
|
-
name: string;
|
|
14
|
-
mimeType: string;
|
|
15
|
-
kind: ChatAttachment['kind'];
|
|
16
|
-
content: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function bytesToBase64(bytes: Uint8Array): string {
|
|
20
|
-
const runtime = globalThis as Base64Runtime;
|
|
21
|
-
|
|
22
|
-
if (typeof runtime.btoa === 'function') {
|
|
23
|
-
let binary = '';
|
|
24
|
-
|
|
25
|
-
for (let start = 0; start < bytes.length; start += BASE64_CHUNK_SIZE) {
|
|
26
|
-
const chunk = bytes.subarray(start, start + BASE64_CHUNK_SIZE);
|
|
27
|
-
binary += String.fromCharCode(...chunk);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return runtime.btoa(binary);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (typeof runtime.Buffer?.from === 'function') {
|
|
34
|
-
return runtime.Buffer.from(bytes).toString('base64');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
throw new Error('serializeChatAttachment requires btoa or Buffer for base64 encoding.');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export async function serializeChatAttachment(
|
|
41
|
-
attachment: ChatAttachment,
|
|
42
|
-
): Promise<SerializedChatAttachment> {
|
|
43
|
-
const bytes = new Uint8Array(await attachment.file.arrayBuffer());
|
|
44
|
-
|
|
45
|
-
return {
|
|
46
|
-
name: attachment.file.name,
|
|
47
|
-
mimeType: attachment.file.type,
|
|
48
|
-
kind: attachment.kind,
|
|
49
|
-
content: bytesToBase64(bytes),
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export async function serializeChatAttachments(
|
|
54
|
-
attachments: readonly ChatAttachment[],
|
|
55
|
-
): Promise<SerializedChatAttachment[]> {
|
|
56
|
-
const serializedAttachments: SerializedChatAttachment[] = [];
|
|
57
|
-
|
|
58
|
-
for (const attachment of attachments) {
|
|
59
|
-
serializedAttachments.push(await serializeChatAttachment(attachment));
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return serializedAttachments;
|
|
63
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { AttachmentKind } from './attachment-kind.js';
|
|
2
|
-
|
|
3
|
-
/** Attachment metadata for files (images, code, documents). */
|
|
4
|
-
export interface ChatAttachment {
|
|
5
|
-
id: string;
|
|
6
|
-
file: File;
|
|
7
|
-
previewUrl: string;
|
|
8
|
-
kind: AttachmentKind;
|
|
9
|
-
textContent?: string;
|
|
10
|
-
status: 'pending' | 'uploading' | 'ready' | 'error';
|
|
11
|
-
error?: string;
|
|
12
|
-
}
|