@stephen-netu/design-system 0.2.1 → 0.5.1
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/dist/b0-app-shell/clarification-overlay/ClarificationOverlay.svelte +10 -2
- package/dist/b0-app-shell/clarification-overlay/ClarificationOverlay.svelte.d.ts.map +1 -1
- package/dist/b0-app-shell/{command-bar/CommandBar.svelte → global-command-bar/GlobalCommandBar.svelte} +75 -75
- package/dist/b0-app-shell/{command-bar/CommandBar.svelte.d.ts → global-command-bar/GlobalCommandBar.svelte.d.ts} +6 -6
- package/dist/b0-app-shell/global-command-bar/GlobalCommandBar.svelte.d.ts.map +1 -0
- package/dist/b0-app-shell/index.d.ts +1 -1
- package/dist/b0-app-shell/index.d.ts.map +1 -1
- package/dist/b0-app-shell/index.js +1 -1
- package/dist/d0-data-viz/BarChart.test.js +53 -0
- package/dist/d0-data-viz/CheckpointBar.test.js +83 -0
- package/dist/d0-data-viz/CheckpointPill.svelte +8 -3
- package/dist/d0-data-viz/CheckpointPill.svelte.d.ts.map +1 -1
- package/dist/d0-data-viz/CheckpointPill.test.js +78 -0
- package/dist/d0-data-viz/ConnectionHealth.test.js +70 -0
- package/dist/d0-data-viz/MetricCard.test.js +57 -0
- package/dist/d0-data-viz/SparkLine.test.js +47 -0
- package/dist/d0-data-viz/StorageMap.test.js +63 -0
- package/dist/d0-data-viz/Timeline.test.js +62 -0
- package/dist/d0-data-viz/WorldLineTimeline.test.js +99 -0
- package/dist/d0-data-viz/checkpoint-types.js +1 -1
- package/dist/d0-data-viz/storage-map-types.d.ts.map +1 -1
- package/dist/d0-data-viz/storage-map-types.js +6 -3
- package/dist/d0-data-viz/theme-integration.d.ts +3 -3
- package/dist/d0-data-viz/theme-integration.js +4 -4
- package/dist/d0-data-viz/theme-integration.test.js +41 -0
- package/dist/demos/AmbientPrimitivesDemo.svelte +103 -0
- package/dist/demos/AmbientPrimitivesDemo.svelte.d.ts +5 -0
- package/dist/demos/AmbientPrimitivesDemo.svelte.d.ts.map +1 -0
- package/dist/demos/BspSizingInfographic.svelte +3 -32
- package/dist/demos/NodepadBlocksShowcase.svelte +2 -1
- package/dist/demos/NodepadBlocksShowcase.svelte.d.ts.map +1 -1
- package/dist/demos/index.d.ts +1 -0
- package/dist/demos/index.d.ts.map +1 -1
- package/dist/demos/index.js +1 -0
- package/dist/editor/CodeEditor.svelte +83 -26
- package/dist/editor/CodeEditor.svelte.d.ts +0 -1
- package/dist/editor/CodeEditor.svelte.d.ts.map +1 -1
- package/dist/editor/CodeEditor.test.js +38 -0
- package/dist/editor/ExternalChangeDialog.svelte +117 -0
- package/dist/editor/ExternalChangeDialog.svelte.d.ts +13 -0
- package/dist/editor/ExternalChangeDialog.svelte.d.ts.map +1 -0
- package/dist/editor/FindReplaceDialog.svelte +32 -32
- package/dist/editor/MarkdownEditor.svelte +105 -605
- package/dist/editor/MarkdownEditor.svelte.d.ts +1 -1
- package/dist/editor/MarkdownEditor.svelte.d.ts.map +1 -1
- package/dist/editor/MarkdownEditor.test.js +38 -0
- package/dist/editor/codemirror-config.d.ts +36 -0
- package/dist/editor/codemirror-config.d.ts.map +1 -0
- package/dist/editor/codemirror-config.js +87 -0
- package/dist/editor/components/CorrectionTooltip.svelte +180 -160
- package/dist/editor/components/CorrectionTooltip.svelte.d.ts +7 -23
- package/dist/editor/components/CorrectionTooltip.svelte.d.ts.map +1 -1
- package/dist/editor/extensions/autocomplete.d.ts +2 -2
- package/dist/editor/extensions/autocomplete.d.ts.map +1 -1
- package/dist/editor/extensions/autocomplete.test.js +121 -0
- package/dist/editor/extensions/spellcheck.d.ts +21 -3
- package/dist/editor/extensions/spellcheck.d.ts.map +1 -1
- package/dist/editor/extensions/spellcheck.js +51 -9
- package/dist/editor/extensions/spellcheck.test.js +168 -0
- package/dist/editor/extensions/types.d.ts +2 -1
- package/dist/editor/extensions/types.d.ts.map +1 -1
- package/dist/editor/index.d.ts +2 -1
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/index.js +1 -0
- package/dist/editor/markdown-preview.d.ts +9 -0
- package/dist/editor/markdown-preview.d.ts.map +1 -0
- package/dist/editor/markdown-preview.js +19 -0
- package/dist/editor/markdown-preview.test.js +38 -0
- package/dist/editor/useCodeMirror.d.ts +23 -0
- package/dist/editor/useCodeMirror.d.ts.map +1 -0
- package/dist/editor/useCodeMirror.js +40 -0
- package/dist/editor/useFilePersistence.d.ts +32 -0
- package/dist/editor/useFilePersistence.d.ts.map +1 -0
- package/dist/editor/useFilePersistence.js +117 -0
- package/dist/entity-graph-view/WorldView.svelte +1 -1
- package/dist/fabric/ai/ChatPanel.svelte +84 -85
- package/dist/fabric/ai/ChatPanel.svelte.d.ts.map +1 -1
- package/dist/fabric/ai/ResearchPanel.svelte +35 -25
- package/dist/fabric/ai/ResearchPanel.svelte.d.ts.map +1 -1
- package/dist/fabric/data/FileTree.svelte +195 -0
- package/dist/fabric/data/FileTree.svelte.d.ts +19 -0
- package/dist/fabric/data/FileTree.svelte.d.ts.map +1 -0
- package/dist/fabric/data/FileTree.test.js +127 -0
- package/dist/fabric/data/index.d.ts +5 -9
- package/dist/fabric/data/index.d.ts.map +1 -1
- package/dist/fabric/data/index.js +4 -1
- package/dist/fabric/index.d.ts +5 -5
- package/dist/fabric/index.d.ts.map +1 -1
- package/dist/fabric/index.js +5 -3
- package/dist/fabric/input/{CommandBar.svelte → AppHeaderBar.svelte} +13 -13
- package/dist/fabric/input/{CommandBar.svelte.d.ts → AppHeaderBar.svelte.d.ts} +5 -5
- package/dist/fabric/input/AppHeaderBar.svelte.d.ts.map +1 -0
- package/dist/fabric/input/{CommandBar.test.js → AppHeaderBar.test.js} +9 -9
- package/dist/fabric/input/KeyboardShortcuts.svelte +23 -21
- package/dist/fabric/input/index.d.ts +2 -2
- package/dist/fabric/input/index.d.ts.map +1 -1
- package/dist/fabric/input/index.js +1 -1
- package/dist/fabric/layout/CollapsiblePanel.svelte +8 -10
- package/dist/fabric/layout/KanbanBoard.svelte +25 -155
- package/dist/fabric/layout/KanbanBoard.svelte.d.ts +2 -26
- package/dist/fabric/layout/KanbanBoard.svelte.d.ts.map +1 -1
- package/dist/fabric/layout/KanbanBoard.test.js +125 -10
- package/dist/fabric/layout/KanbanCard.svelte +27 -223
- package/dist/fabric/layout/KanbanCard.svelte.d.ts +2 -19
- package/dist/fabric/layout/KanbanCard.svelte.d.ts.map +1 -1
- package/dist/fabric/layout/KanbanColumn.svelte +41 -275
- package/dist/fabric/layout/KanbanColumn.svelte.d.ts +2 -22
- package/dist/fabric/layout/KanbanColumn.svelte.d.ts.map +1 -1
- package/dist/fabric/layout/index.d.ts +2 -5
- package/dist/fabric/layout/index.d.ts.map +1 -1
- package/dist/fabric/layout/index.js +1 -1
- package/dist/fabric/navigation/ActivityRail.svelte +3 -5
- package/dist/fabric/navigation/ActivityRail.svelte.d.ts.map +1 -1
- package/dist/g0-generative/components/Text.svelte +38 -0
- package/dist/g0-generative/components/Text.svelte.d.ts +9 -0
- package/dist/g0-generative/components/Text.svelte.d.ts.map +1 -0
- package/dist/g0-generative/index.d.ts +1 -0
- package/dist/g0-generative/index.d.ts.map +1 -1
- package/dist/g0-generative/index.js +1 -0
- package/dist/g0-generative/library/ComponentLibrary.d.ts +4 -0
- package/dist/g0-generative/library/ComponentLibrary.d.ts.map +1 -1
- package/dist/g0-generative/library/ComponentLibrary.js +10 -0
- package/dist/g0-generative/library/ComponentLibrary.test.js +135 -0
- package/dist/g0-generative/renderer/OpenUIRenderer.svelte +16 -56
- package/dist/g0-generative/renderer/OpenUIRenderer.svelte.d.ts.map +1 -1
- package/dist/g0-generative/renderer/OpenUIRenderer.test.js +143 -0
- package/dist/g0-geo/SovereignMap.svelte +13 -13
- package/dist/g0-geo/SovereignMap.svelte.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/l0-layout/SectionSplitter.svelte +5 -5
- package/dist/l0-layout/block-writer/BlockContent.svelte +23 -22
- package/dist/l0-layout/block-writer/BlockContent.svelte.d.ts.map +1 -1
- package/dist/l0-layout/block-writer/BlockContent.test.js +47 -0
- package/dist/l0-layout/block-writer/BlockItem.svelte +6 -4
- package/dist/l0-layout/block-writer/markdown.js +11 -11
- package/dist/l0-layout/block-writer/markdown.test.js +81 -0
- package/dist/l0-layout/card/CompactCard.svelte +4 -3
- package/dist/l0-layout/card/StackedCard.svelte +87 -0
- package/dist/l0-layout/card/StackedCard.svelte.d.ts +9 -0
- package/dist/l0-layout/card/StackedCard.svelte.d.ts.map +1 -0
- package/dist/l0-layout/card/StackedCard.test.js +29 -0
- package/dist/l0-layout/grant/GrantCard.svelte +15 -5
- package/dist/l0-layout/grant/GrantCard.svelte.d.ts.map +1 -1
- package/dist/l0-layout/index.d.ts +3 -0
- package/dist/l0-layout/index.d.ts.map +1 -1
- package/dist/l0-layout/index.js +2 -0
- package/dist/l0-layout/kanban/KanbanBoard.svelte +246 -29
- package/dist/l0-layout/kanban/KanbanBoard.svelte.d.ts +28 -2
- package/dist/l0-layout/kanban/KanbanBoard.svelte.d.ts.map +1 -1
- package/dist/l0-layout/kanban/KanbanCard.svelte +175 -150
- package/dist/l0-layout/kanban/KanbanCard.svelte.d.ts +16 -18
- package/dist/l0-layout/kanban/KanbanCard.svelte.d.ts.map +1 -1
- package/dist/l0-layout/kanban/KanbanColumn.svelte +152 -78
- package/dist/l0-layout/kanban/KanbanColumn.svelte.d.ts +28 -7
- package/dist/l0-layout/kanban/KanbanColumn.svelte.d.ts.map +1 -1
- package/dist/l0-layout/kanban/index.d.ts +6 -0
- package/dist/l0-layout/kanban/index.d.ts.map +1 -0
- package/dist/l0-layout/kanban/index.js +3 -0
- package/dist/n0-node-graph/Node.svelte +2 -2
- package/dist/n0-node-graph/NodePalette.svelte +2 -2
- package/dist/n1-flow-canvas/FlowCanvas.svelte +50 -6
- package/dist/n1-flow-canvas/FlowCanvas.svelte.d.ts.map +1 -1
- package/dist/n1-flow-canvas/graph-state.test.js +69 -0
- package/dist/n1-flow-canvas/index.d.ts +2 -0
- package/dist/n1-flow-canvas/index.d.ts.map +1 -1
- package/dist/n1-flow-canvas/index.js +1 -0
- package/dist/n1-flow-canvas/pipeline-adapter.d.ts +37 -0
- package/dist/n1-flow-canvas/pipeline-adapter.d.ts.map +1 -0
- package/dist/n1-flow-canvas/pipeline-adapter.js +160 -0
- package/dist/n1-flow-canvas/utils.test.js +116 -0
- package/dist/n2-manifold-disk/ManifoldDisk.svelte +62 -35
- package/dist/n2-manifold-disk/ManifoldDisk.svelte.d.ts.map +1 -1
- package/dist/n3-force-graph/GraphTooltip.svelte +2 -2
- package/dist/n4-adaptive-manifold/AdaptiveManifold.svelte +34 -29
- package/dist/n4-adaptive-manifold/AdaptiveManifold.svelte.d.ts.map +1 -1
- package/dist/n4-adaptive-manifold/classifier.test.js +104 -0
- package/dist/n4-adaptive-manifold/n4-tokens.css +2 -2
- package/dist/n4-adaptive-manifold/types.d.ts +3 -0
- package/dist/n4-adaptive-manifold/types.d.ts.map +1 -1
- package/dist/p0-primitives/ThemeProvider.svelte +38 -18
- package/dist/p0-primitives/ThemeProvider.svelte.d.ts +6 -1
- package/dist/p0-primitives/ThemeProvider.svelte.d.ts.map +1 -1
- package/dist/p0-primitives/canvas-theme.d.ts +33 -1
- package/dist/p0-primitives/canvas-theme.d.ts.map +1 -1
- package/dist/p0-primitives/canvas-theme.js +82 -17
- package/dist/p0-primitives/debug.d.ts +6 -0
- package/dist/p0-primitives/debug.d.ts.map +1 -0
- package/dist/p0-primitives/debug.js +21 -0
- package/dist/p0-primitives/index.d.ts +2 -1
- package/dist/p0-primitives/index.d.ts.map +1 -1
- package/dist/p0-primitives/index.js +1 -0
- package/dist/p0-primitives/theme-context.d.ts +9 -0
- package/dist/p0-primitives/theme-context.d.ts.map +1 -0
- package/dist/p0-primitives/theme-context.js +8 -0
- package/dist/p0-primitives/theme.d.ts.map +1 -1
- package/dist/p0-primitives/theme.js +11 -31
- package/dist/p0-primitives/tokens/ambient.css +76 -0
- package/dist/p0-primitives/tokens/tokens.css +140 -34
- package/dist/p0-primitives/utils/index.d.ts +4 -2
- package/dist/p0-primitives/utils/index.d.ts.map +1 -1
- package/dist/p0-primitives/utils/index.js +1 -0
- package/dist/p0-primitives/utils/reveal.d.ts +15 -0
- package/dist/p0-primitives/utils/reveal.d.ts.map +1 -0
- package/dist/p0-primitives/utils/reveal.js +29 -0
- package/dist/p0-primitives/utils/reveal.test.js +95 -0
- package/dist/s0-state/SyncStatus.svelte +2 -2
- package/dist/s0-state/ThemeStore.svelte.d.ts +3 -2
- package/dist/s0-state/ThemeStore.svelte.d.ts.map +1 -1
- package/dist/s0-state/ThemeStore.svelte.js +20 -1
- package/dist/s0-state/index.d.ts +2 -2
- package/dist/s0-state/index.d.ts.map +1 -1
- package/dist/s0-state/index.js +3 -0
- package/dist/s0-state/modal-stack-store.svelte.d.ts +27 -2
- package/dist/s0-state/modal-stack-store.svelte.d.ts.map +1 -1
- package/dist/s0-state/modal-stack-store.svelte.js +21 -2
- package/dist/showcase/Showcase.svelte +43 -34
- package/dist/showcase/Showcase.svelte.d.ts.map +1 -1
- package/dist/spatial/BspTilingCanvas.svelte +5 -5
- package/dist/spatial/BspTilingSimulation.test.js +88 -0
- package/dist/spatial/CameraController.test.js +120 -0
- package/dist/spatial/ForceCanvas.svelte +18 -13
- package/dist/spatial/ForceCanvas.svelte.d.ts.map +1 -1
- package/dist/spatial/ForceSimulation.svelte.d.ts.map +1 -1
- package/dist/spatial/ForceSimulation.svelte.js +33 -22
- package/dist/spatial/LodRenderer.svelte +14 -1
- package/dist/spatial/LodRenderer.svelte.d.ts.map +1 -1
- package/dist/spatial/ParticleAssembleMark.svelte +285 -0
- package/dist/spatial/ParticleAssembleMark.svelte.d.ts +24 -0
- package/dist/spatial/ParticleAssembleMark.svelte.d.ts.map +1 -0
- package/dist/spatial/SnapZoomCamera.svelte +23 -13
- package/dist/spatial/SnapZoomCamera.svelte.d.ts.map +1 -1
- package/dist/spatial/ZoneTiler.svelte +3 -2
- package/dist/spatial/ZoneTiler.test.js +90 -0
- package/dist/spatial/d3-types.d.ts +31 -0
- package/dist/spatial/d3-types.d.ts.map +1 -0
- package/dist/spatial/d3-types.js +19 -0
- package/dist/spatial/index.js +1 -0
- package/dist/spatial/particle-assemble-math.d.ts +22 -0
- package/dist/spatial/particle-assemble-math.d.ts.map +1 -0
- package/dist/spatial/particle-assemble-math.js +26 -0
- package/dist/spatial/particle-assemble-math.test.js +56 -0
- package/dist/ssr-import-clean.test.js +37 -0
- package/dist/t0-transport/fs.d.ts +12 -0
- package/dist/t0-transport/fs.d.ts.map +1 -0
- package/dist/t0-transport/fs.js +55 -0
- package/dist/t0-transport/index.d.ts +1 -0
- package/dist/t0-transport/index.d.ts.map +1 -1
- package/dist/t0-transport/index.js +1 -0
- package/dist/t0-transport/invoke.d.ts.map +1 -1
- package/dist/t0-transport/invoke.js +5 -2
- package/dist/t0-transport/quality.d.ts +12 -3
- package/dist/t0-transport/quality.d.ts.map +1 -1
- package/dist/t0-transport/quality.js +17 -4
- package/dist/t0-transport/substrate.svelte.d.ts +27 -0
- package/dist/t0-transport/substrate.svelte.d.ts.map +1 -0
- package/dist/t0-transport/substrate.svelte.js +55 -0
- package/dist/u0-primitives/LockIndicator.svelte +17 -15
- package/dist/u0-primitives/VerticalToolbar.svelte +25 -22
- package/dist/u0-primitives/accordion/Accordion.svelte +14 -12
- package/dist/u0-primitives/accordion/Accordion.svelte.d.ts +0 -7
- package/dist/u0-primitives/accordion/Accordion.svelte.d.ts.map +1 -1
- package/dist/u0-primitives/accordion/Accordion.test.js +5 -5
- package/dist/u0-primitives/animated-icon/AnimatedIcon.svelte +3 -3
- package/dist/u0-primitives/animated-icon/AnimatedIcon.test.js +82 -0
- package/dist/u0-primitives/avatar/Avatar.svelte +14 -14
- package/dist/u0-primitives/avatar/Avatar.test.js +81 -0
- package/dist/u0-primitives/badge/Badge.svelte +6 -4
- package/dist/u0-primitives/badge/Badge.test.js +10 -10
- package/dist/u0-primitives/badge/ValidityBadge.svelte +4 -27
- package/dist/u0-primitives/badge/ValidityBadge.test.js +9 -9
- package/dist/u0-primitives/button/Button.svelte +18 -13
- package/dist/u0-primitives/button/Button.svelte.d.ts +1 -0
- package/dist/u0-primitives/button/Button.svelte.d.ts.map +1 -1
- package/dist/u0-primitives/button/Button.test.js +11 -11
- package/dist/u0-primitives/card/Card.svelte +60 -32
- package/dist/u0-primitives/card/Card.svelte.d.ts.map +1 -1
- package/dist/u0-primitives/card/Card.test.js +86 -0
- package/dist/u0-primitives/command-palette/CommandPalette.svelte +75 -43
- package/dist/u0-primitives/command-palette/CommandPalette.svelte.d.ts.map +1 -1
- package/dist/u0-primitives/command-palette/CommandPalette.test.js +202 -0
- package/dist/u0-primitives/command-palette/commandStore.svelte.d.ts.map +1 -1
- package/dist/u0-primitives/command-palette/commandStore.svelte.js +2 -1
- package/dist/u0-primitives/dropdown/Dropdown.svelte +20 -25
- package/dist/u0-primitives/dropdown/Dropdown.test.js +1 -1
- package/dist/u0-primitives/grant-badge/GrantStatusBadge.svelte +2 -2
- package/dist/u0-primitives/index.d.ts +8 -0
- package/dist/u0-primitives/index.d.ts.map +1 -1
- package/dist/u0-primitives/index.js +9 -0
- package/dist/u0-primitives/input/Input.svelte +85 -23
- package/dist/u0-primitives/input/Input.svelte.d.ts +2 -10
- package/dist/u0-primitives/input/Input.svelte.d.ts.map +1 -1
- package/dist/u0-primitives/input/Input.test.js +82 -2
- package/dist/u0-primitives/live-dot/LiveDot.svelte +56 -0
- package/dist/u0-primitives/live-dot/LiveDot.svelte.d.ts +11 -0
- package/dist/u0-primitives/live-dot/LiveDot.svelte.d.ts.map +1 -0
- package/dist/u0-primitives/live-dot/LiveDot.test.js +41 -0
- package/dist/u0-primitives/live-dot/index.d.ts +3 -0
- package/dist/u0-primitives/live-dot/index.d.ts.map +1 -0
- package/dist/u0-primitives/live-dot/index.js +1 -0
- package/dist/u0-primitives/modal/Modal.svelte +64 -38
- package/dist/u0-primitives/modal/Modal.svelte.d.ts.map +1 -1
- package/dist/u0-primitives/modal/Modal.test.js +63 -15
- package/dist/u0-primitives/rsvp/RsvpReader.svelte +8 -8
- package/dist/u0-primitives/rsvp/RsvpReader.svelte.d.ts.map +1 -1
- package/dist/u0-primitives/spinner/Spinner.svelte +11 -79
- package/dist/u0-primitives/spinner/Spinner.svelte.d.ts.map +1 -1
- package/dist/u0-primitives/steps/Steps.svelte +20 -21
- package/dist/u0-primitives/surface-state/SurfaceState.svelte +190 -0
- package/dist/u0-primitives/surface-state/SurfaceState.svelte.d.ts +15 -0
- package/dist/u0-primitives/surface-state/SurfaceState.svelte.d.ts.map +1 -0
- package/dist/u0-primitives/tabs/Tabs.svelte +13 -11
- package/dist/u0-primitives/theme-swatch-group/ThemeSwatchGroup.svelte +94 -0
- package/dist/u0-primitives/theme-swatch-group/ThemeSwatchGroup.svelte.d.ts +16 -0
- package/dist/u0-primitives/theme-swatch-group/ThemeSwatchGroup.svelte.d.ts.map +1 -0
- package/dist/u0-primitives/theme-swatch-group/ThemeSwatchGroup.test.js +48 -0
- package/dist/u0-primitives/theme-swatch-group/index.d.ts +3 -0
- package/dist/u0-primitives/theme-swatch-group/index.d.ts.map +1 -0
- package/dist/u0-primitives/theme-swatch-group/index.js +1 -0
- package/dist/u0-primitives/toggle/Toggle.svelte +22 -13
- package/dist/u0-primitives/tooltip/Tooltip.svelte +9 -9
- package/dist/u0-primitives/tooltip/Tooltip.test.js +12 -12
- package/dist/u0-primitives/web-components/button-component.d.ts +5 -1
- package/dist/u0-primitives/web-components/button-component.d.ts.map +1 -1
- package/dist/u0-primitives/web-components/button-component.js +72 -33
- package/dist/u0-primitives/web-components/index.d.ts +3 -0
- package/dist/u0-primitives/web-components/index.d.ts.map +1 -0
- package/dist/u0-primitives/web-components/index.js +2 -0
- package/dist/u0-primitives/web-components/input-component.d.ts +5 -1
- package/dist/u0-primitives/web-components/input-component.d.ts.map +1 -1
- package/dist/u0-primitives/web-components/input-component.js +56 -39
- package/dist/u0-primitives/web-components/web-components.test.js +96 -0
- package/dist/u0-primitives/window-frame/WindowFrame.svelte +87 -0
- package/dist/u0-primitives/window-frame/WindowFrame.svelte.d.ts +10 -0
- package/dist/u0-primitives/window-frame/WindowFrame.svelte.d.ts.map +1 -0
- package/dist/u0-primitives/window-frame/WindowFrame.test.js +31 -0
- package/dist/u0-primitives/window-frame/index.d.ts +3 -0
- package/dist/u0-primitives/window-frame/index.d.ts.map +1 -0
- package/dist/u0-primitives/window-frame/index.js +1 -0
- package/dist/v0-diagrams/MarkmapDiagram.test.js +49 -0
- package/dist/v0-diagrams/MermaidDiagram.svelte +21 -9
- package/dist/v0-diagrams/MermaidDiagram.svelte.d.ts.map +1 -1
- package/dist/v0-diagrams/MermaidDiagram.test.js +40 -0
- package/dist/x0-enchanted-blocks/components/NodepadBlock.svelte +11 -2
- package/dist/x0-enchanted-blocks/components/NodepadBlock.svelte.d.ts.map +1 -1
- package/package.json +57 -15
- package/src/n4-adaptive-manifold/n4-tokens.css +2 -2
- package/src/p0-primitives/tokens/ambient.css +76 -0
- package/src/p0-primitives/tokens/tokens.css +140 -34
- package/src/p0-primitives/tokens/tokens.json +55 -26
- package/dist/b0-app-shell/command-bar/CommandBar.svelte.d.ts.map +0 -1
- package/dist/fabric/input/CommandBar.svelte.d.ts.map +0 -1
- package/dist/stores/vaultStore.svelte +0 -14
- package/dist/stores/vaultStore.svelte.d.ts +0 -24
- package/dist/stores/vaultStore.svelte.d.ts.map +0 -1
- package/dist/tauri/index.d.ts +0 -3
- package/dist/tauri/index.d.ts.map +0 -1
- package/dist/tauri/index.js +0 -11
|
@@ -6,7 +6,7 @@ interface Props {
|
|
|
6
6
|
onChange?: (content: string) => void;
|
|
7
7
|
onSave?: () => void;
|
|
8
8
|
onClose?: () => void;
|
|
9
|
-
onExternalChange?: (
|
|
9
|
+
onExternalChange?: (content: string) => void;
|
|
10
10
|
completionSource?: CompletionSource;
|
|
11
11
|
spellCheckDictionary?: SpellCheckDictionary;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownEditor.svelte.d.ts","sourceRoot":"","sources":["../../src/editor/MarkdownEditor.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MarkdownEditor.svelte.d.ts","sourceRoot":"","sources":["../../src/editor/MarkdownEditor.svelte.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAwB,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAGxF,UAAU,KAAK;IACb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC7C;AAwKH,QAAA,MAAM,cAAc,2CAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { describe, it, expect, vi, afterEach } from 'vitest';
|
|
2
|
+
import { render, cleanup } from '@testing-library/svelte';
|
|
3
|
+
import EditorMarkdown from './MarkdownEditor.svelte';
|
|
4
|
+
afterEach(() => {
|
|
5
|
+
cleanup();
|
|
6
|
+
});
|
|
7
|
+
describe('editor/MarkdownEditor', () => {
|
|
8
|
+
it('exports a valid Svelte component', () => {
|
|
9
|
+
expect(EditorMarkdown).toBeDefined();
|
|
10
|
+
expect(typeof EditorMarkdown).toBe('function');
|
|
11
|
+
});
|
|
12
|
+
it('renders editor container', () => {
|
|
13
|
+
const { container } = render(EditorMarkdown, {
|
|
14
|
+
filePath: null,
|
|
15
|
+
initialContent: '# Hello',
|
|
16
|
+
});
|
|
17
|
+
expect(container.querySelector('.markdown-editor')).not.toBeNull();
|
|
18
|
+
});
|
|
19
|
+
it('renders with initial content', () => {
|
|
20
|
+
const { container } = render(EditorMarkdown, {
|
|
21
|
+
filePath: null,
|
|
22
|
+
initialContent: '# Test Content',
|
|
23
|
+
});
|
|
24
|
+
// The editor mounts a CodeMirror view inside .markdown-editor
|
|
25
|
+
expect(container.querySelector('.markdown-editor')).not.toBeNull();
|
|
26
|
+
});
|
|
27
|
+
it('calls onChange when content changes', async () => {
|
|
28
|
+
const onChange = vi.fn();
|
|
29
|
+
const { container } = render(EditorMarkdown, {
|
|
30
|
+
filePath: null,
|
|
31
|
+
initialContent: 'initial',
|
|
32
|
+
onChange,
|
|
33
|
+
});
|
|
34
|
+
// The component mounts CodeMirror - onChange fires on content changes
|
|
35
|
+
// In jsdom, the CM view syncs content; at minimum the component renders
|
|
36
|
+
expect(container.querySelector('.markdown-editor')).not.toBeNull();
|
|
37
|
+
});
|
|
38
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeMirror configuration for MarkdownEditor.
|
|
3
|
+
*
|
|
4
|
+
* Holds the editor theme, the minimal base setup, and the extension-assembly
|
|
5
|
+
* factory. Extracted from MarkdownEditor.svelte so the component stays focused
|
|
6
|
+
* on reactive state and lifecycle. All exports here are pure (no Svelte runes).
|
|
7
|
+
*/
|
|
8
|
+
import { EditorView } from '@codemirror/view';
|
|
9
|
+
import type { Extension } from '@codemirror/state';
|
|
10
|
+
import type { CompletionSource } from './extensions/autocomplete';
|
|
11
|
+
import type { SpellCheckCorrection, SpellCheckDictionary } from './extensions/spellcheck';
|
|
12
|
+
/** Custom dark theme matching Atelier — uses CSS variables via style injection. */
|
|
13
|
+
export declare const atelierTheme: Extension;
|
|
14
|
+
/** Minimal editor setup (replaces CodeMirror's `basicSetup`). */
|
|
15
|
+
export declare const minimalSetup: Extension[];
|
|
16
|
+
export interface EditorExtensionOptions {
|
|
17
|
+
completionSource?: CompletionSource;
|
|
18
|
+
spellCheckDictionary?: SpellCheckDictionary;
|
|
19
|
+
/** Invoked when a spell-check correction marker is clicked. */
|
|
20
|
+
onCorrectionClick: (correction: SpellCheckCorrection, view: EditorView, from: number, to: number) => void;
|
|
21
|
+
/** Ctrl/Cmd-S. */
|
|
22
|
+
onSave: () => void;
|
|
23
|
+
/** Ctrl/Cmd-F. */
|
|
24
|
+
onFind: () => void;
|
|
25
|
+
/** Ctrl/Cmd-Shift-F. */
|
|
26
|
+
onFindReplace: () => void;
|
|
27
|
+
/** Invoked with the new document text whenever the doc changes. */
|
|
28
|
+
onDocChanged: (content: string) => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Assemble the full extension list for the markdown editor view. Keymap and
|
|
32
|
+
* doc-change handling are wired through the supplied callbacks so the component
|
|
33
|
+
* retains ownership of its reactive state.
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildExtensions(options: EditorExtensionOptions): Extension[];
|
|
36
|
+
//# sourceMappingURL=codemirror-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codemirror-config.d.ts","sourceRoot":"","sources":["../../src/editor/codemirror-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,UAAU,EAWX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAOnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE1F,mFAAmF;AACnF,eAAO,MAAM,YAAY,WAgCxB,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,YAAY,EAAE,SAAS,EAYnC,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,+DAA+D;IAC/D,iBAAiB,EAAE,CAAC,UAAU,EAAE,oBAAoB,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1G,kBAAkB;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,kBAAkB;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,wBAAwB;IACxB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,mEAAmE;IACnE,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,SAAS,EAAE,CAgC5E"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeMirror configuration for MarkdownEditor.
|
|
3
|
+
*
|
|
4
|
+
* Holds the editor theme, the minimal base setup, and the extension-assembly
|
|
5
|
+
* factory. Extracted from MarkdownEditor.svelte so the component stays focused
|
|
6
|
+
* on reactive state and lifecycle. All exports here are pure (no Svelte runes).
|
|
7
|
+
*/
|
|
8
|
+
import { EditorView, keymap, lineNumbers, highlightActiveLineGutter, highlightSpecialChars, drawSelection, dropCursor, rectangularSelection, crosshairCursor, highlightActiveLine } from '@codemirror/view';
|
|
9
|
+
import { markdown } from '@codemirror/lang-markdown';
|
|
10
|
+
import { defaultKeymap, history, historyKeymap } from '@codemirror/commands';
|
|
11
|
+
import { autoFormat } from './extensions/autoformat';
|
|
12
|
+
import { expansion } from './extensions/expansion';
|
|
13
|
+
import { autocomplete } from './extensions/autocomplete';
|
|
14
|
+
import { spellcheck } from './extensions/spellcheck';
|
|
15
|
+
/** Custom dark theme matching Atelier — uses CSS variables via style injection. */
|
|
16
|
+
export const atelierTheme = EditorView.theme({
|
|
17
|
+
'&': {
|
|
18
|
+
backgroundColor: 'var(--color-bg-canvas)',
|
|
19
|
+
color: 'var(--color-text-primary)',
|
|
20
|
+
fontSize: '14px',
|
|
21
|
+
fontFamily: 'var(--font-mono)'
|
|
22
|
+
},
|
|
23
|
+
'.cm-content': {
|
|
24
|
+
caretColor: 'var(--color-accent)',
|
|
25
|
+
padding: '16px'
|
|
26
|
+
},
|
|
27
|
+
'.cm-cursor': {
|
|
28
|
+
borderLeftColor: 'var(--color-accent)'
|
|
29
|
+
},
|
|
30
|
+
'.cm-activeLine': {
|
|
31
|
+
backgroundColor: 'var(--color-accent-subtle)'
|
|
32
|
+
},
|
|
33
|
+
'.cm-gutters': {
|
|
34
|
+
backgroundColor: 'var(--color-bg-app)',
|
|
35
|
+
borderRight: '1px solid var(--border-subtle)',
|
|
36
|
+
color: 'var(--color-text-tertiary)'
|
|
37
|
+
},
|
|
38
|
+
'.cm-activeLineGutter': {
|
|
39
|
+
backgroundColor: 'var(--color-accent-subtle)',
|
|
40
|
+
color: 'var(--color-accent)'
|
|
41
|
+
},
|
|
42
|
+
'.cm-selectionBackground': {
|
|
43
|
+
backgroundColor: 'var(--color-accent-subtle)'
|
|
44
|
+
}
|
|
45
|
+
}, { dark: true });
|
|
46
|
+
/** Minimal editor setup (replaces CodeMirror's `basicSetup`). */
|
|
47
|
+
export const minimalSetup = [
|
|
48
|
+
lineNumbers(),
|
|
49
|
+
highlightActiveLineGutter(),
|
|
50
|
+
highlightSpecialChars(),
|
|
51
|
+
history(),
|
|
52
|
+
keymap.of(defaultKeymap),
|
|
53
|
+
keymap.of(historyKeymap),
|
|
54
|
+
drawSelection(),
|
|
55
|
+
dropCursor(),
|
|
56
|
+
rectangularSelection(),
|
|
57
|
+
crosshairCursor(),
|
|
58
|
+
highlightActiveLine()
|
|
59
|
+
];
|
|
60
|
+
/**
|
|
61
|
+
* Assemble the full extension list for the markdown editor view. Keymap and
|
|
62
|
+
* doc-change handling are wired through the supplied callbacks so the component
|
|
63
|
+
* retains ownership of its reactive state.
|
|
64
|
+
*/
|
|
65
|
+
export function buildExtensions(options) {
|
|
66
|
+
const { completionSource, spellCheckDictionary, onCorrectionClick, onSave, onFind, onFindReplace, onDocChanged } = options;
|
|
67
|
+
const saveKeymap = keymap.of([
|
|
68
|
+
{ key: 'Ctrl-s', mac: 'Cmd-s', run: () => { onSave(); return true; } },
|
|
69
|
+
{ key: 'Ctrl-f', mac: 'Cmd-f', run: () => { onFind(); return true; } },
|
|
70
|
+
{ key: 'Ctrl-Shift-f', mac: 'Cmd-Shift-f', run: () => { onFindReplace(); return true; } }
|
|
71
|
+
]);
|
|
72
|
+
return [
|
|
73
|
+
minimalSetup,
|
|
74
|
+
markdown(),
|
|
75
|
+
atelierTheme,
|
|
76
|
+
saveKeymap,
|
|
77
|
+
autoFormat(),
|
|
78
|
+
expansion(),
|
|
79
|
+
...(completionSource ? [autocomplete({ source: completionSource })] : []),
|
|
80
|
+
...(spellCheckDictionary ? spellcheck(spellCheckDictionary, { onCorrectionClick }) : []),
|
|
81
|
+
EditorView.updateListener.of((update) => {
|
|
82
|
+
if (update.docChanged) {
|
|
83
|
+
onDocChanged(update.state.doc.toString());
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
];
|
|
87
|
+
}
|
|
@@ -1,167 +1,187 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
2
|
+
import { onMount } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
correction: { original: string; suggestions: string[] };
|
|
6
|
+
position: { top: number; left: number };
|
|
7
|
+
onAccept: (suggestion: string) => void;
|
|
8
|
+
onDismiss: () => void;
|
|
9
|
+
onAddToDictionary: () => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { correction, position, onAccept, onDismiss, onAddToDictionary }: Props = $props();
|
|
13
|
+
|
|
14
|
+
let dismissed = $state(false);
|
|
15
|
+
let tooltip = $state<HTMLDivElement | null>(null);
|
|
16
|
+
let listenersAttached = false;
|
|
17
|
+
|
|
18
|
+
function handleKeydown(e: KeyboardEvent) {
|
|
19
|
+
if (e.key === 'Escape') {
|
|
20
|
+
e.preventDefault();
|
|
21
|
+
handleDismiss();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function handlePointerDown(e: PointerEvent) {
|
|
26
|
+
if (dismissed || !tooltip) return;
|
|
27
|
+
const target = e.target as Node | null;
|
|
28
|
+
if (target && tooltip.contains(target)) return;
|
|
29
|
+
handleDismiss();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function attachListeners() {
|
|
33
|
+
if (listenersAttached) return;
|
|
34
|
+
window.addEventListener('keydown', handleKeydown);
|
|
35
|
+
window.addEventListener('pointerdown', handlePointerDown);
|
|
36
|
+
listenersAttached = true;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function detachListeners() {
|
|
40
|
+
if (!listenersAttached) return;
|
|
41
|
+
window.removeEventListener('keydown', handleKeydown);
|
|
42
|
+
window.removeEventListener('pointerdown', handlePointerDown);
|
|
43
|
+
listenersAttached = false;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function handleAccept(suggestion: string) {
|
|
47
|
+
if (dismissed) return;
|
|
48
|
+
onAccept(suggestion);
|
|
49
|
+
handleDismiss();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function handleAddToDictionary() {
|
|
53
|
+
if (dismissed) return;
|
|
54
|
+
onAddToDictionary();
|
|
55
|
+
handleDismiss();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function handleDismiss() {
|
|
59
|
+
if (dismissed) return;
|
|
60
|
+
dismissed = true;
|
|
61
|
+
detachListeners();
|
|
62
|
+
onDismiss();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
onMount(() => {
|
|
66
|
+
attachListeners();
|
|
67
|
+
return detachListeners;
|
|
68
|
+
});
|
|
53
69
|
</script>
|
|
54
70
|
|
|
55
|
-
{#if
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
71
|
+
{#if !dismissed}
|
|
72
|
+
<div
|
|
73
|
+
class="correction-tooltip"
|
|
74
|
+
bind:this={tooltip}
|
|
75
|
+
style:top={`${position.top}px`}
|
|
76
|
+
style:left={`${position.left}px`}
|
|
77
|
+
role="tooltip"
|
|
78
|
+
>
|
|
79
|
+
<div class="correction-tooltip__header">
|
|
80
|
+
<span class="correction-tooltip__word">{correction.original}</span>
|
|
81
|
+
<button type="button" class="correction-tooltip__close" onclick={handleDismiss} aria-label="Dismiss">
|
|
82
|
+
×
|
|
83
|
+
</button>
|
|
84
|
+
</div>
|
|
85
|
+
{#if correction.suggestions.length > 0}
|
|
86
|
+
<ul class="correction-tooltip__suggestions">
|
|
87
|
+
{#each correction.suggestions as s}
|
|
88
|
+
<li>
|
|
89
|
+
<button type="button" class="correction-tooltip__suggestion" onclick={() => handleAccept(s)}>
|
|
90
|
+
{s}
|
|
91
|
+
</button>
|
|
92
|
+
</li>
|
|
93
|
+
{/each}
|
|
94
|
+
</ul>
|
|
95
|
+
{/if}
|
|
96
|
+
<div class="correction-tooltip__actions">
|
|
97
|
+
<button type="button" class="correction-tooltip__action" onclick={handleAddToDictionary}>
|
|
98
|
+
Add to Dictionary
|
|
99
|
+
</button>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
83
102
|
{/if}
|
|
84
103
|
|
|
85
104
|
<style>
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
105
|
+
.correction-tooltip {
|
|
106
|
+
position: fixed;
|
|
107
|
+
background: var(--color-bg-panel, #1a1a1a);
|
|
108
|
+
border: 1px solid var(--border-default, #2a2a2a);
|
|
109
|
+
border-radius: var(--radius-md, 6px);
|
|
110
|
+
box-shadow: var(--shadow-lg, 0 4px 12px rgba(0, 0, 0, 0.4));
|
|
111
|
+
min-width: 180px;
|
|
112
|
+
max-width: 280px;
|
|
113
|
+
z-index: 1000;
|
|
114
|
+
font-family: var(--font-sans, system-ui);
|
|
115
|
+
font-size: var(--text-sm, 13px);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.correction-tooltip__header {
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
justify-content: space-between;
|
|
122
|
+
padding: 8px 12px;
|
|
123
|
+
border-bottom: 1px solid var(--border-subtle, #2a2a2a);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.correction-tooltip__word {
|
|
127
|
+
font-weight: 600;
|
|
128
|
+
color: var(--color-text-primary, #f5f2eb);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.correction-tooltip__close {
|
|
132
|
+
background: none;
|
|
133
|
+
border: none;
|
|
134
|
+
color: var(--color-text-tertiary, #6b6b6b);
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
padding: 2px 6px;
|
|
137
|
+
font-size: 12px;
|
|
138
|
+
line-height: 1;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.correction-tooltip__close:hover {
|
|
142
|
+
color: var(--color-text-primary, #f5f2eb);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.correction-tooltip__suggestions {
|
|
146
|
+
list-style: none;
|
|
147
|
+
margin: 0;
|
|
148
|
+
padding: 4px 0;
|
|
149
|
+
max-height: 200px;
|
|
150
|
+
overflow-y: auto;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.correction-tooltip__suggestion {
|
|
154
|
+
display: block;
|
|
155
|
+
width: 100%;
|
|
156
|
+
text-align: left;
|
|
157
|
+
padding: 6px 12px;
|
|
158
|
+
background: none;
|
|
159
|
+
border: none;
|
|
160
|
+
color: var(--color-text-primary, #f5f2eb);
|
|
161
|
+
cursor: pointer;
|
|
162
|
+
font-size: 13px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.correction-tooltip__suggestion:hover {
|
|
166
|
+
background: var(--color-accent, #888);
|
|
167
|
+
color: #fff;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.correction-tooltip__actions {
|
|
171
|
+
border-top: 1px solid var(--border-subtle, #2a2a2a);
|
|
172
|
+
padding: 6px 12px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.correction-tooltip__action {
|
|
176
|
+
background: none;
|
|
177
|
+
border: none;
|
|
178
|
+
color: var(--color-accent, #888);
|
|
179
|
+
cursor: pointer;
|
|
180
|
+
font-size: 12px;
|
|
181
|
+
padding: 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.correction-tooltip__action:hover {
|
|
185
|
+
text-decoration: underline;
|
|
186
|
+
}
|
|
167
187
|
</style>
|
|
@@ -1,28 +1,12 @@
|
|
|
1
|
-
interface Suggestion {
|
|
2
|
-
word: string;
|
|
3
|
-
from: number;
|
|
4
|
-
to: number;
|
|
5
|
-
}
|
|
6
1
|
interface Props {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
doc: {
|
|
15
|
-
sliceString: (from: number, to: number) => string;
|
|
16
|
-
};
|
|
17
|
-
selection: {
|
|
18
|
-
main: {
|
|
19
|
-
from: number;
|
|
20
|
-
to: number;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
2
|
+
correction: {
|
|
3
|
+
original: string;
|
|
4
|
+
suggestions: string[];
|
|
5
|
+
};
|
|
6
|
+
position: {
|
|
7
|
+
top: number;
|
|
8
|
+
left: number;
|
|
24
9
|
};
|
|
25
|
-
suggestion: Suggestion;
|
|
26
10
|
onAccept: (suggestion: string) => void;
|
|
27
11
|
onDismiss: () => void;
|
|
28
12
|
onAddToDictionary: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CorrectionTooltip.svelte.d.ts","sourceRoot":"","sources":["../../../src/editor/components/CorrectionTooltip.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CorrectionTooltip.svelte.d.ts","sourceRoot":"","sources":["../../../src/editor/components/CorrectionTooltip.svelte.ts"],"names":[],"mappings":"AAMC,UAAU,KAAK;IACd,UAAU,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACxD,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC9B;AA+FF,QAAA,MAAM,iBAAiB,2CAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { autocompletion, type CompletionSource } from '@codemirror/autocomplete';
|
|
1
|
+
import { autocompletion, type Completion, type CompletionSource } from '@codemirror/autocomplete';
|
|
2
2
|
export { autocompletion };
|
|
3
|
-
export type { CompletionSource };
|
|
3
|
+
export type { Completion, CompletionSource };
|
|
4
4
|
export interface AutocompleteConfig {
|
|
5
5
|
source: CompletionSource;
|
|
6
6
|
defaultKeymap?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../src/editor/extensions/autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../src/editor/extensions/autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAElG,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC;AAE7C,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,gBAAgB,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB,yCAMtD"}
|