@lostgradient/cinder 0.1.1 → 0.2.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 +62 -0
- package/README.md +163 -0
- package/components.json +390 -3
- package/dist/_internal/chart/chart-focus-ring.d.ts +57 -0
- package/dist/_internal/chart/chart-utilities.d.ts +2 -0
- package/dist/_internal/chart/heatmap-utilities.d.ts +60 -0
- package/dist/components/accordion/index.js +14 -1
- package/dist/components/alert/alert.schema.js +3 -3
- package/dist/components/alert/alert.types.d.ts +3 -2
- package/dist/components/alert/index.js +3 -2
- package/dist/components/alert-dialog/index.js +11 -2
- package/dist/components/area-chart/area-chart.css +57 -7
- package/dist/components/area-chart/index.js +283 -40
- package/dist/components/avatar-group/avatar-group.css +2 -3
- package/dist/components/badge/badge.css +17 -0
- package/dist/components/badge/badge.schema.js +6 -1
- package/dist/components/badge/badge.types.d.ts +7 -0
- package/dist/components/badge/index.js +4 -2
- package/dist/components/bar-chart/bar-chart.css +57 -7
- package/dist/components/bar-chart/index.js +233 -45
- package/dist/components/button/button.css +5 -3
- package/dist/components/button/index.js +11 -2
- package/dist/components/capability-gate/capability-gate.css +131 -0
- package/dist/components/capability-gate/capability-gate.schema.d.ts +3 -0
- package/dist/components/capability-gate/capability-gate.schema.js +128 -0
- package/dist/components/capability-gate/capability-gate.svelte.d.ts +19 -0
- package/dist/components/capability-gate/capability-gate.types.d.ts +70 -0
- package/dist/components/capability-gate/capability-gate.variables.d.ts +2 -0
- package/dist/components/capability-gate/capability-gate.variables.js +61 -0
- package/dist/components/capability-gate/index.d.ts +5 -0
- package/dist/components/capability-gate/index.js +285 -0
- package/dist/components/card/card.css +4 -0
- package/dist/components/card/card.schema.js +5 -1
- package/dist/components/card/card.svelte.d.ts +1 -1
- package/dist/components/card/card.types.d.ts +4 -0
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/card/index.js +8 -4
- package/dist/components/chat/index.css +2 -2
- package/dist/components/chat/index.js +159 -81
- package/dist/components/choice-grid/choice-grid-context.d.ts +23 -0
- package/dist/components/choice-grid/choice-grid.css +27 -0
- package/dist/components/choice-grid/choice-grid.schema.d.ts +3 -0
- package/dist/components/choice-grid/choice-grid.schema.js +121 -0
- package/dist/components/choice-grid/choice-grid.svelte.d.ts +20 -0
- package/dist/components/choice-grid/choice-grid.types.d.ts +122 -0
- package/dist/components/choice-grid/choice-grid.variables.d.ts +2 -0
- package/dist/components/choice-grid/choice-grid.variables.js +61 -0
- package/dist/components/choice-grid/index.d.ts +13 -0
- package/dist/components/choice-grid/index.js +466 -0
- package/dist/components/choice-grid-item/choice-grid-item.css +139 -0
- package/dist/components/choice-grid-item/choice-grid-item.schema.d.ts +3 -0
- package/dist/components/choice-grid-item/choice-grid-item.schema.js +93 -0
- package/dist/components/choice-grid-item/choice-grid-item.svelte.d.ts +17 -0
- package/dist/components/choice-grid-item/choice-grid-item.types.d.ts +24 -0
- package/dist/components/choice-grid-item/choice-grid-item.variables.d.ts +2 -0
- package/dist/components/choice-grid-item/choice-grid-item.variables.js +61 -0
- package/dist/components/choice-grid-item/index.d.ts +5 -0
- package/dist/components/choice-grid-item/index.js +203 -0
- package/dist/components/color-field/color-field.css +6 -9
- package/dist/components/color-picker/color-picker.css +31 -24
- package/dist/components/color-swatch-picker/color-swatch-picker.css +6 -9
- package/dist/components/confirm-dialog/index.js +11 -2
- package/dist/components/context-menu/index.js +114 -43
- package/dist/components/context-menu-trigger/index.js +6 -4
- package/dist/components/data-table/data-table.css +30 -0
- package/dist/components/data-table/data-table.schema.d.ts +3 -0
- package/dist/components/data-table/data-table.schema.js +103 -0
- package/dist/components/data-table/data-table.svelte.d.ts +39 -0
- package/dist/components/data-table/data-table.types.d.ts +86 -0
- package/dist/components/data-table/data-table.variables.d.ts +2 -0
- package/dist/components/data-table/data-table.variables.js +61 -0
- package/dist/components/data-table/index.d.ts +5 -0
- package/dist/components/data-table/index.js +591 -0
- package/dist/components/diff-viewer/index.js +14 -3
- package/dist/components/dropdown/index.js +115 -46
- package/dist/components/dropdown-item/dropdown-item.schema.js +13 -1
- package/dist/components/dropdown-item/dropdown-item.svelte.d.ts +1 -1
- package/dist/components/dropdown-item/dropdown-item.types.d.ts +46 -2
- package/dist/components/dropdown-item/index.d.ts +1 -1
- package/dist/components/dropdown-item/index.js +97 -28
- package/dist/components/floating-action-button/floating-action-button.css +4 -2
- package/dist/components/json-schema-editor/index.js +29 -4
- package/dist/components/keyboard-shortcuts/index.d.ts +5 -0
- package/dist/components/keyboard-shortcuts/index.js +238 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.css +84 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.schema.d.ts +3 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.schema.js +87 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.svelte.d.ts +17 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.types.d.ts +42 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.variables.d.ts +2 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.variables.js +61 -0
- package/dist/components/line-chart/index.js +283 -40
- package/dist/components/line-chart/line-chart.css +57 -8
- package/dist/components/markdown-editor/index.js +129 -51
- package/dist/components/matrix-chart/index.d.ts +5 -0
- package/dist/components/matrix-chart/index.js +1232 -0
- package/dist/components/matrix-chart/matrix-chart.css +50 -0
- package/dist/components/matrix-chart/matrix-chart.schema.d.ts +3 -0
- package/dist/components/matrix-chart/matrix-chart.schema.js +123 -0
- package/dist/components/matrix-chart/matrix-chart.svelte.d.ts +20 -0
- package/dist/components/matrix-chart/matrix-chart.types.d.ts +52 -0
- package/dist/components/matrix-chart/matrix-chart.variables.d.ts +2 -0
- package/dist/components/matrix-chart/matrix-chart.variables.js +61 -0
- package/dist/components/media-controls/index.d.ts +5 -0
- package/dist/components/media-controls/index.js +338 -0
- package/dist/components/media-controls/media-controls.css +112 -0
- package/dist/components/media-controls/media-controls.schema.d.ts +3 -0
- package/dist/components/media-controls/media-controls.schema.js +125 -0
- package/dist/components/media-controls/media-controls.svelte.d.ts +18 -0
- package/dist/components/media-controls/media-controls.types.d.ts +77 -0
- package/dist/components/media-controls/media-controls.variables.d.ts +2 -0
- package/dist/components/media-controls/media-controls.variables.js +61 -0
- package/dist/components/navigation-bar/navigation-bar.schema.js +5 -5
- package/dist/components/navigation-bar/navigation-bar.types.d.ts +2 -1
- package/dist/components/pricing-card/index.d.ts +5 -0
- package/dist/components/pricing-card/index.js +406 -0
- package/dist/components/pricing-card/pricing-card.css +173 -0
- package/dist/components/pricing-card/pricing-card.schema.d.ts +3 -0
- package/dist/components/pricing-card/pricing-card.schema.js +100 -0
- package/dist/components/pricing-card/pricing-card.svelte.d.ts +18 -0
- package/dist/components/pricing-card/pricing-card.types.d.ts +47 -0
- package/dist/components/pricing-card/pricing-card.variables.d.ts +2 -0
- package/dist/components/pricing-card/pricing-card.variables.js +61 -0
- package/dist/components/review-editor/index.js +212 -132
- package/dist/components/share-card/index.d.ts +5 -0
- package/dist/components/share-card/index.js +446 -0
- package/dist/components/share-card/share-card.css +115 -0
- package/dist/components/share-card/share-card.schema.d.ts +3 -0
- package/dist/components/share-card/share-card.schema.js +113 -0
- package/dist/components/share-card/share-card.svelte.d.ts +18 -0
- package/dist/components/share-card/share-card.types.d.ts +66 -0
- package/dist/components/share-card/share-card.variables.d.ts +2 -0
- package/dist/components/share-card/share-card.variables.js +61 -0
- package/dist/components/shortcut-hint/index.d.ts +5 -0
- package/dist/components/shortcut-hint/index.js +197 -0
- package/dist/components/shortcut-hint/shortcut-hint.css +26 -0
- package/dist/components/shortcut-hint/shortcut-hint.schema.d.ts +3 -0
- package/dist/components/shortcut-hint/shortcut-hint.schema.js +96 -0
- package/dist/components/shortcut-hint/shortcut-hint.svelte.d.ts +17 -0
- package/dist/components/shortcut-hint/shortcut-hint.types.d.ts +33 -0
- package/dist/components/shortcut-hint/shortcut-hint.variables.d.ts +2 -0
- package/dist/components/shortcut-hint/shortcut-hint.variables.js +61 -0
- package/dist/components/skip-link/index.d.ts +4 -0
- package/dist/components/skip-link/index.js +180 -0
- package/dist/components/skip-link/skip-link.schema.d.ts +3 -0
- package/dist/components/skip-link/skip-link.schema.js +76 -0
- package/dist/components/skip-link/skip-link.svelte.d.ts +19 -0
- package/dist/components/skip-link/skip-link.types.d.ts +38 -0
- package/dist/components/skip-link/skip-link.variables.d.ts +2 -0
- package/dist/components/skip-link/skip-link.variables.js +61 -0
- package/dist/components/spectrogram/index.d.ts +5 -0
- package/dist/components/spectrogram/index.js +1156 -0
- package/dist/components/spectrogram/spectrogram.css +43 -0
- package/dist/components/spectrogram/spectrogram.schema.d.ts +3 -0
- package/dist/components/spectrogram/spectrogram.schema.js +103 -0
- package/dist/components/spectrogram/spectrogram.svelte.d.ts +21 -0
- package/dist/components/spectrogram/spectrogram.types.d.ts +60 -0
- package/dist/components/spectrogram/spectrogram.variables.d.ts +2 -0
- package/dist/components/spectrogram/spectrogram.variables.js +61 -0
- package/dist/components/spectrum-chart/index.d.ts +5 -0
- package/dist/components/spectrum-chart/index.js +1056 -0
- package/dist/components/spectrum-chart/spectrum-chart.css +49 -0
- package/dist/components/spectrum-chart/spectrum-chart.schema.d.ts +3 -0
- package/dist/components/spectrum-chart/spectrum-chart.schema.js +97 -0
- package/dist/components/spectrum-chart/spectrum-chart.svelte.d.ts +21 -0
- package/dist/components/spectrum-chart/spectrum-chart.types.d.ts +41 -0
- package/dist/components/spectrum-chart/spectrum-chart.variables.d.ts +2 -0
- package/dist/components/spectrum-chart/spectrum-chart.variables.js +61 -0
- package/dist/components/status-dot/status-dot.css +8 -0
- package/dist/components/status-dot/status-dot.schema.js +3 -3
- package/dist/components/status-dot/status-dot.types.d.ts +5 -2
- package/dist/components/subscription-badge/index.d.ts +5 -0
- package/dist/components/subscription-badge/index.js +383 -0
- package/dist/components/subscription-badge/subscription-badge.css +18 -0
- package/dist/components/subscription-badge/subscription-badge.schema.d.ts +3 -0
- package/dist/components/subscription-badge/subscription-badge.schema.js +77 -0
- package/dist/components/subscription-badge/subscription-badge.svelte.d.ts +19 -0
- package/dist/components/subscription-badge/subscription-badge.types.d.ts +28 -0
- package/dist/components/subscription-badge/subscription-badge.variables.d.ts +2 -0
- package/dist/components/subscription-badge/subscription-badge.variables.js +61 -0
- package/dist/components/tab/index.js +14 -1
- package/dist/components/table/index.js +26 -17
- package/dist/components/table-cell/index.js +18 -9
- package/dist/components/table-cell/table-cell.schema.js +5 -1
- package/dist/components/table-cell/table-cell.types.d.ts +16 -1
- package/dist/components/tabs/index.js +14 -1
- package/dist/components/waveform/index.d.ts +5 -0
- package/dist/components/waveform/index.js +1075 -0
- package/dist/components/waveform/waveform.css +53 -0
- package/dist/components/waveform/waveform.schema.d.ts +3 -0
- package/dist/components/waveform/waveform.schema.js +98 -0
- package/dist/components/waveform/waveform.svelte.d.ts +20 -0
- package/dist/components/waveform/waveform.types.d.ts +42 -0
- package/dist/components/waveform/waveform.variables.d.ts +2 -0
- package/dist/components/waveform/waveform.variables.js +61 -0
- package/dist/index.d.ts +33 -2
- package/dist/index.js +144 -115
- package/dist/server/components/accordion/index.js +14 -1
- package/dist/server/components/alert/alert.schema.js +3 -3
- package/dist/server/components/alert/index.js +3 -2
- package/dist/server/components/alert-dialog/index.js +12 -3
- package/dist/server/components/area-chart/index.css +50 -3
- package/dist/server/components/area-chart/index.js +181 -2
- package/dist/server/components/avatar-group/index.css +1 -1
- package/dist/server/components/badge/badge.schema.js +6 -1
- package/dist/server/components/badge/index.css +4 -0
- package/dist/server/components/badge/index.js +3 -1
- package/dist/server/components/bar-chart/index.css +50 -3
- package/dist/server/components/bar-chart/index.js +166 -2
- package/dist/server/components/button/index.css +1 -1
- package/dist/server/components/button/index.js +12 -3
- package/dist/server/components/capability-gate/capability-gate.schema.js +110 -0
- package/dist/server/components/capability-gate/capability-gate.variables.js +43 -0
- package/dist/server/components/capability-gate/index.css +121 -0
- package/dist/server/components/capability-gate/index.js +168 -0
- package/dist/server/components/card/card.schema.js +5 -1
- package/dist/server/components/card/index.css +9 -1
- package/dist/server/components/card/index.js +3 -2
- package/dist/server/components/chat/index.css +2 -2
- package/dist/server/components/chat/index.js +78 -19
- package/dist/server/components/choice-grid/choice-grid.schema.js +103 -0
- package/dist/server/components/choice-grid/choice-grid.variables.js +43 -0
- package/dist/server/components/choice-grid/index.css +103 -0
- package/dist/server/components/choice-grid/index.js +383 -0
- package/dist/server/components/choice-grid-item/choice-grid-item.schema.js +75 -0
- package/dist/server/components/choice-grid-item/choice-grid-item.variables.js +43 -0
- package/dist/server/components/choice-grid-item/index.css +86 -0
- package/dist/server/components/choice-grid-item/index.js +139 -0
- package/dist/server/components/color-field/index.css +2 -4
- package/dist/server/components/color-picker/index.css +14 -10
- package/dist/server/components/color-swatch-picker/index.css +2 -4
- package/dist/server/components/confirm-dialog/index.js +12 -3
- package/dist/server/components/context-menu/index.js +72 -20
- package/dist/server/components/context-menu-trigger/index.js +6 -4
- package/dist/server/components/data-table/data-table.schema.js +85 -0
- package/dist/server/components/data-table/data-table.variables.js +43 -0
- package/dist/server/components/data-table/index.css +182 -0
- package/dist/server/components/data-table/index.js +469 -0
- package/dist/server/components/diff-viewer/index.js +14 -3
- package/dist/server/components/dropdown/index.js +67 -17
- package/dist/server/components/dropdown-item/dropdown-item.schema.js +13 -1
- package/dist/server/components/dropdown-item/index.js +67 -17
- package/dist/server/components/floating-action-button/index.css +1 -1
- package/dist/server/components/json-schema-editor/index.js +29 -4
- package/dist/server/components/keyboard-shortcuts/index.css +86 -0
- package/dist/server/components/keyboard-shortcuts/index.js +149 -0
- package/dist/server/components/keyboard-shortcuts/keyboard-shortcuts.schema.js +69 -0
- package/dist/server/components/keyboard-shortcuts/keyboard-shortcuts.variables.js +43 -0
- package/dist/server/components/line-chart/index.css +50 -3
- package/dist/server/components/line-chart/index.js +181 -2
- package/dist/server/components/markdown-editor/index.js +78 -19
- package/dist/server/components/matrix-chart/index.css +52 -0
- package/dist/server/components/matrix-chart/index.js +1026 -0
- package/dist/server/components/matrix-chart/matrix-chart.schema.js +105 -0
- package/dist/server/components/matrix-chart/matrix-chart.variables.js +43 -0
- package/dist/server/components/media-controls/index.css +109 -0
- package/dist/server/components/media-controls/index.js +192 -0
- package/dist/server/components/media-controls/media-controls.schema.js +107 -0
- package/dist/server/components/media-controls/media-controls.variables.js +43 -0
- package/dist/server/components/navigation-bar/navigation-bar.schema.js +5 -5
- package/dist/server/components/pricing-card/index.css +131 -0
- package/dist/server/components/pricing-card/index.js +258 -0
- package/dist/server/components/pricing-card/pricing-card.schema.js +82 -0
- package/dist/server/components/pricing-card/pricing-card.variables.js +43 -0
- package/dist/server/components/review-editor/index.css +2 -2
- package/dist/server/components/review-editor/index.js +80 -19
- package/dist/server/components/share-card/index.css +113 -0
- package/dist/server/components/share-card/index.js +270 -0
- package/dist/server/components/share-card/share-card.schema.js +95 -0
- package/dist/server/components/share-card/share-card.variables.js +43 -0
- package/dist/server/components/shortcut-hint/index.css +28 -0
- package/dist/server/components/shortcut-hint/index.js +134 -0
- package/dist/server/components/shortcut-hint/shortcut-hint.schema.js +78 -0
- package/dist/server/components/shortcut-hint/shortcut-hint.variables.js +43 -0
- package/dist/server/components/skip-link/index.js +141 -0
- package/dist/server/components/skip-link/skip-link.schema.js +58 -0
- package/dist/server/components/skip-link/skip-link.variables.js +43 -0
- package/dist/server/components/spectrogram/index.css +45 -0
- package/dist/server/components/spectrogram/index.js +970 -0
- package/dist/server/components/spectrogram/spectrogram.schema.js +85 -0
- package/dist/server/components/spectrogram/spectrogram.variables.js +43 -0
- package/dist/server/components/spectrum-chart/index.css +51 -0
- package/dist/server/components/spectrum-chart/index.js +871 -0
- package/dist/server/components/spectrum-chart/spectrum-chart.schema.js +79 -0
- package/dist/server/components/spectrum-chart/spectrum-chart.variables.js +43 -0
- package/dist/server/components/status-dot/index.css +8 -0
- package/dist/server/components/status-dot/status-dot.schema.js +3 -3
- package/dist/server/components/subscription-badge/index.css +2 -0
- package/dist/server/components/subscription-badge/index.js +339 -0
- package/dist/server/components/subscription-badge/subscription-badge.schema.js +59 -0
- package/dist/server/components/subscription-badge/subscription-badge.variables.js +43 -0
- package/dist/server/components/tab/index.js +14 -1
- package/dist/server/components/table/index.js +13 -8
- package/dist/server/components/table-cell/index.js +13 -8
- package/dist/server/components/table-cell/table-cell.schema.js +5 -1
- package/dist/server/components/tabs/index.js +14 -1
- package/dist/server/components/waveform/index.css +55 -0
- package/dist/server/components/waveform/index.js +907 -0
- package/dist/server/components/waveform/waveform.schema.js +80 -0
- package/dist/server/components/waveform/waveform.variables.js +43 -0
- package/dist/server/index.css +1137 -55
- package/dist/server/index.js +4225 -1750
- package/package.json +380 -2
- package/src/_internal/chart/chart-focus-ring.ts +209 -0
- package/src/_internal/chart/chart-utilities.ts +4 -0
- package/src/_internal/chart/heatmap-utilities.ts +159 -0
- package/src/components/accordion/accordion.examples.json +1 -0
- package/src/components/alert/README.md +5 -5
- package/src/components/alert/alert.schema.json +2 -2
- package/src/components/alert/alert.schema.ts +3 -2
- package/src/components/alert/alert.svelte +5 -1
- package/src/components/alert/alert.types.ts +3 -2
- package/src/components/area-chart/README.md +62 -0
- package/src/components/area-chart/area-chart.css +57 -7
- package/src/components/area-chart/area-chart.svelte +128 -10
- package/src/components/avatar-group/avatar-group.css +2 -3
- package/src/components/avatar-group/avatar-group.examples.json +1 -0
- package/src/components/backdrop/README.md +56 -0
- package/src/components/badge/README.md +6 -5
- package/src/components/badge/badge.css +17 -0
- package/src/components/badge/badge.schema.json +5 -0
- package/src/components/badge/badge.schema.ts +6 -0
- package/src/components/badge/badge.svelte +2 -0
- package/src/components/badge/badge.types.ts +7 -0
- package/src/components/bar-chart/README.md +65 -0
- package/src/components/bar-chart/bar-chart.css +57 -7
- package/src/components/bar-chart/bar-chart.svelte +94 -13
- package/src/components/button/button.css +5 -3
- package/src/components/button/button.examples.json +1 -0
- package/src/components/button/button.svelte +15 -0
- package/src/components/capability-gate/README.md +60 -0
- package/src/components/capability-gate/capability-gate.css +131 -0
- package/src/components/capability-gate/capability-gate.examples.json +19 -0
- package/src/components/capability-gate/capability-gate.schema.json +68 -0
- package/src/components/capability-gate/capability-gate.schema.ts +72 -0
- package/src/components/capability-gate/capability-gate.svelte +186 -0
- package/src/components/capability-gate/capability-gate.types.ts +83 -0
- package/src/components/capability-gate/capability-gate.variables.json +1 -0
- package/src/components/capability-gate/capability-gate.variables.ts +3 -0
- package/src/components/capability-gate/index.ts +10 -0
- package/src/components/card/README.md +1 -0
- package/src/components/card/card.css +4 -0
- package/src/components/card/card.examples.json +6 -0
- package/src/components/card/card.schema.json +4 -0
- package/src/components/card/card.schema.ts +5 -0
- package/src/components/card/card.svelte +9 -2
- package/src/components/card/card.types.ts +4 -0
- package/src/components/card/index.ts +1 -1
- package/src/components/chat/README.md +81 -0
- package/src/components/chat/container/chat-jump-controls.svelte +12 -9
- package/src/components/chat/input/chat-input.svelte +7 -8
- package/src/components/chat/message/chat-message.svelte +15 -20
- package/src/components/chat/message/tool-call-group.svelte +10 -4
- package/src/components/choice-grid/README.md +66 -0
- package/src/components/choice-grid/choice-grid-context.ts +30 -0
- package/src/components/choice-grid/choice-grid.css +27 -0
- package/src/components/choice-grid/choice-grid.examples.json +31 -0
- package/src/components/choice-grid/choice-grid.schema.json +61 -0
- package/src/components/choice-grid/choice-grid.schema.ts +70 -0
- package/src/components/choice-grid/choice-grid.svelte +272 -0
- package/src/components/choice-grid/choice-grid.types.ts +152 -0
- package/src/components/choice-grid/choice-grid.variables.json +1 -0
- package/src/components/choice-grid/choice-grid.variables.ts +3 -0
- package/src/components/choice-grid/index.ts +22 -0
- package/src/components/choice-grid-item/README.md +41 -0
- package/src/components/choice-grid-item/choice-grid-item.css +139 -0
- package/src/components/choice-grid-item/choice-grid-item.schema.json +32 -0
- package/src/components/choice-grid-item/choice-grid-item.schema.ts +38 -0
- package/src/components/choice-grid-item/choice-grid-item.svelte +139 -0
- package/src/components/choice-grid-item/choice-grid-item.types.ts +30 -0
- package/src/components/choice-grid-item/choice-grid-item.variables.json +1 -0
- package/src/components/choice-grid-item/choice-grid-item.variables.ts +3 -0
- package/src/components/choice-grid-item/index.ts +6 -0
- package/src/components/click-away-listener/README.md +50 -0
- package/src/components/color-field/color-field.css +6 -9
- package/src/components/color-picker/color-picker.css +31 -24
- package/src/components/color-swatch-picker/color-swatch-picker.css +6 -9
- package/src/components/command-menu/README.md +61 -0
- package/src/components/confirm-dialog/confirm-dialog.examples.json +6 -0
- package/src/components/context-menu/README.md +55 -0
- package/src/components/context-menu-trigger/README.md +50 -0
- package/src/components/context-menu-trigger/context-menu-trigger.svelte +5 -3
- package/src/components/data-table/README.md +67 -0
- package/src/components/data-table/data-table.css +30 -0
- package/src/components/data-table/data-table.examples.json +19 -0
- package/src/components/data-table/data-table.schema.json +43 -0
- package/src/components/data-table/data-table.schema.ts +50 -0
- package/src/components/data-table/data-table.svelte +106 -0
- package/src/components/data-table/data-table.types.ts +89 -0
- package/src/components/data-table/data-table.variables.json +1 -0
- package/src/components/data-table/data-table.variables.ts +3 -0
- package/src/components/data-table/index.ts +6 -0
- package/src/components/diff-viewer/README.md +59 -0
- package/src/components/diff-viewer/front-matter-header.svelte +20 -4
- package/src/components/dropdown-group/README.md +52 -0
- package/src/components/dropdown-item/README.md +10 -7
- package/src/components/dropdown-item/dropdown-item.schema.json +12 -0
- package/src/components/dropdown-item/dropdown-item.schema.ts +14 -0
- package/src/components/dropdown-item/dropdown-item.svelte +108 -25
- package/src/components/dropdown-item/dropdown-item.types.ts +58 -2
- package/src/components/dropdown-item/index.ts +6 -1
- package/src/components/floating-action-button/README.md +53 -0
- package/src/components/floating-action-button/floating-action-button.css +4 -2
- package/src/components/form-section/form-section.examples.json +6 -0
- package/src/components/hover-card/README.md +60 -0
- package/src/components/json-schema-editor/README.md +59 -0
- package/src/components/kanban-board/README.md +62 -0
- package/src/components/keyboard-shortcuts/README.md +51 -0
- package/src/components/keyboard-shortcuts/index.ts +10 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.css +84 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.examples.json +13 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.schema.json +27 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.schema.ts +31 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.svelte +91 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.types.ts +46 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.variables.json +1 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.variables.ts +3 -0
- package/src/components/line-chart/README.md +61 -0
- package/src/components/line-chart/line-chart.css +57 -8
- package/src/components/line-chart/line-chart.svelte +128 -10
- package/src/components/link/README.md +55 -0
- package/src/components/markdown-editor/README.md +70 -0
- package/src/components/markdown-editor/editor-toolbar/toolbar-button.svelte +9 -4
- package/src/components/markdown-editor/editor-toolbar/toolbar-dropdown.svelte +9 -4
- package/src/components/markdown-editor/prosemirror.css +4 -2
- package/src/components/matrix-chart/README.md +61 -0
- package/src/components/matrix-chart/index.ts +10 -0
- package/src/components/matrix-chart/matrix-chart.css +50 -0
- package/src/components/matrix-chart/matrix-chart.examples.json +19 -0
- package/src/components/matrix-chart/matrix-chart.schema.json +63 -0
- package/src/components/matrix-chart/matrix-chart.schema.ts +67 -0
- package/src/components/matrix-chart/matrix-chart.svelte +336 -0
- package/src/components/matrix-chart/matrix-chart.types.ts +56 -0
- package/src/components/matrix-chart/matrix-chart.variables.json +1 -0
- package/src/components/matrix-chart/matrix-chart.variables.ts +3 -0
- package/src/components/media-controls/README.md +60 -0
- package/src/components/media-controls/index.ts +6 -0
- package/src/components/media-controls/media-controls.css +112 -0
- package/src/components/media-controls/media-controls.examples.json +19 -0
- package/src/components/media-controls/media-controls.schema.json +65 -0
- package/src/components/media-controls/media-controls.schema.ts +69 -0
- package/src/components/media-controls/media-controls.svelte +238 -0
- package/src/components/media-controls/media-controls.types.ts +80 -0
- package/src/components/media-controls/media-controls.variables.json +1 -0
- package/src/components/media-controls/media-controls.variables.ts +3 -0
- package/src/components/menu-bar/README.md +53 -0
- package/src/components/navigation-bar/README.md +1 -1
- package/src/components/navigation-bar/navigation-bar.schema.json +4 -4
- package/src/components/navigation-bar/navigation-bar.schema.ts +4 -4
- package/src/components/navigation-bar/navigation-bar.types.ts +2 -1
- package/src/components/pricing-card/README.md +55 -0
- package/src/components/pricing-card/index.ts +6 -0
- package/src/components/pricing-card/pricing-card.css +173 -0
- package/src/components/pricing-card/pricing-card.examples.json +19 -0
- package/src/components/pricing-card/pricing-card.schema.json +40 -0
- package/src/components/pricing-card/pricing-card.schema.ts +44 -0
- package/src/components/pricing-card/pricing-card.svelte +70 -0
- package/src/components/pricing-card/pricing-card.types.ts +49 -0
- package/src/components/pricing-card/pricing-card.variables.json +1 -0
- package/src/components/pricing-card/pricing-card.variables.ts +3 -0
- package/src/components/review-editor/README.md +64 -0
- package/src/components/review-editor/comment-composer.svelte +8 -8
- package/src/components/review-editor/comment-list.svelte +10 -1
- package/src/components/search-field/search-field.examples.json +13 -0
- package/src/components/segment/README.md +55 -0
- package/src/components/share-card/README.md +58 -0
- package/src/components/share-card/index.ts +6 -0
- package/src/components/share-card/share-card.css +115 -0
- package/src/components/share-card/share-card.examples.json +19 -0
- package/src/components/share-card/share-card.schema.json +53 -0
- package/src/components/share-card/share-card.schema.ts +57 -0
- package/src/components/share-card/share-card.svelte +330 -0
- package/src/components/share-card/share-card.types.ts +69 -0
- package/src/components/share-card/share-card.variables.json +1 -0
- package/src/components/share-card/share-card.variables.ts +3 -0
- package/src/components/shortcut-hint/README.md +52 -0
- package/src/components/shortcut-hint/index.ts +6 -0
- package/src/components/shortcut-hint/shortcut-hint.css +26 -0
- package/src/components/shortcut-hint/shortcut-hint.examples.json +13 -0
- package/src/components/shortcut-hint/shortcut-hint.schema.json +36 -0
- package/src/components/shortcut-hint/shortcut-hint.schema.ts +40 -0
- package/src/components/shortcut-hint/shortcut-hint.svelte +62 -0
- package/src/components/shortcut-hint/shortcut-hint.types.ts +35 -0
- package/src/components/shortcut-hint/shortcut-hint.variables.json +1 -0
- package/src/components/shortcut-hint/shortcut-hint.variables.ts +3 -0
- package/src/components/side-navigation/side-navigation.examples.json +6 -0
- package/src/components/skip-link/README.md +50 -0
- package/src/components/skip-link/index.ts +5 -0
- package/src/components/skip-link/skip-link.examples.json +13 -0
- package/src/components/skip-link/skip-link.schema.json +16 -0
- package/src/components/skip-link/skip-link.schema.ts +20 -0
- package/src/components/skip-link/skip-link.svelte +86 -0
- package/src/components/skip-link/skip-link.types.ts +40 -0
- package/src/components/skip-link/skip-link.variables.json +1 -0
- package/src/components/skip-link/skip-link.variables.ts +3 -0
- package/src/components/spectrogram/README.md +58 -0
- package/src/components/spectrogram/index.ts +10 -0
- package/src/components/spectrogram/spectrogram.css +43 -0
- package/src/components/spectrogram/spectrogram.examples.json +13 -0
- package/src/components/spectrogram/spectrogram.schema.json +43 -0
- package/src/components/spectrogram/spectrogram.schema.ts +47 -0
- package/src/components/spectrogram/spectrogram.svelte +284 -0
- package/src/components/spectrogram/spectrogram.types.ts +63 -0
- package/src/components/spectrogram/spectrogram.variables.json +1 -0
- package/src/components/spectrogram/spectrogram.variables.ts +3 -0
- package/src/components/spectrum-chart/README.md +57 -0
- package/src/components/spectrum-chart/index.ts +10 -0
- package/src/components/spectrum-chart/spectrum-chart.css +49 -0
- package/src/components/spectrum-chart/spectrum-chart.examples.json +13 -0
- package/src/components/spectrum-chart/spectrum-chart.schema.json +37 -0
- package/src/components/spectrum-chart/spectrum-chart.schema.ts +41 -0
- package/src/components/spectrum-chart/spectrum-chart.svelte +247 -0
- package/src/components/spectrum-chart/spectrum-chart.types.ts +44 -0
- package/src/components/spectrum-chart/spectrum-chart.variables.json +1 -0
- package/src/components/spectrum-chart/spectrum-chart.variables.ts +3 -0
- package/src/components/status-dot/README.md +7 -7
- package/src/components/status-dot/status-dot.css +8 -0
- package/src/components/status-dot/status-dot.schema.json +2 -2
- package/src/components/status-dot/status-dot.schema.ts +3 -2
- package/src/components/status-dot/status-dot.types.ts +13 -2
- package/src/components/subscription-badge/README.md +50 -0
- package/src/components/subscription-badge/index.ts +6 -0
- package/src/components/subscription-badge/subscription-badge.css +18 -0
- package/src/components/subscription-badge/subscription-badge.examples.json +19 -0
- package/src/components/subscription-badge/subscription-badge.schema.json +16 -0
- package/src/components/subscription-badge/subscription-badge.schema.ts +21 -0
- package/src/components/subscription-badge/subscription-badge.svelte +69 -0
- package/src/components/subscription-badge/subscription-badge.types.ts +37 -0
- package/src/components/subscription-badge/subscription-badge.variables.json +1 -0
- package/src/components/subscription-badge/subscription-badge.variables.ts +3 -0
- package/src/components/table-cell/README.md +6 -5
- package/src/components/table-cell/table-cell.schema.json +4 -0
- package/src/components/table-cell/table-cell.schema.ts +5 -0
- package/src/components/table-cell/table-cell.svelte +9 -3
- package/src/components/table-cell/table-cell.types.ts +16 -1
- package/src/components/tag-input/README.md +75 -0
- package/src/components/typography/README.md +51 -0
- package/src/components/waveform/README.md +57 -0
- package/src/components/waveform/index.ts +6 -0
- package/src/components/waveform/waveform.css +53 -0
- package/src/components/waveform/waveform.examples.json +19 -0
- package/src/components/waveform/waveform.schema.json +38 -0
- package/src/components/waveform/waveform.schema.ts +42 -0
- package/src/components/waveform/waveform.svelte +286 -0
- package/src/components/waveform/waveform.types.ts +45 -0
- package/src/components/waveform/waveform.variables.json +1 -0
- package/src/components/waveform/waveform.variables.ts +3 -0
- package/src/index.ts +85 -2
- package/src/styles/components.css +13 -0
- package/src/styles/shell.css +3 -0
- package/src/styles/tokens-base.css +59 -22
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
/**
|
|
3
|
+
* @cinder
|
|
4
|
+
* @category typography
|
|
5
|
+
* @status alpha
|
|
6
|
+
* @purpose Grouped keyboard-shortcut reference that renders key combos via Kbd with accessible labels not reliant only on visual keycaps.
|
|
7
|
+
* @tag shortcut
|
|
8
|
+
* @tag keyboard
|
|
9
|
+
* @useWhen Displaying a reference panel of keyboard shortcuts grouped by feature area.
|
|
10
|
+
* @useWhen Embedding a shortcut table inside a modal, sheet, popover, or help page.
|
|
11
|
+
* @avoidWhen Showing a single inline shortcut hint — use shortcut-hint instead.
|
|
12
|
+
* @related kbd, shortcut-hint, modal, sheet, popover
|
|
13
|
+
*/
|
|
14
|
+
export type {
|
|
15
|
+
KeyboardShortcutEntry,
|
|
16
|
+
KeyboardShortcutGroup,
|
|
17
|
+
KeyboardShortcutsProps,
|
|
18
|
+
} from './keyboard-shortcuts.types.ts';
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script lang="ts">
|
|
22
|
+
import { classNames } from '../../utilities/class-names.ts';
|
|
23
|
+
import Kbd from '../kbd/kbd.svelte';
|
|
24
|
+
import type { KeyboardShortcutsProps } from './keyboard-shortcuts.types.ts';
|
|
25
|
+
|
|
26
|
+
let {
|
|
27
|
+
groups,
|
|
28
|
+
heading,
|
|
29
|
+
children,
|
|
30
|
+
class: customClassName,
|
|
31
|
+
...rest
|
|
32
|
+
}: KeyboardShortcutsProps = $props();
|
|
33
|
+
|
|
34
|
+
// A stable, unique, SSR-safe id base. Group heading ids are derived from this
|
|
35
|
+
// plus the group's INDEX — never from group.label, which can repeat (duplicate
|
|
36
|
+
// ids break aria-labelledby).
|
|
37
|
+
const baseId = $props.id();
|
|
38
|
+
const groupHeadingId = (index: number) => `${baseId}-group-${index}`;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Build a screen-reader–friendly label for a key combo.
|
|
42
|
+
* Falls back to joining keys with " plus " when no keysLabel is provided.
|
|
43
|
+
*/
|
|
44
|
+
function resolveKeysLabel(keys: string[], keysLabel?: string): string {
|
|
45
|
+
if (keysLabel) return keysLabel;
|
|
46
|
+
return keys.join(' plus ');
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<div {...rest} class={classNames('cinder-keyboard-shortcuts', customClassName)}>
|
|
51
|
+
{#if heading}
|
|
52
|
+
<h2 class="cinder-keyboard-shortcuts__heading">{heading}</h2>
|
|
53
|
+
{/if}
|
|
54
|
+
|
|
55
|
+
{#if children}
|
|
56
|
+
<div class="cinder-keyboard-shortcuts__intro">
|
|
57
|
+
{@render children()}
|
|
58
|
+
</div>
|
|
59
|
+
{/if}
|
|
60
|
+
|
|
61
|
+
{#each groups as group, groupIndex (groupIndex)}
|
|
62
|
+
<section class="cinder-keyboard-shortcuts__group" aria-labelledby={groupHeadingId(groupIndex)}>
|
|
63
|
+
<h3 id={groupHeadingId(groupIndex)} class="cinder-keyboard-shortcuts__group-label">
|
|
64
|
+
{group.label}
|
|
65
|
+
</h3>
|
|
66
|
+
|
|
67
|
+
<dl class="cinder-keyboard-shortcuts__list">
|
|
68
|
+
{#each group.shortcuts as shortcut, shortcutIndex (shortcutIndex)}
|
|
69
|
+
<div class="cinder-keyboard-shortcuts__row">
|
|
70
|
+
<dt class="cinder-keyboard-shortcuts__action">{shortcut.action}</dt>
|
|
71
|
+
<dd class="cinder-keyboard-shortcuts__keys">
|
|
72
|
+
<!-- Screen-reader label for the whole key combo. -->
|
|
73
|
+
<span class="cinder-sr-only"
|
|
74
|
+
>{resolveKeysLabel(shortcut.keys, shortcut.keysLabel)}</span
|
|
75
|
+
>
|
|
76
|
+
<!-- Visual presentation via Kbd. aria-hidden so the sr-only span is the announced text. -->
|
|
77
|
+
<span aria-hidden="true" class="cinder-keyboard-shortcuts__keys-visual">
|
|
78
|
+
{#each shortcut.keys as key, index (key + index)}
|
|
79
|
+
<Kbd label={key} size="sm" />
|
|
80
|
+
{#if index < shortcut.keys.length - 1}
|
|
81
|
+
<span class="cinder-keyboard-shortcuts__separator">+</span>
|
|
82
|
+
{/if}
|
|
83
|
+
{/each}
|
|
84
|
+
</span>
|
|
85
|
+
</dd>
|
|
86
|
+
</div>
|
|
87
|
+
{/each}
|
|
88
|
+
</dl>
|
|
89
|
+
</section>
|
|
90
|
+
{/each}
|
|
91
|
+
</div>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
|
|
4
|
+
/** A single keyboard shortcut entry. */
|
|
5
|
+
export type KeyboardShortcutEntry = {
|
|
6
|
+
/** Human-readable action description (e.g. "Save document"). */
|
|
7
|
+
action: string;
|
|
8
|
+
/** The key sequence, rendered via Kbd (e.g. ["Ctrl", "S"] or ["Space"]). */
|
|
9
|
+
keys: string[];
|
|
10
|
+
/** Optional accessible label for the key combo, e.g. "Control plus S". Defaults to joining keys with plus. */
|
|
11
|
+
keysLabel?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** A group of related shortcuts under a heading. */
|
|
15
|
+
export type KeyboardShortcutGroup = {
|
|
16
|
+
/** Group heading label. */
|
|
17
|
+
label: string;
|
|
18
|
+
/** Shortcuts in this group. */
|
|
19
|
+
shortcuts: KeyboardShortcutEntry[];
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** Props for the KeyboardShortcuts component. */
|
|
23
|
+
export type KeyboardShortcutsProps = Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'children'> & {
|
|
24
|
+
/** Groups of shortcuts to display. */
|
|
25
|
+
groups: KeyboardShortcutGroup[];
|
|
26
|
+
/** Optional heading for the entire shortcuts panel. */
|
|
27
|
+
heading?: string;
|
|
28
|
+
/** Snippet rendered above all groups. */
|
|
29
|
+
children?: Snippet;
|
|
30
|
+
/** Additional class names merged with `.cinder-keyboard-shortcuts`. */
|
|
31
|
+
class?: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Cinder-specific props for KeyboardShortcuts, used by the schema generator.
|
|
36
|
+
*/
|
|
37
|
+
export interface KeyboardShortcutsSchemaProps {
|
|
38
|
+
/** Groups of shortcuts to display. */
|
|
39
|
+
groups: KeyboardShortcutGroup[];
|
|
40
|
+
/** Optional heading for the entire shortcuts panel. */
|
|
41
|
+
heading?: string;
|
|
42
|
+
/** Additional class names merged with `.cinder-keyboard-shortcuts`. */
|
|
43
|
+
class?: string;
|
|
44
|
+
/** Intro content rendered above the groups. */
|
|
45
|
+
children?: Snippet;
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# LineChart
|
|
2
|
+
|
|
3
|
+
Responsive SVG line chart for comparing one or more numeric series over an ordered x domain.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```svelte
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { LineChart } from '@lostgradient/cinder/line-chart';
|
|
10
|
+
</script>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Guidance
|
|
14
|
+
|
|
15
|
+
### Use When
|
|
16
|
+
|
|
17
|
+
- Showing trends over time or another ordered domain.
|
|
18
|
+
- Comparing several metric series on the same numeric axis.
|
|
19
|
+
|
|
20
|
+
### Avoid When
|
|
21
|
+
|
|
22
|
+
- Comparing discrete category totals — use bar-chart instead.
|
|
23
|
+
- Showing cumulative filled trends — use area-chart instead.
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
<!-- generated:props:start -->
|
|
28
|
+
|
|
29
|
+
| Prop | Type | Required | Default | Description |
|
|
30
|
+
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -------- | ------- | ----------- |
|
|
31
|
+
| `class` | `string` | no | — | |
|
|
32
|
+
| `dataTableCaption` | `string` | no | — | |
|
|
33
|
+
| `dataTableVisibility` | `"screen-reader-only"` \| `"visible"` \| `"hidden"` | no | — | |
|
|
34
|
+
| `description` | `string` | no | — | |
|
|
35
|
+
| `height` | `number` | no | — | |
|
|
36
|
+
| `hiddenSeriesIds` | `string`[] | no | — | |
|
|
37
|
+
| `label` | `string` | yes | — | |
|
|
38
|
+
| `legendPosition` | `"top"` \| `"bottom"` \| `"none"` | no | — | |
|
|
39
|
+
| `loading` | `boolean` | no | — | |
|
|
40
|
+
| `maximumInteractivePoints` | `number` | no | — | |
|
|
41
|
+
| `series` | ({ color?: `string`; data: ({ x: `string` \| `number`; y?: `number` \| `null` })[]; id: `string`; label: `string` })[] | yes | — | |
|
|
42
|
+
| `xAxis` | { label?: `string`; tickCount?: `number` } | no | — | |
|
|
43
|
+
| `yAxis` | { label?: `string`; tickCount?: `number` } | no | — | |
|
|
44
|
+
|
|
45
|
+
<!-- generated:props:end -->
|
|
46
|
+
|
|
47
|
+
## CSS Variables
|
|
48
|
+
|
|
49
|
+
<!-- generated:variables:start -->
|
|
50
|
+
|
|
51
|
+
This component does not declare any local CSS variables.
|
|
52
|
+
|
|
53
|
+
<!-- generated:variables:end -->
|
|
54
|
+
|
|
55
|
+
## Subcomponents
|
|
56
|
+
|
|
57
|
+
<!-- generated:subcomponents:start -->
|
|
58
|
+
|
|
59
|
+
None.
|
|
60
|
+
|
|
61
|
+
<!-- generated:subcomponents:end -->
|
|
@@ -81,15 +81,64 @@
|
|
|
81
81
|
pointer-events: none;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
.cinder-line-chart__focus-target:focus-visible:not([data-cinder-focus-ring-active='true']) {
|
|
85
|
+
fill: transparent;
|
|
86
|
+
stroke: var(--cinder-ring-color);
|
|
87
|
+
stroke-width: var(--cinder-ring-width);
|
|
88
|
+
vector-effect: non-scaling-stroke;
|
|
89
|
+
filter: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.cinder-line-chart__focus-ring-layer {
|
|
93
|
+
pointer-events: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.cinder-line-chart__focus-ring,
|
|
97
|
+
.cinder-line-chart__focus-ring-halo,
|
|
98
|
+
.cinder-line-chart__focus-ring-connector,
|
|
99
|
+
.cinder-line-chart__focus-ring-dot {
|
|
100
|
+
fill: none;
|
|
101
|
+
pointer-events: none;
|
|
102
|
+
vector-effect: non-scaling-stroke;
|
|
103
|
+
stroke-linecap: round;
|
|
104
|
+
stroke-linejoin: round;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.cinder-line-chart__focus-ring {
|
|
108
|
+
stroke: var(--cinder-ring-color);
|
|
91
109
|
stroke-width: var(--cinder-ring-width);
|
|
92
|
-
filter:
|
|
110
|
+
filter: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.cinder-line-chart__focus-ring-halo {
|
|
114
|
+
stroke: var(--cinder-ring-offset-color);
|
|
115
|
+
stroke-width: calc(
|
|
116
|
+
var(--cinder-ring-width) + var(--cinder-ring-offset) + var(--cinder-ring-offset)
|
|
117
|
+
);
|
|
118
|
+
filter: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@media (forced-colors: active) {
|
|
122
|
+
.cinder-line-chart__focus-ring-halo {
|
|
123
|
+
display: none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.cinder-line-chart__focus-ring,
|
|
127
|
+
.cinder-line-chart__focus-ring-connector,
|
|
128
|
+
.cinder-line-chart__focus-ring-dot {
|
|
129
|
+
fill: none;
|
|
130
|
+
stroke: ButtonText;
|
|
131
|
+
stroke-width: var(--cinder-ring-width);
|
|
132
|
+
filter: none;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.cinder-line-chart__focus-target:focus-visible:not([data-cinder-focus-ring-active='true']) {
|
|
136
|
+
fill: transparent;
|
|
137
|
+
stroke: ButtonText;
|
|
138
|
+
stroke-width: var(--cinder-ring-width);
|
|
139
|
+
vector-effect: non-scaling-stroke;
|
|
140
|
+
filter: none;
|
|
141
|
+
}
|
|
93
142
|
}
|
|
94
143
|
|
|
95
144
|
.cinder-line-chart__tick-label {
|
|
@@ -24,7 +24,12 @@
|
|
|
24
24
|
dataTableClass,
|
|
25
25
|
formatNumericValue,
|
|
26
26
|
legendVisible,
|
|
27
|
+
type ChartTarget,
|
|
27
28
|
} from '../../_internal/chart/chart-utilities.ts';
|
|
29
|
+
import {
|
|
30
|
+
DEFAULT_CHART_FOCUS_RING_STROKE_PADDING,
|
|
31
|
+
createPointFocusRingGeometry,
|
|
32
|
+
} from '../../_internal/chart/chart-focus-ring.ts';
|
|
28
33
|
import { ChartInteraction } from '../../_internal/chart/chart-interaction.svelte.ts';
|
|
29
34
|
import { classNames } from '../../utilities/class-names.ts';
|
|
30
35
|
import type { LineChartProps } from './line-chart.types.ts';
|
|
@@ -84,6 +89,28 @@
|
|
|
84
89
|
? `${rootId}-table-guidance`
|
|
85
90
|
: undefined,
|
|
86
91
|
);
|
|
92
|
+
const focusedTarget = $derived.by(() => {
|
|
93
|
+
const currentTarget = interaction.focusedTarget;
|
|
94
|
+
if (!currentTarget) return undefined;
|
|
95
|
+
return model.targets.find((target) => target.id === currentTarget.id);
|
|
96
|
+
});
|
|
97
|
+
let keyboardFocusModality = $state(false);
|
|
98
|
+
let focusVisibleTargetId = $state<string>();
|
|
99
|
+
const focusRingTarget = $derived(
|
|
100
|
+
keyboardFocusModality && focusedTarget && focusVisibleTargetId === focusedTarget.id
|
|
101
|
+
? focusedTarget
|
|
102
|
+
: undefined,
|
|
103
|
+
);
|
|
104
|
+
const pointFocusRing = $derived(
|
|
105
|
+
focusRingTarget
|
|
106
|
+
? createPointFocusRingGeometry({
|
|
107
|
+
target: focusRingTarget,
|
|
108
|
+
plotWidth: model.geometry.plotWidth,
|
|
109
|
+
plotHeight: model.geometry.plotHeight,
|
|
110
|
+
strokePadding: DEFAULT_CHART_FOCUS_RING_STROKE_PADDING,
|
|
111
|
+
})
|
|
112
|
+
: null,
|
|
113
|
+
);
|
|
87
114
|
|
|
88
115
|
$effect(() => {
|
|
89
116
|
assertValidNonNegativeInteger(
|
|
@@ -97,8 +124,44 @@
|
|
|
97
124
|
$effect(() => {
|
|
98
125
|
interaction.clearStaleTargets(loading, model.empty, model.targets);
|
|
99
126
|
});
|
|
127
|
+
|
|
128
|
+
function rememberKeyboardFocusModality(event: KeyboardEvent): void {
|
|
129
|
+
if (
|
|
130
|
+
event.key === 'Tab' ||
|
|
131
|
+
event.key === 'Home' ||
|
|
132
|
+
event.key === 'End' ||
|
|
133
|
+
event.key.startsWith('Arrow')
|
|
134
|
+
) {
|
|
135
|
+
keyboardFocusModality = true;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function clearKeyboardFocusModality(): void {
|
|
140
|
+
keyboardFocusModality = false;
|
|
141
|
+
focusVisibleTargetId = undefined;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function handleTargetFocus(target: ChartTarget): void {
|
|
145
|
+
interaction.focusedTarget = target;
|
|
146
|
+
focusVisibleTargetId = keyboardFocusModality ? target.id : undefined;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function handleTargetBlur(): void {
|
|
150
|
+
interaction.focusedTarget = undefined;
|
|
151
|
+
focusVisibleTargetId = undefined;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function handleTargetKeydown(event: KeyboardEvent): void {
|
|
155
|
+
rememberKeyboardFocusModality(event);
|
|
156
|
+
interaction.activateByKeyboard(event, rootElement!, model.targets, keyboardEnabled);
|
|
157
|
+
}
|
|
100
158
|
</script>
|
|
101
159
|
|
|
160
|
+
<svelte:window
|
|
161
|
+
onkeydown={rememberKeyboardFocusModality}
|
|
162
|
+
onpointerdown={clearKeyboardFocusModality}
|
|
163
|
+
/>
|
|
164
|
+
|
|
102
165
|
<figure
|
|
103
166
|
{...rest}
|
|
104
167
|
bind:this={rootElement}
|
|
@@ -148,7 +211,7 @@
|
|
|
148
211
|
<title id="{rootId}-svg-title">{label}</title>
|
|
149
212
|
{/if}
|
|
150
213
|
<g transform={`translate(${model.geometry.marginLeft}, ${model.geometry.marginTop})`}>
|
|
151
|
-
{#each model.yTicks as tick, index}
|
|
214
|
+
{#each model.yTicks as tick, index (tick)}
|
|
152
215
|
{@const tickY =
|
|
153
216
|
model.geometry.plotHeight -
|
|
154
217
|
((tick - model.yDomain[0]) / (model.yDomain[1] - model.yDomain[0])) *
|
|
@@ -233,23 +296,78 @@
|
|
|
233
296
|
tabindex="0"
|
|
234
297
|
role="button"
|
|
235
298
|
data-cinder-target-id={target.id}
|
|
299
|
+
data-cinder-series-id={target.seriesId}
|
|
300
|
+
data-cinder-focus-ring-active={pointFocusRing && focusRingTarget?.id === target.id
|
|
301
|
+
? 'true'
|
|
302
|
+
: undefined}
|
|
236
303
|
aria-label={`${target.seriesLabel}, ${target.xLabel}, ${target.valueLabel}`}
|
|
237
304
|
aria-describedby={interaction.activeTarget?.id === target.id
|
|
238
305
|
? `${rootId}-tooltip`
|
|
239
306
|
: undefined}
|
|
240
|
-
onfocus={() => (
|
|
241
|
-
onblur={
|
|
242
|
-
onkeydown={
|
|
243
|
-
interaction.activateByKeyboard(
|
|
244
|
-
event,
|
|
245
|
-
rootElement!,
|
|
246
|
-
model.targets,
|
|
247
|
-
keyboardEnabled,
|
|
248
|
-
)}
|
|
307
|
+
onfocus={() => handleTargetFocus(target)}
|
|
308
|
+
onblur={handleTargetBlur}
|
|
309
|
+
onkeydown={handleTargetKeydown}
|
|
249
310
|
/>
|
|
250
311
|
{/each}
|
|
251
312
|
{/if}
|
|
252
313
|
{/if}
|
|
314
|
+
{#if pointFocusRing}
|
|
315
|
+
<g class="cinder-line-chart__focus-ring-layer" aria-hidden="true">
|
|
316
|
+
{#if pointFocusRing.kind === 'point'}
|
|
317
|
+
<circle
|
|
318
|
+
class="cinder-line-chart__focus-ring-halo"
|
|
319
|
+
cx={pointFocusRing.cx}
|
|
320
|
+
cy={pointFocusRing.cy}
|
|
321
|
+
r={pointFocusRing.radius}
|
|
322
|
+
/>
|
|
323
|
+
<circle
|
|
324
|
+
class="cinder-line-chart__focus-ring"
|
|
325
|
+
cx={pointFocusRing.cx}
|
|
326
|
+
cy={pointFocusRing.cy}
|
|
327
|
+
r={pointFocusRing.radius}
|
|
328
|
+
/>
|
|
329
|
+
{#if pointFocusRing.connector && pointFocusRing.dot}
|
|
330
|
+
<path
|
|
331
|
+
class="cinder-line-chart__focus-ring-connector cinder-line-chart__focus-ring-halo"
|
|
332
|
+
d={`M ${pointFocusRing.connector.x1} ${pointFocusRing.connector.y1} L ${pointFocusRing.connector.x2} ${pointFocusRing.connector.y2}`}
|
|
333
|
+
/>
|
|
334
|
+
<path
|
|
335
|
+
class="cinder-line-chart__focus-ring-connector cinder-line-chart__focus-ring"
|
|
336
|
+
d={`M ${pointFocusRing.connector.x1} ${pointFocusRing.connector.y1} L ${pointFocusRing.connector.x2} ${pointFocusRing.connector.y2}`}
|
|
337
|
+
/>
|
|
338
|
+
<circle
|
|
339
|
+
class="cinder-line-chart__focus-ring-dot cinder-line-chart__focus-ring-halo"
|
|
340
|
+
cx={pointFocusRing.dot.cx}
|
|
341
|
+
cy={pointFocusRing.dot.cy}
|
|
342
|
+
r={pointFocusRing.dot.radius}
|
|
343
|
+
/>
|
|
344
|
+
<circle
|
|
345
|
+
class="cinder-line-chart__focus-ring-dot cinder-line-chart__focus-ring"
|
|
346
|
+
cx={pointFocusRing.dot.cx}
|
|
347
|
+
cy={pointFocusRing.dot.cy}
|
|
348
|
+
r={pointFocusRing.dot.radius}
|
|
349
|
+
/>
|
|
350
|
+
{/if}
|
|
351
|
+
{:else}
|
|
352
|
+
<rect
|
|
353
|
+
class="cinder-line-chart__focus-ring-halo"
|
|
354
|
+
x={pointFocusRing.x}
|
|
355
|
+
y={pointFocusRing.y}
|
|
356
|
+
width={pointFocusRing.width}
|
|
357
|
+
height={pointFocusRing.height}
|
|
358
|
+
rx={pointFocusRing.radius}
|
|
359
|
+
/>
|
|
360
|
+
<rect
|
|
361
|
+
class="cinder-line-chart__focus-ring"
|
|
362
|
+
x={pointFocusRing.x}
|
|
363
|
+
y={pointFocusRing.y}
|
|
364
|
+
width={pointFocusRing.width}
|
|
365
|
+
height={pointFocusRing.height}
|
|
366
|
+
rx={pointFocusRing.radius}
|
|
367
|
+
/>
|
|
368
|
+
{/if}
|
|
369
|
+
</g>
|
|
370
|
+
{/if}
|
|
253
371
|
</g>
|
|
254
372
|
</svg>
|
|
255
373
|
{#if interaction.activeTarget}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Link
|
|
2
|
+
|
|
3
|
+
Inline text link with consistent focus ring and underline behavior.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```svelte
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { Link } from '@lostgradient/cinder/link';
|
|
10
|
+
</script>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Guidance
|
|
14
|
+
|
|
15
|
+
### Use When
|
|
16
|
+
|
|
17
|
+
- Embedding a navigable link inside body text or prose content.
|
|
18
|
+
|
|
19
|
+
### Avoid When
|
|
20
|
+
|
|
21
|
+
- Navigating between pages in a sidebar or nav bar — use NavigationItem.
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
<!-- generated:props:start -->
|
|
26
|
+
|
|
27
|
+
| Prop | Type | Required | Default | Description |
|
|
28
|
+
| ----------- | ----------------------------------- | -------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
29
|
+
| `class` | `string` | no | — | Additional class names merged with `.cinder-link`. |
|
|
30
|
+
| `color` | `"primary"` \| `"inherit"` | no | `"primary"` | Controls the link color. - `'primary'` — uses the accent/primary color token. - `'inherit'` — inherits the surrounding text color. |
|
|
31
|
+
| `disabled` | `boolean` | no | `false` | When true, renders a `<span aria-disabled="true">` instead of `<a>`. The href is not emitted and pointer-events are disabled. Use to show a link that is contextually unavailable without removing it from the visual layout. |
|
|
32
|
+
| `external` | `boolean` | no | `false` | When true, automatically adds `target="_blank"` and merges `rel="noopener noreferrer"` with any consumer-supplied `rel`. Consumer-supplied `target` is preserved if provided. |
|
|
33
|
+
| `href` | `string` | no | — | The URL the link points to. Optional ONLY because a `disabled` link renders a `<span>` with no href. For any enabled (non-disabled) link you must provide it — an `<a>` without `href` is not keyboard-focusable and is not exposed as a link to assistive technology, so an enabled Link without `href` is a bug, not a feature. |
|
|
34
|
+
| `rel` | `string` \| `null` | no | — | Forwarded to the rendered `<a>`. `"noopener noreferrer"` is merged in whenever the link opens in a new tab — `external` is true OR the resolved target is `"_blank"` (case-insensitive) — and the whole value is de-duplicated case-insensitively. |
|
|
35
|
+
| `underline` | `"always"` \| `"hover"` \| `"none"` | no | `"hover"` | Controls text-decoration behavior. - `'always'` — underline is always visible. - `'hover'` — underline appears on hover and focus (default). - `'none'` — underline is never shown. |
|
|
36
|
+
| `children` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
37
|
+
| `target` | `(opaque)` | no | — | A prop whose shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
38
|
+
|
|
39
|
+
<!-- generated:props:end -->
|
|
40
|
+
|
|
41
|
+
## CSS Variables
|
|
42
|
+
|
|
43
|
+
<!-- generated:variables:start -->
|
|
44
|
+
|
|
45
|
+
This component does not declare any local CSS variables.
|
|
46
|
+
|
|
47
|
+
<!-- generated:variables:end -->
|
|
48
|
+
|
|
49
|
+
## Subcomponents
|
|
50
|
+
|
|
51
|
+
<!-- generated:subcomponents:start -->
|
|
52
|
+
|
|
53
|
+
None.
|
|
54
|
+
|
|
55
|
+
<!-- generated:subcomponents:end -->
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# MarkdownEditor
|
|
2
|
+
|
|
3
|
+
Rich Markdown editing surface bundling a Milkdown-powered ProseMirror editor, toolbar, and mark or block introspection helpers.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```svelte
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { MarkdownEditor } from '@lostgradient/cinder/markdown-editor';
|
|
10
|
+
</script>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Guidance
|
|
14
|
+
|
|
15
|
+
### Use When
|
|
16
|
+
|
|
17
|
+
- Composing or editing Markdown documents and wanting the bundled toolbar, link-aware selection, and source or WYSIWYG mode toggle.
|
|
18
|
+
- Building writing surfaces that need an editor handle for programmatic mark or block manipulation as part of the heavyweight suite.
|
|
19
|
+
|
|
20
|
+
### Avoid When
|
|
21
|
+
|
|
22
|
+
- Authoring a simple plain-text note — a textarea is dramatically lighter than the Milkdown bundle.
|
|
23
|
+
- The surface needs inline review threads on top of the editor — use review-editor for that composition.
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
<!-- generated:props:start -->
|
|
28
|
+
|
|
29
|
+
| Prop | Type | Required | Default | Description |
|
|
30
|
+
| ----------------------- | ------------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
31
|
+
| `class` | `string` | no | — | Additional CSS classes |
|
|
32
|
+
| `id` | `string` | yes | — | Unique identifier for accessibility (required) |
|
|
33
|
+
| `label` | `string` | no | — | Accessible label for the editor (required for screen readers) |
|
|
34
|
+
| `mode` | `"wysiwyg"` \| `"source"` | no | — | Editor display mode (two-way bindable) |
|
|
35
|
+
| `modeLabel` | `string` | no | — | Accessible label for the mode toggle (visually hidden) |
|
|
36
|
+
| `placeholder` | `string` | no | — | Placeholder text when empty |
|
|
37
|
+
| `readonly` | `boolean` | no | — | Read-only mode |
|
|
38
|
+
| `showModeToggle` | `boolean` | no | — | Show an inline toggle for switching between WYSIWYG and raw Markdown |
|
|
39
|
+
| `showToolbar` | `boolean` | no | — | Show formatting toolbar (DEP-37) |
|
|
40
|
+
| `snapshotMode` | `boolean` | no | — | Snapshot mode for visual regression testing. When `true`: - Applies `caret-color: transparent` and `user-select: none` to the editor root via a `data-snapshot-mode` attribute, producing a stable visual state (no blinking cursor, no selection highlights). - Blurs any focused element inside the component on mount so the initial screenshot does not capture a focused ring or active caret. This is a purely visual / CSS concern. It does NOT affect editability, ProseMirror state, or any prop controlled by `readonly` / `mode`. |
|
|
41
|
+
| `value` | `string` | no | — | Current markdown content (two-way bindable) |
|
|
42
|
+
| `onchange` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
43
|
+
| `onCommentShortcut` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
44
|
+
| `onmodechange` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
45
|
+
| `onReady` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
46
|
+
| `onSelectionChange` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
47
|
+
| `placeholderCompletion` | `(opaque)` | no | — | A prop whose shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
48
|
+
| `placeholderDecoration` | `(opaque)` | no | — | A prop whose shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
49
|
+
| `plugins` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
50
|
+
| `toolbar` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
51
|
+
| `toolbarActions` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
52
|
+
| `toolbarLeading` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
53
|
+
|
|
54
|
+
<!-- generated:props:end -->
|
|
55
|
+
|
|
56
|
+
## CSS Variables
|
|
57
|
+
|
|
58
|
+
<!-- generated:variables:start -->
|
|
59
|
+
|
|
60
|
+
This component does not declare any local CSS variables.
|
|
61
|
+
|
|
62
|
+
<!-- generated:variables:end -->
|
|
63
|
+
|
|
64
|
+
## Subcomponents
|
|
65
|
+
|
|
66
|
+
<!-- generated:subcomponents:start -->
|
|
67
|
+
|
|
68
|
+
None.
|
|
69
|
+
|
|
70
|
+
<!-- generated:subcomponents:end -->
|
|
@@ -94,10 +94,15 @@
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
.toolbar-button:focus-visible {
|
|
97
|
-
outline:
|
|
98
|
-
box-shadow:
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
outline: var(--cinder-ring-width) solid transparent;
|
|
98
|
+
box-shadow: var(--_cinder-focus-ring-shadow);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@media (forced-colors: active) {
|
|
102
|
+
.toolbar-button:focus-visible {
|
|
103
|
+
outline: var(--cinder-ring-width) solid ButtonText;
|
|
104
|
+
outline-offset: 3px;
|
|
105
|
+
}
|
|
101
106
|
}
|
|
102
107
|
|
|
103
108
|
.toolbar-button:disabled {
|
|
@@ -104,10 +104,15 @@
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
:global(.toolbar-dropdown-trigger:focus-visible) {
|
|
107
|
-
outline:
|
|
108
|
-
box-shadow:
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
outline: var(--cinder-ring-width) solid transparent;
|
|
108
|
+
box-shadow: var(--_cinder-focus-ring-shadow);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@media (forced-colors: active) {
|
|
112
|
+
:global(.toolbar-dropdown-trigger:focus-visible) {
|
|
113
|
+
outline: var(--cinder-ring-width) solid ButtonText;
|
|
114
|
+
outline-offset: 3px;
|
|
115
|
+
}
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
:global(.toolbar-dropdown-trigger:disabled) {
|