@dou-ui/editor 0.0.0-stage → 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +10 -2
- package/dist/catalog.js +18 -0
- package/dist/catalog.js.map +1 -0
- package/dist/code/code-editor-block.js +6 -0
- package/dist/code/code-editor-block.js.map +1 -0
- package/dist/code/code-editor-block.vue_vue_type_script_setup_true_lang.js +116 -0
- package/dist/code/code-editor-block.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/code/index.js +69 -0
- package/dist/code/index.js.map +1 -0
- package/dist/code/languages.js +51 -0
- package/dist/code/languages.js.map +1 -0
- package/dist/code/view.js +255 -0
- package/dist/code/view.js.map +1 -0
- package/dist/collaboration/binding.js +381 -0
- package/dist/collaboration/binding.js.map +1 -0
- package/dist/collaboration/cursors.js +150 -0
- package/dist/collaboration/cursors.js.map +1 -0
- package/dist/collaboration/index.js +108 -0
- package/dist/collaboration/index.js.map +1 -0
- package/dist/collaboration/order.js +88 -0
- package/dist/collaboration/order.js.map +1 -0
- package/dist/collaboration/table.js +234 -0
- package/dist/collaboration/table.js.map +1 -0
- package/dist/collaboration/text.js +91 -0
- package/dist/collaboration/text.js.map +1 -0
- package/dist/components/block-handle.js +6 -0
- package/dist/components/block-handle.js.map +1 -0
- package/dist/components/block-handle.vue_vue_type_script_setup_true_lang.js +474 -0
- package/dist/components/block-handle.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/bubble-toolbar.js +6 -0
- package/dist/components/bubble-toolbar.js.map +1 -0
- package/dist/components/bubble-toolbar.vue_vue_type_script_setup_true_lang.js +381 -0
- package/dist/components/bubble-toolbar.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/comment-button.js +6 -0
- package/dist/components/comment-button.js.map +1 -0
- package/dist/components/comment-button.vue_vue_type_script_setup_true_lang.js +83 -0
- package/dist/components/comment-button.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/comment-card.js +6 -0
- package/dist/components/comment-card.js.map +1 -0
- package/dist/components/comment-card.vue_vue_type_script_setup_true_lang.js +104 -0
- package/dist/components/comment-card.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/menu-escape.js +25 -0
- package/dist/components/menu-escape.js.map +1 -0
- package/dist/components/search-bar.js +6 -0
- package/dist/components/search-bar.js.map +1 -0
- package/dist/components/search-bar.vue_vue_type_script_setup_true_lang.js +192 -0
- package/dist/components/search-bar.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/slash-menu.js +6 -0
- package/dist/components/slash-menu.js.map +1 -0
- package/dist/components/slash-menu.vue_vue_type_script_setup_true_lang.js +164 -0
- package/dist/components/slash-menu.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/core/align.js +94 -0
- package/dist/core/align.js.map +1 -0
- package/dist/core/block-selection.js +155 -0
- package/dist/core/block-selection.js.map +1 -0
- package/dist/core/blocks.js +132 -0
- package/dist/core/blocks.js.map +1 -0
- package/dist/core/changes.js +85 -0
- package/dist/core/changes.js.map +1 -0
- package/dist/core/colors.js +16 -0
- package/dist/core/colors.js.map +1 -0
- package/dist/core/commands.js +379 -0
- package/dist/core/commands.js.map +1 -0
- package/dist/core/comments.js +186 -0
- package/dist/core/comments.js.map +1 -0
- package/dist/core/compare.js +106 -0
- package/dist/core/compare.js.map +1 -0
- package/dist/core/convert.js +28 -0
- package/dist/core/convert.js.map +1 -0
- package/dist/core/diff.js +141 -0
- package/dist/core/diff.js.map +1 -0
- package/dist/core/editor.js +138 -0
- package/dist/core/editor.js.map +1 -0
- package/dist/core/extension.js +99 -0
- package/dist/core/extension.js.map +1 -0
- package/dist/core/file-drop.js +56 -0
- package/dist/core/file-drop.js.map +1 -0
- package/dist/core/highlight.js +120 -0
- package/dist/core/highlight.js.map +1 -0
- package/dist/core/input-rules.js +61 -0
- package/dist/core/input-rules.js.map +1 -0
- package/dist/core/keymap.js +38 -0
- package/dist/core/keymap.js.map +1 -0
- package/dist/core/model.js +196 -0
- package/dist/core/model.js.map +1 -0
- package/dist/core/output.js +263 -0
- package/dist/core/output.js.map +1 -0
- package/dist/core/plugins.js +102 -0
- package/dist/core/plugins.js.map +1 -0
- package/dist/core/prepare.js +102 -0
- package/dist/core/prepare.js.map +1 -0
- package/dist/core/schema.js +158 -0
- package/dist/core/schema.js.map +1 -0
- package/dist/core/search.js +197 -0
- package/dist/core/search.js.map +1 -0
- package/dist/core/selection.js +16 -0
- package/dist/core/selection.js.map +1 -0
- package/dist/core/slash.js +83 -0
- package/dist/core/slash.js.map +1 -0
- package/dist/core/transaction.js +311 -0
- package/dist/core/transaction.js.map +1 -0
- package/dist/define-block.js +177 -0
- package/dist/define-block.js.map +1 -0
- package/dist/document.js +157 -0
- package/dist/document.js.map +1 -0
- package/dist/dom.js +48 -0
- package/dist/dom.js.map +1 -0
- package/dist/editor.js +33 -0
- package/dist/editor.js.map +1 -0
- package/dist/editor.vue_vue_type_script_setup_true_lang.js +564 -0
- package/dist/editor.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/editor2.js +6 -0
- package/dist/editor2.js.map +1 -0
- package/dist/extensions/align/align-menu.js +6 -0
- package/dist/extensions/align/align-menu.js.map +1 -0
- package/dist/extensions/align/align-menu.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/extensions/align/align-menu.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/extensions/align/align-sub.js +6 -0
- package/dist/extensions/align/align-sub.js.map +1 -0
- package/dist/extensions/align/align-sub.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/extensions/align/align-sub.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/extensions/align/commands.js +40 -0
- package/dist/extensions/align/commands.js.map +1 -0
- package/dist/extensions/align/index.js +27 -0
- package/dist/extensions/align/index.js.map +1 -0
- package/dist/extensions/attachment/attachment-block.js +6 -0
- package/dist/extensions/attachment/attachment-block.js.map +1 -0
- package/dist/extensions/attachment/attachment-block.vue_vue_type_script_setup_true_lang.js +119 -0
- package/dist/extensions/attachment/attachment-block.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/extensions/attachment/files.js +66 -0
- package/dist/extensions/attachment/files.js.map +1 -0
- package/dist/extensions/attachment/index.js +132 -0
- package/dist/extensions/attachment/index.js.map +1 -0
- package/dist/extensions/blocks.js +170 -0
- package/dist/extensions/blocks.js.map +1 -0
- package/dist/extensions/callout/callout-block.js +6 -0
- package/dist/extensions/callout/callout-block.js.map +1 -0
- package/dist/extensions/callout/callout-block.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/extensions/callout/callout-block.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/extensions/callout/html.js +61 -0
- package/dist/extensions/callout/html.js.map +1 -0
- package/dist/extensions/callout/index.js +52 -0
- package/dist/extensions/callout/index.js.map +1 -0
- package/dist/extensions/callout/tones.js +12 -0
- package/dist/extensions/callout/tones.js.map +1 -0
- package/dist/extensions/code-block/code-block-view.js +6 -0
- package/dist/extensions/code-block/code-block-view.js.map +1 -0
- package/dist/extensions/code-block/code-block-view.vue_vue_type_script_setup_true_lang.js +87 -0
- package/dist/extensions/code-block/code-block-view.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/extensions/code-block/index.js +98 -0
- package/dist/extensions/code-block/index.js.map +1 -0
- package/dist/extensions/code-block/languages.js +116 -0
- package/dist/extensions/code-block/languages.js.map +1 -0
- package/dist/extensions/colors/color-menu.js +6 -0
- package/dist/extensions/colors/color-menu.js.map +1 -0
- package/dist/extensions/colors/color-menu.vue_vue_type_script_setup_true_lang.js +113 -0
- package/dist/extensions/colors/color-menu.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/extensions/colors/index.js +49 -0
- package/dist/extensions/colors/index.js.map +1 -0
- package/dist/extensions/colors/palette.js +26 -0
- package/dist/extensions/colors/palette.js.map +1 -0
- package/dist/extensions/editor-kit.js +35 -0
- package/dist/extensions/editor-kit.js.map +1 -0
- package/dist/extensions/embed/embed-block.js +6 -0
- package/dist/extensions/embed/embed-block.js.map +1 -0
- package/dist/extensions/embed/embed-block.vue_vue_type_script_setup_true_lang.js +210 -0
- package/dist/extensions/embed/embed-block.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/extensions/embed/index.js +118 -0
- package/dist/extensions/embed/index.js.map +1 -0
- package/dist/extensions/embed/targets.js +79 -0
- package/dist/extensions/embed/targets.js.map +1 -0
- package/dist/extensions/formatting.js +153 -0
- package/dist/extensions/formatting.js.map +1 -0
- package/dist/extensions/image/image-block.js +6 -0
- package/dist/extensions/image/image-block.js.map +1 -0
- package/dist/extensions/image/image-block.vue_vue_type_script_setup_true_lang.js +206 -0
- package/dist/extensions/image/image-block.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/extensions/image/index.js +125 -0
- package/dist/extensions/image/index.js.map +1 -0
- package/dist/extensions/image/uploads.js +96 -0
- package/dist/extensions/image/uploads.js.map +1 -0
- package/dist/extensions/list-html.js +58 -0
- package/dist/extensions/list-html.js.map +1 -0
- package/dist/extensions/lists.js +182 -0
- package/dist/extensions/lists.js.map +1 -0
- package/dist/extensions/mention/index.js +56 -0
- package/dist/extensions/mention/index.js.map +1 -0
- package/dist/extensions/mention/mention-menu.js +6 -0
- package/dist/extensions/mention/mention-menu.js.map +1 -0
- package/dist/extensions/mention/mention-menu.vue_vue_type_script_setup_true_lang.js +132 -0
- package/dist/extensions/mention/mention-menu.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/extensions/mention/state.js +113 -0
- package/dist/extensions/mention/state.js.map +1 -0
- package/dist/extensions/table/commands.js +356 -0
- package/dist/extensions/table/commands.js.map +1 -0
- package/dist/extensions/table/html.js +134 -0
- package/dist/extensions/table/html.js.map +1 -0
- package/dist/extensions/table/index.js +56 -0
- package/dist/extensions/table/index.js.map +1 -0
- package/dist/extensions/table/plugin.js +81 -0
- package/dist/extensions/table/plugin.js.map +1 -0
- package/dist/extensions/table/schema.js +258 -0
- package/dist/extensions/table/schema.js.map +1 -0
- package/dist/extensions/table/table-controls.js +6 -0
- package/dist/extensions/table/table-controls.js.map +1 -0
- package/dist/extensions/table/table-controls.vue_vue_type_script_setup_true_lang.js +698 -0
- package/dist/extensions/table/table-controls.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/extensions/table/view.js +19 -0
- package/dist/extensions/table/view.js.map +1 -0
- package/dist/extensions/toggle/index.js +87 -0
- package/dist/extensions/toggle/index.js.map +1 -0
- package/dist/extensions/toggle/state.js +120 -0
- package/dist/extensions/toggle/state.js.map +1 -0
- package/dist/extensions/toggle/toggle-block.js +6 -0
- package/dist/extensions/toggle/toggle-block.js.map +1 -0
- package/dist/extensions/toggle/toggle-block.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/extensions/toggle/toggle-block.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/locale.js +522 -0
- package/dist/locale.js.map +1 -0
- package/dist/markdown/index.js +24 -0
- package/dist/markdown/index.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/style.d.ts +1 -0
- package/dist/style.js +8 -0
- package/dist/types/catalog.d.ts +8 -0
- package/dist/types/code/code-editor-block.vue.d.ts +17 -0
- package/dist/types/code/index.d.ts +18 -0
- package/dist/types/code/languages.d.ts +7 -0
- package/dist/types/code/types.d.ts +37 -0
- package/dist/types/code/view.d.ts +12 -0
- package/dist/types/collaboration/binding.d.ts +32 -0
- package/dist/types/collaboration/cursors.d.ts +26 -0
- package/dist/types/collaboration/index.d.ts +47 -0
- package/dist/types/collaboration/order.d.ts +20 -0
- package/dist/types/collaboration/table.d.ts +25 -0
- package/dist/types/collaboration/text.d.ts +9 -0
- package/dist/types/components/block-handle.vue.d.ts +3 -0
- package/dist/types/components/bubble-toolbar.vue.d.ts +7 -0
- package/dist/types/components/comment-button.vue.d.ts +3 -0
- package/dist/types/components/comment-card.vue.d.ts +3 -0
- package/dist/types/components/menu-escape.d.ts +7 -0
- package/dist/types/components/search-bar.vue.d.ts +22 -0
- package/dist/types/components/slash-menu.vue.d.ts +11 -0
- package/dist/types/core/align.d.ts +16 -0
- package/dist/types/core/block-selection.d.ts +22 -0
- package/dist/types/core/blocks.d.ts +52 -0
- package/dist/types/core/changes.d.ts +14 -0
- package/dist/types/core/colors.d.ts +4 -0
- package/dist/types/core/commands.d.ts +61 -0
- package/dist/types/core/comments.d.ts +44 -0
- package/dist/types/core/compare.d.ts +10 -0
- package/dist/types/core/convert.d.ts +12 -0
- package/dist/types/core/diff.d.ts +49 -0
- package/dist/types/core/editor.d.ts +64 -0
- package/dist/types/core/extension.d.ts +167 -0
- package/dist/types/core/file-drop.d.ts +19 -0
- package/dist/types/core/highlight.d.ts +32 -0
- package/dist/types/core/input-rules.d.ts +21 -0
- package/dist/types/core/keymap.d.ts +8 -0
- package/dist/types/core/model.d.ts +158 -0
- package/dist/types/core/output.d.ts +64 -0
- package/dist/types/core/plugins.d.ts +24 -0
- package/dist/types/core/prepare.d.ts +23 -0
- package/dist/types/core/schema.d.ts +38 -0
- package/dist/types/core/search.d.ts +83 -0
- package/dist/types/core/selection.d.ts +8 -0
- package/dist/types/core/slash.d.ts +21 -0
- package/dist/types/core/transaction.d.ts +97 -0
- package/dist/types/define-block.d.ts +66 -0
- package/dist/types/document.d.ts +46 -0
- package/dist/types/dom.d.ts +17 -0
- package/dist/types/editor.d.ts +252 -0
- package/dist/types/editor.vue.d.ts +210 -0
- package/dist/types/extensions/align/align-menu.vue.d.ts +3 -0
- package/dist/types/extensions/align/align-sub.vue.d.ts +7 -0
- package/dist/types/extensions/align/commands.d.ts +13 -0
- package/dist/types/extensions/align/index.d.ts +7 -0
- package/dist/types/extensions/attachment/attachment-block.vue.d.ts +17 -0
- package/dist/types/extensions/attachment/files.d.ts +6 -0
- package/dist/types/extensions/attachment/index.d.ts +20 -0
- package/dist/types/extensions/blocks.d.ts +8 -0
- package/dist/types/extensions/callout/callout-block.vue.d.ts +14 -0
- package/dist/types/extensions/callout/html.d.ts +4 -0
- package/dist/types/extensions/callout/index.d.ts +3 -0
- package/dist/types/extensions/callout/tones.d.ts +8 -0
- package/dist/types/extensions/code-block/code-block-view.vue.d.ts +16 -0
- package/dist/types/extensions/code-block/index.d.ts +19 -0
- package/dist/types/extensions/code-block/languages.d.ts +9 -0
- package/dist/types/extensions/colors/color-menu.vue.d.ts +3 -0
- package/dist/types/extensions/colors/index.d.ts +7 -0
- package/dist/types/extensions/colors/palette.d.ts +7 -0
- package/dist/types/extensions/editor-kit.d.ts +37 -0
- package/dist/types/extensions/embed/embed-block.vue.d.ts +16 -0
- package/dist/types/extensions/embed/index.d.ts +18 -0
- package/dist/types/extensions/embed/targets.d.ts +32 -0
- package/dist/types/extensions/formatting.d.ts +8 -0
- package/dist/types/extensions/image/image-block.vue.d.ts +16 -0
- package/dist/types/extensions/image/index.d.ts +16 -0
- package/dist/types/extensions/image/uploads.d.ts +35 -0
- package/dist/types/extensions/list-html.d.ts +11 -0
- package/dist/types/extensions/lists.d.ts +6 -0
- package/dist/types/extensions/mention/index.d.ts +11 -0
- package/dist/types/extensions/mention/mention-menu.vue.d.ts +7 -0
- package/dist/types/extensions/mention/state.d.ts +28 -0
- package/dist/types/extensions/table/commands.d.ts +69 -0
- package/dist/types/extensions/table/html.d.ts +4 -0
- package/dist/types/extensions/table/index.d.ts +8 -0
- package/dist/types/extensions/table/plugin.d.ts +4 -0
- package/dist/types/extensions/table/schema.d.ts +23 -0
- package/dist/types/extensions/table/table-controls.vue.d.ts +3 -0
- package/dist/types/extensions/table/view.d.ts +13 -0
- package/dist/types/extensions/toggle/index.d.ts +7 -0
- package/dist/types/extensions/toggle/state.d.ts +17 -0
- package/dist/types/extensions/toggle/toggle-block.vue.d.ts +14 -0
- package/dist/types/index.d.ts +266 -0
- package/dist/types/locale.d.ts +195 -0
- package/dist/types/markdown/index.d.ts +14 -0
- package/dist/types/use-comments.d.ts +17 -0
- package/dist/use-comments.js +141 -0
- package/dist/use-comments.js.map +1 -0
- package/package.json +98 -4
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer dou.components{.dou-editor{--dou-editor-font-size:var(--dou-font-size-lg);--dou-editor-line-height:1.7;--dou-editor-gutter:56px;--dou-editor-indent:24px;--dou-editor-block-gap:2px;--dou-editor-selected:color-mix(in oklab,var(--dou-color-focus)calc(12% + 10%*var(--dou-scheme-dark)),transparent);--dou-editor-control-hover:color-mix(in oklab,var(--dou-color-text)6%,transparent);--dou-editor-match:color-mix(in oklab,var(--dou-color-warning)22%,transparent);--dou-editor-match-current:color-mix(in oklab,var(--dou-color-warning-text)80%,transparent);--dou-editor-comment-bg:color-mix(in oklab,var(--dou-color-warning)18%,transparent);--dou-editor-comment-bg-active:color-mix(in oklab,var(--dou-color-warning)36%,transparent);--dou-editor-comment-line:color-mix(in oklab,var(--dou-color-warning)72%,transparent);position:relative;box-sizing:border-box;color:var(--dou-color-text);font-family:var(--dou-font-family);font-size:max(var(--dou-font-size-input-min,0px),var(--dou-editor-font-size));line-height:var(--dou-editor-line-height);overflow-wrap:break-word;width:100%;min-width:0;padding-inline-start:var(--dou-editor-gutter)}.dou-editor.is-readonly{--dou-editor-gutter:0px}.dou-editor.is-readonly.is-comparing{--dou-editor-gutter:16px}@media (pointer:coarse){.dou-editor{--dou-editor-gutter:32px}}.dou-editor.is-dragging{cursor:grabbing}.dou-editor.is-dragging *{cursor:grabbing}.dou-editor__live{position:absolute;overflow:hidden;clip-path:inset(50%);white-space:nowrap;width:1px;height:1px}.dou-editor__surface{min-height:calc(var(--dou-editor-line-height)*1em);outline:none;white-space:pre-wrap;word-wrap:break-word;font-variant-ligatures:none}.dou-editor__block{position:relative;border-radius:4px}.dou-editor__group{padding-inline-start:var(--dou-editor-indent)}.dou-editor__content{position:relative;padding-block:var(--dou-editor-block-gap);font-size:1em;font-weight:inherit;line-height:var(--dou-editor-line-height);margin:0}.dou-editor__content--heading{--dou-editor-line-height:1.4;font-weight:var(--dou-font-weight-bold);letter-spacing:-.01em;margin-top:.6em}.dou-editor__content--heading:-webkit-any(h1){margin-top:.8em;font-size:1.75em}.dou-editor__content--heading:-moz-any(h1){margin-top:.8em;font-size:1.75em}.dou-editor__content--heading:is(h1){margin-top:.8em;font-size:1.75em}.dou-editor__content--heading:-webkit-any(h2){font-size:1.375em}.dou-editor__content--heading:-moz-any(h2){font-size:1.375em}.dou-editor__content--heading:is(h2){font-size:1.375em}.dou-editor__content--heading:-webkit-any(h3){font-size:1.125em}.dou-editor__content--heading:-moz-any(h3){font-size:1.125em}.dou-editor__content--heading:is(h3){font-size:1.125em}.dou-editor__surface>.dou-editor__block:first-child>.dou-editor__content--heading{margin-top:0}.dou-editor__content--bulletItem,.dou-editor__content--numberedItem{padding-inline-start:var(--dou-editor-indent)}:is(.dou-editor__content--bulletItem,.dou-editor__content--numberedItem):before{position:absolute;width:var(--dou-editor-indent)}:is(.dou-editor__content--bulletItem,.dou-editor__content--numberedItem):not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:0}:is(.dou-editor__content--bulletItem,.dou-editor__content--numberedItem):not(:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:0}:is(.dou-editor__content--bulletItem,.dou-editor__content--numberedItem):not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:0}:is(.dou-editor__content--bulletItem,.dou-editor__content--numberedItem):-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:0}:is(.dou-editor__content--bulletItem,.dou-editor__content--numberedItem):-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:0}:is(.dou-editor__content--bulletItem,.dou-editor__content--numberedItem):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:0}.dou-editor__content--bulletItem:before{content:"";top:calc(var(--dou-editor-block-gap) + var(--dou-editor-line-height)*.5em - 3px);box-sizing:border-box;color:var(--dou-color-text-secondary);background-color:currentColor;border-radius:50%;width:6px;height:6px}.dou-editor__content--bulletItem:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:7px}.dou-editor__content--bulletItem:not(:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:7px}.dou-editor__content--bulletItem:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:7px}.dou-editor__content--bulletItem:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:7px}.dou-editor__content--bulletItem:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:7px}.dou-editor__content--bulletItem:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:7px}.dou-editor__group .dou-editor__content--bulletItem:before{background-color:#0000;border:1.5px solid}.dou-editor__content--numberedItem:before{content:attr(data-index)".";top:var(--dou-editor-block-gap);box-sizing:border-box;color:var(--dou-color-text-secondary);font-variant-numeric:tabular-nums;text-align:end;padding-inline-end:6px}.dou-editor__content--checkItem{display:flex;gap:8px}.dou-editor__check{display:inline-flex;height:calc(var(--dou-editor-line-height)*1em);user-select:none;flex:none;align-items: center}.dou-editor__checkbox{display:inline-flex;box-sizing:border-box;border:1px solid var(--dou-color-border-strong);border-radius:calc(var(--dou-radius-control) - 2px);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-sm);color:var(--dou-color-neutral-on);cursor:pointer;transition-property:background-color,border-color,box-shadow;transition-duration:var(--dou-motion-duration-fast);transition-timing-function:var(--dou-motion-easing);justify-content:center;align-items: center;width:16px;height:16px;margin:0;padding:0}.dou-editor__checkbox>svg{opacity:0;transition-property:opacity,transform;transition-duration:var(--dou-motion-duration-fast);transition-timing-function:var(--dou-motion-easing);width:100%;height:100%;transform:scale(.6)}.dou-editor__checkbox:hover:not(:disabled){border-color:color-mix(in oklab,var(--dou-color-neutral)45%,var(--dou-color-border-strong))}.dou-editor__checkbox:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:2px}.dou-editor__checkbox:disabled{cursor:default}.dou-editor__content--checkItem[data-checked=true] .dou-editor__checkbox{border-color:color-mix(in oklab,var(--dou-color-neutral)90%,var(--dou-color-edge));background-color:var(--dou-color-neutral);box-shadow:var(--dou-shadow-highlight),0 1px 2px color-mix(in oklab,var(--dou-color-neutral)24%,transparent)}.dou-editor__content--checkItem[data-checked=true] .dou-editor__checkbox>svg{opacity:1;transform:none}.dou-editor__content--checkItem[data-checked=true] .dou-editor__text{color:var(--dou-color-text-tertiary);text-decoration:line-through;text-decoration-color:color-mix(in oklab,currentColor 60%,transparent)}.dou-editor__text{flex:auto;min-width:0}.dou-editor__content--quote{box-shadow:inset 2px 0 0 var(--dou-color-border-strong);color:var(--dou-color-text-secondary);padding-inline-start:14px}.dou-editor__content--codeBlock{--dou-editor-line-height:1.7;overflow-x:auto;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-container);background-color:var(--dou-color-bg-muted);font-family:var(--dou-font-family-mono);font-size:var(--dou-font-size-sm);tab-size:2;white-space:pre-wrap;margin-block-start:4px;margin-block-end:4px;padding:12px 16px}.dou-editor__content--codeBlock>code{font:inherit}.dou-editor-toggle{display:flex;gap:4px}.dou-editor-toggle__control{display:inline-flex;height:calc(var(--dou-editor-line-height)*1em);user-select:none;flex:none;align-items: center;margin-inline-start:-2px}.dou-editor-toggle__button{display:inline-flex;border-radius:var(--dou-radius-control);color:var(--dou-color-text-tertiary);cursor:pointer;background:0 0;border:none;justify-content:center;align-items: center;width:22px;height:22px;padding:0}.dou-editor-toggle__button>svg{transition:rotate var(--dou-motion-duration-fast)var(--dou-motion-easing);width:16px;height:16px}.dou-editor-toggle__button.is-open>svg{rotate:90deg}.dou-editor-toggle__button:hover{background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent);color:var(--dou-color-text)}.dou-editor-toggle__button:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:-2px}.dou-editor__block.is-collapsed>.dou-editor__group{display:none}.dou-editor-callout{--dou-editor-callout-tone:var(--dou-color-text-secondary);display:flex;border:1px solid color-mix(in oklab,var(--dou-editor-callout-tone)22%,var(--dou-color-border));border-radius:var(--dou-radius-container);background-color:color-mix(in oklab,var(--dou-editor-callout-tone)6%,var(--dou-color-bg-surface));gap:8px;margin-block-start:2px;margin-block-end:2px;padding:8px 12px}.dou-editor-callout.is-tip{--dou-editor-callout-tone:var(--dou-color-success)}.dou-editor-callout.is-warning{--dou-editor-callout-tone:var(--dou-color-warning)}.dou-editor-callout.is-danger{--dou-editor-callout-tone:var(--dou-color-danger)}.dou-editor-callout__control{display:inline-flex;height:calc(var(--dou-editor-line-height)*1em);user-select:none;flex:none;align-items: center}.dou-editor-callout__icon{display:inline-flex;border-radius:var(--dou-radius-control);color:var(--dou-editor-callout-tone);background:0 0;border:none;justify-content:center;align-items: center;width:24px;height:24px;padding:0}.dou-editor-callout__icon>svg{width:16px;height:16px}button.dou-editor-callout__icon{cursor:pointer}button.dou-editor-callout__icon:hover{background-color:color-mix(in oklab,var(--dou-editor-callout-tone)12%,transparent)}button.dou-editor-callout__icon[aria-expanded=true]{background-color:color-mix(in oklab,var(--dou-editor-callout-tone)12%,transparent)}button.dou-editor-callout__icon:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:-2px}.dou-editor__content--codeBlock.dou-editor__content--custom{position:relative}.dou-editor-code__pre{font:inherit;white-space:inherit;margin:0}.dou-editor-code__pre>code{display:block;font:inherit}.dou-editor-code__bar{position:absolute;display:flex;border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-muted);font-family:var(--dou-font-family);opacity:0;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);align-items: center;gap:2px;top:6px;right:6px}.dou-editor__content--codeBlock:hover>.dou-editor-code__bar,.dou-editor-code__bar:focus-within{opacity:1}.dou-editor-code__bar:has([aria-expanded=true]){opacity:1}.dou-editor-code__language{display:inline-flex;border-radius:var(--dou-radius-control);color:var(--dou-color-text-secondary);font:inherit;font-size:var(--dou-font-size-sm);cursor:pointer;background:0 0;border:none;align-items: center;gap:2px;height:24px;padding:0 4px 0 8px}.dou-editor-code__language>svg{width:14px;height:14px}.dou-editor-code__language:hover{background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent);color:var(--dou-color-text)}.dou-editor-code__language[aria-expanded=true]{background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent);color:var(--dou-color-text)}.dou-editor-code__language:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:-2px}.dou-editor-code__language.is-static{cursor:default;padding-inline-start:8px;padding-inline-end:8px}.dou-editor-code-editor.dou-editor__content--codeBlock{overflow:visible;white-space:normal;transition:border-color var(--dou-motion-duration-fast)var(--dou-motion-easing);padding:0}.dou-editor-code-editor.dou-editor__content--codeBlock:has(>.dou-code-editor.is-focused){border-color:color-mix(in oklab,var(--dou-color-focus)70%,var(--dou-color-text))}.dou-editor-code-editor.dou-editor__content--codeBlock>.dou-editor-code__bar{position:relative;z-index:3;opacity:1;background:0 0;justify-content:flex-end;padding:4px 6px 0 8px;top:auto;right:auto}.dou-editor-code-editor.dou-editor__content--codeBlock>.dou-editor-code__bar>:not(:last-child){margin-inline-end:auto}@media (pointer:coarse){.dou-editor-code__language:not(.is-static){position:relative}.dou-editor-code__language:not(.is-static):after{position:absolute;content:"";inset:min(0px,50% - 20px) 0}}.dou-editor-code__editor.dou-code-editor{--dou-code-editor-bg:transparent;--dou-code-editor-gutter-bg:var(--dou-color-bg-muted);--dou-code-editor-border:transparent;--dou-code-editor-border-focus:transparent;--dou-code-editor-padding-x:16px;--dou-code-editor-padding-y:8px;border-radius:inherit;border:none}.dou-editor__token{color:color-mix(in oklab,var(--shiki-dark,currentColor)calc(100%*var(--dou-scheme-dark)),var(--shiki-light,currentColor));font-style:var(--shiki-light-font-style,inherit);font-weight:var(--shiki-light-font-weight,inherit)}.dou-editor__content--divider{cursor:default;padding-block-start:12px;padding-block-end:12px}.dou-editor__content--divider>hr{background-color:var(--dou-color-border);border:none;height:1px;margin:0}.dou-editor__content--divider.ProseMirror-selectednode>hr{background-color:var(--dou-color-focus)}.dou-editor__surface strong{font-weight:var(--dou-font-weight-bold)}.dou-editor__surface u{text-underline-offset:.2em}.dou-editor__surface s u{text-decoration:underline line-through}.dou-editor__surface u s{text-decoration:underline line-through}.dou-editor__surface :not(pre)>code{background-color:var(--dou-color-bg-muted);box-shadow:inset 0 0 0 1px var(--dou-color-border-subtle);font-family:var(--dou-font-family-mono);border-radius:4px;padding:.1em .3em;font-size:.875em}.dou-editor__link{color:inherit;text-decoration:underline;text-decoration-color:var(--dou-color-border-strong);text-decoration-thickness:1px;text-underline-offset:.2em;transition:text-decoration-color var(--dou-motion-duration-fast)var(--dou-motion-easing)}.dou-editor__link:hover{text-decoration-color:currentColor}.dou-editor.is-readonly .dou-editor__link,.dou-editor.is-comparing .dou-editor__link{cursor:pointer}.dou-editor__comment{transition:background-color var(--dou-motion-duration-fast)var(--dou-motion-easing);border-bottom:2px solid #0000}.dou-editor__comment-pending{background-color:color-mix(in oklab,var(--dou-color-focus)16%,transparent)}.dou-editor-comment{box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-container);background-color:color-mix(in oklab,var(--dou-color-text)calc(4%*var(--dou-scheme-dark)),var(--dou-color-bg-surface));box-shadow:var(--dou-shadow-md);font-family:var(--dou-font-family);width:min(340px,100vw - 32px);max-height:min(480px,100vh - 32px);padding:12px;line-height:normal}.dou-editor__content.is-empty:after{content:attr(data-placeholder);position:absolute;top:var(--dou-editor-block-gap);color:var(--dou-color-text-tertiary);pointer-events:none;user-select:none;white-space:nowrap}.dou-editor__content.is-empty:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:0}.dou-editor__content.is-empty:not(:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:0}.dou-editor__content.is-empty:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:0}.dou-editor__content.is-empty:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:0}.dou-editor__content.is-empty:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:0}.dou-editor__content.is-empty:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:0}.dou-editor__content--bulletItem.is-empty:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:var(--dou-editor-indent)}.dou-editor__content--bulletItem.is-empty:not(:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:var(--dou-editor-indent)}.dou-editor__content--bulletItem.is-empty:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:var(--dou-editor-indent)}.dou-editor__content--numberedItem.is-empty:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:var(--dou-editor-indent)}.dou-editor__content--numberedItem.is-empty:not(:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:var(--dou-editor-indent)}.dou-editor__content--numberedItem.is-empty:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:var(--dou-editor-indent)}.dou-editor__content--bulletItem.is-empty:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:var(--dou-editor-indent)}.dou-editor__content--bulletItem.is-empty:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:var(--dou-editor-indent)}.dou-editor__content--bulletItem.is-empty:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:var(--dou-editor-indent)}.dou-editor__content--numberedItem.is-empty:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:var(--dou-editor-indent)}.dou-editor__content--numberedItem.is-empty:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:var(--dou-editor-indent)}.dou-editor__content--numberedItem.is-empty:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:var(--dou-editor-indent)}.dou-editor__content--checkItem.is-empty:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:24px}.dou-editor__content--checkItem.is-empty:not(:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:24px}.dou-editor__content--checkItem.is-empty:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:24px}.dou-editor__content--checkItem.is-empty:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:24px}.dou-editor__content--checkItem.is-empty:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:24px}.dou-editor__content--checkItem.is-empty:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:24px}.dou-editor__content--quote.is-empty:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:14px}.dou-editor__content--quote.is-empty:not(:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:14px}.dou-editor__content--quote.is-empty:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:14px}.dou-editor__content--quote.is-empty:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:14px}.dou-editor__content--quote.is-empty:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:14px}.dou-editor__content--quote.is-empty:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:14px}.dou-editor__diff-added:before,.dou-editor__diff-changed:before,.dou-editor__diff-removed-block:before{position:absolute;content:"";border-radius:2px;width:3px;top:2px;bottom:2px}.dou-editor__diff-added:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:-12px}.dou-editor__diff-added:not(:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:-12px}.dou-editor__diff-added:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:-12px}.dou-editor__diff-changed:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:-12px}.dou-editor__diff-changed:not(:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:-12px}.dou-editor__diff-changed:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:-12px}.dou-editor__diff-removed-block:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:-12px}.dou-editor__diff-removed-block:not(:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:-12px}.dou-editor__diff-removed-block:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:-12px}.dou-editor__diff-added:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:-12px}.dou-editor__diff-added:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:-12px}.dou-editor__diff-added:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:-12px}.dou-editor__diff-changed:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:-12px}.dou-editor__diff-changed:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:-12px}.dou-editor__diff-changed:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:-12px}.dou-editor__diff-removed-block:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:-12px}.dou-editor__diff-removed-block:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:-12px}.dou-editor__diff-removed-block:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:-12px}.dou-editor__diff-added:before{background-color:var(--dou-color-success)}.dou-editor__diff-changed:before{background-color:var(--dou-color-warning)}.dou-editor__diff-added-text{background-color:color-mix(in oklab,var(--dou-color-success)14%,transparent);text-decoration:underline 1px var(--dou-color-success);text-underline-offset:3px}.dou-editor__diff-removed{background-color:color-mix(in oklab,var(--dou-color-danger)12%,transparent);color:var(--dou-color-danger-text);text-decoration:line-through 1px}.dou-editor__diff-removed-block{position:relative;color:var(--dou-color-danger-text);text-decoration:line-through 1px;white-space:pre-wrap;user-select:none;padding:3px 0}.dou-editor__diff-removed-block:before{background-color:var(--dou-color-danger)}.dou-editor__block.is-selected{background-color:var(--dou-editor-selected)}.dou-editor__block.is-selected+.dou-editor__block.is-selected:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:0;border-top-right-radius:0}.dou-editor__block.is-selected+.dou-editor__block.is-selected:not(:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:0;border-top-right-radius:0}.dou-editor__block.is-selected+.dou-editor__block.is-selected:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:0;border-top-right-radius:0}.dou-editor__block.is-selected+.dou-editor__block.is-selected:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.dou-editor__block.is-selected+.dou-editor__block.is-selected:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.dou-editor__block.is-selected+.dou-editor__block.is-selected:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.dou-editor__block.is-selected:has(+.dou-editor__block.is-selected):not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0;border-bottom-left-radius:0}.dou-editor__block.is-selected:has(+.dou-editor__block.is-selected):not(:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0;border-bottom-left-radius:0}.dou-editor__block.is-selected:has(+.dou-editor__block.is-selected):not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0;border-bottom-left-radius:0}.dou-editor__block.is-selected:has(+.dou-editor__block.is-selected):-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.dou-editor__block.is-selected:has(+.dou-editor__block.is-selected):-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.dou-editor__block.is-selected:has(+.dou-editor__block.is-selected):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.dou-editor__block.is-selected .dou-editor__block.is-selected{background-color:#0000}.dou-editor__block.is-selected>.dou-editor__content--codeBlock{background-image:linear-gradient(var(--dou-editor-selected),var(--dou-editor-selected))}.dou-editor .is-block-selecting{caret-color:transparent}.dou-editor .is-block-selecting ::selection{background-color:#0000}.dou-editor.is-dragging .dou-editor__block.is-selected{opacity:.45}.dou-editor__handle{position:absolute;z-index:1;display:flex;height:var(--dou-editor-line,24px);align-items: center;gap:2px;transform:translate(calc(-100% - 6px))}.dou-editor__handle-button{display:inline-flex;color:var(--dou-color-text-tertiary);cursor:pointer;transition-property:background-color,color;transition-duration:var(--dou-motion-duration-fast);transition-timing-function:var(--dou-motion-easing);background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items: center;width:22px;height:24px;margin:0;padding:0}.dou-editor__handle-button>svg{width:16px;height:16px}.dou-editor__handle-button:hover{background-color:var(--dou-editor-control-hover);color:var(--dou-color-text-secondary)}.dou-editor__handle-button[aria-expanded=true]{background-color:var(--dou-editor-control-hover);color:var(--dou-color-text-secondary)}.dou-editor__grip{position:relative;cursor:grab;touch-action:none;width:18px}@media (pointer:coarse){.dou-editor__handle{transform:translate(calc(-100% - 4px))}.dou-editor__add{display:none}.dou-editor__grip{height:max(28px,var(--dou-editor-line,28px));-webkit-touch-callout:none;user-select:none;width:24px}.dou-editor__grip:before{content:"";position:absolute;inset:-8px -4px}}.dou-editor__ghost{position:fixed;z-index:2000;box-sizing:border-box;overflow:hidden;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);opacity:.88;pointer-events:none;max-height:160px;padding:6px 12px;top:0;left:0}.dou-editor__ghost>.dou-editor__block:first-child>.dou-editor__content{margin-top:0}.dou-editor__drop{position:absolute;background-color:var(--dou-color-focus);pointer-events:none;border-radius:1px;height:2px;margin-top:-1px}.dou-editor__drop.is-vertical{width:2px;height:auto;margin-top:0;margin-left:-1px}.dou-editor__mention{background-color:var(--dou-color-bg-muted);color:var(--dou-color-text);white-space:nowrap;border-radius:4px;padding:0 2px;font-weight:500}.dou-editor-mention{max-height:min(var(--dou-floating-available,100vh),288px);width:240px}.dou-editor-mention__item{gap:10px;height:auto;padding:6px 8px}.dou-editor-mention__item:focus{background-color:var(--dou-dropdown-item-active-bg)}.dou-editor-mention__item.is-active{background-color:var(--dou-dropdown-item-active-bg)}.dou-editor-mention__text{display:flex;flex-direction:column;flex:auto;gap:6px;min-width:0}.dou-editor-mention__label,.dou-editor-mention__description{overflow-x:clip;text-box:trim-both cap alphabetic;text-overflow:ellipsis;white-space:nowrap}.dou-editor-mention__description{color:var(--dou-color-text-tertiary);font-size:var(--dou-font-size-sm)}.dou-editor-slash{max-height:min(var(--dou-floating-available,100vh),336px);width:288px}.dou-editor-slash__item{gap:10px;height:auto;padding:6px 8px 6px 6px}.dou-editor-slash__item:focus{background-color:var(--dou-dropdown-item-active-bg)}.dou-editor-slash__item.is-active{background-color:var(--dou-dropdown-item-active-bg)}.dou-editor-slash__icon{display:inline-flex;box-sizing:border-box;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-surface);color:var(--dou-color-text-secondary);flex:none;justify-content:center;align-items: center;width:32px;height:32px}.dou-editor-slash__icon>svg{width:18px;height:18px}.dou-editor-slash__text{display:flex;flex-direction:column;flex:auto;gap:6px;min-width:0}.dou-editor-slash__label,.dou-editor-slash__hint{overflow-x:clip;text-box:trim-both cap alphabetic;text-overflow:ellipsis}.dou-editor-slash__hint{color:var(--dou-color-text-tertiary);font-size:var(--dou-font-size-sm)}.dou-editor-slash__shortcut{color:var(--dou-color-text-tertiary);font-family:var(--dou-font-family-mono);font-size:var(--dou-font-size-sm);text-box:trim-both cap alphabetic;flex:none}.dou-editor-slash__empty{color:var(--dou-color-text-tertiary);font-size:var(--dou-font-size-sm);padding:8px}.dou-editor__content--table{overflow-x:auto;overscroll-behavior-x:contain;margin-block-start:4px;margin-block-end:4px;padding-block-start:8px;padding-block-end:4px}.dou-editor-table{border-collapse:collapse;table-layout:fixed;font-size:inherit;line-height:inherit}.dou-editor-table td{position:relative;box-sizing:border-box;border:1px solid var(--dou-color-border);text-align:start;vertical-align:top;white-space:pre-wrap;min-width:48px;padding:6px 10px}.dou-editor-table th{position:relative;box-sizing:border-box;border:1px solid var(--dou-color-border);text-align:start;vertical-align:top;white-space:pre-wrap;min-width:48px;padding:6px 10px}.dou-editor-table th{background-color:var(--dou-color-bg-muted);font-weight:600}.ProseMirror-hideselection .dou-editor-table *::selection{background:0 0}.ProseMirror-hideselection .dou-editor-table{caret-color:transparent}.dou-editor-table .selectedCell:after{content:"";position:absolute;background-color:var(--dou-editor-selected);pointer-events:none;inset:0}.dou-editor-table .column-resize-handle{position:absolute;z-index:1;background-color:var(--dou-color-focus);pointer-events:none;width:3px;top:-1px;bottom:-1px}.dou-editor-table .column-resize-handle:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:-2px}.dou-editor-table .column-resize-handle:not(:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:-2px}.dou-editor-table .column-resize-handle:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:-2px}.dou-editor-table .column-resize-handle:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:-2px}.dou-editor-table .column-resize-handle:-moz-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:-2px}.dou-editor-table .column-resize-handle:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:-2px}.dou-editor__surface.resize-cursor{cursor:col-resize}.dou-editor-table__handle{position:absolute;z-index:2;display:inline-flex;border:1px solid var(--dou-color-border);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-sm);color:var(--dou-color-text-tertiary);cursor:pointer;transition-property:background-color,color;transition-duration:var(--dou-motion-duration-fast);transition-timing-function:var(--dou-motion-easing);touch-action:none;border-radius:4px;justify-content:center;align-items: center;margin:0;padding:0;transform:translate(-50%,-50%)}.dou-editor-table__handle.is-column{width:24px;height:14px}.dou-editor-table__handle.is-row{width:14px;height:24px}.dou-editor-table__handle:before{content:"";position:absolute;inset:-4px}@media (pointer:coarse){.dou-editor-table__handle.is-column{width:32px;height:18px}.dou-editor-table__handle.is-row{width:18px;height:32px}.dou-editor-table__handle:before{inset:-10px}}.dou-editor-table__handle svg{width:14px;height:14px}.dou-editor-table__handle:hover{background-color:color-mix(in oklab,var(--dou-color-text)calc(6% + 6%*var(--dou-scheme-dark)),var(--dou-color-bg-surface));color:var(--dou-color-text)}.dou-editor-table__handle.is-active{background-color:color-mix(in oklab,var(--dou-color-text)calc(6% + 6%*var(--dou-scheme-dark)),var(--dou-color-bg-surface));color:var(--dou-color-text)}.dou-editor-table__add{position:absolute;z-index:1;display:inline-flex;box-sizing:border-box;color:var(--dou-color-text-tertiary);cursor:pointer;opacity:.6;transition-property:background-color,color,opacity;transition-duration:var(--dou-motion-duration-fast);transition-timing-function:var(--dou-motion-easing);background-color:#0000;border:none;border-radius:4px;justify-content:center;align-items: center;margin:0;padding:0}.dou-editor-table__add.is-column{width:16px;margin-inline-start:4px}.dou-editor-table__add.is-row{height:16px;margin-block-start:4px}.dou-editor-table__add svg{width:14px;height:14px}.dou-editor-table__add:hover{background-color:var(--dou-editor-control-hover);color:var(--dou-color-text);opacity:1}@media (pointer:coarse){.dou-editor-table__add{opacity:1}.dou-editor-table__add.is-column{width:24px}.dou-editor-table__add.is-row{height:24px}.dou-editor-table .column-resize-handle{display:none}}.dou-editor-table__ghost{overflow:hidden;padding:0}.dou-editor-table__ghost .dou-editor-table{width:auto;margin:0}.dou-editor-table__cells{position:absolute;z-index:3;display:flex;border:1px solid var(--dou-color-border);border-radius:calc(var(--dou-radius-control) + 2px);background-color:color-mix(in oklab,var(--dou-color-text)calc(4%*var(--dou-scheme-dark)),var(--dou-color-bg-surface));box-shadow:var(--dou-shadow-md);font-size:var(--dou-font-size-sm);white-space:nowrap;gap:2px;padding:3px;line-height:normal;transform:translate(-50%,calc(-100% - 6px))}.dou-editor-table__cells.is-below{transform:translate(-50%,6px)}.dou-editor-table__cells-button{display:inline-flex;border-radius:var(--dou-radius-control);color:var(--dou-color-text);font:inherit;cursor:pointer;background:0 0;border:none;align-items: center;gap:4px;height:26px;margin:0;padding-inline-start:8px;padding-inline-end:8px}.dou-editor-table__cells-button svg{color:var(--dou-color-text-secondary);width:14px;height:14px}.dou-editor-table__cells-button:hover:not(:disabled){background-color:var(--dou-editor-control-hover)}.dou-editor-table__cells-button:disabled{color:var(--dou-color-text-tertiary);cursor:default}.dou-editor-bubble{border:1px solid var(--dou-color-border);border-radius:calc(var(--dou-radius-control) + 4px);background-color:color-mix(in oklab,var(--dou-color-text)calc(4%*var(--dou-scheme-dark)),var(--dou-color-bg-surface));box-shadow:var(--dou-shadow-md);color:var(--dou-color-text);font-family:var(--dou-font-family);font-size:var(--dou-font-size-md);padding:4px;line-height:normal}.dou-editor-bubble__type{gap:4px}.dou-editor-bubble__type svg{color:var(--dou-color-text-tertiary)}.dou-editor-bubble__link{display:flex;align-items: center;gap:4px}.dou-editor-bubble__link>.dou-input{width:240px}.dou-editor__content--image{padding-block-start:6px;padding-block-end:6px}.dou-editor-image__figure{width:-moz-fit-content;width:fit-content;min-width:min(100%,240px);max-width:100%;margin:0 auto}.dou-editor-image__frame{position:relative;border-radius:var(--dou-radius-control);width:-moz-fit-content;width:fit-content;max-width:100%;margin:0 auto;line-height:0}.dou-editor-image__img{display:block;border-radius:inherit;outline:1px solid color-mix(in oklab,var(--dou-color-text)8%,transparent);outline-offset:-1px;max-width:100%;height:auto}.dou-editor-image__figure.is-sized .dou-editor-image__frame,.dou-editor-image__figure.is-sized .dou-editor-image__img{width:100%}.dou-editor-image.is-selected .dou-editor-image__img{outline:2px solid var(--dou-color-focus);outline-offset:2px}.dou-editor-image__status{position:absolute;display:flex;border-radius:inherit;background-color:color-mix(in oklab,var(--dou-color-bg-surface)72%,transparent);color:var(--dou-color-text-secondary);font-size:var(--dou-font-size-md);justify-content:center;align-items: center;gap:8px;line-height:normal;inset:0}.dou-editor-image__status.is-failed{color:var(--dou-color-danger-text)}.dou-editor-image__handle{position:absolute;border:1px solid color-mix(in oklab,var(--dou-color-bg-surface)70%,transparent);border-radius:var(--dou-radius-full);background-color:color-mix(in oklab,var(--dou-color-text)55%,transparent);cursor:ew-resize;opacity:0;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);touch-action:none;width:6px;height:40px;max-height:50%;top:50%;transform:translateY(-50%)}.dou-editor-image__handle:before{position:absolute;content:"";inset:-4px -9px}.dou-editor-image__handle.is-left{left:8px}.dou-editor-image__handle.is-right{right:8px}.dou-editor-image__frame:hover .dou-editor-image__handle,.dou-editor-image.is-selected .dou-editor-image__handle{opacity:1}.dou-editor-image__caption{color:var(--dou-color-text-secondary);font-size:var(--dou-font-size-md);text-align:center;margin-top:6px;line-height:1.5}.dou-editor-image__caption-input{color:inherit;font:inherit;font-size:max(var(--dou-font-size-input-min,0px),1em);text-align:inherit;outline:none;background:0 0;border:none;width:100%;padding:0}.dou-editor-image__caption-input::placeholder{color:var(--dou-color-text-tertiary)}.dou-editor-image__caption-input:placeholder-shown:not(:focus){opacity:0}.dou-editor-image:hover .dou-editor-image__caption-input,.dou-editor-image.is-selected .dou-editor-image__caption-input,.dou-editor-embed:hover .dou-editor-image__caption-input,.dou-editor-embed.is-selected .dou-editor-image__caption-input{opacity:1}.dou-editor-image__empty{display:flex;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:color-mix(in oklab,var(--dou-color-text)3%,var(--dou-color-bg-surface));color:var(--dou-color-text-secondary);font-size:var(--dou-font-size-md);flex-wrap:wrap;align-items: center;gap:8px 12px;padding:12px 14px;line-height:normal}.dou-editor-image.is-selected .dou-editor-image__empty,.dou-editor-attachment.is-selected .dou-editor-image__empty,.dou-editor-embed.is-selected .dou-editor-image__empty{outline:2px solid var(--dou-color-focus);outline-offset:2px}.dou-editor-image__empty-icon{color:var(--dou-color-text-tertiary);flex:none;width:18px;height:18px}.dou-editor-image__empty-text{flex:auto}.dou-editor-image__actions,.dou-editor-image__embed{display:flex;gap:8px}.dou-editor-image__embed{flex:240px}.dou-editor-image__embed>.dou-input{flex:auto}.dou-editor-bubble__trigger{display:inline-flex}.dou-editor__content--attachment,.dou-editor__content--embed{padding-block-start:4px;padding-block-end:4px}.dou-editor-attachment__card{display:flex;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-sm);align-items: center;gap:12px;padding:10px 10px 10px 14px;line-height:normal}.dou-editor-attachment.is-selected .dou-editor-attachment__card{outline:2px solid var(--dou-color-focus);outline-offset:2px}.dou-editor-attachment__icon{color:var(--dou-color-text-secondary);flex:none;width:20px;height:20px}.dou-editor-attachment__text{display:flex;flex-direction:column;flex:auto;gap:2px;min-width:0}.dou-editor-attachment__name{overflow-x:clip;color:var(--dou-color-text);font-size:var(--dou-font-size-md);text-overflow:ellipsis;white-space:nowrap;font-weight:500}.dou-editor-attachment__meta{display:flex;color:var(--dou-color-text-tertiary);font-size:var(--dou-font-size-sm);font-variant-numeric:tabular-nums;align-items: center;gap:6px}.dou-editor-attachment__download{display:inline-flex;border-radius:var(--dou-radius-control);color:var(--dou-color-text-secondary);transition:background-color var(--dou-motion-duration-fast)var(--dou-motion-easing);flex:none;justify-content:center;align-items: center;width:32px;height:32px}.dou-editor-attachment__download>svg{width:16px;height:16px}.dou-editor-attachment__download:hover{background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent);color:var(--dou-color-text)}.dou-editor-attachment__download:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:1px}@media (pointer:coarse){.dou-editor-attachment__download{width:40px;height:40px}}.dou-editor-embed__figure{margin:0}.dou-editor-embed__frame{overflow:clip;border-radius:var(--dou-radius-control);background-color:color-mix(in oklab,var(--dou-color-text)4%,var(--dou-color-bg-surface));outline:1px solid color-mix(in oklab,var(--dou-color-text)8%,transparent);outline-offset:-1px;width:100%;line-height:0}.dou-editor-embed__frame>iframe{display:block;border:0;width:100%;height:100%}.dou-editor-embed__frame>video{display:block;border:0;width:100%;height:100%}.dou-editor-embed__frame.is-audio{overflow:visible;outline:none;background:0 0}.dou-editor-embed__frame.is-audio>audio{display:block;width:100%}.dou-editor-embed.is-selected .dou-editor-embed__frame{outline:2px solid var(--dou-color-focus);outline-offset:2px}.dou-editor.is-dragging .dou-editor-embed__frame{pointer-events:none}.dou-editor-embed__caption{display:grid;grid-template-columns:var(--dou-control-height-sm)1fr var(--dou-control-height-sm);align-items: center;gap:4px}.dou-editor-embed__caption>.dou-editor-image__caption-input{grid-column:2}.dou-editor-embed__edit{grid-column:3;opacity:0;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing)}.dou-editor-embed:hover .dou-editor-embed__edit,.dou-editor-embed.is-selected .dou-editor-embed__edit{opacity:1}.dou-editor-embed__edit:focus-visible{opacity:1}@media (pointer:coarse){.dou-editor-embed__edit{opacity:1}}.dou-editor-embed__link{overflow-x:clip;color:var(--dou-color-text-tertiary);font-size:var(--dou-font-size-sm);text-overflow:ellipsis;white-space:nowrap;max-width:100%}.dou-editor-embed__error{color:var(--dou-color-danger-text);font-size:var(--dou-font-size-sm);flex-basis:100%}.dou-editor__cursor{position:relative;border-inline-start:2px solid var(--dou-editor-cursor-color);pointer-events:none;word-break:normal;margin-inline-start:-1px;margin-inline-end:-1px}.dou-editor__cursor-label{position:absolute;background-color:var(--dou-editor-cursor-color);color:oklch(from var(--dou-editor-cursor-color)clamp(.2,(.66 - l)*100,.99)0 0);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:nowrap;user-select:none;border-radius:4px 4px 4px 0;padding:0 6px;font-style:normal;font-weight:400;line-height:18px;bottom:100%;left:-2px}.dou-editor__remote-selection{background-color:color-mix(in oklab,var(--dou-editor-cursor-color)20%,transparent)}.dou-editor,.dou-editor-menu,.dou-editor-palette{--dou-editor-color-gray:color-mix(in srgb,#a3a7ad calc(100%*var(--dou-scheme-dark)),#6b6f76);--dou-editor-highlight-gray:color-mix(in srgb,#3a3b3d calc(100%*var(--dou-scheme-dark)),#ececeb);--dou-editor-color-red:color-mix(in srgb,#e58a84 calc(100%*var(--dou-scheme-dark)),#b4453f);--dou-editor-highlight-red:color-mix(in srgb,#4a2826 calc(100%*var(--dou-scheme-dark)),#f8e3e1);--dou-editor-color-orange:color-mix(in srgb,#e0975f calc(100%*var(--dou-scheme-dark)),#b0622a);--dou-editor-highlight-orange:color-mix(in srgb,#4a3222 calc(100%*var(--dou-scheme-dark)),#f9e7d8);--dou-editor-color-yellow:color-mix(in srgb,#d4b44f calc(100%*var(--dou-scheme-dark)),#94761b);--dou-editor-highlight-yellow:color-mix(in srgb,#4a4020 calc(100%*var(--dou-scheme-dark)),#f8efc8);--dou-editor-color-green:color-mix(in srgb,#7fbf8c calc(100%*var(--dou-scheme-dark)),#3f7f4f);--dou-editor-highlight-green:color-mix(in srgb,#253d2b calc(100%*var(--dou-scheme-dark)),#e1f0e2);--dou-editor-color-blue:color-mix(in srgb,#7fa7d9 calc(100%*var(--dou-scheme-dark)),#3b6ea8);--dou-editor-highlight-blue:color-mix(in srgb,#23334a calc(100%*var(--dou-scheme-dark)),#e1ebf7);--dou-editor-color-purple:color-mix(in srgb,#b69ad6 calc(100%*var(--dou-scheme-dark)),#7a52a3);--dou-editor-highlight-purple:color-mix(in srgb,#352a47 calc(100%*var(--dou-scheme-dark)),#ece4f5);--dou-editor-color-pink:color-mix(in srgb,#dd8ab4 calc(100%*var(--dou-scheme-dark)),#a8467a);--dou-editor-highlight-pink:color-mix(in srgb,#46283a calc(100%*var(--dou-scheme-dark)),#f6e2ec)}.dou-editor__color,.dou-editor-palette span[data-color]{color:var(--dou-editor-text-color,inherit)}.dou-editor__highlight,.dou-editor-palette mark[data-color]{background-color:var(--dou-editor-mark-color,var(--dou-editor-highlight-yellow));color:inherit;box-decoration-break:clone;border-radius:2px}.dou-editor__color[data-color=gray],.dou-editor-palette span[data-color=gray],.dou-editor-colors__swatch[data-color=gray]{--dou-editor-text-color:var(--dou-editor-color-gray)}.dou-editor__highlight[data-color=gray],.dou-editor-palette mark[data-color=gray],.dou-editor-colors__swatch[data-highlight=gray]{--dou-editor-mark-color:var(--dou-editor-highlight-gray)}.dou-editor__color[data-color=red],.dou-editor-palette span[data-color=red],.dou-editor-colors__swatch[data-color=red]{--dou-editor-text-color:var(--dou-editor-color-red)}.dou-editor__highlight[data-color=red],.dou-editor-palette mark[data-color=red],.dou-editor-colors__swatch[data-highlight=red]{--dou-editor-mark-color:var(--dou-editor-highlight-red)}.dou-editor__color[data-color=orange],.dou-editor-palette span[data-color=orange],.dou-editor-colors__swatch[data-color=orange]{--dou-editor-text-color:var(--dou-editor-color-orange)}.dou-editor__highlight[data-color=orange],.dou-editor-palette mark[data-color=orange],.dou-editor-colors__swatch[data-highlight=orange]{--dou-editor-mark-color:var(--dou-editor-highlight-orange)}.dou-editor__color[data-color=yellow],.dou-editor-palette span[data-color=yellow],.dou-editor-colors__swatch[data-color=yellow]{--dou-editor-text-color:var(--dou-editor-color-yellow)}.dou-editor__highlight[data-color=yellow],.dou-editor-palette mark[data-color=yellow],.dou-editor-colors__swatch[data-highlight=yellow]{--dou-editor-mark-color:var(--dou-editor-highlight-yellow)}.dou-editor__color[data-color=green],.dou-editor-palette span[data-color=green],.dou-editor-colors__swatch[data-color=green]{--dou-editor-text-color:var(--dou-editor-color-green)}.dou-editor__highlight[data-color=green],.dou-editor-palette mark[data-color=green],.dou-editor-colors__swatch[data-highlight=green]{--dou-editor-mark-color:var(--dou-editor-highlight-green)}.dou-editor__color[data-color=blue],.dou-editor-palette span[data-color=blue],.dou-editor-colors__swatch[data-color=blue]{--dou-editor-text-color:var(--dou-editor-color-blue)}.dou-editor__highlight[data-color=blue],.dou-editor-palette mark[data-color=blue],.dou-editor-colors__swatch[data-highlight=blue]{--dou-editor-mark-color:var(--dou-editor-highlight-blue)}.dou-editor__color[data-color=purple],.dou-editor-palette span[data-color=purple],.dou-editor-colors__swatch[data-color=purple]{--dou-editor-text-color:var(--dou-editor-color-purple)}.dou-editor__highlight[data-color=purple],.dou-editor-palette mark[data-color=purple],.dou-editor-colors__swatch[data-highlight=purple]{--dou-editor-mark-color:var(--dou-editor-highlight-purple)}.dou-editor__color[data-color=pink],.dou-editor-palette span[data-color=pink],.dou-editor-colors__swatch[data-color=pink]{--dou-editor-text-color:var(--dou-editor-color-pink)}.dou-editor__highlight[data-color=pink],.dou-editor-palette mark[data-color=pink],.dou-editor-colors__swatch[data-highlight=pink]{--dou-editor-mark-color:var(--dou-editor-highlight-pink)}.dou-editor-colors__swatch{display:inline-flex;box-sizing:border-box;border:1px solid var(--dou-color-border);border-radius:calc(var(--dou-radius-control) - 2px);background-color:var(--dou-editor-mark-color,transparent);color:var(--dou-editor-text-color,var(--dou-color-text));font-size:var(--dou-font-size-sm);font-weight:var(--dou-font-weight-bold);justify-content:center;align-items: center;width:20px;height:20px;line-height:1}.dou-editor-colors__letter{display:block;text-box:trim-both cap alphabetic}.dou-editor__search{position:sticky;z-index:5;display:flex;container-type:inline-size;pointer-events:none;justify-content:flex-end;align-items: flex-start;height:0;top:8px}.dou-editor__search>*{pointer-events:auto}.dou-editor__match{background-color:var(--dou-editor-match);border-radius:2px}.dou-editor__match.is-current{box-shadow:0 0 0 1px var(--dou-editor-match-current)}}
|
package/dist/style.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/dist/style.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import 'dou-ui/components/autocomplete/style'
|
|
2
|
+
import 'dou-ui/components/comment-thread/style'
|
|
3
|
+
import 'dou-ui/components/copy-button/style'
|
|
4
|
+
import 'dou-ui/components/dropdown/style'
|
|
5
|
+
import 'dou-ui/components/toggle/style'
|
|
6
|
+
import 'dou-ui/components/toolbar/style'
|
|
7
|
+
import 'dou-ui/components/find-replace/style'
|
|
8
|
+
import './style.css'
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type BlockOption } from './core/extension';
|
|
2
|
+
import type { BlockProps } from './core/model';
|
|
3
|
+
import type { EditorMessages } from './locale';
|
|
4
|
+
/** Options whose label, key or keywords match the query (case-insensitive). */
|
|
5
|
+
export declare function filterOptions(options: BlockOption[], query: string, messages: EditorMessages): BlockOption[];
|
|
6
|
+
/** Whether an option describes the block as it is now: same type, same option props. */
|
|
7
|
+
export declare function isCurrent(option: BlockOption, type: string, props: BlockProps): boolean;
|
|
8
|
+
export type { BlockOption };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type CodeExtension } from '@dou-ui/code';
|
|
2
|
+
import type { EditorView } from 'prosemirror-view';
|
|
3
|
+
import type { CodeEditorViewOptions, CodeEditorViewState } from './types';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
state: CodeEditorViewState;
|
|
6
|
+
options: CodeEditorViewOptions;
|
|
7
|
+
extensions: CodeExtension[];
|
|
8
|
+
view: EditorView;
|
|
9
|
+
updateProps: (props: Record<string, unknown>) => void;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
focus: () => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
onFocus?: (() => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { EditorExtension } from '../core/extension';
|
|
2
|
+
import type { CodeEditorBlockOptions } from './types';
|
|
3
|
+
export { codeEditorLanguages, findCodeLanguage } from './languages';
|
|
4
|
+
export type { CodeEditorBlockOptions, CodeEditorLanguage } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* The code block, edited in `@dou-ui/code`'s editor: highlighted as you
|
|
7
|
+
* type, with bracket matching, multiple cursors, search and the language's
|
|
8
|
+
* indentation. The document is the same as with the built-in code block
|
|
9
|
+
* (a `codeBlock` with a `language` prop), and so are HTML and Markdown;
|
|
10
|
+
* undo, collaboration and moving blocks work as for the other blocks.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* extensions: [editorKit({ codeBlock: codeEditorBlock() })]
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* Needs `@dou-ui/code` and its styles.
|
|
17
|
+
*/
|
|
18
|
+
export declare function codeEditorBlock(options?: CodeEditorBlockOptions): EditorExtension;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type CodeLanguage } from '@dou-ui/code';
|
|
2
|
+
import type { CodeEditorLanguage } from './types';
|
|
3
|
+
/** The built-in languages of `@dou-ui/code`, as the picker lists them. */
|
|
4
|
+
export declare const codeEditorLanguages: CodeEditorLanguage[];
|
|
5
|
+
export declare const toEntry: (item: CodeLanguage | CodeEditorLanguage) => CodeEditorLanguage;
|
|
6
|
+
/** The picker entry for a block's `language` prop: by name, then by alias. */
|
|
7
|
+
export declare function findCodeLanguage(languages: readonly CodeEditorLanguage[], value: string): CodeEditorLanguage | null;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { CodeExtension, CodeLanguage } from '@dou-ui/code';
|
|
2
|
+
/** A language in the code block's picker, with the name shown for it. */
|
|
3
|
+
export interface CodeEditorLanguage {
|
|
4
|
+
language: CodeLanguage;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CodeEditorBlockOptions {
|
|
8
|
+
/**
|
|
9
|
+
* The languages offered in the picker. A block's `language` prop is
|
|
10
|
+
* matched against their names and aliases (so `bash` finds Shell); the
|
|
11
|
+
* picker stores the name. Defaults to every built-in language of
|
|
12
|
+
* `@dou-ui/code`.
|
|
13
|
+
*/
|
|
14
|
+
languages?: (CodeLanguage | CodeEditorLanguage)[];
|
|
15
|
+
/** Line numbers beside the code. */
|
|
16
|
+
lineNumbers?: boolean;
|
|
17
|
+
/** Wrap long lines instead of scrolling sideways. */
|
|
18
|
+
wrap?: boolean;
|
|
19
|
+
/** Columns per tab stop, and the indent unit. Defaults to 2. */
|
|
20
|
+
tabSize?: number;
|
|
21
|
+
/** Extensions for every code block's editor, e.g. completions or a linter. */
|
|
22
|
+
extensions?: CodeExtension[];
|
|
23
|
+
}
|
|
24
|
+
/** What the code block's view keeps for its component. */
|
|
25
|
+
export interface CodeEditorViewState {
|
|
26
|
+
block: {
|
|
27
|
+
id: string;
|
|
28
|
+
props: Record<string, unknown>;
|
|
29
|
+
};
|
|
30
|
+
/** The code when the editor mounts; later changes go through `transact`. */
|
|
31
|
+
text: string;
|
|
32
|
+
editable: boolean;
|
|
33
|
+
selected: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface CodeEditorViewOptions extends Omit<CodeEditorBlockOptions, 'languages'> {
|
|
36
|
+
languages: CodeEditorLanguage[];
|
|
37
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EditorView, NodeViewConstructor } from 'prosemirror-view';
|
|
2
|
+
import type { MountComponent } from '../core/extension';
|
|
3
|
+
import type { CodeEditorViewOptions } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* The code block's node view: the code editor owns the text, and every
|
|
6
|
+
* change it makes goes into the document as a step, with the selection,
|
|
7
|
+
* so undo, collaboration and the other blocks see an ordinary edit. Changes
|
|
8
|
+
* to the document from elsewhere (undo, someone else) come back into the
|
|
9
|
+
* editor the same way.
|
|
10
|
+
*/
|
|
11
|
+
export declare function codeEditorView(mount: MountComponent, options: CodeEditorViewOptions): NodeViewConstructor;
|
|
12
|
+
export type { EditorView };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type Node as PMNode, type Schema } from 'prosemirror-model';
|
|
2
|
+
import { Plugin, PluginKey, type Transaction } from 'prosemirror-state';
|
|
3
|
+
import type { EditorView } from 'prosemirror-view';
|
|
4
|
+
import * as Y from 'yjs';
|
|
5
|
+
export type YBlock = Y.Map<unknown>;
|
|
6
|
+
export declare const collaborationKey: PluginKey<{
|
|
7
|
+
remote: boolean;
|
|
8
|
+
tracked: boolean;
|
|
9
|
+
/** An undo step of its own (`transact`). */
|
|
10
|
+
own: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
export interface Binding {
|
|
13
|
+
map: Y.Map<YBlock>;
|
|
14
|
+
/** The origin of this editor's own changes; the undo manager tracks it. */
|
|
15
|
+
origin: object;
|
|
16
|
+
/** The origin of changes that are not undone (`setBlocks`, fixes). */
|
|
17
|
+
untracked: object;
|
|
18
|
+
view: EditorView | null;
|
|
19
|
+
/** Ends the current undo step, so a structural change is undone on its own. */
|
|
20
|
+
stopCapturing?: () => void;
|
|
21
|
+
/** Where the cursor was before the change being written, for undo to return to. */
|
|
22
|
+
selectionBefore?: unknown;
|
|
23
|
+
/** Set while the undo manager takes a step back or forward. */
|
|
24
|
+
undoing?: 'undo' | 'redo';
|
|
25
|
+
}
|
|
26
|
+
export declare function createBinding(map: Y.Map<YBlock>): Binding;
|
|
27
|
+
/** Write the blocks of `doc` into an empty map. */
|
|
28
|
+
export declare function writeDoc(map: Y.Map<YBlock>, doc: PMNode): void;
|
|
29
|
+
/** The document a map holds, read without an editor; `null` while the map is empty. */
|
|
30
|
+
export declare function readDoc(map: Y.Map<YBlock>, schema: Schema): PMNode | null;
|
|
31
|
+
export declare function syncPlugin(binding: Binding): Plugin;
|
|
32
|
+
export type { Transaction };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Node as PMNode } from 'prosemirror-model';
|
|
2
|
+
import { Plugin } from 'prosemirror-state';
|
|
3
|
+
import type { Binding } from './binding';
|
|
4
|
+
/** What the editor needs of a Yjs awareness instance (`y-protocols/awareness`). */
|
|
5
|
+
export interface AwarenessLike {
|
|
6
|
+
clientID: number;
|
|
7
|
+
getLocalState(): Record<string, unknown> | null;
|
|
8
|
+
setLocalStateField(field: string, value: unknown): void;
|
|
9
|
+
getStates(): Map<number, Record<string, unknown>>;
|
|
10
|
+
on(event: 'change', listener: (...args: unknown[]) => void): void;
|
|
11
|
+
off(event: 'change', listener: (...args: unknown[]) => void): void;
|
|
12
|
+
}
|
|
13
|
+
/** A place in the text: the block and a position in its text that follows edits. */
|
|
14
|
+
interface Place {
|
|
15
|
+
block: string;
|
|
16
|
+
/** In a table: the cell, `row id:column id`. */
|
|
17
|
+
cell?: string;
|
|
18
|
+
position: unknown;
|
|
19
|
+
}
|
|
20
|
+
/** A document position as a place that survives other people's edits. */
|
|
21
|
+
export declare function placeOf(binding: Binding, doc: PMNode, pos: number): Place | null;
|
|
22
|
+
/** Back from a place to a document position, or `null` if its block is gone. */
|
|
23
|
+
export declare function positionOf(binding: Binding, doc: PMNode, place: Place): number | null;
|
|
24
|
+
/** Shares this user's cursor and shows everyone else's. */
|
|
25
|
+
export declare function cursorsPlugin(binding: Binding, awareness: AwarenessLike): Plugin;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { collaborationColors } from 'dou-ui';
|
|
2
|
+
import * as Y from 'yjs';
|
|
3
|
+
import { type EditorExtension } from '../core/extension';
|
|
4
|
+
import { type EditorDocument, type PartialBlock } from '../core/model';
|
|
5
|
+
import { type AwarenessLike } from './cursors';
|
|
6
|
+
/** How the people editing together see each other. */
|
|
7
|
+
export interface CollaborationUser {
|
|
8
|
+
name: string;
|
|
9
|
+
/** The cursor color, any CSS color. Picked from the client id when left out. */
|
|
10
|
+
color?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CollaborationOptions {
|
|
13
|
+
/** Where the document lives, e.g. `ydoc.getMap('document')`. */
|
|
14
|
+
map: Y.Map<unknown>;
|
|
15
|
+
/** Shares cursors and selections (`y-protocols/awareness`). Without it, others' cursors are not shown. */
|
|
16
|
+
awareness?: AwarenessLike;
|
|
17
|
+
/** This user, shown at their cursor to the others. Needs `awareness`. */
|
|
18
|
+
user?: CollaborationUser;
|
|
19
|
+
/**
|
|
20
|
+
* Where the comment threads live, e.g. `ydoc.getMap('comments')`, so
|
|
21
|
+
* they reach everyone with the document. `v-model:comments` then only
|
|
22
|
+
* mirrors them. Without it, the text's anchors still travel with the
|
|
23
|
+
* document and the threads are the app's to share.
|
|
24
|
+
*/
|
|
25
|
+
comments?: Y.Map<unknown>;
|
|
26
|
+
}
|
|
27
|
+
export { collaborationColors };
|
|
28
|
+
/**
|
|
29
|
+
* Edit together through a Yjs document. The document lives in `map`: the
|
|
30
|
+
* editor's `v-model` only mirrors it and changes to `v-model` are not
|
|
31
|
+
* written back. Undo only takes back this user's own changes.
|
|
32
|
+
*/
|
|
33
|
+
export declare function collaboration(options: CollaborationOptions): EditorExtension;
|
|
34
|
+
/**
|
|
35
|
+
* Write a document into an empty map, e.g. when a document that so far was
|
|
36
|
+
* saved as JSON starts being edited together. Do it once, where the
|
|
37
|
+
* document is created (often on the server): two clients filling the same
|
|
38
|
+
* empty map at the same time would both add their copy.
|
|
39
|
+
*/
|
|
40
|
+
export declare function fillMap(map: Y.Map<unknown>, doc: EditorDocument<PartialBlock>, extensions?: (EditorExtension | EditorExtension[])[]): void;
|
|
41
|
+
/**
|
|
42
|
+
* The document a shared map holds, read without an editor, e.g. to save a
|
|
43
|
+
* version on the server. Pass the extensions the editors use; an empty map
|
|
44
|
+
* reads as no blocks.
|
|
45
|
+
*/
|
|
46
|
+
export declare function readMap(map: Y.Map<unknown>, extensions?: (EditorExtension | EditorExtension[])[]): EditorDocument;
|
|
47
|
+
export type { AwarenessLike };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Order keys: strings that sort like the blocks they belong to. A key can
|
|
3
|
+
* always be made between two others, so moving or inserting a block only
|
|
4
|
+
* writes that block's key, never its neighbours'.
|
|
5
|
+
*/
|
|
6
|
+
/** A key after `a` and before `b`; either may be missing. Needs `a < b`. */
|
|
7
|
+
export declare function keyBetween(a: string | null, b: string | null): string;
|
|
8
|
+
/** `n` keys in order between `a` and `b`, kept short by splitting the range in halves. */
|
|
9
|
+
export declare function keysBetween(a: string | null, b: string | null, n: number): string[];
|
|
10
|
+
/**
|
|
11
|
+
* Which of `keys` (in their wanted order) can stay: the longest strictly
|
|
12
|
+
* increasing run. Missing keys (`null`) never stay. Returns the indexes.
|
|
13
|
+
*/
|
|
14
|
+
export declare function keptIndexes(keys: (string | null)[]): Set<number>;
|
|
15
|
+
/**
|
|
16
|
+
* Order keys for items in their wanted order, given each one's current key
|
|
17
|
+
* (`null` when it has none). The longest run already in order keeps its
|
|
18
|
+
* keys; the others get fresh keys between their kept neighbours.
|
|
19
|
+
*/
|
|
20
|
+
export declare function orderKeys(keys: (string | null)[]): string[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Node as PMNode, NodeType } from 'prosemirror-model';
|
|
2
|
+
import * as Y from 'yjs';
|
|
3
|
+
import { type BlockProps } from '../core/model';
|
|
4
|
+
type YEntry = Y.Map<unknown>;
|
|
5
|
+
/** The table node a stored table stands for. */
|
|
6
|
+
export declare function readTable(yblock: YEntry, type: NodeType, props: BlockProps): PMNode;
|
|
7
|
+
/**
|
|
8
|
+
* Write the table `after` into a stored table that holds `before` (`null`
|
|
9
|
+
* for a new one). Returns whether cells that became visible hold text the
|
|
10
|
+
* editor doesn't show yet, typed by someone else while they were merged away.
|
|
11
|
+
*/
|
|
12
|
+
export declare function writeTable(yblock: YEntry, before: PMNode | null, after: PMNode): boolean;
|
|
13
|
+
/** Forget a stored table's rows, e.g. when the block stops being a table. */
|
|
14
|
+
export declare function clearTable(yblock: YEntry): void;
|
|
15
|
+
/** The cell a position in a table falls in, and the offset in its text. */
|
|
16
|
+
export declare function cellAt(table: PMNode, offset: number): {
|
|
17
|
+
key: string;
|
|
18
|
+
index: number;
|
|
19
|
+
} | null;
|
|
20
|
+
/** Where a cell's text starts in a table, by its key; `null` when it isn't shown. */
|
|
21
|
+
export declare function cellStart(table: PMNode, key: string): {
|
|
22
|
+
offset: number;
|
|
23
|
+
size: number;
|
|
24
|
+
} | null;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Mark, type Node as PMNode, type Schema } from 'prosemirror-model';
|
|
2
|
+
import type * as Y from 'yjs';
|
|
3
|
+
export type Attributes = Record<string, unknown>;
|
|
4
|
+
export declare function markAttributes(marks: readonly Mark[], schema: Schema): Attributes;
|
|
5
|
+
/** Write `content`'s inline nodes from `from` to `to` into `text` at `at`. */
|
|
6
|
+
export declare function insertInline(text: Y.Text, at: number, content: PMNode, from: number, to: number): void;
|
|
7
|
+
export declare function inlineFrom(text: Y.Text, schema: Schema, code: boolean): PMNode[];
|
|
8
|
+
/** Bring `text` from `before`'s inline content to `after`'s, changing only what differs. */
|
|
9
|
+
export declare function updateText(text: Y.Text, before: PMNode, after: PMNode): void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** `Mod+K` and the link button: edit the link of the selected text. */
|
|
2
|
+
declare function editLink(): boolean;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
+
editLink: typeof editLink;
|
|
5
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Menus opened from the editor's own controls leave the focus in the text,
|
|
4
|
+
* where the editor would take `Escape` for itself (selecting the block).
|
|
5
|
+
* While one is open, `Escape` closes it first.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useMenuEscape(open: Ref<boolean>, close: () => void): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Node as PMNode } from 'prosemirror-model';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
readonly: boolean;
|
|
4
|
+
skip: (node: PMNode) => boolean;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
'replacing'?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
11
|
+
focus: (which?: "find" | "replace") => void | undefined;
|
|
12
|
+
next: () => void;
|
|
13
|
+
previous: () => void;
|
|
14
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
close: () => any;
|
|
16
|
+
"update:replacing": (value: boolean) => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
18
|
+
onClose?: (() => any) | undefined;
|
|
19
|
+
"onUpdate:replacing"?: ((value: boolean) => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type SlashState } from '../core/slash';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
slash: SlashState | null;
|
|
4
|
+
};
|
|
5
|
+
/** Keys the editor passes on while the menu is open. */
|
|
6
|
+
declare function onKey(event: KeyboardEvent): boolean;
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
8
|
+
onKey: typeof onKey;
|
|
9
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { NodeSpec } from 'prosemirror-model';
|
|
2
|
+
/** How a block's text lines up; `null` (left out of `props`) follows the reading direction. */
|
|
3
|
+
export type BlockAlign = 'left' | 'center' | 'right';
|
|
4
|
+
export declare const ALIGNS: readonly BlockAlign[];
|
|
5
|
+
export declare const isAlign: (value: unknown) => value is BlockAlign;
|
|
6
|
+
/**
|
|
7
|
+
* The alignment written on an element: `data-align`, `style="text-align"`
|
|
8
|
+
* or `align`. Left is the reading direction: `null`, as it is stored.
|
|
9
|
+
*/
|
|
10
|
+
export declare function alignOf(dom: HTMLElement): BlockAlign | null;
|
|
11
|
+
/**
|
|
12
|
+
* A text block that can be aligned: adds the `align` attribute, reads it
|
|
13
|
+
* from pasted HTML and draws it. Used by paragraphs, headings and quotes;
|
|
14
|
+
* custom text blocks can use it too.
|
|
15
|
+
*/
|
|
16
|
+
export declare function alignable(spec: NodeSpec): NodeSpec;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Plugin, PluginKey, type Command, type EditorState } from 'prosemirror-state';
|
|
2
|
+
import { type SiblingRange } from './blocks';
|
|
3
|
+
/**
|
|
4
|
+
* Whole blocks selected with `Esc` or from the block handle. The selected
|
|
5
|
+
* blocks are siblings, from `anchor` to `head`. Underneath, the editor's
|
|
6
|
+
* own selection spans their text, so copy and cut work as usual; the text
|
|
7
|
+
* highlight is hidden and the blocks are tinted instead.
|
|
8
|
+
*/
|
|
9
|
+
export interface BlockSelection {
|
|
10
|
+
anchor: string;
|
|
11
|
+
head: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const blockSelectionKey: PluginKey<BlockSelection | null>;
|
|
14
|
+
export declare function getBlockSelection(state: EditorState): BlockSelection | null;
|
|
15
|
+
/** The blocks of a block selection, or `null` when they can't be found. */
|
|
16
|
+
export declare function blockSelectionRange(state: EditorState): SiblingRange | null;
|
|
17
|
+
/** Select whole blocks, from `anchor` to `head` (siblings). */
|
|
18
|
+
export declare function selectBlocks(anchor: string, head?: string): Command;
|
|
19
|
+
export declare const clearBlockSelection: Command;
|
|
20
|
+
/** `Esc`: select the blocks the cursor or text selection is in. */
|
|
21
|
+
export declare const selectCurrentBlocks: Command;
|
|
22
|
+
export declare function blockSelectionPlugin(): Plugin<BlockSelection | null>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Node as PMNode, ResolvedPos } from 'prosemirror-model';
|
|
2
|
+
import type { EditorState } from 'prosemirror-state';
|
|
3
|
+
/** A `block` node and where it sits. */
|
|
4
|
+
export interface BlockInfo {
|
|
5
|
+
node: PMNode;
|
|
6
|
+
/** The position right before the block. */
|
|
7
|
+
pos: number;
|
|
8
|
+
/** Its depth in the document; top-level blocks are at depth 1. */
|
|
9
|
+
depth: number;
|
|
10
|
+
/** The block's content node (paragraph, heading, …). */
|
|
11
|
+
content: PMNode;
|
|
12
|
+
/** The position right before the content node. */
|
|
13
|
+
contentPos: number;
|
|
14
|
+
/** The children, if any. */
|
|
15
|
+
group: PMNode | null;
|
|
16
|
+
}
|
|
17
|
+
export declare function infoAt(node: PMNode, pos: number, depth: number): BlockInfo;
|
|
18
|
+
/** The innermost block around a position, or `null` between blocks. */
|
|
19
|
+
export declare function blockAround($pos: ResolvedPos): BlockInfo | null;
|
|
20
|
+
/** The block with an id, by scanning the document. */
|
|
21
|
+
export declare function findBlockById(doc: PMNode, id: string): BlockInfo | null;
|
|
22
|
+
/** A run of sibling blocks inside one container (the doc or a group). */
|
|
23
|
+
export interface SiblingRange {
|
|
24
|
+
/** The container: the doc or a `blockGroup`. */
|
|
25
|
+
parent: PMNode;
|
|
26
|
+
/** The position where the container's content starts. */
|
|
27
|
+
parentStart: number;
|
|
28
|
+
/** Depth of the blocks. */
|
|
29
|
+
depth: number;
|
|
30
|
+
/** First and last index, inclusive. */
|
|
31
|
+
from: number;
|
|
32
|
+
to: number;
|
|
33
|
+
/** Positions before the first and after the last block. */
|
|
34
|
+
start: number;
|
|
35
|
+
end: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The sibling blocks a selection spans. When its ends sit at different
|
|
39
|
+
* levels, the range climbs to the level they share.
|
|
40
|
+
*/
|
|
41
|
+
export declare function siblingRangeBetween(doc: PMNode, from: number, to: number): SiblingRange | null;
|
|
42
|
+
export declare function selectedRange(state: EditorState): SiblingRange | null;
|
|
43
|
+
/** The blocks of a range, in order. */
|
|
44
|
+
export declare function blocksIn(range: SiblingRange): BlockInfo[];
|
|
45
|
+
/** Every block in document order, outer before inner. */
|
|
46
|
+
export declare function allBlocks(doc: PMNode): BlockInfo[];
|
|
47
|
+
/** The deepest last block inside a block (itself when it has no children). */
|
|
48
|
+
export declare function lastDescendant(info: BlockInfo): BlockInfo;
|
|
49
|
+
/** The block that comes before `info` when reading top to bottom. */
|
|
50
|
+
export declare function previousInDocument(doc: PMNode, info: BlockInfo): BlockInfo | null;
|
|
51
|
+
/** The block that comes after `info` when reading top to bottom. */
|
|
52
|
+
export declare function nextInDocument(doc: PMNode, info: BlockInfo): BlockInfo | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Node as PMNode } from 'prosemirror-model';
|
|
2
|
+
/** Which blocks a change touched, by id. */
|
|
3
|
+
export interface BlockChanges {
|
|
4
|
+
/** New blocks, including those pasted or split off. */
|
|
5
|
+
added: string[];
|
|
6
|
+
/** Blocks that are gone. */
|
|
7
|
+
removed: string[];
|
|
8
|
+
/** Blocks whose type, props, text or rows changed (not their children). */
|
|
9
|
+
updated: string[];
|
|
10
|
+
/** Blocks that got another parent or another place among their siblings. */
|
|
11
|
+
moved: string[];
|
|
12
|
+
}
|
|
13
|
+
/** What changed between two documents, block by block. */
|
|
14
|
+
export declare function diffBlocks(before: PMNode, after: PMNode): BlockChanges;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** The palette names; the colors follow the theme and the light or dark scheme. */
|
|
2
|
+
export declare const textColors: readonly ["gray", "red", "orange", "yellow", "green", "blue", "purple", "pink"];
|
|
3
|
+
export type TextColor = (typeof textColors)[number];
|
|
4
|
+
export declare const isColor: (value: unknown) => value is TextColor;
|