@heyramzi/ui 2.24.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 +13 -9
- package/README.md +5 -4
- 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 -1
- package/dist/components/data-table/menu-key.js +19 -0
- package/dist/components/list-page/index.js +0 -1
- 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 +2 -2
- package/dist/editor/extensions.js +14 -1
- 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/focus.js +15 -0
- package/dist/lib/tone.js +3 -4
- 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/index.js +0 -1
- package/dist/work/kanban-keyboard.js +10 -5
- package/package.json +36 -106
- 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 +20 -4
- 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/ConfirmationState.svelte.d.ts +10 -0
- package/src/ai/confirmation/ConfirmationTitle.svelte.d.ts +9 -0
- 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.d.ts +7 -0
- 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.d.ts +12 -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 +286 -277
- package/src/canvas/ui/tools.test.ts +39 -0
- package/src/canvas/ui/tools.ts +8 -0
- package/src/charts/README.md +2 -2
- 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 +42 -10
- package/src/charts/area-chart.svelte.d.ts +60 -0
- package/src/charts/bar-chart.css +112 -102
- package/src/charts/bar-chart.svelte +39 -41
- 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 +1 -1
- package/src/charts/dashboard/data-table.svelte.d.ts +86 -0
- package/src/charts/dashboard/index.ts +0 -1
- 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.d.ts +9 -0
- package/src/charts/dashboard/stat-band.svelte.d.ts +14 -0
- package/src/charts/dashboard/stat-tile.svelte +9 -5
- 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 +61 -37
- 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/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 +43 -10
- 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.d.ts +12 -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/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 +7 -6
- package/src/components/data-table/row-context-menu.svelte.d.ts +15 -0
- package/src/components/data-table/sortable-head.svelte +13 -18
- 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/language-flag.svelte +2 -1
- 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 +16 -12
- 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 +1 -1
- package/src/components/list-page/filter-popover.svelte.d.ts +20 -0
- package/src/components/list-page/grouped-list.svelte +1 -0
- package/src/components/list-page/grouped-list.svelte.d.ts +49 -0
- package/src/components/list-page/index.ts +0 -1
- 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.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 +1 -1
- package/src/components/segmented/segment.svelte.d.ts +30 -0
- package/src/components/segmented/segmented-filter.svelte +4 -4
- 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 +34 -28
- package/src/components/table-view/table-view.svelte.d.ts +96 -0
- package/src/components/table-view/table-view.test.ts +32 -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.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 +3 -3
- 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/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 +81 -62
- package/src/effects/marquee/Marquee.svelte +1 -0
- 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 +1 -1
- package/src/inbox/thread-inbox.svelte.d.ts +52 -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 +2 -2
- package/src/lib/panel.svelte.d.ts +30 -0
- package/src/lib/tone.ts +3 -4
- 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 +4 -9
- package/src/panel/side-panel.svelte.d.ts +48 -0
- package/src/record/field-section.svelte.d.ts +19 -0
- package/src/record/info-list.svelte +4 -3
- package/src/record/info-list.svelte.d.ts +25 -0
- 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.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 +9 -9
- 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.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 +70 -15
- 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 -7
- package/src/work/detail/task-chip.svelte.d.ts +10 -0
- 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 +44 -38
- 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/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 +13 -16
- 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-trace.svelte.d.ts +11 -0
- package/src/work/index.ts +0 -24
- 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/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 -40
- package/dist/index.js +0 -18
- package/dist/record/demo-data.js +0 -485
- package/dist/test-setup.js +0 -30
- package/src/agents/demo.svelte +0 -137
- package/src/ai/index.ts +0 -101
- package/src/design/index.css +0 -215
- package/src/design/polish.css +0 -150
- 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/test-setup.ts +0 -34
- package/src/work/demo.svelte +0 -561
- package/src/work/detail/detail-demo.svelte +0 -258
- package/src/work/docs/docs-demo.svelte +0 -227
package/src/editor/editor.svelte
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// IMPORTS
|
|
4
4
|
// =========================
|
|
5
5
|
import { Editor } from "@tiptap/core";
|
|
6
|
+
import { NodeSelection } from "@tiptap/pm/state";
|
|
6
7
|
import { untrack } from "svelte";
|
|
7
8
|
import "./content.css";
|
|
8
9
|
import "./doc-page.css";
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
// =========================
|
|
20
21
|
interface Props {
|
|
21
22
|
content?: Record<string, unknown> | null;
|
|
22
|
-
|
|
23
|
+
onContentChange?: (json: Record<string, unknown>) => void;
|
|
23
24
|
placeholder?: string;
|
|
24
25
|
minHeight?: string;
|
|
25
26
|
preset?: "full" | "notes";
|
|
@@ -32,9 +33,11 @@
|
|
|
32
33
|
/** The word on a heading's hover button, for `page`. */
|
|
33
34
|
copyLinkLabel?: string;
|
|
34
35
|
/** A heading's link was copied. */
|
|
35
|
-
|
|
36
|
+
onCopyLink?: (url: string, id: string) => void;
|
|
36
37
|
/** The live editor, for a host that needs focus or the document. */
|
|
37
38
|
instance?: Editor | null;
|
|
39
|
+
/** The editable region's accessible name. */
|
|
40
|
+
label?: string;
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
// =========================
|
|
@@ -42,15 +45,16 @@
|
|
|
42
45
|
// =========================
|
|
43
46
|
let {
|
|
44
47
|
content = null,
|
|
45
|
-
|
|
48
|
+
onContentChange,
|
|
46
49
|
placeholder = "Start writing...",
|
|
47
50
|
minHeight = "28rem",
|
|
48
51
|
preset = "full",
|
|
49
52
|
blockIds = false,
|
|
50
53
|
variant = "box",
|
|
51
54
|
copyLinkLabel = "Copy link",
|
|
52
|
-
|
|
55
|
+
onCopyLink,
|
|
53
56
|
instance = $bindable(null),
|
|
57
|
+
label = "Text editor",
|
|
54
58
|
}: Props = $props();
|
|
55
59
|
|
|
56
60
|
// =========================
|
|
@@ -66,6 +70,9 @@
|
|
|
66
70
|
let slashMenuPos = $state({ top: 0, left: 0 });
|
|
67
71
|
let slashSelectedIndex = $state(0);
|
|
68
72
|
let slashMenuEl: HTMLDivElement | undefined = $state();
|
|
73
|
+
const uid = $props.id();
|
|
74
|
+
const slashMenuId = `${uid}-slash`;
|
|
75
|
+
let toolbar: EditorToolbar | undefined = $state();
|
|
69
76
|
|
|
70
77
|
// Image toolbar
|
|
71
78
|
let showImageToolbar = $state(false);
|
|
@@ -101,6 +108,19 @@
|
|
|
101
108
|
}
|
|
102
109
|
});
|
|
103
110
|
|
|
111
|
+
// Focus stays in the text while the menu is open, so the text points at the highlighted command.
|
|
112
|
+
$effect(() => {
|
|
113
|
+
const dom = editor?.view.dom;
|
|
114
|
+
if (!dom) return;
|
|
115
|
+
if (showSlashMenu && slashItems.length > 0) {
|
|
116
|
+
dom.setAttribute("aria-controls", slashMenuId);
|
|
117
|
+
dom.setAttribute("aria-activedescendant", `${slashMenuId}-${slashSelectedIndex}`);
|
|
118
|
+
} else {
|
|
119
|
+
dom.removeAttribute("aria-controls");
|
|
120
|
+
dom.removeAttribute("aria-activedescendant");
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
104
124
|
// Close menus on outside click
|
|
105
125
|
$effect(() => {
|
|
106
126
|
if (!showSlashMenu && !showImageToolbar) return;
|
|
@@ -175,6 +195,18 @@
|
|
|
175
195
|
};
|
|
176
196
|
}
|
|
177
197
|
|
|
198
|
+
function openImageToolbar(img: HTMLImageElement) {
|
|
199
|
+
const rect = img.getBoundingClientRect();
|
|
200
|
+
const wrapperRect = editorElement?.getBoundingClientRect();
|
|
201
|
+
if (!wrapperRect) return;
|
|
202
|
+
activeImageElement = img;
|
|
203
|
+
imageToolbarPos = {
|
|
204
|
+
top: rect.top - wrapperRect.top - 40,
|
|
205
|
+
left: rect.left - wrapperRect.left + rect.width / 2 - 60,
|
|
206
|
+
};
|
|
207
|
+
showImageToolbar = true;
|
|
208
|
+
}
|
|
209
|
+
|
|
178
210
|
function setImageAlignment(align: "left" | "center" | "right") {
|
|
179
211
|
if (!editor || !activeImageElement) return;
|
|
180
212
|
const { state } = editor;
|
|
@@ -230,7 +262,7 @@
|
|
|
230
262
|
preset,
|
|
231
263
|
placeholder,
|
|
232
264
|
blockIds,
|
|
233
|
-
anchors: variant === "page" ? { label: copyLinkLabel,
|
|
265
|
+
anchors: variant === "page" ? { label: copyLinkLabel, onCopy: onCopyLink } : false,
|
|
234
266
|
});
|
|
235
267
|
|
|
236
268
|
editorInstance = new Editor({
|
|
@@ -238,7 +270,21 @@
|
|
|
238
270
|
extensions,
|
|
239
271
|
content: content ?? { type: "doc", content: [{ type: "paragraph" }] },
|
|
240
272
|
editorProps: {
|
|
273
|
+
// A function, so ProseMirror reads the current label on every update.
|
|
274
|
+
attributes: () => ({ "aria-label": label }),
|
|
241
275
|
handleKeyDown: (_view, event) => {
|
|
276
|
+
const mod = event.metaKey || event.ctrlKey;
|
|
277
|
+
if (
|
|
278
|
+
mod &&
|
|
279
|
+
!event.altKey &&
|
|
280
|
+
!event.shiftKey &&
|
|
281
|
+
event.key.toLowerCase() === "k" &&
|
|
282
|
+
toolbar
|
|
283
|
+
) {
|
|
284
|
+
event.preventDefault();
|
|
285
|
+
toolbar.toggleLink();
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
242
288
|
// No items means no menu on screen, so Enter and the arrows stay the editor's.
|
|
243
289
|
if (showSlashMenu && slashItems.length > 0) {
|
|
244
290
|
if (event.key === "ArrowDown") {
|
|
@@ -274,17 +320,8 @@
|
|
|
274
320
|
// this one needs only the event.
|
|
275
321
|
handleClick(_view, _pos, event) {
|
|
276
322
|
const target = event.target as HTMLElement;
|
|
277
|
-
if (preset === "full" && target
|
|
278
|
-
|
|
279
|
-
const rect = target.getBoundingClientRect();
|
|
280
|
-
const wrapperRect = editorElement?.getBoundingClientRect();
|
|
281
|
-
if (wrapperRect) {
|
|
282
|
-
imageToolbarPos = {
|
|
283
|
-
top: rect.top - wrapperRect.top - 40,
|
|
284
|
-
left: rect.left - wrapperRect.left + rect.width / 2 - 60,
|
|
285
|
-
};
|
|
286
|
-
showImageToolbar = true;
|
|
287
|
-
}
|
|
323
|
+
if (preset === "full" && target instanceof HTMLImageElement) {
|
|
324
|
+
openImageToolbar(target);
|
|
288
325
|
return true;
|
|
289
326
|
}
|
|
290
327
|
showImageToolbar = false;
|
|
@@ -292,8 +329,22 @@
|
|
|
292
329
|
return false;
|
|
293
330
|
},
|
|
294
331
|
},
|
|
332
|
+
// Arrowing onto an image selects it as a node: the same toolbar opens, next in Tab order.
|
|
333
|
+
onSelectionUpdate: ({ editor: e }) => {
|
|
334
|
+
if (preset !== "full") return;
|
|
335
|
+
const { selection } = e.state;
|
|
336
|
+
const isImage = selection instanceof NodeSelection && selection.node.type.name === "image";
|
|
337
|
+
const dom = isImage ? e.view.nodeDOM(selection.from) : null;
|
|
338
|
+
const img =
|
|
339
|
+
dom instanceof HTMLImageElement ? dom : (dom as Element | null)?.querySelector("img");
|
|
340
|
+
if (img) openImageToolbar(img);
|
|
341
|
+
else if (showImageToolbar) {
|
|
342
|
+
showImageToolbar = false;
|
|
343
|
+
activeImageElement = null;
|
|
344
|
+
}
|
|
345
|
+
},
|
|
295
346
|
onUpdate: ({ editor: e }) => {
|
|
296
|
-
|
|
347
|
+
onContentChange?.(e.getJSON());
|
|
297
348
|
|
|
298
349
|
const { from } = e.state.selection;
|
|
299
350
|
const textBefore = e.state.doc.textBetween(Math.max(0, from - SLASH_WINDOW), from, "\n");
|
|
@@ -325,8 +376,8 @@
|
|
|
325
376
|
};
|
|
326
377
|
}
|
|
327
378
|
|
|
328
|
-
// Only the element mounts the editor. Read tracked, `content` (fed back by
|
|
329
|
-
// `tick++` each transaction makes would destroy and rebuild it until Svelte stops the loop.
|
|
379
|
+
// Only the element mounts the editor. Read tracked, `content` (fed back by onContentChange) and
|
|
380
|
+
// the `tick++` each transaction makes would destroy and rebuild it until Svelte stops the loop.
|
|
330
381
|
$effect(() => {
|
|
331
382
|
if (editorElement) return untrack(mount);
|
|
332
383
|
});
|
|
@@ -343,7 +394,13 @@
|
|
|
343
394
|
style="--editor-min-height: {minHeight};"
|
|
344
395
|
>
|
|
345
396
|
{#if !isPage}
|
|
346
|
-
<EditorToolbar
|
|
397
|
+
<EditorToolbar
|
|
398
|
+
bind:this={toolbar}
|
|
399
|
+
{editor}
|
|
400
|
+
{tick}
|
|
401
|
+
{preset}
|
|
402
|
+
onInsertYoutube={insertYoutubeVideo}
|
|
403
|
+
/>
|
|
347
404
|
{/if}
|
|
348
405
|
|
|
349
406
|
<!-- Editor surface -->
|
|
@@ -352,17 +409,18 @@
|
|
|
352
409
|
<!-- Slash command menu -->
|
|
353
410
|
{#if showSlashMenu && slashItems.length > 0}
|
|
354
411
|
<SlashMenu
|
|
412
|
+
id={slashMenuId}
|
|
355
413
|
items={slashItems}
|
|
356
414
|
pos={slashMenuPos}
|
|
357
415
|
bind:selectedIndex={slashSelectedIndex}
|
|
358
416
|
bind:el={slashMenuEl}
|
|
359
|
-
|
|
417
|
+
onSelect={executeSlashCommand}
|
|
360
418
|
/>
|
|
361
419
|
{/if}
|
|
362
420
|
|
|
363
421
|
<!-- Image toolbar (full preset only) -->
|
|
364
422
|
{#if preset === "full" && showImageToolbar}
|
|
365
|
-
<ImageToolbar pos={imageToolbarPos}
|
|
423
|
+
<ImageToolbar pos={imageToolbarPos} onAlign={setImageAlignment} onDelete={deleteActiveImage} />
|
|
366
424
|
{/if}
|
|
367
425
|
|
|
368
426
|
<!-- Status bar -->
|
|
@@ -377,167 +435,170 @@
|
|
|
377
435
|
<!-- STYLE -->
|
|
378
436
|
<!-- =========================== -->
|
|
379
437
|
<style>
|
|
380
|
-
|
|
381
|
-
.editor-wrapper {
|
|
382
|
-
position: relative;
|
|
383
|
-
border-radius: var(--radius-xl);
|
|
384
|
-
background: var(--color-card);
|
|
385
|
-
border: 1px solid var(--color-border);
|
|
386
|
-
transition:
|
|
387
|
-
border-color var(--duration-quick) var(--ease-smooth-out),
|
|
388
|
-
box-shadow var(--duration-quick) var(--ease-smooth-out);
|
|
389
|
-
}
|
|
438
|
+
@layer theme, base, components, utilities;
|
|
390
439
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
440
|
+
@layer components {
|
|
441
|
+
/* ---- WRAPPER ---- */
|
|
442
|
+
.editor-wrapper {
|
|
443
|
+
position: relative;
|
|
444
|
+
border-radius: var(--radius-xl);
|
|
445
|
+
background: var(--color-card);
|
|
446
|
+
border: 1px solid var(--color-border);
|
|
447
|
+
transition:
|
|
448
|
+
border-color var(--duration-quick) var(--ease-smooth-out),
|
|
449
|
+
box-shadow var(--duration-quick) var(--ease-smooth-out);
|
|
450
|
+
}
|
|
395
451
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
background: transparent;
|
|
401
|
-
}
|
|
452
|
+
.editor-wrapper.focused {
|
|
453
|
+
border-color: oklch(from var(--color-brand) l c h / 0.25);
|
|
454
|
+
box-shadow: 0 0 0 3px oklch(from var(--color-brand) l c h / 0.06);
|
|
455
|
+
}
|
|
402
456
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
457
|
+
/* A document page owns its frame, so the editor draws none. */
|
|
458
|
+
.editor-wrapper.page {
|
|
459
|
+
border: 0;
|
|
460
|
+
border-radius: 0;
|
|
461
|
+
background: transparent;
|
|
462
|
+
}
|
|
407
463
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
464
|
+
.editor-wrapper.page .editor-surface :global(.tiptap) {
|
|
465
|
+
outline: none;
|
|
466
|
+
min-height: var(--editor-min-height, 28rem);
|
|
467
|
+
}
|
|
412
468
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
font-size: 1rem;
|
|
418
|
-
line-height: 1.75;
|
|
419
|
-
color: var(--color-foreground);
|
|
420
|
-
caret-color: var(--color-brand);
|
|
421
|
-
}
|
|
469
|
+
/* ---- EDITOR SURFACE ---- */
|
|
470
|
+
.editor-surface {
|
|
471
|
+
min-height: var(--editor-min-height, 28rem);
|
|
472
|
+
}
|
|
422
473
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
474
|
+
.editor-wrapper:not(.page) .editor-surface :global(.tiptap) {
|
|
475
|
+
padding: 2rem 2.5rem;
|
|
476
|
+
outline: none;
|
|
477
|
+
min-height: var(--editor-min-height, 28rem);
|
|
478
|
+
font-size: 1rem;
|
|
479
|
+
line-height: 1.75;
|
|
480
|
+
color: var(--color-foreground);
|
|
481
|
+
caret-color: var(--color-brand);
|
|
482
|
+
}
|
|
432
483
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
484
|
+
/* Placeholder */
|
|
485
|
+
.editor-surface :global(.tiptap p.is-editor-empty:first-child::before) {
|
|
486
|
+
content: attr(data-placeholder);
|
|
487
|
+
color: var(--color-muted-foreground);
|
|
488
|
+
opacity: 0.4;
|
|
489
|
+
pointer-events: none;
|
|
490
|
+
float: left;
|
|
491
|
+
height: 0;
|
|
492
|
+
}
|
|
441
493
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
494
|
+
/* Node typography (h1-h4, p, ul/ol/li, blockquote, code, pre, a, img, hr, strong)
|
|
495
|
+
lives in ./content.css which is imported at the top of this component.
|
|
496
|
+
Editor-only chrome (cursor, hover outline) below. */
|
|
497
|
+
.editor-surface :global(.tiptap .image-wrapper) {
|
|
498
|
+
position: relative;
|
|
499
|
+
display: inline-block;
|
|
500
|
+
max-width: 100%;
|
|
501
|
+
}
|
|
446
502
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
503
|
+
.editor-surface :global(.tiptap img) {
|
|
504
|
+
transition: box-shadow var(--duration-quick) var(--ease-smooth-out);
|
|
505
|
+
cursor: pointer;
|
|
450
506
|
}
|
|
451
|
-
}
|
|
452
507
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
width: 1.25rem;
|
|
459
|
-
height: 1.25rem;
|
|
460
|
-
display: flex;
|
|
461
|
-
align-items: center;
|
|
462
|
-
justify-content: center;
|
|
463
|
-
color: var(--color-muted-foreground);
|
|
464
|
-
cursor: grab;
|
|
465
|
-
opacity: 0;
|
|
466
|
-
transition: opacity var(--duration-fast) var(--ease-smooth-out);
|
|
467
|
-
border-radius: var(--radius-xs);
|
|
468
|
-
}
|
|
508
|
+
@media (hover: hover) and (pointer: fine) {
|
|
509
|
+
.editor-surface :global(.tiptap img:hover) {
|
|
510
|
+
box-shadow: 0 0 0 2px oklch(from var(--color-brand) l c h / 0.2);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
469
513
|
|
|
470
|
-
|
|
471
|
-
.editor-surface :global(.drag-handle
|
|
472
|
-
|
|
473
|
-
|
|
514
|
+
/* ---- DRAG HANDLE ---- */
|
|
515
|
+
.editor-surface :global(.drag-handle) {
|
|
516
|
+
position: absolute;
|
|
517
|
+
top: 0.25rem;
|
|
518
|
+
left: -1.5rem;
|
|
519
|
+
width: 1.25rem;
|
|
520
|
+
height: 1.25rem;
|
|
521
|
+
display: flex;
|
|
522
|
+
align-items: center;
|
|
523
|
+
justify-content: center;
|
|
524
|
+
color: var(--color-muted-foreground);
|
|
525
|
+
cursor: grab;
|
|
526
|
+
opacity: 0;
|
|
527
|
+
transition: opacity var(--duration-fast) var(--ease-smooth-out);
|
|
528
|
+
border-radius: var(--radius-xs);
|
|
474
529
|
}
|
|
475
|
-
}
|
|
476
530
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
531
|
+
@media (hover: hover) and (pointer: fine) {
|
|
532
|
+
.editor-surface :global(.drag-handle:hover) {
|
|
533
|
+
background: var(--color-accent);
|
|
534
|
+
color: var(--color-foreground);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
480
537
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
opacity: 0.5;
|
|
538
|
+
.editor-surface :global(.drag-handle:active) {
|
|
539
|
+
cursor: grabbing;
|
|
484
540
|
}
|
|
485
|
-
}
|
|
486
541
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
542
|
+
@media (hover: hover) and (pointer: fine) {
|
|
543
|
+
.editor-surface :global(.tiptap > *:hover .drag-handle) {
|
|
544
|
+
opacity: 0.5;
|
|
545
|
+
}
|
|
490
546
|
}
|
|
491
|
-
}
|
|
492
547
|
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
548
|
+
@media (hover: hover) and (pointer: fine) {
|
|
549
|
+
.editor-surface :global(.tiptap [data-node-view-wrapper]:hover .drag-handle) {
|
|
550
|
+
opacity: 0.5;
|
|
551
|
+
}
|
|
496
552
|
}
|
|
497
|
-
}
|
|
498
553
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
554
|
+
@media (hover: hover) and (pointer: fine) {
|
|
555
|
+
.editor-surface :global(.tiptap > *:hover .drag-handle:hover) {
|
|
556
|
+
opacity: 1;
|
|
557
|
+
}
|
|
502
558
|
}
|
|
503
|
-
}
|
|
504
559
|
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
padding: 0.5rem 1.25rem;
|
|
511
|
-
border-top: 1px solid oklch(from var(--color-border) l c h / 0.5);
|
|
512
|
-
}
|
|
560
|
+
@media (hover: hover) and (pointer: fine) {
|
|
561
|
+
.editor-surface :global(.tiptap [data-node-view-wrapper]:hover .drag-handle:hover) {
|
|
562
|
+
opacity: 1;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
513
565
|
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
566
|
+
/* ---- STATUS BAR ---- */
|
|
567
|
+
.status-bar {
|
|
568
|
+
display: flex;
|
|
569
|
+
align-items: center;
|
|
570
|
+
justify-content: flex-end;
|
|
571
|
+
padding: 0.5rem 1.25rem;
|
|
572
|
+
border-top: 1px solid oklch(from var(--color-border) l c h / 0.5);
|
|
573
|
+
}
|
|
519
574
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
min-width: 1.125rem;
|
|
525
|
-
height: 1.125rem;
|
|
526
|
-
padding: 0 0.25rem;
|
|
527
|
-
margin: 0 0.125rem;
|
|
528
|
-
border: 1px solid oklch(from var(--color-border) l c h / 0.6);
|
|
529
|
-
border-radius: var(--radius-xs);
|
|
530
|
-
background: var(--color-muted);
|
|
531
|
-
font-family: var(--font-mono);
|
|
532
|
-
font-size: 0.625rem;
|
|
533
|
-
font-weight: 500;
|
|
534
|
-
line-height: 1;
|
|
535
|
-
}
|
|
575
|
+
.status-hint {
|
|
576
|
+
font-size: 0.6875rem;
|
|
577
|
+
color: var(--color-muted-foreground);
|
|
578
|
+
}
|
|
536
579
|
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
580
|
+
.status-hint kbd {
|
|
581
|
+
display: inline-flex;
|
|
582
|
+
align-items: center;
|
|
583
|
+
justify-content: center;
|
|
584
|
+
min-width: 1.125rem;
|
|
585
|
+
height: 1.125rem;
|
|
586
|
+
padding: 0 0.25rem;
|
|
587
|
+
margin: 0 0.125rem;
|
|
588
|
+
border: 1px solid oklch(from var(--color-border) l c h / 0.6);
|
|
589
|
+
border-radius: var(--radius-xs);
|
|
590
|
+
background: var(--color-muted);
|
|
591
|
+
font-family: var(--font-mono);
|
|
592
|
+
font-size: 0.625rem;
|
|
593
|
+
font-weight: 500;
|
|
594
|
+
line-height: 1;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/* ---- REDUCED MOTION ---- */
|
|
598
|
+
@media (prefers-reduced-motion: reduce) {
|
|
599
|
+
.editor-wrapper {
|
|
600
|
+
transition: none;
|
|
601
|
+
}
|
|
541
602
|
}
|
|
542
603
|
}
|
|
543
604
|
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/core";
|
|
2
|
+
import "./content.css";
|
|
3
|
+
import "./doc-page.css";
|
|
4
|
+
interface Props {
|
|
5
|
+
content?: Record<string, unknown> | null;
|
|
6
|
+
onContentChange?: (json: Record<string, unknown>) => void;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
minHeight?: string;
|
|
9
|
+
preset?: "full" | "notes";
|
|
10
|
+
blockIds?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* `box` is the framed editor with a toolbar. `page` is a document: no frame, no toolbar,
|
|
13
|
+
* type set by `.doc-surface` (see doc-page.css), heading anchors on.
|
|
14
|
+
*/
|
|
15
|
+
variant?: "box" | "page";
|
|
16
|
+
/** The word on a heading's hover button, for `page`. */
|
|
17
|
+
copyLinkLabel?: string;
|
|
18
|
+
/** A heading's link was copied. */
|
|
19
|
+
onCopyLink?: (url: string, id: string) => void;
|
|
20
|
+
/** The live editor, for a host that needs focus or the document. */
|
|
21
|
+
instance?: Editor | null;
|
|
22
|
+
/** The editable region's accessible name. */
|
|
23
|
+
label?: string;
|
|
24
|
+
}
|
|
25
|
+
declare const $$Component: import("svelte").Component<Props, {}, "instance">;
|
|
26
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
27
|
+
export default $$Component;
|
package/src/editor/extensions.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { DragHandle } from "@tiptap/extension-drag-handle";
|
|
|
6
6
|
import { TaskItem, TaskList } from "@tiptap/extension-list";
|
|
7
7
|
import { Table, TableCell, TableHeader, TableRow } from "@tiptap/extension-table";
|
|
8
8
|
import { BlockIdExtension } from "./block-id.js";
|
|
9
|
+
import { BlockMove } from "./block-move.js";
|
|
9
10
|
import { CodeBlockChrome, HeadingAnchors } from "./doc-blocks.js";
|
|
10
11
|
|
|
11
12
|
const CmsBlock = TiptapNode.create({
|
|
@@ -115,6 +116,20 @@ function dedupeExtensions(extensions: Extensions): Extensions {
|
|
|
115
116
|
|
|
116
117
|
const DRAG_DOTS = `<svg width="12" height="12" viewBox="0 0 12 12" fill="none"><circle cx="2.5" cy="2.5" r="1" fill="currentColor"/><circle cx="2.5" cy="6" r="1" fill="currentColor"/><circle cx="2.5" cy="9.5" r="1" fill="currentColor"/><circle cx="6" cy="2.5" r="1" fill="currentColor"/><circle cx="6" cy="6" r="1" fill="currentColor"/><circle cx="6" cy="9.5" r="1" fill="currentColor"/></svg>`;
|
|
117
118
|
|
|
119
|
+
/** The stock Image has no align, so the image toolbar's choice was dropped. content.css reads data-align. */
|
|
120
|
+
const AlignedImage = Image.extend({
|
|
121
|
+
addAttributes() {
|
|
122
|
+
return {
|
|
123
|
+
...this.parent?.(),
|
|
124
|
+
align: {
|
|
125
|
+
default: null,
|
|
126
|
+
parseHTML: (el) => el.getAttribute("data-align"),
|
|
127
|
+
renderHTML: (attrs) => (attrs.align ? { "data-align": attrs.align } : {}),
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
|
|
118
133
|
function dragHandle() {
|
|
119
134
|
return DragHandle.configure({
|
|
120
135
|
render() {
|
|
@@ -131,7 +146,7 @@ export type ExtensionOptions = {
|
|
|
131
146
|
placeholder: string;
|
|
132
147
|
blockIds: boolean;
|
|
133
148
|
/** A document page: heading anchors with a hover "Copy link", and the label for it. */
|
|
134
|
-
anchors?: { label: string;
|
|
149
|
+
anchors?: { label: string; onCopy?: (url: string, id: string) => void } | false;
|
|
135
150
|
};
|
|
136
151
|
|
|
137
152
|
/** The extension list for a preset: `full` adds CMS blocks, YouTube, images and H4. */
|
|
@@ -151,7 +166,7 @@ export function buildExtensions({
|
|
|
151
166
|
? [
|
|
152
167
|
CmsBlock,
|
|
153
168
|
Youtube,
|
|
154
|
-
|
|
169
|
+
AlignedImage.configure({ inline: false }),
|
|
155
170
|
TaskList,
|
|
156
171
|
TaskItem.configure({ nested: true }),
|
|
157
172
|
Table.configure({ resizable: false }),
|
|
@@ -164,6 +179,7 @@ export function buildExtensions({
|
|
|
164
179
|
...(anchors ? [HeadingAnchors.configure(anchors)] : []),
|
|
165
180
|
Placeholder.configure({ placeholder }),
|
|
166
181
|
dragHandle(),
|
|
182
|
+
BlockMove,
|
|
167
183
|
...(blockIds ? [BlockIdExtension] : []),
|
|
168
184
|
]);
|
|
169
185
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it } from "vite-plus/test";
|
|
2
|
+
import { Editor } from "@tiptap/core";
|
|
3
|
+
import { buildExtensions } from "./extensions.js";
|
|
4
|
+
|
|
5
|
+
let editor: Editor | null = null;
|
|
6
|
+
|
|
7
|
+
afterEach(() => {
|
|
8
|
+
editor?.destroy();
|
|
9
|
+
editor = null;
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
describe("image alignment", () => {
|
|
13
|
+
it("keeps the align the image toolbar sets, as data-align", () => {
|
|
14
|
+
editor = new Editor({
|
|
15
|
+
extensions: buildExtensions({ preset: "full", placeholder: "", blockIds: false }),
|
|
16
|
+
content: '<p>a</p><img src="x.png">',
|
|
17
|
+
});
|
|
18
|
+
const pos = editor.state.doc.child(0).nodeSize;
|
|
19
|
+
const image = editor.state.doc.nodeAt(pos);
|
|
20
|
+
if (!image) throw new Error("no image");
|
|
21
|
+
editor.view.dispatch(
|
|
22
|
+
editor.state.tr.setNodeMarkup(pos, undefined, { ...image.attrs, align: "center" }),
|
|
23
|
+
);
|
|
24
|
+
expect(editor.state.doc.nodeAt(pos)?.attrs.align).toBe("center");
|
|
25
|
+
expect(editor.getHTML()).toContain('data-align="center"');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("reads data-align back from HTML", () => {
|
|
29
|
+
editor = new Editor({
|
|
30
|
+
extensions: buildExtensions({ preset: "full", placeholder: "", blockIds: false }),
|
|
31
|
+
content: '<img src="x.png" data-align="right">',
|
|
32
|
+
});
|
|
33
|
+
expect(editor.state.doc.child(0).attrs.align).toBe("right");
|
|
34
|
+
});
|
|
35
|
+
});
|