@heyramzi/ui 2.23.0 → 3.0.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/COMPONENTS.md +16 -15
- package/README.md +5 -4
- package/dist/ai/confirmation/index.js +3 -6
- package/dist/canvas/index.js +0 -1
- package/dist/canvas/pen/node-name.svelte.js +25 -0
- package/dist/canvas/ui/tools.js +7 -0
- package/dist/charts/chart-a11y.js +59 -0
- package/dist/charts/dashboard/index.js +0 -3
- package/dist/charts/primitives/chart-utils.js +14 -0
- package/dist/components/chip/index.js +1 -0
- package/dist/components/data-table/menu-key.js +19 -0
- package/dist/components/language-flag/flags.js +5 -0
- package/dist/components/language-flag/index.js +1 -0
- package/dist/components/list-page/index.js +1 -4
- package/dist/components/theme/index.js +0 -1
- package/dist/components/toolbar/index.js +2 -4
- package/dist/components/work-parts/index.js +0 -1
- package/dist/editor/block-move.js +40 -0
- package/dist/editor/doc-blocks.js +4 -3
- package/dist/editor/extensions.js +14 -1
- package/dist/effects/animated-beam/path-calculator.svelte.js +13 -6
- package/dist/effects/border-beam/index.js +2 -0
- package/dist/effects/image-comparison/index.js +1 -0
- package/dist/effects/interactive-hover-button/index.js +1 -0
- package/dist/effects/magic-card/index.js +1 -0
- package/dist/effects/marquee/index.js +1 -0
- package/dist/effects/progressive-blur/index.js +1 -0
- package/dist/effects/spotlight/index.js +1 -0
- package/dist/effects/theme-toggle/index.js +1 -0
- package/dist/inbox/index.js +1 -1
- package/dist/lib/dates.js +41 -0
- package/dist/lib/focus.js +15 -0
- package/dist/lib/panel.js +2 -2
- package/dist/lib/tone.js +13 -1
- package/dist/record/format.js +2 -18
- package/dist/record/logic.js +3 -6
- package/dist/shadcn/alert/alert-variants.js +1 -1
- package/dist/shadcn/attachment/context.js +10 -0
- package/dist/shadcn/dropdown-menu/menu-item.js +1 -1
- package/dist/shadcn/hooks/highlighter.js +58 -5
- package/dist/shadcn/sidebar/constants.js +1 -1
- package/dist/shadcn/sidebar/context.svelte.js +12 -1
- package/dist/slides/deck-controller.svelte.js +3 -20
- package/dist/status/index.js +0 -1
- package/dist/work/dates.js +2 -3
- package/dist/work/detail/detail-types.js +0 -8
- package/dist/work/docs/edited.js +8 -7
- package/dist/work/inbox/inbox-logic.js +5 -20
- package/dist/work/index.js +0 -3
- package/dist/work/kanban-keyboard.js +10 -5
- package/dist/work/time/duration.js +2 -3
- package/package.json +36 -126
- package/scripts/svelte-dts.mjs +62 -0
- package/scripts/sync-shadcn.mjs +3 -1
- package/src/agents/agent-avatar.svelte +24 -12
- package/src/agents/agent-avatar.svelte.d.ts +6 -0
- package/src/agents/agent-avatar.test.ts +40 -0
- package/src/agents/agent-cast.svelte +83 -78
- package/src/agents/agent-cast.svelte.d.ts +20 -0
- package/src/agents/types.ts +1 -0
- package/src/ai/ai-button/AiButton.svelte +21 -10
- package/src/ai/ai-button/AiButton.svelte.d.ts +16 -0
- package/src/ai/ai-button/ai-button.svelte.test.ts +27 -0
- package/src/ai/confirmation/Confirmation.svelte +22 -6
- package/src/ai/confirmation/Confirmation.svelte.d.ts +12 -0
- package/src/ai/confirmation/ConfirmationAction.svelte +10 -3
- package/src/ai/confirmation/ConfirmationAction.svelte.d.ts +8 -0
- package/src/ai/confirmation/ConfirmationActions.svelte.d.ts +9 -0
- package/src/ai/confirmation/{ConfirmationRequest.svelte → ConfirmationState.svelte} +6 -3
- package/src/ai/confirmation/ConfirmationState.svelte.d.ts +10 -0
- package/src/ai/confirmation/ConfirmationTitle.svelte.d.ts +9 -0
- package/src/ai/confirmation/confirmation-context.svelte.ts +2 -2
- package/src/ai/confirmation/confirmation-focus.test.svelte +33 -0
- package/src/ai/confirmation/confirmation-focus.test.svelte.d.ts +8 -0
- package/src/ai/confirmation/confirmation-focus.test.ts +34 -0
- package/src/ai/confirmation/confirmation-parts.test.svelte +17 -0
- package/src/ai/confirmation/confirmation-parts.test.svelte.d.ts +7 -0
- package/src/ai/confirmation/confirmation-parts.test.ts +23 -0
- package/src/ai/confirmation/index.ts +6 -21
- package/src/ai/generation-progress/GenerationProgress.svelte +198 -171
- package/src/ai/generation-progress/GenerationProgress.svelte.d.ts +15 -0
- package/src/ai/generation-progress/generation-progress.test.ts +37 -0
- package/src/ai/loading-state/PixelLoader.svelte +41 -36
- package/src/ai/loading-state/PixelLoader.svelte.d.ts +13 -0
- package/src/ai/prompt-input/PromptInput.svelte +1 -1
- package/src/ai/prompt-input/PromptInput.svelte.d.ts +14 -0
- package/src/ai/prompt-input/PromptInputBody.svelte.d.ts +9 -0
- package/src/ai/prompt-input/PromptInputSubmit.svelte +3 -3
- package/src/ai/prompt-input/PromptInputSubmit.svelte.d.ts +19 -0
- package/src/ai/prompt-input/PromptInputTextarea.svelte +6 -1
- package/src/ai/prompt-input/PromptInputTextarea.svelte.d.ts +14 -0
- package/src/ai/prompt-input/PromptInputToolbar.svelte.d.ts +9 -0
- package/src/ai/prompt-input/prompt-input.test.ts +64 -0
- package/src/ai/reasoning/Reasoning.svelte.d.ts +10 -0
- package/src/ai/reasoning/ReasoningContent.svelte.d.ts +8 -0
- package/src/ai/reasoning/ReasoningTrigger.svelte +2 -1
- package/src/ai/reasoning/ReasoningTrigger.svelte.d.ts +8 -0
- package/src/ai/response/Response.css +23 -19
- package/src/ai/response/Response.svelte.d.ts +11 -0
- package/src/ai/suggestion/Suggestion.svelte.d.ts +10 -0
- package/src/ai/suggestion/Suggestions.svelte +5 -2
- package/src/ai/suggestion/Suggestions.svelte.d.ts +11 -0
- package/src/ai/typing-dots/TypingDots.css +27 -23
- package/src/ai/typing-dots/TypingDots.svelte +32 -12
- package/src/ai/typing-dots/TypingDots.svelte.d.ts +12 -0
- package/src/ai/typing-dots/typing-dots.test.ts +36 -0
- package/src/ai/voice-waveform/VoiceWaveform.css +31 -27
- package/src/ai/voice-waveform/VoiceWaveform.svelte.d.ts +10 -0
- package/src/animations/avatar-group-hover.css +25 -21
- package/src/animations/card-tilt.css +71 -65
- package/src/animations/digit-pop-in.css +49 -40
- package/src/animations/dropdown.css +125 -107
- package/src/animations/input-clear-dissolve.css +69 -59
- package/src/animations/input-shake.css +55 -48
- package/src/animations/learn-more-hover.css +53 -43
- package/src/animations/like-button.css +74 -62
- package/src/animations/modal.css +83 -74
- package/src/animations/page-side-by-side.css +50 -42
- package/src/animations/plus-menu-morph.css +96 -87
- package/src/animations/resize.css +16 -13
- package/src/animations/shimmer-text.css +46 -40
- package/src/animations/spinning-counter.css +50 -43
- package/src/animations/success-check.css +69 -58
- package/src/animations/text-swap.css +35 -31
- package/src/animations/thinking-states.css +61 -54
- package/src/canvas/card/card-frame.svelte.d.ts +14 -0
- package/src/canvas/card/card.css +16 -10
- package/src/canvas/card/resize-handles.svelte.d.ts +11 -0
- package/src/canvas/chrome/chrome-zoom.svelte.d.ts +3 -0
- package/src/canvas/chrome/chrome.css +75 -69
- package/src/canvas/chrome/lock-badge.svelte.d.ts +8 -0
- package/src/canvas/chrome/side-handles.svelte.d.ts +6 -0
- package/src/canvas/chrome/size-chip.svelte.d.ts +3 -0
- package/src/canvas/chrome/snap-guides.svelte +16 -12
- package/src/canvas/chrome/snap-guides.svelte.d.ts +9 -0
- package/src/canvas/components/icons/ToolIcon.svelte.d.ts +8 -0
- package/src/canvas/components/shared/svg/PreviewSvg.svelte +9 -5
- package/src/canvas/components/shared/svg/PreviewSvg.svelte.d.ts +13 -0
- package/src/canvas/components/shared/svg/ShapeOutline.svelte +8 -4
- package/src/canvas/components/shared/svg/ShapeOutline.svelte.d.ts +15 -0
- package/src/canvas/components/shared/svg/StrokeNode.svelte +21 -11
- package/src/canvas/components/shared/svg/StrokeNode.svelte.d.ts +5 -0
- package/src/canvas/components/shared/svg/TextRule.svelte +8 -4
- package/src/canvas/components/shared/svg/TextRule.svelte.d.ts +9 -0
- package/src/canvas/edges/bend-handle.svelte +18 -14
- package/src/canvas/edges/bend-handle.svelte.d.ts +10 -0
- package/src/canvas/edges/edge-gradient.svelte.d.ts +16 -0
- package/src/canvas/edges/gradient-edge.svelte.d.ts +21 -0
- package/src/canvas/index.ts +0 -1
- package/src/canvas/lod/lod-switch.svelte +38 -33
- package/src/canvas/lod/lod-switch.svelte.d.ts +14 -0
- package/src/canvas/pen/PenField.svelte.d.ts +26 -0
- package/src/canvas/pen/PenOverlay.svelte +10 -6
- package/src/canvas/pen/PenOverlay.svelte.d.ts +23 -0
- package/src/canvas/pen/ShapeNode.svelte +6 -0
- package/src/canvas/pen/ShapeNode.svelte.d.ts +5 -0
- package/src/canvas/pen/TextNode.svelte +12 -2
- package/src/canvas/pen/TextNode.svelte.d.ts +5 -0
- package/src/canvas/pen/host-field.test.svelte.d.ts +6 -0
- package/src/canvas/pen/node-name.svelte.ts +32 -0
- package/src/canvas/pen/pen.css +69 -63
- package/src/canvas/screen/GlyphIcon.svelte.d.ts +9 -0
- package/src/canvas/screen/PartView.svelte +25 -25
- package/src/canvas/screen/PartView.svelte.d.ts +17 -0
- package/src/canvas/screen/ScreenBody.svelte +4 -4
- package/src/canvas/screen/ScreenBody.svelte.d.ts +11 -0
- package/src/canvas/screen/ScreenCard.svelte.d.ts +9 -0
- package/src/canvas/screen/screen.css +509 -505
- package/src/canvas/ui/CanvasToolbar.svelte.d.ts +30 -0
- package/src/canvas/ui/FrameLayer.svelte +18 -14
- package/src/canvas/ui/FrameLayer.svelte.d.ts +9 -0
- package/src/canvas/ui/PenLayer.svelte.d.ts +15 -0
- package/src/canvas/ui/StylePanel.svelte +41 -37
- package/src/canvas/ui/StylePanel.svelte.d.ts +32 -0
- package/src/canvas/ui/canvas-grid.svelte.d.ts +11 -0
- package/src/canvas/ui/canvas-ui.css +287 -266
- package/src/canvas/ui/tools.test.ts +39 -0
- package/src/canvas/ui/tools.ts +8 -0
- package/src/charts/README.md +3 -3
- package/src/charts/animated-value.css +6 -2
- package/src/charts/animated-value.svelte.d.ts +24 -0
- package/src/charts/area-chart.css +27 -21
- package/src/charts/area-chart.svelte +45 -20
- package/src/charts/area-chart.svelte.d.ts +60 -0
- package/src/charts/bar-chart.css +112 -102
- package/src/charts/bar-chart.svelte +43 -53
- package/src/charts/bar-chart.svelte.d.ts +64 -0
- package/src/charts/chart-a11y.css +23 -0
- package/src/charts/chart-a11y.test.ts +59 -0
- package/src/charts/chart-a11y.ts +92 -0
- package/src/charts/chart-plot.svelte +106 -0
- package/src/charts/chart-plot.svelte.d.ts +18 -0
- package/src/charts/chart-tokens.css +52 -51
- package/src/charts/charts.css +154 -142
- package/src/charts/crosshair.svelte.d.ts +7 -0
- package/src/charts/dashboard/dashboard-section.svelte +19 -3
- package/src/charts/dashboard/dashboard-section.svelte.d.ts +17 -0
- package/src/charts/dashboard/data-table.svelte +22 -22
- package/src/charts/dashboard/data-table.svelte.d.ts +86 -0
- package/src/charts/dashboard/index.ts +0 -3
- package/src/charts/dashboard/panel-grid.svelte +1 -1
- package/src/charts/dashboard/panel-grid.svelte.d.ts +14 -0
- package/src/charts/dashboard/period-filter.svelte.d.ts +37 -0
- package/src/charts/dashboard/rating-chip.svelte +9 -11
- package/src/charts/dashboard/rating-chip.svelte.d.ts +9 -0
- package/src/charts/dashboard/stat-band.svelte.d.ts +14 -0
- package/src/charts/dashboard/stat-tile.svelte +11 -8
- package/src/charts/dashboard/stat-tile.svelte.d.ts +62 -0
- package/src/charts/donut-chart.css +52 -46
- package/src/charts/donut-chart.svelte.d.ts +39 -0
- package/src/charts/edge-fade.svelte.d.ts +9 -0
- package/src/charts/figure.css +104 -91
- package/src/charts/figure.svelte.d.ts +40 -0
- package/src/charts/gauge-chart.css +74 -70
- package/src/charts/gauge-chart.svelte.d.ts +58 -0
- package/src/charts/hover-focus.svelte.d.ts +14 -0
- package/src/charts/legend.css +112 -108
- package/src/charts/legend.svelte +3 -3
- package/src/charts/legend.svelte.d.ts +30 -0
- package/src/charts/line-chart.css +27 -21
- package/src/charts/line-chart.svelte +64 -47
- package/src/charts/line-chart.svelte.d.ts +53 -0
- package/src/charts/number-chart.css +185 -163
- package/src/charts/number-chart.svelte +8 -4
- package/src/charts/number-chart.svelte.d.ts +58 -0
- package/src/charts/pop-value.svelte.d.ts +9 -0
- package/src/charts/primitives/chart-container.svelte.d.ts +9 -0
- package/src/charts/primitives/chart-style.svelte.d.ts +8 -0
- package/src/charts/primitives/chart-tooltip.svelte +1 -1
- package/src/charts/primitives/chart-tooltip.svelte.d.ts +26 -0
- package/src/charts/primitives/chart-utils.test.ts +17 -0
- package/src/charts/primitives/chart-utils.ts +16 -0
- package/src/charts/reference-line.css +18 -14
- package/src/charts/reference-line.svelte.d.ts +15 -0
- package/src/charts/reveal.svelte.d.ts +9 -0
- package/src/charts/ring-chart.css +82 -78
- package/src/charts/ring-chart.svelte +3 -3
- package/src/charts/ring-chart.svelte.d.ts +41 -0
- package/src/charts/sparkline.css +43 -34
- package/src/charts/sparkline.svelte +52 -8
- package/src/charts/sparkline.svelte.d.ts +51 -0
- package/src/charts/stat-card.css +110 -92
- package/src/charts/stat-card.svelte.d.ts +65 -0
- package/src/charts/time-series-chart.css +24 -19
- package/src/charts/time-series-chart.svelte +51 -14
- package/src/charts/time-series-chart.svelte.d.ts +30 -0
- package/src/charts/trend-pill.css +39 -32
- package/src/charts/trend-pill.svelte.d.ts +14 -0
- package/src/class-tokens.test.ts +34 -0
- package/src/components/chip/count-chip.svelte +35 -0
- package/src/components/chip/count-chip.svelte.d.ts +12 -0
- package/src/components/chip/index.ts +1 -0
- package/src/components/chip/tag-chip.svelte +6 -6
- package/src/components/chip/tag-chip.svelte.d.ts +20 -0
- package/src/components/copy/copy-button.svelte +22 -18
- package/src/components/copy/copy-button.svelte.d.ts +37 -0
- package/src/components/data-table/data-table.ts +1 -1
- package/src/components/data-table/infinite-scroll.svelte.d.ts +37 -0
- package/src/components/data-table/menu-key.ts +22 -0
- package/src/components/data-table/pagination.svelte +36 -11
- package/src/components/data-table/pagination.svelte.d.ts +14 -0
- package/src/components/data-table/row-arrow.svelte.d.ts +6 -0
- package/src/components/data-table/row-context-menu.svelte +10 -10
- package/src/components/data-table/row-context-menu.svelte.d.ts +15 -0
- package/src/components/data-table/sortable-head.svelte +55 -25
- package/src/components/data-table/sortable-head.svelte.d.ts +38 -0
- package/src/components/data-table/table-skeleton.svelte.d.ts +18 -0
- package/src/components/docs/doc-page.svelte +8 -4
- package/src/components/docs/doc-page.svelte.d.ts +34 -0
- package/src/components/docs/on-this-page.svelte +109 -101
- package/src/components/docs/on-this-page.svelte.d.ts +17 -0
- package/src/components/field-row/field-row.svelte.d.ts +16 -0
- package/src/components/hold-to-confirm/hold-to-confirm.svelte +113 -66
- package/src/components/hold-to-confirm/hold-to-confirm.svelte.d.ts +22 -0
- package/src/components/hold-to-confirm/hold-to-confirm.test.ts +105 -0
- package/src/components/language-flag/flags.ts +5 -0
- package/src/components/language-flag/index.ts +1 -0
- package/src/components/language-flag/language-flag.svelte +5 -12
- package/src/components/language-flag/language-flag.svelte.d.ts +11 -0
- package/src/components/list-page/detail-header.svelte.d.ts +15 -0
- package/src/components/list-page/detail-row.svelte.d.ts +9 -0
- package/src/components/list-page/detail-stack.svelte.d.ts +9 -0
- package/src/components/list-page/empty-state.svelte +106 -24
- package/src/components/list-page/empty-state.svelte.d.ts +23 -0
- package/src/components/list-page/filter-item.svelte +1 -1
- package/src/components/list-page/filter-item.svelte.d.ts +10 -0
- package/src/components/list-page/filter-popover.svelte +3 -6
- package/src/components/list-page/filter-popover.svelte.d.ts +20 -0
- package/src/components/list-page/grouped-list.svelte +3 -4
- package/src/components/list-page/grouped-list.svelte.d.ts +49 -0
- package/src/components/list-page/index.ts +1 -4
- package/src/components/list-page/list-page-shell.svelte.d.ts +31 -0
- package/src/components/list-page/master-detail-focus.test.ts +28 -0
- package/src/components/list-page/master-detail.svelte +57 -28
- package/src/components/list-page/master-detail.svelte.d.ts +18 -0
- package/src/components/list-page/master-detail.test.ts +1 -1
- package/src/components/list-page/notice-bar.svelte.d.ts +14 -0
- package/src/components/list-page/prev-next.svelte +7 -7
- package/src/components/list-page/prev-next.svelte.d.ts +14 -0
- package/src/components/list-page/rail-body.svelte.d.ts +8 -0
- package/src/components/list-page/rail-head.svelte.d.ts +10 -0
- package/src/components/list-page/rail-row.svelte.d.ts +18 -0
- package/src/components/mark/mark.svelte +2 -0
- package/src/components/mark/mark.svelte.d.ts +16 -0
- package/src/components/open-in/open-in.svelte +3 -3
- package/src/components/open-in/open-in.svelte.d.ts +35 -0
- package/src/components/picker/mark-picker.svelte +2 -2
- package/src/components/picker/mark-picker.svelte.d.ts +38 -0
- package/src/components/picker/picker.svelte +47 -3
- package/src/components/picker/picker.svelte.d.ts +59 -0
- package/src/components/picker/picker.test.ts +71 -0
- package/src/components/section-card/section-card.svelte.d.ts +13 -0
- package/src/components/section-header/section-header.svelte +2 -6
- package/src/components/section-header/section-header.svelte.d.ts +17 -0
- package/src/components/section-header/section-label.svelte.d.ts +10 -0
- package/src/components/segmented/animated-tabs.svelte.d.ts +61 -0
- package/src/components/segmented/section-runs.svelte.d.ts +23 -0
- package/src/components/segmented/segment.svelte +13 -19
- package/src/components/segmented/segment.svelte.d.ts +30 -0
- package/src/components/segmented/segmented-filter.svelte +4 -5
- package/src/components/segmented/segmented-filter.svelte.d.ts +43 -0
- package/src/components/segmented/segmented-nav.svelte.d.ts +17 -0
- package/src/components/segmented/segmented-overflow.svelte +1 -0
- package/src/components/segmented/segmented-overflow.svelte.d.ts +37 -0
- package/src/components/segmented/segmented-track.svelte +107 -103
- package/src/components/segmented/segmented-track.svelte.d.ts +19 -0
- package/src/components/star-rating-input/star-rating-input.svelte +151 -146
- package/src/components/star-rating-input/star-rating-input.svelte.d.ts +31 -0
- package/src/components/star-rating-input/star-rating-input.test.ts +90 -0
- package/src/components/svg/svg.svelte.d.ts +7 -0
- package/src/components/table-view/table-view.svelte +65 -73
- package/src/components/table-view/table-view.svelte.d.ts +96 -0
- package/src/components/table-view/table-view.test.ts +35 -6
- package/src/components/tags-input/tags-input.svelte +68 -16
- package/src/components/tags-input/tags-input.svelte.d.ts +40 -0
- package/src/components/tags-input/tags-input.test.ts +101 -0
- package/src/components/theme/index.ts +0 -1
- package/src/components/theme/theme-provider.svelte +8 -3
- package/src/components/theme/theme-provider.svelte.d.ts +19 -0
- package/src/components/theme/theme-provider.test.ts +5 -5
- package/src/components/toolbar/index.ts +2 -4
- package/src/components/toolbar/toolbar-search.svelte +4 -0
- package/src/components/toolbar/toolbar-search.svelte.d.ts +11 -0
- package/src/components/toolbar/toolbar.svelte +1 -1
- package/src/components/toolbar/toolbar.svelte.d.ts +47 -0
- package/src/components/toolbar/toolbar.test.ts +7 -0
- package/src/components/work-parts/group-head.svelte +1 -1
- package/src/components/work-parts/group-head.svelte.d.ts +16 -0
- package/src/components/work-parts/index.ts +0 -1
- package/src/components/work-parts/property-row.svelte.d.ts +19 -0
- package/src/components/work-parts/work-card.svelte.d.ts +11 -0
- package/src/components/work-parts/work-well.svelte.d.ts +13 -0
- package/src/css-layers.test.ts +138 -0
- package/src/editor/README.md +1 -1
- package/src/editor/block-move.test.ts +58 -0
- package/src/editor/block-move.ts +52 -0
- package/src/editor/content.css +356 -352
- package/src/editor/doc-blocks.ts +5 -4
- package/src/editor/doc-page.css +328 -324
- package/src/editor/editor-toolbar.svelte +46 -39
- package/src/editor/editor-toolbar.svelte.d.ts +13 -0
- package/src/editor/editor.svelte +218 -157
- package/src/editor/editor.svelte.d.ts +27 -0
- package/src/editor/extensions.ts +18 -2
- package/src/editor/image-align.test.ts +35 -0
- package/src/editor/image-toolbar.svelte +73 -57
- package/src/editor/image-toolbar.svelte.d.ts +11 -0
- package/src/editor/inline-editor.svelte +27 -16
- package/src/editor/inline-editor.svelte.d.ts +40 -0
- package/src/editor/renderer.svelte.d.ts +11 -0
- package/src/editor/slash-menu.svelte +103 -88
- package/src/editor/slash-menu.svelte.d.ts +17 -0
- package/src/effects/animated-beam/AnimatedBeam.svelte.d.ts +4 -0
- package/src/effects/animated-beam/diagrams/BeamSvg.svelte.d.ts +22 -0
- package/src/effects/animated-beam/path-calculator.svelte.ts +19 -5
- package/src/effects/border-beam/BorderBeam.svelte.d.ts +4 -0
- package/src/effects/border-beam/index.ts +10 -0
- package/src/effects/image-comparison/ImageComparison.css +114 -97
- package/src/effects/image-comparison/ImageComparison.svelte.d.ts +44 -0
- package/src/effects/image-comparison/index.ts +4 -0
- package/src/effects/image-reveal/ImageReveal.css +14 -9
- package/src/effects/image-reveal/ImageReveal.svelte.d.ts +11 -0
- package/src/effects/interactive-hover-button/InteractiveHoverButton.svelte +234 -222
- package/src/effects/interactive-hover-button/InteractiveHoverButton.svelte.d.ts +16 -0
- package/src/effects/interactive-hover-button/index.ts +1 -0
- package/src/effects/magic-card/MagicCard.css +49 -45
- package/src/effects/magic-card/MagicCard.svelte.d.ts +15 -0
- package/src/effects/magic-card/index.ts +1 -0
- package/src/effects/marquee/Marquee.css +83 -61
- package/src/effects/marquee/Marquee.svelte +7 -2
- package/src/effects/marquee/Marquee.svelte.d.ts +27 -0
- package/src/effects/marquee/index.ts +1 -0
- package/src/effects/marquee/marquee.test.ts +24 -0
- package/src/effects/progressive-blur/ProgressiveBlur.css +13 -8
- package/src/effects/progressive-blur/ProgressiveBlur.svelte.d.ts +14 -0
- package/src/effects/progressive-blur/index.ts +1 -0
- package/src/effects/reveal/AnimatedGroup.svelte.d.ts +14 -0
- package/src/effects/reveal/InView.svelte.d.ts +12 -0
- package/src/effects/reveal/TextEffect.svelte.d.ts +16 -0
- package/src/effects/reveal/reveal.css +89 -73
- package/src/effects/shader-gradient/ShaderGradient.svelte.d.ts +4 -0
- package/src/effects/spotlight/Spotlight.css +8 -4
- package/src/effects/spotlight/Spotlight.svelte.d.ts +8 -0
- package/src/effects/spotlight/index.ts +1 -0
- package/src/effects/theme-toggle/ThemeToggle.css +165 -160
- package/src/effects/theme-toggle/ThemeToggle.svelte +12 -6
- package/src/effects/theme-toggle/ThemeToggle.svelte.d.ts +24 -0
- package/src/effects/theme-toggle/index.ts +1 -0
- package/src/icon-names.test.ts +88 -0
- package/src/inbox/index.ts +1 -2
- package/src/inbox/thread-inbox.svelte +7 -5
- package/src/inbox/thread-inbox.svelte.d.ts +52 -0
- package/src/lib/dates.test.ts +63 -0
- package/src/lib/dates.ts +63 -0
- package/src/lib/focus.ts +19 -0
- package/src/lib/live-region.svelte +14 -0
- package/src/lib/live-region.svelte.d.ts +5 -0
- package/src/lib/panel.svelte +116 -0
- package/src/lib/panel.svelte.d.ts +30 -0
- package/src/lib/panel.ts +2 -2
- package/src/lib/tone.ts +15 -1
- package/src/modules.test.ts +119 -7
- package/src/onboarding/README.md +2 -2
- package/src/onboarding/onboarding-provider.svelte +1 -1
- package/src/onboarding/onboarding-provider.svelte.d.ts +17 -0
- package/src/onboarding/tour-card.svelte +10 -10
- package/src/onboarding/tour-card.svelte.d.ts +21 -0
- package/src/onboarding/tour-runner.svelte +62 -60
- package/src/onboarding/tour-runner.svelte.d.ts +11 -0
- package/src/panel/side-panel.svelte +8 -13
- package/src/panel/side-panel.svelte.d.ts +48 -0
- package/src/record/field-section.svelte.d.ts +19 -0
- package/src/record/format.ts +3 -15
- package/src/record/info-list.svelte +4 -3
- package/src/record/info-list.svelte.d.ts +25 -0
- package/src/record/logic.ts +2 -6
- package/src/record/next-up.svelte.d.ts +14 -0
- package/src/record/project-list.svelte.d.ts +18 -0
- package/src/record/record-header.svelte.d.ts +27 -0
- package/src/record/record-rail.svelte.d.ts +23 -0
- package/src/record/record-shell.svelte.d.ts +48 -0
- package/src/record/record-stats.svelte +4 -3
- package/src/record/record-stats.svelte.d.ts +10 -0
- package/src/record/record-timeline.svelte +3 -1
- package/src/record/record-timeline.svelte.d.ts +29 -0
- package/src/record/steps-rail.svelte +16 -13
- package/src/record/steps-rail.svelte.d.ts +23 -0
- package/src/record/where-we-are.svelte.d.ts +25 -0
- package/src/shadcn/accordion/accordion-content.svelte.d.ts +4 -0
- package/src/shadcn/accordion/accordion-item.svelte.d.ts +4 -0
- package/src/shadcn/accordion/accordion-trigger.svelte +1 -1
- package/src/shadcn/accordion/accordion-trigger.svelte.d.ts +12 -0
- package/src/shadcn/accordion/accordion.svelte.d.ts +4 -0
- package/src/shadcn/alert/alert-description.svelte.d.ts +5 -0
- package/src/shadcn/alert/alert-title.svelte.d.ts +5 -0
- package/src/shadcn/alert/alert-variants.ts +1 -1
- package/src/shadcn/alert/alert.svelte.d.ts +10 -0
- package/src/shadcn/alert-dialog/alert-dialog-action.svelte.d.ts +4 -0
- package/src/shadcn/alert-dialog/alert-dialog-cancel.svelte.d.ts +4 -0
- package/src/shadcn/alert-dialog/alert-dialog-content.svelte.d.ts +10 -0
- package/src/shadcn/alert-dialog/alert-dialog-description.svelte.d.ts +4 -0
- package/src/shadcn/alert-dialog/alert-dialog-footer.svelte.d.ts +9 -0
- package/src/shadcn/alert-dialog/alert-dialog-header.svelte.d.ts +5 -0
- package/src/shadcn/alert-dialog/alert-dialog-overlay.svelte.d.ts +4 -0
- package/src/shadcn/alert-dialog/alert-dialog-portal.svelte.d.ts +3 -0
- package/src/shadcn/alert-dialog/alert-dialog-title.svelte.d.ts +4 -0
- package/src/shadcn/alert-dialog/alert-dialog-trigger.svelte.d.ts +4 -0
- package/src/shadcn/alert-dialog/alert-dialog.svelte.d.ts +3 -0
- package/src/shadcn/attachment/attachment-action.svelte +7 -0
- package/src/shadcn/attachment/attachment-action.svelte.d.ts +4 -0
- package/src/shadcn/attachment/attachment-actions.svelte.d.ts +5 -0
- package/src/shadcn/attachment/attachment-content.svelte.d.ts +5 -0
- package/src/shadcn/attachment/attachment-description.svelte.d.ts +5 -0
- package/src/shadcn/attachment/attachment-group.svelte.d.ts +5 -0
- package/src/shadcn/attachment/attachment-media.svelte.d.ts +16 -0
- package/src/shadcn/attachment/attachment-title.svelte +3 -0
- package/src/shadcn/attachment/attachment-title.svelte.d.ts +5 -0
- package/src/shadcn/attachment/attachment-trigger.svelte +5 -0
- package/src/shadcn/attachment/attachment-trigger.svelte.d.ts +11 -0
- package/src/shadcn/attachment/attachment.svelte +4 -0
- package/src/shadcn/attachment/attachment.svelte.d.ts +25 -0
- package/src/shadcn/attachment/context.ts +13 -0
- package/src/shadcn/avatar/avatar-badge.svelte.d.ts +5 -0
- package/src/shadcn/avatar/avatar-fallback.svelte.d.ts +4 -0
- package/src/shadcn/avatar/avatar-group-count.svelte.d.ts +5 -0
- package/src/shadcn/avatar/avatar-group.svelte.d.ts +5 -0
- package/src/shadcn/avatar/avatar-image.svelte.d.ts +4 -0
- package/src/shadcn/avatar/avatar.svelte.d.ts +7 -0
- package/src/shadcn/badge/badge.svelte.d.ts +13 -0
- package/src/shadcn/breadcrumb/breadcrumb-ellipsis.svelte +1 -1
- package/src/shadcn/breadcrumb/breadcrumb-ellipsis.svelte.d.ts +5 -0
- package/src/shadcn/breadcrumb/breadcrumb-item.svelte.d.ts +5 -0
- package/src/shadcn/breadcrumb/breadcrumb-link.svelte.d.ts +11 -0
- package/src/shadcn/breadcrumb/breadcrumb-list.svelte.d.ts +5 -0
- package/src/shadcn/breadcrumb/breadcrumb-page.svelte.d.ts +5 -0
- package/src/shadcn/breadcrumb/breadcrumb-separator.svelte +1 -1
- package/src/shadcn/breadcrumb/breadcrumb-separator.svelte.d.ts +5 -0
- package/src/shadcn/breadcrumb/breadcrumb.svelte.d.ts +5 -0
- package/src/shadcn/bubble/bubble-content.svelte.d.ts +11 -0
- package/src/shadcn/bubble/bubble-group.svelte.d.ts +5 -0
- package/src/shadcn/bubble/bubble-reactions.svelte.d.ts +22 -0
- package/src/shadcn/bubble/bubble.svelte +1 -1
- package/src/shadcn/bubble/bubble.svelte.d.ts +22 -0
- package/src/shadcn/button/button.svelte +1 -1
- package/src/shadcn/button/button.svelte.d.ts +33 -0
- package/src/shadcn/calendar/calendar-caption.svelte.d.ts +19 -0
- package/src/shadcn/calendar/calendar-cell.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-day.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-grid-body.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-grid-head.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-grid-row.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-grid.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-head-cell.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-header.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-heading.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-month-select.svelte +1 -1
- package/src/shadcn/calendar/calendar-month-select.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-month.svelte.d.ts +5 -0
- package/src/shadcn/calendar/calendar-months.svelte.d.ts +5 -0
- package/src/shadcn/calendar/calendar-nav.svelte.d.ts +5 -0
- package/src/shadcn/calendar/calendar-next-button.svelte +1 -1
- package/src/shadcn/calendar/calendar-next-button.svelte.d.ts +8 -0
- package/src/shadcn/calendar/calendar-prev-button.svelte +1 -1
- package/src/shadcn/calendar/calendar-prev-button.svelte.d.ts +8 -0
- package/src/shadcn/calendar/calendar-year-select.svelte +1 -1
- package/src/shadcn/calendar/calendar-year-select.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar.svelte.d.ts +21 -0
- package/src/shadcn/card/card-action.svelte.d.ts +5 -0
- package/src/shadcn/card/card-content.svelte.d.ts +5 -0
- package/src/shadcn/card/card-description.svelte.d.ts +5 -0
- package/src/shadcn/card/card-footer.svelte.d.ts +5 -0
- package/src/shadcn/card/card-header.svelte.d.ts +5 -0
- package/src/shadcn/card/card-title.svelte.d.ts +8 -0
- package/src/shadcn/card/card.svelte.d.ts +8 -0
- package/src/shadcn/checkbox/checkbox.svelte +2 -2
- package/src/shadcn/checkbox/checkbox.svelte.d.ts +4 -0
- package/src/shadcn/code-block/code-block-actions.svelte.d.ts +5 -0
- package/src/shadcn/code-block/code-block-content.svelte +1 -1
- package/src/shadcn/code-block/code-block-content.svelte.d.ts +12 -0
- package/src/shadcn/code-block/code-block-copy-button.svelte.d.ts +3 -0
- package/src/shadcn/code-block/code-block-footer.svelte.d.ts +5 -0
- package/src/shadcn/code-block/code-block-header.svelte +1 -1
- package/src/shadcn/code-block/code-block-header.svelte.d.ts +5 -0
- package/src/shadcn/code-block/code-block-line.svelte +1 -1
- package/src/shadcn/code-block/code-block-line.svelte.d.ts +25 -0
- package/src/shadcn/code-block/code-block-title.svelte +1 -1
- package/src/shadcn/code-block/code-block-title.svelte.d.ts +5 -0
- package/src/shadcn/code-block/code-block.svelte +3 -2
- package/src/shadcn/code-block/code-block.svelte.d.ts +18 -0
- package/src/shadcn/collapsible/collapsible-content.svelte.d.ts +4 -0
- package/src/shadcn/collapsible/collapsible-trigger.svelte.d.ts +4 -0
- package/src/shadcn/collapsible/collapsible.svelte.d.ts +4 -0
- package/src/shadcn/command/command-dialog.svelte.d.ts +14 -0
- package/src/shadcn/command/command-empty.svelte.d.ts +4 -0
- package/src/shadcn/command/command-group.svelte.d.ts +7 -0
- package/src/shadcn/command/command-input.svelte +2 -2
- package/src/shadcn/command/command-input.svelte.d.ts +13 -0
- package/src/shadcn/command/command-item.svelte +1 -1
- package/src/shadcn/command/command-item.svelte.d.ts +4 -0
- package/src/shadcn/command/command-link-item.svelte.d.ts +4 -0
- package/src/shadcn/command/command-list.svelte +7 -1
- package/src/shadcn/command/command-list.svelte.d.ts +4 -0
- package/src/shadcn/command/command-loading.svelte.d.ts +4 -0
- package/src/shadcn/command/command-separator.svelte.d.ts +4 -0
- package/src/shadcn/command/command-shortcut.svelte.d.ts +5 -0
- package/src/shadcn/command/command.svelte.d.ts +8 -0
- package/src/shadcn/context-menu/context-menu-checkbox-item.svelte +1 -1
- package/src/shadcn/context-menu/context-menu-checkbox-item.svelte.d.ts +10 -0
- package/src/shadcn/context-menu/context-menu-content.svelte.d.ts +10 -0
- package/src/shadcn/context-menu/context-menu-group-heading.svelte.d.ts +7 -0
- package/src/shadcn/context-menu/context-menu-group.svelte.d.ts +4 -0
- package/src/shadcn/context-menu/context-menu-item.svelte +1 -1
- package/src/shadcn/context-menu/context-menu-item.svelte.d.ts +8 -0
- package/src/shadcn/context-menu/context-menu-label.svelte.d.ts +8 -0
- package/src/shadcn/context-menu/context-menu-portal.svelte.d.ts +3 -0
- package/src/shadcn/context-menu/context-menu-radio-group.svelte.d.ts +4 -0
- package/src/shadcn/context-menu/context-menu-radio-item.svelte +1 -1
- package/src/shadcn/context-menu/context-menu-radio-item.svelte.d.ts +8 -0
- package/src/shadcn/context-menu/context-menu-separator.svelte.d.ts +4 -0
- package/src/shadcn/context-menu/context-menu-shortcut.svelte.d.ts +5 -0
- package/src/shadcn/context-menu/context-menu-sub-content.svelte.d.ts +4 -0
- package/src/shadcn/context-menu/context-menu-sub-trigger.svelte +1 -1
- package/src/shadcn/context-menu/context-menu-sub-trigger.svelte.d.ts +8 -0
- package/src/shadcn/context-menu/context-menu-sub.svelte.d.ts +3 -0
- package/src/shadcn/context-menu/context-menu-trigger.svelte.d.ts +4 -0
- package/src/shadcn/context-menu/context-menu.svelte.d.ts +3 -0
- package/src/shadcn/dialog/dialog-body.svelte.d.ts +5 -0
- package/src/shadcn/dialog/dialog-close.svelte.d.ts +4 -0
- package/src/shadcn/dialog/dialog-content.svelte +3 -4
- package/src/shadcn/dialog/dialog-content.svelte.d.ts +16 -0
- package/src/shadcn/dialog/dialog-description.svelte.d.ts +4 -0
- package/src/shadcn/dialog/dialog-footer.svelte.d.ts +15 -0
- package/src/shadcn/dialog/dialog-header.svelte.d.ts +5 -0
- package/src/shadcn/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/src/shadcn/dialog/dialog-portal.svelte.d.ts +3 -0
- package/src/shadcn/dialog/dialog-title.svelte.d.ts +4 -0
- package/src/shadcn/dialog/dialog-trigger.svelte.d.ts +4 -0
- package/src/shadcn/dialog/dialog.svelte.d.ts +3 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-checkbox-group.svelte.d.ts +4 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-checkbox-item.svelte +2 -2
- package/src/shadcn/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +9 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-content.svelte.d.ts +10 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-group-heading.svelte.d.ts +8 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-group.svelte.d.ts +4 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-item.svelte.d.ts +8 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-label.svelte.d.ts +8 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-portal.svelte.d.ts +3 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-radio-group.svelte.d.ts +4 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-radio-item.svelte +1 -1
- package/src/shadcn/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +4 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-separator.svelte.d.ts +4 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-shortcut.svelte.d.ts +5 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts +4 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-sub-trigger.svelte +1 -1
- package/src/shadcn/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +7 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-sub.svelte.d.ts +3 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-trigger.svelte.d.ts +4 -0
- package/src/shadcn/dropdown-menu/dropdown-menu.svelte.d.ts +3 -0
- package/src/shadcn/dropdown-menu/menu-item.ts +1 -1
- package/src/shadcn/empty/empty-content.svelte.d.ts +5 -0
- package/src/shadcn/empty/empty-description.svelte.d.ts +5 -0
- package/src/shadcn/empty/empty-header.svelte.d.ts +5 -0
- package/src/shadcn/empty/empty-media.svelte.d.ts +16 -0
- package/src/shadcn/empty/empty-title.svelte.d.ts +5 -0
- package/src/shadcn/empty/empty.svelte.d.ts +5 -0
- package/src/shadcn/field/field-content.svelte.d.ts +5 -0
- package/src/shadcn/field/field-description.svelte.d.ts +5 -0
- package/src/shadcn/field/field-error.svelte +1 -1
- package/src/shadcn/field/field-error.svelte.d.ts +12 -0
- package/src/shadcn/field/field-group.svelte.d.ts +5 -0
- package/src/shadcn/field/field-label.svelte.d.ts +10 -0
- package/src/shadcn/field/field-legend.svelte.d.ts +8 -0
- package/src/shadcn/field/field-separator.svelte.d.ts +9 -0
- package/src/shadcn/field/field-set.svelte.d.ts +5 -0
- package/src/shadcn/field/field-title.svelte.d.ts +5 -0
- package/src/shadcn/field/field.svelte +1 -1
- package/src/shadcn/field/field.svelte.d.ts +17 -0
- package/src/shadcn/field/simple-field.svelte.d.ts +15 -0
- package/src/shadcn/hooks/highlighter.ts +51 -2
- package/src/shadcn/hover-card/hover-card-content.svelte.d.ts +10 -0
- package/src/shadcn/hover-card/hover-card-portal.svelte.d.ts +3 -0
- package/src/shadcn/hover-card/hover-card-trigger.svelte.d.ts +4 -0
- package/src/shadcn/hover-card/hover-card.svelte.d.ts +3 -0
- package/src/shadcn/input/input.svelte.d.ts +13 -0
- package/src/shadcn/input/secret-input.svelte +3 -3
- package/src/shadcn/input/secret-input.svelte.d.ts +9 -0
- package/src/shadcn/input-otp/input-otp-group.svelte.d.ts +5 -0
- package/src/shadcn/input-otp/input-otp-separator.svelte.d.ts +5 -0
- package/src/shadcn/input-otp/input-otp-slot.svelte.d.ts +4 -0
- package/src/shadcn/input-otp/input-otp.svelte.d.ts +4 -0
- package/src/shadcn/kbd/kbd-group.svelte.d.ts +5 -0
- package/src/shadcn/kbd/kbd.svelte.d.ts +5 -0
- package/src/shadcn/label/label.svelte.d.ts +4 -0
- package/src/shadcn/marker/marker-content.svelte.d.ts +5 -0
- package/src/shadcn/marker/marker-icon.svelte.d.ts +5 -0
- package/src/shadcn/marker/marker.svelte.d.ts +21 -0
- package/src/shadcn/message/message-avatar.svelte.d.ts +5 -0
- package/src/shadcn/message/message-content.svelte.d.ts +5 -0
- package/src/shadcn/message/message-footer.svelte.d.ts +5 -0
- package/src/shadcn/message/message-group.svelte.d.ts +5 -0
- package/src/shadcn/message/message-header.svelte.d.ts +5 -0
- package/src/shadcn/message/message.svelte.d.ts +8 -0
- package/src/shadcn/message-scroller/message-scroller-button.svelte +13 -1
- package/src/shadcn/message-scroller/message-scroller-button.svelte.d.ts +9 -0
- package/src/shadcn/message-scroller/message-scroller-content.svelte.d.ts +4 -0
- package/src/shadcn/message-scroller/message-scroller-item.svelte.d.ts +4 -0
- package/src/shadcn/message-scroller/message-scroller-provider.svelte.d.ts +4 -0
- package/src/shadcn/message-scroller/message-scroller-viewport.svelte.d.ts +4 -0
- package/src/shadcn/message-scroller/message-scroller.svelte.d.ts +4 -0
- package/src/shadcn/popover/popover-close.svelte.d.ts +4 -0
- package/src/shadcn/popover/popover-content.svelte.d.ts +10 -0
- package/src/shadcn/popover/popover-description.svelte.d.ts +5 -0
- package/src/shadcn/popover/popover-header.svelte.d.ts +5 -0
- package/src/shadcn/popover/popover-portal.svelte.d.ts +3 -0
- package/src/shadcn/popover/popover-title.svelte.d.ts +5 -0
- package/src/shadcn/popover/popover-trigger.svelte.d.ts +4 -0
- package/src/shadcn/popover/popover.svelte.d.ts +3 -0
- package/src/shadcn/progress/progress.svelte.d.ts +10 -0
- package/src/shadcn/radio-group/radio-group-item.svelte +1 -1
- package/src/shadcn/radio-group/radio-group-item.svelte.d.ts +4 -0
- package/src/shadcn/radio-group/radio-group.svelte.d.ts +4 -0
- package/src/shadcn/scroll-area/scroll-area-scrollbar.svelte.d.ts +4 -0
- package/src/shadcn/scroll-area/scroll-area.svelte +1 -0
- package/src/shadcn/scroll-area/scroll-area.svelte.d.ts +11 -0
- package/src/shadcn/select/select-content.svelte.d.ts +11 -0
- package/src/shadcn/select/select-group-heading.svelte.d.ts +10 -0
- package/src/shadcn/select/select-group.svelte.d.ts +4 -0
- package/src/shadcn/select/select-item.svelte +1 -1
- package/src/shadcn/select/select-item.svelte.d.ts +4 -0
- package/src/shadcn/select/select-label.svelte.d.ts +6 -0
- package/src/shadcn/select/select-portal.svelte.d.ts +3 -0
- package/src/shadcn/select/select-scroll-down-button.svelte +1 -1
- package/src/shadcn/select/select-scroll-down-button.svelte.d.ts +4 -0
- package/src/shadcn/select/select-scroll-up-button.svelte +1 -1
- package/src/shadcn/select/select-scroll-up-button.svelte.d.ts +4 -0
- package/src/shadcn/select/select-separator.svelte.d.ts +4 -0
- package/src/shadcn/select/select-trigger.svelte +1 -0
- package/src/shadcn/select/select-trigger.svelte.d.ts +8 -0
- package/src/shadcn/select/select.svelte.d.ts +3 -0
- package/src/shadcn/separator/separator.svelte.d.ts +4 -0
- package/src/shadcn/sheet/sheet-body.svelte.d.ts +5 -0
- package/src/shadcn/sheet/sheet-close.svelte.d.ts +4 -0
- package/src/shadcn/sheet/sheet-content.svelte +5 -7
- package/src/shadcn/sheet/sheet-content.svelte.d.ts +21 -0
- package/src/shadcn/sheet/sheet-description.svelte.d.ts +4 -0
- package/src/shadcn/sheet/sheet-footer.svelte.d.ts +12 -0
- package/src/shadcn/sheet/sheet-header.svelte.d.ts +5 -0
- package/src/shadcn/sheet/sheet-overlay.svelte.d.ts +4 -0
- package/src/shadcn/sheet/sheet-portal.svelte.d.ts +3 -0
- package/src/shadcn/sheet/sheet-title.svelte.d.ts +4 -0
- package/src/shadcn/sheet/sheet-trigger.svelte.d.ts +4 -0
- package/src/shadcn/sheet/sheet.css +47 -43
- package/src/shadcn/sheet/sheet.svelte.d.ts +3 -0
- package/src/shadcn/sidebar/constants.ts +1 -1
- package/src/shadcn/sidebar/context.svelte.ts +16 -1
- package/src/shadcn/sidebar/sidebar-content.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-footer.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-group-action.svelte.d.ts +11 -0
- package/src/shadcn/sidebar/sidebar-group-content.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-group-label.svelte.d.ts +11 -0
- package/src/shadcn/sidebar/sidebar-group.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-header.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-input.svelte.d.ts +11 -0
- package/src/shadcn/sidebar/sidebar-inset.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-menu-action.svelte.d.ts +12 -0
- package/src/shadcn/sidebar/sidebar-menu-badge.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-menu-button.svelte.d.ts +31 -0
- package/src/shadcn/sidebar/sidebar-menu-item.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-menu-skeleton.svelte.d.ts +8 -0
- package/src/shadcn/sidebar/sidebar-menu-sub-button.svelte.d.ts +13 -0
- package/src/shadcn/sidebar/sidebar-menu-sub-item.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-menu-sub.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-menu.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-provider.svelte +3 -0
- package/src/shadcn/sidebar/sidebar-provider.svelte.d.ts +9 -0
- package/src/shadcn/sidebar/sidebar-rail.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-separator.svelte.d.ts +13 -0
- package/src/shadcn/sidebar/sidebar-trigger.svelte +3 -1
- package/src/shadcn/sidebar/sidebar-trigger.svelte.d.ts +8 -0
- package/src/shadcn/sidebar/sidebar.svelte +3 -0
- package/src/shadcn/sidebar/sidebar.svelte.d.ts +10 -0
- package/src/shadcn/sidebar/sidebar.test.ts +69 -0
- package/src/shadcn/skeleton/skeleton-delay.svelte.d.ts +20 -0
- package/src/shadcn/skeleton/skeleton.svelte.d.ts +5 -0
- package/src/shadcn/slider/slider.svelte.d.ts +11 -0
- package/src/shadcn/sonner/sonner.svelte +4 -4
- package/src/shadcn/sonner/sonner.svelte.d.ts +4 -0
- package/src/shadcn/spinner/spinner.svelte.d.ts +4 -0
- package/src/shadcn/switch/switch.svelte.d.ts +8 -0
- package/src/shadcn/table/table-body.svelte.d.ts +5 -0
- package/src/shadcn/table/table-caption.svelte.d.ts +5 -0
- package/src/shadcn/table/table-cell.svelte +16 -12
- package/src/shadcn/table/table-cell.svelte.d.ts +9 -0
- package/src/shadcn/table/table-footer.svelte.d.ts +5 -0
- package/src/shadcn/table/table-head.svelte.d.ts +5 -0
- package/src/shadcn/table/table-header.svelte.d.ts +5 -0
- package/src/shadcn/table/table-row.svelte.d.ts +5 -0
- package/src/shadcn/table/table.svelte.d.ts +5 -0
- package/src/shadcn/tabs/tabs-content.svelte.d.ts +4 -0
- package/src/shadcn/tabs/tabs-list.svelte.d.ts +8 -0
- package/src/shadcn/tabs/tabs-trigger.svelte.d.ts +4 -0
- package/src/shadcn/tabs/tabs.svelte.d.ts +4 -0
- package/src/shadcn/textarea/textarea.svelte.d.ts +5 -0
- package/src/shadcn/toggle/toggle.svelte.d.ts +10 -0
- package/src/shadcn/toggle-group/toggle-group-item.svelte.d.ts +6 -0
- package/src/shadcn/toggle-group/toggle-group.svelte.d.ts +15 -0
- package/src/shadcn/tooltip/tooltip-content.svelte.d.ts +11 -0
- package/src/shadcn/tooltip/tooltip-portal.svelte.d.ts +4 -0
- package/src/shadcn/tooltip/tooltip-provider.svelte.d.ts +4 -0
- package/src/shadcn/tooltip/tooltip-trigger.svelte.d.ts +4 -0
- package/src/shadcn/tooltip/tooltip.svelte.d.ts +4 -0
- package/src/shadcn/trace/trace-collapsible-content.svelte.d.ts +4 -0
- package/src/shadcn/trace/trace-collapsible-trigger.svelte +2 -2
- package/src/shadcn/trace/trace-collapsible-trigger.svelte.d.ts +4 -0
- package/src/shadcn/trace/trace-collapsible.svelte.d.ts +4 -0
- package/src/shadcn/trace/trace-description.svelte +1 -1
- package/src/shadcn/trace/trace-description.svelte.d.ts +5 -0
- package/src/shadcn/trace/trace-icon.svelte.d.ts +5 -0
- package/src/shadcn/trace/trace-line.svelte +1 -1
- package/src/shadcn/trace/trace-line.svelte.d.ts +9 -0
- package/src/shadcn/trace/trace-title.svelte.d.ts +5 -0
- package/src/shadcn/trace/trace.svelte.d.ts +5 -0
- package/src/slides/Controls.svelte +96 -92
- package/src/slides/Controls.svelte.d.ts +10 -0
- package/src/slides/Deck.svelte +65 -58
- package/src/slides/Deck.svelte.d.ts +5 -0
- package/src/slides/Fragment.svelte +25 -21
- package/src/slides/Fragment.svelte.d.ts +15 -0
- package/src/slides/Overview.svelte +65 -60
- package/src/slides/Overview.svelte.d.ts +8 -0
- package/src/slides/Presenter.svelte +146 -139
- package/src/slides/Presenter.svelte.d.ts +8 -0
- package/src/slides/README.md +1 -1
- package/src/slides/Slide.svelte +68 -63
- package/src/slides/Slide.svelte.d.ts +18 -0
- package/src/slides/SlideList.svelte.d.ts +9 -0
- package/src/slides/deck-controller.svelte.ts +3 -22
- package/src/slides/deck-keys.test.ts +49 -0
- package/src/slides/theme.css +197 -176
- package/src/slides/types.ts +2 -1
- package/src/status/index.ts +0 -1
- package/src/status/status-badge.svelte +7 -5
- package/src/status/status-badge.svelte.d.ts +28 -0
- package/src/status/status-badge.test.ts +44 -0
- package/src/status/status-dot.svelte +54 -49
- package/src/status/status-dot.svelte.d.ts +16 -0
- package/src/status/status-icon.svelte +19 -6
- package/src/status/status-icon.svelte.d.ts +14 -0
- package/src/status/status-pill.svelte +2 -8
- package/src/status/status-pill.svelte.d.ts +13 -0
- package/src/test-setup.test.ts +5 -0
- package/src/thread/thread-body.svelte.d.ts +9 -0
- package/src/thread/thread-events.svelte.d.ts +8 -0
- package/src/thread/thread-focus.svelte.test.ts +90 -0
- package/src/thread/thread.svelte +73 -21
- package/src/thread/thread.svelte.d.ts +40 -0
- package/src/tokens/base.css +47 -45
- package/src/tokens/design.css +8 -0
- package/src/tokens/index.css +3 -0
- package/src/triage/triage-plan.svelte +42 -9
- package/src/triage/triage-plan.svelte.d.ts +28 -0
- package/src/triage/triage-queue.svelte +61 -23
- package/src/triage/triage-queue.svelte.d.ts +41 -0
- package/src/triage/triage-task.svelte +11 -3
- package/src/triage/triage-task.svelte.d.ts +22 -0
- package/src/triage/triage.svelte.test.ts +130 -0
- package/src/work/README.md +8 -8
- package/src/work/dates.ts +3 -3
- package/src/work/detail/detail-types.ts +1 -29
- package/src/work/detail/task-chip.svelte.d.ts +10 -0
- package/src/work/detail/task-detail.svelte +18 -17
- package/src/work/detail/task-detail.svelte.d.ts +36 -0
- package/src/work/docs/doc-editor-page.svelte +20 -16
- package/src/work/docs/doc-editor-page.svelte.d.ts +31 -0
- package/src/work/docs/doc-menu.svelte +46 -39
- package/src/work/docs/doc-menu.svelte.d.ts +35 -0
- package/src/work/docs/edited-chip.svelte +9 -9
- package/src/work/docs/edited-chip.svelte.d.ts +26 -0
- package/src/work/docs/edited.ts +4 -7
- package/src/work/gantt/gantt-bar.svelte +87 -78
- package/src/work/gantt/gantt-bar.svelte.d.ts +29 -0
- package/src/work/gantt/gantt-grid.svelte +30 -26
- package/src/work/gantt/gantt-grid.svelte.d.ts +14 -0
- package/src/work/gantt/gantt-group-row.svelte +12 -8
- package/src/work/gantt/gantt-group-row.svelte.d.ts +12 -0
- package/src/work/gantt/gantt-header.svelte +2 -4
- package/src/work/gantt/gantt-header.svelte.d.ts +17 -0
- package/src/work/gantt/gantt-task-row.svelte +43 -36
- package/src/work/gantt/gantt-task-row.svelte.d.ts +53 -0
- package/src/work/gantt/gantt.css +14 -10
- package/src/work/gantt/gantt.test.ts +14 -2
- package/src/work/inbox/inbox-card.svelte +17 -25
- package/src/work/inbox/inbox-card.svelte.d.ts +22 -0
- package/src/work/inbox/inbox-draft.svelte +3 -3
- package/src/work/inbox/inbox-draft.svelte.d.ts +18 -0
- package/src/work/inbox/inbox-logic.ts +4 -16
- package/src/work/inbox/inbox-trace.svelte.d.ts +11 -0
- package/src/work/index.ts +1 -27
- package/src/work/kanban-board.svelte +103 -66
- package/src/work/kanban-board.svelte.d.ts +107 -0
- package/src/work/kanban-board.svelte.test.ts +89 -0
- package/src/work/kanban-column-head.svelte.d.ts +40 -0
- package/src/work/kanban-column.svelte +45 -43
- package/src/work/kanban-column.svelte.d.ts +20 -0
- package/src/work/kanban-fold-chevron.svelte +15 -11
- package/src/work/kanban-fold-chevron.svelte.d.ts +8 -0
- package/src/work/kanban-hidden-rail.svelte +2 -1
- package/src/work/kanban-hidden-rail.svelte.d.ts +39 -0
- package/src/work/kanban-keyboard.ts +8 -6
- package/src/work/task-gantt.svelte +18 -4
- package/src/work/task-gantt.svelte.d.ts +85 -0
- package/src/work/task-list.svelte +166 -116
- package/src/work/task-list.svelte.d.ts +81 -0
- package/src/work/task-list.svelte.test.ts +113 -0
- package/src/work/time/duration.ts +2 -3
- package/src/work/time/time-chip.svelte +2 -4
- package/src/work/time/time-chip.svelte.d.ts +14 -0
- package/src/work/time/time-dot.svelte +30 -25
- package/src/work/time/time-dot.svelte.d.ts +9 -0
- package/src/work/time/time-ring.svelte +15 -11
- package/src/work/time/time-ring.svelte.d.ts +18 -0
- package/src/work/time/time-tracker.svelte +49 -44
- package/src/work/time/time-tracker.svelte.d.ts +59 -0
- package/dist/ai/index.js +0 -44
- package/dist/ai/thinking-dots/index.js +0 -3
- package/dist/components/icon/index.js +0 -1
- package/dist/components/locale-switch/index.js +0 -1
- package/dist/icons/trades.js +0 -49
- package/dist/index.js +0 -18
- package/dist/record/demo-data.js +0 -485
- package/dist/status/pill-tint.js +0 -13
- package/dist/test-setup.js +0 -30
- package/dist/work/presets/sales.js +0 -39
- package/src/agents/demo.svelte +0 -137
- package/src/ai/confirmation/ConfirmationAccepted.svelte +0 -23
- package/src/ai/confirmation/ConfirmationFailed.svelte +0 -23
- package/src/ai/confirmation/ConfirmationRejected.svelte +0 -23
- package/src/ai/index.ts +0 -111
- package/src/ai/thinking-dots/ThinkingDots.svelte +0 -42
- package/src/ai/thinking-dots/index.ts +0 -5
- package/src/charts/dashboard/dashboard-empty.svelte +0 -55
- package/src/charts/dashboard/data-panel.svelte +0 -81
- package/src/charts/dashboard/data-sort-head.svelte +0 -102
- package/src/components/icon/icon.svelte +0 -23
- package/src/components/icon/index.ts +0 -1
- package/src/components/list-page/detail-empty.svelte +0 -45
- package/src/components/list-page/detail-panel.svelte +0 -82
- package/src/components/list-page/rail-empty.svelte +0 -44
- package/src/components/locale-switch/index.ts +0 -1
- package/src/components/locale-switch/locale-switch.svelte +0 -59
- package/src/components/work-parts/count-chip.svelte +0 -20
- package/src/design/index.css +0 -215
- package/src/design/polish.css +0 -150
- package/src/icons/TradeIcon.svelte +0 -16
- package/src/icons/trades.ts +0 -89
- package/src/index.ts +0 -53
- package/src/onboarding/demo.svelte +0 -105
- package/src/record/demo-data.ts +0 -352
- package/src/record/record-demo.svelte +0 -342
- package/src/slides/demo-slides.svelte +0 -382
- package/src/slides/demo.svelte +0 -180
- package/src/status/pill-tint.ts +0 -16
- package/src/test-setup.ts +0 -34
- package/src/work/demo.svelte +0 -553
- package/src/work/detail/detail-demo.svelte +0 -255
- package/src/work/detail/task-property.svelte +0 -17
- package/src/work/detail/task-thread.svelte +0 -221
- package/src/work/docs/docs-demo.svelte +0 -227
- package/src/work/presets/sales.ts +0 -16
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { describe, expect, it } from "vite-plus/test";
|
|
2
|
+
import { formatAge } from "../record/format.js";
|
|
3
|
+
import { localDay as recordDay } from "../record/logic.js";
|
|
4
|
+
import { whenOf } from "../work/inbox/inbox-logic.js";
|
|
5
|
+
import { editStamp, editedLabel, shortDate as editedDate } from "../work/docs/edited.js";
|
|
6
|
+
import { todayIso } from "../work/dates.js";
|
|
7
|
+
import { localDay as timeDay } from "../work/time/duration.js";
|
|
8
|
+
|
|
9
|
+
// The modules that kept their own date names, pinned so the shared helpers can't change a string.
|
|
10
|
+
// 10:00 UTC is the same calendar day from Hawaii to Auckland, so whenOf's date holds in any zone.
|
|
11
|
+
const NOW = Date.parse("2026-10-23T10:00:00Z");
|
|
12
|
+
const ago = (seconds: number) => new Date(NOW - seconds * 1000).toISOString();
|
|
13
|
+
|
|
14
|
+
describe("relative time", () => {
|
|
15
|
+
it("formatAge says it in long words", () => {
|
|
16
|
+
expect(formatAge(ago(20), NOW)).toBe("now");
|
|
17
|
+
expect(formatAge(ago(3 * 86_400), NOW)).toBe("3 days ago");
|
|
18
|
+
expect(formatAge(ago(-14 * 86_400), NOW)).toBe("in 2 weeks");
|
|
19
|
+
expect(formatAge(ago(70 * 86_400), NOW)).toBe("2 months ago");
|
|
20
|
+
expect(formatAge(ago(400 * 86_400), NOW)).toBe("last year");
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it("whenOf says it short, then turns to a date at four weeks", () => {
|
|
24
|
+
expect(whenOf(ago(3 * 3_600), NOW)).toBe("3 hr ago");
|
|
25
|
+
expect(whenOf(ago(86_400), NOW)).toBe("yesterday");
|
|
26
|
+
expect(whenOf(ago(40 * 86_400), NOW)).toBe("13 Sept");
|
|
27
|
+
expect(whenOf(ago(40 * 86_400), NOW, "en-US")).toBe("Sep 13");
|
|
28
|
+
expect(whenOf("Tuesday", NOW)).toBe("Tuesday");
|
|
29
|
+
expect(whenOf("2026-13-45T00:00:00Z", NOW)).toBe("");
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
describe("short date", () => {
|
|
34
|
+
const options = { now: new Date(NOW), timeZone: "UTC" };
|
|
35
|
+
|
|
36
|
+
it("adds the year only when it isn't this one", () => {
|
|
37
|
+
expect(editedDate("2026-10-23T08:00:00Z", options)).toBe("Oct 23");
|
|
38
|
+
expect(editedDate("2025-10-23T08:00:00Z", options)).toBe("Oct 23, 2025");
|
|
39
|
+
expect(editedDate("not a date", options)).toBe("");
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("builds the edited chip and stamp on it", () => {
|
|
43
|
+
expect(editStamp("2026-10-23T14:44:00Z", options)).toBe("Oct 23, 14:44");
|
|
44
|
+
expect(editedLabel("2026-10-23T14:44:00Z", "Edited", options)).toBe("Edited Oct 23");
|
|
45
|
+
expect(editedLabel(null, "Edited", options)).toBe("Edited");
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
describe("local day", () => {
|
|
50
|
+
it("reads a timestamp's day in the given zone", () => {
|
|
51
|
+
expect(recordDay("2026-10-23T23:30:00Z", "Europe/Paris")).toBe("2026-10-24");
|
|
52
|
+
expect(recordDay("2026-10-23T23:30:00Z", "UTC")).toBe("2026-10-23");
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it("reads a date's day in the viewer's zone", () => {
|
|
56
|
+
expect(timeDay(new Date(2026, 0, 5, 23, 59))).toBe("2026-01-05");
|
|
57
|
+
expect(recordDay(new Date(2026, 0, 5, 0, 1).toISOString())).toBe("2026-01-05");
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it("today matches across the modules", () => {
|
|
61
|
+
expect(todayIso()).toBe(timeDay());
|
|
62
|
+
});
|
|
63
|
+
});
|
package/src/lib/dates.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// The date strings the library shows, through Intl so a locale and a zone are all a caller passes.
|
|
2
|
+
|
|
3
|
+
type At = Date | string | number;
|
|
4
|
+
|
|
5
|
+
export type ShortDateOptions = {
|
|
6
|
+
locale?: string;
|
|
7
|
+
timeZone?: string;
|
|
8
|
+
/** Adds the year: "Oct 23, 2025". */
|
|
9
|
+
year?: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/** "Oct 23" in the caller's locale. */
|
|
13
|
+
export function shortDate(at: At, { locale, timeZone, year }: ShortDateOptions = {}): string {
|
|
14
|
+
return new Intl.DateTimeFormat(locale, {
|
|
15
|
+
month: "short",
|
|
16
|
+
day: "numeric",
|
|
17
|
+
year: year ? "numeric" : undefined,
|
|
18
|
+
timeZone,
|
|
19
|
+
}).format(new Date(at));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const UNITS: [number, Intl.RelativeTimeFormatUnit][] = [
|
|
23
|
+
[31_536_000, "year"],
|
|
24
|
+
[2_592_000, "month"],
|
|
25
|
+
[604_800, "week"],
|
|
26
|
+
[86_400, "day"],
|
|
27
|
+
[3_600, "hour"],
|
|
28
|
+
[60, "minute"],
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
export type RelativeTimeOptions = {
|
|
32
|
+
locale?: string;
|
|
33
|
+
/** `long` says "3 hours ago", `short` "3 hr ago". */
|
|
34
|
+
style?: Intl.RelativeTimeFormatStyle;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** "3 days ago", "in 2 weeks", "now": the largest whole unit between `at` and `now`. */
|
|
38
|
+
export function relativeTime(
|
|
39
|
+
at: At,
|
|
40
|
+
now: At = Date.now(),
|
|
41
|
+
{ locale, style = "long" }: RelativeTimeOptions = {},
|
|
42
|
+
): string {
|
|
43
|
+
const seconds = Math.round((new Date(at).getTime() - new Date(now).getTime()) / 1000);
|
|
44
|
+
const age = Math.abs(seconds);
|
|
45
|
+
const rtf = new Intl.RelativeTimeFormat(locale, { numeric: "auto", style });
|
|
46
|
+
for (const [size, unit] of UNITS) {
|
|
47
|
+
if (age >= size) return rtf.format(Math.round(seconds / size), unit);
|
|
48
|
+
}
|
|
49
|
+
return rtf.format(0, "second");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** The calendar day of a moment as `YYYY-MM-DD`, in the given zone or the viewer's own. Today by default. */
|
|
53
|
+
export function localDay(at: At = new Date(), timeZone?: string): string {
|
|
54
|
+
const parts = new Intl.DateTimeFormat("en-US", {
|
|
55
|
+
year: "numeric",
|
|
56
|
+
month: "2-digit",
|
|
57
|
+
day: "2-digit",
|
|
58
|
+
timeZone,
|
|
59
|
+
}).formatToParts(new Date(at));
|
|
60
|
+
const part = (type: Intl.DateTimeFormatPartTypes) =>
|
|
61
|
+
parts.find((p) => p.type === type)?.value ?? "";
|
|
62
|
+
return `${part("year")}-${part("month")}-${part("day")}`;
|
|
63
|
+
}
|
package/src/lib/focus.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { tick } from "svelte";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Focuses the first target that takes focus, a selector under root or an element, once Svelte
|
|
5
|
+
* has rendered. A moved keyed item or opened pane is a new node.
|
|
6
|
+
*/
|
|
7
|
+
export async function focusAfterRender(
|
|
8
|
+
root: ParentNode | null | undefined,
|
|
9
|
+
...targets: (string | HTMLElement | null | undefined)[]
|
|
10
|
+
): Promise<HTMLElement | undefined> {
|
|
11
|
+
await tick();
|
|
12
|
+
for (const target of targets) {
|
|
13
|
+
const el = typeof target === "string" ? root?.querySelector<HTMLElement>(target) : target;
|
|
14
|
+
if (!el?.isConnected) continue;
|
|
15
|
+
el.focus();
|
|
16
|
+
if (document.activeElement === el) return el;
|
|
17
|
+
}
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { tick } from "svelte";
|
|
3
|
+
|
|
4
|
+
let message = $state("");
|
|
5
|
+
|
|
6
|
+
/** Reads text out politely. Clearing first makes the same words read again. */
|
|
7
|
+
export async function announce(text: string): Promise<void> {
|
|
8
|
+
message = "";
|
|
9
|
+
await tick();
|
|
10
|
+
message = text;
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<div class="sr-only" role="status" aria-live="polite">{message}</div>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/*
|
|
3
|
+
* The one titled panel, exported as `DetailPanel` from list-page and used by the
|
|
4
|
+
* dashboard too. It draws its box from `panel.ts`.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// =========================
|
|
8
|
+
// IMPORTS
|
|
9
|
+
// =========================
|
|
10
|
+
import type { Snippet } from "svelte";
|
|
11
|
+
import SectionLabel from "../components/section-header/section-label.svelte";
|
|
12
|
+
import { cn } from "./utils.js";
|
|
13
|
+
import { panelHeaderClass, panelShellClass } from "./panel.js";
|
|
14
|
+
import type { PhosphorIcon } from "./icon-types.js";
|
|
15
|
+
|
|
16
|
+
// =========================
|
|
17
|
+
// TYPES
|
|
18
|
+
// =========================
|
|
19
|
+
interface Props {
|
|
20
|
+
/** What this panel is, drawn as the app's one panel label. No label, no actions: no header. */
|
|
21
|
+
label?: string;
|
|
22
|
+
labelIcon?: PhosphorIcon;
|
|
23
|
+
/** A mark the icon set lacks (a platform logo), drawn ahead of the label at the same size. */
|
|
24
|
+
labelLead?: Snippet;
|
|
25
|
+
/** A line under the label, for the scope a number was measured over. */
|
|
26
|
+
sublabel?: string;
|
|
27
|
+
/**
|
|
28
|
+
* A row count, total or freshness stamp. A prop, not an action, because
|
|
29
|
+
* hand-placed hints ended up at three type sizes on one screen.
|
|
30
|
+
*/
|
|
31
|
+
hint?: string;
|
|
32
|
+
/** Controls that act on this panel. Pinned right, after the hint. */
|
|
33
|
+
actions?: Snippet;
|
|
34
|
+
/** Off for a body that supplies its own padding: a table, a media grid, a full-bleed list. */
|
|
35
|
+
pad?: boolean;
|
|
36
|
+
/** The body scrolls sideways rather than squeezing, for a table wider than the window. */
|
|
37
|
+
scroll?: boolean;
|
|
38
|
+
/** Takes the height the panels above it left, inside a `fill` stack. One per stack. */
|
|
39
|
+
grow?: boolean;
|
|
40
|
+
children: Snippet;
|
|
41
|
+
class?: string;
|
|
42
|
+
bodyClass?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// =========================
|
|
46
|
+
// PROPS
|
|
47
|
+
// =========================
|
|
48
|
+
let {
|
|
49
|
+
label,
|
|
50
|
+
labelIcon,
|
|
51
|
+
labelLead,
|
|
52
|
+
sublabel,
|
|
53
|
+
hint,
|
|
54
|
+
actions,
|
|
55
|
+
pad = true,
|
|
56
|
+
scroll = false,
|
|
57
|
+
grow = false,
|
|
58
|
+
children,
|
|
59
|
+
class: className,
|
|
60
|
+
bodyClass,
|
|
61
|
+
}: Props = $props();
|
|
62
|
+
|
|
63
|
+
// =========================
|
|
64
|
+
// DERIVED
|
|
65
|
+
// =========================
|
|
66
|
+
let titled = $derived(Boolean(label || labelLead || sublabel));
|
|
67
|
+
let hasHeader = $derived(titled || Boolean(hint || actions));
|
|
68
|
+
</script>
|
|
69
|
+
|
|
70
|
+
<!-- =========================== -->
|
|
71
|
+
<!-- MARKUP -->
|
|
72
|
+
<!-- =========================== -->
|
|
73
|
+
<section class={cn(panelShellClass, grow && "flex min-h-0 flex-1 flex-col", className)}>
|
|
74
|
+
{#if hasHeader}
|
|
75
|
+
<div class={panelHeaderClass}>
|
|
76
|
+
{#if titled}
|
|
77
|
+
<div class="flex min-w-0 flex-col gap-0.5">
|
|
78
|
+
{#if label || labelLead}
|
|
79
|
+
<SectionLabel icon={labelIcon}>
|
|
80
|
+
{@render labelLead?.()}
|
|
81
|
+
{label}
|
|
82
|
+
</SectionLabel>
|
|
83
|
+
{/if}
|
|
84
|
+
{#if sublabel}
|
|
85
|
+
<span class="truncate text-xs text-muted-foreground">{sublabel}</span>
|
|
86
|
+
{/if}
|
|
87
|
+
</div>
|
|
88
|
+
{:else}
|
|
89
|
+
<!-- Holds the left slot so the actions stay pinned right. -->
|
|
90
|
+
<span></span>
|
|
91
|
+
{/if}
|
|
92
|
+
{#if hint || actions}
|
|
93
|
+
<div class="flex min-w-0 items-center gap-3">
|
|
94
|
+
{#if hint}
|
|
95
|
+
<span class="text-xs tabular-nums text-muted-foreground">{hint}</span>
|
|
96
|
+
{/if}
|
|
97
|
+
{#if actions}
|
|
98
|
+
<div class="flex min-w-0 flex-wrap items-center justify-end gap-2">
|
|
99
|
+
{@render actions()}
|
|
100
|
+
</div>
|
|
101
|
+
{/if}
|
|
102
|
+
</div>
|
|
103
|
+
{/if}
|
|
104
|
+
</div>
|
|
105
|
+
{/if}
|
|
106
|
+
<div
|
|
107
|
+
class={cn(
|
|
108
|
+
pad && "p-4",
|
|
109
|
+
scroll && "overflow-x-auto",
|
|
110
|
+
grow && "flex min-h-0 flex-1 flex-col",
|
|
111
|
+
bodyClass,
|
|
112
|
+
)}
|
|
113
|
+
>
|
|
114
|
+
{@render children()}
|
|
115
|
+
</div>
|
|
116
|
+
</section>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
import type { PhosphorIcon } from "./icon-types.js";
|
|
3
|
+
interface Props {
|
|
4
|
+
/** What this panel is, drawn as the app's one panel label. No label, no actions: no header. */
|
|
5
|
+
label?: string;
|
|
6
|
+
labelIcon?: PhosphorIcon;
|
|
7
|
+
/** A mark the icon set lacks (a platform logo), drawn ahead of the label at the same size. */
|
|
8
|
+
labelLead?: Snippet;
|
|
9
|
+
/** A line under the label, for the scope a number was measured over. */
|
|
10
|
+
sublabel?: string;
|
|
11
|
+
/**
|
|
12
|
+
* A row count, total or freshness stamp. A prop, not an action, because
|
|
13
|
+
* hand-placed hints ended up at three type sizes on one screen.
|
|
14
|
+
*/
|
|
15
|
+
hint?: string;
|
|
16
|
+
/** Controls that act on this panel. Pinned right, after the hint. */
|
|
17
|
+
actions?: Snippet;
|
|
18
|
+
/** Off for a body that supplies its own padding: a table, a media grid, a full-bleed list. */
|
|
19
|
+
pad?: boolean;
|
|
20
|
+
/** The body scrolls sideways rather than squeezing, for a table wider than the window. */
|
|
21
|
+
scroll?: boolean;
|
|
22
|
+
/** Takes the height the panels above it left, inside a `fill` stack. One per stack. */
|
|
23
|
+
grow?: boolean;
|
|
24
|
+
children: Snippet;
|
|
25
|
+
class?: string;
|
|
26
|
+
bodyClass?: string;
|
|
27
|
+
}
|
|
28
|
+
declare const $$Component: import("svelte").Component<Props, {}, "">;
|
|
29
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
30
|
+
export default $$Component;
|
package/src/lib/panel.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** The one panel shell: a titled box holding a table, a chart or a stack. */
|
|
2
2
|
|
|
3
|
-
//
|
|
4
|
-
//
|
|
3
|
+
// Tokens beside `panel.svelte`, because skeletons and hand-built cards draw this
|
|
4
|
+
// same edge without the panel's header.
|
|
5
5
|
|
|
6
6
|
// Dashboards used `Card`, so /ads had a ring and a shadow where /social had a
|
|
7
7
|
// hairline. Flat, one hairline, `rounded-xl`.
|
package/src/lib/tone.ts
CHANGED
|
@@ -15,6 +15,20 @@ export const TONE_CLASS: Record<Tone, string> = {
|
|
|
15
15
|
destructive: "border-destructive/30 bg-destructive/10 text-destructive-ink",
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* A quiet borderless tint: icon and text carry the tone. Neutral reads off the foreground,
|
|
20
|
+
* since `bg-muted` sits 0.005 L from the canvas and vanishes there.
|
|
21
|
+
*/
|
|
22
|
+
export const TONE_TINT: Record<Tone, string> = {
|
|
23
|
+
neutral: "bg-foreground/6 text-muted-foreground",
|
|
24
|
+
accent:
|
|
25
|
+
"bg-[color-mix(in_oklab,var(--tone-accent,var(--color-primary))_12%,transparent)] text-[color:var(--tone-accent,var(--color-primary))]",
|
|
26
|
+
info: "bg-info/12 text-info-800 dark:text-info-400",
|
|
27
|
+
success: "bg-success/12 text-success-800 dark:text-success-400",
|
|
28
|
+
warning: "bg-warning/14 text-warning-800 dark:text-warning-400",
|
|
29
|
+
destructive: "bg-destructive/10 text-destructive-ink",
|
|
30
|
+
};
|
|
31
|
+
|
|
18
32
|
/** The same scale as text, for a verdict inside a line of muted facts. */
|
|
19
33
|
export const TONE_TEXT: Record<Tone, string> = {
|
|
20
34
|
neutral: "text-muted-foreground",
|
|
@@ -22,7 +36,7 @@ export const TONE_TEXT: Record<Tone, string> = {
|
|
|
22
36
|
info: "text-info-800 dark:text-info-400",
|
|
23
37
|
success: "text-success-800 dark:text-success-400",
|
|
24
38
|
warning: "text-warning-800 dark:text-warning-400",
|
|
25
|
-
destructive: "text-destructive",
|
|
39
|
+
destructive: "text-destructive-ink",
|
|
26
40
|
};
|
|
27
41
|
|
|
28
42
|
/** The same scale as icon color. */
|
package/src/modules.test.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
-
import { dirname, join } from "node:path";
|
|
1
|
+
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
2
|
+
import { dirname, join, relative } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { describe, expect, it } from "vite-plus/test";
|
|
5
5
|
import * as record from "./record/index.js";
|
|
@@ -7,12 +7,95 @@ import * as inbox from "./inbox/index.js";
|
|
|
7
7
|
import * as thread from "./thread/index.js";
|
|
8
8
|
import * as triage from "./triage/index.js";
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
) as {
|
|
10
|
+
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
11
|
+
const pkg = JSON.parse(readFileSync(join(root, "package.json"), "utf8")) as {
|
|
13
12
|
exports: Record<string, string | Record<string, string>>;
|
|
14
13
|
};
|
|
15
14
|
|
|
15
|
+
const targetOf = (v: string | Record<string, string>) =>
|
|
16
|
+
typeof v === "string" ? v : (v.svelte ?? v.default);
|
|
17
|
+
|
|
18
|
+
/** A relative or `#src` specifier as a `.ts` or `.svelte` file, or null for a package. */
|
|
19
|
+
function resolveSpec(from: string, spec: string): string | null {
|
|
20
|
+
if (!spec.startsWith("#src/") && !spec.startsWith(".")) return null;
|
|
21
|
+
const p = spec.startsWith("#src/") ? join(root, "src", spec.slice(5)) : join(dirname(from), spec);
|
|
22
|
+
const hit = [p, p.replace(/\.js$/, ".ts"), `${p}.ts`, join(p, "index.ts")].find(
|
|
23
|
+
(c) => /\.(ts|svelte)$/.test(c) && existsSync(c),
|
|
24
|
+
);
|
|
25
|
+
return hit ?? null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type Origin = { file: string; name: string };
|
|
29
|
+
const origins = new Map<string, Map<string, Origin>>();
|
|
30
|
+
|
|
31
|
+
/** Each name a module exports, traced through re-exports to the file and name that define it. */
|
|
32
|
+
function exportsOf(file: string): Map<string, Origin> {
|
|
33
|
+
const known = origins.get(file);
|
|
34
|
+
if (known) return known;
|
|
35
|
+
const out = new Map<string, Origin>();
|
|
36
|
+
origins.set(file, out);
|
|
37
|
+
if (file.endsWith(".svelte")) return out.set("default", { file, name: "default" });
|
|
38
|
+
|
|
39
|
+
const code = readFileSync(file, "utf8")
|
|
40
|
+
.replace(/\/\*[\s\S]*?\*\//g, "")
|
|
41
|
+
.replace(/\/\/.*$/gm, "");
|
|
42
|
+
const trace = (src: string | null, name: string): Origin =>
|
|
43
|
+
(src && exportsOf(src).get(name)) || { file: src ?? file, name };
|
|
44
|
+
const specifiers = (list: string) =>
|
|
45
|
+
list
|
|
46
|
+
.split(",")
|
|
47
|
+
.map((part) => part.trim().replace(/^type\s+/, ""))
|
|
48
|
+
.filter(Boolean)
|
|
49
|
+
.map((part) => part.split(/\s+as\s+/));
|
|
50
|
+
|
|
51
|
+
const imported = new Map<string, Origin>();
|
|
52
|
+
for (const [, def, list = "", spec] of code.matchAll(
|
|
53
|
+
/import\s+(?:type\s+)?([\w$]+)?\s*,?\s*(?:\{([^}]*)\})?\s*from\s*["']([^"']+)["']/g,
|
|
54
|
+
)) {
|
|
55
|
+
const src = resolveSpec(file, spec);
|
|
56
|
+
if (def) imported.set(def, trace(src, "default"));
|
|
57
|
+
for (const [name, local = name] of specifiers(list)) imported.set(local, trace(src, name));
|
|
58
|
+
}
|
|
59
|
+
for (const [, list, spec] of code.matchAll(
|
|
60
|
+
/export\s+(?:type\s+)?\{([^}]*)\}(?:\s*from\s*["']([^"']+)["'])?/g,
|
|
61
|
+
)) {
|
|
62
|
+
const src = spec ? resolveSpec(file, spec) : null;
|
|
63
|
+
for (const [name, as = name] of specifiers(list))
|
|
64
|
+
out.set(as, spec ? trace(src, name) : (imported.get(name) ?? { file, name }));
|
|
65
|
+
}
|
|
66
|
+
for (const [, spec] of code.matchAll(/export\s+\*\s+from\s*["']([^"']+)["']/g)) {
|
|
67
|
+
const src = resolveSpec(file, spec);
|
|
68
|
+
if (src) for (const [name, at] of exportsOf(src)) if (name !== "default") out.set(name, at);
|
|
69
|
+
}
|
|
70
|
+
for (const [, name] of code.matchAll(
|
|
71
|
+
/export\s+(?:declare\s+)?(?:async\s+)?(?:const|let|function\*?|class|type|interface|enum)\s+([\w$]+)/g,
|
|
72
|
+
))
|
|
73
|
+
out.set(name, { file, name });
|
|
74
|
+
return out;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Every public module path and its file, wildcards expanded. The `./canvas/*` deep paths stay beside the barrel in 3.0. */
|
|
78
|
+
function publicModules(): Map<string, string> {
|
|
79
|
+
const modules = new Map<string, string>();
|
|
80
|
+
for (const [key, value] of Object.entries(pkg.exports)) {
|
|
81
|
+
const target = targetOf(value);
|
|
82
|
+
if (!/\.(ts|svelte)$/.test(target) || key.startsWith("./canvas/")) continue;
|
|
83
|
+
if (!key.includes("*")) {
|
|
84
|
+
modules.set(key, join(root, target));
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
const [head, tail] = target.split("*");
|
|
88
|
+
for (const entry of readdirSync(join(root, head), { withFileTypes: true })) {
|
|
89
|
+
const { name } = entry;
|
|
90
|
+
const stem = entry.isDirectory() ? name : name.endsWith(tail) && name.slice(0, -tail.length);
|
|
91
|
+
if (!stem) continue;
|
|
92
|
+
const file = join(root, head + stem + tail);
|
|
93
|
+
if (existsSync(file) && !file.endsWith(".test.ts")) modules.set(key.replace("*", stem), file);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return modules;
|
|
97
|
+
}
|
|
98
|
+
|
|
16
99
|
describe("module split", () => {
|
|
17
100
|
it("holds the record page's names", () => {
|
|
18
101
|
expect(record.RecordShell).toBeDefined();
|
|
@@ -30,10 +113,9 @@ describe("module split", () => {
|
|
|
30
113
|
});
|
|
31
114
|
|
|
32
115
|
it("resolves every export path to a file", () => {
|
|
33
|
-
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
34
116
|
const missing: string[] = [];
|
|
35
117
|
for (const [name, target] of Object.entries(pkg.exports)) {
|
|
36
|
-
const path =
|
|
118
|
+
const path = targetOf(target);
|
|
37
119
|
if (path.includes("*") || path.endsWith(".css")) continue;
|
|
38
120
|
if (!existsSync(join(root, path))) missing.push(`${name} -> ${path}`);
|
|
39
121
|
}
|
|
@@ -54,4 +136,34 @@ describe("module split", () => {
|
|
|
54
136
|
}
|
|
55
137
|
expect(Object.keys(pkg.exports).filter((name) => name.startsWith("./tasks"))).toEqual([]);
|
|
56
138
|
});
|
|
139
|
+
|
|
140
|
+
it("ships no demo, the docs site holds them", () => {
|
|
141
|
+
expect(Object.keys(pkg.exports).filter((name) => name.includes("demo"))).toEqual([]);
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
it("has no package root, every import names its subpath", () => {
|
|
145
|
+
expect(pkg.exports["."]).toBeUndefined();
|
|
146
|
+
expect(existsSync(join(root, "src/index.ts"))).toBe(false);
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
it("reaches each value and type through one public path", () => {
|
|
150
|
+
const paths = new Map<string, string[]>();
|
|
151
|
+
for (const [key, file] of publicModules())
|
|
152
|
+
for (const [name, at] of exportsOf(file)) {
|
|
153
|
+
const id = `${relative(join(root, "src"), at.file)}#${at.name}`;
|
|
154
|
+
paths.set(id, [...(paths.get(id) ?? []), `${key} :: ${name}`]);
|
|
155
|
+
}
|
|
156
|
+
const twice = [...paths]
|
|
157
|
+
.filter(([, at]) => new Set(at.map((a) => a.split(" :: ")[0])).size > 1)
|
|
158
|
+
.map(([id, at]) => `${id} <- ${at.join(", ")}`);
|
|
159
|
+
expect(twice).toEqual([]);
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
it("traces a re-export to its source and expands wildcards, so a clean run means something", () => {
|
|
163
|
+
const twice = [...exportsOf(join(root, "src/components/list-page/index.ts"))].filter(([, at]) =>
|
|
164
|
+
at.file.endsWith("lib/panel.svelte"),
|
|
165
|
+
);
|
|
166
|
+
expect(twice.map(([name]) => name)).toEqual(["DetailPanel"]);
|
|
167
|
+
expect(publicModules().get("./lib/tone.js")).toBe(join(root, "src/lib/tone.ts"));
|
|
168
|
+
});
|
|
57
169
|
});
|
package/src/onboarding/README.md
CHANGED
|
@@ -104,8 +104,8 @@ interface SeenStore {
|
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
The store keeps a version, not a boolean. Raise a tour's `version` after the page changes and everyone sees it
|
|
107
|
-
again. `localStorageStore(key?)` and `memoryStore(initial?)` come with
|
|
108
|
-
`@heyramzi/ui/onboarding
|
|
107
|
+
again. `localStorageStore(key?)` and `memoryStore(initial?)` come with
|
|
108
|
+
`@heyramzi/ui/onboarding`. Server stores belong in the app: a table keyed by user and tour id, and a `fetch`
|
|
109
109
|
adapter.
|
|
110
110
|
|
|
111
111
|
If `load` rejects, no tour shows that session.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SeenStore, Strings, Tour } from "./types.js";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
tours: readonly Tour[];
|
|
4
|
+
store: SeenStore;
|
|
5
|
+
strings: Strings;
|
|
6
|
+
/** `page.route.id`. A tour runs on the route it names. */
|
|
7
|
+
routeId: string | null | undefined;
|
|
8
|
+
/** False while signed out, or anywhere a tour has no business starting. */
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
/** Press `?` to replay this page's tour. */
|
|
11
|
+
replayKey?: boolean;
|
|
12
|
+
/** How long to wait for the first target before giving the tour up. */
|
|
13
|
+
waitMs?: number;
|
|
14
|
+
};
|
|
15
|
+
declare const $$Component: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
16
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
17
|
+
export default $$Component;
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
strings,
|
|
18
18
|
titleAttrs,
|
|
19
19
|
bodyAttrs,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
onClose,
|
|
21
|
+
onPrev,
|
|
22
|
+
onNext,
|
|
23
23
|
}: {
|
|
24
24
|
title: string;
|
|
25
25
|
body: string;
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
strings: Strings;
|
|
31
31
|
titleAttrs: Attrs;
|
|
32
32
|
bodyAttrs: Attrs;
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
onClose: () => void;
|
|
34
|
+
onPrev: () => void;
|
|
35
35
|
/** The last step's button reads "done", and this closes the tour. */
|
|
36
|
-
|
|
36
|
+
onNext: () => void;
|
|
37
37
|
} = $props();
|
|
38
38
|
|
|
39
39
|
const last = $derived(index === total - 1);
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
{title}
|
|
56
56
|
</h2>
|
|
57
57
|
<Button
|
|
58
|
-
onclick={
|
|
58
|
+
onclick={onClose}
|
|
59
59
|
variant="ghost"
|
|
60
60
|
size="sm"
|
|
61
61
|
icon
|
|
62
62
|
class="-mt-1 -mr-1.5 text-muted-foreground"
|
|
63
63
|
aria-label={strings.skip}
|
|
64
64
|
>
|
|
65
|
-
<X weight="bold" />
|
|
65
|
+
<X aria-hidden="true" weight="bold" />
|
|
66
66
|
</Button>
|
|
67
67
|
</div>
|
|
68
68
|
<p {...bodyAttrs} class="text-muted-foreground text-sm text-pretty">{body}</p>
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
{/if}
|
|
89
89
|
<div class="flex items-center gap-2">
|
|
90
90
|
{#if index > 0}
|
|
91
|
-
<Button onclick={
|
|
91
|
+
<Button onclick={onPrev} variant="ghost" size="sm">{strings.back}</Button>
|
|
92
92
|
{/if}
|
|
93
|
-
<Button onclick={
|
|
93
|
+
<Button onclick={onNext} size="sm">{last ? strings.done : strings.next}</Button>
|
|
94
94
|
</div>
|
|
95
95
|
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
+
import type { Strings } from "./types.js";
|
|
3
|
+
type Attrs = HTMLAttributes<HTMLElement>;
|
|
4
|
+
type $$ComponentProps = {
|
|
5
|
+
title: string;
|
|
6
|
+
body: string;
|
|
7
|
+
image?: string;
|
|
8
|
+
intro?: boolean;
|
|
9
|
+
index: number;
|
|
10
|
+
total: number;
|
|
11
|
+
strings: Strings;
|
|
12
|
+
titleAttrs: Attrs;
|
|
13
|
+
bodyAttrs: Attrs;
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
onPrev: () => void;
|
|
16
|
+
/** The last step's button reads "done", and this closes the tour. */
|
|
17
|
+
onNext: () => void;
|
|
18
|
+
};
|
|
19
|
+
declare const $$Component: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
20
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
21
|
+
export default $$Component;
|