@impermeable/waterproof-editor 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/dist/api/InputAreaStatus.d.ts +7 -7
  2. package/dist/api/InputAreaStatus.d.ts.map +1 -1
  3. package/dist/api/MessageHandlerEditor.d.ts +29 -0
  4. package/dist/api/MessageHandlerEditor.d.ts.map +1 -0
  5. package/dist/api/index.d.ts +6 -7
  6. package/dist/api/index.d.ts.map +1 -1
  7. package/dist/api/types.d.ts +125 -54
  8. package/dist/api/types.d.ts.map +1 -1
  9. package/dist/autocomplete/renderSymbol.d.ts +1 -2
  10. package/dist/autocomplete/renderSymbol.d.ts.map +1 -1
  11. package/dist/codeview/busy-indicator.d.ts +113 -0
  12. package/dist/codeview/busy-indicator.d.ts.map +1 -0
  13. package/dist/codeview/code-plugin.d.ts +5 -5
  14. package/dist/codeview/code-plugin.d.ts.map +1 -1
  15. package/dist/codeview/nodeview.d.ts +11 -2
  16. package/dist/codeview/nodeview.d.ts.map +1 -1
  17. package/dist/commands/command-helpers.d.ts +7 -22
  18. package/dist/commands/command-helpers.d.ts.map +1 -1
  19. package/dist/commands/commands.d.ts +6 -28
  20. package/dist/commands/commands.d.ts.map +1 -1
  21. package/dist/commands/index.d.ts +1 -2
  22. package/dist/commands/index.d.ts.map +1 -1
  23. package/dist/commands/insert-command.d.ts +7 -33
  24. package/dist/commands/insert-command.d.ts.map +1 -1
  25. package/dist/commands/types.d.ts +2 -2
  26. package/dist/commands/types.d.ts.map +1 -1
  27. package/dist/commands/utils.d.ts +2 -0
  28. package/dist/commands/utils.d.ts.map +1 -1
  29. package/dist/document/blocks/block.d.ts +12 -6
  30. package/dist/document/blocks/block.d.ts.map +1 -1
  31. package/dist/document/blocks/blocktypes.d.ts +78 -35
  32. package/dist/document/blocks/blocktypes.d.ts.map +1 -1
  33. package/dist/document/blocks/index.d.ts +2 -1
  34. package/dist/document/blocks/index.d.ts.map +1 -1
  35. package/dist/document/blocks/schema.d.ts +4 -7
  36. package/dist/document/blocks/schema.d.ts.map +1 -1
  37. package/dist/document/blocks/typeguards.d.ts +4 -5
  38. package/dist/document/blocks/typeguards.d.ts.map +1 -1
  39. package/dist/document/utils.d.ts +6 -10
  40. package/dist/document/utils.d.ts.map +1 -1
  41. package/dist/edit-utils.d.ts +10 -0
  42. package/dist/edit-utils.d.ts.map +1 -0
  43. package/dist/editor.d.ts +49 -31
  44. package/dist/editor.d.ts.map +1 -1
  45. package/dist/embedded-codemirror/embedded-codemirror-keymap.d.ts.map +1 -1
  46. package/dist/embedded-codemirror/embeddedCodemirror.d.ts +2 -2
  47. package/dist/embedded-codemirror/embeddedCodemirror.d.ts.map +1 -1
  48. package/dist/hinting/hint-plugin.d.ts +1 -2
  49. package/dist/hinting/hint-plugin.d.ts.map +1 -1
  50. package/dist/index.css +2 -2
  51. package/dist/index.d.ts +6 -1
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +62 -82
  54. package/dist/inputArea.d.ts +2 -3
  55. package/dist/inputArea.d.ts.map +1 -1
  56. package/dist/mapping/Tree.d.ts +21 -5
  57. package/dist/mapping/Tree.d.ts.map +1 -1
  58. package/dist/mapping/mapping.d.ts +17 -0
  59. package/dist/mapping/mapping.d.ts.map +1 -1
  60. package/dist/mapping/nodeUpdate.d.ts +5 -5
  61. package/dist/mapping/nodeUpdate.d.ts.map +1 -1
  62. package/dist/mapping/textUpdate.d.ts +8 -0
  63. package/dist/mapping/textUpdate.d.ts.map +1 -1
  64. package/dist/mapping/types.d.ts.map +1 -1
  65. package/dist/markdown-defaults/index.d.ts.map +1 -1
  66. package/dist/markdown-defaults/statemachine.d.ts +11 -2
  67. package/dist/markdown-defaults/statemachine.d.ts.map +1 -1
  68. package/dist/markup-views/index.d.ts +1 -4
  69. package/dist/markup-views/index.d.ts.map +1 -1
  70. package/dist/markup-views/switchable-view/EditableView.d.ts.map +1 -1
  71. package/dist/markup-views/switchable-view/RenderedView.d.ts +1 -1
  72. package/dist/markup-views/switchable-view/RenderedView.d.ts.map +1 -1
  73. package/dist/markup-views/switchable-view/SwitchableView.d.ts +5 -8
  74. package/dist/markup-views/switchable-view/SwitchableView.d.ts.map +1 -1
  75. package/dist/menubar/menubar.d.ts +2 -4
  76. package/dist/menubar/menubar.d.ts.map +1 -1
  77. package/dist/progressBar.d.ts +31 -11
  78. package/dist/progressBar.d.ts.map +1 -1
  79. package/dist/qedStatus.d.ts.map +1 -1
  80. package/dist/schema/schema.d.ts +4 -3
  81. package/dist/schema/schema.d.ts.map +1 -1
  82. package/dist/serialization/DocumentSerializer.d.ts +43 -5
  83. package/dist/serialization/DocumentSerializer.d.ts.map +1 -1
  84. package/dist/styles/index.d.ts +3 -5
  85. package/dist/styles/index.d.ts.map +1 -1
  86. package/dist/styles/waterproof-defaults.css +2 -0
  87. package/dist/translation/index.d.ts +1 -1
  88. package/dist/translation/index.d.ts.map +1 -1
  89. package/impermeable-waterproof-editor-0.14.0.tgz +0 -0
  90. package/package.json +33 -10
  91. package/tsconfig.test.json +14 -0
  92. package/dist/codeview/progress-indicator.d.ts +0 -19
  93. package/dist/codeview/progress-indicator.d.ts.map +0 -1
  94. package/dist/mapping/newmapping.d.ts +0 -62
  95. package/dist/mapping/newmapping.d.ts.map +0 -1
  96. package/dist/src/api/Completions.d.ts +0 -21
  97. package/dist/src/api/Completions.d.ts.map +0 -1
  98. package/dist/src/api/DocChange.d.ts +0 -19
  99. package/dist/src/api/DocChange.d.ts.map +0 -1
  100. package/dist/src/api/FileFormat.d.ts +0 -10
  101. package/dist/src/api/FileFormat.d.ts.map +0 -1
  102. package/dist/src/api/InputAreaStatus.d.ts +0 -14
  103. package/dist/src/api/InputAreaStatus.d.ts.map +0 -1
  104. package/dist/src/api/LineNumber.d.ts +0 -10
  105. package/dist/src/api/LineNumber.d.ts.map +0 -1
  106. package/dist/src/api/ServerStatus.d.ts +0 -18
  107. package/dist/src/api/ServerStatus.d.ts.map +0 -1
  108. package/dist/src/api/Severity.d.ts +0 -12
  109. package/dist/src/api/Severity.d.ts.map +0 -1
  110. package/dist/src/api/index.d.ts +0 -12
  111. package/dist/src/api/index.d.ts.map +0 -1
  112. package/dist/src/api/types.d.ts +0 -119
  113. package/dist/src/api/types.d.ts.map +0 -1
  114. package/dist/src/autocomplete/coqTerms.d.ts +0 -3
  115. package/dist/src/autocomplete/coqTerms.d.ts.map +0 -1
  116. package/dist/src/autocomplete/emojis.d.ts +0 -10
  117. package/dist/src/autocomplete/emojis.d.ts.map +0 -1
  118. package/dist/src/autocomplete/index.d.ts +0 -2
  119. package/dist/src/autocomplete/index.d.ts.map +0 -1
  120. package/dist/src/autocomplete/renderSymbol.d.ts +0 -7
  121. package/dist/src/autocomplete/renderSymbol.d.ts.map +0 -1
  122. package/dist/src/autocomplete/symbols.d.ts +0 -7
  123. package/dist/src/autocomplete/symbols.d.ts.map +0 -1
  124. package/dist/src/codeview/code-plugin.d.ts +0 -28
  125. package/dist/src/codeview/code-plugin.d.ts.map +0 -1
  126. package/dist/src/codeview/color-scheme.d.ts +0 -6
  127. package/dist/src/codeview/color-scheme.d.ts.map +0 -1
  128. package/dist/src/codeview/debouncer.d.ts +0 -8
  129. package/dist/src/codeview/debouncer.d.ts.map +0 -1
  130. package/dist/src/codeview/index.d.ts +0 -3
  131. package/dist/src/codeview/index.d.ts.map +0 -1
  132. package/dist/src/codeview/lang-pack/index.d.ts +0 -8
  133. package/dist/src/codeview/lang-pack/index.d.ts.map +0 -1
  134. package/dist/src/codeview/lang-pack/print-grammar.d.ts +0 -2
  135. package/dist/src/codeview/lang-pack/print-grammar.d.ts.map +0 -1
  136. package/dist/src/codeview/lang-pack/syntax.d.ts +0 -3
  137. package/dist/src/codeview/lang-pack/syntax.d.ts.map +0 -1
  138. package/dist/src/codeview/lang-pack/syntax.terms.d.ts +0 -2
  139. package/dist/src/codeview/lang-pack/syntax.terms.d.ts.map +0 -1
  140. package/dist/src/codeview/nodeview.d.ts +0 -63
  141. package/dist/src/codeview/nodeview.d.ts.map +0 -1
  142. package/dist/src/commands/command-helpers.d.ts +0 -48
  143. package/dist/src/commands/command-helpers.d.ts.map +0 -1
  144. package/dist/src/commands/commands.d.ts +0 -30
  145. package/dist/src/commands/commands.d.ts.map +0 -1
  146. package/dist/src/commands/delete-command.d.ts +0 -4
  147. package/dist/src/commands/delete-command.d.ts.map +0 -1
  148. package/dist/src/commands/index.d.ts +0 -4
  149. package/dist/src/commands/index.d.ts.map +0 -1
  150. package/dist/src/commands/insert-command.d.ts +0 -34
  151. package/dist/src/commands/insert-command.d.ts.map +0 -1
  152. package/dist/src/commands/types.d.ts +0 -15
  153. package/dist/src/commands/types.d.ts.map +0 -1
  154. package/dist/src/context-menu/index.d.ts +0 -2
  155. package/dist/src/context-menu/index.d.ts.map +0 -1
  156. package/dist/src/context-menu/menu.d.ts +0 -8
  157. package/dist/src/context-menu/menu.d.ts.map +0 -1
  158. package/dist/src/document/blocks/block.d.ts +0 -24
  159. package/dist/src/document/blocks/block.d.ts.map +0 -1
  160. package/dist/src/document/blocks/blocktypes.d.ts +0 -78
  161. package/dist/src/document/blocks/blocktypes.d.ts.map +0 -1
  162. package/dist/src/document/blocks/index.d.ts +0 -3
  163. package/dist/src/document/blocks/index.d.ts.map +0 -1
  164. package/dist/src/document/blocks/schema.d.ts +0 -21
  165. package/dist/src/document/blocks/schema.d.ts.map +0 -1
  166. package/dist/src/document/blocks/typeguards.d.ts +0 -11
  167. package/dist/src/document/blocks/typeguards.d.ts.map +0 -1
  168. package/dist/src/document/construct-document.d.ts +0 -4
  169. package/dist/src/document/construct-document.d.ts.map +0 -1
  170. package/dist/src/document/index.d.ts +0 -5
  171. package/dist/src/document/index.d.ts.map +0 -1
  172. package/dist/src/document/utils.d.ts +0 -49
  173. package/dist/src/document/utils.d.ts.map +0 -1
  174. package/dist/src/documentProgressDecorator.d.ts +0 -9
  175. package/dist/src/documentProgressDecorator.d.ts.map +0 -1
  176. package/dist/src/editor.d.ts +0 -154
  177. package/dist/src/editor.d.ts.map +0 -1
  178. package/dist/src/embedded-codemirror/embedded-codemirror-keymap.d.ts +0 -9
  179. package/dist/src/embedded-codemirror/embedded-codemirror-keymap.d.ts.map +0 -1
  180. package/dist/src/embedded-codemirror/embeddedCodemirror.d.ts +0 -40
  181. package/dist/src/embedded-codemirror/embeddedCodemirror.d.ts.map +0 -1
  182. package/dist/src/embedded-codemirror/index.d.ts +0 -3
  183. package/dist/src/embedded-codemirror/index.d.ts.map +0 -1
  184. package/dist/src/embedded-codemirror/types.d.ts +0 -9
  185. package/dist/src/embedded-codemirror/types.d.ts.map +0 -1
  186. package/dist/src/hinting/hint-plugin.d.ts +0 -9
  187. package/dist/src/hinting/hint-plugin.d.ts.map +0 -1
  188. package/dist/src/hinting/index.d.ts +0 -2
  189. package/dist/src/hinting/index.d.ts.map +0 -1
  190. package/dist/src/index.d.ts +0 -6
  191. package/dist/src/index.d.ts.map +0 -1
  192. package/dist/src/inputArea.d.ts +0 -14
  193. package/dist/src/inputArea.d.ts.map +0 -1
  194. package/dist/src/markup-views/CoqdocPlugin.d.ts +0 -19
  195. package/dist/src/markup-views/CoqdocPlugin.d.ts.map +0 -1
  196. package/dist/src/markup-views/CoqdocView.d.ts +0 -15
  197. package/dist/src/markup-views/CoqdocView.d.ts.map +0 -1
  198. package/dist/src/markup-views/MarkdownPlugin.d.ts +0 -21
  199. package/dist/src/markup-views/MarkdownPlugin.d.ts.map +0 -1
  200. package/dist/src/markup-views/MarkdownView.d.ts +0 -15
  201. package/dist/src/markup-views/MarkdownView.d.ts.map +0 -1
  202. package/dist/src/markup-views/index.d.ts +0 -5
  203. package/dist/src/markup-views/index.d.ts.map +0 -1
  204. package/dist/src/markup-views/switchable-view/EditableView.d.ts +0 -22
  205. package/dist/src/markup-views/switchable-view/EditableView.d.ts.map +0 -1
  206. package/dist/src/markup-views/switchable-view/EditorTheme.d.ts +0 -8
  207. package/dist/src/markup-views/switchable-view/EditorTheme.d.ts.map +0 -1
  208. package/dist/src/markup-views/switchable-view/MarkdownSchema.d.ts +0 -8
  209. package/dist/src/markup-views/switchable-view/MarkdownSchema.d.ts.map +0 -1
  210. package/dist/src/markup-views/switchable-view/RenderedView.d.ts +0 -13
  211. package/dist/src/markup-views/switchable-view/RenderedView.d.ts.map +0 -1
  212. package/dist/src/markup-views/switchable-view/SwitchableView.d.ts +0 -62
  213. package/dist/src/markup-views/switchable-view/SwitchableView.d.ts.map +0 -1
  214. package/dist/src/markup-views/switchable-view/index.d.ts +0 -2
  215. package/dist/src/markup-views/switchable-view/index.d.ts.map +0 -1
  216. package/dist/src/math-integration/index.d.ts +0 -2
  217. package/dist/src/math-integration/index.d.ts.map +0 -1
  218. package/dist/src/math-integration/nodespecs.d.ts +0 -4
  219. package/dist/src/math-integration/nodespecs.d.ts.map +0 -1
  220. package/dist/src/menubar/index.d.ts +0 -2
  221. package/dist/src/menubar/index.d.ts.map +0 -1
  222. package/dist/src/menubar/menubar.d.ts +0 -25
  223. package/dist/src/menubar/menubar.d.ts.map +0 -1
  224. package/dist/src/osType.d.ts +0 -8
  225. package/dist/src/osType.d.ts.map +0 -1
  226. package/dist/src/progressBar.d.ts +0 -13
  227. package/dist/src/progressBar.d.ts.map +0 -1
  228. package/dist/src/qedStatus.d.ts +0 -9
  229. package/dist/src/qedStatus.d.ts.map +0 -1
  230. package/dist/src/schema/index.d.ts +0 -2
  231. package/dist/src/schema/index.d.ts.map +0 -1
  232. package/dist/src/schema/schema-nodes.d.ts +0 -1
  233. package/dist/src/schema/schema-nodes.d.ts.map +0 -1
  234. package/dist/src/schema/schema.d.ts +0 -23
  235. package/dist/src/schema/schema.d.ts.map +0 -1
  236. package/dist/src/styles/index.d.ts +0 -17
  237. package/dist/src/styles/index.d.ts.map +0 -1
  238. package/dist/src/translation/Translator.d.ts +0 -12
  239. package/dist/src/translation/Translator.d.ts.map +0 -1
  240. package/dist/src/translation/index.d.ts +0 -2
  241. package/dist/src/translation/index.d.ts.map +0 -1
  242. package/dist/src/translation/toProsemirror/index.d.ts +0 -2
  243. package/dist/src/translation/toProsemirror/index.d.ts.map +0 -1
  244. package/dist/src/translation/toProsemirror/mvFileToProsemirror.d.ts +0 -2
  245. package/dist/src/translation/toProsemirror/mvFileToProsemirror.d.ts.map +0 -1
  246. package/dist/src/translation/toProsemirror/parseAsMv.d.ts +0 -7
  247. package/dist/src/translation/toProsemirror/parseAsMv.d.ts.map +0 -1
  248. package/dist/src/translation/toProsemirror/parser.d.ts +0 -3
  249. package/dist/src/translation/toProsemirror/parser.d.ts.map +0 -1
  250. package/dist/src/translation/types.d.ts +0 -12
  251. package/dist/src/translation/types.d.ts.map +0 -1
  252. package/dist/src/utilities/index.d.ts +0 -2
  253. package/dist/src/utilities/index.d.ts.map +0 -1
  254. package/dist/src/utilities/prosemirror.d.ts +0 -13
  255. package/dist/src/utilities/prosemirror.d.ts.map +0 -1
  256. package/dist/tsconfig.tsbuildinfo +0 -1
  257. package/jest-thingie +0 -0
@@ -1,12 +1,11 @@
1
1
  import { Plugin, PluginKey } from "prosemirror-state";
2
2
  /**
3
3
  * Interface describing the state of the input are plugin.
4
- * Contains fields `locked: boolean` indicating wether non-input areas should be locked (ie. non-teacher mode) and
5
- * `globalLock: boolean` indicating that we are in a global lockdown state (caused by an unrecoverable error).
4
+ * Contains field `teacher: boolean` indicating wether we are in teacher mode
5
+ * (in teacher mode content outside of input areas should be editable)
6
6
  */
7
7
  export interface IInputAreaPluginState {
8
8
  teacher: boolean;
9
- globalLock: boolean;
10
9
  }
11
10
  /** The plugin key for the input area plugin */
12
11
  export declare const INPUT_AREA_PLUGIN_KEY: PluginKey<IInputAreaPluginState>;
@@ -1 +1 @@
1
- {"version":3,"file":"inputArea.d.ts","sourceRoot":"","sources":["../src/inputArea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,MAAM,EAAE,SAAS,EAA2B,MAClE,mBAAmB,CAAC;AAEpB;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC,OAAO,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,+CAA+C;AAC/C,eAAO,MAAM,qBAAqB,kCAA8D,CAAC;AAiFjG,eAAO,MAAM,eAAe,+BAAkC,CAAC"}
1
+ {"version":3,"file":"inputArea.d.ts","sourceRoot":"","sources":["../src/inputArea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,MAAM,EAAE,SAAS,EAA2B,MAAM,mBAAmB,CAAC;AAG5F;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC,OAAO,EAAE,OAAO,CAAC;CACjB;AAED,+CAA+C;AAC/C,eAAO,MAAM,qBAAqB,kCAA8D,CAAC;AAwDjG,eAAO,MAAM,eAAe,+BAAkC,CAAC"}
@@ -24,6 +24,7 @@ export declare class TreeNode {
24
24
  from: number;
25
25
  to: number;
26
26
  };
27
+ lineStart: number;
27
28
  /** Potential children of this tree node */
28
29
  children: TreeNode[];
29
30
  constructor(type: string, contentRange: {
@@ -35,11 +36,12 @@ export declare class TreeNode {
35
36
  }, title: string, prosemirrorStart: number, prosemirrorEnd: number, pmRange: {
36
37
  to: number;
37
38
  from: number;
38
- });
39
+ }, lineStart: number);
39
40
  addChild(child: TreeNode): void;
40
41
  removeChild(child: TreeNode): void;
41
42
  shiftCloseOffsets(offset: number, offsetProsemirror?: number): void;
42
43
  shiftOffsets(offset: number, offsetProsemirror?: number): void;
44
+ shiftLineStart(offset: number): void;
43
45
  traverseDepthFirst(callback: (node: TreeNode) => void): void;
44
46
  }
45
47
  export declare class Tree {
@@ -53,23 +55,37 @@ export declare class Tree {
53
55
  }, title: string, prosemirrorStart: number, prosemirrorEnd: number, pmRange: {
54
56
  from: number;
55
57
  to: number;
56
- });
58
+ }, lineStart: number);
57
59
  traverseDepthFirst(callback: (node: TreeNode) => void, node?: TreeNode): void;
58
- traverseBreadthFirst(callback: (node: TreeNode) => void): void;
60
+ /**
61
+ * Finds the highest (closest to root) node that contains the given prosemirror position
62
+ */
59
63
  findHighestContainingNode(pos: number, node?: TreeNode): TreeNode;
60
64
  findParent(target: TreeNode, node?: TreeNode | null, parent?: TreeNode | null): TreeNode | null;
61
65
  findNodeByOriginalPosition(pos: number, node?: TreeNode | null): TreeNode | null;
62
- findNodeByProsemirrorPosition(pos: number, node?: TreeNode | null): TreeNode | null;
63
66
  /**
64
67
  * Find the most specific node that contains the given ProseMirror position, this function is biased to find the
65
68
  * first node (in terms of position) containing the position. I.e. in a tree with a code cell that ends at 28 and a newline that
66
69
  * starts at 28, we will return the code cell when searching for position 28.
70
+ *
71
+ * When using this method, be careful of the cases where you can get the first child of some node,
72
+ * since these might need some special casing. We suspect that changing this function to have a
73
+ * right-bias rather than a left-bias shifts the above issue to concern the final child.
74
+ *
67
75
  * @param pos ProseMirror position to search for
68
76
  * @param node The node to start the search from, defaults to the root node of the tree
69
77
  * @returns The most specific node containing the position, or null if no such node exists
70
78
  */
71
79
  findNodeByProsePos(pos: number, node?: TreeNode): TreeNode | null;
80
+ /**
81
+ * This function returns the nodes fully contained in a range, descendant from a given node, but NOT transitively.
82
+ * i.e. if Node A is fully contained in Node B, and B is within the range, then A does not get returned.
83
+ * @param from Start of the range
84
+ * @param to End of range
85
+ * @param node TreeNode to start from
86
+ * @returns top-level TreeNodes contained in the range.
87
+ */
72
88
  nodesInProseRange(from: number, to: number, node?: TreeNode | null): TreeNode[];
73
- insertByPosition(newNode: TreeNode): boolean;
89
+ computeLineNumbers(): Array<number>;
74
90
  }
75
91
  //# sourceMappingURL=Tree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../src/mapping/Tree.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAQ;IACjB,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,YAAY,EAAE;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC;IACzC,6FAA6F;IAC7F,QAAQ,EAAE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AG,QAAQ,EAAE;IAY1F,kBAAkB,IAAI,KAAK,CAAC,MAAM,CAAC;CAStC"}
@@ -12,6 +12,15 @@ export declare class Mapping {
12
12
  private tree;
13
13
  /** The version of the underlying textDocument */
14
14
  private _version;
15
+ /**
16
+ * Tracks the ProseMirror document after each processed step.
17
+ * The caller of `update` always passes the pre-transaction document, so for
18
+ * step N in a multi-step transaction the passed `doc` is already stale.
19
+ * We keep `_currentDoc` in sync by applying each step to it, so that
20
+ * subsequent calls within the same transaction see the correct document.
21
+ */
22
+ private _currentDoc;
23
+ private readonly serializer;
15
24
  private readonly nodeUpdate;
16
25
  private readonly textUpdate;
17
26
  /**
@@ -39,6 +48,14 @@ export declare class Mapping {
39
48
  * @returns The corresponding ProseMirror index into the ProseMirror view.
40
49
  */
41
50
  textOffsetToPmIndex(offset: number): number;
51
+ computeLineNumbers(): Array<number>;
52
+ updateLines(lineDelta: number, from: number): void;
53
+ /**
54
+ * Resets the internally-evolved document to null so the next transaction
55
+ * starts fresh from the document passed by the caller.
56
+ * Call this at the beginning of each ProseMirror dispatchTransaction.
57
+ */
58
+ resetCurrentDoc(): void;
42
59
  update(step: Step, doc: Node): DocChange | WrappingDocChange;
43
60
  /**
44
61
  * This checks if the doc change actually changed the document, since vscode
@@ -1 +1 @@
1
- {"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../src/mapping/mapping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,QAAQ,CAAC;AAIxC,OAAO,EAAE,KAAK,EAAc,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAgB,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAE1G,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAkC,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7E;;;GAGG;AACH,qBAAa,OAAO;IAChB,0DAA0D;IAC1D,OAAO,CAA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AQ,CAAC,UAAU,CAAqB;IAChD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IAExC;;;OAGG;gBACS,WAAW,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE,kBAAkB;IAoB5G;;OAEG;IACI,UAAU;IAIjB;;OAEG;IACH,IAAW,OAAO,WAEjB;IAED;;;;OAIG;IACI,mBAAmB,CAAC,KAAK,EAAE,MAAM;IAMxC;;;;OAIG;IACI,mBAAmB,CAAC,MAAM,EAAE,MAAM;IAMlC,kBAAkB,IAAI,KAAK,CAAC,MAAM,CAAC;IAInC,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAYzD;;;;OAIG;IACI,eAAe,IAAI,IAAI;IAIvB,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,GAAG,SAAS,GAAG,iBAAiB;IA6DnE;;;OAGG;IACH,OAAO,CAAC,cAAc;IAQtB;;;OAGG;IACH,OAAO,CAAC,QAAQ;IAoChB;;;;;;;;;OASG;IACH,OAAO,CAAC,yBAAyB;CAyDpC"}
@@ -9,18 +9,18 @@ export declare class NodeUpdate {
9
9
  private readonly serializer;
10
10
  constructor(tagConf: TagConfiguration, serializer: DocumentSerializer);
11
11
  nodeNameToTagPair(nodeName: string, title?: string): [string, string];
12
- nodeUpdate(step: ReplaceStep | ReplaceAroundStep, mapping: Mapping): ParsedStep;
13
- doReplaceStep(step: ReplaceStep, mapping: Mapping): ParsedStep;
12
+ nodeUpdate(step: ReplaceStep | ReplaceAroundStep, mapping: Mapping, serializer: DocumentSerializer, proseDoc: Node): ParsedStep;
13
+ doReplaceStep(step: ReplaceStep, mapping: Mapping, serializer: DocumentSerializer, proseDoc: Node): ParsedStep;
14
14
  doReplaceAroundStep(step: ReplaceAroundStep, mapping: Mapping): ParsedStep;
15
- replaceInsert(step: ReplaceStep, tree: Tree): ParsedStep;
16
- buildTreeFromNode(node: Node, startOrig: number, startProse: number): TreeNode;
15
+ replaceInsert(step: ReplaceStep, tree: Tree, serializer: DocumentSerializer, proseDoc: Node): ParsedStep;
16
+ buildTreeFromNode(node: Node, startOrig: number, startProse: number, currentLine?: number): TreeNode;
17
17
  /**
18
18
  * Handles ReplaceSteps that delete content.
19
19
  * @param step The ReplaceStep for which we determined that it is deletion of one or more nodes.
20
20
  * @param tree The input tree
21
21
  * @returns A ParsedStep containing the resulting DocChange and the updated tree.
22
22
  */
23
- replaceDelete(step: ReplaceStep, tree: Tree): ParsedStep;
23
+ replaceDelete(step: ReplaceStep, tree: Tree, serializer: DocumentSerializer, proseDoc: Node): ParsedStep;
24
24
  replaceAroundDelete(step: ReplaceAroundStep, tree: Tree): ParsedStep;
25
25
  replaceAroundReplace(step: ReplaceAroundStep, tree: Tree): ParsedStep;
26
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nodeUpdate.d.ts","sourceRoot":"","sources":["../../src/mapping/nodeUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAiB,UAAU,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAa,kBAAkB,EAAmB,gBAAgB,EAAqB,MAAM,QAAQ,CAAC;AAE7G,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEvE,qBAAa,UAAU;IAEN,OAAO,CAAC,QAAQ,CAAC,OAAO;IAAoB,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAtD,OAAO,EAAE,gBAAgB,EAAmB,UAAU,EAAE,kBAAkB;IAGxG,iBAAiB,CAAC,QAAQ,EAAE,MA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
4
5
  export declare class TextUpdate {
6
+ /**
7
+ * We cache the last node in which a text update happened, as it is likely that the next text update will happen in the same node
8
+ * Note that this is a *reference* to the node in the tree.
9
+ */
10
+ private cachedNode;
11
+ invalidateCache(): void;
12
+ getNodeFromCacheOrSearch(step: ReplaceStep, tree: Tree): TreeNode | null;
5
13
  /** This function is responsible for handling updates in prosemirror that happen exclusively as text edits and translating them to vscode text doc */
6
14
  textUpdate(step: ReplaceStep, mapping: Mapping): ParsedStep;
7
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"textUpdate.d.ts","sourceRoot":"","sources":["../../src/mapping/textUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAiB,MAAM,SAAS,CAAC;AAGpD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,qBAAa,UAAU;IAEnB,qJAAqJ;IACrJ,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,GAAI,UAAU;CAoD/D"}
1
+ {"version":3,"file":"textUpdate.d.ts","sourceRoot":"","sources":["../../src/mapping/textUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAiB,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKpD,qBAAa,UAAU;IACnB;;;OAGG;IACH,OAAO,CAAC,UAAU,CAAyB;IAEpC,eAAe,IAAI,IAAI;IAI9B,wBAAwB,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,GAAG,QAAQ,GAAG,IAAI;IAmBxE,qJAAqJ;IACrJ,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,GAAI,UAAU;CAqD/D"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/mapping/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB,2DAA2D;IAC3D,MAAM,EAAE,SAAS,GAAG,iBAAiB,CAAC;IACtC,uDAAuD;IACvD,OAAO,EAAE,IAAI,CAAA;CAChB,CAAA;AAED;;;GAGG;AACH,oBAAY,aAAa;IACrB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;CACtB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/mapping/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB,2DAA2D;IAC3D,MAAM,EAAE,SAAS,GAAG,iBAAiB,CAAC;IACtC,uDAAuD;IACvD,OAAO,EAAE,IAAI,CAAC;CACjB,CAAA;AAED;;;GAGG;AACH,oBAAY,aAAa;IACrB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;CACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/markdown-defaults/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,CA4BlE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/markdown-defaults/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,CAiClE"}
@@ -6,9 +6,18 @@ import { WaterproofDocument } from "../api";
6
6
  * * The content between `<hint title="{title}">` and ` </hint>` is turned into a hint cell, `{title}` will turn into the title that is displayed in the editor.
7
7
  * * The content between `<input-area>` and `</input-area>` is turned into an input area.
8
8
  * @param document The document to convert into a `WaterproofDocument`
9
- * @param language The language tag to use for the code cells. That is, the part of the ` ``` ` when opening a code block (` ```python ` for a python
9
+ * @param config An object that may contain
10
+ * - `language: string`: The language tag to use for the code cells. That is, the part of the ` ``` ` when opening a code block (` ```python ` for a python
10
11
  * code block). Defaults to `""`.
12
+ * - `startParsingFrom: number`: An offset in `document` from where to start parsing the markdown document. Fox example, if you have a header in the
13
+ * markdown file use offset to start the markdown parser after the header content. Defaults to `0`.
14
+ * - `stopParsingAt: number`: Can be used to configure the parser to stop before the end of the file, when the file contains a footer for example.
15
+ * When not specified, parsing will stop only at the end of the file.
11
16
  * @returns A array of `Block` that form a `WaterproofDocument`.
12
17
  */
13
- export declare function parse(document: string, language?: string): WaterproofDocument;
18
+ export declare function parse(document: string, config: {
19
+ language?: string;
20
+ startParsingFrom?: number;
21
+ stopParsingAt?: number;
22
+ }): WaterproofDocument;
14
23
  //# sourceMappingURL=statemachine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"statemachine.d.ts","sourceRoot":"","sources":["../../src/markdown-defaults/statemachine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAuB5C;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAW,GAAG,kBAAkB,CAySjF"}
1
+ {"version":3,"file":"statemachine.d.ts","sourceRoot":"","sources":["../../src/markdown-defaults/statemachine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAuB5C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAC,GAAG,kBAAkB,CAsT1I"}
@@ -1,5 +1,2 @@
1
- export { CoqdocView } from "./CoqdocView";
2
- export { coqdocPlugin, COQDOC_PLUGIN_KEY } from "./CoqdocPlugin";
3
- export { MarkdownView } from "./MarkdownView";
4
- export { realMarkdownPlugin, REAL_MARKDOWN_PLUGIN_KEY } from "./MarkdownPlugin";
1
+ export { switchableViewPlugin, SWITCHABLE_VIEW_PLUGIN_KEY } from "./SwitchableViewPlugin";
5
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/markup-views/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/markup-views/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"EditableView.d.ts","sourceRoot":"","sources":["../../../src/markup-views/switchable-view/EditableView.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,IAAI,U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OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAEpE;;;;GAIG;AAEH,qBAAa,YAAa,SAAQ,wBAAwB;IAC/C,IAAI,EAAE,UAAU,CAAC;IAC3B,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,UAAU,CAAY;gBAGvB,IAAI,EAAE,IAAI,EAChB,SAAS,EAAE,UAAU,EACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,EAClC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,cAAc,EACtB,SAAS,EAAE,SAAS;IA8BrB,KAAK;IACF,OAAO;IAGV,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAkCvC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,UAAU,EAAE;CAgDtD"}
@@ -4,7 +4,7 @@ export declare class RenderedView {
4
4
  view: EditorView;
5
5
  private _outerView;
6
6
  private _parent;
7
- constructor(target: HTMLElement, content: string, outerView: EditorView, parent: SwitchableView, usingCoqdocSyntax: boolean, _getPos: (() => number | undefined));
7
+ constructor(target: HTMLElement, content: string, outerView: EditorView, parent: SwitchableView, _getPos: (() => number | undefined), disableMarkdownFeatures: Array<string>);
8
8
  setSelection(anchor: number, head: number, _root: Document | ShadowRoot): void;
9
9
  update(): boolean;
10
10
  focus(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"RenderedView.d.ts","sourceRoot":"","sources":["../../../src/markup-views/switchable-view/RenderedView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAK9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,qBAAa,YAAY;IACd,IAAI,EAAE,UAAU,CAAC;IACxB,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,OAAO,CAAiB;gBAG5B,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,UAAU,EACrB,MAAM,EAAE,cAAc,EACtB,iBAAiB,EAAE,OAAO,EAC1B,OAAO,EAAE,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC;IAiCvC,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,UAAU;IAUvE,MAAM;IAIN,KAAK;IACL,OAAO;CACV"}
1
+ {"version":3,"file":"RenderedView.d.ts","sourceRoot":"","sources":["../../../src/markup-views/switchable-view/RenderedView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAK9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,qBAAa,YAAY;IACd,IAAI,EAAE,UAAU,CAAC;IACxB,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,OAAO,CAAiB;gBAG5B,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,UAAU,EACrB,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,EACnC,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC;IA6B1C,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,UAAU;IAUvE,MAAM;IAIN,KAAK;IACL,OAAO;CACV"}
@@ -1,11 +1,13 @@
1
1
  import { Decoration, EditorView, NodeView } from "prosemirror-view";
2
2
  import { PluginKey } from "prosemirror-state";
3
- import { Node as PNode, Schema } from "prosemirror-model";
3
+ import { Node as PNode } from "prosemirror-model";
4
4
  /**
5
5
  * Abstract class for a switchable view.
6
6
  * Switchable views allow for editing and rendering.
7
7
  */
8
- export declare abstract class SwitchableView implements NodeView {
8
+ export declare class SwitchableView implements NodeView {
9
+ private readonly processForRendering;
10
+ private readonly disableMarkdownFeatures;
9
11
  /** The DOM for this nodeview. */
10
12
  dom: HTMLElement;
11
13
  /** The currently active view. */
@@ -21,16 +23,13 @@ export declare abstract class SwitchableView implements NodeView {
21
23
  /** Represents whether the view is currently updating */
22
24
  private _updating;
23
25
  private _getPos;
24
- private _outerSchema;
25
- private _viewName;
26
26
  private _pluginKey;
27
27
  private _emptyClassName;
28
28
  private _viewClassName;
29
29
  private _editorClassName;
30
30
  private _renderedClassName;
31
- private _usingCoqdocSyntax;
32
31
  get content(): string;
33
- constructor(getPos: (() => number | undefined), outerView: EditorView, content: string, node: PNode, schema: Schema, pluginKey: PluginKey, viewName: string, usingCoqdocSyntax: boolean);
32
+ constructor(getPos: (() => number | undefined), outerView: EditorView, content: string, node: PNode, pluginKey: PluginKey, viewName: string, processForRendering: (input: string) => string, disableMarkdownFeatures: Array<string>);
34
33
  /**
35
34
  * Returns whether this view is currently in the updating state.
36
35
  */
@@ -49,8 +48,6 @@ export declare abstract class SwitchableView implements NodeView {
49
48
  * This destroys the view currently in place and then adds a new editable view.
50
49
  */
51
50
  makeEditableView(): void;
52
- abstract preprocessContentForEditing(input: string): string;
53
- abstract preprocessContentForRendering(input: string): string;
54
51
  update(node: PNode, decorations: readonly Decoration[]): boolean;
55
52
  selectNode(): void;
56
53
  deselectNode(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"SwitchableView.d.ts","sourceRoot":"","sources":["../../../src/markup-views/switchable-view/SwitchableView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGpE,OAAO,EAAiB,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,IAAI,IAAI,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;GAGG;AACH,8BAAsB,cAAe,YAAW,QAAQ;IACpD,iCAAiC;IACjC,GAAG,EAAE,WAAW,CAAC;IACjB,iCAAiC;IACjC,OAA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,EAAE,MAAM,EACrB,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,EAC9C,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC;IAoD3D;;OAEG;IACH,IAAW,UAAU,YAEpB;IAED;;OAEG;IACH,IAAW,QAAQ,CAAC,MAAM,EAAE,OAAO,EAElC;IAED;;;OAGG;IACH,gBAAgB;IAchB;;;OAGG;IACH,gBAAgB;IAUhB,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,UAAU,EAAE;IAOtD,UAAU;IAWV,YAAY;IAQZ,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,UAAU;IAKtE,SAAS,CAAC,KAAK,EAAE,KAAK;IAQtB,cAAc;IAEd,OAAO;CAGV"}
@@ -1,7 +1,6 @@
1
- import { Schema } from "prosemirror-model";
2
1
  import { Plugin, PluginKey } from "prosemirror-state";
3
2
  import { OS } from "../osType";
4
- import { FileFormat } from "../api/FileFormat";
3
+ import { MenuBarEntry, TagConfiguration } from "../api";
5
4
  /**
6
5
  * Interface describing the state of the menu plugin
7
6
  */
@@ -14,11 +13,10 @@ interface IMenuPluginState {
14
13
  export declare const MENU_PLUGIN_KEY: PluginKey<IMenuPluginState>;
15
14
  /**
16
15
  * Create a new menu plugin given the schema and file format.
17
- * @param schema The schema in use for the editor.
18
16
  * @param filef The file format of the currently opened file.
19
17
  * @returns A prosemirror `Plugin` type containing the menubar.
20
18
  */
21
- export declare function menuPlugin(schema: Schema, filef: FileFormat, os: OS): Plugin<{
19
+ export declare function menuPlugin(os: OS, tagConf: TagConfiguration, customEntries: Array<MenuBarEntry> | undefined): Plugin<{
22
20
  showMenuItems: boolean;
23
21
  }>;
24
22
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../src/menubar/menubar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAuB,MAAM,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI3E,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAiM/C;;GAEG;AACH,UAAU,gBAAgB;IACtB,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,6BAAyD,CAAC;AAEtF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,EAAE;;GAiCnE"}
1
+ {"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../src/menubar/menubar.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,MAAM,EAAE,SAAS,EAAe,MAAM,mBAAmB,CAAC;AAIxF,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAsNxD;;GAEG;AACH,UAAU,gBAAgB;IACtB,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,6BAAyD,CAAC;AAEtF;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,SAAS;;GAiC3G"}
@@ -1,13 +1,33 @@
1
- import { Plugin, PluginKey } from "prosemirror-state";
2
- import { SimpleProgressParams } from "./api";
3
- import { ServerStatus } from "./api";
4
- export interface IProgressPluginState {
5
- progressParams: SimpleProgressParams;
6
- serverStatus: ServerStatus;
7
- resetProgressBar: boolean;
8
- endLine: number;
9
- startLine: number;
1
+ export declare class ProgressBar {
2
+ private readonly containerElem;
3
+ private readonly spinnerContainer;
4
+ private readonly progressBarContainer;
5
+ private readonly progress;
6
+ private readonly textSpan;
7
+ private shown;
8
+ constructor(insertAtTopOfNode: HTMLElement);
9
+ /**
10
+ * Hides the progress bar and spinner by setting
11
+ */
12
+ hide(): void;
13
+ /**
14
+ * Shows the progress bar and spinner
15
+ */
16
+ show(): void;
17
+ /**
18
+ * Updates the progress bar's value and text. If not already shown, it makes the progress bar visible.
19
+ * @param current The current progress value
20
+ * @param ofTotal The total progress value
21
+ * @param text Optional custom text; defaults to "Progress: current / ofTotal"
22
+ */
23
+ reportProgress(current: number, ofTotal: number, text?: string): void;
24
+ /**
25
+ * Starts the spinner
26
+ */
27
+ startSpinner(): void;
28
+ /**
29
+ * Stops the spinner
30
+ */
31
+ stopSpinner(): void;
10
32
  }
11
- export declare const PROGRESS_PLUGIN_KEY: PluginKey<IProgressPluginState>;
12
- export declare const progressBarPlugin: Plugin<IProgressPluginState>;
13
33
  //# sourceMappingURL=progressBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"progressBar.d.ts","sourceRoot":"","sources":["../src/progressBar.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,MAAM,EAAE,SAAS,EAA2B,MAAM,mBAAmB,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAGrC,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,oBAAoB,CAAC;IACrC,YAAY,EAAE,YAAY,CAAC;IAC3B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAGD,eAAO,MAAM,mBAAmB,iCAAiE,CAAC;AAuIlG,eAAO,MAAM,iBAAiB,8BAAoC,CAAC"}
1
+ {"version":3,"file":"progressBar.d.ts","sourceRoot":"","sources":["../src/progressBar.ts"],"names":[],"mappings":"AACA,qBAAa,WAAW;IAYpB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiB;IAC/C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAiB;IAClD,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAiB;IACtD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAsB;IAC/C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkB;IAC3C,OAAO,CAAC,KAAK,CAAkB;gBAEnB,iBAAiB,EAAE,WAAW;IAkC1C;;OAEG;IACI,IAAI;IAMX;;OAEG;IACI,IAAI;IAMX;;;;;OAKG;IACI,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;IASrE;;OAEG;IACI,YAAY;IAInB;;OAEG;IACI,WAAW;CAGrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"qedStatus.d.ts","sourceRoot":"","sources":["../src/qedStatus.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,MAAM,EAAE,SAAS,EAAc,MAAM,mBAAmB,CAAC;AAG/E,OAAO,EAAE,eAAe,EAAY,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B;AAGD,eAAO,MAAM,wBAAwB,qCAAuE,CAAC;AA8F7G,eAAO,MAAM,kBAAkB,GAAI,QAAQ,gBAAgB,qCAA0D,CAAC"}
1
+ {"version":3,"file":"qedStatus.d.ts","sourceRoot":"","sources":["../src/qedStatus.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,MAAM,EAAE,SAAS,EAAc,MAAM,mBAAmB,CAAC;AAG/E,OAAO,EAAE,eAAe,EAAY,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B;AAGD,eAAO,MAAM,wBAAwB,qCAAuE,CAAC;AAuF7G,eAAO,MAAM,kBAAkB,GAAI,QAAQ,gBAAgB,qCAA0D,CAAC"}
@@ -1,9 +1,12 @@
1
1
  import { Schema } from "prosemirror-model";
2
2
  export declare const SchemaCell: {
3
3
  readonly InputArea: "input";
4
+ readonly Hint: "hint";
4
5
  readonly Markdown: "markdown";
5
6
  readonly MathDisplay: "math_display";
6
7
  readonly Code: "code";
8
+ readonly Newline: "newline";
9
+ readonly Container: "container";
7
10
  };
8
11
  export type SchemaKeys = keyof typeof SchemaCell;
9
12
  export type SchemaNames = typeof SchemaCell[SchemaKeys];
@@ -16,8 +19,6 @@ export type SchemaNames = typeof SchemaCell[SchemaKeys];
16
19
  *
17
20
  * math blocks obtained from `prosemirror-math`:
18
21
  * https://github.com/benrbray/prosemirror-math/blob/master/src/math-schema.ts
19
- *
20
- * see [notes](./notes.md)
21
22
  */
22
- export declare const WaterproofSchema: Schema;
23
+ export declare const WaterproofSchema: Schema<SchemaNames | "doc" | "text", any>;
23
24
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/schema/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE1D,eAAO,MAAM,UAAU;;;;;CAKb,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,UAAU,CAAC;AACjD,MAAM,MAAM,WAAW,GAAG,OAAO,UAAU,CAAC,UAAU,CAAC,CAAC;AAMxD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,EAAE,MA8H7B,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/schema/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE1D,eAAO,MAAM,UAAU;;;;;;;;CAQb,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,UAAU,CAAC;AACjD,MAAM,MAAM,WAAW,GAAG,OAAO,UAAU,CAAC,UAAU,CAAC,CAAC;AAExD;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,2CAgG3B,CAAC"}
@@ -1,5 +1,12 @@
1
- import { Node } from "prosemirror-model";
1
+ import { Fragment, Node } from "prosemirror-model";
2
2
  import { TagConfiguration } from "../api";
3
+ export declare function makeNeighbors(above: Node | null | undefined, twoAbove: Node | null | undefined, below: Node | null | undefined, twoBelow: Node | null | undefined): (skipNewlines: boolean) => {
4
+ nodeAbove: string | null;
5
+ nodeBelow: string | null;
6
+ };
7
+ export declare class SerializationError extends Error {
8
+ constructor(message: string);
9
+ }
3
10
  export declare abstract class DocumentSerializer {
4
11
  /**
5
12
  * Describes how to turn a code node into a string representation.
@@ -60,20 +67,50 @@ export declare abstract class DocumentSerializer {
60
67
  nodeAbove: string | null;
61
68
  nodeBelow: string | null;
62
69
  }): string;
70
+ /**
71
+ * Describes how to turn a container node into a string representation.
72
+ * This node can have children (including input areas and hints), so you probably want to call `this.serializeNode` on every child node.
73
+ * The container's name can be retrieved via `containerNode.attrs.name`.
74
+ * @param containerNode The container node that is going to be serialized
75
+ * @param parentNode The parent node of this node (if it has one)
76
+ * @param neighbors Function that upon calling will return the neighbors of the node being serialized.
77
+ */
78
+ abstract serializeContainer(containerNode: Node, parentNode: string | null, neighbors: (skipNewlines: boolean) => {
79
+ nodeAbove: string | null;
80
+ nodeBelow: string | null;
81
+ }): string;
63
82
  serializeText(node: Node): string;
64
83
  serializeNewline(): string;
65
84
  /**
66
- *
67
- * @param node
68
- * @returns
85
+ * Serializes a node to its string representation.
86
+ * @param node The node to serialize.
87
+ * @param parent The type name of the parent node, or null if the node is at root level.
88
+ * @param neighbors A function that returns the node types above and below the current node, with an option to skip newline nodes.
89
+ * @returns The serialized (string) representation of the node.
90
+ * @throws A {@linkcode SerializationError} when the node type is not supported.
69
91
  */
70
92
  serializeNode(node: Node, parent: string | null, neighbors: (skipNewlines: boolean) => {
71
93
  nodeAbove: string | null;
72
94
  nodeBelow: string | null;
73
95
  }): string;
74
96
  /**
97
+ * Serializes a fragment of nodes into a string representation.
98
+ *
99
+ * This method iterates through each child node in the fragment and serializes it individually.
100
+ * For each node, it provides context about neighboring nodes to the serialization function,
101
+ * with an option to skip newline nodes when determining context.
102
+ * @param fragment The node content fragment to serialize
103
+ * @param parent The parent node name, or null if there is no parent
104
+ * @returns The serialized string representation of the fragment
105
+ * @throws A {@linkcode SerializationError} when the document contains a node type that is not supported by the serializer.
106
+ */
107
+ serializeFragment(fragment: Fragment, parent: string | null): string;
108
+ /**
109
+ * Serializes the whole ProseMirror document into its string representation.
75
110
  *
76
- * @param node
111
+ * @param node The document node to serialize, this should probably be the root (`doc`) node of the ProseMirror document.
112
+ * @returns The string representation of the document
113
+ * @throws A {@linkcode SerializationError} when the document contains a node type that is not supported by the serializer.
77
114
  */
78
115
  serializeDocument(node: Node): string;
79
116
  }
@@ -85,5 +122,6 @@ export declare class DefaultTagSerializer extends DocumentSerializer {
85
122
  serializeMarkdown(node: Node): string;
86
123
  serializeInput(node: Node): string;
87
124
  serializeHint(node: Node): string;
125
+ serializeContainer(node: Node): string;
88
126
  }
89
127
  //# sourceMappingURL=DocumentSerializer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentSerializer.d.ts","sourceRoot":"","sources":["../../src/serialization/DocumentSerializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,8BAAsB,kBAAkB;IACpC;;;;;;OAMG;IACH,QAAQ,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK;QAAC,SAAS,EAAE,MAAM,GAAG,IAAI,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+1,15 @@
1
1
  import "./math.css";
2
2
  import "./style.css";
3
3
  import "./hints.css";
4
+ import "./container.css";
4
5
  import "./menubar.css";
5
6
  import "./input-area.css";
6
7
  import "./markdown.css";
7
8
  import "./notifications.css";
8
- import "./coqdoc.css";
9
- import "./progressBar.css";
9
+ import "./progress.css";
10
10
  import "./documentProgressDecorator.css";
11
- import "./spinner.css";
12
- import "./freeze.css";
13
11
  import "./context-menu.css";
14
12
  import "./autocomplete.css";
15
- import "./waterproof.css";
16
13
  import "./magic.css";
14
+ import "./busy-indicator.css";
17
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/styles/index.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,CAAC;AAGpB,OAAO,aAAa,CAAC;AAGrB,OAAO,aAAa,CAAC;AAGrB,OAAO,eAAe,CAAC;AAGvB,OAAO,kBAAkB,CAAC;AAG1B,OAAO,gBAAgB,CAAC;AAGxB,OAAO,qBAAqB,CAAC;AAG7B,OAAO,cAAc,CAAC;AAGtB,OAAO,mBAAmB,CAAC;AAG3B,OAAO,iCAAiC,CAAC;AAGzC,OAAO,eAAe,CAAC;AAGvB,OAAO,cAAc,CAAC;AAGtB,OAAO,oBAAoB,CAAC;AAG5B,OAAO,oBAAoB,CAAC;AAG5B,OAAO,kBAAkB,CAAC;AAG1B,OAAO,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/styles/index.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,CAAC;AAGpB,OAAO,aAAa,CAAC;AAGrB,OAAO,aAAa,CAAC;AAGrB,OAAO,iBAAiB,CAAC;AAGzB,OAAO,eAAe,CAAC;AAGvB,OAAO,kBAAkB,CAAC;AAG1B,OAAO,gBAAgB,CAAC;AAGxB,OAAO,qBAAqB,CAAC;AAG7B,OAAO,gBAAgB,CAAC;AAGxB,OAAO,iCAAiC,CAAC;AAGzC,OAAO,oBAAoB,CAAC;AAG5B,OAAO,oBAAoB,CAAC;AAG5B,OAAO,aAAa,CAAC;AAGrB,OAAO,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ :root{--wp-buttonBackground: #2b3990;--wp-buttonBorder: #ffffff;--wp-buttonForeground: #ffffff;--wp-buttonHoverBackground: #232d73;--wp-buttonSecondaryBackground: #2b3990;--wp-dropdownBorder: #cecece;--wp-dropdownListBackground: #ffffff;--wp-editorBackground: #eceeff;--wp-editorFontFamily: "Droid Sans Mono", monospace;--wp-editorFontSize: 14px;--wp-editorFontWeight: normal;--wp-editorHintForeground: #0da0ba;--wp-editorInlayHintBackground: rgba(255, 255, 255, .1);--wp-editorInlayHintForeground: #969696;--wp-editorLightBulbForeground: #e0af68;--wp-editorLineHighlightBackground: rgba(182, 182, 182, .28);--wp-editorSelectionBackground: rgba(172, 176, 208, .48);--wp-editorSelectionForeground: #000000;--wp-errorForeground: #ffffff;--wp-fontFamily: system-ui, "Ubuntu", "Droid Sans", sans-serif;--wp-fontSize: 13px;--wp-fontWeight: normal;--wp-foreground: #000000;--wp-inputBackground: #eceeff;--wp-inputBorder: #eceeff;--wp-inputForeground: #000000;--wp-listActiveselectionBackground: #5561a6;--wp-listActiveselectionForeground: #ffffff;--wp-listDropBackground: #1e202e;--wp-listFilterWidgetBackground: #f8f8f8;--wp-listHighlightForeground: #668ac4;--wp-menuBackground: #eceeff;--wp-menuForeground: #000000;--wp-menuSelectionBackground: #2b3990;--wp-menuSelectionBorder: #101014;--wp-menuSelectionForeground: #ffffff;--wp-menuSeparatorBackground: #d4d4d4;--wp-hintOutline: #acb0d0;--wp-notificationsBackground: #2b3990;--wp-notificationsForeground: #ffffff;--wp-quickInputBackground:#ffffff;--wp-quickInputForeground: #787c99;--wp-terminalAnsiGreen: #73daca;--wp-terminalAnsiRed: #f7768e;--wp-terminalAnsiYellow: #e0af68;--wp-textCodeBlockBackground: #aab0d3;--wp-textSeparatorForeground: #363b54}
2
+ /*# sourceM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MsS0FBSyxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxLQUN4RCxnQ0FBZ0MsS0FBSyxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxLQUNwRCxnQ0FBZ0MsUUFDaEMsc0JBQXNCLFFBQ3RCLGlCQUFpQixTQUFTLEVBQUUsUUFBUSxFQUFFLFlBQVksRUFBRSxXQUNwRCxlQUFlLEtBQ2YsaUJBQWlCLE9BQ2pCLGlCQUFpQixRQUNqQixzQkFBc0IsUUFDdEIsa0JBQWtCLFFBQ2xCLHNCQUFzQixRQUN0QixvQ0FBb0MsUUFDcEMsb0NBQW9DLFFBQ3BDLHlCQUF5QixRQUN6QixpQ0FBaUMsUUFDakMsOEJBQThCLFFBQzlCLHFCQUFxQixRQUNyQixxQkFBcUIsUUFDckIsOEJBQThCLFFBQzlCLDBCQUEwQixRQUMxQiw4QkFBOEIsUUFDOUIsOEJBQThCLFFBQzlCLGtCQUFrQixRQUNsQiw4QkFBOEIsUUFDOUIsOEJBQThCLFFBQzlCLDBCQUEwQixRQUMxQiwyQkFBMkIsUUFDM0Isd0JBQXdCLFFBQ3hCLHNCQUFzQixRQUN0Qix5QkFBeUIsUUFDekIsOEJBQThCLFFBQzlCLDhCQUE4QixPQUNoQyIsCiAgIm5hbWVzIjogW10KfQo= */
@@ -1,2 +1,2 @@
1
- export { FileTranslator } from "./Translator";
1
+ export { toMathInline, defaultToMarkdown } from "./toMarkdownTranslation";
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/translation/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/translation/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC"}