@lapismd/mira 0.0.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/CHANGELOG.md +7 -0
- package/LICENSE.md +4 -0
- package/README.md +52 -0
- package/dist/codemirror.d.ts +5 -0
- package/dist/codemirror.d.ts.map +1 -0
- package/dist/codemirror.js +4 -0
- package/dist/core/code-mirror.d.ts +29 -0
- package/dist/core/code-mirror.d.ts.map +1 -0
- package/dist/core/code-mirror.js +74 -0
- package/dist/core/code-mirror.test.d.ts +2 -0
- package/dist/core/code-mirror.test.d.ts.map +1 -0
- package/dist/core/code-mirror.test.js +68 -0
- package/dist/core/images.d.ts +30 -0
- package/dist/core/images.d.ts.map +1 -0
- package/dist/core/images.js +226 -0
- package/dist/core/images.test.d.ts +2 -0
- package/dist/core/images.test.d.ts.map +1 -0
- package/dist/core/images.test.js +109 -0
- package/dist/core/index.d.ts +69 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +138 -0
- package/dist/core/index.test.d.ts +2 -0
- package/dist/core/index.test.d.ts.map +1 -0
- package/dist/core/index.test.js +11 -0
- package/dist/core/markdown-actions.d.ts +11 -0
- package/dist/core/markdown-actions.d.ts.map +1 -0
- package/dist/core/markdown-actions.js +603 -0
- package/dist/core/markdown-actions.test.d.ts +2 -0
- package/dist/core/markdown-actions.test.d.ts.map +1 -0
- package/dist/core/markdown-actions.test.js +182 -0
- package/dist/extensions/doodle-dividers.d.ts +44 -0
- package/dist/extensions/doodle-dividers.d.ts.map +1 -0
- package/dist/extensions/doodle-dividers.js +909 -0
- package/dist/extensions/doodle-dividers.test.d.ts +2 -0
- package/dist/extensions/doodle-dividers.test.d.ts.map +1 -0
- package/dist/extensions/doodle-dividers.test.js +296 -0
- package/dist/extensions/index.d.ts +342 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/index.js +279 -0
- package/dist/extensions/index.test.d.ts +2 -0
- package/dist/extensions/index.test.d.ts.map +1 -0
- package/dist/extensions/index.test.js +283 -0
- package/dist/extensions/selection-toolbar.d.ts +6 -0
- package/dist/extensions/selection-toolbar.d.ts.map +1 -0
- package/dist/extensions/selection-toolbar.js +14 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.test.d.ts +2 -0
- package/dist/index.test.d.ts.map +1 -0
- package/dist/index.test.js +64 -0
- package/dist/internal/appearance-context.d.ts +12 -0
- package/dist/internal/appearance-context.d.ts.map +1 -0
- package/dist/internal/appearance-context.js +31 -0
- package/dist/internal/appearance-context.test.d.ts +2 -0
- package/dist/internal/appearance-context.test.d.ts.map +1 -0
- package/dist/internal/appearance-context.test.js +31 -0
- package/dist/internal/codemirror/base/index.d.ts +24 -0
- package/dist/internal/codemirror/base/index.d.ts.map +1 -0
- package/dist/internal/codemirror/base/index.js +489 -0
- package/dist/internal/codemirror/base/index.test.d.ts +2 -0
- package/dist/internal/codemirror/base/index.test.d.ts.map +1 -0
- package/dist/internal/codemirror/base/index.test.js +303 -0
- package/dist/internal/codemirror/base/search-panel.svelte +590 -0
- package/dist/internal/codemirror/base/search-panel.svelte.d.ts +8 -0
- package/dist/internal/codemirror/base/search-panel.svelte.d.ts.map +1 -0
- package/dist/internal/codemirror/base/search.d.ts +46 -0
- package/dist/internal/codemirror/base/search.d.ts.map +1 -0
- package/dist/internal/codemirror/base/search.js +58 -0
- package/dist/internal/codemirror/base/search.test.d.ts +2 -0
- package/dist/internal/codemirror/base/search.test.d.ts.map +1 -0
- package/dist/internal/codemirror/base/search.test.js +155 -0
- package/dist/internal/codemirror/base/selection-toolbar.d.ts +21 -0
- package/dist/internal/codemirror/base/selection-toolbar.d.ts.map +1 -0
- package/dist/internal/codemirror/base/selection-toolbar.js +306 -0
- package/dist/internal/codemirror/base/selection-toolbar.test.d.ts +2 -0
- package/dist/internal/codemirror/base/selection-toolbar.test.d.ts.map +1 -0
- package/dist/internal/codemirror/base/selection-toolbar.test.js +149 -0
- package/dist/internal/codemirror/base/slash-commands.d.ts +61 -0
- package/dist/internal/codemirror/base/slash-commands.d.ts.map +1 -0
- package/dist/internal/codemirror/base/slash-commands.js +463 -0
- package/dist/internal/codemirror/markdown/authoring.d.ts +9 -0
- package/dist/internal/codemirror/markdown/authoring.d.ts.map +1 -0
- package/dist/internal/codemirror/markdown/authoring.js +14 -0
- package/dist/internal/codemirror/markdown/authoring.test.d.ts +2 -0
- package/dist/internal/codemirror/markdown/authoring.test.d.ts.map +1 -0
- package/dist/internal/codemirror/markdown/authoring.test.js +222 -0
- package/dist/internal/codemirror/markdown/completion.d.ts +12 -0
- package/dist/internal/codemirror/markdown/completion.d.ts.map +1 -0
- package/dist/internal/codemirror/markdown/completion.js +302 -0
- package/dist/internal/codemirror/markdown/directives.d.ts +3 -0
- package/dist/internal/codemirror/markdown/directives.d.ts.map +1 -0
- package/dist/internal/codemirror/markdown/directives.js +154 -0
- package/dist/internal/codemirror/markdown/grid-table.d.ts +3 -0
- package/dist/internal/codemirror/markdown/grid-table.d.ts.map +1 -0
- package/dist/internal/codemirror/markdown/grid-table.js +129 -0
- package/dist/internal/codemirror/markdown/index.d.ts +16 -0
- package/dist/internal/codemirror/markdown/index.d.ts.map +1 -0
- package/dist/internal/codemirror/markdown/index.js +125 -0
- package/dist/internal/codemirror/markdown/index.test.d.ts +2 -0
- package/dist/internal/codemirror/markdown/index.test.d.ts.map +1 -0
- package/dist/internal/codemirror/markdown/index.test.js +158 -0
- package/dist/internal/codemirror/markdown/input-handlers.d.ts +4 -0
- package/dist/internal/codemirror/markdown/input-handlers.d.ts.map +1 -0
- package/dist/internal/codemirror/markdown/input-handlers.js +56 -0
- package/dist/internal/codemirror/markdown/lapis-inline.d.ts +11 -0
- package/dist/internal/codemirror/markdown/lapis-inline.d.ts.map +1 -0
- package/dist/internal/codemirror/markdown/lapis-inline.js +189 -0
- package/dist/internal/codemirror/markdown/latex.d.ts +5 -0
- package/dist/internal/codemirror/markdown/latex.d.ts.map +1 -0
- package/dist/internal/codemirror/markdown/latex.js +97 -0
- package/dist/internal/codemirror/markdown/list-after-lazy-quote.d.ts +10 -0
- package/dist/internal/codemirror/markdown/list-after-lazy-quote.d.ts.map +1 -0
- package/dist/internal/codemirror/markdown/list-after-lazy-quote.js +28 -0
- package/dist/internal/codemirror/markdown/paste.d.ts +5 -0
- package/dist/internal/codemirror/markdown/paste.d.ts.map +1 -0
- package/dist/internal/codemirror/markdown/paste.js +84 -0
- package/dist/internal/codemirror/markdown/showcase-fixture.test.d.ts +2 -0
- package/dist/internal/codemirror/markdown/showcase-fixture.test.d.ts.map +1 -0
- package/dist/internal/codemirror/markdown/showcase-fixture.test.js +50 -0
- package/dist/internal/codemirror/markdown/types.d.ts +6 -0
- package/dist/internal/codemirror/rich/block-controls.d.ts +4 -0
- package/dist/internal/codemirror/rich/block-controls.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/block-controls.js +1419 -0
- package/dist/internal/codemirror/rich/block-controls.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/block-controls.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/block-controls.test.js +401 -0
- package/dist/internal/codemirror/rich/block-ranges.d.ts +22 -0
- package/dist/internal/codemirror/rich/block-ranges.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/block-ranges.js +736 -0
- package/dist/internal/codemirror/rich/block-ranges.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/block-ranges.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/block-ranges.test.js +310 -0
- package/dist/internal/codemirror/rich/block-toolbar.d.ts +25 -0
- package/dist/internal/codemirror/rich/block-toolbar.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/block-toolbar.js +506 -0
- package/dist/internal/codemirror/rich/block-toolbar.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/block-toolbar.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/block-toolbar.test.js +178 -0
- package/dist/internal/codemirror/rich/decorations/fold-indicators.d.ts +7 -0
- package/dist/internal/codemirror/rich/decorations/fold-indicators.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/decorations/fold-indicators.js +122 -0
- package/dist/internal/codemirror/rich/decorations/fold-indicators.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/decorations/fold-indicators.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/decorations/fold-indicators.test.js +8 -0
- package/dist/internal/codemirror/rich/decorations/heading-gutter.d.ts +3 -0
- package/dist/internal/codemirror/rich/decorations/heading-gutter.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/decorations/heading-gutter.js +43 -0
- package/dist/internal/codemirror/rich/index.d.ts +17 -0
- package/dist/internal/codemirror/rich/index.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/index.js +727 -0
- package/dist/internal/codemirror/rich/index.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/index.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/index.test.js +544 -0
- package/dist/internal/codemirror/rich/theme.d.ts +2 -0
- package/dist/internal/codemirror/rich/theme.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/theme.js +268 -0
- package/dist/internal/codemirror/rich/types.d.ts +22 -0
- package/dist/internal/codemirror/rich/types.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/types.js +1 -0
- package/dist/internal/codemirror/rich/utils/activation.d.ts +3 -0
- package/dist/internal/codemirror/rich/utils/activation.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/activation.js +27 -0
- package/dist/internal/codemirror/rich/utils/code-block-lines.d.ts +8 -0
- package/dist/internal/codemirror/rich/utils/code-block-lines.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/code-block-lines.js +143 -0
- package/dist/internal/codemirror/rich/utils/code-block-lines.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/utils/code-block-lines.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/code-block-lines.test.js +82 -0
- package/dist/internal/codemirror/rich/utils/fenced-code.d.ts +4 -0
- package/dist/internal/codemirror/rich/utils/fenced-code.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/fenced-code.js +25 -0
- package/dist/internal/codemirror/rich/utils/fenced-code.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/utils/fenced-code.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/fenced-code.test.js +12 -0
- package/dist/internal/codemirror/rich/utils/headings.d.ts +5 -0
- package/dist/internal/codemirror/rich/utils/headings.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/headings.js +20 -0
- package/dist/internal/codemirror/rich/utils/headings.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/utils/headings.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/headings.test.js +27 -0
- package/dist/internal/codemirror/rich/utils/height-estimates.d.ts +2 -0
- package/dist/internal/codemirror/rich/utils/height-estimates.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/height-estimates.js +82 -0
- package/dist/internal/codemirror/rich/utils/height-estimates.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/utils/height-estimates.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/height-estimates.test.js +10 -0
- package/dist/internal/codemirror/rich/utils/images.d.ts +9 -0
- package/dist/internal/codemirror/rich/utils/images.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/images.js +103 -0
- package/dist/internal/codemirror/rich/utils/images.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/utils/images.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/images.test.js +37 -0
- package/dist/internal/codemirror/rich/utils/indent.d.ts +38 -0
- package/dist/internal/codemirror/rich/utils/indent.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/indent.js +435 -0
- package/dist/internal/codemirror/rich/utils/indent.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/utils/indent.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/indent.test.js +169 -0
- package/dist/internal/codemirror/rich/utils/inline-code.d.ts +7 -0
- package/dist/internal/codemirror/rich/utils/inline-code.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/inline-code.js +43 -0
- package/dist/internal/codemirror/rich/utils/inline-math.d.ts +6 -0
- package/dist/internal/codemirror/rich/utils/inline-math.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/inline-math.js +45 -0
- package/dist/internal/codemirror/rich/utils/inline-math.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/utils/inline-math.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/inline-math.test.js +15 -0
- package/dist/internal/codemirror/rich/utils/links.d.ts +6 -0
- package/dist/internal/codemirror/rich/utils/links.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/links.js +36 -0
- package/dist/internal/codemirror/rich/utils/links.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/utils/links.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/links.test.js +28 -0
- package/dist/internal/codemirror/rich/utils/list-callouts.d.ts +15 -0
- package/dist/internal/codemirror/rich/utils/list-callouts.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/list-callouts.js +41 -0
- package/dist/internal/codemirror/rich/utils/list-callouts.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/utils/list-callouts.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/list-callouts.test.js +47 -0
- package/dist/internal/codemirror/rich/utils/measured-indent.d.ts +18 -0
- package/dist/internal/codemirror/rich/utils/measured-indent.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/measured-indent.js +419 -0
- package/dist/internal/codemirror/rich/utils/measured-indent.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/utils/measured-indent.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/measured-indent.test.js +102 -0
- package/dist/internal/codemirror/rich/utils/ranges.d.ts +13 -0
- package/dist/internal/codemirror/rich/utils/ranges.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/ranges.js +42 -0
- package/dist/internal/codemirror/rich/utils/ranges.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/utils/ranges.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/ranges.test.js +22 -0
- package/dist/internal/codemirror/rich/utils/tasks.d.ts +11 -0
- package/dist/internal/codemirror/rich/utils/tasks.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/tasks.js +23 -0
- package/dist/internal/codemirror/rich/utils/tasks.test.d.ts +2 -0
- package/dist/internal/codemirror/rich/utils/tasks.test.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/utils/tasks.test.js +57 -0
- package/dist/internal/codemirror/rich/widgets/list-callout.d.ts +19 -0
- package/dist/internal/codemirror/rich/widgets/list-callout.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/widgets/list-callout.js +58 -0
- package/dist/internal/codemirror/rich/widgets/preview-widgets.d.ts +50 -0
- package/dist/internal/codemirror/rich/widgets/preview-widgets.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/widgets/preview-widgets.js +311 -0
- package/dist/internal/codemirror/rich/widgets/source-toggle.d.ts +4 -0
- package/dist/internal/codemirror/rich/widgets/source-toggle.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/widgets/source-toggle.js +47 -0
- package/dist/internal/codemirror/rich/widgets/task-checkbox.d.ts +14 -0
- package/dist/internal/codemirror/rich/widgets/task-checkbox.d.ts.map +1 -0
- package/dist/internal/codemirror/rich/widgets/task-checkbox.js +54 -0
- package/dist/internal/doodle-dividers.d.ts +62 -0
- package/dist/internal/doodle-dividers.d.ts.map +1 -0
- package/dist/internal/doodle-dividers.js +103 -0
- package/dist/internal/task-states.d.ts +73 -0
- package/dist/internal/task-states.d.ts.map +1 -0
- package/dist/internal/task-states.js +27 -0
- package/dist/internal/task-states.test.d.ts +2 -0
- package/dist/internal/task-states.test.d.ts.map +1 -0
- package/dist/internal/task-states.test.js +36 -0
- package/dist/mira-code-editor.css +222 -0
- package/dist/mira-code-editor.d.ts +40 -0
- package/dist/mira-code-editor.d.ts.map +1 -0
- package/dist/mira-code-editor.js +1 -0
- package/dist/mira-code-editor.svelte +181 -0
- package/dist/mira-code-editor.svelte.d.ts +17 -0
- package/dist/mira-code-editor.svelte.d.ts.map +1 -0
- package/dist/mira-code-editor.test.d.ts +2 -0
- package/dist/mira-code-editor.test.d.ts.map +1 -0
- package/dist/mira-code-editor.test.js +93 -0
- package/dist/mira.svelte +581 -0
- package/dist/mira.svelte.d.ts +23 -0
- package/dist/mira.svelte.d.ts.map +1 -0
- package/dist/mode-position.d.ts +18 -0
- package/dist/mode-position.d.ts.map +1 -0
- package/dist/mode-position.js +99 -0
- package/dist/mode-position.test.d.ts +2 -0
- package/dist/mode-position.test.d.ts.map +1 -0
- package/dist/mode-position.test.js +60 -0
- package/dist/preview/adobe-gridtables.d.ts +11 -0
- package/dist/preview/code-language.d.ts +2 -0
- package/dist/preview/code-language.d.ts.map +1 -0
- package/dist/preview/code-language.js +58 -0
- package/dist/preview/code-language.test.d.ts +2 -0
- package/dist/preview/code-language.test.d.ts.map +1 -0
- package/dist/preview/code-language.test.js +12 -0
- package/dist/preview/components/callout.svelte +123 -0
- package/dist/preview/components/callout.svelte.d.ts +17 -0
- package/dist/preview/components/callout.svelte.d.ts.map +1 -0
- package/dist/preview/components/checkbox.svelte +151 -0
- package/dist/preview/components/checkbox.svelte.d.ts +12 -0
- package/dist/preview/components/checkbox.svelte.d.ts.map +1 -0
- package/dist/preview/components/code.svelte +146 -0
- package/dist/preview/components/code.svelte.d.ts +12 -0
- package/dist/preview/components/code.svelte.d.ts.map +1 -0
- package/dist/preview/components/embed.svelte +236 -0
- package/dist/preview/components/embed.svelte.d.ts +14 -0
- package/dist/preview/components/embed.svelte.d.ts.map +1 -0
- package/dist/preview/components/embedded-markdown-preview.svelte +53 -0
- package/dist/preview/components/embedded-markdown-preview.svelte.d.ts +12 -0
- package/dist/preview/components/embedded-markdown-preview.svelte.d.ts.map +1 -0
- package/dist/preview/components/frontmatter-property-name-input.svelte +207 -0
- package/dist/preview/components/frontmatter-property-name-input.svelte.d.ts +14 -0
- package/dist/preview/components/frontmatter-property-name-input.svelte.d.ts.map +1 -0
- package/dist/preview/components/frontmatter-property-text-input.svelte +228 -0
- package/dist/preview/components/frontmatter-property-text-input.svelte.d.ts +13 -0
- package/dist/preview/components/frontmatter-property-text-input.svelte.d.ts.map +1 -0
- package/dist/preview/components/frontmatter-property-value-input.svelte +232 -0
- package/dist/preview/components/frontmatter-property-value-input.svelte.d.ts +13 -0
- package/dist/preview/components/frontmatter-property-value-input.svelte.d.ts.map +1 -0
- package/dist/preview/components/frontmatter-utils.d.ts +2 -0
- package/dist/preview/components/frontmatter-utils.d.ts.map +1 -0
- package/dist/preview/components/frontmatter-utils.js +1 -0
- package/dist/preview/components/frontmatter.svelte +857 -0
- package/dist/preview/components/frontmatter.svelte.d.ts +18 -0
- package/dist/preview/components/frontmatter.svelte.d.ts.map +1 -0
- package/dist/preview/components/icon.svelte +225 -0
- package/dist/preview/components/icon.svelte.d.ts +9 -0
- package/dist/preview/components/icon.svelte.d.ts.map +1 -0
- package/dist/preview/components/icon.test.d.ts +2 -0
- package/dist/preview/components/icon.test.d.ts.map +1 -0
- package/dist/preview/components/icon.test.js +20 -0
- package/dist/preview/components/image.svelte +266 -0
- package/dist/preview/components/image.svelte.d.ts +10 -0
- package/dist/preview/components/image.svelte.d.ts.map +1 -0
- package/dist/preview/components/link.svelte +382 -0
- package/dist/preview/components/link.svelte.d.ts +16 -0
- package/dist/preview/components/link.svelte.d.ts.map +1 -0
- package/dist/preview/components/list-callout-control.svelte +138 -0
- package/dist/preview/components/list-callout-control.svelte.d.ts +10 -0
- package/dist/preview/components/list-callout-control.svelte.d.ts.map +1 -0
- package/dist/preview/components/list-callout-marker.svelte +108 -0
- package/dist/preview/components/list-callout-marker.svelte.d.ts +15 -0
- package/dist/preview/components/list-callout-marker.svelte.d.ts.map +1 -0
- package/dist/preview/components/list-item.svelte +161 -0
- package/dist/preview/components/list-item.svelte.d.ts +11 -0
- package/dist/preview/components/list-item.svelte.d.ts.map +1 -0
- package/dist/preview/components/tag.svelte +18 -0
- package/dist/preview/components/tag.svelte.d.ts +10 -0
- package/dist/preview/components/tag.svelte.d.ts.map +1 -0
- package/dist/preview/components/task-checkbox-control.svelte +113 -0
- package/dist/preview/components/task-checkbox-control.svelte.d.ts +14 -0
- package/dist/preview/components/task-checkbox-control.svelte.d.ts.map +1 -0
- package/dist/preview/editable-markdown-preview/behavior.d.ts +6 -0
- package/dist/preview/editable-markdown-preview/behavior.d.ts.map +1 -0
- package/dist/preview/editable-markdown-preview/behavior.js +57 -0
- package/dist/preview/editable-markdown-preview/behavior.test.d.ts +2 -0
- package/dist/preview/editable-markdown-preview/behavior.test.d.ts.map +1 -0
- package/dist/preview/editable-markdown-preview/behavior.test.js +36 -0
- package/dist/preview/editable-markdown-preview/editable-markdown-surface.svelte +386 -0
- package/dist/preview/editable-markdown-preview/editable-markdown-surface.svelte.d.ts +35 -0
- package/dist/preview/editable-markdown-preview/editable-markdown-surface.svelte.d.ts.map +1 -0
- package/dist/preview/editable-markdown-preview/editor-surface.svelte +228 -0
- package/dist/preview/editable-markdown-preview/editor-surface.svelte.d.ts +22 -0
- package/dist/preview/editable-markdown-preview/editor-surface.svelte.d.ts.map +1 -0
- package/dist/preview/editable-markdown-preview/serialized-writer.d.ts +36 -0
- package/dist/preview/editable-markdown-preview/serialized-writer.d.ts.map +1 -0
- package/dist/preview/editable-markdown-preview/serialized-writer.js +109 -0
- package/dist/preview/editable-markdown-preview/serialized-writer.test.d.ts +2 -0
- package/dist/preview/editable-markdown-preview/serialized-writer.test.d.ts.map +1 -0
- package/dist/preview/editable-markdown-preview/serialized-writer.test.js +59 -0
- package/dist/preview/editable-markdown-preview.svelte +195 -0
- package/dist/preview/editable-markdown-preview.svelte.d.ts +37 -0
- package/dist/preview/editable-markdown-preview.svelte.d.ts.map +1 -0
- package/dist/preview/embed-target.d.ts +13 -0
- package/dist/preview/embed-target.d.ts.map +1 -0
- package/dist/preview/embed-target.js +133 -0
- package/dist/preview/embed-target.test.d.ts +2 -0
- package/dist/preview/embed-target.test.d.ts.map +1 -0
- package/dist/preview/embed-target.test.js +78 -0
- package/dist/preview/file-embed.svelte +56 -0
- package/dist/preview/file-embed.svelte.d.ts +32 -0
- package/dist/preview/file-embed.svelte.d.ts.map +1 -0
- package/dist/preview/frontmatter/controller.svelte.d.ts +58 -0
- package/dist/preview/frontmatter/controller.svelte.d.ts.map +1 -0
- package/dist/preview/frontmatter/controller.svelte.js +195 -0
- package/dist/preview/frontmatter/defaults.d.ts +3 -0
- package/dist/preview/frontmatter/defaults.d.ts.map +1 -0
- package/dist/preview/frontmatter/defaults.js +32 -0
- package/dist/preview/frontmatter/frontmatter.test.d.ts +2 -0
- package/dist/preview/frontmatter/frontmatter.test.d.ts.map +1 -0
- package/dist/preview/frontmatter/frontmatter.test.js +190 -0
- package/dist/preview/frontmatter/index.d.ts +12 -0
- package/dist/preview/frontmatter/index.d.ts.map +1 -0
- package/dist/preview/frontmatter/index.js +11 -0
- package/dist/preview/frontmatter/manager.d.ts +28 -0
- package/dist/preview/frontmatter/manager.d.ts.map +1 -0
- package/dist/preview/frontmatter/manager.js +46 -0
- package/dist/preview/frontmatter/parse.d.ts +4 -0
- package/dist/preview/frontmatter/parse.d.ts.map +1 -0
- package/dist/preview/frontmatter/parse.js +49 -0
- package/dist/preview/frontmatter/predicates.d.ts +3 -0
- package/dist/preview/frontmatter/predicates.d.ts.map +1 -0
- package/dist/preview/frontmatter/predicates.js +7 -0
- package/dist/preview/frontmatter/properties.d.ts +13 -0
- package/dist/preview/frontmatter/properties.d.ts.map +1 -0
- package/dist/preview/frontmatter/properties.js +250 -0
- package/dist/preview/frontmatter/serialize.d.ts +3 -0
- package/dist/preview/frontmatter/serialize.d.ts.map +1 -0
- package/dist/preview/frontmatter/serialize.js +10 -0
- package/dist/preview/frontmatter/suggestions.d.ts +11 -0
- package/dist/preview/frontmatter/suggestions.d.ts.map +1 -0
- package/dist/preview/frontmatter/suggestions.js +91 -0
- package/dist/preview/frontmatter/suggestions.test.d.ts +2 -0
- package/dist/preview/frontmatter/suggestions.test.d.ts.map +1 -0
- package/dist/preview/frontmatter/suggestions.test.js +45 -0
- package/dist/preview/frontmatter/types.d.ts +66 -0
- package/dist/preview/frontmatter/types.d.ts.map +1 -0
- package/dist/preview/frontmatter/types.js +27 -0
- package/dist/preview/frontmatter/values.d.ts +5 -0
- package/dist/preview/frontmatter/values.d.ts.map +1 -0
- package/dist/preview/frontmatter/values.js +96 -0
- package/dist/preview/frontmatter/widgets.d.ts +9 -0
- package/dist/preview/frontmatter/widgets.d.ts.map +1 -0
- package/dist/preview/frontmatter/widgets.js +104 -0
- package/dist/preview/index.d.ts +18 -0
- package/dist/preview/index.d.ts.map +1 -0
- package/dist/preview/index.js +15 -0
- package/dist/preview/markdown-embed.svelte +80 -0
- package/dist/preview/markdown-embed.svelte.d.ts +27 -0
- package/dist/preview/markdown-embed.svelte.d.ts.map +1 -0
- package/dist/preview/markdown-outline.svelte +256 -0
- package/dist/preview/markdown-outline.svelte.d.ts +15 -0
- package/dist/preview/markdown-outline.svelte.d.ts.map +1 -0
- package/dist/preview/markdown-preview.svelte +500 -0
- package/dist/preview/markdown-preview.svelte.d.ts +30 -0
- package/dist/preview/markdown-preview.svelte.d.ts.map +1 -0
- package/dist/preview/note-link.svelte +78 -0
- package/dist/preview/note-link.svelte.d.ts +25 -0
- package/dist/preview/note-link.svelte.d.ts.map +1 -0
- package/dist/preview/outline.d.ts +16 -0
- package/dist/preview/outline.d.ts.map +1 -0
- package/dist/preview/outline.js +54 -0
- package/dist/preview/outline.test.d.ts +2 -0
- package/dist/preview/outline.test.d.ts.map +1 -0
- package/dist/preview/outline.test.js +98 -0
- package/dist/preview/portable-surfaces.test.d.ts +2 -0
- package/dist/preview/portable-surfaces.test.d.ts.map +1 -0
- package/dist/preview/portable-surfaces.test.js +482 -0
- package/dist/preview/preview.test.d.ts +2 -0
- package/dist/preview/preview.test.d.ts.map +1 -0
- package/dist/preview/preview.test.js +124 -0
- package/dist/preview/rehype-code-context.d.ts +5 -0
- package/dist/preview/rehype-code-context.d.ts.map +1 -0
- package/dist/preview/rehype-code-context.js +17 -0
- package/dist/preview/rehype-highlight-lines.d.ts +9 -0
- package/dist/preview/rehype-highlight-lines.d.ts.map +1 -0
- package/dist/preview/rehype-highlight-lines.js +257 -0
- package/dist/preview/rehype-table-spans.d.ts +4 -0
- package/dist/preview/rehype-table-spans.d.ts.map +1 -0
- package/dist/preview/rehype-table-spans.js +120 -0
- package/dist/preview/remark/callouts.d.ts +4 -0
- package/dist/preview/remark/callouts.d.ts.map +1 -0
- package/dist/preview/remark/callouts.js +81 -0
- package/dist/preview/remark/callouts.test.d.ts +2 -0
- package/dist/preview/remark/callouts.test.d.ts.map +1 -0
- package/dist/preview/remark/callouts.test.js +23 -0
- package/dist/preview/remark/custom-checklists.d.ts +25 -0
- package/dist/preview/remark/custom-checklists.d.ts.map +1 -0
- package/dist/preview/remark/custom-checklists.js +204 -0
- package/dist/preview/remark/custom-checklists.test.d.ts +2 -0
- package/dist/preview/remark/custom-checklists.test.d.ts.map +1 -0
- package/dist/preview/remark/custom-checklists.test.js +51 -0
- package/dist/preview/remark/external-links.d.ts +4 -0
- package/dist/preview/remark/external-links.d.ts.map +1 -0
- package/dist/preview/remark/external-links.js +34 -0
- package/dist/preview/remark/hast.d.ts +6 -0
- package/dist/preview/remark/hast.d.ts.map +1 -0
- package/dist/preview/remark/hast.js +60 -0
- package/dist/preview/remark/headings.d.ts +8 -0
- package/dist/preview/remark/headings.d.ts.map +1 -0
- package/dist/preview/remark/headings.js +40 -0
- package/dist/preview/remark/links.test.d.ts +2 -0
- package/dist/preview/remark/links.test.d.ts.map +1 -0
- package/dist/preview/remark/links.test.js +62 -0
- package/dist/preview/remark/list-callouts.d.ts +14 -0
- package/dist/preview/remark/list-callouts.d.ts.map +1 -0
- package/dist/preview/remark/list-callouts.js +91 -0
- package/dist/preview/remark/multimarkdown-table.d.ts +11 -0
- package/dist/preview/remark/multimarkdown-table.d.ts.map +1 -0
- package/dist/preview/remark/multimarkdown-table.js +138 -0
- package/dist/preview/remark/parity.test.d.ts +2 -0
- package/dist/preview/remark/parity.test.d.ts.map +1 -0
- package/dist/preview/remark/parity.test.js +105 -0
- package/dist/preview/remark/pathlink.d.ts +4 -0
- package/dist/preview/remark/pathlink.d.ts.map +1 -0
- package/dist/preview/remark/pathlink.js +26 -0
- package/dist/preview/remark/tags.d.ts +4 -0
- package/dist/preview/remark/tags.d.ts.map +1 -0
- package/dist/preview/remark/tags.js +22 -0
- package/dist/preview/remark/utils.d.ts +12 -0
- package/dist/preview/remark/utils.d.ts.map +1 -0
- package/dist/preview/remark/utils.js +74 -0
- package/dist/preview/remark/wikilink.d.ts +4 -0
- package/dist/preview/remark/wikilink.d.ts.map +1 -0
- package/dist/preview/remark/wikilink.js +23 -0
- package/dist/preview/remark.d.ts +12 -0
- package/dist/preview/remark.d.ts.map +1 -0
- package/dist/preview/remark.js +11 -0
- package/dist/preview/renderer/context.svelte.d.ts +37 -0
- package/dist/preview/renderer/context.svelte.d.ts.map +1 -0
- package/dist/preview/renderer/context.svelte.js +47 -0
- package/dist/preview/renderer/markdown.svelte +109 -0
- package/dist/preview/renderer/markdown.svelte.d.ts +28 -0
- package/dist/preview/renderer/markdown.svelte.d.ts.map +1 -0
- package/dist/preview/renderer/renderer.svelte +122 -0
- package/dist/preview/renderer/renderer.svelte.d.ts +9 -0
- package/dist/preview/renderer/renderer.svelte.d.ts.map +1 -0
- package/dist/preview/renderer/types.d.ts +20 -0
- package/dist/preview/renderer/types.d.ts.map +1 -0
- package/dist/preview/renderer/types.js +1 -0
- package/dist/preview/renderer/utils.d.ts +9 -0
- package/dist/preview/renderer/utils.d.ts.map +1 -0
- package/dist/preview/renderer/utils.js +135 -0
- package/dist/preview/styles/blockquotes-footnotes.css +78 -0
- package/dist/preview/styles/callouts.css +171 -0
- package/dist/preview/styles/code-katex.css +213 -0
- package/dist/preview/styles/editor-shared.css +132 -0
- package/dist/preview/styles/frontmatter-collapsible.css +94 -0
- package/dist/preview/styles/frontmatter-properties.css +532 -0
- package/dist/preview/styles/frontmatter-properties.test.d.ts +2 -0
- package/dist/preview/styles/frontmatter-properties.test.d.ts.map +1 -0
- package/dist/preview/styles/frontmatter-properties.test.js +57 -0
- package/dist/preview/styles/headings.css +183 -0
- package/dist/preview/styles/images.css +177 -0
- package/dist/preview/styles/links-embeds-tags.css +275 -0
- package/dist/preview/styles/list-callouts.css +281 -0
- package/dist/preview/styles/lists-tasks.css +638 -0
- package/dist/preview/styles/live-preview.css +58 -0
- package/dist/preview/styles/mermaid-highlight.css +112 -0
- package/dist/preview/styles/outline.css +219 -0
- package/dist/preview/styles/reading-mode.css +151 -0
- package/dist/preview/styles/source-mode.css +498 -0
- package/dist/preview/styles/source-mode.test.d.ts +2 -0
- package/dist/preview/styles/source-mode.test.d.ts.map +1 -0
- package/dist/preview/styles/source-mode.test.js +13 -0
- package/dist/preview/styles/surfaces.css +56 -0
- package/dist/preview/styles/tables.css +550 -0
- package/dist/preview/styles/tokens.css +269 -0
- package/dist/preview/styles/utilities.css +700 -0
- package/dist/preview/styles.css +22 -0
- package/dist/preview/test-utils.d.ts +3 -0
- package/dist/preview/test-utils.d.ts.map +1 -0
- package/dist/preview/test-utils.js +15 -0
- package/dist/styles.css +139 -0
- package/dist/tables/adobe-gridtables.d.ts +6 -0
- package/dist/tables/editor-column.svelte +136 -0
- package/dist/tables/editor-column.svelte.d.ts +12 -0
- package/dist/tables/editor-column.svelte.d.ts.map +1 -0
- package/dist/tables/editor-table.svelte +967 -0
- package/dist/tables/editor-table.svelte.d.ts +12 -0
- package/dist/tables/editor-table.svelte.d.ts.map +1 -0
- package/dist/tables/extension.d.ts +19 -0
- package/dist/tables/extension.d.ts.map +1 -0
- package/dist/tables/extension.js +189 -0
- package/dist/tables/extension.test.d.ts +2 -0
- package/dist/tables/extension.test.d.ts.map +1 -0
- package/dist/tables/extension.test.js +100 -0
- package/dist/tables/from-markdown.d.ts +1 -0
- package/dist/tables/from-markdown.js +378 -0
- package/dist/tables/grid-editor-column.svelte +127 -0
- package/dist/tables/grid-editor-column.svelte.d.ts +10 -0
- package/dist/tables/grid-editor-column.svelte.d.ts.map +1 -0
- package/dist/tables/grid-editor-column.test.d.ts +2 -0
- package/dist/tables/grid-editor-column.test.d.ts.map +1 -0
- package/dist/tables/grid-editor-column.test.js +27 -0
- package/dist/tables/grid-editor-table.svelte +1260 -0
- package/dist/tables/grid-editor-table.svelte.d.ts +12 -0
- package/dist/tables/grid-editor-table.svelte.d.ts.map +1 -0
- package/dist/tables/grid-table-extension.d.ts +14 -0
- package/dist/tables/grid-table-extension.d.ts.map +1 -0
- package/dist/tables/grid-table-extension.js +183 -0
- package/dist/tables/grid-table.d.ts +141 -0
- package/dist/tables/grid-table.d.ts.map +1 -0
- package/dist/tables/grid-table.js +425 -0
- package/dist/tables/grid-table.test.d.ts +2 -0
- package/dist/tables/grid-table.test.d.ts.map +1 -0
- package/dist/tables/grid-table.test.js +140 -0
- package/dist/tables/index.d.ts +13 -0
- package/dist/tables/index.d.ts.map +1 -0
- package/dist/tables/index.js +12 -0
- package/dist/tables/index.test.d.ts +2 -0
- package/dist/tables/index.test.d.ts.map +1 -0
- package/dist/tables/index.test.js +7 -0
- package/dist/tables/inline-editor-extensions.d.ts +3 -0
- package/dist/tables/inline-editor-extensions.d.ts.map +1 -0
- package/dist/tables/inline-editor-extensions.js +16 -0
- package/dist/tables/inline-editor-extensions.test.d.ts +2 -0
- package/dist/tables/inline-editor-extensions.test.d.ts.map +1 -0
- package/dist/tables/inline-editor-extensions.test.js +23 -0
- package/dist/tables/markdown-table-column-head.svelte +103 -0
- package/dist/tables/markdown-table-column-head.svelte.d.ts +14 -0
- package/dist/tables/markdown-table-column-head.svelte.d.ts.map +1 -0
- package/dist/tables/markdown-table-data-cell.svelte +121 -0
- package/dist/tables/markdown-table-data-cell.svelte.d.ts +24 -0
- package/dist/tables/markdown-table-data-cell.svelte.d.ts.map +1 -0
- package/dist/tables/markdown-table-dnd.d.ts +6 -0
- package/dist/tables/markdown-table-dnd.d.ts.map +1 -0
- package/dist/tables/markdown-table-dnd.js +6 -0
- package/dist/tables/markdown-table-row-gutter-cell.svelte +161 -0
- package/dist/tables/markdown-table-row-gutter-cell.svelte.d.ts +15 -0
- package/dist/tables/markdown-table-row-gutter-cell.svelte.d.ts.map +1 -0
- package/dist/tables/menu-component.svelte +109 -0
- package/dist/tables/menu-component.svelte.d.ts +8 -0
- package/dist/tables/menu-component.svelte.d.ts.map +1 -0
- package/dist/tables/menu.d.ts +21 -0
- package/dist/tables/menu.d.ts.map +1 -0
- package/dist/tables/menu.js +41 -0
- package/dist/tables/pipe-table.d.ts +4 -0
- package/dist/tables/pipe-table.d.ts.map +1 -0
- package/dist/tables/pipe-table.js +62 -0
- package/dist/tables/pipe-table.test.d.ts +2 -0
- package/dist/tables/pipe-table.test.d.ts.map +1 -0
- package/dist/tables/pipe-table.test.js +13 -0
- package/dist/tables/syntax.d.ts +1 -0
- package/dist/tables/syntax.js +436 -0
- package/dist/tables/table-line-scroll-sync.d.ts +5 -0
- package/dist/tables/table-line-scroll-sync.d.ts.map +1 -0
- package/dist/tables/table-line-scroll-sync.js +123 -0
- package/dist/tables/table-node.d.ts +92 -0
- package/dist/tables/table-node.d.ts.map +1 -0
- package/dist/tables/table-node.js +514 -0
- package/dist/tables/table-node.test.d.ts +2 -0
- package/dist/tables/table-node.test.d.ts.map +1 -0
- package/dist/tables/table-node.test.js +167 -0
- package/dist/tables/types.d.ts +25 -0
- package/dist/tables/types.d.ts.map +1 -0
- package/dist/tables/types.js +8 -0
- package/dist/tables/utils.d.ts +4 -0
- package/dist/tables/utils.d.ts.map +1 -0
- package/dist/tables/utils.js +16 -0
- package/dist/tables/widgets/grid-table-widget.d.ts +3 -0
- package/dist/tables/widgets/grid-table-widget.d.ts.map +1 -0
- package/dist/tables/widgets/grid-table-widget.js +26 -0
- package/dist/tables/widgets/pipe-table-widget.d.ts +3 -0
- package/dist/tables/widgets/pipe-table-widget.d.ts.map +1 -0
- package/dist/tables/widgets/pipe-table-widget.js +25 -0
- package/dist/tables/widgets/source-button.d.ts +2 -0
- package/dist/tables/widgets/source-button.d.ts.map +1 -0
- package/dist/tables/widgets/source-button.js +20 -0
- package/dist/tables/widgets/source-button.test.d.ts +2 -0
- package/dist/tables/widgets/source-button.test.d.ts.map +1 -0
- package/dist/tables/widgets/source-button.test.js +11 -0
- package/dist/test-setup.d.ts +2 -0
- package/dist/test-setup.d.ts.map +1 -0
- package/dist/test-setup.js +31 -0
- package/dist/themes/_contract.css +88 -0
- package/dist/themes/_mira-palette.css +187 -0
- package/dist/themes/_obsidian-palette.css +183 -0
- package/dist/themes/mira.css +2 -0
- package/dist/themes/obsidian.css +2 -0
- package/dist/themes/theme-contract.test.d.ts +2 -0
- package/dist/themes/theme-contract.test.d.ts.map +1 -0
- package/dist/themes/theme-contract.test.js +88 -0
- package/dist/themes.css +3 -0
- package/dist/types.d.ts +55 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/ui/appearance/index.d.ts +6 -0
- package/dist/ui/appearance/index.d.ts.map +1 -0
- package/dist/ui/appearance/index.js +9 -0
- package/dist/ui/button/button.shared.d.ts +59 -0
- package/dist/ui/button/button.shared.d.ts.map +1 -0
- package/dist/ui/button/button.shared.js +25 -0
- package/dist/ui/button/button.svelte +42 -0
- package/dist/ui/button/button.svelte.d.ts +5 -0
- package/dist/ui/button/button.svelte.d.ts.map +1 -0
- package/dist/ui/button/index.d.ts +4 -0
- package/dist/ui/button/index.d.ts.map +1 -0
- package/dist/ui/button/index.js +5 -0
- package/dist/ui/context-menu/context-menu-checkbox-item.svelte +40 -0
- package/dist/ui/context-menu/context-menu-checkbox-item.svelte.d.ts +10 -0
- package/dist/ui/context-menu/context-menu-checkbox-item.svelte.d.ts.map +1 -0
- package/dist/ui/context-menu/context-menu-content.svelte +61 -0
- package/dist/ui/context-menu/context-menu-content.svelte.d.ts +8 -0
- package/dist/ui/context-menu/context-menu-content.svelte.d.ts.map +1 -0
- package/dist/ui/context-menu/context-menu-group-heading.svelte +24 -0
- package/dist/ui/context-menu/context-menu-group-heading.svelte.d.ts +8 -0
- package/dist/ui/context-menu/context-menu-group-heading.svelte.d.ts.map +1 -0
- package/dist/ui/context-menu/context-menu-group.svelte +12 -0
- package/dist/ui/context-menu/context-menu-group.svelte.d.ts +5 -0
- package/dist/ui/context-menu/context-menu-group.svelte.d.ts.map +1 -0
- package/dist/ui/context-menu/context-menu-item.svelte +27 -0
- package/dist/ui/context-menu/context-menu-item.svelte.d.ts +9 -0
- package/dist/ui/context-menu/context-menu-item.svelte.d.ts.map +1 -0
- package/dist/ui/context-menu/context-menu-label.svelte +27 -0
- package/dist/ui/context-menu/context-menu-label.svelte.d.ts +9 -0
- package/dist/ui/context-menu/context-menu-label.svelte.d.ts.map +1 -0
- package/dist/ui/context-menu/context-menu-radio-group.svelte +16 -0
- package/dist/ui/context-menu/context-menu-radio-group.svelte.d.ts +5 -0
- package/dist/ui/context-menu/context-menu-radio-group.svelte.d.ts.map +1 -0
- package/dist/ui/context-menu/context-menu-radio-item.svelte +33 -0
- package/dist/ui/context-menu/context-menu-radio-item.svelte.d.ts +5 -0
- package/dist/ui/context-menu/context-menu-radio-item.svelte.d.ts.map +1 -0
- package/dist/ui/context-menu/context-menu-root.svelte +17 -0
- package/dist/ui/context-menu/context-menu-root.svelte.d.ts +4 -0
- package/dist/ui/context-menu/context-menu-root.svelte.d.ts.map +1 -0
- package/dist/ui/context-menu/context-menu-separator.svelte +17 -0
- package/dist/ui/context-menu/context-menu-separator.svelte.d.ts +5 -0
- package/dist/ui/context-menu/context-menu-separator.svelte.d.ts.map +1 -0
- package/dist/ui/context-menu/context-menu-shortcut.svelte +20 -0
- package/dist/ui/context-menu/context-menu-shortcut.svelte.d.ts +6 -0
- package/dist/ui/context-menu/context-menu-shortcut.svelte.d.ts.map +1 -0
- package/dist/ui/context-menu/context-menu-sub-content.svelte +20 -0
- package/dist/ui/context-menu/context-menu-sub-content.svelte.d.ts +5 -0
- package/dist/ui/context-menu/context-menu-sub-content.svelte.d.ts.map +1 -0
- package/dist/ui/context-menu/context-menu-sub-trigger.svelte +29 -0
- package/dist/ui/context-menu/context-menu-sub-trigger.svelte.d.ts +9 -0
- package/dist/ui/context-menu/context-menu-sub-trigger.svelte.d.ts.map +1 -0
- package/dist/ui/context-menu/context-menu-trigger.svelte +29 -0
- package/dist/ui/context-menu/context-menu-trigger.svelte.d.ts +5 -0
- package/dist/ui/context-menu/context-menu-trigger.svelte.d.ts.map +1 -0
- package/dist/ui/context-menu/index.d.ts +17 -0
- package/dist/ui/context-menu/index.d.ts.map +1 -0
- package/dist/ui/context-menu/index.js +19 -0
- package/dist/ui/dialog/dialog-close.svelte +8 -0
- package/dist/ui/dialog/dialog-close.svelte.d.ts +5 -0
- package/dist/ui/dialog/dialog-close.svelte.d.ts.map +1 -0
- package/dist/ui/dialog/dialog-content.svelte +66 -0
- package/dist/ui/dialog/dialog-content.svelte.d.ts +12 -0
- package/dist/ui/dialog/dialog-content.svelte.d.ts.map +1 -0
- package/dist/ui/dialog/dialog-description.svelte +17 -0
- package/dist/ui/dialog/dialog-description.svelte.d.ts +5 -0
- package/dist/ui/dialog/dialog-description.svelte.d.ts.map +1 -0
- package/dist/ui/dialog/dialog-footer.svelte +23 -0
- package/dist/ui/dialog/dialog-footer.svelte.d.ts +6 -0
- package/dist/ui/dialog/dialog-footer.svelte.d.ts.map +1 -0
- package/dist/ui/dialog/dialog-header.svelte +20 -0
- package/dist/ui/dialog/dialog-header.svelte.d.ts +6 -0
- package/dist/ui/dialog/dialog-header.svelte.d.ts.map +1 -0
- package/dist/ui/dialog/dialog-overlay.svelte +21 -0
- package/dist/ui/dialog/dialog-overlay.svelte.d.ts +5 -0
- package/dist/ui/dialog/dialog-overlay.svelte.d.ts.map +1 -0
- package/dist/ui/dialog/dialog-title.svelte +17 -0
- package/dist/ui/dialog/dialog-title.svelte.d.ts +5 -0
- package/dist/ui/dialog/dialog-title.svelte.d.ts.map +1 -0
- package/dist/ui/dialog/dialog-trigger.svelte +8 -0
- package/dist/ui/dialog/dialog-trigger.svelte.d.ts +5 -0
- package/dist/ui/dialog/dialog-trigger.svelte.d.ts.map +1 -0
- package/dist/ui/dialog/index.d.ts +12 -0
- package/dist/ui/dialog/index.d.ts.map +1 -0
- package/dist/ui/dialog/index.js +14 -0
- package/dist/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +43 -0
- package/dist/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +10 -0
- package/dist/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts.map +1 -0
- package/dist/ui/dropdown-menu/dropdown-menu-content.svelte +63 -0
- package/dist/ui/dropdown-menu/dropdown-menu-content.svelte.d.ts +8 -0
- package/dist/ui/dropdown-menu/dropdown-menu-content.svelte.d.ts.map +1 -0
- package/dist/ui/dropdown-menu/dropdown-menu-group-heading.svelte +22 -0
- package/dist/ui/dropdown-menu/dropdown-menu-group-heading.svelte.d.ts +9 -0
- package/dist/ui/dropdown-menu/dropdown-menu-group-heading.svelte.d.ts.map +1 -0
- package/dist/ui/dropdown-menu/dropdown-menu-group.svelte +14 -0
- package/dist/ui/dropdown-menu/dropdown-menu-group.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/dropdown-menu-group.svelte.d.ts.map +1 -0
- package/dist/ui/dropdown-menu/dropdown-menu-item.svelte +27 -0
- package/dist/ui/dropdown-menu/dropdown-menu-item.svelte.d.ts +9 -0
- package/dist/ui/dropdown-menu/dropdown-menu-item.svelte.d.ts.map +1 -0
- package/dist/ui/dropdown-menu/dropdown-menu-label.svelte +24 -0
- package/dist/ui/dropdown-menu/dropdown-menu-label.svelte.d.ts +9 -0
- package/dist/ui/dropdown-menu/dropdown-menu-label.svelte.d.ts.map +1 -0
- package/dist/ui/dropdown-menu/dropdown-menu-radio-group.svelte +16 -0
- package/dist/ui/dropdown-menu/dropdown-menu-radio-group.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/dropdown-menu-radio-group.svelte.d.ts.map +1 -0
- package/dist/ui/dropdown-menu/dropdown-menu-radio-item.svelte +33 -0
- package/dist/ui/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts.map +1 -0
- package/dist/ui/dropdown-menu/dropdown-menu-root.svelte +27 -0
- package/dist/ui/dropdown-menu/dropdown-menu-root.svelte.d.ts +4 -0
- package/dist/ui/dropdown-menu/dropdown-menu-root.svelte.d.ts.map +1 -0
- package/dist/ui/dropdown-menu/dropdown-menu-separator.svelte +17 -0
- package/dist/ui/dropdown-menu/dropdown-menu-separator.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/dropdown-menu-separator.svelte.d.ts.map +1 -0
- package/dist/ui/dropdown-menu/dropdown-menu-shortcut.svelte +20 -0
- package/dist/ui/dropdown-menu/dropdown-menu-shortcut.svelte.d.ts +6 -0
- package/dist/ui/dropdown-menu/dropdown-menu-shortcut.svelte.d.ts.map +1 -0
- package/dist/ui/dropdown-menu/dropdown-menu-sub-content.svelte +20 -0
- package/dist/ui/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts.map +1 -0
- package/dist/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +29 -0
- package/dist/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +8 -0
- package/dist/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts.map +1 -0
- package/dist/ui/dropdown-menu/dropdown-menu-trigger.svelte +29 -0
- package/dist/ui/dropdown-menu/dropdown-menu-trigger.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/dropdown-menu-trigger.svelte.d.ts.map +1 -0
- package/dist/ui/dropdown-menu/index.d.ts +17 -0
- package/dist/ui/dropdown-menu/index.d.ts.map +1 -0
- package/dist/ui/dropdown-menu/index.js +17 -0
- package/dist/ui/index.d.ts +13 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +12 -0
- package/dist/ui/index.test.d.ts +2 -0
- package/dist/ui/index.test.d.ts.map +1 -0
- package/dist/ui/index.test.js +7 -0
- package/dist/ui/internal/overlay-portal-context.d.ts +19 -0
- package/dist/ui/internal/overlay-portal-context.d.ts.map +1 -0
- package/dist/ui/internal/overlay-portal-context.js +39 -0
- package/dist/ui/popover/index.d.ts +7 -0
- package/dist/ui/popover/index.d.ts.map +1 -0
- package/dist/ui/popover/index.js +6 -0
- package/dist/ui/popover/popover-content.svelte +65 -0
- package/dist/ui/popover/popover-content.svelte.d.ts +8 -0
- package/dist/ui/popover/popover-content.svelte.d.ts.map +1 -0
- package/dist/ui/popover/popover-root.svelte +15 -0
- package/dist/ui/popover/popover-root.svelte.d.ts +4 -0
- package/dist/ui/popover/popover-root.svelte.d.ts.map +1 -0
- package/dist/ui/popover/popover-trigger.svelte +23 -0
- package/dist/ui/popover/popover-trigger.svelte.d.ts +5 -0
- package/dist/ui/popover/popover-trigger.svelte.d.ts.map +1 -0
- package/dist/ui/scroll-area/index.d.ts +2 -0
- package/dist/ui/scroll-area/index.d.ts.map +1 -0
- package/dist/ui/scroll-area/index.js +1 -0
- package/dist/ui/scroll-area/scroll-area.svelte +14 -0
- package/dist/ui/scroll-area/scroll-area.svelte.d.ts +9 -0
- package/dist/ui/scroll-area/scroll-area.svelte.d.ts.map +1 -0
- package/dist/ui/separator/index.d.ts +2 -0
- package/dist/ui/separator/index.d.ts.map +1 -0
- package/dist/ui/separator/index.js +1 -0
- package/dist/ui/separator/separator.svelte +14 -0
- package/dist/ui/separator/separator.svelte.d.ts +8 -0
- package/dist/ui/separator/separator.svelte.d.ts.map +1 -0
- package/dist/ui/styles.css +760 -0
- package/dist/ui/styles.test.d.ts +2 -0
- package/dist/ui/styles.test.d.ts.map +1 -0
- package/dist/ui/styles.test.js +26 -0
- package/dist/ui/table/index.d.ts +10 -0
- package/dist/ui/table/index.d.ts.map +1 -0
- package/dist/ui/table/index.js +11 -0
- package/dist/ui/table/table-body.svelte +20 -0
- package/dist/ui/table/table-body.svelte.d.ts +6 -0
- package/dist/ui/table/table-body.svelte.d.ts.map +1 -0
- package/dist/ui/table/table-caption.svelte +20 -0
- package/dist/ui/table/table-caption.svelte.d.ts +6 -0
- package/dist/ui/table/table-caption.svelte.d.ts.map +1 -0
- package/dist/ui/table/table-cell.svelte +23 -0
- package/dist/ui/table/table-cell.svelte.d.ts +6 -0
- package/dist/ui/table/table-cell.svelte.d.ts.map +1 -0
- package/dist/ui/table/table-footer.svelte +23 -0
- package/dist/ui/table/table-footer.svelte.d.ts +6 -0
- package/dist/ui/table/table-footer.svelte.d.ts.map +1 -0
- package/dist/ui/table/table-head.svelte +23 -0
- package/dist/ui/table/table-head.svelte.d.ts +6 -0
- package/dist/ui/table/table-head.svelte.d.ts.map +1 -0
- package/dist/ui/table/table-header.svelte +20 -0
- package/dist/ui/table/table-header.svelte.d.ts +6 -0
- package/dist/ui/table/table-header.svelte.d.ts.map +1 -0
- package/dist/ui/table/table-row.svelte +23 -0
- package/dist/ui/table/table-row.svelte.d.ts +6 -0
- package/dist/ui/table/table-row.svelte.d.ts.map +1 -0
- package/dist/ui/table/table.svelte +21 -0
- package/dist/ui/table/table.svelte.d.ts +9 -0
- package/dist/ui/table/table.svelte.d.ts.map +1 -0
- package/dist/ui/table-dnd/index.d.ts +4 -0
- package/dist/ui/table-dnd/index.d.ts.map +1 -0
- package/dist/ui/table-dnd/index.js +3 -0
- package/dist/ui/table-dnd/table-dnd-sensors.d.ts +3 -0
- package/dist/ui/table-dnd/table-dnd-sensors.d.ts.map +1 -0
- package/dist/ui/table-dnd/table-dnd-sensors.js +11 -0
- package/dist/ui/table-dnd/table-dnd-utils.d.ts +30 -0
- package/dist/ui/table-dnd/table-dnd-utils.d.ts.map +1 -0
- package/dist/ui/table-dnd/table-dnd-utils.js +77 -0
- package/dist/ui/table-dnd/table-dnd-utils.test.d.ts +2 -0
- package/dist/ui/table-dnd/table-dnd-utils.test.d.ts.map +1 -0
- package/dist/ui/table-dnd/table-dnd-utils.test.js +46 -0
- package/dist/ui/table-dnd/table-drag-grip.svelte +60 -0
- package/dist/ui/table-dnd/table-drag-grip.svelte.d.ts +17 -0
- package/dist/ui/table-dnd/table-drag-grip.svelte.d.ts.map +1 -0
- package/dist/ui/toggle-group/context.d.ts +7 -0
- package/dist/ui/toggle-group/context.d.ts.map +1 -0
- package/dist/ui/toggle-group/context.js +8 -0
- package/dist/ui/toggle-group/index.d.ts +3 -0
- package/dist/ui/toggle-group/index.d.ts.map +1 -0
- package/dist/ui/toggle-group/index.js +2 -0
- package/dist/ui/toggle-group/toggle-group-item.svelte +33 -0
- package/dist/ui/toggle-group/toggle-group-item.svelte.d.ts +11 -0
- package/dist/ui/toggle-group/toggle-group-item.svelte.d.ts.map +1 -0
- package/dist/ui/toggle-group/toggle-group.svelte +74 -0
- package/dist/ui/toggle-group/toggle-group.svelte.d.ts +12 -0
- package/dist/ui/toggle-group/toggle-group.svelte.d.ts.map +1 -0
- package/dist/ui/toolbar/index.d.ts +7 -0
- package/dist/ui/toolbar/index.d.ts.map +1 -0
- package/dist/ui/toolbar/index.js +6 -0
- package/dist/ui/toolbar/toolbar-button.svelte +17 -0
- package/dist/ui/toolbar/toolbar-button.svelte.d.ts +5 -0
- package/dist/ui/toolbar/toolbar-button.svelte.d.ts.map +1 -0
- package/dist/ui/toolbar/toolbar-group-item.svelte +17 -0
- package/dist/ui/toolbar/toolbar-group-item.svelte.d.ts +4 -0
- package/dist/ui/toolbar/toolbar-group-item.svelte.d.ts.map +1 -0
- package/dist/ui/toolbar/toolbar-group.svelte +19 -0
- package/dist/ui/toolbar/toolbar-group.svelte.d.ts +5 -0
- package/dist/ui/toolbar/toolbar-group.svelte.d.ts.map +1 -0
- package/dist/ui/toolbar/toolbar-link.svelte +17 -0
- package/dist/ui/toolbar/toolbar-link.svelte.d.ts +5 -0
- package/dist/ui/toolbar/toolbar-link.svelte.d.ts.map +1 -0
- package/dist/ui/toolbar/toolbar.svelte +21 -0
- package/dist/ui/toolbar/toolbar.svelte.d.ts +5 -0
- package/dist/ui/toolbar/toolbar.svelte.d.ts.map +1 -0
- package/dist/ui/tooltip/index.d.ts +8 -0
- package/dist/ui/tooltip/index.d.ts.map +1 -0
- package/dist/ui/tooltip/index.js +9 -0
- package/dist/ui/tooltip/tooltip-content.svelte +85 -0
- package/dist/ui/tooltip/tooltip-content.svelte.d.ts +9 -0
- package/dist/ui/tooltip/tooltip-content.svelte.d.ts.map +1 -0
- package/dist/ui/tooltip/tooltip-root.svelte +15 -0
- package/dist/ui/tooltip/tooltip-root.svelte.d.ts +5 -0
- package/dist/ui/tooltip/tooltip-root.svelte.d.ts.map +1 -0
- package/dist/ui/tooltip/tooltip-trigger.svelte +23 -0
- package/dist/ui/tooltip/tooltip-trigger.svelte.d.ts +5 -0
- package/dist/ui/tooltip/tooltip-trigger.svelte.d.ts.map +1 -0
- package/dist/ui/utils.d.ts +13 -0
- package/dist/ui/utils.d.ts.map +1 -0
- package/dist/ui/utils.js +5 -0
- package/package.json +171 -0
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
4
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
6
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
*
|
|
8
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
9
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
10
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
11
|
+
* governing permissions and limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { fromMarkdown } from "mdast-util-from-markdown";
|
|
15
|
+
import { CONTINUE, visit } from "unist-util-visit";
|
|
16
|
+
import { pick } from "lodash-es";
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
TYPE_ROW_LINE,
|
|
20
|
+
TYPE_GRID_DIVIDER,
|
|
21
|
+
TYPE_BODY,
|
|
22
|
+
TYPE_CELL,
|
|
23
|
+
TYPE_HEADER,
|
|
24
|
+
TYPE_FOOTER,
|
|
25
|
+
TYPE_ROW,
|
|
26
|
+
TYPE_TABLE,
|
|
27
|
+
} from "./types.js";
|
|
28
|
+
|
|
29
|
+
function unescapeCode(tree) {
|
|
30
|
+
visit(tree, (node) => {
|
|
31
|
+
if (node.type === "inlineCode" || node.type === "code") {
|
|
32
|
+
// remove escaped pipes and plusses in code
|
|
33
|
+
|
|
34
|
+
node.value = node.value.replace(/\\([+|])/gm, "$1");
|
|
35
|
+
}
|
|
36
|
+
if (node.type === "code") {
|
|
37
|
+
// remove non-break-here characters
|
|
38
|
+
|
|
39
|
+
node.value = node.value.replace(/\u0083 ?\n/gmu, "");
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return CONTINUE;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function multiline(lines) {
|
|
47
|
+
// remove empty trailing lines
|
|
48
|
+
while (lines.length > 0 && lines[lines.length - 1].match(/^\s*$/)) {
|
|
49
|
+
lines.pop();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// calculate common indent
|
|
53
|
+
const prefixLen = lines
|
|
54
|
+
.filter((line) => !line.match(/^\s*$/))
|
|
55
|
+
.map((line) => line.match(/^ */)[0].length)
|
|
56
|
+
.reduce((min, len) => Math.min(len, min), Infinity);
|
|
57
|
+
|
|
58
|
+
// remove prefix
|
|
59
|
+
return lines.map((line) => line.substring(prefixLen).trimEnd());
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function getColSpan(info, token) {
|
|
63
|
+
const i0 = info.cols.indexOf(token._colStart);
|
|
64
|
+
const i1 = info.cols.indexOf(token._colEnd);
|
|
65
|
+
return i1 - i0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function enterTable(token) {
|
|
69
|
+
this.enter({ type: TYPE_TABLE, children: [] }, token);
|
|
70
|
+
this.data.tableInfo = {
|
|
71
|
+
// the column positions of the table
|
|
72
|
+
cols: token._cols,
|
|
73
|
+
// the current column
|
|
74
|
+
colPos: 0,
|
|
75
|
+
// list of all cells
|
|
76
|
+
allCells: [],
|
|
77
|
+
// cells that are still open via rowSpan
|
|
78
|
+
pendingCells: [],
|
|
79
|
+
// the current cells of a row
|
|
80
|
+
cells: [],
|
|
81
|
+
// grid dividers use for align the cells
|
|
82
|
+
dividers: [],
|
|
83
|
+
// the link/image reference definitions
|
|
84
|
+
definitions: token._definitions,
|
|
85
|
+
// track row start position
|
|
86
|
+
rowStart: null,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function createExitTable(options) {
|
|
91
|
+
let { processor } = options;
|
|
92
|
+
// create fake remark processor in case invoked recursively
|
|
93
|
+
if (!processor) {
|
|
94
|
+
processor = {
|
|
95
|
+
data(key) {
|
|
96
|
+
if (key === "micromarkExtensions") {
|
|
97
|
+
return options.extensions;
|
|
98
|
+
}
|
|
99
|
+
if (key === "fromMarkdownExtensions") {
|
|
100
|
+
return options.mdastExtensions;
|
|
101
|
+
}
|
|
102
|
+
/* c8 ignore next */
|
|
103
|
+
return undefined;
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return function exitTable(token) {
|
|
109
|
+
// render cells
|
|
110
|
+
const { tableInfo } = this.data;
|
|
111
|
+
for (const cell of tableInfo.allCells) {
|
|
112
|
+
const { node, lines, colSpan, rowSpan, align, valign } = cell;
|
|
113
|
+
|
|
114
|
+
const sanitizedLines = multiline(lines);
|
|
115
|
+
|
|
116
|
+
// remove trailing `\` on lines followed by empty line. we assume that proper backslashes are
|
|
117
|
+
// always escaped inside gridtables. also see https://github.com/micromark/micromark/issues/118
|
|
118
|
+
for (let i = 0; i < sanitizedLines.length; i += 1) {
|
|
119
|
+
const line = sanitizedLines[i];
|
|
120
|
+
if (line.endsWith("\\") && !sanitizedLines[i + 1]) {
|
|
121
|
+
let idx = line.length - 1;
|
|
122
|
+
while (idx >= 0 && line[idx] === "\\") {
|
|
123
|
+
idx -= 1;
|
|
124
|
+
}
|
|
125
|
+
// only remove if odd number of backslashes
|
|
126
|
+
if ((line.length - idx + 2) % 2 === 0) {
|
|
127
|
+
if (line.length === 1) {
|
|
128
|
+
sanitizedLines.splice(i, 1);
|
|
129
|
+
i -= 1;
|
|
130
|
+
} else {
|
|
131
|
+
sanitizedLines[i] = line.substring(0, line.length - 1);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// add fake definitions from the main document
|
|
138
|
+
const fakeDefs = new Set();
|
|
139
|
+
for (const def of tableInfo.definitions) {
|
|
140
|
+
const key = `[${def.toLowerCase()}]`;
|
|
141
|
+
if (lines.find((line) => line.indexOf(key) >= 0)) {
|
|
142
|
+
sanitizedLines.push("");
|
|
143
|
+
sanitizedLines.push(`[${def}]: dummy`);
|
|
144
|
+
fakeDefs.add(def);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
const cellContent = sanitizedLines.join("\n");
|
|
148
|
+
|
|
149
|
+
const tree = fromMarkdown(cellContent, {
|
|
150
|
+
extensions: processor.data("micromarkExtensions"),
|
|
151
|
+
mdastExtensions: processor.data("fromMarkdownExtensions"),
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
// remove previously added definitions
|
|
155
|
+
for (let i = 0; i < tree.children.length; i += 1) {
|
|
156
|
+
const child = tree.children[i];
|
|
157
|
+
if (child.type === "definition" && fakeDefs.has(child.label)) {
|
|
158
|
+
tree.children.splice(i, 1);
|
|
159
|
+
i -= 1;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// remove escaped pipes and plusses in code
|
|
164
|
+
unescapeCode(tree);
|
|
165
|
+
|
|
166
|
+
node.content = cellContent;
|
|
167
|
+
node.children = tree.children;
|
|
168
|
+
node.position = {
|
|
169
|
+
start: pick(cell.startPosition, ["line", "column", "offset"]),
|
|
170
|
+
end: pick(cell.endPosition, ["line", "column", "offset"]),
|
|
171
|
+
};
|
|
172
|
+
node.positions = cell.positions;
|
|
173
|
+
if (colSpan > 1) {
|
|
174
|
+
node.colSpan = colSpan;
|
|
175
|
+
}
|
|
176
|
+
if (rowSpan > 1) {
|
|
177
|
+
node.rowSpan = rowSpan;
|
|
178
|
+
}
|
|
179
|
+
if (align) {
|
|
180
|
+
node.align = align;
|
|
181
|
+
}
|
|
182
|
+
if (valign) {
|
|
183
|
+
node.valign = valign;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
this.exit(token);
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function enter(token) {
|
|
191
|
+
this.enter({ type: token.type, children: [] }, token);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function enterCell() {
|
|
195
|
+
this.buffer();
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function exitCell(token) {
|
|
199
|
+
this.config.enter.data.call(this, token);
|
|
200
|
+
this.config.exit.data.call(this, token);
|
|
201
|
+
const data = this.resume();
|
|
202
|
+
const { tableInfo } = this.data;
|
|
203
|
+
const colSpan = getColSpan(tableInfo, token);
|
|
204
|
+
|
|
205
|
+
let cell = tableInfo.pendingCells[tableInfo.colPos];
|
|
206
|
+
|
|
207
|
+
// open rowspan if we are on a divider line
|
|
208
|
+
if (tableInfo.isDivider) {
|
|
209
|
+
if (!cell) {
|
|
210
|
+
cell = tableInfo.cells[tableInfo.colPos];
|
|
211
|
+
tableInfo.pendingCells[tableInfo.colPos] = cell;
|
|
212
|
+
}
|
|
213
|
+
if (cell) {
|
|
214
|
+
cell.rowSpan += 1;
|
|
215
|
+
// Update end position for rowspan cells - always extend to current token end
|
|
216
|
+
if (token.end) {
|
|
217
|
+
cell.endPosition = token.end;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// if a rowspan is open, append to its cell
|
|
223
|
+
if (cell) {
|
|
224
|
+
cell.lines.push(data);
|
|
225
|
+
cell.positions.push({ from: token.start.offset, to: token.end.offset });
|
|
226
|
+
// Always update end position to reflect the latest content
|
|
227
|
+
if (token.end) {
|
|
228
|
+
cell.endPosition = token.end;
|
|
229
|
+
}
|
|
230
|
+
tableInfo.colPos += colSpan;
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// otherwise append to regular cell
|
|
235
|
+
cell = tableInfo.cells[tableInfo.colPos];
|
|
236
|
+
if (!cell) {
|
|
237
|
+
const div = tableInfo.dividers[tableInfo.colPos];
|
|
238
|
+
cell = {
|
|
239
|
+
rowSpan: 1,
|
|
240
|
+
colSpan,
|
|
241
|
+
align: div?._align,
|
|
242
|
+
valign: div?._valign,
|
|
243
|
+
node: {
|
|
244
|
+
type: TYPE_CELL,
|
|
245
|
+
},
|
|
246
|
+
lines: [],
|
|
247
|
+
positions: [],
|
|
248
|
+
// Store the original token positions
|
|
249
|
+
startPosition: token.start,
|
|
250
|
+
endPosition: token.end,
|
|
251
|
+
};
|
|
252
|
+
tableInfo.cells[tableInfo.colPos] = cell;
|
|
253
|
+
tableInfo.allCells.push(cell);
|
|
254
|
+
} else {
|
|
255
|
+
// Cell already exists (multi-line), update end position
|
|
256
|
+
if (token.end) {
|
|
257
|
+
cell.endPosition = token.end;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
cell.lines.push(data);
|
|
262
|
+
cell.positions.push({ from: token.start.offset, to: token.end.offset });
|
|
263
|
+
tableInfo.colPos += colSpan;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
function enterGridDivider(token) {
|
|
267
|
+
const { tableInfo } = this.data;
|
|
268
|
+
// clear pending rowspans and set divider info
|
|
269
|
+
let colSpan = getColSpan(tableInfo, token);
|
|
270
|
+
while (colSpan > 0) {
|
|
271
|
+
colSpan -= 1;
|
|
272
|
+
tableInfo.pendingCells[tableInfo.colPos] = null;
|
|
273
|
+
tableInfo.dividers[tableInfo.colPos] = token;
|
|
274
|
+
tableInfo.colPos += 1;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
function enterRowLine(token) {
|
|
279
|
+
const info = this.data.tableInfo;
|
|
280
|
+
info.isDivider = token._type;
|
|
281
|
+
info.colPos = 0;
|
|
282
|
+
if (info.isDivider) {
|
|
283
|
+
info.dividers = [];
|
|
284
|
+
}
|
|
285
|
+
// Store row start position for later use
|
|
286
|
+
if (token.start) {
|
|
287
|
+
info.rowStart = token.start;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function commitRow(info) {
|
|
292
|
+
// Calculate row boundaries from cells
|
|
293
|
+
let rowStart = info.rowStart;
|
|
294
|
+
let rowEnd = info.rowStart;
|
|
295
|
+
|
|
296
|
+
for (const cell of info.cells) {
|
|
297
|
+
if (cell) {
|
|
298
|
+
if (
|
|
299
|
+
cell.startPosition &&
|
|
300
|
+
(!rowStart || cell.startPosition.offset < rowStart.offset)
|
|
301
|
+
) {
|
|
302
|
+
rowStart = cell.startPosition;
|
|
303
|
+
}
|
|
304
|
+
if (
|
|
305
|
+
cell.endPosition &&
|
|
306
|
+
(!rowEnd || cell.endPosition.offset > rowEnd.offset)
|
|
307
|
+
) {
|
|
308
|
+
rowEnd = cell.endPosition;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// Create token for 'gtRow' with proper positioning
|
|
314
|
+
const rowToken = {
|
|
315
|
+
type: TYPE_ROW,
|
|
316
|
+
start: rowStart || { line: 0, column: 0, offset: 0 },
|
|
317
|
+
end: rowEnd || { line: 0, column: 0, offset: 0 },
|
|
318
|
+
};
|
|
319
|
+
this.enter({ type: TYPE_ROW, children: [] }, rowToken);
|
|
320
|
+
|
|
321
|
+
// emit cells
|
|
322
|
+
for (const cell of info.cells) {
|
|
323
|
+
if (cell) {
|
|
324
|
+
const cellToken = {
|
|
325
|
+
type: TYPE_CELL,
|
|
326
|
+
start: cell.startPosition || { line: 0, column: 0, offset: 0 },
|
|
327
|
+
end: cell.endPosition || { line: 0, column: 0, offset: 0 },
|
|
328
|
+
};
|
|
329
|
+
this.enter(cell.node, cellToken);
|
|
330
|
+
this.exit(cellToken);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
this.exit(rowToken);
|
|
335
|
+
|
|
336
|
+
info.cells = [];
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
function exitHeader(token) {
|
|
340
|
+
const { tableInfo } = this.data;
|
|
341
|
+
// commit row has some cells
|
|
342
|
+
if (tableInfo.cells.length) {
|
|
343
|
+
commitRow.call(this, tableInfo);
|
|
344
|
+
// also close all rowspans.
|
|
345
|
+
tableInfo.pendingCells = [];
|
|
346
|
+
}
|
|
347
|
+
this.exit(token);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
function exitRowLine() {
|
|
351
|
+
const { tableInfo } = this.data;
|
|
352
|
+
// commit row if on a divider and has some cells
|
|
353
|
+
if (tableInfo.isDivider && tableInfo.cells.length) {
|
|
354
|
+
commitRow.call(this, tableInfo);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export function gridTablesFromMarkdown(options = {}) {
|
|
359
|
+
return {
|
|
360
|
+
enter: {
|
|
361
|
+
[TYPE_TABLE]: enterTable,
|
|
362
|
+
[TYPE_HEADER]: enter,
|
|
363
|
+
[TYPE_BODY]: enter,
|
|
364
|
+
[TYPE_FOOTER]: enter,
|
|
365
|
+
[TYPE_CELL]: enterCell,
|
|
366
|
+
[TYPE_GRID_DIVIDER]: enterGridDivider,
|
|
367
|
+
[TYPE_ROW_LINE]: enterRowLine,
|
|
368
|
+
},
|
|
369
|
+
exit: {
|
|
370
|
+
[TYPE_TABLE]: createExitTable(options),
|
|
371
|
+
[TYPE_HEADER]: exitHeader,
|
|
372
|
+
[TYPE_BODY]: exitHeader,
|
|
373
|
+
[TYPE_FOOTER]: exitHeader,
|
|
374
|
+
[TYPE_CELL]: exitCell,
|
|
375
|
+
[TYPE_ROW_LINE]: exitRowLine,
|
|
376
|
+
},
|
|
377
|
+
};
|
|
378
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import { EditorView, keymap } from "@codemirror/view";
|
|
4
|
+
import { EditorState } from "@codemirror/state";
|
|
5
|
+
import { cn } from "./utils";
|
|
6
|
+
import { tick } from "svelte";
|
|
7
|
+
import { MarkdownPreview } from "@lapismd/mira/preview";
|
|
8
|
+
import { createInlineTableMarkdownExtensions } from "./inline-editor-extensions";
|
|
9
|
+
|
|
10
|
+
let {
|
|
11
|
+
content,
|
|
12
|
+
onContentChange,
|
|
13
|
+
onEdit = () => true,
|
|
14
|
+
class: className,
|
|
15
|
+
}: {
|
|
16
|
+
content: string;
|
|
17
|
+
class?: string;
|
|
18
|
+
onContentChange: (value: string) => void;
|
|
19
|
+
onEdit?: (evt: MouseEvent) => boolean;
|
|
20
|
+
} = $props();
|
|
21
|
+
let view: EditorView = new EditorView({
|
|
22
|
+
doc: "",
|
|
23
|
+
state: EditorState.create({
|
|
24
|
+
extensions: [
|
|
25
|
+
createInlineTableMarkdownExtensions(),
|
|
26
|
+
keymap.of([
|
|
27
|
+
{
|
|
28
|
+
key: "Enter",
|
|
29
|
+
run: (view) => {
|
|
30
|
+
// Insert newline and prevent event from bubbling to parent
|
|
31
|
+
view.dispatch({
|
|
32
|
+
changes: { from: view.state.selection.main.head, insert: "\n" },
|
|
33
|
+
selection: { anchor: view.state.selection.main.head + 1 },
|
|
34
|
+
});
|
|
35
|
+
return true; // This prevents the event from propagating
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
]),
|
|
39
|
+
EditorView.domEventHandlers({
|
|
40
|
+
focus: (event, view) => {},
|
|
41
|
+
blur: (event, view) => {
|
|
42
|
+
editing = false;
|
|
43
|
+
const value = view.state.doc.toString();
|
|
44
|
+
if (value !== content) {
|
|
45
|
+
onContentChange(value);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
}),
|
|
49
|
+
],
|
|
50
|
+
}),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
let editing: boolean = $state(false);
|
|
54
|
+
|
|
55
|
+
const codeMirror = (node: HTMLDivElement, content: string) => {
|
|
56
|
+
node.append(view.dom);
|
|
57
|
+
view.dispatch({
|
|
58
|
+
changes: {
|
|
59
|
+
insert: content.trim(),
|
|
60
|
+
from: 0,
|
|
61
|
+
to: view.state.doc.length,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
view.focus();
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
update(value: string) {
|
|
68
|
+
view.dispatch({
|
|
69
|
+
changes: {
|
|
70
|
+
insert: value.trim(),
|
|
71
|
+
from: 0,
|
|
72
|
+
to: view.state.doc.length,
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
destroy() {},
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
function enableEdit(evt: MouseEvent | FocusEvent) {
|
|
81
|
+
editing = evt instanceof MouseEvent ? (onEdit(evt) ?? true) : true;
|
|
82
|
+
if (!editing) return;
|
|
83
|
+
tick().then(() => {
|
|
84
|
+
setTimeout(() => {
|
|
85
|
+
view.focus();
|
|
86
|
+
const pos =
|
|
87
|
+
evt instanceof MouseEvent
|
|
88
|
+
? (view.posAtCoords({ x: evt.clientX, y: evt.clientY }) ?? 0)
|
|
89
|
+
: view.state.doc.length;
|
|
90
|
+
view.dispatch({ selection: { anchor: pos, head: pos } });
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
</script>
|
|
95
|
+
|
|
96
|
+
<div class={cn("table-cell-wrapper h-full w-full", className)}>
|
|
97
|
+
{#if editing}
|
|
98
|
+
<div
|
|
99
|
+
use:codeMirror={content}
|
|
100
|
+
class={cn(
|
|
101
|
+
"h-full w-full p-2 ring-[var(--background-modifier-border-focus)] focus-within:rounded-sm focus-within:ring-2",
|
|
102
|
+
className,
|
|
103
|
+
)}
|
|
104
|
+
></div>
|
|
105
|
+
{:else}
|
|
106
|
+
<div class={cn("relative h-full w-full p-2", className)}>
|
|
107
|
+
<div class="cm-editor cm-focused mod-inline">
|
|
108
|
+
<div class="cm-scroller">
|
|
109
|
+
<div class="cm-content">
|
|
110
|
+
{#if content}
|
|
111
|
+
<MarkdownPreview inline value={content} />
|
|
112
|
+
{:else}
|
|
113
|
+
 
|
|
114
|
+
{/if}
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
<button
|
|
119
|
+
type="button"
|
|
120
|
+
aria-label="Edit table cell"
|
|
121
|
+
onclick={(evt) => enableEdit(evt)}
|
|
122
|
+
onfocus={(evt) => enableEdit(evt)}
|
|
123
|
+
style="position: absolute; inset: 0; opacity: 0;"
|
|
124
|
+
></button>
|
|
125
|
+
</div>
|
|
126
|
+
{/if}
|
|
127
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
content: string;
|
|
3
|
+
class?: string;
|
|
4
|
+
onContentChange: (value: string) => void;
|
|
5
|
+
onEdit?: (evt: MouseEvent) => boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const GridEditorColumn: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type GridEditorColumn = ReturnType<typeof GridEditorColumn>;
|
|
9
|
+
export default GridEditorColumn;
|
|
10
|
+
//# sourceMappingURL=grid-editor-column.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-editor-column.svelte.d.ts","sourceRoot":"","sources":["../../src/tables/grid-editor-column.svelte.ts"],"names":[],"mappings":"AAWC,KAAK,gBAAgB,GAAI;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,OAAO,CAAC;CACvC,CAAC;AAmHJ,QAAA,MAAM,gBAAgB,sDAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-editor-column.test.d.ts","sourceRoot":"","sources":["../../src/tables/grid-editor-column.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { mount, tick, unmount } from "svelte";
|
|
2
|
+
import { describe, expect, it, vi } from "vitest";
|
|
3
|
+
import GridEditorColumn from "./grid-editor-column.svelte";
|
|
4
|
+
describe("GridEditorColumn", () => {
|
|
5
|
+
it("moves keyboard focus into the inline editor", async () => {
|
|
6
|
+
const target = document.createElement("div");
|
|
7
|
+
document.body.append(target);
|
|
8
|
+
const component = mount(GridEditorColumn, {
|
|
9
|
+
target,
|
|
10
|
+
props: {
|
|
11
|
+
content: "Feature",
|
|
12
|
+
onContentChange: vi.fn(),
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
await tick();
|
|
16
|
+
const trigger = target.querySelector('button[aria-label="Edit table cell"]');
|
|
17
|
+
expect(trigger).not.toBeNull();
|
|
18
|
+
trigger?.focus();
|
|
19
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
20
|
+
await tick();
|
|
21
|
+
const editor = target.querySelector(".cm-editor.mod-inline .cm-content[contenteditable='true']");
|
|
22
|
+
expect(editor).not.toBeNull();
|
|
23
|
+
expect(document.activeElement).toBe(editor);
|
|
24
|
+
await unmount(component);
|
|
25
|
+
target.remove();
|
|
26
|
+
});
|
|
27
|
+
});
|