@doist/typist 9.0.3 → 10.0.0-next.2

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 (236) hide show
  1. package/dist/components/typist-editor.d.ts +126 -123
  2. package/dist/components/typist-editor.d.ts.map +1 -1
  3. package/dist/components/typist-editor.helper.d.ts +8 -11
  4. package/dist/components/typist-editor.helper.d.ts.map +1 -1
  5. package/dist/components/typist-editor.helper.js +21 -19
  6. package/dist/components/typist-editor.helper.js.map +1 -0
  7. package/dist/components/typist-editor.js +133 -135
  8. package/dist/components/typist-editor.js.map +1 -0
  9. package/dist/constants/common.js +9 -5
  10. package/dist/constants/common.js.map +1 -0
  11. package/dist/constants/extension-priorities.d.ts +3 -1
  12. package/dist/constants/extension-priorities.d.ts.map +1 -1
  13. package/dist/constants/extension-priorities.js +34 -30
  14. package/dist/constants/extension-priorities.js.map +1 -0
  15. package/dist/constants/regular-expressions.js +14 -10
  16. package/dist/constants/regular-expressions.js.map +1 -0
  17. package/dist/extensions/core/extra-editor-commands/commands/create-paragraph-end.d.ts +12 -9
  18. package/dist/extensions/core/extra-editor-commands/commands/create-paragraph-end.d.ts.map +1 -1
  19. package/dist/extensions/core/extra-editor-commands/commands/create-paragraph-end.js +16 -19
  20. package/dist/extensions/core/extra-editor-commands/commands/create-paragraph-end.js.map +1 -0
  21. package/dist/extensions/core/extra-editor-commands/commands/extend-word-range.d.ts +12 -9
  22. package/dist/extensions/core/extra-editor-commands/commands/extend-word-range.d.ts.map +1 -1
  23. package/dist/extensions/core/extra-editor-commands/commands/extend-word-range.js +25 -28
  24. package/dist/extensions/core/extra-editor-commands/commands/extend-word-range.js.map +1 -0
  25. package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content-at.d.ts +24 -22
  26. package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content-at.d.ts.map +1 -1
  27. package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content-at.js +34 -36
  28. package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content-at.js.map +1 -0
  29. package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content.d.ts +23 -20
  30. package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content.d.ts.map +1 -1
  31. package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content.js +15 -8
  32. package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content.js.map +1 -0
  33. package/dist/extensions/core/extra-editor-commands/extra-editor-commands.js +22 -18
  34. package/dist/extensions/core/extra-editor-commands/extra-editor-commands.js.map +1 -0
  35. package/dist/extensions/core/view-event-handlers.d.ts +14 -13
  36. package/dist/extensions/core/view-event-handlers.d.ts.map +1 -1
  37. package/dist/extensions/core/view-event-handlers.js +33 -31
  38. package/dist/extensions/core/view-event-handlers.js.map +1 -0
  39. package/dist/extensions/plain-text/paste-multiline-text.js +45 -59
  40. package/dist/extensions/plain-text/paste-multiline-text.js.map +1 -0
  41. package/dist/extensions/plain-text/plain-text-document.d.ts +7 -7
  42. package/dist/extensions/plain-text/plain-text-document.d.ts.map +1 -1
  43. package/dist/extensions/plain-text/plain-text-document.js +14 -13
  44. package/dist/extensions/plain-text/plain-text-document.js.map +1 -0
  45. package/dist/extensions/plain-text/plain-text-kit.d.ts +35 -33
  46. package/dist/extensions/plain-text/plain-text-kit.d.ts.map +1 -1
  47. package/dist/extensions/plain-text/plain-text-kit.js +33 -48
  48. package/dist/extensions/plain-text/plain-text-kit.js.map +1 -0
  49. package/dist/extensions/plain-text/plain-text-paragraph.d.ts +2 -9
  50. package/dist/extensions/plain-text/plain-text-paragraph.js +11 -11
  51. package/dist/extensions/plain-text/plain-text-paragraph.js.map +1 -0
  52. package/dist/extensions/plain-text/smart-markdown-typing/plugins/smart-lists.js +37 -81
  53. package/dist/extensions/plain-text/smart-markdown-typing/plugins/smart-lists.js.map +1 -0
  54. package/dist/extensions/plain-text/smart-markdown-typing/plugins/smart-select-wrap.js +32 -42
  55. package/dist/extensions/plain-text/smart-markdown-typing/plugins/smart-select-wrap.js.map +1 -0
  56. package/dist/extensions/plain-text/smart-markdown-typing/plugins/smart-url-pasting.js +24 -37
  57. package/dist/extensions/plain-text/smart-markdown-typing/plugins/smart-url-pasting.js.map +1 -0
  58. package/dist/extensions/plain-text/smart-markdown-typing/smart-markdown-typing.js +21 -13
  59. package/dist/extensions/plain-text/smart-markdown-typing/smart-markdown-typing.js.map +1 -0
  60. package/dist/extensions/rich-text/bold-and-italics.js +42 -40
  61. package/dist/extensions/rich-text/bold-and-italics.js.map +1 -0
  62. package/dist/extensions/rich-text/curvenote-codemark.js +16 -14
  63. package/dist/extensions/rich-text/curvenote-codemark.js.map +1 -0
  64. package/dist/extensions/rich-text/paste-emojis.js +20 -22
  65. package/dist/extensions/rich-text/paste-emojis.js.map +1 -0
  66. package/dist/extensions/rich-text/paste-markdown.js +46 -86
  67. package/dist/extensions/rich-text/paste-markdown.js.map +1 -0
  68. package/dist/extensions/rich-text/rich-text-bullet-list.d.ts +10 -9
  69. package/dist/extensions/rich-text/rich-text-bullet-list.d.ts.map +1 -1
  70. package/dist/extensions/rich-text/rich-text-bullet-list.js +42 -56
  71. package/dist/extensions/rich-text/rich-text-bullet-list.js.map +1 -0
  72. package/dist/extensions/rich-text/rich-text-code.js +34 -34
  73. package/dist/extensions/rich-text/rich-text-code.js.map +1 -0
  74. package/dist/extensions/rich-text/rich-text-document.d.ts +7 -7
  75. package/dist/extensions/rich-text/rich-text-document.d.ts.map +1 -1
  76. package/dist/extensions/rich-text/rich-text-document.js +14 -13
  77. package/dist/extensions/rich-text/rich-text-document.js.map +1 -0
  78. package/dist/extensions/rich-text/rich-text-heading.d.ts +5 -4
  79. package/dist/extensions/rich-text/rich-text-heading.d.ts.map +1 -1
  80. package/dist/extensions/rich-text/rich-text-heading.js +25 -25
  81. package/dist/extensions/rich-text/rich-text-heading.js.map +1 -0
  82. package/dist/extensions/rich-text/rich-text-image.d.ts +53 -52
  83. package/dist/extensions/rich-text/rich-text-image.d.ts.map +1 -1
  84. package/dist/extensions/rich-text/rich-text-image.js +88 -105
  85. package/dist/extensions/rich-text/rich-text-image.js.map +1 -0
  86. package/dist/extensions/rich-text/rich-text-kit.d.ts +127 -125
  87. package/dist/extensions/rich-text/rich-text-kit.d.ts.map +1 -1
  88. package/dist/extensions/rich-text/rich-text-kit.js +73 -135
  89. package/dist/extensions/rich-text/rich-text-kit.js.map +1 -0
  90. package/dist/extensions/rich-text/rich-text-link.d.ts +5 -4
  91. package/dist/extensions/rich-text/rich-text-link.d.ts.map +1 -1
  92. package/dist/extensions/rich-text/rich-text-link.js +82 -90
  93. package/dist/extensions/rich-text/rich-text-link.js.map +1 -0
  94. package/dist/extensions/rich-text/rich-text-ordered-list.d.ts +10 -9
  95. package/dist/extensions/rich-text/rich-text-ordered-list.d.ts.map +1 -1
  96. package/dist/extensions/rich-text/rich-text-ordered-list.js +42 -56
  97. package/dist/extensions/rich-text/rich-text-ordered-list.js.map +1 -0
  98. package/dist/extensions/rich-text/rich-text-strikethrough.d.ts +5 -4
  99. package/dist/extensions/rich-text/rich-text-strikethrough.d.ts.map +1 -1
  100. package/dist/extensions/rich-text/rich-text-strikethrough.js +10 -10
  101. package/dist/extensions/rich-text/rich-text-strikethrough.js.map +1 -0
  102. package/dist/extensions/shared/copy-markdown-source.js +22 -31
  103. package/dist/extensions/shared/copy-markdown-source.js.map +1 -0
  104. package/dist/extensions/shared/paste-html-table-as-string.js +47 -60
  105. package/dist/extensions/shared/paste-html-table-as-string.js.map +1 -0
  106. package/dist/extensions/shared/paste-singleline-text.js +31 -39
  107. package/dist/extensions/shared/paste-singleline-text.js.map +1 -0
  108. package/dist/factories/create-suggestion-extension.d.ts +74 -74
  109. package/dist/factories/create-suggestion-extension.d.ts.map +1 -1
  110. package/dist/factories/create-suggestion-extension.js +139 -161
  111. package/dist/factories/create-suggestion-extension.js.map +1 -0
  112. package/dist/helpers/dom.js +9 -5
  113. package/dist/helpers/dom.js.map +1 -0
  114. package/dist/helpers/schema.d.ts +5 -3
  115. package/dist/helpers/schema.d.ts.map +1 -1
  116. package/dist/helpers/schema.js +25 -21
  117. package/dist/helpers/schema.js.map +1 -0
  118. package/dist/helpers/serializer.js +24 -28
  119. package/dist/helpers/serializer.js.map +1 -0
  120. package/dist/helpers/unified.js +24 -17
  121. package/dist/helpers/unified.js.map +1 -0
  122. package/dist/hooks/use-editor.js +50 -53
  123. package/dist/hooks/use-editor.js.map +1 -0
  124. package/dist/index.d.ts +25 -31
  125. package/dist/index.js +24 -24
  126. package/dist/serializers/html/html.d.ts +12 -10
  127. package/dist/serializers/html/html.d.ts.map +1 -1
  128. package/dist/serializers/html/html.js +67 -127
  129. package/dist/serializers/html/html.js.map +1 -0
  130. package/dist/serializers/html/plugins/rehype-code-block.js +17 -17
  131. package/dist/serializers/html/plugins/rehype-code-block.js.map +1 -0
  132. package/dist/serializers/html/plugins/rehype-image.js +20 -30
  133. package/dist/serializers/html/plugins/rehype-image.js.map +1 -0
  134. package/dist/serializers/html/plugins/rehype-suggestions.js +31 -32
  135. package/dist/serializers/html/plugins/rehype-suggestions.js.map +1 -0
  136. package/dist/serializers/html/plugins/rehype-task-list.js +31 -32
  137. package/dist/serializers/html/plugins/rehype-task-list.js.map +1 -0
  138. package/dist/serializers/html/plugins/remark-autolink-literal.d.ts +4 -1
  139. package/dist/serializers/html/plugins/remark-autolink-literal.d.ts.map +1 -1
  140. package/dist/serializers/html/plugins/remark-autolink-literal.js +25 -21
  141. package/dist/serializers/html/plugins/remark-autolink-literal.js.map +1 -0
  142. package/dist/serializers/html/plugins/remark-disable-constructs.js +21 -41
  143. package/dist/serializers/html/plugins/remark-disable-constructs.js.map +1 -0
  144. package/dist/serializers/html/plugins/remark-strikethrough.d.ts +5 -2
  145. package/dist/serializers/html/plugins/remark-strikethrough.d.ts.map +1 -1
  146. package/dist/serializers/html/plugins/remark-strikethrough.js +25 -21
  147. package/dist/serializers/html/plugins/remark-strikethrough.js.map +1 -0
  148. package/dist/serializers/markdown/markdown.d.ts +13 -12
  149. package/dist/serializers/markdown/markdown.d.ts.map +1 -1
  150. package/dist/serializers/markdown/markdown.js +78 -154
  151. package/dist/serializers/markdown/markdown.js.map +1 -0
  152. package/dist/serializers/markdown/plugins/image.js +27 -24
  153. package/dist/serializers/markdown/plugins/image.js.map +1 -0
  154. package/dist/serializers/markdown/plugins/list-item.js +32 -37
  155. package/dist/serializers/markdown/plugins/list-item.js.map +1 -0
  156. package/dist/serializers/markdown/plugins/paragraph.js +19 -19
  157. package/dist/serializers/markdown/plugins/paragraph.js.map +1 -0
  158. package/dist/serializers/markdown/plugins/strikethrough.js +23 -19
  159. package/dist/serializers/markdown/plugins/strikethrough.js.map +1 -0
  160. package/dist/serializers/markdown/plugins/suggestion.js +21 -19
  161. package/dist/serializers/markdown/plugins/suggestion.js.map +1 -0
  162. package/dist/serializers/markdown/plugins/task-item.js +31 -35
  163. package/dist/serializers/markdown/plugins/task-item.js.map +1 -0
  164. package/dist/utilities/can-insert-node-at.d.ts +12 -5
  165. package/dist/utilities/can-insert-node-at.d.ts.map +1 -1
  166. package/dist/utilities/can-insert-node-at.js +10 -8
  167. package/dist/utilities/can-insert-node-at.js.map +1 -0
  168. package/dist/utilities/can-insert-suggestion.d.ts +11 -5
  169. package/dist/utilities/can-insert-suggestion.d.ts.map +1 -1
  170. package/dist/utilities/can-insert-suggestion.js +15 -12
  171. package/dist/utilities/can-insert-suggestion.js.map +1 -0
  172. package/package.json +26 -13
  173. package/dist/constants/common.d.ts +0 -10
  174. package/dist/constants/common.d.ts.map +0 -1
  175. package/dist/constants/regular-expressions.d.ts +0 -18
  176. package/dist/constants/regular-expressions.d.ts.map +0 -1
  177. package/dist/extensions/core/extra-editor-commands/extra-editor-commands.d.ts +0 -9
  178. package/dist/extensions/core/extra-editor-commands/extra-editor-commands.d.ts.map +0 -1
  179. package/dist/extensions/plain-text/paste-multiline-text.d.ts +0 -10
  180. package/dist/extensions/plain-text/paste-multiline-text.d.ts.map +0 -1
  181. package/dist/extensions/plain-text/plain-text-paragraph.d.ts.map +0 -1
  182. package/dist/extensions/plain-text/smart-markdown-typing/plugins/smart-lists.d.ts +0 -9
  183. package/dist/extensions/plain-text/smart-markdown-typing/plugins/smart-lists.d.ts.map +0 -1
  184. package/dist/extensions/plain-text/smart-markdown-typing/plugins/smart-select-wrap.d.ts +0 -9
  185. package/dist/extensions/plain-text/smart-markdown-typing/plugins/smart-select-wrap.d.ts.map +0 -1
  186. package/dist/extensions/plain-text/smart-markdown-typing/plugins/smart-url-pasting.d.ts +0 -9
  187. package/dist/extensions/plain-text/smart-markdown-typing/plugins/smart-url-pasting.d.ts.map +0 -1
  188. package/dist/extensions/plain-text/smart-markdown-typing/smart-markdown-typing.d.ts +0 -8
  189. package/dist/extensions/plain-text/smart-markdown-typing/smart-markdown-typing.d.ts.map +0 -1
  190. package/dist/extensions/rich-text/bold-and-italics.d.ts +0 -8
  191. package/dist/extensions/rich-text/bold-and-italics.d.ts.map +0 -1
  192. package/dist/extensions/rich-text/curvenote-codemark.d.ts +0 -11
  193. package/dist/extensions/rich-text/curvenote-codemark.d.ts.map +0 -1
  194. package/dist/extensions/rich-text/paste-emojis.d.ts +0 -9
  195. package/dist/extensions/rich-text/paste-emojis.d.ts.map +0 -1
  196. package/dist/extensions/rich-text/paste-markdown.d.ts +0 -11
  197. package/dist/extensions/rich-text/paste-markdown.d.ts.map +0 -1
  198. package/dist/extensions/rich-text/rich-text-code.d.ts +0 -17
  199. package/dist/extensions/rich-text/rich-text-code.d.ts.map +0 -1
  200. package/dist/extensions/shared/copy-markdown-source.d.ts +0 -20
  201. package/dist/extensions/shared/copy-markdown-source.d.ts.map +0 -1
  202. package/dist/extensions/shared/paste-html-table-as-string.d.ts +0 -20
  203. package/dist/extensions/shared/paste-html-table-as-string.d.ts.map +0 -1
  204. package/dist/extensions/shared/paste-singleline-text.d.ts +0 -10
  205. package/dist/extensions/shared/paste-singleline-text.d.ts.map +0 -1
  206. package/dist/helpers/dom.d.ts +0 -8
  207. package/dist/helpers/dom.d.ts.map +0 -1
  208. package/dist/helpers/serializer.d.ts +0 -21
  209. package/dist/helpers/serializer.d.ts.map +0 -1
  210. package/dist/helpers/unified.d.ts +0 -21
  211. package/dist/helpers/unified.d.ts.map +0 -1
  212. package/dist/hooks/use-editor.d.ts +0 -19
  213. package/dist/hooks/use-editor.d.ts.map +0 -1
  214. package/dist/index.d.ts.map +0 -1
  215. package/dist/serializers/html/plugins/rehype-code-block.d.ts +0 -10
  216. package/dist/serializers/html/plugins/rehype-code-block.d.ts.map +0 -1
  217. package/dist/serializers/html/plugins/rehype-image.d.ts +0 -11
  218. package/dist/serializers/html/plugins/rehype-image.d.ts.map +0 -1
  219. package/dist/serializers/html/plugins/rehype-suggestions.d.ts +0 -10
  220. package/dist/serializers/html/plugins/rehype-suggestions.d.ts.map +0 -1
  221. package/dist/serializers/html/plugins/rehype-task-list.d.ts +0 -7
  222. package/dist/serializers/html/plugins/rehype-task-list.d.ts.map +0 -1
  223. package/dist/serializers/html/plugins/remark-disable-constructs.d.ts +0 -11
  224. package/dist/serializers/html/plugins/remark-disable-constructs.d.ts.map +0 -1
  225. package/dist/serializers/markdown/plugins/image.d.ts +0 -12
  226. package/dist/serializers/markdown/plugins/image.d.ts.map +0 -1
  227. package/dist/serializers/markdown/plugins/list-item.d.ts +0 -14
  228. package/dist/serializers/markdown/plugins/list-item.d.ts.map +0 -1
  229. package/dist/serializers/markdown/plugins/paragraph.d.ts +0 -13
  230. package/dist/serializers/markdown/plugins/paragraph.d.ts.map +0 -1
  231. package/dist/serializers/markdown/plugins/strikethrough.d.ts +0 -13
  232. package/dist/serializers/markdown/plugins/strikethrough.d.ts.map +0 -1
  233. package/dist/serializers/markdown/plugins/suggestion.d.ts +0 -11
  234. package/dist/serializers/markdown/plugins/suggestion.d.ts.map +0 -1
  235. package/dist/serializers/markdown/plugins/task-item.d.ts +0 -14
  236. package/dist/serializers/markdown/plugins/task-item.d.ts.map +0 -1
@@ -1,138 +1,136 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef, useCallback, useImperativeHandle, useMemo } from 'react';
3
- import { getSchema } from '@tiptap/core';
4
- import { Placeholder } from '@tiptap/extension-placeholder';
5
- import { EditorContent } from '@tiptap/react';
6
- import { ExtraEditorCommands } from '../extensions/core/extra-editor-commands/extra-editor-commands';
7
- import { ViewEventHandlers } from '../extensions/core/view-event-handlers';
8
- import { isMultilineDocument, isPlainTextDocument } from '../helpers/schema';
9
- import { useEditor } from '../hooks/use-editor';
10
- import { getHTMLSerializerInstance } from '../serializers/html/html';
11
- import { getMarkdownSerializerInstance } from '../serializers/markdown/markdown';
12
- import { getAllNodesAttributesByType, resolveContentSelection } from './typist-editor.helper';
1
+ import { isMultilineDocument, isPlainTextDocument } from "../helpers/schema.js";
2
+ import { getHTMLSerializerInstance } from "../serializers/html/html.js";
3
+ import { ExtraEditorCommands } from "../extensions/core/extra-editor-commands/extra-editor-commands.js";
4
+ import { ViewEventHandlers } from "../extensions/core/view-event-handlers.js";
5
+ import { useEditor } from "../hooks/use-editor.js";
6
+ import { getMarkdownSerializerInstance } from "../serializers/markdown/markdown.js";
7
+ import { getAllNodesAttributesByType, resolveContentSelection } from "./typist-editor.helper.js";
8
+ import { forwardRef, useCallback, useImperativeHandle, useMemo } from "react";
9
+ import { getSchema } from "@tiptap/core";
10
+ import { Placeholder } from "@tiptap/extension-placeholder";
11
+ import { EditorContent } from "@tiptap/react";
12
+ import { jsx } from "react/jsx-runtime";
13
+ //#region src/components/typist-editor.tsx
13
14
  /**
14
- * The `TypistEditor` component represents a plain-text or a rich-text editing control, built on
15
- * top of the amazing [Tiptap](https://tiptap.dev/) library.
16
- */
17
- const TypistEditor = forwardRef(function TypistEditor({ autoFocus, className, content = '', contentSelection, editable = true, extensions, placeholder, onBeforeCreate, onCreate, onUpdate, onSelectionUpdate, onTransaction, onFocus, onBlur, onDestroy, 'aria-describedby': ariaDescribedBy, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, onClick, onKeyDown, }, ref) {
18
- const allExtensions = useMemo(function initializeExtensions() {
19
- return [
20
- ...(placeholder
21
- ? [
22
- Placeholder.configure({
23
- placeholder,
24
- }),
25
- ]
26
- : []),
27
- ExtraEditorCommands,
28
- ViewEventHandlers.configure({
29
- onClick,
30
- onKeyDown,
31
- }),
32
- // Always register external extensions at the end so they get a higher priority and
33
- // are loaded earlier (necessary to override behaviors from built-in extensions)
34
- ...extensions,
35
- ];
36
- }, [extensions, onClick, onKeyDown, placeholder]);
37
- const schema = useMemo(function generateProseMirrorSchema() {
38
- return getSchema(allExtensions);
39
- }, [allExtensions]);
40
- const htmlSerializer = useMemo(function initializeHTMLSerializer() {
41
- return getHTMLSerializerInstance(schema);
42
- }, [schema]);
43
- const markdownSerializer = useMemo(function initializeMarkdownSerializer() {
44
- return getMarkdownSerializerInstance(schema);
45
- }, [schema]);
46
- const htmlContent = useMemo(function generateHTMLContent() {
47
- return htmlSerializer.serialize(content);
48
- }, [content, htmlSerializer]);
49
- const ariaAttributes = useMemo(function initializeAriaAttributes() {
50
- return {
51
- 'aria-readonly': String(!editable),
52
- 'aria-multiline': String(isMultilineDocument(schema)),
53
- ...(ariaDescribedBy ? { 'aria-describedby': ariaDescribedBy } : {}),
54
- ...(ariaLabel ? { 'aria-label': ariaLabel } : {}),
55
- ...(ariaLabelledBy ? { 'aria-labelledby': ariaLabelledBy } : {}),
56
- };
57
- }, [ariaDescribedBy, ariaLabel, ariaLabelledBy, editable, schema]);
58
- const handleCreate = useCallback(function handleCreate(props) {
59
- const { view } = props.editor;
60
- // Apply a selection to the document if one was given and `autoFocus` is `true`
61
- if (autoFocus && contentSelection) {
62
- view.dispatch(view.state.tr
63
- .setSelection(resolveContentSelection(view.state.doc, contentSelection))
64
- .scrollIntoView());
65
- }
66
- // Invoke the user `onCreate` handle after all internal initializations
67
- onCreate?.(props);
68
- }, [autoFocus, contentSelection, onCreate]);
69
- const editor = useEditor({
70
- autofocus: autoFocus ? 'end' : false,
71
- content: htmlContent,
72
- editable,
73
- editorProps: {
74
- attributes: {
75
- 'data-typist-editor': 'true',
76
- ...(isPlainTextDocument(schema)
77
- ? { 'data-plain-text': 'true' }
78
- : { 'data-rich-text': 'true' }),
79
- role: 'textbox',
80
- ...ariaAttributes,
81
- },
82
- },
83
- extensions: allExtensions,
84
- parseOptions: {
85
- preserveWhitespace: isPlainTextDocument(schema),
86
- },
87
- ...(onBeforeCreate ? { onBeforeCreate } : {}),
88
- onCreate: handleCreate,
89
- ...(onUpdate
90
- ? {
91
- onUpdate(props) {
92
- onUpdate({
93
- ...props,
94
- getMarkdown() {
95
- return markdownSerializer.serialize(props.editor.getHTML());
96
- },
97
- });
98
- },
99
- }
100
- : {}),
101
- ...(onSelectionUpdate ? { onSelectionUpdate } : {}),
102
- ...(onTransaction ? { onTransaction } : {}),
103
- ...(onFocus ? { onFocus } : {}),
104
- ...(onBlur ? { onBlur } : {}),
105
- ...(onDestroy ? { onDestroy } : {}),
106
- }, [
107
- allExtensions,
108
- ariaAttributes,
109
- autoFocus,
110
- editable,
111
- handleCreate,
112
- htmlContent,
113
- markdownSerializer,
114
- onBeforeCreate,
115
- onBlur,
116
- onDestroy,
117
- onFocus,
118
- onSelectionUpdate,
119
- onTransaction,
120
- onUpdate,
121
- schema,
122
- ]);
123
- useImperativeHandle(ref, function exposeHelperFunctionsToParent() {
124
- return {
125
- getEditor() {
126
- return editor;
127
- },
128
- getMarkdown() {
129
- return markdownSerializer.serialize(editor.getHTML());
130
- },
131
- getAllNodesAttributesByType(nodeType) {
132
- return getAllNodesAttributesByType(editor.state.doc, nodeType);
133
- },
134
- };
135
- }, [editor, markdownSerializer]);
136
- return _jsx(EditorContent, { className: className, editor: editor });
15
+ * The `TypistEditor` component represents a plain-text or a rich-text editing control, built on
16
+ * top of the amazing [Tiptap](https://tiptap.dev/) library.
17
+ */
18
+ const TypistEditor = forwardRef(function TypistEditor({ autoFocus, className, content = "", contentSelection, editable = true, extensions, placeholder, onBeforeCreate, onCreate, onUpdate, onSelectionUpdate, onTransaction, onFocus, onBlur, onDestroy, "aria-describedby": ariaDescribedBy, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, onClick, onKeyDown }, ref) {
19
+ const allExtensions = useMemo(function initializeExtensions() {
20
+ return [
21
+ ...placeholder ? [Placeholder.configure({ placeholder })] : [],
22
+ ExtraEditorCommands,
23
+ ViewEventHandlers.configure({
24
+ onClick,
25
+ onKeyDown
26
+ }),
27
+ ...extensions
28
+ ];
29
+ }, [
30
+ extensions,
31
+ onClick,
32
+ onKeyDown,
33
+ placeholder
34
+ ]);
35
+ const schema = useMemo(function generateProseMirrorSchema() {
36
+ return getSchema(allExtensions);
37
+ }, [allExtensions]);
38
+ const htmlSerializer = useMemo(function initializeHTMLSerializer() {
39
+ return getHTMLSerializerInstance(schema);
40
+ }, [schema]);
41
+ const markdownSerializer = useMemo(function initializeMarkdownSerializer() {
42
+ return getMarkdownSerializerInstance(schema);
43
+ }, [schema]);
44
+ const htmlContent = useMemo(function generateHTMLContent() {
45
+ return htmlSerializer.serialize(content);
46
+ }, [content, htmlSerializer]);
47
+ const ariaAttributes = useMemo(function initializeAriaAttributes() {
48
+ return {
49
+ "aria-readonly": String(!editable),
50
+ "aria-multiline": String(isMultilineDocument(schema)),
51
+ ...ariaDescribedBy ? { "aria-describedby": ariaDescribedBy } : {},
52
+ ...ariaLabel ? { "aria-label": ariaLabel } : {},
53
+ ...ariaLabelledBy ? { "aria-labelledby": ariaLabelledBy } : {}
54
+ };
55
+ }, [
56
+ ariaDescribedBy,
57
+ ariaLabel,
58
+ ariaLabelledBy,
59
+ editable,
60
+ schema
61
+ ]);
62
+ const handleCreate = useCallback(function handleCreate(props) {
63
+ const { view } = props.editor;
64
+ if (autoFocus && contentSelection) view.dispatch(view.state.tr.setSelection(resolveContentSelection(view.state.doc, contentSelection)).scrollIntoView());
65
+ onCreate?.(props);
66
+ }, [
67
+ autoFocus,
68
+ contentSelection,
69
+ onCreate
70
+ ]);
71
+ const editor = useEditor({
72
+ autofocus: autoFocus ? "end" : false,
73
+ content: htmlContent,
74
+ editable,
75
+ editorProps: { attributes: {
76
+ "data-typist-editor": "true",
77
+ ...isPlainTextDocument(schema) ? { "data-plain-text": "true" } : { "data-rich-text": "true" },
78
+ role: "textbox",
79
+ ...ariaAttributes
80
+ } },
81
+ extensions: allExtensions,
82
+ parseOptions: { preserveWhitespace: isPlainTextDocument(schema) },
83
+ ...onBeforeCreate ? { onBeforeCreate } : {},
84
+ onCreate: handleCreate,
85
+ ...onUpdate ? { onUpdate(props) {
86
+ onUpdate({
87
+ ...props,
88
+ getMarkdown() {
89
+ return markdownSerializer.serialize(props.editor.getHTML());
90
+ }
91
+ });
92
+ } } : {},
93
+ ...onSelectionUpdate ? { onSelectionUpdate } : {},
94
+ ...onTransaction ? { onTransaction } : {},
95
+ ...onFocus ? { onFocus } : {},
96
+ ...onBlur ? { onBlur } : {},
97
+ ...onDestroy ? { onDestroy } : {}
98
+ }, [
99
+ allExtensions,
100
+ ariaAttributes,
101
+ autoFocus,
102
+ editable,
103
+ handleCreate,
104
+ htmlContent,
105
+ markdownSerializer,
106
+ onBeforeCreate,
107
+ onBlur,
108
+ onDestroy,
109
+ onFocus,
110
+ onSelectionUpdate,
111
+ onTransaction,
112
+ onUpdate,
113
+ schema
114
+ ]);
115
+ useImperativeHandle(ref, function exposeHelperFunctionsToParent() {
116
+ return {
117
+ getEditor() {
118
+ return editor;
119
+ },
120
+ getMarkdown() {
121
+ return markdownSerializer.serialize(editor.getHTML());
122
+ },
123
+ getAllNodesAttributesByType(nodeType) {
124
+ return getAllNodesAttributesByType(editor.state.doc, nodeType);
125
+ }
126
+ };
127
+ }, [editor, markdownSerializer]);
128
+ return /* @__PURE__ */ jsx(EditorContent, {
129
+ className,
130
+ editor
131
+ });
137
132
  });
133
+ //#endregion
138
134
  export { TypistEditor };
135
+
136
+ //# sourceMappingURL=typist-editor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typist-editor.js","names":[],"sources":["../../src/components/typist-editor.tsx"],"sourcesContent":["import { forwardRef, useCallback, useImperativeHandle, useMemo } from 'react'\n\nimport { getSchema } from '@tiptap/core'\nimport { Placeholder } from '@tiptap/extension-placeholder'\nimport { EditorContent } from '@tiptap/react'\n\nimport { ExtraEditorCommands } from '../extensions/core/extra-editor-commands/extra-editor-commands'\nimport { ViewEventHandlers, ViewEventHandlersOptions } from '../extensions/core/view-event-handlers'\nimport { isMultilineDocument, isPlainTextDocument } from '../helpers/schema'\nimport { useEditor } from '../hooks/use-editor'\nimport { getHTMLSerializerInstance } from '../serializers/html/html'\nimport { getMarkdownSerializerInstance } from '../serializers/markdown/markdown'\n\nimport { getAllNodesAttributesByType, resolveContentSelection } from './typist-editor.helper'\n\nimport type { Editor as CoreEditor, EditorEvents, Extensions } from '@tiptap/core'\nimport type { Selection } from '@tiptap/pm/state'\n\n/**\n * The forwarded ref that describes the helper methods that the `TypistEditor` parent component\n * will have access to.\n */\ntype TypistEditorRef = {\n /**\n * Returns the `Editor` instance associated to the `TypistEditor` component.\n */\n getEditor: () => CoreEditor\n\n /**\n * Returns the current editor document output as Markdown.\n */\n getMarkdown: () => string\n\n /**\n * Returns the attributes of a given node type for all the nodes in the editor document.\n */\n getAllNodesAttributesByType: (\n nodeType: string,\n ) => ReturnType<typeof getAllNodesAttributesByType>\n}\n\n/**\n * The properties that describe the `beforeCreate` editor event.\n */\ntype BeforeCreateProps = EditorEvents['beforeCreate']\n\n/**\n * The properties that describe the `create` editor event.\n */\ntype CreateProps = EditorEvents['create']\n\n/**\n * The properties that describe the `update` editor event.\n */\ntype UpdateProps = EditorEvents['update'] & Pick<TypistEditorRef, 'getMarkdown'>\n\n/**\n * The properties that describe the `selectionUpdate` editor event.\n */\ntype SelectionUpdateProps = EditorEvents['selectionUpdate']\n\n/**\n * The properties that describe the `transaction` editor event.\n */\ntype TransacationProps = EditorEvents['transaction']\n\n/**\n * The properties that describe the `focus` editor event.\n */\ntype FocusProps = EditorEvents['focus']\n\n/**\n * The properties that describe the `blur` editor event.\n */\ntype BlurProps = EditorEvents['blur']\n\n/**\n * The properties that describe the `destroy` editor event.\n */\ntype DestroyProps = EditorEvents['destroy']\n\n/**\n * The properties available to represent an instance of the `TypistEditor` component, including\n * the supported WAI-ARIA 1.1 attributes.\n */\ntype TypistEditorProps = {\n /**\n * Auto focus the editor to the end of the document on initialization.\n */\n autoFocus?: boolean\n\n /**\n * The CSS class for the container surrounding the editor DOM element.\n */\n className?: string\n\n /**\n * The initial Markdown content for the editor.\n */\n content?: string\n\n /**\n * The initial content selection (only applied if `autoFocus` is `true`).\n */\n contentSelection?: Selection\n\n /**\n * Determines if users can write into the editor.\n */\n editable?: boolean\n\n /**\n * The list of required extensions to initialize the editor.\n *\n * You may consider wrapping this prop with `useMemo` to prevent unnecessary re-renders.\n */\n extensions: Extensions\n\n /**\n * A short hint that gives users an idea what can be entered in the editor.\n */\n placeholder?: string\n\n /**\n * The event handler that is fired before the editor view is created.\n *\n * You may consider wrapping this prop with `useCallback` to prevent unnecessary re-renders.\n */\n onBeforeCreate?: (props: BeforeCreateProps) => void\n\n /**\n * The event handler that is fired when the editor view is ready.\n *\n * You may consider wrapping this prop with `useCallback` to prevent unnecessary re-renders.\n */\n onCreate?: (props: CreateProps) => void\n\n /**\n * The event handler that is fired when the editor content has changed.\n *\n * You may consider wrapping this prop with `useCallback` to prevent unnecessary re-renders.\n */\n onUpdate?: (props: UpdateProps) => void\n\n /**\n * The event handler that is fired when the editor selection has changed.\n *\n * You may consider wrapping this prop with `useCallback` to prevent unnecessary re-renders.\n */\n onSelectionUpdate?: (props: SelectionUpdateProps) => void\n\n /**\n * The event handler that is fired when the editor state has changed.\n *\n * You may consider wrapping this prop with `useCallback` to prevent unnecessary re-renders.\n */\n onTransaction?: (props: TransacationProps) => void\n\n /**\n * The event handler that is fired when the editor view gains focus.\n *\n * You may consider wrapping this prop with `useCallback` to prevent unnecessary re-renders.\n */\n onFocus?: (props: FocusProps) => void\n\n /**\n * The event handler that is fired when the editor view loses focus.\n *\n * You may consider wrapping this prop with `useCallback` to prevent unnecessary re-renders.\n */\n onBlur?: (props: BlurProps) => void\n\n /**\n * The event handler that is fired when the editor view is being destroyed.\n *\n * You may consider wrapping this prop with `useCallback` to prevent unnecessary re-renders.\n */\n onDestroy?: (props: DestroyProps) => void\n\n /**\n * Identifies the element (or elements) that describes the object.\n *\n * @see aria-labelledby\n */\n 'aria-describedby'?: React.AriaAttributes['aria-describedby']\n\n /**\n * Defines a string value that labels the current element.\n *\n * @see aria-labelledby.\n */\n 'aria-label'?: React.AriaAttributes['aria-label']\n\n /**\n * Identifies the element (or elements) that labels the current element.\n *\n * @see aria-describedby.\n */\n 'aria-labelledby'?: React.AriaAttributes['aria-labelledby']\n\n /**\n * The event handler that processes `click` events in the editor.\n */\n onClick?: ViewEventHandlersOptions['onClick']\n\n /**\n * The event handler that processes `keydown` events in the editor.\n */\n onKeyDown?: ViewEventHandlersOptions['onKeyDown']\n}\n\n/**\n * The `TypistEditor` component represents a plain-text or a rich-text editing control, built on\n * top of the amazing [Tiptap](https://tiptap.dev/) library.\n */\nconst TypistEditor = forwardRef<TypistEditorRef, TypistEditorProps>(function TypistEditor(\n {\n autoFocus,\n className,\n content = '',\n contentSelection,\n editable = true,\n extensions,\n placeholder,\n onBeforeCreate,\n onCreate,\n onUpdate,\n onSelectionUpdate,\n onTransaction,\n onFocus,\n onBlur,\n onDestroy,\n 'aria-describedby': ariaDescribedBy,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n onClick,\n onKeyDown,\n },\n ref,\n) {\n const allExtensions = useMemo(\n function initializeExtensions() {\n return [\n ...(placeholder\n ? [\n Placeholder.configure({\n placeholder,\n }),\n ]\n : []),\n ExtraEditorCommands,\n ViewEventHandlers.configure({\n onClick,\n onKeyDown,\n }),\n // Always register external extensions at the end so they get a higher priority and\n // are loaded earlier (necessary to override behaviors from built-in extensions)\n ...extensions,\n ]\n },\n [extensions, onClick, onKeyDown, placeholder],\n )\n\n const schema = useMemo(\n function generateProseMirrorSchema() {\n return getSchema(allExtensions)\n },\n [allExtensions],\n )\n\n const htmlSerializer = useMemo(\n function initializeHTMLSerializer() {\n return getHTMLSerializerInstance(schema)\n },\n [schema],\n )\n\n const markdownSerializer = useMemo(\n function initializeMarkdownSerializer() {\n return getMarkdownSerializerInstance(schema)\n },\n [schema],\n )\n\n const htmlContent = useMemo(\n function generateHTMLContent() {\n return htmlSerializer.serialize(content)\n },\n [content, htmlSerializer],\n )\n\n const ariaAttributes = useMemo(\n function initializeAriaAttributes() {\n return {\n 'aria-readonly': String(!editable),\n 'aria-multiline': String(isMultilineDocument(schema)),\n ...(ariaDescribedBy ? { 'aria-describedby': ariaDescribedBy } : {}),\n ...(ariaLabel ? { 'aria-label': ariaLabel } : {}),\n ...(ariaLabelledBy ? { 'aria-labelledby': ariaLabelledBy } : {}),\n }\n },\n [ariaDescribedBy, ariaLabel, ariaLabelledBy, editable, schema],\n )\n\n const handleCreate = useCallback(\n function handleCreate(props: CreateProps) {\n const { view } = props.editor\n\n // Apply a selection to the document if one was given and `autoFocus` is `true`\n if (autoFocus && contentSelection) {\n view.dispatch(\n view.state.tr\n .setSelection(resolveContentSelection(view.state.doc, contentSelection))\n .scrollIntoView(),\n )\n }\n\n // Invoke the user `onCreate` handle after all internal initializations\n onCreate?.(props)\n },\n [autoFocus, contentSelection, onCreate],\n )\n\n const editor = useEditor(\n {\n autofocus: autoFocus ? 'end' : false,\n content: htmlContent,\n editable,\n editorProps: {\n attributes: {\n 'data-typist-editor': 'true',\n ...(isPlainTextDocument(schema)\n ? { 'data-plain-text': 'true' }\n : { 'data-rich-text': 'true' }),\n role: 'textbox',\n ...ariaAttributes,\n },\n },\n extensions: allExtensions,\n parseOptions: {\n preserveWhitespace: isPlainTextDocument(schema),\n },\n ...(onBeforeCreate ? { onBeforeCreate } : {}),\n onCreate: handleCreate,\n ...(onUpdate\n ? {\n onUpdate(props) {\n onUpdate({\n ...props,\n getMarkdown() {\n return markdownSerializer.serialize(props.editor.getHTML())\n },\n })\n },\n }\n : {}),\n ...(onSelectionUpdate ? { onSelectionUpdate } : {}),\n ...(onTransaction ? { onTransaction } : {}),\n ...(onFocus ? { onFocus } : {}),\n ...(onBlur ? { onBlur } : {}),\n ...(onDestroy ? { onDestroy } : {}),\n },\n [\n allExtensions,\n ariaAttributes,\n autoFocus,\n editable,\n handleCreate,\n htmlContent,\n markdownSerializer,\n onBeforeCreate,\n onBlur,\n onDestroy,\n onFocus,\n onSelectionUpdate,\n onTransaction,\n onUpdate,\n schema,\n ],\n )\n\n useImperativeHandle(\n ref,\n function exposeHelperFunctionsToParent() {\n return {\n getEditor() {\n return editor\n },\n getMarkdown() {\n return markdownSerializer.serialize(editor.getHTML())\n },\n getAllNodesAttributesByType(nodeType) {\n return getAllNodesAttributesByType(editor.state.doc, nodeType)\n },\n }\n },\n [editor, markdownSerializer],\n )\n\n return <EditorContent className={className} editor={editor} />\n})\n\nexport { TypistEditor }\n\nexport type {\n BeforeCreateProps,\n BlurProps,\n CreateProps,\n DestroyProps,\n FocusProps,\n SelectionUpdateProps,\n TransacationProps,\n TypistEditorProps,\n TypistEditorRef,\n UpdateProps,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuNA,MAAM,eAAe,WAA+C,SAAS,aACzE,EACI,WACA,WACA,UAAU,IACV,kBACA,WAAW,MACX,YACA,aACA,gBACA,UACA,UACA,mBACA,eACA,SACA,QACA,WACA,oBAAoB,iBACpB,cAAc,WACd,mBAAmB,gBACnB,SACA,aAEJ,KACF;CACE,MAAM,gBAAgB,QAClB,SAAS,uBAAuB;AAC5B,SAAO;GACH,GAAI,cACE,CACI,YAAY,UAAU,EAClB,aACH,CAAC,CACL,GACD,EAAE;GACR;GACA,kBAAkB,UAAU;IACxB;IACA;IACH,CAAC;GAGF,GAAG;GACN;IAEL;EAAC;EAAY;EAAS;EAAW;EAAY,CAChD;CAED,MAAM,SAAS,QACX,SAAS,4BAA4B;AACjC,SAAO,UAAU,cAAc;IAEnC,CAAC,cAAc,CAClB;CAED,MAAM,iBAAiB,QACnB,SAAS,2BAA2B;AAChC,SAAO,0BAA0B,OAAO;IAE5C,CAAC,OAAO,CACX;CAED,MAAM,qBAAqB,QACvB,SAAS,+BAA+B;AACpC,SAAO,8BAA8B,OAAO;IAEhD,CAAC,OAAO,CACX;CAED,MAAM,cAAc,QAChB,SAAS,sBAAsB;AAC3B,SAAO,eAAe,UAAU,QAAQ;IAE5C,CAAC,SAAS,eAAe,CAC5B;CAED,MAAM,iBAAiB,QACnB,SAAS,2BAA2B;AAChC,SAAO;GACH,iBAAiB,OAAO,CAAC,SAAS;GAClC,kBAAkB,OAAO,oBAAoB,OAAO,CAAC;GACrD,GAAI,kBAAkB,EAAE,oBAAoB,iBAAiB,GAAG,EAAE;GAClE,GAAI,YAAY,EAAE,cAAc,WAAW,GAAG,EAAE;GAChD,GAAI,iBAAiB,EAAE,mBAAmB,gBAAgB,GAAG,EAAE;GAClE;IAEL;EAAC;EAAiB;EAAW;EAAgB;EAAU;EAAO,CACjE;CAED,MAAM,eAAe,YACjB,SAAS,aAAa,OAAoB;EACtC,MAAM,EAAE,SAAS,MAAM;AAGvB,MAAI,aAAa,iBACb,MAAK,SACD,KAAK,MAAM,GACN,aAAa,wBAAwB,KAAK,MAAM,KAAK,iBAAiB,CAAC,CACvE,gBAAgB,CACxB;AAIL,aAAW,MAAM;IAErB;EAAC;EAAW;EAAkB;EAAS,CAC1C;CAED,MAAM,SAAS,UACX;EACI,WAAW,YAAY,QAAQ;EAC/B,SAAS;EACT;EACA,aAAa,EACT,YAAY;GACR,sBAAsB;GACtB,GAAI,oBAAoB,OAAO,GACzB,EAAE,mBAAmB,QAAQ,GAC7B,EAAE,kBAAkB,QAAQ;GAClC,MAAM;GACN,GAAG;GACN,EACJ;EACD,YAAY;EACZ,cAAc,EACV,oBAAoB,oBAAoB,OAAO,EAClD;EACD,GAAI,iBAAiB,EAAE,gBAAgB,GAAG,EAAE;EAC5C,UAAU;EACV,GAAI,WACE,EACI,SAAS,OAAO;AACZ,YAAS;IACL,GAAG;IACH,cAAc;AACV,YAAO,mBAAmB,UAAU,MAAM,OAAO,SAAS,CAAC;;IAElE,CAAC;KAET,GACD,EAAE;EACR,GAAI,oBAAoB,EAAE,mBAAmB,GAAG,EAAE;EAClD,GAAI,gBAAgB,EAAE,eAAe,GAAG,EAAE;EAC1C,GAAI,UAAU,EAAE,SAAS,GAAG,EAAE;EAC9B,GAAI,SAAS,EAAE,QAAQ,GAAG,EAAE;EAC5B,GAAI,YAAY,EAAE,WAAW,GAAG,EAAE;EACrC,EACD;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACH,CACJ;AAED,qBACI,KACA,SAAS,gCAAgC;AACrC,SAAO;GACH,YAAY;AACR,WAAO;;GAEX,cAAc;AACV,WAAO,mBAAmB,UAAU,OAAO,SAAS,CAAC;;GAEzD,4BAA4B,UAAU;AAClC,WAAO,4BAA4B,OAAO,MAAM,KAAK,SAAS;;GAErE;IAEL,CAAC,QAAQ,mBAAmB,CAC/B;AAED,QAAO,oBAAC,eAAD;EAA0B;EAAmB;EAAU,CAAA;EAChE"}
@@ -1,9 +1,13 @@
1
+ //#region src/constants/common.ts
1
2
  /**
2
- * An enum-like constant for clipboard `DataTransfer.types` that are supported by the editor.
3
- */
3
+ * An enum-like constant for clipboard `DataTransfer.types` that are supported by the editor.
4
+ */
4
5
  const ClipboardDataType = {
5
- Text: 'text/plain',
6
- HTML: 'text/html',
7
- VSCode: 'vscode-editor-data',
6
+ Text: "text/plain",
7
+ HTML: "text/html",
8
+ VSCode: "vscode-editor-data"
8
9
  };
10
+ //#endregion
9
11
  export { ClipboardDataType };
12
+
13
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","names":[],"sources":["../../src/constants/common.ts"],"sourcesContent":["/**\n * An enum-like constant for clipboard `DataTransfer.types` that are supported by the editor.\n */\nconst ClipboardDataType = {\n Text: 'text/plain',\n HTML: 'text/html',\n VSCode: 'vscode-editor-data',\n} as const\n\nexport { ClipboardDataType }\n"],"mappings":";;;;AAGA,MAAM,oBAAoB;CACtB,MAAM;CACN,MAAM;CACN,QAAQ;CACX"}
@@ -1,3 +1,4 @@
1
+ //#region src/constants/extension-priorities.d.ts
1
2
  /**
2
3
  * Priority for the extensions created by the suggestion extension factory function. This needs to
3
4
  * be higher than most extensions, so that event handlers from the dropdown render function can take
@@ -40,5 +41,6 @@ declare const BLOCKQUOTE_EXTENSION_PRIORITY = 101;
40
41
  * the other way around (i.e. prevents `<code><em>code</em></code>` from happening).
41
42
  */
42
43
  declare const CODE_EXTENSION_PRIORITY = 99;
43
- export { BLOCKQUOTE_EXTENSION_PRIORITY, CODE_EXTENSION_PRIORITY, PASTE_HTML_TABLE_AS_STRING_EXTENSION_PRIORITY, PASTE_MARKDOWN_EXTENSION_PRIORITY, SMART_MARKDOWN_TYPING_PRIORITY, SUGGESTION_EXTENSION_PRIORITY, VIEW_EVENT_HANDLERS_PRIORITY, };
44
+ //#endregion
45
+ export { BLOCKQUOTE_EXTENSION_PRIORITY, CODE_EXTENSION_PRIORITY, PASTE_HTML_TABLE_AS_STRING_EXTENSION_PRIORITY, PASTE_MARKDOWN_EXTENSION_PRIORITY, SMART_MARKDOWN_TYPING_PRIORITY, SUGGESTION_EXTENSION_PRIORITY, VIEW_EVENT_HANDLERS_PRIORITY };
44
46
  //# sourceMappingURL=extension-priorities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extension-priorities.d.ts","sourceRoot":"","sources":["../../src/constants/extension-priorities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,QAAA,MAAM,6BAA6B,QAAQ,CAAA;AAE3C;;;;GAIG;AACH,QAAA,MAAM,6CAA6C,OAAO,CAAA;AAE1D;;;;GAIG;AACH,QAAA,MAAM,iCAAiC,OAAO,CAAA;AAE9C;;;;GAIG;AACH,QAAA,MAAM,8BAA8B,MAAM,CAAA;AAE1C;;;;GAIG;AACH,QAAA,MAAM,4BAA4B,MAAM,CAAA;AAExC;;;;GAIG;AACH,QAAA,MAAM,6BAA6B,MAAM,CAAA;AAEzC;;;;GAIG;AACH,QAAA,MAAM,uBAAuB,KAAK,CAAA;AAElC,OAAO,EACH,6BAA6B,EAC7B,uBAAuB,EACvB,6CAA6C,EAC7C,iCAAiC,EACjC,8BAA8B,EAC9B,6BAA6B,EAC7B,4BAA4B,GAC/B,CAAA"}
1
+ {"version":3,"file":"extension-priorities.d.ts","names":[],"sources":["../../src/constants/extension-priorities.ts"],"mappings":";;;;;;cAKM,6BAAA;AAA6B;;;;;AAAA,cAO7B,6CAAA;;;;;AAOiC;cAAjC,iCAAA;;;;AAO8B;;cAA9B,8BAAA;;;AAO4B;;;cAA5B,4BAAA;;AAO6B;;;;cAA7B,6BAAA;;;;;;cAOA,uBAAA"}
@@ -1,43 +1,47 @@
1
+ //#region src/constants/extension-priorities.ts
1
2
  /**
2
- * Priority for the extensions created by the suggestion extension factory function. This needs to
3
- * be higher than most extensions, so that event handlers from the dropdown render function can take
4
- * precedence over all other event handlers in the chain.
5
- */
6
- const SUGGESTION_EXTENSION_PRIORITY = 10000;
3
+ * Priority for the extensions created by the suggestion extension factory function. This needs to
4
+ * be higher than most extensions, so that event handlers from the dropdown render function can take
5
+ * precedence over all other event handlers in the chain.
6
+ */
7
+ const SUGGESTION_EXTENSION_PRIORITY = 1e4;
7
8
  /**
8
- * Priority for the `PasteHTMLTableAsString` extension. This needs to be higher than most paste
9
- * extensions (e.g., `PasteSinglelineText`, `PasteMarkdown`, etc.), so that the extension can first
10
- * parse HTML tables that might exist in the clipboard data.
11
- */
9
+ * Priority for the `PasteHTMLTableAsString` extension. This needs to be higher than most paste
10
+ * extensions (e.g., `PasteSinglelineText`, `PasteMarkdown`, etc.), so that the extension can first
11
+ * parse HTML tables that might exist in the clipboard data.
12
+ */
12
13
  const PASTE_HTML_TABLE_AS_STRING_EXTENSION_PRIORITY = 1005;
13
14
  /**
14
- * Priority for the `PasteMarkdown` extension. This needs to be higher than the built-in and
15
- * official `Link` extension (i.e. `1000`), so that the extension can first parse Markdown links
16
- * correctly, without having the `Link` extension paste handlers interfering.
17
- */
15
+ * Priority for the `PasteMarkdown` extension. This needs to be higher than the built-in and
16
+ * official `Link` extension (i.e. `1000`), so that the extension can first parse Markdown links
17
+ * correctly, without having the `Link` extension paste handlers interfering.
18
+ */
18
19
  const PASTE_MARKDOWN_EXTENSION_PRIORITY = 1001;
19
20
  /**
20
- * Priority for the `SmartMarkdownTyping` extension. This needs to be higher than the
21
- * `ViewEventHandlers` extension, so that event handlers from the ProseMirror plugins built into the
22
- * extension can take precedence over the `ViewEventHandlers` extension event handlers.
23
- */
21
+ * Priority for the `SmartMarkdownTyping` extension. This needs to be higher than the
22
+ * `ViewEventHandlers` extension, so that event handlers from the ProseMirror plugins built into the
23
+ * extension can take precedence over the `ViewEventHandlers` extension event handlers.
24
+ */
24
25
  const SMART_MARKDOWN_TYPING_PRIORITY = 110;
25
26
  /**
26
- * Priority for the `ViewEventHandlers` extension. This needs to be higher than the default for most
27
- * of the built-in and official extensions (i.e. `100`), so that the event handlers from the
28
- * extension can take precedence over the built-in and official extensions event handlers.
29
- */
27
+ * Priority for the `ViewEventHandlers` extension. This needs to be higher than the default for most
28
+ * of the built-in and official extensions (i.e. `100`), so that the event handlers from the
29
+ * extension can take precedence over the built-in and official extensions event handlers.
30
+ */
30
31
  const VIEW_EVENT_HANDLERS_PRIORITY = 105;
31
32
  /**
32
- * Priority for the official `Blockquote` extension. This needs to be higher than the default for
33
- * most built-in and official extensions (i.e. `100`), so that the keyboard shortcut can take
34
- * precedence over the `Bold` extension keyboard shortcut.
35
- */
33
+ * Priority for the official `Blockquote` extension. This needs to be higher than the default for
34
+ * most built-in and official extensions (i.e. `100`), so that the keyboard shortcut can take
35
+ * precedence over the `Bold` extension keyboard shortcut.
36
+ */
36
37
  const BLOCKQUOTE_EXTENSION_PRIORITY = 101;
37
38
  /**
38
- * Priority for the `RichTextCode` extension. This needs to be lower than the default for most
39
- * built-in and official extensions (i.e. `100`), so that other marks wrap the `Code` mark, and not
40
- * the other way around (i.e. prevents `<code><em>code</em></code>` from happening).
41
- */
39
+ * Priority for the `RichTextCode` extension. This needs to be lower than the default for most
40
+ * built-in and official extensions (i.e. `100`), so that other marks wrap the `Code` mark, and not
41
+ * the other way around (i.e. prevents `<code><em>code</em></code>` from happening).
42
+ */
42
43
  const CODE_EXTENSION_PRIORITY = 99;
43
- export { BLOCKQUOTE_EXTENSION_PRIORITY, CODE_EXTENSION_PRIORITY, PASTE_HTML_TABLE_AS_STRING_EXTENSION_PRIORITY, PASTE_MARKDOWN_EXTENSION_PRIORITY, SMART_MARKDOWN_TYPING_PRIORITY, SUGGESTION_EXTENSION_PRIORITY, VIEW_EVENT_HANDLERS_PRIORITY, };
44
+ //#endregion
45
+ export { BLOCKQUOTE_EXTENSION_PRIORITY, CODE_EXTENSION_PRIORITY, PASTE_HTML_TABLE_AS_STRING_EXTENSION_PRIORITY, PASTE_MARKDOWN_EXTENSION_PRIORITY, SMART_MARKDOWN_TYPING_PRIORITY, SUGGESTION_EXTENSION_PRIORITY, VIEW_EVENT_HANDLERS_PRIORITY };
46
+
47
+ //# sourceMappingURL=extension-priorities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension-priorities.js","names":[],"sources":["../../src/constants/extension-priorities.ts"],"sourcesContent":["/**\n * Priority for the extensions created by the suggestion extension factory function. This needs to\n * be higher than most extensions, so that event handlers from the dropdown render function can take\n * precedence over all other event handlers in the chain.\n */\nconst SUGGESTION_EXTENSION_PRIORITY = 10000\n\n/**\n * Priority for the `PasteHTMLTableAsString` extension. This needs to be higher than most paste\n * extensions (e.g., `PasteSinglelineText`, `PasteMarkdown`, etc.), so that the extension can first\n * parse HTML tables that might exist in the clipboard data.\n */\nconst PASTE_HTML_TABLE_AS_STRING_EXTENSION_PRIORITY = 1005\n\n/**\n * Priority for the `PasteMarkdown` extension. This needs to be higher than the built-in and\n * official `Link` extension (i.e. `1000`), so that the extension can first parse Markdown links\n * correctly, without having the `Link` extension paste handlers interfering.\n */\nconst PASTE_MARKDOWN_EXTENSION_PRIORITY = 1001\n\n/**\n * Priority for the `SmartMarkdownTyping` extension. This needs to be higher than the\n * `ViewEventHandlers` extension, so that event handlers from the ProseMirror plugins built into the\n * extension can take precedence over the `ViewEventHandlers` extension event handlers.\n */\nconst SMART_MARKDOWN_TYPING_PRIORITY = 110\n\n/**\n * Priority for the `ViewEventHandlers` extension. This needs to be higher than the default for most\n * of the built-in and official extensions (i.e. `100`), so that the event handlers from the\n * extension can take precedence over the built-in and official extensions event handlers.\n */\nconst VIEW_EVENT_HANDLERS_PRIORITY = 105\n\n/**\n * Priority for the official `Blockquote` extension. This needs to be higher than the default for\n * most built-in and official extensions (i.e. `100`), so that the keyboard shortcut can take\n * precedence over the `Bold` extension keyboard shortcut.\n */\nconst BLOCKQUOTE_EXTENSION_PRIORITY = 101\n\n/**\n * Priority for the `RichTextCode` extension. This needs to be lower than the default for most\n * built-in and official extensions (i.e. `100`), so that other marks wrap the `Code` mark, and not\n * the other way around (i.e. prevents `<code><em>code</em></code>` from happening).\n */\nconst CODE_EXTENSION_PRIORITY = 99\n\nexport {\n BLOCKQUOTE_EXTENSION_PRIORITY,\n CODE_EXTENSION_PRIORITY,\n PASTE_HTML_TABLE_AS_STRING_EXTENSION_PRIORITY,\n PASTE_MARKDOWN_EXTENSION_PRIORITY,\n SMART_MARKDOWN_TYPING_PRIORITY,\n SUGGESTION_EXTENSION_PRIORITY,\n VIEW_EVENT_HANDLERS_PRIORITY,\n}\n"],"mappings":";;;;;;AAKA,MAAM,gCAAgC;;;;;;AAOtC,MAAM,gDAAgD;;;;;;AAOtD,MAAM,oCAAoC;;;;;;AAO1C,MAAM,iCAAiC;;;;;;AAOvC,MAAM,+BAA+B;;;;;;AAOrC,MAAM,gCAAgC;;;;;;AAOtC,MAAM,0BAA0B"}
@@ -1,17 +1,21 @@
1
+ //#region src/constants/regular-expressions.ts
1
2
  /**
2
- * A common regular expression for all line termination conventions.
3
- */
3
+ * A common regular expression for all line termination conventions.
4
+ */
4
5
  const REGEX_LINE_BREAKS = /(?:\r\n|\r|\n)/g;
5
6
  /**
6
- * A regular expression for standard punctuation characters for US-ASCII plus unicode punctuation.
7
- *
8
- * @see https://stackoverflow.com/a/25575009
9
- */
7
+ * A regular expression for standard punctuation characters for US-ASCII plus unicode punctuation.
8
+ *
9
+ * @see https://stackoverflow.com/a/25575009
10
+ */
10
11
  const REGEX_PUNCTUATION = /[\u2000-\u206f\u2e00-\u2e7f'!"#$%&()*+,\-./:;<=>?@\\[\]^_`{|}~]/;
11
12
  /**
12
- * The perfect URL validation regular expression for Web URLs.
13
- *
14
- * @see https://mathiasbynens.be/demo/url-regex
15
- */
13
+ * The perfect URL validation regular expression for Web URLs.
14
+ *
15
+ * @see https://mathiasbynens.be/demo/url-regex
16
+ */
16
17
  const REGEX_WEB_URL = /(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?/i;
18
+ //#endregion
17
19
  export { REGEX_LINE_BREAKS, REGEX_PUNCTUATION, REGEX_WEB_URL };
20
+
21
+ //# sourceMappingURL=regular-expressions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regular-expressions.js","names":[],"sources":["../../src/constants/regular-expressions.ts"],"sourcesContent":["/**\n * A common regular expression for all line termination conventions.\n */\nconst REGEX_LINE_BREAKS = /(?:\\r\\n|\\r|\\n)/g\n\n/**\n * A regular expression for standard punctuation characters for US-ASCII plus unicode punctuation.\n *\n * @see https://stackoverflow.com/a/25575009\n */\nconst REGEX_PUNCTUATION = /[\\u2000-\\u206f\\u2e00-\\u2e7f'!\"#$%&()*+,\\-./:;<=>?@\\\\[\\]^_`{|}~]/\n\n/**\n * The perfect URL validation regular expression for Web URLs.\n *\n * @see https://mathiasbynens.be/demo/url-regex\n */\nconst REGEX_WEB_URL =\n /(?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u00a1-\\uffff][a-z0-9\\u00a1-\\uffff_-]{0,62})?[a-z0-9\\u00a1-\\uffff]\\.)+(?:[a-z\\u00a1-\\uffff]{2,}\\.?))(?::\\d{2,5})?(?:[/?#]\\S*)?/i\n\nexport { REGEX_LINE_BREAKS, REGEX_PUNCTUATION, REGEX_WEB_URL }\n"],"mappings":";;;;AAGA,MAAM,oBAAoB;;;;;;AAO1B,MAAM,oBAAoB;;;;;;AAO1B,MAAM,gBACF"}
@@ -1,17 +1,19 @@
1
- import { RawCommands } from '@tiptap/core';
1
+ import { RawCommands } from "@tiptap/core";
2
+
3
+ //#region src/extensions/core/extra-editor-commands/commands/create-paragraph-end.d.ts
2
4
  /**
3
5
  * Augment the official `@tiptap/core` module with extra commands so that the compiler knows about
4
6
  * them. For this to work externally, a wildcard export needs to be added to the root `index.ts`.
5
7
  */
6
8
  declare module '@tiptap/core' {
7
- interface Commands<ReturnType> {
8
- createParagraphEnd: {
9
- /**
10
- * Creates an empty paragraph at the end of the document.
11
- */
12
- createParagraphEnd: () => ReturnType;
13
- };
14
- }
9
+ interface Commands<ReturnType> {
10
+ createParagraphEnd: {
11
+ /**
12
+ * Creates an empty paragraph at the end of the document.
13
+ */
14
+ createParagraphEnd: () => ReturnType;
15
+ };
16
+ }
15
17
  }
16
18
  /**
17
19
  * Creates an empty paragraph at the end of the document.
@@ -19,5 +21,6 @@ declare module '@tiptap/core' {
19
21
  * last node before creating the paragraph, using the build int fn
20
22
  */
21
23
  declare function createParagraphEnd(): ReturnType<RawCommands['createParagraphEnd']>;
24
+ //#endregion
22
25
  export { createParagraphEnd };
23
26
  //# sourceMappingURL=create-paragraph-end.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-paragraph-end.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/core/extra-editor-commands/commands/create-paragraph-end.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAG1C;;;GAGG;AACH,OAAO,QAAQ,cAAc,CAAC;IAC1B,UAAU,QAAQ,CAAC,UAAU;QACzB,kBAAkB,EAAE;YAChB;;eAEG;YACH,kBAAkB,EAAE,MAAM,UAAU,CAAA;SACvC,CAAA;KACJ;CACJ;AAED;;;;GAIG;AACH,iBAAS,kBAAkB,IAAI,UAAU,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,CAuB3E;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
1
+ {"version":3,"file":"create-paragraph-end.d.ts","names":[],"sources":["../../../../../src/extensions/core/extra-editor-commands/commands/create-paragraph-end.ts"],"mappings":";;;;;AAA0C;;;YAQ5B,QAAA;IACN,kBAAA;MADe;;;MAKX,kBAAA,QAA0B,UAAA;IAAA;EAAA;AAAA;AAAU;;;;;AAAA,iBAUvC,kBAAA,CAAA,GAAsB,UAAA,CAAW,WAAA"}
@@ -1,23 +1,20 @@
1
- import { TextSelection } from '@tiptap/pm/state';
1
+ import { TextSelection } from "@tiptap/pm/state";
2
+ //#region src/extensions/core/extra-editor-commands/commands/create-paragraph-end.ts
2
3
  /**
3
- * Creates an empty paragraph at the end of the document.
4
- *
5
- * last node before creating the paragraph, using the build int fn
6
- */
4
+ * Creates an empty paragraph at the end of the document.
5
+ *
6
+ * last node before creating the paragraph, using the build int fn
7
+ */
7
8
  function createParagraphEnd() {
8
- return ({ state, tr, chain, dispatch }) => {
9
- // Check if the transaction should be dispatched
10
- // ref: https://tiptap.dev/api/commands#dry-run-for-commands
11
- if (dispatch) {
12
- return chain()
13
- .command(() => {
14
- tr.setSelection(TextSelection.create(tr.doc, state.doc.content.size, state.doc.content.size));
15
- return true;
16
- })
17
- .createParagraphNear()
18
- .run();
19
- }
20
- return true;
21
- };
9
+ return ({ state, tr, chain, dispatch }) => {
10
+ if (dispatch) return chain().command(() => {
11
+ tr.setSelection(TextSelection.create(tr.doc, state.doc.content.size, state.doc.content.size));
12
+ return true;
13
+ }).createParagraphNear().run();
14
+ return true;
15
+ };
22
16
  }
17
+ //#endregion
23
18
  export { createParagraphEnd };
19
+
20
+ //# sourceMappingURL=create-paragraph-end.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-paragraph-end.js","names":[],"sources":["../../../../../src/extensions/core/extra-editor-commands/commands/create-paragraph-end.ts"],"sourcesContent":["import { RawCommands } from '@tiptap/core'\nimport { TextSelection } from '@tiptap/pm/state'\n\n/**\n * Augment the official `@tiptap/core` module with extra commands so that the compiler knows about\n * them. For this to work externally, a wildcard export needs to be added to the root `index.ts`.\n */\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n createParagraphEnd: {\n /**\n * Creates an empty paragraph at the end of the document.\n */\n createParagraphEnd: () => ReturnType\n }\n }\n}\n\n/**\n * Creates an empty paragraph at the end of the document.\n *\n * last node before creating the paragraph, using the build int fn\n */\nfunction createParagraphEnd(): ReturnType<RawCommands['createParagraphEnd']> {\n return ({ state, tr, chain, dispatch }) => {\n // Check if the transaction should be dispatched\n // ref: https://tiptap.dev/api/commands#dry-run-for-commands\n if (dispatch) {\n return chain()\n .command(() => {\n tr.setSelection(\n TextSelection.create(\n tr.doc,\n state.doc.content.size,\n state.doc.content.size,\n ),\n )\n\n return true\n })\n .createParagraphNear()\n .run()\n }\n\n return true\n }\n}\n\nexport { createParagraphEnd }\n"],"mappings":";;;;;;;AAuBA,SAAS,qBAAoE;AACzE,SAAQ,EAAE,OAAO,IAAI,OAAO,eAAe;AAGvC,MAAI,SACA,QAAO,OAAO,CACT,cAAc;AACX,MAAG,aACC,cAAc,OACV,GAAG,KACH,MAAM,IAAI,QAAQ,MAClB,MAAM,IAAI,QAAQ,KACrB,CACJ;AAED,UAAO;IACT,CACD,qBAAqB,CACrB,KAAK;AAGd,SAAO"}
@@ -1,17 +1,19 @@
1
- import { RawCommands } from '@tiptap/core';
1
+ import { RawCommands } from "@tiptap/core";
2
+
3
+ //#region src/extensions/core/extra-editor-commands/commands/extend-word-range.d.ts
2
4
  /**
3
5
  * Augment the official `@tiptap/core` module with extra commands so that the compiler knows about
4
6
  * them. For this to work externally, a wildcard export needs to be added to the root `index.ts`.
5
7
  */
6
8
  declare module '@tiptap/core' {
7
- interface Commands<ReturnType> {
8
- extendWordRange: {
9
- /**
10
- * Extends the text selection to the current word.
11
- */
12
- extendWordRange: () => ReturnType;
13
- };
14
- }
9
+ interface Commands<ReturnType> {
10
+ extendWordRange: {
11
+ /**
12
+ * Extends the text selection to the current word.
13
+ */
14
+ extendWordRange: () => ReturnType;
15
+ };
16
+ }
15
17
  }
16
18
  /**
17
19
  * Extends the text selection to the current word.
@@ -20,5 +22,6 @@ declare module '@tiptap/core' {
20
22
  * `setTextSelection` commands.
21
23
  */
22
24
  declare function extendWordRange(): ReturnType<RawCommands['extendWordRange']>;
25
+ //#endregion
23
26
  export { extendWordRange };
24
27
  //# sourceMappingURL=extend-word-range.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extend-word-range.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/core/extra-editor-commands/commands/extend-word-range.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,WAAW,EAAE,MAAM,cAAc,CAAA;AAIrE;;;GAGG;AACH,OAAO,QAAQ,cAAc,CAAC;IAC1B,UAAU,QAAQ,CAAC,UAAU;QACzB,eAAe,EAAE;YACb;;eAEG;YACH,eAAe,EAAE,MAAM,UAAU,CAAA;SACpC,CAAA;KACJ;CACJ;AAED;;;;;GAKG;AACH,iBAAS,eAAe,IAAI,UAAU,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAkCrE;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}
1
+ {"version":3,"file":"extend-word-range.d.ts","names":[],"sources":["../../../../../src/extensions/core/extra-editor-commands/commands/extend-word-range.ts"],"mappings":";;;;;AAAqE;;;YASvD,QAAA;IACN,eAAA;MADe;;;MAKX,eAAA,QAAuB,UAAA;IAAA;EAAA;AAAA;AAAU;;;;;;AAAA,iBAWpC,eAAA,CAAA,GAAmB,UAAA,CAAW,WAAA"}