@lostgradient/cinder 0.8.0 → 0.11.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 +25 -0
- package/README.md +2 -2
- package/components.json +140 -18
- package/dist/components/_internal/command-list-context.d.ts +3 -3
- package/dist/components/_internal/create-command-list-state.svelte.d.ts +11 -11
- package/dist/components/access-gate/index.js +435 -218
- package/dist/components/approval-card/approval-card-actions.svelte.d.ts +16 -0
- package/dist/components/approval-card/approval-card-state.d.ts +65 -0
- package/dist/components/approval-card/approval-card.css +269 -92
- package/dist/components/approval-card/approval-card.schema.js +10 -31
- package/dist/components/approval-card/approval-card.svelte.d.ts +3 -3
- package/dist/components/approval-card/approval-card.types.d.ts +14 -28
- package/dist/components/approval-card/index.d.ts +1 -1
- package/dist/components/approval-card/index.js +4268 -2884
- package/dist/components/card/card.css +5 -0
- package/dist/components/card/card.schema.js +2 -2
- package/dist/components/card/card.types.d.ts +2 -2
- package/dist/components/card/index.js +2 -1
- package/dist/components/chat/builders.d.ts +17 -8
- package/dist/components/chat/chat.schema.js +44 -2
- package/dist/components/chat/chat.svelte.d.ts +4 -2
- package/dist/components/chat/chat.types.d.ts +34 -3
- package/dist/components/chat/container/chat.svelte.d.ts +4 -2
- package/dist/components/chat/conversation-model.d.ts +1 -1
- package/dist/components/chat/index.d.ts +4 -4
- package/dist/components/chat/index.js +2767 -6278
- package/dist/components/chat/input/chat-attachment-serialization.d.ts +9 -0
- package/dist/components/chat/input/chat-input.svelte.d.ts +22 -1
- package/dist/components/chat/input/index.d.ts +1 -0
- package/dist/components/chat/utilities/conversation.d.ts +6 -6
- package/dist/components/chat-composer-popover/chat-composer-popover-filter.d.ts +11 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.css +7 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.css.d.ts +1 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.schema.d.ts +3 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.schema.js +150 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.svelte.d.ts +46 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.types.d.ts +77 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.variables.d.ts +2 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.variables.js +61 -0
- package/dist/components/chat-composer-popover/index.d.ts +6 -0
- package/dist/components/chat-composer-popover/index.js +3285 -0
- package/dist/components/chat-conversation-header/index.js +577 -4537
- package/dist/components/chat-conversation-list/index.js +24 -3984
- package/dist/components/code-block/code-block.schema.js +5 -1
- package/dist/components/code-block/code-block.types.d.ts +6 -0
- package/dist/components/code-block/index.js +4 -4
- package/dist/components/command-item/index.js +7 -6
- package/dist/components/command-menu/command-menu.schema.js +5 -1
- package/dist/components/command-menu/command-menu.types.d.ts +2 -0
- package/dist/components/command-menu/index.js +48 -19
- package/dist/components/command-palette/index.js +40 -14
- package/dist/components/connection-indicator/connection-indicator.css +136 -0
- package/dist/components/connection-indicator/connection-indicator.css.d.ts +1 -0
- package/dist/components/connection-indicator/connection-indicator.schema.d.ts +3 -0
- package/dist/components/connection-indicator/connection-indicator.schema.js +89 -0
- package/dist/components/connection-indicator/connection-indicator.svelte.d.ts +21 -0
- package/dist/components/connection-indicator/connection-indicator.types.d.ts +46 -0
- package/dist/components/connection-indicator/connection-indicator.variables.d.ts +2 -0
- package/dist/components/connection-indicator/connection-indicator.variables.js +61 -0
- package/dist/components/connection-indicator/index.d.ts +5 -0
- package/dist/components/connection-indicator/index.js +409 -0
- package/dist/components/container/container.schema.js +4 -4
- package/dist/components/event-stream-viewer/index.js +44 -44
- package/dist/components/experimental/json-viewer/index.js +44 -44
- package/dist/components/invocation-rule-builder/index.d.ts +1 -1
- package/dist/components/invocation-rule-builder/index.js +305 -150
- package/dist/components/invocation-rule-builder/invocation-rule-builder.css +28 -0
- package/dist/components/invocation-rule-builder/invocation-rule-builder.schema.js +89 -5
- package/dist/components/invocation-rule-builder/invocation-rule-builder.svelte.d.ts +2 -1
- package/dist/components/invocation-rule-builder/invocation-rule-builder.types.d.ts +114 -16
- package/dist/components/json-schema-editor/index.js +5 -2
- package/dist/components/json-viewer/index.js +44 -44
- package/dist/components/json-viewer/json-viewer.css +10 -6
- package/dist/components/payload-inspector/index.d.ts +1 -1
- package/dist/components/payload-inspector/index.js +306 -1422
- package/dist/components/payload-inspector/payload-inspector.css +15 -75
- package/dist/components/payload-inspector/payload-inspector.schema.js +5 -41
- package/dist/components/payload-inspector/payload-inspector.svelte.d.ts +5 -5
- package/dist/components/payload-inspector/payload-inspector.types.d.ts +10 -56
- package/dist/components/run-step-timeline/index.d.ts +1 -1
- package/dist/components/run-step-timeline/index.js +992 -559
- package/dist/components/run-step-timeline/run-step-branch-disclosure.svelte.d.ts +17 -0
- package/dist/components/run-step-timeline/run-step-timeline.css +124 -0
- package/dist/components/run-step-timeline/run-step-timeline.schema.js +873 -350
- package/dist/components/run-step-timeline/run-step-timeline.svelte.d.ts +1 -15
- package/dist/components/run-step-timeline/run-step-timeline.types.d.ts +182 -5
- package/dist/components/run-step-timeline/run-step-timeline.utilities.d.ts +52 -0
- package/dist/components/schedule-builder/index.d.ts +5 -0
- package/dist/components/schedule-builder/index.js +3176 -0
- package/dist/components/schedule-builder/schedule-builder.css +121 -0
- package/dist/components/schedule-builder/schedule-builder.css.d.ts +1 -0
- package/dist/components/schedule-builder/schedule-builder.schema.d.ts +3 -0
- package/dist/components/schedule-builder/schedule-builder.schema.js +141 -0
- package/dist/components/schedule-builder/schedule-builder.svelte.d.ts +22 -0
- package/dist/components/schedule-builder/schedule-builder.types.d.ts +130 -0
- package/dist/components/schedule-builder/schedule-builder.utilities.d.ts +78 -0
- package/dist/components/schedule-builder/schedule-builder.variables.d.ts +2 -0
- package/dist/components/schedule-builder/schedule-builder.variables.js +61 -0
- package/dist/components/tab/index.js +5 -2
- package/dist/components/tab/tab.schema.js +7 -3
- package/dist/components/tab/tab.svelte.d.ts +2 -1
- package/dist/components/tab/tab.types.d.ts +8 -2
- package/dist/components/tabs/index.js +5 -2
- package/dist/components/tag-input/index.js +22 -4
- package/dist/components/tag-input/tag-input.schema.js +5 -1
- package/dist/components/tag-input/tag-input.types.d.ts +4 -0
- package/dist/components/team-section/index.js +2 -1
- package/dist/components/testimonial-section/index.js +2 -1
- package/dist/index.d.ts +10 -4
- package/dist/index.js +28577 -30168
- package/dist/server/components/access-gate/index.js +3 -1
- package/dist/server/components/accordion/index.js +2 -2
- package/dist/server/components/alert-dialog/index.js +2 -2
- package/dist/server/components/approval-card/index.js +15 -19
- package/dist/server/components/autocomplete/index.js +7 -7
- package/dist/server/components/avatar-group/index.js +5 -5
- package/dist/server/components/button-group/index.js +3 -5
- package/dist/server/components/card/index.js +2 -2
- package/dist/server/components/chat/index.js +15 -12
- package/dist/server/components/chat-composer-popover/index.js +26 -0
- package/dist/server/components/chat-conversation-header/index.js +10 -11
- package/dist/server/components/chat-conversation-list/index.js +4 -5
- package/dist/server/components/checkbox/index.js +3 -3
- package/dist/server/components/choice-grid/index.js +2 -2
- package/dist/server/components/code-block/index.js +2 -2
- package/dist/server/components/color-field/index.js +3 -3
- package/dist/server/components/combobox/index.js +6 -6
- package/dist/server/components/command-item/index.js +5 -3
- package/dist/server/components/command-menu/index.js +6 -4
- package/dist/server/components/command-palette/index.js +2 -2
- package/dist/server/components/confirm-dialog/index.js +2 -2
- package/dist/server/components/connection-indicator/index.js +16 -0
- package/dist/server/components/context-menu/index.js +5 -5
- package/dist/server/components/data-table/index.js +5 -5
- package/dist/server/components/date-picker/index.js +6 -6
- package/dist/server/components/date-range-field/index.js +7 -7
- package/dist/server/components/description-list/index.js +3 -5
- package/dist/server/components/diff-viewer/index.js +9 -8
- package/dist/server/components/drawer/index.js +3 -3
- package/dist/server/components/dropdown/index.js +4 -4
- package/dist/server/components/event-stream-viewer/index.js +2 -2
- package/dist/server/components/experimental/json-viewer/index.js +2 -2
- package/dist/server/components/faceted-filter-bar/index.js +1 -1
- package/dist/server/components/hover-card/index.js +1 -1
- package/dist/server/components/input/index.js +3 -3
- package/dist/server/components/invocation-rule-builder/index.js +1 -1
- package/dist/server/components/json-schema-editor/index.js +24 -23
- package/dist/server/components/json-viewer/index.js +2 -2
- package/dist/server/components/markdown-editor/index.js +13 -13
- package/dist/server/components/modal/index.js +1 -1
- package/dist/server/components/multi-select/index.js +1 -1
- package/dist/server/components/newsletter-section/index.js +3 -3
- package/dist/server/components/payload-inspector/index.js +4 -16
- package/dist/server/components/popover/index.js +5 -5
- package/dist/server/components/review-editor/index.js +27 -26
- package/dist/server/components/run-step-timeline/index.js +2 -2
- package/dist/server/components/schedule-builder/index.js +30 -0
- package/dist/server/components/schema-form/index.js +4 -4
- package/dist/server/components/secret-value-field/index.js +3 -5
- 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 +4 -4
- package/dist/server/components/sheet/index.js +2 -2
- package/dist/server/components/side-navigation/index.js +2 -2
- package/dist/server/components/sidebar/index.js +3 -3
- package/dist/server/components/tab/index.js +2 -2
- package/dist/server/components/table/index.js +3 -3
- package/dist/server/components/tabs/index.js +4 -4
- package/dist/server/components/tag-input/index.js +3 -3
- package/dist/server/components/team-section/index.js +8 -8
- package/dist/server/components/testimonial-section/index.js +2 -2
- package/dist/server/components/time-field/index.js +5 -3
- package/dist/server/components/toggle/index.js +2 -2
- package/dist/server/components/tooltip/index.js +1 -1
- package/dist/server/index.js +235 -211
- package/dist/server/{index.server-20y4mdhm.js → index.server-0chhpkg7.js} +40 -14
- package/dist/server/index.server-0sx92swg.js +9 -0
- package/dist/server/{index.server-ecm1vs3g.js → index.server-1nq7z1qw.js} +1 -1
- package/dist/server/{index.server-s9khh4ry.js → index.server-2bbwajb2.js} +3 -5
- package/dist/server/index.server-2hqrv7ca.js +9 -0
- package/dist/server/{index.server-69epaape.js → index.server-2qj6s2mh.js} +1 -1
- package/dist/server/{index.server-gxf0d1p5.js → index.server-2s5h1d05.js} +2 -2
- package/dist/server/{index.server-qfa2rxzx.js → index.server-2zdbz3rj.js} +3 -5
- package/dist/server/{index.server-pt8b65mt.js → index.server-38aywdk1.js} +1 -1
- package/dist/server/{index.server-0jhra85x.js → index.server-3w72dxz7.js} +4 -4
- package/dist/server/{index.server-rermas0k.js → index.server-47v2fhp4.js} +4 -4
- package/dist/server/{index.server-v4zabrsx.js → index.server-4x4hgvqe.js} +434 -26
- package/dist/server/{index.server-9j5sym59.js → index.server-4x91gzy1.js} +2 -2
- package/dist/server/{index.server-q48q15g7.js → index.server-4y2jtvv1.js} +4 -2
- package/dist/server/{index.server-j3ddzcaa.js → index.server-5gzyqv78.js} +6 -6
- package/dist/server/index.server-67qgdypc.js +9 -0
- package/dist/server/index.server-6hnfzc7f.js +263 -0
- package/dist/server/{index.server-9jete4xx.js → index.server-6sh11ap6.js} +4 -4
- package/dist/server/{index.server-4ztq565m.js → index.server-85p4ydph.js} +1 -1
- package/dist/server/{index.server-4nk7gy0q.js → index.server-894t97kv.js} +1 -1
- package/dist/server/{index.server-1vscnped.js → index.server-8dt36sdm.js} +2 -1
- package/dist/server/{index.server-bfsbp9dz.js → index.server-8xvc73zh.js} +4 -4
- package/dist/server/{index.server-cvnw3hw9.js → index.server-9kz37z89.js} +1 -1
- package/dist/server/{index.server-kc1k02tk.js → index.server-9ykk1kbg.js} +1 -1
- package/dist/server/{index.server-g789yep6.js → index.server-aqethy0w.js} +2 -2
- package/dist/server/index.server-be9bpqeh.js +93 -0
- package/dist/server/{index.server-wc9aggfz.js → index.server-bmxbsk4y.js} +7 -7
- package/dist/server/{index.server-f3z7tpxr.js → index.server-c42b462p.js} +2 -4
- package/dist/server/{index.server-7vyzen5x.js → index.server-c5qv3p61.js} +171 -63
- package/dist/server/index.server-cch0eed5.js +144 -0
- package/dist/server/{index.server-q89dz8h1.js → index.server-d3pqthtp.js} +4 -3
- package/dist/server/{index.server-jk4rx4aa.js → index.server-dmmvwy6p.js} +1 -1
- package/dist/server/{index.server-hcfnae5y.js → index.server-dwwqssey.js} +4 -4
- package/dist/server/{index.server-e8x1hgw6.js → index.server-dz1r9xw5.js} +4 -4
- package/dist/server/{index.server-wm7mk5kw.js → index.server-ez5hp0ya.js} +1 -1
- package/dist/server/{index.server-wc8dbm5e.js → index.server-g95bk8rc.js} +4 -2
- package/dist/server/index.server-gkazv439.js +576 -0
- package/dist/server/index.server-gmh5ar16.js +2 -0
- package/dist/server/{index.server-dp9j2kkr.js → index.server-h0cvwvhy.js} +1 -1
- package/dist/server/{index.server-cbtg8rq5.js → index.server-h89zk5ev.js} +8 -8
- package/dist/server/{index.server-pacrqvyz.js → index.server-h90pjrez.js} +1 -1
- package/dist/server/{index.server-p8d04em5.js → index.server-hcsd5gdb.js} +6 -2
- package/dist/server/{index.server-n39drzes.js → index.server-hpeavvnq.js} +1 -1
- package/dist/server/{index.server-1p3patnj.js → index.server-hx91ng7z.js} +1 -1
- package/dist/server/{index.server-mehav5vs.js → index.server-jdcq5zza.js} +7 -7
- package/dist/server/{index.server-jync915v.js → index.server-jfrssta6.js} +25 -25
- package/dist/server/{index.server-jtj3r53y.js → index.server-jgb8yh5k.js} +1 -1
- package/dist/server/{index.server-ejyf7e48.js → index.server-jj76374p.js} +1 -1
- package/dist/server/{index.server-w1g5q9j9.js → index.server-jtgw9d23.js} +4 -2
- package/dist/server/{index.server-hd8gpehd.js → index.server-jxseyx33.js} +1 -1
- package/dist/server/{index.server-kg2sepsr.js → index.server-krqvnt6p.js} +14 -15
- package/dist/server/{index.server-0e1m3agz.js → index.server-ks49bprh.js} +1 -1
- package/dist/server/{index.server-f0hma3jp.js → index.server-kt0ncrqs.js} +1 -1
- package/dist/server/index.server-m0ezemav.js +170 -0
- package/dist/server/index.server-m191rm44.js +79 -0
- package/dist/server/{index.server-z721a5gp.js → index.server-n82rcv0m.js} +4 -4
- package/dist/server/{index.server-rhhmdxtz.js → index.server-np3c7kx0.js} +4 -4
- package/dist/server/{index.server-hpcs7tmh.js → index.server-p56xxef1.js} +1 -1
- package/dist/server/{index.server-w83kmcrx.js → index.server-pag862vz.js} +10 -10
- package/dist/server/index.server-qbkxz7r2.js +750 -0
- package/dist/server/{index.server-sh2rxejg.js → index.server-qke3ekjt.js} +1 -1
- package/dist/server/{index.server-73x2d3j3.js → index.server-rbpvcrr3.js} +1 -1
- package/dist/server/{index.server-8cxs4kya.js → index.server-rga8sc7j.js} +41 -44
- package/dist/server/{index.server-e3fnv1g6.js → index.server-sedjxt36.js} +5 -5
- package/dist/server/{index.server-pen9pxt6.js → index.server-sf3nk3j2.js} +2 -2
- package/dist/server/{index.server-f23vtaw4.js → index.server-tcay903b.js} +8 -7
- package/dist/server/{index.server-7fp0epev.js → index.server-veastatv.js} +4 -4
- package/dist/server/{index.server-jeqg2d22.js → index.server-xeqtpv61.js} +1 -1
- package/dist/server/{index.server-9s4na701.js → index.server-xjnge1yw.js} +4 -4
- package/dist/server/index.server-xtjjmsyq.js +315 -0
- package/dist/server/{index.server-hhxjaeen.js → index.server-xz99aed4.js} +4 -4
- package/dist/server/{index.server-vne4rzfa.js → index.server-y4n8vc08.js} +1 -1
- package/dist/server/{index.server-5d01cn4f.js → index.server-y83kqayt.js} +4 -4
- package/dist/server/{index.server-1nh09ck7.js → index.server-yhzydqxe.js} +5 -5
- package/dist/server/index.server-z38bxms8.js +734 -0
- package/dist/server/{index.server-atjc1qcq.js → index.server-z7hxtqs1.js} +1 -1
- package/dist/server/{index.server-w6k62afr.js → index.server-ze1ymmbw.js} +2 -2
- package/dist/server/{index.server-914v805w.js → index.server-zgd1g8mk.js} +1 -1
- package/dist/server/{index.server-aeexcxdp.js → index.server-zh3r8vfd.js} +1 -1
- package/dist/server/{index.server-10jb2jzm.js → index.server-zsjf8enc.js} +4 -4
- package/package.json +102 -5
- package/src/components/_internal/command-list-context.ts +3 -3
- package/src/components/_internal/create-command-list-state.svelte.ts +39 -13
- package/src/components/approval-card/approval-card-actions.svelte +168 -0
- package/src/components/approval-card/approval-card-state.ts +152 -1
- package/src/components/approval-card/approval-card.css +269 -92
- package/src/components/approval-card/approval-card.examples.json +3 -3
- package/src/components/approval-card/approval-card.schema.json +9 -30
- package/src/components/approval-card/approval-card.schema.ts +13 -31
- package/src/components/approval-card/approval-card.svelte +176 -470
- package/src/components/approval-card/approval-card.types.ts +15 -28
- package/src/components/approval-card/index.ts +1 -0
- package/src/components/card/card.css +5 -0
- package/src/components/card/card.schema.json +1 -1
- package/src/components/card/card.schema.ts +1 -1
- package/src/components/card/card.svelte +1 -0
- package/src/components/card/card.types.ts +2 -2
- package/src/components/chat/builders.ts +445 -14
- package/src/components/chat/chat.schema.json +36 -1
- package/src/components/chat/chat.schema.ts +44 -1
- package/src/components/chat/chat.svelte +12 -0
- package/src/components/chat/chat.types.ts +35 -3
- package/src/components/chat/container/chat.svelte +73 -3
- package/src/components/chat/conversation-model.ts +1 -0
- package/src/components/chat/index.ts +16 -3
- package/src/components/chat/input/chat-attachment-serialization.ts +63 -0
- package/src/components/chat/input/chat-input.svelte +22 -5
- package/src/components/chat/input/index.ts +5 -0
- package/src/components/chat/utilities/conversation.ts +33 -15
- package/src/components/chat-composer-popover/chat-composer-popover-filter.ts +68 -0
- package/src/components/chat-composer-popover/chat-composer-popover.css +7 -0
- package/src/components/chat-composer-popover/chat-composer-popover.examples.json +13 -0
- package/src/components/chat-composer-popover/chat-composer-popover.schema.json +90 -0
- package/src/components/chat-composer-popover/chat-composer-popover.schema.ts +95 -0
- package/src/components/chat-composer-popover/chat-composer-popover.svelte +234 -0
- package/src/components/chat-composer-popover/chat-composer-popover.types.ts +88 -0
- package/src/components/chat-composer-popover/chat-composer-popover.variables.json +1 -0
- package/src/components/chat-composer-popover/chat-composer-popover.variables.ts +3 -0
- package/src/components/chat-composer-popover/index.ts +19 -0
- package/src/components/code-block/code-block.schema.json +4 -0
- package/src/components/code-block/code-block.schema.ts +5 -0
- package/src/components/code-block/code-block.svelte +3 -3
- package/src/components/code-block/code-block.types.ts +6 -0
- package/src/components/command-item/command-item.svelte +7 -6
- package/src/components/command-menu/command-menu.schema.json +4 -0
- package/src/components/command-menu/command-menu.schema.ts +4 -0
- package/src/components/command-menu/command-menu.svelte +16 -5
- package/src/components/command-menu/command-menu.types.ts +2 -0
- package/src/components/connection-indicator/connection-indicator.css +136 -0
- package/src/components/connection-indicator/connection-indicator.examples.json +31 -0
- package/src/components/connection-indicator/connection-indicator.schema.json +29 -0
- package/src/components/connection-indicator/connection-indicator.schema.ts +36 -0
- package/src/components/connection-indicator/connection-indicator.svelte +63 -0
- package/src/components/connection-indicator/connection-indicator.types.ts +58 -0
- package/src/components/connection-indicator/connection-indicator.variables.json +1 -0
- package/src/components/connection-indicator/connection-indicator.variables.ts +3 -0
- package/src/components/connection-indicator/index.ts +10 -0
- package/src/components/container/container.schema.json +3 -3
- package/src/components/container/container.schema.ts +3 -3
- package/src/components/invocation-rule-builder/index.ts +4 -0
- package/src/components/invocation-rule-builder/invocation-rule-builder.css +28 -0
- package/src/components/invocation-rule-builder/invocation-rule-builder.examples.json +6 -0
- package/src/components/invocation-rule-builder/invocation-rule-builder.schema.json +76 -3
- package/src/components/invocation-rule-builder/invocation-rule-builder.schema.ts +83 -3
- package/src/components/invocation-rule-builder/invocation-rule-builder.svelte +326 -113
- package/src/components/invocation-rule-builder/invocation-rule-builder.types.ts +157 -43
- package/src/components/json-viewer/_json-viewer-node.svelte +15 -1
- package/src/components/json-viewer/json-viewer.css +10 -6
- package/src/components/payload-inspector/index.ts +0 -2
- package/src/components/payload-inspector/payload-inspector.css +15 -75
- package/src/components/payload-inspector/payload-inspector.examples.json +5 -5
- package/src/components/payload-inspector/payload-inspector.schema.json +3 -31
- package/src/components/payload-inspector/payload-inspector.schema.ts +3 -36
- package/src/components/payload-inspector/payload-inspector.svelte +46 -239
- package/src/components/payload-inspector/payload-inspector.types.ts +10 -58
- package/src/components/run-step-timeline/index.ts +8 -0
- package/src/components/run-step-timeline/run-step-branch-disclosure.svelte +16 -0
- package/src/components/run-step-timeline/run-step-timeline.css +124 -0
- package/src/components/run-step-timeline/run-step-timeline.examples.json +18 -0
- package/src/components/run-step-timeline/run-step-timeline.schema.json +872 -349
- package/src/components/run-step-timeline/run-step-timeline.schema.ts +931 -349
- package/src/components/run-step-timeline/run-step-timeline.svelte +387 -268
- package/src/components/run-step-timeline/run-step-timeline.types.ts +192 -5
- package/src/components/run-step-timeline/run-step-timeline.utilities.ts +242 -0
- package/src/components/schedule-builder/index.ts +14 -0
- package/src/components/schedule-builder/schedule-builder.css +121 -0
- package/src/components/schedule-builder/schedule-builder.examples.json +31 -0
- package/src/components/schedule-builder/schedule-builder.schema.json +78 -0
- package/src/components/schedule-builder/schedule-builder.schema.ts +86 -0
- package/src/components/schedule-builder/schedule-builder.svelte +629 -0
- package/src/components/schedule-builder/schedule-builder.types.ts +137 -0
- package/src/components/schedule-builder/schedule-builder.utilities.ts +344 -0
- package/src/components/schedule-builder/schedule-builder.variables.json +1 -0
- package/src/components/schedule-builder/schedule-builder.variables.ts +3 -0
- package/src/components/tab/tab.schema.json +6 -2
- package/src/components/tab/tab.schema.ts +8 -2
- package/src/components/tab/tab.svelte +9 -5
- package/src/components/tab/tab.types.ts +8 -2
- package/src/components/tag-input/tag-input.schema.json +4 -0
- package/src/components/tag-input/tag-input.schema.ts +4 -0
- package/src/components/tag-input/tag-input.svelte +20 -3
- package/src/components/tag-input/tag-input.types.ts +4 -0
- package/src/index.ts +41 -5
- package/src/styles/components.css +3 -0
- package/dist/server/index-49we2xfs.js +0 -344
- package/dist/server/index-8fhvxk30.js +0 -265
- package/dist/server/index-x2ysg8ds.js +0 -388
- package/dist/server/index.server-20j0jh30.js +0 -9
- package/dist/server/index.server-dc35kh7d.js +0 -1835
- package/dist/server/index.server-kd4b0342.js +0 -607
- package/dist/server/index.server-n5cdmsz4.js +0 -30
- package/dist/server/index.server-pxg74pyp.js +0 -393
- package/dist/server/index.server-rjap4k7y.js +0 -1389
- package/dist/server/index.server-vt6sn9y4.js +0 -447
- package/dist/server/index.server-w63n618v.js +0 -9
- package/dist/server/index.server-y2pa1k46.js +0 -9
|
@@ -50,6 +50,26 @@
|
|
|
50
50
|
"type": "string",
|
|
51
51
|
"description": "Optional status label displayed in the typing indicator while `streaming` is `true` and no streaming content has arrived yet (e.g. `\"Thinking…\"` or `\"Analyzing file…\"`). When omitted, three animated dots are shown."
|
|
52
52
|
},
|
|
53
|
+
"composerRole": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "Explicit role for the composer textarea, for overlay patterns such as ARIA comboboxes."
|
|
56
|
+
},
|
|
57
|
+
"composerAriaExpanded": {
|
|
58
|
+
"enum": [false, true, "true", "false"],
|
|
59
|
+
"description": "`aria-expanded` passed to the composer textarea for overlays such as slash-command menus."
|
|
60
|
+
},
|
|
61
|
+
"composerAriaControls": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "`aria-controls` passed to the composer textarea for overlays such as slash-command menus."
|
|
64
|
+
},
|
|
65
|
+
"composerAriaActiveDescendant": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"description": "`aria-activedescendant` passed to the composer textarea for overlays such as slash-command menus."
|
|
68
|
+
},
|
|
69
|
+
"composerAriaAutocomplete": {
|
|
70
|
+
"enum": ["none", "inline", "list", "both"],
|
|
71
|
+
"description": "`aria-autocomplete` passed to the composer textarea for overlays such as slash-command menus."
|
|
72
|
+
},
|
|
53
73
|
"virtualized": {
|
|
54
74
|
"type": "boolean",
|
|
55
75
|
"description": "Use the virtualized message render path for long transcripts. The complete `ConversationHistory` remains unchanged; only the DOM window is reduced. Default `false`."
|
|
@@ -164,10 +184,25 @@
|
|
|
164
184
|
"name": "onattachmentremove",
|
|
165
185
|
"reason": "function-or-snippet"
|
|
166
186
|
},
|
|
187
|
+
{
|
|
188
|
+
"name": "oncomposerblur",
|
|
189
|
+
"reason": "function-or-snippet",
|
|
190
|
+
"description": "Called when focus leaves the composer textarea. Overlay primitives can use\nthis to dismiss without preventing native focus movement."
|
|
191
|
+
},
|
|
167
192
|
{
|
|
168
193
|
"name": "oncomposerinput",
|
|
169
194
|
"reason": "function-or-snippet",
|
|
170
|
-
"description": "Called with the composer's current plain-text value on every composer\ninput event.
|
|
195
|
+
"description": "Called with the composer's current plain-text value on every composer\ninput event. The optional event exposes the textarea for composer-bound\noverlays without reaching into `.chat-input-editor` DOM directly."
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "oncomposerkeydown",
|
|
199
|
+
"reason": "function-or-snippet",
|
|
200
|
+
"description": "Called before Chat's internal composer key handling when a keydown\noriginates from the composer textarea. Call `event.preventDefault()` to\nlet an overlay consume Arrow keys, Enter, or Escape before Enter-to-send.\nChat does not call this hook during IME composition, so Enter can still\nconfirm the active candidate instead of sending."
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "oncomposerselectionchange",
|
|
204
|
+
"reason": "function-or-snippet",
|
|
205
|
+
"description": "Called after pointer or selection activity may have moved the composer\ncaret without changing text. Overlay primitives can resync their active\ntoken from the textarea selection."
|
|
171
206
|
},
|
|
172
207
|
{
|
|
173
208
|
"name": "ondeny",
|
|
@@ -63,6 +63,31 @@ const schema = {
|
|
|
63
63
|
description:
|
|
64
64
|
'Optional status label displayed in the typing indicator while `streaming` is `true` and no streaming content has arrived yet (e.g. `"Thinking…"` or `"Analyzing file…"`). When omitted, three animated dots are shown.',
|
|
65
65
|
},
|
|
66
|
+
composerRole: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
description:
|
|
69
|
+
'Explicit role for the composer textarea, for overlay patterns such as ARIA comboboxes.',
|
|
70
|
+
},
|
|
71
|
+
composerAriaExpanded: {
|
|
72
|
+
enum: [false, true, 'true', 'false'],
|
|
73
|
+
description:
|
|
74
|
+
'`aria-expanded` passed to the composer textarea for overlays such as slash-command menus.',
|
|
75
|
+
},
|
|
76
|
+
composerAriaControls: {
|
|
77
|
+
type: 'string',
|
|
78
|
+
description:
|
|
79
|
+
'`aria-controls` passed to the composer textarea for overlays such as slash-command menus.',
|
|
80
|
+
},
|
|
81
|
+
composerAriaActiveDescendant: {
|
|
82
|
+
type: 'string',
|
|
83
|
+
description:
|
|
84
|
+
'`aria-activedescendant` passed to the composer textarea for overlays such as slash-command menus.',
|
|
85
|
+
},
|
|
86
|
+
composerAriaAutocomplete: {
|
|
87
|
+
enum: ['none', 'inline', 'list', 'both'],
|
|
88
|
+
description:
|
|
89
|
+
'`aria-autocomplete` passed to the composer textarea for overlays such as slash-command menus.',
|
|
90
|
+
},
|
|
66
91
|
virtualized: {
|
|
67
92
|
type: 'boolean',
|
|
68
93
|
description:
|
|
@@ -191,11 +216,29 @@ const schema = {
|
|
|
191
216
|
name: 'onattachmentremove',
|
|
192
217
|
reason: 'function-or-snippet',
|
|
193
218
|
},
|
|
219
|
+
{
|
|
220
|
+
name: 'oncomposerblur',
|
|
221
|
+
reason: 'function-or-snippet',
|
|
222
|
+
description:
|
|
223
|
+
'Called when focus leaves the composer textarea. Overlay primitives can use\nthis to dismiss without preventing native focus movement.',
|
|
224
|
+
},
|
|
194
225
|
{
|
|
195
226
|
name: 'oncomposerinput',
|
|
196
227
|
reason: 'function-or-snippet',
|
|
197
228
|
description:
|
|
198
|
-
"Called with the composer's current plain-text value on every composer\ninput event.
|
|
229
|
+
"Called with the composer's current plain-text value on every composer\ninput event. The optional event exposes the textarea for composer-bound\noverlays without reaching into `.chat-input-editor` DOM directly.",
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: 'oncomposerkeydown',
|
|
233
|
+
reason: 'function-or-snippet',
|
|
234
|
+
description:
|
|
235
|
+
"Called before Chat's internal composer key handling when a keydown\noriginates from the composer textarea. Call `event.preventDefault()` to\nlet an overlay consume Arrow keys, Enter, or Escape before Enter-to-send.\nChat does not call this hook during IME composition, so Enter can still\nconfirm the active candidate instead of sending.",
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: 'oncomposerselectionchange',
|
|
239
|
+
reason: 'function-or-snippet',
|
|
240
|
+
description:
|
|
241
|
+
'Called after pointer or selection activity may have moved the composer\ncaret without changing text. Overlay primitives can resync their active\ntoken from the textarea selection.',
|
|
199
242
|
},
|
|
200
243
|
{
|
|
201
244
|
name: 'ondeny',
|
|
@@ -30,6 +30,14 @@ export function pushToken(token) {
|
|
|
30
30
|
export function endStreaming() {
|
|
31
31
|
impl?.endStreaming();
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Announce consumer-rendered status text through Chat's existing live regions.
|
|
35
|
+
* No-op until mounted. Built-in tool-approval announcements take precedence
|
|
36
|
+
* over consumer assertive announcements to avoid duplicate urgent output.
|
|
37
|
+
*/
|
|
38
|
+
export function announce(message, level = 'polite') {
|
|
39
|
+
impl?.announce(message, level);
|
|
40
|
+
}
|
|
33
41
|
/** Scroll the message viewport to the bottom. No-op until mounted. */
|
|
34
42
|
export function scrollToBottom() {
|
|
35
43
|
impl?.scrollToBottom();
|
|
@@ -50,6 +58,10 @@ export function clearInput() {
|
|
|
50
58
|
export function getComposerValue() {
|
|
51
59
|
return impl?.getComposerValue() ?? '';
|
|
52
60
|
}
|
|
61
|
+
/** Read the composer textarea element. Returns null until mounted. */
|
|
62
|
+
export function getEditorElement() {
|
|
63
|
+
return impl?.getEditorElement() ?? null;
|
|
64
|
+
}
|
|
53
65
|
</script>
|
|
54
66
|
|
|
55
67
|
<ChatImplementation bind:this={impl} class={mergedClassName} {...rest} />
|
|
@@ -49,6 +49,9 @@ export type ReadReceipt = {
|
|
|
49
49
|
readBy?: string[];
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
+
/** Live-region channel for imperative Chat announcements. */
|
|
53
|
+
export type ChatAnnounceLevel = 'polite' | 'assertive';
|
|
54
|
+
|
|
52
55
|
/**
|
|
53
56
|
* Full-row override snippet. Inversion of control: receives the message AND a
|
|
54
57
|
* `renderDefault` snippet that renders the built-in row, so a consumer can wrap
|
|
@@ -127,6 +130,16 @@ export type ChatProps = Omit<HTMLAttributes<HTMLElement>, 'class' | 'onsubmit'>
|
|
|
127
130
|
* rather than as five separate boolean props.
|
|
128
131
|
*/
|
|
129
132
|
capabilities?: ChatCapabilities;
|
|
133
|
+
/** Explicit role for the composer textarea, for overlay patterns such as ARIA comboboxes. */
|
|
134
|
+
composerRole?: string | undefined;
|
|
135
|
+
/** `aria-expanded` passed to the composer textarea for overlays such as slash-command menus. */
|
|
136
|
+
composerAriaExpanded?: boolean | 'true' | 'false' | undefined;
|
|
137
|
+
/** `aria-controls` passed to the composer textarea for overlays such as slash-command menus. */
|
|
138
|
+
composerAriaControls?: string | undefined;
|
|
139
|
+
/** `aria-activedescendant` passed to the composer textarea for overlays such as slash-command menus. */
|
|
140
|
+
composerAriaActiveDescendant?: string | undefined;
|
|
141
|
+
/** `aria-autocomplete` passed to the composer textarea for overlays such as slash-command menus. */
|
|
142
|
+
composerAriaAutocomplete?: 'none' | 'inline' | 'list' | 'both' | undefined;
|
|
130
143
|
/** Use the virtualized message render path for long transcripts. The complete `ConversationHistory` remains unchanged; only the DOM window is reduced. Default `false`. */
|
|
131
144
|
virtualized?: boolean;
|
|
132
145
|
/** Estimated row height in pixels for virtualized message rows. Default `88`. */
|
|
@@ -245,8 +258,27 @@ export type ChatProps = Omit<HTMLAttributes<HTMLElement>, 'class' | 'onsubmit'>
|
|
|
245
258
|
onattachmentfailure?: (file: File, error: string) => void;
|
|
246
259
|
/**
|
|
247
260
|
* Called with the composer's current plain-text value on every composer
|
|
248
|
-
* input event.
|
|
249
|
-
*
|
|
261
|
+
* input event. The optional event exposes the textarea for composer-bound
|
|
262
|
+
* overlays without reaching into `.chat-input-editor` DOM directly.
|
|
263
|
+
*/
|
|
264
|
+
oncomposerinput?: (value: string, event?: Event) => void;
|
|
265
|
+
/**
|
|
266
|
+
* Called before Chat's internal composer key handling when a keydown
|
|
267
|
+
* originates from the composer textarea. Call `event.preventDefault()` to
|
|
268
|
+
* let an overlay consume Arrow keys, Enter, or Escape before Enter-to-send.
|
|
269
|
+
* Chat does not call this hook during IME composition, so Enter can still
|
|
270
|
+
* confirm the active candidate instead of sending.
|
|
271
|
+
*/
|
|
272
|
+
oncomposerkeydown?: (event: KeyboardEvent) => void;
|
|
273
|
+
/**
|
|
274
|
+
* Called after pointer or selection activity may have moved the composer
|
|
275
|
+
* caret without changing text. Overlay primitives can resync their active
|
|
276
|
+
* token from the textarea selection.
|
|
277
|
+
*/
|
|
278
|
+
oncomposerselectionchange?: (event: Event) => void;
|
|
279
|
+
/**
|
|
280
|
+
* Called when focus leaves the composer textarea. Overlay primitives can use
|
|
281
|
+
* this to dismiss without preventing native focus movement.
|
|
250
282
|
*/
|
|
251
|
-
|
|
283
|
+
oncomposerblur?: (event: FocusEvent) => void;
|
|
252
284
|
};
|
|
@@ -26,7 +26,8 @@ import { useChatReadReceipts } from './use-chat-read-receipts.svelte.ts';
|
|
|
26
26
|
import ChatParticipantTyping from './chat-participant-typing.svelte';
|
|
27
27
|
import ChatReadReceipt from '../message/chat-read-receipt.svelte';
|
|
28
28
|
const noopAttachment = () => { };
|
|
29
|
-
|
|
29
|
+
const CONSUMER_ANNOUNCEMENT_CLEAR_DELAY_MS = 1000;
|
|
30
|
+
let { id, conversation, atBottom = $bindable(true), unreadCount = $bindable(0), newMessageIndicatorVisible = $bindable(false), class: className, surfaceMode = 'default', density = 'comfortable', variant = 'bubble', bottomThreshold = DEFAULT_SCROLL_CONFIGURATION.bottomThreshold, jumpThreshold = DEFAULT_SCROLL_CONFIGURATION.jumpThreshold, streaming = false, streamingStatus, capabilities, virtualized = false, virtualizationEstimatedRowHeight = 88, virtualizationOverscan = 3, virtualizationInitialHeight = 640, moreHistoryAvailable = true, loadEarlierLabel = 'Load earlier messages', loadingEarlierLabel = 'Loading earlier messages', header, empty, emptyPrompts, messageActions, messageStatus, row, messagePart, viewportAttachment, typingParticipants, readReceipts, adapter, onadaptererror, onpushmessage, ontypingchange, onreadreceipt, onsubmit, onretry, onedit, onapprove, ondeny, messageReasoning, messageSteps, messageSuggestions, onsuggestionselect, onloadhistory, onstopgenerating, onjumptolatest, onscrollstatechange, onunreadindicatorchange, onexpandedchange, onattachmentadd, onattachmentremove, onattachmentfailure, oncomposerinput, oncomposerkeydown, oncomposerselectionchange, oncomposerblur, composerRole, composerAriaExpanded, composerAriaControls, composerAriaActiveDescendant, composerAriaAutocomplete, ...rest } = $props();
|
|
30
31
|
// ==========================================================================
|
|
31
32
|
// Refs and Internal State
|
|
32
33
|
// ==========================================================================
|
|
@@ -84,10 +85,15 @@ $effect(() => {
|
|
|
84
85
|
toolCallState.reset();
|
|
85
86
|
typingIndicatorState.reset();
|
|
86
87
|
readReceiptsState.reset();
|
|
88
|
+
clearConsumerAnnouncements();
|
|
87
89
|
});
|
|
88
90
|
let isLoadingHistory = $state(false);
|
|
89
91
|
let adapterHasMoreHistory = $state(undefined);
|
|
90
92
|
let historyAnnouncement = $state('');
|
|
93
|
+
let consumerPoliteAnnouncement = $state('');
|
|
94
|
+
let consumerAssertiveAnnouncement = $state('');
|
|
95
|
+
let consumerPoliteAnnouncementTimeout;
|
|
96
|
+
let consumerAssertiveAnnouncementTimeout;
|
|
91
97
|
let pendingHistoryScroll = $state(null);
|
|
92
98
|
let deferredAdapterHasMoreHistory = null;
|
|
93
99
|
let historyAnchorMessageId = $state(null);
|
|
@@ -325,6 +331,13 @@ const toolApprovalAssertiveMessage = $derived.by(() => {
|
|
|
325
331
|
}
|
|
326
332
|
return '';
|
|
327
333
|
});
|
|
334
|
+
const assertiveAnnouncement = $derived(toolApprovalAssertiveMessage || consumerAssertiveAnnouncement);
|
|
335
|
+
const politeAnnouncement = $derived(consumerPoliteAnnouncement || historyAnnouncement || unreadState.announcerMessage);
|
|
336
|
+
$effect(() => {
|
|
337
|
+
if (toolApprovalAssertiveMessage && consumerAssertiveAnnouncement) {
|
|
338
|
+
clearConsumerAssertiveAnnouncement();
|
|
339
|
+
}
|
|
340
|
+
});
|
|
328
341
|
// ==========================================================================
|
|
329
342
|
// Scroll Anchoring via $effect.pre
|
|
330
343
|
// ==========================================================================
|
|
@@ -516,6 +529,7 @@ $effect(() => {
|
|
|
516
529
|
cancelAnimationFrame(streamingScrollRaf);
|
|
517
530
|
streamingScrollRaf = undefined;
|
|
518
531
|
}
|
|
532
|
+
clearConsumerAnnouncements();
|
|
519
533
|
};
|
|
520
534
|
});
|
|
521
535
|
// ==========================================================================
|
|
@@ -588,6 +602,50 @@ const historyAnchorScrollAttachment = $derived(historyAnchorMessageId === null |
|
|
|
588
602
|
// ==========================================================================
|
|
589
603
|
// Actions
|
|
590
604
|
// ==========================================================================
|
|
605
|
+
export function announce(message, level = 'polite') {
|
|
606
|
+
const trimmedMessage = message.trim();
|
|
607
|
+
if (!trimmedMessage)
|
|
608
|
+
return;
|
|
609
|
+
if (level === 'assertive') {
|
|
610
|
+
if (toolApprovalAssertiveMessage)
|
|
611
|
+
return;
|
|
612
|
+
setConsumerAssertiveAnnouncement(trimmedMessage);
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
setConsumerPoliteAnnouncement(trimmedMessage);
|
|
616
|
+
}
|
|
617
|
+
function setConsumerPoliteAnnouncement(message) {
|
|
618
|
+
clearTimeout(consumerPoliteAnnouncementTimeout);
|
|
619
|
+
consumerPoliteAnnouncement = message;
|
|
620
|
+
consumerPoliteAnnouncementTimeout = setTimeout(() => {
|
|
621
|
+
if (consumerPoliteAnnouncement === message)
|
|
622
|
+
consumerPoliteAnnouncement = '';
|
|
623
|
+
consumerPoliteAnnouncementTimeout = undefined;
|
|
624
|
+
}, CONSUMER_ANNOUNCEMENT_CLEAR_DELAY_MS);
|
|
625
|
+
}
|
|
626
|
+
function setConsumerAssertiveAnnouncement(message) {
|
|
627
|
+
clearTimeout(consumerAssertiveAnnouncementTimeout);
|
|
628
|
+
consumerAssertiveAnnouncement = message;
|
|
629
|
+
consumerAssertiveAnnouncementTimeout = setTimeout(() => {
|
|
630
|
+
if (consumerAssertiveAnnouncement === message)
|
|
631
|
+
consumerAssertiveAnnouncement = '';
|
|
632
|
+
consumerAssertiveAnnouncementTimeout = undefined;
|
|
633
|
+
}, CONSUMER_ANNOUNCEMENT_CLEAR_DELAY_MS);
|
|
634
|
+
}
|
|
635
|
+
function clearConsumerPoliteAnnouncement() {
|
|
636
|
+
clearTimeout(consumerPoliteAnnouncementTimeout);
|
|
637
|
+
consumerPoliteAnnouncementTimeout = undefined;
|
|
638
|
+
consumerPoliteAnnouncement = '';
|
|
639
|
+
}
|
|
640
|
+
function clearConsumerAssertiveAnnouncement() {
|
|
641
|
+
clearTimeout(consumerAssertiveAnnouncementTimeout);
|
|
642
|
+
consumerAssertiveAnnouncementTimeout = undefined;
|
|
643
|
+
consumerAssertiveAnnouncement = '';
|
|
644
|
+
}
|
|
645
|
+
function clearConsumerAnnouncements() {
|
|
646
|
+
clearConsumerPoliteAnnouncement();
|
|
647
|
+
clearConsumerAssertiveAnnouncement();
|
|
648
|
+
}
|
|
591
649
|
function handleJumpToLatest() {
|
|
592
650
|
if (isVirtualized) {
|
|
593
651
|
chatVirtualizer.scrollToIndex(Math.max(0, renderRows.length - 1), {
|
|
@@ -1069,6 +1127,10 @@ export function clearInput() {
|
|
|
1069
1127
|
export function getComposerValue() {
|
|
1070
1128
|
return inputRef?.getValue() ?? '';
|
|
1071
1129
|
}
|
|
1130
|
+
/** Read the composer textarea element. Returns null until mounted. */
|
|
1131
|
+
export function getEditorElement() {
|
|
1132
|
+
return inputRef?.getEditorElement() ?? null;
|
|
1133
|
+
}
|
|
1072
1134
|
/**
|
|
1073
1135
|
* Begin streaming content for a specific message.
|
|
1074
1136
|
* The message should already exist in the conversation.
|
|
@@ -1414,6 +1476,14 @@ function virtualRowAttachment(row) {
|
|
|
1414
1476
|
{allowAttachments}
|
|
1415
1477
|
onstop={streaming ? handleStopGenerating : undefined}
|
|
1416
1478
|
{oncomposerinput}
|
|
1479
|
+
{oncomposerkeydown}
|
|
1480
|
+
{oncomposerselectionchange}
|
|
1481
|
+
{oncomposerblur}
|
|
1482
|
+
{composerRole}
|
|
1483
|
+
{composerAriaExpanded}
|
|
1484
|
+
{composerAriaControls}
|
|
1485
|
+
{composerAriaActiveDescendant}
|
|
1486
|
+
{composerAriaAutocomplete}
|
|
1417
1487
|
{onattachmentadd}
|
|
1418
1488
|
{onattachmentremove}
|
|
1419
1489
|
{onattachmentfailure}
|
|
@@ -1424,8 +1494,8 @@ function virtualRowAttachment(row) {
|
|
|
1424
1494
|
<ChatStatusAnnouncer
|
|
1425
1495
|
{statusId}
|
|
1426
1496
|
messageCount={messages.length}
|
|
1427
|
-
announcerMessage={
|
|
1428
|
-
assertiveMessage={
|
|
1497
|
+
announcerMessage={politeAnnouncement}
|
|
1498
|
+
assertiveMessage={assertiveAnnouncement}
|
|
1429
1499
|
/>
|
|
1430
1500
|
|
|
1431
1501
|
<!-- Typing-participant live region: outside role="log" to avoid double announcement.
|
|
@@ -13,7 +13,13 @@ import './chat.css';
|
|
|
13
13
|
import Chat from './chat.svelte';
|
|
14
14
|
|
|
15
15
|
export default Chat;
|
|
16
|
-
export type {
|
|
16
|
+
export type {
|
|
17
|
+
ChatAnnounceLevel,
|
|
18
|
+
ChatCapabilities,
|
|
19
|
+
ChatProps,
|
|
20
|
+
ReadReceipt,
|
|
21
|
+
TypingParticipant,
|
|
22
|
+
} from './chat.types.ts';
|
|
17
23
|
export { Chat };
|
|
18
24
|
|
|
19
25
|
// Adapter seam — the optional event/transport boundary around <Chat>. Type-only.
|
|
@@ -40,6 +46,7 @@ export {
|
|
|
40
46
|
export type {
|
|
41
47
|
AssistantMessage,
|
|
42
48
|
ContainerUploadContent,
|
|
49
|
+
ConversationEnvironment,
|
|
43
50
|
ConversationHistory,
|
|
44
51
|
ConversationStatus,
|
|
45
52
|
ExportOptions,
|
|
@@ -80,8 +87,14 @@ export {
|
|
|
80
87
|
} from './utilities';
|
|
81
88
|
|
|
82
89
|
// Input
|
|
83
|
-
export {
|
|
84
|
-
|
|
90
|
+
export {
|
|
91
|
+
ChatAttachmentPreview,
|
|
92
|
+
ChatInput,
|
|
93
|
+
deriveAttachmentKind,
|
|
94
|
+
serializeChatAttachment,
|
|
95
|
+
serializeChatAttachments,
|
|
96
|
+
} from './input';
|
|
97
|
+
export type { AttachmentKind, ChatAttachment, SerializedChatAttachment } from './input';
|
|
85
98
|
|
|
86
99
|
// Message
|
|
87
100
|
export {
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
}
|
|
@@ -40,7 +40,7 @@ const attachmentIdFactory = createIdFactory('attachment');
|
|
|
40
40
|
// Tracks hash-derived IDs used in this instance so collisions (same name/size/mtime)
|
|
41
41
|
// get a unique suffix rather than a duplicate DOM ID.
|
|
42
42
|
const usedAttachmentIds = new Set();
|
|
43
|
-
let { id, value = $bindable(''), placeholder = 'Type a message...', composerLabel = 'Message', disabled = false, sending = false, error, class: className, action, name = 'content', clearOnSubmit = true, allowAttachments = true, maxFileSize = 10 * 1024 * 1024, // 10MB
|
|
43
|
+
let { id, value = $bindable(''), placeholder = 'Type a message...', composerLabel = 'Message', composerRole, composerAriaExpanded, composerAriaControls, composerAriaActiveDescendant, composerAriaAutocomplete, disabled = false, sending = false, error, class: className, action, name = 'content', clearOnSubmit = true, allowAttachments = true, maxFileSize = 10 * 1024 * 1024, // 10MB
|
|
44
44
|
acceptedTypes = [
|
|
45
45
|
'image/*',
|
|
46
46
|
'text/*',
|
|
@@ -55,7 +55,7 @@ acceptedTypes = [
|
|
|
55
55
|
'application/x-sh',
|
|
56
56
|
'application/sql',
|
|
57
57
|
'application/toml',
|
|
58
|
-
], onsubmit, onstop, oncomposerinput, onattachmentadd, onattachmentremove, onattachmentfailure, actions, ...rest } = $props();
|
|
58
|
+
], onsubmit, onstop, oncomposerinput, oncomposerkeydown, oncomposerselectionchange, oncomposerblur, onattachmentadd, onattachmentremove, onattachmentfailure, actions, ...rest } = $props();
|
|
59
59
|
const resolvedComposerLabel = $derived(composerLabel.trim() || 'Message');
|
|
60
60
|
// Derived: show stop button when sending and onstop is provided
|
|
61
61
|
const showStopButton = $derived(sending && onstop !== undefined);
|
|
@@ -266,6 +266,12 @@ function handleKeyDown(event) {
|
|
|
266
266
|
if (event.isComposing || isComposing) {
|
|
267
267
|
return;
|
|
268
268
|
}
|
|
269
|
+
if (event.target === editorElement) {
|
|
270
|
+
oncomposerkeydown?.(event);
|
|
271
|
+
if (event.defaultPrevented) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
269
275
|
// Shift+Enter: Newline (let editor handle it)
|
|
270
276
|
if (event.key === 'Enter' && event.shiftKey) {
|
|
271
277
|
return;
|
|
@@ -287,8 +293,8 @@ function handleCompositionEnd() {
|
|
|
287
293
|
// Fires after `bind:value` has already applied the textarea's new value
|
|
288
294
|
// (Svelte merges the binding's own input listener with this handler on the
|
|
289
295
|
// same event), so `value` here is always current — never one keystroke stale.
|
|
290
|
-
function handleInput() {
|
|
291
|
-
oncomposerinput?.(value);
|
|
296
|
+
function handleInput(event) {
|
|
297
|
+
oncomposerinput?.(value, event);
|
|
292
298
|
}
|
|
293
299
|
// =========================================================================
|
|
294
300
|
// Imperative API
|
|
@@ -307,6 +313,9 @@ export function getAttachments() {
|
|
|
307
313
|
export function getValue() {
|
|
308
314
|
return value;
|
|
309
315
|
}
|
|
316
|
+
export function getEditorElement() {
|
|
317
|
+
return editorElement;
|
|
318
|
+
}
|
|
310
319
|
export function addFiles(files) {
|
|
311
320
|
if (!allowAttachments)
|
|
312
321
|
return;
|
|
@@ -326,7 +335,6 @@ onDestroy(() => {
|
|
|
326
335
|
method="POST"
|
|
327
336
|
{action}
|
|
328
337
|
onsubmit={handleSubmit}
|
|
329
|
-
onkeydown={handleKeyDown}
|
|
330
338
|
onpaste={handlePaste}
|
|
331
339
|
ondrop={handleDrop}
|
|
332
340
|
ondragover={handleDragOver}
|
|
@@ -367,9 +375,18 @@ onDestroy(() => {
|
|
|
367
375
|
bind:this={editorElement}
|
|
368
376
|
id={`${id}-editor`}
|
|
369
377
|
bind:value
|
|
378
|
+
onkeydown={handleKeyDown}
|
|
370
379
|
oninput={handleInput}
|
|
380
|
+
onpointerup={oncomposerselectionchange}
|
|
381
|
+
onselect={oncomposerselectionchange}
|
|
382
|
+
onblur={oncomposerblur}
|
|
371
383
|
{placeholder}
|
|
384
|
+
role={composerRole}
|
|
372
385
|
aria-label={resolvedComposerLabel}
|
|
386
|
+
aria-expanded={composerAriaExpanded}
|
|
387
|
+
aria-controls={composerAriaControls}
|
|
388
|
+
aria-activedescendant={composerAriaActiveDescendant}
|
|
389
|
+
aria-autocomplete={composerAriaAutocomplete}
|
|
373
390
|
{disabled}
|
|
374
391
|
readonly={sending}
|
|
375
392
|
class="chat-input-editor"
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export { deriveAttachmentKind, type AttachmentKind } from './attachment-kind.js';
|
|
2
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';
|
|
3
8
|
export type { ChatAttachment } from './chat-attachment.ts';
|
|
4
9
|
export { default as ChatInput } from './chat-input.svelte';
|
|
@@ -1,26 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Conversation-reading helpers for Chat.
|
|
3
3
|
*
|
|
4
|
-
* These
|
|
5
|
-
*
|
|
6
|
-
* incidental tool-shaped field on a non-tool message never renders as a pair.
|
|
4
|
+
* These helpers operate on the Conversationalist transcript shape while keeping
|
|
5
|
+
* Cinder's browser runtime free of the full conversation package.
|
|
7
6
|
*/
|
|
8
7
|
|
|
9
|
-
import {
|
|
10
|
-
|
|
8
|
+
import type {
|
|
9
|
+
ConversationHistory,
|
|
10
|
+
Message,
|
|
11
|
+
ToolCallPair,
|
|
12
|
+
ToolResult,
|
|
13
|
+
} from '../conversation-model.ts';
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
(
|
|
18
|
-
|
|
15
|
+
export function getMessages(
|
|
16
|
+
conversation: ConversationHistory,
|
|
17
|
+
options: { includeHidden?: boolean } = {},
|
|
18
|
+
): Message[] {
|
|
19
|
+
return conversation.ids
|
|
20
|
+
.map((id) => conversation.messages[id])
|
|
21
|
+
.filter((message): message is Message => message !== undefined)
|
|
22
|
+
.filter((message) => options.includeHidden === true || !message.hidden);
|
|
19
23
|
}
|
|
20
24
|
|
|
21
25
|
/** Pairs tool calls with role-valid tool results from an already-ordered message array. */
|
|
22
26
|
export function pairToolCallsWithResults(messages: ReadonlyArray<Message>): ToolCallPair[] {
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
const resultsByCallId = new Map<string, ToolResult>();
|
|
28
|
+
for (const message of messages) {
|
|
29
|
+
if (message.role === 'tool-result' && message.toolResult !== undefined) {
|
|
30
|
+
resultsByCallId.set(message.toolResult.callId, message.toolResult);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
const pairs: ToolCallPair[] = [];
|
|
35
|
+
for (const message of messages) {
|
|
36
|
+
if (message.role === 'tool-call' && message.toolCall !== undefined) {
|
|
37
|
+
pairs.push({
|
|
38
|
+
call: message.toolCall,
|
|
39
|
+
result: resultsByCallId.get(message.toolCall.id),
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return pairs;
|
|
44
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export type FuzzyFilterItem = {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
keywords?: readonly string[] | undefined;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type FuzzyFilterResult<TItem extends FuzzyFilterItem> = {
|
|
8
|
+
item: TItem;
|
|
9
|
+
score: number;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
function normalize(value: string): string {
|
|
13
|
+
return value.trim().toLowerCase();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function fuzzySubsequenceScore(candidate: string, query: string): number | null {
|
|
17
|
+
const normalizedCandidate = normalize(candidate);
|
|
18
|
+
const normalizedQuery = normalize(query);
|
|
19
|
+
|
|
20
|
+
if (normalizedQuery.length === 0) return 0;
|
|
21
|
+
if (normalizedCandidate.length === 0) return null;
|
|
22
|
+
|
|
23
|
+
let score = 0;
|
|
24
|
+
let searchIndex = 0;
|
|
25
|
+
let previousMatchIndex = -1;
|
|
26
|
+
|
|
27
|
+
for (const character of normalizedQuery) {
|
|
28
|
+
const matchIndex = normalizedCandidate.indexOf(character, searchIndex);
|
|
29
|
+
if (matchIndex === -1) return null;
|
|
30
|
+
|
|
31
|
+
score += matchIndex === previousMatchIndex + 1 ? 4 : 1;
|
|
32
|
+
if (matchIndex === 0) score += 2;
|
|
33
|
+
if (/[\s/_-]/u.test(normalizedCandidate[matchIndex - 1] ?? '')) score += 2;
|
|
34
|
+
|
|
35
|
+
previousMatchIndex = matchIndex;
|
|
36
|
+
searchIndex = matchIndex + 1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return score - normalizedCandidate.length * 0.01;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function filterFuzzySubsequence<TItem extends FuzzyFilterItem>(
|
|
43
|
+
items: readonly TItem[],
|
|
44
|
+
query: string,
|
|
45
|
+
): TItem[] {
|
|
46
|
+
const normalizedQuery = normalize(query);
|
|
47
|
+
if (normalizedQuery.length === 0) return [...items];
|
|
48
|
+
|
|
49
|
+
const matchedItems = items
|
|
50
|
+
.map((item, index) => {
|
|
51
|
+
const candidates = [item.label, item.value, ...(item.keywords ?? [])];
|
|
52
|
+
let bestScore: number | null = null;
|
|
53
|
+
|
|
54
|
+
for (const candidate of candidates) {
|
|
55
|
+
const score = fuzzySubsequenceScore(candidate, normalizedQuery);
|
|
56
|
+
if (score !== null && (bestScore === null || score > bestScore)) {
|
|
57
|
+
bestScore = score;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return bestScore === null ? null : { item, index, score: bestScore };
|
|
62
|
+
})
|
|
63
|
+
.filter((result) => result !== null);
|
|
64
|
+
|
|
65
|
+
matchedItems.sort((a, b) => b.score - a.score || a.index - b.index);
|
|
66
|
+
|
|
67
|
+
return matchedItems.map((result) => result.item);
|
|
68
|
+
}
|