@witchcraft/editor 0.0.8 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +2 -2
  3. package/dist/runtime/components/CodeBlockThemePicker.d.vue.ts +4 -2
  4. package/dist/runtime/components/CodeBlockThemePicker.vue +0 -1
  5. package/dist/runtime/components/CodeBlockThemePicker.vue.d.ts +4 -2
  6. package/dist/runtime/components/Commands.d.vue.ts +2 -1
  7. package/dist/runtime/components/Commands.vue.d.ts +2 -1
  8. package/dist/runtime/components/Editor.d.vue.ts +3 -12
  9. package/dist/runtime/components/Editor.vue.d.ts +3 -12
  10. package/dist/runtime/components/EditorDemoApp.d.vue.ts +2 -1
  11. package/dist/runtime/components/EditorDemoApp.vue.d.ts +2 -1
  12. package/dist/runtime/components/EditorDemoControls.d.vue.ts +4 -2
  13. package/dist/runtime/components/EditorDemoControls.vue.d.ts +4 -2
  14. package/dist/runtime/components/TestWrapper.d.vue.ts +2 -1
  15. package/dist/runtime/components/TestWrapper.vue.d.ts +2 -1
  16. package/dist/runtime/demo/App.d.vue.ts +2 -1
  17. package/dist/runtime/demo/App.vue.d.ts +2 -1
  18. package/dist/runtime/pm/features/Blocks/components/DragTreeHandle.d.vue.ts +2 -1
  19. package/dist/runtime/pm/features/Blocks/components/DragTreeHandle.vue.d.ts +2 -1
  20. package/dist/runtime/pm/features/Blocks/components/ItemMenu.d.vue.ts +2 -1
  21. package/dist/runtime/pm/features/Blocks/components/ItemMenu.vue.d.ts +2 -1
  22. package/dist/runtime/pm/features/Blocks/components/ItemNodeView.d.vue.ts +2 -1
  23. package/dist/runtime/pm/features/Blocks/components/ItemNodeView.vue.d.ts +2 -1
  24. package/dist/runtime/pm/features/CodeBlock/components/CodeBlockView.d.vue.ts +2 -1
  25. package/dist/runtime/pm/features/CodeBlock/components/CodeBlockView.vue.d.ts +2 -1
  26. package/dist/runtime/pm/features/CommandsMenus/components/CommandBar.d.vue.ts +2 -1
  27. package/dist/runtime/pm/features/CommandsMenus/components/CommandBar.vue.d.ts +2 -1
  28. package/dist/runtime/pm/features/CommandsMenus/components/CommandBarItem.d.vue.ts +2 -1
  29. package/dist/runtime/pm/features/CommandsMenus/components/CommandBarItem.vue.d.ts +2 -1
  30. package/dist/runtime/pm/features/CommandsMenus/components/CommandMenuGroup.d.vue.ts +2 -1
  31. package/dist/runtime/pm/features/CommandsMenus/components/CommandMenuGroup.vue.d.ts +2 -1
  32. package/dist/runtime/pm/features/CommandsMenus/components/CommandMenuItem.d.vue.ts +2 -1
  33. package/dist/runtime/pm/features/CommandsMenus/components/CommandMenuItem.vue.d.ts +2 -1
  34. package/dist/runtime/pm/features/CommandsMenus/components/CommandMenuList.d.vue.ts +2 -1
  35. package/dist/runtime/pm/features/CommandsMenus/components/CommandMenuList.vue.d.ts +2 -1
  36. package/dist/runtime/pm/features/CommandsMenus/components/TextIcon.d.vue.ts +2 -1
  37. package/dist/runtime/pm/features/CommandsMenus/components/TextIcon.vue.d.ts +2 -1
  38. package/dist/runtime/pm/features/CommandsMenus/icons/HighlightIcon.d.vue.ts +2 -1
  39. package/dist/runtime/pm/features/CommandsMenus/icons/HighlightIcon.vue.d.ts +2 -1
  40. package/dist/runtime/pm/features/CommandsMenus/icons/SubscriptIcon.d.vue.ts +2 -1
  41. package/dist/runtime/pm/features/CommandsMenus/icons/SubscriptIcon.vue.d.ts +2 -1
  42. package/dist/runtime/pm/features/CommandsMenus/icons/SuperscriptIcon.d.vue.ts +2 -1
  43. package/dist/runtime/pm/features/CommandsMenus/icons/SuperscriptIcon.vue.d.ts +2 -1
  44. package/dist/runtime/pm/features/DocumentApi/DocumentApi.d.ts +3 -0
  45. package/dist/runtime/pm/features/DocumentApi/DocumentApi.js +2 -0
  46. package/dist/runtime/pm/features/DocumentApi/composables/useTestDocumentApi.js +4 -1
  47. package/dist/runtime/pm/features/EmbeddedDocument/components/EmbeddedDocumentPicker.d.vue.ts +2 -1
  48. package/dist/runtime/pm/features/EmbeddedDocument/components/EmbeddedDocumentPicker.vue +3 -3
  49. package/dist/runtime/pm/features/EmbeddedDocument/components/EmbeddedDocumentPicker.vue.d.ts +2 -1
  50. package/dist/runtime/pm/features/EmbeddedDocument/components/EmbeddedNodeView.d.vue.ts +2 -1
  51. package/dist/runtime/pm/features/EmbeddedDocument/components/EmbeddedNodeView.vue.d.ts +2 -1
  52. package/dist/runtime/pm/features/FileLoader/components/FileLoaderNodeView.d.vue.ts +2 -1
  53. package/dist/runtime/pm/features/FileLoader/components/FileLoaderNodeView.vue.d.ts +2 -1
  54. package/dist/runtime/pm/features/Iframe/components/IframeNodeView.d.vue.ts +2 -1
  55. package/dist/runtime/pm/features/Iframe/components/IframeNodeView.vue +0 -1
  56. package/dist/runtime/pm/features/Iframe/components/IframeNodeView.vue.d.ts +2 -1
  57. package/dist/runtime/pm/features/Link/components/BubbleMenuExternalLink.d.vue.ts +4 -2
  58. package/dist/runtime/pm/features/Link/components/BubbleMenuExternalLink.vue.d.ts +4 -2
  59. package/dist/runtime/pm/features/Link/components/BubbleMenuInternalLink.d.vue.ts +4 -2
  60. package/dist/runtime/pm/features/Link/components/BubbleMenuInternalLink.vue.d.ts +4 -2
  61. package/dist/runtime/pm/features/Link/components/BubbleMenuLink.d.vue.ts +2 -1
  62. package/dist/runtime/pm/features/Link/components/BubbleMenuLink.vue.d.ts +2 -1
  63. package/dist/runtime/pm/features/Link/components/BubbleMenuLinkActions.d.vue.ts +2 -1
  64. package/dist/runtime/pm/features/Link/components/BubbleMenuLinkActions.vue.d.ts +2 -1
  65. package/dist/runtime/pm/features/Menus/components/MarkMenuManager.d.vue.ts +2 -1
  66. package/dist/runtime/pm/features/Menus/components/MarkMenuManager.vue.d.ts +2 -1
  67. package/dist/runtime/pm/generator.d.ts +30 -44
  68. package/dist/runtime/pm/generator.js +112 -109
  69. package/dist/runtime/pm/utils/generateRandomDoc.d.ts +3 -21
  70. package/dist/runtime/pm/utils/generateRandomDoc.js +36 -77
  71. package/dist/runtime/pm/utils/generator/createGeneratorConfig.d.ts +33 -0
  72. package/dist/runtime/pm/utils/generator/createGeneratorConfig.js +3 -0
  73. package/dist/runtime/pm/utils/generator/createPsuedoSentence.d.ts +4 -0
  74. package/dist/runtime/pm/utils/generator/createPsuedoSentence.js +16 -0
  75. package/dist/runtime/pm/utils/generator/createRandomChildCountGenerator.d.ts +14 -0
  76. package/dist/runtime/pm/utils/generator/createRandomChildCountGenerator.js +16 -0
  77. package/dist/runtime/pm/utils/generator/getTextOrMarkLength.d.ts +2 -0
  78. package/dist/runtime/pm/utils/generator/getTextOrMarkLength.js +7 -0
  79. package/dist/runtime/pm/utils/generator/influenceWithDepth.d.ts +6 -0
  80. package/dist/runtime/pm/utils/generator/influenceWithDepth.js +6 -0
  81. package/dist/runtime/pm/utils/generator/sometimesZero.d.ts +13 -0
  82. package/dist/runtime/pm/utils/generator/sometimesZero.js +7 -0
  83. package/package.json +59 -58
  84. package/src/runtime/components/CodeBlockThemePicker.vue +0 -1
  85. package/src/runtime/pm/features/DocumentApi/DocumentApi.ts +3 -0
  86. package/src/runtime/pm/features/DocumentApi/composables/useTestDocumentApi.ts +2 -1
  87. package/src/runtime/pm/features/EmbeddedDocument/components/EmbeddedDocumentPicker.vue +3 -4
  88. package/src/runtime/pm/features/Iframe/components/IframeNodeView.vue +0 -1
  89. package/src/runtime/pm/generator.ts +104 -151
  90. package/src/runtime/pm/schema.ts +2 -2
  91. package/src/runtime/pm/utils/generateRandomDoc.ts +47 -124
  92. package/src/runtime/pm/utils/generator/createGeneratorConfig.ts +56 -0
  93. package/src/runtime/pm/utils/generator/createPsuedoSentence.ts +18 -0
  94. package/src/runtime/pm/utils/generator/createRandomChildCountGenerator.ts +31 -0
  95. package/src/runtime/pm/utils/generator/getTextOrMarkLength.ts +9 -0
  96. package/src/runtime/pm/utils/generator/influenceWithDepth.ts +11 -0
  97. package/src/runtime/pm/utils/generator/sometimesZero.ts +16 -0
  98. package/dist/runtime/pm/utils/generateRandomTree.d.ts +0 -50
  99. package/dist/runtime/pm/utils/generateRandomTree.js +0 -38
  100. package/src/runtime/pm/utils/generateRandomTree.ts +0 -100
@@ -28,7 +28,7 @@
28
28
  }
29
29
  </component>
30
30
  <!-- @vue-expect-error -->
31
- <WSimpleInput
31
+ <WInputDeprecated
32
32
  placeholder="Change document."
33
33
  suggestions-class="max-h-[200px] overflow-y-auto"
34
34
  :suggestions="searchSuggestions"
@@ -49,7 +49,7 @@
49
49
  <template #suggestion-item="{ item }">
50
50
  {{ item.title }}
51
51
  </template>
52
- </WSimpleInput>
52
+ </WInputDeprecated>
53
53
  <WCheckbox v-model="embedFullDocument">
54
54
  Embed Full Document
55
55
  </WCheckbox>
@@ -112,7 +112,7 @@
112
112
  import WIcon from "@witchcraft/ui/components/Icon";
113
113
  import WButton from "@witchcraft/ui/components/LibButton";
114
114
  import WCheckbox from "@witchcraft/ui/components/LibCheckbox";
115
- import WSimpleInput from "@witchcraft/ui/components/LibSimpleInput";
115
+ import WInputDeprecated from "@witchcraft/ui/components/LibInputDeprecated";
116
116
  import { inject, nextTick, provide, ref, toRef, watch } from "vue";
117
117
  import ILineMdLoadingLoop from "~icons/line-md/loading-loop";
118
118
  import Editor from "../../../../components/Editor.vue";
@@ -4,11 +4,12 @@ type __VLS_Props = {
4
4
  /** We need this, otherwise prosemirror? gets in an infinite loop because the component is not actually displayed? I think... Chrome debugger freezes completely. */
5
5
  isShown: boolean;
6
6
  };
7
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
8
  cancel: () => any;
9
9
  submit: (embedId: MaybeEmbedId) => any;
10
10
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
11
  onCancel?: (() => any) | undefined;
12
12
  onSubmit?: ((embedId: MaybeEmbedId) => any) | undefined;
13
13
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
14
15
  export default _default;
@@ -1,4 +1,4 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
2
  editor: {
3
3
  type: import("vue").PropType<import("@tiptap/core").NodeViewProps["editor"]>;
4
4
  required: true;
@@ -89,4 +89,5 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
89
89
  required: true;
90
90
  };
91
91
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
92
+ declare const _default: typeof __VLS_export;
92
93
  export default _default;
@@ -1,4 +1,4 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
2
  editor: {
3
3
  type: import("vue").PropType<import("@tiptap/core").NodeViewProps["editor"]>;
4
4
  required: true;
@@ -89,4 +89,5 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
89
89
  required: true;
90
90
  };
91
91
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
92
+ declare const _default: typeof __VLS_export;
92
93
  export default _default;
@@ -1,4 +1,4 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
2
  editor: {
3
3
  type: import("vue").PropType<import("@tiptap/core").NodeViewProps["editor"]>;
4
4
  required: true;
@@ -89,4 +89,5 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
89
89
  required: true;
90
90
  };
91
91
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
92
+ declare const _default: typeof __VLS_export;
92
93
  export default _default;
@@ -1,4 +1,4 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
2
  editor: {
3
3
  type: import("vue").PropType<import("@tiptap/core").NodeViewProps["editor"]>;
4
4
  required: true;
@@ -89,4 +89,5 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
89
89
  required: true;
90
90
  };
91
91
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
92
+ declare const _default: typeof __VLS_export;
92
93
  export default _default;
@@ -1,4 +1,4 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
2
  editor: {
3
3
  type: import("vue").PropType<import("@tiptap/core").NodeViewProps["editor"]>;
4
4
  required: true;
@@ -89,4 +89,5 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
89
89
  required: true;
90
90
  };
91
91
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
92
+ declare const _default: typeof __VLS_export;
92
93
  export default _default;
@@ -59,7 +59,6 @@
59
59
  :style="`aspect-ratio: ${node.attrs.aspectRatio}`"
60
60
  v-bind="node.attrs"
61
61
  />
62
- {{ Object.keys(node.attrs) }}
63
62
  </node-view-wrapper>
64
63
  </template>
65
64
 
@@ -1,4 +1,4 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
2
  editor: {
3
3
  type: import("vue").PropType<import("@tiptap/core").NodeViewProps["editor"]>;
4
4
  required: true;
@@ -89,4 +89,5 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
89
89
  required: true;
90
90
  };
91
91
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
92
+ declare const _default: typeof __VLS_export;
92
93
  export default _default;
@@ -6,11 +6,12 @@ type __VLS_Props = {
6
6
  linkMark: Mark | undefined;
7
7
  isChanged: boolean;
8
8
  };
9
- type __VLS_PublicProps = __VLS_Props & {
9
+ type __VLS_ModelProps = {
10
10
  "linkHref": string;
11
11
  "linkTextValue": string;
12
12
  };
13
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
13
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
14
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
14
15
  focus: (type: "text" | "link") => void;
15
16
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
17
  close: (e?: Event | undefined) => any;
@@ -25,4 +26,5 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
25
26
  "onUpdate:linkHref"?: ((value: string) => any) | undefined;
26
27
  "onUpdate:linkTextValue"?: ((value: string) => any) | undefined;
27
28
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
29
+ declare const _default: typeof __VLS_export;
28
30
  export default _default;
@@ -6,11 +6,12 @@ type __VLS_Props = {
6
6
  linkMark: Mark | undefined;
7
7
  isChanged: boolean;
8
8
  };
9
- type __VLS_PublicProps = __VLS_Props & {
9
+ type __VLS_ModelProps = {
10
10
  "linkHref": string;
11
11
  "linkTextValue": string;
12
12
  };
13
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
13
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
14
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
14
15
  focus: (type: "text" | "link") => void;
15
16
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
17
  close: (e?: Event | undefined) => any;
@@ -25,4 +26,5 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
25
26
  "onUpdate:linkHref"?: ((value: string) => any) | undefined;
26
27
  "onUpdate:linkTextValue"?: ((value: string) => any) | undefined;
27
28
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
29
+ declare const _default: typeof __VLS_export;
28
30
  export default _default;
@@ -7,11 +7,12 @@ type __VLS_Props = {
7
7
  isChanged: boolean;
8
8
  getInternalLinkHref: (href: string) => string;
9
9
  };
10
- type __VLS_PublicProps = __VLS_Props & {
10
+ type __VLS_ModelProps = {
11
11
  "linkText": string;
12
12
  "tempLinkTextValue"?: string;
13
13
  };
14
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
14
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
15
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
15
16
  focus: () => void;
16
17
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
18
  close: (e?: Event | undefined) => any;
@@ -26,4 +27,5 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
26
27
  "onUpdate:linkText"?: ((value: string) => any) | undefined;
27
28
  "onUpdate:tempLinkTextValue"?: ((value: string) => any) | undefined;
28
29
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const _default: typeof __VLS_export;
29
31
  export default _default;
@@ -7,11 +7,12 @@ type __VLS_Props = {
7
7
  isChanged: boolean;
8
8
  getInternalLinkHref: (href: string) => string;
9
9
  };
10
- type __VLS_PublicProps = __VLS_Props & {
10
+ type __VLS_ModelProps = {
11
11
  "linkText": string;
12
12
  "tempLinkTextValue"?: string;
13
13
  };
14
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
14
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
15
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
15
16
  focus: () => void;
16
17
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
18
  close: (e?: Event | undefined) => any;
@@ -26,4 +27,5 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
26
27
  "onUpdate:linkText"?: ((value: string) => any) | undefined;
27
28
  "onUpdate:tempLinkTextValue"?: ((value: string) => any) | undefined;
28
29
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const _default: typeof __VLS_export;
29
31
  export default _default;
@@ -7,5 +7,6 @@ type __VLS_Props = {
7
7
  getLinkInternalSuggestions?: (href: string) => string[];
8
8
  getInternalLinkHref: (title: string) => string;
9
9
  };
10
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
11
12
  export default _default;
@@ -7,5 +7,6 @@ type __VLS_Props = {
7
7
  getLinkInternalSuggestions?: (href: string) => string[];
8
8
  getInternalLinkHref: (title: string) => string;
9
9
  };
10
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
11
12
  export default _default;
@@ -4,7 +4,7 @@ type __VLS_Props = {
4
4
  linkHref?: string;
5
5
  isChanged: boolean;
6
6
  };
7
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
8
  close: (e: Event) => any;
9
9
  copy: (value: string) => any;
10
10
  save: (e: Event) => any;
@@ -15,4 +15,5 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
15
15
  onSave?: ((e: Event) => any) | undefined;
16
16
  onRemove?: (() => any) | undefined;
17
17
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
18
19
  export default _default;
@@ -4,7 +4,7 @@ type __VLS_Props = {
4
4
  linkHref?: string;
5
5
  isChanged: boolean;
6
6
  };
7
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
8
  close: (e: Event) => any;
9
9
  copy: (value: string) => any;
10
10
  save: (e: Event) => any;
@@ -15,4 +15,5 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
15
15
  onSave?: ((e: Event) => any) | undefined;
16
16
  onRemove?: (() => any) | undefined;
17
17
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
18
19
  export default _default;
@@ -2,5 +2,6 @@ import type { Editor } from "@tiptap/vue-3";
2
2
  type __VLS_Props = {
3
3
  editor: Editor;
4
4
  };
5
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
6
7
  export default _default;
@@ -2,5 +2,6 @@ import type { Editor } from "@tiptap/vue-3";
2
2
  type __VLS_Props = {
3
3
  editor: Editor;
4
4
  };
5
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
6
7
  export default _default;
@@ -1,4 +1,4 @@
1
- import type { Mark, Node } from "@tiptap/pm/model";
1
+ import type { Node } from "@tiptap/pm/model";
2
2
  export declare const pm: {
3
3
  schema: import("@tiptap/pm/model").Schema<"paragraph" | "item" | "codeBlock" | "heading" | "iframe" | "image" | "table" | "text" | "blockquote" | "cite" | "list" | "tableCell" | "doc" | "embeddedDoc" | "tableRow" | "tableHeader", "bold" | "code" | "italic" | "strike" | "subscript" | "superscript" | "underline" | "hardBreak" | "highlight">;
4
4
  } & {
@@ -33,50 +33,36 @@ export declare const pm: {
33
33
  } & {
34
34
  [name: string]: import("prosemirror-test-builder").NodeBuilder | import("prosemirror-test-builder").MarkBuilder;
35
35
  };
36
- export type GeneratorConfigEntry<TChildrenType extends "node" | "text" = "node" | "text", TParentType extends "node" | "text" = "node" | "text", TChildren extends TChildrenType extends "node" ? Node : Mark | string = TChildrenType extends "node" ? Node : Mark | string, TParent extends TParentType extends "node" ? Node : Mark | string = TParentType extends "node" ? Node : Mark | string> = {
36
+ export declare const generatorConfig: ({
37
+ create: (pm: {
38
+ schema: import("@tiptap/pm/model").Schema<string, string>;
39
+ } & {
40
+ readonly [x: string]: import("prosemirror-test-builder").NodeBuilder;
41
+ } & {
42
+ readonly [x: string]: import("prosemirror-test-builder").MarkBuilder;
43
+ } & {
44
+ [name: string]: import("prosemirror-test-builder").NodeBuilder | import("prosemirror-test-builder").MarkBuilder;
45
+ }, parentType: string, children: Node[]) => (Node & {
46
+ tag: {
47
+ [tag: string]: number;
48
+ };
49
+ }) | undefined;
37
50
  parents: {
38
- /**
39
- * The type of the parent (node or "text") where "text" is a string or mark.
40
- * Determines the call signature of the create function.
41
- */
42
- type: TParentType;
43
- /** Possible parent nodes that can have the given children. The children need not be direct descendants, see `ignoreValidation`. */
51
+ type: "node";
44
52
  names: string[];
45
53
  };
46
- children: {
47
- /**
48
- * The type of children (node or "text") where "text" is a string or mark.
49
- * Determines the call signature of the create function.
50
- */
51
- type: TChildrenType;
52
- names?: string[];
53
- };
54
- /**
55
- * Set to true to ignore all children mismatches, or set an array of children names to ignore.
56
- *
57
- * This is needed for creating "end" nodes that aren't valid names (e.g. `text` is not technically allowed since you can't do `builder.text()`).
58
- *
59
- * Or when the children are not direct children of the parent types as there is some in-between wrapper node that needs to be generated.
60
- */
61
- ignoreValidation?: boolean | string[];
62
- isRoot?: boolean;
63
- /**
64
- * Creates the node. Can return undefined to "terminate" the branch being created, the node will be filtered out of the nodes passed to it's parent.
65
- *
66
- * If not set, a default `builder[parentType]({}, ...children)` will be used.
67
- *
68
- * Note also, it is not required to use the children. You can ignore them or use a subset or create a different one if needed (some node types *require* text and if your text not can return "" this can be a problem).
69
- */
70
- create?: (parent: string, children: TChildren[]) => TParent | undefined;
71
- };
72
- export declare function getTextOrMarkLength(textOrMark: string | Mark): number;
73
- export declare function createGeneratorConfig<TChildrenType extends "node" | "text" = "node" | "text", TParentType extends "node" | "text" = "node" | "text", TChildren extends TChildrenType extends "node" ? Node : Mark | string = TChildrenType extends "node" ? Node : Mark | string, TParent extends TParentType extends "node" ? Node : Mark | string = TParentType extends "node" ? Node : Mark | string>(config: GeneratorConfigEntry<TChildrenType, TParentType, TChildren, TParent>): GeneratorConfigEntry<TChildrenType, TParentType, TChildren, TParent>;
74
- export declare const generatorConfig: (GeneratorConfigEntry<"node", "node", Node, Node & {
75
- tag: {
76
- [tag: string]: number;
77
- };
78
- }> | GeneratorConfigEntry<"text", "node", string | Mark, Node & {
79
- tag: {
80
- [tag: string]: number;
54
+ } | {
55
+ create: (pm: {
56
+ schema: import("@tiptap/pm/model").Schema<string, string>;
57
+ } & {
58
+ readonly [x: string]: import("prosemirror-test-builder").NodeBuilder;
59
+ } & {
60
+ readonly [x: string]: import("prosemirror-test-builder").MarkBuilder;
61
+ } & {
62
+ [name: string]: import("prosemirror-test-builder").NodeBuilder | import("prosemirror-test-builder").MarkBuilder;
63
+ }, parentType: string, children: (string | import("@tiptap/pm/model").Mark)[]) => any;
64
+ parents: {
65
+ type: "text";
66
+ names: string[];
81
67
  };
82
- }> | GeneratorConfigEntry<"text", "text", string | Mark, string | Mark>)[];
68
+ })[];