@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,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Viewport-space geometry over the rendered document, the public face of the measurement
|
|
3
|
+
* primitives block components expose. Offsets inherit `measurePartialRects`' per-surface
|
|
4
|
+
* meaning (raw offsets on prose leaves, cell-index coordinates on grid surfaces). Rects
|
|
5
|
+
* are real only in a browser — jsdom reports ~0-sized boxes — so e2e covers this surface,
|
|
6
|
+
* not unit tests.
|
|
7
|
+
*/
|
|
8
|
+
import { tick } from 'svelte';
|
|
9
|
+
// Post-mount measure passes settle within a few Svelte flushes; `tick` is the repo's only
|
|
10
|
+
// sequencing primitive, so the wait is a bounded count of them.
|
|
11
|
+
const REVEAL_SETTLE_TICKS = 12;
|
|
12
|
+
export function createEditorRects(deps) {
|
|
13
|
+
function isInView(el, root) {
|
|
14
|
+
const br = el.getBoundingClientRect();
|
|
15
|
+
// Self mode: the root IS the scrollport, and what lies outside it is the host
|
|
16
|
+
// page's business, not the editor's.
|
|
17
|
+
if (!deps.isHostScroll()) {
|
|
18
|
+
const er = root.getBoundingClientRect();
|
|
19
|
+
return br.top < er.bottom && br.bottom > er.top;
|
|
20
|
+
}
|
|
21
|
+
if (br.top >= window.innerHeight || br.bottom <= 0)
|
|
22
|
+
return false;
|
|
23
|
+
for (const bound of deps.getClipBounds()) {
|
|
24
|
+
const cr = bound.getBoundingClientRect();
|
|
25
|
+
if (br.top >= cr.bottom || br.bottom <= cr.top)
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
// The anchor's re-assertion (`correctAnchor`) is model-based and runs pre-flush, so it
|
|
31
|
+
// can lag the DOM by a boundary block's height; each tick refines placement AFTER the
|
|
32
|
+
// flush, when DOM reads are exact, and stops once the target stops moving. A SUPERSEDED
|
|
33
|
+
// claim bails at once (the viewport belongs to the newer reveal), but one that merely
|
|
34
|
+
// lost its pin to a user gesture keeps refining — it is still arriving.
|
|
35
|
+
async function settleInView(path, block, claim) {
|
|
36
|
+
const root = deps.getEditorRoot();
|
|
37
|
+
if (!root)
|
|
38
|
+
return deps.getBlockElByPath(path) != null;
|
|
39
|
+
let placedTop = null;
|
|
40
|
+
for (let i = 0; i < REVEAL_SETTLE_TICKS; i++) {
|
|
41
|
+
await tick();
|
|
42
|
+
if (claim.isSuperseded())
|
|
43
|
+
break;
|
|
44
|
+
const el = deps.getBlockElByPath(path);
|
|
45
|
+
if (!el) {
|
|
46
|
+
placedTop = null; // transiently unmounted mid re-slice — keep settling
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
// Converged: the anchor correction no longer disturbs the prior precise placement.
|
|
50
|
+
const afterAnchor = el.getBoundingClientRect().top;
|
|
51
|
+
if (afterAnchor === placedTop)
|
|
52
|
+
break;
|
|
53
|
+
el.scrollIntoView({ block });
|
|
54
|
+
placedTop = el.getBoundingClientRect().top;
|
|
55
|
+
}
|
|
56
|
+
const el = deps.getBlockElByPath(path);
|
|
57
|
+
return el != null && isInView(el, root);
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
blockRect(path) {
|
|
61
|
+
return deps.getBlockElByPath(path)?.getBoundingClientRect() ?? null;
|
|
62
|
+
},
|
|
63
|
+
rangeRects(path, start, end) {
|
|
64
|
+
return deps.getBlockComponentByPath(path)?.measurePartialRects?.(start, end) ?? [];
|
|
65
|
+
},
|
|
66
|
+
caretRect() {
|
|
67
|
+
// Read SelectionState, not the `data-cross-block` DOM mirror: that attribute is
|
|
68
|
+
// written by a deferred $effect and lags the synchronous selectionChange emit, so
|
|
69
|
+
// a subscriber reading mid-emit would get the parked range as a caret.
|
|
70
|
+
if (deps.isCrossBlock())
|
|
71
|
+
return null;
|
|
72
|
+
const root = deps.getEditorRoot();
|
|
73
|
+
if (!root)
|
|
74
|
+
return null;
|
|
75
|
+
const selection = window.getSelection();
|
|
76
|
+
if (!selection || selection.rangeCount === 0)
|
|
77
|
+
return null;
|
|
78
|
+
const range = selection.getRangeAt(0);
|
|
79
|
+
if (!root.contains(range.commonAncestorContainer))
|
|
80
|
+
return null;
|
|
81
|
+
// A caret in the host's header slot is inside the root but is not a document
|
|
82
|
+
// caret; reporting it would float caret-following chrome over the host's field.
|
|
83
|
+
if (deps.isHostChrome(range.commonAncestorContainer))
|
|
84
|
+
return null;
|
|
85
|
+
return range.getBoundingClientRect();
|
|
86
|
+
},
|
|
87
|
+
async reveal(path) {
|
|
88
|
+
await deps.revealPath(path);
|
|
89
|
+
return deps.getBlockElByPath(path) != null;
|
|
90
|
+
},
|
|
91
|
+
async scrollTo(path, opts) {
|
|
92
|
+
const p = [...path];
|
|
93
|
+
const block = opts?.block ?? 'nearest';
|
|
94
|
+
// Claim before the first await so the pin survives a clearing gesture that
|
|
95
|
+
// triggered this reveal (a match click's pointerdown releases, then this re-claims).
|
|
96
|
+
const claim = deps.revealAnchor.claim(p, block);
|
|
97
|
+
await deps.revealPath(p);
|
|
98
|
+
// Gated: a claim superseded during a long mount wait would otherwise yank the
|
|
99
|
+
// viewport once, before the settle's first tick could bail it.
|
|
100
|
+
if (!claim.isSuperseded())
|
|
101
|
+
deps.getBlockElByPath(p)?.scrollIntoView({ block });
|
|
102
|
+
const landed = await settleInView(p, block, claim);
|
|
103
|
+
// Release on 'center': the anchor holds only a coarse pin, whose later corrections
|
|
104
|
+
// would drift a target the settle already placed exactly. 'nearest' holds by
|
|
105
|
+
// default — the coarse top-pin IS its contract. A failed reveal never pins.
|
|
106
|
+
if (block === 'center' || !landed || opts?.hold === false)
|
|
107
|
+
claim.release();
|
|
108
|
+
return landed;
|
|
109
|
+
},
|
|
110
|
+
navigateTo(path, offset = 0) {
|
|
111
|
+
return deps.landCaretAt([...path], offset);
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
package/dist/env.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The editor's toolchain-coupling seam: build flags come from `esm-env`, here and at the
|
|
3
|
+
* `if (DEV)` gates whose constant a production build folds away. The override door for a
|
|
4
|
+
* toolchain those defaults read wrong (a bundler resolving no export conditions, a runner
|
|
5
|
+
* other than Vitest) is published on the `@voithos-labs/aragonite/testing` subpath, not from here.
|
|
6
|
+
*/
|
|
7
|
+
export declare const editorEnv: {
|
|
8
|
+
isDev: boolean;
|
|
9
|
+
isTest: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function configureEditorEnv(partial: Partial<typeof editorEnv>): void;
|
|
12
|
+
export declare function resetEditorEnv(): void;
|
package/dist/env.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The editor's toolchain-coupling seam: build flags come from `esm-env`, here and at the
|
|
3
|
+
* `if (DEV)` gates whose constant a production build folds away. The override door for a
|
|
4
|
+
* toolchain those defaults read wrong (a bundler resolving no export conditions, a runner
|
|
5
|
+
* other than Vitest) is published on the `@voithos-labs/aragonite/testing` subpath, not from here.
|
|
6
|
+
*/
|
|
7
|
+
import { DEV } from 'esm-env';
|
|
8
|
+
function computeDefaults() {
|
|
9
|
+
return {
|
|
10
|
+
isDev: DEV,
|
|
11
|
+
isTest: typeof process !== 'undefined' && !!process?.env?.VITEST
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export const editorEnv = computeDefaults();
|
|
15
|
+
export function configureEditorEnv(partial) {
|
|
16
|
+
Object.assign(editorEnv, partial);
|
|
17
|
+
}
|
|
18
|
+
export function resetEditorEnv() {
|
|
19
|
+
Object.assign(editorEnv, computeDefaults());
|
|
20
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { default as Editor } from './components/Editor.svelte';
|
|
2
|
+
export type { EditorProps, EditorInstance } from './editor-props';
|
|
3
|
+
export type { EditorDiagnostics, InteractionTraceEntry } from './editor-props';
|
|
4
|
+
export type { BlockComponent } from './block-component';
|
|
5
|
+
export type { ResolveImageUrl, ResolveLinkUrl, PastedImage, PasteImageHook } from './editor-keys';
|
|
6
|
+
export type { ImageLoadPolicy } from './core/inline-render';
|
|
7
|
+
export type { PresentationMode } from './presentation-mode';
|
|
8
|
+
export type { SearchState, SearchOptions } from './search/search-state.svelte';
|
|
9
|
+
export type { Match } from './search/document-scan';
|
|
10
|
+
export { installPlugins } from './schema/plugin-install';
|
|
11
|
+
export type { EditorPlugin, EditorPluginEntry } from './schema/plugin-install';
|
|
12
|
+
export type { EditorSelection, SelectionPoint } from './selection/primitives';
|
|
13
|
+
export { normalize as normalizeSelection } from './selection/primitives';
|
|
14
|
+
export type { KeybindingOverride } from './schema/keybinding-overrides';
|
|
15
|
+
export type { CommandId } from './schema/commands';
|
|
16
|
+
export { TOOLBAR_COMMANDS } from './schema/commands';
|
|
17
|
+
export { parse, type ParseScope } from './core/parser';
|
|
18
|
+
export { serialize } from './core/serializer';
|
|
19
|
+
export { parseInline, getContentRange, isProseKind } from './core/inline';
|
|
20
|
+
export type { ContentRange } from './core/inline';
|
|
21
|
+
export type { BlockKind, LeafBlockKind, ContainerBlockKind, AnyBlockKind, CstNode, Document, BlockMetadata, HeadingMetadata, SetextHeadingMetadata, FencedCodeMetadata, ThematicBreakMetadata, LinkReferenceDefinitionMetadata, TableMetadata, BlockquoteMetadata, ListMetadata, ListItemMetadata, InlineNodeKind, InlineNode } from './core/nodes';
|
|
22
|
+
export type { NodeView, DocumentView } from './core/node-views';
|
|
23
|
+
export type { EditorEvents, EditEvent, EditorEventMap, EditorError, SelectionChangeEvent } from './editor-events';
|
|
24
|
+
export type { Decoration, MarkDecoration, WidgetDecoration, ReplaceDecoration, BlockDecoration, DecorationWidgetSpec, ProvideContext, DecorationSource, DecorationSourceHandle, DecorationRegistry } from './decorations/types';
|
|
25
|
+
export type { EditorRects } from './editor-rects';
|
|
26
|
+
export { SELECTION_END } from './block-component';
|
|
27
|
+
export type { SelectionEnd } from './block-component';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Public, supported surface of the editor module: adding an export is non-breaking,
|
|
2
|
+
// removing one is breaking. Anything not re-exported here is internal.
|
|
3
|
+
// ── Component ────────────────────────────────────────────────────────────────
|
|
4
|
+
export { default as Editor } from './components/Editor.svelte';
|
|
5
|
+
// ── Plugins ────────────────────────────────────────────────────────────────────
|
|
6
|
+
// installPlugins is for editor-less `parse()` pipelines that need the grammar live
|
|
7
|
+
// without mounting <Editor>.
|
|
8
|
+
export { installPlugins } from './schema/plugin-install';
|
|
9
|
+
// Document order over a selection's endpoints, so a host anchoring UI to a range needn't
|
|
10
|
+
// re-derive path-lexicographic comparison.
|
|
11
|
+
export { normalize as normalizeSelection } from './selection/primitives';
|
|
12
|
+
// ── Commands (pre-freeze: the id space opens up when the command registry unifies) ──
|
|
13
|
+
// The ids `editor.runCommand()` supports — what a selection toolbar needs.
|
|
14
|
+
export { TOOLBAR_COMMANDS } from './schema/commands';
|
|
15
|
+
// ── CST utilities ────────────────────────────────────────────────────────────
|
|
16
|
+
export { parse } from './core/parser';
|
|
17
|
+
export { serialize } from './core/serializer';
|
|
18
|
+
export { parseInline, getContentRange, isProseKind } from './core/inline';
|
|
19
|
+
export { SELECTION_END } from './block-component';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* G1.16 — every path a commit declares is doc-absolute: each prefix resolves to an
|
|
3
|
+
* existing child from the document root. The final index may be one past the end, since
|
|
4
|
+
* insert-shaped ops legitimately name the slot they create. The `DocPath` param is the
|
|
5
|
+
* compile-time gate; this stays the runtime belt for the JS callers types don't bind.
|
|
6
|
+
*/
|
|
7
|
+
import type { Document } from '../core/nodes';
|
|
8
|
+
import type { DocPath } from '../selection/path-math';
|
|
9
|
+
import type { InvariantViolation } from '../assert';
|
|
10
|
+
export declare function checkCommitPathAddressable(doc: Document, path: DocPath, role: 'eventPath' | 'snapshot.path'): InvariantViolation | null;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* G1.16 — every path a commit declares is doc-absolute: each prefix resolves to an
|
|
3
|
+
* existing child from the document root. The final index may be one past the end, since
|
|
4
|
+
* insert-shaped ops legitimately name the slot they create. The `DocPath` param is the
|
|
5
|
+
* compile-time gate; this stays the runtime belt for the JS callers types don't bind.
|
|
6
|
+
*/
|
|
7
|
+
export function checkCommitPathAddressable(doc, path, role) {
|
|
8
|
+
let parent = doc;
|
|
9
|
+
for (let i = 0; i < path.length; i++) {
|
|
10
|
+
const children = parent.children;
|
|
11
|
+
const idx = path[i];
|
|
12
|
+
const isLast = i === path.length - 1;
|
|
13
|
+
const limit = (children?.length ?? 0) + (isLast ? 1 : 0);
|
|
14
|
+
if (!children || idx < 0 || idx >= limit) {
|
|
15
|
+
return {
|
|
16
|
+
code: 'commit-path-dialect',
|
|
17
|
+
message: `commit ${role} [${path.join(',')}] does not resolve from the document root`,
|
|
18
|
+
detail: { role, path, failedAt: i }
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
if (!isLast)
|
|
22
|
+
parent = children[idx];
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commit-in-progress flag. The ceremony (editor-actions) brackets its synchronous body; the
|
|
3
|
+
* decoration engine (reactivity) reads it to keep a source off a half-applied tree. A leaf,
|
|
4
|
+
* so both read it downward — a flag in editor-actions would close a cycle. Never behind a
|
|
5
|
+
* build flag: the deferral is production behavior (G4.61).
|
|
6
|
+
*/
|
|
7
|
+
export declare function beginCommit(): void;
|
|
8
|
+
export declare function endCommit(): void;
|
|
9
|
+
export declare function isCommitInProgress(): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commit-in-progress flag. The ceremony (editor-actions) brackets its synchronous body; the
|
|
3
|
+
* decoration engine (reactivity) reads it to keep a source off a half-applied tree. A leaf,
|
|
4
|
+
* so both read it downward — a flag in editor-actions would close a cycle. Never behind a
|
|
5
|
+
* build flag: the deferral is production behavior (G4.61).
|
|
6
|
+
*/
|
|
7
|
+
let inCommit = false;
|
|
8
|
+
export function beginCommit() {
|
|
9
|
+
inCommit = true;
|
|
10
|
+
}
|
|
11
|
+
export function endCommit() {
|
|
12
|
+
inCommit = false;
|
|
13
|
+
}
|
|
14
|
+
export function isCommitInProgress() {
|
|
15
|
+
return inCommit;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { InvariantViolation } from '../assert';
|
|
2
|
+
/**
|
|
3
|
+
* G1.4 — a container's provided context keys must not include the editor's
|
|
4
|
+
* HISTORY_KEY. Containers re-provide nested action contexts to descendants but
|
|
5
|
+
* must let history flow from the root; shadowing it would split the undo stack.
|
|
6
|
+
*/
|
|
7
|
+
export declare function checkNoContainerHistoryKey(setKeys: symbol[], historyKey: symbol): InvariantViolation | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* G1.4 — a container's provided context keys must not include the editor's
|
|
3
|
+
* HISTORY_KEY. Containers re-provide nested action contexts to descendants but
|
|
4
|
+
* must let history flow from the root; shadowing it would split the undo stack.
|
|
5
|
+
*/
|
|
6
|
+
export function checkNoContainerHistoryKey(setKeys, historyKey) {
|
|
7
|
+
if (setKeys.includes(historyKey)) {
|
|
8
|
+
return {
|
|
9
|
+
code: 'container-sets-history-key',
|
|
10
|
+
message: 'container provides HISTORY_KEY to descendants — undo stack would split'
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CstNode } from '../core/nodes';
|
|
2
|
+
import { type ContentRange } from '../core/inline';
|
|
3
|
+
import type { InvariantViolation } from '../assert';
|
|
4
|
+
/**
|
|
5
|
+
* G1.8 — a content range stays within its raw: `0 <= start <= end <= displayLength(raw)`.
|
|
6
|
+
* Every kind that HAS a range is covered, not just the prose ones: a non-prose kind may declare
|
|
7
|
+
* `getContentRange` (the directive leaf does) and the range is consumed unconditionally.
|
|
8
|
+
* `getRange` is a parameter so a negative test can inject a bad range without touching the registry.
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkContentRange(node: CstNode, getRange?: (node: CstNode) => ContentRange): InvariantViolation | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { displayLength } from '../core/lines';
|
|
2
|
+
import { getBlockKindDescriptor } from '../schema/block-kind-descriptor';
|
|
3
|
+
import { getContentRange } from '../core/inline';
|
|
4
|
+
/**
|
|
5
|
+
* G1.8 — a content range stays within its raw: `0 <= start <= end <= displayLength(raw)`.
|
|
6
|
+
* Every kind that HAS a range is covered, not just the prose ones: a non-prose kind may declare
|
|
7
|
+
* `getContentRange` (the directive leaf does) and the range is consumed unconditionally.
|
|
8
|
+
* `getRange` is a parameter so a negative test can inject a bad range without touching the registry.
|
|
9
|
+
*/
|
|
10
|
+
export function checkContentRange(node, getRange = getContentRange) {
|
|
11
|
+
const descriptor = getBlockKindDescriptor(node.kind);
|
|
12
|
+
if (!descriptor.supportsInline && descriptor.getContentRange === undefined)
|
|
13
|
+
return null;
|
|
14
|
+
const { start, end } = getRange(node);
|
|
15
|
+
const len = displayLength(node.raw);
|
|
16
|
+
if (!(0 <= start && start <= end && end <= len)) {
|
|
17
|
+
return {
|
|
18
|
+
code: 'content-range-out-of-bounds',
|
|
19
|
+
message: `content range [${start}, ${end}] out of bounds for "${node.kind}" (len ${len})`,
|
|
20
|
+
detail: { kind: node.kind, start, end, len }
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Predicates for the inline layer's transition guards (G1.25–G1.27): the widget-pool pass
|
|
3
|
+
* bracket, the reveal kernel's source-length precondition, and the IME composition window.
|
|
4
|
+
*/
|
|
5
|
+
import type { InvariantViolation } from '../assert';
|
|
6
|
+
export type PoolBracketAction = 'acquire' | 'beginPass' | 'sweep';
|
|
7
|
+
/**
|
|
8
|
+
* G1.25 — every pool mutation respects the beginPass/sweep bracket. Outside one, adoption
|
|
9
|
+
* flags and pass tallies are meaningless and key-only lookup cannot tell byte-identical
|
|
10
|
+
* duplicate widgets apart.
|
|
11
|
+
*/
|
|
12
|
+
export declare function checkPoolBracket(passOpen: boolean, action: PoolBracketAction): InvariantViolation | null;
|
|
13
|
+
/**
|
|
14
|
+
* G1.26 (kernel leg) — a reveal's source bytes span exactly its [sourceStart, sourceEnd)
|
|
15
|
+
* range; a mismatch shifts every raw offset outside the source, desyncing the offset walk.
|
|
16
|
+
*/
|
|
17
|
+
export declare function checkRevealSourceLength(sourceLength: number, sourceStart: number, sourceEnd: number): InvariantViolation | null;
|
|
18
|
+
/**
|
|
19
|
+
* G1.27 — a compositionend lands only inside a composition the surface saw start. Browsers
|
|
20
|
+
* pair the events per element, so an unpaired end means a consumer wired `compositionend`
|
|
21
|
+
* without `compositionstart` and every composition keystroke reached the CST mid-IME.
|
|
22
|
+
*/
|
|
23
|
+
export declare function checkCompositionEndPaired(composing: boolean): InvariantViolation | null;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* G1.25 — every pool mutation respects the beginPass/sweep bracket. Outside one, adoption
|
|
3
|
+
* flags and pass tallies are meaningless and key-only lookup cannot tell byte-identical
|
|
4
|
+
* duplicate widgets apart.
|
|
5
|
+
*/
|
|
6
|
+
export function checkPoolBracket(passOpen, action) {
|
|
7
|
+
if (action === 'beginPass') {
|
|
8
|
+
return passOpen
|
|
9
|
+
? {
|
|
10
|
+
code: 'begin-unswept',
|
|
11
|
+
message: 'beginPass while a bracket is already open — the previous pass was never swept'
|
|
12
|
+
}
|
|
13
|
+
: null;
|
|
14
|
+
}
|
|
15
|
+
if (passOpen)
|
|
16
|
+
return null;
|
|
17
|
+
return action === 'acquire'
|
|
18
|
+
? {
|
|
19
|
+
code: 'acquire-outside-bracket',
|
|
20
|
+
message: 'acquire outside a beginPass/sweep bracket — adoption is only meaningful inside a rebuild pass'
|
|
21
|
+
}
|
|
22
|
+
: {
|
|
23
|
+
code: 'sweep-outside-bracket',
|
|
24
|
+
message: 'sweep without an open bracket — nothing was adopted, so it would destroy every live widget'
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* G1.26 (kernel leg) — a reveal's source bytes span exactly its [sourceStart, sourceEnd)
|
|
29
|
+
* range; a mismatch shifts every raw offset outside the source, desyncing the offset walk.
|
|
30
|
+
*/
|
|
31
|
+
export function checkRevealSourceLength(sourceLength, sourceStart, sourceEnd) {
|
|
32
|
+
if (sourceLength === sourceEnd - sourceStart)
|
|
33
|
+
return null;
|
|
34
|
+
return {
|
|
35
|
+
code: 'source-length-mismatch',
|
|
36
|
+
message: 'reveal source length differs from its [sourceStart, sourceEnd) range',
|
|
37
|
+
detail: { sourceLength, sourceStart, sourceEnd }
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* G1.27 — a compositionend lands only inside a composition the surface saw start. Browsers
|
|
42
|
+
* pair the events per element, so an unpaired end means a consumer wired `compositionend`
|
|
43
|
+
* without `compositionstart` and every composition keystroke reached the CST mid-IME.
|
|
44
|
+
*/
|
|
45
|
+
export function checkCompositionEndPaired(composing) {
|
|
46
|
+
if (composing)
|
|
47
|
+
return null;
|
|
48
|
+
return {
|
|
49
|
+
code: 'end-without-start',
|
|
50
|
+
message: 'compositionend with no open composition — the surface never saw compositionstart'
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Seam-side glue between the pure predicates and the `assertInvariant` channel, so the
|
|
3
|
+
* predicates themselves stay pure and unaware of it.
|
|
4
|
+
*/
|
|
5
|
+
import type { CstNode, Document } from '../core/nodes';
|
|
6
|
+
import type { DocPath } from '../selection/path-math';
|
|
7
|
+
import { type SnapshotEntry } from './snapshot-integrity';
|
|
8
|
+
/**
|
|
9
|
+
* Per-commit check for the nodes a commit touched, never a whole-tree walk. Each predicate
|
|
10
|
+
* self-filters by kind. Run AFTER the commit's rebuildRaw, so a strip container's raw is
|
|
11
|
+
* its freshly-rebuilt output.
|
|
12
|
+
*/
|
|
13
|
+
export declare function assertCommittedNodes(nodes: CstNode[]): void;
|
|
14
|
+
/**
|
|
15
|
+
* Pre-mutate commit-seam check that both declared coordinates are doc-absolute (G1.16,
|
|
16
|
+
* `commit-paths.ts`). Null skips a coordinate the commit doesn't carry.
|
|
17
|
+
*/
|
|
18
|
+
export declare function assertCommitPaths(doc: Document, snapshotPath: DocPath | null, eventPath: DocPath | null): void;
|
|
19
|
+
/**
|
|
20
|
+
* G1.9 per-commit seam: the freshest undo entry is the one this commit's mutations could
|
|
21
|
+
* have corrupted, so only its digest is re-verified. Deeper entries stay covered by the
|
|
22
|
+
* restore-time check in `editor-actions/commit/history.ts`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function assertUndoTopIntegrity(entry: SnapshotEntry | undefined): void;
|
|
25
|
+
/**
|
|
26
|
+
* G1.36 consumer half, at each publish seam: the descriptor's own bounds check cannot see a
|
|
27
|
+
* change that fits its array while describing the wrong window, and a short id array reaches
|
|
28
|
+
* Svelte's keyed each as missing keys.
|
|
29
|
+
*/
|
|
30
|
+
export declare function assertIdsInLockstep(seam: string, idCount: number, childCount: number): void;
|
|
31
|
+
/**
|
|
32
|
+
* Registry-wide checks at the mount seam. The flush owns the once-latch: the first sweeps
|
|
33
|
+
* the whole world, later mounts validate only registrations since the previous flush. The
|
|
34
|
+
* inline-policy check sits outside it — mount-only, and table-wide on every mount (G1.31).
|
|
35
|
+
*/
|
|
36
|
+
export declare function runStartupInvariantChecks(): void;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Seam-side glue between the pure predicates and the `assertInvariant` channel, so the
|
|
3
|
+
* predicates themselves stay pure and unaware of it.
|
|
4
|
+
*/
|
|
5
|
+
import { assertInvariant } from '../assert';
|
|
6
|
+
import { checkCommitPathAddressable } from './commit-paths';
|
|
7
|
+
import { flushPendingRegistrationChecks, checkInlineConstructPoliciesAtMount } from '../schema/registration-checks';
|
|
8
|
+
import { checkStaleRaw, checkOpaqueStaleRaw, checkOpaqueRebuildDeterminism, checkReservedChromeSlot, checkCategoryFields } from './node-shape';
|
|
9
|
+
import { checkContentRange } from './descriptor';
|
|
10
|
+
import { checkChildSpansLockstep, checkIdsChildrenLockstep } from './structural-descriptor';
|
|
11
|
+
import { checkSnapshotIntegrity } from './snapshot-integrity';
|
|
12
|
+
/**
|
|
13
|
+
* Per-commit check for the nodes a commit touched, never a whole-tree walk. Each predicate
|
|
14
|
+
* self-filters by kind. Run AFTER the commit's rebuildRaw, so a strip container's raw is
|
|
15
|
+
* its freshly-rebuilt output.
|
|
16
|
+
*/
|
|
17
|
+
export function assertCommittedNodes(nodes) {
|
|
18
|
+
for (const node of nodes) {
|
|
19
|
+
assertInvariant('stale-raw', () => checkStaleRaw(node));
|
|
20
|
+
assertInvariant('opaque-stale-raw', () => checkOpaqueStaleRaw(node));
|
|
21
|
+
assertInvariant('opaque-rebuild-determinism', () => checkOpaqueRebuildDeterminism(node));
|
|
22
|
+
assertInvariant('reserved-chrome-slot', () => checkReservedChromeSlot(node));
|
|
23
|
+
assertInvariant('category-fields', () => checkCategoryFields(node));
|
|
24
|
+
assertInvariant('content-range', () => checkContentRange(node));
|
|
25
|
+
assertInvariant('child-spans-lockstep', () => checkChildSpansLockstep(node));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Pre-mutate commit-seam check that both declared coordinates are doc-absolute (G1.16,
|
|
30
|
+
* `commit-paths.ts`). Null skips a coordinate the commit doesn't carry.
|
|
31
|
+
*/
|
|
32
|
+
export function assertCommitPaths(doc, snapshotPath, eventPath) {
|
|
33
|
+
if (snapshotPath) {
|
|
34
|
+
assertInvariant('commit-path-dialect', () => checkCommitPathAddressable(doc, snapshotPath, 'snapshot.path'));
|
|
35
|
+
}
|
|
36
|
+
if (eventPath) {
|
|
37
|
+
assertInvariant('commit-path-dialect', () => checkCommitPathAddressable(doc, eventPath, 'eventPath'));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* G1.9 per-commit seam: the freshest undo entry is the one this commit's mutations could
|
|
42
|
+
* have corrupted, so only its digest is re-verified. Deeper entries stay covered by the
|
|
43
|
+
* restore-time check in `editor-actions/commit/history.ts`.
|
|
44
|
+
*/
|
|
45
|
+
export function assertUndoTopIntegrity(entry) {
|
|
46
|
+
if (!entry)
|
|
47
|
+
return;
|
|
48
|
+
assertInvariant('snapshot-integrity', () => checkSnapshotIntegrity(entry));
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* G1.36 consumer half, at each publish seam: the descriptor's own bounds check cannot see a
|
|
52
|
+
* change that fits its array while describing the wrong window, and a short id array reaches
|
|
53
|
+
* Svelte's keyed each as missing keys.
|
|
54
|
+
*/
|
|
55
|
+
export function assertIdsInLockstep(seam, idCount, childCount) {
|
|
56
|
+
assertInvariant('ids-children-lockstep', () => checkIdsChildrenLockstep(seam, idCount, childCount));
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Registry-wide checks at the mount seam. The flush owns the once-latch: the first sweeps
|
|
60
|
+
* the whole world, later mounts validate only registrations since the previous flush. The
|
|
61
|
+
* inline-policy check sits outside it — mount-only, and table-wide on every mount (G1.31).
|
|
62
|
+
*/
|
|
63
|
+
export function runStartupInvariantChecks() {
|
|
64
|
+
flushPendingRegistrationChecks();
|
|
65
|
+
checkInlineConstructPoliciesAtMount();
|
|
66
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* G1.33 — a block a caret is being seated in, under an editable marker-hiding rung, paints at
|
|
3
|
+
* least one landable caret position. A surface whose whole content is a hidden marker run takes
|
|
4
|
+
* the keystroke at an element boundary between `display:none` spans, and the engine seats the
|
|
5
|
+
* byte on whichever side it likes. Built-ins satisfy it by painting chrome that stands over no
|
|
6
|
+
* content (`docs/design/live-mode.md` § 4.1); this catches a plugin surface that does not.
|
|
7
|
+
* Reported at block-host granularity: a table cell has no host of its own, so a cell violation
|
|
8
|
+
* names its table's path while the predicate still resolves the cell's own surface.
|
|
9
|
+
*/
|
|
10
|
+
import { type PresentationMode } from '../presentation-mode';
|
|
11
|
+
import type { InvariantViolation } from '../assert';
|
|
12
|
+
export declare function checkLandableCaret(focused: HTMLElement, mode: PresentationMode, blockPath: readonly number[]): InvariantViolation | null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* G1.33 — a block a caret is being seated in, under an editable marker-hiding rung, paints at
|
|
3
|
+
* least one landable caret position. A surface whose whole content is a hidden marker run takes
|
|
4
|
+
* the keystroke at an element boundary between `display:none` spans, and the engine seats the
|
|
5
|
+
* byte on whichever side it likes. Built-ins satisfy it by painting chrome that stands over no
|
|
6
|
+
* content (`docs/design/live-mode.md` § 4.1); this catches a plugin surface that does not.
|
|
7
|
+
* Reported at block-host granularity: a table cell has no host of its own, so a cell violation
|
|
8
|
+
* names its table's path while the predicate still resolves the cell's own surface.
|
|
9
|
+
*/
|
|
10
|
+
import { hidesMarkers } from '../presentation-mode';
|
|
11
|
+
import { paintsNoLandableContent } from '../cursor/widget-offset';
|
|
12
|
+
export function checkLandableCaret(focused, mode, blockPath) {
|
|
13
|
+
// Reading takes no keystrokes, so a construct that paints nothing is correct there.
|
|
14
|
+
if (mode === 'reading' || !hidesMarkers(mode))
|
|
15
|
+
return null;
|
|
16
|
+
const el = editableSurfaceOf(focused);
|
|
17
|
+
if (!el || !paintsNoLandableContent(el))
|
|
18
|
+
return null;
|
|
19
|
+
return {
|
|
20
|
+
code: 'landable-caret',
|
|
21
|
+
message: `the block at [${blockPath}] is every byte a hidden marker run, so "${mode}" paints it nowhere and the caret being seated there has no position of its own — paint the chrome while it stands over no content`,
|
|
22
|
+
detail: { path: [...blockPath], mode }
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/** The walk container behind a focus landing: the seam offers every landing, block chrome and
|
|
26
|
+
* inner spans included, and only a surface that takes a keystroke can trap a caret. By
|
|
27
|
+
* attribute, not `isContentEditable`, which jsdom leaves false on an editable div. */
|
|
28
|
+
function editableSurfaceOf(focused) {
|
|
29
|
+
const el = focused.closest('[contenteditable]');
|
|
30
|
+
return el && el.getAttribute('contenteditable') !== 'false' ? el : null;
|
|
31
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS↔TS parity for the hidden-run predicate: `cursor/widget-offset.ts` mirrors the
|
|
3
|
+
* stylesheet's class scoping structurally, because a getComputedStyle per keystroke is
|
|
4
|
+
* unaffordable — so the two can drift. This probe pays for the comparison once per mode
|
|
5
|
+
* change, per marker family, over three answers: the stylesheet's, the walk's, and the
|
|
6
|
+
* node-space model both are stated over. It declines wherever no stylesheet demonstrably hides
|
|
7
|
+
* anything (jsdom, source mode); the presentation e2e battery is the real assertion there.
|
|
8
|
+
*/
|
|
9
|
+
import type { InvariantViolation } from '../assert';
|
|
10
|
+
export declare function checkMarkerCssParity(editorRoot: HTMLElement): InvariantViolation | null;
|