@latentic/live-markdown 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +2 -2
- package/dist/chunk-V6TY7KAL.js +8 -0
- package/dist/chunk-V6TY7KAL.js.map +1 -0
- package/dist/codemirror/CodeMirrorMarkdownEditor.d.ts +106 -0
- package/dist/codemirror/CodeMirrorMarkdownEditor.js +482 -0
- package/dist/codemirror/CodeMirrorMarkdownEditor.js.map +1 -0
- package/dist/codemirror/byteOffset.d.ts +17 -0
- package/dist/codemirror/byteOffset.js +19 -0
- package/dist/codemirror/byteOffset.js.map +1 -0
- package/dist/codemirror/caretLayer.d.ts +19 -0
- package/dist/codemirror/caretLayer.js +44 -0
- package/dist/codemirror/caretLayer.js.map +1 -0
- package/dist/codemirror/clipboard/copyRich.d.ts +37 -0
- package/dist/codemirror/clipboard/copyRich.js +72 -0
- package/dist/codemirror/clipboard/copyRich.js.map +1 -0
- package/dist/codemirror/clipboard/htmlToMarkdown.d.ts +20 -0
- package/dist/codemirror/clipboard/htmlToMarkdown.js +91 -0
- package/dist/codemirror/clipboard/htmlToMarkdown.js.map +1 -0
- package/dist/codemirror/clipboard/pasteMarkdown.d.ts +18 -0
- package/dist/codemirror/clipboard/pasteMarkdown.js +41 -0
- package/dist/codemirror/clipboard/pasteMarkdown.js.map +1 -0
- package/dist/codemirror/code/codeHighlight.d.ts +13 -0
- package/dist/codemirror/code/codeHighlight.js +15 -0
- package/dist/codemirror/code/codeHighlight.js.map +1 -0
- package/dist/codemirror/code/codeLangAffordance.d.ts +17 -0
- package/dist/codemirror/code/codeLangAffordance.js +80 -0
- package/dist/codemirror/code/codeLangAffordance.js.map +1 -0
- package/dist/codemirror/code/codeLanguageMenu.d.ts +40 -0
- package/dist/codemirror/code/codeLanguageMenu.js +184 -0
- package/dist/codemirror/code/codeLanguageMenu.js.map +1 -0
- package/dist/codemirror/code/codePalette.d.ts +39 -0
- package/dist/codemirror/code/codePalette.js +53 -0
- package/dist/codemirror/code/codePalette.js.map +1 -0
- package/dist/codemirror/code/fenceAutoClose.d.ts +30 -0
- package/dist/codemirror/code/fenceAutoClose.js +171 -0
- package/dist/codemirror/code/fenceAutoClose.js.map +1 -0
- package/dist/codemirror/code/fenceCaretGuard.d.ts +28 -0
- package/dist/codemirror/code/fenceCaretGuard.js +66 -0
- package/dist/codemirror/code/fenceCaretGuard.js.map +1 -0
- package/dist/codemirror/code/fenceDeleteGuards.d.ts +22 -0
- package/dist/codemirror/code/fenceDeleteGuards.js +105 -0
- package/dist/codemirror/code/fenceDeleteGuards.js.map +1 -0
- package/dist/codemirror/code/fenceTabIndent.d.ts +8 -0
- package/dist/codemirror/code/fenceTabIndent.js +50 -0
- package/dist/codemirror/code/fenceTabIndent.js.map +1 -0
- package/dist/codemirror/code/highlightFence.d.ts +25 -0
- package/dist/codemirror/code/highlightFence.js +45 -0
- package/dist/codemirror/code/highlightFence.js.map +1 -0
- package/dist/codemirror/code/index.d.ts +9 -0
- package/dist/codemirror/code/index.js +8 -0
- package/dist/codemirror/code/index.js.map +1 -0
- package/dist/codemirror/core/codeContext.d.ts +32 -0
- package/dist/codemirror/core/codeContext.js +22 -0
- package/dist/codemirror/core/codeContext.js.map +1 -0
- package/dist/codemirror/core/editorTestHarness.d.ts +31 -0
- package/dist/codemirror/core/editorTestHarness.js +69 -0
- package/dist/codemirror/core/editorTestHarness.js.map +1 -0
- package/dist/codemirror/core/editorTheme.d.ts +39 -0
- package/dist/codemirror/core/editorTheme.js +498 -0
- package/dist/codemirror/core/editorTheme.js.map +1 -0
- package/dist/codemirror/core/hostFacets.d.ts +58 -0
- package/dist/codemirror/core/hostFacets.js +27 -0
- package/dist/codemirror/core/hostFacets.js.map +1 -0
- package/dist/codemirror/core/hrWidget.d.ts +22 -0
- package/dist/codemirror/core/hrWidget.js +22 -0
- package/dist/codemirror/core/hrWidget.js.map +1 -0
- package/dist/codemirror/core/htmlEscape.d.ts +6 -0
- package/dist/codemirror/core/htmlEscape.js +12 -0
- package/dist/codemirror/core/htmlEscape.js.map +1 -0
- package/dist/codemirror/core/index.d.ts +13 -0
- package/dist/codemirror/core/index.js +9 -0
- package/dist/codemirror/core/index.js.map +1 -0
- package/dist/codemirror/core/inlineScan.d.ts +49 -0
- package/dist/codemirror/core/inlineScan.js +31 -0
- package/dist/codemirror/core/inlineScan.js.map +1 -0
- package/dist/codemirror/core/lineStructure.d.ts +47 -0
- package/dist/codemirror/core/lineStructure.js +64 -0
- package/dist/codemirror/core/lineStructure.js.map +1 -0
- package/dist/codemirror/core/linkResolution.d.ts +36 -0
- package/dist/codemirror/core/linkResolution.js +58 -0
- package/dist/codemirror/core/linkResolution.js.map +1 -0
- package/dist/codemirror/core/paint.d.ts +118 -0
- package/dist/codemirror/core/paint.js +42 -0
- package/dist/codemirror/core/paint.js.map +1 -0
- package/dist/codemirror/core/parseToEnd.d.ts +24 -0
- package/dist/codemirror/core/parseToEnd.js +38 -0
- package/dist/codemirror/core/parseToEnd.js.map +1 -0
- package/dist/codemirror/core/plugin.d.ts +32 -0
- package/dist/codemirror/core/plugin.js +161 -0
- package/dist/codemirror/core/plugin.js.map +1 -0
- package/dist/codemirror/core/registry.d.ts +38 -0
- package/dist/codemirror/core/registry.js +133 -0
- package/dist/codemirror/core/registry.js.map +1 -0
- package/dist/codemirror/core/testKeys.d.ts +17 -0
- package/dist/codemirror/core/testKeys.js +11 -0
- package/dist/codemirror/core/testKeys.js.map +1 -0
- package/dist/codemirror/core/treeAt.d.ts +31 -0
- package/dist/codemirror/core/treeAt.js +10 -0
- package/dist/codemirror/core/treeAt.js.map +1 -0
- package/dist/codemirror/extensions/footnoteExtension.d.ts +9 -0
- package/dist/codemirror/extensions/footnoteExtension.js +14 -0
- package/dist/codemirror/extensions/footnoteExtension.js.map +1 -0
- package/dist/codemirror/extensions/highlightExtension.d.ts +9 -0
- package/dist/codemirror/extensions/highlightExtension.js +14 -0
- package/dist/codemirror/extensions/highlightExtension.js.map +1 -0
- package/dist/codemirror/extensions/index.d.ts +12 -0
- package/dist/codemirror/extensions/index.js +19 -0
- package/dist/codemirror/extensions/index.js.map +1 -0
- package/dist/codemirror/extensions/loader.d.ts +24 -0
- package/dist/codemirror/extensions/loader.js +33 -0
- package/dist/codemirror/extensions/loader.js.map +1 -0
- package/dist/codemirror/extensions/mathExtension.d.ts +9 -0
- package/dist/codemirror/extensions/mathExtension.js +14 -0
- package/dist/codemirror/extensions/mathExtension.js.map +1 -0
- package/dist/codemirror/extensions/mermaidExtension.d.ts +9 -0
- package/dist/codemirror/extensions/mermaidExtension.js +12 -0
- package/dist/codemirror/extensions/mermaidExtension.js.map +1 -0
- package/dist/codemirror/extensions/tableExtension.d.ts +13 -0
- package/dist/codemirror/extensions/tableExtension.js +39 -0
- package/dist/codemirror/extensions/tableExtension.js.map +1 -0
- package/dist/codemirror/extensions/types.d.ts +39 -0
- package/dist/codemirror/extensions/types.js +1 -0
- package/dist/codemirror/extensions/types.js.map +1 -0
- package/dist/codemirror/extensions/wikilinkExtension.d.ts +9 -0
- package/dist/codemirror/extensions/wikilinkExtension.js +14 -0
- package/dist/codemirror/extensions/wikilinkExtension.js.map +1 -0
- package/dist/codemirror/features/blockCommandSteps.d.ts +20 -0
- package/dist/codemirror/features/blockCommandSteps.js +83 -0
- package/dist/codemirror/features/blockCommandSteps.js.map +1 -0
- package/dist/codemirror/footnote/footnotePlugin.d.ts +10 -0
- package/dist/codemirror/footnote/footnotePlugin.js +78 -0
- package/dist/codemirror/footnote/footnotePlugin.js.map +1 -0
- package/dist/codemirror/footnote/footnoteScanRule.d.ts +9 -0
- package/dist/codemirror/footnote/footnoteScanRule.js +12 -0
- package/dist/codemirror/footnote/footnoteScanRule.js.map +1 -0
- package/dist/codemirror/footnote/index.d.ts +2 -0
- package/dist/codemirror/footnote/index.js +2 -0
- package/dist/codemirror/footnote/index.js.map +1 -0
- package/dist/codemirror/format/blockCommands.d.ts +17 -0
- package/dist/codemirror/format/blockCommands.js +176 -0
- package/dist/codemirror/format/blockCommands.js.map +1 -0
- package/dist/codemirror/format/formatCommands.d.ts +11 -0
- package/dist/codemirror/format/formatCommands.js +132 -0
- package/dist/codemirror/format/formatCommands.js.map +1 -0
- package/dist/codemirror/format/index.d.ts +4 -0
- package/dist/codemirror/format/index.js +3 -0
- package/dist/codemirror/format/index.js.map +1 -0
- package/dist/codemirror/highlight/highlightPlugin.d.ts +10 -0
- package/dist/codemirror/highlight/highlightPlugin.js +66 -0
- package/dist/codemirror/highlight/highlightPlugin.js.map +1 -0
- package/dist/codemirror/highlight/highlightScanRule.d.ts +8 -0
- package/dist/codemirror/highlight/highlightScanRule.js +12 -0
- package/dist/codemirror/highlight/highlightScanRule.js.map +1 -0
- package/dist/codemirror/highlight/index.d.ts +2 -0
- package/dist/codemirror/highlight/index.js +2 -0
- package/dist/codemirror/highlight/index.js.map +1 -0
- package/dist/codemirror/html/htmlWidget.d.ts +23 -0
- package/dist/codemirror/html/htmlWidget.js +67 -0
- package/dist/codemirror/html/htmlWidget.js.map +1 -0
- package/dist/codemirror/html/index.d.ts +4 -0
- package/dist/codemirror/html/index.js +2 -0
- package/dist/codemirror/html/index.js.map +1 -0
- package/dist/codemirror/image/imageActionMenu.d.ts +14 -0
- package/dist/codemirror/image/imageActionMenu.js +112 -0
- package/dist/codemirror/image/imageActionMenu.js.map +1 -0
- package/dist/codemirror/image/imageEditEvent.d.ts +20 -0
- package/dist/codemirror/image/imageEditEvent.js +6 -0
- package/dist/codemirror/image/imageEditEvent.js.map +1 -0
- package/dist/codemirror/image/imageInsertHandlers.d.ts +13 -0
- package/dist/codemirror/image/imageInsertHandlers.js +64 -0
- package/dist/codemirror/image/imageInsertHandlers.js.map +1 -0
- package/dist/codemirror/image/imageWidget.d.ts +49 -0
- package/dist/codemirror/image/imageWidget.js +83 -0
- package/dist/codemirror/image/imageWidget.js.map +1 -0
- package/dist/codemirror/image/index.d.ts +8 -0
- package/dist/codemirror/image/index.js +5 -0
- package/dist/codemirror/image/index.js.map +1 -0
- package/dist/codemirror/interaction/clickModel.d.ts +43 -0
- package/dist/codemirror/interaction/clickModel.js +99 -0
- package/dist/codemirror/interaction/clickModel.js.map +1 -0
- package/dist/codemirror/interaction/cursorModel.d.ts +10 -0
- package/dist/codemirror/interaction/cursorModel.js +58 -0
- package/dist/codemirror/interaction/cursorModel.js.map +1 -0
- package/dist/codemirror/interaction/deleteNormalizer.d.ts +18 -0
- package/dist/codemirror/interaction/deleteNormalizer.js +157 -0
- package/dist/codemirror/interaction/deleteNormalizer.js.map +1 -0
- package/dist/codemirror/interaction/flankingGuard.d.ts +20 -0
- package/dist/codemirror/interaction/flankingGuard.js +48 -0
- package/dist/codemirror/interaction/flankingGuard.js.map +1 -0
- package/dist/codemirror/interaction/index.d.ts +7 -0
- package/dist/codemirror/interaction/index.js +6 -0
- package/dist/codemirror/interaction/index.js.map +1 -0
- package/dist/codemirror/interaction/visiblePosition.d.ts +43 -0
- package/dist/codemirror/interaction/visiblePosition.js +98 -0
- package/dist/codemirror/interaction/visiblePosition.js.map +1 -0
- package/dist/codemirror/list/bulletWidget.d.ts +61 -0
- package/dist/codemirror/list/bulletWidget.js +84 -0
- package/dist/codemirror/list/bulletWidget.js.map +1 -0
- package/dist/codemirror/list/index.d.ts +4 -0
- package/dist/codemirror/list/index.js +3 -0
- package/dist/codemirror/list/index.js.map +1 -0
- package/dist/codemirror/list/listContinuation.d.ts +28 -0
- package/dist/codemirror/list/listContinuation.js +61 -0
- package/dist/codemirror/list/listContinuation.js.map +1 -0
- package/dist/codemirror/list/listIndent.d.ts +8 -0
- package/dist/codemirror/list/listIndent.js +95 -0
- package/dist/codemirror/list/listIndent.js.map +1 -0
- package/dist/codemirror/list/taskCheckboxWidget.d.ts +42 -0
- package/dist/codemirror/list/taskCheckboxWidget.js +47 -0
- package/dist/codemirror/list/taskCheckboxWidget.js.map +1 -0
- package/dist/codemirror/math/index.d.ts +3 -0
- package/dist/codemirror/math/index.js +2 -0
- package/dist/codemirror/math/index.js.map +1 -0
- package/dist/codemirror/math/mathPlugin.d.ts +10 -0
- package/dist/codemirror/math/mathPlugin.js +73 -0
- package/dist/codemirror/math/mathPlugin.js.map +1 -0
- package/dist/codemirror/math/mathScanRule.d.ts +16 -0
- package/dist/codemirror/math/mathScanRule.js +18 -0
- package/dist/codemirror/math/mathScanRule.js.map +1 -0
- package/dist/codemirror/math/mathWidget.d.ts +15 -0
- package/dist/codemirror/math/mathWidget.js +36 -0
- package/dist/codemirror/math/mathWidget.js.map +1 -0
- package/dist/codemirror/mermaid/index.d.ts +4 -0
- package/dist/codemirror/mermaid/index.js +3 -0
- package/dist/codemirror/mermaid/index.js.map +1 -0
- package/dist/codemirror/mermaid/mermaidPlugin.d.ts +25 -0
- package/dist/codemirror/mermaid/mermaidPlugin.js +78 -0
- package/dist/codemirror/mermaid/mermaidPlugin.js.map +1 -0
- package/dist/codemirror/mermaid/mermaidRender.d.ts +42 -0
- package/dist/codemirror/mermaid/mermaidRender.js +136 -0
- package/dist/codemirror/mermaid/mermaidRender.js.map +1 -0
- package/dist/codemirror/mermaid/mermaidWidget.d.ts +42 -0
- package/dist/codemirror/mermaid/mermaidWidget.js +142 -0
- package/dist/codemirror/mermaid/mermaidWidget.js.map +1 -0
- package/dist/codemirror/selectionLayer.d.ts +43 -0
- package/dist/codemirror/selectionLayer.js +135 -0
- package/dist/codemirror/selectionLayer.js.map +1 -0
- package/dist/codemirror/table/cellDividerWidget.d.ts +9 -0
- package/dist/codemirror/table/cellDividerWidget.js +19 -0
- package/dist/codemirror/table/cellDividerWidget.js.map +1 -0
- package/dist/codemirror/table/index.d.ts +5 -0
- package/dist/codemirror/table/index.js +4 -0
- package/dist/codemirror/table/index.js.map +1 -0
- package/dist/codemirror/table/tableArmed.d.ts +27 -0
- package/dist/codemirror/table/tableArmed.js +43 -0
- package/dist/codemirror/table/tableArmed.js.map +1 -0
- package/dist/codemirror/table/tableCell.d.ts +19 -0
- package/dist/codemirror/table/tableCell.js +15 -0
- package/dist/codemirror/table/tableCell.js.map +1 -0
- package/dist/codemirror/table/tableCellNav.d.ts +51 -0
- package/dist/codemirror/table/tableCellNav.js +47 -0
- package/dist/codemirror/table/tableCellNav.js.map +1 -0
- package/dist/codemirror/table/tableContextMenu.d.ts +22 -0
- package/dist/codemirror/table/tableContextMenu.js +139 -0
- package/dist/codemirror/table/tableContextMenu.js.map +1 -0
- package/dist/codemirror/table/tableEditCommands.d.ts +29 -0
- package/dist/codemirror/table/tableEditCommands.js +86 -0
- package/dist/codemirror/table/tableEditCommands.js.map +1 -0
- package/dist/codemirror/table/tableExcerpt.d.ts +29 -0
- package/dist/codemirror/table/tableExcerpt.js +34 -0
- package/dist/codemirror/table/tableExcerpt.js.map +1 -0
- package/dist/codemirror/table/tableField.d.ts +6 -0
- package/dist/codemirror/table/tableField.js +37 -0
- package/dist/codemirror/table/tableField.js.map +1 -0
- package/dist/codemirror/table/tableGeometry.d.ts +33 -0
- package/dist/codemirror/table/tableGeometry.js +28 -0
- package/dist/codemirror/table/tableGeometry.js.map +1 -0
- package/dist/codemirror/table/tableInline.d.ts +37 -0
- package/dist/codemirror/table/tableInline.js +105 -0
- package/dist/codemirror/table/tableInline.js.map +1 -0
- package/dist/codemirror/table/tableModel.d.ts +45 -0
- package/dist/codemirror/table/tableModel.js +98 -0
- package/dist/codemirror/table/tableModel.js.map +1 -0
- package/dist/codemirror/tablev2/bridgeRules.d.ts +48 -0
- package/dist/codemirror/tablev2/bridgeRules.js +42 -0
- package/dist/codemirror/tablev2/bridgeRules.js.map +1 -0
- package/dist/codemirror/tablev2/cellEditingSurface.d.ts +79 -0
- package/dist/codemirror/tablev2/cellEditingSurface.js +70 -0
- package/dist/codemirror/tablev2/cellEditingSurface.js.map +1 -0
- package/dist/codemirror/tablev2/cellText.d.ts +11 -0
- package/dist/codemirror/tablev2/cellText.js +12 -0
- package/dist/codemirror/tablev2/cellText.js.map +1 -0
- package/dist/codemirror/tablev2/inlineCellSurface.d.ts +38 -0
- package/dist/codemirror/tablev2/inlineCellSurface.js +162 -0
- package/dist/codemirror/tablev2/inlineCellSurface.js.map +1 -0
- package/dist/codemirror/tablev2/overlayCellSurface.d.ts +36 -0
- package/dist/codemirror/tablev2/overlayCellSurface.js +150 -0
- package/dist/codemirror/tablev2/overlayCellSurface.js.map +1 -0
- package/dist/codemirror/tablev2/tableEditingSteps.d.ts +12 -0
- package/dist/codemirror/tablev2/tableEditingSteps.js +518 -0
- package/dist/codemirror/tablev2/tableEditingSteps.js.map +1 -0
- package/dist/codemirror/tablev2/tableV2HoverControls.d.ts +23 -0
- package/dist/codemirror/tablev2/tableV2HoverControls.js +89 -0
- package/dist/codemirror/tablev2/tableV2HoverControls.js.map +1 -0
- package/dist/codemirror/tablev2/tableV2Interaction.d.ts +29 -0
- package/dist/codemirror/tablev2/tableV2Interaction.js +224 -0
- package/dist/codemirror/tablev2/tableV2Interaction.js.map +1 -0
- package/dist/codemirror/tablev2/tableV2Selection.d.ts +45 -0
- package/dist/codemirror/tablev2/tableV2Selection.js +81 -0
- package/dist/codemirror/tablev2/tableV2Selection.js.map +1 -0
- package/dist/codemirror/tablev2/tableV2Sync.d.ts +13 -0
- package/dist/codemirror/tablev2/tableV2Sync.js +13 -0
- package/dist/codemirror/tablev2/tableV2Sync.js.map +1 -0
- package/dist/codemirror/tablev2/tableWidgetV2.d.ts +46 -0
- package/dist/codemirror/tablev2/tableWidgetV2.js +139 -0
- package/dist/codemirror/tablev2/tableWidgetV2.js.map +1 -0
- package/dist/codemirror/updateBus.d.ts +29 -0
- package/dist/codemirror/updateBus.js +26 -0
- package/dist/codemirror/updateBus.js.map +1 -0
- package/dist/codemirror/wikilink/index.d.ts +3 -0
- package/dist/codemirror/wikilink/index.js +2 -0
- package/dist/codemirror/wikilink/index.js.map +1 -0
- package/dist/codemirror/wikilink/wikilinkPlugin.d.ts +40 -0
- package/dist/codemirror/wikilink/wikilinkPlugin.js +89 -0
- package/dist/codemirror/wikilink/wikilinkPlugin.js.map +1 -0
- package/dist/codemirror/wikilink/wikilinkScanRule.d.ts +9 -0
- package/dist/codemirror/wikilink/wikilinkScanRule.js +13 -0
- package/dist/codemirror/wikilink/wikilinkScanRule.js.map +1 -0
- package/dist/frontmatter.d.ts +79 -0
- package/dist/frontmatter.js +58 -0
- package/dist/frontmatter.js.map +1 -0
- package/dist/imageInsert.d.ts +66 -0
- package/dist/imageInsert.js +111 -0
- package/dist/imageInsert.js.map +1 -0
- package/dist/imageSrcResolver.d.ts +55 -0
- package/dist/imageSrcResolver.js +49 -0
- package/dist/imageSrcResolver.js.map +1 -0
- package/dist/index.d.ts +35 -880
- package/dist/index.js +128 -5996
- package/dist/index.js.map +1 -1
- package/dist/links/wikilink.d.ts +26 -0
- package/dist/links/wikilink.js +54 -0
- package/dist/links/wikilink.js.map +1 -0
- package/dist/links/workspaceLink.d.ts +34 -0
- package/dist/links/workspaceLink.js +60 -0
- package/dist/links/workspaceLink.js.map +1 -0
- package/dist/types.d.ts +20 -0
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/package.json +7 -3
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wikilink (`[[target]]` / `[[target|label]]`) parsing + target resolution.
|
|
3
|
+
*
|
|
4
|
+
* The canonical rule lives in the `workspace-index` crate
|
|
5
|
+
* (`wikilink_target_and_label` / `resolve_document_target` / `path_stem_matches`
|
|
6
|
+
* / `slug_key`) — that's what builds the backlink graph. This is the
|
|
7
|
+
* **client-side mirror** used to navigate a *clicked* wikilink, so the editor
|
|
8
|
+
* and chat agree with the sidebar's backlinks. Keep the two in sync; if the
|
|
9
|
+
* crate's rule changes, change it here too.
|
|
10
|
+
*
|
|
11
|
+
* Difference from the crate: an unresolved target returns `null` (we only
|
|
12
|
+
* navigate to files that exist), whereas the crate keeps a would-be path for
|
|
13
|
+
* the graph edge.
|
|
14
|
+
*/
|
|
15
|
+
/** Split a wikilink body into its target and display label. */
|
|
16
|
+
declare function parseWikilinkBody(body: string): {
|
|
17
|
+
target: string;
|
|
18
|
+
label: string;
|
|
19
|
+
};
|
|
20
|
+
/** Resolve a wikilink target to an existing workspace file path, or `null`. */
|
|
21
|
+
declare function resolveWikilinkTarget(rawTarget: string, options: {
|
|
22
|
+
fromPath?: string;
|
|
23
|
+
knownPaths: ReadonlySet<string>;
|
|
24
|
+
}): string | null;
|
|
25
|
+
|
|
26
|
+
export { parseWikilinkBody, resolveWikilinkTarget };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import "../chunk-V6TY7KAL.js";
|
|
2
|
+
import { resolveWorkspaceLink } from "./workspaceLink.js";
|
|
3
|
+
function parseWikilinkBody(body) {
|
|
4
|
+
const pipe = body.indexOf("|");
|
|
5
|
+
const target = (pipe === -1 ? body : body.slice(0, pipe)).trim();
|
|
6
|
+
const rawLabel = pipe === -1 ? target : body.slice(pipe + 1).trim();
|
|
7
|
+
return { target, label: rawLabel === "" ? target : rawLabel };
|
|
8
|
+
}
|
|
9
|
+
function resolveWikilinkTarget(rawTarget, options) {
|
|
10
|
+
const target = (rawTarget.split("#", 1)[0] ?? "").trim().replace(/\\/g, "/");
|
|
11
|
+
if (target === "") {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
const withExtension = target.toLowerCase().endsWith(".md") ? target : `${target}.md`;
|
|
15
|
+
if (target.includes("/") || target.startsWith(".")) {
|
|
16
|
+
const relative = resolveWorkspaceLink(withExtension, options);
|
|
17
|
+
if (relative?.kind === "internal") {
|
|
18
|
+
return relative.path;
|
|
19
|
+
}
|
|
20
|
+
const fromRoot = resolveWorkspaceLink(withExtension, { knownPaths: options.knownPaths });
|
|
21
|
+
return fromRoot?.kind === "internal" ? fromRoot.path : null;
|
|
22
|
+
}
|
|
23
|
+
if (options.knownPaths.has(withExtension)) {
|
|
24
|
+
return withExtension;
|
|
25
|
+
}
|
|
26
|
+
for (const path of options.knownPaths) {
|
|
27
|
+
if (pathStemMatches(path, target)) {
|
|
28
|
+
return path;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
function pathStemMatches(path, target) {
|
|
34
|
+
const withoutExtension = path.endsWith(".md") ? path.slice(0, -3) : path;
|
|
35
|
+
const basename = withoutExtension.split("/").pop() ?? withoutExtension;
|
|
36
|
+
const targetLower = target.toLowerCase();
|
|
37
|
+
return withoutExtension.toLowerCase() === targetLower || basename.toLowerCase() === targetLower || slugKey(withoutExtension) === slugKey(target) || slugKey(basename) === slugKey(target);
|
|
38
|
+
}
|
|
39
|
+
function slugKey(value) {
|
|
40
|
+
let raw = "";
|
|
41
|
+
for (const ch of value) {
|
|
42
|
+
if (/[\p{L}\p{N}]/u.test(ch)) {
|
|
43
|
+
raw += ch.toLowerCase();
|
|
44
|
+
} else if (ch === " " || ch === "-" || ch === "_" || ch === "/") {
|
|
45
|
+
raw += "-";
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return raw.split("-").filter(Boolean).join("-");
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
parseWikilinkBody,
|
|
52
|
+
resolveWikilinkTarget
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=wikilink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/links/wikilink.ts"],"sourcesContent":["import { resolveWorkspaceLink } from \"./workspaceLink\";\n\n/**\n * Wikilink (`[[target]]` / `[[target|label]]`) parsing + target resolution.\n *\n * The canonical rule lives in the `workspace-index` crate\n * (`wikilink_target_and_label` / `resolve_document_target` / `path_stem_matches`\n * / `slug_key`) — that's what builds the backlink graph. This is the\n * **client-side mirror** used to navigate a *clicked* wikilink, so the editor\n * and chat agree with the sidebar's backlinks. Keep the two in sync; if the\n * crate's rule changes, change it here too.\n *\n * Difference from the crate: an unresolved target returns `null` (we only\n * navigate to files that exist), whereas the crate keeps a would-be path for\n * the graph edge.\n */\n\n/** Split a wikilink body into its target and display label. */\nexport function parseWikilinkBody(body: string): { target: string; label: string } {\n const pipe = body.indexOf(\"|\");\n const target = (pipe === -1 ? body : body.slice(0, pipe)).trim();\n const rawLabel = pipe === -1 ? target : body.slice(pipe + 1).trim();\n return { target, label: rawLabel === \"\" ? target : rawLabel };\n}\n\n/** Resolve a wikilink target to an existing workspace file path, or `null`. */\nexport function resolveWikilinkTarget(\n rawTarget: string,\n options: { fromPath?: string; knownPaths: ReadonlySet<string> },\n): string | null {\n const target = (rawTarget.split(\"#\", 1)[0] ?? \"\").trim().replace(/\\\\/g, \"/\");\n if (target === \"\") {\n return null;\n }\n const withExtension = target.toLowerCase().endsWith(\".md\") ? target : `${target}.md`;\n\n // Path-like target (`sub/note`, `./note`, `../note`): resolve like a relative\n // link — against the source file's dir first, then the vault root.\n if (target.includes(\"/\") || target.startsWith(\".\")) {\n const relative = resolveWorkspaceLink(withExtension, options);\n if (relative?.kind === \"internal\") {\n return relative.path;\n }\n const fromRoot = resolveWorkspaceLink(withExtension, { knownPaths: options.knownPaths });\n return fromRoot?.kind === \"internal\" ? fromRoot.path : null;\n }\n\n // Bare name: a root-level `<target>.md`, else any file whose stem matches.\n if (options.knownPaths.has(withExtension)) {\n return withExtension;\n }\n for (const path of options.knownPaths) {\n if (pathStemMatches(path, target)) {\n return path;\n }\n }\n return null;\n}\n\nfunction pathStemMatches(path: string, target: string): boolean {\n const withoutExtension = path.endsWith(\".md\") ? path.slice(0, -3) : path;\n const basename = withoutExtension.split(\"/\").pop() ?? withoutExtension;\n const targetLower = target.toLowerCase();\n return (\n withoutExtension.toLowerCase() === targetLower ||\n basename.toLowerCase() === targetLower ||\n slugKey(withoutExtension) === slugKey(target) ||\n slugKey(basename) === slugKey(target)\n );\n}\n\n/** Mirror of the crate's `slug_key`: lowercase alphanumerics, collapse\n * ` -_/` to single dashes, drop other punctuation. */\nfunction slugKey(value: string): string {\n let raw = \"\";\n for (const ch of value) {\n if (/[\\p{L}\\p{N}]/u.test(ch)) {\n raw += ch.toLowerCase();\n } else if (ch === \" \" || ch === \"-\" || ch === \"_\" || ch === \"/\") {\n raw += \"-\";\n }\n }\n return raw.split(\"-\").filter(Boolean).join(\"-\");\n}\n"],"mappings":";AAAA,SAAS,4BAA4B;AAkB9B,SAAS,kBAAkB,MAAiD;AACjF,QAAM,OAAO,KAAK,QAAQ,GAAG;AAC7B,QAAM,UAAU,SAAS,KAAK,OAAO,KAAK,MAAM,GAAG,IAAI,GAAG,KAAK;AAC/D,QAAM,WAAW,SAAS,KAAK,SAAS,KAAK,MAAM,OAAO,CAAC,EAAE,KAAK;AAClE,SAAO,EAAE,QAAQ,OAAO,aAAa,KAAK,SAAS,SAAS;AAC9D;AAGO,SAAS,sBACd,WACA,SACe;AACf,QAAM,UAAU,UAAU,MAAM,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,KAAK,EAAE,QAAQ,OAAO,GAAG;AAC3E,MAAI,WAAW,IAAI;AACjB,WAAO;AAAA,EACT;AACA,QAAM,gBAAgB,OAAO,YAAY,EAAE,SAAS,KAAK,IAAI,SAAS,GAAG,MAAM;AAI/E,MAAI,OAAO,SAAS,GAAG,KAAK,OAAO,WAAW,GAAG,GAAG;AAClD,UAAM,WAAW,qBAAqB,eAAe,OAAO;AAC5D,QAAI,UAAU,SAAS,YAAY;AACjC,aAAO,SAAS;AAAA,IAClB;AACA,UAAM,WAAW,qBAAqB,eAAe,EAAE,YAAY,QAAQ,WAAW,CAAC;AACvF,WAAO,UAAU,SAAS,aAAa,SAAS,OAAO;AAAA,EACzD;AAGA,MAAI,QAAQ,WAAW,IAAI,aAAa,GAAG;AACzC,WAAO;AAAA,EACT;AACA,aAAW,QAAQ,QAAQ,YAAY;AACrC,QAAI,gBAAgB,MAAM,MAAM,GAAG;AACjC,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,gBAAgB,MAAc,QAAyB;AAC9D,QAAM,mBAAmB,KAAK,SAAS,KAAK,IAAI,KAAK,MAAM,GAAG,EAAE,IAAI;AACpE,QAAM,WAAW,iBAAiB,MAAM,GAAG,EAAE,IAAI,KAAK;AACtD,QAAM,cAAc,OAAO,YAAY;AACvC,SACE,iBAAiB,YAAY,MAAM,eACnC,SAAS,YAAY,MAAM,eAC3B,QAAQ,gBAAgB,MAAM,QAAQ,MAAM,KAC5C,QAAQ,QAAQ,MAAM,QAAQ,MAAM;AAExC;AAIA,SAAS,QAAQ,OAAuB;AACtC,MAAI,MAAM;AACV,aAAW,MAAM,OAAO;AACtB,QAAI,gBAAgB,KAAK,EAAE,GAAG;AAC5B,aAAO,GAAG,YAAY;AAAA,IACxB,WAAW,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK;AAC/D,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO,IAAI,MAAM,GAAG,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAChD;","names":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve a markdown link href to a navigation target.
|
|
3
|
+
*
|
|
4
|
+
* A link in a document (or an agent's chat reply) is either:
|
|
5
|
+
* - **external** — anything with a URI scheme (`https:`, `mailto:`, …) or a
|
|
6
|
+
* protocol-relative `//host`; opened in the browser, and
|
|
7
|
+
* - **internal** — a workspace-relative path that resolves to a file the
|
|
8
|
+
* workspace actually contains; opened in a tab.
|
|
9
|
+
*
|
|
10
|
+
* This is pure path resolution (normalize `.`/`..`, reject escaping the vault
|
|
11
|
+
* root, membership-check against the known files) — it is **not** the index's
|
|
12
|
+
* link parser. The index already resolves links into `graphEdges`; this just
|
|
13
|
+
* decides where a *clicked* href points so the UI can navigate. An href that
|
|
14
|
+
* looks internal but matches no known file returns `null` (a broken link, not
|
|
15
|
+
* something to navigate to).
|
|
16
|
+
*/
|
|
17
|
+
type ResolvedWorkspaceLink = {
|
|
18
|
+
kind: "internal";
|
|
19
|
+
path: string;
|
|
20
|
+
} | {
|
|
21
|
+
kind: "external";
|
|
22
|
+
href: string;
|
|
23
|
+
};
|
|
24
|
+
interface ResolveWorkspaceLinkOptions {
|
|
25
|
+
/** Workspace-relative path of the document the link lives in. Relative hrefs
|
|
26
|
+
* resolve against this file's directory. Omitted ⇒ resolve from the vault
|
|
27
|
+
* root (used for agent chat replies, which emit root-relative paths). */
|
|
28
|
+
fromPath?: string;
|
|
29
|
+
/** Every workspace-relative file path, for membership checks. */
|
|
30
|
+
knownPaths: ReadonlySet<string>;
|
|
31
|
+
}
|
|
32
|
+
declare function resolveWorkspaceLink(href: string, options: ResolveWorkspaceLinkOptions): ResolvedWorkspaceLink | null;
|
|
33
|
+
|
|
34
|
+
export { type ResolveWorkspaceLinkOptions, type ResolvedWorkspaceLink, resolveWorkspaceLink };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import "../chunk-V6TY7KAL.js";
|
|
2
|
+
const URI_SCHEME = /^[a-z][a-z0-9+.-]*:/i;
|
|
3
|
+
const HAS_EXTENSION = /\.[a-z0-9]+$/i;
|
|
4
|
+
function resolveWorkspaceLink(href, options) {
|
|
5
|
+
const raw = href.trim();
|
|
6
|
+
if (raw === "" || raw.startsWith("#")) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
if (URI_SCHEME.test(raw) || raw.startsWith("//")) {
|
|
10
|
+
return { kind: "external", href: raw };
|
|
11
|
+
}
|
|
12
|
+
const pathPart = decodeSegment(raw.split(/[?#]/, 1)[0] ?? "");
|
|
13
|
+
if (pathPart === "") {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
const base = pathPart.startsWith("/") || !options.fromPath ? "" : dirOf(options.fromPath);
|
|
17
|
+
const normalized = normalizeWorkspacePath(base, pathPart);
|
|
18
|
+
if (normalized === null) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
if (options.knownPaths.has(normalized)) {
|
|
22
|
+
return { kind: "internal", path: normalized };
|
|
23
|
+
}
|
|
24
|
+
if (!HAS_EXTENSION.test(normalized) && options.knownPaths.has(`${normalized}.md`)) {
|
|
25
|
+
return { kind: "internal", path: `${normalized}.md` };
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
function dirOf(path) {
|
|
30
|
+
const slash = path.lastIndexOf("/");
|
|
31
|
+
return slash === -1 ? "" : path.slice(0, slash);
|
|
32
|
+
}
|
|
33
|
+
function decodeSegment(value) {
|
|
34
|
+
try {
|
|
35
|
+
return decodeURIComponent(value);
|
|
36
|
+
} catch {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function normalizeWorkspacePath(base, rel) {
|
|
41
|
+
const parts = base ? base.split("/") : [];
|
|
42
|
+
for (const segment of rel.split("/")) {
|
|
43
|
+
if (segment === "" || segment === ".") {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (segment === "..") {
|
|
47
|
+
if (parts.length === 0) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
parts.pop();
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
parts.push(segment);
|
|
54
|
+
}
|
|
55
|
+
return parts.join("/");
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
resolveWorkspaceLink
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=workspaceLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/links/workspaceLink.ts"],"sourcesContent":["/**\n * Resolve a markdown link href to a navigation target.\n *\n * A link in a document (or an agent's chat reply) is either:\n * - **external** — anything with a URI scheme (`https:`, `mailto:`, …) or a\n * protocol-relative `//host`; opened in the browser, and\n * - **internal** — a workspace-relative path that resolves to a file the\n * workspace actually contains; opened in a tab.\n *\n * This is pure path resolution (normalize `.`/`..`, reject escaping the vault\n * root, membership-check against the known files) — it is **not** the index's\n * link parser. The index already resolves links into `graphEdges`; this just\n * decides where a *clicked* href points so the UI can navigate. An href that\n * looks internal but matches no known file returns `null` (a broken link, not\n * something to navigate to).\n */\n\nexport type ResolvedWorkspaceLink =\n | { kind: \"internal\"; path: string }\n | { kind: \"external\"; href: string };\n\n// A URI scheme (`https:`, `mailto:`, `tel:`, `data:`, …). A workspace-relative\n// path never has one.\nconst URI_SCHEME = /^[a-z][a-z0-9+.-]*:/i;\nconst HAS_EXTENSION = /\\.[a-z0-9]+$/i;\n\nexport interface ResolveWorkspaceLinkOptions {\n /** Workspace-relative path of the document the link lives in. Relative hrefs\n * resolve against this file's directory. Omitted ⇒ resolve from the vault\n * root (used for agent chat replies, which emit root-relative paths). */\n fromPath?: string;\n /** Every workspace-relative file path, for membership checks. */\n knownPaths: ReadonlySet<string>;\n}\n\nexport function resolveWorkspaceLink(\n href: string,\n options: ResolveWorkspaceLinkOptions,\n): ResolvedWorkspaceLink | null {\n const raw = href.trim();\n if (raw === \"\" || raw.startsWith(\"#\")) {\n // Empty, or an in-page anchor — not a cross-file link.\n return null;\n }\n if (URI_SCHEME.test(raw) || raw.startsWith(\"//\")) {\n return { kind: \"external\", href: raw };\n }\n\n // Workspace path. Drop any ?query / #fragment, then percent-decode.\n const pathPart = decodeSegment(raw.split(/[?#]/, 1)[0] ?? \"\");\n if (pathPart === \"\") {\n return null;\n }\n // A leading \"/\" means \"from the vault root\", not the filesystem root.\n const base = pathPart.startsWith(\"/\") || !options.fromPath ? \"\" : dirOf(options.fromPath);\n const normalized = normalizeWorkspacePath(base, pathPart);\n if (normalized === null) {\n // `..` escaped the vault root — never navigate outside it.\n return null;\n }\n if (options.knownPaths.has(normalized)) {\n return { kind: \"internal\", path: normalized };\n }\n // Tolerate an extensionless link to a markdown note (`notes/plan` → `.md`).\n if (!HAS_EXTENSION.test(normalized) && options.knownPaths.has(`${normalized}.md`)) {\n return { kind: \"internal\", path: `${normalized}.md` };\n }\n return null;\n}\n\nfunction dirOf(path: string): string {\n const slash = path.lastIndexOf(\"/\");\n return slash === -1 ? \"\" : path.slice(0, slash);\n}\n\nfunction decodeSegment(value: string): string {\n try {\n return decodeURIComponent(value);\n } catch {\n return value;\n }\n}\n\n/**\n * Join `base` + `rel`, resolving `.`/`..` segments. Returns `null` if `..`\n * walks above the vault root.\n */\nfunction normalizeWorkspacePath(base: string, rel: string): string | null {\n const parts = base ? base.split(\"/\") : [];\n for (const segment of rel.split(\"/\")) {\n if (segment === \"\" || segment === \".\") {\n continue;\n }\n if (segment === \"..\") {\n if (parts.length === 0) {\n return null;\n }\n parts.pop();\n continue;\n }\n parts.push(segment);\n }\n return parts.join(\"/\");\n}\n"],"mappings":";AAuBA,MAAM,aAAa;AACnB,MAAM,gBAAgB;AAWf,SAAS,qBACd,MACA,SAC8B;AAC9B,QAAM,MAAM,KAAK,KAAK;AACtB,MAAI,QAAQ,MAAM,IAAI,WAAW,GAAG,GAAG;AAErC,WAAO;AAAA,EACT;AACA,MAAI,WAAW,KAAK,GAAG,KAAK,IAAI,WAAW,IAAI,GAAG;AAChD,WAAO,EAAE,MAAM,YAAY,MAAM,IAAI;AAAA,EACvC;AAGA,QAAM,WAAW,cAAc,IAAI,MAAM,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;AAC5D,MAAI,aAAa,IAAI;AACnB,WAAO;AAAA,EACT;AAEA,QAAM,OAAO,SAAS,WAAW,GAAG,KAAK,CAAC,QAAQ,WAAW,KAAK,MAAM,QAAQ,QAAQ;AACxF,QAAM,aAAa,uBAAuB,MAAM,QAAQ;AACxD,MAAI,eAAe,MAAM;AAEvB,WAAO;AAAA,EACT;AACA,MAAI,QAAQ,WAAW,IAAI,UAAU,GAAG;AACtC,WAAO,EAAE,MAAM,YAAY,MAAM,WAAW;AAAA,EAC9C;AAEA,MAAI,CAAC,cAAc,KAAK,UAAU,KAAK,QAAQ,WAAW,IAAI,GAAG,UAAU,KAAK,GAAG;AACjF,WAAO,EAAE,MAAM,YAAY,MAAM,GAAG,UAAU,MAAM;AAAA,EACtD;AACA,SAAO;AACT;AAEA,SAAS,MAAM,MAAsB;AACnC,QAAM,QAAQ,KAAK,YAAY,GAAG;AAClC,SAAO,UAAU,KAAK,KAAK,KAAK,MAAM,GAAG,KAAK;AAChD;AAEA,SAAS,cAAc,OAAuB;AAC5C,MAAI;AACF,WAAO,mBAAmB,KAAK;AAAA,EACjC,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAMA,SAAS,uBAAuB,MAAc,KAA4B;AACxE,QAAM,QAAQ,OAAO,KAAK,MAAM,GAAG,IAAI,CAAC;AACxC,aAAW,WAAW,IAAI,MAAM,GAAG,GAAG;AACpC,QAAI,YAAY,MAAM,YAAY,KAAK;AACrC;AAAA,IACF;AACA,QAAI,YAAY,MAAM;AACpB,UAAI,MAAM,WAAW,GAAG;AACtB,eAAO;AAAA,MACT;AACA,YAAM,IAAI;AACV;AAAA,IACF;AACA,UAAM,KAAK,OAAO;AAAA,EACpB;AACA,SAAO,MAAM,KAAK,GAAG;AACvB;","names":[]}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core value types for the editor's public surface.
|
|
3
|
+
*
|
|
4
|
+
* `SourceRange` is a half-open byte range into the document; `DocumentTextChange`
|
|
5
|
+
* describes one edit. They are structurally identical to the host app's own
|
|
6
|
+
* range/change types, so a host can pass its `onChange` straight through without
|
|
7
|
+
* adapting — structural typing makes them interchangeable.
|
|
8
|
+
*/
|
|
9
|
+
/** A half-open range into the document, in UTF-8 byte offsets. */
|
|
10
|
+
interface SourceRange {
|
|
11
|
+
start: number;
|
|
12
|
+
end: number;
|
|
13
|
+
}
|
|
14
|
+
/** One text edit: the replaced byte range and the text inserted in its place. */
|
|
15
|
+
interface DocumentTextChange {
|
|
16
|
+
range: SourceRange;
|
|
17
|
+
text: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type { DocumentTextChange, SourceRange };
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@latentic/live-markdown",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "WYSIWYG markdown editor for React, built on CodeMirror 6. Headings, tables, LaTeX math and Mermaid diagrams render inline as you type \u2014 no preview pane and no AST: value in and onChange out is the same markdown string, frontmatter included.",
|
|
@@ -54,7 +54,11 @@
|
|
|
54
54
|
"types": "./dist/index.d.ts",
|
|
55
55
|
"import": "./dist/index.js"
|
|
56
56
|
},
|
|
57
|
-
"./styles.css": "./dist/styles.css"
|
|
57
|
+
"./styles.css": "./dist/styles.css",
|
|
58
|
+
"./*": {
|
|
59
|
+
"types": "./dist/*.d.ts",
|
|
60
|
+
"import": "./dist/*.js"
|
|
61
|
+
}
|
|
58
62
|
},
|
|
59
63
|
"files": [
|
|
60
64
|
"dist",
|
|
@@ -69,7 +73,7 @@
|
|
|
69
73
|
"*.css"
|
|
70
74
|
],
|
|
71
75
|
"scripts": {
|
|
72
|
-
"build": "tsup && cp src/styles.css dist/styles.css",
|
|
76
|
+
"build": "tsup && node scripts/specifier-extensions.mjs && cp src/styles.css dist/styles.css",
|
|
73
77
|
"typecheck": "tsc --noEmit",
|
|
74
78
|
"test": "vitest run",
|
|
75
79
|
"test:browser": "vitest run --config vitest.browser.config.ts",
|