@lostgradient/cinder 0.21.0 → 0.23.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 +314 -0
- package/components.json +95 -556
- package/dist/_internal/chart/chart-bar-model.d.ts +24 -0
- package/dist/_internal/chart/chart-cartesian-model.d.ts +16 -0
- package/dist/_internal/chart/chart-layout.d.ts +23 -0
- package/dist/_internal/chart/chart-model-utilities.d.ts +157 -0
- package/dist/_internal/chart/chart-scale.d.ts +37 -0
- package/dist/_internal/chart/chart-utilities.d.ts +7 -164
- package/dist/_internal/chart/heatmap-utilities.d.ts +5 -4
- package/dist/_internal/form-field-frame.svelte.d.ts +1 -1
- package/dist/_internal/overlay.d.ts +3 -4
- package/dist/components/_internal/chart-tooltip.css +21 -0
- package/dist/components/_internal/chart-tooltip.svelte.d.ts +11 -0
- package/dist/components/_internal/create-sliding-dialog-state.svelte.d.ts +23 -0
- package/dist/components/access-gate/access-gate.css +0 -13
- package/dist/components/access-gate/index.js +334 -270
- package/dist/components/alert-dialog/alert-dialog.schema.js +8 -6
- package/dist/components/alert-dialog/alert-dialog.types.d.ts +12 -4
- package/dist/components/alert-dialog/index.js +31 -7
- package/dist/components/approval-card/approval-card.svelte.d.ts +1 -1
- package/dist/components/approval-card/index.js +344 -102
- package/dist/components/area-chart/area-chart.css +27 -23
- package/dist/components/area-chart/area-chart.schema.js +38 -1
- package/dist/components/area-chart/area-chart.types.d.ts +6 -2
- package/dist/components/area-chart/index.js +1590 -769
- package/dist/components/autocomplete/autocomplete.css +5 -9
- package/dist/components/autocomplete/autocomplete.schema.js +2 -2
- package/dist/components/autocomplete/autocomplete.types.d.ts +2 -2
- package/dist/components/autocomplete/index.js +8 -5
- package/dist/components/backdrop/backdrop.svelte.d.ts +3 -3
- package/dist/components/badge/badge.css +2 -2
- package/dist/components/badge/badge.schema.js +2 -2
- package/dist/components/badge/badge.types.d.ts +3 -3
- package/dist/components/badge/index.js +4 -4
- package/dist/components/bar-chart/bar-chart.css +27 -21
- package/dist/components/bar-chart/bar-chart.schema.js +38 -1
- package/dist/components/bar-chart/bar-chart.types.d.ts +7 -3
- package/dist/components/bar-chart/index.js +1545 -741
- package/dist/components/button-group/button-group.schema.js +4 -4
- package/dist/components/button-group/button-group.types.d.ts +5 -5
- package/dist/components/button-group/index.js +8 -8
- package/dist/components/calendar/calendar.schema.js +2 -2
- package/dist/components/calendar/calendar.types.d.ts +1 -1
- package/dist/components/calendar/index.js +3 -3
- package/dist/components/capability-gate/capability-gate.css +5 -14
- package/dist/components/capability-gate/capability-gate.schema.js +6 -27
- package/dist/components/capability-gate/capability-gate.types.d.ts +20 -24
- package/dist/components/capability-gate/index.js +19 -94
- package/dist/components/card/card.css +70 -0
- package/dist/components/card/card.schema.js +19 -6
- package/dist/components/card/card.svelte.d.ts +1 -1
- package/dist/components/card/card.types.d.ts +21 -2
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/card/index.js +329 -87
- package/dist/components/chart.types.d.ts +98 -2
- package/dist/components/checkbox/index.js +31 -5
- package/dist/components/collapsible/collapsible.css +1 -5
- package/dist/components/collapsible/index.js +2 -2
- package/dist/components/color-field/color-field.css +10 -0
- package/dist/components/color-field/color-field.schema.js +4 -4
- package/dist/components/color-field/color-field.svelte.d.ts +1 -1
- package/dist/components/color-field/color-field.types.d.ts +3 -3
- package/dist/components/color-field/index.js +395 -127
- package/dist/components/color-picker/color-picker-controls.svelte.d.ts +44 -0
- package/dist/components/color-picker/color-picker.css +45 -2
- package/dist/components/color-picker/color-picker.schema.js +5 -5
- package/dist/components/color-picker/color-picker.types.d.ts +2 -2
- package/dist/components/color-picker/color-picker.utilities.d.ts +17 -0
- package/dist/components/color-picker/index.js +662 -423
- package/dist/components/color-swatch-picker/color-swatch-picker.schema.js +2 -2
- package/dist/components/color-swatch-picker/color-swatch-picker.types.d.ts +1 -1
- package/dist/components/color-swatch-picker/index.js +41 -2
- package/dist/components/combobox/combobox.css +3 -14
- package/dist/components/combobox/combobox.schema.js +2 -2
- package/dist/components/combobox/combobox.types.d.ts +1 -1
- package/dist/components/combobox/index.js +37 -8
- package/dist/components/confirm-dialog/confirm-dialog.schema.js +7 -9
- package/dist/components/confirm-dialog/confirm-dialog.svelte.d.ts +1 -1
- package/dist/components/confirm-dialog/confirm-dialog.types.d.ts +14 -10
- package/dist/components/confirm-dialog/index.js +67 -17
- package/dist/components/connection-indicator/connection-indicator.svelte.d.ts +2 -2
- package/dist/components/context-menu/index.js +6 -6
- package/dist/components/data-grid/data-grid.css +3 -8
- package/dist/components/data-grid/data-grid.types.d.ts +2 -2
- package/dist/components/data-table/index.js +32 -6
- package/dist/components/date-picker/date-picker.schema.js +2 -6
- package/dist/components/date-picker/date-picker.types.d.ts +1 -3
- package/dist/components/date-picker/index.js +812 -674
- package/dist/components/date-range-field/date-range-field.schema.js +5 -4
- package/dist/components/date-range-field/date-range-field.types.d.ts +6 -3
- package/dist/components/date-range-field/index.js +922 -784
- package/dist/components/description-list/index.js +3 -3
- package/dist/components/diff-statistics/diff-statistics.schema.js +4 -3
- package/dist/components/diff-statistics/diff-statistics.types.d.ts +5 -2
- package/dist/components/diff-statistics/index.js +6 -6
- package/dist/components/drawer/drawer.css +81 -26
- package/dist/components/drawer/drawer.schema.js +15 -8
- package/dist/components/drawer/drawer.svelte.d.ts +5 -4
- package/dist/components/drawer/drawer.types.d.ts +26 -7
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.js +99 -60
- package/dist/components/dropdown/index.js +6 -6
- package/dist/components/dropdown-group/dropdown-group.schema.js +4 -4
- package/dist/components/dropdown-group/dropdown-group.types.d.ts +4 -4
- package/dist/components/dropdown-group/index.js +6 -6
- package/dist/components/empty-state/empty-state.css +0 -5
- package/dist/components/feed/feed.css +150 -50
- package/dist/components/feed/feed.schema.js +50 -4
- package/dist/components/feed/feed.svelte.d.ts +6 -5
- package/dist/components/feed/feed.types.d.ts +94 -8
- package/dist/components/feed/feed.variables.js +2 -2
- package/dist/components/feed/index.d.ts +6 -4
- package/dist/components/feed/index.js +346 -62
- package/dist/components/feed-boundary/feed-boundary.css +34 -0
- package/dist/components/{event-stream-viewer/event-stream-viewer.variables.js → feed-boundary/feed-boundary.schema.js} +31 -8
- package/dist/components/feed-boundary/feed-boundary.svelte.d.ts +17 -0
- package/dist/components/feed-boundary/feed-boundary.types.d.ts +22 -0
- package/dist/components/{blog-section/blog-section.variables.js → feed-boundary/feed-boundary.variables.js} +4 -4
- package/dist/components/feed-boundary/index.d.ts +5 -0
- package/dist/components/{typography → feed-boundary}/index.js +57 -49
- package/dist/components/feed-event/feed-event.css +114 -0
- package/dist/components/feed-event/feed-event.schema.js +10 -2
- package/dist/components/feed-event/feed-event.svelte.d.ts +1 -1
- package/dist/components/feed-event/feed-event.types.d.ts +17 -1
- package/dist/components/feed-event/feed-event.variables.js +2 -2
- package/dist/components/feed-event/index.d.ts +2 -1
- package/dist/components/feed-event/index.js +12 -3
- package/dist/components/file-upload/file-upload.schema.js +2 -2
- package/dist/components/file-upload/file-upload.types.d.ts +1 -1
- package/dist/components/file-upload/index.js +3 -3
- package/{src/components/faceted-filter-bar/faceted-filter-bar.css → dist/components/filter-bar/filter-bar.css} +14 -14
- package/dist/components/{faceted-filter-bar/faceted-filter-bar.schema.js → filter-bar/filter-bar.schema.js} +4 -4
- package/dist/components/{faceted-filter-bar/faceted-filter-bar.svelte.d.ts → filter-bar/filter-bar.svelte.d.ts} +5 -5
- package/dist/components/{faceted-filter-bar/faceted-filter-bar.types.d.ts → filter-bar/filter-bar.types.d.ts} +9 -4
- package/dist/components/{sheet/sheet.variables.js → filter-bar/filter-bar.variables.js} +4 -4
- package/dist/components/filter-bar/index.d.ts +5 -0
- package/dist/components/filter-bar/index.js +385 -0
- package/dist/components/focus-trap/focus-trap.svelte.d.ts +1 -1
- package/dist/components/focus-trap/focus-trap.utilities.svelte.d.ts +1 -1
- package/dist/components/footer/footer.css +5 -6
- package/dist/components/footer/index.js +4 -4
- package/dist/components/form-field/form-field.schema.js +4 -3
- package/dist/components/form-field/form-field.types.d.ts +6 -2
- package/dist/components/form-field/index.js +34 -8
- package/dist/components/input/index.js +37 -11
- package/dist/components/input/input.css +3 -2
- package/dist/components/input/input.schema.js +4 -3
- package/dist/components/input/input.types.d.ts +6 -2
- package/dist/components/invocation-rule-builder/index.js +42 -13
- package/dist/components/invocation-rule-builder/invocation-rule-builder.schema.js +4 -4
- package/dist/components/invocation-rule-builder/invocation-rule-builder.types.d.ts +10 -10
- package/dist/components/json-editor/index.js +31 -5
- package/dist/components/json-schema-editor/index.js +1542 -1364
- package/dist/components/json-schema-editor/json-schema-editor-impl.svelte.d.ts +1 -1
- package/dist/components/json-schema-editor/json-schema-editor-state.types.d.ts +1 -1
- package/dist/components/json-schema-editor/json-schema-editor.css +3 -39
- package/dist/components/json-schema-editor/json-schema-editor.schema.js +3 -3
- package/dist/components/json-schema-editor/json-schema-editor.types.d.ts +1 -1
- package/dist/components/json-schema-editor/property-editor-constraints.svelte.d.ts +17 -0
- package/dist/components/json-schema-editor/property-editor.constants.d.ts +6 -0
- package/dist/components/json-schema-editor/property-editor.svelte.d.ts +2 -33
- package/dist/components/json-schema-editor/property-list.svelte.d.ts +1 -1
- package/dist/components/kanban-board/index.js +5 -5
- package/dist/components/kanban-board/kanban-board-column-reorder.svelte.d.ts +1 -1
- package/dist/components/kanban-board/kanban-board.schema.js +2 -2
- package/dist/components/kanban-board/kanban-board.types.d.ts +1 -1
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.css +1 -5
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.svelte.d.ts +2 -2
- package/dist/components/line-chart/index.js +1588 -786
- package/dist/components/line-chart/line-chart.css +25 -24
- package/dist/components/line-chart/line-chart.schema.js +38 -1
- package/dist/components/line-chart/line-chart.types.d.ts +6 -2
- package/dist/components/matrix-chart/index.js +1039 -430
- package/dist/components/matrix-chart/matrix-chart.css +12 -6
- package/dist/components/matrix-chart/matrix-chart.schema.js +26 -1
- package/dist/components/matrix-chart/matrix-chart.types.d.ts +5 -1
- package/dist/components/mega-menu/mega-menu.css +5 -3
- package/dist/components/menu-bar/index.js +4 -4
- package/dist/components/menu-bar/menu-bar.schema.js +3 -3
- package/dist/components/menu-bar/menu-bar.types.d.ts +3 -3
- package/dist/components/modal/index.js +31 -7
- package/dist/components/modal/modal.css +1 -1
- package/dist/components/modal/modal.svelte.d.ts +2 -2
- package/dist/components/multi-select/index.js +31 -5
- package/dist/components/multi-select/multi-select.css +2 -6
- package/dist/components/navigation-bar/index.js +26 -43
- package/dist/components/navigation-bar/navigation-bar.css +3 -2
- package/dist/components/number-input/index.js +3 -3
- package/dist/components/number-input/number-input.schema.js +2 -2
- package/dist/components/number-input/number-input.types.d.ts +1 -1
- package/dist/components/page-header/page-header.svelte.d.ts +2 -2
- package/dist/components/payload-inspector/index.js +4 -4
- package/dist/components/phone-input/index.js +4 -4
- package/dist/components/phone-input/phone-input.schema.js +5 -4
- package/dist/components/phone-input/phone-input.types.d.ts +8 -4
- package/dist/components/pin-input/index.js +4 -4
- package/dist/components/pin-input/pin-input.schema.js +5 -4
- package/dist/components/pin-input/pin-input.types.d.ts +7 -3
- package/dist/components/popover/index.js +5 -2
- package/dist/components/popover/popover.svelte.d.ts +2 -2
- package/dist/components/portal/portal.svelte.d.ts +1 -1
- package/dist/components/pricing-card/index.js +32 -14
- package/dist/components/pricing-card/pricing-card.schema.js +5 -5
- package/dist/components/pricing-card/pricing-card.types.d.ts +9 -5
- package/dist/components/radio-group/index.js +31 -5
- package/dist/components/rating/index.js +4 -4
- package/dist/components/rating/rating.schema.js +5 -4
- package/dist/components/rating/rating.types.d.ts +7 -3
- package/dist/components/run-step-timeline/index.js +7 -7
- package/dist/components/schedule-builder/index.js +3206 -2842
- package/dist/components/schedule-builder/schedule-builder-cron-editor.d.ts +10 -0
- package/dist/components/schedule-builder/schedule-builder-cron-editor.svelte.d.ts +12 -0
- package/dist/components/schedule-builder/schedule-builder-fields.svelte.d.ts +39 -0
- package/dist/components/schedule-builder/schedule-builder.css +39 -2
- package/dist/components/schedule-builder/schedule-builder.schema.js +2 -2
- package/dist/components/schedule-builder/schedule-builder.types.d.ts +3 -3
- package/dist/components/schema-form/index.js +47 -21
- package/dist/components/schema-form/schema-form.schema.js +2 -2
- package/dist/components/schema-form/schema-form.types.d.ts +1 -1
- package/dist/components/search-field/index.js +6 -6
- package/dist/components/search-field/search-field.schema.js +5 -5
- package/dist/components/search-field/search-field.types.d.ts +3 -3
- package/dist/components/segment/index.js +2 -2
- package/dist/components/segmented-control/index.js +10 -10
- package/dist/components/segmented-control/segmented-control-state.svelte.d.ts +1 -1
- package/dist/components/segmented-control/segmented-control.schema.js +9 -7
- package/dist/components/segmented-control/segmented-control.types.d.ts +11 -6
- package/dist/components/select/index.js +35 -9
- package/dist/components/select/select.schema.js +4 -3
- package/dist/components/select/select.types.d.ts +6 -2
- package/dist/components/selectable-row/selectable-row.css +4 -3
- package/dist/components/share-card/index.js +96 -60
- package/dist/components/share-card/share-card.types.d.ts +11 -1
- package/dist/components/sidebar/index.js +100 -61
- package/dist/components/slider/index.js +2 -2
- package/dist/components/slider/slider.schema.js +2 -2
- package/dist/components/slider/slider.types.d.ts +5 -5
- package/dist/components/source-diff-viewer/index.js +101 -83
- package/dist/components/source-diff-viewer/source-diff-viewer.schema.js +11 -7
- package/dist/components/source-diff-viewer/source-diff-viewer.types.d.ts +7 -2
- package/dist/components/sparkbar/index.js +1291 -4
- package/dist/components/sparkbar/sparkbar.css +5 -4
- package/dist/components/sparkbar/sparkbar.schema.js +26 -1
- package/dist/components/sparkbar/sparkbar.types.d.ts +5 -0
- package/dist/components/spectrogram/index.js +1076 -437
- package/dist/components/spectrogram/spectrogram.css +7 -6
- package/dist/components/spectrogram/spectrogram.schema.js +26 -1
- package/dist/components/spectrogram/spectrogram.types.d.ts +5 -1
- package/dist/components/spectrum-chart/index.js +1037 -423
- package/dist/components/spectrum-chart/spectrum-chart.css +8 -7
- package/dist/components/spectrum-chart/spectrum-chart.schema.js +26 -1
- package/dist/components/spectrum-chart/spectrum-chart.types.d.ts +5 -1
- package/dist/components/statistic/index.js +1284 -2
- package/dist/components/statistic/statistic.css +6 -5
- package/dist/components/statistic/statistic.schema.js +26 -1
- package/dist/components/statistic/statistic.types.d.ts +5 -0
- package/dist/components/statistic-group/index.js +1284 -2
- package/dist/components/statistic-group/statistic-group.css +7 -0
- package/dist/components/status-dot/status-dot.types.d.ts +8 -2
- package/dist/components/steps/index.js +73 -37
- package/dist/components/steps/steps.types.d.ts +14 -4
- package/dist/components/tab-list/index.js +3 -3
- package/dist/components/tab-list/tab-list.schema.js +2 -2
- package/dist/components/tab-list/tab-list.types.d.ts +1 -1
- package/dist/components/table/index.js +2 -2
- package/dist/components/table/table.css +1 -1
- package/dist/components/table-header-cell/index.js +2 -2
- package/dist/components/table-of-contents/table-of-contents.css +1 -14
- package/dist/components/table-of-contents/table-of-contents.variables.js +1 -3
- package/dist/components/tabs/index.js +3 -3
- package/dist/components/tag-input/index.js +3 -3
- package/dist/components/tag-input/tag-input.schema.js +5 -5
- package/dist/components/tag-input/tag-input.types.d.ts +2 -2
- package/dist/components/textarea/index.js +31 -5
- package/dist/components/time-field/index.js +33 -7
- package/dist/components/time-field/time-field.css +4 -1
- package/dist/components/time-field/time-field.schema.js +2 -2
- package/dist/components/time-field/time-field.types.d.ts +1 -1
- package/dist/components/timeline/timeline.svelte.d.ts +2 -2
- package/dist/components/toggle/index.js +4 -4
- package/dist/components/toggle/toggle.css +1 -1
- package/dist/components/toggle/toggle.schema.js +5 -4
- package/dist/components/toggle/toggle.types.d.ts +8 -4
- package/dist/components/transfer-list/index.js +154 -479
- package/dist/components/transfer-list/transfer-list.css +25 -105
- package/dist/components/transfer-list/transfer-list.schema.js +6 -6
- package/dist/components/transfer-list/transfer-list.svelte.d.ts +4 -4
- package/dist/components/transfer-list/transfer-list.types.d.ts +8 -8
- package/dist/components/tree/index.js +8 -8
- package/dist/components/tree/tree.schema.js +4 -3
- package/dist/components/tree/tree.types.d.ts +5 -2
- package/dist/components/tree-item/index.js +3 -3
- package/dist/components/tree-item/tree-item.schema.js +4 -3
- package/dist/components/tree-item/tree-item.types.d.ts +5 -2
- package/dist/components/waveform/index.js +1004 -404
- package/dist/components/waveform/waveform.css +8 -7
- package/dist/components/waveform/waveform.schema.js +26 -1
- package/dist/components/waveform/waveform.types.d.ts +5 -1
- package/dist/index.d.ts +9 -35
- package/dist/index.js +21724 -22284
- package/dist/manifest.meta.d.ts +2 -2
- package/dist/server/components/access-gate/index.js +9 -6
- package/dist/server/components/alert-dialog/index.js +3 -3
- package/dist/server/components/approval-card/index.js +6 -6
- package/dist/server/components/area-chart/index.js +6 -6
- package/dist/server/components/autocomplete/index.js +2 -2
- package/dist/server/components/avatar-group/index.js +3 -5
- package/dist/server/components/badge/index.js +2 -2
- package/dist/server/components/bar-chart/index.js +6 -6
- package/dist/server/components/button-group/index.js +1 -1
- package/dist/server/components/calendar/index.js +2 -2
- package/dist/server/components/capability-gate/index.js +1 -1
- package/dist/server/components/card/index.js +2 -2
- 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 +1 -1
- package/dist/server/components/collapsible/index.js +2 -2
- package/dist/server/components/color-field/index.js +7 -5
- package/dist/server/components/color-picker/index.js +6 -4
- package/dist/server/components/color-swatch-picker/index.js +3 -3
- package/dist/server/components/combobox/index.js +4 -4
- package/dist/server/components/confirm-dialog/index.js +5 -5
- package/dist/server/components/container/index.js +3 -5
- package/dist/server/components/context-menu/index.js +3 -3
- package/dist/server/components/copy-button/index.js +1 -1
- package/dist/server/components/data-table/index.js +5 -5
- package/dist/server/components/date-picker/index.js +8 -6
- package/dist/server/components/date-range-field/index.js +8 -6
- package/dist/server/components/description-list/index.js +1 -1
- package/dist/server/components/diff-statistics/index.js +1 -1
- package/dist/server/components/drawer/index.js +3 -3
- package/dist/server/components/dropdown/index.js +3 -3
- package/dist/server/components/dropdown-group/index.js +2 -2
- package/dist/server/components/feed/index.js +4 -3
- package/dist/server/components/feed-boundary/index.js +14 -0
- package/dist/server/components/feed-event/index.js +2 -2
- package/dist/server/components/file-upload/index.js +1 -1
- package/dist/server/components/filter-bar/index.js +13 -0
- package/dist/server/components/footer/index.js +1 -1
- package/dist/server/components/form-field/index.js +2 -2
- package/dist/server/components/icons/index.js +15 -12
- package/dist/server/components/input/index.js +3 -3
- package/dist/server/components/invocation-rule-builder/index.js +4 -4
- package/dist/server/components/json-editor/index.js +2 -2
- package/dist/server/components/json-schema-editor/index.js +15 -12
- package/dist/server/components/kanban-board/index.js +1 -1
- package/dist/server/components/line-chart/index.js +6 -6
- package/dist/server/components/matrix-chart/index.js +6 -6
- package/dist/server/components/menu-bar/index.js +2 -2
- package/dist/server/components/modal/index.js +3 -3
- package/dist/server/components/multi-select/index.js +2 -2
- package/dist/server/components/navigation-bar/index.js +1 -1
- package/dist/server/components/number-input/index.js +2 -2
- package/dist/server/components/payload-inspector/index.js +4 -4
- package/dist/server/components/phone-input/index.js +1 -1
- package/dist/server/components/pin-input/index.js +1 -1
- package/dist/server/components/popover/index.js +2 -2
- package/dist/server/components/pricing-card/index.js +3 -5
- package/dist/server/components/radio-group/index.js +2 -2
- package/dist/server/components/rating/index.js +1 -1
- package/dist/server/components/run-step-timeline/index.js +3 -3
- package/dist/server/components/schedule-builder/index.js +10 -10
- package/dist/server/components/schema-form/index.js +7 -7
- package/dist/server/components/search-field/index.js +3 -5
- package/dist/server/components/secret-value-field/index.js +1 -1
- package/dist/server/components/segment/index.js +2 -2
- package/dist/server/components/segmented-control/index.js +3 -3
- package/dist/server/components/select/index.js +3 -3
- package/dist/server/components/share-card/index.js +1 -1
- package/dist/server/components/sidebar/index.js +3 -3
- package/dist/server/components/slider/index.js +1 -1
- package/dist/server/components/source-diff-viewer/index.js +1 -1
- package/dist/server/components/sparkbar/index.js +3 -2
- package/dist/server/components/spectrogram/index.js +3 -3
- package/dist/server/components/spectrum-chart/index.js +2 -2
- package/dist/server/components/statistic/index.js +4 -3
- package/dist/server/components/statistic-group/index.js +3 -3
- package/dist/server/components/steps/index.js +1 -1
- package/dist/server/components/tab-list/index.js +2 -2
- package/dist/server/components/table/index.js +3 -3
- package/dist/server/components/table-header-cell/index.js +2 -2
- package/dist/server/components/tabs/index.js +8 -8
- package/dist/server/components/tag-input/index.js +1 -1
- package/dist/server/components/textarea/index.js +3 -3
- package/dist/server/components/time-field/index.js +3 -3
- package/dist/server/components/toggle/index.js +1 -1
- package/dist/server/components/transfer-list/index.js +2 -8
- package/dist/server/components/tree/index.js +3 -3
- package/dist/server/components/tree-item/index.js +2 -2
- package/dist/server/components/waveform/index.js +2 -2
- package/dist/server/index.js +239 -305
- package/dist/server/{index.server-c5qj6x13.js → index.server-0whmnrvs.js} +4 -2
- package/dist/server/{index.server-2bw5fqwh.js → index.server-10r7yf13.js} +111 -28
- package/dist/server/{index.server-j57zek3p.js → index.server-116jzzd0.js} +1 -1
- package/dist/server/{index.server-93943z3e.js → index.server-151dt1tx.js} +1 -1
- package/dist/server/index.server-15830t2j.js +581 -0
- package/dist/server/{index.server-0qqjq4dh.js → index.server-1qvmrpnx.js} +3 -3
- package/dist/server/{index.server-mrjns5eb.js → index.server-25dnjae4.js} +4 -4
- package/dist/server/{index.server-hzf509s2.js → index.server-2djn0yfs.js} +611 -346
- package/dist/server/index.server-2xd6aajx.js +48 -0
- package/dist/server/{index.server-8w95jmf1.js → index.server-2y0xz53g.js} +38 -15
- package/dist/server/{index.server-mvcsfqs9.js → index.server-3zqbgr6g.js} +2 -2
- package/dist/server/index.server-45ab0nn5.js +41 -0
- package/dist/server/{index.server-tvj0x3qy.js → index.server-4hvjet4z.js} +382 -308
- package/dist/server/{index.server-2mwr7vjg.js → index.server-4maq2ft8.js} +24 -29
- package/dist/server/index.server-4n1mxg74.js +2 -0
- package/dist/server/{index.server-01bz4wmw.js → index.server-59hgwg0n.js} +7 -7
- package/dist/server/{index.server-bsm39gpy.js → index.server-5d83fkyg.js} +75 -21
- package/dist/server/{index.server-y8m06g9p.js → index.server-5mz0e28m.js} +5 -5
- package/dist/server/{index.server-gme23wnx.js → index.server-5wmzrvvs.js} +3 -3
- package/dist/server/index.server-5wvxahbr.js +159 -0
- package/dist/server/{index.server-77p0jy71.js → index.server-60jkchq7.js} +5 -5
- package/dist/server/{index.server-6n5grdb2.js → index.server-60q52hya.js} +4 -4
- package/dist/server/{index.server-1dk15yd2.js → index.server-6kf969a0.js} +2 -2
- package/dist/server/{index.server-tmfcgx1j.js → index.server-74eakasy.js} +9 -7
- package/dist/server/{index.server-rvaw3nks.js → index.server-75jkpk5t.js} +3 -3
- package/dist/server/{index.server-0rqytc2f.js → index.server-7trweg3f.js} +20 -12
- package/dist/server/{index.server-xa8kjs78.js → index.server-84bn4nmv.js} +4 -4
- package/dist/server/{index.server-mxgakpfj.js → index.server-8dh2rtnc.js} +10 -2
- package/dist/server/{index.server-2pst4wcx.js → index.server-936tfc73.js} +1 -1
- package/dist/server/{index.server-msp145ky.js → index.server-97dpkhxs.js} +1 -1
- package/dist/server/{index.server-abqbstkt.js → index.server-9gj583qs.js} +41 -14
- package/dist/server/{index.server-4y2jtvv1.js → index.server-9jh3bkpk.js} +2 -2
- package/dist/server/{index.server-fd3az8g2.js → index.server-9m7bqtev.js} +25 -16
- package/dist/server/{index.server-7sxx7645.js → index.server-9scm7zf9.js} +8 -8
- package/dist/server/{index.server-71zvvayv.js → index.server-9ts9xfcb.js} +5 -5
- package/dist/server/{index.server-cptwpqbr.js → index.server-9vwxyy06.js} +109 -30
- package/dist/server/{index.server-ayhcc6z5.js → index.server-afpjvfz1.js} +112 -36
- package/dist/server/index.server-ap0pzqpw.js +37 -0
- package/dist/server/{index.server-fv23h844.js → index.server-ax2jmr1f.js} +1 -1
- package/dist/server/{index.server-xap17cfh.js → index.server-ax50etn0.js} +1 -1
- package/dist/server/{index.server-6m4r6qzc.js → index.server-bdfkmbtv.js} +1 -1
- package/dist/server/{index.server-k9m693ty.js → index.server-beq5wvme.js} +5 -5
- package/dist/server/{index.server-nbspp00m.js → index.server-bjw3e1wh.js} +10 -10
- package/dist/server/{index.server-wxs2c5d0.js → index.server-bmjr9844.js} +4 -4
- package/dist/server/{index.server-w2jwyz17.js → index.server-br3khchh.js} +5 -5
- package/dist/server/{index.server-bmgnba9v.js → index.server-bs7zqkt0.js} +21 -3
- package/dist/server/index.server-c0x0bd83.js +9 -0
- package/dist/server/{index.server-a5zsgn3k.js → index.server-c6namd71.js} +1 -1
- package/dist/server/{index.server-kjv6v7jm.js → index.server-cczpag6c.js} +1 -1
- package/dist/server/{index.server-kfem5020.js → index.server-cekjyge2.js} +12 -35
- package/dist/server/{index.server-yevngyp5.js → index.server-cw4y49n5.js} +1 -1
- package/dist/server/{index.server-qycjqq8v.js → index.server-d53tjwj9.js} +30 -4
- package/dist/server/{index.server-6184qc69.js → index.server-drdtprjs.js} +1 -1
- package/dist/server/{index.server-7cwcqhqd.js → index.server-dw9bz17h.js} +5 -5
- package/dist/server/{index.server-2s7btgxx.js → index.server-e1vftaph.js} +7 -7
- package/dist/server/{index.server-7wsshxkg.js → index.server-e95525e1.js} +40 -1
- package/dist/server/index.server-e9mhb9wd.js +237 -0
- package/dist/server/{index.server-sgjc9gkq.js → index.server-ejdprw7f.js} +13 -10
- package/dist/server/{index.server-d26jzn2m.js → index.server-en31rprd.js} +3 -3
- package/dist/server/{index.server-dx58qant.js → index.server-f3a0ecqg.js} +72 -9
- package/dist/server/{index.server-z2fdg8dg.js → index.server-fkw2mzze.js} +6 -6
- package/dist/server/{index.server-92sweseg.js → index.server-fm2xf0yf.js} +5 -5
- package/dist/server/{index.server-sy0vfg2g.js → index.server-gg8pgeag.js} +21 -3
- package/dist/server/{index.server-vke078fx.js → index.server-gkm85dwj.js} +3 -3
- package/dist/server/{index.server-xafa05pt.js → index.server-gtvdgp75.js} +2 -2
- package/dist/server/{index.server-dfp8jvrr.js → index.server-gv1fsa5y.js} +1 -1
- package/dist/server/{index.server-6c9144ex.js → index.server-gw9v7vs7.js} +1 -1
- package/dist/server/{index.server-ynt74xb3.js → index.server-hgy2b63w.js} +5 -5
- package/dist/server/{index.server-7kjw6qw5.js → index.server-hmns3fvr.js} +1 -1
- package/dist/server/{index.server-hfccqkjw.js → index.server-hn5ey0cq.js} +1 -1
- package/dist/server/{index.server-w8phxx00.js → index.server-j8sr82be.js} +6 -6
- package/dist/server/{index.server-td8rx9dz.js → index.server-jtcjbnad.js} +5 -5
- package/dist/server/{index.server-eyta8yd2.js → index.server-jtrd8nnn.js} +3 -3
- package/dist/server/{index.server-2qydtmtp.js → index.server-jxcxe1sp.js} +1 -1
- package/dist/server/{index.server-mknhgg07.js → index.server-k4yysh89.js} +2 -2
- package/dist/server/{index.server-wbe0dskj.js → index.server-kddp90n2.js} +1 -1
- package/dist/server/{index.server-4sr9f5r0.js → index.server-kergq7c5.js} +6 -6
- package/dist/server/{index.server-d9z0psxj.js → index.server-kf7ncaam.js} +1 -1
- package/dist/server/{index.server-7wtntdet.js → index.server-kqd2p7s5.js} +9 -9
- package/dist/server/{index.server-d63pwytk.js → index.server-kz8aeeq5.js} +18 -10
- package/dist/server/{index.server-kr3wrv13.js → index.server-m07gsna4.js} +3 -3
- package/dist/server/{index.server-4ywb3qcm.js → index.server-m1hct64p.js} +3 -3
- package/dist/server/{index.server-49g0pm4w.js → index.server-me8yv9nf.js} +5 -5
- package/dist/server/index.server-mmmrgvyd.js +1274 -0
- package/dist/server/{index.server-pctqr0zf.js → index.server-mnv8k51c.js} +96 -16
- package/dist/server/{index.server-fka21791.js → index.server-n6wm89xy.js} +25 -1
- package/dist/server/{index.server-4dfs3xwn.js → index.server-nnbqjg1j.js} +1 -1
- package/dist/server/{index.server-0p1z1kbs.js → index.server-nqd1q4pa.js} +6 -6
- package/dist/server/{index.server-xsh52hjt.js → index.server-nsdh6zgh.js} +3 -3
- package/dist/server/{index.server-hxjkfdp2.js → index.server-nwgxhrzg.js} +1 -1
- package/dist/server/index.server-qtayj75t.js +165 -0
- package/dist/server/{index.server-0qvwymqd.js → index.server-r09x4p9q.js} +2 -2
- package/dist/server/{index.server-yhjecwfj.js → index.server-rf9pd5mr.js} +4 -2
- package/dist/server/{index.server-2k0cnsm4.js → index.server-s2dseqdh.js} +1 -1
- package/dist/server/{index.server-1233sspt.js → index.server-s7t1fh6n.js} +1 -1
- package/dist/server/{index.server-1221p7e4.js → index.server-scahngwv.js} +13 -1
- package/dist/server/{index.server-7mhk40r3.js → index.server-sm0ydag0.js} +1 -1
- package/dist/server/{index.server-jgdtsvz2.js → index.server-sytbwe68.js} +9 -9
- package/dist/server/{index.server-nj8kk5bv.js → index.server-t73q59c1.js} +1 -1
- package/dist/server/{index.server-cm3adbhs.js → index.server-t8rqhyz1.js} +5 -5
- package/dist/server/{index.server-scdk1we9.js → index.server-t91tbrmn.js} +5 -5
- package/dist/server/{index.server-5schb2vt.js → index.server-tdrncj5e.js} +16 -6
- package/dist/server/{index.server-casqzp4h.js → index.server-tg6k1bq8.js} +3 -3
- package/dist/server/{index.server-zfxb12hm.js → index.server-tkt7wm9w.js} +9 -9
- package/dist/server/{index.server-t8dts351.js → index.server-v11xmma9.js} +10 -10
- package/dist/server/{index.server-y7017ygc.js → index.server-v302j9xy.js} +18 -7
- package/dist/server/{index.server-km7pzejr.js → index.server-vdavjkqn.js} +4 -4
- package/dist/server/{index.server-wm8957be.js → index.server-veqke4sq.js} +10 -1
- package/dist/server/{index.server-jd0gmw7x.js → index.server-vspyhe5q.js} +4 -2
- package/dist/server/{index.server-36rjvy9e.js → index.server-vvs2rh1y.js} +1 -1
- package/dist/server/{index.server-g38yys7a.js → index.server-w9dtc4a2.js} +4 -4
- package/dist/server/{index.server-4kqjwvrq.js → index.server-wmeaz6qk.js} +18 -72
- package/dist/server/{index.server-fphvzcfb.js → index.server-wqajghn9.js} +1 -1
- package/dist/server/{index.server-1g3bqz6w.js → index.server-x0sbmhn7.js} +27 -2
- package/dist/server/{index.server-j4akck2w.js → index.server-x5zjwrnb.js} +7 -7
- package/dist/server/{index.server-fymevt3c.js → index.server-xrjcaf14.js} +12 -3
- package/dist/server/{index.server-f4pxscq5.js → index.server-yb9b2r3x.js} +1 -1
- package/dist/server/{index.server-x8c8x34n.js → index.server-yhqszmxe.js} +6 -6
- package/dist/server/{index.server-54yr0y08.js → index.server-yp7t68js.js} +1 -1
- package/dist/server/{index.server-nbq0tmx1.js → index.server-yr2ndv9a.js} +4 -2
- package/dist/server/{index.server-3ne3ekqq.js → index.server-z2vy12a0.js} +1 -1
- package/dist/server/index.server-z4g0599a.js +41 -0
- package/dist/server/{index.server-ybb5ery2.js → index.server-zg0981gk.js} +2 -2
- package/dist/server/{index.server-yd9shwqq.js → index.server-zjcjzcv6.js} +1 -1
- package/dist/server/{index.server-d70brw24.js → index.server-zkhc16nf.js} +1 -1
- package/dist/utilities/attachments.d.ts +1 -1
- package/dist/utilities/color-luminance.d.ts +2 -1
- package/dist/utilities/dialog-props.d.ts +24 -0
- package/dist/utilities/focus.d.ts +1 -1
- package/package.json +69 -481
- package/src/_internal/chart/chart-bar-model.ts +330 -0
- package/src/_internal/chart/chart-cartesian-model.ts +450 -0
- package/src/_internal/chart/chart-interaction.svelte.ts +25 -6
- package/src/_internal/chart/chart-layout.ts +348 -0
- package/src/_internal/chart/chart-model-utilities.ts +357 -0
- package/src/_internal/chart/chart-scale.ts +487 -0
- package/src/_internal/chart/chart-utilities.ts +22 -1078
- package/src/_internal/chart/heatmap-utilities.ts +21 -17
- package/src/_internal/form-field-frame.svelte +2 -2
- package/src/_internal/form-field-provider.svelte +29 -1
- package/src/_internal/overlay.ts +4 -5
- package/src/components/_internal/chart-tooltip.css +21 -0
- package/src/components/_internal/chart-tooltip.svelte +44 -0
- package/src/components/_internal/create-sliding-dialog-state.svelte.ts +66 -0
- package/src/components/access-gate/access-gate.css +0 -13
- package/src/components/access-gate/access-gate.svelte +6 -2
- package/src/components/alert-dialog/alert-dialog.schema.json +6 -5
- package/src/components/alert-dialog/alert-dialog.schema.ts +7 -5
- package/src/components/alert-dialog/alert-dialog.types.ts +13 -4
- package/src/components/approval-card/approval-card.svelte +1 -1
- package/src/components/area-chart/area-chart.css +27 -23
- package/src/components/area-chart/area-chart.examples.json +1 -1
- package/src/components/area-chart/area-chart.schema.json +37 -0
- package/src/components/area-chart/area-chart.schema.ts +40 -0
- package/src/components/area-chart/area-chart.svelte +103 -35
- package/src/components/area-chart/area-chart.types.ts +7 -1
- package/src/components/autocomplete/autocomplete.css +5 -9
- package/src/components/autocomplete/autocomplete.schema.json +1 -1
- package/src/components/autocomplete/autocomplete.schema.ts +1 -1
- package/src/components/autocomplete/autocomplete.svelte +3 -3
- package/src/components/autocomplete/autocomplete.types.ts +2 -2
- package/src/components/backdrop/backdrop.svelte +3 -3
- package/src/components/badge/badge.css +2 -2
- package/src/components/badge/badge.schema.json +1 -1
- package/src/components/badge/badge.schema.ts +1 -1
- package/src/components/badge/badge.svelte +2 -2
- package/src/components/badge/badge.types.ts +3 -3
- package/src/components/bar-chart/bar-chart.css +27 -21
- package/src/components/bar-chart/bar-chart.schema.json +37 -0
- package/src/components/bar-chart/bar-chart.schema.ts +40 -0
- package/src/components/bar-chart/bar-chart.svelte +94 -33
- package/src/components/bar-chart/bar-chart.types.ts +9 -2
- package/src/components/button-group/button-group.schema.json +3 -3
- package/src/components/button-group/button-group.schema.ts +3 -3
- package/src/components/button-group/button-group.svelte +9 -7
- package/src/components/button-group/button-group.types.ts +5 -5
- package/src/components/calendar/calendar.schema.json +1 -1
- package/src/components/calendar/calendar.schema.ts +1 -1
- package/src/components/calendar/calendar.svelte +2 -2
- package/src/components/calendar/calendar.types.ts +1 -1
- package/src/components/capability-gate/capability-gate.css +5 -14
- package/src/components/capability-gate/capability-gate.examples.json +2 -2
- package/src/components/capability-gate/capability-gate.schema.json +5 -26
- package/src/components/capability-gate/capability-gate.schema.ts +5 -26
- package/src/components/capability-gate/capability-gate.svelte +21 -51
- package/src/components/capability-gate/capability-gate.types.ts +16 -24
- package/src/components/card/card.css +70 -0
- package/src/components/card/card.examples.json +18 -0
- package/src/components/card/card.schema.json +18 -5
- package/src/components/card/card.schema.ts +18 -5
- package/src/components/card/card.svelte +134 -39
- package/src/components/card/card.types.ts +24 -2
- package/src/components/card/index.ts +1 -0
- package/src/components/chart.types.ts +112 -2
- package/src/components/collapsible/collapsible.css +1 -5
- package/src/components/collapsible/collapsible.svelte +1 -1
- package/src/components/color-field/color-field.css +10 -0
- package/src/components/color-field/color-field.examples.json +1 -1
- package/src/components/color-field/color-field.schema.json +3 -3
- package/src/components/color-field/color-field.schema.ts +3 -3
- package/src/components/color-field/color-field.svelte +74 -18
- package/src/components/color-field/color-field.types.ts +3 -3
- package/src/components/color-picker/color-picker-controls.svelte +125 -0
- package/src/components/color-picker/color-picker.css +45 -2
- package/src/components/color-picker/color-picker.schema.json +4 -4
- package/src/components/color-picker/color-picker.schema.ts +4 -4
- package/src/components/color-picker/color-picker.svelte +81 -264
- package/src/components/color-picker/color-picker.types.ts +2 -2
- package/src/components/color-picker/color-picker.utilities.ts +124 -0
- package/src/components/color-swatch-picker/color-swatch-picker.examples.json +1 -1
- package/src/components/color-swatch-picker/color-swatch-picker.schema.json +1 -1
- package/src/components/color-swatch-picker/color-swatch-picker.schema.ts +1 -1
- package/src/components/color-swatch-picker/color-swatch-picker.svelte +2 -2
- package/src/components/color-swatch-picker/color-swatch-picker.types.ts +1 -1
- package/src/components/combobox/combobox.css +3 -14
- package/src/components/combobox/combobox.schema.json +1 -1
- package/src/components/combobox/combobox.schema.ts +1 -1
- package/src/components/combobox/combobox.svelte +4 -4
- package/src/components/combobox/combobox.types.ts +1 -1
- package/src/components/command-palette/command-palette.svelte +1 -1
- package/src/components/confirm-dialog/confirm-dialog.schema.json +6 -5
- package/src/components/confirm-dialog/confirm-dialog.schema.ts +6 -5
- package/src/components/confirm-dialog/confirm-dialog.types.ts +15 -10
- package/src/components/container/container.examples.json +12 -0
- package/src/components/data-grid/data-grid.css +3 -8
- package/src/components/data-grid/data-grid.types.ts +2 -2
- package/src/components/date-picker/date-picker.schema.json +1 -5
- package/src/components/date-picker/date-picker.schema.ts +1 -5
- package/src/components/date-picker/date-picker.svelte +5 -4
- package/src/components/date-picker/date-picker.types.ts +1 -3
- package/src/components/date-range-field/date-range-field.schema.json +4 -3
- package/src/components/date-range-field/date-range-field.schema.ts +4 -3
- package/src/components/date-range-field/date-range-field.svelte +8 -8
- package/src/components/date-range-field/date-range-field.types.ts +6 -3
- package/src/components/description-list/description-list.svelte +2 -2
- package/src/components/diff-statistics/diff-statistics.examples.json +1 -1
- package/src/components/diff-statistics/diff-statistics.schema.json +3 -2
- package/src/components/diff-statistics/diff-statistics.schema.ts +3 -2
- package/src/components/diff-statistics/diff-statistics.svelte +4 -4
- package/src/components/diff-statistics/diff-statistics.types.ts +5 -2
- package/src/components/drawer/drawer.css +81 -26
- package/src/components/drawer/drawer.examples.json +8 -2
- package/src/components/drawer/drawer.schema.json +14 -7
- package/src/components/drawer/drawer.schema.ts +16 -7
- package/src/components/drawer/drawer.svelte +36 -41
- package/src/components/drawer/drawer.types.ts +26 -7
- package/src/components/drawer/index.ts +1 -1
- package/src/components/dropdown/dropdown.examples.json +1 -1
- package/src/components/dropdown-group/dropdown-group.schema.json +3 -3
- package/src/components/dropdown-group/dropdown-group.schema.ts +3 -3
- package/src/components/dropdown-group/dropdown-group.svelte +6 -6
- package/src/components/dropdown-group/dropdown-group.types.ts +4 -4
- package/src/components/empty-state/empty-state.css +0 -5
- package/src/components/feed/feed.css +150 -50
- package/src/components/feed/feed.examples.json +18 -0
- package/src/components/feed/feed.schema.json +38 -3
- package/src/components/feed/feed.schema.ts +44 -3
- package/src/components/feed/feed.svelte +191 -4
- package/src/components/feed/feed.types.ts +103 -10
- package/src/components/feed/feed.variables.json +1 -1
- package/src/components/feed/feed.variables.ts +1 -1
- package/src/components/feed/index.ts +6 -3
- package/src/components/feed-boundary/feed-boundary.css +34 -0
- package/src/components/feed-boundary/feed-boundary.examples.json +13 -0
- package/src/components/feed-boundary/feed-boundary.schema.json +24 -0
- package/src/components/feed-boundary/feed-boundary.schema.ts +31 -0
- package/src/components/feed-boundary/feed-boundary.svelte +21 -0
- package/src/components/feed-boundary/feed-boundary.types.ts +23 -0
- package/src/components/feed-boundary/index.ts +6 -0
- package/src/components/feed-event/feed-event.css +114 -0
- package/src/components/feed-event/feed-event.schema.json +7 -1
- package/src/components/feed-event/feed-event.schema.ts +7 -0
- package/src/components/feed-event/feed-event.svelte +7 -2
- package/src/components/feed-event/feed-event.types.ts +17 -1
- package/src/components/feed-event/feed-event.variables.json +1 -1
- package/src/components/feed-event/feed-event.variables.ts +1 -1
- package/src/components/feed-event/index.ts +2 -1
- package/src/components/file-upload/file-upload.examples.json +1 -1
- package/src/components/file-upload/file-upload.schema.json +1 -1
- package/src/components/file-upload/file-upload.schema.ts +1 -1
- package/src/components/file-upload/file-upload.svelte +2 -2
- package/src/components/file-upload/file-upload.types.ts +1 -1
- package/{dist/components/faceted-filter-bar/faceted-filter-bar.css → src/components/filter-bar/filter-bar.css} +14 -14
- package/src/components/filter-bar/filter-bar.examples.json +25 -0
- package/src/components/{faceted-filter-bar/faceted-filter-bar.svelte → filter-bar/filter-bar.svelte} +16 -18
- package/src/components/{faceted-filter-bar/faceted-filter-bar.types.ts → filter-bar/filter-bar.types.ts} +8 -4
- package/src/components/filter-bar/index.ts +13 -0
- package/src/components/focus-trap/focus-trap.utilities.svelte.ts +1 -1
- package/src/components/footer/footer.css +5 -6
- package/src/components/footer/footer.svelte +9 -4
- package/src/components/form-field/form-field.schema.json +3 -2
- package/src/components/form-field/form-field.schema.ts +4 -2
- package/src/components/form-field/form-field.svelte +2 -2
- package/src/components/form-field/form-field.types.ts +6 -2
- package/src/components/grid/grid.examples.json +12 -0
- package/src/components/hover-card/hover-card.svelte +2 -2
- package/src/components/input/input.css +3 -2
- package/src/components/input/input.examples.json +7 -1
- package/src/components/input/input.schema.json +3 -2
- package/src/components/input/input.schema.ts +3 -2
- package/src/components/input/input.svelte +3 -3
- package/src/components/input/input.types.ts +6 -2
- package/src/components/invocation-rule-builder/invocation-rule-builder.examples.json +4 -4
- package/src/components/invocation-rule-builder/invocation-rule-builder.schema.json +3 -3
- package/src/components/invocation-rule-builder/invocation-rule-builder.schema.ts +1 -1
- package/src/components/invocation-rule-builder/invocation-rule-builder.svelte +6 -6
- package/src/components/invocation-rule-builder/invocation-rule-builder.types.ts +10 -10
- package/src/components/json-schema-editor/form-view.svelte +1 -1
- package/src/components/json-schema-editor/json-schema-editor-impl.svelte +2 -2
- package/src/components/json-schema-editor/json-schema-editor-state.svelte.ts +1 -1
- package/src/components/json-schema-editor/json-schema-editor-state.types.ts +1 -1
- package/src/components/json-schema-editor/json-schema-editor.css +3 -39
- package/src/components/json-schema-editor/json-schema-editor.schema.json +2 -2
- package/src/components/json-schema-editor/json-schema-editor.schema.ts +2 -2
- package/src/components/json-schema-editor/json-schema-editor.types.ts +1 -1
- package/src/components/json-schema-editor/json-schema-toolbar.svelte +15 -6
- package/src/components/json-schema-editor/property-editor-constraints.svelte +102 -0
- package/src/components/json-schema-editor/property-editor.constants.ts +47 -0
- package/src/components/json-schema-editor/property-editor.svelte +24 -156
- package/src/components/json-schema-editor/property-list.svelte +17 -15
- package/src/components/kanban-board/kanban-board-column-reorder.svelte.ts +2 -2
- package/src/components/kanban-board/kanban-board.examples.json +1 -1
- package/src/components/kanban-board/kanban-board.schema.json +1 -1
- package/src/components/kanban-board/kanban-board.schema.ts +1 -1
- package/src/components/kanban-board/kanban-board.svelte +3 -3
- package/src/components/kanban-board/kanban-board.types.ts +1 -1
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.css +1 -5
- package/src/components/line-chart/line-chart.css +25 -24
- package/src/components/line-chart/line-chart.examples.json +1 -1
- package/src/components/line-chart/line-chart.schema.json +37 -0
- package/src/components/line-chart/line-chart.schema.ts +40 -0
- package/src/components/line-chart/line-chart.svelte +95 -40
- package/src/components/line-chart/line-chart.types.ts +7 -1
- package/src/components/matrix-chart/matrix-chart.css +12 -6
- package/src/components/matrix-chart/matrix-chart.schema.json +25 -0
- package/src/components/matrix-chart/matrix-chart.schema.ts +25 -0
- package/src/components/matrix-chart/matrix-chart.svelte +30 -12
- package/src/components/matrix-chart/matrix-chart.types.ts +5 -1
- package/src/components/mega-menu/mega-menu.css +5 -3
- package/src/components/menu-bar/menu-bar.schema.json +2 -2
- package/src/components/menu-bar/menu-bar.schema.ts +2 -2
- package/src/components/menu-bar/menu-bar.svelte +3 -3
- package/src/components/menu-bar/menu-bar.types.ts +3 -3
- package/src/components/modal/modal.css +1 -1
- package/src/components/modal/modal.svelte +13 -17
- package/src/components/multi-select/multi-select.css +2 -6
- package/src/components/navigation-bar/navigation-bar.css +3 -2
- package/src/components/navigation-bar/navigation-bar.svelte +25 -10
- package/src/components/number-input/number-input.examples.json +1 -1
- package/src/components/number-input/number-input.schema.json +1 -1
- package/src/components/number-input/number-input.schema.ts +1 -1
- package/src/components/number-input/number-input.svelte +5 -5
- package/src/components/number-input/number-input.types.ts +1 -1
- package/src/components/phone-input/phone-input.schema.json +4 -3
- package/src/components/phone-input/phone-input.schema.ts +4 -3
- package/src/components/phone-input/phone-input.svelte +4 -4
- package/src/components/phone-input/phone-input.types.ts +8 -4
- package/src/components/pin-input/pin-input.schema.json +4 -3
- package/src/components/pin-input/pin-input.schema.ts +4 -3
- package/src/components/pin-input/pin-input.svelte +3 -3
- package/src/components/pin-input/pin-input.types.ts +7 -3
- package/src/components/popover/popover.svelte +12 -7
- package/src/components/pricing-card/pricing-card.examples.json +8 -2
- package/src/components/pricing-card/pricing-card.schema.json +4 -4
- package/src/components/pricing-card/pricing-card.schema.ts +5 -4
- package/src/components/pricing-card/pricing-card.svelte +10 -3
- package/src/components/pricing-card/pricing-card.types.ts +9 -5
- package/src/components/rating/rating.examples.json +1 -1
- package/src/components/rating/rating.schema.json +4 -3
- package/src/components/rating/rating.schema.ts +4 -3
- package/src/components/rating/rating.svelte +4 -4
- package/src/components/rating/rating.types.ts +7 -3
- package/src/components/run-step-timeline/run-step-timeline.svelte +2 -2
- package/src/components/schedule-builder/schedule-builder-cron-editor.svelte +96 -0
- package/src/components/schedule-builder/schedule-builder-cron-editor.ts +68 -0
- package/src/components/schedule-builder/schedule-builder-fields.svelte +168 -0
- package/src/components/schedule-builder/schedule-builder.css +39 -2
- package/src/components/schedule-builder/schedule-builder.examples.json +4 -4
- package/src/components/schedule-builder/schedule-builder.schema.json +1 -1
- package/src/components/schedule-builder/schedule-builder.schema.ts +1 -1
- package/src/components/schedule-builder/schedule-builder.svelte +77 -406
- package/src/components/schedule-builder/schedule-builder.types.ts +3 -3
- package/src/components/schema-form/schema-form-body.svelte +4 -4
- package/src/components/schema-form/schema-form.examples.json +1 -1
- package/src/components/schema-form/schema-form.schema.json +1 -1
- package/src/components/schema-form/schema-form.schema.ts +1 -1
- package/src/components/schema-form/schema-form.svelte +1 -1
- package/src/components/schema-form/schema-form.types.ts +1 -1
- package/src/components/search-field/search-field.schema.json +4 -4
- package/src/components/search-field/search-field.schema.ts +5 -5
- package/src/components/search-field/search-field.svelte +4 -4
- package/src/components/search-field/search-field.types.ts +3 -3
- package/src/components/segmented-control/segmented-control-state.svelte.ts +1 -1
- package/src/components/segmented-control/segmented-control.schema.json +7 -5
- package/src/components/segmented-control/segmented-control.schema.ts +8 -5
- package/src/components/segmented-control/segmented-control.svelte +5 -5
- package/src/components/segmented-control/segmented-control.types.ts +11 -6
- package/src/components/select/select.schema.json +3 -2
- package/src/components/select/select.schema.ts +4 -2
- package/src/components/select/select.svelte +2 -2
- package/src/components/select/select.types.ts +6 -2
- package/src/components/selectable-row/selectable-row.css +4 -3
- package/src/components/share-card/share-card.svelte +3 -3
- package/src/components/share-card/share-card.types.ts +11 -1
- package/src/components/sidebar/sidebar.svelte +1 -1
- package/src/components/slider/slider.examples.json +5 -5
- package/src/components/slider/slider.schema.json +1 -1
- package/src/components/slider/slider.schema.ts +1 -1
- package/src/components/slider/slider.svelte +3 -3
- package/src/components/slider/slider.types.ts +5 -5
- package/src/components/source-diff-viewer/source-diff-viewer.schema.json +10 -6
- package/src/components/source-diff-viewer/source-diff-viewer.schema.ts +10 -5
- package/src/components/source-diff-viewer/source-diff-viewer.svelte +6 -2
- package/src/components/source-diff-viewer/source-diff-viewer.types.ts +7 -2
- package/src/components/sparkbar/sparkbar.css +5 -4
- package/src/components/sparkbar/sparkbar.schema.json +25 -0
- package/src/components/sparkbar/sparkbar.schema.ts +26 -0
- package/src/components/sparkbar/sparkbar.svelte +8 -1
- package/src/components/sparkbar/sparkbar.types.ts +5 -0
- package/src/components/spectrogram/spectrogram.css +7 -6
- package/src/components/spectrogram/spectrogram.schema.json +25 -0
- package/src/components/spectrogram/spectrogram.schema.ts +25 -0
- package/src/components/spectrogram/spectrogram.svelte +73 -28
- package/src/components/spectrogram/spectrogram.types.ts +5 -1
- package/src/components/spectrum-chart/spectrum-chart.css +8 -7
- package/src/components/spectrum-chart/spectrum-chart.schema.json +25 -0
- package/src/components/spectrum-chart/spectrum-chart.schema.ts +26 -0
- package/src/components/spectrum-chart/spectrum-chart.svelte +38 -12
- package/src/components/spectrum-chart/spectrum-chart.types.ts +5 -1
- package/src/components/statistic/statistic.css +6 -5
- package/src/components/statistic/statistic.schema.json +25 -0
- package/src/components/statistic/statistic.schema.ts +26 -0
- package/src/components/statistic/statistic.svelte +6 -1
- package/src/components/statistic/statistic.types.ts +5 -0
- package/src/components/statistic-group/statistic-group.css +7 -0
- package/src/components/statistic-group/statistic-group.examples.json +6 -0
- package/src/components/status-dot/status-dot.types.ts +8 -2
- package/src/components/steps/steps.svelte +8 -4
- package/src/components/steps/steps.types.ts +14 -4
- package/src/components/tab-list/tab-list.schema.json +1 -1
- package/src/components/tab-list/tab-list.schema.ts +1 -1
- package/src/components/tab-list/tab-list.svelte +2 -2
- package/src/components/tab-list/tab-list.types.ts +1 -1
- package/src/components/table/table.css +1 -1
- package/src/components/table-header-cell/table-header-cell.svelte +2 -2
- package/src/components/table-of-contents/table-of-contents.css +1 -14
- package/src/components/table-of-contents/table-of-contents.variables.json +0 -2
- package/src/components/table-of-contents/table-of-contents.variables.ts +0 -2
- package/src/components/tag-input/tag-input.examples.json +1 -1
- package/src/components/tag-input/tag-input.schema.json +4 -4
- package/src/components/tag-input/tag-input.schema.ts +4 -4
- package/src/components/tag-input/tag-input.svelte +2 -2
- package/src/components/tag-input/tag-input.types.ts +2 -2
- package/src/components/time-field/time-field.css +4 -1
- package/src/components/time-field/time-field.schema.json +1 -1
- package/src/components/time-field/time-field.schema.ts +1 -1
- package/src/components/time-field/time-field.svelte +2 -2
- package/src/components/time-field/time-field.types.ts +1 -1
- package/src/components/timeline/timeline.examples.json +1 -1
- package/src/components/toggle/toggle.css +1 -1
- package/src/components/toggle/toggle.examples.json +3 -3
- package/src/components/toggle/toggle.schema.json +4 -3
- package/src/components/toggle/toggle.schema.ts +4 -3
- package/src/components/toggle/toggle.svelte +3 -3
- package/src/components/toggle/toggle.types.ts +8 -4
- package/src/components/toolbar/toolbar.examples.json +1 -1
- package/src/components/transfer-list/transfer-list.css +25 -105
- package/src/components/transfer-list/transfer-list.examples.json +2 -2
- package/src/components/transfer-list/transfer-list.schema.json +5 -5
- package/src/components/transfer-list/transfer-list.schema.ts +5 -5
- package/src/components/transfer-list/transfer-list.svelte +108 -297
- package/src/components/transfer-list/transfer-list.types.ts +8 -8
- package/src/components/tree/tree.examples.json +1 -1
- package/src/components/tree/tree.schema.json +3 -2
- package/src/components/tree/tree.schema.ts +3 -2
- package/src/components/tree/tree.svelte +4 -4
- package/src/components/tree/tree.types.ts +5 -2
- package/src/components/tree-item/tree-item.schema.json +3 -2
- package/src/components/tree-item/tree-item.schema.ts +2 -1
- package/src/components/tree-item/tree-item.svelte +2 -2
- package/src/components/tree-item/tree-item.types.ts +5 -2
- package/src/components/waveform/waveform.css +8 -7
- package/src/components/waveform/waveform.schema.json +25 -0
- package/src/components/waveform/waveform.schema.ts +26 -0
- package/src/components/waveform/waveform.svelte +16 -3
- package/src/components/waveform/waveform.types.ts +5 -1
- package/src/index.ts +26 -91
- package/src/styles/components/_label-value.css +20 -0
- package/src/styles/components/_row-item.css +5 -0
- package/src/styles/components.css +4 -16
- package/src/styles/index.css +1 -0
- package/src/styles/tokens-base.css +2 -3
- package/src/utilities/attachments.ts +1 -1
- package/src/utilities/color-luminance.ts +49 -1
- package/src/utilities/dialog-props.ts +24 -0
- package/src/utilities/focus.ts +1 -1
- package/dist/components/_internal/person-byline.css +0 -29
- package/dist/components/_internal/person-byline.svelte.d.ts +0 -9
- package/dist/components/_internal/section-skeleton.css +0 -45
- package/dist/components/blog-section/blog-section.css +0 -56
- package/dist/components/blog-section/blog-section.schema.js +0 -142
- package/dist/components/blog-section/blog-section.svelte.d.ts +0 -19
- package/dist/components/blog-section/blog-section.types.d.ts +0 -56
- package/dist/components/blog-section/index.d.ts +0 -5
- package/dist/components/blog-section/index.js +0 -305
- package/dist/components/call-to-action-section/call-to-action-section.css +0 -54
- package/dist/components/call-to-action-section/call-to-action-section.schema.js +0 -127
- package/dist/components/call-to-action-section/call-to-action-section.svelte.d.ts +0 -19
- package/dist/components/call-to-action-section/call-to-action-section.types.d.ts +0 -64
- package/dist/components/call-to-action-section/call-to-action-section.variables.js +0 -61
- package/dist/components/call-to-action-section/index.d.ts +0 -5
- package/dist/components/call-to-action-section/index.js +0 -454
- package/dist/components/event-stream-viewer/event-stream-viewer-keys.d.ts +0 -6
- package/dist/components/event-stream-viewer/event-stream-viewer.css +0 -546
- package/dist/components/event-stream-viewer/event-stream-viewer.schema.d.ts +0 -3
- package/dist/components/event-stream-viewer/event-stream-viewer.schema.js +0 -195
- package/dist/components/event-stream-viewer/event-stream-viewer.svelte.d.ts +0 -20
- package/dist/components/event-stream-viewer/event-stream-viewer.types.d.ts +0 -202
- package/dist/components/event-stream-viewer/event-stream-viewer.variables.d.ts +0 -2
- package/dist/components/event-stream-viewer/index.d.ts +0 -5
- package/dist/components/event-stream-viewer/index.js +0 -1538
- package/dist/components/event-timeline/event-timeline-modal.d.ts +0 -5
- package/dist/components/event-timeline/event-timeline.css +0 -313
- package/dist/components/event-timeline/event-timeline.css.d.ts +0 -1
- package/dist/components/event-timeline/event-timeline.schema.d.ts +0 -3
- package/dist/components/event-timeline/event-timeline.schema.js +0 -155
- package/dist/components/event-timeline/event-timeline.svelte.d.ts +0 -20
- package/dist/components/event-timeline/event-timeline.types.d.ts +0 -75
- package/dist/components/event-timeline/event-timeline.variables.d.ts +0 -2
- package/dist/components/event-timeline/event-timeline.variables.js +0 -61
- package/dist/components/event-timeline/index.d.ts +0 -5
- package/dist/components/event-timeline/index.js +0 -4026
- package/dist/components/faceted-filter-bar/faceted-filter-bar.css.d.ts +0 -1
- package/dist/components/faceted-filter-bar/faceted-filter-bar.schema.d.ts +0 -3
- package/dist/components/faceted-filter-bar/faceted-filter-bar.variables.d.ts +0 -2
- package/dist/components/faceted-filter-bar/faceted-filter-bar.variables.js +0 -61
- package/dist/components/faceted-filter-bar/index.d.ts +0 -5
- package/dist/components/faceted-filter-bar/index.js +0 -1110
- package/dist/components/feature-section/feature-section.css +0 -130
- package/dist/components/feature-section/feature-section.css.d.ts +0 -1
- package/dist/components/feature-section/feature-section.schema.d.ts +0 -3
- package/dist/components/feature-section/feature-section.schema.js +0 -142
- package/dist/components/feature-section/feature-section.svelte.d.ts +0 -19
- package/dist/components/feature-section/feature-section.types.d.ts +0 -64
- package/dist/components/feature-section/feature-section.variables.d.ts +0 -2
- package/dist/components/feature-section/feature-section.variables.js +0 -61
- package/dist/components/feature-section/index.d.ts +0 -5
- package/dist/components/feature-section/index.js +0 -248
- package/dist/components/hero-section/hero-section.css +0 -167
- package/dist/components/hero-section/hero-section.css.d.ts +0 -1
- package/dist/components/hero-section/hero-section.schema.d.ts +0 -3
- package/dist/components/hero-section/hero-section.schema.js +0 -123
- package/dist/components/hero-section/hero-section.svelte.d.ts +0 -19
- package/dist/components/hero-section/hero-section.types.d.ts +0 -48
- package/dist/components/hero-section/hero-section.variables.d.ts +0 -2
- package/dist/components/hero-section/hero-section.variables.js +0 -61
- package/dist/components/hero-section/index.d.ts +0 -5
- package/dist/components/hero-section/index.js +0 -288
- package/dist/components/logo-cloud/index.d.ts +0 -5
- package/dist/components/logo-cloud/index.js +0 -238
- package/dist/components/logo-cloud/logo-cloud.css +0 -88
- package/dist/components/logo-cloud/logo-cloud.css.d.ts +0 -1
- package/dist/components/logo-cloud/logo-cloud.schema.d.ts +0 -3
- package/dist/components/logo-cloud/logo-cloud.schema.js +0 -123
- package/dist/components/logo-cloud/logo-cloud.svelte.d.ts +0 -19
- package/dist/components/logo-cloud/logo-cloud.types.d.ts +0 -48
- package/dist/components/logo-cloud/logo-cloud.variables.d.ts +0 -2
- package/dist/components/logo-cloud/logo-cloud.variables.js +0 -61
- package/dist/components/newsletter-section/index.d.ts +0 -5
- package/dist/components/newsletter-section/index.js +0 -1233
- package/dist/components/newsletter-section/newsletter-section.css +0 -54
- package/dist/components/newsletter-section/newsletter-section.css.d.ts +0 -1
- package/dist/components/newsletter-section/newsletter-section.schema.d.ts +0 -3
- package/dist/components/newsletter-section/newsletter-section.schema.js +0 -122
- package/dist/components/newsletter-section/newsletter-section.svelte.d.ts +0 -19
- package/dist/components/newsletter-section/newsletter-section.types.d.ts +0 -48
- package/dist/components/newsletter-section/newsletter-section.variables.d.ts +0 -2
- package/dist/components/newsletter-section/newsletter-section.variables.js +0 -61
- package/dist/components/pricing-section/index.d.ts +0 -5
- package/dist/components/pricing-section/index.js +0 -572
- package/dist/components/pricing-section/pricing-section.css +0 -55
- package/dist/components/pricing-section/pricing-section.css.d.ts +0 -1
- package/dist/components/pricing-section/pricing-section.schema.d.ts +0 -3
- package/dist/components/pricing-section/pricing-section.schema.js +0 -142
- package/dist/components/pricing-section/pricing-section.svelte.d.ts +0 -19
- package/dist/components/pricing-section/pricing-section.types.d.ts +0 -52
- package/dist/components/pricing-section/pricing-section.variables.d.ts +0 -2
- package/dist/components/pricing-section/pricing-section.variables.js +0 -61
- package/dist/components/sheet/index.d.ts +0 -5
- package/dist/components/sheet/index.js +0 -1335
- package/dist/components/sheet/sheet.css +0 -220
- package/dist/components/sheet/sheet.css.d.ts +0 -1
- package/dist/components/sheet/sheet.schema.d.ts +0 -3
- package/dist/components/sheet/sheet.schema.js +0 -115
- package/dist/components/sheet/sheet.svelte.d.ts +0 -18
- package/dist/components/sheet/sheet.types.d.ts +0 -44
- package/dist/components/sheet/sheet.variables.d.ts +0 -2
- package/dist/components/statistics-section/index.d.ts +0 -5
- package/dist/components/statistics-section/index.js +0 -417
- package/dist/components/statistics-section/statistics-section.css +0 -30
- package/dist/components/statistics-section/statistics-section.css.d.ts +0 -1
- package/dist/components/statistics-section/statistics-section.schema.d.ts +0 -3
- package/dist/components/statistics-section/statistics-section.schema.js +0 -143
- package/dist/components/statistics-section/statistics-section.svelte.d.ts +0 -19
- package/dist/components/statistics-section/statistics-section.types.d.ts +0 -63
- package/dist/components/statistics-section/statistics-section.variables.d.ts +0 -2
- package/dist/components/statistics-section/statistics-section.variables.js +0 -61
- package/dist/components/team-section/index.d.ts +0 -5
- package/dist/components/team-section/index.js +0 -4321
- package/dist/components/team-section/team-section.css +0 -54
- package/dist/components/team-section/team-section.css.d.ts +0 -1
- package/dist/components/team-section/team-section.schema.d.ts +0 -3
- package/dist/components/team-section/team-section.schema.js +0 -136
- package/dist/components/team-section/team-section.svelte.d.ts +0 -19
- package/dist/components/team-section/team-section.types.d.ts +0 -56
- package/dist/components/team-section/team-section.variables.d.ts +0 -2
- package/dist/components/team-section/team-section.variables.js +0 -61
- package/dist/components/testimonial-section/index.d.ts +0 -5
- package/dist/components/testimonial-section/index.js +0 -561
- package/dist/components/testimonial-section/testimonial-section.css +0 -41
- package/dist/components/testimonial-section/testimonial-section.css.d.ts +0 -1
- package/dist/components/testimonial-section/testimonial-section.schema.d.ts +0 -3
- package/dist/components/testimonial-section/testimonial-section.schema.js +0 -131
- package/dist/components/testimonial-section/testimonial-section.svelte.d.ts +0 -19
- package/dist/components/testimonial-section/testimonial-section.types.d.ts +0 -53
- package/dist/components/testimonial-section/testimonial-section.variables.d.ts +0 -2
- package/dist/components/testimonial-section/testimonial-section.variables.js +0 -61
- package/dist/components/typography/index.d.ts +0 -5
- package/dist/components/typography/typography.css +0 -149
- package/dist/components/typography/typography.css.d.ts +0 -1
- package/dist/components/typography/typography.schema.d.ts +0 -3
- package/dist/components/typography/typography.schema.js +0 -214
- package/dist/components/typography/typography.svelte.d.ts +0 -16
- package/dist/components/typography/typography.types.d.ts +0 -86
- package/dist/components/typography/typography.variables.d.ts +0 -2
- package/dist/components/typography/typography.variables.js +0 -61
- package/dist/server/components/blog-section/index.js +0 -14
- package/dist/server/components/call-to-action-section/index.js +0 -16
- package/dist/server/components/event-stream-viewer/index.js +0 -25
- package/dist/server/components/event-timeline/index.js +0 -22
- package/dist/server/components/faceted-filter-bar/index.js +0 -25
- package/dist/server/components/feature-section/index.js +0 -13
- package/dist/server/components/hero-section/index.js +0 -14
- package/dist/server/components/logo-cloud/index.js +0 -13
- package/dist/server/components/newsletter-section/index.js +0 -22
- package/dist/server/components/pricing-section/index.js +0 -17
- package/dist/server/components/sheet/index.js +0 -20
- package/dist/server/components/statistics-section/index.js +0 -18
- package/dist/server/components/team-section/index.js +0 -31
- package/dist/server/components/testimonial-section/index.js +0 -19
- package/dist/server/components/typography/index.js +0 -12
- package/dist/server/index.server-0j8ttfb3.js +0 -94
- package/dist/server/index.server-2eb8pcev.js +0 -295
- package/dist/server/index.server-6vbpz6dd.js +0 -690
- package/dist/server/index.server-70j8j998.js +0 -103
- package/dist/server/index.server-72d0qgdy.js +0 -126
- package/dist/server/index.server-79bg6rad.js +0 -102
- package/dist/server/index.server-7ssngbpa.js +0 -9
- package/dist/server/index.server-8s33z1q7.js +0 -106
- package/dist/server/index.server-91yqn19v.js +0 -87
- package/dist/server/index.server-9emgn750.js +0 -9
- package/dist/server/index.server-b7pq5xpd.js +0 -126
- package/dist/server/index.server-bfmd7nf6.js +0 -99
- package/dist/server/index.server-ff9zfw15.js +0 -88
- package/dist/server/index.server-hwajb8z6.js +0 -38
- package/dist/server/index.server-kmn9zrqn.js +0 -9
- package/dist/server/index.server-m1r7jk3n.js +0 -447
- package/dist/server/index.server-m9p9vfj1.js +0 -91
- package/dist/server/index.server-mgvey6vx.js +0 -384
- package/dist/server/index.server-ne3hnn6e.js +0 -56
- package/dist/server/index.server-p9w4tdax.js +0 -9
- package/dist/server/index.server-pwxe9s42.js +0 -99
- package/dist/server/index.server-v12jk4c9.js +0 -91
- package/dist/server/index.server-v6b3k6cq.js +0 -15
- package/dist/server/index.server-xqbes4jd.js +0 -397
- package/dist/server/index.server-yase1x1a.js +0 -23
- package/src/components/_internal/person-byline.css +0 -29
- package/src/components/_internal/person-byline.svelte +0 -14
- package/src/components/_internal/section-skeleton.css +0 -45
- package/src/components/blog-section/blog-section.css +0 -56
- package/src/components/blog-section/blog-section.examples.json +0 -13
- package/src/components/blog-section/blog-section.schema.json +0 -82
- package/src/components/blog-section/blog-section.schema.ts +0 -86
- package/src/components/blog-section/blog-section.svelte +0 -76
- package/src/components/blog-section/blog-section.types.ts +0 -59
- package/src/components/blog-section/index.ts +0 -6
- package/src/components/call-to-action-section/call-to-action-section.css +0 -54
- package/src/components/call-to-action-section/call-to-action-section.examples.json +0 -13
- package/src/components/call-to-action-section/call-to-action-section.schema.json +0 -67
- package/src/components/call-to-action-section/call-to-action-section.schema.ts +0 -71
- package/src/components/call-to-action-section/call-to-action-section.svelte +0 -36
- package/src/components/call-to-action-section/call-to-action-section.types.ts +0 -67
- package/src/components/call-to-action-section/index.ts +0 -10
- package/src/components/event-stream-viewer/event-stream-viewer-keys.ts +0 -74
- package/src/components/event-stream-viewer/event-stream-viewer.css +0 -546
- package/src/components/event-stream-viewer/event-stream-viewer.examples.json +0 -37
- package/src/components/event-stream-viewer/event-stream-viewer.schema.json +0 -128
- package/src/components/event-stream-viewer/event-stream-viewer.schema.ts +0 -150
- package/src/components/event-stream-viewer/event-stream-viewer.svelte +0 -395
- package/src/components/event-stream-viewer/event-stream-viewer.types.ts +0 -212
- package/src/components/event-stream-viewer/event-stream-viewer.variables.json +0 -1
- package/src/components/event-stream-viewer/event-stream-viewer.variables.ts +0 -6
- package/src/components/event-stream-viewer/index.ts +0 -17
- package/src/components/event-timeline/event-timeline-modal.ts +0 -64
- package/src/components/event-timeline/event-timeline.css +0 -313
- package/src/components/event-timeline/event-timeline.examples.json +0 -25
- package/src/components/event-timeline/event-timeline.schema.json +0 -95
- package/src/components/event-timeline/event-timeline.schema.ts +0 -99
- package/src/components/event-timeline/event-timeline.svelte +0 -503
- package/src/components/event-timeline/event-timeline.types.ts +0 -80
- package/src/components/event-timeline/event-timeline.variables.json +0 -1
- package/src/components/event-timeline/event-timeline.variables.ts +0 -3
- package/src/components/event-timeline/index.ts +0 -12
- package/src/components/faceted-filter-bar/faceted-filter-bar.examples.json +0 -25
- package/src/components/faceted-filter-bar/faceted-filter-bar.variables.json +0 -1
- package/src/components/faceted-filter-bar/faceted-filter-bar.variables.ts +0 -3
- package/src/components/faceted-filter-bar/index.ts +0 -13
- package/src/components/feature-section/feature-section.css +0 -130
- package/src/components/feature-section/feature-section.examples.json +0 -13
- package/src/components/feature-section/feature-section.schema.json +0 -82
- package/src/components/feature-section/feature-section.schema.ts +0 -86
- package/src/components/feature-section/feature-section.svelte +0 -53
- package/src/components/feature-section/feature-section.types.ts +0 -71
- package/src/components/feature-section/feature-section.variables.json +0 -1
- package/src/components/feature-section/feature-section.variables.ts +0 -3
- package/src/components/feature-section/index.ts +0 -11
- package/src/components/hero-section/hero-section.css +0 -167
- package/src/components/hero-section/hero-section.examples.json +0 -13
- package/src/components/hero-section/hero-section.schema.json +0 -63
- package/src/components/hero-section/hero-section.schema.ts +0 -67
- package/src/components/hero-section/hero-section.svelte +0 -50
- package/src/components/hero-section/hero-section.types.ts +0 -51
- package/src/components/hero-section/hero-section.variables.json +0 -1
- package/src/components/hero-section/hero-section.variables.ts +0 -3
- package/src/components/hero-section/index.ts +0 -10
- package/src/components/logo-cloud/index.ts +0 -6
- package/src/components/logo-cloud/logo-cloud.css +0 -88
- package/src/components/logo-cloud/logo-cloud.examples.json +0 -13
- package/src/components/logo-cloud/logo-cloud.schema.json +0 -63
- package/src/components/logo-cloud/logo-cloud.schema.ts +0 -67
- package/src/components/logo-cloud/logo-cloud.svelte +0 -50
- package/src/components/logo-cloud/logo-cloud.types.ts +0 -51
- package/src/components/logo-cloud/logo-cloud.variables.json +0 -1
- package/src/components/logo-cloud/logo-cloud.variables.ts +0 -3
- package/src/components/newsletter-section/index.ts +0 -6
- package/src/components/newsletter-section/newsletter-section.css +0 -54
- package/src/components/newsletter-section/newsletter-section.examples.json +0 -13
- package/src/components/newsletter-section/newsletter-section.schema.json +0 -62
- package/src/components/newsletter-section/newsletter-section.schema.ts +0 -66
- package/src/components/newsletter-section/newsletter-section.svelte +0 -58
- package/src/components/newsletter-section/newsletter-section.types.ts +0 -50
- package/src/components/newsletter-section/newsletter-section.variables.json +0 -1
- package/src/components/newsletter-section/newsletter-section.variables.ts +0 -3
- package/src/components/pricing-section/index.ts +0 -6
- package/src/components/pricing-section/pricing-section.css +0 -55
- package/src/components/pricing-section/pricing-section.examples.json +0 -13
- package/src/components/pricing-section/pricing-section.schema.json +0 -82
- package/src/components/pricing-section/pricing-section.schema.ts +0 -86
- package/src/components/pricing-section/pricing-section.svelte +0 -53
- package/src/components/pricing-section/pricing-section.types.ts +0 -55
- package/src/components/pricing-section/pricing-section.variables.json +0 -1
- package/src/components/pricing-section/pricing-section.variables.ts +0 -3
- package/src/components/sheet/index.ts +0 -6
- package/src/components/sheet/sheet.css +0 -220
- package/src/components/sheet/sheet.examples.json +0 -13
- package/src/components/sheet/sheet.schema.json +0 -53
- package/src/components/sheet/sheet.schema.ts +0 -61
- package/src/components/sheet/sheet.svelte +0 -141
- package/src/components/sheet/sheet.types.ts +0 -55
- package/src/components/sheet/sheet.variables.json +0 -1
- package/src/components/sheet/sheet.variables.ts +0 -3
- package/src/components/statistics-section/index.ts +0 -6
- package/src/components/statistics-section/statistics-section.css +0 -30
- package/src/components/statistics-section/statistics-section.examples.json +0 -13
- package/src/components/statistics-section/statistics-section.schema.json +0 -83
- package/src/components/statistics-section/statistics-section.schema.ts +0 -87
- package/src/components/statistics-section/statistics-section.svelte +0 -47
- package/src/components/statistics-section/statistics-section.types.ts +0 -72
- package/src/components/statistics-section/statistics-section.variables.json +0 -1
- package/src/components/statistics-section/statistics-section.variables.ts +0 -3
- package/src/components/team-section/index.ts +0 -6
- package/src/components/team-section/team-section.css +0 -54
- package/src/components/team-section/team-section.examples.json +0 -13
- package/src/components/team-section/team-section.schema.json +0 -76
- package/src/components/team-section/team-section.schema.ts +0 -80
- package/src/components/team-section/team-section.svelte +0 -72
- package/src/components/team-section/team-section.types.ts +0 -59
- package/src/components/team-section/team-section.variables.json +0 -1
- package/src/components/team-section/team-section.variables.ts +0 -3
- package/src/components/testimonial-section/index.ts +0 -10
- package/src/components/testimonial-section/testimonial-section.css +0 -41
- package/src/components/testimonial-section/testimonial-section.examples.json +0 -13
- package/src/components/testimonial-section/testimonial-section.schema.json +0 -71
- package/src/components/testimonial-section/testimonial-section.schema.ts +0 -75
- package/src/components/testimonial-section/testimonial-section.svelte +0 -55
- package/src/components/testimonial-section/testimonial-section.types.ts +0 -57
- package/src/components/testimonial-section/testimonial-section.variables.json +0 -1
- package/src/components/testimonial-section/testimonial-section.variables.ts +0 -3
- package/src/components/typography/index.ts +0 -6
- package/src/components/typography/typography.css +0 -149
- package/src/components/typography/typography.examples.json +0 -13
- package/src/components/typography/typography.schema.json +0 -154
- package/src/components/typography/typography.schema.ts +0 -158
- package/src/components/typography/typography.svelte +0 -45
- package/src/components/typography/typography.types.ts +0 -102
- package/src/components/typography/typography.variables.json +0 -1
- package/src/components/typography/typography.variables.ts +0 -3
- /package/dist/components/{blog-section/blog-section.css.d.ts → feed-boundary/feed-boundary.css.d.ts} +0 -0
- /package/dist/components/{blog-section/blog-section.schema.d.ts → feed-boundary/feed-boundary.schema.d.ts} +0 -0
- /package/dist/components/{blog-section/blog-section.variables.d.ts → feed-boundary/feed-boundary.variables.d.ts} +0 -0
- /package/dist/components/{call-to-action-section/call-to-action-section.css.d.ts → feed-event/feed-event.css.d.ts} +0 -0
- /package/dist/components/{event-stream-viewer/event-stream-viewer.css.d.ts → filter-bar/filter-bar.css.d.ts} +0 -0
- /package/dist/components/{call-to-action-section/call-to-action-section.schema.d.ts → filter-bar/filter-bar.schema.d.ts} +0 -0
- /package/dist/components/{call-to-action-section/call-to-action-section.variables.d.ts → filter-bar/filter-bar.variables.d.ts} +0 -0
- /package/src/components/{blog-section/blog-section.variables.json → feed-boundary/feed-boundary.variables.json} +0 -0
- /package/src/components/{blog-section/blog-section.variables.ts → feed-boundary/feed-boundary.variables.ts} +0 -0
- /package/src/components/{faceted-filter-bar/faceted-filter-bar.schema.json → filter-bar/filter-bar.schema.json} +0 -0
- /package/src/components/{faceted-filter-bar/faceted-filter-bar.schema.ts → filter-bar/filter-bar.schema.ts} +0 -0
- /package/src/components/{call-to-action-section/call-to-action-section.variables.json → filter-bar/filter-bar.variables.json} +0 -0
- /package/src/components/{call-to-action-section/call-to-action-section.variables.ts → filter-bar/filter-bar.variables.ts} +0 -0
|
@@ -1,4321 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
function __accessProp(key) {
|
|
7
|
-
return this[key];
|
|
8
|
-
}
|
|
9
|
-
var __toESMCache_node;
|
|
10
|
-
var __toESMCache_esm;
|
|
11
|
-
var __toESM = (mod, isNodeMode, target) => {
|
|
12
|
-
var canCache = mod != null && typeof mod === "object";
|
|
13
|
-
if (canCache) {
|
|
14
|
-
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
15
|
-
var cached = cache.get(mod);
|
|
16
|
-
if (cached)
|
|
17
|
-
return cached;
|
|
18
|
-
}
|
|
19
|
-
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
20
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
-
for (let key of __getOwnPropNames(mod))
|
|
22
|
-
if (!__hasOwnProp.call(to, key))
|
|
23
|
-
__defProp(to, key, {
|
|
24
|
-
get: __accessProp.bind(mod, key),
|
|
25
|
-
enumerable: true
|
|
26
|
-
});
|
|
27
|
-
if (canCache)
|
|
28
|
-
cache.set(mod, to);
|
|
29
|
-
return to;
|
|
30
|
-
};
|
|
31
|
-
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
32
|
-
var __returnValue = (v) => v;
|
|
33
|
-
function __exportSetter(name, newValue) {
|
|
34
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
35
|
-
}
|
|
36
|
-
var __export = (target, all) => {
|
|
37
|
-
for (var name in all)
|
|
38
|
-
__defProp(target, name, {
|
|
39
|
-
get: all[name],
|
|
40
|
-
enumerable: true,
|
|
41
|
-
configurable: true,
|
|
42
|
-
set: __exportSetter.bind(all, name)
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
46
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
47
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
48
|
-
}) : x)(function(x) {
|
|
49
|
-
if (typeof require !== "undefined")
|
|
50
|
-
return require.apply(this, arguments);
|
|
51
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
// ../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
55
|
-
function clamp(start, value, end) {
|
|
56
|
-
return max(start, min(value, end));
|
|
57
|
-
}
|
|
58
|
-
function evaluate(value, param) {
|
|
59
|
-
return typeof value === "function" ? value(param) : value;
|
|
60
|
-
}
|
|
61
|
-
function getSide(placement) {
|
|
62
|
-
return placement.split("-")[0];
|
|
63
|
-
}
|
|
64
|
-
function getAlignment(placement) {
|
|
65
|
-
return placement.split("-")[1];
|
|
66
|
-
}
|
|
67
|
-
function getOppositeAxis(axis) {
|
|
68
|
-
return axis === "x" ? "y" : "x";
|
|
69
|
-
}
|
|
70
|
-
function getAxisLength(axis) {
|
|
71
|
-
return axis === "y" ? "height" : "width";
|
|
72
|
-
}
|
|
73
|
-
function getSideAxis(placement) {
|
|
74
|
-
const firstChar = placement[0];
|
|
75
|
-
return firstChar === "t" || firstChar === "b" ? "y" : "x";
|
|
76
|
-
}
|
|
77
|
-
function getAlignmentAxis(placement) {
|
|
78
|
-
return getOppositeAxis(getSideAxis(placement));
|
|
79
|
-
}
|
|
80
|
-
function getAlignmentSides(placement, rects, rtl) {
|
|
81
|
-
if (rtl === undefined) {
|
|
82
|
-
rtl = false;
|
|
83
|
-
}
|
|
84
|
-
const alignment = getAlignment(placement);
|
|
85
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
86
|
-
const length = getAxisLength(alignmentAxis);
|
|
87
|
-
let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
|
|
88
|
-
if (rects.reference[length] > rects.floating[length]) {
|
|
89
|
-
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
90
|
-
}
|
|
91
|
-
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
92
|
-
}
|
|
93
|
-
function getExpandedPlacements(placement) {
|
|
94
|
-
const oppositePlacement = getOppositePlacement(placement);
|
|
95
|
-
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
96
|
-
}
|
|
97
|
-
function getOppositeAlignmentPlacement(placement) {
|
|
98
|
-
return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
|
|
99
|
-
}
|
|
100
|
-
function getSideList(side, isStart, rtl) {
|
|
101
|
-
switch (side) {
|
|
102
|
-
case "top":
|
|
103
|
-
case "bottom":
|
|
104
|
-
if (rtl)
|
|
105
|
-
return isStart ? rlPlacement : lrPlacement;
|
|
106
|
-
return isStart ? lrPlacement : rlPlacement;
|
|
107
|
-
case "left":
|
|
108
|
-
case "right":
|
|
109
|
-
return isStart ? tbPlacement : btPlacement;
|
|
110
|
-
default:
|
|
111
|
-
return [];
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
115
|
-
const alignment = getAlignment(placement);
|
|
116
|
-
let list = getSideList(getSide(placement), direction === "start", rtl);
|
|
117
|
-
if (alignment) {
|
|
118
|
-
list = list.map((side) => side + "-" + alignment);
|
|
119
|
-
if (flipAlignment) {
|
|
120
|
-
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return list;
|
|
124
|
-
}
|
|
125
|
-
function getOppositePlacement(placement) {
|
|
126
|
-
const side = getSide(placement);
|
|
127
|
-
return oppositeSideMap[side] + placement.slice(side.length);
|
|
128
|
-
}
|
|
129
|
-
function expandPaddingObject(padding) {
|
|
130
|
-
return {
|
|
131
|
-
top: 0,
|
|
132
|
-
right: 0,
|
|
133
|
-
bottom: 0,
|
|
134
|
-
left: 0,
|
|
135
|
-
...padding
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
function getPaddingObject(padding) {
|
|
139
|
-
return typeof padding !== "number" ? expandPaddingObject(padding) : {
|
|
140
|
-
top: padding,
|
|
141
|
-
right: padding,
|
|
142
|
-
bottom: padding,
|
|
143
|
-
left: padding
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
function rectToClientRect(rect) {
|
|
147
|
-
const {
|
|
148
|
-
x,
|
|
149
|
-
y,
|
|
150
|
-
width,
|
|
151
|
-
height
|
|
152
|
-
} = rect;
|
|
153
|
-
return {
|
|
154
|
-
width,
|
|
155
|
-
height,
|
|
156
|
-
top: y,
|
|
157
|
-
left: x,
|
|
158
|
-
right: x + width,
|
|
159
|
-
bottom: y + height,
|
|
160
|
-
x,
|
|
161
|
-
y
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
var sides, alignments, placements, min, max, round, floor, createCoords = (v) => ({
|
|
165
|
-
x: v,
|
|
166
|
-
y: v
|
|
167
|
-
}), oppositeSideMap, lrPlacement, rlPlacement, tbPlacement, btPlacement;
|
|
168
|
-
var init_floating_ui_utils = __esm(() => {
|
|
169
|
-
sides = ["top", "right", "bottom", "left"];
|
|
170
|
-
alignments = ["start", "end"];
|
|
171
|
-
placements = /* @__PURE__ */ sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
|
172
|
-
min = Math.min;
|
|
173
|
-
max = Math.max;
|
|
174
|
-
round = Math.round;
|
|
175
|
-
floor = Math.floor;
|
|
176
|
-
oppositeSideMap = {
|
|
177
|
-
left: "right",
|
|
178
|
-
right: "left",
|
|
179
|
-
bottom: "top",
|
|
180
|
-
top: "bottom"
|
|
181
|
-
};
|
|
182
|
-
lrPlacement = ["left", "right"];
|
|
183
|
-
rlPlacement = ["right", "left"];
|
|
184
|
-
tbPlacement = ["top", "bottom"];
|
|
185
|
-
btPlacement = ["bottom", "top"];
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
// ../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
189
|
-
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
190
|
-
let {
|
|
191
|
-
reference,
|
|
192
|
-
floating
|
|
193
|
-
} = _ref;
|
|
194
|
-
const sideAxis = getSideAxis(placement);
|
|
195
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
196
|
-
const alignLength = getAxisLength(alignmentAxis);
|
|
197
|
-
const side = getSide(placement);
|
|
198
|
-
const isVertical = sideAxis === "y";
|
|
199
|
-
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
200
|
-
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
201
|
-
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
202
|
-
let coords;
|
|
203
|
-
switch (side) {
|
|
204
|
-
case "top":
|
|
205
|
-
coords = {
|
|
206
|
-
x: commonX,
|
|
207
|
-
y: reference.y - floating.height
|
|
208
|
-
};
|
|
209
|
-
break;
|
|
210
|
-
case "bottom":
|
|
211
|
-
coords = {
|
|
212
|
-
x: commonX,
|
|
213
|
-
y: reference.y + reference.height
|
|
214
|
-
};
|
|
215
|
-
break;
|
|
216
|
-
case "right":
|
|
217
|
-
coords = {
|
|
218
|
-
x: reference.x + reference.width,
|
|
219
|
-
y: commonY
|
|
220
|
-
};
|
|
221
|
-
break;
|
|
222
|
-
case "left":
|
|
223
|
-
coords = {
|
|
224
|
-
x: reference.x - floating.width,
|
|
225
|
-
y: commonY
|
|
226
|
-
};
|
|
227
|
-
break;
|
|
228
|
-
default:
|
|
229
|
-
coords = {
|
|
230
|
-
x: reference.x,
|
|
231
|
-
y: reference.y
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
switch (getAlignment(placement)) {
|
|
235
|
-
case "start":
|
|
236
|
-
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
237
|
-
break;
|
|
238
|
-
case "end":
|
|
239
|
-
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
240
|
-
break;
|
|
241
|
-
}
|
|
242
|
-
return coords;
|
|
243
|
-
}
|
|
244
|
-
async function detectOverflow(state4, options) {
|
|
245
|
-
var _await$platform$isEle;
|
|
246
|
-
if (options === undefined) {
|
|
247
|
-
options = {};
|
|
248
|
-
}
|
|
249
|
-
const {
|
|
250
|
-
x,
|
|
251
|
-
y,
|
|
252
|
-
platform,
|
|
253
|
-
rects,
|
|
254
|
-
elements,
|
|
255
|
-
strategy
|
|
256
|
-
} = state4;
|
|
257
|
-
const {
|
|
258
|
-
boundary = "clippingAncestors",
|
|
259
|
-
rootBoundary = "viewport",
|
|
260
|
-
elementContext = "floating",
|
|
261
|
-
altBoundary = false,
|
|
262
|
-
padding = 0
|
|
263
|
-
} = evaluate(options, state4);
|
|
264
|
-
const paddingObject = getPaddingObject(padding);
|
|
265
|
-
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
266
|
-
const element2 = elements[altBoundary ? altContext : elementContext];
|
|
267
|
-
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
268
|
-
element: ((_await$platform$isEle = await (platform.isElement == null ? undefined : platform.isElement(element2))) != null ? _await$platform$isEle : true) ? element2 : element2.contextElement || await (platform.getDocumentElement == null ? undefined : platform.getDocumentElement(elements.floating)),
|
|
269
|
-
boundary,
|
|
270
|
-
rootBoundary,
|
|
271
|
-
strategy
|
|
272
|
-
}));
|
|
273
|
-
const rect = elementContext === "floating" ? {
|
|
274
|
-
x,
|
|
275
|
-
y,
|
|
276
|
-
width: rects.floating.width,
|
|
277
|
-
height: rects.floating.height
|
|
278
|
-
} : rects.reference;
|
|
279
|
-
const offsetParent = await (platform.getOffsetParent == null ? undefined : platform.getOffsetParent(elements.floating));
|
|
280
|
-
const offsetScale = await (platform.isElement == null ? undefined : platform.isElement(offsetParent)) ? await (platform.getScale == null ? undefined : platform.getScale(offsetParent)) || {
|
|
281
|
-
x: 1,
|
|
282
|
-
y: 1
|
|
283
|
-
} : {
|
|
284
|
-
x: 1,
|
|
285
|
-
y: 1
|
|
286
|
-
};
|
|
287
|
-
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
288
|
-
elements,
|
|
289
|
-
rect,
|
|
290
|
-
offsetParent,
|
|
291
|
-
strategy
|
|
292
|
-
}) : rect);
|
|
293
|
-
return {
|
|
294
|
-
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
295
|
-
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
296
|
-
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
297
|
-
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
298
|
-
};
|
|
299
|
-
}
|
|
300
|
-
function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
301
|
-
const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter((placement) => getAlignment(placement) === alignment), ...allowedPlacements.filter((placement) => getAlignment(placement) !== alignment)] : allowedPlacements.filter((placement) => getSide(placement) === placement);
|
|
302
|
-
return allowedPlacementsSortedByAlignment.filter((placement) => {
|
|
303
|
-
if (alignment) {
|
|
304
|
-
return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
|
|
305
|
-
}
|
|
306
|
-
return true;
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
function getSideOffsets(overflow, rect) {
|
|
310
|
-
return {
|
|
311
|
-
top: overflow.top - rect.height,
|
|
312
|
-
right: overflow.right - rect.width,
|
|
313
|
-
bottom: overflow.bottom - rect.height,
|
|
314
|
-
left: overflow.left - rect.width
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
function isAnySideFullyClipped(overflow) {
|
|
318
|
-
return sides.some((side) => overflow[side] >= 0);
|
|
319
|
-
}
|
|
320
|
-
function getBoundingRect(rects) {
|
|
321
|
-
const minX = min(...rects.map((rect) => rect.left));
|
|
322
|
-
const minY = min(...rects.map((rect) => rect.top));
|
|
323
|
-
const maxX = max(...rects.map((rect) => rect.right));
|
|
324
|
-
const maxY = max(...rects.map((rect) => rect.bottom));
|
|
325
|
-
return {
|
|
326
|
-
x: minX,
|
|
327
|
-
y: minY,
|
|
328
|
-
width: maxX - minX,
|
|
329
|
-
height: maxY - minY
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
function getRectsByLine(rects) {
|
|
333
|
-
const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
|
|
334
|
-
const groups = [];
|
|
335
|
-
let prevRect = null;
|
|
336
|
-
for (let i = 0;i < sortedRects.length; i++) {
|
|
337
|
-
const rect = sortedRects[i];
|
|
338
|
-
if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {
|
|
339
|
-
groups.push([rect]);
|
|
340
|
-
} else {
|
|
341
|
-
groups[groups.length - 1].push(rect);
|
|
342
|
-
}
|
|
343
|
-
prevRect = rect;
|
|
344
|
-
}
|
|
345
|
-
return groups.map((rect) => rectToClientRect(getBoundingRect(rect)));
|
|
346
|
-
}
|
|
347
|
-
async function convertValueToCoords(state4, options) {
|
|
348
|
-
const {
|
|
349
|
-
placement,
|
|
350
|
-
platform,
|
|
351
|
-
elements
|
|
352
|
-
} = state4;
|
|
353
|
-
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating));
|
|
354
|
-
const side = getSide(placement);
|
|
355
|
-
const alignment = getAlignment(placement);
|
|
356
|
-
const isVertical = getSideAxis(placement) === "y";
|
|
357
|
-
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
358
|
-
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
359
|
-
const rawValue = evaluate(options, state4);
|
|
360
|
-
let {
|
|
361
|
-
mainAxis,
|
|
362
|
-
crossAxis,
|
|
363
|
-
alignmentAxis
|
|
364
|
-
} = typeof rawValue === "number" ? {
|
|
365
|
-
mainAxis: rawValue,
|
|
366
|
-
crossAxis: 0,
|
|
367
|
-
alignmentAxis: null
|
|
368
|
-
} : {
|
|
369
|
-
mainAxis: rawValue.mainAxis || 0,
|
|
370
|
-
crossAxis: rawValue.crossAxis || 0,
|
|
371
|
-
alignmentAxis: rawValue.alignmentAxis
|
|
372
|
-
};
|
|
373
|
-
if (alignment && typeof alignmentAxis === "number") {
|
|
374
|
-
crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
|
|
375
|
-
}
|
|
376
|
-
return isVertical ? {
|
|
377
|
-
x: crossAxis * crossAxisMulti,
|
|
378
|
-
y: mainAxis * mainAxisMulti
|
|
379
|
-
} : {
|
|
380
|
-
x: mainAxis * mainAxisMulti,
|
|
381
|
-
y: crossAxis * crossAxisMulti
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config) => {
|
|
385
|
-
const {
|
|
386
|
-
placement = "bottom",
|
|
387
|
-
strategy = "absolute",
|
|
388
|
-
middleware = [],
|
|
389
|
-
platform
|
|
390
|
-
} = config;
|
|
391
|
-
const platformWithDetectOverflow = platform.detectOverflow ? platform : {
|
|
392
|
-
...platform,
|
|
393
|
-
detectOverflow
|
|
394
|
-
};
|
|
395
|
-
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(floating));
|
|
396
|
-
let rects = await platform.getElementRects({
|
|
397
|
-
reference,
|
|
398
|
-
floating,
|
|
399
|
-
strategy
|
|
400
|
-
});
|
|
401
|
-
let {
|
|
402
|
-
x,
|
|
403
|
-
y
|
|
404
|
-
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
405
|
-
let statefulPlacement = placement;
|
|
406
|
-
let resetCount = 0;
|
|
407
|
-
const middlewareData = {};
|
|
408
|
-
for (let i = 0;i < middleware.length; i++) {
|
|
409
|
-
const currentMiddleware = middleware[i];
|
|
410
|
-
if (!currentMiddleware) {
|
|
411
|
-
continue;
|
|
412
|
-
}
|
|
413
|
-
const {
|
|
414
|
-
name,
|
|
415
|
-
fn
|
|
416
|
-
} = currentMiddleware;
|
|
417
|
-
const {
|
|
418
|
-
x: nextX,
|
|
419
|
-
y: nextY,
|
|
420
|
-
data,
|
|
421
|
-
reset: reset4
|
|
422
|
-
} = await fn({
|
|
423
|
-
x,
|
|
424
|
-
y,
|
|
425
|
-
initialPlacement: placement,
|
|
426
|
-
placement: statefulPlacement,
|
|
427
|
-
strategy,
|
|
428
|
-
middlewareData,
|
|
429
|
-
rects,
|
|
430
|
-
platform: platformWithDetectOverflow,
|
|
431
|
-
elements: {
|
|
432
|
-
reference,
|
|
433
|
-
floating
|
|
434
|
-
}
|
|
435
|
-
});
|
|
436
|
-
x = nextX != null ? nextX : x;
|
|
437
|
-
y = nextY != null ? nextY : y;
|
|
438
|
-
middlewareData[name] = {
|
|
439
|
-
...middlewareData[name],
|
|
440
|
-
...data
|
|
441
|
-
};
|
|
442
|
-
if (reset4 && resetCount < MAX_RESET_COUNT) {
|
|
443
|
-
resetCount++;
|
|
444
|
-
if (typeof reset4 === "object") {
|
|
445
|
-
if (reset4.placement) {
|
|
446
|
-
statefulPlacement = reset4.placement;
|
|
447
|
-
}
|
|
448
|
-
if (reset4.rects) {
|
|
449
|
-
rects = reset4.rects === true ? await platform.getElementRects({
|
|
450
|
-
reference,
|
|
451
|
-
floating,
|
|
452
|
-
strategy
|
|
453
|
-
}) : reset4.rects;
|
|
454
|
-
}
|
|
455
|
-
({
|
|
456
|
-
x,
|
|
457
|
-
y
|
|
458
|
-
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
459
|
-
}
|
|
460
|
-
i = -1;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
return {
|
|
464
|
-
x,
|
|
465
|
-
y,
|
|
466
|
-
placement: statefulPlacement,
|
|
467
|
-
strategy,
|
|
468
|
-
middlewareData
|
|
469
|
-
};
|
|
470
|
-
}, arrow = (options) => ({
|
|
471
|
-
name: "arrow",
|
|
472
|
-
options,
|
|
473
|
-
async fn(state4) {
|
|
474
|
-
const {
|
|
475
|
-
x,
|
|
476
|
-
y,
|
|
477
|
-
placement,
|
|
478
|
-
rects,
|
|
479
|
-
platform,
|
|
480
|
-
elements,
|
|
481
|
-
middlewareData
|
|
482
|
-
} = state4;
|
|
483
|
-
const {
|
|
484
|
-
element: element2,
|
|
485
|
-
padding = 0
|
|
486
|
-
} = evaluate(options, state4) || {};
|
|
487
|
-
if (element2 == null) {
|
|
488
|
-
return {};
|
|
489
|
-
}
|
|
490
|
-
const paddingObject = getPaddingObject(padding);
|
|
491
|
-
const coords = {
|
|
492
|
-
x,
|
|
493
|
-
y
|
|
494
|
-
};
|
|
495
|
-
const axis = getAlignmentAxis(placement);
|
|
496
|
-
const length = getAxisLength(axis);
|
|
497
|
-
const arrowDimensions = await platform.getDimensions(element2);
|
|
498
|
-
const isYAxis = axis === "y";
|
|
499
|
-
const minProp = isYAxis ? "top" : "left";
|
|
500
|
-
const maxProp = isYAxis ? "bottom" : "right";
|
|
501
|
-
const clientProp = isYAxis ? "clientHeight" : "clientWidth";
|
|
502
|
-
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
503
|
-
const startDiff = coords[axis] - rects.reference[axis];
|
|
504
|
-
const arrowOffsetParent = await (platform.getOffsetParent == null ? undefined : platform.getOffsetParent(element2));
|
|
505
|
-
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
506
|
-
if (!clientSize || !await (platform.isElement == null ? undefined : platform.isElement(arrowOffsetParent))) {
|
|
507
|
-
clientSize = elements.floating[clientProp] || rects.floating[length];
|
|
508
|
-
}
|
|
509
|
-
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
510
|
-
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
511
|
-
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
512
|
-
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
513
|
-
const min$1 = minPadding;
|
|
514
|
-
const max2 = clientSize - arrowDimensions[length] - maxPadding;
|
|
515
|
-
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
516
|
-
const offset = clamp(min$1, center, max2);
|
|
517
|
-
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
518
|
-
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max2 : 0;
|
|
519
|
-
return {
|
|
520
|
-
[axis]: coords[axis] + alignmentOffset,
|
|
521
|
-
data: {
|
|
522
|
-
[axis]: offset,
|
|
523
|
-
centerOffset: center - offset - alignmentOffset,
|
|
524
|
-
...shouldAddOffset && {
|
|
525
|
-
alignmentOffset
|
|
526
|
-
}
|
|
527
|
-
},
|
|
528
|
-
reset: shouldAddOffset
|
|
529
|
-
};
|
|
530
|
-
}
|
|
531
|
-
}), autoPlacement = function(options) {
|
|
532
|
-
if (options === undefined) {
|
|
533
|
-
options = {};
|
|
534
|
-
}
|
|
535
|
-
return {
|
|
536
|
-
name: "autoPlacement",
|
|
537
|
-
options,
|
|
538
|
-
async fn(state4) {
|
|
539
|
-
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
|
|
540
|
-
const {
|
|
541
|
-
rects,
|
|
542
|
-
middlewareData,
|
|
543
|
-
placement,
|
|
544
|
-
platform,
|
|
545
|
-
elements
|
|
546
|
-
} = state4;
|
|
547
|
-
const {
|
|
548
|
-
crossAxis = false,
|
|
549
|
-
alignment,
|
|
550
|
-
allowedPlacements = placements,
|
|
551
|
-
autoAlignment = true,
|
|
552
|
-
...detectOverflowOptions
|
|
553
|
-
} = evaluate(options, state4);
|
|
554
|
-
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
555
|
-
const overflow = await platform.detectOverflow(state4, detectOverflowOptions);
|
|
556
|
-
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? undefined : _middlewareData$autoP.index) || 0;
|
|
557
|
-
const currentPlacement = placements$1[currentIndex];
|
|
558
|
-
if (currentPlacement == null) {
|
|
559
|
-
return {};
|
|
560
|
-
}
|
|
561
|
-
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating)));
|
|
562
|
-
if (placement !== currentPlacement) {
|
|
563
|
-
return {
|
|
564
|
-
reset: {
|
|
565
|
-
placement: placements$1[0]
|
|
566
|
-
}
|
|
567
|
-
};
|
|
568
|
-
}
|
|
569
|
-
const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
|
|
570
|
-
const allOverflows = [...((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? undefined : _middlewareData$autoP2.overflows) || [], {
|
|
571
|
-
placement: currentPlacement,
|
|
572
|
-
overflows: currentOverflows
|
|
573
|
-
}];
|
|
574
|
-
const nextPlacement = placements$1[currentIndex + 1];
|
|
575
|
-
if (nextPlacement) {
|
|
576
|
-
return {
|
|
577
|
-
data: {
|
|
578
|
-
index: currentIndex + 1,
|
|
579
|
-
overflows: allOverflows
|
|
580
|
-
},
|
|
581
|
-
reset: {
|
|
582
|
-
placement: nextPlacement
|
|
583
|
-
}
|
|
584
|
-
};
|
|
585
|
-
}
|
|
586
|
-
const placementsSortedByMostSpace = allOverflows.map((d) => {
|
|
587
|
-
const alignment2 = getAlignment(d.placement);
|
|
588
|
-
return [d.placement, alignment2 && crossAxis ? d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) : d.overflows[0], d.overflows];
|
|
589
|
-
}).sort((a, b) => a[1] - b[1]);
|
|
590
|
-
const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter((d) => d[2].slice(0, getAlignment(d[0]) ? 2 : 3).every((v) => v <= 0));
|
|
591
|
-
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? undefined : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
|
592
|
-
if (resetPlacement !== placement) {
|
|
593
|
-
return {
|
|
594
|
-
data: {
|
|
595
|
-
index: currentIndex + 1,
|
|
596
|
-
overflows: allOverflows
|
|
597
|
-
},
|
|
598
|
-
reset: {
|
|
599
|
-
placement: resetPlacement
|
|
600
|
-
}
|
|
601
|
-
};
|
|
602
|
-
}
|
|
603
|
-
return {};
|
|
604
|
-
}
|
|
605
|
-
};
|
|
606
|
-
}, flip = function(options) {
|
|
607
|
-
if (options === undefined) {
|
|
608
|
-
options = {};
|
|
609
|
-
}
|
|
610
|
-
return {
|
|
611
|
-
name: "flip",
|
|
612
|
-
options,
|
|
613
|
-
async fn(state4) {
|
|
614
|
-
var _middlewareData$arrow, _middlewareData$flip;
|
|
615
|
-
const {
|
|
616
|
-
placement,
|
|
617
|
-
middlewareData,
|
|
618
|
-
rects,
|
|
619
|
-
initialPlacement,
|
|
620
|
-
platform,
|
|
621
|
-
elements
|
|
622
|
-
} = state4;
|
|
623
|
-
const {
|
|
624
|
-
mainAxis: checkMainAxis = true,
|
|
625
|
-
crossAxis: checkCrossAxis = true,
|
|
626
|
-
fallbackPlacements: specifiedFallbackPlacements,
|
|
627
|
-
fallbackStrategy = "bestFit",
|
|
628
|
-
fallbackAxisSideDirection = "none",
|
|
629
|
-
flipAlignment = true,
|
|
630
|
-
...detectOverflowOptions
|
|
631
|
-
} = evaluate(options, state4);
|
|
632
|
-
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
633
|
-
return {};
|
|
634
|
-
}
|
|
635
|
-
const side = getSide(placement);
|
|
636
|
-
const initialSideAxis = getSideAxis(initialPlacement);
|
|
637
|
-
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
638
|
-
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating));
|
|
639
|
-
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
640
|
-
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
|
|
641
|
-
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
642
|
-
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
643
|
-
}
|
|
644
|
-
const placements2 = [initialPlacement, ...fallbackPlacements];
|
|
645
|
-
const overflow = await platform.detectOverflow(state4, detectOverflowOptions);
|
|
646
|
-
const overflows = [];
|
|
647
|
-
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? undefined : _middlewareData$flip.overflows) || [];
|
|
648
|
-
if (checkMainAxis) {
|
|
649
|
-
overflows.push(overflow[side]);
|
|
650
|
-
}
|
|
651
|
-
if (checkCrossAxis) {
|
|
652
|
-
const sides2 = getAlignmentSides(placement, rects, rtl);
|
|
653
|
-
overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
|
|
654
|
-
}
|
|
655
|
-
overflowsData = [...overflowsData, {
|
|
656
|
-
placement,
|
|
657
|
-
overflows
|
|
658
|
-
}];
|
|
659
|
-
if (!overflows.every((side2) => side2 <= 0)) {
|
|
660
|
-
var _middlewareData$flip2, _overflowsData$filter;
|
|
661
|
-
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? undefined : _middlewareData$flip2.index) || 0) + 1;
|
|
662
|
-
const nextPlacement = placements2[nextIndex];
|
|
663
|
-
if (nextPlacement) {
|
|
664
|
-
const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
665
|
-
if (!ignoreCrossAxisOverflow || overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
|
|
666
|
-
return {
|
|
667
|
-
data: {
|
|
668
|
-
index: nextIndex,
|
|
669
|
-
overflows: overflowsData
|
|
670
|
-
},
|
|
671
|
-
reset: {
|
|
672
|
-
placement: nextPlacement
|
|
673
|
-
}
|
|
674
|
-
};
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? undefined : _overflowsData$filter.placement;
|
|
678
|
-
if (!resetPlacement) {
|
|
679
|
-
switch (fallbackStrategy) {
|
|
680
|
-
case "bestFit": {
|
|
681
|
-
var _overflowsData$filter2;
|
|
682
|
-
const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
|
|
683
|
-
if (hasFallbackAxisSideDirection) {
|
|
684
|
-
const currentSideAxis = getSideAxis(d.placement);
|
|
685
|
-
return currentSideAxis === initialSideAxis || currentSideAxis === "y";
|
|
686
|
-
}
|
|
687
|
-
return true;
|
|
688
|
-
}).map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? undefined : _overflowsData$filter2[0];
|
|
689
|
-
if (placement2) {
|
|
690
|
-
resetPlacement = placement2;
|
|
691
|
-
}
|
|
692
|
-
break;
|
|
693
|
-
}
|
|
694
|
-
case "initialPlacement":
|
|
695
|
-
resetPlacement = initialPlacement;
|
|
696
|
-
break;
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
if (placement !== resetPlacement) {
|
|
700
|
-
return {
|
|
701
|
-
reset: {
|
|
702
|
-
placement: resetPlacement
|
|
703
|
-
}
|
|
704
|
-
};
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
return {};
|
|
708
|
-
}
|
|
709
|
-
};
|
|
710
|
-
}, hide = function(options) {
|
|
711
|
-
if (options === undefined) {
|
|
712
|
-
options = {};
|
|
713
|
-
}
|
|
714
|
-
return {
|
|
715
|
-
name: "hide",
|
|
716
|
-
options,
|
|
717
|
-
async fn(state4) {
|
|
718
|
-
const {
|
|
719
|
-
rects,
|
|
720
|
-
platform
|
|
721
|
-
} = state4;
|
|
722
|
-
const {
|
|
723
|
-
strategy = "referenceHidden",
|
|
724
|
-
...detectOverflowOptions
|
|
725
|
-
} = evaluate(options, state4);
|
|
726
|
-
switch (strategy) {
|
|
727
|
-
case "referenceHidden": {
|
|
728
|
-
const overflow = await platform.detectOverflow(state4, {
|
|
729
|
-
...detectOverflowOptions,
|
|
730
|
-
elementContext: "reference"
|
|
731
|
-
});
|
|
732
|
-
const offsets = getSideOffsets(overflow, rects.reference);
|
|
733
|
-
return {
|
|
734
|
-
data: {
|
|
735
|
-
referenceHiddenOffsets: offsets,
|
|
736
|
-
referenceHidden: isAnySideFullyClipped(offsets)
|
|
737
|
-
}
|
|
738
|
-
};
|
|
739
|
-
}
|
|
740
|
-
case "escaped": {
|
|
741
|
-
const overflow = await platform.detectOverflow(state4, {
|
|
742
|
-
...detectOverflowOptions,
|
|
743
|
-
altBoundary: true
|
|
744
|
-
});
|
|
745
|
-
const offsets = getSideOffsets(overflow, rects.floating);
|
|
746
|
-
return {
|
|
747
|
-
data: {
|
|
748
|
-
escapedOffsets: offsets,
|
|
749
|
-
escaped: isAnySideFullyClipped(offsets)
|
|
750
|
-
}
|
|
751
|
-
};
|
|
752
|
-
}
|
|
753
|
-
default: {
|
|
754
|
-
return {};
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
};
|
|
759
|
-
}, inline = function(options) {
|
|
760
|
-
if (options === undefined) {
|
|
761
|
-
options = {};
|
|
762
|
-
}
|
|
763
|
-
return {
|
|
764
|
-
name: "inline",
|
|
765
|
-
options,
|
|
766
|
-
async fn(state4) {
|
|
767
|
-
const {
|
|
768
|
-
placement,
|
|
769
|
-
elements,
|
|
770
|
-
rects,
|
|
771
|
-
platform,
|
|
772
|
-
strategy
|
|
773
|
-
} = state4;
|
|
774
|
-
const {
|
|
775
|
-
padding = 2,
|
|
776
|
-
x,
|
|
777
|
-
y
|
|
778
|
-
} = evaluate(options, state4);
|
|
779
|
-
const nativeClientRects = Array.from(await (platform.getClientRects == null ? undefined : platform.getClientRects(elements.reference)) || []);
|
|
780
|
-
const clientRects = getRectsByLine(nativeClientRects);
|
|
781
|
-
const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
|
|
782
|
-
const paddingObject = getPaddingObject(padding);
|
|
783
|
-
function getBoundingClientRect() {
|
|
784
|
-
if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
|
|
785
|
-
return clientRects.find((rect) => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
|
|
786
|
-
}
|
|
787
|
-
if (clientRects.length >= 2) {
|
|
788
|
-
if (getSideAxis(placement) === "y") {
|
|
789
|
-
const firstRect = clientRects[0];
|
|
790
|
-
const lastRect = clientRects[clientRects.length - 1];
|
|
791
|
-
const isTop = getSide(placement) === "top";
|
|
792
|
-
const top2 = firstRect.top;
|
|
793
|
-
const bottom2 = lastRect.bottom;
|
|
794
|
-
const left2 = isTop ? firstRect.left : lastRect.left;
|
|
795
|
-
const right2 = isTop ? firstRect.right : lastRect.right;
|
|
796
|
-
const width2 = right2 - left2;
|
|
797
|
-
const height2 = bottom2 - top2;
|
|
798
|
-
return {
|
|
799
|
-
top: top2,
|
|
800
|
-
bottom: bottom2,
|
|
801
|
-
left: left2,
|
|
802
|
-
right: right2,
|
|
803
|
-
width: width2,
|
|
804
|
-
height: height2,
|
|
805
|
-
x: left2,
|
|
806
|
-
y: top2
|
|
807
|
-
};
|
|
808
|
-
}
|
|
809
|
-
const isLeftSide = getSide(placement) === "left";
|
|
810
|
-
const maxRight = max(...clientRects.map((rect) => rect.right));
|
|
811
|
-
const minLeft = min(...clientRects.map((rect) => rect.left));
|
|
812
|
-
const measureRects = clientRects.filter((rect) => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
|
|
813
|
-
const top = measureRects[0].top;
|
|
814
|
-
const bottom = measureRects[measureRects.length - 1].bottom;
|
|
815
|
-
const left = minLeft;
|
|
816
|
-
const right = maxRight;
|
|
817
|
-
const width = right - left;
|
|
818
|
-
const height = bottom - top;
|
|
819
|
-
return {
|
|
820
|
-
top,
|
|
821
|
-
bottom,
|
|
822
|
-
left,
|
|
823
|
-
right,
|
|
824
|
-
width,
|
|
825
|
-
height,
|
|
826
|
-
x: left,
|
|
827
|
-
y: top
|
|
828
|
-
};
|
|
829
|
-
}
|
|
830
|
-
return fallback;
|
|
831
|
-
}
|
|
832
|
-
const resetRects = await platform.getElementRects({
|
|
833
|
-
reference: {
|
|
834
|
-
getBoundingClientRect
|
|
835
|
-
},
|
|
836
|
-
floating: elements.floating,
|
|
837
|
-
strategy
|
|
838
|
-
});
|
|
839
|
-
if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {
|
|
840
|
-
return {
|
|
841
|
-
reset: {
|
|
842
|
-
rects: resetRects
|
|
843
|
-
}
|
|
844
|
-
};
|
|
845
|
-
}
|
|
846
|
-
return {};
|
|
847
|
-
}
|
|
848
|
-
};
|
|
849
|
-
}, originSides, offset = function(options) {
|
|
850
|
-
if (options === undefined) {
|
|
851
|
-
options = 0;
|
|
852
|
-
}
|
|
853
|
-
return {
|
|
854
|
-
name: "offset",
|
|
855
|
-
options,
|
|
856
|
-
async fn(state4) {
|
|
857
|
-
var _middlewareData$offse, _middlewareData$arrow;
|
|
858
|
-
const {
|
|
859
|
-
x,
|
|
860
|
-
y,
|
|
861
|
-
placement,
|
|
862
|
-
middlewareData
|
|
863
|
-
} = state4;
|
|
864
|
-
const diffCoords = await convertValueToCoords(state4, options);
|
|
865
|
-
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? undefined : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
866
|
-
return {};
|
|
867
|
-
}
|
|
868
|
-
return {
|
|
869
|
-
x: x + diffCoords.x,
|
|
870
|
-
y: y + diffCoords.y,
|
|
871
|
-
data: {
|
|
872
|
-
...diffCoords,
|
|
873
|
-
placement
|
|
874
|
-
}
|
|
875
|
-
};
|
|
876
|
-
}
|
|
877
|
-
};
|
|
878
|
-
}, shift = function(options) {
|
|
879
|
-
if (options === undefined) {
|
|
880
|
-
options = {};
|
|
881
|
-
}
|
|
882
|
-
return {
|
|
883
|
-
name: "shift",
|
|
884
|
-
options,
|
|
885
|
-
async fn(state4) {
|
|
886
|
-
const {
|
|
887
|
-
x,
|
|
888
|
-
y,
|
|
889
|
-
placement,
|
|
890
|
-
platform
|
|
891
|
-
} = state4;
|
|
892
|
-
const {
|
|
893
|
-
mainAxis: checkMainAxis = true,
|
|
894
|
-
crossAxis: checkCrossAxis = false,
|
|
895
|
-
limiter = {
|
|
896
|
-
fn: (_ref) => {
|
|
897
|
-
let {
|
|
898
|
-
x: x2,
|
|
899
|
-
y: y2
|
|
900
|
-
} = _ref;
|
|
901
|
-
return {
|
|
902
|
-
x: x2,
|
|
903
|
-
y: y2
|
|
904
|
-
};
|
|
905
|
-
}
|
|
906
|
-
},
|
|
907
|
-
...detectOverflowOptions
|
|
908
|
-
} = evaluate(options, state4);
|
|
909
|
-
const coords = {
|
|
910
|
-
x,
|
|
911
|
-
y
|
|
912
|
-
};
|
|
913
|
-
const overflow = await platform.detectOverflow(state4, detectOverflowOptions);
|
|
914
|
-
const crossAxis = getSideAxis(getSide(placement));
|
|
915
|
-
const mainAxis = getOppositeAxis(crossAxis);
|
|
916
|
-
let mainAxisCoord = coords[mainAxis];
|
|
917
|
-
let crossAxisCoord = coords[crossAxis];
|
|
918
|
-
if (checkMainAxis) {
|
|
919
|
-
const minSide = mainAxis === "y" ? "top" : "left";
|
|
920
|
-
const maxSide = mainAxis === "y" ? "bottom" : "right";
|
|
921
|
-
const min2 = mainAxisCoord + overflow[minSide];
|
|
922
|
-
const max2 = mainAxisCoord - overflow[maxSide];
|
|
923
|
-
mainAxisCoord = clamp(min2, mainAxisCoord, max2);
|
|
924
|
-
}
|
|
925
|
-
if (checkCrossAxis) {
|
|
926
|
-
const minSide = crossAxis === "y" ? "top" : "left";
|
|
927
|
-
const maxSide = crossAxis === "y" ? "bottom" : "right";
|
|
928
|
-
const min2 = crossAxisCoord + overflow[minSide];
|
|
929
|
-
const max2 = crossAxisCoord - overflow[maxSide];
|
|
930
|
-
crossAxisCoord = clamp(min2, crossAxisCoord, max2);
|
|
931
|
-
}
|
|
932
|
-
const limitedCoords = limiter.fn({
|
|
933
|
-
...state4,
|
|
934
|
-
[mainAxis]: mainAxisCoord,
|
|
935
|
-
[crossAxis]: crossAxisCoord
|
|
936
|
-
});
|
|
937
|
-
return {
|
|
938
|
-
...limitedCoords,
|
|
939
|
-
data: {
|
|
940
|
-
x: limitedCoords.x - x,
|
|
941
|
-
y: limitedCoords.y - y,
|
|
942
|
-
enabled: {
|
|
943
|
-
[mainAxis]: checkMainAxis,
|
|
944
|
-
[crossAxis]: checkCrossAxis
|
|
945
|
-
}
|
|
946
|
-
}
|
|
947
|
-
};
|
|
948
|
-
}
|
|
949
|
-
};
|
|
950
|
-
}, limitShift = function(options) {
|
|
951
|
-
if (options === undefined) {
|
|
952
|
-
options = {};
|
|
953
|
-
}
|
|
954
|
-
return {
|
|
955
|
-
options,
|
|
956
|
-
fn(state4) {
|
|
957
|
-
const {
|
|
958
|
-
x,
|
|
959
|
-
y,
|
|
960
|
-
placement,
|
|
961
|
-
rects,
|
|
962
|
-
middlewareData
|
|
963
|
-
} = state4;
|
|
964
|
-
const {
|
|
965
|
-
offset: offset2 = 0,
|
|
966
|
-
mainAxis: checkMainAxis = true,
|
|
967
|
-
crossAxis: checkCrossAxis = true
|
|
968
|
-
} = evaluate(options, state4);
|
|
969
|
-
const coords = {
|
|
970
|
-
x,
|
|
971
|
-
y
|
|
972
|
-
};
|
|
973
|
-
const crossAxis = getSideAxis(placement);
|
|
974
|
-
const mainAxis = getOppositeAxis(crossAxis);
|
|
975
|
-
let mainAxisCoord = coords[mainAxis];
|
|
976
|
-
let crossAxisCoord = coords[crossAxis];
|
|
977
|
-
const rawOffset = evaluate(offset2, state4);
|
|
978
|
-
const computedOffset = typeof rawOffset === "number" ? {
|
|
979
|
-
mainAxis: rawOffset,
|
|
980
|
-
crossAxis: 0
|
|
981
|
-
} : {
|
|
982
|
-
mainAxis: 0,
|
|
983
|
-
crossAxis: 0,
|
|
984
|
-
...rawOffset
|
|
985
|
-
};
|
|
986
|
-
if (checkMainAxis) {
|
|
987
|
-
const len = mainAxis === "y" ? "height" : "width";
|
|
988
|
-
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
|
|
989
|
-
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
|
|
990
|
-
if (mainAxisCoord < limitMin) {
|
|
991
|
-
mainAxisCoord = limitMin;
|
|
992
|
-
} else if (mainAxisCoord > limitMax) {
|
|
993
|
-
mainAxisCoord = limitMax;
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
if (checkCrossAxis) {
|
|
997
|
-
var _middlewareData$offse, _middlewareData$offse2;
|
|
998
|
-
const len = mainAxis === "y" ? "width" : "height";
|
|
999
|
-
const isOriginSide = originSides.has(getSide(placement));
|
|
1000
|
-
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? undefined : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
|
|
1001
|
-
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? undefined : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
|
|
1002
|
-
if (crossAxisCoord < limitMin) {
|
|
1003
|
-
crossAxisCoord = limitMin;
|
|
1004
|
-
} else if (crossAxisCoord > limitMax) {
|
|
1005
|
-
crossAxisCoord = limitMax;
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
return {
|
|
1009
|
-
[mainAxis]: mainAxisCoord,
|
|
1010
|
-
[crossAxis]: crossAxisCoord
|
|
1011
|
-
};
|
|
1012
|
-
}
|
|
1013
|
-
};
|
|
1014
|
-
}, size = function(options) {
|
|
1015
|
-
if (options === undefined) {
|
|
1016
|
-
options = {};
|
|
1017
|
-
}
|
|
1018
|
-
return {
|
|
1019
|
-
name: "size",
|
|
1020
|
-
options,
|
|
1021
|
-
async fn(state4) {
|
|
1022
|
-
var _state$middlewareData, _state$middlewareData2;
|
|
1023
|
-
const {
|
|
1024
|
-
placement,
|
|
1025
|
-
rects,
|
|
1026
|
-
platform,
|
|
1027
|
-
elements
|
|
1028
|
-
} = state4;
|
|
1029
|
-
const {
|
|
1030
|
-
apply = () => {},
|
|
1031
|
-
...detectOverflowOptions
|
|
1032
|
-
} = evaluate(options, state4);
|
|
1033
|
-
const overflow = await platform.detectOverflow(state4, detectOverflowOptions);
|
|
1034
|
-
const side = getSide(placement);
|
|
1035
|
-
const alignment = getAlignment(placement);
|
|
1036
|
-
const isYAxis = getSideAxis(placement) === "y";
|
|
1037
|
-
const {
|
|
1038
|
-
width,
|
|
1039
|
-
height
|
|
1040
|
-
} = rects.floating;
|
|
1041
|
-
let heightSide;
|
|
1042
|
-
let widthSide;
|
|
1043
|
-
if (side === "top" || side === "bottom") {
|
|
1044
|
-
heightSide = side;
|
|
1045
|
-
widthSide = alignment === (await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
|
|
1046
|
-
} else {
|
|
1047
|
-
widthSide = side;
|
|
1048
|
-
heightSide = alignment === "end" ? "top" : "bottom";
|
|
1049
|
-
}
|
|
1050
|
-
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
1051
|
-
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
1052
|
-
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
1053
|
-
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
1054
|
-
const noShift = !state4.middlewareData.shift;
|
|
1055
|
-
let availableHeight = overflowAvailableHeight;
|
|
1056
|
-
let availableWidth = overflowAvailableWidth;
|
|
1057
|
-
if ((_state$middlewareData = state4.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
|
|
1058
|
-
availableWidth = maximumClippingWidth;
|
|
1059
|
-
}
|
|
1060
|
-
if ((_state$middlewareData2 = state4.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
|
|
1061
|
-
availableHeight = maximumClippingHeight;
|
|
1062
|
-
}
|
|
1063
|
-
if (noShift && !alignment) {
|
|
1064
|
-
const xMin = max(overflow.left, 0);
|
|
1065
|
-
const xMax = max(overflow.right, 0);
|
|
1066
|
-
const yMin = max(overflow.top, 0);
|
|
1067
|
-
const yMax = max(overflow.bottom, 0);
|
|
1068
|
-
if (isYAxis) {
|
|
1069
|
-
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
|
|
1070
|
-
} else {
|
|
1071
|
-
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
await apply({
|
|
1075
|
-
...state4,
|
|
1076
|
-
availableWidth,
|
|
1077
|
-
availableHeight
|
|
1078
|
-
});
|
|
1079
|
-
const nextDimensions = await platform.getDimensions(elements.floating);
|
|
1080
|
-
if (width !== nextDimensions.width || height !== nextDimensions.height) {
|
|
1081
|
-
return {
|
|
1082
|
-
reset: {
|
|
1083
|
-
rects: true
|
|
1084
|
-
}
|
|
1085
|
-
};
|
|
1086
|
-
}
|
|
1087
|
-
return {};
|
|
1088
|
-
}
|
|
1089
|
-
};
|
|
1090
|
-
};
|
|
1091
|
-
var init_floating_ui_core = __esm(() => {
|
|
1092
|
-
init_floating_ui_utils();
|
|
1093
|
-
init_floating_ui_utils();
|
|
1094
|
-
originSides = /* @__PURE__ */ new Set(["left", "top"]);
|
|
1095
|
-
});
|
|
1096
|
-
|
|
1097
|
-
// ../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
1098
|
-
function hasWindow() {
|
|
1099
|
-
return typeof window !== "undefined";
|
|
1100
|
-
}
|
|
1101
|
-
function getNodeName(node) {
|
|
1102
|
-
if (isNode(node)) {
|
|
1103
|
-
return (node.nodeName || "").toLowerCase();
|
|
1104
|
-
}
|
|
1105
|
-
return "#document";
|
|
1106
|
-
}
|
|
1107
|
-
function getWindow(node) {
|
|
1108
|
-
var _node$ownerDocument;
|
|
1109
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? undefined : _node$ownerDocument.defaultView) || window;
|
|
1110
|
-
}
|
|
1111
|
-
function getDocumentElement(node) {
|
|
1112
|
-
var _ref;
|
|
1113
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? undefined : _ref.documentElement;
|
|
1114
|
-
}
|
|
1115
|
-
function isNode(value) {
|
|
1116
|
-
if (!hasWindow()) {
|
|
1117
|
-
return false;
|
|
1118
|
-
}
|
|
1119
|
-
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
1120
|
-
}
|
|
1121
|
-
function isElement(value) {
|
|
1122
|
-
if (!hasWindow()) {
|
|
1123
|
-
return false;
|
|
1124
|
-
}
|
|
1125
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
1126
|
-
}
|
|
1127
|
-
function isHTMLElement(value) {
|
|
1128
|
-
if (!hasWindow()) {
|
|
1129
|
-
return false;
|
|
1130
|
-
}
|
|
1131
|
-
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
1132
|
-
}
|
|
1133
|
-
function isShadowRoot(value) {
|
|
1134
|
-
if (!hasWindow() || typeof ShadowRoot === "undefined") {
|
|
1135
|
-
return false;
|
|
1136
|
-
}
|
|
1137
|
-
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
1138
|
-
}
|
|
1139
|
-
function isOverflowElement(element2) {
|
|
1140
|
-
const {
|
|
1141
|
-
overflow,
|
|
1142
|
-
overflowX,
|
|
1143
|
-
overflowY,
|
|
1144
|
-
display
|
|
1145
|
-
} = getComputedStyle2(element2);
|
|
1146
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
|
|
1147
|
-
}
|
|
1148
|
-
function isTableElement(element2) {
|
|
1149
|
-
return /^(table|td|th)$/.test(getNodeName(element2));
|
|
1150
|
-
}
|
|
1151
|
-
function isTopLayer(element2) {
|
|
1152
|
-
try {
|
|
1153
|
-
if (element2.matches(":popover-open")) {
|
|
1154
|
-
return true;
|
|
1155
|
-
}
|
|
1156
|
-
} catch (_e) {}
|
|
1157
|
-
try {
|
|
1158
|
-
return element2.matches(":modal");
|
|
1159
|
-
} catch (_e) {
|
|
1160
|
-
return false;
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
function isContainingBlock(elementOrCss) {
|
|
1164
|
-
const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
|
|
1165
|
-
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
|
|
1166
|
-
}
|
|
1167
|
-
function getContainingBlock(element2) {
|
|
1168
|
-
let currentNode = getParentNode(element2);
|
|
1169
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1170
|
-
if (isContainingBlock(currentNode)) {
|
|
1171
|
-
return currentNode;
|
|
1172
|
-
} else if (isTopLayer(currentNode)) {
|
|
1173
|
-
return null;
|
|
1174
|
-
}
|
|
1175
|
-
currentNode = getParentNode(currentNode);
|
|
1176
|
-
}
|
|
1177
|
-
return null;
|
|
1178
|
-
}
|
|
1179
|
-
function isWebKit() {
|
|
1180
|
-
if (isWebKitValue == null) {
|
|
1181
|
-
isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
|
|
1182
|
-
}
|
|
1183
|
-
return isWebKitValue;
|
|
1184
|
-
}
|
|
1185
|
-
function isLastTraversableNode(node) {
|
|
1186
|
-
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
1187
|
-
}
|
|
1188
|
-
function getComputedStyle2(element2) {
|
|
1189
|
-
return getWindow(element2).getComputedStyle(element2);
|
|
1190
|
-
}
|
|
1191
|
-
function getNodeScroll(element2) {
|
|
1192
|
-
if (isElement(element2)) {
|
|
1193
|
-
return {
|
|
1194
|
-
scrollLeft: element2.scrollLeft,
|
|
1195
|
-
scrollTop: element2.scrollTop
|
|
1196
|
-
};
|
|
1197
|
-
}
|
|
1198
|
-
return {
|
|
1199
|
-
scrollLeft: element2.scrollX,
|
|
1200
|
-
scrollTop: element2.scrollY
|
|
1201
|
-
};
|
|
1202
|
-
}
|
|
1203
|
-
function getParentNode(node) {
|
|
1204
|
-
if (getNodeName(node) === "html") {
|
|
1205
|
-
return node;
|
|
1206
|
-
}
|
|
1207
|
-
const result = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
|
|
1208
|
-
return isShadowRoot(result) ? result.host : result;
|
|
1209
|
-
}
|
|
1210
|
-
function getNearestOverflowAncestor(node) {
|
|
1211
|
-
const parentNode = getParentNode(node);
|
|
1212
|
-
if (isLastTraversableNode(parentNode)) {
|
|
1213
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
1214
|
-
}
|
|
1215
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
1216
|
-
return parentNode;
|
|
1217
|
-
}
|
|
1218
|
-
return getNearestOverflowAncestor(parentNode);
|
|
1219
|
-
}
|
|
1220
|
-
function getOverflowAncestors(node, list, traverseIframes) {
|
|
1221
|
-
var _node$ownerDocument2;
|
|
1222
|
-
if (list === undefined) {
|
|
1223
|
-
list = [];
|
|
1224
|
-
}
|
|
1225
|
-
if (traverseIframes === undefined) {
|
|
1226
|
-
traverseIframes = true;
|
|
1227
|
-
}
|
|
1228
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1229
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? undefined : _node$ownerDocument2.body);
|
|
1230
|
-
const win = getWindow(scrollableAncestor);
|
|
1231
|
-
if (isBody) {
|
|
1232
|
-
const frameElement = getFrameElement(win);
|
|
1233
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
1234
|
-
} else {
|
|
1235
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
function getFrameElement(win) {
|
|
1239
|
-
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
1240
|
-
}
|
|
1241
|
-
var willChangeRe, containRe, isNotNone = (value) => !!value && value !== "none", isWebKitValue;
|
|
1242
|
-
var init_floating_ui_utils_dom = __esm(() => {
|
|
1243
|
-
willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
1244
|
-
containRe = /paint|layout|strict|content/;
|
|
1245
|
-
});
|
|
1246
|
-
|
|
1247
|
-
// ../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
1248
|
-
var exports_floating_ui_dom = {};
|
|
1249
|
-
__export(exports_floating_ui_dom, {
|
|
1250
|
-
size: () => size2,
|
|
1251
|
-
shift: () => shift2,
|
|
1252
|
-
platform: () => platform,
|
|
1253
|
-
offset: () => offset2,
|
|
1254
|
-
limitShift: () => limitShift2,
|
|
1255
|
-
inline: () => inline2,
|
|
1256
|
-
hide: () => hide2,
|
|
1257
|
-
getOverflowAncestors: () => getOverflowAncestors,
|
|
1258
|
-
flip: () => flip2,
|
|
1259
|
-
detectOverflow: () => detectOverflow2,
|
|
1260
|
-
computePosition: () => computePosition2,
|
|
1261
|
-
autoUpdate: () => autoUpdate,
|
|
1262
|
-
autoPlacement: () => autoPlacement2,
|
|
1263
|
-
arrow: () => arrow2
|
|
1264
|
-
});
|
|
1265
|
-
function getCssDimensions(element2) {
|
|
1266
|
-
const css = getComputedStyle2(element2);
|
|
1267
|
-
let width = parseFloat(css.width) || 0;
|
|
1268
|
-
let height = parseFloat(css.height) || 0;
|
|
1269
|
-
const hasOffset = isHTMLElement(element2);
|
|
1270
|
-
const offsetWidth = hasOffset ? element2.offsetWidth : width;
|
|
1271
|
-
const offsetHeight = hasOffset ? element2.offsetHeight : height;
|
|
1272
|
-
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
1273
|
-
if (shouldFallback) {
|
|
1274
|
-
width = offsetWidth;
|
|
1275
|
-
height = offsetHeight;
|
|
1276
|
-
}
|
|
1277
|
-
return {
|
|
1278
|
-
width,
|
|
1279
|
-
height,
|
|
1280
|
-
$: shouldFallback
|
|
1281
|
-
};
|
|
1282
|
-
}
|
|
1283
|
-
function unwrapElement(element2) {
|
|
1284
|
-
return !isElement(element2) ? element2.contextElement : element2;
|
|
1285
|
-
}
|
|
1286
|
-
function getScale(element2) {
|
|
1287
|
-
const domElement = unwrapElement(element2);
|
|
1288
|
-
if (!isHTMLElement(domElement)) {
|
|
1289
|
-
return createCoords(1);
|
|
1290
|
-
}
|
|
1291
|
-
const rect = domElement.getBoundingClientRect();
|
|
1292
|
-
const {
|
|
1293
|
-
width,
|
|
1294
|
-
height,
|
|
1295
|
-
$: $7
|
|
1296
|
-
} = getCssDimensions(domElement);
|
|
1297
|
-
let x = ($7 ? round(rect.width) : rect.width) / width;
|
|
1298
|
-
let y = ($7 ? round(rect.height) : rect.height) / height;
|
|
1299
|
-
if (!x || !Number.isFinite(x)) {
|
|
1300
|
-
x = 1;
|
|
1301
|
-
}
|
|
1302
|
-
if (!y || !Number.isFinite(y)) {
|
|
1303
|
-
y = 1;
|
|
1304
|
-
}
|
|
1305
|
-
return {
|
|
1306
|
-
x,
|
|
1307
|
-
y
|
|
1308
|
-
};
|
|
1309
|
-
}
|
|
1310
|
-
function getVisualOffsets(element2) {
|
|
1311
|
-
const win = getWindow(element2);
|
|
1312
|
-
if (!isWebKit() || !win.visualViewport) {
|
|
1313
|
-
return noOffsets;
|
|
1314
|
-
}
|
|
1315
|
-
return {
|
|
1316
|
-
x: win.visualViewport.offsetLeft,
|
|
1317
|
-
y: win.visualViewport.offsetTop
|
|
1318
|
-
};
|
|
1319
|
-
}
|
|
1320
|
-
function shouldAddVisualOffsets(element2, isFixed, floatingOffsetParent) {
|
|
1321
|
-
if (isFixed === undefined) {
|
|
1322
|
-
isFixed = false;
|
|
1323
|
-
}
|
|
1324
|
-
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element2)) {
|
|
1325
|
-
return false;
|
|
1326
|
-
}
|
|
1327
|
-
return isFixed;
|
|
1328
|
-
}
|
|
1329
|
-
function getBoundingClientRect(element2, includeScale, isFixedStrategy, offsetParent) {
|
|
1330
|
-
if (includeScale === undefined) {
|
|
1331
|
-
includeScale = false;
|
|
1332
|
-
}
|
|
1333
|
-
if (isFixedStrategy === undefined) {
|
|
1334
|
-
isFixedStrategy = false;
|
|
1335
|
-
}
|
|
1336
|
-
const clientRect = element2.getBoundingClientRect();
|
|
1337
|
-
const domElement = unwrapElement(element2);
|
|
1338
|
-
let scale = createCoords(1);
|
|
1339
|
-
if (includeScale) {
|
|
1340
|
-
if (offsetParent) {
|
|
1341
|
-
if (isElement(offsetParent)) {
|
|
1342
|
-
scale = getScale(offsetParent);
|
|
1343
|
-
}
|
|
1344
|
-
} else {
|
|
1345
|
-
scale = getScale(element2);
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
1349
|
-
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
1350
|
-
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
1351
|
-
let width = clientRect.width / scale.x;
|
|
1352
|
-
let height = clientRect.height / scale.y;
|
|
1353
|
-
if (domElement) {
|
|
1354
|
-
const win = getWindow(domElement);
|
|
1355
|
-
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
1356
|
-
let currentWin = win;
|
|
1357
|
-
let currentIFrame = getFrameElement(currentWin);
|
|
1358
|
-
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
1359
|
-
const iframeScale = getScale(currentIFrame);
|
|
1360
|
-
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
1361
|
-
const css = getComputedStyle2(currentIFrame);
|
|
1362
|
-
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
1363
|
-
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
1364
|
-
x *= iframeScale.x;
|
|
1365
|
-
y *= iframeScale.y;
|
|
1366
|
-
width *= iframeScale.x;
|
|
1367
|
-
height *= iframeScale.y;
|
|
1368
|
-
x += left;
|
|
1369
|
-
y += top;
|
|
1370
|
-
currentWin = getWindow(currentIFrame);
|
|
1371
|
-
currentIFrame = getFrameElement(currentWin);
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
return rectToClientRect({
|
|
1375
|
-
width,
|
|
1376
|
-
height,
|
|
1377
|
-
x,
|
|
1378
|
-
y
|
|
1379
|
-
});
|
|
1380
|
-
}
|
|
1381
|
-
function getWindowScrollBarX(element2, rect) {
|
|
1382
|
-
const leftScroll = getNodeScroll(element2).scrollLeft;
|
|
1383
|
-
if (!rect) {
|
|
1384
|
-
return getBoundingClientRect(getDocumentElement(element2)).left + leftScroll;
|
|
1385
|
-
}
|
|
1386
|
-
return rect.left + leftScroll;
|
|
1387
|
-
}
|
|
1388
|
-
function getHTMLOffset(documentElement, scroll) {
|
|
1389
|
-
const htmlRect = documentElement.getBoundingClientRect();
|
|
1390
|
-
const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
|
|
1391
|
-
const y = htmlRect.top + scroll.scrollTop;
|
|
1392
|
-
return {
|
|
1393
|
-
x,
|
|
1394
|
-
y
|
|
1395
|
-
};
|
|
1396
|
-
}
|
|
1397
|
-
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
1398
|
-
let {
|
|
1399
|
-
elements,
|
|
1400
|
-
rect,
|
|
1401
|
-
offsetParent,
|
|
1402
|
-
strategy
|
|
1403
|
-
} = _ref;
|
|
1404
|
-
const isFixed = strategy === "fixed";
|
|
1405
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
1406
|
-
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
|
1407
|
-
if (offsetParent === documentElement || topLayer && isFixed) {
|
|
1408
|
-
return rect;
|
|
1409
|
-
}
|
|
1410
|
-
let scroll = {
|
|
1411
|
-
scrollLeft: 0,
|
|
1412
|
-
scrollTop: 0
|
|
1413
|
-
};
|
|
1414
|
-
let scale = createCoords(1);
|
|
1415
|
-
const offsets = createCoords(0);
|
|
1416
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1417
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1418
|
-
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
1419
|
-
scroll = getNodeScroll(offsetParent);
|
|
1420
|
-
}
|
|
1421
|
-
if (isOffsetParentAnElement) {
|
|
1422
|
-
const offsetRect = getBoundingClientRect(offsetParent);
|
|
1423
|
-
scale = getScale(offsetParent);
|
|
1424
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1425
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1426
|
-
}
|
|
1427
|
-
}
|
|
1428
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1429
|
-
return {
|
|
1430
|
-
width: rect.width * scale.x,
|
|
1431
|
-
height: rect.height * scale.y,
|
|
1432
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
1433
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
1434
|
-
};
|
|
1435
|
-
}
|
|
1436
|
-
function getClientRects(element2) {
|
|
1437
|
-
return Array.from(element2.getClientRects());
|
|
1438
|
-
}
|
|
1439
|
-
function getDocumentRect(element2) {
|
|
1440
|
-
const html = getDocumentElement(element2);
|
|
1441
|
-
const scroll = getNodeScroll(element2);
|
|
1442
|
-
const body = element2.ownerDocument.body;
|
|
1443
|
-
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
1444
|
-
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
1445
|
-
let x = -scroll.scrollLeft + getWindowScrollBarX(element2);
|
|
1446
|
-
const y = -scroll.scrollTop;
|
|
1447
|
-
if (getComputedStyle2(body).direction === "rtl") {
|
|
1448
|
-
x += max(html.clientWidth, body.clientWidth) - width;
|
|
1449
|
-
}
|
|
1450
|
-
return {
|
|
1451
|
-
width,
|
|
1452
|
-
height,
|
|
1453
|
-
x,
|
|
1454
|
-
y
|
|
1455
|
-
};
|
|
1456
|
-
}
|
|
1457
|
-
function getViewportRect(element2, strategy) {
|
|
1458
|
-
const win = getWindow(element2);
|
|
1459
|
-
const html = getDocumentElement(element2);
|
|
1460
|
-
const visualViewport = win.visualViewport;
|
|
1461
|
-
let width = html.clientWidth;
|
|
1462
|
-
let height = html.clientHeight;
|
|
1463
|
-
let x = 0;
|
|
1464
|
-
let y = 0;
|
|
1465
|
-
if (visualViewport) {
|
|
1466
|
-
width = visualViewport.width;
|
|
1467
|
-
height = visualViewport.height;
|
|
1468
|
-
const visualViewportBased = isWebKit();
|
|
1469
|
-
if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
|
|
1470
|
-
x = visualViewport.offsetLeft;
|
|
1471
|
-
y = visualViewport.offsetTop;
|
|
1472
|
-
}
|
|
1473
|
-
}
|
|
1474
|
-
const windowScrollbarX = getWindowScrollBarX(html);
|
|
1475
|
-
if (windowScrollbarX <= 0) {
|
|
1476
|
-
const doc = html.ownerDocument;
|
|
1477
|
-
const body = doc.body;
|
|
1478
|
-
const bodyStyles = getComputedStyle(body);
|
|
1479
|
-
const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
1480
|
-
const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
1481
|
-
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
|
|
1482
|
-
width -= clippingStableScrollbarWidth;
|
|
1483
|
-
}
|
|
1484
|
-
} else if (windowScrollbarX <= SCROLLBAR_MAX) {
|
|
1485
|
-
width += windowScrollbarX;
|
|
1486
|
-
}
|
|
1487
|
-
return {
|
|
1488
|
-
width,
|
|
1489
|
-
height,
|
|
1490
|
-
x,
|
|
1491
|
-
y
|
|
1492
|
-
};
|
|
1493
|
-
}
|
|
1494
|
-
function getInnerBoundingClientRect(element2, strategy) {
|
|
1495
|
-
const clientRect = getBoundingClientRect(element2, true, strategy === "fixed");
|
|
1496
|
-
const top = clientRect.top + element2.clientTop;
|
|
1497
|
-
const left = clientRect.left + element2.clientLeft;
|
|
1498
|
-
const scale = isHTMLElement(element2) ? getScale(element2) : createCoords(1);
|
|
1499
|
-
const width = element2.clientWidth * scale.x;
|
|
1500
|
-
const height = element2.clientHeight * scale.y;
|
|
1501
|
-
const x = left * scale.x;
|
|
1502
|
-
const y = top * scale.y;
|
|
1503
|
-
return {
|
|
1504
|
-
width,
|
|
1505
|
-
height,
|
|
1506
|
-
x,
|
|
1507
|
-
y
|
|
1508
|
-
};
|
|
1509
|
-
}
|
|
1510
|
-
function getClientRectFromClippingAncestor(element2, clippingAncestor, strategy) {
|
|
1511
|
-
let rect;
|
|
1512
|
-
if (clippingAncestor === "viewport") {
|
|
1513
|
-
rect = getViewportRect(element2, strategy);
|
|
1514
|
-
} else if (clippingAncestor === "document") {
|
|
1515
|
-
rect = getDocumentRect(getDocumentElement(element2));
|
|
1516
|
-
} else if (isElement(clippingAncestor)) {
|
|
1517
|
-
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
1518
|
-
} else {
|
|
1519
|
-
const visualOffsets = getVisualOffsets(element2);
|
|
1520
|
-
rect = {
|
|
1521
|
-
x: clippingAncestor.x - visualOffsets.x,
|
|
1522
|
-
y: clippingAncestor.y - visualOffsets.y,
|
|
1523
|
-
width: clippingAncestor.width,
|
|
1524
|
-
height: clippingAncestor.height
|
|
1525
|
-
};
|
|
1526
|
-
}
|
|
1527
|
-
return rectToClientRect(rect);
|
|
1528
|
-
}
|
|
1529
|
-
function hasFixedPositionAncestor(element2, stopNode) {
|
|
1530
|
-
const parentNode = getParentNode(element2);
|
|
1531
|
-
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
1532
|
-
return false;
|
|
1533
|
-
}
|
|
1534
|
-
return getComputedStyle2(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
|
|
1535
|
-
}
|
|
1536
|
-
function getClippingElementAncestors(element2, cache) {
|
|
1537
|
-
const cachedResult = cache.get(element2);
|
|
1538
|
-
if (cachedResult) {
|
|
1539
|
-
return cachedResult;
|
|
1540
|
-
}
|
|
1541
|
-
let result = getOverflowAncestors(element2, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
|
|
1542
|
-
let currentContainingBlockComputedStyle = null;
|
|
1543
|
-
const elementIsFixed = getComputedStyle2(element2).position === "fixed";
|
|
1544
|
-
let currentNode = elementIsFixed ? getParentNode(element2) : element2;
|
|
1545
|
-
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1546
|
-
const computedStyle = getComputedStyle2(currentNode);
|
|
1547
|
-
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
1548
|
-
if (!currentNodeIsContaining && computedStyle.position === "fixed") {
|
|
1549
|
-
currentContainingBlockComputedStyle = null;
|
|
1550
|
-
}
|
|
1551
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element2, currentNode);
|
|
1552
|
-
if (shouldDropCurrentNode) {
|
|
1553
|
-
result = result.filter((ancestor) => ancestor !== currentNode);
|
|
1554
|
-
} else {
|
|
1555
|
-
currentContainingBlockComputedStyle = computedStyle;
|
|
1556
|
-
}
|
|
1557
|
-
currentNode = getParentNode(currentNode);
|
|
1558
|
-
}
|
|
1559
|
-
cache.set(element2, result);
|
|
1560
|
-
return result;
|
|
1561
|
-
}
|
|
1562
|
-
function getClippingRect(_ref) {
|
|
1563
|
-
let {
|
|
1564
|
-
element: element2,
|
|
1565
|
-
boundary,
|
|
1566
|
-
rootBoundary,
|
|
1567
|
-
strategy
|
|
1568
|
-
} = _ref;
|
|
1569
|
-
const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element2) ? [] : getClippingElementAncestors(element2, this._c) : [].concat(boundary);
|
|
1570
|
-
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
1571
|
-
const firstRect = getClientRectFromClippingAncestor(element2, clippingAncestors[0], strategy);
|
|
1572
|
-
let top = firstRect.top;
|
|
1573
|
-
let right = firstRect.right;
|
|
1574
|
-
let bottom = firstRect.bottom;
|
|
1575
|
-
let left = firstRect.left;
|
|
1576
|
-
for (let i = 1;i < clippingAncestors.length; i++) {
|
|
1577
|
-
const rect = getClientRectFromClippingAncestor(element2, clippingAncestors[i], strategy);
|
|
1578
|
-
top = max(rect.top, top);
|
|
1579
|
-
right = min(rect.right, right);
|
|
1580
|
-
bottom = min(rect.bottom, bottom);
|
|
1581
|
-
left = max(rect.left, left);
|
|
1582
|
-
}
|
|
1583
|
-
return {
|
|
1584
|
-
width: right - left,
|
|
1585
|
-
height: bottom - top,
|
|
1586
|
-
x: left,
|
|
1587
|
-
y: top
|
|
1588
|
-
};
|
|
1589
|
-
}
|
|
1590
|
-
function getDimensions(element2) {
|
|
1591
|
-
const {
|
|
1592
|
-
width,
|
|
1593
|
-
height
|
|
1594
|
-
} = getCssDimensions(element2);
|
|
1595
|
-
return {
|
|
1596
|
-
width,
|
|
1597
|
-
height
|
|
1598
|
-
};
|
|
1599
|
-
}
|
|
1600
|
-
function getRectRelativeToOffsetParent(element2, offsetParent, strategy) {
|
|
1601
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1602
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
1603
|
-
const isFixed = strategy === "fixed";
|
|
1604
|
-
const rect = getBoundingClientRect(element2, true, isFixed, offsetParent);
|
|
1605
|
-
let scroll = {
|
|
1606
|
-
scrollLeft: 0,
|
|
1607
|
-
scrollTop: 0
|
|
1608
|
-
};
|
|
1609
|
-
const offsets = createCoords(0);
|
|
1610
|
-
function setLeftRTLScrollbarOffset() {
|
|
1611
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
1612
|
-
}
|
|
1613
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1614
|
-
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
1615
|
-
scroll = getNodeScroll(offsetParent);
|
|
1616
|
-
}
|
|
1617
|
-
if (isOffsetParentAnElement) {
|
|
1618
|
-
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
1619
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1620
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1621
|
-
} else if (documentElement) {
|
|
1622
|
-
setLeftRTLScrollbarOffset();
|
|
1623
|
-
}
|
|
1624
|
-
}
|
|
1625
|
-
if (isFixed && !isOffsetParentAnElement && documentElement) {
|
|
1626
|
-
setLeftRTLScrollbarOffset();
|
|
1627
|
-
}
|
|
1628
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1629
|
-
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
1630
|
-
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
1631
|
-
return {
|
|
1632
|
-
x,
|
|
1633
|
-
y,
|
|
1634
|
-
width: rect.width,
|
|
1635
|
-
height: rect.height
|
|
1636
|
-
};
|
|
1637
|
-
}
|
|
1638
|
-
function isStaticPositioned(element2) {
|
|
1639
|
-
return getComputedStyle2(element2).position === "static";
|
|
1640
|
-
}
|
|
1641
|
-
function getTrueOffsetParent(element2, polyfill) {
|
|
1642
|
-
if (!isHTMLElement(element2) || getComputedStyle2(element2).position === "fixed") {
|
|
1643
|
-
return null;
|
|
1644
|
-
}
|
|
1645
|
-
if (polyfill) {
|
|
1646
|
-
return polyfill(element2);
|
|
1647
|
-
}
|
|
1648
|
-
let rawOffsetParent = element2.offsetParent;
|
|
1649
|
-
if (getDocumentElement(element2) === rawOffsetParent) {
|
|
1650
|
-
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
1651
|
-
}
|
|
1652
|
-
return rawOffsetParent;
|
|
1653
|
-
}
|
|
1654
|
-
function getOffsetParent(element2, polyfill) {
|
|
1655
|
-
const win = getWindow(element2);
|
|
1656
|
-
if (isTopLayer(element2)) {
|
|
1657
|
-
return win;
|
|
1658
|
-
}
|
|
1659
|
-
if (!isHTMLElement(element2)) {
|
|
1660
|
-
let svgOffsetParent = getParentNode(element2);
|
|
1661
|
-
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
1662
|
-
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
|
1663
|
-
return svgOffsetParent;
|
|
1664
|
-
}
|
|
1665
|
-
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
1666
|
-
}
|
|
1667
|
-
return win;
|
|
1668
|
-
}
|
|
1669
|
-
let offsetParent = getTrueOffsetParent(element2, polyfill);
|
|
1670
|
-
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
|
|
1671
|
-
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
1672
|
-
}
|
|
1673
|
-
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
|
|
1674
|
-
return win;
|
|
1675
|
-
}
|
|
1676
|
-
return offsetParent || getContainingBlock(element2) || win;
|
|
1677
|
-
}
|
|
1678
|
-
function isRTL(element2) {
|
|
1679
|
-
return getComputedStyle2(element2).direction === "rtl";
|
|
1680
|
-
}
|
|
1681
|
-
function rectsAreEqual(a, b) {
|
|
1682
|
-
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
1683
|
-
}
|
|
1684
|
-
function observeMove(element2, onMove) {
|
|
1685
|
-
let io = null;
|
|
1686
|
-
let timeoutId;
|
|
1687
|
-
const root4 = getDocumentElement(element2);
|
|
1688
|
-
function cleanup() {
|
|
1689
|
-
var _io;
|
|
1690
|
-
clearTimeout(timeoutId);
|
|
1691
|
-
(_io = io) == null || _io.disconnect();
|
|
1692
|
-
io = null;
|
|
1693
|
-
}
|
|
1694
|
-
function refresh(skip, threshold) {
|
|
1695
|
-
if (skip === undefined) {
|
|
1696
|
-
skip = false;
|
|
1697
|
-
}
|
|
1698
|
-
if (threshold === undefined) {
|
|
1699
|
-
threshold = 1;
|
|
1700
|
-
}
|
|
1701
|
-
cleanup();
|
|
1702
|
-
const elementRectForRootMargin = element2.getBoundingClientRect();
|
|
1703
|
-
const {
|
|
1704
|
-
left,
|
|
1705
|
-
top,
|
|
1706
|
-
width,
|
|
1707
|
-
height
|
|
1708
|
-
} = elementRectForRootMargin;
|
|
1709
|
-
if (!skip) {
|
|
1710
|
-
onMove();
|
|
1711
|
-
}
|
|
1712
|
-
if (!width || !height) {
|
|
1713
|
-
return;
|
|
1714
|
-
}
|
|
1715
|
-
const insetTop = floor(top);
|
|
1716
|
-
const insetRight = floor(root4.clientWidth - (left + width));
|
|
1717
|
-
const insetBottom = floor(root4.clientHeight - (top + height));
|
|
1718
|
-
const insetLeft = floor(left);
|
|
1719
|
-
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
1720
|
-
const options = {
|
|
1721
|
-
rootMargin,
|
|
1722
|
-
threshold: max(0, min(1, threshold)) || 1
|
|
1723
|
-
};
|
|
1724
|
-
let isFirstUpdate = true;
|
|
1725
|
-
function handleObserve(entries) {
|
|
1726
|
-
const ratio = entries[0].intersectionRatio;
|
|
1727
|
-
if (ratio !== threshold) {
|
|
1728
|
-
if (!isFirstUpdate) {
|
|
1729
|
-
return refresh();
|
|
1730
|
-
}
|
|
1731
|
-
if (!ratio) {
|
|
1732
|
-
timeoutId = setTimeout(() => {
|
|
1733
|
-
refresh(false, 0.0000001);
|
|
1734
|
-
}, 1000);
|
|
1735
|
-
} else {
|
|
1736
|
-
refresh(false, ratio);
|
|
1737
|
-
}
|
|
1738
|
-
}
|
|
1739
|
-
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element2.getBoundingClientRect())) {
|
|
1740
|
-
refresh();
|
|
1741
|
-
}
|
|
1742
|
-
isFirstUpdate = false;
|
|
1743
|
-
}
|
|
1744
|
-
try {
|
|
1745
|
-
io = new IntersectionObserver(handleObserve, {
|
|
1746
|
-
...options,
|
|
1747
|
-
root: root4.ownerDocument
|
|
1748
|
-
});
|
|
1749
|
-
} catch (_e) {
|
|
1750
|
-
io = new IntersectionObserver(handleObserve, options);
|
|
1751
|
-
}
|
|
1752
|
-
io.observe(element2);
|
|
1753
|
-
}
|
|
1754
|
-
refresh(true);
|
|
1755
|
-
return cleanup;
|
|
1756
|
-
}
|
|
1757
|
-
function autoUpdate(reference, floating, update, options) {
|
|
1758
|
-
if (options === undefined) {
|
|
1759
|
-
options = {};
|
|
1760
|
-
}
|
|
1761
|
-
const {
|
|
1762
|
-
ancestorScroll = true,
|
|
1763
|
-
ancestorResize = true,
|
|
1764
|
-
elementResize = typeof ResizeObserver === "function",
|
|
1765
|
-
layoutShift = typeof IntersectionObserver === "function",
|
|
1766
|
-
animationFrame = false
|
|
1767
|
-
} = options;
|
|
1768
|
-
const referenceEl = unwrapElement(reference);
|
|
1769
|
-
const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
|
|
1770
|
-
ancestors.forEach((ancestor) => {
|
|
1771
|
-
ancestorScroll && ancestor.addEventListener("scroll", update, {
|
|
1772
|
-
passive: true
|
|
1773
|
-
});
|
|
1774
|
-
ancestorResize && ancestor.addEventListener("resize", update);
|
|
1775
|
-
});
|
|
1776
|
-
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
1777
|
-
let reobserveFrame = -1;
|
|
1778
|
-
let resizeObserver = null;
|
|
1779
|
-
if (elementResize) {
|
|
1780
|
-
resizeObserver = new ResizeObserver((_ref) => {
|
|
1781
|
-
let [firstEntry] = _ref;
|
|
1782
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
|
|
1783
|
-
resizeObserver.unobserve(floating);
|
|
1784
|
-
cancelAnimationFrame(reobserveFrame);
|
|
1785
|
-
reobserveFrame = requestAnimationFrame(() => {
|
|
1786
|
-
var _resizeObserver;
|
|
1787
|
-
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
1788
|
-
});
|
|
1789
|
-
}
|
|
1790
|
-
update();
|
|
1791
|
-
});
|
|
1792
|
-
if (referenceEl && !animationFrame) {
|
|
1793
|
-
resizeObserver.observe(referenceEl);
|
|
1794
|
-
}
|
|
1795
|
-
if (floating) {
|
|
1796
|
-
resizeObserver.observe(floating);
|
|
1797
|
-
}
|
|
1798
|
-
}
|
|
1799
|
-
let frameId;
|
|
1800
|
-
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
1801
|
-
if (animationFrame) {
|
|
1802
|
-
frameLoop();
|
|
1803
|
-
}
|
|
1804
|
-
function frameLoop() {
|
|
1805
|
-
const nextRefRect = getBoundingClientRect(reference);
|
|
1806
|
-
if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
|
|
1807
|
-
update();
|
|
1808
|
-
}
|
|
1809
|
-
prevRefRect = nextRefRect;
|
|
1810
|
-
frameId = requestAnimationFrame(frameLoop);
|
|
1811
|
-
}
|
|
1812
|
-
update();
|
|
1813
|
-
return () => {
|
|
1814
|
-
var _resizeObserver2;
|
|
1815
|
-
ancestors.forEach((ancestor) => {
|
|
1816
|
-
ancestorScroll && ancestor.removeEventListener("scroll", update);
|
|
1817
|
-
ancestorResize && ancestor.removeEventListener("resize", update);
|
|
1818
|
-
});
|
|
1819
|
-
cleanupIo == null || cleanupIo();
|
|
1820
|
-
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
1821
|
-
resizeObserver = null;
|
|
1822
|
-
if (animationFrame) {
|
|
1823
|
-
cancelAnimationFrame(frameId);
|
|
1824
|
-
}
|
|
1825
|
-
};
|
|
1826
|
-
}
|
|
1827
|
-
var noOffsets, SCROLLBAR_MAX = 25, getElementRects = async function(data) {
|
|
1828
|
-
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
1829
|
-
const getDimensionsFn = this.getDimensions;
|
|
1830
|
-
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
1831
|
-
return {
|
|
1832
|
-
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
1833
|
-
floating: {
|
|
1834
|
-
x: 0,
|
|
1835
|
-
y: 0,
|
|
1836
|
-
width: floatingDimensions.width,
|
|
1837
|
-
height: floatingDimensions.height
|
|
1838
|
-
}
|
|
1839
|
-
};
|
|
1840
|
-
}, platform, detectOverflow2, offset2, autoPlacement2, shift2, flip2, size2, hide2, arrow2, inline2, limitShift2, computePosition2 = (reference, floating, options) => {
|
|
1841
|
-
const cache = new Map;
|
|
1842
|
-
const mergedOptions = {
|
|
1843
|
-
platform,
|
|
1844
|
-
...options
|
|
1845
|
-
};
|
|
1846
|
-
const platformWithCache = {
|
|
1847
|
-
...mergedOptions.platform,
|
|
1848
|
-
_c: cache
|
|
1849
|
-
};
|
|
1850
|
-
return computePosition(reference, floating, {
|
|
1851
|
-
...mergedOptions,
|
|
1852
|
-
platform: platformWithCache
|
|
1853
|
-
});
|
|
1854
|
-
};
|
|
1855
|
-
var init_floating_ui_dom = __esm(() => {
|
|
1856
|
-
init_floating_ui_core();
|
|
1857
|
-
init_floating_ui_utils();
|
|
1858
|
-
init_floating_ui_utils_dom();
|
|
1859
|
-
init_floating_ui_utils_dom();
|
|
1860
|
-
noOffsets = /* @__PURE__ */ createCoords(0);
|
|
1861
|
-
platform = {
|
|
1862
|
-
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
1863
|
-
getDocumentElement,
|
|
1864
|
-
getClippingRect,
|
|
1865
|
-
getOffsetParent,
|
|
1866
|
-
getElementRects,
|
|
1867
|
-
getClientRects,
|
|
1868
|
-
getDimensions,
|
|
1869
|
-
getScale,
|
|
1870
|
-
isElement,
|
|
1871
|
-
isRTL
|
|
1872
|
-
};
|
|
1873
|
-
detectOverflow2 = detectOverflow;
|
|
1874
|
-
offset2 = offset;
|
|
1875
|
-
autoPlacement2 = autoPlacement;
|
|
1876
|
-
shift2 = shift;
|
|
1877
|
-
flip2 = flip;
|
|
1878
|
-
size2 = size;
|
|
1879
|
-
hide2 = hide;
|
|
1880
|
-
arrow2 = arrow;
|
|
1881
|
-
inline2 = inline;
|
|
1882
|
-
limitShift2 = limitShift;
|
|
1883
|
-
});
|
|
1884
|
-
|
|
1885
|
-
// src/components/portal/portal.svelte
|
|
1886
|
-
import"svelte/internal/disclose-version";
|
|
1887
|
-
import * as $3 from "svelte/internal/client";
|
|
1888
|
-
|
|
1889
|
-
// src/utilities/class-names.ts
|
|
1890
|
-
function classNames(...parts) {
|
|
1891
|
-
return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
// src/components/portal/portal.utilities.svelte.ts
|
|
1895
|
-
import * as $2 from "svelte/internal/client";
|
|
1896
|
-
import { untrack } from "svelte";
|
|
1897
|
-
|
|
1898
|
-
// ../../node_modules/esm-env/true.js
|
|
1899
|
-
var true_default = true;
|
|
1900
|
-
// src/utilities/dev-warn.ts
|
|
1901
|
-
function devWarn(message, ...args) {
|
|
1902
|
-
if (!true_default)
|
|
1903
|
-
return;
|
|
1904
|
-
console.warn(message, ...args);
|
|
1905
|
-
}
|
|
1906
|
-
|
|
1907
|
-
// src/utilities/read-option.ts
|
|
1908
|
-
function isOptionGetter(value) {
|
|
1909
|
-
return typeof value === "function";
|
|
1910
|
-
}
|
|
1911
|
-
function readOption(value) {
|
|
1912
|
-
return isOptionGetter(value) ? value() : value;
|
|
1913
|
-
}
|
|
1914
|
-
|
|
1915
|
-
// src/utilities/use-reduced-motion.svelte.ts
|
|
1916
|
-
import * as $ from "svelte/internal/client";
|
|
1917
|
-
import { MediaQuery } from "svelte/reactivity";
|
|
1918
|
-
function useReducedMotion() {
|
|
1919
|
-
if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
|
|
1920
|
-
return { current: false };
|
|
1921
|
-
}
|
|
1922
|
-
const query = new MediaQuery("(prefers-reduced-motion: reduce)", false);
|
|
1923
|
-
return {
|
|
1924
|
-
get current() {
|
|
1925
|
-
return query.current;
|
|
1926
|
-
}
|
|
1927
|
-
};
|
|
1928
|
-
}
|
|
1929
|
-
|
|
1930
|
-
// src/components/portal/portal.utilities.svelte.ts
|
|
1931
|
-
function resolvePortalTarget(target) {
|
|
1932
|
-
if (typeof document === "undefined")
|
|
1933
|
-
return null;
|
|
1934
|
-
if (target == null) {
|
|
1935
|
-
return { kind: "resolved", target: document.body };
|
|
1936
|
-
}
|
|
1937
|
-
if (target instanceof HTMLElement) {
|
|
1938
|
-
return { kind: "resolved", target };
|
|
1939
|
-
}
|
|
1940
|
-
try {
|
|
1941
|
-
const resolved = document.querySelector(target);
|
|
1942
|
-
return resolved instanceof HTMLElement ? { kind: "resolved", target: resolved } : { kind: "unresolved", key: target };
|
|
1943
|
-
} catch {
|
|
1944
|
-
return { kind: "unresolved", key: target };
|
|
1945
|
-
}
|
|
1946
|
-
}
|
|
1947
|
-
function findNearestOpenTopLayer(source, isModalDialog = (element) => element.matches(":modal")) {
|
|
1948
|
-
const selfTrigger = closestAcrossShadow(source, ".cinder-popover__trigger");
|
|
1949
|
-
let candidate = source;
|
|
1950
|
-
while (candidate) {
|
|
1951
|
-
try {
|
|
1952
|
-
if (candidate.matches("dialog") && isModalDialog(candidate) || candidate.matches("[popover]") && candidate.matches(":popover-open"))
|
|
1953
|
-
return candidate;
|
|
1954
|
-
} catch {}
|
|
1955
|
-
if (candidate !== selfTrigger) {
|
|
1956
|
-
const ownerId = candidate.dataset["cinderPortalOwner"];
|
|
1957
|
-
if (ownerId) {
|
|
1958
|
-
const root = candidate.getRootNode();
|
|
1959
|
-
const localOwner = root instanceof ShadowRoot ? Array.from(root.querySelectorAll("[id]")).find((element) => element.id === ownerId) : root instanceof Document ? root.getElementById(ownerId) : null;
|
|
1960
|
-
const owner = localOwner ?? document.getElementById(ownerId);
|
|
1961
|
-
if (owner instanceof HTMLElement)
|
|
1962
|
-
return owner;
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1965
|
-
const rootNode = candidate.getRootNode();
|
|
1966
|
-
const shadowHost = rootNode instanceof ShadowRoot ? rootNode.host : null;
|
|
1967
|
-
candidate = candidate.parentElement ?? (shadowHost instanceof HTMLElement ? shadowHost : null);
|
|
1968
|
-
}
|
|
1969
|
-
return null;
|
|
1970
|
-
}
|
|
1971
|
-
function getInheritedPortalStyle(source) {
|
|
1972
|
-
if (!source || typeof window === "undefined")
|
|
1973
|
-
return "";
|
|
1974
|
-
const computed = getComputedStyle(source);
|
|
1975
|
-
const hasDirectTypography = source.tagName === "NAV" || source.parentElement === null && [
|
|
1976
|
-
"font-family",
|
|
1977
|
-
"font-size",
|
|
1978
|
-
"font-weight",
|
|
1979
|
-
"line-height",
|
|
1980
|
-
"letter-spacing"
|
|
1981
|
-
].some((property) => source.style.getPropertyValue(property) !== "");
|
|
1982
|
-
const typographySource = hasDirectTypography ? source : source.parentElement ?? source;
|
|
1983
|
-
const typography = getComputedStyle(typographySource);
|
|
1984
|
-
const inherited = document.createElement("div").style;
|
|
1985
|
-
const customPropertyNames = new Set;
|
|
1986
|
-
let customPropertySource = source;
|
|
1987
|
-
while (customPropertySource) {
|
|
1988
|
-
for (const property of Array.from(customPropertySource.style)) {
|
|
1989
|
-
if (property.startsWith("--cinder-"))
|
|
1990
|
-
customPropertyNames.add(property);
|
|
1991
|
-
}
|
|
1992
|
-
customPropertySource = customPropertySource.parentElement ?? getShadowHost(customPropertySource);
|
|
1993
|
-
}
|
|
1994
|
-
for (let index = 0;index < computed.length; index += 1) {
|
|
1995
|
-
const property = computed.item(index);
|
|
1996
|
-
if (property.startsWith("--cinder-"))
|
|
1997
|
-
customPropertyNames.add(property);
|
|
1998
|
-
}
|
|
1999
|
-
for (const property of customPropertyNames) {
|
|
2000
|
-
const value = computed.getPropertyValue(property);
|
|
2001
|
-
if (value)
|
|
2002
|
-
inherited.setProperty(property, value);
|
|
2003
|
-
}
|
|
2004
|
-
const colorScheme = computed.colorScheme || source.style.colorScheme;
|
|
2005
|
-
if (colorScheme) {
|
|
2006
|
-
inherited.setProperty("color-scheme", colorScheme);
|
|
2007
|
-
}
|
|
2008
|
-
if (!source.hasAttribute("dir") && computed.direction) {
|
|
2009
|
-
inherited.setProperty("direction", computed.direction);
|
|
2010
|
-
}
|
|
2011
|
-
for (const property of [
|
|
2012
|
-
"font-family",
|
|
2013
|
-
"font-size",
|
|
2014
|
-
"font-weight",
|
|
2015
|
-
"line-height",
|
|
2016
|
-
"letter-spacing"
|
|
2017
|
-
]) {
|
|
2018
|
-
const value = typography.getPropertyValue(property);
|
|
2019
|
-
if (value)
|
|
2020
|
-
inherited.setProperty(property, value);
|
|
2021
|
-
}
|
|
2022
|
-
for (const property of Array.from(source.style)) {
|
|
2023
|
-
if (!property.startsWith("--cinder-"))
|
|
2024
|
-
continue;
|
|
2025
|
-
const rawValue = source.style.getPropertyValue(property);
|
|
2026
|
-
if (!rawValue.includes("var("))
|
|
2027
|
-
inherited.setProperty(property, rawValue);
|
|
2028
|
-
}
|
|
2029
|
-
if (source.style.colorScheme)
|
|
2030
|
-
inherited.setProperty("color-scheme", source.style.colorScheme);
|
|
2031
|
-
return inherited.cssText;
|
|
2032
|
-
}
|
|
2033
|
-
function createInheritedPortalStyle(source, active) {
|
|
2034
|
-
let style = $2.state("");
|
|
2035
|
-
const reducedMotion = useReducedMotion();
|
|
2036
|
-
$2.user_effect(() => {
|
|
2037
|
-
reducedMotion.current;
|
|
2038
|
-
if (!active()) {
|
|
2039
|
-
$2.set(style, "");
|
|
2040
|
-
return;
|
|
2041
|
-
}
|
|
2042
|
-
const inheritanceSource = source();
|
|
2043
|
-
const syncStyle = () => {
|
|
2044
|
-
$2.set(style, getInheritedPortalStyle(inheritanceSource), true);
|
|
2045
|
-
};
|
|
2046
|
-
syncStyle();
|
|
2047
|
-
const stopObserving = observeInheritedPortalAttributes(inheritanceSource, true, syncStyle);
|
|
2048
|
-
if (typeof window === "undefined")
|
|
2049
|
-
return stopObserving ?? undefined;
|
|
2050
|
-
const mediaQueries = [
|
|
2051
|
-
"(prefers-color-scheme: dark)",
|
|
2052
|
-
"(prefers-contrast: more)",
|
|
2053
|
-
"(forced-colors: active)"
|
|
2054
|
-
].map((query) => window.matchMedia(query));
|
|
2055
|
-
const onMediaChange = () => syncStyle();
|
|
2056
|
-
for (const mediaQuery of mediaQueries)
|
|
2057
|
-
mediaQuery.addEventListener("change", onMediaChange);
|
|
2058
|
-
window.addEventListener("resize", onMediaChange);
|
|
2059
|
-
return () => {
|
|
2060
|
-
stopObserving?.();
|
|
2061
|
-
for (const mediaQuery of mediaQueries)
|
|
2062
|
-
mediaQuery.removeEventListener("change", onMediaChange);
|
|
2063
|
-
window.removeEventListener("resize", onMediaChange);
|
|
2064
|
-
};
|
|
2065
|
-
});
|
|
2066
|
-
return {
|
|
2067
|
-
get style() {
|
|
2068
|
-
return $2.get(style);
|
|
2069
|
-
}
|
|
2070
|
-
};
|
|
2071
|
-
}
|
|
2072
|
-
function copyInheritedPortalAttributes(element, source, inheritAttributes, fallbackAttributes = {
|
|
2073
|
-
dir: element.getAttribute("dir"),
|
|
2074
|
-
lang: element.getAttribute("lang"),
|
|
2075
|
-
dataTheme: element.getAttribute("data-theme"),
|
|
2076
|
-
theme: element.getAttribute("data-cinder-theme")
|
|
2077
|
-
}) {
|
|
2078
|
-
const inheritedDirectionAttribute = "data-cinder-portal-inherited-direction";
|
|
2079
|
-
const preservesExplicitDirection = fallbackAttributes.preserveDirection || element.dataset["cinderExplicitDirection"] === "true";
|
|
2080
|
-
let inheritedDir = null;
|
|
2081
|
-
let generatedDirectionFallback = null;
|
|
2082
|
-
if (inheritAttributes && source && !preservesExplicitDirection) {
|
|
2083
|
-
let computedDirection = null;
|
|
2084
|
-
let hasReadComputedDirection = false;
|
|
2085
|
-
const readComputedDirection = () => {
|
|
2086
|
-
if (!hasReadComputedDirection) {
|
|
2087
|
-
computedDirection = typeof getComputedStyle === "function" ? getComputedStyle(source).direction : null;
|
|
2088
|
-
hasReadComputedDirection = true;
|
|
2089
|
-
}
|
|
2090
|
-
return computedDirection;
|
|
2091
|
-
};
|
|
2092
|
-
let directionSource = source;
|
|
2093
|
-
let crossedGeneratedDirectionBoundary = false;
|
|
2094
|
-
while (directionSource) {
|
|
2095
|
-
const matchingDirection = closestAcrossShadow(directionSource, "[dir]");
|
|
2096
|
-
if (!matchingDirection) {
|
|
2097
|
-
directionSource = getShadowHost(directionSource);
|
|
2098
|
-
continue;
|
|
2099
|
-
}
|
|
2100
|
-
if (!matchingDirection.hasAttribute(inheritedDirectionAttribute)) {
|
|
2101
|
-
const explicitDirection = matchingDirection.getAttribute("dir");
|
|
2102
|
-
const normalizedExplicitDirection = explicitDirection?.toLowerCase();
|
|
2103
|
-
if (crossedGeneratedDirectionBoundary) {
|
|
2104
|
-
if (normalizedExplicitDirection === "auto")
|
|
2105
|
-
inheritedDir = "auto";
|
|
2106
|
-
break;
|
|
2107
|
-
}
|
|
2108
|
-
const documentComputedDirection = matchingDirection === document.documentElement && normalizedExplicitDirection !== "auto" ? readComputedDirection() : null;
|
|
2109
|
-
inheritedDir = normalizedExplicitDirection === "auto" ? normalizedExplicitDirection : documentComputedDirection || explicitDirection;
|
|
2110
|
-
break;
|
|
2111
|
-
}
|
|
2112
|
-
const generatedDirection = matchingDirection.getAttribute("dir");
|
|
2113
|
-
generatedDirectionFallback ??= generatedDirection;
|
|
2114
|
-
crossedGeneratedDirectionBoundary = true;
|
|
2115
|
-
directionSource = matchingDirection.parentElement ?? getShadowHost(matchingDirection);
|
|
2116
|
-
}
|
|
2117
|
-
if (inheritedDir === null) {
|
|
2118
|
-
inheritedDir = readComputedDirection() || generatedDirectionFallback;
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
|
-
const nextDir = inheritedDir ?? fallbackAttributes.dir;
|
|
2122
|
-
if (nextDir) {
|
|
2123
|
-
element.setAttribute("dir", nextDir);
|
|
2124
|
-
if (!preservesExplicitDirection && inheritedDir !== null) {
|
|
2125
|
-
element.setAttribute(inheritedDirectionAttribute, "true");
|
|
2126
|
-
} else {
|
|
2127
|
-
element.removeAttribute(inheritedDirectionAttribute);
|
|
2128
|
-
}
|
|
2129
|
-
} else {
|
|
2130
|
-
element.removeAttribute("dir");
|
|
2131
|
-
element.removeAttribute(inheritedDirectionAttribute);
|
|
2132
|
-
}
|
|
2133
|
-
const preservesExplicitLanguage = fallbackAttributes.preserveLanguage ?? fallbackAttributes.lang !== null;
|
|
2134
|
-
const inheritedLanguage = inheritAttributes && source && !preservesExplicitLanguage ? closestAcrossShadow(source, "[lang]")?.getAttribute("lang") : null;
|
|
2135
|
-
const nextLanguage = inheritedLanguage ?? fallbackAttributes.lang;
|
|
2136
|
-
if (nextLanguage !== null && nextLanguage !== undefined) {
|
|
2137
|
-
element.setAttribute("lang", nextLanguage);
|
|
2138
|
-
} else {
|
|
2139
|
-
element.removeAttribute("lang");
|
|
2140
|
-
}
|
|
2141
|
-
const preservesExplicitDataTheme = fallbackAttributes.preserveDataTheme === true;
|
|
2142
|
-
const inheritedDataTheme = inheritAttributes && source && !preservesExplicitDataTheme && fallbackAttributes.dataTheme === null ? closestAcrossShadow(source, "[data-theme]")?.getAttribute("data-theme") : null;
|
|
2143
|
-
const nextDataTheme = inheritedDataTheme ?? fallbackAttributes.dataTheme;
|
|
2144
|
-
if (nextDataTheme) {
|
|
2145
|
-
element.setAttribute("data-theme", nextDataTheme);
|
|
2146
|
-
} else {
|
|
2147
|
-
element.removeAttribute("data-theme");
|
|
2148
|
-
}
|
|
2149
|
-
const preservesExplicitTheme = fallbackAttributes.preserveTheme === true;
|
|
2150
|
-
const inheritedTheme = inheritAttributes && source && !preservesExplicitTheme && fallbackAttributes.theme === null ? closestAcrossShadow(source, "[data-cinder-theme]")?.getAttribute("data-cinder-theme") : null;
|
|
2151
|
-
const nextTheme = inheritedTheme ?? fallbackAttributes.theme;
|
|
2152
|
-
if (nextTheme) {
|
|
2153
|
-
element.setAttribute("data-cinder-theme", nextTheme);
|
|
2154
|
-
} else {
|
|
2155
|
-
element.removeAttribute("data-cinder-theme");
|
|
2156
|
-
}
|
|
2157
|
-
return {
|
|
2158
|
-
dir: inheritedDir ?? null,
|
|
2159
|
-
lang: inheritedLanguage ?? null,
|
|
2160
|
-
dataTheme: inheritedDataTheme ?? null,
|
|
2161
|
-
theme: inheritedTheme ?? null
|
|
2162
|
-
};
|
|
2163
|
-
}
|
|
2164
|
-
function redispatchPortaledEvent(event, sourceTarget) {
|
|
2165
|
-
if (!sourceTarget)
|
|
2166
|
-
return false;
|
|
2167
|
-
const originalTarget = event.target;
|
|
2168
|
-
const originalComposedPath = event.composedPath();
|
|
2169
|
-
const eventInit = {
|
|
2170
|
-
bubbles: event.bubbles,
|
|
2171
|
-
cancelable: event.cancelable,
|
|
2172
|
-
composed: event.composed
|
|
2173
|
-
};
|
|
2174
|
-
for (const property of [
|
|
2175
|
-
"view",
|
|
2176
|
-
"key",
|
|
2177
|
-
"code",
|
|
2178
|
-
"location",
|
|
2179
|
-
"repeat",
|
|
2180
|
-
"isComposing",
|
|
2181
|
-
"button",
|
|
2182
|
-
"buttons",
|
|
2183
|
-
"movementX",
|
|
2184
|
-
"movementY",
|
|
2185
|
-
"which",
|
|
2186
|
-
"clientX",
|
|
2187
|
-
"clientY",
|
|
2188
|
-
"screenX",
|
|
2189
|
-
"screenY",
|
|
2190
|
-
"ctrlKey",
|
|
2191
|
-
"shiftKey",
|
|
2192
|
-
"altKey",
|
|
2193
|
-
"metaKey",
|
|
2194
|
-
"relatedTarget",
|
|
2195
|
-
"pointerId",
|
|
2196
|
-
"pointerType",
|
|
2197
|
-
"isPrimary",
|
|
2198
|
-
"detail",
|
|
2199
|
-
"data",
|
|
2200
|
-
"inputType",
|
|
2201
|
-
"dataTransfer",
|
|
2202
|
-
"pressure",
|
|
2203
|
-
"tiltX",
|
|
2204
|
-
"tiltY",
|
|
2205
|
-
"twist",
|
|
2206
|
-
"tangentialPressure",
|
|
2207
|
-
"width",
|
|
2208
|
-
"height"
|
|
2209
|
-
]) {
|
|
2210
|
-
if (property in event)
|
|
2211
|
-
eventInit[property] = Reflect.get(event, property);
|
|
2212
|
-
}
|
|
2213
|
-
let bridgedEvent;
|
|
2214
|
-
try {
|
|
2215
|
-
bridgedEvent = Reflect.construct(event.constructor, [event.type, eventInit]);
|
|
2216
|
-
} catch {
|
|
2217
|
-
bridgedEvent = new Event(event.type, eventInit);
|
|
2218
|
-
}
|
|
2219
|
-
for (const property of ["movementX", "movementY", "which", "width", "height"]) {
|
|
2220
|
-
if (!(property in event))
|
|
2221
|
-
continue;
|
|
2222
|
-
const value = Reflect.get(event, property);
|
|
2223
|
-
if (Reflect.get(bridgedEvent, property) === value)
|
|
2224
|
-
continue;
|
|
2225
|
-
try {
|
|
2226
|
-
Object.defineProperty(bridgedEvent, property, { configurable: true, value });
|
|
2227
|
-
} catch {}
|
|
2228
|
-
}
|
|
2229
|
-
redispatchedPortalEvents.add(bridgedEvent);
|
|
2230
|
-
Object.defineProperty(bridgedEvent, "target", { configurable: true, value: originalTarget });
|
|
2231
|
-
const nativeComposedPath = bridgedEvent.composedPath.bind(bridgedEvent);
|
|
2232
|
-
let dispatchComplete = false;
|
|
2233
|
-
Object.defineProperty(bridgedEvent, "composedPath", {
|
|
2234
|
-
configurable: true,
|
|
2235
|
-
value: () => {
|
|
2236
|
-
return dispatchComplete ? [...originalComposedPath] : nativeComposedPath();
|
|
2237
|
-
}
|
|
2238
|
-
});
|
|
2239
|
-
if (event.defaultPrevented)
|
|
2240
|
-
bridgedEvent.preventDefault();
|
|
2241
|
-
event.stopPropagation();
|
|
2242
|
-
const dispatched = sourceTarget.dispatchEvent(bridgedEvent);
|
|
2243
|
-
dispatchComplete = true;
|
|
2244
|
-
if (!dispatched) {
|
|
2245
|
-
event.preventDefault();
|
|
2246
|
-
}
|
|
2247
|
-
return true;
|
|
2248
|
-
}
|
|
2249
|
-
var redispatchedPortalEvents = new WeakSet;
|
|
2250
|
-
function getShadowHost(element) {
|
|
2251
|
-
const root = element.getRootNode();
|
|
2252
|
-
return root instanceof ShadowRoot && root.host instanceof HTMLElement ? root.host : null;
|
|
2253
|
-
}
|
|
2254
|
-
function closestAcrossShadow(element, selector) {
|
|
2255
|
-
let current = element;
|
|
2256
|
-
while (current) {
|
|
2257
|
-
const match = current.closest(selector);
|
|
2258
|
-
if (match)
|
|
2259
|
-
return match;
|
|
2260
|
-
current = getShadowHost(current);
|
|
2261
|
-
}
|
|
2262
|
-
return null;
|
|
2263
|
-
}
|
|
2264
|
-
function isRedispatchedPortaledEvent(event) {
|
|
2265
|
-
return redispatchedPortalEvents.has(event);
|
|
2266
|
-
}
|
|
2267
|
-
function isEffectivelyDisabled(source) {
|
|
2268
|
-
if (source.matches(":disabled"))
|
|
2269
|
-
return true;
|
|
2270
|
-
const disabledFieldset = source.closest("fieldset[disabled]");
|
|
2271
|
-
if (!disabledFieldset)
|
|
2272
|
-
return false;
|
|
2273
|
-
const firstLegend = disabledFieldset.querySelector(":scope > legend");
|
|
2274
|
-
return !firstLegend?.contains(source);
|
|
2275
|
-
}
|
|
2276
|
-
function isPortalSourceUnavailable(source) {
|
|
2277
|
-
if (isEffectivelyDisabled(source))
|
|
2278
|
-
return true;
|
|
2279
|
-
if (closestAcrossShadow(source, '[hidden], [inert], [aria-hidden="true"]'))
|
|
2280
|
-
return true;
|
|
2281
|
-
if (typeof window === "undefined" || typeof getComputedStyle !== "function")
|
|
2282
|
-
return false;
|
|
2283
|
-
let ancestor = source;
|
|
2284
|
-
while (ancestor) {
|
|
2285
|
-
const computed = getComputedStyle(ancestor);
|
|
2286
|
-
if (computed.display === "none" || computed.visibility === "hidden")
|
|
2287
|
-
return true;
|
|
2288
|
-
ancestor = ancestor.parentElement ?? getShadowHost(ancestor);
|
|
2289
|
-
}
|
|
2290
|
-
return false;
|
|
2291
|
-
}
|
|
2292
|
-
function observePortalSourceAvailability(source, onChange) {
|
|
2293
|
-
if (!source)
|
|
2294
|
-
return () => {};
|
|
2295
|
-
const syncAvailability = () => {
|
|
2296
|
-
onChange(isPortalSourceUnavailable(source));
|
|
2297
|
-
};
|
|
2298
|
-
if (typeof MutationObserver === "undefined") {
|
|
2299
|
-
syncAvailability();
|
|
2300
|
-
return () => {};
|
|
2301
|
-
}
|
|
2302
|
-
const observer = new MutationObserver(syncAvailability);
|
|
2303
|
-
let ancestor = source;
|
|
2304
|
-
while (ancestor) {
|
|
2305
|
-
observer.observe(ancestor, {
|
|
2306
|
-
attributes: true,
|
|
2307
|
-
attributeFilter: [
|
|
2308
|
-
"hidden",
|
|
2309
|
-
"inert",
|
|
2310
|
-
"aria-hidden",
|
|
2311
|
-
"disabled",
|
|
2312
|
-
"class",
|
|
2313
|
-
"style"
|
|
2314
|
-
]
|
|
2315
|
-
});
|
|
2316
|
-
ancestor = ancestor.parentElement ?? getShadowHost(ancestor);
|
|
2317
|
-
}
|
|
2318
|
-
syncAvailability();
|
|
2319
|
-
const resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(syncAvailability);
|
|
2320
|
-
resizeObserver?.observe(source);
|
|
2321
|
-
return () => {
|
|
2322
|
-
observer.disconnect();
|
|
2323
|
-
resizeObserver?.disconnect();
|
|
2324
|
-
};
|
|
2325
|
-
}
|
|
2326
|
-
function observeInheritedPortalAttributes(source, inheritAttributes, syncAttributes) {
|
|
2327
|
-
if (!inheritAttributes || !source)
|
|
2328
|
-
return null;
|
|
2329
|
-
const observer = typeof MutationObserver === "undefined" ? null : new MutationObserver(() => {
|
|
2330
|
-
syncAttributes();
|
|
2331
|
-
});
|
|
2332
|
-
const observedElements = [];
|
|
2333
|
-
function observe(elementToObserve) {
|
|
2334
|
-
if (!observer || !elementToObserve || observedElements.includes(elementToObserve))
|
|
2335
|
-
return;
|
|
2336
|
-
observedElements.push(elementToObserve);
|
|
2337
|
-
observer.observe(elementToObserve, {
|
|
2338
|
-
attributes: true,
|
|
2339
|
-
attributeFilter: [
|
|
2340
|
-
"class",
|
|
2341
|
-
"style",
|
|
2342
|
-
"dir",
|
|
2343
|
-
"lang",
|
|
2344
|
-
"data-theme",
|
|
2345
|
-
"data-cinder-theme"
|
|
2346
|
-
]
|
|
2347
|
-
});
|
|
2348
|
-
}
|
|
2349
|
-
function rebindObservedElements() {
|
|
2350
|
-
const nextElements = [];
|
|
2351
|
-
let ancestor = source ?? null;
|
|
2352
|
-
while (ancestor) {
|
|
2353
|
-
nextElements.push(ancestor);
|
|
2354
|
-
ancestor = ancestor.parentElement ?? getShadowHost(ancestor);
|
|
2355
|
-
}
|
|
2356
|
-
if (!nextElements.includes(document.documentElement)) {
|
|
2357
|
-
nextElements.push(document.documentElement);
|
|
2358
|
-
}
|
|
2359
|
-
if (observedElements.length === nextElements.length && observedElements.every((element, index) => element === nextElements[index])) {
|
|
2360
|
-
return;
|
|
2361
|
-
}
|
|
2362
|
-
observer?.disconnect();
|
|
2363
|
-
observedElements.length = 0;
|
|
2364
|
-
for (const element of nextElements)
|
|
2365
|
-
observe(element);
|
|
2366
|
-
}
|
|
2367
|
-
rebindObservedElements();
|
|
2368
|
-
const resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(syncAttributes);
|
|
2369
|
-
resizeObserver?.observe(source);
|
|
2370
|
-
const stopObservingComputedDirection = observeComputedDirection(source, syncAttributes, rebindObservedElements);
|
|
2371
|
-
return () => {
|
|
2372
|
-
observer?.disconnect();
|
|
2373
|
-
resizeObserver?.disconnect();
|
|
2374
|
-
stopObservingComputedDirection();
|
|
2375
|
-
};
|
|
2376
|
-
}
|
|
2377
|
-
var computedDirectionObservations = new Set;
|
|
2378
|
-
var observedMediaQueries = new Map;
|
|
2379
|
-
var directionInvalidationRoots = new Map;
|
|
2380
|
-
var directionInvalidationEvents = [
|
|
2381
|
-
"focusin",
|
|
2382
|
-
"focusout",
|
|
2383
|
-
"pointerover",
|
|
2384
|
-
"pointerout",
|
|
2385
|
-
"input",
|
|
2386
|
-
"change",
|
|
2387
|
-
"toggle",
|
|
2388
|
-
"pointerdown",
|
|
2389
|
-
"pointerup",
|
|
2390
|
-
"pointercancel",
|
|
2391
|
-
"keydown",
|
|
2392
|
-
"keyup"
|
|
2393
|
-
];
|
|
2394
|
-
var directionInvalidationObserver = null;
|
|
2395
|
-
var directionInvalidationFrame = null;
|
|
2396
|
-
var directionInvalidationDocument = null;
|
|
2397
|
-
var directionInvalidationStarted = false;
|
|
2398
|
-
function invalidateComputedDirections() {
|
|
2399
|
-
if (directionInvalidationFrame !== null || typeof window === "undefined")
|
|
2400
|
-
return;
|
|
2401
|
-
if (typeof window.requestAnimationFrame !== "function") {
|
|
2402
|
-
syncComputedDirections();
|
|
2403
|
-
return;
|
|
2404
|
-
}
|
|
2405
|
-
directionInvalidationFrame = window.requestAnimationFrame(() => {
|
|
2406
|
-
directionInvalidationFrame = null;
|
|
2407
|
-
syncComputedDirections();
|
|
2408
|
-
});
|
|
2409
|
-
}
|
|
2410
|
-
function invalidatePortalDirection() {
|
|
2411
|
-
if (computedDirectionObservations.size === 0)
|
|
2412
|
-
return;
|
|
2413
|
-
refreshMediaQueryObservers();
|
|
2414
|
-
invalidateComputedDirections();
|
|
2415
|
-
}
|
|
2416
|
-
function syncComputedDirections() {
|
|
2417
|
-
const topologyChanges = new Set;
|
|
2418
|
-
for (const current of computedDirectionObservations) {
|
|
2419
|
-
if (!rebindComputedDirectionObservation(current))
|
|
2420
|
-
continue;
|
|
2421
|
-
topologyChanges.add(current);
|
|
2422
|
-
current.rebindInheritedAttributes();
|
|
2423
|
-
}
|
|
2424
|
-
if (topologyChanges.size > 0)
|
|
2425
|
-
refreshMediaQueryObservers();
|
|
2426
|
-
if (typeof getComputedStyle !== "function")
|
|
2427
|
-
return;
|
|
2428
|
-
for (const current of computedDirectionObservations) {
|
|
2429
|
-
const direction = getComputedStyle(current.source).direction;
|
|
2430
|
-
if (direction === current.direction && !topologyChanges.has(current))
|
|
2431
|
-
continue;
|
|
2432
|
-
current.direction = direction;
|
|
2433
|
-
current.sync();
|
|
2434
|
-
}
|
|
2435
|
-
}
|
|
2436
|
-
function collectMediaQueries(rules, queries) {
|
|
2437
|
-
for (const rule of Array.from(rules)) {
|
|
2438
|
-
const conditionText = Reflect.get(rule, "conditionText");
|
|
2439
|
-
const media = Reflect.get(rule, "media");
|
|
2440
|
-
if (typeof conditionText === "string" && media && typeof media === "object") {
|
|
2441
|
-
queries.add(conditionText);
|
|
2442
|
-
}
|
|
2443
|
-
const mediaText = media && Reflect.get(media, "mediaText");
|
|
2444
|
-
if (typeof mediaText === "string" && mediaText)
|
|
2445
|
-
queries.add(mediaText);
|
|
2446
|
-
const importedStylesheet = Reflect.get(rule, "styleSheet");
|
|
2447
|
-
if (importedStylesheet) {
|
|
2448
|
-
try {
|
|
2449
|
-
const importedMedia = Reflect.get(importedStylesheet, "media");
|
|
2450
|
-
const importedMediaText = importedMedia && Reflect.get(importedMedia, "mediaText");
|
|
2451
|
-
if (typeof importedMediaText === "string" && importedMediaText)
|
|
2452
|
-
queries.add(importedMediaText);
|
|
2453
|
-
const importedRules = Reflect.get(importedStylesheet, "cssRules");
|
|
2454
|
-
if (isCssRuleCollection(importedRules))
|
|
2455
|
-
collectMediaQueries(importedRules, queries);
|
|
2456
|
-
} catch {}
|
|
2457
|
-
}
|
|
2458
|
-
const nestedRules = Reflect.get(rule, "cssRules");
|
|
2459
|
-
if (isCssRuleCollection(nestedRules)) {
|
|
2460
|
-
try {
|
|
2461
|
-
collectMediaQueries(nestedRules, queries);
|
|
2462
|
-
} catch {}
|
|
2463
|
-
}
|
|
2464
|
-
}
|
|
2465
|
-
}
|
|
2466
|
-
function addMediaQueryListener(mediaQuery) {
|
|
2467
|
-
if (typeof mediaQuery.addEventListener === "function") {
|
|
2468
|
-
mediaQuery.addEventListener("change", invalidateComputedDirections);
|
|
2469
|
-
} else {
|
|
2470
|
-
mediaQuery.addListener?.(invalidateComputedDirections);
|
|
2471
|
-
}
|
|
2472
|
-
}
|
|
2473
|
-
function removeMediaQueryListener(mediaQuery) {
|
|
2474
|
-
if (typeof mediaQuery.removeEventListener === "function") {
|
|
2475
|
-
mediaQuery.removeEventListener("change", invalidateComputedDirections);
|
|
2476
|
-
} else {
|
|
2477
|
-
mediaQuery.removeListener?.(invalidateComputedDirections);
|
|
2478
|
-
}
|
|
2479
|
-
}
|
|
2480
|
-
function isCssRuleCollection(value) {
|
|
2481
|
-
if (typeof CSSRuleList !== "undefined" && value instanceof CSSRuleList)
|
|
2482
|
-
return true;
|
|
2483
|
-
return typeof value === "object" && value !== null && Symbol.iterator in value;
|
|
2484
|
-
}
|
|
2485
|
-
function refreshMediaQueryObservers() {
|
|
2486
|
-
if (typeof window === "undefined" || typeof window.matchMedia !== "function")
|
|
2487
|
-
return;
|
|
2488
|
-
const queries = new Set;
|
|
2489
|
-
const roots = new Set([document]);
|
|
2490
|
-
for (const current of computedDirectionObservations) {
|
|
2491
|
-
const root = current.source.getRootNode();
|
|
2492
|
-
if (root instanceof ShadowRoot)
|
|
2493
|
-
roots.add(root);
|
|
2494
|
-
for (const observedRoot of current.roots)
|
|
2495
|
-
roots.add(observedRoot);
|
|
2496
|
-
}
|
|
2497
|
-
for (const root of roots) {
|
|
2498
|
-
const stylesheets = [
|
|
2499
|
-
...Array.from(root.styleSheets ?? []),
|
|
2500
|
-
...Array.from(root.adoptedStyleSheets ?? [])
|
|
2501
|
-
];
|
|
2502
|
-
for (const stylesheet of stylesheets) {
|
|
2503
|
-
try {
|
|
2504
|
-
const mediaText = stylesheet.media?.mediaText;
|
|
2505
|
-
if (mediaText)
|
|
2506
|
-
queries.add(mediaText);
|
|
2507
|
-
collectMediaQueries(stylesheet.cssRules, queries);
|
|
2508
|
-
} catch {}
|
|
2509
|
-
}
|
|
2510
|
-
}
|
|
2511
|
-
for (const [query, mediaQuery] of observedMediaQueries) {
|
|
2512
|
-
if (queries.has(query))
|
|
2513
|
-
continue;
|
|
2514
|
-
removeMediaQueryListener(mediaQuery);
|
|
2515
|
-
observedMediaQueries.delete(query);
|
|
2516
|
-
}
|
|
2517
|
-
for (const query of queries) {
|
|
2518
|
-
if (observedMediaQueries.has(query))
|
|
2519
|
-
continue;
|
|
2520
|
-
const mediaQuery = window.matchMedia(query);
|
|
2521
|
-
addMediaQueryListener(mediaQuery);
|
|
2522
|
-
observedMediaQueries.set(query, mediaQuery);
|
|
2523
|
-
}
|
|
2524
|
-
}
|
|
2525
|
-
function startDirectionInvalidationObservers() {
|
|
2526
|
-
if (directionInvalidationStarted || typeof document === "undefined")
|
|
2527
|
-
return;
|
|
2528
|
-
directionInvalidationStarted = true;
|
|
2529
|
-
directionInvalidationDocument = document;
|
|
2530
|
-
directionInvalidationObserver = typeof MutationObserver === "undefined" ? null : new MutationObserver((mutations) => {
|
|
2531
|
-
if (mutations.some(isStylesheetMutation)) {
|
|
2532
|
-
refreshMediaQueryObservers();
|
|
2533
|
-
}
|
|
2534
|
-
invalidateComputedDirections();
|
|
2535
|
-
});
|
|
2536
|
-
directionInvalidationObserver?.observe(document.documentElement, {
|
|
2537
|
-
attributes: true,
|
|
2538
|
-
characterData: true,
|
|
2539
|
-
childList: true,
|
|
2540
|
-
subtree: true
|
|
2541
|
-
});
|
|
2542
|
-
document.addEventListener("load", handleStylesheetLoad, true);
|
|
2543
|
-
if (typeof window !== "undefined" && typeof window.addEventListener === "function") {
|
|
2544
|
-
window.addEventListener("resize", invalidateComputedDirections);
|
|
2545
|
-
window.addEventListener("orientationchange", invalidateComputedDirections);
|
|
2546
|
-
window.addEventListener("hashchange", invalidateComputedDirections);
|
|
2547
|
-
for (const event of directionInvalidationEvents) {
|
|
2548
|
-
document.addEventListener(event, invalidateComputedDirections, true);
|
|
2549
|
-
}
|
|
2550
|
-
}
|
|
2551
|
-
refreshMediaQueryObservers();
|
|
2552
|
-
}
|
|
2553
|
-
function isStylesheetMutation(mutation) {
|
|
2554
|
-
if (mutation.type === "attributes") {
|
|
2555
|
-
return (mutation.target instanceof HTMLStyleElement || isStylesheetLink(mutation.target)) && (mutation.attributeName === "media" || mutation.attributeName === "disabled");
|
|
2556
|
-
}
|
|
2557
|
-
if (mutation.type === "characterData") {
|
|
2558
|
-
return mutation.target.parentElement instanceof HTMLStyleElement;
|
|
2559
|
-
}
|
|
2560
|
-
if (mutation.type !== "childList")
|
|
2561
|
-
return false;
|
|
2562
|
-
if (mutation.target instanceof HTMLStyleElement)
|
|
2563
|
-
return true;
|
|
2564
|
-
return [...mutation.addedNodes, ...mutation.removedNodes].some(containsStylesheetNode);
|
|
2565
|
-
}
|
|
2566
|
-
function containsStylesheetNode(node) {
|
|
2567
|
-
if (node instanceof HTMLStyleElement || isStylesheetLink(node))
|
|
2568
|
-
return true;
|
|
2569
|
-
if (!(node instanceof Element || node instanceof DocumentFragment))
|
|
2570
|
-
return false;
|
|
2571
|
-
return node.querySelector("style") !== null || [...node.querySelectorAll("link")].some(isStylesheetLink);
|
|
2572
|
-
}
|
|
2573
|
-
function isStylesheetLink(node) {
|
|
2574
|
-
return node instanceof HTMLLinkElement && node.rel.split(/\s+/).some((relationship) => relationship.toLowerCase() === "stylesheet");
|
|
2575
|
-
}
|
|
2576
|
-
function observeDirectionShadowRoots(source) {
|
|
2577
|
-
const roots = [];
|
|
2578
|
-
let current = source;
|
|
2579
|
-
while (current) {
|
|
2580
|
-
const root = current.getRootNode();
|
|
2581
|
-
if (root instanceof ShadowRoot) {
|
|
2582
|
-
roots.push(root);
|
|
2583
|
-
const existing = directionInvalidationRoots.get(root);
|
|
2584
|
-
if (existing)
|
|
2585
|
-
existing.count += 1;
|
|
2586
|
-
else {
|
|
2587
|
-
const observer = typeof MutationObserver === "undefined" ? null : new MutationObserver((mutations) => {
|
|
2588
|
-
if (mutations.some(isStylesheetMutation))
|
|
2589
|
-
refreshMediaQueryObservers();
|
|
2590
|
-
invalidateComputedDirections();
|
|
2591
|
-
});
|
|
2592
|
-
observer?.observe(root, {
|
|
2593
|
-
attributes: true,
|
|
2594
|
-
characterData: true,
|
|
2595
|
-
childList: true,
|
|
2596
|
-
subtree: true
|
|
2597
|
-
});
|
|
2598
|
-
root.addEventListener("load", handleStylesheetLoad, true);
|
|
2599
|
-
for (const event of directionInvalidationEvents) {
|
|
2600
|
-
root.addEventListener(event, invalidateComputedDirections, true);
|
|
2601
|
-
}
|
|
2602
|
-
directionInvalidationRoots.set(root, { observer, count: 1 });
|
|
2603
|
-
}
|
|
2604
|
-
}
|
|
2605
|
-
current = getShadowHost(current);
|
|
2606
|
-
}
|
|
2607
|
-
return roots;
|
|
2608
|
-
}
|
|
2609
|
-
function releaseDirectionShadowRoot(root) {
|
|
2610
|
-
const existing = directionInvalidationRoots.get(root);
|
|
2611
|
-
if (!existing)
|
|
2612
|
-
return;
|
|
2613
|
-
existing.count -= 1;
|
|
2614
|
-
if (existing.count > 0)
|
|
2615
|
-
return;
|
|
2616
|
-
existing.observer?.disconnect();
|
|
2617
|
-
root.removeEventListener("load", handleStylesheetLoad, true);
|
|
2618
|
-
for (const event of directionInvalidationEvents) {
|
|
2619
|
-
root.removeEventListener(event, invalidateComputedDirections, true);
|
|
2620
|
-
}
|
|
2621
|
-
directionInvalidationRoots.delete(root);
|
|
2622
|
-
}
|
|
2623
|
-
function stopDirectionInvalidationObservers() {
|
|
2624
|
-
if (computedDirectionObservations.size > 0)
|
|
2625
|
-
return;
|
|
2626
|
-
directionInvalidationStarted = false;
|
|
2627
|
-
directionInvalidationObserver?.disconnect();
|
|
2628
|
-
directionInvalidationObserver = null;
|
|
2629
|
-
directionInvalidationDocument?.removeEventListener("load", handleStylesheetLoad, true);
|
|
2630
|
-
if (typeof window !== "undefined") {
|
|
2631
|
-
window.removeEventListener("resize", invalidateComputedDirections);
|
|
2632
|
-
window.removeEventListener("orientationchange", invalidateComputedDirections);
|
|
2633
|
-
window.removeEventListener("hashchange", invalidateComputedDirections);
|
|
2634
|
-
}
|
|
2635
|
-
for (const event of directionInvalidationEvents) {
|
|
2636
|
-
directionInvalidationDocument?.removeEventListener(event, invalidateComputedDirections, true);
|
|
2637
|
-
}
|
|
2638
|
-
for (const mediaQuery of observedMediaQueries.values()) {
|
|
2639
|
-
removeMediaQueryListener(mediaQuery);
|
|
2640
|
-
}
|
|
2641
|
-
observedMediaQueries.clear();
|
|
2642
|
-
for (const [root, { observer }] of directionInvalidationRoots) {
|
|
2643
|
-
observer?.disconnect();
|
|
2644
|
-
root.removeEventListener("load", handleStylesheetLoad, true);
|
|
2645
|
-
for (const event of directionInvalidationEvents) {
|
|
2646
|
-
root.removeEventListener(event, invalidateComputedDirections, true);
|
|
2647
|
-
}
|
|
2648
|
-
}
|
|
2649
|
-
directionInvalidationRoots.clear();
|
|
2650
|
-
if (directionInvalidationFrame !== null) {
|
|
2651
|
-
if (typeof window !== "undefined")
|
|
2652
|
-
window.cancelAnimationFrame(directionInvalidationFrame);
|
|
2653
|
-
directionInvalidationFrame = null;
|
|
2654
|
-
}
|
|
2655
|
-
directionInvalidationDocument = null;
|
|
2656
|
-
}
|
|
2657
|
-
function handleStylesheetLoad(event) {
|
|
2658
|
-
const target = event.target;
|
|
2659
|
-
if (target instanceof HTMLStyleElement || target instanceof Node && isStylesheetLink(target)) {
|
|
2660
|
-
refreshMediaQueryObservers();
|
|
2661
|
-
invalidateComputedDirections();
|
|
2662
|
-
}
|
|
2663
|
-
}
|
|
2664
|
-
function observeComputedDirection(source, sync, rebindInheritedAttributes) {
|
|
2665
|
-
if (typeof getComputedStyle !== "function" || typeof window === "undefined" || typeof document === "undefined") {
|
|
2666
|
-
return () => {};
|
|
2667
|
-
}
|
|
2668
|
-
const observation = {
|
|
2669
|
-
source,
|
|
2670
|
-
direction: getComputedStyle(source).direction,
|
|
2671
|
-
sync,
|
|
2672
|
-
rebindInheritedAttributes,
|
|
2673
|
-
roots: [],
|
|
2674
|
-
resizeObserver: null,
|
|
2675
|
-
resizeObservedElements: []
|
|
2676
|
-
};
|
|
2677
|
-
computedDirectionObservations.add(observation);
|
|
2678
|
-
startDirectionInvalidationObservers();
|
|
2679
|
-
observation.roots = observeDirectionShadowRoots(source);
|
|
2680
|
-
refreshMediaQueryObservers();
|
|
2681
|
-
rebindResizeObservation(observation, collectResizeObservedElements(source));
|
|
2682
|
-
return () => {
|
|
2683
|
-
computedDirectionObservations.delete(observation);
|
|
2684
|
-
observation.resizeObserver?.disconnect();
|
|
2685
|
-
for (const root of observation.roots)
|
|
2686
|
-
releaseDirectionShadowRoot(root);
|
|
2687
|
-
if (computedDirectionObservations.size === 0) {
|
|
2688
|
-
stopDirectionInvalidationObservers();
|
|
2689
|
-
} else {
|
|
2690
|
-
refreshMediaQueryObservers();
|
|
2691
|
-
}
|
|
2692
|
-
};
|
|
2693
|
-
}
|
|
2694
|
-
function collectDirectionShadowRoots(source) {
|
|
2695
|
-
const roots = [];
|
|
2696
|
-
let current = source;
|
|
2697
|
-
while (current) {
|
|
2698
|
-
const root = current.getRootNode();
|
|
2699
|
-
if (root instanceof ShadowRoot && !roots.includes(root))
|
|
2700
|
-
roots.push(root);
|
|
2701
|
-
current = getShadowHost(current);
|
|
2702
|
-
}
|
|
2703
|
-
return roots;
|
|
2704
|
-
}
|
|
2705
|
-
function collectResizeObservedElements(source) {
|
|
2706
|
-
const elements = [];
|
|
2707
|
-
let current = source;
|
|
2708
|
-
while (current) {
|
|
2709
|
-
elements.push(current);
|
|
2710
|
-
current = current.parentElement ?? getShadowHost(current);
|
|
2711
|
-
}
|
|
2712
|
-
return elements;
|
|
2713
|
-
}
|
|
2714
|
-
function rebindResizeObservation(observation, nextElements) {
|
|
2715
|
-
if (observation.resizeObservedElements.length === nextElements.length && observation.resizeObservedElements.every((element, index) => element === nextElements[index]))
|
|
2716
|
-
return false;
|
|
2717
|
-
observation.resizeObserver?.disconnect();
|
|
2718
|
-
observation.resizeObserver = null;
|
|
2719
|
-
observation.resizeObservedElements = nextElements;
|
|
2720
|
-
if (typeof ResizeObserver === "undefined")
|
|
2721
|
-
return true;
|
|
2722
|
-
const resizeObserver = new ResizeObserver(invalidateComputedDirections);
|
|
2723
|
-
for (const element of nextElements)
|
|
2724
|
-
resizeObserver.observe(element);
|
|
2725
|
-
observation.resizeObserver = resizeObserver;
|
|
2726
|
-
return true;
|
|
2727
|
-
}
|
|
2728
|
-
function rebindComputedDirectionObservation(observation) {
|
|
2729
|
-
const nextRoots = collectDirectionShadowRoots(observation.source);
|
|
2730
|
-
const rootsChanged = nextRoots.length !== observation.roots.length || nextRoots.some((root, index) => root !== observation.roots[index]);
|
|
2731
|
-
if (rootsChanged) {
|
|
2732
|
-
for (const root of observation.roots)
|
|
2733
|
-
releaseDirectionShadowRoot(root);
|
|
2734
|
-
observation.roots = observeDirectionShadowRoots(observation.source);
|
|
2735
|
-
}
|
|
2736
|
-
const resizeChanged = rebindResizeObservation(observation, collectResizeObservedElements(observation.source));
|
|
2737
|
-
return rootsChanged || resizeChanged;
|
|
2738
|
-
}
|
|
2739
|
-
function createPortalAttachment(options = {}) {
|
|
2740
|
-
let lastWarnedUnresolvedKey = null;
|
|
2741
|
-
return (element) => {
|
|
2742
|
-
const initialParent = element.parentElement;
|
|
2743
|
-
const initialAttributes = {
|
|
2744
|
-
dir: element.getAttribute("dir"),
|
|
2745
|
-
lang: element.getAttribute("lang"),
|
|
2746
|
-
dataTheme: element.getAttribute("data-theme"),
|
|
2747
|
-
theme: element.getAttribute("data-cinder-theme")
|
|
2748
|
-
};
|
|
2749
|
-
const preserveInitialDirection = options.explicitAttributes === undefined;
|
|
2750
|
-
const managedAttributes = { dir: null, lang: null, dataTheme: null, theme: null };
|
|
2751
|
-
function currentFallbackAttributes() {
|
|
2752
|
-
const explicitAttributes = readOption(options.explicitAttributes ?? {});
|
|
2753
|
-
const explicitDirection = explicitAttributes.dir;
|
|
2754
|
-
const explicitLanguage = explicitAttributes.lang;
|
|
2755
|
-
const explicitDataTheme = explicitAttributes.dataTheme;
|
|
2756
|
-
const explicitTheme = explicitAttributes.theme;
|
|
2757
|
-
const direction = element.getAttribute("dir");
|
|
2758
|
-
const language = element.getAttribute("lang");
|
|
2759
|
-
const dataTheme = element.getAttribute("data-theme");
|
|
2760
|
-
const theme = element.getAttribute("data-cinder-theme");
|
|
2761
|
-
return {
|
|
2762
|
-
dir: explicitDirection !== undefined ? explicitDirection : direction !== managedAttributes.dir ? direction : preserveInitialDirection ? initialAttributes.dir : null,
|
|
2763
|
-
preserveDirection: explicitDirection !== undefined || preserveInitialDirection && initialAttributes.dir !== null,
|
|
2764
|
-
lang: explicitLanguage !== undefined ? explicitLanguage : language !== managedAttributes.lang ? language : null,
|
|
2765
|
-
preserveLanguage: explicitLanguage !== undefined,
|
|
2766
|
-
dataTheme: explicitDataTheme !== undefined ? explicitDataTheme : dataTheme !== managedAttributes.dataTheme ? dataTheme : null,
|
|
2767
|
-
preserveDataTheme: explicitDataTheme !== undefined,
|
|
2768
|
-
theme: explicitTheme !== undefined ? explicitTheme : theme !== managedAttributes.theme ? theme : null,
|
|
2769
|
-
preserveTheme: explicitTheme !== undefined
|
|
2770
|
-
};
|
|
2771
|
-
}
|
|
2772
|
-
function syncInheritedAttributes(source, inheritAttributes) {
|
|
2773
|
-
const nextManagedAttributes = copyInheritedPortalAttributes(element, source, inheritAttributes, currentFallbackAttributes());
|
|
2774
|
-
managedAttributes.dir = nextManagedAttributes.dir;
|
|
2775
|
-
managedAttributes.lang = nextManagedAttributes.lang;
|
|
2776
|
-
managedAttributes.dataTheme = nextManagedAttributes.dataTheme;
|
|
2777
|
-
managedAttributes.theme = nextManagedAttributes.theme;
|
|
2778
|
-
}
|
|
2779
|
-
const anchor = typeof document !== "undefined" ? document.createComment("@lostgradient/cinder/portal") : null;
|
|
2780
|
-
if (anchor && initialParent && element.parentNode === initialParent) {
|
|
2781
|
-
initialParent.insertBefore(anchor, element);
|
|
2782
|
-
}
|
|
2783
|
-
function restoreInline() {
|
|
2784
|
-
if (!anchor || !anchor.parentNode)
|
|
2785
|
-
return;
|
|
2786
|
-
if (element.parentNode === anchor.parentNode && element.previousSibling === anchor)
|
|
2787
|
-
return;
|
|
2788
|
-
anchor.parentNode.insertBefore(element, anchor.nextSibling);
|
|
2789
|
-
}
|
|
2790
|
-
let activeAttributeSource = null;
|
|
2791
|
-
let activeInheritAttributes = false;
|
|
2792
|
-
$2.user_effect(() => {
|
|
2793
|
-
readOption(options.explicitAttributes ?? {});
|
|
2794
|
-
untrack(() => syncInheritedAttributes(activeAttributeSource, activeInheritAttributes));
|
|
2795
|
-
});
|
|
2796
|
-
$2.user_effect(() => {
|
|
2797
|
-
let stopObservingInheritedAttributes = null;
|
|
2798
|
-
const disabled = readOption(options.disabled ?? false);
|
|
2799
|
-
const inheritAttributes = readOption(options.inheritAttributes ?? true);
|
|
2800
|
-
const targetValue = readOption(options.target ?? null);
|
|
2801
|
-
const attributeSource = readOption(options.source ?? initialParent) ?? initialParent;
|
|
2802
|
-
const rawResolved = disabled ? null : resolvePortalTarget(targetValue);
|
|
2803
|
-
const resolved = rawResolved?.kind === "resolved" && (rawResolved.target === element || element.contains(rawResolved.target)) ? { kind: "unresolved", key: "own-wrapper" } : rawResolved;
|
|
2804
|
-
if (!disabled && resolved?.kind === "resolved") {
|
|
2805
|
-
activeAttributeSource = attributeSource;
|
|
2806
|
-
activeInheritAttributes = inheritAttributes;
|
|
2807
|
-
untrack(() => syncInheritedAttributes(attributeSource, inheritAttributes));
|
|
2808
|
-
stopObservingInheritedAttributes = observeInheritedPortalAttributes(attributeSource, inheritAttributes, () => syncInheritedAttributes(attributeSource, inheritAttributes));
|
|
2809
|
-
if (element.parentElement !== resolved.target) {
|
|
2810
|
-
resolved.target.appendChild(element);
|
|
2811
|
-
}
|
|
2812
|
-
lastWarnedUnresolvedKey = null;
|
|
2813
|
-
} else if (!disabled && resolved?.kind === "unresolved") {
|
|
2814
|
-
restoreInline();
|
|
2815
|
-
activeAttributeSource = null;
|
|
2816
|
-
activeInheritAttributes = false;
|
|
2817
|
-
untrack(() => syncInheritedAttributes(null, false));
|
|
2818
|
-
if (lastWarnedUnresolvedKey !== resolved.key) {
|
|
2819
|
-
devWarn(`[cinder/portal] could not resolve portal target ${JSON.stringify(resolved.key)}.`);
|
|
2820
|
-
lastWarnedUnresolvedKey = resolved.key;
|
|
2821
|
-
}
|
|
2822
|
-
} else if (disabled) {
|
|
2823
|
-
restoreInline();
|
|
2824
|
-
activeAttributeSource = null;
|
|
2825
|
-
activeInheritAttributes = false;
|
|
2826
|
-
untrack(() => syncInheritedAttributes(null, false));
|
|
2827
|
-
lastWarnedUnresolvedKey = null;
|
|
2828
|
-
}
|
|
2829
|
-
return () => {
|
|
2830
|
-
stopObservingInheritedAttributes?.();
|
|
2831
|
-
};
|
|
2832
|
-
});
|
|
2833
|
-
return () => {
|
|
2834
|
-
element.remove();
|
|
2835
|
-
if (anchor && anchor.parentNode) {
|
|
2836
|
-
anchor.parentNode.removeChild(anchor);
|
|
2837
|
-
}
|
|
2838
|
-
};
|
|
2839
|
-
};
|
|
2840
|
-
}
|
|
2841
|
-
|
|
2842
|
-
// src/components/portal/portal.svelte
|
|
2843
|
-
var rest_excludes = new Set([
|
|
2844
|
-
"$$slots",
|
|
2845
|
-
"$$events",
|
|
2846
|
-
"$$legacy",
|
|
2847
|
-
"target",
|
|
2848
|
-
"disabled",
|
|
2849
|
-
"class",
|
|
2850
|
-
"inheritAttributes",
|
|
2851
|
-
"children"
|
|
2852
|
-
]);
|
|
2853
|
-
var root = $3.from_html(`<div><!></div>`);
|
|
2854
|
-
function Portal($$anchor, $$props) {
|
|
2855
|
-
$3.push($$props, true);
|
|
2856
|
-
let target = $3.prop($$props, "target", 3, null), disabled = $3.prop($$props, "disabled", 3, false), inheritAttributes = $3.prop($$props, "inheritAttributes", 3, true), rest = $3.rest_props($$props, rest_excludes);
|
|
2857
|
-
let hasHydrated = $3.state(false);
|
|
2858
|
-
$3.user_effect(() => {
|
|
2859
|
-
$3.set(hasHydrated, true);
|
|
2860
|
-
});
|
|
2861
|
-
const resolvedTarget = $3.derived(() => !disabled() ? resolvePortalTarget(target()) : null);
|
|
2862
|
-
const shouldRenderChildren = $3.derived(() => disabled() || $3.get(hasHydrated) && $3.get(resolvedTarget) !== null);
|
|
2863
|
-
const portalAttachment = createPortalAttachment({
|
|
2864
|
-
target: () => target(),
|
|
2865
|
-
disabled: () => disabled(),
|
|
2866
|
-
inheritAttributes: () => inheritAttributes(),
|
|
2867
|
-
explicitAttributes: () => ({
|
|
2868
|
-
dir: $$props.dir,
|
|
2869
|
-
lang: $$props.lang,
|
|
2870
|
-
dataTheme: rest["data-theme"],
|
|
2871
|
-
theme: rest["data-cinder-theme"]
|
|
2872
|
-
})
|
|
2873
|
-
});
|
|
2874
|
-
var div = root();
|
|
2875
|
-
$3.attribute_effect(div, ($0) => ({ class: $0, ...rest }), [() => classNames($$props.class)]);
|
|
2876
|
-
var node = $3.child(div);
|
|
2877
|
-
{
|
|
2878
|
-
var consequent = ($$anchor2) => {
|
|
2879
|
-
var fragment = $3.comment();
|
|
2880
|
-
var node_1 = $3.first_child(fragment);
|
|
2881
|
-
$3.snippet(node_1, () => $$props.children);
|
|
2882
|
-
$3.append($$anchor2, fragment);
|
|
2883
|
-
};
|
|
2884
|
-
$3.if(node, ($$render) => {
|
|
2885
|
-
if ($3.get(shouldRenderChildren))
|
|
2886
|
-
$$render(consequent);
|
|
2887
|
-
});
|
|
2888
|
-
}
|
|
2889
|
-
$3.reset(div);
|
|
2890
|
-
$3.attach(div, () => portalAttachment);
|
|
2891
|
-
$3.append($$anchor, div);
|
|
2892
|
-
$3.pop();
|
|
2893
|
-
}
|
|
2894
|
-
|
|
2895
|
-
// src/components/portal/index.ts
|
|
2896
|
-
var portal_default = Portal;
|
|
2897
|
-
// src/components/team-section/index.ts
|
|
2898
|
-
import"@lostgradient/cinder/team-section/styles";
|
|
2899
|
-
|
|
2900
|
-
// src/components/team-section/team-section.svelte
|
|
2901
|
-
import"svelte/internal/disclose-version";
|
|
2902
|
-
import * as $14 from "svelte/internal/client";
|
|
2903
|
-
|
|
2904
|
-
// src/components/_internal/person-byline.svelte
|
|
2905
|
-
import"svelte/internal/disclose-version";
|
|
2906
|
-
import * as $4 from "svelte/internal/client";
|
|
2907
|
-
import Avatar from "@lostgradient/cinder/avatar";
|
|
2908
|
-
var root2 = $4.from_html(`<p class="cinder-person-byline__role"> </p>`);
|
|
2909
|
-
var root_1 = $4.from_html(`<div class="cinder-person-byline"><!> <div class="cinder-person-byline__meta"><p class="cinder-person-byline__name"> </p> <!></div></div>`);
|
|
2910
|
-
function Person_byline($$anchor, $$props) {
|
|
2911
|
-
let avatarSize = $4.prop($$props, "avatarSize", 3, "sm");
|
|
2912
|
-
var div = root_1();
|
|
2913
|
-
var node = $4.child(div);
|
|
2914
|
-
Avatar(node, $4.spread_props(() => $$props.avatarSrc ? { name: $$props.name, src: $$props.avatarSrc } : { name: $$props.name }, {
|
|
2915
|
-
get size() {
|
|
2916
|
-
return avatarSize();
|
|
2917
|
-
}
|
|
2918
|
-
}));
|
|
2919
|
-
var div_1 = $4.sibling(node, 2);
|
|
2920
|
-
var p = $4.child(div_1);
|
|
2921
|
-
var text = $4.child(p, true);
|
|
2922
|
-
$4.reset(p);
|
|
2923
|
-
var node_1 = $4.sibling(p, 2);
|
|
2924
|
-
{
|
|
2925
|
-
var consequent = ($$anchor2) => {
|
|
2926
|
-
var p_1 = root2();
|
|
2927
|
-
var text_1 = $4.child(p_1, true);
|
|
2928
|
-
$4.reset(p_1);
|
|
2929
|
-
$4.template_effect(() => $4.set_text(text_1, $$props.role));
|
|
2930
|
-
$4.append($$anchor2, p_1);
|
|
2931
|
-
};
|
|
2932
|
-
$4.if(node_1, ($$render) => {
|
|
2933
|
-
if ($$props.role)
|
|
2934
|
-
$$render(consequent);
|
|
2935
|
-
});
|
|
2936
|
-
}
|
|
2937
|
-
$4.reset(div_1);
|
|
2938
|
-
$4.reset(div);
|
|
2939
|
-
$4.template_effect(() => $4.set_text(text, $$props.name));
|
|
2940
|
-
$4.append($$anchor, div);
|
|
2941
|
-
}
|
|
2942
|
-
|
|
2943
|
-
// src/components/avatar-group/avatar-group.svelte
|
|
2944
|
-
import"svelte/internal/disclose-version";
|
|
2945
|
-
import * as $9 from "svelte/internal/client";
|
|
2946
|
-
|
|
2947
|
-
// src/components/avatar/avatar.svelte
|
|
2948
|
-
import"svelte/internal/disclose-version";
|
|
2949
|
-
import * as $6 from "svelte/internal/client";
|
|
2950
|
-
|
|
2951
|
-
// src/components/visually-hidden/visually-hidden.svelte
|
|
2952
|
-
import"svelte/internal/disclose-version";
|
|
2953
|
-
import * as $5 from "svelte/internal/client";
|
|
2954
|
-
var rest_excludes2 = new Set([
|
|
2955
|
-
"$$slots",
|
|
2956
|
-
"$$events",
|
|
2957
|
-
"$$legacy",
|
|
2958
|
-
"as",
|
|
2959
|
-
"focusable",
|
|
2960
|
-
"class",
|
|
2961
|
-
"children"
|
|
2962
|
-
]);
|
|
2963
|
-
function Visually_hidden($$anchor, $$props) {
|
|
2964
|
-
$5.push($$props, true);
|
|
2965
|
-
let as = $5.prop($$props, "as", 3, "span"), focusable = $5.prop($$props, "focusable", 3, false), rest = $5.rest_props($$props, rest_excludes2);
|
|
2966
|
-
const mergedClass = $5.derived(() => classNames("cinder-sr-only", focusable() && "cinder-sr-only-focusable", $$props.class));
|
|
2967
|
-
var fragment = $5.comment();
|
|
2968
|
-
var node = $5.first_child(fragment);
|
|
2969
|
-
$5.element(node, as, false, ($$element, $$anchor2) => {
|
|
2970
|
-
$5.attribute_effect($$element, () => ({ class: $5.get(mergedClass), ...rest }));
|
|
2971
|
-
var fragment_1 = $5.comment();
|
|
2972
|
-
var node_1 = $5.first_child(fragment_1);
|
|
2973
|
-
$5.snippet(node_1, () => $$props.children ?? $5.noop);
|
|
2974
|
-
$5.append($$anchor2, fragment_1);
|
|
2975
|
-
});
|
|
2976
|
-
$5.append($$anchor, fragment);
|
|
2977
|
-
$5.pop();
|
|
2978
|
-
}
|
|
2979
|
-
|
|
2980
|
-
// src/components/avatar/avatar.svelte
|
|
2981
|
-
var rest_excludes3 = new Set([
|
|
2982
|
-
"$$slots",
|
|
2983
|
-
"$$events",
|
|
2984
|
-
"$$legacy",
|
|
2985
|
-
"src",
|
|
2986
|
-
"alt",
|
|
2987
|
-
"name",
|
|
2988
|
-
"size",
|
|
2989
|
-
"shape",
|
|
2990
|
-
"class"
|
|
2991
|
-
]);
|
|
2992
|
-
var root3 = $6.from_html(`<img class="cinder-avatar__image"/>`);
|
|
2993
|
-
var root_12 = $6.from_html(`<span class="cinder-avatar__initials" aria-hidden="true"> </span> <!>`, 1);
|
|
2994
|
-
var root_2 = $6.from_html(`<span aria-hidden="true" class="cinder-avatar__placeholder"></span>`);
|
|
2995
|
-
var root_3 = $6.from_html(`<span><!></span>`);
|
|
2996
|
-
function Avatar2($$anchor, $$props) {
|
|
2997
|
-
$6.push($$props, true);
|
|
2998
|
-
let size = $6.prop($$props, "size", 3, "md"), shape = $6.prop($$props, "shape", 3, "circle"), rest = $6.rest_props($$props, rest_excludes3);
|
|
2999
|
-
let failedSource = $6.state(null);
|
|
3000
|
-
const showImage = $6.derived(() => !!$$props.src && $6.get(failedSource) !== $$props.src);
|
|
3001
|
-
const accessibleAlt = $6.derived(() => $$props.alt ?? $$props.name ?? "");
|
|
3002
|
-
const initials = $6.derived(() => computeInitials($$props.name));
|
|
3003
|
-
function computeInitials(value) {
|
|
3004
|
-
if (!value)
|
|
3005
|
-
return "";
|
|
3006
|
-
const parts = value.trim().split(/\s+/).slice(0, 2);
|
|
3007
|
-
return parts.map((part) => part.charAt(0).toUpperCase()).join("");
|
|
3008
|
-
}
|
|
3009
|
-
var span = root_3();
|
|
3010
|
-
$6.attribute_effect(span, ($0) => ({
|
|
3011
|
-
class: $0,
|
|
3012
|
-
"data-cinder-size": size(),
|
|
3013
|
-
"data-cinder-shape": shape(),
|
|
3014
|
-
...rest
|
|
3015
|
-
}), [() => classNames("cinder-avatar", $$props.class)]);
|
|
3016
|
-
var node = $6.child(span);
|
|
3017
|
-
{
|
|
3018
|
-
var consequent = ($$anchor2) => {
|
|
3019
|
-
var img = root3();
|
|
3020
|
-
$6.template_effect(() => {
|
|
3021
|
-
$6.set_attribute(img, "src", $$props.src);
|
|
3022
|
-
$6.set_attribute(img, "alt", $6.get(accessibleAlt));
|
|
3023
|
-
});
|
|
3024
|
-
$6.event("error", img, () => {
|
|
3025
|
-
$6.set(failedSource, $$props.src ?? null, true);
|
|
3026
|
-
});
|
|
3027
|
-
$6.replay_events(img);
|
|
3028
|
-
$6.append($$anchor2, img);
|
|
3029
|
-
};
|
|
3030
|
-
var consequent_2 = ($$anchor2) => {
|
|
3031
|
-
var fragment = root_12();
|
|
3032
|
-
var span_1 = $6.first_child(fragment);
|
|
3033
|
-
var text2 = $6.child(span_1, true);
|
|
3034
|
-
$6.reset(span_1);
|
|
3035
|
-
var node_1 = $6.sibling(span_1, 2);
|
|
3036
|
-
{
|
|
3037
|
-
var consequent_1 = ($$anchor3) => {
|
|
3038
|
-
Visually_hidden($$anchor3, {
|
|
3039
|
-
children: ($$anchor4, $$slotProps) => {
|
|
3040
|
-
$6.next();
|
|
3041
|
-
var text_1 = $6.text();
|
|
3042
|
-
$6.template_effect(() => $6.set_text(text_1, $6.get(accessibleAlt)));
|
|
3043
|
-
$6.append($$anchor4, text_1);
|
|
3044
|
-
},
|
|
3045
|
-
$$slots: { default: true }
|
|
3046
|
-
});
|
|
3047
|
-
};
|
|
3048
|
-
$6.if(node_1, ($$render) => {
|
|
3049
|
-
if ($6.get(accessibleAlt))
|
|
3050
|
-
$$render(consequent_1);
|
|
3051
|
-
});
|
|
3052
|
-
}
|
|
3053
|
-
$6.template_effect(() => $6.set_text(text2, $6.get(initials)));
|
|
3054
|
-
$6.append($$anchor2, fragment);
|
|
3055
|
-
};
|
|
3056
|
-
var alternate = ($$anchor2) => {
|
|
3057
|
-
var span_2 = root_2();
|
|
3058
|
-
$6.append($$anchor2, span_2);
|
|
3059
|
-
};
|
|
3060
|
-
$6.if(node, ($$render) => {
|
|
3061
|
-
if ($6.get(showImage))
|
|
3062
|
-
$$render(consequent);
|
|
3063
|
-
else if ($6.get(initials))
|
|
3064
|
-
$$render(consequent_2, 1);
|
|
3065
|
-
else
|
|
3066
|
-
$$render(alternate, -1);
|
|
3067
|
-
});
|
|
3068
|
-
}
|
|
3069
|
-
$6.reset(span);
|
|
3070
|
-
$6.append($$anchor, span);
|
|
3071
|
-
$6.pop();
|
|
3072
|
-
}
|
|
3073
|
-
|
|
3074
|
-
// src/components/tooltip/tooltip.svelte
|
|
3075
|
-
import"svelte/internal/disclose-version";
|
|
3076
|
-
import * as $8 from "svelte/internal/client";
|
|
3077
|
-
import { onDestroy } from "svelte";
|
|
3078
|
-
|
|
3079
|
-
// src/_internal/anchored-overlay.svelte.ts
|
|
3080
|
-
import * as $7 from "svelte/internal/client";
|
|
3081
|
-
var DEFAULT_PLACEMENT = "bottom-start";
|
|
3082
|
-
var DEFAULT_OFFSET = 8;
|
|
3083
|
-
var DEFAULT_SHIFT_PADDING = 8;
|
|
3084
|
-
var DEFAULT_ARROW_PADDING = 6;
|
|
3085
|
-
function getAnchoredOverlayWidthStyle(widthMode, anchorRect) {
|
|
3086
|
-
if (widthMode === "none")
|
|
3087
|
-
return "";
|
|
3088
|
-
if (widthMode === "match-anchor") {
|
|
3089
|
-
const width = Math.max(0, anchorRect?.width ?? 0);
|
|
3090
|
-
return width > 0 ? `min-inline-size: ${width}px; inline-size: ${width}px;` : "";
|
|
3091
|
-
}
|
|
3092
|
-
if (widthMode === "menu") {
|
|
3093
|
-
return [
|
|
3094
|
-
"inline-size: max-content;",
|
|
3095
|
-
"min-inline-size: min(12rem, calc(100vw - var(--cinder-space-4)));",
|
|
3096
|
-
"max-inline-size: min(24rem, calc(100vw - var(--cinder-space-4)));"
|
|
3097
|
-
].join(" ");
|
|
3098
|
-
}
|
|
3099
|
-
return "max-inline-size: min(28rem, calc(100vw - var(--cinder-space-4)));";
|
|
3100
|
-
}
|
|
3101
|
-
function getAnchoredOverlayAvailableHeightStyle(availableHeight) {
|
|
3102
|
-
return `${Math.max(0, availableHeight)}px`;
|
|
3103
|
-
}
|
|
3104
|
-
function getAnchoredOverlayMaxBlockSizeStyle(availableHeight, maximumBlockSize) {
|
|
3105
|
-
return `min(${maximumBlockSize}, ${getAnchoredOverlayAvailableHeightStyle(availableHeight)})`;
|
|
3106
|
-
}
|
|
3107
|
-
function applyAnchoredOverlayMaxBlockSize(panel, availableHeight, maximumBlockSize) {
|
|
3108
|
-
const value = getAnchoredOverlayMaxBlockSizeStyle(availableHeight, maximumBlockSize);
|
|
3109
|
-
panel.style.maxBlockSize = value;
|
|
3110
|
-
return value;
|
|
3111
|
-
}
|
|
3112
|
-
function isAnchoredOverlayWriteCurrent(positioningGeneration, latestGeneration, cancelled) {
|
|
3113
|
-
return !cancelled && positioningGeneration === latestGeneration;
|
|
3114
|
-
}
|
|
3115
|
-
function getArrowStyle(data) {
|
|
3116
|
-
if (!data)
|
|
3117
|
-
return "";
|
|
3118
|
-
return [
|
|
3119
|
-
data.x != null ? `left: ${data.x}px;` : "",
|
|
3120
|
-
data.y != null ? `top: ${data.y}px;` : ""
|
|
3121
|
-
].filter(Boolean).join(" ");
|
|
3122
|
-
}
|
|
3123
|
-
function reportAnchoredOverlaySetupError(error) {
|
|
3124
|
-
if (typeof globalThis.reportError === "function") {
|
|
3125
|
-
globalThis.reportError(error);
|
|
3126
|
-
return;
|
|
3127
|
-
}
|
|
3128
|
-
setTimeout(() => {
|
|
3129
|
-
throw error;
|
|
3130
|
-
}, 0);
|
|
3131
|
-
}
|
|
3132
|
-
var floatingUiModulePromise;
|
|
3133
|
-
function cacheFloatingUiModule(load) {
|
|
3134
|
-
floatingUiModulePromise ??= load().catch((error) => {
|
|
3135
|
-
floatingUiModulePromise = undefined;
|
|
3136
|
-
throw error;
|
|
3137
|
-
});
|
|
3138
|
-
return floatingUiModulePromise;
|
|
3139
|
-
}
|
|
3140
|
-
function createAnchoredOverlay(options) {
|
|
3141
|
-
let positionReady = $7.state(false);
|
|
3142
|
-
let positionStyle = $7.state("");
|
|
3143
|
-
let availableHeightStyle = $7.state("");
|
|
3144
|
-
let resolvedPlacement = $7.state($7.proxy(options.placement?.() ?? DEFAULT_PLACEMENT));
|
|
3145
|
-
let arrowStyle = $7.state("");
|
|
3146
|
-
$7.user_effect(() => {
|
|
3147
|
-
const anchor = options.anchor();
|
|
3148
|
-
const panel = options.panel();
|
|
3149
|
-
if (!anchor || !panel)
|
|
3150
|
-
return;
|
|
3151
|
-
cacheFloatingUiModule(() => Promise.resolve().then(() => (init_floating_ui_dom(), exports_floating_ui_dom))).catch(() => {});
|
|
3152
|
-
});
|
|
3153
|
-
$7.user_effect(() => {
|
|
3154
|
-
if (!options.open()) {
|
|
3155
|
-
$7.set(positionReady, false);
|
|
3156
|
-
$7.set(positionStyle, "");
|
|
3157
|
-
$7.set(availableHeightStyle, "");
|
|
3158
|
-
$7.set(arrowStyle, "");
|
|
3159
|
-
$7.set(resolvedPlacement, options.placement?.() ?? DEFAULT_PLACEMENT, true);
|
|
3160
|
-
return;
|
|
3161
|
-
}
|
|
3162
|
-
const anchor = options.anchor();
|
|
3163
|
-
const panel = options.panel();
|
|
3164
|
-
if (!anchor || !panel) {
|
|
3165
|
-
$7.set(positionReady, false);
|
|
3166
|
-
$7.set(positionStyle, "");
|
|
3167
|
-
$7.set(availableHeightStyle, "");
|
|
3168
|
-
$7.set(arrowStyle, "");
|
|
3169
|
-
return;
|
|
3170
|
-
}
|
|
3171
|
-
const placement = options.placement?.() ?? DEFAULT_PLACEMENT;
|
|
3172
|
-
const offset3 = options.offset?.() ?? DEFAULT_OFFSET;
|
|
3173
|
-
const shiftPadding = options.shiftPadding?.() ?? DEFAULT_SHIFT_PADDING;
|
|
3174
|
-
const shiftCrossAxis = options.shiftCrossAxis?.() ?? false;
|
|
3175
|
-
const arrowPadding = options.arrowPadding?.() ?? DEFAULT_ARROW_PADDING;
|
|
3176
|
-
const arrow3 = options.arrow?.();
|
|
3177
|
-
const arrowVisible = options.arrowVisible?.() ?? Boolean(arrow3);
|
|
3178
|
-
const sizeEnabled = options.size?.() ?? false;
|
|
3179
|
-
const sizeMaxBlockSize = options.sizeMaxBlockSize?.() ?? "100%";
|
|
3180
|
-
const widthMode = options.widthMode?.() ?? "content";
|
|
3181
|
-
const strategyOverride = options.strategy?.();
|
|
3182
|
-
const boundary = options.boundary?.() ?? undefined;
|
|
3183
|
-
let cancelled = false;
|
|
3184
|
-
let generation = 0;
|
|
3185
|
-
let stopAutoUpdate;
|
|
3186
|
-
let boundaryResizeObserver;
|
|
3187
|
-
(async () => {
|
|
3188
|
-
const {
|
|
3189
|
-
arrow: arrowMiddleware,
|
|
3190
|
-
autoUpdate: autoUpdate2,
|
|
3191
|
-
computePosition: computePosition3,
|
|
3192
|
-
flip: flip3,
|
|
3193
|
-
offset: offsetMiddleware,
|
|
3194
|
-
size: sizeMiddleware,
|
|
3195
|
-
shift: shift3
|
|
3196
|
-
} = await cacheFloatingUiModule(() => Promise.resolve().then(() => (init_floating_ui_dom(), exports_floating_ui_dom)));
|
|
3197
|
-
if (cancelled)
|
|
3198
|
-
return;
|
|
3199
|
-
const updatePosition = async () => {
|
|
3200
|
-
if (cancelled)
|
|
3201
|
-
return;
|
|
3202
|
-
const currentGeneration = ++generation;
|
|
3203
|
-
if (!sizeEnabled) {
|
|
3204
|
-
$7.set(availableHeightStyle, "");
|
|
3205
|
-
panel.style.removeProperty("max-block-size");
|
|
3206
|
-
}
|
|
3207
|
-
const middleware = [
|
|
3208
|
-
offsetMiddleware(offset3),
|
|
3209
|
-
flip3(boundary ? { boundary } : undefined)
|
|
3210
|
-
];
|
|
3211
|
-
if (sizeEnabled) {
|
|
3212
|
-
middleware.push(sizeMiddleware({
|
|
3213
|
-
...boundary ? { boundary } : {},
|
|
3214
|
-
padding: shiftPadding,
|
|
3215
|
-
apply({ availableHeight }) {
|
|
3216
|
-
if (!isAnchoredOverlayWriteCurrent(currentGeneration, generation, cancelled))
|
|
3217
|
-
return;
|
|
3218
|
-
$7.set(availableHeightStyle, applyAnchoredOverlayMaxBlockSize(panel, availableHeight, sizeMaxBlockSize), true);
|
|
3219
|
-
}
|
|
3220
|
-
}));
|
|
3221
|
-
}
|
|
3222
|
-
middleware.push(shift3({
|
|
3223
|
-
...boundary ? { boundary } : {},
|
|
3224
|
-
padding: shiftPadding,
|
|
3225
|
-
crossAxis: shiftCrossAxis
|
|
3226
|
-
}));
|
|
3227
|
-
if (arrowVisible && arrow3) {
|
|
3228
|
-
middleware.push(arrowMiddleware({ element: arrow3, padding: arrowPadding }));
|
|
3229
|
-
}
|
|
3230
|
-
let result;
|
|
3231
|
-
const strategy = strategyOverride ?? (panel.closest("dialog") ? "absolute" : "fixed");
|
|
3232
|
-
try {
|
|
3233
|
-
result = await computePosition3(anchor, panel, { placement, middleware, strategy });
|
|
3234
|
-
} catch {
|
|
3235
|
-
if (cancelled || currentGeneration !== generation)
|
|
3236
|
-
return;
|
|
3237
|
-
$7.set(positionReady, false);
|
|
3238
|
-
$7.set(positionStyle, "");
|
|
3239
|
-
$7.set(arrowStyle, "");
|
|
3240
|
-
$7.set(resolvedPlacement, placement, true);
|
|
3241
|
-
return;
|
|
3242
|
-
}
|
|
3243
|
-
if (cancelled || currentGeneration !== generation)
|
|
3244
|
-
return;
|
|
3245
|
-
const widthStyle = getAnchoredOverlayWidthStyle(widthMode, anchor.getBoundingClientRect());
|
|
3246
|
-
$7.set(positionStyle, [
|
|
3247
|
-
`position: ${strategy};`,
|
|
3248
|
-
`left: ${result.x}px;`,
|
|
3249
|
-
`top: ${result.y}px;`,
|
|
3250
|
-
$7.get(availableHeightStyle) ? `max-block-size: ${$7.get(availableHeightStyle)};` : "",
|
|
3251
|
-
widthStyle
|
|
3252
|
-
].filter(Boolean).join(" "), true);
|
|
3253
|
-
$7.set(resolvedPlacement, result.placement, true);
|
|
3254
|
-
$7.set(arrowStyle, arrowVisible ? getArrowStyle(result.middlewareData.arrow) : "", true);
|
|
3255
|
-
$7.set(positionReady, true);
|
|
3256
|
-
};
|
|
3257
|
-
stopAutoUpdate = autoUpdate2(anchor, panel, updatePosition);
|
|
3258
|
-
if (boundary && boundary !== anchor && boundary !== panel && typeof ResizeObserver !== "undefined") {
|
|
3259
|
-
boundaryResizeObserver = new ResizeObserver(() => {
|
|
3260
|
-
updatePosition();
|
|
3261
|
-
});
|
|
3262
|
-
boundaryResizeObserver.observe(boundary);
|
|
3263
|
-
}
|
|
3264
|
-
})().catch((error) => {
|
|
3265
|
-
if (cancelled)
|
|
3266
|
-
return;
|
|
3267
|
-
$7.set(positionReady, false);
|
|
3268
|
-
$7.set(positionStyle, "");
|
|
3269
|
-
$7.set(availableHeightStyle, "");
|
|
3270
|
-
$7.set(arrowStyle, "");
|
|
3271
|
-
$7.set(resolvedPlacement, placement, true);
|
|
3272
|
-
reportAnchoredOverlaySetupError(error);
|
|
3273
|
-
});
|
|
3274
|
-
return () => {
|
|
3275
|
-
cancelled = true;
|
|
3276
|
-
stopAutoUpdate?.();
|
|
3277
|
-
boundaryResizeObserver?.disconnect();
|
|
3278
|
-
panel.style.removeProperty("max-block-size");
|
|
3279
|
-
$7.set(positionReady, false);
|
|
3280
|
-
$7.set(positionStyle, "");
|
|
3281
|
-
$7.set(availableHeightStyle, "");
|
|
3282
|
-
$7.set(arrowStyle, "");
|
|
3283
|
-
$7.set(resolvedPlacement, placement, true);
|
|
3284
|
-
};
|
|
3285
|
-
});
|
|
3286
|
-
return {
|
|
3287
|
-
get positionReady() {
|
|
3288
|
-
return $7.get(positionReady);
|
|
3289
|
-
},
|
|
3290
|
-
get positionStyle() {
|
|
3291
|
-
return $7.get(positionStyle);
|
|
3292
|
-
},
|
|
3293
|
-
get resolvedPlacement() {
|
|
3294
|
-
return $7.get(resolvedPlacement);
|
|
3295
|
-
},
|
|
3296
|
-
get arrowStyle() {
|
|
3297
|
-
return $7.get(arrowStyle);
|
|
3298
|
-
}
|
|
3299
|
-
};
|
|
3300
|
-
}
|
|
3301
|
-
|
|
3302
|
-
// src/_internal/overlay.ts
|
|
3303
|
-
var escapeStack = [];
|
|
3304
|
-
function pushEscapeHandler(handler) {
|
|
3305
|
-
escapeStack.push(handler);
|
|
3306
|
-
if (escapeStack.length === 1 && typeof window !== "undefined") {
|
|
3307
|
-
window.addEventListener("keydown", onEscapeKeydown, { capture: true });
|
|
3308
|
-
}
|
|
3309
|
-
let released = false;
|
|
3310
|
-
return () => {
|
|
3311
|
-
if (released)
|
|
3312
|
-
return;
|
|
3313
|
-
released = true;
|
|
3314
|
-
const index = escapeStack.lastIndexOf(handler);
|
|
3315
|
-
if (index !== -1)
|
|
3316
|
-
escapeStack.splice(index, 1);
|
|
3317
|
-
if (escapeStack.length === 0 && typeof window !== "undefined") {
|
|
3318
|
-
window.removeEventListener("keydown", onEscapeKeydown, { capture: true });
|
|
3319
|
-
}
|
|
3320
|
-
};
|
|
3321
|
-
}
|
|
3322
|
-
function onEscapeKeydown(event2) {
|
|
3323
|
-
if (event2.key !== "Escape")
|
|
3324
|
-
return;
|
|
3325
|
-
const handler = escapeStack.at(-1);
|
|
3326
|
-
if (!handler)
|
|
3327
|
-
return;
|
|
3328
|
-
handler(event2);
|
|
3329
|
-
}
|
|
3330
|
-
var scrollLockCount = 0;
|
|
3331
|
-
var originalBodyOverflow = null;
|
|
3332
|
-
function lockBodyScroll() {
|
|
3333
|
-
if (typeof document === "undefined")
|
|
3334
|
-
return () => {};
|
|
3335
|
-
if (scrollLockCount === 0) {
|
|
3336
|
-
originalBodyOverflow = document.body.style.overflow;
|
|
3337
|
-
document.body.style.overflow = "hidden";
|
|
3338
|
-
}
|
|
3339
|
-
scrollLockCount += 1;
|
|
3340
|
-
let released = false;
|
|
3341
|
-
return () => {
|
|
3342
|
-
if (released)
|
|
3343
|
-
return;
|
|
3344
|
-
released = true;
|
|
3345
|
-
scrollLockCount = Math.max(0, scrollLockCount - 1);
|
|
3346
|
-
if (scrollLockCount === 0) {
|
|
3347
|
-
document.body.style.overflow = originalBodyOverflow ?? "";
|
|
3348
|
-
originalBodyOverflow = null;
|
|
3349
|
-
}
|
|
3350
|
-
};
|
|
3351
|
-
}
|
|
3352
|
-
function captureFocus() {
|
|
3353
|
-
if (typeof document === "undefined")
|
|
3354
|
-
return null;
|
|
3355
|
-
const active = document.activeElement;
|
|
3356
|
-
if (active && active !== document.body && active instanceof HTMLElement) {
|
|
3357
|
-
return active;
|
|
3358
|
-
}
|
|
3359
|
-
return null;
|
|
3360
|
-
}
|
|
3361
|
-
|
|
3362
|
-
// src/components/tooltip/tooltip.svelte
|
|
3363
|
-
var root4 = $8.from_html(`<span role="tooltip"> </span>`);
|
|
3364
|
-
var root_13 = $8.from_html(`<span role="tooltip" class="cinder-tooltip"> </span>`);
|
|
3365
|
-
var root_22 = $8.from_html(`<span role="presentation"><!> <!></span>`);
|
|
3366
|
-
function Tooltip($$anchor, $$props) {
|
|
3367
|
-
const tooltipId = $8.props_id();
|
|
3368
|
-
$8.push($$props, true);
|
|
3369
|
-
let placement = $8.prop($$props, "placement", 3, "top"), describe = $8.prop($$props, "describe", 3, true), triggerRef = $8.prop($$props, "triggerRef", 3, null);
|
|
3370
|
-
const isDetached = $8.derived(() => triggerRef() != null);
|
|
3371
|
-
let hydrated = $8.state(false);
|
|
3372
|
-
$8.user_effect(() => {
|
|
3373
|
-
$8.set(hydrated, true);
|
|
3374
|
-
});
|
|
3375
|
-
const FOCUSABLE_SELECTOR = [
|
|
3376
|
-
"button:not([disabled])",
|
|
3377
|
-
"a[href]",
|
|
3378
|
-
"area[href]",
|
|
3379
|
-
"input:not([disabled])",
|
|
3380
|
-
"select:not([disabled])",
|
|
3381
|
-
"textarea:not([disabled])",
|
|
3382
|
-
"summary",
|
|
3383
|
-
"iframe",
|
|
3384
|
-
"object",
|
|
3385
|
-
"embed",
|
|
3386
|
-
"audio[controls]",
|
|
3387
|
-
"video[controls]",
|
|
3388
|
-
'[contenteditable]:not([contenteditable="false"])',
|
|
3389
|
-
'[tabindex]:not([tabindex="-1"])'
|
|
3390
|
-
].join(", ");
|
|
3391
|
-
let visible = $8.state(false);
|
|
3392
|
-
let showTimer;
|
|
3393
|
-
let releasePendingEscapeListener;
|
|
3394
|
-
let wrapperElement = $8.state(undefined);
|
|
3395
|
-
let tooltipElement = $8.state(undefined);
|
|
3396
|
-
let anchorElement = $8.state(null);
|
|
3397
|
-
function releasePendingEscape() {
|
|
3398
|
-
releasePendingEscapeListener?.();
|
|
3399
|
-
releasePendingEscapeListener = undefined;
|
|
3400
|
-
}
|
|
3401
|
-
function clearPendingShow() {
|
|
3402
|
-
clearTimeout(showTimer);
|
|
3403
|
-
showTimer = undefined;
|
|
3404
|
-
releasePendingEscape();
|
|
3405
|
-
}
|
|
3406
|
-
function handlePendingEscapeKeydown(event3) {
|
|
3407
|
-
if (event3.key !== "Escape")
|
|
3408
|
-
return;
|
|
3409
|
-
clearPendingShow();
|
|
3410
|
-
}
|
|
3411
|
-
function registerPendingEscape() {
|
|
3412
|
-
releasePendingEscape();
|
|
3413
|
-
document.addEventListener("keydown", handlePendingEscapeKeydown, { capture: true });
|
|
3414
|
-
releasePendingEscapeListener = () => {
|
|
3415
|
-
document.removeEventListener("keydown", handlePendingEscapeKeydown, { capture: true });
|
|
3416
|
-
};
|
|
3417
|
-
}
|
|
3418
|
-
function show() {
|
|
3419
|
-
clearPendingShow();
|
|
3420
|
-
registerPendingEscape();
|
|
3421
|
-
showTimer = setTimeout(() => {
|
|
3422
|
-
showTimer = undefined;
|
|
3423
|
-
releasePendingEscape();
|
|
3424
|
-
$8.set(visible, true);
|
|
3425
|
-
}, 100);
|
|
3426
|
-
}
|
|
3427
|
-
function hide3() {
|
|
3428
|
-
clearPendingShow();
|
|
3429
|
-
$8.set(visible, false);
|
|
3430
|
-
}
|
|
3431
|
-
function handleMouseEnter() {
|
|
3432
|
-
show();
|
|
3433
|
-
}
|
|
3434
|
-
function handleMouseLeave() {
|
|
3435
|
-
hide3();
|
|
3436
|
-
}
|
|
3437
|
-
function handleFocusIn() {
|
|
3438
|
-
show();
|
|
3439
|
-
}
|
|
3440
|
-
function handleFocusOut() {
|
|
3441
|
-
hide3();
|
|
3442
|
-
}
|
|
3443
|
-
function handleEscape(event3 = undefined) {
|
|
3444
|
-
hide3();
|
|
3445
|
-
event3?.preventDefault();
|
|
3446
|
-
}
|
|
3447
|
-
function isFocusableCandidate(element2) {
|
|
3448
|
-
if (element2.matches(":disabled"))
|
|
3449
|
-
return false;
|
|
3450
|
-
return !element2.closest('[hidden], [inert], [aria-hidden="true"]');
|
|
3451
|
-
}
|
|
3452
|
-
function resolveAnchorElement(container) {
|
|
3453
|
-
const candidates = container.querySelectorAll(FOCUSABLE_SELECTOR);
|
|
3454
|
-
for (const candidate of candidates) {
|
|
3455
|
-
if (isFocusableCandidate(candidate))
|
|
3456
|
-
return candidate;
|
|
3457
|
-
}
|
|
3458
|
-
return container;
|
|
3459
|
-
}
|
|
3460
|
-
function syncAriaDescribedBy(focusable) {
|
|
3461
|
-
const existing = focusable.getAttribute("aria-describedby");
|
|
3462
|
-
const ids = existing ? existing.split(" ").filter(Boolean) : [];
|
|
3463
|
-
if (!ids.includes(tooltipId)) {
|
|
3464
|
-
focusable.setAttribute("aria-describedby", [...ids, tooltipId].join(" "));
|
|
3465
|
-
}
|
|
3466
|
-
return () => {
|
|
3467
|
-
const current = focusable.getAttribute("aria-describedby");
|
|
3468
|
-
if (!current)
|
|
3469
|
-
return;
|
|
3470
|
-
const remaining = current.split(" ").filter((id) => id !== tooltipId).join(" ");
|
|
3471
|
-
if (remaining) {
|
|
3472
|
-
focusable.setAttribute("aria-describedby", remaining);
|
|
3473
|
-
} else {
|
|
3474
|
-
focusable.removeAttribute("aria-describedby");
|
|
3475
|
-
}
|
|
3476
|
-
};
|
|
3477
|
-
}
|
|
3478
|
-
$8.user_effect(() => {
|
|
3479
|
-
const trigger = triggerRef();
|
|
3480
|
-
if (trigger == null)
|
|
3481
|
-
return;
|
|
3482
|
-
$8.set(anchorElement, trigger, true);
|
|
3483
|
-
const teardownAriaDescribedBy = describe() ? syncAriaDescribedBy(trigger) : undefined;
|
|
3484
|
-
trigger.addEventListener("mouseenter", handleMouseEnter);
|
|
3485
|
-
trigger.addEventListener("mouseleave", handleMouseLeave);
|
|
3486
|
-
trigger.addEventListener("focusin", handleFocusIn);
|
|
3487
|
-
trigger.addEventListener("focusout", handleFocusOut);
|
|
3488
|
-
return () => {
|
|
3489
|
-
teardownAriaDescribedBy?.();
|
|
3490
|
-
trigger.removeEventListener("mouseenter", handleMouseEnter);
|
|
3491
|
-
trigger.removeEventListener("mouseleave", handleMouseLeave);
|
|
3492
|
-
trigger.removeEventListener("focusin", handleFocusIn);
|
|
3493
|
-
trigger.removeEventListener("focusout", handleFocusOut);
|
|
3494
|
-
if ($8.get(anchorElement) === trigger)
|
|
3495
|
-
$8.set(anchorElement, null);
|
|
3496
|
-
};
|
|
3497
|
-
});
|
|
3498
|
-
const attachWrapper = (element2) => {
|
|
3499
|
-
$8.set(wrapperElement, element2, true);
|
|
3500
|
-
const focusable = resolveAnchorElement(element2);
|
|
3501
|
-
$8.set(anchorElement, focusable, true);
|
|
3502
|
-
const teardownAriaDescribedBy = describe() ? syncAriaDescribedBy(focusable) : undefined;
|
|
3503
|
-
return () => {
|
|
3504
|
-
teardownAriaDescribedBy?.();
|
|
3505
|
-
if ($8.get(wrapperElement) === element2)
|
|
3506
|
-
$8.set(wrapperElement, undefined);
|
|
3507
|
-
if ($8.get(anchorElement) === focusable)
|
|
3508
|
-
$8.set(anchorElement, null);
|
|
3509
|
-
};
|
|
3510
|
-
};
|
|
3511
|
-
const tooltipPortalAttachment = createPortalAttachment({
|
|
3512
|
-
disabled: () => !$8.get(visible),
|
|
3513
|
-
target: () => document.body,
|
|
3514
|
-
source: () => $8.get(anchorElement) ?? $8.get(wrapperElement) ?? null,
|
|
3515
|
-
inheritAttributes: true
|
|
3516
|
-
});
|
|
3517
|
-
const anchoredOverlay = createAnchoredOverlay({
|
|
3518
|
-
open: () => $8.get(visible),
|
|
3519
|
-
anchor: () => $8.get(anchorElement),
|
|
3520
|
-
panel: () => $8.get(tooltipElement),
|
|
3521
|
-
placement: () => placement(),
|
|
3522
|
-
offset: () => 8,
|
|
3523
|
-
widthMode: () => "none"
|
|
3524
|
-
});
|
|
3525
|
-
const isTooltipExposed = $8.derived(() => $8.get(visible) && anchoredOverlay.positionReady);
|
|
3526
|
-
onDestroy(clearPendingShow);
|
|
3527
|
-
$8.user_effect(() => {
|
|
3528
|
-
if (!$8.get(visible))
|
|
3529
|
-
return;
|
|
3530
|
-
return pushEscapeHandler(handleEscape);
|
|
3531
|
-
});
|
|
3532
|
-
var fragment = $8.comment();
|
|
3533
|
-
var node = $8.first_child(fragment);
|
|
3534
|
-
{
|
|
3535
|
-
var consequent_1 = ($$anchor2) => {
|
|
3536
|
-
var fragment_1 = $8.comment();
|
|
3537
|
-
var node_1 = $8.first_child(fragment_1);
|
|
3538
|
-
{
|
|
3539
|
-
var consequent = ($$anchor3) => {
|
|
3540
|
-
var span = root4();
|
|
3541
|
-
var text_1 = $8.child(span, true);
|
|
3542
|
-
$8.reset(span);
|
|
3543
|
-
$8.bind_this(span, ($$value) => $8.set(tooltipElement, $$value), () => $8.get(tooltipElement));
|
|
3544
|
-
$8.attach(span, () => tooltipPortalAttachment);
|
|
3545
|
-
$8.template_effect(($0) => {
|
|
3546
|
-
$8.set_attribute(span, "id", tooltipId);
|
|
3547
|
-
$8.set_class(span, 1, $0);
|
|
3548
|
-
$8.set_attribute(span, "aria-hidden", !$8.get(isTooltipExposed));
|
|
3549
|
-
$8.set_attribute(span, "data-cinder-placement", $8.get(visible) ? anchoredOverlay.resolvedPlacement : placement());
|
|
3550
|
-
$8.set_attribute(span, "data-cinder-position-ready", anchoredOverlay.positionReady);
|
|
3551
|
-
$8.set_style(span, anchoredOverlay.positionStyle);
|
|
3552
|
-
$8.set_text(text_1, $$props.text);
|
|
3553
|
-
}, [() => $8.clsx(classNames("cinder-tooltip", $$props.class))]);
|
|
3554
|
-
$8.append($$anchor3, span);
|
|
3555
|
-
};
|
|
3556
|
-
$8.if(node_1, ($$render) => {
|
|
3557
|
-
if ($8.get(hydrated))
|
|
3558
|
-
$$render(consequent);
|
|
3559
|
-
});
|
|
3560
|
-
}
|
|
3561
|
-
$8.append($$anchor2, fragment_1);
|
|
3562
|
-
};
|
|
3563
|
-
var alternate = ($$anchor2) => {
|
|
3564
|
-
var span_1 = root_22();
|
|
3565
|
-
var node_2 = $8.child(span_1);
|
|
3566
|
-
$8.snippet(node_2, () => $$props.children ?? $8.noop);
|
|
3567
|
-
var node_3 = $8.sibling(node_2, 2);
|
|
3568
|
-
{
|
|
3569
|
-
var consequent_2 = ($$anchor3) => {
|
|
3570
|
-
var span_2 = root_13();
|
|
3571
|
-
var text_2 = $8.child(span_2, true);
|
|
3572
|
-
$8.reset(span_2);
|
|
3573
|
-
$8.bind_this(span_2, ($$value) => $8.set(tooltipElement, $$value), () => $8.get(tooltipElement));
|
|
3574
|
-
$8.attach(span_2, () => tooltipPortalAttachment);
|
|
3575
|
-
$8.template_effect(() => {
|
|
3576
|
-
$8.set_attribute(span_2, "id", tooltipId);
|
|
3577
|
-
$8.set_attribute(span_2, "aria-hidden", !$8.get(isTooltipExposed));
|
|
3578
|
-
$8.set_attribute(span_2, "data-cinder-placement", $8.get(visible) ? anchoredOverlay.resolvedPlacement : placement());
|
|
3579
|
-
$8.set_attribute(span_2, "data-cinder-position-ready", anchoredOverlay.positionReady);
|
|
3580
|
-
$8.set_style(span_2, anchoredOverlay.positionStyle);
|
|
3581
|
-
$8.set_text(text_2, $$props.text);
|
|
3582
|
-
});
|
|
3583
|
-
$8.append($$anchor3, span_2);
|
|
3584
|
-
};
|
|
3585
|
-
$8.if(node_3, ($$render) => {
|
|
3586
|
-
if ($8.get(hydrated))
|
|
3587
|
-
$$render(consequent_2);
|
|
3588
|
-
});
|
|
3589
|
-
}
|
|
3590
|
-
$8.reset(span_1);
|
|
3591
|
-
$8.attach(span_1, () => attachWrapper);
|
|
3592
|
-
$8.template_effect(($0) => {
|
|
3593
|
-
$8.set_class(span_1, 1, $0);
|
|
3594
|
-
$8.set_attribute(span_1, "data-cinder-placement", $8.get(visible) ? anchoredOverlay.resolvedPlacement : placement());
|
|
3595
|
-
}, [
|
|
3596
|
-
() => $8.clsx(classNames("cinder-tooltip-wrapper", $$props.class))
|
|
3597
|
-
]);
|
|
3598
|
-
$8.event("mouseenter", span_1, handleMouseEnter);
|
|
3599
|
-
$8.event("mouseleave", span_1, handleMouseLeave);
|
|
3600
|
-
$8.delegated("focusin", span_1, handleFocusIn);
|
|
3601
|
-
$8.delegated("focusout", span_1, handleFocusOut);
|
|
3602
|
-
$8.append($$anchor2, span_1);
|
|
3603
|
-
};
|
|
3604
|
-
$8.if(node, ($$render) => {
|
|
3605
|
-
if ($8.get(isDetached))
|
|
3606
|
-
$$render(consequent_1);
|
|
3607
|
-
else
|
|
3608
|
-
$$render(alternate, -1);
|
|
3609
|
-
});
|
|
3610
|
-
}
|
|
3611
|
-
$8.append($$anchor, fragment);
|
|
3612
|
-
$8.pop();
|
|
3613
|
-
}
|
|
3614
|
-
$8.delegate(["focusin", "focusout"]);
|
|
3615
|
-
|
|
3616
|
-
// src/components/avatar-group/avatar-group.svelte
|
|
3617
|
-
var rest_excludes4 = new Set([
|
|
3618
|
-
"$$slots",
|
|
3619
|
-
"$$events",
|
|
3620
|
-
"$$legacy",
|
|
3621
|
-
"avatars",
|
|
3622
|
-
"maxVisible",
|
|
3623
|
-
"overlap",
|
|
3624
|
-
"zOrder",
|
|
3625
|
-
"size",
|
|
3626
|
-
"shape",
|
|
3627
|
-
"overflowLabel",
|
|
3628
|
-
"label",
|
|
3629
|
-
"aria-label",
|
|
3630
|
-
"class",
|
|
3631
|
-
"style"
|
|
3632
|
-
]);
|
|
3633
|
-
var root5 = $9.from_html(`<span class="cinder-avatar-group__trigger" role="img" tabindex="0"><!></span>`);
|
|
3634
|
-
var root_14 = $9.from_html(`<span class="cinder-avatar-group__trigger"><!></span>`);
|
|
3635
|
-
var root_23 = $9.from_html(`<span class="cinder-avatar-group__item" role="listitem"><!></span>`);
|
|
3636
|
-
var root_32 = $9.from_html(`<span class="cinder-avatar-group__item cinder-avatar-group__overflow" role="listitem"> </span>`);
|
|
3637
|
-
var root_4 = $9.from_html(`<div><!> <!></div> <!>`, 1);
|
|
3638
|
-
function Avatar_group($$anchor, $$props) {
|
|
3639
|
-
$9.push($$props, true);
|
|
3640
|
-
const defaultMaxVisible = 5;
|
|
3641
|
-
let avatars = $9.prop($$props, "avatars", 19, () => []), maxVisible = $9.prop($$props, "maxVisible", 3, defaultMaxVisible), overlap = $9.prop($$props, "overlap", 3, "0.75rem"), zOrder = $9.prop($$props, "zOrder", 3, "last-on-top"), size3 = $9.prop($$props, "size", 3, "md"), shape = $9.prop($$props, "shape", 3, "circle"), label = $9.prop($$props, "label", 3, "Collaborators"), rest = $9.rest_props($$props, rest_excludes4);
|
|
3642
|
-
const triggerElements = $9.proxy({});
|
|
3643
|
-
const accessibleName = $9.derived(() => typeof $$props["aria-label"] === "string" && $$props["aria-label"].trim().length > 0 ? $$props["aria-label"] : label());
|
|
3644
|
-
const normalizedMaxVisible = $9.derived(() => normalizeMaxVisible(maxVisible()));
|
|
3645
|
-
const visibleCount = $9.derived(() => Math.min($9.get(normalizedMaxVisible), avatars().length));
|
|
3646
|
-
const hiddenCount = $9.derived(() => Math.max(0, avatars().length - $9.get(visibleCount)));
|
|
3647
|
-
const hasOverflow = $9.derived(() => $9.get(hiddenCount) > 0);
|
|
3648
|
-
const computedOverflowLabel = $9.derived(() => $$props.overflowLabel ?? `${$9.get(hiddenCount)} more collaborators`);
|
|
3649
|
-
const normalizedOverlap = $9.derived(() => normalizeOverlap(overlap()));
|
|
3650
|
-
const identityCounts = $9.derived(() => countAvatarIdentities(avatars()));
|
|
3651
|
-
const rootStyle = $9.derived(() => [
|
|
3652
|
-
$$props.style,
|
|
3653
|
-
`--cinder-avatar-group-overlap: ${$9.get(normalizedOverlap)}`
|
|
3654
|
-
].filter(Boolean).join("; "));
|
|
3655
|
-
const visibleAvatars = $9.derived(() => avatars().slice(0, $9.get(visibleCount)).map((avatar, index) => ({
|
|
3656
|
-
avatar,
|
|
3657
|
-
key: getAvatarKey(avatar, index, $9.get(identityCounts)),
|
|
3658
|
-
trimmedName: (avatar.name ?? "").trim(),
|
|
3659
|
-
stackIndex: getVisibleStackIndex(index, $9.get(visibleCount), zOrder())
|
|
3660
|
-
})));
|
|
3661
|
-
const overflowStackIndex = $9.derived(() => getOverflowStackIndex($9.get(visibleCount), zOrder()));
|
|
3662
|
-
function normalizeMaxVisible(value) {
|
|
3663
|
-
if (!Number.isFinite(value))
|
|
3664
|
-
return defaultMaxVisible;
|
|
3665
|
-
return Math.max(0, Math.floor(value));
|
|
3666
|
-
}
|
|
3667
|
-
function normalizeOverlap(value) {
|
|
3668
|
-
const trimmed = value.trim();
|
|
3669
|
-
if (/^(?:0|(?:\d*\.)?\d+(?:px|rem|em|ch|ex|vw|vh|vmin|vmax|%))$/.test(trimmed)) {
|
|
3670
|
-
return trimmed;
|
|
3671
|
-
}
|
|
3672
|
-
return "0.75rem";
|
|
3673
|
-
}
|
|
3674
|
-
function countAvatarIdentities(items) {
|
|
3675
|
-
const counts = new Map;
|
|
3676
|
-
for (const avatar of items) {
|
|
3677
|
-
const identity = avatar.id ?? avatar.name ?? "";
|
|
3678
|
-
counts.set(identity, (counts.get(identity) ?? 0) + 1);
|
|
3679
|
-
}
|
|
3680
|
-
return counts;
|
|
3681
|
-
}
|
|
3682
|
-
function getAvatarKey(avatar, index, counts) {
|
|
3683
|
-
const identity = avatar.id ?? avatar.name ?? "";
|
|
3684
|
-
return counts.get(identity) === 1 ? identity : `${identity}:${index}`;
|
|
3685
|
-
}
|
|
3686
|
-
function getVisibleStackIndex(index, count, order) {
|
|
3687
|
-
if (order === "first-on-top")
|
|
3688
|
-
return count - index;
|
|
3689
|
-
return index + 1;
|
|
3690
|
-
}
|
|
3691
|
-
function getOverflowStackIndex(count, order) {
|
|
3692
|
-
if (count === 0)
|
|
3693
|
-
return 0;
|
|
3694
|
-
if (order === "first-on-top")
|
|
3695
|
-
return 0;
|
|
3696
|
-
return count + 1;
|
|
3697
|
-
}
|
|
3698
|
-
function avatarSourceProps(src) {
|
|
3699
|
-
return src === undefined ? {} : { src };
|
|
3700
|
-
}
|
|
3701
|
-
var fragment = root_4();
|
|
3702
|
-
var div = $9.first_child(fragment);
|
|
3703
|
-
$9.attribute_effect(div, ($0) => ({
|
|
3704
|
-
...rest,
|
|
3705
|
-
class: $0,
|
|
3706
|
-
style: $9.get(rootStyle),
|
|
3707
|
-
role: "list",
|
|
3708
|
-
"aria-label": $9.get(accessibleName),
|
|
3709
|
-
"data-cinder-size": size3(),
|
|
3710
|
-
"data-cinder-shape": shape(),
|
|
3711
|
-
"data-cinder-z-order": zOrder()
|
|
3712
|
-
}), [() => classNames("cinder-avatar-group", $$props.class)]);
|
|
3713
|
-
var node = $9.child(div);
|
|
3714
|
-
$9.each(node, 17, () => $9.get(visibleAvatars), (item) => item.key, ($$anchor2, item) => {
|
|
3715
|
-
var span = root_23();
|
|
3716
|
-
var node_1 = $9.child(span);
|
|
3717
|
-
{
|
|
3718
|
-
var consequent = ($$anchor3) => {
|
|
3719
|
-
var span_1 = root5();
|
|
3720
|
-
var node_2 = $9.child(span_1);
|
|
3721
|
-
{
|
|
3722
|
-
let $0 = $9.derived(() => avatarSourceProps($9.get(item).avatar.src));
|
|
3723
|
-
Avatar2(node_2, $9.spread_props(() => $9.get($0), {
|
|
3724
|
-
get name() {
|
|
3725
|
-
return $9.get(item).trimmedName;
|
|
3726
|
-
},
|
|
3727
|
-
alt: "",
|
|
3728
|
-
get size() {
|
|
3729
|
-
return size3();
|
|
3730
|
-
},
|
|
3731
|
-
get shape() {
|
|
3732
|
-
return shape();
|
|
3733
|
-
}
|
|
3734
|
-
}));
|
|
3735
|
-
}
|
|
3736
|
-
$9.reset(span_1);
|
|
3737
|
-
$9.bind_this(span_1, ($$value, item2) => triggerElements[item2.key] = $$value, (item2) => triggerElements?.[item2.key], () => [$9.get(item)]);
|
|
3738
|
-
$9.template_effect(() => $9.set_attribute(span_1, "aria-label", $9.get(item).trimmedName));
|
|
3739
|
-
$9.append($$anchor3, span_1);
|
|
3740
|
-
};
|
|
3741
|
-
var alternate = ($$anchor3) => {
|
|
3742
|
-
var span_2 = root_14();
|
|
3743
|
-
var node_3 = $9.child(span_2);
|
|
3744
|
-
{
|
|
3745
|
-
let $0 = $9.derived(() => avatarSourceProps($9.get(item).avatar.src));
|
|
3746
|
-
Avatar2(node_3, $9.spread_props(() => $9.get($0), {
|
|
3747
|
-
name: "",
|
|
3748
|
-
alt: "",
|
|
3749
|
-
get size() {
|
|
3750
|
-
return size3();
|
|
3751
|
-
},
|
|
3752
|
-
get shape() {
|
|
3753
|
-
return shape();
|
|
3754
|
-
}
|
|
3755
|
-
}));
|
|
3756
|
-
}
|
|
3757
|
-
$9.reset(span_2);
|
|
3758
|
-
$9.append($$anchor3, span_2);
|
|
3759
|
-
};
|
|
3760
|
-
$9.if(node_1, ($$render) => {
|
|
3761
|
-
if ($9.get(item).trimmedName)
|
|
3762
|
-
$$render(consequent);
|
|
3763
|
-
else
|
|
3764
|
-
$$render(alternate, -1);
|
|
3765
|
-
});
|
|
3766
|
-
}
|
|
3767
|
-
$9.reset(span);
|
|
3768
|
-
$9.template_effect(() => $9.set_style(span, `--cinder-avatar-group-index: ${$9.get(item).stackIndex}`));
|
|
3769
|
-
$9.append($$anchor2, span);
|
|
3770
|
-
});
|
|
3771
|
-
var node_4 = $9.sibling(node, 2);
|
|
3772
|
-
{
|
|
3773
|
-
var consequent_1 = ($$anchor2) => {
|
|
3774
|
-
var span_3 = root_32();
|
|
3775
|
-
var text2 = $9.child(span_3);
|
|
3776
|
-
$9.reset(span_3);
|
|
3777
|
-
$9.template_effect(() => {
|
|
3778
|
-
$9.set_attribute(span_3, "aria-label", $9.get(computedOverflowLabel));
|
|
3779
|
-
$9.set_style(span_3, `--cinder-avatar-group-index: ${$9.get(overflowStackIndex)}`);
|
|
3780
|
-
$9.set_text(text2, `+${$9.get(hiddenCount) ?? ""}`);
|
|
3781
|
-
});
|
|
3782
|
-
$9.append($$anchor2, span_3);
|
|
3783
|
-
};
|
|
3784
|
-
$9.if(node_4, ($$render) => {
|
|
3785
|
-
if ($9.get(hasOverflow))
|
|
3786
|
-
$$render(consequent_1);
|
|
3787
|
-
});
|
|
3788
|
-
}
|
|
3789
|
-
$9.reset(div);
|
|
3790
|
-
var node_5 = $9.sibling(div, 2);
|
|
3791
|
-
$9.each(node_5, 17, () => $9.get(visibleAvatars), (item) => item.key, ($$anchor2, item) => {
|
|
3792
|
-
var fragment_1 = $9.comment();
|
|
3793
|
-
var node_6 = $9.first_child(fragment_1);
|
|
3794
|
-
{
|
|
3795
|
-
var consequent_2 = ($$anchor3) => {
|
|
3796
|
-
{
|
|
3797
|
-
let $0 = $9.derived(() => triggerElements[$9.get(item).key] ?? null);
|
|
3798
|
-
Tooltip($$anchor3, {
|
|
3799
|
-
get text() {
|
|
3800
|
-
return $9.get(item).trimmedName;
|
|
3801
|
-
},
|
|
3802
|
-
describe: false,
|
|
3803
|
-
get triggerRef() {
|
|
3804
|
-
return $9.get($0);
|
|
3805
|
-
}
|
|
3806
|
-
});
|
|
3807
|
-
}
|
|
3808
|
-
};
|
|
3809
|
-
$9.if(node_6, ($$render) => {
|
|
3810
|
-
if ($9.get(item).trimmedName && triggerElements[$9.get(item).key])
|
|
3811
|
-
$$render(consequent_2);
|
|
3812
|
-
});
|
|
3813
|
-
}
|
|
3814
|
-
$9.append($$anchor2, fragment_1);
|
|
3815
|
-
});
|
|
3816
|
-
$9.append($$anchor, fragment);
|
|
3817
|
-
$9.pop();
|
|
3818
|
-
}
|
|
3819
|
-
|
|
3820
|
-
// src/components/card/card.svelte
|
|
3821
|
-
import"svelte/internal/disclose-version";
|
|
3822
|
-
import * as $12 from "svelte/internal/client";
|
|
3823
|
-
|
|
3824
|
-
// ../../node_modules/lucide-svelte/dist/icons/circle-alert.svelte
|
|
3825
|
-
import"svelte/internal/disclose-version";
|
|
3826
|
-
import"svelte/internal/flags/legacy";
|
|
3827
|
-
import * as $11 from "svelte/internal/client";
|
|
3828
|
-
|
|
3829
|
-
// ../../node_modules/lucide-svelte/dist/Icon.svelte
|
|
3830
|
-
import"svelte/internal/disclose-version";
|
|
3831
|
-
import"svelte/internal/flags/legacy";
|
|
3832
|
-
import * as $10 from "svelte/internal/client";
|
|
3833
|
-
|
|
3834
|
-
// ../../node_modules/lucide-svelte/dist/defaultAttributes.js
|
|
3835
|
-
var defaultAttributes = {
|
|
3836
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3837
|
-
width: 24,
|
|
3838
|
-
height: 24,
|
|
3839
|
-
viewBox: "0 0 24 24",
|
|
3840
|
-
fill: "none",
|
|
3841
|
-
stroke: "currentColor",
|
|
3842
|
-
"stroke-width": 2,
|
|
3843
|
-
"stroke-linecap": "round",
|
|
3844
|
-
"stroke-linejoin": "round"
|
|
3845
|
-
};
|
|
3846
|
-
var defaultAttributes_default = defaultAttributes;
|
|
3847
|
-
|
|
3848
|
-
// ../../node_modules/lucide-svelte/dist/Icon.svelte
|
|
3849
|
-
var root6 = $10.from_svg(`<svg><!><!></svg>`);
|
|
3850
|
-
function Icon($$anchor, $$props) {
|
|
3851
|
-
const $$sanitized_props = $10.legacy_rest_props($$props, ["children", "$$slots", "$$events", "$$legacy"]);
|
|
3852
|
-
const $$restProps = $10.legacy_rest_props($$sanitized_props, [
|
|
3853
|
-
"name",
|
|
3854
|
-
"color",
|
|
3855
|
-
"size",
|
|
3856
|
-
"strokeWidth",
|
|
3857
|
-
"absoluteStrokeWidth",
|
|
3858
|
-
"iconNode"
|
|
3859
|
-
]);
|
|
3860
|
-
$10.push($$props, false);
|
|
3861
|
-
let name = $10.prop($$props, "name", 8, undefined);
|
|
3862
|
-
let color = $10.prop($$props, "color", 8, "currentColor");
|
|
3863
|
-
let size3 = $10.prop($$props, "size", 8, 24);
|
|
3864
|
-
let strokeWidth = $10.prop($$props, "strokeWidth", 8, 2);
|
|
3865
|
-
let absoluteStrokeWidth = $10.prop($$props, "absoluteStrokeWidth", 8, false);
|
|
3866
|
-
let iconNode = $10.prop($$props, "iconNode", 24, () => []);
|
|
3867
|
-
const mergeClasses = (...classes) => classes.filter((className, index2, array) => {
|
|
3868
|
-
return Boolean(className) && array.indexOf(className) === index2;
|
|
3869
|
-
}).join(" ");
|
|
3870
|
-
$10.init();
|
|
3871
|
-
var svg = root6();
|
|
3872
|
-
$10.attribute_effect(svg, ($0, $1) => ({
|
|
3873
|
-
...defaultAttributes_default,
|
|
3874
|
-
...$$restProps,
|
|
3875
|
-
width: size3(),
|
|
3876
|
-
height: size3(),
|
|
3877
|
-
stroke: color(),
|
|
3878
|
-
"stroke-width": $0,
|
|
3879
|
-
class: $1
|
|
3880
|
-
}), [
|
|
3881
|
-
() => ($10.deep_read_state(absoluteStrokeWidth()), $10.deep_read_state(strokeWidth()), $10.deep_read_state(size3()), $10.untrack(() => absoluteStrokeWidth() ? Number(strokeWidth()) * 24 / Number(size3()) : strokeWidth())),
|
|
3882
|
-
() => ($10.deep_read_state(name()), $10.deep_read_state($$sanitized_props), $10.untrack(() => mergeClasses("lucide-icon", "lucide", name() ? `lucide-${name()}` : "", $$sanitized_props.class)))
|
|
3883
|
-
]);
|
|
3884
|
-
var node = $10.child(svg);
|
|
3885
|
-
$10.each(node, 1, iconNode, $10.index, ($$anchor2, $$item) => {
|
|
3886
|
-
var $$array = $10.derived(() => $10.to_array($10.get($$item), 2));
|
|
3887
|
-
let tag = () => $10.get($$array)[0];
|
|
3888
|
-
let attrs = () => $10.get($$array)[1];
|
|
3889
|
-
var fragment = $10.comment();
|
|
3890
|
-
var node_1 = $10.first_child(fragment);
|
|
3891
|
-
$10.element(node_1, tag, true, ($$element, $$anchor3) => {
|
|
3892
|
-
$10.attribute_effect($$element, () => ({ ...attrs() }));
|
|
3893
|
-
});
|
|
3894
|
-
$10.append($$anchor2, fragment);
|
|
3895
|
-
});
|
|
3896
|
-
var node_2 = $10.sibling(node);
|
|
3897
|
-
$10.slot(node_2, $$props, "default", {}, null);
|
|
3898
|
-
$10.reset(svg);
|
|
3899
|
-
$10.append($$anchor, svg);
|
|
3900
|
-
$10.pop();
|
|
3901
|
-
}
|
|
3902
|
-
|
|
3903
|
-
// ../../node_modules/lucide-svelte/dist/icons/circle-alert.svelte
|
|
3904
|
-
function Circle_alert($$anchor, $$props) {
|
|
3905
|
-
const $$sanitized_props = $11.legacy_rest_props($$props, ["children", "$$slots", "$$events", "$$legacy"]);
|
|
3906
|
-
const iconNode = [
|
|
3907
|
-
["circle", { cx: "12", cy: "12", r: "10" }],
|
|
3908
|
-
["line", { x1: "12", x2: "12", y1: "8", y2: "12" }],
|
|
3909
|
-
[
|
|
3910
|
-
"line",
|
|
3911
|
-
{ x1: "12", x2: "12.01", y1: "16", y2: "16" }
|
|
3912
|
-
]
|
|
3913
|
-
];
|
|
3914
|
-
Icon($$anchor, $11.spread_props({ name: "circle-alert" }, () => $$sanitized_props, {
|
|
3915
|
-
get iconNode() {
|
|
3916
|
-
return iconNode;
|
|
3917
|
-
},
|
|
3918
|
-
children: ($$anchor2, $$slotProps) => {
|
|
3919
|
-
var fragment_1 = $11.comment();
|
|
3920
|
-
var node = $11.first_child(fragment_1);
|
|
3921
|
-
$11.slot(node, $$props, "default", {}, null);
|
|
3922
|
-
$11.append($$anchor2, fragment_1);
|
|
3923
|
-
},
|
|
3924
|
-
$$slots: { default: true }
|
|
3925
|
-
}));
|
|
3926
|
-
}
|
|
3927
|
-
// src/_internal/field-control.ts
|
|
3928
|
-
function describeId(fieldId, hasDescription) {
|
|
3929
|
-
return hasDescription ? `${fieldId}-description` : undefined;
|
|
3930
|
-
}
|
|
3931
|
-
function errorId(fieldId, hasError) {
|
|
3932
|
-
return hasError ? `${fieldId}-error` : undefined;
|
|
3933
|
-
}
|
|
3934
|
-
function composeDescribedBy(...ids) {
|
|
3935
|
-
const filtered = ids.flatMap((id) => typeof id === "string" ? id.trim().split(/\s+/).filter(Boolean) : []);
|
|
3936
|
-
const unique = Array.from(new Set(filtered));
|
|
3937
|
-
return unique.length > 0 ? unique.join(" ") : undefined;
|
|
3938
|
-
}
|
|
3939
|
-
function ariaInvalid(hasError) {
|
|
3940
|
-
return hasError ? "true" : undefined;
|
|
3941
|
-
}
|
|
3942
|
-
function resolveFieldControl(input) {
|
|
3943
|
-
const resolvedId = input.id ?? input.context?.controlId ?? input.generatedId;
|
|
3944
|
-
const defaultDescriptionId = describeId(resolvedId, input.hasDescription ?? false);
|
|
3945
|
-
const defaultErrorId = errorId(resolvedId, input.hasError ?? false);
|
|
3946
|
-
const ownDescriptionId = defaultDescriptionId && defaultDescriptionId === input.context?.descriptionId && input.localIdNamespace ? `${resolvedId}-${input.localIdNamespace}-description` : defaultDescriptionId;
|
|
3947
|
-
const ownErrorId = defaultErrorId && defaultErrorId === input.context?.errorId && input.localIdNamespace ? `${resolvedId}-${input.localIdNamespace}-error` : defaultErrorId;
|
|
3948
|
-
const descriptionId = ownDescriptionId ?? input.context?.descriptionId;
|
|
3949
|
-
const resolvedErrorId = ownErrorId ?? input.context?.errorId;
|
|
3950
|
-
const explicitInvalid = ariaInvalid(input.hasError ?? false);
|
|
3951
|
-
const consumerInvalid = input.consumerInvalid === true ? "true" : input.consumerInvalid === false ? undefined : input.consumerInvalid ?? undefined;
|
|
3952
|
-
return {
|
|
3953
|
-
id: resolvedId,
|
|
3954
|
-
ownDescriptionId,
|
|
3955
|
-
ownErrorId,
|
|
3956
|
-
descriptionId,
|
|
3957
|
-
errorId: resolvedErrorId,
|
|
3958
|
-
describedBy: composeDescribedBy(descriptionId, ...input.additionalDescribedBy ?? [], resolvedErrorId, input.context?.describedBy, input.consumerDescribedBy),
|
|
3959
|
-
ariaInvalid: explicitInvalid ?? input.context?.invalid ?? consumerInvalid,
|
|
3960
|
-
required: input.required ?? input.context?.required ?? false,
|
|
3961
|
-
disabled: input.disabled ?? input.context?.disabled ?? false
|
|
3962
|
-
};
|
|
3963
|
-
}
|
|
3964
|
-
|
|
3965
|
-
// src/components/card/card.svelte
|
|
3966
|
-
var rest_excludes5 = new Set([
|
|
3967
|
-
"$$slots",
|
|
3968
|
-
"$$events",
|
|
3969
|
-
"$$legacy",
|
|
3970
|
-
"class",
|
|
3971
|
-
"children",
|
|
3972
|
-
"header",
|
|
3973
|
-
"title",
|
|
3974
|
-
"headingLevel",
|
|
3975
|
-
"description",
|
|
3976
|
-
"footer",
|
|
3977
|
-
"variant",
|
|
3978
|
-
"tone",
|
|
3979
|
-
"bodyTone",
|
|
3980
|
-
"footerTone",
|
|
3981
|
-
"edgeToEdgeOnMobile",
|
|
3982
|
-
"padding"
|
|
3983
|
-
]);
|
|
3984
|
-
var root7 = $12.from_html(`<div class="cinder-card__header"><!></div>`);
|
|
3985
|
-
var root_15 = $12.from_html(`<span class="cinder-card__risk-icon" aria-hidden="true"><!></span>`);
|
|
3986
|
-
var root_24 = $12.from_html(`<p class="cinder-card__description"> </p>`);
|
|
3987
|
-
var root_33 = $12.from_html(`<div class="cinder-card__header"><div class="cinder-card__title-row"><!> <!></div> <!></div>`);
|
|
3988
|
-
var root_42 = $12.from_html(`<div class="cinder-card__footer"><!></div>`);
|
|
3989
|
-
var root_5 = $12.from_html(`<div><!> <div class="cinder-card__body"><!></div> <!></div>`);
|
|
3990
|
-
function Card($$anchor, $$props) {
|
|
3991
|
-
const generatedId = $12.props_id();
|
|
3992
|
-
$12.push($$props, true);
|
|
3993
|
-
let headingLevel = $12.prop($$props, "headingLevel", 3, 3), variant = $12.prop($$props, "variant", 3, "card"), tone = $12.prop($$props, "tone", 3, "default"), bodyTone = $12.prop($$props, "bodyTone", 3, "default"), footerTone = $12.prop($$props, "footerTone", 3, "default"), edgeToEdgeOnMobile = $12.prop($$props, "edgeToEdgeOnMobile", 3, false), padding = $12.prop($$props, "padding", 3, "default"), rest = $12.rest_props($$props, rest_excludes5);
|
|
3994
|
-
const resolvedHeadingLevel = $12.derived(() => Number.isFinite(Math.trunc(Number(headingLevel()))) ? Math.min(6, Math.max(1, Math.trunc(Number(headingLevel())))) : 3);
|
|
3995
|
-
const titleTag = $12.derived(() => `h${$12.get(resolvedHeadingLevel)}`);
|
|
3996
|
-
const hasGeneratedHeader = $12.derived(() => Boolean($$props.title && !$$props.header));
|
|
3997
|
-
const titleId = $12.derived(() => $12.get(hasGeneratedHeader) ? `${generatedId}-title` : undefined);
|
|
3998
|
-
const descriptionId = $12.derived(() => $12.get(hasGeneratedHeader) && $$props.description ? `${generatedId}-description` : undefined);
|
|
3999
|
-
const hasExternalRole = $12.derived(() => typeof $$props.role === "string" && $$props.role.trim().length > 0);
|
|
4000
|
-
const hasExternalLabel = $12.derived(() => typeof rest["aria-labelledby"] === "string" && rest["aria-labelledby"].trim().length > 0 || typeof rest["aria-label"] === "string" && rest["aria-label"].trim().length > 0);
|
|
4001
|
-
const describedBy = $12.derived(() => composeDescribedBy($12.get(descriptionId), rest["aria-describedby"]));
|
|
4002
|
-
const labelAttributes = $12.derived(() => $12.get(hasGeneratedHeader) ? {
|
|
4003
|
-
...!$12.get(hasExternalRole) ? { role: "group" } : {},
|
|
4004
|
-
...!$12.get(hasExternalLabel) ? { "aria-labelledby": $12.get(titleId) } : {},
|
|
4005
|
-
...$12.get(describedBy) ? { "aria-describedby": $12.get(describedBy) } : {}
|
|
4006
|
-
} : {});
|
|
4007
|
-
var div = root_5();
|
|
4008
|
-
$12.attribute_effect(div, ($0) => ({
|
|
4009
|
-
...rest,
|
|
4010
|
-
class: $0,
|
|
4011
|
-
"data-cinder-variant": variant(),
|
|
4012
|
-
"data-cinder-tone": tone(),
|
|
4013
|
-
"data-cinder-padding": padding(),
|
|
4014
|
-
"data-cinder-edge-to-edge-mobile": edgeToEdgeOnMobile() ? "" : undefined,
|
|
4015
|
-
...$12.get(labelAttributes)
|
|
4016
|
-
}), [() => classNames("cinder-card", $$props.class)]);
|
|
4017
|
-
var node = $12.child(div);
|
|
4018
|
-
{
|
|
4019
|
-
var consequent = ($$anchor2) => {
|
|
4020
|
-
var div_1 = root7();
|
|
4021
|
-
var node_1 = $12.child(div_1);
|
|
4022
|
-
$12.snippet(node_1, () => $$props.header);
|
|
4023
|
-
$12.reset(div_1);
|
|
4024
|
-
$12.append($$anchor2, div_1);
|
|
4025
|
-
};
|
|
4026
|
-
var consequent_3 = ($$anchor2) => {
|
|
4027
|
-
var div_2 = root_33();
|
|
4028
|
-
var div_3 = $12.child(div_2);
|
|
4029
|
-
var node_2 = $12.child(div_3);
|
|
4030
|
-
{
|
|
4031
|
-
var consequent_1 = ($$anchor3) => {
|
|
4032
|
-
var span = root_15();
|
|
4033
|
-
var node_3 = $12.child(span);
|
|
4034
|
-
Circle_alert(node_3, { size: 18, strokeWidth: 2.25 });
|
|
4035
|
-
$12.reset(span);
|
|
4036
|
-
$12.append($$anchor3, span);
|
|
4037
|
-
};
|
|
4038
|
-
$12.if(node_2, ($$render) => {
|
|
4039
|
-
if (tone() === "danger")
|
|
4040
|
-
$$render(consequent_1);
|
|
4041
|
-
});
|
|
4042
|
-
}
|
|
4043
|
-
var node_4 = $12.sibling(node_2, 2);
|
|
4044
|
-
$12.element(node_4, () => $12.get(titleTag), false, ($$element, $$anchor3) => {
|
|
4045
|
-
$12.attribute_effect($$element, () => ({ id: $12.get(titleId), class: "cinder-card__title" }));
|
|
4046
|
-
var text3 = $12.text();
|
|
4047
|
-
$12.template_effect(() => $12.set_text(text3, $$props.title));
|
|
4048
|
-
$12.append($$anchor3, text3);
|
|
4049
|
-
});
|
|
4050
|
-
$12.reset(div_3);
|
|
4051
|
-
var node_5 = $12.sibling(div_3, 2);
|
|
4052
|
-
{
|
|
4053
|
-
var consequent_2 = ($$anchor3) => {
|
|
4054
|
-
var p = root_24();
|
|
4055
|
-
var text_1 = $12.child(p, true);
|
|
4056
|
-
$12.reset(p);
|
|
4057
|
-
$12.template_effect(() => {
|
|
4058
|
-
$12.set_attribute(p, "id", $12.get(descriptionId));
|
|
4059
|
-
$12.set_text(text_1, $$props.description);
|
|
4060
|
-
});
|
|
4061
|
-
$12.append($$anchor3, p);
|
|
4062
|
-
};
|
|
4063
|
-
$12.if(node_5, ($$render) => {
|
|
4064
|
-
if ($$props.description)
|
|
4065
|
-
$$render(consequent_2);
|
|
4066
|
-
});
|
|
4067
|
-
}
|
|
4068
|
-
$12.reset(div_2);
|
|
4069
|
-
$12.append($$anchor2, div_2);
|
|
4070
|
-
};
|
|
4071
|
-
$12.if(node, ($$render) => {
|
|
4072
|
-
if ($$props.header)
|
|
4073
|
-
$$render(consequent);
|
|
4074
|
-
else if ($$props.title)
|
|
4075
|
-
$$render(consequent_3, 1);
|
|
4076
|
-
});
|
|
4077
|
-
}
|
|
4078
|
-
var div_4 = $12.sibling(node, 2);
|
|
4079
|
-
var node_6 = $12.child(div_4);
|
|
4080
|
-
$12.snippet(node_6, () => $$props.children);
|
|
4081
|
-
$12.reset(div_4);
|
|
4082
|
-
var node_7 = $12.sibling(div_4, 2);
|
|
4083
|
-
{
|
|
4084
|
-
var consequent_4 = ($$anchor2) => {
|
|
4085
|
-
var div_5 = root_42();
|
|
4086
|
-
var node_8 = $12.child(div_5);
|
|
4087
|
-
$12.snippet(node_8, () => $$props.footer);
|
|
4088
|
-
$12.reset(div_5);
|
|
4089
|
-
$12.template_effect(() => $12.set_attribute(div_5, "data-cinder-tone", footerTone()));
|
|
4090
|
-
$12.append($$anchor2, div_5);
|
|
4091
|
-
};
|
|
4092
|
-
$12.if(node_7, ($$render) => {
|
|
4093
|
-
if ($$props.footer)
|
|
4094
|
-
$$render(consequent_4);
|
|
4095
|
-
});
|
|
4096
|
-
}
|
|
4097
|
-
$12.reset(div);
|
|
4098
|
-
$12.template_effect(() => {
|
|
4099
|
-
$12.set_attribute(div_4, "data-cinder-tone", bodyTone());
|
|
4100
|
-
$12.set_attribute(div_4, "data-cinder-padding", padding());
|
|
4101
|
-
});
|
|
4102
|
-
$12.append($$anchor, div);
|
|
4103
|
-
$12.pop();
|
|
4104
|
-
}
|
|
4105
|
-
|
|
4106
|
-
// src/components/container/container.svelte
|
|
4107
|
-
import"svelte/internal/disclose-version";
|
|
4108
|
-
import * as $13 from "svelte/internal/client";
|
|
4109
|
-
var rest_excludes6 = new Set([
|
|
4110
|
-
"$$slots",
|
|
4111
|
-
"$$events",
|
|
4112
|
-
"$$legacy",
|
|
4113
|
-
"maxWidth",
|
|
4114
|
-
"centered",
|
|
4115
|
-
"padded",
|
|
4116
|
-
"as",
|
|
4117
|
-
"class",
|
|
4118
|
-
"children"
|
|
4119
|
-
]);
|
|
4120
|
-
function Container($$anchor, $$props) {
|
|
4121
|
-
$13.push($$props, true);
|
|
4122
|
-
let centered = $13.prop($$props, "centered", 3, true), padded = $13.prop($$props, "padded", 3, true), as = $13.prop($$props, "as", 3, "div"), rest = $13.rest_props($$props, rest_excludes6);
|
|
4123
|
-
var fragment = $13.comment();
|
|
4124
|
-
var node = $13.first_child(fragment);
|
|
4125
|
-
$13.element(node, as, false, ($$element, $$anchor2) => {
|
|
4126
|
-
$13.attribute_effect($$element, ($0) => ({
|
|
4127
|
-
...rest,
|
|
4128
|
-
class: $0,
|
|
4129
|
-
"data-cinder-max-width": $$props.maxWidth,
|
|
4130
|
-
"data-cinder-centered": centered() ? "" : undefined,
|
|
4131
|
-
"data-cinder-padded": padded() ? "" : undefined
|
|
4132
|
-
}), [() => classNames("cinder-container", $$props.class)]);
|
|
4133
|
-
var fragment_1 = $13.comment();
|
|
4134
|
-
var node_1 = $13.first_child(fragment_1);
|
|
4135
|
-
$13.snippet(node_1, () => $$props.children);
|
|
4136
|
-
$13.append($$anchor2, fragment_1);
|
|
4137
|
-
});
|
|
4138
|
-
$13.append($$anchor, fragment);
|
|
4139
|
-
$13.pop();
|
|
4140
|
-
}
|
|
4141
|
-
|
|
4142
|
-
// src/components/team-section/team-section.svelte
|
|
4143
|
-
var rest_excludes7 = new Set([
|
|
4144
|
-
"$$slots",
|
|
4145
|
-
"$$events",
|
|
4146
|
-
"$$legacy",
|
|
4147
|
-
"as",
|
|
4148
|
-
"title",
|
|
4149
|
-
"description",
|
|
4150
|
-
"members",
|
|
4151
|
-
"columns",
|
|
4152
|
-
"avatarGroupVisible",
|
|
4153
|
-
"avatarGroupLabel",
|
|
4154
|
-
"maxWidth",
|
|
4155
|
-
"class"
|
|
4156
|
-
]);
|
|
4157
|
-
var root8 = $14.from_html(`<h2 class="cinder-_section-skeleton__title cinder-team-section__title"> </h2>`);
|
|
4158
|
-
var root_16 = $14.from_html(`<p class="cinder-_section-skeleton__description cinder-team-section__description"> </p>`);
|
|
4159
|
-
var root_25 = $14.from_html(`<header class="cinder-_section-skeleton__header cinder-team-section__header"><!> <!></header>`);
|
|
4160
|
-
var root_34 = $14.from_html(`<div class="cinder-team-section__summary"><!></div>`);
|
|
4161
|
-
var root_43 = $14.from_html(`<p class="cinder-team-section__bio"> </p>`);
|
|
4162
|
-
var root_52 = $14.from_html(`<a class="cinder-team-section__link">View profile</a>`);
|
|
4163
|
-
var root_6 = $14.from_html(`<div class="cinder-team-section__person"><!></div> <!> <!>`, 1);
|
|
4164
|
-
var root_7 = $14.from_html(`<li class="cinder-team-section__item"><!></li>`);
|
|
4165
|
-
var root_8 = $14.from_html(`<div class="cinder-_section-skeleton__inner cinder-team-section__inner"><!> <!> <ul class="cinder-_section-skeleton__list cinder-team-section__list"></ul></div>`);
|
|
4166
|
-
function Team_section($$anchor, $$props) {
|
|
4167
|
-
$14.push($$props, true);
|
|
4168
|
-
let as = $14.prop($$props, "as", 3, "section"), columns = $14.prop($$props, "columns", 3, 3), avatarGroupVisible = $14.prop($$props, "avatarGroupVisible", 3, false), avatarGroupLabel = $14.prop($$props, "avatarGroupLabel", 3, "Team members"), maxWidth = $14.prop($$props, "maxWidth", 3, "wide"), rest = $14.rest_props($$props, rest_excludes7);
|
|
4169
|
-
const avatarItems = $14.derived(() => $$props.members.map((member) => member.avatarSrc ? { name: member.name, src: member.avatarSrc } : { name: member.name }));
|
|
4170
|
-
var fragment = $14.comment();
|
|
4171
|
-
var node = $14.first_child(fragment);
|
|
4172
|
-
$14.element(node, as, false, ($$element, $$anchor2) => {
|
|
4173
|
-
$14.attribute_effect($$element, ($0, $1) => ({ class: $0, "data-cinder-columns": $1, ...rest }), [
|
|
4174
|
-
() => classNames("cinder-_section-skeleton", "cinder-team-section", $$props.class),
|
|
4175
|
-
() => String(columns())
|
|
4176
|
-
]);
|
|
4177
|
-
Container($$anchor2, {
|
|
4178
|
-
get maxWidth() {
|
|
4179
|
-
return maxWidth();
|
|
4180
|
-
},
|
|
4181
|
-
children: ($$anchor3, $$slotProps) => {
|
|
4182
|
-
var div = root_8();
|
|
4183
|
-
var node_1 = $14.child(div);
|
|
4184
|
-
{
|
|
4185
|
-
var consequent_2 = ($$anchor4) => {
|
|
4186
|
-
var header = root_25();
|
|
4187
|
-
var node_2 = $14.child(header);
|
|
4188
|
-
{
|
|
4189
|
-
var consequent = ($$anchor5) => {
|
|
4190
|
-
var h2 = root8();
|
|
4191
|
-
var text3 = $14.child(h2, true);
|
|
4192
|
-
$14.reset(h2);
|
|
4193
|
-
$14.template_effect(() => $14.set_text(text3, $$props.title));
|
|
4194
|
-
$14.append($$anchor5, h2);
|
|
4195
|
-
};
|
|
4196
|
-
$14.if(node_2, ($$render) => {
|
|
4197
|
-
if ($$props.title)
|
|
4198
|
-
$$render(consequent);
|
|
4199
|
-
});
|
|
4200
|
-
}
|
|
4201
|
-
var node_3 = $14.sibling(node_2, 2);
|
|
4202
|
-
{
|
|
4203
|
-
var consequent_1 = ($$anchor5) => {
|
|
4204
|
-
var p = root_16();
|
|
4205
|
-
var text_1 = $14.child(p, true);
|
|
4206
|
-
$14.reset(p);
|
|
4207
|
-
$14.template_effect(() => $14.set_text(text_1, $$props.description));
|
|
4208
|
-
$14.append($$anchor5, p);
|
|
4209
|
-
};
|
|
4210
|
-
$14.if(node_3, ($$render) => {
|
|
4211
|
-
if ($$props.description)
|
|
4212
|
-
$$render(consequent_1);
|
|
4213
|
-
});
|
|
4214
|
-
}
|
|
4215
|
-
$14.reset(header);
|
|
4216
|
-
$14.append($$anchor4, header);
|
|
4217
|
-
};
|
|
4218
|
-
$14.if(node_1, ($$render) => {
|
|
4219
|
-
if ($$props.title || $$props.description)
|
|
4220
|
-
$$render(consequent_2);
|
|
4221
|
-
});
|
|
4222
|
-
}
|
|
4223
|
-
var node_4 = $14.sibling(node_1, 2);
|
|
4224
|
-
{
|
|
4225
|
-
var consequent_3 = ($$anchor4) => {
|
|
4226
|
-
var div_1 = root_34();
|
|
4227
|
-
var node_5 = $14.child(div_1);
|
|
4228
|
-
Avatar_group(node_5, {
|
|
4229
|
-
get avatars() {
|
|
4230
|
-
return $14.get(avatarItems);
|
|
4231
|
-
},
|
|
4232
|
-
get label() {
|
|
4233
|
-
return avatarGroupLabel();
|
|
4234
|
-
},
|
|
4235
|
-
maxVisible: 6
|
|
4236
|
-
});
|
|
4237
|
-
$14.reset(div_1);
|
|
4238
|
-
$14.append($$anchor4, div_1);
|
|
4239
|
-
};
|
|
4240
|
-
$14.if(node_4, ($$render) => {
|
|
4241
|
-
if (avatarGroupVisible())
|
|
4242
|
-
$$render(consequent_3);
|
|
4243
|
-
});
|
|
4244
|
-
}
|
|
4245
|
-
var ul = $14.sibling(node_4, 2);
|
|
4246
|
-
$14.each(ul, 23, () => $$props.members, (member, index2) => `${member.name}-${index2}`, ($$anchor4, member) => {
|
|
4247
|
-
var li = root_7();
|
|
4248
|
-
var node_6 = $14.child(li);
|
|
4249
|
-
Card(node_6, {
|
|
4250
|
-
children: ($$anchor5, $$slotProps2) => {
|
|
4251
|
-
var fragment_2 = root_6();
|
|
4252
|
-
var div_2 = $14.first_child(fragment_2);
|
|
4253
|
-
var node_7 = $14.child(div_2);
|
|
4254
|
-
Person_byline(node_7, {
|
|
4255
|
-
get name() {
|
|
4256
|
-
return $14.get(member).name;
|
|
4257
|
-
},
|
|
4258
|
-
get role() {
|
|
4259
|
-
return $14.get(member).role;
|
|
4260
|
-
},
|
|
4261
|
-
get avatarSrc() {
|
|
4262
|
-
return $14.get(member).avatarSrc;
|
|
4263
|
-
},
|
|
4264
|
-
avatarSize: "lg"
|
|
4265
|
-
});
|
|
4266
|
-
$14.reset(div_2);
|
|
4267
|
-
var node_8 = $14.sibling(div_2, 2);
|
|
4268
|
-
{
|
|
4269
|
-
var consequent_4 = ($$anchor6) => {
|
|
4270
|
-
var p_1 = root_43();
|
|
4271
|
-
var text_2 = $14.child(p_1, true);
|
|
4272
|
-
$14.reset(p_1);
|
|
4273
|
-
$14.template_effect(() => $14.set_text(text_2, $14.get(member).bio));
|
|
4274
|
-
$14.append($$anchor6, p_1);
|
|
4275
|
-
};
|
|
4276
|
-
$14.if(node_8, ($$render) => {
|
|
4277
|
-
if ($14.get(member).bio)
|
|
4278
|
-
$$render(consequent_4);
|
|
4279
|
-
});
|
|
4280
|
-
}
|
|
4281
|
-
var node_9 = $14.sibling(node_8, 2);
|
|
4282
|
-
{
|
|
4283
|
-
var consequent_5 = ($$anchor6) => {
|
|
4284
|
-
var a = root_52();
|
|
4285
|
-
$14.template_effect(() => {
|
|
4286
|
-
$14.set_attribute(a, "href", $14.get(member).href);
|
|
4287
|
-
$14.set_attribute(a, "aria-label", `View ${$14.get(member).name}'s profile`);
|
|
4288
|
-
});
|
|
4289
|
-
$14.append($$anchor6, a);
|
|
4290
|
-
};
|
|
4291
|
-
$14.if(node_9, ($$render) => {
|
|
4292
|
-
if ($14.get(member).href)
|
|
4293
|
-
$$render(consequent_5);
|
|
4294
|
-
});
|
|
4295
|
-
}
|
|
4296
|
-
$14.append($$anchor5, fragment_2);
|
|
4297
|
-
},
|
|
4298
|
-
$$slots: { default: true }
|
|
4299
|
-
});
|
|
4300
|
-
$14.reset(li);
|
|
4301
|
-
$14.append($$anchor4, li);
|
|
4302
|
-
});
|
|
4303
|
-
$14.reset(ul);
|
|
4304
|
-
$14.reset(div);
|
|
4305
|
-
$14.append($$anchor3, div);
|
|
4306
|
-
},
|
|
4307
|
-
$$slots: { default: true }
|
|
4308
|
-
});
|
|
4309
|
-
});
|
|
4310
|
-
$14.append($$anchor, fragment);
|
|
4311
|
-
$14.pop();
|
|
4312
|
-
}
|
|
4313
|
-
|
|
4314
|
-
// src/components/team-section/index.ts
|
|
4315
|
-
var team_section_default = Team_section;
|
|
4316
|
-
export {
|
|
4317
|
-
team_section_default as default,
|
|
4318
|
-
Team_section as TeamSection
|
|
4319
|
-
};
|
|
4320
|
-
|
|
4321
|
-
//# debugId=AD0D23EB9FE19D9C64756E2164756E21
|