@lostgradient/cinder 0.14.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 +16 -0
- package/README.md +9 -9
- 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 -30164
- 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 +14 -135
- 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 -23
- package/dist/components/chat/index.js +0 -11305
- 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 -121
- 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-f2me5abn.js +0 -4230
- 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 -61
- 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 -45
- 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 -138
- 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
|
@@ -313,6 +313,175 @@ function Focus_trap($$anchor, $$props) {
|
|
|
313
313
|
$2.pop();
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
+
// src/_internal/overlay.ts
|
|
317
|
+
var escapeStack = [];
|
|
318
|
+
function pushEscapeHandler(handler) {
|
|
319
|
+
escapeStack.push(handler);
|
|
320
|
+
if (escapeStack.length === 1 && typeof window !== "undefined") {
|
|
321
|
+
window.addEventListener("keydown", onEscapeKeydown, { capture: true });
|
|
322
|
+
}
|
|
323
|
+
let released = false;
|
|
324
|
+
return () => {
|
|
325
|
+
if (released)
|
|
326
|
+
return;
|
|
327
|
+
released = true;
|
|
328
|
+
const index = escapeStack.lastIndexOf(handler);
|
|
329
|
+
if (index !== -1)
|
|
330
|
+
escapeStack.splice(index, 1);
|
|
331
|
+
if (escapeStack.length === 0 && typeof window !== "undefined") {
|
|
332
|
+
window.removeEventListener("keydown", onEscapeKeydown, { capture: true });
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
function onEscapeKeydown(event) {
|
|
337
|
+
if (event.key !== "Escape")
|
|
338
|
+
return;
|
|
339
|
+
const handler = escapeStack.at(-1);
|
|
340
|
+
if (!handler)
|
|
341
|
+
return;
|
|
342
|
+
handler(event);
|
|
343
|
+
}
|
|
344
|
+
var scrollLockCount = 0;
|
|
345
|
+
var originalBodyOverflow = null;
|
|
346
|
+
function lockBodyScroll() {
|
|
347
|
+
if (typeof document === "undefined")
|
|
348
|
+
return () => {};
|
|
349
|
+
if (scrollLockCount === 0) {
|
|
350
|
+
originalBodyOverflow = document.body.style.overflow;
|
|
351
|
+
document.body.style.overflow = "hidden";
|
|
352
|
+
}
|
|
353
|
+
scrollLockCount += 1;
|
|
354
|
+
let released = false;
|
|
355
|
+
return () => {
|
|
356
|
+
if (released)
|
|
357
|
+
return;
|
|
358
|
+
released = true;
|
|
359
|
+
scrollLockCount = Math.max(0, scrollLockCount - 1);
|
|
360
|
+
if (scrollLockCount === 0) {
|
|
361
|
+
document.body.style.overflow = originalBodyOverflow ?? "";
|
|
362
|
+
originalBodyOverflow = null;
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
function captureFocus() {
|
|
367
|
+
if (typeof document === "undefined")
|
|
368
|
+
return null;
|
|
369
|
+
const active = document.activeElement;
|
|
370
|
+
if (active && active !== document.body && active instanceof HTMLElement) {
|
|
371
|
+
return active;
|
|
372
|
+
}
|
|
373
|
+
return null;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// src/utilities/attachments.ts
|
|
377
|
+
function createBodyScrollLock() {
|
|
378
|
+
return () => {
|
|
379
|
+
const release = lockBodyScroll();
|
|
380
|
+
return release;
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
function isInsideEventPath(event, element) {
|
|
384
|
+
const path = event.composedPath();
|
|
385
|
+
return path.some((entry) => entry instanceof Node && element.contains(entry));
|
|
386
|
+
}
|
|
387
|
+
function createClickOutside(options) {
|
|
388
|
+
const { handler, enabled = true, eventType = "click", capture = true, ignoreRefs } = options;
|
|
389
|
+
return (node) => {
|
|
390
|
+
function handleEvent(event) {
|
|
391
|
+
const isEnabled = typeof enabled === "function" ? enabled() : enabled;
|
|
392
|
+
if (!isEnabled)
|
|
393
|
+
return;
|
|
394
|
+
if (event.type === "touchstart" && !event.cancelable)
|
|
395
|
+
return;
|
|
396
|
+
const target = event.target;
|
|
397
|
+
if (!(target instanceof Node)) {
|
|
398
|
+
handler();
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
if (isInsideEventPath(event, node))
|
|
402
|
+
return;
|
|
403
|
+
if (ignoreRefs) {
|
|
404
|
+
for (const ref of ignoreRefs) {
|
|
405
|
+
const element = ref();
|
|
406
|
+
if (element && isInsideEventPath(event, element))
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
handler();
|
|
411
|
+
}
|
|
412
|
+
document.addEventListener(eventType, handleEvent, capture);
|
|
413
|
+
return () => {
|
|
414
|
+
document.removeEventListener(eventType, handleEvent, capture);
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
function overflowFade() {
|
|
419
|
+
return (node) => {
|
|
420
|
+
if (typeof ResizeObserver === "undefined") {
|
|
421
|
+
node.removeAttribute("data-cinder-overflows");
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
const update = () => {
|
|
425
|
+
const overflows = node.scrollHeight - node.clientHeight > 1;
|
|
426
|
+
const atBottom = node.scrollTop + node.clientHeight >= node.scrollHeight - 1;
|
|
427
|
+
node.toggleAttribute("data-cinder-overflows", overflows && !atBottom);
|
|
428
|
+
};
|
|
429
|
+
const requestFrame = typeof requestAnimationFrame === "function" ? requestAnimationFrame : (callback) => window.setTimeout(() => callback(performance.now()));
|
|
430
|
+
const cancelFrame = typeof cancelAnimationFrame === "function" ? cancelAnimationFrame : (handle) => window.clearTimeout(handle);
|
|
431
|
+
let frame = 0;
|
|
432
|
+
const scheduleUpdate = () => {
|
|
433
|
+
if (frame)
|
|
434
|
+
return;
|
|
435
|
+
frame = requestFrame(() => {
|
|
436
|
+
frame = 0;
|
|
437
|
+
update();
|
|
438
|
+
});
|
|
439
|
+
};
|
|
440
|
+
const resizeObserver = new ResizeObserver(scheduleUpdate);
|
|
441
|
+
const observedElements = new Set;
|
|
442
|
+
const observeElement = (element) => {
|
|
443
|
+
if (observedElements.has(element))
|
|
444
|
+
return;
|
|
445
|
+
resizeObserver.observe(element);
|
|
446
|
+
observedElements.add(element);
|
|
447
|
+
};
|
|
448
|
+
const syncObservedElements = () => {
|
|
449
|
+
const currentElements = new Set([node, ...node.querySelectorAll("*")]);
|
|
450
|
+
for (const element of observedElements) {
|
|
451
|
+
if (!currentElements.has(element)) {
|
|
452
|
+
resizeObserver.unobserve(element);
|
|
453
|
+
observedElements.delete(element);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
for (const element of currentElements) {
|
|
457
|
+
observeElement(element);
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
syncObservedElements();
|
|
461
|
+
const mutationObserver = typeof MutationObserver === "undefined" ? null : new MutationObserver(() => {
|
|
462
|
+
syncObservedElements();
|
|
463
|
+
scheduleUpdate();
|
|
464
|
+
});
|
|
465
|
+
mutationObserver?.observe(node, {
|
|
466
|
+
childList: true,
|
|
467
|
+
subtree: true,
|
|
468
|
+
characterData: true,
|
|
469
|
+
attributes: true,
|
|
470
|
+
attributeFilter: ["hidden", "class", "style", "aria-hidden"]
|
|
471
|
+
});
|
|
472
|
+
node.addEventListener("scroll", scheduleUpdate, { passive: true });
|
|
473
|
+
update();
|
|
474
|
+
return () => {
|
|
475
|
+
if (frame)
|
|
476
|
+
cancelFrame(frame);
|
|
477
|
+
resizeObserver.disconnect();
|
|
478
|
+
observedElements.clear();
|
|
479
|
+
mutationObserver?.disconnect();
|
|
480
|
+
node.removeEventListener("scroll", scheduleUpdate);
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
|
|
316
485
|
// src/components/focus-trap/index.ts
|
|
317
486
|
var focus_trap_default = Focus_trap;
|
|
318
487
|
// src/components/confirm-dialog/index.ts
|
|
@@ -886,177 +1055,6 @@ function Input($$anchor, $$props) {
|
|
|
886
1055
|
import"svelte/internal/disclose-version";
|
|
887
1056
|
import * as $5 from "svelte/internal/client";
|
|
888
1057
|
import { onDestroy } from "svelte";
|
|
889
|
-
|
|
890
|
-
// src/_internal/overlay.ts
|
|
891
|
-
var escapeStack = [];
|
|
892
|
-
function pushEscapeHandler(handler) {
|
|
893
|
-
escapeStack.push(handler);
|
|
894
|
-
if (escapeStack.length === 1 && typeof window !== "undefined") {
|
|
895
|
-
window.addEventListener("keydown", onEscapeKeydown, { capture: true });
|
|
896
|
-
}
|
|
897
|
-
let released = false;
|
|
898
|
-
return () => {
|
|
899
|
-
if (released)
|
|
900
|
-
return;
|
|
901
|
-
released = true;
|
|
902
|
-
const index = escapeStack.lastIndexOf(handler);
|
|
903
|
-
if (index !== -1)
|
|
904
|
-
escapeStack.splice(index, 1);
|
|
905
|
-
if (escapeStack.length === 0 && typeof window !== "undefined") {
|
|
906
|
-
window.removeEventListener("keydown", onEscapeKeydown, { capture: true });
|
|
907
|
-
}
|
|
908
|
-
};
|
|
909
|
-
}
|
|
910
|
-
function onEscapeKeydown(event) {
|
|
911
|
-
if (event.key !== "Escape")
|
|
912
|
-
return;
|
|
913
|
-
const handler = escapeStack.at(-1);
|
|
914
|
-
if (!handler)
|
|
915
|
-
return;
|
|
916
|
-
handler(event);
|
|
917
|
-
}
|
|
918
|
-
var scrollLockCount = 0;
|
|
919
|
-
var originalBodyOverflow = null;
|
|
920
|
-
function lockBodyScroll() {
|
|
921
|
-
if (typeof document === "undefined")
|
|
922
|
-
return () => {};
|
|
923
|
-
if (scrollLockCount === 0) {
|
|
924
|
-
originalBodyOverflow = document.body.style.overflow;
|
|
925
|
-
document.body.style.overflow = "hidden";
|
|
926
|
-
}
|
|
927
|
-
scrollLockCount += 1;
|
|
928
|
-
let released = false;
|
|
929
|
-
return () => {
|
|
930
|
-
if (released)
|
|
931
|
-
return;
|
|
932
|
-
released = true;
|
|
933
|
-
scrollLockCount = Math.max(0, scrollLockCount - 1);
|
|
934
|
-
if (scrollLockCount === 0) {
|
|
935
|
-
document.body.style.overflow = originalBodyOverflow ?? "";
|
|
936
|
-
originalBodyOverflow = null;
|
|
937
|
-
}
|
|
938
|
-
};
|
|
939
|
-
}
|
|
940
|
-
function captureFocus() {
|
|
941
|
-
if (typeof document === "undefined")
|
|
942
|
-
return null;
|
|
943
|
-
const active = document.activeElement;
|
|
944
|
-
if (active && active !== document.body && active instanceof HTMLElement) {
|
|
945
|
-
return active;
|
|
946
|
-
}
|
|
947
|
-
return null;
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
// src/utilities/attachments.ts
|
|
951
|
-
function createBodyScrollLock() {
|
|
952
|
-
return () => {
|
|
953
|
-
const release = lockBodyScroll();
|
|
954
|
-
return release;
|
|
955
|
-
};
|
|
956
|
-
}
|
|
957
|
-
function isInsideEventPath(event, element) {
|
|
958
|
-
const path = event.composedPath();
|
|
959
|
-
return path.some((entry) => entry instanceof Node && element.contains(entry));
|
|
960
|
-
}
|
|
961
|
-
function createClickOutside(options) {
|
|
962
|
-
const { handler, enabled = true, eventType = "click", capture = true, ignoreRefs } = options;
|
|
963
|
-
return (node) => {
|
|
964
|
-
function handleEvent(event) {
|
|
965
|
-
const isEnabled = typeof enabled === "function" ? enabled() : enabled;
|
|
966
|
-
if (!isEnabled)
|
|
967
|
-
return;
|
|
968
|
-
if (event.type === "touchstart" && !event.cancelable)
|
|
969
|
-
return;
|
|
970
|
-
const target = event.target;
|
|
971
|
-
if (!(target instanceof Node)) {
|
|
972
|
-
handler();
|
|
973
|
-
return;
|
|
974
|
-
}
|
|
975
|
-
if (isInsideEventPath(event, node))
|
|
976
|
-
return;
|
|
977
|
-
if (ignoreRefs) {
|
|
978
|
-
for (const ref of ignoreRefs) {
|
|
979
|
-
const element = ref();
|
|
980
|
-
if (element && isInsideEventPath(event, element))
|
|
981
|
-
return;
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
handler();
|
|
985
|
-
}
|
|
986
|
-
document.addEventListener(eventType, handleEvent, capture);
|
|
987
|
-
return () => {
|
|
988
|
-
document.removeEventListener(eventType, handleEvent, capture);
|
|
989
|
-
};
|
|
990
|
-
};
|
|
991
|
-
}
|
|
992
|
-
function overflowFade() {
|
|
993
|
-
return (node) => {
|
|
994
|
-
if (typeof ResizeObserver === "undefined") {
|
|
995
|
-
node.removeAttribute("data-cinder-overflows");
|
|
996
|
-
return;
|
|
997
|
-
}
|
|
998
|
-
const update = () => {
|
|
999
|
-
const overflows = node.scrollHeight - node.clientHeight > 1;
|
|
1000
|
-
const atBottom = node.scrollTop + node.clientHeight >= node.scrollHeight - 1;
|
|
1001
|
-
node.toggleAttribute("data-cinder-overflows", overflows && !atBottom);
|
|
1002
|
-
};
|
|
1003
|
-
const requestFrame = typeof requestAnimationFrame === "function" ? requestAnimationFrame : (callback) => window.setTimeout(() => callback(performance.now()));
|
|
1004
|
-
const cancelFrame = typeof cancelAnimationFrame === "function" ? cancelAnimationFrame : (handle) => window.clearTimeout(handle);
|
|
1005
|
-
let frame = 0;
|
|
1006
|
-
const scheduleUpdate = () => {
|
|
1007
|
-
if (frame)
|
|
1008
|
-
return;
|
|
1009
|
-
frame = requestFrame(() => {
|
|
1010
|
-
frame = 0;
|
|
1011
|
-
update();
|
|
1012
|
-
});
|
|
1013
|
-
};
|
|
1014
|
-
const resizeObserver = new ResizeObserver(scheduleUpdate);
|
|
1015
|
-
const observedElements = new Set;
|
|
1016
|
-
const observeElement = (element) => {
|
|
1017
|
-
if (observedElements.has(element))
|
|
1018
|
-
return;
|
|
1019
|
-
resizeObserver.observe(element);
|
|
1020
|
-
observedElements.add(element);
|
|
1021
|
-
};
|
|
1022
|
-
const syncObservedElements = () => {
|
|
1023
|
-
const currentElements = new Set([node, ...node.querySelectorAll("*")]);
|
|
1024
|
-
for (const element of observedElements) {
|
|
1025
|
-
if (!currentElements.has(element)) {
|
|
1026
|
-
resizeObserver.unobserve(element);
|
|
1027
|
-
observedElements.delete(element);
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
for (const element of currentElements) {
|
|
1031
|
-
observeElement(element);
|
|
1032
|
-
}
|
|
1033
|
-
};
|
|
1034
|
-
syncObservedElements();
|
|
1035
|
-
const mutationObserver = typeof MutationObserver === "undefined" ? null : new MutationObserver(() => {
|
|
1036
|
-
syncObservedElements();
|
|
1037
|
-
scheduleUpdate();
|
|
1038
|
-
});
|
|
1039
|
-
mutationObserver?.observe(node, {
|
|
1040
|
-
childList: true,
|
|
1041
|
-
subtree: true,
|
|
1042
|
-
characterData: true,
|
|
1043
|
-
attributes: true,
|
|
1044
|
-
attributeFilter: ["hidden", "class", "style", "aria-hidden"]
|
|
1045
|
-
});
|
|
1046
|
-
node.addEventListener("scroll", scheduleUpdate, { passive: true });
|
|
1047
|
-
update();
|
|
1048
|
-
return () => {
|
|
1049
|
-
if (frame)
|
|
1050
|
-
cancelFrame(frame);
|
|
1051
|
-
resizeObserver.disconnect();
|
|
1052
|
-
observedElements.clear();
|
|
1053
|
-
mutationObserver?.disconnect();
|
|
1054
|
-
node.removeEventListener("scroll", scheduleUpdate);
|
|
1055
|
-
};
|
|
1056
|
-
};
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
// src/components/modal/modal.svelte
|
|
1060
1058
|
var root4 = $5.from_html(`<div class="cinder-modal__footer"><!></div>`);
|
|
1061
1059
|
var root_13 = $5.from_html(`<button type="button" class="cinder-modal__close" aria-label="Close dialog"><svg class="cinder-modal__close-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path d="M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"></path></svg></button>`);
|
|
1062
1060
|
var root_23 = $5.from_html(`<div class="cinder-modal__panel"><div class="cinder-modal__header"><h2 class="cinder-modal__title"> </h2></div> <div class="cinder-modal__body" tabindex="-1"><!></div> <!> <!></div>`);
|
|
@@ -1382,4 +1380,4 @@ export {
|
|
|
1382
1380
|
Confirm_dialog as ConfirmDialog
|
|
1383
1381
|
};
|
|
1384
1382
|
|
|
1385
|
-
//# debugId=
|
|
1383
|
+
//# debugId=73FBC05C0CFE9C7464756E2164756E21
|
|
@@ -313,16 +313,6 @@ function Focus_trap($$anchor, $$props) {
|
|
|
313
313
|
$2.pop();
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
// src/components/focus-trap/index.ts
|
|
317
|
-
var focus_trap_default = Focus_trap;
|
|
318
|
-
// src/components/drawer/index.ts
|
|
319
|
-
import"@lostgradient/cinder/drawer/styles";
|
|
320
|
-
|
|
321
|
-
// src/components/drawer/drawer.svelte
|
|
322
|
-
import"svelte/internal/disclose-version";
|
|
323
|
-
import * as $5 from "svelte/internal/client";
|
|
324
|
-
import { onDestroy } from "svelte";
|
|
325
|
-
|
|
326
316
|
// src/_internal/overlay.ts
|
|
327
317
|
var escapeStack = [];
|
|
328
318
|
function pushEscapeHandler(handler) {
|
|
@@ -492,6 +482,16 @@ function overflowFade() {
|
|
|
492
482
|
};
|
|
493
483
|
}
|
|
494
484
|
|
|
485
|
+
// src/components/focus-trap/index.ts
|
|
486
|
+
var focus_trap_default = Focus_trap;
|
|
487
|
+
// src/components/drawer/index.ts
|
|
488
|
+
import"@lostgradient/cinder/drawer/styles";
|
|
489
|
+
|
|
490
|
+
// src/components/drawer/drawer.svelte
|
|
491
|
+
import"svelte/internal/disclose-version";
|
|
492
|
+
import * as $5 from "svelte/internal/client";
|
|
493
|
+
import { onDestroy } from "svelte";
|
|
494
|
+
|
|
495
495
|
// src/utilities/use-reduced-motion.svelte.ts
|
|
496
496
|
import * as $3 from "svelte/internal/client";
|
|
497
497
|
import { MediaQuery } from "svelte/reactivity";
|
|
@@ -954,4 +954,4 @@ export {
|
|
|
954
954
|
Drawer
|
|
955
955
|
};
|
|
956
956
|
|
|
957
|
-
//# debugId=
|
|
957
|
+
//# debugId=091FA910F6B54F4664756E2164756E21
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import FocusTrap from './focus-trap.svelte';
|
|
2
2
|
export default FocusTrap;
|
|
3
|
+
export { createBodyScrollLock } from '../../utilities/attachments.ts';
|
|
3
4
|
export type { FocusTrapOptions, FocusTrapProps } from './focus-trap.types.ts';
|
|
4
5
|
export { createFocusTrap } from './focus-trap.utilities.svelte.ts';
|
|
5
6
|
export { FocusTrap };
|
|
@@ -313,12 +313,182 @@ function Focus_trap($$anchor, $$props) {
|
|
|
313
313
|
$2.pop();
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
+
// src/_internal/overlay.ts
|
|
317
|
+
var escapeStack = [];
|
|
318
|
+
function pushEscapeHandler(handler) {
|
|
319
|
+
escapeStack.push(handler);
|
|
320
|
+
if (escapeStack.length === 1 && typeof window !== "undefined") {
|
|
321
|
+
window.addEventListener("keydown", onEscapeKeydown, { capture: true });
|
|
322
|
+
}
|
|
323
|
+
let released = false;
|
|
324
|
+
return () => {
|
|
325
|
+
if (released)
|
|
326
|
+
return;
|
|
327
|
+
released = true;
|
|
328
|
+
const index = escapeStack.lastIndexOf(handler);
|
|
329
|
+
if (index !== -1)
|
|
330
|
+
escapeStack.splice(index, 1);
|
|
331
|
+
if (escapeStack.length === 0 && typeof window !== "undefined") {
|
|
332
|
+
window.removeEventListener("keydown", onEscapeKeydown, { capture: true });
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
function onEscapeKeydown(event) {
|
|
337
|
+
if (event.key !== "Escape")
|
|
338
|
+
return;
|
|
339
|
+
const handler = escapeStack.at(-1);
|
|
340
|
+
if (!handler)
|
|
341
|
+
return;
|
|
342
|
+
handler(event);
|
|
343
|
+
}
|
|
344
|
+
var scrollLockCount = 0;
|
|
345
|
+
var originalBodyOverflow = null;
|
|
346
|
+
function lockBodyScroll() {
|
|
347
|
+
if (typeof document === "undefined")
|
|
348
|
+
return () => {};
|
|
349
|
+
if (scrollLockCount === 0) {
|
|
350
|
+
originalBodyOverflow = document.body.style.overflow;
|
|
351
|
+
document.body.style.overflow = "hidden";
|
|
352
|
+
}
|
|
353
|
+
scrollLockCount += 1;
|
|
354
|
+
let released = false;
|
|
355
|
+
return () => {
|
|
356
|
+
if (released)
|
|
357
|
+
return;
|
|
358
|
+
released = true;
|
|
359
|
+
scrollLockCount = Math.max(0, scrollLockCount - 1);
|
|
360
|
+
if (scrollLockCount === 0) {
|
|
361
|
+
document.body.style.overflow = originalBodyOverflow ?? "";
|
|
362
|
+
originalBodyOverflow = null;
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
function captureFocus() {
|
|
367
|
+
if (typeof document === "undefined")
|
|
368
|
+
return null;
|
|
369
|
+
const active = document.activeElement;
|
|
370
|
+
if (active && active !== document.body && active instanceof HTMLElement) {
|
|
371
|
+
return active;
|
|
372
|
+
}
|
|
373
|
+
return null;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// src/utilities/attachments.ts
|
|
377
|
+
function createBodyScrollLock() {
|
|
378
|
+
return () => {
|
|
379
|
+
const release = lockBodyScroll();
|
|
380
|
+
return release;
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
function isInsideEventPath(event, element) {
|
|
384
|
+
const path = event.composedPath();
|
|
385
|
+
return path.some((entry) => entry instanceof Node && element.contains(entry));
|
|
386
|
+
}
|
|
387
|
+
function createClickOutside(options) {
|
|
388
|
+
const { handler, enabled = true, eventType = "click", capture = true, ignoreRefs } = options;
|
|
389
|
+
return (node) => {
|
|
390
|
+
function handleEvent(event) {
|
|
391
|
+
const isEnabled = typeof enabled === "function" ? enabled() : enabled;
|
|
392
|
+
if (!isEnabled)
|
|
393
|
+
return;
|
|
394
|
+
if (event.type === "touchstart" && !event.cancelable)
|
|
395
|
+
return;
|
|
396
|
+
const target = event.target;
|
|
397
|
+
if (!(target instanceof Node)) {
|
|
398
|
+
handler();
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
if (isInsideEventPath(event, node))
|
|
402
|
+
return;
|
|
403
|
+
if (ignoreRefs) {
|
|
404
|
+
for (const ref of ignoreRefs) {
|
|
405
|
+
const element = ref();
|
|
406
|
+
if (element && isInsideEventPath(event, element))
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
handler();
|
|
411
|
+
}
|
|
412
|
+
document.addEventListener(eventType, handleEvent, capture);
|
|
413
|
+
return () => {
|
|
414
|
+
document.removeEventListener(eventType, handleEvent, capture);
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
function overflowFade() {
|
|
419
|
+
return (node) => {
|
|
420
|
+
if (typeof ResizeObserver === "undefined") {
|
|
421
|
+
node.removeAttribute("data-cinder-overflows");
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
const update = () => {
|
|
425
|
+
const overflows = node.scrollHeight - node.clientHeight > 1;
|
|
426
|
+
const atBottom = node.scrollTop + node.clientHeight >= node.scrollHeight - 1;
|
|
427
|
+
node.toggleAttribute("data-cinder-overflows", overflows && !atBottom);
|
|
428
|
+
};
|
|
429
|
+
const requestFrame = typeof requestAnimationFrame === "function" ? requestAnimationFrame : (callback) => window.setTimeout(() => callback(performance.now()));
|
|
430
|
+
const cancelFrame = typeof cancelAnimationFrame === "function" ? cancelAnimationFrame : (handle) => window.clearTimeout(handle);
|
|
431
|
+
let frame = 0;
|
|
432
|
+
const scheduleUpdate = () => {
|
|
433
|
+
if (frame)
|
|
434
|
+
return;
|
|
435
|
+
frame = requestFrame(() => {
|
|
436
|
+
frame = 0;
|
|
437
|
+
update();
|
|
438
|
+
});
|
|
439
|
+
};
|
|
440
|
+
const resizeObserver = new ResizeObserver(scheduleUpdate);
|
|
441
|
+
const observedElements = new Set;
|
|
442
|
+
const observeElement = (element) => {
|
|
443
|
+
if (observedElements.has(element))
|
|
444
|
+
return;
|
|
445
|
+
resizeObserver.observe(element);
|
|
446
|
+
observedElements.add(element);
|
|
447
|
+
};
|
|
448
|
+
const syncObservedElements = () => {
|
|
449
|
+
const currentElements = new Set([node, ...node.querySelectorAll("*")]);
|
|
450
|
+
for (const element of observedElements) {
|
|
451
|
+
if (!currentElements.has(element)) {
|
|
452
|
+
resizeObserver.unobserve(element);
|
|
453
|
+
observedElements.delete(element);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
for (const element of currentElements) {
|
|
457
|
+
observeElement(element);
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
syncObservedElements();
|
|
461
|
+
const mutationObserver = typeof MutationObserver === "undefined" ? null : new MutationObserver(() => {
|
|
462
|
+
syncObservedElements();
|
|
463
|
+
scheduleUpdate();
|
|
464
|
+
});
|
|
465
|
+
mutationObserver?.observe(node, {
|
|
466
|
+
childList: true,
|
|
467
|
+
subtree: true,
|
|
468
|
+
characterData: true,
|
|
469
|
+
attributes: true,
|
|
470
|
+
attributeFilter: ["hidden", "class", "style", "aria-hidden"]
|
|
471
|
+
});
|
|
472
|
+
node.addEventListener("scroll", scheduleUpdate, { passive: true });
|
|
473
|
+
update();
|
|
474
|
+
return () => {
|
|
475
|
+
if (frame)
|
|
476
|
+
cancelFrame(frame);
|
|
477
|
+
resizeObserver.disconnect();
|
|
478
|
+
observedElements.clear();
|
|
479
|
+
mutationObserver?.disconnect();
|
|
480
|
+
node.removeEventListener("scroll", scheduleUpdate);
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
|
|
316
485
|
// src/components/focus-trap/index.ts
|
|
317
486
|
var focus_trap_default = Focus_trap;
|
|
318
487
|
export {
|
|
319
488
|
focus_trap_default as default,
|
|
320
489
|
createFocusTrap,
|
|
490
|
+
createBodyScrollLock,
|
|
321
491
|
Focus_trap as FocusTrap
|
|
322
492
|
};
|
|
323
493
|
|
|
324
|
-
//# debugId=
|
|
494
|
+
//# debugId=D2D5D3C16DD8546F64756E2164756E21
|
|
@@ -1,5 +1,84 @@
|
|
|
1
1
|
import type { IconProps } from 'lucide-svelte';
|
|
2
|
+
import ArrowUpIcon from 'lucide-svelte/icons/arrow-up';
|
|
3
|
+
import BoldIcon from 'lucide-svelte/icons/bold';
|
|
4
|
+
import CheckIcon from 'lucide-svelte/icons/check';
|
|
5
|
+
import CheckCheckIcon from 'lucide-svelte/icons/check-check';
|
|
6
|
+
import ChevronDownIcon from 'lucide-svelte/icons/chevron-down';
|
|
7
|
+
import ChevronLeftIcon from 'lucide-svelte/icons/chevron-left';
|
|
8
|
+
import ChevronRightIcon from 'lucide-svelte/icons/chevron-right';
|
|
9
|
+
import ChevronUpIcon from 'lucide-svelte/icons/chevron-up';
|
|
10
|
+
import CircleAlertIcon from 'lucide-svelte/icons/circle-alert';
|
|
11
|
+
import CodeIcon from 'lucide-svelte/icons/code';
|
|
12
|
+
import CopyIcon from 'lucide-svelte/icons/copy';
|
|
13
|
+
import FileCodeIcon from 'lucide-svelte/icons/file-code';
|
|
14
|
+
import FileTextIcon from 'lucide-svelte/icons/file-text';
|
|
15
|
+
import FolderGit2Icon from 'lucide-svelte/icons/folder-git-2';
|
|
16
|
+
import GitBranchIcon from 'lucide-svelte/icons/git-branch';
|
|
17
|
+
import Heading1Icon from 'lucide-svelte/icons/heading-1';
|
|
18
|
+
import Heading2Icon from 'lucide-svelte/icons/heading-2';
|
|
19
|
+
import Heading3Icon from 'lucide-svelte/icons/heading-3';
|
|
20
|
+
import ItalicIcon from 'lucide-svelte/icons/italic';
|
|
21
|
+
import LinkIcon from 'lucide-svelte/icons/link';
|
|
22
|
+
import ListIcon from 'lucide-svelte/icons/list';
|
|
23
|
+
import ListOrderedIcon from 'lucide-svelte/icons/list-ordered';
|
|
24
|
+
import MessageCircleIcon from 'lucide-svelte/icons/message-circle';
|
|
25
|
+
import MessageSquareIcon from 'lucide-svelte/icons/message-square';
|
|
26
|
+
import MoreHorizontalIcon from 'lucide-svelte/icons/more-horizontal';
|
|
27
|
+
import PaperclipIcon from 'lucide-svelte/icons/paperclip';
|
|
28
|
+
import PencilIcon from 'lucide-svelte/icons/pencil';
|
|
29
|
+
import PilcrowIcon from 'lucide-svelte/icons/pilcrow';
|
|
30
|
+
import PlusIcon from 'lucide-svelte/icons/plus';
|
|
31
|
+
import QuoteIcon from 'lucide-svelte/icons/quote';
|
|
32
|
+
import Redo2Icon from 'lucide-svelte/icons/redo-2';
|
|
33
|
+
import RefreshCwIcon from 'lucide-svelte/icons/refresh-cw';
|
|
34
|
+
import RotateCcwIcon from 'lucide-svelte/icons/rotate-ccw';
|
|
35
|
+
import SearchIcon from 'lucide-svelte/icons/search';
|
|
36
|
+
import SquareIcon from 'lucide-svelte/icons/square';
|
|
37
|
+
import StrikethroughIcon from 'lucide-svelte/icons/strikethrough';
|
|
38
|
+
import Trash2Icon from 'lucide-svelte/icons/trash-2';
|
|
39
|
+
import Undo2Icon from 'lucide-svelte/icons/undo-2';
|
|
40
|
+
import UnlinkIcon from 'lucide-svelte/icons/unlink';
|
|
41
|
+
import XIcon from 'lucide-svelte/icons/x';
|
|
2
42
|
import type { ComponentType, SvelteComponent } from 'svelte';
|
|
3
|
-
export
|
|
43
|
+
export declare const ArrowUp: typeof ArrowUpIcon;
|
|
44
|
+
export declare const Bold: typeof BoldIcon;
|
|
45
|
+
export declare const Check: typeof CheckIcon;
|
|
46
|
+
export declare const CheckCheck: typeof CheckCheckIcon;
|
|
47
|
+
export declare const ChevronDown: typeof ChevronDownIcon;
|
|
48
|
+
export declare const ChevronLeft: typeof ChevronLeftIcon;
|
|
49
|
+
export declare const ChevronRight: typeof ChevronRightIcon;
|
|
50
|
+
export declare const ChevronUp: typeof ChevronUpIcon;
|
|
51
|
+
export declare const CircleAlert: typeof CircleAlertIcon;
|
|
52
|
+
export declare const Code: typeof CodeIcon;
|
|
53
|
+
export declare const Copy: typeof CopyIcon;
|
|
54
|
+
export declare const FileCode: typeof FileCodeIcon;
|
|
55
|
+
export declare const FileText: typeof FileTextIcon;
|
|
56
|
+
export declare const FolderGit2: typeof FolderGit2Icon;
|
|
57
|
+
export declare const GitBranch: typeof GitBranchIcon;
|
|
58
|
+
export declare const Heading1: typeof Heading1Icon;
|
|
59
|
+
export declare const Heading2: typeof Heading2Icon;
|
|
60
|
+
export declare const Heading3: typeof Heading3Icon;
|
|
61
|
+
export declare const Italic: typeof ItalicIcon;
|
|
62
|
+
export declare const Link: typeof LinkIcon;
|
|
63
|
+
export declare const List: typeof ListIcon;
|
|
64
|
+
export declare const ListOrdered: typeof ListOrderedIcon;
|
|
65
|
+
export declare const MessageCircle: typeof MessageCircleIcon;
|
|
66
|
+
export declare const MessageSquare: typeof MessageSquareIcon;
|
|
67
|
+
export declare const MoreHorizontal: typeof MoreHorizontalIcon;
|
|
68
|
+
export declare const Paperclip: typeof PaperclipIcon;
|
|
69
|
+
export declare const Pencil: typeof PencilIcon;
|
|
70
|
+
export declare const Pilcrow: typeof PilcrowIcon;
|
|
71
|
+
export declare const Plus: typeof PlusIcon;
|
|
72
|
+
export declare const Quote: typeof QuoteIcon;
|
|
73
|
+
export declare const Redo2: typeof Redo2Icon;
|
|
74
|
+
export declare const RefreshCw: typeof RefreshCwIcon;
|
|
75
|
+
export declare const RotateCcw: typeof RotateCcwIcon;
|
|
76
|
+
export declare const Search: typeof SearchIcon;
|
|
77
|
+
export declare const Square: typeof SquareIcon;
|
|
78
|
+
export declare const Strikethrough: typeof StrikethroughIcon;
|
|
79
|
+
export declare const Trash2: typeof Trash2Icon;
|
|
80
|
+
export declare const Undo2: typeof Undo2Icon;
|
|
81
|
+
export declare const Unlink: typeof UnlinkIcon;
|
|
82
|
+
export declare const X: typeof XIcon;
|
|
4
83
|
export type { IconProps } from 'lucide-svelte';
|
|
5
84
|
export type IconComponent = ComponentType<SvelteComponent<IconProps>>;
|