@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
|
@@ -56,9 +56,208 @@ import"@lostgradient/cinder/area-chart/styles";
|
|
|
56
56
|
|
|
57
57
|
// src/components/area-chart/area-chart.svelte
|
|
58
58
|
import"svelte/internal/disclose-version";
|
|
59
|
-
import * as $
|
|
59
|
+
import * as $11 from "svelte/internal/client";
|
|
60
|
+
import { onMount } from "svelte";
|
|
60
61
|
|
|
61
|
-
// src/_internal/chart/chart-
|
|
62
|
+
// src/_internal/chart/chart-layout.ts
|
|
63
|
+
var CHART_OUTER_PADDING = 16;
|
|
64
|
+
var CHART_GUIDE_GAP = 8;
|
|
65
|
+
var CHART_AXIS_TITLE_GAP = 12;
|
|
66
|
+
var HORIZONTAL_CATEGORY_LABEL_GAP = 8;
|
|
67
|
+
var HORIZONTAL_CATEGORY_LABEL_OUTER_PADDING = 8;
|
|
68
|
+
var MAXIMUM_HORIZONTAL_CATEGORY_LABEL_FRACTION = 0.4;
|
|
69
|
+
var MAXIMUM_CHART_TEXT_MEASUREMENTS = 1024;
|
|
70
|
+
function createChartGeometry(width, height, options = {}) {
|
|
71
|
+
const xTickRotation = options.xAxis?.tickLabelRotation ?? 0;
|
|
72
|
+
if (!Number.isFinite(xTickRotation)) {
|
|
73
|
+
throw new Error(`[cinder/chart] rule=invalid-tick-label-rotation tickLabelRotation="${xTickRotation}": expected a finite number.`);
|
|
74
|
+
}
|
|
75
|
+
const xTickLabels = options.xTickLabels ?? [];
|
|
76
|
+
const yTickLabels = options.yTickLabels ?? [];
|
|
77
|
+
const measurementContext = createChartTextMeasurementContext(options.measureText ?? false, options.measurementElement, options.measurementVersion ?? 0);
|
|
78
|
+
const textMeasurements = measureChartTexts([
|
|
79
|
+
...xTickLabels.map((label) => ({ label, rotation: xTickRotation })),
|
|
80
|
+
...yTickLabels.map((label) => ({ label, rotation: 0 })),
|
|
81
|
+
...options.xAxis?.label ? [{ label: options.xAxis.label, rotation: 0 }] : [],
|
|
82
|
+
...options.yAxis?.label ? [{ label: options.yAxis.label, rotation: -90 }] : []
|
|
83
|
+
], measurementContext);
|
|
84
|
+
const measurementFor = (label, rotation) => textMeasurements.get(chartTextMeasurementKey(label, rotation, measurementContext.cacheKey)) ?? fallbackChartTextMeasurement(label, rotation);
|
|
85
|
+
const xTickHeight = maximumMeasurement(xTickLabels, (label) => measurementFor(label, xTickRotation).height);
|
|
86
|
+
const firstXTickWidth = xTickLabels[0] ? measurementFor(xTickLabels[0], xTickRotation).width : 0;
|
|
87
|
+
const lastXTickLabel = xTickLabels.at(-1);
|
|
88
|
+
const lastXTickWidth = lastXTickLabel ? measurementFor(lastXTickLabel, xTickRotation).width : 0;
|
|
89
|
+
const yTickWidth = maximumMeasurement(yTickLabels, (label) => measurementFor(label, 0).width);
|
|
90
|
+
const xAxisTitleHeight = options.xAxis?.label ? measurementFor(options.xAxis.label, 0).height + CHART_AXIS_TITLE_GAP : 0;
|
|
91
|
+
const yAxisTitleWidth = options.yAxis?.label ? measurementFor(options.yAxis.label, -90).width + CHART_AXIS_TITLE_GAP : 0;
|
|
92
|
+
const derivedMarginLeft = CHART_OUTER_PADDING + yTickWidth + CHART_GUIDE_GAP + yAxisTitleWidth;
|
|
93
|
+
const maximumMarginLeft = Math.max(CHART_OUTER_PADDING, Math.floor(width * 0.4));
|
|
94
|
+
const endpointLeftMargin = Math.max(CHART_OUTER_PADDING, Math.ceil(firstXTickWidth / 2) + CHART_GUIDE_GAP);
|
|
95
|
+
const endpointRightMargin = Math.max(CHART_OUTER_PADDING, Math.ceil(lastXTickWidth / 2) + CHART_GUIDE_GAP);
|
|
96
|
+
const marginLeft = Math.min(maximumMarginLeft, Math.max(derivedMarginLeft, options.marginLeft ?? 0, endpointLeftMargin));
|
|
97
|
+
const marginTop = options.xTickPosition === "top" ? Math.min(Math.max(CHART_OUTER_PADDING, Math.floor(height * 0.45)), CHART_OUTER_PADDING + xTickHeight + CHART_GUIDE_GAP + xAxisTitleHeight) : CHART_OUTER_PADDING;
|
|
98
|
+
const marginRight = endpointRightMargin;
|
|
99
|
+
const marginBottom = options.xTickPosition === "top" ? CHART_OUTER_PADDING : Math.min(Math.max(CHART_OUTER_PADDING, Math.floor(height * 0.45)), CHART_OUTER_PADDING + xTickHeight + CHART_GUIDE_GAP + xAxisTitleHeight);
|
|
100
|
+
return {
|
|
101
|
+
plotWidth: Math.max(1, width - marginLeft - marginRight),
|
|
102
|
+
plotHeight: Math.max(1, height - marginTop - marginBottom),
|
|
103
|
+
marginTop,
|
|
104
|
+
marginRight,
|
|
105
|
+
marginBottom,
|
|
106
|
+
marginLeft
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function createHorizontalCategoryLabelLayout(labels, chartWidth, options = {}) {
|
|
110
|
+
const measurementContext = createChartTextMeasurementContext(options.measureText ?? false, options.measurementElement, options.measurementVersion ?? 0);
|
|
111
|
+
const textMeasurements = measureChartTexts([...labels.map((label) => ({ label, rotation: 0 })), { label: "…", rotation: 0 }], measurementContext);
|
|
112
|
+
const measurementFor = (label) => textMeasurements.get(chartTextMeasurementKey(label, 0, measurementContext.cacheKey)) ?? fallbackChartTextMeasurement(label, 0);
|
|
113
|
+
const maximumMarginLeft = Math.max(CHART_OUTER_PADDING, Math.floor(chartWidth * MAXIMUM_HORIZONTAL_CATEGORY_LABEL_FRACTION));
|
|
114
|
+
let longestLabelWidth = 0;
|
|
115
|
+
for (const label of labels) {
|
|
116
|
+
longestLabelWidth = Math.max(longestLabelWidth, measurementFor(label).width);
|
|
117
|
+
}
|
|
118
|
+
const requestedMarginLeft = longestLabelWidth + HORIZONTAL_CATEGORY_LABEL_GAP + HORIZONTAL_CATEGORY_LABEL_OUTER_PADDING;
|
|
119
|
+
const marginLeft = Math.min(maximumMarginLeft, Math.max(CHART_OUTER_PADDING, requestedMarginLeft));
|
|
120
|
+
const availableLabelWidth = Math.max(0, marginLeft - HORIZONTAL_CATEGORY_LABEL_GAP - HORIZONTAL_CATEGORY_LABEL_OUTER_PADDING);
|
|
121
|
+
return {
|
|
122
|
+
marginLeft,
|
|
123
|
+
labels: labels.map((label) => truncateHorizontalCategoryLabel(label, availableLabelWidth, measurementFor))
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function observeChartFontLoading(onFontsChanged) {
|
|
127
|
+
if (typeof document === "undefined" || !document.fonts)
|
|
128
|
+
return () => {};
|
|
129
|
+
let active = true;
|
|
130
|
+
const handleFontsChanged = () => {
|
|
131
|
+
if (active)
|
|
132
|
+
onFontsChanged();
|
|
133
|
+
};
|
|
134
|
+
document.fonts.addEventListener("loadingdone", handleFontsChanged);
|
|
135
|
+
document.fonts.ready.then(handleFontsChanged);
|
|
136
|
+
return () => {
|
|
137
|
+
active = false;
|
|
138
|
+
document.fonts.removeEventListener("loadingdone", handleFontsChanged);
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
function truncateHorizontalCategoryLabel(label, availableWidth, measurementFor) {
|
|
142
|
+
const measuredWidth = measurementFor(label).width;
|
|
143
|
+
if (measuredWidth <= availableWidth)
|
|
144
|
+
return label;
|
|
145
|
+
const fallbackWidth = fallbackChartTextMeasurement(label, 0).width;
|
|
146
|
+
const measurementScale = fallbackWidth > 0 ? measuredWidth / fallbackWidth : 1;
|
|
147
|
+
const estimatedWidth = (candidate) => candidate === "…" ? measurementFor("…").width : fallbackChartTextMeasurement(candidate, 0).width * measurementScale;
|
|
148
|
+
const characters = Array.from(label);
|
|
149
|
+
while (characters.length > 0) {
|
|
150
|
+
const truncated = `${characters.join("")}…`;
|
|
151
|
+
if (estimatedWidth(truncated) <= availableWidth)
|
|
152
|
+
return truncated;
|
|
153
|
+
characters.pop();
|
|
154
|
+
}
|
|
155
|
+
return availableWidth >= estimatedWidth("…") ? "…" : "";
|
|
156
|
+
}
|
|
157
|
+
function maximumMeasurement(labels, select) {
|
|
158
|
+
let maximum = 0;
|
|
159
|
+
for (const label of labels)
|
|
160
|
+
maximum = Math.max(maximum, select(label));
|
|
161
|
+
return maximum;
|
|
162
|
+
}
|
|
163
|
+
var chartTextMeasurementCache = new Map;
|
|
164
|
+
function measureChartTexts(entries, context) {
|
|
165
|
+
if (!context.container || typeof document === "undefined") {
|
|
166
|
+
return new Map(entries.map(({ label, rotation }) => [
|
|
167
|
+
chartTextMeasurementKey(label, rotation, context.cacheKey),
|
|
168
|
+
fallbackChartTextMeasurement(label, rotation)
|
|
169
|
+
]));
|
|
170
|
+
}
|
|
171
|
+
const uniqueEntries = [
|
|
172
|
+
...new Map(entries.map((entry) => [
|
|
173
|
+
chartTextMeasurementKey(entry.label, entry.rotation, context.cacheKey),
|
|
174
|
+
entry
|
|
175
|
+
])).values()
|
|
176
|
+
];
|
|
177
|
+
const missing = uniqueEntries.filter(({ label, rotation }) => !chartTextMeasurementCache.has(chartTextMeasurementKey(label, rotation, context.cacheKey)));
|
|
178
|
+
if (missing.length > 0) {
|
|
179
|
+
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
180
|
+
svg.setAttribute("style", "position:absolute;visibility:hidden;pointer-events:none;inline-size:0;block-size:0");
|
|
181
|
+
const texts = missing.map((entry) => {
|
|
182
|
+
const text = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
183
|
+
if (context.textStyle)
|
|
184
|
+
text.setAttribute("style", context.textStyle);
|
|
185
|
+
text.textContent = entry.label;
|
|
186
|
+
svg.append(text);
|
|
187
|
+
return { ...entry, text };
|
|
188
|
+
});
|
|
189
|
+
context.container.append(svg);
|
|
190
|
+
for (const { label, rotation, text } of texts) {
|
|
191
|
+
let measurement;
|
|
192
|
+
try {
|
|
193
|
+
const bounds = text.getBBox();
|
|
194
|
+
if (bounds.width > 0 && bounds.height > 0) {
|
|
195
|
+
measurement = { width: bounds.width, height: bounds.height };
|
|
196
|
+
}
|
|
197
|
+
} catch {}
|
|
198
|
+
if (measurement) {
|
|
199
|
+
cacheChartTextMeasurement(chartTextMeasurementKey(label, rotation, context.cacheKey), rotateChartTextMeasurement(measurement, rotation));
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
svg.remove();
|
|
203
|
+
}
|
|
204
|
+
return new Map(entries.map(({ label, rotation }) => [
|
|
205
|
+
chartTextMeasurementKey(label, rotation, context.cacheKey),
|
|
206
|
+
chartTextMeasurementCache.get(chartTextMeasurementKey(label, rotation, context.cacheKey)) ?? fallbackChartTextMeasurement(label, rotation)
|
|
207
|
+
]));
|
|
208
|
+
}
|
|
209
|
+
function cacheChartTextMeasurement(key, measurement) {
|
|
210
|
+
if (!chartTextMeasurementCache.has(key)) {
|
|
211
|
+
while (chartTextMeasurementCache.size >= MAXIMUM_CHART_TEXT_MEASUREMENTS) {
|
|
212
|
+
const oldestKey = chartTextMeasurementCache.keys().next().value;
|
|
213
|
+
if (oldestKey === undefined)
|
|
214
|
+
break;
|
|
215
|
+
chartTextMeasurementCache.delete(oldestKey);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
chartTextMeasurementCache.set(key, measurement);
|
|
219
|
+
}
|
|
220
|
+
function chartTextMeasurementKey(label, rotation, measurementContext) {
|
|
221
|
+
return `${label}\x00${rotation}\x00${measurementContext}`;
|
|
222
|
+
}
|
|
223
|
+
function createChartTextMeasurementContext(allowBrowserMeasurement, measurementElement, measurementVersion) {
|
|
224
|
+
if (!allowBrowserMeasurement || !measurementElement || typeof window === "undefined" || !measurementElement.isConnected) {
|
|
225
|
+
return { cacheKey: "fallback" };
|
|
226
|
+
}
|
|
227
|
+
const style = window.getComputedStyle(measurementElement);
|
|
228
|
+
const fontSize = style.getPropertyValue("--cinder-text-xs").trim() || style.fontSize;
|
|
229
|
+
const textStyle = [
|
|
230
|
+
`font-family:${style.fontFamily}`,
|
|
231
|
+
`font-size:${fontSize}`,
|
|
232
|
+
`font-style:${style.fontStyle}`,
|
|
233
|
+
`font-weight:${style.fontWeight}`,
|
|
234
|
+
`font-stretch:${style.fontStretch}`,
|
|
235
|
+
`font-variant:${style.fontVariant}`,
|
|
236
|
+
`font-feature-settings:${style.fontFeatureSettings}`,
|
|
237
|
+
`font-kerning:${style.fontKerning}`,
|
|
238
|
+
`letter-spacing:${style.letterSpacing}`,
|
|
239
|
+
`text-transform:${style.textTransform}`
|
|
240
|
+
].join(";");
|
|
241
|
+
return {
|
|
242
|
+
cacheKey: `browser\x00${measurementVersion}\x00${textStyle}`,
|
|
243
|
+
container: measurementElement,
|
|
244
|
+
textStyle
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
function fallbackChartTextMeasurement(label, rotation) {
|
|
248
|
+
return rotateChartTextMeasurement({ width: Array.from(label).length * 7, height: 12 }, rotation);
|
|
249
|
+
}
|
|
250
|
+
function rotateChartTextMeasurement(measurement, rotation) {
|
|
251
|
+
if (rotation === 0)
|
|
252
|
+
return measurement;
|
|
253
|
+
const radians = Math.abs(rotation) * Math.PI / 180;
|
|
254
|
+
return {
|
|
255
|
+
width: Math.abs(measurement.width * Math.cos(radians)) + Math.abs(measurement.height * Math.sin(radians)),
|
|
256
|
+
height: Math.abs(measurement.width * Math.sin(radians)) + Math.abs(measurement.height * Math.cos(radians))
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// src/_internal/chart/chart-model-utilities.ts
|
|
62
261
|
var chartPalette = [
|
|
63
262
|
"var(--cinder-chart-series-1)",
|
|
64
263
|
"var(--cinder-chart-series-2)",
|
|
@@ -69,8 +268,26 @@ var chartPalette = [
|
|
|
69
268
|
"var(--cinder-chart-series-7)",
|
|
70
269
|
"var(--cinder-chart-series-8)"
|
|
71
270
|
];
|
|
72
|
-
function chartPaletteColor(index) {
|
|
73
|
-
|
|
271
|
+
function chartPaletteColor(index, palette = chartPalette) {
|
|
272
|
+
const resolvedPalette = palette.length > 0 ? palette : chartPalette;
|
|
273
|
+
if (index < 0)
|
|
274
|
+
return resolvedPalette[0] ?? chartPalette[0];
|
|
275
|
+
return resolvedPalette[index % resolvedPalette.length] ?? chartPalette[0];
|
|
276
|
+
}
|
|
277
|
+
function resolveChartTheme(theme = undefined) {
|
|
278
|
+
return {
|
|
279
|
+
foreground: theme?.foreground ?? "currentColor",
|
|
280
|
+
muted: theme?.muted ?? "currentColor",
|
|
281
|
+
grid: theme?.grid ?? "currentColor",
|
|
282
|
+
background: theme?.background ?? "transparent",
|
|
283
|
+
palette: theme?.palette?.length ? [...theme.palette] : [...chartPalette]
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
function chartResourceSegment(segment) {
|
|
287
|
+
return encodeURIComponent(segment).replace(/[!'()*]/g, (character) => `%${character.charCodeAt(0).toString(16).toUpperCase()}`).replaceAll("_", "_u").replaceAll("-", "_d").replaceAll("%", "_x");
|
|
288
|
+
}
|
|
289
|
+
function chartResourceId(idPrefix, resource, seriesId) {
|
|
290
|
+
return [idPrefix, resource, seriesId].map(chartResourceSegment).join("-");
|
|
74
291
|
}
|
|
75
292
|
function assertValidChartNumber(componentId, rule, value, label) {
|
|
76
293
|
if (!Number.isFinite(value) || value <= 0) {
|
|
@@ -92,6 +309,9 @@ function assertValidTickCount(componentId, axis) {
|
|
|
92
309
|
function dataTableClass(visibility) {
|
|
93
310
|
return visibility === "screen-reader-only" ? "cinder-sr-only" : undefined;
|
|
94
311
|
}
|
|
312
|
+
function formatDataTableCaption(caption, displayedRowCount, totalRowCount) {
|
|
313
|
+
return totalRowCount > displayedRowCount ? `${caption} (showing ${displayedRowCount} of ${totalRowCount} data points)` : caption;
|
|
314
|
+
}
|
|
95
315
|
function formatXValue(value, axis, context) {
|
|
96
316
|
return axis?.format ? axis.format(value.raw, context) : value.label;
|
|
97
317
|
}
|
|
@@ -136,194 +356,462 @@ function assertUniqueSeriesIds(componentId, series) {
|
|
|
136
356
|
function toggleSeriesId(hiddenSeriesIds, seriesId) {
|
|
137
357
|
return hiddenSeriesIds.includes(seriesId) ? hiddenSeriesIds.filter((id) => id !== seriesId) : [...hiddenSeriesIds, seriesId];
|
|
138
358
|
}
|
|
139
|
-
function
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
if (
|
|
164
|
-
|
|
359
|
+
function nearestTarget(targets, x, y, axis = "x") {
|
|
360
|
+
if (targets.length === 0)
|
|
361
|
+
return;
|
|
362
|
+
if (targets.length === 1)
|
|
363
|
+
return targets[0];
|
|
364
|
+
const pointerKey = axis === "x" ? x : y;
|
|
365
|
+
let low = 0;
|
|
366
|
+
let high = targets.length - 1;
|
|
367
|
+
while (low < high) {
|
|
368
|
+
const mid = low + high >> 1;
|
|
369
|
+
const midKey = axis === "x" ? targets[mid]?.x ?? 0 : targets[mid]?.y ?? 0;
|
|
370
|
+
if (midKey < pointerKey)
|
|
371
|
+
low = mid + 1;
|
|
372
|
+
else
|
|
373
|
+
high = mid;
|
|
374
|
+
}
|
|
375
|
+
const candidates = [];
|
|
376
|
+
function addBucket(start) {
|
|
377
|
+
const target = targets[start];
|
|
378
|
+
if (!target)
|
|
379
|
+
return;
|
|
380
|
+
const bucketKey = axis === "x" ? target.x : target.y;
|
|
381
|
+
for (let index = start;index >= 0; index--) {
|
|
382
|
+
const candidate = targets[index];
|
|
383
|
+
if (!candidate)
|
|
384
|
+
continue;
|
|
385
|
+
const candidateKey = axis === "x" ? candidate.x : candidate.y;
|
|
386
|
+
if (candidateKey !== bucketKey)
|
|
387
|
+
break;
|
|
388
|
+
candidates.push(candidate);
|
|
389
|
+
}
|
|
390
|
+
for (let index = start + 1;index < targets.length; index++) {
|
|
391
|
+
const candidate = targets[index];
|
|
392
|
+
if (!candidate)
|
|
393
|
+
continue;
|
|
394
|
+
const candidateKey = axis === "x" ? candidate.x : candidate.y;
|
|
395
|
+
if (candidateKey !== bucketKey)
|
|
396
|
+
break;
|
|
397
|
+
candidates.push(candidate);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
addBucket(low);
|
|
401
|
+
if (low > 0) {
|
|
402
|
+
addBucket(low - 1);
|
|
403
|
+
}
|
|
404
|
+
let nearest;
|
|
405
|
+
let nearestDistance = Number.POSITIVE_INFINITY;
|
|
406
|
+
for (const target of candidates) {
|
|
407
|
+
const targetDistance = Math.hypot(target.x - x, target.y - y);
|
|
408
|
+
if (targetDistance >= nearestDistance)
|
|
409
|
+
continue;
|
|
410
|
+
nearest = target;
|
|
411
|
+
nearestDistance = targetDistance;
|
|
412
|
+
}
|
|
413
|
+
return nearest;
|
|
414
|
+
}
|
|
415
|
+
function legendVisible(legendPosition, seriesCount) {
|
|
416
|
+
return legendPosition !== "none" && seriesCount > 0;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
// src/_internal/chart/chart-scale.ts
|
|
420
|
+
var MAXIMUM_RENDERED_SERIES_POINTS = 2000;
|
|
421
|
+
function evenlySample(values, count) {
|
|
422
|
+
if (values.length <= count)
|
|
423
|
+
return [...values];
|
|
424
|
+
if (count <= 1)
|
|
425
|
+
return values[0] === undefined ? [] : [values[0]];
|
|
426
|
+
return Array.from({ length: count }, (_, index) => {
|
|
427
|
+
const sourceIndex = Math.round(index * (values.length - 1) / (count - 1));
|
|
428
|
+
return values[sourceIndex];
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
function boundedGapHeavyIndices(points, limit) {
|
|
432
|
+
const finiteRuns = [];
|
|
433
|
+
let index = 0;
|
|
434
|
+
while (index < points.length) {
|
|
435
|
+
while (index < points.length && points[index]?.y === null)
|
|
436
|
+
index += 1;
|
|
437
|
+
if (index >= points.length)
|
|
438
|
+
break;
|
|
439
|
+
let representative = index;
|
|
440
|
+
let maximumMagnitude = Math.abs(points[index]?.y ?? 0);
|
|
441
|
+
while (index + 1 < points.length && points[index + 1]?.y !== null) {
|
|
442
|
+
index += 1;
|
|
443
|
+
const magnitude = Math.abs(points[index]?.y ?? 0);
|
|
444
|
+
if (magnitude > maximumMagnitude) {
|
|
445
|
+
maximumMagnitude = magnitude;
|
|
446
|
+
representative = index;
|
|
165
447
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
});
|
|
179
|
-
return { id: item.id, label: item.label, color, points };
|
|
448
|
+
}
|
|
449
|
+
finiteRuns.push({ end: index, representative });
|
|
450
|
+
index += 1;
|
|
451
|
+
}
|
|
452
|
+
const maximumFiniteRuns = Math.max(1, Math.floor((limit + 1) / 2));
|
|
453
|
+
const sampledRuns = evenlySample(finiteRuns, maximumFiniteRuns);
|
|
454
|
+
const selected = [];
|
|
455
|
+
sampledRuns.forEach((run, runIndex) => {
|
|
456
|
+
const previousRun = sampledRuns[runIndex - 1];
|
|
457
|
+
if (previousRun)
|
|
458
|
+
selected.push(previousRun.end + 1);
|
|
459
|
+
selected.push(run.representative);
|
|
180
460
|
});
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
461
|
+
return selected.sort((a, b) => a - b);
|
|
462
|
+
}
|
|
463
|
+
function layerExtremaIndices(layers, startIndex, endIndex) {
|
|
464
|
+
const extrema = new Set;
|
|
465
|
+
for (const layer of layers) {
|
|
466
|
+
let minimumIndex;
|
|
467
|
+
let maximumIndex;
|
|
468
|
+
let minimumValue = Number.POSITIVE_INFINITY;
|
|
469
|
+
let maximumValue = Number.NEGATIVE_INFINITY;
|
|
470
|
+
for (let index = startIndex;index < endIndex; index++) {
|
|
471
|
+
const value = layer[index];
|
|
472
|
+
if (value == null)
|
|
473
|
+
continue;
|
|
474
|
+
if (value < minimumValue) {
|
|
475
|
+
minimumValue = value;
|
|
476
|
+
minimumIndex = index;
|
|
477
|
+
}
|
|
478
|
+
if (value > maximumValue) {
|
|
479
|
+
maximumValue = value;
|
|
480
|
+
maximumIndex = index;
|
|
190
481
|
}
|
|
191
482
|
}
|
|
483
|
+
if (minimumIndex !== undefined)
|
|
484
|
+
extrema.add(minimumIndex);
|
|
485
|
+
if (maximumIndex !== undefined)
|
|
486
|
+
extrema.add(maximumIndex);
|
|
192
487
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
488
|
+
return [...extrema];
|
|
489
|
+
}
|
|
490
|
+
function boundedGapHeavyLayerSelections(layers, pointCount, limit) {
|
|
491
|
+
const finiteIndices = [];
|
|
492
|
+
for (let index = 0;index < pointCount; index++) {
|
|
493
|
+
if (layers.some((layer) => layer[index] != null))
|
|
494
|
+
finiteIndices.push(index);
|
|
495
|
+
}
|
|
496
|
+
const maximumFiniteSamples = Math.max(1, Math.floor((limit + 1) / 2));
|
|
497
|
+
const retainedIndices = new Set;
|
|
498
|
+
const priorityIndices = [
|
|
499
|
+
finiteIndices[0],
|
|
500
|
+
finiteIndices.at(-1),
|
|
501
|
+
...layerExtremaIndices(layers, 0, pointCount)
|
|
502
|
+
];
|
|
503
|
+
for (const index of priorityIndices) {
|
|
504
|
+
if (index !== undefined && retainedIndices.size < maximumFiniteSamples) {
|
|
505
|
+
retainedIndices.add(index);
|
|
202
506
|
}
|
|
203
507
|
}
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
508
|
+
const extremaPerBucket = Math.max(1, layers.length * 2);
|
|
509
|
+
const bucketCount = Math.floor((maximumFiniteSamples - retainedIndices.size) / extremaPerBucket);
|
|
510
|
+
for (let bucketIndex = 0;bucketIndex < bucketCount; bucketIndex++) {
|
|
511
|
+
const startIndex = Math.floor(bucketIndex * pointCount / bucketCount);
|
|
512
|
+
const endIndex = Math.floor((bucketIndex + 1) * pointCount / bucketCount);
|
|
513
|
+
for (const index of layerExtremaIndices(layers, startIndex, endIndex)) {
|
|
514
|
+
if (retainedIndices.size < maximumFiniteSamples)
|
|
515
|
+
retainedIndices.add(index);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
const remainingCapacity = maximumFiniteSamples - retainedIndices.size;
|
|
519
|
+
if (remainingCapacity > 0) {
|
|
520
|
+
const coverageCandidates = finiteIndices.filter((index) => !retainedIndices.has(index));
|
|
521
|
+
for (const index of evenlySample(coverageCandidates, remainingCapacity)) {
|
|
522
|
+
retainedIndices.add(index);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
const sampledIndices = [...retainedIndices].sort((a, b) => a - b);
|
|
526
|
+
const selectedSourceIndices = [];
|
|
527
|
+
sampledIndices.forEach((sourceIndex, selectionIndex) => {
|
|
528
|
+
const previousSourceIndex = sampledIndices[selectionIndex - 1];
|
|
529
|
+
if (previousSourceIndex !== undefined && sourceIndex > previousSourceIndex + 1) {
|
|
530
|
+
if (layers.some((layer) => layerHasOmittedGap(layer, previousSourceIndex, sourceIndex))) {
|
|
531
|
+
selectedSourceIndices.push(previousSourceIndex + Math.floor((sourceIndex - previousSourceIndex) / 2));
|
|
213
532
|
}
|
|
214
533
|
}
|
|
534
|
+
selectedSourceIndices.push(sourceIndex);
|
|
535
|
+
});
|
|
536
|
+
return selectedSourceIndices.map((sourceIndex, selectionIndex) => {
|
|
537
|
+
const previousSourceIndex = selectedSourceIndices[selectionIndex - 1];
|
|
538
|
+
const forceGapLayerIndices = [];
|
|
539
|
+
if (previousSourceIndex !== undefined && sourceIndex > previousSourceIndex + 1) {
|
|
540
|
+
layers.forEach((layer, layerIndex) => {
|
|
541
|
+
if (layerHasOmittedGap(layer, previousSourceIndex, sourceIndex)) {
|
|
542
|
+
forceGapLayerIndices.push(layerIndex);
|
|
543
|
+
}
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
return { sourceIndex, forceGapLayerIndices };
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
function layerHasOmittedGap(layer, startIndex, endIndex) {
|
|
550
|
+
if (layer[startIndex] == null || layer[endIndex] == null)
|
|
551
|
+
return false;
|
|
552
|
+
for (let gapIndex = startIndex + 1;gapIndex < endIndex; gapIndex++) {
|
|
553
|
+
if (layer[gapIndex] == null)
|
|
554
|
+
return true;
|
|
555
|
+
}
|
|
556
|
+
return false;
|
|
557
|
+
}
|
|
558
|
+
function addGapBoundaryIndices(selected, pointCount, valueAt) {
|
|
559
|
+
for (let index = 1;index < pointCount; index++) {
|
|
560
|
+
const previousIsNull = valueAt(index - 1) == null;
|
|
561
|
+
const currentIsNull = valueAt(index) == null;
|
|
562
|
+
if (previousIsNull === currentIsNull)
|
|
563
|
+
continue;
|
|
564
|
+
selected.add(index - 1);
|
|
565
|
+
selected.add(index);
|
|
215
566
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
567
|
+
}
|
|
568
|
+
function decimationIndices(points, maximumPoints = MAXIMUM_RENDERED_SERIES_POINTS) {
|
|
569
|
+
if (points.length <= maximumPoints || maximumPoints < 2) {
|
|
570
|
+
return points.map((_, index) => index);
|
|
571
|
+
}
|
|
572
|
+
const limit = Math.max(2, Math.floor(maximumPoints));
|
|
573
|
+
const interiorLength = points.length - 2;
|
|
574
|
+
const selected = new Set([0, points.length - 1]);
|
|
575
|
+
addGapBoundaryIndices(selected, points.length, (index) => points[index]?.y);
|
|
576
|
+
const remainingExtremaBudget = limit - selected.size;
|
|
577
|
+
const bucketCount = Math.floor(remainingExtremaBudget / 2);
|
|
578
|
+
if (bucketCount < 1)
|
|
579
|
+
return boundedGapHeavyIndices(points, limit);
|
|
580
|
+
for (let bucketIndex = 0;bucketIndex < bucketCount; bucketIndex++) {
|
|
581
|
+
const start = 1 + Math.floor(bucketIndex * interiorLength / bucketCount);
|
|
582
|
+
const end = 1 + Math.floor((bucketIndex + 1) * interiorLength / bucketCount);
|
|
583
|
+
if (end <= start)
|
|
584
|
+
continue;
|
|
585
|
+
let minimumIndex;
|
|
586
|
+
let maximumIndex;
|
|
587
|
+
let minimumValue = Number.POSITIVE_INFINITY;
|
|
588
|
+
let maximumValue = Number.NEGATIVE_INFINITY;
|
|
589
|
+
for (let index = start;index < end; index++) {
|
|
590
|
+
const point = points[index];
|
|
591
|
+
if (!point)
|
|
592
|
+
continue;
|
|
593
|
+
if (point.y === null)
|
|
594
|
+
continue;
|
|
595
|
+
if (point.y < minimumValue) {
|
|
596
|
+
minimumValue = point.y;
|
|
597
|
+
minimumIndex = index;
|
|
598
|
+
}
|
|
599
|
+
if (point.y > maximumValue) {
|
|
600
|
+
maximumValue = point.y;
|
|
601
|
+
maximumIndex = index;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
if (minimumIndex !== undefined)
|
|
605
|
+
selected.add(minimumIndex);
|
|
606
|
+
if (maximumIndex !== undefined)
|
|
607
|
+
selected.add(maximumIndex);
|
|
225
608
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
const placedPoints = points.map((point) => {
|
|
235
|
-
const lowerValue = stackedArea ? stackedOffsetsByKey.get(point.x.key) ?? 0 : 0;
|
|
236
|
-
const upperValue = lowerValue + (point.y ?? 0);
|
|
237
|
-
return {
|
|
238
|
-
...point,
|
|
239
|
-
pixelX: scaleX(point.x),
|
|
240
|
-
pixelY: yScale(stackedArea ? upperValue : point.y ?? 0)
|
|
241
|
-
};
|
|
242
|
-
});
|
|
243
|
-
const coordinates = placedPoints.map((placed) => ({
|
|
244
|
-
x: placed.pixelX,
|
|
245
|
-
y: placed.pixelY,
|
|
246
|
-
y0: yScale(stackedArea ? stackedOffsetsByKey.get(placed.x.key) ?? 0 : 0)
|
|
609
|
+
return [...selected].sort((a, b) => a - b);
|
|
610
|
+
}
|
|
611
|
+
function decimationIndicesForLayers(layers, maximumPoints = MAXIMUM_RENDERED_SERIES_POINTS) {
|
|
612
|
+
const pointCount = layers[0]?.length ?? 0;
|
|
613
|
+
if (pointCount <= maximumPoints || maximumPoints < 2) {
|
|
614
|
+
return Array.from({ length: pointCount }, (_, sourceIndex) => ({
|
|
615
|
+
sourceIndex,
|
|
616
|
+
forceGapLayerIndices: []
|
|
247
617
|
}));
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
618
|
+
}
|
|
619
|
+
const limit = Math.max(2, Math.floor(maximumPoints));
|
|
620
|
+
const interiorLength = pointCount - 2;
|
|
621
|
+
const selected = new Set([0, pointCount - 1]);
|
|
622
|
+
for (const layer of layers) {
|
|
623
|
+
addGapBoundaryIndices(selected, pointCount, (index) => layer[index]);
|
|
624
|
+
}
|
|
625
|
+
const candidatesPerBucket = Math.max(1, layers.length * 2);
|
|
626
|
+
const bucketCount = Math.floor((limit - selected.size) / candidatesPerBucket);
|
|
627
|
+
if (bucketCount < 1)
|
|
628
|
+
return boundedGapHeavyLayerSelections(layers, pointCount, limit);
|
|
629
|
+
for (let bucketIndex = 0;bucketIndex < bucketCount; bucketIndex++) {
|
|
630
|
+
const start = 1 + Math.floor(bucketIndex * interiorLength / bucketCount);
|
|
631
|
+
const end = 1 + Math.floor((bucketIndex + 1) * interiorLength / bucketCount);
|
|
632
|
+
if (end <= start)
|
|
633
|
+
continue;
|
|
634
|
+
for (const layer of layers) {
|
|
635
|
+
let minimumIndex;
|
|
636
|
+
let maximumIndex;
|
|
637
|
+
let minimumValue = Number.POSITIVE_INFINITY;
|
|
638
|
+
let maximumValue = Number.NEGATIVE_INFINITY;
|
|
639
|
+
for (let index = start;index < end; index++) {
|
|
640
|
+
const value = layer[index];
|
|
641
|
+
if (value === null || value === undefined)
|
|
642
|
+
continue;
|
|
643
|
+
if (value < minimumValue) {
|
|
644
|
+
minimumValue = value;
|
|
645
|
+
minimumIndex = index;
|
|
646
|
+
}
|
|
647
|
+
if (value > maximumValue) {
|
|
648
|
+
maximumValue = value;
|
|
649
|
+
maximumIndex = index;
|
|
276
650
|
}
|
|
277
651
|
}
|
|
652
|
+
if (minimumIndex !== undefined)
|
|
653
|
+
selected.add(minimumIndex);
|
|
654
|
+
if (maximumIndex !== undefined)
|
|
655
|
+
selected.add(maximumIndex);
|
|
278
656
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
657
|
+
}
|
|
658
|
+
return [...selected].sort((a, b) => a - b).map((sourceIndex) => ({ sourceIndex, forceGapLayerIndices: [] }));
|
|
659
|
+
}
|
|
660
|
+
function decimatePlacedPoints(points, maximumPoints = MAXIMUM_RENDERED_SERIES_POINTS) {
|
|
661
|
+
return decimationIndices(points, maximumPoints).map((index) => points[index]);
|
|
662
|
+
}
|
|
663
|
+
function normalizeNumericValue(componentId, seriesId, xLabel, value) {
|
|
664
|
+
if (value === null || value === undefined)
|
|
665
|
+
return null;
|
|
666
|
+
if (!Number.isFinite(value)) {
|
|
667
|
+
throw new Error(`[cinder/${componentId}] rule=non-finite-y series="${seriesId}" x="${xLabel}": y values must be finite numbers.`);
|
|
668
|
+
}
|
|
669
|
+
return value;
|
|
670
|
+
}
|
|
671
|
+
function sortXValues(values) {
|
|
672
|
+
if (values[0]?.kind === "string")
|
|
673
|
+
return values;
|
|
674
|
+
return values.slice().sort((a, b) => Number(a.comparable) - Number(b.comparable));
|
|
675
|
+
}
|
|
676
|
+
function createPaddedDomain(values) {
|
|
677
|
+
if (values.length === 0)
|
|
678
|
+
return [-1, 1];
|
|
679
|
+
let minimum = values[0];
|
|
680
|
+
let maximum = values[0];
|
|
681
|
+
for (let index = 1;index < values.length; index++) {
|
|
682
|
+
const value = values[index];
|
|
683
|
+
if (value < minimum)
|
|
684
|
+
minimum = value;
|
|
685
|
+
if (value > maximum)
|
|
686
|
+
maximum = value;
|
|
687
|
+
}
|
|
688
|
+
if (minimum === maximum)
|
|
689
|
+
return [minimum - 1, maximum + 1];
|
|
690
|
+
return [Math.min(0, minimum), Math.max(0, maximum)];
|
|
691
|
+
}
|
|
692
|
+
function createLinearScale(domain, range) {
|
|
693
|
+
const [domainMinimum, domainMaximum] = domain[0] === domain[1] ? [domain[0] - 1, domain[1] + 1] : domain;
|
|
694
|
+
const [rangeMinimum, rangeMaximum] = range;
|
|
695
|
+
const domainSpan = domainMaximum - domainMinimum;
|
|
696
|
+
const rangeSpan = rangeMaximum - rangeMinimum;
|
|
697
|
+
const scale = Object.assign((value) => rangeMinimum + (value - domainMinimum) / domainSpan * rangeSpan, {
|
|
698
|
+
ticks: (count) => createTicks([domainMinimum, domainMaximum], count)
|
|
286
699
|
});
|
|
287
|
-
|
|
288
|
-
return {
|
|
289
|
-
geometry,
|
|
290
|
-
xTicks,
|
|
291
|
-
yTicks: yScale.ticks(yAxis?.tickCount ?? 5),
|
|
292
|
-
normalizedSeries: renderedSeries,
|
|
293
|
-
tableRows,
|
|
294
|
-
targets,
|
|
295
|
-
empty: targets.length === 0,
|
|
296
|
-
yDomain: [yMinimum, yMaximum]
|
|
297
|
-
};
|
|
700
|
+
return scale;
|
|
298
701
|
}
|
|
299
|
-
function
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
702
|
+
function createPointScale(domain, range, padding) {
|
|
703
|
+
const positions = new Map;
|
|
704
|
+
const [rangeMinimum, rangeMaximum] = range;
|
|
705
|
+
if (domain.length === 1) {
|
|
706
|
+
positions.set(domain[0] ?? "", rangeMinimum + (rangeMaximum - rangeMinimum) / 2);
|
|
707
|
+
} else {
|
|
708
|
+
const step = (rangeMaximum - rangeMinimum) / Math.max(1, domain.length - 1 + padding * 2);
|
|
709
|
+
const start = rangeMinimum + step * padding;
|
|
710
|
+
domain.forEach((value, index) => positions.set(value, start + step * index));
|
|
711
|
+
}
|
|
712
|
+
return (value) => positions.get(value);
|
|
713
|
+
}
|
|
714
|
+
function createBandScale(domain, range, padding) {
|
|
715
|
+
const positions = new Map;
|
|
716
|
+
const [rangeMinimum, rangeMaximum] = range;
|
|
717
|
+
const availableSize = Math.max(0, rangeMaximum - rangeMinimum);
|
|
718
|
+
const step = domain.length === 0 ? 0 : availableSize / Math.max(1, domain.length + padding * (domain.length - 1));
|
|
719
|
+
const bandWidth = Math.max(0, step * (1 - padding));
|
|
720
|
+
domain.forEach((value, index) => positions.set(value, rangeMinimum + step * index));
|
|
721
|
+
const scale = Object.assign((value) => positions.get(value), {
|
|
722
|
+
bandwidth: () => bandWidth
|
|
723
|
+
});
|
|
724
|
+
return scale;
|
|
725
|
+
}
|
|
726
|
+
function createNumericDomain(values) {
|
|
727
|
+
if (values.length === 0)
|
|
728
|
+
return [0, 1];
|
|
729
|
+
let minimum = Number(values[0].comparable);
|
|
730
|
+
let maximum = minimum;
|
|
731
|
+
for (let index = 1;index < values.length; index++) {
|
|
732
|
+
const numeric = Number(values[index].comparable);
|
|
733
|
+
if (numeric < minimum)
|
|
734
|
+
minimum = numeric;
|
|
735
|
+
if (numeric > maximum)
|
|
736
|
+
maximum = numeric;
|
|
308
737
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
738
|
+
return minimum === maximum ? [minimum - 1, maximum + 1] : [minimum, maximum];
|
|
739
|
+
}
|
|
740
|
+
function createTicks(domain, count) {
|
|
741
|
+
const safeCount = Math.max(1, Math.floor(count));
|
|
742
|
+
if (safeCount === 1)
|
|
743
|
+
return [domain[0]];
|
|
744
|
+
const step = (domain[1] - domain[0]) / (safeCount - 1);
|
|
745
|
+
return Array.from({ length: safeCount }, (_, index) => domain[0] + step * index);
|
|
746
|
+
}
|
|
747
|
+
function createLinePath(points) {
|
|
748
|
+
if (points.length === 0)
|
|
749
|
+
return "";
|
|
750
|
+
const commands = [];
|
|
751
|
+
for (const [index, point] of points.entries()) {
|
|
752
|
+
if (point.y === null)
|
|
753
|
+
continue;
|
|
754
|
+
const previous = points[index - 1];
|
|
755
|
+
commands.push(previous?.y === null || commands.length === 0 ? `M${formatPathNumber(point.x)},${formatPathNumber(point.y)}` : `L${formatPathNumber(point.x)},${formatPathNumber(point.y)}`);
|
|
312
756
|
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
757
|
+
return commands.join("");
|
|
758
|
+
}
|
|
759
|
+
function createAreaPath(points, baseline) {
|
|
760
|
+
const segments = [];
|
|
761
|
+
let segment = [];
|
|
762
|
+
for (const point of points) {
|
|
763
|
+
if (point.y === null) {
|
|
764
|
+
if (segment.length > 0)
|
|
765
|
+
segments.push(segment);
|
|
766
|
+
segment = [];
|
|
319
767
|
continue;
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
768
|
+
}
|
|
769
|
+
segment.push({ ...point, y: point.y });
|
|
770
|
+
}
|
|
771
|
+
if (segment.length > 0)
|
|
772
|
+
segments.push(segment);
|
|
773
|
+
return segments.map((visiblePoints) => {
|
|
774
|
+
const firstPoint = visiblePoints[0];
|
|
775
|
+
const lowerPoints = [];
|
|
776
|
+
for (let index = visiblePoints.length - 1;index >= 0; index--) {
|
|
777
|
+
const point = visiblePoints[index];
|
|
778
|
+
lowerPoints.push(`L${formatPathNumber(point.x)},${formatPathNumber(point.y0 ?? baseline ?? 0)}`);
|
|
779
|
+
}
|
|
780
|
+
return [
|
|
781
|
+
`M${formatPathNumber(firstPoint.x)},${formatPathNumber(firstPoint.y0 ?? baseline ?? 0)}`,
|
|
782
|
+
`L${formatPathNumber(firstPoint.x)},${formatPathNumber(firstPoint.y)}`,
|
|
783
|
+
...visiblePoints.slice(1).map((point) => `L${formatPathNumber(point.x)},${formatPathNumber(point.y)}`),
|
|
784
|
+
...lowerPoints,
|
|
785
|
+
"Z"
|
|
786
|
+
].join("");
|
|
787
|
+
}).join("");
|
|
788
|
+
}
|
|
789
|
+
function createStackedBarDomainValues(datumByKey, categories, series) {
|
|
790
|
+
const values = [0];
|
|
791
|
+
for (const category of categories) {
|
|
792
|
+
const datum = datumByKey.get(category.key);
|
|
793
|
+
if (!datum)
|
|
794
|
+
continue;
|
|
795
|
+
let positiveTotal = 0;
|
|
796
|
+
let negativeTotal = 0;
|
|
797
|
+
for (const item of series) {
|
|
798
|
+
const value = datum[item.valueKey];
|
|
799
|
+
if (typeof value !== "number")
|
|
800
|
+
continue;
|
|
801
|
+
if (value >= 0)
|
|
802
|
+
positiveTotal += value;
|
|
803
|
+
else
|
|
804
|
+
negativeTotal += value;
|
|
805
|
+
}
|
|
806
|
+
values.push(positiveTotal, negativeTotal);
|
|
324
807
|
}
|
|
325
|
-
return
|
|
808
|
+
return values;
|
|
326
809
|
}
|
|
810
|
+
function formatPathNumber(value) {
|
|
811
|
+
return Number(value.toFixed(3)).toString();
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
// src/_internal/chart/chart-bar-model.ts
|
|
327
815
|
function createBarModel(options) {
|
|
328
816
|
const {
|
|
329
817
|
data,
|
|
@@ -335,12 +823,17 @@ function createBarModel(options) {
|
|
|
335
823
|
orientation,
|
|
336
824
|
mode,
|
|
337
825
|
xAxis,
|
|
338
|
-
yAxis
|
|
826
|
+
yAxis,
|
|
827
|
+
theme,
|
|
828
|
+
measureText = false,
|
|
829
|
+
measurementElement,
|
|
830
|
+
measurementVersion = 0
|
|
339
831
|
} = options;
|
|
340
832
|
assertUniqueSeriesIds("bar-chart", series);
|
|
341
833
|
assertValidChartNumber("bar-chart", "invalid-height", height, "height");
|
|
342
834
|
assertValidTickCount("bar-chart", xAxis);
|
|
343
835
|
assertValidTickCount("bar-chart", yAxis);
|
|
836
|
+
const resolvedTheme = resolveChartTheme(theme);
|
|
344
837
|
const categories = [];
|
|
345
838
|
const seenCategories = new Set;
|
|
346
839
|
const categoryKinds = new Set;
|
|
@@ -381,21 +874,37 @@ function createBarModel(options) {
|
|
|
381
874
|
}
|
|
382
875
|
const sortedCategories = sortXValues(categories);
|
|
383
876
|
const categoryLabels = sortedCategories.map((category, index) => formatXValue(category, orientation === "vertical" ? xAxis : yAxis, { index }));
|
|
384
|
-
const horizontalCategoryLabelLayout = orientation === "horizontal" ? createHorizontalCategoryLabelLayout(categoryLabels, width
|
|
385
|
-
|
|
877
|
+
const horizontalCategoryLabelLayout = orientation === "horizontal" ? createHorizontalCategoryLabelLayout(categoryLabels, width, {
|
|
878
|
+
measureText,
|
|
879
|
+
measurementElement,
|
|
880
|
+
measurementVersion
|
|
881
|
+
}) : undefined;
|
|
386
882
|
const valueDomain = createPaddedDomain(mode === "stacked" ? createStackedBarDomainValues(datumByKey, sortedCategories, visibleSeries) : visibleValues);
|
|
883
|
+
const valueTickAxis = orientation === "vertical" ? yAxis : xAxis;
|
|
884
|
+
const valueTicks = createTicks(valueDomain, valueTickAxis?.tickCount ?? 5);
|
|
885
|
+
const valueTickLabels = valueTicks.map((tick, index) => formatNumericValue(tick, valueTickAxis, undefined, { index }));
|
|
886
|
+
const geometry = createChartGeometry(width, height, {
|
|
887
|
+
xTickLabels: orientation === "vertical" ? categoryLabels : valueTickLabels,
|
|
888
|
+
yTickLabels: orientation === "vertical" ? valueTickLabels : categoryLabels,
|
|
889
|
+
xAxis,
|
|
890
|
+
yAxis,
|
|
891
|
+
measureText,
|
|
892
|
+
measurementElement,
|
|
893
|
+
measurementVersion,
|
|
894
|
+
marginLeft: horizontalCategoryLabelLayout?.marginLeft
|
|
895
|
+
});
|
|
387
896
|
if (sortedCategories.length === 0) {
|
|
388
|
-
const tickAxis = orientation === "vertical" ? yAxis : xAxis;
|
|
389
897
|
return {
|
|
390
898
|
geometry,
|
|
391
899
|
categories: [],
|
|
392
|
-
yTicks:
|
|
900
|
+
yTicks: valueTicks,
|
|
393
901
|
categoryTicks: [],
|
|
394
902
|
bars: [],
|
|
395
903
|
tableRows: [],
|
|
396
904
|
targets: [],
|
|
397
905
|
empty: true,
|
|
398
|
-
valueDomain
|
|
906
|
+
valueDomain,
|
|
907
|
+
theme: resolvedTheme
|
|
399
908
|
};
|
|
400
909
|
}
|
|
401
910
|
const valueScale = createLinearScale(valueDomain, orientation === "vertical" ? [geometry.plotHeight, 0] : [0, geometry.plotWidth]);
|
|
@@ -427,7 +936,7 @@ function createBarModel(options) {
|
|
|
427
936
|
return;
|
|
428
937
|
const value = rawValue;
|
|
429
938
|
const seriesColorIndex = Math.max(0, series.findIndex((entry) => entry.id === item.id));
|
|
430
|
-
const color = item.color ?? chartPaletteColor(seriesColorIndex);
|
|
939
|
+
const color = item.color ?? chartPaletteColor(seriesColorIndex, resolvedTheme.palette);
|
|
431
940
|
const categoryPosition = categoryScale(category.key) ?? 0;
|
|
432
941
|
let x = 0;
|
|
433
942
|
let y = 0;
|
|
@@ -503,253 +1012,328 @@ function createBarModel(options) {
|
|
|
503
1012
|
return {
|
|
504
1013
|
geometry,
|
|
505
1014
|
categories: sortedCategories,
|
|
506
|
-
yTicks:
|
|
1015
|
+
yTicks: valueTicks,
|
|
507
1016
|
categoryTicks,
|
|
508
1017
|
bars,
|
|
509
1018
|
tableRows,
|
|
510
1019
|
targets,
|
|
511
1020
|
empty: targets.length === 0,
|
|
512
|
-
valueDomain
|
|
1021
|
+
valueDomain,
|
|
1022
|
+
theme: resolvedTheme
|
|
513
1023
|
};
|
|
514
1024
|
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
1025
|
+
// src/_internal/chart/chart-cartesian-model.ts
|
|
1026
|
+
var DEFAULT_MAXIMUM_X_TICK_COUNT = 8;
|
|
1027
|
+
function createCartesianModel(options) {
|
|
1028
|
+
const {
|
|
1029
|
+
componentId,
|
|
1030
|
+
series,
|
|
1031
|
+
hiddenSeriesIds,
|
|
1032
|
+
width,
|
|
1033
|
+
height,
|
|
1034
|
+
xAxis,
|
|
1035
|
+
yAxis,
|
|
1036
|
+
stackedArea = false,
|
|
1037
|
+
theme,
|
|
1038
|
+
measureText = false,
|
|
1039
|
+
measurementElement,
|
|
1040
|
+
measurementVersion = 0
|
|
1041
|
+
} = options;
|
|
1042
|
+
assertUniqueSeriesIds(componentId, series);
|
|
1043
|
+
assertValidChartNumber(componentId, "invalid-height", height, "height");
|
|
1044
|
+
assertValidTickCount(componentId, xAxis);
|
|
1045
|
+
assertValidTickCount(componentId, yAxis);
|
|
1046
|
+
const resolvedTheme = resolveChartTheme(theme);
|
|
1047
|
+
let geometry = createChartGeometry(width, height, {
|
|
1048
|
+
measureText,
|
|
1049
|
+
measurementElement,
|
|
1050
|
+
measurementVersion
|
|
1051
|
+
});
|
|
1052
|
+
const allKinds = new Set;
|
|
1053
|
+
const xValuesByKey = new Map;
|
|
1054
|
+
const normalizedSeries = series.map((item, seriesIndex) => {
|
|
1055
|
+
const seenX = new Set;
|
|
1056
|
+
const color = item.color ?? chartPaletteColor(seriesIndex, resolvedTheme.palette);
|
|
1057
|
+
const points = item.data.map((point, pointIndex) => {
|
|
1058
|
+
const x = normalizeXValue(point.x);
|
|
1059
|
+
allKinds.add(x.kind);
|
|
1060
|
+
if (seenX.has(x.key)) {
|
|
1061
|
+
throw new Error(`[cinder/${componentId}] rule=duplicate-x series="${item.id}" x="${x.label}": duplicate x values are not supported.`);
|
|
1062
|
+
}
|
|
1063
|
+
seenX.add(x.key);
|
|
1064
|
+
xValuesByKey.set(x.key, x);
|
|
1065
|
+
const y = normalizeNumericValue(componentId, item.id, x.label, point.y);
|
|
1066
|
+
return {
|
|
1067
|
+
seriesId: item.id,
|
|
1068
|
+
seriesLabel: item.label,
|
|
1069
|
+
color,
|
|
1070
|
+
x,
|
|
1071
|
+
y,
|
|
1072
|
+
originalY: point.y,
|
|
1073
|
+
index: pointIndex
|
|
1074
|
+
};
|
|
1075
|
+
});
|
|
1076
|
+
return { id: item.id, label: item.label, color, points };
|
|
1077
|
+
});
|
|
1078
|
+
if (allKinds.size > 1) {
|
|
1079
|
+
throw new Error(`[cinder/${componentId}] rule=mixed-x-domain-kind: all x values must share one domain kind.`);
|
|
530
1080
|
}
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
const candidate = targets[index];
|
|
539
|
-
if (!candidate)
|
|
540
|
-
continue;
|
|
541
|
-
const candidateKey = axis === "x" ? candidate.x : candidate.y;
|
|
542
|
-
if (candidateKey !== bucketKey)
|
|
543
|
-
break;
|
|
544
|
-
candidates.push(candidate);
|
|
545
|
-
}
|
|
546
|
-
for (let index = start + 1;index < targets.length; index++) {
|
|
547
|
-
const candidate = targets[index];
|
|
548
|
-
if (!candidate)
|
|
549
|
-
continue;
|
|
550
|
-
const candidateKey = axis === "x" ? candidate.x : candidate.y;
|
|
551
|
-
if (candidateKey !== bucketKey)
|
|
552
|
-
break;
|
|
553
|
-
candidates.push(candidate);
|
|
1081
|
+
if (stackedArea) {
|
|
1082
|
+
for (const item of normalizedSeries) {
|
|
1083
|
+
for (const point of item.points) {
|
|
1084
|
+
if ((point.y ?? 0) < 0) {
|
|
1085
|
+
throw new Error(`[cinder/${componentId}] rule=negative-stacked-area series="${item.id}" x="${point.x.label}": stacked areas do not support negative values.`);
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
554
1088
|
}
|
|
555
1089
|
}
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
let nearestDistance = Number.POSITIVE_INFINITY;
|
|
562
|
-
for (const target of candidates) {
|
|
563
|
-
const targetDistance = Math.hypot(target.x - x, target.y - y);
|
|
564
|
-
if (targetDistance >= nearestDistance)
|
|
1090
|
+
const sortedXValues = sortXValues([...xValuesByKey.values()]);
|
|
1091
|
+
const orderByKey = new Map(sortedXValues.map((value, index) => [value.key, index]));
|
|
1092
|
+
const visibleNumericValues = [];
|
|
1093
|
+
for (const item of normalizedSeries) {
|
|
1094
|
+
if (hiddenSeriesIds.includes(item.id))
|
|
565
1095
|
continue;
|
|
566
|
-
|
|
567
|
-
|
|
1096
|
+
for (const point of item.points) {
|
|
1097
|
+
if (point.y !== null)
|
|
1098
|
+
visibleNumericValues.push(point.y);
|
|
1099
|
+
}
|
|
568
1100
|
}
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
const marginTop = 16;
|
|
581
|
-
const marginRight = 16;
|
|
582
|
-
const marginBottom = 36;
|
|
583
|
-
return {
|
|
584
|
-
plotWidth: Math.max(1, width - marginLeft - marginRight),
|
|
585
|
-
plotHeight: Math.max(1, height - marginTop - marginBottom),
|
|
586
|
-
marginTop,
|
|
587
|
-
marginRight,
|
|
588
|
-
marginBottom,
|
|
589
|
-
marginLeft
|
|
590
|
-
};
|
|
591
|
-
}
|
|
592
|
-
function createHorizontalCategoryLabelLayout(labels, chartWidth) {
|
|
593
|
-
const maximumMarginLeft = Math.max(DEFAULT_CHART_MARGIN_LEFT, Math.floor(chartWidth * MAXIMUM_HORIZONTAL_CATEGORY_LABEL_FRACTION));
|
|
594
|
-
let longestLabelWidth = 0;
|
|
595
|
-
for (const label of labels) {
|
|
596
|
-
longestLabelWidth = Math.max(longestLabelWidth, estimateHorizontalCategoryLabelWidth(label));
|
|
1101
|
+
const stackedTotalsByKey = new Map(sortedXValues.map((value) => [value.key, 0]));
|
|
1102
|
+
if (stackedArea) {
|
|
1103
|
+
for (const item of normalizedSeries) {
|
|
1104
|
+
if (hiddenSeriesIds.includes(item.id))
|
|
1105
|
+
continue;
|
|
1106
|
+
for (const point of item.points) {
|
|
1107
|
+
if (point.y === null)
|
|
1108
|
+
continue;
|
|
1109
|
+
stackedTotalsByKey.set(point.x.key, (stackedTotalsByKey.get(point.x.key) ?? 0) + point.y);
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
597
1112
|
}
|
|
598
|
-
const
|
|
599
|
-
const
|
|
600
|
-
const
|
|
1113
|
+
const domainValues = stackedArea || componentId === "area-chart" ? [0, ...stackedArea ? stackedTotalsByKey.values() : visibleNumericValues] : visibleNumericValues;
|
|
1114
|
+
const [yMinimum, yMaximum] = createPaddedDomain(domainValues);
|
|
1115
|
+
const tickCount = xAxis?.tickCount ?? Math.min(sortedXValues.length, DEFAULT_MAXIMUM_X_TICK_COUNT);
|
|
1116
|
+
const preliminaryXTicks = buildXAxisTicks(sortedXValues, tickCount, xAxis, () => 0);
|
|
1117
|
+
const yTicks = createTicks([yMinimum, yMaximum], yAxis?.tickCount ?? 5);
|
|
1118
|
+
geometry = createChartGeometry(width, height, {
|
|
1119
|
+
xTickLabels: preliminaryXTicks.map((tick) => tick.label),
|
|
1120
|
+
yTickLabels: yTicks.map((tick, index) => formatNumericValue(tick, yAxis, undefined, { index })),
|
|
1121
|
+
xAxis,
|
|
1122
|
+
yAxis,
|
|
1123
|
+
measureText,
|
|
1124
|
+
measurementElement,
|
|
1125
|
+
measurementVersion
|
|
1126
|
+
});
|
|
1127
|
+
const xStringScale = sortedXValues[0]?.kind === "string" ? createPointScale(sortedXValues.map((value) => value.key), [0, geometry.plotWidth], 0.5) : undefined;
|
|
1128
|
+
const xNumericScale = sortedXValues[0] && sortedXValues[0].kind !== "string" ? createLinearScale(createNumericDomain(sortedXValues), [0, geometry.plotWidth]) : undefined;
|
|
1129
|
+
const yScale = createLinearScale([yMinimum, yMaximum], [geometry.plotHeight, 0]);
|
|
1130
|
+
function scaleX(value) {
|
|
1131
|
+
if (value.kind === "string")
|
|
1132
|
+
return xStringScale?.(value.key) ?? 0;
|
|
1133
|
+
return xNumericScale?.(Number(value.comparable)) ?? 0;
|
|
1134
|
+
}
|
|
1135
|
+
const xTicks = buildXAxisTicks(sortedXValues, tickCount, xAxis, scaleX);
|
|
1136
|
+
const targets = [];
|
|
1137
|
+
const tableRows = [];
|
|
1138
|
+
const stackedOffsetsByKey = new Map(sortedXValues.map((value) => [value.key, 0]));
|
|
1139
|
+
const normalizedPointsBySeriesId = stackedArea ? new Map(normalizedSeries.map((item) => [
|
|
1140
|
+
item.id,
|
|
1141
|
+
new Map(item.points.map((point) => [point.x.key, point]))
|
|
1142
|
+
])) : undefined;
|
|
1143
|
+
const stackedRenderXValues = stackedArea ? sortedXValues.filter((value) => normalizedSeries.some((item) => !hiddenSeriesIds.includes(item.id) && normalizedPointsBySeriesId?.get(item.id)?.has(value.key))) : undefined;
|
|
1144
|
+
const stackedRenderDomain = stackedRenderXValues ?? [];
|
|
1145
|
+
const stackedVisibleSeries = stackedArea ? normalizedSeries.filter((item) => !hiddenSeriesIds.includes(item.id)) : [];
|
|
1146
|
+
const stackedLayerIndexBySeriesId = new Map(stackedVisibleSeries.map((item, layerIndex) => [item.id, layerIndex]));
|
|
1147
|
+
const stackedBoundaryLayers = stackedArea ? (() => {
|
|
1148
|
+
const cumulativeValuesByKey = new Map(stackedRenderDomain.map((value) => [value.key, 0]));
|
|
1149
|
+
return stackedVisibleSeries.map((item) => stackedRenderDomain.map((value) => {
|
|
1150
|
+
const point = normalizedPointsBySeriesId?.get(item.id)?.get(value.key);
|
|
1151
|
+
if (point?.y === null || point?.y === undefined)
|
|
1152
|
+
return null;
|
|
1153
|
+
const cumulativeValue = (cumulativeValuesByKey.get(value.key) ?? 0) + point.y;
|
|
1154
|
+
cumulativeValuesByKey.set(value.key, cumulativeValue);
|
|
1155
|
+
return cumulativeValue;
|
|
1156
|
+
}));
|
|
1157
|
+
})() : undefined;
|
|
1158
|
+
const stackedRenderSelections = stackedBoundaryLayers ? decimationIndicesForLayers(stackedBoundaryLayers) : undefined;
|
|
1159
|
+
const renderedSeries = normalizedSeries.map((item) => {
|
|
1160
|
+
const hidden = hiddenSeriesIds.includes(item.id);
|
|
1161
|
+
const points = item.points.slice().sort((a, b) => (orderByKey.get(a.x.key) ?? 0) - (orderByKey.get(b.x.key) ?? 0));
|
|
1162
|
+
const placedPoints = points.map((point) => {
|
|
1163
|
+
const lowerValue = stackedArea ? stackedOffsetsByKey.get(point.x.key) ?? 0 : 0;
|
|
1164
|
+
const upperValue = lowerValue + (point.y ?? 0);
|
|
1165
|
+
return {
|
|
1166
|
+
...point,
|
|
1167
|
+
pixelX: scaleX(point.x),
|
|
1168
|
+
pixelY: yScale(stackedArea ? upperValue : point.y ?? 0),
|
|
1169
|
+
pixelY0: yScale(stackedArea ? lowerValue : 0)
|
|
1170
|
+
};
|
|
1171
|
+
});
|
|
1172
|
+
const placedPointsByKey = stackedRenderSelections ? new Map(placedPoints.map((point) => [point.x.key, point])) : undefined;
|
|
1173
|
+
const renderPoints = stackedRenderSelections ? stackedRenderSelections.map(({ sourceIndex, forceGapLayerIndices }) => {
|
|
1174
|
+
const x = stackedRenderDomain[sourceIndex];
|
|
1175
|
+
const layerIndex = stackedLayerIndexBySeriesId.get(item.id);
|
|
1176
|
+
const forceGap = layerIndex !== undefined && forceGapLayerIndices.includes(layerIndex);
|
|
1177
|
+
if (!forceGap) {
|
|
1178
|
+
const placedPoint = placedPointsByKey?.get(x.key);
|
|
1179
|
+
if (placedPoint)
|
|
1180
|
+
return placedPoint;
|
|
1181
|
+
}
|
|
1182
|
+
return {
|
|
1183
|
+
seriesId: item.id,
|
|
1184
|
+
seriesLabel: item.label,
|
|
1185
|
+
color: item.color,
|
|
1186
|
+
x,
|
|
1187
|
+
y: null,
|
|
1188
|
+
originalY: null,
|
|
1189
|
+
index: -1,
|
|
1190
|
+
pixelX: scaleX(x),
|
|
1191
|
+
pixelY: 0,
|
|
1192
|
+
pixelY0: stackedArea ? yScale(stackedOffsetsByKey.get(x.key) ?? 0) : yScale(0)
|
|
1193
|
+
};
|
|
1194
|
+
}) : decimatePlacedPoints(placedPoints);
|
|
1195
|
+
const coordinates = renderPoints.map((placed) => ({
|
|
1196
|
+
x: placed.pixelX,
|
|
1197
|
+
y: placed.y === null ? null : placed.pixelY,
|
|
1198
|
+
y0: placed.pixelY0
|
|
1199
|
+
}));
|
|
1200
|
+
if (!hidden) {
|
|
1201
|
+
for (const placed of placedPoints) {
|
|
1202
|
+
if (placed.y === null)
|
|
1203
|
+
continue;
|
|
1204
|
+
const xLabel = formatXValue(placed.x, xAxis, {
|
|
1205
|
+
seriesId: item.id,
|
|
1206
|
+
seriesLabel: item.label,
|
|
1207
|
+
index: placed.index
|
|
1208
|
+
});
|
|
1209
|
+
const valueLabel = formatNumericValue(placed.y ?? 0, yAxis, series.find((entry) => entry.id === item.id)?.valueFormatter, { seriesId: item.id, seriesLabel: item.label, index: placed.index });
|
|
1210
|
+
targets.push({
|
|
1211
|
+
id: `${item.id}-${placed.x.key}`,
|
|
1212
|
+
seriesId: item.id,
|
|
1213
|
+
seriesLabel: item.label,
|
|
1214
|
+
xLabel,
|
|
1215
|
+
valueLabel,
|
|
1216
|
+
x: placed.pixelX,
|
|
1217
|
+
y: placed.pixelY,
|
|
1218
|
+
color: item.color
|
|
1219
|
+
});
|
|
1220
|
+
tableRows.push({
|
|
1221
|
+
id: `${item.id}-${placed.x.key}`,
|
|
1222
|
+
seriesId: item.id,
|
|
1223
|
+
seriesLabel: item.label,
|
|
1224
|
+
xLabel,
|
|
1225
|
+
valueLabel
|
|
1226
|
+
});
|
|
1227
|
+
}
|
|
1228
|
+
if (stackedArea) {
|
|
1229
|
+
for (const placed of placedPoints) {
|
|
1230
|
+
stackedOffsetsByKey.set(placed.x.key, (stackedOffsetsByKey.get(placed.x.key) ?? 0) + (placed.y ?? 0));
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
return {
|
|
1235
|
+
...item,
|
|
1236
|
+
hidden,
|
|
1237
|
+
points: hidden ? [] : renderPoints,
|
|
1238
|
+
path: hidden ? "" : createLinePath(coordinates),
|
|
1239
|
+
areaPath: hidden ? "" : createAreaPath(coordinates, stackedArea ? undefined : geometry.plotHeight)
|
|
1240
|
+
};
|
|
1241
|
+
});
|
|
1242
|
+
targets.sort((a, b) => a.x - b.x);
|
|
601
1243
|
return {
|
|
602
|
-
|
|
603
|
-
|
|
1244
|
+
geometry,
|
|
1245
|
+
xTicks,
|
|
1246
|
+
yTicks,
|
|
1247
|
+
normalizedSeries: renderedSeries,
|
|
1248
|
+
tableRows: evenlySampleTableRows(tableRows, MAXIMUM_RENDERED_SERIES_POINTS),
|
|
1249
|
+
targets,
|
|
1250
|
+
empty: targets.length === 0,
|
|
1251
|
+
yDomain: [yMinimum, yMaximum],
|
|
1252
|
+
theme: resolvedTheme,
|
|
1253
|
+
marks: series.map((item) => ({
|
|
1254
|
+
seriesId: item.id,
|
|
1255
|
+
descriptors: componentId === "line-chart" ? [
|
|
1256
|
+
{ type: "line", data: item.data },
|
|
1257
|
+
{ type: "point", data: item.data }
|
|
1258
|
+
] : [
|
|
1259
|
+
{ type: "area", data: item.data },
|
|
1260
|
+
{ type: "line", data: item.data }
|
|
1261
|
+
]
|
|
1262
|
+
}))
|
|
604
1263
|
};
|
|
605
1264
|
}
|
|
606
|
-
function
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
const
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
if (
|
|
621
|
-
return
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
for (let index = 1;index < values.length; index++) {
|
|
638
|
-
const value = values[index];
|
|
639
|
-
if (value < minimum)
|
|
640
|
-
minimum = value;
|
|
641
|
-
if (value > maximum)
|
|
642
|
-
maximum = value;
|
|
1265
|
+
function evenlySampleTableRows(rows, maximumRows) {
|
|
1266
|
+
if (rows.length <= maximumRows)
|
|
1267
|
+
return rows;
|
|
1268
|
+
if (maximumRows <= 0)
|
|
1269
|
+
return [];
|
|
1270
|
+
const rowsBySeriesId = new Map;
|
|
1271
|
+
for (const row of rows) {
|
|
1272
|
+
const seriesRows = rowsBySeriesId.get(row.seriesId);
|
|
1273
|
+
if (seriesRows)
|
|
1274
|
+
seriesRows.push(row);
|
|
1275
|
+
else
|
|
1276
|
+
rowsBySeriesId.set(row.seriesId, [row]);
|
|
1277
|
+
}
|
|
1278
|
+
const seriesGroups = [...rowsBySeriesId.values()];
|
|
1279
|
+
if (seriesGroups.length >= maximumRows) {
|
|
1280
|
+
return seriesGroups.slice(0, maximumRows).map((group) => group[0]);
|
|
1281
|
+
}
|
|
1282
|
+
const remainingRows = maximumRows - seriesGroups.length;
|
|
1283
|
+
const capacities = seriesGroups.map((group) => group.length - 1);
|
|
1284
|
+
const totalCapacity = capacities.reduce((total, capacity) => total + capacity, 0);
|
|
1285
|
+
const exactShares = capacities.map((capacity) => remainingRows * capacity / totalCapacity);
|
|
1286
|
+
const allocations = exactShares.map((share) => 1 + Math.floor(share));
|
|
1287
|
+
let undistributedRows = maximumRows - allocations.reduce((total, count) => total + count, 0);
|
|
1288
|
+
const allocationOrder = exactShares.map((share, index) => ({ index, remainder: share - Math.floor(share) })).sort((a, b) => b.remainder - a.remainder || a.index - b.index);
|
|
1289
|
+
for (const { index } of allocationOrder) {
|
|
1290
|
+
if (undistributedRows === 0)
|
|
1291
|
+
break;
|
|
1292
|
+
if (allocations[index] >= seriesGroups[index].length)
|
|
1293
|
+
continue;
|
|
1294
|
+
allocations[index] += 1;
|
|
1295
|
+
undistributedRows -= 1;
|
|
643
1296
|
}
|
|
644
|
-
|
|
645
|
-
return [minimum - 1, maximum + 1];
|
|
646
|
-
return [Math.min(0, minimum), Math.max(0, maximum)];
|
|
1297
|
+
return seriesGroups.flatMap((group, index) => evenlySampleRows(group, allocations[index]));
|
|
647
1298
|
}
|
|
648
|
-
function
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
1299
|
+
function evenlySampleRows(rows, requestedRows) {
|
|
1300
|
+
if (rows.length <= requestedRows)
|
|
1301
|
+
return rows;
|
|
1302
|
+
if (requestedRows <= 1)
|
|
1303
|
+
return rows[0] === undefined ? [] : [rows[0]];
|
|
1304
|
+
return Array.from({ length: requestedRows }, (_, index) => {
|
|
1305
|
+
const sourceIndex = Math.round(index * (rows.length - 1) / (requestedRows - 1));
|
|
1306
|
+
return rows[sourceIndex];
|
|
655
1307
|
});
|
|
656
|
-
return scale;
|
|
657
1308
|
}
|
|
658
|
-
function
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
1309
|
+
function buildXAxisTicks(sortedXValues, tickCount, xAxis, scaleX) {
|
|
1310
|
+
if (sortedXValues.length === 0)
|
|
1311
|
+
return [];
|
|
1312
|
+
const safeTickCount = Math.max(1, Math.min(tickCount, sortedXValues.length));
|
|
1313
|
+
if (safeTickCount >= sortedXValues.length) {
|
|
1314
|
+
return sortedXValues.map((value, index) => ({
|
|
1315
|
+
label: formatXValue(value, xAxis, { index }),
|
|
1316
|
+
x: scaleX(value)
|
|
1317
|
+
}));
|
|
667
1318
|
}
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
const positions = new Map;
|
|
672
|
-
const [rangeMinimum, rangeMaximum] = range;
|
|
673
|
-
const availableSize = Math.max(0, rangeMaximum - rangeMinimum);
|
|
674
|
-
const step = domain.length === 0 ? 0 : availableSize / Math.max(1, domain.length + padding * (domain.length - 1));
|
|
675
|
-
const bandWidth = Math.max(0, step * (1 - padding));
|
|
676
|
-
domain.forEach((value, index) => positions.set(value, rangeMinimum + step * index));
|
|
677
|
-
const scale = Object.assign((value) => positions.get(value), {
|
|
678
|
-
bandwidth: () => bandWidth
|
|
679
|
-
});
|
|
680
|
-
return scale;
|
|
681
|
-
}
|
|
682
|
-
function createNumericDomain(values) {
|
|
683
|
-
if (values.length === 0)
|
|
684
|
-
return [0, 1];
|
|
685
|
-
let minimum = Number(values[0].comparable);
|
|
686
|
-
let maximum = minimum;
|
|
687
|
-
for (let index = 1;index < values.length; index++) {
|
|
688
|
-
const numeric = Number(values[index].comparable);
|
|
689
|
-
if (numeric < minimum)
|
|
690
|
-
minimum = numeric;
|
|
691
|
-
if (numeric > maximum)
|
|
692
|
-
maximum = numeric;
|
|
1319
|
+
if (safeTickCount === 1) {
|
|
1320
|
+
const value = sortedXValues[0];
|
|
1321
|
+
return value ? [{ label: formatXValue(value, xAxis, { index: 0 }), x: scaleX(value) }] : [];
|
|
693
1322
|
}
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
const step = (domain[1] - domain[0]) / (safeCount - 1);
|
|
701
|
-
return Array.from({ length: safeCount }, (_, index) => domain[0] + step * index);
|
|
702
|
-
}
|
|
703
|
-
function createLinePath(points) {
|
|
704
|
-
if (points.length === 0)
|
|
705
|
-
return "";
|
|
706
|
-
const [firstPoint, ...remainingPoints] = points;
|
|
707
|
-
return [
|
|
708
|
-
`M${formatPathNumber(firstPoint?.x ?? 0)},${formatPathNumber(firstPoint?.y ?? 0)}`,
|
|
709
|
-
...remainingPoints.map((point) => `L${formatPathNumber(point.x)},${formatPathNumber(point.y)}`)
|
|
710
|
-
].join("");
|
|
711
|
-
}
|
|
712
|
-
function createAreaPath(points, baseline) {
|
|
713
|
-
if (points.length === 0)
|
|
714
|
-
return "";
|
|
715
|
-
const firstPoint = points[0];
|
|
716
|
-
const lastPoint = points.at(-1);
|
|
717
|
-
if (!firstPoint || !lastPoint)
|
|
718
|
-
return "";
|
|
719
|
-
const lowerPoints = points.toReversed().map((point) => `L${formatPathNumber(point.x)},${formatPathNumber(point.y0 ?? baseline ?? 0)}`);
|
|
720
|
-
return [
|
|
721
|
-
`M${formatPathNumber(firstPoint.x)},${formatPathNumber(firstPoint.y0 ?? baseline ?? 0)}`,
|
|
722
|
-
`L${formatPathNumber(firstPoint.x)},${formatPathNumber(firstPoint.y)}`,
|
|
723
|
-
...points.slice(1).map((point) => `L${formatPathNumber(point.x)},${formatPathNumber(point.y)}`),
|
|
724
|
-
...lowerPoints,
|
|
725
|
-
"Z"
|
|
726
|
-
].join("");
|
|
727
|
-
}
|
|
728
|
-
function createStackedBarDomainValues(datumByKey, categories, series) {
|
|
729
|
-
const values = [0];
|
|
730
|
-
for (const category of categories) {
|
|
731
|
-
const datum = datumByKey.get(category.key);
|
|
732
|
-
if (!datum)
|
|
1323
|
+
const step = (sortedXValues.length - 1) / (safeTickCount - 1);
|
|
1324
|
+
const ticks = [];
|
|
1325
|
+
for (let i = 0;i < safeTickCount; i++) {
|
|
1326
|
+
const sourceIndex = Math.round(i * step);
|
|
1327
|
+
const value = sortedXValues[sourceIndex];
|
|
1328
|
+
if (!value)
|
|
733
1329
|
continue;
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
if (typeof value !== "number")
|
|
739
|
-
continue;
|
|
740
|
-
if (value >= 0)
|
|
741
|
-
positiveTotal += value;
|
|
742
|
-
else
|
|
743
|
-
negativeTotal += value;
|
|
744
|
-
}
|
|
745
|
-
values.push(positiveTotal, negativeTotal);
|
|
1330
|
+
ticks.push({
|
|
1331
|
+
label: formatXValue(value, xAxis, { index: sourceIndex }),
|
|
1332
|
+
x: scaleX(value)
|
|
1333
|
+
});
|
|
746
1334
|
}
|
|
747
|
-
return
|
|
748
|
-
}
|
|
749
|
-
function formatPathNumber(value) {
|
|
750
|
-
return Number(value.toFixed(3)).toString();
|
|
1335
|
+
return ticks;
|
|
751
1336
|
}
|
|
752
|
-
|
|
753
1337
|
// src/_internal/chart/chart-focus-ring.ts
|
|
754
1338
|
var DEFAULT_CHART_FOCUS_RING_STROKE_PADDING = 8;
|
|
755
1339
|
var DEFAULT_POINT_FOCUS_RING_RADIUS = 10;
|
|
@@ -922,13 +1506,20 @@ class ChartInteraction {
|
|
|
922
1506
|
this.focusedTarget = undefined;
|
|
923
1507
|
return;
|
|
924
1508
|
}
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
if (
|
|
928
|
-
this.
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
1509
|
+
const refreshedPointerTarget = this.#refreshTarget(this.pointerTarget, targets);
|
|
1510
|
+
const refreshedFocusedTarget = this.#refreshTarget(this.focusedTarget, targets);
|
|
1511
|
+
if (refreshedPointerTarget !== this.pointerTarget)
|
|
1512
|
+
this.pointerTarget = refreshedPointerTarget;
|
|
1513
|
+
if (refreshedFocusedTarget !== this.focusedTarget)
|
|
1514
|
+
this.focusedTarget = refreshedFocusedTarget;
|
|
1515
|
+
}
|
|
1516
|
+
#refreshTarget(candidate, targets) {
|
|
1517
|
+
if (!candidate)
|
|
1518
|
+
return;
|
|
1519
|
+
const latest = targets.find((target) => target.id === candidate.id);
|
|
1520
|
+
if (!latest)
|
|
1521
|
+
return;
|
|
1522
|
+
return chartTargetsEqual(candidate, latest) ? candidate : latest;
|
|
932
1523
|
}
|
|
933
1524
|
activateByPointer(event, targets) {
|
|
934
1525
|
if (!(event.currentTarget instanceof SVGRectElement))
|
|
@@ -975,6 +1566,9 @@ class ChartInteraction {
|
|
|
975
1566
|
return toggleSeriesId(hiddenSeriesIds, seriesId);
|
|
976
1567
|
}
|
|
977
1568
|
}
|
|
1569
|
+
function chartTargetsEqual(left, right) {
|
|
1570
|
+
return left.id === right.id && left.seriesId === right.seriesId && left.seriesLabel === right.seriesLabel && left.xLabel === right.xLabel && left.valueLabel === right.valueLabel && left.x === right.x && left.y === right.y && left.width === right.width && left.height === right.height && left.color === right.color;
|
|
1571
|
+
}
|
|
978
1572
|
|
|
979
1573
|
// src/components/_internal/chart-data-table.svelte
|
|
980
1574
|
import"svelte/internal/disclose-version";
|
|
@@ -1075,7 +1669,7 @@ var rest_excludes3 = new Set([
|
|
|
1075
1669
|
"class",
|
|
1076
1670
|
"children"
|
|
1077
1671
|
]);
|
|
1078
|
-
var root2 = $4.from_html(`<button><!> <span class="cinder-table__sort-indicator" aria-hidden="true"><svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline class="cinder-table__sort-chevron-up" points="4
|
|
1672
|
+
var root2 = $4.from_html(`<button><!> <span class="cinder-table__sort-indicator" aria-hidden="true"><svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline class="cinder-table__sort-chevron-up" points="4 6 8 2 12 6"></polyline><polyline class="cinder-table__sort-chevron-down" points="4 10 8 14 12 10"></polyline></svg></span></button>`);
|
|
1079
1673
|
var root_1 = $4.from_html(`<th><!></th>`);
|
|
1080
1674
|
function Table_header_cell($$anchor, $$props) {
|
|
1081
1675
|
$4.push($$props, true);
|
|
@@ -1850,6 +2444,104 @@ function Chart_data_table($$anchor, $$props) {
|
|
|
1850
2444
|
$9.pop();
|
|
1851
2445
|
}
|
|
1852
2446
|
|
|
2447
|
+
// src/components/_internal/chart-tooltip.svelte
|
|
2448
|
+
import"svelte/internal/disclose-version";
|
|
2449
|
+
import * as $10 from "svelte/internal/client";
|
|
2450
|
+
import Popover from "@lostgradient/cinder/popover";
|
|
2451
|
+
var root7 = $10.from_html(`<strong> </strong> <span> </span>`, 1);
|
|
2452
|
+
var root_14 = $10.from_html(`<div role="tooltip" class="cinder-chart-tooltip"><!></div>`);
|
|
2453
|
+
var root_23 = $10.from_html(`<span class="cinder-chart-tooltip-anchor" aria-hidden="true"></span> <!>`, 1);
|
|
2454
|
+
function Chart_tooltip($$anchor, $$props) {
|
|
2455
|
+
$10.push($$props, true);
|
|
2456
|
+
let anchorElement = $10.state(null);
|
|
2457
|
+
const outsideClickIgnoreRefs = [() => $10.get(anchorElement)?.ownerDocument.body ?? null];
|
|
2458
|
+
const customContent = $10.derived(() => typeof $$props.content === "function" ? $$props.content : undefined);
|
|
2459
|
+
const open = $10.derived(() => Boolean($10.get(anchorElement) && $$props.target && $$props.content));
|
|
2460
|
+
var fragment = root_23();
|
|
2461
|
+
var span = $10.first_child(fragment);
|
|
2462
|
+
let styles;
|
|
2463
|
+
$10.bind_this(span, ($$value) => $10.set(anchorElement, $$value), () => $10.get(anchorElement));
|
|
2464
|
+
var node = $10.sibling(span, 2);
|
|
2465
|
+
{
|
|
2466
|
+
const children = ($$anchor2) => {
|
|
2467
|
+
var fragment_1 = $10.comment();
|
|
2468
|
+
var node_1 = $10.first_child(fragment_1);
|
|
2469
|
+
{
|
|
2470
|
+
var consequent_1 = ($$anchor3) => {
|
|
2471
|
+
var div = root_14();
|
|
2472
|
+
var node_2 = $10.child(div);
|
|
2473
|
+
{
|
|
2474
|
+
var consequent = ($$anchor4) => {
|
|
2475
|
+
var fragment_2 = $10.comment();
|
|
2476
|
+
var node_3 = $10.first_child(fragment_2);
|
|
2477
|
+
$10.snippet(node_3, () => $10.get(customContent), () => $$props.target);
|
|
2478
|
+
$10.append($$anchor4, fragment_2);
|
|
2479
|
+
};
|
|
2480
|
+
var alternate = ($$anchor4) => {
|
|
2481
|
+
var fragment_3 = root7();
|
|
2482
|
+
var strong = $10.first_child(fragment_3);
|
|
2483
|
+
var text2 = $10.child(strong, true);
|
|
2484
|
+
$10.reset(strong);
|
|
2485
|
+
var span_1 = $10.sibling(strong, 2);
|
|
2486
|
+
var text_1 = $10.child(span_1);
|
|
2487
|
+
$10.reset(span_1);
|
|
2488
|
+
$10.template_effect(() => {
|
|
2489
|
+
$10.set_text(text2, $$props.target.seriesLabel);
|
|
2490
|
+
$10.set_text(text_1, `${$$props.target.xLabel ?? ""}: ${$$props.target.valueLabel ?? ""}`);
|
|
2491
|
+
});
|
|
2492
|
+
$10.append($$anchor4, fragment_3);
|
|
2493
|
+
};
|
|
2494
|
+
$10.if(node_2, ($$render) => {
|
|
2495
|
+
if ($10.get(customContent))
|
|
2496
|
+
$$render(consequent);
|
|
2497
|
+
else
|
|
2498
|
+
$$render(alternate, -1);
|
|
2499
|
+
});
|
|
2500
|
+
}
|
|
2501
|
+
$10.reset(div);
|
|
2502
|
+
$10.template_effect(() => $10.set_attribute(div, "id", $$props.id));
|
|
2503
|
+
$10.append($$anchor3, div);
|
|
2504
|
+
};
|
|
2505
|
+
$10.if(node_1, ($$render) => {
|
|
2506
|
+
if ($$props.target)
|
|
2507
|
+
$$render(consequent_1);
|
|
2508
|
+
});
|
|
2509
|
+
}
|
|
2510
|
+
$10.append($$anchor2, fragment_1);
|
|
2511
|
+
};
|
|
2512
|
+
let $0 = $10.derived(() => `${$$props.id}-popover`);
|
|
2513
|
+
Popover(node, {
|
|
2514
|
+
get id() {
|
|
2515
|
+
return $10.get($0);
|
|
2516
|
+
},
|
|
2517
|
+
get open() {
|
|
2518
|
+
return $10.get(open);
|
|
2519
|
+
},
|
|
2520
|
+
get triggerRef() {
|
|
2521
|
+
return $10.get(anchorElement);
|
|
2522
|
+
},
|
|
2523
|
+
placement: "right",
|
|
2524
|
+
arrowVisible: true,
|
|
2525
|
+
role: "group",
|
|
2526
|
+
focusManagement: "preserve",
|
|
2527
|
+
get outsideClickIgnoreRefs() {
|
|
2528
|
+
return outsideClickIgnoreRefs;
|
|
2529
|
+
},
|
|
2530
|
+
wireTriggerAria: false,
|
|
2531
|
+
closeOnEscape: false,
|
|
2532
|
+
widthMode: "content",
|
|
2533
|
+
children,
|
|
2534
|
+
$$slots: { default: true }
|
|
2535
|
+
});
|
|
2536
|
+
}
|
|
2537
|
+
$10.template_effect(() => styles = $10.set_style(span, "", styles, {
|
|
2538
|
+
left: `${$$props.geometry.marginLeft + ($$props.target?.x ?? 0)}px`,
|
|
2539
|
+
top: `${$$props.geometry.marginTop + ($$props.target?.y ?? 0)}px`
|
|
2540
|
+
}));
|
|
2541
|
+
$10.append($$anchor, fragment);
|
|
2542
|
+
$10.pop();
|
|
2543
|
+
}
|
|
2544
|
+
|
|
1853
2545
|
// src/components/area-chart/area-chart.svelte
|
|
1854
2546
|
var rest_excludes7 = new Set([
|
|
1855
2547
|
"$$slots",
|
|
@@ -1868,43 +2560,56 @@ var rest_excludes7 = new Set([
|
|
|
1868
2560
|
"dataTableCaption",
|
|
1869
2561
|
"dataTableVisibility",
|
|
1870
2562
|
"maximumInteractivePoints",
|
|
2563
|
+
"theme",
|
|
2564
|
+
"tooltip",
|
|
2565
|
+
"mark",
|
|
1871
2566
|
"class",
|
|
1872
2567
|
"empty",
|
|
1873
2568
|
"loadingContent",
|
|
1874
2569
|
"id"
|
|
1875
2570
|
]);
|
|
1876
|
-
var
|
|
1877
|
-
var
|
|
1878
|
-
var
|
|
1879
|
-
var root_32 = $
|
|
1880
|
-
var root_4 = $
|
|
1881
|
-
var root_5 = $
|
|
1882
|
-
var root_6 = $
|
|
1883
|
-
var root_7 = $
|
|
1884
|
-
var root_8 = $
|
|
1885
|
-
var root_9 = $
|
|
1886
|
-
var root_10 = $
|
|
1887
|
-
var root_11 = $
|
|
1888
|
-
var root_122 = $
|
|
1889
|
-
var root_132 = $
|
|
1890
|
-
var root_142 = $
|
|
1891
|
-
var
|
|
1892
|
-
var root_16 = $
|
|
1893
|
-
var root_17 = $
|
|
2571
|
+
var root8 = $11.from_html(`<p class="cinder-area-chart__description"> </p>`);
|
|
2572
|
+
var root_15 = $11.from_html(`<button type="button"><span></span> </button>`);
|
|
2573
|
+
var root_24 = $11.from_html(`<div class="cinder-area-chart__legend" aria-label="Series"></div>`);
|
|
2574
|
+
var root_32 = $11.from_html(`<div class="cinder-area-chart__state"><!></div>`);
|
|
2575
|
+
var root_4 = $11.from_svg(`<line class="cinder-area-chart__gridline" x1="0" aria-hidden="true"></line><text class="cinder-area-chart__tick-label" x="-8" text-anchor="end" dominant-baseline="middle"> </text>`, 1);
|
|
2576
|
+
var root_5 = $11.from_svg(`<text class="cinder-area-chart__axis-title" text-anchor="middle" transform="rotate(-90)"> </text>`);
|
|
2577
|
+
var root_6 = $11.from_svg(`<text class="cinder-area-chart__tick-label" text-anchor="middle"> </text>`);
|
|
2578
|
+
var root_7 = $11.from_svg(`<text class="cinder-area-chart__axis-title" text-anchor="middle"> </text>`);
|
|
2579
|
+
var root_8 = $11.from_svg(`<linearGradient x1="0" x2="0" y1="0" y2="1"><stop offset="0" stop-opacity="0.42"></stop><stop offset="1" stop-opacity="0.08"></stop></linearGradient>`);
|
|
2580
|
+
var root_9 = $11.from_svg(`<path class="cinder-area-chart__area" aria-hidden="true"></path><path class="cinder-area-chart__line" aria-hidden="true"></path>`, 1);
|
|
2581
|
+
var root_10 = $11.from_svg(`<line class="cinder-area-chart__crosshair" y1="0" aria-hidden="true"></line>`);
|
|
2582
|
+
var root_11 = $11.from_svg(`<circle class="cinder-area-chart__focus-target" r="8" tabindex="0" role="button"></circle>`);
|
|
2583
|
+
var root_122 = $11.from_svg(`<rect class="cinder-area-chart__hit-surface" role="presentation"></rect><!>`, 1);
|
|
2584
|
+
var root_132 = $11.from_svg(`<path class="cinder-area-chart__focus-ring-connector cinder-area-chart__focus-ring-halo"></path><path class="cinder-area-chart__focus-ring-connector cinder-area-chart__focus-ring"></path><circle class="cinder-area-chart__focus-ring-dot cinder-area-chart__focus-ring-halo"></circle><circle class="cinder-area-chart__focus-ring-dot cinder-area-chart__focus-ring"></circle>`, 1);
|
|
2585
|
+
var root_142 = $11.from_svg(`<circle class="cinder-area-chart__focus-ring-halo"></circle><circle class="cinder-area-chart__focus-ring"></circle><!>`, 1);
|
|
2586
|
+
var root_152 = $11.from_svg(`<rect class="cinder-area-chart__focus-ring-halo"></rect><rect class="cinder-area-chart__focus-ring"></rect>`, 1);
|
|
2587
|
+
var root_16 = $11.from_svg(`<g class="cinder-area-chart__focus-ring-layer" aria-hidden="true"><!></g>`);
|
|
2588
|
+
var root_17 = $11.from_svg(`<title> </title><g><!><!><!><!><defs></defs><!><!><!><!></g>`, 1);
|
|
2589
|
+
var root_18 = $11.from_html(`<p class="cinder-sr-only">Use the data table to inspect this chart with a keyboard.</p>`);
|
|
2590
|
+
var root_19 = $11.from_html(`<figure><!> <!> <div class="cinder-area-chart__viewport"><!> <svg><!></svg> <!></div> <!> <!> <!></figure>`);
|
|
1894
2591
|
function Area_chart($$anchor, $$props) {
|
|
1895
|
-
const generatedId = $
|
|
1896
|
-
$
|
|
1897
|
-
let mode = $
|
|
1898
|
-
const rootId = $
|
|
1899
|
-
const descriptionId = $
|
|
2592
|
+
const generatedId = $11.props_id();
|
|
2593
|
+
$11.push($$props, true);
|
|
2594
|
+
let mode = $11.prop($$props, "mode", 3, "single"), height = $11.prop($$props, "height", 3, 280), legendPosition = $11.prop($$props, "legendPosition", 3, "top"), hiddenSeriesIds = $11.prop($$props, "hiddenSeriesIds", 31, () => $11.proxy([])), loading = $11.prop($$props, "loading", 3, false), dataTableVisibility = $11.prop($$props, "dataTableVisibility", 3, "screen-reader-only"), maximumInteractivePoints = $11.prop($$props, "maximumInteractivePoints", 3, 500), tooltip = $11.prop($$props, "tooltip", 3, false), rest = $11.rest_props($$props, rest_excludes7);
|
|
2595
|
+
const rootId = $11.derived(() => $$props.id ?? generatedId);
|
|
2596
|
+
const descriptionId = $11.derived(() => $$props.description ? `${$11.get(rootId)}-description` : undefined);
|
|
1900
2597
|
const interaction = new ChartInteraction;
|
|
1901
|
-
let rootElement = $
|
|
1902
|
-
$
|
|
1903
|
-
|
|
2598
|
+
let rootElement = $11.state(undefined);
|
|
2599
|
+
let measureText = $11.state(false);
|
|
2600
|
+
let measurementVersion = $11.state(0);
|
|
2601
|
+
onMount(() => {
|
|
2602
|
+
$11.set(measureText, true);
|
|
2603
|
+
return observeChartFontLoading(() => {
|
|
2604
|
+
$11.set(measurementVersion, $11.get(measurementVersion) + 1);
|
|
2605
|
+
});
|
|
2606
|
+
});
|
|
2607
|
+
$11.user_effect(() => {
|
|
2608
|
+
if (!$11.get(rootElement))
|
|
1904
2609
|
return;
|
|
1905
|
-
return interaction.observeResize($
|
|
2610
|
+
return interaction.observeResize($11.get(rootElement));
|
|
1906
2611
|
});
|
|
1907
|
-
const model = $
|
|
2612
|
+
const model = $11.derived(() => createCartesianModel({
|
|
1908
2613
|
componentId: "area-chart",
|
|
1909
2614
|
series: $$props.series,
|
|
1910
2615
|
hiddenSeriesIds: hiddenSeriesIds(),
|
|
@@ -1912,511 +2617,627 @@ function Area_chart($$anchor, $$props) {
|
|
|
1912
2617
|
height: height(),
|
|
1913
2618
|
xAxis: $$props.xAxis,
|
|
1914
2619
|
yAxis: $$props.yAxis,
|
|
1915
|
-
stackedArea: mode() === "stacked"
|
|
2620
|
+
stackedArea: mode() === "stacked",
|
|
2621
|
+
theme: $$props.theme,
|
|
2622
|
+
measureText: $11.get(measureText),
|
|
2623
|
+
measurementElement: $11.get(rootElement),
|
|
2624
|
+
measurementVersion: $11.get(measurementVersion)
|
|
1916
2625
|
}));
|
|
1917
|
-
const keyboardEnabled = $
|
|
1918
|
-
const hasDataTable = $
|
|
1919
|
-
const guidanceId = $
|
|
1920
|
-
const focusedTarget = $
|
|
2626
|
+
const keyboardEnabled = $11.derived(() => $11.get(model).targets.length > 0 && $11.get(model).targets.length <= maximumInteractivePoints());
|
|
2627
|
+
const hasDataTable = $11.derived(() => dataTableVisibility() !== "hidden");
|
|
2628
|
+
const guidanceId = $11.derived(() => !$11.get(keyboardEnabled) && $11.get(hasDataTable) && $11.get(model).targets.length > 0 ? `${$11.get(rootId)}-table-guidance` : undefined);
|
|
2629
|
+
const focusedTarget = $11.derived(() => {
|
|
1921
2630
|
const currentTarget = interaction.focusedTarget;
|
|
1922
2631
|
if (!currentTarget)
|
|
1923
2632
|
return;
|
|
1924
|
-
return $
|
|
2633
|
+
return $11.get(model).targets.find((target) => target.id === currentTarget.id);
|
|
1925
2634
|
});
|
|
1926
|
-
let keyboardFocusModality = $
|
|
1927
|
-
let focusVisibleTargetId = $
|
|
1928
|
-
const focusRingTarget = $
|
|
1929
|
-
const pointFocusRing = $
|
|
1930
|
-
target: $
|
|
1931
|
-
plotWidth: $
|
|
1932
|
-
plotHeight: $
|
|
2635
|
+
let keyboardFocusModality = $11.state(false);
|
|
2636
|
+
let focusVisibleTargetId = $11.state(undefined);
|
|
2637
|
+
const focusRingTarget = $11.derived(() => $11.get(keyboardFocusModality) && $11.get(focusedTarget) && $11.get(focusVisibleTargetId) === $11.get(focusedTarget).id ? $11.get(focusedTarget) : undefined);
|
|
2638
|
+
const pointFocusRing = $11.derived(() => $11.get(focusRingTarget) ? createPointFocusRingGeometry({
|
|
2639
|
+
target: $11.get(focusRingTarget),
|
|
2640
|
+
plotWidth: $11.get(model).geometry.plotWidth,
|
|
2641
|
+
plotHeight: $11.get(model).geometry.plotHeight,
|
|
1933
2642
|
strokePadding: DEFAULT_CHART_FOCUS_RING_STROKE_PADDING
|
|
1934
2643
|
}) : null);
|
|
1935
|
-
$
|
|
2644
|
+
$11.user_effect(() => {
|
|
1936
2645
|
assertValidNonNegativeInteger("area-chart", "invalid-maximum-interactive-points", maximumInteractivePoints(), "maximumInteractivePoints");
|
|
1937
2646
|
});
|
|
1938
|
-
$
|
|
1939
|
-
interaction.clearStaleTargets(loading(), $
|
|
2647
|
+
$11.user_effect(() => {
|
|
2648
|
+
interaction.clearStaleTargets(loading(), $11.get(model).empty, $11.get(model).targets);
|
|
1940
2649
|
});
|
|
1941
2650
|
function rememberKeyboardFocusModality(event2) {
|
|
1942
2651
|
if (event2.key === "Tab" || event2.key === "Home" || event2.key === "End" || event2.key.startsWith("Arrow")) {
|
|
1943
|
-
$
|
|
2652
|
+
$11.set(keyboardFocusModality, true);
|
|
1944
2653
|
}
|
|
1945
2654
|
}
|
|
1946
2655
|
function clearKeyboardFocusModality() {
|
|
1947
|
-
$
|
|
1948
|
-
$
|
|
2656
|
+
$11.set(keyboardFocusModality, false);
|
|
2657
|
+
$11.set(focusVisibleTargetId, undefined);
|
|
1949
2658
|
}
|
|
1950
2659
|
function handleTargetFocus(target) {
|
|
1951
2660
|
interaction.focusedTarget = target;
|
|
1952
|
-
$
|
|
2661
|
+
$11.set(focusVisibleTargetId, $11.get(keyboardFocusModality) ? target.id : undefined, true);
|
|
1953
2662
|
}
|
|
1954
2663
|
function handleTargetBlur() {
|
|
1955
2664
|
interaction.focusedTarget = undefined;
|
|
1956
|
-
$
|
|
2665
|
+
$11.set(focusVisibleTargetId, undefined);
|
|
1957
2666
|
}
|
|
1958
2667
|
function handleTargetKeydown(event2) {
|
|
1959
2668
|
rememberKeyboardFocusModality(event2);
|
|
1960
|
-
interaction.activateByKeyboard(event2, $
|
|
2669
|
+
interaction.activateByKeyboard(event2, $11.get(rootElement), $11.get(model).targets, $11.get(keyboardEnabled));
|
|
1961
2670
|
}
|
|
1962
|
-
var figure =
|
|
1963
|
-
$
|
|
1964
|
-
$
|
|
1965
|
-
$
|
|
2671
|
+
var figure = root_19();
|
|
2672
|
+
$11.event("keydown", $11.window, rememberKeyboardFocusModality);
|
|
2673
|
+
$11.event("pointerdown", $11.window, clearKeyboardFocusModality);
|
|
2674
|
+
$11.attribute_effect(figure, ($0) => ({
|
|
1966
2675
|
...rest,
|
|
1967
|
-
id: $
|
|
2676
|
+
id: $11.get(rootId),
|
|
1968
2677
|
class: $0,
|
|
1969
2678
|
"aria-label": $$props.label,
|
|
1970
|
-
"aria-describedby": $
|
|
1971
|
-
"data-cinder-mode": mode()
|
|
2679
|
+
"aria-describedby": $11.get(descriptionId),
|
|
2680
|
+
"data-cinder-mode": mode(),
|
|
2681
|
+
[$11.STYLE]: {
|
|
2682
|
+
"--_cinder-chart-foreground": $11.get(model).theme.foreground,
|
|
2683
|
+
"--_cinder-chart-muted": $11.get(model).theme.muted,
|
|
2684
|
+
"--_cinder-chart-grid": $11.get(model).theme.grid,
|
|
2685
|
+
"--_cinder-chart-background": $11.get(model).theme.background
|
|
2686
|
+
}
|
|
1972
2687
|
}), [() => classNames("cinder-area-chart", $$props.class)]);
|
|
1973
|
-
var node = $
|
|
2688
|
+
var node = $11.child(figure);
|
|
1974
2689
|
{
|
|
1975
2690
|
var consequent = ($$anchor2) => {
|
|
1976
|
-
var p =
|
|
1977
|
-
var text3 = $
|
|
1978
|
-
$
|
|
1979
|
-
$
|
|
1980
|
-
$
|
|
1981
|
-
$
|
|
2691
|
+
var p = root8();
|
|
2692
|
+
var text3 = $11.child(p, true);
|
|
2693
|
+
$11.reset(p);
|
|
2694
|
+
$11.template_effect(() => {
|
|
2695
|
+
$11.set_attribute(p, "id", $11.get(descriptionId));
|
|
2696
|
+
$11.set_text(text3, $$props.description);
|
|
1982
2697
|
});
|
|
1983
|
-
$
|
|
2698
|
+
$11.append($$anchor2, p);
|
|
1984
2699
|
};
|
|
1985
|
-
$
|
|
2700
|
+
$11.if(node, ($$render) => {
|
|
1986
2701
|
if ($$props.description)
|
|
1987
2702
|
$$render(consequent);
|
|
1988
2703
|
});
|
|
1989
2704
|
}
|
|
1990
|
-
var node_1 = $
|
|
2705
|
+
var node_1 = $11.sibling(node, 2);
|
|
1991
2706
|
{
|
|
1992
2707
|
var consequent_1 = ($$anchor2) => {
|
|
1993
|
-
var div =
|
|
1994
|
-
$
|
|
1995
|
-
var button =
|
|
1996
|
-
var span = $
|
|
2708
|
+
var div = root_24();
|
|
2709
|
+
$11.each(div, 23, () => $$props.series, (item) => item.id, ($$anchor3, item, index2) => {
|
|
2710
|
+
var button = root_15();
|
|
2711
|
+
var span = $11.child(button);
|
|
1997
2712
|
let styles;
|
|
1998
|
-
var text_1 = $
|
|
1999
|
-
$
|
|
2000
|
-
$
|
|
2001
|
-
$
|
|
2002
|
-
styles = $
|
|
2003
|
-
$
|
|
2713
|
+
var text_1 = $11.sibling(span, 1, true);
|
|
2714
|
+
$11.reset(button);
|
|
2715
|
+
$11.template_effect(($0, $1) => {
|
|
2716
|
+
$11.set_attribute(button, "aria-pressed", $0);
|
|
2717
|
+
styles = $11.set_style(span, "", styles, $1);
|
|
2718
|
+
$11.set_text(text_1, $11.get(item).label);
|
|
2004
2719
|
}, [
|
|
2005
|
-
() => !hiddenSeriesIds().includes($
|
|
2720
|
+
() => !hiddenSeriesIds().includes($11.get(item).id),
|
|
2006
2721
|
() => ({
|
|
2007
|
-
background: $
|
|
2722
|
+
background: $11.get(item).color ?? chartPaletteColor($11.get(index2), $11.get(model).theme.palette)
|
|
2008
2723
|
})
|
|
2009
2724
|
]);
|
|
2010
|
-
$
|
|
2011
|
-
$
|
|
2725
|
+
$11.delegated("click", button, () => hiddenSeriesIds(interaction.toggleSeries(hiddenSeriesIds(), $11.get(item).id)));
|
|
2726
|
+
$11.append($$anchor3, button);
|
|
2012
2727
|
});
|
|
2013
|
-
$
|
|
2014
|
-
$
|
|
2728
|
+
$11.reset(div);
|
|
2729
|
+
$11.append($$anchor2, div);
|
|
2015
2730
|
};
|
|
2016
|
-
var d = $
|
|
2017
|
-
$
|
|
2018
|
-
if ($
|
|
2731
|
+
var d = $11.derived(() => legendVisible(legendPosition(), $$props.series.length) && legendPosition() === "top");
|
|
2732
|
+
$11.if(node_1, ($$render) => {
|
|
2733
|
+
if ($11.get(d))
|
|
2019
2734
|
$$render(consequent_1);
|
|
2020
2735
|
});
|
|
2021
2736
|
}
|
|
2022
|
-
var div_1 = $
|
|
2737
|
+
var div_1 = $11.sibling(node_1, 2);
|
|
2023
2738
|
let styles_1;
|
|
2024
|
-
var node_2 = $
|
|
2739
|
+
var node_2 = $11.child(div_1);
|
|
2025
2740
|
{
|
|
2026
2741
|
var consequent_3 = ($$anchor2) => {
|
|
2027
2742
|
var div_2 = root_32();
|
|
2028
|
-
var node_3 = $
|
|
2743
|
+
var node_3 = $11.child(div_2);
|
|
2029
2744
|
{
|
|
2030
2745
|
var consequent_2 = ($$anchor3) => {
|
|
2031
|
-
var fragment = $
|
|
2032
|
-
var node_4 = $
|
|
2033
|
-
$
|
|
2034
|
-
$
|
|
2746
|
+
var fragment = $11.comment();
|
|
2747
|
+
var node_4 = $11.first_child(fragment);
|
|
2748
|
+
$11.snippet(node_4, () => $$props.loadingContent);
|
|
2749
|
+
$11.append($$anchor3, fragment);
|
|
2035
2750
|
};
|
|
2036
2751
|
var alternate = ($$anchor3) => {
|
|
2037
|
-
var text_2 = $
|
|
2038
|
-
$
|
|
2752
|
+
var text_2 = $11.text("Loading chart…");
|
|
2753
|
+
$11.append($$anchor3, text_2);
|
|
2039
2754
|
};
|
|
2040
|
-
$
|
|
2755
|
+
$11.if(node_3, ($$render) => {
|
|
2041
2756
|
if ($$props.loadingContent)
|
|
2042
2757
|
$$render(consequent_2);
|
|
2043
2758
|
else
|
|
2044
2759
|
$$render(alternate, -1);
|
|
2045
2760
|
});
|
|
2046
2761
|
}
|
|
2047
|
-
$
|
|
2048
|
-
$
|
|
2762
|
+
$11.reset(div_2);
|
|
2763
|
+
$11.append($$anchor2, div_2);
|
|
2049
2764
|
};
|
|
2050
2765
|
var consequent_5 = ($$anchor2) => {
|
|
2051
2766
|
var div_3 = root_32();
|
|
2052
|
-
var node_5 = $
|
|
2767
|
+
var node_5 = $11.child(div_3);
|
|
2053
2768
|
{
|
|
2054
2769
|
var consequent_4 = ($$anchor3) => {
|
|
2055
|
-
var fragment_1 = $
|
|
2056
|
-
var node_6 = $
|
|
2057
|
-
$
|
|
2058
|
-
$
|
|
2770
|
+
var fragment_1 = $11.comment();
|
|
2771
|
+
var node_6 = $11.first_child(fragment_1);
|
|
2772
|
+
$11.snippet(node_6, () => $$props.empty);
|
|
2773
|
+
$11.append($$anchor3, fragment_1);
|
|
2059
2774
|
};
|
|
2060
2775
|
var alternate_1 = ($$anchor3) => {
|
|
2061
|
-
var text_3 = $
|
|
2062
|
-
$
|
|
2776
|
+
var text_3 = $11.text("No chart data");
|
|
2777
|
+
$11.append($$anchor3, text_3);
|
|
2063
2778
|
};
|
|
2064
|
-
$
|
|
2779
|
+
$11.if(node_5, ($$render) => {
|
|
2065
2780
|
if ($$props.empty)
|
|
2066
2781
|
$$render(consequent_4);
|
|
2067
2782
|
else
|
|
2068
2783
|
$$render(alternate_1, -1);
|
|
2069
2784
|
});
|
|
2070
2785
|
}
|
|
2071
|
-
$
|
|
2072
|
-
$
|
|
2786
|
+
$11.reset(div_3);
|
|
2787
|
+
$11.append($$anchor2, div_3);
|
|
2073
2788
|
};
|
|
2074
|
-
$
|
|
2789
|
+
$11.if(node_2, ($$render) => {
|
|
2075
2790
|
if (loading())
|
|
2076
2791
|
$$render(consequent_3);
|
|
2077
|
-
else if ($
|
|
2792
|
+
else if ($11.get(model).empty)
|
|
2078
2793
|
$$render(consequent_5, 1);
|
|
2079
2794
|
});
|
|
2080
2795
|
}
|
|
2081
|
-
var svg = $
|
|
2082
|
-
var node_7 = $
|
|
2796
|
+
var svg = $11.sibling(node_2, 2);
|
|
2797
|
+
var node_7 = $11.child(svg);
|
|
2083
2798
|
{
|
|
2084
|
-
var
|
|
2085
|
-
var fragment_2 =
|
|
2086
|
-
var title = $
|
|
2087
|
-
var text_4 = $
|
|
2088
|
-
$
|
|
2089
|
-
var g = $
|
|
2090
|
-
var node_8 = $
|
|
2091
|
-
$
|
|
2092
|
-
const tickY = $
|
|
2799
|
+
var consequent_18 = ($$anchor2) => {
|
|
2800
|
+
var fragment_2 = root_17();
|
|
2801
|
+
var title = $11.first_child(fragment_2);
|
|
2802
|
+
var text_4 = $11.child(title, true);
|
|
2803
|
+
$11.reset(title);
|
|
2804
|
+
var g = $11.sibling(title);
|
|
2805
|
+
var node_8 = $11.child(g);
|
|
2806
|
+
$11.each(node_8, 18, () => $11.get(model).yTicks, (tick) => tick, ($$anchor3, tick, index2) => {
|
|
2807
|
+
const tickY = $11.derived(() => $11.get(model).geometry.plotHeight - (tick - $11.get(model).yDomain[0]) / ($11.get(model).yDomain[1] - $11.get(model).yDomain[0]) * $11.get(model).geometry.plotHeight);
|
|
2093
2808
|
var fragment_3 = root_4();
|
|
2094
|
-
var line = $
|
|
2095
|
-
var text_5 = $
|
|
2096
|
-
var text_6 = $
|
|
2097
|
-
$
|
|
2098
|
-
$
|
|
2099
|
-
$
|
|
2100
|
-
$
|
|
2101
|
-
$
|
|
2102
|
-
$
|
|
2103
|
-
$
|
|
2809
|
+
var line = $11.first_child(fragment_3);
|
|
2810
|
+
var text_5 = $11.sibling(line);
|
|
2811
|
+
var text_6 = $11.child(text_5, true);
|
|
2812
|
+
$11.reset(text_5);
|
|
2813
|
+
$11.template_effect(($0) => {
|
|
2814
|
+
$11.set_attribute(line, "x2", $11.get(model).geometry.plotWidth);
|
|
2815
|
+
$11.set_attribute(line, "y1", $11.get(tickY));
|
|
2816
|
+
$11.set_attribute(line, "y2", $11.get(tickY));
|
|
2817
|
+
$11.set_attribute(text_5, "y", $11.get(tickY));
|
|
2818
|
+
$11.set_text(text_6, $0);
|
|
2104
2819
|
}, [
|
|
2105
|
-
() => formatNumericValue(tick, $$props.yAxis, undefined, { index: $
|
|
2820
|
+
() => formatNumericValue(tick, $$props.yAxis, undefined, { index: $11.get(index2) })
|
|
2106
2821
|
]);
|
|
2107
|
-
$
|
|
2822
|
+
$11.append($$anchor3, fragment_3);
|
|
2108
2823
|
});
|
|
2109
|
-
var node_9 = $
|
|
2110
|
-
|
|
2111
|
-
var
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
$
|
|
2116
|
-
|
|
2117
|
-
|
|
2824
|
+
var node_9 = $11.sibling(node_8);
|
|
2825
|
+
{
|
|
2826
|
+
var consequent_6 = ($$anchor3) => {
|
|
2827
|
+
var text_7 = root_5();
|
|
2828
|
+
var text_8 = $11.child(text_7, true);
|
|
2829
|
+
$11.reset(text_7);
|
|
2830
|
+
$11.template_effect(() => {
|
|
2831
|
+
$11.set_attribute(text_7, "x", -$11.get(model).geometry.plotHeight / 2);
|
|
2832
|
+
$11.set_attribute(text_7, "y", -$11.get(model).geometry.marginLeft + 12);
|
|
2833
|
+
$11.set_text(text_8, $$props.yAxis.label);
|
|
2834
|
+
});
|
|
2835
|
+
$11.append($$anchor3, text_7);
|
|
2836
|
+
};
|
|
2837
|
+
$11.if(node_9, ($$render) => {
|
|
2838
|
+
if ($$props.yAxis?.label)
|
|
2839
|
+
$$render(consequent_6);
|
|
2840
|
+
});
|
|
2841
|
+
}
|
|
2842
|
+
var node_10 = $11.sibling(node_9);
|
|
2843
|
+
$11.each(node_10, 17, () => $11.get(model).xTicks, (tick) => tick.label, ($$anchor3, tick) => {
|
|
2844
|
+
var text_9 = root_6();
|
|
2845
|
+
var text_10 = $11.child(text_9, true);
|
|
2846
|
+
$11.reset(text_9);
|
|
2847
|
+
$11.template_effect(() => {
|
|
2848
|
+
$11.set_attribute(text_9, "x", $11.get(tick).x);
|
|
2849
|
+
$11.set_attribute(text_9, "y", $11.get(model).geometry.plotHeight + 20);
|
|
2850
|
+
$11.set_attribute(text_9, "transform", $$props.xAxis?.tickLabelRotation ? `rotate(${$$props.xAxis.tickLabelRotation} ${$11.get(tick).x} ${$11.get(model).geometry.plotHeight + 20})` : undefined);
|
|
2851
|
+
$11.set_text(text_10, $11.get(tick).label);
|
|
2118
2852
|
});
|
|
2119
|
-
$
|
|
2853
|
+
$11.append($$anchor3, text_9);
|
|
2120
2854
|
});
|
|
2121
|
-
var
|
|
2122
|
-
|
|
2123
|
-
var
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
$
|
|
2131
|
-
$10.set_attribute(path, "d", $10.get(item).areaPath);
|
|
2132
|
-
$10.set_attribute(path, "fill", $10.get(item).color);
|
|
2133
|
-
$10.set_attribute(path, "data-cinder-series", $10.get(item).id);
|
|
2134
|
-
$10.set_attribute(path_1, "d", $10.get(item).path);
|
|
2135
|
-
$10.set_attribute(path_1, "stroke", $10.get(item).color);
|
|
2136
|
-
$10.set_attribute(path_1, "data-cinder-series", $10.get(item).id);
|
|
2137
|
-
});
|
|
2138
|
-
$10.append($$anchor4, fragment_5);
|
|
2139
|
-
};
|
|
2140
|
-
$10.if(node_11, ($$render) => {
|
|
2141
|
-
if (!$10.get(item).hidden && $10.get(item).areaPath)
|
|
2142
|
-
$$render(consequent_6);
|
|
2855
|
+
var node_11 = $11.sibling(node_10);
|
|
2856
|
+
{
|
|
2857
|
+
var consequent_7 = ($$anchor3) => {
|
|
2858
|
+
var text_11 = root_7();
|
|
2859
|
+
var text_12 = $11.child(text_11, true);
|
|
2860
|
+
$11.reset(text_11);
|
|
2861
|
+
$11.template_effect(() => {
|
|
2862
|
+
$11.set_attribute(text_11, "x", $11.get(model).geometry.plotWidth / 2);
|
|
2863
|
+
$11.set_attribute(text_11, "y", $11.get(model).geometry.plotHeight + $11.get(model).geometry.marginBottom - 4);
|
|
2864
|
+
$11.set_text(text_12, $$props.xAxis.label);
|
|
2143
2865
|
});
|
|
2144
|
-
|
|
2145
|
-
|
|
2866
|
+
$11.append($$anchor3, text_11);
|
|
2867
|
+
};
|
|
2868
|
+
$11.if(node_11, ($$render) => {
|
|
2869
|
+
if ($$props.xAxis?.label)
|
|
2870
|
+
$$render(consequent_7);
|
|
2871
|
+
});
|
|
2872
|
+
}
|
|
2873
|
+
var defs = $11.sibling(node_11);
|
|
2874
|
+
$11.each(defs, 21, () => $11.get(model).normalizedSeries, (item) => item.id, ($$anchor3, item) => {
|
|
2875
|
+
var linearGradient = root_8();
|
|
2876
|
+
var stop = $11.child(linearGradient);
|
|
2877
|
+
var stop_1 = $11.sibling(stop);
|
|
2878
|
+
$11.reset(linearGradient);
|
|
2879
|
+
$11.template_effect(($0) => {
|
|
2880
|
+
$11.set_attribute(linearGradient, "id", $0);
|
|
2881
|
+
$11.set_attribute(stop, "stop-color", $11.get(item).color);
|
|
2882
|
+
$11.set_attribute(stop_1, "stop-color", $11.get(item).color);
|
|
2883
|
+
}, [
|
|
2884
|
+
() => chartResourceId($11.get(rootId), "gradient", $11.get(item).id)
|
|
2885
|
+
]);
|
|
2886
|
+
$11.append($$anchor3, linearGradient);
|
|
2146
2887
|
});
|
|
2147
|
-
|
|
2888
|
+
$11.reset(defs);
|
|
2889
|
+
var node_12 = $11.sibling(defs);
|
|
2148
2890
|
{
|
|
2149
|
-
var
|
|
2150
|
-
var
|
|
2151
|
-
$
|
|
2152
|
-
|
|
2153
|
-
$
|
|
2154
|
-
|
|
2891
|
+
var consequent_10 = ($$anchor3) => {
|
|
2892
|
+
var fragment_4 = $11.comment();
|
|
2893
|
+
var node_13 = $11.first_child(fragment_4);
|
|
2894
|
+
$11.each(node_13, 17, () => $11.get(model).normalizedSeries, (item) => item.id, ($$anchor4, item) => {
|
|
2895
|
+
var fragment_5 = $11.comment();
|
|
2896
|
+
var node_14 = $11.first_child(fragment_5);
|
|
2897
|
+
{
|
|
2898
|
+
var consequent_9 = ($$anchor5) => {
|
|
2899
|
+
const sourceSeries = $11.derived(() => $$props.series.find((candidate) => candidate.id === $11.get(item).id));
|
|
2900
|
+
var fragment_6 = $11.comment();
|
|
2901
|
+
var node_15 = $11.first_child(fragment_6);
|
|
2902
|
+
{
|
|
2903
|
+
var consequent_8 = ($$anchor6) => {
|
|
2904
|
+
var fragment_7 = $11.comment();
|
|
2905
|
+
var node_16 = $11.first_child(fragment_7);
|
|
2906
|
+
$11.snippet(node_16, () => $$props.mark, () => ({
|
|
2907
|
+
series: $11.get(sourceSeries),
|
|
2908
|
+
points: $11.get(item).points,
|
|
2909
|
+
geometry: $11.get(model).geometry
|
|
2910
|
+
}));
|
|
2911
|
+
$11.append($$anchor6, fragment_7);
|
|
2912
|
+
};
|
|
2913
|
+
$11.if(node_15, ($$render) => {
|
|
2914
|
+
if ($11.get(sourceSeries))
|
|
2915
|
+
$$render(consequent_8);
|
|
2916
|
+
});
|
|
2917
|
+
}
|
|
2918
|
+
$11.append($$anchor5, fragment_6);
|
|
2919
|
+
};
|
|
2920
|
+
var d_1 = $11.derived(() => !hiddenSeriesIds().includes($11.get(item).id));
|
|
2921
|
+
$11.if(node_14, ($$render) => {
|
|
2922
|
+
if ($11.get(d_1))
|
|
2923
|
+
$$render(consequent_9);
|
|
2924
|
+
});
|
|
2925
|
+
}
|
|
2926
|
+
$11.append($$anchor4, fragment_5);
|
|
2927
|
+
});
|
|
2928
|
+
$11.append($$anchor3, fragment_4);
|
|
2929
|
+
};
|
|
2930
|
+
var alternate_2 = ($$anchor3) => {
|
|
2931
|
+
var fragment_8 = $11.comment();
|
|
2932
|
+
var node_17 = $11.first_child(fragment_8);
|
|
2933
|
+
$11.each(node_17, 17, () => $11.get(model).normalizedSeries, (item) => item.id, ($$anchor4, item) => {
|
|
2934
|
+
var fragment_9 = $11.comment();
|
|
2935
|
+
var node_18 = $11.first_child(fragment_9);
|
|
2936
|
+
{
|
|
2937
|
+
var consequent_11 = ($$anchor5) => {
|
|
2938
|
+
var fragment_10 = root_9();
|
|
2939
|
+
var path = $11.first_child(fragment_10);
|
|
2940
|
+
var path_1 = $11.sibling(path);
|
|
2941
|
+
$11.template_effect(($0) => {
|
|
2942
|
+
$11.set_attribute(path, "d", $11.get(item).areaPath);
|
|
2943
|
+
$11.set_attribute(path, "fill", $0);
|
|
2944
|
+
$11.set_attribute(path, "data-cinder-series", $11.get(item).id);
|
|
2945
|
+
$11.set_attribute(path_1, "d", $11.get(item).path);
|
|
2946
|
+
$11.set_attribute(path_1, "stroke", $11.get(item).color);
|
|
2947
|
+
$11.set_attribute(path_1, "data-cinder-series", $11.get(item).id);
|
|
2948
|
+
}, [
|
|
2949
|
+
() => `url(#${chartResourceId($11.get(rootId), "gradient", $11.get(item).id)})`
|
|
2950
|
+
]);
|
|
2951
|
+
$11.append($$anchor5, fragment_10);
|
|
2952
|
+
};
|
|
2953
|
+
var d_2 = $11.derived(() => !hiddenSeriesIds().includes($11.get(item).id) && $11.get(item).areaPath);
|
|
2954
|
+
$11.if(node_18, ($$render) => {
|
|
2955
|
+
if ($11.get(d_2))
|
|
2956
|
+
$$render(consequent_11);
|
|
2957
|
+
});
|
|
2958
|
+
}
|
|
2959
|
+
$11.append($$anchor4, fragment_9);
|
|
2960
|
+
});
|
|
2961
|
+
$11.append($$anchor3, fragment_8);
|
|
2962
|
+
};
|
|
2963
|
+
$11.if(node_12, ($$render) => {
|
|
2964
|
+
if ($$props.mark)
|
|
2965
|
+
$$render(consequent_10);
|
|
2966
|
+
else
|
|
2967
|
+
$$render(alternate_2, -1);
|
|
2968
|
+
});
|
|
2969
|
+
}
|
|
2970
|
+
var node_19 = $11.sibling(node_12);
|
|
2971
|
+
{
|
|
2972
|
+
var consequent_12 = ($$anchor3) => {
|
|
2973
|
+
var line_1 = root_10();
|
|
2974
|
+
$11.template_effect(() => {
|
|
2975
|
+
$11.set_attribute(line_1, "x1", interaction.activeTarget.x);
|
|
2976
|
+
$11.set_attribute(line_1, "x2", interaction.activeTarget.x);
|
|
2977
|
+
$11.set_attribute(line_1, "y2", $11.get(model).geometry.plotHeight);
|
|
2155
2978
|
});
|
|
2156
|
-
$
|
|
2979
|
+
$11.append($$anchor3, line_1);
|
|
2157
2980
|
};
|
|
2158
|
-
$
|
|
2981
|
+
$11.if(node_19, ($$render) => {
|
|
2159
2982
|
if (interaction.activeTarget)
|
|
2160
|
-
$$render(
|
|
2983
|
+
$$render(consequent_12);
|
|
2161
2984
|
});
|
|
2162
2985
|
}
|
|
2163
|
-
var
|
|
2986
|
+
var node_20 = $11.sibling(node_19);
|
|
2164
2987
|
{
|
|
2165
|
-
var
|
|
2166
|
-
var
|
|
2167
|
-
var rect = $
|
|
2168
|
-
var
|
|
2988
|
+
var consequent_14 = ($$anchor3) => {
|
|
2989
|
+
var fragment_11 = root_122();
|
|
2990
|
+
var rect = $11.first_child(fragment_11);
|
|
2991
|
+
var node_21 = $11.sibling(rect);
|
|
2169
2992
|
{
|
|
2170
|
-
var
|
|
2171
|
-
var
|
|
2172
|
-
var
|
|
2173
|
-
$
|
|
2174
|
-
var circle =
|
|
2175
|
-
$
|
|
2176
|
-
$
|
|
2177
|
-
$
|
|
2178
|
-
$
|
|
2179
|
-
$
|
|
2180
|
-
$
|
|
2181
|
-
$
|
|
2182
|
-
$
|
|
2993
|
+
var consequent_13 = ($$anchor4) => {
|
|
2994
|
+
var fragment_12 = $11.comment();
|
|
2995
|
+
var node_22 = $11.first_child(fragment_12);
|
|
2996
|
+
$11.each(node_22, 17, () => $11.get(model).targets, (target) => target.id, ($$anchor5, target) => {
|
|
2997
|
+
var circle = root_11();
|
|
2998
|
+
$11.template_effect(() => {
|
|
2999
|
+
$11.set_attribute(circle, "cx", $11.get(target).x);
|
|
3000
|
+
$11.set_attribute(circle, "cy", $11.get(target).y);
|
|
3001
|
+
$11.set_attribute(circle, "data-cinder-target-id", $11.get(target).id);
|
|
3002
|
+
$11.set_attribute(circle, "data-cinder-series-id", $11.get(target).seriesId);
|
|
3003
|
+
$11.set_attribute(circle, "data-cinder-focus-ring-active", $11.get(pointFocusRing) && $11.get(focusRingTarget)?.id === $11.get(target).id ? "true" : undefined);
|
|
3004
|
+
$11.set_attribute(circle, "aria-label", `${$11.get(target).seriesLabel}, ${$11.get(target).xLabel}, ${$11.get(target).valueLabel}`);
|
|
3005
|
+
$11.set_attribute(circle, "aria-describedby", tooltip() && interaction.activeTarget?.id === $11.get(target).id ? `${$11.get(rootId)}-tooltip` : undefined);
|
|
2183
3006
|
});
|
|
2184
|
-
$
|
|
2185
|
-
$
|
|
2186
|
-
$
|
|
2187
|
-
$
|
|
3007
|
+
$11.event("focus", circle, () => handleTargetFocus($11.get(target)));
|
|
3008
|
+
$11.event("blur", circle, handleTargetBlur);
|
|
3009
|
+
$11.delegated("keydown", circle, handleTargetKeydown);
|
|
3010
|
+
$11.append($$anchor5, circle);
|
|
2188
3011
|
});
|
|
2189
|
-
$
|
|
3012
|
+
$11.append($$anchor4, fragment_12);
|
|
2190
3013
|
};
|
|
2191
|
-
$
|
|
2192
|
-
if ($
|
|
2193
|
-
$$render(
|
|
3014
|
+
$11.if(node_21, ($$render) => {
|
|
3015
|
+
if ($11.get(keyboardEnabled))
|
|
3016
|
+
$$render(consequent_13);
|
|
2194
3017
|
});
|
|
2195
3018
|
}
|
|
2196
|
-
$
|
|
2197
|
-
$
|
|
2198
|
-
$
|
|
3019
|
+
$11.template_effect(() => {
|
|
3020
|
+
$11.set_attribute(rect, "width", $11.get(model).geometry.plotWidth);
|
|
3021
|
+
$11.set_attribute(rect, "height", $11.get(model).geometry.plotHeight);
|
|
2199
3022
|
});
|
|
2200
|
-
$
|
|
2201
|
-
$
|
|
2202
|
-
$
|
|
3023
|
+
$11.delegated("pointermove", rect, (event2) => interaction.activateByPointer(event2, $11.get(model).targets));
|
|
3024
|
+
$11.event("pointerleave", rect, () => interaction.clearPointerTarget());
|
|
3025
|
+
$11.append($$anchor3, fragment_11);
|
|
2203
3026
|
};
|
|
2204
|
-
$
|
|
2205
|
-
if ($
|
|
2206
|
-
$$render(
|
|
3027
|
+
$11.if(node_20, ($$render) => {
|
|
3028
|
+
if ($11.get(model).targets.length > 0)
|
|
3029
|
+
$$render(consequent_14);
|
|
2207
3030
|
});
|
|
2208
3031
|
}
|
|
2209
|
-
var
|
|
3032
|
+
var node_23 = $11.sibling(node_20);
|
|
2210
3033
|
{
|
|
2211
|
-
var
|
|
2212
|
-
var g_1 =
|
|
2213
|
-
var
|
|
3034
|
+
var consequent_17 = ($$anchor3) => {
|
|
3035
|
+
var g_1 = root_16();
|
|
3036
|
+
var node_24 = $11.child(g_1);
|
|
2214
3037
|
{
|
|
2215
|
-
var
|
|
2216
|
-
var
|
|
2217
|
-
var circle_1 = $
|
|
2218
|
-
var circle_2 = $
|
|
2219
|
-
var
|
|
3038
|
+
var consequent_16 = ($$anchor4) => {
|
|
3039
|
+
var fragment_13 = root_142();
|
|
3040
|
+
var circle_1 = $11.first_child(fragment_13);
|
|
3041
|
+
var circle_2 = $11.sibling(circle_1);
|
|
3042
|
+
var node_25 = $11.sibling(circle_2);
|
|
2220
3043
|
{
|
|
2221
|
-
var
|
|
2222
|
-
var
|
|
2223
|
-
var path_2 = $
|
|
2224
|
-
var path_3 = $
|
|
2225
|
-
var circle_3 = $
|
|
2226
|
-
var circle_4 = $
|
|
2227
|
-
$
|
|
2228
|
-
$
|
|
2229
|
-
$
|
|
2230
|
-
$
|
|
2231
|
-
$
|
|
2232
|
-
$
|
|
2233
|
-
$
|
|
2234
|
-
$
|
|
2235
|
-
$
|
|
3044
|
+
var consequent_15 = ($$anchor5) => {
|
|
3045
|
+
var fragment_14 = root_132();
|
|
3046
|
+
var path_2 = $11.first_child(fragment_14);
|
|
3047
|
+
var path_3 = $11.sibling(path_2);
|
|
3048
|
+
var circle_3 = $11.sibling(path_3);
|
|
3049
|
+
var circle_4 = $11.sibling(circle_3);
|
|
3050
|
+
$11.template_effect(() => {
|
|
3051
|
+
$11.set_attribute(path_2, "d", `M ${$11.get(pointFocusRing).connector.x1} ${$11.get(pointFocusRing).connector.y1} L ${$11.get(pointFocusRing).connector.x2} ${$11.get(pointFocusRing).connector.y2}`);
|
|
3052
|
+
$11.set_attribute(path_3, "d", `M ${$11.get(pointFocusRing).connector.x1} ${$11.get(pointFocusRing).connector.y1} L ${$11.get(pointFocusRing).connector.x2} ${$11.get(pointFocusRing).connector.y2}`);
|
|
3053
|
+
$11.set_attribute(circle_3, "cx", $11.get(pointFocusRing).dot.cx);
|
|
3054
|
+
$11.set_attribute(circle_3, "cy", $11.get(pointFocusRing).dot.cy);
|
|
3055
|
+
$11.set_attribute(circle_3, "r", $11.get(pointFocusRing).dot.radius);
|
|
3056
|
+
$11.set_attribute(circle_4, "cx", $11.get(pointFocusRing).dot.cx);
|
|
3057
|
+
$11.set_attribute(circle_4, "cy", $11.get(pointFocusRing).dot.cy);
|
|
3058
|
+
$11.set_attribute(circle_4, "r", $11.get(pointFocusRing).dot.radius);
|
|
2236
3059
|
});
|
|
2237
|
-
$
|
|
3060
|
+
$11.append($$anchor5, fragment_14);
|
|
2238
3061
|
};
|
|
2239
|
-
$
|
|
2240
|
-
if ($
|
|
2241
|
-
$$render(
|
|
3062
|
+
$11.if(node_25, ($$render) => {
|
|
3063
|
+
if ($11.get(pointFocusRing).connector && $11.get(pointFocusRing).dot)
|
|
3064
|
+
$$render(consequent_15);
|
|
2242
3065
|
});
|
|
2243
3066
|
}
|
|
2244
|
-
$
|
|
2245
|
-
$
|
|
2246
|
-
$
|
|
2247
|
-
$
|
|
2248
|
-
$
|
|
2249
|
-
$
|
|
2250
|
-
$
|
|
3067
|
+
$11.template_effect(() => {
|
|
3068
|
+
$11.set_attribute(circle_1, "cx", $11.get(pointFocusRing).cx);
|
|
3069
|
+
$11.set_attribute(circle_1, "cy", $11.get(pointFocusRing).cy);
|
|
3070
|
+
$11.set_attribute(circle_1, "r", $11.get(pointFocusRing).radius);
|
|
3071
|
+
$11.set_attribute(circle_2, "cx", $11.get(pointFocusRing).cx);
|
|
3072
|
+
$11.set_attribute(circle_2, "cy", $11.get(pointFocusRing).cy);
|
|
3073
|
+
$11.set_attribute(circle_2, "r", $11.get(pointFocusRing).radius);
|
|
2251
3074
|
});
|
|
2252
|
-
$
|
|
3075
|
+
$11.append($$anchor4, fragment_13);
|
|
2253
3076
|
};
|
|
2254
|
-
var
|
|
2255
|
-
var
|
|
2256
|
-
var rect_1 = $
|
|
2257
|
-
var rect_2 = $
|
|
2258
|
-
$
|
|
2259
|
-
$
|
|
2260
|
-
$
|
|
2261
|
-
$
|
|
2262
|
-
$
|
|
2263
|
-
$
|
|
2264
|
-
$
|
|
2265
|
-
$
|
|
2266
|
-
$
|
|
2267
|
-
$
|
|
2268
|
-
$
|
|
3077
|
+
var alternate_3 = ($$anchor4) => {
|
|
3078
|
+
var fragment_15 = root_152();
|
|
3079
|
+
var rect_1 = $11.first_child(fragment_15);
|
|
3080
|
+
var rect_2 = $11.sibling(rect_1);
|
|
3081
|
+
$11.template_effect(() => {
|
|
3082
|
+
$11.set_attribute(rect_1, "x", $11.get(pointFocusRing).x);
|
|
3083
|
+
$11.set_attribute(rect_1, "y", $11.get(pointFocusRing).y);
|
|
3084
|
+
$11.set_attribute(rect_1, "width", $11.get(pointFocusRing).width);
|
|
3085
|
+
$11.set_attribute(rect_1, "height", $11.get(pointFocusRing).height);
|
|
3086
|
+
$11.set_attribute(rect_1, "rx", $11.get(pointFocusRing).radius);
|
|
3087
|
+
$11.set_attribute(rect_2, "x", $11.get(pointFocusRing).x);
|
|
3088
|
+
$11.set_attribute(rect_2, "y", $11.get(pointFocusRing).y);
|
|
3089
|
+
$11.set_attribute(rect_2, "width", $11.get(pointFocusRing).width);
|
|
3090
|
+
$11.set_attribute(rect_2, "height", $11.get(pointFocusRing).height);
|
|
3091
|
+
$11.set_attribute(rect_2, "rx", $11.get(pointFocusRing).radius);
|
|
2269
3092
|
});
|
|
2270
|
-
$
|
|
3093
|
+
$11.append($$anchor4, fragment_15);
|
|
2271
3094
|
};
|
|
2272
|
-
$
|
|
2273
|
-
if ($
|
|
2274
|
-
$$render(
|
|
3095
|
+
$11.if(node_24, ($$render) => {
|
|
3096
|
+
if ($11.get(pointFocusRing).kind === "point")
|
|
3097
|
+
$$render(consequent_16);
|
|
2275
3098
|
else
|
|
2276
|
-
$$render(
|
|
3099
|
+
$$render(alternate_3, -1);
|
|
2277
3100
|
});
|
|
2278
3101
|
}
|
|
2279
|
-
$
|
|
2280
|
-
$
|
|
3102
|
+
$11.reset(g_1);
|
|
3103
|
+
$11.append($$anchor3, g_1);
|
|
2281
3104
|
};
|
|
2282
|
-
$
|
|
2283
|
-
if ($
|
|
2284
|
-
$$render(
|
|
3105
|
+
$11.if(node_23, ($$render) => {
|
|
3106
|
+
if ($11.get(pointFocusRing))
|
|
3107
|
+
$$render(consequent_17);
|
|
2285
3108
|
});
|
|
2286
3109
|
}
|
|
2287
|
-
$
|
|
2288
|
-
$
|
|
2289
|
-
$
|
|
2290
|
-
$
|
|
2291
|
-
$
|
|
3110
|
+
$11.reset(g);
|
|
3111
|
+
$11.template_effect(() => {
|
|
3112
|
+
$11.set_attribute(title, "id", `${$11.get(rootId) ?? ""}-svg-title`);
|
|
3113
|
+
$11.set_text(text_4, $$props.label);
|
|
3114
|
+
$11.set_attribute(g, "transform", `translate(${$11.get(model).geometry.marginLeft}, ${$11.get(model).geometry.marginTop})`);
|
|
2292
3115
|
});
|
|
2293
|
-
$
|
|
3116
|
+
$11.append($$anchor2, fragment_2);
|
|
2294
3117
|
};
|
|
2295
|
-
$
|
|
2296
|
-
if (!loading() && !$
|
|
2297
|
-
$$render(
|
|
3118
|
+
$11.if(node_7, ($$render) => {
|
|
3119
|
+
if (!loading() && !$11.get(model).empty)
|
|
3120
|
+
$$render(consequent_18);
|
|
2298
3121
|
});
|
|
2299
3122
|
}
|
|
2300
|
-
$
|
|
2301
|
-
var
|
|
3123
|
+
$11.reset(svg);
|
|
3124
|
+
var node_26 = $11.sibling(svg, 2);
|
|
2302
3125
|
{
|
|
2303
|
-
var
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
3126
|
+
var consequent_19 = ($$anchor2) => {
|
|
3127
|
+
{
|
|
3128
|
+
let $0 = $11.derived(() => `${$11.get(rootId)}-tooltip`);
|
|
3129
|
+
Chart_tooltip($$anchor2, {
|
|
3130
|
+
get id() {
|
|
3131
|
+
return $11.get($0);
|
|
3132
|
+
},
|
|
3133
|
+
get target() {
|
|
3134
|
+
return interaction.activeTarget;
|
|
3135
|
+
},
|
|
3136
|
+
get geometry() {
|
|
3137
|
+
return $11.get(model).geometry;
|
|
3138
|
+
},
|
|
3139
|
+
get content() {
|
|
3140
|
+
return tooltip();
|
|
3141
|
+
}
|
|
2318
3142
|
});
|
|
2319
|
-
|
|
2320
|
-
$10.set_text(text_10, `${interaction.activeTarget.xLabel ?? ""}: ${interaction.activeTarget.valueLabel ?? ""}`);
|
|
2321
|
-
});
|
|
2322
|
-
$10.append($$anchor2, div_4);
|
|
3143
|
+
}
|
|
2323
3144
|
};
|
|
2324
|
-
$
|
|
2325
|
-
if (
|
|
2326
|
-
$$render(
|
|
3145
|
+
$11.if(node_26, ($$render) => {
|
|
3146
|
+
if (tooltip())
|
|
3147
|
+
$$render(consequent_19);
|
|
2327
3148
|
});
|
|
2328
3149
|
}
|
|
2329
|
-
$
|
|
2330
|
-
var
|
|
3150
|
+
$11.reset(div_1);
|
|
3151
|
+
var node_27 = $11.sibling(div_1, 2);
|
|
2331
3152
|
{
|
|
2332
|
-
var
|
|
2333
|
-
var p_1 =
|
|
2334
|
-
$
|
|
2335
|
-
$
|
|
3153
|
+
var consequent_20 = ($$anchor2) => {
|
|
3154
|
+
var p_1 = root_18();
|
|
3155
|
+
$11.template_effect(() => $11.set_attribute(p_1, "id", $11.get(guidanceId)));
|
|
3156
|
+
$11.append($$anchor2, p_1);
|
|
2336
3157
|
};
|
|
2337
|
-
$
|
|
2338
|
-
if ($
|
|
2339
|
-
$$render(
|
|
3158
|
+
$11.if(node_27, ($$render) => {
|
|
3159
|
+
if ($11.get(guidanceId))
|
|
3160
|
+
$$render(consequent_20);
|
|
2340
3161
|
});
|
|
2341
3162
|
}
|
|
2342
|
-
var
|
|
3163
|
+
var node_28 = $11.sibling(node_27, 2);
|
|
2343
3164
|
{
|
|
2344
|
-
var
|
|
3165
|
+
var consequent_21 = ($$anchor2) => {
|
|
2345
3166
|
{
|
|
2346
|
-
let $0 = $
|
|
2347
|
-
let $1 = $
|
|
3167
|
+
let $0 = $11.derived(() => formatDataTableCaption($$props.dataTableCaption ?? $$props.label, $11.get(model).tableRows.length, $11.get(model).targets.length));
|
|
3168
|
+
let $1 = $11.derived(() => $11.get(model).tableRows.map((row) => ({
|
|
2348
3169
|
id: row.id,
|
|
2349
3170
|
header: row.seriesLabel,
|
|
2350
3171
|
cells: [row.xLabel, row.valueLabel]
|
|
2351
3172
|
})));
|
|
2352
|
-
let $22 = $
|
|
3173
|
+
let $22 = $11.derived(() => dataTableClass(dataTableVisibility()));
|
|
2353
3174
|
Chart_data_table($$anchor2, {
|
|
2354
3175
|
get caption() {
|
|
2355
|
-
return $
|
|
3176
|
+
return $11.get($0);
|
|
2356
3177
|
},
|
|
2357
3178
|
headers: ["Series", "X", "Value"],
|
|
2358
3179
|
get rows() {
|
|
2359
|
-
return $
|
|
3180
|
+
return $11.get($1);
|
|
2360
3181
|
},
|
|
2361
3182
|
get visibilityClass() {
|
|
2362
|
-
return $
|
|
3183
|
+
return $11.get($22);
|
|
2363
3184
|
},
|
|
2364
3185
|
get describedBy() {
|
|
2365
|
-
return $
|
|
3186
|
+
return $11.get(guidanceId);
|
|
2366
3187
|
}
|
|
2367
3188
|
});
|
|
2368
3189
|
}
|
|
2369
3190
|
};
|
|
2370
|
-
$
|
|
2371
|
-
if ($
|
|
2372
|
-
$$render(
|
|
3191
|
+
$11.if(node_28, ($$render) => {
|
|
3192
|
+
if ($11.get(hasDataTable))
|
|
3193
|
+
$$render(consequent_21);
|
|
2373
3194
|
});
|
|
2374
3195
|
}
|
|
2375
|
-
var
|
|
3196
|
+
var node_29 = $11.sibling(node_28, 2);
|
|
2376
3197
|
{
|
|
2377
|
-
var
|
|
2378
|
-
var
|
|
2379
|
-
$
|
|
2380
|
-
var button_1 =
|
|
2381
|
-
var
|
|
2382
|
-
let
|
|
2383
|
-
var
|
|
2384
|
-
$
|
|
2385
|
-
$
|
|
2386
|
-
$
|
|
2387
|
-
|
|
2388
|
-
$
|
|
3198
|
+
var consequent_22 = ($$anchor2) => {
|
|
3199
|
+
var div_4 = root_24();
|
|
3200
|
+
$11.each(div_4, 23, () => $$props.series, (item) => item.id, ($$anchor3, item, index2) => {
|
|
3201
|
+
var button_1 = root_15();
|
|
3202
|
+
var span_1 = $11.child(button_1);
|
|
3203
|
+
let styles_2;
|
|
3204
|
+
var text_13 = $11.sibling(span_1, 1, true);
|
|
3205
|
+
$11.reset(button_1);
|
|
3206
|
+
$11.template_effect(($0, $1) => {
|
|
3207
|
+
$11.set_attribute(button_1, "aria-pressed", $0);
|
|
3208
|
+
styles_2 = $11.set_style(span_1, "", styles_2, $1);
|
|
3209
|
+
$11.set_text(text_13, $11.get(item).label);
|
|
2389
3210
|
}, [
|
|
2390
|
-
() => !hiddenSeriesIds().includes($
|
|
3211
|
+
() => !hiddenSeriesIds().includes($11.get(item).id),
|
|
2391
3212
|
() => ({
|
|
2392
|
-
background: $
|
|
3213
|
+
background: $11.get(item).color ?? chartPaletteColor($11.get(index2), $11.get(model).theme.palette)
|
|
2393
3214
|
})
|
|
2394
3215
|
]);
|
|
2395
|
-
$
|
|
2396
|
-
$
|
|
3216
|
+
$11.delegated("click", button_1, () => hiddenSeriesIds(interaction.toggleSeries(hiddenSeriesIds(), $11.get(item).id)));
|
|
3217
|
+
$11.append($$anchor3, button_1);
|
|
2397
3218
|
});
|
|
2398
|
-
$
|
|
2399
|
-
$
|
|
3219
|
+
$11.reset(div_4);
|
|
3220
|
+
$11.append($$anchor2, div_4);
|
|
2400
3221
|
};
|
|
2401
|
-
var
|
|
2402
|
-
$
|
|
2403
|
-
if ($
|
|
2404
|
-
$$render(
|
|
3222
|
+
var d_3 = $11.derived(() => legendVisible(legendPosition(), $$props.series.length) && legendPosition() === "bottom");
|
|
3223
|
+
$11.if(node_29, ($$render) => {
|
|
3224
|
+
if ($11.get(d_3))
|
|
3225
|
+
$$render(consequent_22);
|
|
2405
3226
|
});
|
|
2406
3227
|
}
|
|
2407
|
-
$
|
|
2408
|
-
$
|
|
2409
|
-
$
|
|
2410
|
-
$
|
|
2411
|
-
styles_1 = $
|
|
2412
|
-
$
|
|
2413
|
-
$
|
|
2414
|
-
$
|
|
3228
|
+
$11.reset(figure);
|
|
3229
|
+
$11.bind_this(figure, ($$value) => $11.set(rootElement, $$value), () => $11.get(rootElement));
|
|
3230
|
+
$11.template_effect(() => {
|
|
3231
|
+
$11.set_attribute(div_1, "data-cinder-loading", loading() || undefined);
|
|
3232
|
+
styles_1 = $11.set_style(div_1, "", styles_1, { height: `${height() ?? ""}px` });
|
|
3233
|
+
$11.set_attribute(svg, "viewBox", `0 0 ${interaction.measuredWidth} ${height()}`);
|
|
3234
|
+
$11.set_attribute(svg, "aria-hidden", loading() || $11.get(model).empty ? "true" : undefined);
|
|
3235
|
+
$11.set_attribute(svg, "aria-labelledby", !loading() && !$11.get(model).empty ? `${$11.get(rootId)}-svg-title` : undefined);
|
|
2415
3236
|
});
|
|
2416
|
-
$
|
|
2417
|
-
$
|
|
3237
|
+
$11.append($$anchor, figure);
|
|
3238
|
+
$11.pop();
|
|
2418
3239
|
}
|
|
2419
|
-
$
|
|
3240
|
+
$11.delegate(["click", "pointermove", "keydown"]);
|
|
2420
3241
|
|
|
2421
3242
|
// src/components/area-chart/index.ts
|
|
2422
3243
|
var area_chart_default = Area_chart;
|
|
@@ -2425,4 +3246,4 @@ export {
|
|
|
2425
3246
|
Area_chart as AreaChart
|
|
2426
3247
|
};
|
|
2427
3248
|
|
|
2428
|
-
//# debugId=
|
|
3249
|
+
//# debugId=DC639FF15FBA64DA64756E2164756E21
|