@voithos-labs/aragonite 0.10.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/LICENSE +661 -0
- package/README.md +365 -0
- package/THIRD-PARTY-NOTICES.md +102 -0
- package/dist/a11y-strings.d.ts +46 -0
- package/dist/a11y-strings.js +62 -0
- package/dist/action-contracts.d.ts +301 -0
- package/dist/action-contracts.js +5 -0
- package/dist/active-editor.d.ts +16 -0
- package/dist/active-editor.js +67 -0
- package/dist/ambient/ambient-cursor.d.ts +41 -0
- package/dist/ambient/ambient-cursor.js +120 -0
- package/dist/ambient/ambient-dom.d.ts +9 -0
- package/dist/ambient/ambient-dom.js +102 -0
- package/dist/assert.d.ts +6 -0
- package/dist/assert.js +17 -0
- package/dist/block-component.d.ts +274 -0
- package/dist/block-component.js +43 -0
- package/dist/block-id.d.ts +14 -0
- package/dist/block-id.js +34 -0
- package/dist/bounded-memo.d.ts +14 -0
- package/dist/bounded-memo.js +32 -0
- package/dist/components/BlockDragHandle.svelte +66 -0
- package/dist/components/BlockDragHandle.svelte.d.ts +18 -0
- package/dist/components/BlockHost.svelte +328 -0
- package/dist/components/BlockHost.svelte.d.ts +15 -0
- package/dist/components/BlockList.svelte +114 -0
- package/dist/components/BlockList.svelte.d.ts +16 -0
- package/dist/components/DecorationOverlay.svelte +156 -0
- package/dist/components/DecorationOverlay.svelte.d.ts +14 -0
- package/dist/components/Editor.svelte +1849 -0
- package/dist/components/Editor.svelte.d.ts +49 -0
- package/dist/components/GapCaret.svelte +226 -0
- package/dist/components/GapCaret.svelte.d.ts +9 -0
- package/dist/components/SearchBar.svelte +243 -0
- package/dist/components/SearchBar.svelte.d.ts +7 -0
- package/dist/components/SelectionOverlay.svelte +171 -0
- package/dist/components/SelectionOverlay.svelte.d.ts +14 -0
- package/dist/components/block-content-selector.d.ts +12 -0
- package/dist/components/block-content-selector.js +12 -0
- package/dist/components/blocks/BlockquoteBlock.svelte +32 -0
- package/dist/components/blocks/BlockquoteBlock.svelte.d.ts +11 -0
- package/dist/components/blocks/ThematicBreakBlock.svelte +156 -0
- package/dist/components/blocks/ThematicBreakBlock.svelte.d.ts +17 -0
- package/dist/components/blocks/code/CodeBlock.svelte +726 -0
- package/dist/components/blocks/code/CodeBlock.svelte.d.ts +23 -0
- package/dist/components/blocks/code/CodeLanguageChip.svelte +127 -0
- package/dist/components/blocks/code/CodeLanguageChip.svelte.d.ts +14 -0
- package/dist/components/blocks/code/code-beforeinput.d.ts +30 -0
- package/dist/components/blocks/code/code-beforeinput.js +40 -0
- package/dist/components/blocks/code/code-bootstrap.d.ts +8 -0
- package/dist/components/blocks/code/code-bootstrap.js +54 -0
- package/dist/components/blocks/code/code-editing.d.ts +28 -0
- package/dist/components/blocks/code/code-editing.js +79 -0
- package/dist/components/blocks/code/code-enter.d.ts +22 -0
- package/dist/components/blocks/code/code-enter.js +19 -0
- package/dist/components/blocks/code/code-fence-boundary.d.ts +77 -0
- package/dist/components/blocks/code/code-fence-boundary.js +169 -0
- package/dist/components/blocks/code/code-fence-exit.d.ts +24 -0
- package/dist/components/blocks/code/code-fence-exit.js +36 -0
- package/dist/components/blocks/code/code-indent.d.ts +14 -0
- package/dist/components/blocks/code/code-indent.js +87 -0
- package/dist/components/blocks/code/code-languages.d.ts +15 -0
- package/dist/components/blocks/code/code-languages.js +30 -0
- package/dist/components/blocks/code/code-paste-surface.d.ts +6 -0
- package/dist/components/blocks/code/code-paste-surface.js +29 -0
- package/dist/components/blocks/code/code-paste.d.ts +24 -0
- package/dist/components/blocks/code/code-paste.js +21 -0
- package/dist/components/blocks/code/code-renderer.d.ts +18 -0
- package/dist/components/blocks/code/code-renderer.js +249 -0
- package/dist/components/blocks/directive/DirectiveContainerBlock.svelte +51 -0
- package/dist/components/blocks/directive/DirectiveContainerBlock.svelte.d.ts +11 -0
- package/dist/components/blocks/directive/activate-directives.d.ts +7 -0
- package/dist/components/blocks/directive/activate-directives.js +23 -0
- package/dist/components/blocks/editable-leaf.d.ts +126 -0
- package/dist/components/blocks/editable-leaf.js +410 -0
- package/dist/components/blocks/editable-surface.d.ts +209 -0
- package/dist/components/blocks/editable-surface.js +331 -0
- package/dist/components/blocks/list/ListBlock.svelte +162 -0
- package/dist/components/blocks/list/ListBlock.svelte.d.ts +11 -0
- package/dist/components/blocks/list/ListItemBlock.svelte +324 -0
- package/dist/components/blocks/list/ListItemBlock.svelte.d.ts +14 -0
- package/dist/components/blocks/list/task-checkbox.d.ts +3 -0
- package/dist/components/blocks/list/task-checkbox.js +33 -0
- package/dist/components/blocks/plain-text-backend.d.ts +21 -0
- package/dist/components/blocks/plain-text-backend.js +47 -0
- package/dist/components/blocks/surface-wiring.svelte.d.ts +18 -0
- package/dist/components/blocks/surface-wiring.svelte.js +68 -0
- package/dist/components/blocks/table/TableActionMenu.svelte +267 -0
- package/dist/components/blocks/table/TableActionMenu.svelte.d.ts +15 -0
- package/dist/components/blocks/table/TableBlock.svelte +765 -0
- package/dist/components/blocks/table/TableBlock.svelte.d.ts +30 -0
- package/dist/components/blocks/table/TableCellBlock.svelte +1075 -0
- package/dist/components/blocks/table/TableCellBlock.svelte.d.ts +30 -0
- package/dist/components/blocks/table/TableGrip.svelte +91 -0
- package/dist/components/blocks/table/TableGrip.svelte.d.ts +8 -0
- package/dist/components/blocks/table/TableRowBlock.svelte +233 -0
- package/dist/components/blocks/table/TableRowBlock.svelte.d.ts +34 -0
- package/dist/components/blocks/table/cell-clipboard.d.ts +23 -0
- package/dist/components/blocks/table/cell-clipboard.js +34 -0
- package/dist/components/blocks/table/cell-keydown-plan.d.ts +37 -0
- package/dist/components/blocks/table/cell-keydown-plan.js +66 -0
- package/dist/components/blocks/table/cell-pointer.d.ts +58 -0
- package/dist/components/blocks/table/cell-pointer.js +153 -0
- package/dist/components/blocks/table/cell-render.d.ts +51 -0
- package/dist/components/blocks/table/cell-render.js +98 -0
- package/dist/components/blocks/table/cell-table-commands.d.ts +12 -0
- package/dist/components/blocks/table/cell-table-commands.js +21 -0
- package/dist/components/blocks/table/cell-x-mapping.d.ts +6 -0
- package/dist/components/blocks/table/cell-x-mapping.js +16 -0
- package/dist/components/blocks/table/selected-cells.d.ts +19 -0
- package/dist/components/blocks/table/selected-cells.js +35 -0
- package/dist/components/blocks/table/table-caret-at-point.d.ts +8 -0
- package/dist/components/blocks/table/table-caret-at-point.js +35 -0
- package/dist/components/blocks/table/table-cell-paste.d.ts +16 -0
- package/dist/components/blocks/table/table-cell-paste.js +75 -0
- package/dist/components/blocks/table/table-drag-hit-test.d.ts +5 -0
- package/dist/components/blocks/table/table-drag-hit-test.js +20 -0
- package/dist/components/blocks/table/table-drop-target.d.ts +1 -0
- package/dist/components/blocks/table/table-drop-target.js +16 -0
- package/dist/components/blocks/table/table-menu-model.d.ts +52 -0
- package/dist/components/blocks/table/table-menu-model.js +78 -0
- package/dist/components/blocks/table/table-navigation.d.ts +8 -0
- package/dist/components/blocks/table/table-navigation.js +22 -0
- package/dist/components/blocks/table/table-reorder-drag.d.ts +78 -0
- package/dist/components/blocks/table/table-reorder-drag.js +97 -0
- package/dist/components/blocks/text/TextEditableBlock.svelte +1012 -0
- package/dist/components/blocks/text/TextEditableBlock.svelte.d.ts +33 -0
- package/dist/components/blocks/text/click-snap-guard.d.ts +8 -0
- package/dist/components/blocks/text/click-snap-guard.js +19 -0
- package/dist/components/blocks/text/composition-seat.d.ts +50 -0
- package/dist/components/blocks/text/composition-seat.js +65 -0
- package/dist/components/blocks/text/construct-edge-delete.d.ts +47 -0
- package/dist/components/blocks/text/construct-edge-delete.js +164 -0
- package/dist/components/blocks/text/construct-reveal.d.ts +39 -0
- package/dist/components/blocks/text/construct-reveal.js +164 -0
- package/dist/components/blocks/text/edge-policy-dispatch.d.ts +91 -0
- package/dist/components/blocks/text/edge-policy-dispatch.js +457 -0
- package/dist/components/blocks/text/edge-seat.d.ts +42 -0
- package/dist/components/blocks/text/edge-seat.js +197 -0
- package/dist/components/blocks/text/hidden-suffix.d.ts +10 -0
- package/dist/components/blocks/text/hidden-suffix.js +15 -0
- package/dist/components/blocks/text/link-at-point.d.ts +33 -0
- package/dist/components/blocks/text/link-at-point.js +47 -0
- package/dist/components/blocks/text/link-source-bytes.d.ts +37 -0
- package/dist/components/blocks/text/link-source-bytes.js +161 -0
- package/dist/components/blocks/text/live-join-seam.d.ts +15 -0
- package/dist/components/blocks/text/live-join-seam.js +327 -0
- package/dist/components/blocks/text/live-selection-edit.d.ts +68 -0
- package/dist/components/blocks/text/live-selection-edit.js +120 -0
- package/dist/components/blocks/text/live-split-rebalance.d.ts +56 -0
- package/dist/components/blocks/text/live-split-rebalance.js +239 -0
- package/dist/components/blocks/text/marker-completion.d.ts +18 -0
- package/dist/components/blocks/text/marker-completion.js +29 -0
- package/dist/components/blocks/text/pending-mark-insert.d.ts +37 -0
- package/dist/components/blocks/text/pending-mark-insert.js +188 -0
- package/dist/components/blocks/text/screen-diff.d.ts +20 -0
- package/dist/components/blocks/text/screen-diff.js +39 -0
- package/dist/components/blocks/text/text-clipboard.d.ts +70 -0
- package/dist/components/blocks/text/text-clipboard.js +131 -0
- package/dist/components/blocks/text/text-keydown.d.ts +39 -0
- package/dist/components/blocks/text/text-keydown.js +80 -0
- package/dist/components/blocks/text/text-render.d.ts +67 -0
- package/dist/components/blocks/text/text-render.js +215 -0
- package/dist/components/blocks/text/widget-adjacency.d.ts +30 -0
- package/dist/components/blocks/text/widget-adjacency.js +68 -0
- package/dist/components/blocks/text/widget-interaction.d.ts +90 -0
- package/dist/components/blocks/text/widget-interaction.js +591 -0
- package/dist/components/blocks/widget-portal.d.ts +54 -0
- package/dist/components/blocks/widget-portal.js +136 -0
- package/dist/components/built-in-blocks.d.ts +7 -0
- package/dist/components/built-in-blocks.js +77 -0
- package/dist/components/editor-root-clipboard.d.ts +29 -0
- package/dist/components/editor-root-clipboard.js +105 -0
- package/dist/components/editor-root-keydown.d.ts +47 -0
- package/dist/components/editor-root-keydown.js +88 -0
- package/dist/components/editor-root-listeners.d.ts +44 -0
- package/dist/components/editor-root-listeners.js +112 -0
- package/dist/components/image/ImageOverlayHost.svelte +115 -0
- package/dist/components/image/ImageOverlayHost.svelte.d.ts +20 -0
- package/dist/components/image/ImageProperties.svelte +153 -0
- package/dist/components/image/ImageProperties.svelte.d.ts +14 -0
- package/dist/components/image/ImageResizeHandles.svelte +188 -0
- package/dist/components/image/ImageResizeHandles.svelte.d.ts +10 -0
- package/dist/components/image/image-edit-commit.d.ts +38 -0
- package/dist/components/image/image-edit-commit.js +159 -0
- package/dist/components/image/image-resize.d.ts +11 -0
- package/dist/components/image/image-resize.js +38 -0
- package/dist/components/image/image-source-bytes.d.ts +15 -0
- package/dist/components/image/image-source-bytes.js +73 -0
- package/dist/components/image/image-widget-editing.d.ts +7 -0
- package/dist/components/image/image-widget-editing.js +41 -0
- package/dist/components/image/widget-dom.d.ts +11 -0
- package/dist/components/image/widget-dom.js +110 -0
- package/dist/components/image/widget-selection-state.svelte.d.ts +18 -0
- package/dist/components/image/widget-selection-state.svelte.js +26 -0
- package/dist/components/link-card/LinkCard.svelte +190 -0
- package/dist/components/link-card/LinkCard.svelte.d.ts +18 -0
- package/dist/components/link-card/LinkCardHost.svelte +181 -0
- package/dist/components/link-card/LinkCardHost.svelte.d.ts +25 -0
- package/dist/components/link-card/link-card-commit.d.ts +50 -0
- package/dist/components/link-card/link-card-commit.js +134 -0
- package/dist/components/link-card/link-card-entry.d.ts +39 -0
- package/dist/components/link-card/link-card-entry.js +51 -0
- package/dist/components/link-card/link-card-state.svelte.d.ts +44 -0
- package/dist/components/link-card/link-card-state.svelte.js +46 -0
- package/dist/components/lrd-map-gate.d.ts +18 -0
- package/dist/components/lrd-map-gate.js +22 -0
- package/dist/components/paste-image-arm.d.ts +29 -0
- package/dist/components/paste-image-arm.js +61 -0
- package/dist/components/portal.d.ts +11 -0
- package/dist/components/portal.js +29 -0
- package/dist/core/directive/activate.d.ts +8 -0
- package/dist/core/directive/activate.js +25 -0
- package/dist/core/directive/container-opener.d.ts +7 -0
- package/dist/core/directive/container-opener.js +162 -0
- package/dist/core/directive/grammar.d.ts +50 -0
- package/dist/core/directive/grammar.js +88 -0
- package/dist/core/directive/kinds.d.ts +31 -0
- package/dist/core/directive/kinds.js +137 -0
- package/dist/core/directive/registry.d.ts +39 -0
- package/dist/core/directive/registry.js +49 -0
- package/dist/core/directive/text-recognizer.d.ts +8 -0
- package/dist/core/directive/text-recognizer.js +87 -0
- package/dist/core/escapable.d.ts +6 -0
- package/dist/core/escapable.js +6 -0
- package/dist/core/inline/backticks.d.ts +16 -0
- package/dist/core/inline/backticks.js +62 -0
- package/dist/core/inline/character-refs.d.ts +7 -0
- package/dist/core/inline/character-refs.js +70 -0
- package/dist/core/inline/destination-bytes.d.ts +7 -0
- package/dist/core/inline/destination-bytes.js +14 -0
- package/dist/core/inline/entity-widget.d.ts +11 -0
- package/dist/core/inline/entity-widget.js +21 -0
- package/dist/core/inline/format-toggle.d.ts +50 -0
- package/dist/core/inline/format-toggle.js +533 -0
- package/dist/core/inline/html-entities.d.ts +8 -0
- package/dist/core/inline/html-entities.js +2134 -0
- package/dist/core/inline/html-tag-grammar.d.ts +16 -0
- package/dist/core/inline/html-tag-grammar.js +58 -0
- package/dist/core/inline/image-dimensions.d.ts +6 -0
- package/dist/core/inline/image-dimensions.js +42 -0
- package/dist/core/inline/index.d.ts +42 -0
- package/dist/core/inline/index.js +77 -0
- package/dist/core/inline/inline-cache.d.ts +20 -0
- package/dist/core/inline/inline-cache.js +28 -0
- package/dist/core/inline/inline-widgets.d.ts +124 -0
- package/dist/core/inline/inline-widgets.js +131 -0
- package/dist/core/inline/link-reference-resolver.d.ts +21 -0
- package/dist/core/inline/link-reference-resolver.js +46 -0
- package/dist/core/inline/raw-html-widget.d.ts +10 -0
- package/dist/core/inline/raw-html-widget.js +22 -0
- package/dist/core/inline/scan/autolinks.d.ts +23 -0
- package/dist/core/inline/scan/autolinks.js +354 -0
- package/dist/core/inline/scan/brackets.d.ts +11 -0
- package/dist/core/inline/scan/brackets.js +284 -0
- package/dist/core/inline/scan/code-spans.d.ts +7 -0
- package/dist/core/inline/scan/code-spans.js +27 -0
- package/dist/core/inline/scan/emphasis.d.ts +10 -0
- package/dist/core/inline/scan/emphasis.js +276 -0
- package/dist/core/inline/scan/index.d.ts +7 -0
- package/dist/core/inline/scan/index.js +176 -0
- package/dist/core/inline/scan/plugin-syntax.d.ts +62 -0
- package/dist/core/inline/scan/plugin-syntax.js +150 -0
- package/dist/core/inline/scan/scan-state.d.ts +47 -0
- package/dist/core/inline/scan/scan-state.js +48 -0
- package/dist/core/inline/scan/simple-nodes.d.ts +14 -0
- package/dist/core/inline/scan/simple-nodes.js +53 -0
- package/dist/core/inline/scan/url.d.ts +12 -0
- package/dist/core/inline/scan/url.js +82 -0
- package/dist/core/inline/transparency.d.ts +8 -0
- package/dist/core/inline/transparency.js +39 -0
- package/dist/core/inline/visibility.d.ts +81 -0
- package/dist/core/inline/visibility.js +144 -0
- package/dist/core/inline/walk.d.ts +14 -0
- package/dist/core/inline/walk.js +29 -0
- package/dist/core/inline-render.d.ts +48 -0
- package/dist/core/inline-render.js +322 -0
- package/dist/core/lines.d.ts +44 -0
- package/dist/core/lines.js +91 -0
- package/dist/core/node-views.d.ts +22 -0
- package/dist/core/node-views.js +8 -0
- package/dist/core/nodes.d.ts +297 -0
- package/dist/core/nodes.js +83 -0
- package/dist/core/parser.d.ts +68 -0
- package/dist/core/parser.js +189 -0
- package/dist/core/parsers/blockquote.d.ts +17 -0
- package/dist/core/parsers/blockquote.js +69 -0
- package/dist/core/parsers/built-in-openers.d.ts +8 -0
- package/dist/core/parsers/built-in-openers.js +124 -0
- package/dist/core/parsers/fence-syntax.d.ts +24 -0
- package/dist/core/parsers/fence-syntax.js +44 -0
- package/dist/core/parsers/fenced-code.d.ts +7 -0
- package/dist/core/parsers/fenced-code.js +29 -0
- package/dist/core/parsers/heading.d.ts +3 -0
- package/dist/core/parsers/heading.js +6 -0
- package/dist/core/parsers/html-block.d.ts +17 -0
- package/dist/core/parsers/html-block.js +94 -0
- package/dist/core/parsers/indented-code.d.ts +4 -0
- package/dist/core/parsers/indented-code.js +41 -0
- package/dist/core/parsers/link-reference.d.ts +7 -0
- package/dist/core/parsers/link-reference.js +152 -0
- package/dist/core/parsers/list.d.ts +19 -0
- package/dist/core/parsers/list.js +133 -0
- package/dist/core/parsers/paragraph.d.ts +10 -0
- package/dist/core/parsers/paragraph.js +42 -0
- package/dist/core/parsers/table-completion.d.ts +13 -0
- package/dist/core/parsers/table-completion.js +48 -0
- package/dist/core/parsers/table.d.ts +18 -0
- package/dist/core/parsers/table.js +110 -0
- package/dist/core/parsers/thematic-break.d.ts +1 -0
- package/dist/core/parsers/thematic-break.js +19 -0
- package/dist/core/serializer.d.ts +15 -0
- package/dist/core/serializer.js +11 -0
- package/dist/core/terminator-escalation.d.ts +8 -0
- package/dist/core/terminator-escalation.js +18 -0
- package/dist/core/url-policy.d.ts +14 -0
- package/dist/core/url-policy.js +44 -0
- package/dist/cursor/content-offsets.d.ts +29 -0
- package/dist/cursor/content-offsets.js +151 -0
- package/dist/cursor/coordinate-spaces.d.ts +65 -0
- package/dist/cursor/coordinate-spaces.js +66 -0
- package/dist/cursor/dom-walk.d.ts +18 -0
- package/dist/cursor/dom-walk.js +31 -0
- package/dist/cursor/edge-affinity.d.ts +44 -0
- package/dist/cursor/edge-affinity.js +60 -0
- package/dist/cursor/focused-caret.d.ts +10 -0
- package/dist/cursor/focused-caret.js +24 -0
- package/dist/cursor/height-model.d.ts +24 -0
- package/dist/cursor/height-model.js +72 -0
- package/dist/cursor/height-oracle.d.ts +24 -0
- package/dist/cursor/height-oracle.js +94 -0
- package/dist/cursor/overlay-rects.d.ts +8 -0
- package/dist/cursor/overlay-rects.js +19 -0
- package/dist/cursor/overlay-remeasure.d.ts +17 -0
- package/dist/cursor/overlay-remeasure.js +31 -0
- package/dist/cursor/pending-marks.d.ts +24 -0
- package/dist/cursor/pending-marks.js +36 -0
- package/dist/cursor/point-offset.d.ts +21 -0
- package/dist/cursor/point-offset.js +48 -0
- package/dist/cursor/reveal-anchor.d.ts +30 -0
- package/dist/cursor/reveal-anchor.js +31 -0
- package/dist/cursor/reveal-source.d.ts +35 -0
- package/dist/cursor/reveal-source.js +51 -0
- package/dist/cursor/scroll-ancestors.d.ts +28 -0
- package/dist/cursor/scroll-ancestors.js +89 -0
- package/dist/cursor/scrollport.d.ts +20 -0
- package/dist/cursor/scrollport.js +41 -0
- package/dist/cursor/sticky-column.d.ts +35 -0
- package/dist/cursor/sticky-column.js +64 -0
- package/dist/cursor/sticky-measure.d.ts +16 -0
- package/dist/cursor/sticky-measure.js +97 -0
- package/dist/cursor/typography-estimates.d.ts +21 -0
- package/dist/cursor/typography-estimates.js +21 -0
- package/dist/cursor/visual-lines.d.ts +25 -0
- package/dist/cursor/visual-lines.js +125 -0
- package/dist/cursor/widget-offset.d.ts +132 -0
- package/dist/cursor/widget-offset.js +543 -0
- package/dist/debug/diagnostics-report.d.ts +17 -0
- package/dist/debug/diagnostics-report.js +25 -0
- package/dist/debug/dump-tree.d.ts +6 -0
- package/dist/debug/dump-tree.js +114 -0
- package/dist/debug/inspect.d.ts +19 -0
- package/dist/debug/inspect.js +116 -0
- package/dist/debug/interaction-trace.d.ts +39 -0
- package/dist/debug/interaction-trace.js +105 -0
- package/dist/debug/operations-log.d.ts +14 -0
- package/dist/debug/operations-log.js +30 -0
- package/dist/decorations/buckets.d.ts +40 -0
- package/dist/decorations/buckets.js +87 -0
- package/dist/decorations/decoration-state.svelte.d.ts +20 -0
- package/dist/decorations/decoration-state.svelte.js +195 -0
- package/dist/decorations/island-dom.d.ts +35 -0
- package/dist/decorations/island-dom.js +148 -0
- package/dist/decorations/reserved-attrs.d.ts +12 -0
- package/dist/decorations/reserved-attrs.js +47 -0
- package/dist/decorations/types.d.ts +68 -0
- package/dist/decorations/types.js +5 -0
- package/dist/decorations/widget-dom.d.ts +15 -0
- package/dist/decorations/widget-dom.js +35 -0
- package/dist/dev-warn.d.ts +13 -0
- package/dist/dev-warn.js +28 -0
- package/dist/editor-actions/ancestry-folds.d.ts +32 -0
- package/dist/editor-actions/ancestry-folds.js +106 -0
- package/dist/editor-actions/block-edit-core.d.ts +29 -0
- package/dist/editor-actions/block-edit-core.js +277 -0
- package/dist/editor-actions/block-edit-scope.d.ts +79 -0
- package/dist/editor-actions/block-edit-scope.js +76 -0
- package/dist/editor-actions/block-edit.d.ts +8 -0
- package/dist/editor-actions/block-edit.js +111 -0
- package/dist/editor-actions/commit/history.d.ts +9 -0
- package/dist/editor-actions/commit/history.js +77 -0
- package/dist/editor-actions/commit/text-batch.d.ts +34 -0
- package/dist/editor-actions/commit/text-batch.js +61 -0
- package/dist/editor-actions/commit/undo-controller.d.ts +7 -0
- package/dist/editor-actions/commit/undo-controller.js +570 -0
- package/dist/editor-actions/container-block-component.d.ts +85 -0
- package/dist/editor-actions/container-block-component.js +228 -0
- package/dist/editor-actions/container-edit.d.ts +7 -0
- package/dist/editor-actions/container-edit.js +49 -0
- package/dist/editor-actions/container-exit-overrides.d.ts +16 -0
- package/dist/editor-actions/container-exit-overrides.js +38 -0
- package/dist/editor-actions/deps.d.ts +60 -0
- package/dist/editor-actions/deps.js +1 -0
- package/dist/editor-actions/enter-completion.d.ts +25 -0
- package/dist/editor-actions/enter-completion.js +76 -0
- package/dist/editor-actions/focus/focus-dispatch.d.ts +36 -0
- package/dist/editor-actions/focus/focus-dispatch.js +106 -0
- package/dist/editor-actions/focus/focus-landing.d.ts +7 -0
- package/dist/editor-actions/focus/focus-landing.js +39 -0
- package/dist/editor-actions/focus/focus.d.ts +7 -0
- package/dist/editor-actions/focus/focus.js +74 -0
- package/dist/editor-actions/index.d.ts +15 -0
- package/dist/editor-actions/index.js +19 -0
- package/dist/editor-actions/inline-range-commit.d.ts +20 -0
- package/dist/editor-actions/inline-range-commit.js +63 -0
- package/dist/editor-actions/list-context.d.ts +25 -0
- package/dist/editor-actions/list-context.js +285 -0
- package/dist/editor-actions/list-overrides.d.ts +13 -0
- package/dist/editor-actions/list-overrides.js +26 -0
- package/dist/editor-actions/merge-fallback.d.ts +19 -0
- package/dist/editor-actions/merge-fallback.js +27 -0
- package/dist/editor-actions/nested/nested-actions.d.ts +65 -0
- package/dist/editor-actions/nested/nested-actions.js +59 -0
- package/dist/editor-actions/nested/nested-block-edit.d.ts +10 -0
- package/dist/editor-actions/nested/nested-block-edit.js +181 -0
- package/dist/editor-actions/nested/nested-focus.d.ts +9 -0
- package/dist/editor-actions/nested/nested-focus.js +30 -0
- package/dist/editor-actions/paste-coordinator.d.ts +4 -0
- package/dist/editor-actions/paste-coordinator.js +20 -0
- package/dist/editor-actions/plugin/chrome-leaf.d.ts +25 -0
- package/dist/editor-actions/plugin/chrome-leaf.js +80 -0
- package/dist/editor-actions/plugin/container.d.ts +137 -0
- package/dist/editor-actions/plugin/container.js +351 -0
- package/dist/editor-actions/plugin/directive-container.d.ts +13 -0
- package/dist/editor-actions/plugin/directive-container.js +31 -0
- package/dist/editor-actions/reorder-action.d.ts +17 -0
- package/dist/editor-actions/reorder-action.js +104 -0
- package/dist/editor-actions/reorder-drag.d.ts +34 -0
- package/dist/editor-actions/reorder-drag.js +152 -0
- package/dist/editor-actions/replacement-focus.d.ts +27 -0
- package/dist/editor-actions/replacement-focus.js +60 -0
- package/dist/editor-actions/search-replace.d.ts +6 -0
- package/dist/editor-actions/search-replace.js +145 -0
- package/dist/editor-actions/table-context.d.ts +34 -0
- package/dist/editor-actions/table-context.js +292 -0
- package/dist/editor-actions/unwrap-strategies.d.ts +14 -0
- package/dist/editor-actions/unwrap-strategies.js +131 -0
- package/dist/editor-actions/whole-block-focus-surface.d.ts +51 -0
- package/dist/editor-actions/whole-block-focus-surface.js +171 -0
- package/dist/editor-events.d.ts +89 -0
- package/dist/editor-events.js +96 -0
- package/dist/editor-keys.d.ts +197 -0
- package/dist/editor-keys.js +40 -0
- package/dist/editor-props.d.ts +164 -0
- package/dist/editor-props.js +1 -0
- package/dist/editor-rects.d.ts +58 -0
- package/dist/editor-rects.js +114 -0
- package/dist/env.d.ts +12 -0
- package/dist/env.js +20 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +19 -0
- package/dist/invariants/commit-paths.d.ts +10 -0
- package/dist/invariants/commit-paths.js +25 -0
- package/dist/invariants/commit-scope.d.ts +9 -0
- package/dist/invariants/commit-scope.js +16 -0
- package/dist/invariants/context-keys.d.ts +7 -0
- package/dist/invariants/context-keys.js +14 -0
- package/dist/invariants/descriptor.d.ts +10 -0
- package/dist/invariants/descriptor.js +24 -0
- package/dist/invariants/inline-transitions.d.ts +23 -0
- package/dist/invariants/inline-transitions.js +52 -0
- package/dist/invariants/install.d.ts +36 -0
- package/dist/invariants/install.js +66 -0
- package/dist/invariants/landable-caret.d.ts +12 -0
- package/dist/invariants/landable-caret.js +31 -0
- package/dist/invariants/marker-css-parity.d.ts +10 -0
- package/dist/invariants/marker-css-parity.js +87 -0
- package/dist/invariants/node-shape.d.ts +44 -0
- package/dist/invariants/node-shape.js +258 -0
- package/dist/invariants/registry.d.ts +126 -0
- package/dist/invariants/registry.js +349 -0
- package/dist/invariants/render-fidelity.d.ts +8 -0
- package/dist/invariants/render-fidelity.js +33 -0
- package/dist/invariants/selection-endpoints.d.ts +19 -0
- package/dist/invariants/selection-endpoints.js +78 -0
- package/dist/invariants/single-node-sink.d.ts +9 -0
- package/dist/invariants/single-node-sink.js +16 -0
- package/dist/invariants/snapshot-integrity.d.ts +17 -0
- package/dist/invariants/snapshot-integrity.js +24 -0
- package/dist/invariants/split-landing.d.ts +8 -0
- package/dist/invariants/split-landing.js +15 -0
- package/dist/invariants/structural-descriptor.d.ts +21 -0
- package/dist/invariants/structural-descriptor.js +50 -0
- package/dist/perf/instruments.d.ts +49 -0
- package/dist/perf/instruments.js +154 -0
- package/dist/perf/use-mount-gauge.svelte.d.ts +1 -0
- package/dist/perf/use-mount-gauge.svelte.js +15 -0
- package/dist/plugin.d.ts +102 -0
- package/dist/plugin.js +156 -0
- package/dist/plugins/admonitions/AdmonitionBlock.svelte +144 -0
- package/dist/plugins/admonitions/AdmonitionBlock.svelte.d.ts +11 -0
- package/dist/plugins/admonitions/admonition-kind.d.ts +8 -0
- package/dist/plugins/admonitions/admonition-kind.js +97 -0
- package/dist/plugins/admonitions/convert-document.d.ts +11 -0
- package/dist/plugins/admonitions/convert-document.js +39 -0
- package/dist/plugins/admonitions/gh-alert.d.ts +13 -0
- package/dist/plugins/admonitions/gh-alert.js +83 -0
- package/dist/plugins/admonitions/github-alert-kind.d.ts +12 -0
- package/dist/plugins/admonitions/github-alert-kind.js +125 -0
- package/dist/plugins/admonitions/index.d.ts +6 -0
- package/dist/plugins/admonitions/index.js +8 -0
- package/dist/plugins/admonitions/kinds.d.ts +26 -0
- package/dist/plugins/admonitions/kinds.js +18 -0
- package/dist/plugins/admonitions/register.d.ts +7 -0
- package/dist/plugins/admonitions/register.js +12 -0
- package/dist/plugins/details/DetailsBlock.svelte +129 -0
- package/dist/plugins/details/DetailsBlock.svelte.d.ts +11 -0
- package/dist/plugins/details/details-disclosure.svelte.d.ts +17 -0
- package/dist/plugins/details/details-disclosure.svelte.js +24 -0
- package/dist/plugins/details/details-kind.d.ts +25 -0
- package/dist/plugins/details/details-kind.js +237 -0
- package/dist/plugins/details/index.d.ts +2 -0
- package/dist/plugins/details/index.js +2 -0
- package/dist/plugins/details/register.d.ts +6 -0
- package/dist/plugins/details/register.js +15 -0
- package/dist/plugins/emoji/emoji-plugin.d.ts +2 -0
- package/dist/plugins/emoji/emoji-plugin.js +10 -0
- package/dist/plugins/emoji/emoji-recognizer.d.ts +18 -0
- package/dist/plugins/emoji/emoji-recognizer.js +63 -0
- package/dist/plugins/emoji/emoji-table.d.ts +1 -0
- package/dist/plugins/emoji/emoji-table.js +1919 -0
- package/dist/plugins/emoji/index.d.ts +3 -0
- package/dist/plugins/emoji/index.js +4 -0
- package/dist/plugins/footnotes/FootnoteDefinition.svelte +103 -0
- package/dist/plugins/footnotes/FootnoteDefinition.svelte.d.ts +13 -0
- package/dist/plugins/footnotes/FootnoteReference.svelte +50 -0
- package/dist/plugins/footnotes/FootnoteReference.svelte.d.ts +4 -0
- package/dist/plugins/footnotes/constants.d.ts +2 -0
- package/dist/plugins/footnotes/constants.js +4 -0
- package/dist/plugins/footnotes/footnote-definition.d.ts +14 -0
- package/dist/plugins/footnotes/footnote-definition.js +147 -0
- package/dist/plugins/footnotes/footnote-lookup.d.ts +9 -0
- package/dist/plugins/footnotes/footnote-lookup.js +33 -0
- package/dist/plugins/footnotes/footnote-numbering.d.ts +23 -0
- package/dist/plugins/footnotes/footnote-numbering.js +78 -0
- package/dist/plugins/footnotes/footnote-reference.d.ts +7 -0
- package/dist/plugins/footnotes/footnote-reference.js +54 -0
- package/dist/plugins/footnotes/footnotes-plugin.d.ts +7 -0
- package/dist/plugins/footnotes/footnotes-plugin.js +17 -0
- package/dist/plugins/footnotes/index.d.ts +5 -0
- package/dist/plugins/footnotes/index.js +6 -0
- package/dist/plugins/highlight-occurrences/highlight-occurrences-plugin.d.ts +17 -0
- package/dist/plugins/highlight-occurrences/highlight-occurrences-plugin.js +31 -0
- package/dist/plugins/highlight-occurrences/index.d.ts +1 -0
- package/dist/plugins/highlight-occurrences/index.js +1 -0
- package/dist/plugins/highlight-occurrences/occurrence-source.d.ts +26 -0
- package/dist/plugins/highlight-occurrences/occurrence-source.js +54 -0
- package/dist/plugins/highlight-occurrences/occurrences.d.ts +33 -0
- package/dist/plugins/highlight-occurrences/occurrences.js +108 -0
- package/dist/plugins/latex/BlockMath.svelte +119 -0
- package/dist/plugins/latex/BlockMath.svelte.d.ts +21 -0
- package/dist/plugins/latex/MathInline.svelte +28 -0
- package/dist/plugins/latex/MathInline.svelte.d.ts +4 -0
- package/dist/plugins/latex/index.d.ts +3 -0
- package/dist/plugins/latex/index.js +4 -0
- package/dist/plugins/latex/latex-kind.d.ts +17 -0
- package/dist/plugins/latex/latex-kind.js +224 -0
- package/dist/plugins/latex/math-completion.d.ts +10 -0
- package/dist/plugins/latex/math-completion.js +19 -0
- package/dist/plugins/latex/math-renderer.d.ts +26 -0
- package/dist/plugins/latex/math-renderer.js +42 -0
- package/dist/plugins/latex/register.d.ts +10 -0
- package/dist/plugins/latex/register.js +23 -0
- package/dist/plugins/latex/renderer.d.ts +13 -0
- package/dist/plugins/latex/renderer.js +34 -0
- package/dist/plugins/mermaid/MermaidBlock.svelte +572 -0
- package/dist/plugins/mermaid/MermaidBlock.svelte.d.ts +11 -0
- package/dist/plugins/mermaid/index.d.ts +3 -0
- package/dist/plugins/mermaid/index.js +3 -0
- package/dist/plugins/mermaid/mermaid-kind.d.ts +38 -0
- package/dist/plugins/mermaid/mermaid-kind.js +176 -0
- package/dist/plugins/mermaid/mermaid-renderer.d.ts +28 -0
- package/dist/plugins/mermaid/mermaid-renderer.js +35 -0
- package/dist/plugins/mermaid/register.d.ts +10 -0
- package/dist/plugins/mermaid/register.js +20 -0
- package/dist/plugins/mermaid/renderer.d.ts +11 -0
- package/dist/plugins/mermaid/renderer.js +53 -0
- package/dist/plugins/parrot/ParrotBlock.svelte +342 -0
- package/dist/plugins/parrot/ParrotBlock.svelte.d.ts +21 -0
- package/dist/plugins/parrot/index.d.ts +1 -0
- package/dist/plugins/parrot/index.js +2 -0
- package/dist/plugins/parrot/parrot-plugin.d.ts +3 -0
- package/dist/plugins/parrot/parrot-plugin.js +49 -0
- package/dist/plugins/toc/TocBlock.svelte +218 -0
- package/dist/plugins/toc/TocBlock.svelte.d.ts +24 -0
- package/dist/plugins/toc/heading-outline.d.ts +28 -0
- package/dist/plugins/toc/heading-outline.js +65 -0
- package/dist/plugins/toc/index.d.ts +2 -0
- package/dist/plugins/toc/index.js +2 -0
- package/dist/plugins/toc/navigation-queue.d.ts +12 -0
- package/dist/plugins/toc/navigation-queue.js +21 -0
- package/dist/plugins/toc/toc-plugin.d.ts +16 -0
- package/dist/plugins/toc/toc-plugin.js +71 -0
- package/dist/presentation-mode.d.ts +32 -0
- package/dist/presentation-mode.js +50 -0
- package/dist/reactivity/block-list-state.svelte.d.ts +22 -0
- package/dist/reactivity/block-list-state.svelte.js +46 -0
- package/dist/reactivity/block-window.svelte.d.ts +41 -0
- package/dist/reactivity/block-window.svelte.js +93 -0
- package/dist/reactivity/content-version.svelte.d.ts +14 -0
- package/dist/reactivity/content-version.svelte.js +16 -0
- package/dist/reactivity/list-windowing.svelte.d.ts +100 -0
- package/dist/reactivity/list-windowing.svelte.js +402 -0
- package/dist/reactivity/measure-batch.d.ts +15 -0
- package/dist/reactivity/measure-batch.js +18 -0
- package/dist/reactivity/publish-ref.svelte.d.ts +54 -0
- package/dist/reactivity/publish-ref.svelte.js +128 -0
- package/dist/reactivity/scope-geometry.d.ts +18 -0
- package/dist/reactivity/scope-geometry.js +29 -0
- package/dist/reactivity/state-registry.d.ts +10 -0
- package/dist/reactivity/state-registry.js +44 -0
- package/dist/reactivity/use-container-windowing.svelte.d.ts +35 -0
- package/dist/reactivity/use-container-windowing.svelte.js +95 -0
- package/dist/reactivity/window-slice.d.ts +11 -0
- package/dist/reactivity/window-slice.js +9 -0
- package/dist/scan-index.d.ts +11 -0
- package/dist/scan-index.js +27 -0
- package/dist/schema/block-commands.d.ts +105 -0
- package/dist/schema/block-commands.js +179 -0
- package/dist/schema/block-completions.d.ts +33 -0
- package/dist/schema/block-completions.js +49 -0
- package/dist/schema/block-component-registry.d.ts +33 -0
- package/dist/schema/block-component-registry.js +33 -0
- package/dist/schema/block-kind-descriptor.d.ts +281 -0
- package/dist/schema/block-kind-descriptor.js +187 -0
- package/dist/schema/block-openers.d.ts +94 -0
- package/dist/schema/block-openers.js +150 -0
- package/dist/schema/built-in-descriptors.d.ts +8 -0
- package/dist/schema/built-in-descriptors.js +560 -0
- package/dist/schema/child-spans.d.ts +25 -0
- package/dist/schema/child-spans.js +161 -0
- package/dist/schema/closure.d.ts +39 -0
- package/dist/schema/closure.js +55 -0
- package/dist/schema/command-id.d.ts +20 -0
- package/dist/schema/command-id.js +42 -0
- package/dist/schema/commands.d.ts +147 -0
- package/dist/schema/commands.js +294 -0
- package/dist/schema/container-raw.d.ts +21 -0
- package/dist/schema/container-raw.js +43 -0
- package/dist/schema/container-rebuilders.d.ts +32 -0
- package/dist/schema/container-rebuilders.js +95 -0
- package/dist/schema/define-plugin-block.d.ts +15 -0
- package/dist/schema/define-plugin-block.js +18 -0
- package/dist/schema/fenced-code-raw.d.ts +43 -0
- package/dist/schema/fenced-code-raw.js +220 -0
- package/dist/schema/global-commands.d.ts +11 -0
- package/dist/schema/global-commands.js +40 -0
- package/dist/schema/inline-construct-policy.d.ts +131 -0
- package/dist/schema/inline-construct-policy.js +96 -0
- package/dist/schema/keybinding-overrides.d.ts +39 -0
- package/dist/schema/keybinding-overrides.js +43 -0
- package/dist/schema/keybindings.d.ts +36 -0
- package/dist/schema/keybindings.js +75 -0
- package/dist/schema/merge-rules.d.ts +28 -0
- package/dist/schema/merge-rules.js +57 -0
- package/dist/schema/opener-priorities.d.ts +16 -0
- package/dist/schema/opener-priorities.js +16 -0
- package/dist/schema/operations.d.ts +110 -0
- package/dist/schema/operations.js +6 -0
- package/dist/schema/plugin-activation.d.ts +13 -0
- package/dist/schema/plugin-activation.js +18 -0
- package/dist/schema/plugin-editor-context.d.ts +33 -0
- package/dist/schema/plugin-editor-context.js +65 -0
- package/dist/schema/plugin-install.d.ts +58 -0
- package/dist/schema/plugin-install.js +132 -0
- package/dist/schema/plugin-kind.d.ts +21 -0
- package/dist/schema/plugin-kind.js +86 -0
- package/dist/schema/plugin-name.d.ts +1 -0
- package/dist/schema/plugin-name.js +7 -0
- package/dist/schema/register-once.d.ts +9 -0
- package/dist/schema/register-once.js +35 -0
- package/dist/schema/registration-checks.d.ts +32 -0
- package/dist/schema/registration-checks.js +122 -0
- package/dist/schema/registration-pending.d.ts +28 -0
- package/dist/schema/registration-pending.js +48 -0
- package/dist/schema/registry-reset.d.ts +7 -0
- package/dist/schema/registry-reset.js +30 -0
- package/dist/schema/registry-view.d.ts +30 -0
- package/dist/schema/registry-view.js +39 -0
- package/dist/schema/reserved-chords.d.ts +35 -0
- package/dist/schema/reserved-chords.js +313 -0
- package/dist/schema/reserved-chrome.d.ts +23 -0
- package/dist/schema/reserved-chrome.js +33 -0
- package/dist/schema/table-cell-raw.d.ts +14 -0
- package/dist/schema/table-cell-raw.js +30 -0
- package/dist/schema/whole-block-unit.d.ts +8 -0
- package/dist/schema/whole-block-unit.js +12 -0
- package/dist/search/document-scan.d.ts +22 -0
- package/dist/search/document-scan.js +39 -0
- package/dist/search/matcher.d.ts +31 -0
- package/dist/search/matcher.js +70 -0
- package/dist/search/regex-executor.d.ts +41 -0
- package/dist/search/regex-executor.js +165 -0
- package/dist/search/replace.d.ts +15 -0
- package/dist/search/replace.js +29 -0
- package/dist/search/search-state.svelte.d.ts +59 -0
- package/dist/search/search-state.svelte.js +231 -0
- package/dist/selection/autoscroll.d.ts +26 -0
- package/dist/selection/autoscroll.js +91 -0
- package/dist/selection/block-hit-test.d.ts +37 -0
- package/dist/selection/block-hit-test.js +59 -0
- package/dist/selection/caret-doors.d.ts +20 -0
- package/dist/selection/caret-doors.js +44 -0
- package/dist/selection/caret-restore.d.ts +15 -0
- package/dist/selection/caret-restore.js +32 -0
- package/dist/selection/char-endpoint-snap.d.ts +15 -0
- package/dist/selection/char-endpoint-snap.js +39 -0
- package/dist/selection/clipboard-text.d.ts +13 -0
- package/dist/selection/clipboard-text.js +314 -0
- package/dist/selection/cross-block/clipboard.d.ts +14 -0
- package/dist/selection/cross-block/clipboard.js +20 -0
- package/dist/selection/cross-block/dispatch.d.ts +78 -0
- package/dist/selection/cross-block/dispatch.js +57 -0
- package/dist/selection/cross-block/format-range.d.ts +38 -0
- package/dist/selection/cross-block/format-range.js +193 -0
- package/dist/selection/cross-block/format-toggle.d.ts +27 -0
- package/dist/selection/cross-block/format-toggle.js +109 -0
- package/dist/selection/cross-block/keydown.d.ts +11 -0
- package/dist/selection/cross-block/keydown.js +339 -0
- package/dist/selection/cross-block/ops.d.ts +56 -0
- package/dist/selection/cross-block/ops.js +210 -0
- package/dist/selection/cross-block/paste.d.ts +8 -0
- package/dist/selection/cross-block/paste.js +156 -0
- package/dist/selection/cross-block/pointer.d.ts +19 -0
- package/dist/selection/cross-block/pointer.js +80 -0
- package/dist/selection/cross-block/type-replace.d.ts +10 -0
- package/dist/selection/cross-block/type-replace.js +129 -0
- package/dist/selection/dead-space-caret.d.ts +39 -0
- package/dist/selection/dead-space-caret.js +173 -0
- package/dist/selection/drag-pointer.d.ts +22 -0
- package/dist/selection/drag-pointer.js +89 -0
- package/dist/selection/gap-caret.d.ts +47 -0
- package/dist/selection/gap-caret.js +72 -0
- package/dist/selection/keyboard-extend.d.ts +43 -0
- package/dist/selection/keyboard-extend.js +257 -0
- package/dist/selection/native-bridge.d.ts +47 -0
- package/dist/selection/native-bridge.js +204 -0
- package/dist/selection/nearest-block.d.ts +43 -0
- package/dist/selection/nearest-block.js +73 -0
- package/dist/selection/path-lookup.d.ts +32 -0
- package/dist/selection/path-lookup.js +132 -0
- package/dist/selection/path-math.d.ts +35 -0
- package/dist/selection/path-math.js +90 -0
- package/dist/selection/pointer-session.d.ts +43 -0
- package/dist/selection/pointer-session.js +111 -0
- package/dist/selection/primitives.d.ts +75 -0
- package/dist/selection/primitives.js +91 -0
- package/dist/selection/range-delete-ceremony.d.ts +85 -0
- package/dist/selection/range-delete-ceremony.js +197 -0
- package/dist/selection/range-delete-chrome.d.ts +39 -0
- package/dist/selection/range-delete-chrome.js +105 -0
- package/dist/selection/range-delete-table-coverage.d.ts +28 -0
- package/dist/selection/range-delete-table-coverage.js +168 -0
- package/dist/selection/range-delete-table.d.ts +16 -0
- package/dist/selection/range-delete-table.js +347 -0
- package/dist/selection/range-delete.d.ts +33 -0
- package/dist/selection/range-delete.js +121 -0
- package/dist/selection/selection-description.d.ts +7 -0
- package/dist/selection/selection-description.js +18 -0
- package/dist/selection/selection-restore.d.ts +46 -0
- package/dist/selection/selection-restore.js +66 -0
- package/dist/selection/selection-state.svelte.d.ts +72 -0
- package/dist/selection/selection-state.svelte.js +247 -0
- package/dist/selection/shared-keydown.d.ts +61 -0
- package/dist/selection/shared-keydown.js +150 -0
- package/dist/selection/table-endpoint-snap.d.ts +55 -0
- package/dist/selection/table-endpoint-snap.js +143 -0
- package/dist/selection/table-rect-extend.d.ts +23 -0
- package/dist/selection/table-rect-extend.js +46 -0
- package/dist/selection/widget-range-paint.d.ts +12 -0
- package/dist/selection/widget-range-paint.js +44 -0
- package/dist/styles/editor-theme.css +151 -0
- package/dist/styles/editor.css +585 -0
- package/dist/testing/conformance-core.d.ts +45 -0
- package/dist/testing/conformance-core.js +105 -0
- package/dist/testing/container-conformance.d.ts +137 -0
- package/dist/testing/container-conformance.js +533 -0
- package/dist/testing/headless-actions.d.ts +37 -0
- package/dist/testing/headless-actions.js +118 -0
- package/dist/testing/inline-conformance.d.ts +50 -0
- package/dist/testing/inline-conformance.js +442 -0
- package/dist/testing/kind-conformance.d.ts +54 -0
- package/dist/testing/kind-conformance.js +325 -0
- package/dist/testing/mount-dom-stubs.d.ts +8 -0
- package/dist/testing/mount-dom-stubs.js +19 -0
- package/dist/testing/parse-convergence.d.ts +14 -0
- package/dist/testing/parse-convergence.js +81 -0
- package/dist/testing.d.ts +20 -0
- package/dist/testing.js +61 -0
- package/dist/tree-operations/blockquote.d.ts +18 -0
- package/dist/tree-operations/blockquote.js +59 -0
- package/dist/tree-operations/children.d.ts +17 -0
- package/dist/tree-operations/children.js +56 -0
- package/dist/tree-operations/cleanup.d.ts +10 -0
- package/dist/tree-operations/cleanup.js +25 -0
- package/dist/tree-operations/clone.d.ts +5 -0
- package/dist/tree-operations/clone.js +43 -0
- package/dist/tree-operations/container-lift.d.ts +9 -0
- package/dist/tree-operations/container-lift.js +29 -0
- package/dist/tree-operations/index.d.ts +16 -0
- package/dist/tree-operations/index.js +14 -0
- package/dist/tree-operations/list/empty-check.d.ts +7 -0
- package/dist/tree-operations/list/empty-check.js +19 -0
- package/dist/tree-operations/list/exit-replacement.d.ts +13 -0
- package/dist/tree-operations/list/exit-replacement.js +49 -0
- package/dist/tree-operations/list/item-partition.d.ts +13 -0
- package/dist/tree-operations/list/item-partition.js +33 -0
- package/dist/tree-operations/list/list-builders.d.ts +44 -0
- package/dist/tree-operations/list/list-builders.js +129 -0
- package/dist/tree-operations/list/ordered-markers.d.ts +36 -0
- package/dist/tree-operations/list/ordered-markers.js +114 -0
- package/dist/tree-operations/list/reconcile-task.d.ts +12 -0
- package/dist/tree-operations/list/reconcile-task.js +47 -0
- package/dist/tree-operations/list/sublist-separator.d.ts +13 -0
- package/dist/tree-operations/list/sublist-separator.js +34 -0
- package/dist/tree-operations/list/terminator.d.ts +17 -0
- package/dist/tree-operations/list/terminator.js +60 -0
- package/dist/tree-operations/list/unwrap-merge.d.ts +29 -0
- package/dist/tree-operations/list/unwrap-merge.js +202 -0
- package/dist/tree-operations/node-ops.d.ts +296 -0
- package/dist/tree-operations/node-ops.js +1428 -0
- package/dist/tree-operations/parse-block.d.ts +3 -0
- package/dist/tree-operations/parse-block.js +8 -0
- package/dist/tree-operations/paste/apply.d.ts +12 -0
- package/dist/tree-operations/paste/apply.js +75 -0
- package/dist/tree-operations/paste/body-write.d.ts +19 -0
- package/dist/tree-operations/paste/body-write.js +53 -0
- package/dist/tree-operations/paste/container-match.d.ts +32 -0
- package/dist/tree-operations/paste/container-match.js +238 -0
- package/dist/tree-operations/paste/container-paste.d.ts +10 -0
- package/dist/tree-operations/paste/container-paste.js +27 -0
- package/dist/tree-operations/paste/dispatch.d.ts +61 -0
- package/dist/tree-operations/paste/dispatch.js +138 -0
- package/dist/tree-operations/paste/find-enclosing-list.d.ts +8 -0
- package/dist/tree-operations/paste/find-enclosing-list.js +30 -0
- package/dist/tree-operations/paste/focus-target.d.ts +27 -0
- package/dist/tree-operations/paste/focus-target.js +40 -0
- package/dist/tree-operations/paste/hooks.d.ts +17 -0
- package/dist/tree-operations/paste/hooks.js +80 -0
- package/dist/tree-operations/paste/list-absorb.d.ts +29 -0
- package/dist/tree-operations/paste/list-absorb.js +106 -0
- package/dist/tree-operations/paste/list-break-out.d.ts +42 -0
- package/dist/tree-operations/paste/list-break-out.js +136 -0
- package/dist/tree-operations/paste/parent-scope.d.ts +17 -0
- package/dist/tree-operations/paste/parent-scope.js +35 -0
- package/dist/tree-operations/paste/paste-deps.d.ts +20 -0
- package/dist/tree-operations/paste/paste-deps.js +6 -0
- package/dist/tree-operations/paste/paste-replacement.d.ts +8 -0
- package/dist/tree-operations/paste/paste-replacement.js +60 -0
- package/dist/tree-operations/paste/paste-transforms.d.ts +25 -0
- package/dist/tree-operations/paste/paste-transforms.js +72 -0
- package/dist/tree-operations/paste/replace-block-at-parent.d.ts +29 -0
- package/dist/tree-operations/paste/replace-block-at-parent.js +75 -0
- package/dist/tree-operations/paste/strategy.d.ts +9 -0
- package/dist/tree-operations/paste/strategy.js +20 -0
- package/dist/tree-operations/paste/table-slice.d.ts +10 -0
- package/dist/tree-operations/paste/table-slice.js +39 -0
- package/dist/tree-operations/paste-surfaces.d.ts +61 -0
- package/dist/tree-operations/paste-surfaces.js +15 -0
- package/dist/tree-operations/path-mutate.d.ts +12 -0
- package/dist/tree-operations/path-mutate.js +20 -0
- package/dist/tree-operations/reorder-unit.d.ts +17 -0
- package/dist/tree-operations/reorder-unit.js +37 -0
- package/dist/tree-operations/reorder.d.ts +13 -0
- package/dist/tree-operations/reorder.js +57 -0
- package/dist/tree-operations/sharing.d.ts +18 -0
- package/dist/tree-operations/sharing.js +14 -0
- package/dist/tree-operations/splice-many.d.ts +9 -0
- package/dist/tree-operations/splice-many.js +22 -0
- package/dist/tree-operations/structural-change.d.ts +65 -0
- package/dist/tree-operations/structural-change.js +117 -0
- package/dist/tree-operations/sub-table-copy.d.ts +6 -0
- package/dist/tree-operations/sub-table-copy.js +43 -0
- package/dist/tree-operations/table-mutations.d.ts +17 -0
- package/dist/tree-operations/table-mutations.js +101 -0
- package/dist/tree-operations/unshare.d.ts +101 -0
- package/dist/tree-operations/unshare.js +248 -0
- package/dist/undo/manager.d.ts +2 -0
- package/dist/undo/manager.js +50 -0
- package/dist/undo/types.d.ts +44 -0
- package/dist/undo/types.js +7 -0
- package/docs/guide/consumer-guide.md +1098 -0
- package/docs/guide/directives.md +223 -0
- package/docs/guide/plugin-api.md +329 -0
- package/docs/guide/plugin-guide/conspiracy.gif +0 -0
- package/docs/guide/plugin-guide/parrot-frames.md +209 -0
- package/docs/guide/plugin-guide/parrot.gif +0 -0
- package/docs/guide/plugin-guide.md +1693 -0
- package/docs/guide/plugin-testing.md +463 -0
- package/package.json +238 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Observer-pattern event surface reached via `getEvents()`. Events fire synchronously
|
|
3
|
+
* and handlers must NOT mutate the document; an `edit` event fires after its mutation
|
|
4
|
+
* is published, so its handler sees the updated document.
|
|
5
|
+
*/
|
|
6
|
+
import type { AnyBlockKind } from './core/nodes';
|
|
7
|
+
import type { PresentationMode } from './presentation-mode';
|
|
8
|
+
import type { EditorSelection } from './selection/primitives';
|
|
9
|
+
import type { OpDescriptor, OperationDetailMap, OperationKind } from './schema/operations';
|
|
10
|
+
/** Derived per-arm from OperationDetailMap — see schema/operations.ts. */
|
|
11
|
+
export type EditEvent = {
|
|
12
|
+
[K in OperationKind]: undefined extends OperationDetailMap[K] ? {
|
|
13
|
+
op: K;
|
|
14
|
+
path: number[];
|
|
15
|
+
detail?: OperationDetailMap[K];
|
|
16
|
+
timestamp: number;
|
|
17
|
+
} : {
|
|
18
|
+
op: K;
|
|
19
|
+
path: number[];
|
|
20
|
+
detail: OperationDetailMap[K];
|
|
21
|
+
timestamp: number;
|
|
22
|
+
};
|
|
23
|
+
}[OperationKind];
|
|
24
|
+
/** The cast is sound by construction: both types derive from OperationDetailMap, which
|
|
25
|
+
* TS cannot narrow as a correlated union. */
|
|
26
|
+
export declare function toEditEvent(op: OpDescriptor, path: number[], timestamp: number): EditEvent;
|
|
27
|
+
export type SelectionChangeEvent = EditorSelection | null;
|
|
28
|
+
export interface EditorError {
|
|
29
|
+
/**
|
|
30
|
+
* `clipboard` is a failure on the paste route — the channel a host needs to release
|
|
31
|
+
* an asset `onPasteImage` already imported for it.
|
|
32
|
+
*/
|
|
33
|
+
origin: 'subscriber' | 'render' | 'commit' | 'command' | 'decoration' | 'clipboard' | 'link';
|
|
34
|
+
error: unknown;
|
|
35
|
+
/** Origin-specific: `path` for render, `op`+`path` for commit, `kind`+`command`
|
|
36
|
+
* (+`plugin`) for a command throw, `source` for decoration, `url` for link, and the
|
|
37
|
+
* paste's start path for clipboard when it was aimed at a range. */
|
|
38
|
+
context?: {
|
|
39
|
+
path?: number[];
|
|
40
|
+
op?: OperationKind;
|
|
41
|
+
kind?: AnyBlockKind;
|
|
42
|
+
command?: string;
|
|
43
|
+
plugin?: string;
|
|
44
|
+
source?: string;
|
|
45
|
+
url?: string;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export interface EditorEventMap {
|
|
49
|
+
edit: EditEvent;
|
|
50
|
+
selectionChange: SelectionChangeEvent;
|
|
51
|
+
error: EditorError;
|
|
52
|
+
/** The EFFECTIVE mode after a `presentationMode` prop change (never fired at mount). */
|
|
53
|
+
presentationModeChange: PresentationMode;
|
|
54
|
+
/** The theme name after a `theme` prop change (never fired at mount), for a plugin
|
|
55
|
+
* that paints its own colors and so cannot pick the change up from CSS. */
|
|
56
|
+
themeChange: string;
|
|
57
|
+
}
|
|
58
|
+
export interface EditorEvents {
|
|
59
|
+
on<K extends keyof EditorEventMap>(event: K, handler: (payload: EditorEventMap[K]) => void): () => void;
|
|
60
|
+
/** Internal emit — not exported from index.ts. */
|
|
61
|
+
emit<K extends keyof EditorEventMap>(event: K, payload: EditorEventMap[K]): void;
|
|
62
|
+
}
|
|
63
|
+
export declare function createEditorEvents(): EditorEvents;
|
|
64
|
+
/**
|
|
65
|
+
* Route a contained command throw to the `error` channel, attributing the command and
|
|
66
|
+
* its owning plugin; no-ops when no events surface is present. A direct `plugin` wins
|
|
67
|
+
* over the kind lookup, so a global command's own owner is never clobbered by one.
|
|
68
|
+
*/
|
|
69
|
+
export declare function emitCommandError(events: EditorEvents | undefined, report: {
|
|
70
|
+
kind?: AnyBlockKind;
|
|
71
|
+
command: string;
|
|
72
|
+
plugin?: string;
|
|
73
|
+
error: unknown;
|
|
74
|
+
}): void;
|
|
75
|
+
/**
|
|
76
|
+
* Route a blocked link activation to the `error` channel: the scheme allowlist refused the URL,
|
|
77
|
+
* which a host may want to log or surface. Fires for the DEFAULT activation only — a consumer
|
|
78
|
+
* supplying `onLinkActivate` owns its own policy.
|
|
79
|
+
*/
|
|
80
|
+
export declare function emitBlockedLinkError(events: EditorEvents | undefined, url: string): void;
|
|
81
|
+
/**
|
|
82
|
+
* Route a contained clipboard-route failure to the `error` channel. `path` addresses the
|
|
83
|
+
* range the paste was aimed at and is OMITTED where there is none to name — `[]` would
|
|
84
|
+
* report the document root, which holds no caret.
|
|
85
|
+
*/
|
|
86
|
+
export declare function emitClipboardError(events: EditorEvents, report: {
|
|
87
|
+
error: unknown;
|
|
88
|
+
path?: number[];
|
|
89
|
+
}): void;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Observer-pattern event surface reached via `getEvents()`. Events fire synchronously
|
|
3
|
+
* and handlers must NOT mutate the document; an `edit` event fires after its mutation
|
|
4
|
+
* is published, so its handler sees the updated document.
|
|
5
|
+
*/
|
|
6
|
+
import { devWarn } from './dev-warn';
|
|
7
|
+
import { editorEnv } from './env';
|
|
8
|
+
import { pluginKindOwner } from './schema/plugin-install';
|
|
9
|
+
/** The cast is sound by construction: both types derive from OperationDetailMap, which
|
|
10
|
+
* TS cannot narrow as a correlated union. */
|
|
11
|
+
export function toEditEvent(op, path, timestamp) {
|
|
12
|
+
return { op: op.kind, path, detail: op.detail, timestamp };
|
|
13
|
+
}
|
|
14
|
+
// ── Factory ──────────────────────────────────────────────────────────────
|
|
15
|
+
export function createEditorEvents() {
|
|
16
|
+
const handlers = {};
|
|
17
|
+
function on(event, handler) {
|
|
18
|
+
const set = (handlers[event] ??= new Set());
|
|
19
|
+
const erased = handler;
|
|
20
|
+
set.add(erased);
|
|
21
|
+
return () => {
|
|
22
|
+
set.delete(erased);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function emit(event, payload) {
|
|
26
|
+
const set = handlers[event];
|
|
27
|
+
if (!set)
|
|
28
|
+
return;
|
|
29
|
+
// Copy so self-disposing handlers don't mutate the set mid-iteration.
|
|
30
|
+
// try/catch per handler so one throwing subscriber doesn't starve others.
|
|
31
|
+
for (const handler of [...set]) {
|
|
32
|
+
try {
|
|
33
|
+
handler(payload);
|
|
34
|
+
}
|
|
35
|
+
catch (err) {
|
|
36
|
+
// Recursion guard: an error-channel subscriber's own throw reports rather than
|
|
37
|
+
// re-emitting, which would loop. Everything the channel cannot carry reds a gate.
|
|
38
|
+
if (event !== 'error' && handlers.error?.size) {
|
|
39
|
+
emit('error', { origin: 'subscriber', error: err });
|
|
40
|
+
}
|
|
41
|
+
else if (editorEnv.isDev) {
|
|
42
|
+
devWarn('events', `${event} subscriber threw`, err);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
// devWarn is silent in production, and the swallow is what hides an exception the
|
|
46
|
+
// consumer's own handler threw, which an unguarded call would have surfaced.
|
|
47
|
+
console.error(`[aragonite] ${event} subscriber threw`, err);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return { on, emit };
|
|
53
|
+
}
|
|
54
|
+
// ── Contained-failure routing ──────────────────────────────────────────────
|
|
55
|
+
// One envelope minter per origin with more than one emission site, living here so the
|
|
56
|
+
// shell that owns the channel owns the payload shape too.
|
|
57
|
+
/**
|
|
58
|
+
* Route a contained command throw to the `error` channel, attributing the command and
|
|
59
|
+
* its owning plugin; no-ops when no events surface is present. A direct `plugin` wins
|
|
60
|
+
* over the kind lookup, so a global command's own owner is never clobbered by one.
|
|
61
|
+
*/
|
|
62
|
+
export function emitCommandError(events, report) {
|
|
63
|
+
events?.emit('error', {
|
|
64
|
+
origin: 'command',
|
|
65
|
+
error: report.error,
|
|
66
|
+
context: {
|
|
67
|
+
kind: report.kind,
|
|
68
|
+
command: report.command,
|
|
69
|
+
plugin: report.plugin ?? (report.kind ? (pluginKindOwner(report.kind) ?? undefined) : undefined)
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Route a blocked link activation to the `error` channel: the scheme allowlist refused the URL,
|
|
75
|
+
* which a host may want to log or surface. Fires for the DEFAULT activation only — a consumer
|
|
76
|
+
* supplying `onLinkActivate` owns its own policy.
|
|
77
|
+
*/
|
|
78
|
+
export function emitBlockedLinkError(events, url) {
|
|
79
|
+
events?.emit('error', {
|
|
80
|
+
origin: 'link',
|
|
81
|
+
error: new Error(`aragonite: blocked link with disallowed scheme: ${url}`),
|
|
82
|
+
context: { url }
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Route a contained clipboard-route failure to the `error` channel. `path` addresses the
|
|
87
|
+
* range the paste was aimed at and is OMITTED where there is none to name — `[]` would
|
|
88
|
+
* report the document root, which holds no caret.
|
|
89
|
+
*/
|
|
90
|
+
export function emitClipboardError(events, report) {
|
|
91
|
+
events.emit('error', {
|
|
92
|
+
origin: 'clipboard',
|
|
93
|
+
error: report.error,
|
|
94
|
+
...(report.path ? { context: { path: report.path } } : {})
|
|
95
|
+
});
|
|
96
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte context-key symbols shared across the editor tree: three named facets
|
|
3
|
+
* (services, policies, document) plus the per-key survivors whose granularity is
|
|
4
|
+
* load-bearing — the action triple a container re-provides, HISTORY (G1.4's
|
|
5
|
+
* single-provider subject), the scope-provided channels. Internal wiring, not a plugin
|
|
6
|
+
* extension point; a facet object is not itself reactive, the getters it carries are.
|
|
7
|
+
*/
|
|
8
|
+
import type { Document } from './core/nodes';
|
|
9
|
+
import type { LinkReferenceResolver } from './core/inline/link-reference-resolver';
|
|
10
|
+
import type { ImageLoadPolicy } from './core/inline-render';
|
|
11
|
+
import type { UserScrollport } from './cursor/scroll-ancestors';
|
|
12
|
+
import type { Scrollport } from './cursor/scrollport';
|
|
13
|
+
import type { PresentationMode } from './presentation-mode';
|
|
14
|
+
import type { KeybindingOverrideMap } from './schema/keybinding-overrides';
|
|
15
|
+
import type { EditorContext } from './schema/plugin-install';
|
|
16
|
+
import type { RegistryView } from './schema/registry-view';
|
|
17
|
+
import type { PluginActivation } from './schema/plugin-activation';
|
|
18
|
+
import type { CrossBlockCommandRouter } from './schema/block-commands';
|
|
19
|
+
import type { EditorRects } from './editor-rects';
|
|
20
|
+
import type { EditorEvents } from './editor-events';
|
|
21
|
+
import type { UndoController } from './editor-actions/deps';
|
|
22
|
+
import type { ReorderAction } from './editor-actions/reorder-action';
|
|
23
|
+
import type { PasteCommitCoordinator } from './tree-operations/paste/paste-deps';
|
|
24
|
+
import type { SelectionState } from './selection/selection-state.svelte';
|
|
25
|
+
import type { SearchState } from './search/search-state.svelte';
|
|
26
|
+
import type { DecorationEngine } from './decorations/decoration-state.svelte';
|
|
27
|
+
import type { StickyColumnState } from './cursor/sticky-column';
|
|
28
|
+
import type { EdgeAffinityState } from './cursor/edge-affinity';
|
|
29
|
+
import type { PendingMarksState } from './cursor/pending-marks';
|
|
30
|
+
import type { RevealAnchorState } from './cursor/reveal-anchor';
|
|
31
|
+
import type { HeightOracle } from './cursor/height-oracle';
|
|
32
|
+
import type { WidgetSelectionState } from './components/image/widget-selection-state.svelte';
|
|
33
|
+
import type { LinkCardState } from './components/link-card/link-card-state.svelte';
|
|
34
|
+
export type ReorderAnnounce = (message: string) => void;
|
|
35
|
+
export type KeybindingOverridesGetter = () => KeybindingOverrideMap;
|
|
36
|
+
export type ResolveImageUrl = (rawUrl: string) => string;
|
|
37
|
+
export type ResolveLinkUrl = (rawUrl: string) => string;
|
|
38
|
+
/** One image file lifted off an image-bearing paste, handed to the host's import
|
|
39
|
+
* hook. `suggestedName` is the clipboard's filename when it carried one. */
|
|
40
|
+
export interface PastedImage {
|
|
41
|
+
blob: Blob;
|
|
42
|
+
mimeType: string;
|
|
43
|
+
suggestedName?: string;
|
|
44
|
+
}
|
|
45
|
+
/** Host import hook for pasted images: resolves to the markdown to insert, or null
|
|
46
|
+
* to skip that image. Called once per image file, in clipboard order. */
|
|
47
|
+
export type PasteImageHook = (image: PastedImage) => Promise<string | null>;
|
|
48
|
+
export type PresentationModeGetter = () => PresentationMode;
|
|
49
|
+
/** The editor's theme name, as reflected to `data-editor-theme`. An open string:
|
|
50
|
+
* built-ins are `'dark'`/`'light'`, and a consumer may name its own. */
|
|
51
|
+
export type ThemeGetter = () => string;
|
|
52
|
+
/** `undefined` for a plugin installed in the process that this instance did not activate. */
|
|
53
|
+
export type PluginEditorLookup = (pluginName: string) => EditorContext | undefined;
|
|
54
|
+
export type BlockElLookup = (path: number[]) => HTMLElement | null;
|
|
55
|
+
export type DocumentGetter = () => Document;
|
|
56
|
+
export type FocusedPathGetter = () => number[] | null;
|
|
57
|
+
export type VersionGetter = () => number;
|
|
58
|
+
/** Resolver ref read by inline parsers in block components. Wrapped in a `{ current }`
|
|
59
|
+
* accessor so the shell can rebuild it after each commit without invalidating
|
|
60
|
+
* descendants' getContext bindings. `epoch` is the compact stamp render memos key on
|
|
61
|
+
* instead of concatenating the whole (~MB-scale) `signature` every keystroke. */
|
|
62
|
+
export type LinkReferenceResolverRef = {
|
|
63
|
+
current?: LinkReferenceResolver;
|
|
64
|
+
signature?: string;
|
|
65
|
+
epoch?: number;
|
|
66
|
+
};
|
|
67
|
+
export declare const BLOCK_EDIT_KEY: unique symbol;
|
|
68
|
+
export declare const FOCUS_KEY: unique symbol;
|
|
69
|
+
export declare const CONTAINER_EDIT_KEY: unique symbol;
|
|
70
|
+
/** G1.4's subject: only the editor root provides history, so undo/redo resolve to one
|
|
71
|
+
* stack. Folding it into a facet a container could re-provide is the exact violation. */
|
|
72
|
+
export declare const HISTORY_KEY: unique symbol;
|
|
73
|
+
export declare const LIST_CONTEXT_KEY: unique symbol;
|
|
74
|
+
export declare const TABLE_CONTEXT_KEY: unique symbol;
|
|
75
|
+
/**
|
|
76
|
+
* @internal A hosted block enrolls itself in its scope's batched measure pass.
|
|
77
|
+
* `register` no-ops when the path isn't a direct child of the scope's depth (nested
|
|
78
|
+
* hosts route to their own channel); `readHeight` is called inside the scope's
|
|
79
|
+
* read-all-then-write batch, never inline. `measureOnResize` carries the observer's
|
|
80
|
+
* border-box height so the scope can O(1)-gate and skip the no-op mount resize.
|
|
81
|
+
*/
|
|
82
|
+
export declare const RECORD_BLOCK_HEIGHT_KEY: unique symbol;
|
|
83
|
+
export type BlockMeasureChannel = {
|
|
84
|
+
register: (path: number[], index: number, id: string, readHeight: () => number) => () => void;
|
|
85
|
+
measureNow: (id: string) => void;
|
|
86
|
+
measureOnResize: (id: string, observedHeight: number) => void;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* @internal A child reports up to its parent scope: a nested CONTAINER pushes its box
|
|
90
|
+
* subtotal by index, while a `display:contents` ROW (no box of its own) enrolls in the
|
|
91
|
+
* batched measure pass instead, so a windowed table measures like every other scope.
|
|
92
|
+
*/
|
|
93
|
+
export declare const PARENT_SCOPE_SINK_KEY: unique symbol;
|
|
94
|
+
export type ParentScopeSink = {
|
|
95
|
+
setChildSubtotal: (index: number, total: number) => void;
|
|
96
|
+
registerRow: (id: string, readHeight: () => number, applyHeight: (h: number) => void) => () => void;
|
|
97
|
+
measureRowNow: (id: string) => void;
|
|
98
|
+
};
|
|
99
|
+
/** Cross-cutting editor services: event seam, view-state stores, and the
|
|
100
|
+
* cross-scope commit/reorder primitives. Root-provided once. */
|
|
101
|
+
export declare const EDITOR_SERVICES_KEY: unique symbol;
|
|
102
|
+
export interface EditorServices {
|
|
103
|
+
events: EditorEvents;
|
|
104
|
+
decorations: DecorationEngine;
|
|
105
|
+
selection: SelectionState;
|
|
106
|
+
search: SearchState;
|
|
107
|
+
stickyColumn: StickyColumnState;
|
|
108
|
+
/** Which side of an adjacent hidden marker run the caret means; the write seams read
|
|
109
|
+
* it and keep their own default when it answers null. */
|
|
110
|
+
edgeAffinity: EdgeAffinityState;
|
|
111
|
+
/** The constructs a collapsed-caret toggle promised the next insertion. Invalidated with
|
|
112
|
+
* the affinity, spent by the typing and composition seats. */
|
|
113
|
+
pendingMarks: PendingMarksState;
|
|
114
|
+
revealAnchor: RevealAnchorState;
|
|
115
|
+
widgetSelection: WidgetSelectionState;
|
|
116
|
+
/** The live-mode link card's target slot; `link.openCard` enters it from a kind's keymap. */
|
|
117
|
+
linkCard: LinkCardState;
|
|
118
|
+
controller: UndoController;
|
|
119
|
+
pasteCoordinator: PasteCommitCoordinator;
|
|
120
|
+
reorder: ReorderAction;
|
|
121
|
+
reorderAnnounce: ReorderAnnounce;
|
|
122
|
+
/** The instance's resolution over the global block definitions, so a per-instance
|
|
123
|
+
* enablement filter reaches the render path. */
|
|
124
|
+
registryView: RegistryView;
|
|
125
|
+
/** The plugins this instance activated, so a paste site scopes the transform pipeline
|
|
126
|
+
* the way `registryView` scopes the kinds. */
|
|
127
|
+
activePlugins: PluginActivation;
|
|
128
|
+
/** The instance's rect surface, delivered to every block component as a prop
|
|
129
|
+
* so a block can measure/reveal/scroll by path through the one seam. */
|
|
130
|
+
rects: EditorRects;
|
|
131
|
+
/** The arm a format command takes while a cross-block range is painted, threaded into every
|
|
132
|
+
* dispatch site's gates so the chord, the leaf rebind and the `runCommand` door share one. */
|
|
133
|
+
crossBlockCommands: CrossBlockCommandRouter;
|
|
134
|
+
}
|
|
135
|
+
/** Host-supplied render/behavior policies. The getter members read live editor state
|
|
136
|
+
* on each call. */
|
|
137
|
+
export declare const EDITOR_POLICIES_KEY: unique symbol;
|
|
138
|
+
export interface EditorPolicies {
|
|
139
|
+
resolveImageUrl: ResolveImageUrl;
|
|
140
|
+
resolveLinkUrl: ResolveLinkUrl;
|
|
141
|
+
imageLoadPolicy: () => ImageLoadPolicy;
|
|
142
|
+
/** Getter-wrapped set-once flag: render the mouse-only hover affordances, the block drag
|
|
143
|
+
* handle and the table grips. False renders neither; the keyboard routes stay regardless. */
|
|
144
|
+
blockDragHandles: () => boolean;
|
|
145
|
+
presentationMode: PresentationModeGetter;
|
|
146
|
+
/** For a renderer that paints rather than styles: a plugin emitting its own colored
|
|
147
|
+
* markup (a diagram SVG) cannot pick the theme up from CSS, so it needs the name. */
|
|
148
|
+
theme: ThemeGetter;
|
|
149
|
+
keybindingOverrides: KeybindingOverridesGetter;
|
|
150
|
+
/** Set-once host import hook for image-bearing pastes. Required-nullable: a mount must
|
|
151
|
+
* answer, and `undefined` deliberately leaves the paste on the text/plain path. */
|
|
152
|
+
onPasteImage: PasteImageHook | undefined;
|
|
153
|
+
/** Resolved image URLs that failed to load this session. One Set per instance, so a
|
|
154
|
+
* failed load never suppresses another editor's broken-state recompute
|
|
155
|
+
* (`components/image/widget-dom.ts`). */
|
|
156
|
+
brokenImageUrls: Set<string>;
|
|
157
|
+
}
|
|
158
|
+
/** Document identity and the per-instance lookups that hang off it. */
|
|
159
|
+
export declare const EDITOR_DOC_KEY: unique symbol;
|
|
160
|
+
export interface EditorDoc {
|
|
161
|
+
doc: DocumentGetter;
|
|
162
|
+
/** Changes whenever the document's bytes change — the only sound memo key over a
|
|
163
|
+
* document whose `$state` proxy is mutated in place and never changes identity. */
|
|
164
|
+
contentVersion: () => number;
|
|
165
|
+
linkRef: LinkReferenceResolverRef;
|
|
166
|
+
/** Resolves a plugin's per-instance EditorContext — the one identity onEditor
|
|
167
|
+
* callbacks, global-command handlers, and BlockCommandContext.editor share. */
|
|
168
|
+
pluginEditor: PluginEditorLookup;
|
|
169
|
+
/** AbortSignal tied to the editor's mount lifetime; document-level listeners
|
|
170
|
+
* observe it to tear down if the editor unmounts mid-operation. */
|
|
171
|
+
lifetime: AbortSignal;
|
|
172
|
+
editorRoot: () => HTMLElement | null;
|
|
173
|
+
/** What a drag autoscrolls to reach more of this editor: the root in self mode, the
|
|
174
|
+
* nearest USER-scrollable ancestor in host mode, null when the page's own viewport
|
|
175
|
+
* scrolls. What BOUNDS the visible region is a separate answer held by the rect
|
|
176
|
+
* surface — see `cursor/scroll-ancestors`. */
|
|
177
|
+
scrollHost: () => UserScrollport | null;
|
|
178
|
+
/** The same scroller as `scrollHost`, in the shape windowing measures and writes it
|
|
179
|
+
* through. Null only before the root mounts. */
|
|
180
|
+
scrollport: () => Scrollport | null;
|
|
181
|
+
blockElLookup: BlockElLookup;
|
|
182
|
+
/** Live getter for the focused block's full path; drives per-level VR pins. */
|
|
183
|
+
focusedPath: FocusedPathGetter;
|
|
184
|
+
/** Per-kind height oracle (root-constructed); read by nested windowing scopes. */
|
|
185
|
+
heightOracle: HeightOracle;
|
|
186
|
+
/** True while the editor holds the reader's place through a height mutation rather than
|
|
187
|
+
* leaving it to the host's native scroll anchoring. The `overflow-anchor` opt-out keys
|
|
188
|
+
* off the same fact, so the two can never both write one scroll position. */
|
|
189
|
+
correctsScroll: () => boolean;
|
|
190
|
+
/** Monotonic width-change counter the root bumps on an editor width resize, so
|
|
191
|
+
* every windowing scope rebuilds its model and re-measures at the new width. */
|
|
192
|
+
widthVersion: VersionGetter;
|
|
193
|
+
/** Monotonic counter the root bumps when the SCROLLPORT's height changes. Its own
|
|
194
|
+
* signal, never `widthVersion`: a height resize re-wraps no prose, so bumping the
|
|
195
|
+
* width counter would drop every measured height for nothing. */
|
|
196
|
+
viewportHeightVersion: VersionGetter;
|
|
197
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte context-key symbols shared across the editor tree: three named facets
|
|
3
|
+
* (services, policies, document) plus the per-key survivors whose granularity is
|
|
4
|
+
* load-bearing — the action triple a container re-provides, HISTORY (G1.4's
|
|
5
|
+
* single-provider subject), the scope-provided channels. Internal wiring, not a plugin
|
|
6
|
+
* extension point; a facet object is not itself reactive, the getters it carries are.
|
|
7
|
+
*/
|
|
8
|
+
// ── Action triple (per-key: containers re-provide these three) ───────────────
|
|
9
|
+
export const BLOCK_EDIT_KEY = Symbol('block-edit-actions');
|
|
10
|
+
export const FOCUS_KEY = Symbol('focus-actions');
|
|
11
|
+
export const CONTAINER_EDIT_KEY = Symbol('container-edit-actions');
|
|
12
|
+
/** G1.4's subject: only the editor root provides history, so undo/redo resolve to one
|
|
13
|
+
* stack. Folding it into a facet a container could re-provide is the exact violation. */
|
|
14
|
+
export const HISTORY_KEY = Symbol('history-actions');
|
|
15
|
+
// ── Scope-provided channels (per-key: scope provision IS their mechanism) ────
|
|
16
|
+
export const LIST_CONTEXT_KEY = Symbol('list-context');
|
|
17
|
+
export const TABLE_CONTEXT_KEY = Symbol('table-context');
|
|
18
|
+
/**
|
|
19
|
+
* @internal A hosted block enrolls itself in its scope's batched measure pass.
|
|
20
|
+
* `register` no-ops when the path isn't a direct child of the scope's depth (nested
|
|
21
|
+
* hosts route to their own channel); `readHeight` is called inside the scope's
|
|
22
|
+
* read-all-then-write batch, never inline. `measureOnResize` carries the observer's
|
|
23
|
+
* border-box height so the scope can O(1)-gate and skip the no-op mount resize.
|
|
24
|
+
*/
|
|
25
|
+
export const RECORD_BLOCK_HEIGHT_KEY = Symbol('record-block-height');
|
|
26
|
+
/**
|
|
27
|
+
* @internal A child reports up to its parent scope: a nested CONTAINER pushes its box
|
|
28
|
+
* subtotal by index, while a `display:contents` ROW (no box of its own) enrolls in the
|
|
29
|
+
* batched measure pass instead, so a windowed table measures like every other scope.
|
|
30
|
+
*/
|
|
31
|
+
export const PARENT_SCOPE_SINK_KEY = Symbol('parent-scope-sink');
|
|
32
|
+
// ── Facets ───────────────────────────────────────────────────────────────────
|
|
33
|
+
/** Cross-cutting editor services: event seam, view-state stores, and the
|
|
34
|
+
* cross-scope commit/reorder primitives. Root-provided once. */
|
|
35
|
+
export const EDITOR_SERVICES_KEY = Symbol('editor-services');
|
|
36
|
+
/** Host-supplied render/behavior policies. The getter members read live editor state
|
|
37
|
+
* on each call. */
|
|
38
|
+
export const EDITOR_POLICIES_KEY = Symbol('editor-policies');
|
|
39
|
+
/** Document identity and the per-instance lookups that hang off it. */
|
|
40
|
+
export const EDITOR_DOC_KEY = Symbol('editor-doc');
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public prop and instance-handle types for <Editor>. Editor.svelte annotates its
|
|
3
|
+
* $props() and instance surface against these, so neither can drift from the component.
|
|
4
|
+
*/
|
|
5
|
+
import type { Snippet } from 'svelte';
|
|
6
|
+
import type { AnyBlockKind } from './core/nodes';
|
|
7
|
+
import type { PasteImageHook, ResolveImageUrl, ResolveLinkUrl } from './editor-keys';
|
|
8
|
+
import type { ImageLoadPolicy } from './core/inline-render';
|
|
9
|
+
import type { PresentationMode } from './presentation-mode';
|
|
10
|
+
import type { KeybindingOverride } from './schema/keybinding-overrides';
|
|
11
|
+
import type { EditorSelection } from './selection/primitives';
|
|
12
|
+
import type { EditorEvents } from './editor-events';
|
|
13
|
+
import type { SearchState } from './search/search-state.svelte';
|
|
14
|
+
import type { DecorationRegistry } from './decorations/types';
|
|
15
|
+
import type { EditorRects } from './editor-rects';
|
|
16
|
+
import type { EditorPluginEntry } from './schema/plugin-install';
|
|
17
|
+
import type { InteractionTraceEntry } from './debug/interaction-trace';
|
|
18
|
+
export type { EditorPluginEntry } from './schema/plugin-install';
|
|
19
|
+
export type { InteractionTraceEntry } from './debug/interaction-trace';
|
|
20
|
+
export interface EditorProps {
|
|
21
|
+
source?: string;
|
|
22
|
+
resolveImageUrl?: ResolveImageUrl;
|
|
23
|
+
resolveLinkUrl?: ResolveLinkUrl;
|
|
24
|
+
imageLoadPolicy?: ImageLoadPolicy;
|
|
25
|
+
onLinkActivate?: (url: string, event: MouseEvent) => void;
|
|
26
|
+
/** Import hook for image-bearing pastes, set once at mount. Each image file is offered
|
|
27
|
+
* in order and the markdown returned is inserted at the caret; `null` skips it.
|
|
28
|
+
* Installing it takes the WHOLE paste — the clipboard's `text/plain` is not pasted. */
|
|
29
|
+
onPasteImage?: PasteImageHook;
|
|
30
|
+
/** Host chrome rendered INSIDE the editor's scroll container, above the first block
|
|
31
|
+
* (a title, properties panel, tag row). It scrolls away with the document rather than
|
|
32
|
+
* pinning, which is what lets the editor keep its own scrollport and windowing. */
|
|
33
|
+
header?: Snippet;
|
|
34
|
+
/** Opt into the pointer affordances: the block drag handle and the table's row and column
|
|
35
|
+
* grips (default off, so the surface stays gutter-free). A hover reveals them; touch, which
|
|
36
|
+
* has none, shows them outright. Keyboard reorder (Alt+Arrow) and the cell menu are always
|
|
37
|
+
* available and need no opt-in. */
|
|
38
|
+
blockDragHandles?: boolean;
|
|
39
|
+
searchBar?: boolean;
|
|
40
|
+
/** Where the editor's own find/replace bar renders. Default (absent) keeps it pinned inside
|
|
41
|
+
* the editor root; an element relocates the SAME bar into it, theme scope included, so
|
|
42
|
+
* host-scroll embeds can put it in a pane's chrome instead of mid-page. Read live, and
|
|
43
|
+
* ignored while `searchBar` is false. Positioning inside it is the element's own business. */
|
|
44
|
+
searchBarAnchor?: HTMLElement | null;
|
|
45
|
+
/** Who owns the scroll, set once at mount. `'self'` (default) makes the root its own
|
|
46
|
+
* scrollport. `'host'` lets an ancestor scroll it, and the editor windows against that
|
|
47
|
+
* scroller instead — so the mounted set stays O(viewport) either way. The one behavioural
|
|
48
|
+
* difference is scroll anchoring; the consumer guide's scrollMode section has the trade. */
|
|
49
|
+
scrollMode?: 'self' | 'host';
|
|
50
|
+
/** Theme name reflected to `data-editor-theme` on the editor root. Built-ins:
|
|
51
|
+
* `'dark'` (default) and `'light'`; any other value activates a consumer's
|
|
52
|
+
* own `.editor[data-editor-theme='<name>']` token block. */
|
|
53
|
+
theme?: string;
|
|
54
|
+
/** How the document presents, read live like `theme`; `'source'` by default. The consumer
|
|
55
|
+
* guide's Presentation modes section describes what each rung shows and allows. */
|
|
56
|
+
presentationMode?: PresentationMode;
|
|
57
|
+
/** Per-instance keymap overrides over the built-in command vocabulary. */
|
|
58
|
+
keybindings?: KeybindingOverride[];
|
|
59
|
+
/** Plugins installed once, in array order, at mount. Set-once: a later change to
|
|
60
|
+
* this prop is ignored — installation is process-global and cannot re-run. An
|
|
61
|
+
* entry may be a bare unit or `{ plugin, options }` for per-instance options.
|
|
62
|
+
* The array is the enablement set too: this editor activates exactly what it
|
|
63
|
+
* lists, and no prop at all activates everything installed. */
|
|
64
|
+
plugins?: readonly EditorPluginEntry[];
|
|
65
|
+
}
|
|
66
|
+
/** The `bind:this` surface a consumer can name and hold a ref to. */
|
|
67
|
+
export interface EditorInstance {
|
|
68
|
+
getSource(): string;
|
|
69
|
+
/**
|
|
70
|
+
* The block kind at `path` (child indices from the document root), or null when the path
|
|
71
|
+
* addresses no block: an out-of-range index, and the empty root path, which is the document
|
|
72
|
+
* itself. A read, not a handle: the node stays inside the editor. A plugin block answers its
|
|
73
|
+
* own declared kind name.
|
|
74
|
+
*/
|
|
75
|
+
getBlockKindAt(path: number[]): AnyBlockKind | null;
|
|
76
|
+
getSelection(): EditorSelection | null;
|
|
77
|
+
/**
|
|
78
|
+
* Restore a `getSelection()` snapshot. Async because the target is scrolled into view
|
|
79
|
+
* first, and true means it got there, not merely that it mounted. Never throws: an
|
|
80
|
+
* out-of-range offset clamps in that endpoint's own coordinate space (a TABLE
|
|
81
|
+
* endpoint's row-major cell index clamps to the last cell, not a character position),
|
|
82
|
+
* and an unresolvable path or an unsettled scroll resolves false.
|
|
83
|
+
*/
|
|
84
|
+
setSelection(selection: EditorSelection): Promise<boolean>;
|
|
85
|
+
/**
|
|
86
|
+
* Land the caret at a viewport point exactly as a click there would: the point clamps into the
|
|
87
|
+
* nearest block's box, the block under it resolves the landing, a live cross-block range ends
|
|
88
|
+
* first. For a shell owning chrome beside the document: the shell decides whether a click on
|
|
89
|
+
* its own territory comes here, the editor decides where the caret goes. False when no
|
|
90
|
+
* focusable landing resolves. A point below the whole document resolves against the CST, not
|
|
91
|
+
* the rendered slice: past a windowed-out tail it claims the point and lands after the reveal.
|
|
92
|
+
*/
|
|
93
|
+
placeCaretAtPoint(x: number, y: number): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Insert markdown at the caret exactly as pasting it would, minus the clipboard: paste
|
|
96
|
+
* transforms, every container-aware strategy, delete-selection-first, one undo entry, and
|
|
97
|
+
* focus at the end of the insertion. True means the pipeline took the text, not that its
|
|
98
|
+
* commit has flushed — read the result back through the `edit` event. False, and nothing
|
|
99
|
+
* mutates, when this editor holds no caret, in reading mode, or at a gap caret.
|
|
100
|
+
*/
|
|
101
|
+
insertMarkdown(md: string): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Run a command by id at the focused surface, no chord in the path, so a consumer's
|
|
104
|
+
* `keybindings` rebind cannot rewire a toolbar button. `TOOLBAR_COMMANDS` names the built-in
|
|
105
|
+
* ids; a plugin's global name resolves ahead of the focused block, its per-block one stays
|
|
106
|
+
* chord-only. Semantics match the chord: one undo entry, same caret — over a cross-block range
|
|
107
|
+
* a format toggle marks every block it touches, a table by its cells. False, and nothing mutates,
|
|
108
|
+
* on an unknown id, in reading mode, with nothing focused, and on the link editor over a range.
|
|
109
|
+
*/
|
|
110
|
+
runCommand(commandId: string): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Whether `runCommand(id)` would reach that command's arm right now, asked at the seam that
|
|
113
|
+
* would run it, so a host can grey a toolbar button out instead of hiding the affordance.
|
|
114
|
+
* False wherever the door declines before dispatch: an unknown id, reading mode, a block-local
|
|
115
|
+
* id with nothing focused (a gap caret included, where only the global ids stay live), and the
|
|
116
|
+
* link editor while a cross-block range is painted. True is reachability, not success: the arm
|
|
117
|
+
* that would run still decides whether it writes, and over a range it may reach no block at all.
|
|
118
|
+
*/
|
|
119
|
+
canRunCommand(commandId: string): boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Whether the command's toggle-state reads ON where a press would land — the read a toolbar
|
|
122
|
+
* paints pressed from, answered by the same bytes the toggle would rewrite. State, not
|
|
123
|
+
* admissibility, so a disabled button may still paint pressed. Over a cross-block range the
|
|
124
|
+
* answer is the range's own coverage: true only where every block it touches carries the
|
|
125
|
+
* mark; the link editor reads ON inside the construct its card would edit, in live mode
|
|
126
|
+
* alone. False for an id with no state of its own, and with nothing focused.
|
|
127
|
+
*/
|
|
128
|
+
isCommandActive(commandId: string): boolean;
|
|
129
|
+
getEvents(): EditorEvents;
|
|
130
|
+
getSearch(): SearchState;
|
|
131
|
+
getDecorations(): DecorationRegistry;
|
|
132
|
+
getRects(): EditorRects;
|
|
133
|
+
getDiagnostics(): EditorDiagnostics;
|
|
134
|
+
/**
|
|
135
|
+
* Every MODIFIER chord this instance consumes, normalized (`Mod` covers Ctrl and Cmd).
|
|
136
|
+
* Composed live from the kind keymaps, the command tables, the plugins this editor activated,
|
|
137
|
+
* the `keybindings` overrides and the search option, so a host accelerator table is derived,
|
|
138
|
+
* not hand-copied. Bare keys are out of contract: a focused document owns them. So is a
|
|
139
|
+
* DISABLED chord (`command: null`), released for the host to claim app-wide yet still
|
|
140
|
+
* swallowed INSIDE the editor, whose native fall-through would bypass the CST undo stack.
|
|
141
|
+
*/
|
|
142
|
+
reservedChords(): ReadonlySet<string>;
|
|
143
|
+
/** Whether this instance consumes that keystroke, answered with the editor's own chord
|
|
144
|
+
* normalization so a host never re-implements the Ctrl/Cmd fold. */
|
|
145
|
+
claimsChord(event: KeyboardEvent): boolean;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The diagnostics door: arm the interaction trace, read it, and serialize an attachable
|
|
149
|
+
* field report. The recorder ships default-off, so a consumer opts in, reproduces, then
|
|
150
|
+
* serializes. The trace is process-global — two instances interleave their entries.
|
|
151
|
+
*/
|
|
152
|
+
export interface EditorDiagnostics {
|
|
153
|
+
enableTrace(): void;
|
|
154
|
+
disableTrace(): void;
|
|
155
|
+
isTraceEnabled(): boolean;
|
|
156
|
+
traceSnapshot(): InteractionTraceEntry[];
|
|
157
|
+
/**
|
|
158
|
+
* A fenced-markdown snapshot (timestamp, trace tail, ops-log tail, selection). The
|
|
159
|
+
* document source is EXCLUDED by default; pass `{ includeSource: true }` to opt in.
|
|
160
|
+
*/
|
|
161
|
+
serializeDiagnostics(opts?: {
|
|
162
|
+
includeSource?: boolean;
|
|
163
|
+
}): string;
|
|
164
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { BlockComponent } from './block-component';
|
|
2
|
+
import type { RevealAnchorState } from './cursor/reveal-anchor';
|
|
3
|
+
export interface EditorRects {
|
|
4
|
+
/** The block's outermost box, or null when it isn't mounted. */
|
|
5
|
+
blockRect(path: number[]): DOMRect | null;
|
|
6
|
+
/**
|
|
7
|
+
* Rects covering `[start, end)` in the block's measurable content — one per visual
|
|
8
|
+
* line on a wrapped prose leaf, one per cell on a grid surface. `SELECTION_END` is
|
|
9
|
+
* accepted as `end`. Empty when the block isn't mounted or can't measure.
|
|
10
|
+
*/
|
|
11
|
+
rangeRects(path: number[], start: number, end: number): DOMRect[];
|
|
12
|
+
/**
|
|
13
|
+
* The live native single-block caret, or null — including in cross-block mode, whose
|
|
14
|
+
* parked range is not a caret and must not leak out as one.
|
|
15
|
+
*/
|
|
16
|
+
caretRect(): DOMRect | null;
|
|
17
|
+
/** Scroll a windowed-out block into its window and await its mount. Resolves
|
|
18
|
+
* true once the block's element is present. */
|
|
19
|
+
reveal(path: number[]): Promise<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Reveal (mount) the block at `path`, then scroll the viewport to it. `block` defaults to
|
|
22
|
+
* `'nearest'`; `hold` (default true) keeps the reveal's pin afterward, so a later layout
|
|
23
|
+
* shift cannot push the target back out. Resolves true only once the position settles; a
|
|
24
|
+
* reveal superseded by a later one stops refining and reports honest visibility.
|
|
25
|
+
*/
|
|
26
|
+
scrollTo(path: readonly number[], opts?: {
|
|
27
|
+
block?: 'nearest' | 'center';
|
|
28
|
+
hold?: boolean;
|
|
29
|
+
}): Promise<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Navigate to `path`: reveal, scroll, and land the caret at `offset` in it (default 0),
|
|
32
|
+
* so the next keystroke (Ctrl+Z included) addresses the document rather than the
|
|
33
|
+
* affordance that was clicked. Runs the same restore road undo and `setSelection` use.
|
|
34
|
+
* True means the caret landed AND the target settled into view.
|
|
35
|
+
*/
|
|
36
|
+
navigateTo(path: readonly number[], offset?: number): Promise<boolean>;
|
|
37
|
+
}
|
|
38
|
+
export declare function createEditorRects(deps: {
|
|
39
|
+
getBlockElByPath: (path: number[]) => HTMLElement | null;
|
|
40
|
+
getBlockComponentByPath: (path: number[]) => BlockComponent | null;
|
|
41
|
+
revealPath: (path: number[]) => Promise<unknown>;
|
|
42
|
+
getEditorRoot: () => HTMLElement | null;
|
|
43
|
+
/** True when an ancestor owns the scroll (`scrollMode="host"`): the root is then no
|
|
44
|
+
* scrollport but spans the WHOLE document, so intersecting a block with it answers
|
|
45
|
+
* "is this in the document" rather than "is this visible". */
|
|
46
|
+
isHostScroll: () => boolean;
|
|
47
|
+
/** Host mode's ancestors that bound what can be seen. Intersected WITH the window
|
|
48
|
+
* viewport, never instead of it: a bound that clips nothing would swallow the fold. */
|
|
49
|
+
getClipBounds: () => HTMLElement[];
|
|
50
|
+
isCrossBlock: () => boolean;
|
|
51
|
+
/** True for nodes in the host's `header` slot — inside the root, but not this
|
|
52
|
+
* editor's content. */
|
|
53
|
+
isHostChrome: (node: Node | null) => boolean;
|
|
54
|
+
revealAnchor: RevealAnchorState;
|
|
55
|
+
/** Land a caret at a raw offset in `path` through the shared restore road. Injected
|
|
56
|
+
* because this surface owns geometry, not the selection model. */
|
|
57
|
+
landCaretAt: (path: number[], offset: number) => Promise<boolean>;
|
|
58
|
+
}): EditorRects;
|