@prosekit/extensions 0.12.2 → 0.14.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/dist/{drop-indicator-B1QHFb5m.js → drop-indicator-B_oMfeVP.js} +11 -10
- package/dist/drop-indicator-B_oMfeVP.js.map +1 -0
- package/dist/{enter-rule-CzWOZF_Z.js → enter-rule-D-p4ykfv.js} +1 -1
- package/dist/enter-rule-D-p4ykfv.js.map +1 -0
- package/dist/{file-DrfcSid-.js → file-iLVR0eM0.js} +3 -3
- package/dist/file-iLVR0eM0.js.map +1 -0
- package/dist/{index-oIc1a2f2.d.ts → index-cp1u4e0e.d.ts} +1 -1
- package/dist/index-cp1u4e0e.d.ts.map +1 -0
- package/dist/{input-rule-dmsb3j6w.js → input-rule-COGr_GBb.js} +1 -1
- package/dist/input-rule-COGr_GBb.js.map +1 -0
- package/dist/list/style.css +5 -5
- package/dist/list/style.css.map +1 -1
- package/dist/{mark-rule-BcLB4Uv2.js → mark-rule-CYe8zk4q.js} +6 -6
- package/dist/mark-rule-CYe8zk4q.js.map +1 -0
- package/dist/{paste-rule-pVb4sqvJ.js → paste-rule-BaDghcaU.js} +7 -7
- package/dist/paste-rule-BaDghcaU.js.map +1 -0
- package/dist/prosekit-extensions-autocomplete.d.ts +11 -3
- package/dist/prosekit-extensions-autocomplete.d.ts.map +1 -1
- package/dist/prosekit-extensions-autocomplete.js +171 -60
- package/dist/prosekit-extensions-autocomplete.js.map +1 -1
- package/dist/prosekit-extensions-background-color.d.ts +62 -0
- package/dist/prosekit-extensions-background-color.d.ts.map +1 -0
- package/dist/prosekit-extensions-background-color.js +76 -0
- package/dist/prosekit-extensions-background-color.js.map +1 -0
- package/dist/prosekit-extensions-blockquote.d.ts.map +1 -1
- package/dist/prosekit-extensions-blockquote.js +2 -2
- package/dist/prosekit-extensions-blockquote.js.map +1 -1
- package/dist/prosekit-extensions-bold.d.ts.map +1 -1
- package/dist/prosekit-extensions-bold.js +1 -1
- package/dist/prosekit-extensions-bold.js.map +1 -1
- package/dist/prosekit-extensions-code-block.d.ts +1 -1
- package/dist/prosekit-extensions-code-block.d.ts.map +1 -1
- package/dist/prosekit-extensions-code-block.js +4 -4
- package/dist/prosekit-extensions-code-block.js.map +1 -1
- package/dist/prosekit-extensions-code.d.ts.map +1 -1
- package/dist/prosekit-extensions-code.js +1 -1
- package/dist/prosekit-extensions-code.js.map +1 -1
- package/dist/prosekit-extensions-commit.d.ts +0 -1
- package/dist/prosekit-extensions-commit.d.ts.map +1 -1
- package/dist/prosekit-extensions-commit.js +1 -1
- package/dist/prosekit-extensions-commit.js.map +1 -1
- package/dist/prosekit-extensions-doc.d.ts +0 -1
- package/dist/prosekit-extensions-doc.d.ts.map +1 -1
- package/dist/prosekit-extensions-doc.js.map +1 -1
- package/dist/prosekit-extensions-drop-cursor.d.ts.map +1 -1
- package/dist/prosekit-extensions-drop-cursor.js.map +1 -1
- package/dist/prosekit-extensions-drop-indicator.d.ts +0 -1
- package/dist/prosekit-extensions-drop-indicator.d.ts.map +1 -1
- package/dist/prosekit-extensions-drop-indicator.js +1 -1
- package/dist/prosekit-extensions-enter-rule.d.ts +0 -1
- package/dist/prosekit-extensions-enter-rule.d.ts.map +1 -1
- package/dist/prosekit-extensions-enter-rule.js +1 -1
- package/dist/prosekit-extensions-file.d.ts +1 -1
- package/dist/prosekit-extensions-file.js +1 -1
- package/dist/prosekit-extensions-gap-cursor.d.ts +0 -1
- package/dist/prosekit-extensions-gap-cursor.d.ts.map +1 -1
- package/dist/prosekit-extensions-gap-cursor.js.map +1 -1
- package/dist/prosekit-extensions-hard-break.d.ts.map +1 -1
- package/dist/prosekit-extensions-hard-break.js.map +1 -1
- package/dist/prosekit-extensions-heading.d.ts.map +1 -1
- package/dist/prosekit-extensions-heading.js +7 -7
- package/dist/prosekit-extensions-heading.js.map +1 -1
- package/dist/prosekit-extensions-horizontal-rule.d.ts.map +1 -1
- package/dist/prosekit-extensions-horizontal-rule.js +1 -1
- package/dist/prosekit-extensions-horizontal-rule.js.map +1 -1
- package/dist/prosekit-extensions-image.d.ts +9 -2
- package/dist/prosekit-extensions-image.d.ts.map +1 -1
- package/dist/prosekit-extensions-image.js +17 -4
- package/dist/prosekit-extensions-image.js.map +1 -1
- package/dist/prosekit-extensions-input-rule.d.ts +0 -1
- package/dist/prosekit-extensions-input-rule.d.ts.map +1 -1
- package/dist/prosekit-extensions-input-rule.js +1 -1
- package/dist/prosekit-extensions-italic.d.ts.map +1 -1
- package/dist/prosekit-extensions-italic.js +1 -1
- package/dist/prosekit-extensions-italic.js.map +1 -1
- package/dist/prosekit-extensions-link.d.ts +0 -1
- package/dist/prosekit-extensions-link.d.ts.map +1 -1
- package/dist/prosekit-extensions-link.js +4 -4
- package/dist/prosekit-extensions-link.js.map +1 -1
- package/dist/prosekit-extensions-list.d.ts +0 -1
- package/dist/prosekit-extensions-list.d.ts.map +1 -1
- package/dist/prosekit-extensions-list.js +3 -3
- package/dist/prosekit-extensions-list.js.map +1 -1
- package/dist/prosekit-extensions-loro.d.ts +16 -17
- package/dist/prosekit-extensions-loro.d.ts.map +1 -1
- package/dist/prosekit-extensions-loro.js +14 -7
- package/dist/prosekit-extensions-loro.js.map +1 -1
- package/dist/prosekit-extensions-mark-rule.d.ts +0 -1
- package/dist/prosekit-extensions-mark-rule.d.ts.map +1 -1
- package/dist/prosekit-extensions-mark-rule.js +1 -1
- package/dist/prosekit-extensions-mention.d.ts.map +1 -1
- package/dist/prosekit-extensions-mention.js.map +1 -1
- package/dist/prosekit-extensions-mod-click-prevention.d.ts +0 -1
- package/dist/prosekit-extensions-mod-click-prevention.d.ts.map +1 -1
- package/dist/prosekit-extensions-mod-click-prevention.js.map +1 -1
- package/dist/prosekit-extensions-paragraph.d.ts.map +1 -1
- package/dist/prosekit-extensions-paragraph.js +1 -1
- package/dist/prosekit-extensions-paragraph.js.map +1 -1
- package/dist/prosekit-extensions-paste-rule.d.ts +0 -1
- package/dist/prosekit-extensions-paste-rule.d.ts.map +1 -1
- package/dist/prosekit-extensions-paste-rule.js +1 -1
- package/dist/prosekit-extensions-placeholder.d.ts.map +1 -1
- package/dist/prosekit-extensions-placeholder.js +3 -4
- package/dist/prosekit-extensions-placeholder.js.map +1 -1
- package/dist/prosekit-extensions-readonly.d.ts +0 -1
- package/dist/prosekit-extensions-readonly.d.ts.map +1 -1
- package/dist/prosekit-extensions-readonly.js.map +1 -1
- package/dist/prosekit-extensions-search.d.ts +0 -1
- package/dist/prosekit-extensions-search.d.ts.map +1 -1
- package/dist/prosekit-extensions-search.js.map +1 -1
- package/dist/prosekit-extensions-strike.d.ts +0 -1
- package/dist/prosekit-extensions-strike.d.ts.map +1 -1
- package/dist/prosekit-extensions-strike.js +3 -3
- package/dist/prosekit-extensions-strike.js.map +1 -1
- package/dist/prosekit-extensions-table.d.ts.map +1 -1
- package/dist/prosekit-extensions-table.js +1 -2
- package/dist/prosekit-extensions-text-align.d.ts +0 -1
- package/dist/prosekit-extensions-text-align.d.ts.map +1 -1
- package/dist/prosekit-extensions-text-align.js +6 -6
- package/dist/prosekit-extensions-text-align.js.map +1 -1
- package/dist/prosekit-extensions-text-color.d.ts +62 -0
- package/dist/prosekit-extensions-text-color.d.ts.map +1 -0
- package/dist/prosekit-extensions-text-color.js +76 -0
- package/dist/prosekit-extensions-text-color.js.map +1 -0
- package/dist/prosekit-extensions-text.d.ts +0 -1
- package/dist/prosekit-extensions-text.d.ts.map +1 -1
- package/dist/prosekit-extensions-text.js.map +1 -1
- package/dist/prosekit-extensions-underline.d.ts +0 -1
- package/dist/prosekit-extensions-underline.d.ts.map +1 -1
- package/dist/prosekit-extensions-virtual-selection.d.ts +0 -1
- package/dist/prosekit-extensions-virtual-selection.d.ts.map +1 -1
- package/dist/prosekit-extensions-virtual-selection.js.map +1 -1
- package/dist/prosekit-extensions-yjs.d.ts +9 -2
- package/dist/prosekit-extensions-yjs.d.ts.map +1 -1
- package/dist/prosekit-extensions-yjs.js +1 -1
- package/dist/prosekit-extensions-yjs.js.map +1 -1
- package/dist/{shiki-highlighter-chunk-rkzofy4z.d.ts → shiki-highlighter-chunk-DNNm2Vow.d.ts} +1 -1
- package/dist/shiki-highlighter-chunk-DNNm2Vow.d.ts.map +1 -0
- package/dist/shiki-highlighter-chunk.d.ts +1 -1
- package/dist/shiki-highlighter-chunk.js.map +1 -1
- package/dist/{table-BRDh_9mG.js → table-4oHfV-Ql.js} +2 -2
- package/dist/table-4oHfV-Ql.js.map +1 -0
- package/package.json +33 -18
- package/src/autocomplete/autocomplete-helpers.ts +19 -14
- package/src/autocomplete/autocomplete-plugin.ts +260 -126
- package/src/autocomplete/autocomplete-rule.ts +3 -3
- package/src/autocomplete/autocomplete.spec.ts +244 -40
- package/src/autocomplete/autocomplete.ts +9 -7
- package/src/background-color/background-color-commands.spec.ts +71 -0
- package/src/background-color/background-color-commands.ts +35 -0
- package/src/background-color/background-color-spec.spec.ts +286 -0
- package/src/background-color/background-color-spec.ts +58 -0
- package/src/background-color/background-color.ts +21 -0
- package/src/background-color/index.ts +8 -0
- package/src/blockquote/blockquote-commands.ts +1 -7
- package/src/blockquote/blockquote-keymap.spec.ts +5 -9
- package/src/blockquote/blockquote-keymap.ts +2 -7
- package/src/blockquote/blockquote-spec.ts +1 -4
- package/src/blockquote/blockquote.ts +3 -12
- package/src/blockquote/index.ts +3 -12
- package/src/bold/bold-commands.ts +1 -5
- package/src/bold/bold-input-rule.spec.ts +1 -5
- package/src/bold/bold-input-rule.ts +1 -4
- package/src/bold/bold-keymap.ts +1 -5
- package/src/bold/bold-spec.ts +1 -4
- package/src/bold/bold.ts +3 -12
- package/src/bold/index.ts +3 -12
- package/src/code/code-commands.ts +1 -5
- package/src/code/code-input-rule.ts +1 -4
- package/src/code/code-keymap.ts +1 -5
- package/src/code/code-spec.ts +1 -4
- package/src/code/code.ts +3 -12
- package/src/code/index.ts +3 -12
- package/src/code-block/code-block-commands.ts +1 -8
- package/src/code-block/code-block-highlight.ts +2 -8
- package/src/code-block/code-block-keymap.ts +2 -9
- package/src/code-block/code-block-shiki.ts +1 -4
- package/src/code-block/code-block-spec.spec.ts +4 -11
- package/src/code-block/code-block-spec.ts +1 -4
- package/src/code-block/code-block.ts +4 -16
- package/src/code-block/index.ts +5 -21
- package/src/code-block/shiki-highlighter-chunk.ts +1 -7
- package/src/code-block/shiki-highlighter.ts +1 -4
- package/src/code-block/shiki-parser.ts +1 -4
- package/src/commit/index.ts +7 -36
- package/src/doc/index.ts +1 -4
- package/src/drop-cursor/drop-cursor.ts +1 -4
- package/src/drop-cursor/index.ts +1 -5
- package/src/drop-indicator/drop-indicator-facet.ts +12 -21
- package/src/drop-indicator/index.ts +1 -5
- package/src/enter-rule/index.ts +2 -11
- package/src/file/file-paste-handler.spec.ts +3 -16
- package/src/file/index.ts +3 -16
- package/src/gap-cursor/gap-cursor.ts +1 -4
- package/src/gap-cursor/index.ts +1 -4
- package/src/hard-break/hard-break-commands.ts +1 -5
- package/src/hard-break/hard-break-keymap.spec.ts +6 -12
- package/src/hard-break/hard-break-keymap.ts +1 -4
- package/src/hard-break/hard-break-spec.ts +1 -4
- package/src/hard-break/hard-break.ts +3 -12
- package/src/hard-break/index.ts +3 -12
- package/src/heading/heading-commands.ts +1 -7
- package/src/heading/heading-keymap.spec.ts +8 -12
- package/src/heading/heading-keymap.ts +7 -14
- package/src/heading/heading-spec.ts +1 -4
- package/src/heading/heading.ts +3 -12
- package/src/heading/index.ts +3 -12
- package/src/horizontal-rule/horizontal-rule-commands.spec.ts +1 -5
- package/src/horizontal-rule/horizontal-rule-commands.ts +2 -9
- package/src/horizontal-rule/horizontal-rule-input-rule.spec.ts +5 -9
- package/src/horizontal-rule/horizontal-rule-input-rule.ts +1 -5
- package/src/horizontal-rule/horizontal-rule-spec.ts +1 -4
- package/src/horizontal-rule/horizontal-rule.ts +3 -12
- package/src/horizontal-rule/index.ts +3 -13
- package/src/image/image-commands/upload-image.spec.ts +245 -0
- package/src/image/image-commands/upload-image.ts +46 -11
- package/src/image/image-commands.ts +2 -8
- package/src/image/image-spec.ts +1 -4
- package/src/image/image-upload-handler.ts +2 -8
- package/src/image/image.ts +3 -12
- package/src/image/index.ts +3 -13
- package/src/input-rule/index.ts +2 -13
- package/src/italic/index.ts +3 -12
- package/src/italic/italic-commands.spec.ts +2 -10
- package/src/italic/italic-commands.ts +1 -5
- package/src/italic/italic-input-rule.spec.ts +1 -5
- package/src/italic/italic-input-rule.ts +1 -4
- package/src/italic/italic-keymap.ts +1 -5
- package/src/italic/italic-spec.ts +1 -4
- package/src/italic/italic.ts +3 -12
- package/src/link/index.spec.ts +10 -13
- package/src/link/index.ts +1 -5
- package/src/link/link-paste-rule.spec.ts +2 -9
- package/src/link/link-regex.spec.ts +1 -5
- package/src/list/index.ts +3 -12
- package/src/list/list-commands.ts +1 -5
- package/src/list/list-input-rules.ts +1 -4
- package/src/list/list-keymap.spec.ts +6 -10
- package/src/list/list-keymap.ts +2 -8
- package/src/list/list-plugins.ts +1 -4
- package/src/list/list-serializer.ts +2 -9
- package/src/list/list-spec.ts +3 -13
- package/src/list/list.spec.ts +10 -21
- package/src/list/list.ts +3 -12
- package/src/list/style.css +5 -5
- package/src/loro/index.ts +3 -13
- package/src/loro/loro-commands.ts +2 -8
- package/src/loro/loro-cursor-plugin.ts +21 -21
- package/src/loro/loro-keymap.ts +3 -11
- package/src/loro/loro-sync-plugin.ts +2 -8
- package/src/loro/loro-undo-plugin.ts +2 -8
- package/src/loro/loro.ts +16 -21
- package/src/mark-rule/apply.ts +3 -13
- package/src/mark-rule/mark-rule.spec.ts +2 -13
- package/src/mark-rule/mark-rule.ts +2 -13
- package/src/mark-rule/range.ts +2 -8
- package/src/mark-rule/types.ts +1 -4
- package/src/mention/index.ts +1 -8
- package/src/mod-click-prevention/index.ts +2 -9
- package/src/paragraph/paragraph-commands.ts +1 -5
- package/src/paragraph/paragraph-keymap.ts +2 -5
- package/src/paragraph/paragraph-spec.ts +1 -4
- package/src/paragraph/paragraph.ts +3 -14
- package/src/paste-rule/index.ts +2 -10
- package/src/paste-rule/mark-paste-rule.spec.ts +3 -13
- package/src/paste-rule/mark-paste-rule.ts +4 -14
- package/src/paste-rule/paste-rule-plugin.ts +2 -11
- package/src/paste-rule/paste-rule.spec.ts +4 -19
- package/src/paste-rule/split-text-by-regex.spec.ts +1 -5
- package/src/placeholder/index.ts +4 -16
- package/src/readonly/index.ts +2 -8
- package/src/search/index.ts +1 -6
- package/src/strike/index.ts +2 -2
- package/src/table/index.ts +10 -40
- package/src/table/table-commands/delete-cell-selection.spec.ts +1 -5
- package/src/table/table-commands/exit-table.spec.ts +1 -5
- package/src/table/table-commands/insert-table.spec.ts +1 -5
- package/src/table/table-commands/insert-table.ts +1 -4
- package/src/table/table-commands/move-table-column.spec.ts +1 -5
- package/src/table/table-commands/move-table-column.ts +1 -4
- package/src/table/table-commands/move-table-row.spec.ts +1 -5
- package/src/table/table-commands/move-table-row.ts +1 -4
- package/src/table/table-commands/select-table-cell.spec.ts +1 -5
- package/src/table/table-commands/select-table-column.spec.ts +1 -5
- package/src/table/table-commands/select-table-row.spec.ts +1 -5
- package/src/table/table-commands/select-table.spec.ts +1 -5
- package/src/table/table-commands/select-table.ts +1 -4
- package/src/table/table-commands.ts +8 -32
- package/src/table/table-plugins.ts +2 -8
- package/src/table/table-spec.spec.ts +2 -11
- package/src/table/table-spec.ts +2 -8
- package/src/table/table-utils.ts +2 -6
- package/src/table/table.ts +2 -8
- package/src/table/test-utils.ts +1 -4
- package/src/testing/clipboard.ts +1 -2
- package/src/testing/index.ts +9 -14
- package/src/testing/keyboard.ts +0 -30
- package/src/text/index.ts +1 -4
- package/src/text-align/index.ts +6 -6
- package/src/text-color/index.ts +3 -0
- package/src/text-color/text-color-commands.spec.ts +71 -0
- package/src/text-color/text-color-commands.ts +35 -0
- package/src/text-color/text-color-spec.spec.ts +297 -0
- package/src/text-color/text-color-spec.ts +58 -0
- package/src/text-color/text-color.ts +21 -0
- package/src/virtual-selection/index.ts +3 -14
- package/src/yjs/index.ts +5 -20
- package/src/yjs/yjs-commands.ts +2 -8
- package/src/yjs/yjs-cursor-plugin.ts +3 -5
- package/src/yjs/yjs-keymap.ts +3 -11
- package/src/yjs/yjs-sync-plugin.ts +1 -4
- package/src/yjs/yjs-types.ts +10 -0
- package/src/yjs/yjs-undo-plugin.ts +2 -8
- package/src/yjs/yjs.ts +6 -24
- package/dist/drop-indicator-B1QHFb5m.js.map +0 -1
- package/dist/enter-rule-CzWOZF_Z.js.map +0 -1
- package/dist/file-DrfcSid-.js.map +0 -1
- package/dist/index-oIc1a2f2.d.ts.map +0 -1
- package/dist/input-rule-dmsb3j6w.js.map +0 -1
- package/dist/mark-rule-BcLB4Uv2.js.map +0 -1
- package/dist/paste-rule-pVb4sqvJ.js.map +0 -1
- package/dist/shiki-highlighter-chunk-rkzofy4z.d.ts.map +0 -1
- package/dist/table-BRDh_9mG.js.map +0 -1
- package/src/testing/format-html.ts +0 -5
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { formatHTML } from 'diffable-html-snapshot'
|
|
2
|
+
import { describe, expect, it } from 'vitest'
|
|
3
|
+
|
|
4
|
+
import { setupTest } from '../testing'
|
|
5
|
+
|
|
6
|
+
describe('defineBackgroundColorSpec', () => {
|
|
7
|
+
it('should render background color as inline span with style attribute', () => {
|
|
8
|
+
const { editor, n, m } = setupTest()
|
|
9
|
+
|
|
10
|
+
const doc = n.doc(
|
|
11
|
+
n.p(
|
|
12
|
+
'Default',
|
|
13
|
+
m.backgroundColor({ color: '#0000ff' }, 'hex'),
|
|
14
|
+
m.backgroundColor({ color: 'blue' }, 'named'),
|
|
15
|
+
m.backgroundColor({ color: 'rgb(0, 0, 255)' }, 'rgb'),
|
|
16
|
+
m.backgroundColor({ color: 'rgba(0 0 255 / 0.5)' }, 'rgba'),
|
|
17
|
+
m.backgroundColor({ color: 'hsl(240 100% 50% / 0.5)' }, 'hsl'),
|
|
18
|
+
m.backgroundColor({ color: 'var(--color-variable)' }, 'variable'),
|
|
19
|
+
),
|
|
20
|
+
)
|
|
21
|
+
editor.set(doc)
|
|
22
|
+
expect(formatHTML(editor.view.dom.innerHTML)).toMatchInlineSnapshot(
|
|
23
|
+
`
|
|
24
|
+
"
|
|
25
|
+
<p>
|
|
26
|
+
Default
|
|
27
|
+
<span
|
|
28
|
+
data-background-color="#0000ff"
|
|
29
|
+
style="background-color: rgb(0, 0, 255);"
|
|
30
|
+
>
|
|
31
|
+
hex
|
|
32
|
+
</span>
|
|
33
|
+
<span
|
|
34
|
+
data-background-color="blue"
|
|
35
|
+
style="background-color: blue;"
|
|
36
|
+
>
|
|
37
|
+
named
|
|
38
|
+
</span>
|
|
39
|
+
<span
|
|
40
|
+
data-background-color="rgb(0, 0, 255)"
|
|
41
|
+
style="background-color: rgb(0, 0, 255);"
|
|
42
|
+
>
|
|
43
|
+
rgb
|
|
44
|
+
</span>
|
|
45
|
+
<span
|
|
46
|
+
data-background-color="rgba(0 0 255 / 0.5)"
|
|
47
|
+
style="background-color: rgba(0, 0, 255, 0.5);"
|
|
48
|
+
>
|
|
49
|
+
rgba
|
|
50
|
+
</span>
|
|
51
|
+
<span
|
|
52
|
+
data-background-color="hsl(240 100% 50% / 0.5)"
|
|
53
|
+
style="background-color: rgba(0, 0, 255, 0.5);"
|
|
54
|
+
>
|
|
55
|
+
hsl
|
|
56
|
+
</span>
|
|
57
|
+
<span
|
|
58
|
+
data-background-color="var(--color-variable)"
|
|
59
|
+
style="background-color: var(--color-variable);"
|
|
60
|
+
>
|
|
61
|
+
variable
|
|
62
|
+
</span>
|
|
63
|
+
</p>
|
|
64
|
+
"
|
|
65
|
+
`,
|
|
66
|
+
)
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
it('should parse background color from style attribute', () => {
|
|
70
|
+
const { editor } = setupTest()
|
|
71
|
+
|
|
72
|
+
const html = `<p><span style="background-color: #0000ff;">text</span></p>`
|
|
73
|
+
editor.setContent(html)
|
|
74
|
+
expect(editor.state.doc.firstChild?.firstChild?.toJSON()).toMatchInlineSnapshot(`
|
|
75
|
+
{
|
|
76
|
+
"marks": [
|
|
77
|
+
{
|
|
78
|
+
"attrs": {
|
|
79
|
+
"color": "rgb(0, 0, 255)",
|
|
80
|
+
},
|
|
81
|
+
"type": "backgroundColor",
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
"text": "text",
|
|
85
|
+
"type": "text",
|
|
86
|
+
}
|
|
87
|
+
`)
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
it('should parse background color from data-background-color attribute', () => {
|
|
91
|
+
const { editor } = setupTest()
|
|
92
|
+
|
|
93
|
+
const html = `<p><span data-background-color="rgb(0 0 255 / 0.5)">text</span></p>`
|
|
94
|
+
editor.setContent(html)
|
|
95
|
+
expect(editor.state.doc.firstChild?.firstChild?.toJSON()).toMatchInlineSnapshot(`
|
|
96
|
+
{
|
|
97
|
+
"marks": [
|
|
98
|
+
{
|
|
99
|
+
"attrs": {
|
|
100
|
+
"color": "rgb(0 0 255 / 0.5)",
|
|
101
|
+
},
|
|
102
|
+
"type": "backgroundColor",
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
"text": "text",
|
|
106
|
+
"type": "text",
|
|
107
|
+
}
|
|
108
|
+
`)
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
it('should prioritize data-background-color attribute over style attribute', () => {
|
|
112
|
+
const { editor } = setupTest()
|
|
113
|
+
|
|
114
|
+
const html = `<p><span style="background-color: blue;" data-background-color="red">This should be red</span></p>`
|
|
115
|
+
editor.setContent(html)
|
|
116
|
+
expect(editor.state.doc.firstChild?.firstChild?.toJSON()).toMatchInlineSnapshot(`
|
|
117
|
+
{
|
|
118
|
+
"marks": [
|
|
119
|
+
{
|
|
120
|
+
"attrs": {
|
|
121
|
+
"color": "red",
|
|
122
|
+
},
|
|
123
|
+
"type": "backgroundColor",
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
"text": "This should be red",
|
|
127
|
+
"type": "text",
|
|
128
|
+
}
|
|
129
|
+
`)
|
|
130
|
+
})
|
|
131
|
+
|
|
132
|
+
it('should not parse span with background-color: inherit', () => {
|
|
133
|
+
const { editor } = setupTest()
|
|
134
|
+
|
|
135
|
+
const html = '<p><span style="background-color: inherit">text</span></p>'
|
|
136
|
+
editor.setContent(html)
|
|
137
|
+
expect(editor.state.doc.firstChild?.firstChild?.toJSON()).toMatchInlineSnapshot(`
|
|
138
|
+
{
|
|
139
|
+
"text": "text",
|
|
140
|
+
"type": "text",
|
|
141
|
+
}
|
|
142
|
+
`)
|
|
143
|
+
|
|
144
|
+
const html2 = '<p><span data-background-color="inherit">text</span></p>'
|
|
145
|
+
editor.setContent(html2)
|
|
146
|
+
expect(editor.state.doc.firstChild?.firstChild?.toJSON()).toMatchInlineSnapshot(`
|
|
147
|
+
{
|
|
148
|
+
"text": "text",
|
|
149
|
+
"type": "text",
|
|
150
|
+
}
|
|
151
|
+
`)
|
|
152
|
+
})
|
|
153
|
+
|
|
154
|
+
it('should preserve both background-color and text-color marks', () => {
|
|
155
|
+
const { editor, n, m } = setupTest()
|
|
156
|
+
|
|
157
|
+
const doc = n.doc(
|
|
158
|
+
n.p(
|
|
159
|
+
m.backgroundColor(
|
|
160
|
+
{ color: 'yellow' },
|
|
161
|
+
m.textColor({ color: 'red' }, 'colored text'),
|
|
162
|
+
),
|
|
163
|
+
),
|
|
164
|
+
)
|
|
165
|
+
editor.set(doc)
|
|
166
|
+
expect(formatHTML(editor.view.dom.innerHTML)).toMatchInlineSnapshot(
|
|
167
|
+
`
|
|
168
|
+
"
|
|
169
|
+
<p>
|
|
170
|
+
<span
|
|
171
|
+
data-background-color="yellow"
|
|
172
|
+
style="background-color: yellow;"
|
|
173
|
+
>
|
|
174
|
+
<span
|
|
175
|
+
data-text-color="red"
|
|
176
|
+
style="color: red;"
|
|
177
|
+
>
|
|
178
|
+
colored text
|
|
179
|
+
</span>
|
|
180
|
+
</span>
|
|
181
|
+
</p>
|
|
182
|
+
"
|
|
183
|
+
`,
|
|
184
|
+
)
|
|
185
|
+
})
|
|
186
|
+
|
|
187
|
+
it('should preserve background-color mark when parsing HTML with both marks', () => {
|
|
188
|
+
const { editor } = setupTest()
|
|
189
|
+
|
|
190
|
+
const html = '<p>'
|
|
191
|
+
+ '<span style="background-color: yellow;">'
|
|
192
|
+
+ '<span style="color: red;">colored text</span>'
|
|
193
|
+
+ '</span>'
|
|
194
|
+
+ '</p>'
|
|
195
|
+
|
|
196
|
+
editor.setContent(html)
|
|
197
|
+
expect(editor.state.doc.firstChild?.firstChild?.toJSON()).toMatchInlineSnapshot(`
|
|
198
|
+
{
|
|
199
|
+
"marks": [
|
|
200
|
+
{
|
|
201
|
+
"attrs": {
|
|
202
|
+
"color": "yellow",
|
|
203
|
+
},
|
|
204
|
+
"type": "backgroundColor",
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"attrs": {
|
|
208
|
+
"color": "red",
|
|
209
|
+
},
|
|
210
|
+
"type": "textColor",
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
"text": "colored text",
|
|
214
|
+
"type": "text",
|
|
215
|
+
}
|
|
216
|
+
`)
|
|
217
|
+
})
|
|
218
|
+
|
|
219
|
+
it('should handle background color on partial text selection', () => {
|
|
220
|
+
const { editor, n, m } = setupTest()
|
|
221
|
+
|
|
222
|
+
const doc = n.doc(
|
|
223
|
+
n.p(
|
|
224
|
+
'Start ',
|
|
225
|
+
m.backgroundColor({ color: 'yellow' }, 'highlighted'),
|
|
226
|
+
' end',
|
|
227
|
+
),
|
|
228
|
+
)
|
|
229
|
+
editor.set(doc)
|
|
230
|
+
expect(formatHTML(editor.view.dom.innerHTML)).toMatchInlineSnapshot(
|
|
231
|
+
`
|
|
232
|
+
"
|
|
233
|
+
<p>
|
|
234
|
+
Start
|
|
235
|
+
<span
|
|
236
|
+
data-background-color="yellow"
|
|
237
|
+
style="background-color: yellow;"
|
|
238
|
+
>
|
|
239
|
+
highlighted
|
|
240
|
+
</span>
|
|
241
|
+
end
|
|
242
|
+
</p>
|
|
243
|
+
"
|
|
244
|
+
`,
|
|
245
|
+
)
|
|
246
|
+
})
|
|
247
|
+
|
|
248
|
+
it('should handle multiple adjacent background colors', () => {
|
|
249
|
+
const { editor, n, m } = setupTest()
|
|
250
|
+
|
|
251
|
+
const doc = n.doc(
|
|
252
|
+
n.p(
|
|
253
|
+
m.backgroundColor({ color: 'yellow' }, 'yellow'),
|
|
254
|
+
m.backgroundColor({ color: 'green' }, 'green'),
|
|
255
|
+
m.backgroundColor({ color: 'blue' }, 'blue'),
|
|
256
|
+
),
|
|
257
|
+
)
|
|
258
|
+
editor.set(doc)
|
|
259
|
+
expect(formatHTML(editor.view.dom.innerHTML)).toMatchInlineSnapshot(
|
|
260
|
+
`
|
|
261
|
+
"
|
|
262
|
+
<p>
|
|
263
|
+
<span
|
|
264
|
+
data-background-color="yellow"
|
|
265
|
+
style="background-color: yellow;"
|
|
266
|
+
>
|
|
267
|
+
yellow
|
|
268
|
+
</span>
|
|
269
|
+
<span
|
|
270
|
+
data-background-color="green"
|
|
271
|
+
style="background-color: green;"
|
|
272
|
+
>
|
|
273
|
+
green
|
|
274
|
+
</span>
|
|
275
|
+
<span
|
|
276
|
+
data-background-color="blue"
|
|
277
|
+
style="background-color: blue;"
|
|
278
|
+
>
|
|
279
|
+
blue
|
|
280
|
+
</span>
|
|
281
|
+
</p>
|
|
282
|
+
"
|
|
283
|
+
`,
|
|
284
|
+
)
|
|
285
|
+
})
|
|
286
|
+
})
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineMarkSpec, type Extension } from '@prosekit/core'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Attributes for the `backgroundColor` mark.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface BackgroundColorAttrs {
|
|
9
|
+
color: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export type BackgroundColorSpecExtension = Extension<{
|
|
16
|
+
Marks: {
|
|
17
|
+
backgroundColor: BackgroundColorAttrs
|
|
18
|
+
}
|
|
19
|
+
}>
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export function defineBackgroundColorSpec(): BackgroundColorSpecExtension {
|
|
25
|
+
return defineMarkSpec<'backgroundColor', BackgroundColorAttrs>({
|
|
26
|
+
name: 'backgroundColor',
|
|
27
|
+
attrs: {
|
|
28
|
+
color: {
|
|
29
|
+
validate: 'string',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
parseDOM: [
|
|
33
|
+
{
|
|
34
|
+
tag: ':where([style*="background-color:"], [data-background-color])',
|
|
35
|
+
getAttrs: (node): BackgroundColorAttrs | false => {
|
|
36
|
+
// When both `data-background-color` and `style="background-color"` are present, we
|
|
37
|
+
// prioritize the `data-background-color` attribute. This avoids the
|
|
38
|
+
// browser's default behavior of changing hex colors to rgba in style
|
|
39
|
+
// attribute.
|
|
40
|
+
const value = node.getAttribute('data-background-color')
|
|
41
|
+
if (value && value !== 'inherit') {
|
|
42
|
+
return { color: value }
|
|
43
|
+
}
|
|
44
|
+
const color = node.style.backgroundColor
|
|
45
|
+
if (color && color !== 'inherit') {
|
|
46
|
+
return { color }
|
|
47
|
+
}
|
|
48
|
+
return false
|
|
49
|
+
},
|
|
50
|
+
consuming: false,
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
toDOM(mark) {
|
|
54
|
+
const color = (mark.attrs as BackgroundColorAttrs).color
|
|
55
|
+
return ['span', { 'style': `background-color: ${color};`, 'data-background-color': color }, 0]
|
|
56
|
+
},
|
|
57
|
+
})
|
|
58
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { union, type Union } from '@prosekit/core'
|
|
2
|
+
|
|
3
|
+
import { defineBackgroundColorCommands, type BackgroundColorCommandsExtension } from './background-color-commands'
|
|
4
|
+
import { defineBackgroundColorSpec, type BackgroundColorSpecExtension } from './background-color-spec'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export type BackgroundColorExtension = Union<[BackgroundColorSpecExtension, BackgroundColorCommandsExtension]>
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Defines the `backgroundColor` mark and some commands for it.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export function defineBackgroundColor(): BackgroundColorExtension {
|
|
17
|
+
return union(
|
|
18
|
+
defineBackgroundColorSpec(),
|
|
19
|
+
defineBackgroundColorCommands(),
|
|
20
|
+
)
|
|
21
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { defineBackgroundColor, type BackgroundColorExtension } from './background-color'
|
|
2
|
+
export {
|
|
3
|
+
addBackgroundColor,
|
|
4
|
+
defineBackgroundColorCommands,
|
|
5
|
+
removeBackgroundColor,
|
|
6
|
+
type BackgroundColorCommandsExtension,
|
|
7
|
+
} from './background-color-commands'
|
|
8
|
+
export { defineBackgroundColorSpec, type BackgroundColorAttrs, type BackgroundColorSpecExtension } from './background-color-spec'
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
defineCommands,
|
|
3
|
-
insertNode,
|
|
4
|
-
toggleWrap,
|
|
5
|
-
wrap,
|
|
6
|
-
type Extension,
|
|
7
|
-
} from '@prosekit/core'
|
|
1
|
+
import { defineCommands, insertNode, toggleWrap, wrap, type Extension } from '@prosekit/core'
|
|
8
2
|
|
|
9
3
|
export type BlockquoteCommandsExtension = Extension<{
|
|
10
4
|
Commands: {
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
expect,
|
|
4
|
-
it,
|
|
5
|
-
} from 'vitest'
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import { keyboard } from 'vitest-browser-commands/playwright'
|
|
6
3
|
|
|
7
4
|
import { setupTest } from '../testing'
|
|
8
|
-
import { pressKey } from '../testing/keyboard'
|
|
9
5
|
|
|
10
6
|
describe('blockquote keymap', () => {
|
|
11
7
|
it('should wrap paragraph into blockquote with shortcut', async () => {
|
|
@@ -14,7 +10,7 @@ describe('blockquote keymap', () => {
|
|
|
14
10
|
const doc1 = n.doc(n.p('hel<a>lo'))
|
|
15
11
|
editor.set(doc1)
|
|
16
12
|
|
|
17
|
-
await
|
|
13
|
+
await keyboard.press('ControlOrMeta+Shift+B')
|
|
18
14
|
|
|
19
15
|
const doc2 = n.doc(n.blockquote(n.p('hello')))
|
|
20
16
|
expect(editor.state.doc.toJSON()).toEqual(doc2.toJSON())
|
|
@@ -25,7 +21,7 @@ describe('blockquote keymap', () => {
|
|
|
25
21
|
const doc1 = n.doc(n.blockquote(n.p('hello')))
|
|
26
22
|
editor.set(doc1)
|
|
27
23
|
|
|
28
|
-
await
|
|
24
|
+
await keyboard.press('ControlOrMeta+Shift+B')
|
|
29
25
|
|
|
30
26
|
const doc2 = n.doc(n.p('hello'))
|
|
31
27
|
expect(editor.state.doc.toJSON()).toEqual(doc2.toJSON())
|
|
@@ -37,7 +33,7 @@ describe('blockquote keymap', () => {
|
|
|
37
33
|
|
|
38
34
|
editor.set(doc1)
|
|
39
35
|
|
|
40
|
-
await
|
|
36
|
+
await keyboard.press('Backspace')
|
|
41
37
|
|
|
42
38
|
const doc2 = n.doc(n.p('hello'))
|
|
43
39
|
expect(editor.state.doc.toJSON()).toEqual(doc2.toJSON())
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
defineKeymap,
|
|
3
|
-
isAtBlockStart,
|
|
4
|
-
toggleWrap,
|
|
5
|
-
type PlainExtension,
|
|
6
|
-
} from '@prosekit/core'
|
|
1
|
+
import { defineKeymap, isAtBlockStart, toggleWrap, type PlainExtension } from '@prosekit/core'
|
|
7
2
|
import { joinBackward } from '@prosekit/pm/commands'
|
|
8
3
|
import type { Command } from '@prosekit/pm/state'
|
|
9
4
|
|
|
@@ -25,7 +20,7 @@ function backspaceUnsetBlockquote(): Command {
|
|
|
25
20
|
*/
|
|
26
21
|
export function defineBlockquoteKeymap(): PlainExtension {
|
|
27
22
|
return defineKeymap({
|
|
28
|
-
'
|
|
23
|
+
'Mod-B': toggleBlockquoteKeybinding(),
|
|
29
24
|
'Backspace': backspaceUnsetBlockquote(),
|
|
30
25
|
})
|
|
31
26
|
}
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
union,
|
|
3
|
-
type Union,
|
|
4
|
-
} from '@prosekit/core'
|
|
1
|
+
import { union, type Union } from '@prosekit/core'
|
|
5
2
|
|
|
6
|
-
import {
|
|
7
|
-
defineBlockquoteCommands,
|
|
8
|
-
type BlockquoteCommandsExtension,
|
|
9
|
-
} from './blockquote-commands'
|
|
3
|
+
import { defineBlockquoteCommands, type BlockquoteCommandsExtension } from './blockquote-commands'
|
|
10
4
|
import { defineBlockquoteInputRule } from './blockquote-input-rule'
|
|
11
5
|
import { defineBlockquoteKeymap } from './blockquote-keymap'
|
|
12
|
-
import {
|
|
13
|
-
defineBlockquoteSpec,
|
|
14
|
-
type BlockquoteSpecExtension,
|
|
15
|
-
} from './blockquote-spec'
|
|
6
|
+
import { defineBlockquoteSpec, type BlockquoteSpecExtension } from './blockquote-spec'
|
|
16
7
|
|
|
17
8
|
/**
|
|
18
9
|
* @internal
|
package/src/blockquote/index.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
type BlockquoteExtension,
|
|
4
|
-
} from './blockquote'
|
|
5
|
-
export {
|
|
6
|
-
defineBlockquoteCommands,
|
|
7
|
-
type BlockquoteCommandsExtension,
|
|
8
|
-
} from './blockquote-commands'
|
|
1
|
+
export { defineBlockquote, type BlockquoteExtension } from './blockquote'
|
|
2
|
+
export { defineBlockquoteCommands, type BlockquoteCommandsExtension } from './blockquote-commands'
|
|
9
3
|
export { defineBlockquoteInputRule } from './blockquote-input-rule'
|
|
10
4
|
export { defineBlockquoteKeymap } from './blockquote-keymap'
|
|
11
|
-
export {
|
|
12
|
-
defineBlockquoteSpec,
|
|
13
|
-
type BlockquoteSpecExtension,
|
|
14
|
-
} from './blockquote-spec'
|
|
5
|
+
export { defineBlockquoteSpec, type BlockquoteSpecExtension } from './blockquote-spec'
|
package/src/bold/bold-keymap.ts
CHANGED
package/src/bold/bold-spec.ts
CHANGED
package/src/bold/bold.ts
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
union,
|
|
3
|
-
type Union,
|
|
4
|
-
} from '@prosekit/core'
|
|
1
|
+
import { union, type Union } from '@prosekit/core'
|
|
5
2
|
|
|
6
|
-
import {
|
|
7
|
-
defineBoldCommands,
|
|
8
|
-
type BoldCommandsExtension,
|
|
9
|
-
} from './bold-commands'
|
|
3
|
+
import { defineBoldCommands, type BoldCommandsExtension } from './bold-commands'
|
|
10
4
|
import { defineBoldInputRule } from './bold-input-rule'
|
|
11
5
|
import { defineBoldKeymap } from './bold-keymap'
|
|
12
|
-
import {
|
|
13
|
-
defineBoldSpec,
|
|
14
|
-
type BoldSpecExtension,
|
|
15
|
-
} from './bold-spec'
|
|
6
|
+
import { defineBoldSpec, type BoldSpecExtension } from './bold-spec'
|
|
16
7
|
|
|
17
8
|
/**
|
|
18
9
|
* @internal
|
package/src/bold/index.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
type BoldExtension,
|
|
4
|
-
} from './bold'
|
|
5
|
-
export {
|
|
6
|
-
defineBoldCommands,
|
|
7
|
-
type BoldCommandsExtension,
|
|
8
|
-
} from './bold-commands'
|
|
1
|
+
export { defineBold, type BoldExtension } from './bold'
|
|
2
|
+
export { defineBoldCommands, type BoldCommandsExtension } from './bold-commands'
|
|
9
3
|
export { defineBoldInputRule } from './bold-input-rule'
|
|
10
4
|
export { defineBoldKeymap } from './bold-keymap'
|
|
11
|
-
export {
|
|
12
|
-
defineBoldSpec,
|
|
13
|
-
type BoldSpecExtension,
|
|
14
|
-
} from './bold-spec'
|
|
5
|
+
export { defineBoldSpec, type BoldSpecExtension } from './bold-spec'
|
package/src/code/code-keymap.ts
CHANGED
package/src/code/code-spec.ts
CHANGED
package/src/code/code.ts
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
union,
|
|
3
|
-
type Union,
|
|
4
|
-
} from '@prosekit/core'
|
|
1
|
+
import { union, type Union } from '@prosekit/core'
|
|
5
2
|
|
|
6
|
-
import {
|
|
7
|
-
defineCodeCommands,
|
|
8
|
-
type CodeCommandsExtension,
|
|
9
|
-
} from './code-commands'
|
|
3
|
+
import { defineCodeCommands, type CodeCommandsExtension } from './code-commands'
|
|
10
4
|
import { defineCodeInputRule } from './code-input-rule'
|
|
11
5
|
import { defineCodeKeymap } from './code-keymap'
|
|
12
|
-
import {
|
|
13
|
-
defineCodeSpec,
|
|
14
|
-
type CodeSpecExtension,
|
|
15
|
-
} from './code-spec'
|
|
6
|
+
import { defineCodeSpec, type CodeSpecExtension } from './code-spec'
|
|
16
7
|
|
|
17
8
|
/**
|
|
18
9
|
* @internal
|
package/src/code/index.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
type CodeExtension,
|
|
4
|
-
} from './code'
|
|
5
|
-
export {
|
|
6
|
-
defineCodeCommands,
|
|
7
|
-
type CodeCommandsExtension,
|
|
8
|
-
} from './code-commands'
|
|
1
|
+
export { defineCode, type CodeExtension } from './code'
|
|
2
|
+
export { defineCodeCommands, type CodeCommandsExtension } from './code-commands'
|
|
9
3
|
export { defineCodeInputRule } from './code-input-rule'
|
|
10
4
|
export { defineCodeKeymap } from './code-keymap'
|
|
11
|
-
export {
|
|
12
|
-
defineCodeSpec,
|
|
13
|
-
type CodeSpecExtension,
|
|
14
|
-
} from './code-spec'
|
|
5
|
+
export { defineCodeSpec, type CodeSpecExtension } from './code-spec'
|