@kerebron/extension-codejar 0.4.5 → 0.4.6

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 (248) hide show
  1. package/esm/{extension-codejar/src/CodeJar.d.ts → CodeJar.d.ts} +1 -1
  2. package/esm/CodeJar.d.ts.map +1 -0
  3. package/esm/{extension-codejar/src/CodeJar.js → CodeJar.js} +1 -1
  4. package/esm/Decorator.d.ts.map +1 -0
  5. package/esm/{extension-codejar/src/ExtensionCodeJar.d.ts → ExtensionCodeJar.d.ts} +1 -1
  6. package/esm/ExtensionCodeJar.d.ts.map +1 -0
  7. package/esm/{extension-codejar/src/ExtensionCodeJar.js → ExtensionCodeJar.js} +2 -2
  8. package/esm/{extension-codejar/src/NodeCodeJar.d.ts → NodeCodeJar.d.ts} +3 -3
  9. package/esm/NodeCodeJar.d.ts.map +1 -0
  10. package/esm/{extension-codejar/src/NodeCodeJar.js → NodeCodeJar.js} +3 -3
  11. package/esm/{extension-codejar/src/TreeSitterHighlighter.d.ts → TreeSitterHighlighter.d.ts} +1 -1
  12. package/esm/TreeSitterHighlighter.d.ts.map +1 -0
  13. package/esm/{extension-codejar/src/TreeSitterHighlighter.js → TreeSitterHighlighter.js} +3 -8
  14. package/esm/{extension-codejar/src/codeJarBlockNodeView.d.ts → codeJarBlockNodeView.d.ts} +1 -1
  15. package/esm/codeJarBlockNodeView.d.ts.map +1 -0
  16. package/esm/{extension-codejar/src/codeJarBlockNodeView.js → codeJarBlockNodeView.js} +2 -2
  17. package/esm/codeJarLineNumbers.d.ts.map +1 -0
  18. package/esm/mod.d.ts +2 -0
  19. package/esm/mod.d.ts.map +1 -0
  20. package/esm/{extension-codejar/src/mod.js → mod.js} +0 -1
  21. package/esm/utils.d.ts.map +1 -0
  22. package/package.json +10 -6
  23. package/esm/_dnt.polyfills.d.ts +0 -101
  24. package/esm/_dnt.polyfills.d.ts.map +0 -1
  25. package/esm/_dnt.polyfills.js +0 -127
  26. package/esm/editor/src/CoreEditor.d.ts +0 -40
  27. package/esm/editor/src/CoreEditor.d.ts.map +0 -1
  28. package/esm/editor/src/CoreEditor.js +0 -252
  29. package/esm/editor/src/DummyEditorView.d.ts +0 -60
  30. package/esm/editor/src/DummyEditorView.d.ts.map +0 -1
  31. package/esm/editor/src/DummyEditorView.js +0 -277
  32. package/esm/editor/src/Extension.d.ts +0 -31
  33. package/esm/editor/src/Extension.d.ts.map +0 -1
  34. package/esm/editor/src/Extension.js +0 -53
  35. package/esm/editor/src/ExtensionManager.d.ts +0 -32
  36. package/esm/editor/src/ExtensionManager.d.ts.map +0 -1
  37. package/esm/editor/src/ExtensionManager.js +0 -260
  38. package/esm/editor/src/Mark.d.ts +0 -23
  39. package/esm/editor/src/Mark.d.ts.map +0 -1
  40. package/esm/editor/src/Mark.js +0 -51
  41. package/esm/editor/src/Node.d.ts +0 -32
  42. package/esm/editor/src/Node.d.ts.map +0 -1
  43. package/esm/editor/src/Node.js +0 -60
  44. package/esm/editor/src/commands/CommandManager.d.ts +0 -23
  45. package/esm/editor/src/commands/CommandManager.d.ts.map +0 -1
  46. package/esm/editor/src/commands/CommandManager.js +0 -118
  47. package/esm/editor/src/commands/baseCommandFactories.d.ts +0 -3
  48. package/esm/editor/src/commands/baseCommandFactories.d.ts.map +0 -1
  49. package/esm/editor/src/commands/baseCommandFactories.js +0 -836
  50. package/esm/editor/src/commands/createChainableState.d.ts +0 -3
  51. package/esm/editor/src/commands/createChainableState.d.ts.map +0 -1
  52. package/esm/editor/src/commands/createChainableState.js +0 -29
  53. package/esm/editor/src/commands/keyCommandFactories.d.ts +0 -3
  54. package/esm/editor/src/commands/keyCommandFactories.d.ts.map +0 -1
  55. package/esm/editor/src/commands/keyCommandFactories.js +0 -10
  56. package/esm/editor/src/commands/mod.d.ts +0 -7
  57. package/esm/editor/src/commands/mod.d.ts.map +0 -1
  58. package/esm/editor/src/commands/mod.js +0 -76
  59. package/esm/editor/src/commands/replaceCommandFactories.d.ts +0 -3
  60. package/esm/editor/src/commands/replaceCommandFactories.d.ts.map +0 -1
  61. package/esm/editor/src/commands/replaceCommandFactories.js +0 -94
  62. package/esm/editor/src/commands/types.d.ts +0 -18
  63. package/esm/editor/src/commands/types.d.ts.map +0 -1
  64. package/esm/editor/src/commands/types.js +0 -1
  65. package/esm/editor/src/mod.d.ts +0 -9
  66. package/esm/editor/src/mod.d.ts.map +0 -1
  67. package/esm/editor/src/mod.js +0 -8
  68. package/esm/editor/src/nodeToTreeString.d.ts +0 -10
  69. package/esm/editor/src/nodeToTreeString.d.ts.map +0 -1
  70. package/esm/editor/src/nodeToTreeString.js +0 -74
  71. package/esm/editor/src/plugins/TrackSelecionPlugin.d.ts +0 -6
  72. package/esm/editor/src/plugins/TrackSelecionPlugin.d.ts.map +0 -1
  73. package/esm/editor/src/plugins/TrackSelecionPlugin.js +0 -24
  74. package/esm/editor/src/plugins/input-rules/InputRulesPlugin.d.ts +0 -23
  75. package/esm/editor/src/plugins/input-rules/InputRulesPlugin.d.ts.map +0 -1
  76. package/esm/editor/src/plugins/input-rules/InputRulesPlugin.js +0 -163
  77. package/esm/editor/src/plugins/input-rules/mod.d.ts +0 -3
  78. package/esm/editor/src/plugins/input-rules/mod.d.ts.map +0 -1
  79. package/esm/editor/src/plugins/input-rules/mod.js +0 -2
  80. package/esm/editor/src/plugins/input-rules/rulebuilders.d.ts +0 -5
  81. package/esm/editor/src/plugins/input-rules/rulebuilders.d.ts.map +0 -1
  82. package/esm/editor/src/plugins/input-rules/rulebuilders.js +0 -50
  83. package/esm/editor/src/plugins/keymap/keymap.d.ts +0 -11
  84. package/esm/editor/src/plugins/keymap/keymap.d.ts.map +0 -1
  85. package/esm/editor/src/plugins/keymap/keymap.js +0 -125
  86. package/esm/editor/src/plugins/keymap/w3c-keyname.d.ts +0 -4
  87. package/esm/editor/src/plugins/keymap/w3c-keyname.d.ts.map +0 -1
  88. package/esm/editor/src/plugins/keymap/w3c-keyname.js +0 -124
  89. package/esm/editor/src/types.d.ts +0 -52
  90. package/esm/editor/src/types.d.ts.map +0 -1
  91. package/esm/editor/src/types.js +0 -1
  92. package/esm/editor/src/ui.d.ts +0 -15
  93. package/esm/editor/src/ui.d.ts.map +0 -1
  94. package/esm/editor/src/ui.js +0 -16
  95. package/esm/editor/src/utilities/SmartOutput.d.ts +0 -41
  96. package/esm/editor/src/utilities/SmartOutput.d.ts.map +0 -1
  97. package/esm/editor/src/utilities/SmartOutput.js +0 -228
  98. package/esm/editor/src/utilities/createNodeFromContent.d.ts +0 -9
  99. package/esm/editor/src/utilities/createNodeFromContent.d.ts.map +0 -1
  100. package/esm/editor/src/utilities/createNodeFromContent.js +0 -32
  101. package/esm/editor/src/utilities/getHtmlAttributes.d.ts +0 -9
  102. package/esm/editor/src/utilities/getHtmlAttributes.d.ts.map +0 -1
  103. package/esm/editor/src/utilities/getHtmlAttributes.js +0 -47
  104. package/esm/editor/src/utilities/getShadowRoot.d.ts +0 -2
  105. package/esm/editor/src/utilities/getShadowRoot.d.ts.map +0 -1
  106. package/esm/editor/src/utilities/getShadowRoot.js +0 -16
  107. package/esm/editor/src/utilities/mod.d.ts +0 -6
  108. package/esm/editor/src/utilities/mod.d.ts.map +0 -1
  109. package/esm/editor/src/utilities/mod.js +0 -5
  110. package/esm/editor/src/utilities/toRawTextResult.d.ts +0 -3
  111. package/esm/editor/src/utilities/toRawTextResult.d.ts.map +0 -1
  112. package/esm/editor/src/utilities/toRawTextResult.js +0 -21
  113. package/esm/extension-autocomplete/src/AutocompletePlugin.d.ts +0 -8
  114. package/esm/extension-autocomplete/src/AutocompletePlugin.d.ts.map +0 -1
  115. package/esm/extension-autocomplete/src/AutocompletePlugin.js +0 -232
  116. package/esm/extension-autocomplete/src/DefaultRenderer.d.ts +0 -17
  117. package/esm/extension-autocomplete/src/DefaultRenderer.d.ts.map +0 -1
  118. package/esm/extension-autocomplete/src/DefaultRenderer.js +0 -137
  119. package/esm/extension-autocomplete/src/ExtensionAutocomplete.d.ts +0 -26
  120. package/esm/extension-autocomplete/src/ExtensionAutocomplete.d.ts.map +0 -1
  121. package/esm/extension-autocomplete/src/ExtensionAutocomplete.js +0 -30
  122. package/esm/extension-autocomplete/src/createDefaultMatcher.d.ts +0 -11
  123. package/esm/extension-autocomplete/src/createDefaultMatcher.d.ts.map +0 -1
  124. package/esm/extension-autocomplete/src/createDefaultMatcher.js +0 -58
  125. package/esm/extension-autocomplete/src/createRegexMatcher.d.ts +0 -4
  126. package/esm/extension-autocomplete/src/createRegexMatcher.d.ts.map +0 -1
  127. package/esm/extension-autocomplete/src/createRegexMatcher.js +0 -50
  128. package/esm/extension-autocomplete/src/mod.d.ts +0 -3
  129. package/esm/extension-autocomplete/src/mod.d.ts.map +0 -1
  130. package/esm/extension-autocomplete/src/mod.js +0 -2
  131. package/esm/extension-autocomplete/src/types.d.ts +0 -60
  132. package/esm/extension-autocomplete/src/types.d.ts.map +0 -1
  133. package/esm/extension-autocomplete/src/types.js +0 -1
  134. package/esm/extension-basic-editor/src/ExtensionHtml.d.ts +0 -15
  135. package/esm/extension-basic-editor/src/ExtensionHtml.d.ts.map +0 -1
  136. package/esm/extension-basic-editor/src/ExtensionHtml.js +0 -108
  137. package/esm/extension-basic-editor/src/NodeCodeBlock.d.ts +0 -9
  138. package/esm/extension-basic-editor/src/NodeCodeBlock.d.ts.map +0 -1
  139. package/esm/extension-basic-editor/src/NodeCodeBlock.js +0 -58
  140. package/esm/extension-codejar/src/CodeJar.d.ts.map +0 -1
  141. package/esm/extension-codejar/src/Decorator.d.ts.map +0 -1
  142. package/esm/extension-codejar/src/ExtensionCodeJar.d.ts.map +0 -1
  143. package/esm/extension-codejar/src/NodeCodeJar.d.ts.map +0 -1
  144. package/esm/extension-codejar/src/TreeSitterHighlighter.d.ts.map +0 -1
  145. package/esm/extension-codejar/src/codeJarBlockNodeView.d.ts.map +0 -1
  146. package/esm/extension-codejar/src/codeJarLineNumbers.d.ts.map +0 -1
  147. package/esm/extension-codejar/src/mod.d.ts +0 -3
  148. package/esm/extension-codejar/src/mod.d.ts.map +0 -1
  149. package/esm/extension-codejar/src/utils.d.ts.map +0 -1
  150. package/esm/extension-lsp/src/DiagnosticPlugin.d.ts +0 -32
  151. package/esm/extension-lsp/src/DiagnosticPlugin.d.ts.map +0 -1
  152. package/esm/extension-lsp/src/DiagnosticPlugin.js +0 -131
  153. package/esm/extension-lsp/src/ExtensionLsp.d.ts +0 -25
  154. package/esm/extension-lsp/src/ExtensionLsp.d.ts.map +0 -1
  155. package/esm/extension-lsp/src/ExtensionLsp.js +0 -126
  156. package/esm/extension-lsp/src/LSPClient.d.ts +0 -56
  157. package/esm/extension-lsp/src/LSPClient.d.ts.map +0 -1
  158. package/esm/extension-lsp/src/LSPClient.js +0 -449
  159. package/esm/extension-lsp/src/computeIncrementalChanges.d.ts +0 -8
  160. package/esm/extension-lsp/src/computeIncrementalChanges.d.ts.map +0 -1
  161. package/esm/extension-lsp/src/computeIncrementalChanges.js +0 -82
  162. package/esm/extension-lsp/src/createLspAutocomplete.d.ts +0 -23
  163. package/esm/extension-lsp/src/createLspAutocomplete.d.ts.map +0 -1
  164. package/esm/extension-lsp/src/createLspAutocomplete.js +0 -68
  165. package/esm/extension-lsp/src/mod.d.ts +0 -4
  166. package/esm/extension-lsp/src/mod.d.ts.map +0 -1
  167. package/esm/extension-lsp/src/mod.js +0 -3
  168. package/esm/extension-lsp/src/workspace.d.ts +0 -62
  169. package/esm/extension-lsp/src/workspace.d.ts.map +0 -1
  170. package/esm/extension-lsp/src/workspace.js +0 -168
  171. package/esm/extension-markdown/src/DocumentMarkdownInlineTokenizer.d.ts +0 -36
  172. package/esm/extension-markdown/src/DocumentMarkdownInlineTokenizer.d.ts.map +0 -1
  173. package/esm/extension-markdown/src/DocumentMarkdownInlineTokenizer.js +0 -240
  174. package/esm/extension-markdown/src/DocumentMarkdownTokenizer.d.ts +0 -26
  175. package/esm/extension-markdown/src/DocumentMarkdownTokenizer.d.ts.map +0 -1
  176. package/esm/extension-markdown/src/DocumentMarkdownTokenizer.js +0 -115
  177. package/esm/extension-markdown/src/ExtensionMarkdown.d.ts +0 -22
  178. package/esm/extension-markdown/src/ExtensionMarkdown.d.ts.map +0 -1
  179. package/esm/extension-markdown/src/ExtensionMarkdown.js +0 -48
  180. package/esm/extension-markdown/src/MarkdownParser.d.ts +0 -61
  181. package/esm/extension-markdown/src/MarkdownParser.d.ts.map +0 -1
  182. package/esm/extension-markdown/src/MarkdownParser.js +0 -249
  183. package/esm/extension-markdown/src/MarkdownSerializer.d.ts +0 -42
  184. package/esm/extension-markdown/src/MarkdownSerializer.d.ts.map +0 -1
  185. package/esm/extension-markdown/src/MarkdownSerializer.js +0 -325
  186. package/esm/extension-markdown/src/PositionMapper.d.ts +0 -15
  187. package/esm/extension-markdown/src/PositionMapper.d.ts.map +0 -1
  188. package/esm/extension-markdown/src/PositionMapper.js +0 -100
  189. package/esm/extension-markdown/src/TokenSource.d.ts +0 -11
  190. package/esm/extension-markdown/src/TokenSource.d.ts.map +0 -1
  191. package/esm/extension-markdown/src/TokenSource.js +0 -39
  192. package/esm/extension-markdown/src/mdToPmConverter.d.ts +0 -5
  193. package/esm/extension-markdown/src/mdToPmConverter.d.ts.map +0 -1
  194. package/esm/extension-markdown/src/mdToPmConverter.js +0 -111
  195. package/esm/extension-markdown/src/pmToMdConverter.d.ts +0 -16
  196. package/esm/extension-markdown/src/pmToMdConverter.d.ts.map +0 -1
  197. package/esm/extension-markdown/src/pmToMdConverter.js +0 -433
  198. package/esm/extension-markdown/src/token_handlers/basic_token_handlers.d.ts +0 -4
  199. package/esm/extension-markdown/src/token_handlers/basic_token_handlers.d.ts.map +0 -1
  200. package/esm/extension-markdown/src/token_handlers/basic_token_handlers.js +0 -151
  201. package/esm/extension-markdown/src/token_handlers/footnote_token_handlers.d.ts +0 -3
  202. package/esm/extension-markdown/src/token_handlers/footnote_token_handlers.d.ts.map +0 -1
  203. package/esm/extension-markdown/src/token_handlers/footnote_token_handlers.js +0 -34
  204. package/esm/extension-markdown/src/token_handlers/inline_token_handlers.d.ts +0 -6
  205. package/esm/extension-markdown/src/token_handlers/inline_token_handlers.d.ts.map +0 -1
  206. package/esm/extension-markdown/src/token_handlers/inline_token_handlers.js +0 -380
  207. package/esm/extension-markdown/src/token_handlers/lists_token_handlers.d.ts +0 -3
  208. package/esm/extension-markdown/src/token_handlers/lists_token_handlers.d.ts.map +0 -1
  209. package/esm/extension-markdown/src/token_handlers/lists_token_handlers.js +0 -323
  210. package/esm/extension-markdown/src/token_handlers/table_token_handlers.d.ts +0 -9
  211. package/esm/extension-markdown/src/token_handlers/table_token_handlers.d.ts.map +0 -1
  212. package/esm/extension-markdown/src/token_handlers/table_token_handlers.js +0 -308
  213. package/esm/extension-markdown/src/treeSitterTokenizer.d.ts +0 -5
  214. package/esm/extension-markdown/src/treeSitterTokenizer.d.ts.map +0 -1
  215. package/esm/extension-markdown/src/treeSitterTokenizer.js +0 -769
  216. package/esm/extension-markdown/src/types.d.ts +0 -28
  217. package/esm/extension-markdown/src/types.d.ts.map +0 -1
  218. package/esm/extension-markdown/src/types.js +0 -131
  219. package/esm/extension-markdown/src/utils.d.ts +0 -8
  220. package/esm/extension-markdown/src/utils.d.ts.map +0 -1
  221. package/esm/extension-markdown/src/utils.js +0 -86
  222. package/esm/tree-sitter-shim/src/main.d.ts +0 -15
  223. package/esm/tree-sitter-shim/src/main.d.ts.map +0 -1
  224. package/esm/tree-sitter-shim/src/main.js +0 -25
  225. package/esm/tree-sitter-shim/src/tree_sitter/language.d.ts +0 -7
  226. package/esm/tree-sitter-shim/src/tree_sitter/language.d.ts.map +0 -1
  227. package/esm/tree-sitter-shim/src/tree_sitter/language.js +0 -5
  228. package/esm/tree-sitter-shim/src/tree_sitter/node.d.ts +0 -6
  229. package/esm/tree-sitter-shim/src/tree_sitter/node.d.ts.map +0 -1
  230. package/esm/tree-sitter-shim/src/tree_sitter/node.js +0 -1
  231. package/esm/tree-sitter-shim/src/tree_sitter/parser.d.ts +0 -7
  232. package/esm/tree-sitter-shim/src/tree_sitter/parser.d.ts.map +0 -1
  233. package/esm/tree-sitter-shim/src/tree_sitter/parser.js +0 -5
  234. package/esm/tree-sitter-shim/src/tree_sitter/tree.d.ts +0 -6
  235. package/esm/tree-sitter-shim/src/tree_sitter/tree.d.ts.map +0 -1
  236. package/esm/tree-sitter-shim/src/tree_sitter/tree.js +0 -1
  237. package/esm/wasm/src/mod.d.ts +0 -12
  238. package/esm/wasm/src/mod.d.ts.map +0 -1
  239. package/esm/wasm/src/mod.js +0 -48
  240. package/esm/wasm/wasm.d.ts +0 -138
  241. package/esm/wasm/wasm.d.ts.map +0 -1
  242. package/esm/wasm/wasm.js +0 -120
  243. /package/esm/{extension-codejar/src/Decorator.d.ts → Decorator.d.ts} +0 -0
  244. /package/esm/{extension-codejar/src/Decorator.js → Decorator.js} +0 -0
  245. /package/esm/{extension-codejar/src/codeJarLineNumbers.d.ts → codeJarLineNumbers.d.ts} +0 -0
  246. /package/esm/{extension-codejar/src/codeJarLineNumbers.js → codeJarLineNumbers.js} +0 -0
  247. /package/esm/{extension-codejar/src/utils.d.ts → utils.d.ts} +0 -0
  248. /package/esm/{extension-codejar/src/utils.js → utils.js} +0 -0
@@ -1,50 +0,0 @@
1
- import { canJoin, findWrapping } from 'prosemirror-transform';
2
- import { InputRule } from './InputRulesPlugin.js';
3
- /// Build an input rule for automatically wrapping a textblock when a
4
- /// given string is typed. The `regexp` argument is
5
- /// directly passed through to the `InputRule` constructor. You'll
6
- /// probably want the regexp to start with `^`, so that the pattern can
7
- /// only occur at the start of a textblock.
8
- ///
9
- /// `nodeType` is the type of node to wrap in. If it needs attributes,
10
- /// you can either pass them directly, or pass a function that will
11
- /// compute them from the regular expression match.
12
- ///
13
- /// By default, if there's a node with the same type above the newly
14
- /// wrapped node, the rule will try to [join](#transform.Transform.join) those
15
- /// two nodes. You can pass a join predicate, which takes a regular
16
- /// expression match and the node before the wrapped node, and can
17
- /// return a boolean to indicate whether a join should happen.
18
- export function wrappingInputRule(regexp, nodeType, getAttrs = null, joinPredicate) {
19
- return new InputRule(regexp, (state, match, start, end) => {
20
- let attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs;
21
- let tr = state.tr.delete(start, end);
22
- let $start = tr.doc.resolve(start), range = $start.blockRange(), wrapping = range && findWrapping(range, nodeType, attrs);
23
- if (!wrapping)
24
- return null;
25
- tr.wrap(range, wrapping);
26
- let before = tr.doc.resolve(start - 1).nodeBefore;
27
- if (before && before.type == nodeType && canJoin(tr.doc, start - 1) &&
28
- (!joinPredicate || joinPredicate(match, before))) {
29
- tr.join(start - 1);
30
- }
31
- return tr;
32
- });
33
- }
34
- /// Build an input rule that changes the type of a textblock when the
35
- /// matched text is typed into it. You'll usually want to start your
36
- /// regexp with `^` to that it is only matched at the start of a
37
- /// textblock. The optional `getAttrs` parameter can be used to compute
38
- /// the new node's attributes, and works the same as in the
39
- /// `wrappingInputRule` function.
40
- export function textblockTypeInputRule(regexp, nodeType, getAttrs = null) {
41
- return new InputRule(regexp, (state, match, start, end) => {
42
- let $start = state.doc.resolve(start);
43
- let attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs;
44
- if (!$start.node(-1).canReplaceWith($start.index(-1), $start.indexAfter(-1), nodeType))
45
- return null;
46
- return state.tr
47
- .delete(start, end)
48
- .setBlockType(start, start, nodeType, attrs);
49
- });
50
- }
@@ -1,11 +0,0 @@
1
- import { Command, Plugin } from 'prosemirror-state';
2
- import { EditorView } from 'prosemirror-view';
3
- export declare class KeymapPlugin extends Plugin {
4
- constructor(bindings: {
5
- [key: string]: Command;
6
- });
7
- }
8
- export declare function keydownHandler(bindings: {
9
- [key: string]: Command;
10
- }): (view: EditorView, event: KeyboardEvent) => boolean;
11
- //# sourceMappingURL=keymap.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"keymap.d.ts","sourceRoot":"","sources":["../../../../../src/editor/src/plugins/keymap/keymap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAyE9C,qBAAa,YAAa,SAAQ,MAAM;gBAC1B,QAAQ,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE;CAGjD;AAKD,wBAAgB,cAAc,CAC5B,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GACnC,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,KAAK,OAAO,CA6BrD"}
@@ -1,125 +0,0 @@
1
- import { Plugin } from 'prosemirror-state';
2
- import { base, keyName } from './w3c-keyname.js';
3
- const mac = typeof navigator != 'undefined' &&
4
- /Mac|iP(hone|[oa]d)/.test(navigator?.platform);
5
- const windows = typeof navigator != 'undefined' &&
6
- /Win/.test(navigator?.platform);
7
- function normalizeKeyName(name) {
8
- let parts = name.split(/-(?!$)/), result = parts[parts.length - 1];
9
- if (result == 'Space')
10
- result = ' ';
11
- let alt, ctrl, shift, meta;
12
- for (let i = 0; i < parts.length - 1; i++) {
13
- let mod = parts[i];
14
- if (/^(cmd|meta|m)$/i.test(mod))
15
- meta = true;
16
- else if (/^a(lt)?$/i.test(mod))
17
- alt = true;
18
- else if (/^(c|ctrl|control)$/i.test(mod))
19
- ctrl = true;
20
- else if (/^s(hift)?$/i.test(mod))
21
- shift = true;
22
- else if (/^mod$/i.test(mod)) {
23
- if (mac)
24
- meta = true;
25
- else
26
- ctrl = true;
27
- }
28
- else
29
- throw new Error('Unrecognized modifier name: ' + mod);
30
- }
31
- if (alt)
32
- result = 'Alt-' + result;
33
- if (ctrl)
34
- result = 'Ctrl-' + result;
35
- if (meta)
36
- result = 'Meta-' + result;
37
- if (shift)
38
- result = 'Shift-' + result;
39
- return result;
40
- }
41
- function normalize(map) {
42
- let copy = Object.create(null);
43
- for (let prop in map)
44
- copy[normalizeKeyName(prop)] = map[prop];
45
- return copy;
46
- }
47
- function modifiers(name, event, shift = true) {
48
- if (event.altKey)
49
- name = 'Alt-' + name;
50
- if (event.ctrlKey)
51
- name = 'Ctrl-' + name;
52
- if (event.metaKey)
53
- name = 'Meta-' + name;
54
- if (shift && event.shiftKey)
55
- name = 'Shift-' + name;
56
- return name;
57
- }
58
- /// Create a keymap plugin for the given set of bindings.
59
- ///
60
- /// Bindings should map key names to [command](#commands)-style
61
- /// functions, which will be called with `(EditorState, dispatch,
62
- /// EditorView)` arguments, and should return true when they've handled
63
- /// the key. Note that the view argument isn't part of the command
64
- /// protocol, but can be used as an escape hatch if a binding needs to
65
- /// directly interact with the UI.
66
- ///
67
- /// Key names may be strings like `"Shift-Ctrl-Enter"`—a key
68
- /// identifier prefixed with zero or more modifiers. Key identifiers
69
- /// are based on the strings that can appear in
70
- /// [`KeyEvent.key`](https:///developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key).
71
- /// Use lowercase letters to refer to letter keys (or uppercase letters
72
- /// if you want shift to be held). You may use `"Space"` as an alias
73
- /// for the `" "` name.
74
- ///
75
- /// Modifiers can be given in any order. `Shift-` (or `s-`), `Alt-` (or
76
- /// `a-`), `Ctrl-` (or `c-` or `Control-`) and `Cmd-` (or `m-` or
77
- /// `Meta-`) are recognized. For characters that are created by holding
78
- /// shift, the `Shift-` prefix is implied, and should not be added
79
- /// explicitly.
80
- ///
81
- /// You can use `Mod-` as a shorthand for `Cmd-` on Mac and `Ctrl-` on
82
- /// other platforms.
83
- ///
84
- /// You can add multiple keymap plugins to an editor. The order in
85
- /// which they appear determines their precedence (the ones early in
86
- /// the array get to dispatch first).
87
- export class KeymapPlugin extends Plugin {
88
- constructor(bindings) {
89
- super({ props: { handleKeyDown: keydownHandler(bindings) } });
90
- }
91
- }
92
- /// Given a set of bindings (using the same format as
93
- /// [`keymap`](#keymap.keymap)), return a [keydown
94
- /// handler](#view.EditorProps.handleKeyDown) that handles them.
95
- export function keydownHandler(bindings) {
96
- let map = normalize(bindings);
97
- return function (view, event) {
98
- let name = keyName(event), baseName, direct = map[modifiers(name, event)];
99
- if (direct && direct(view.state, view.dispatch, view))
100
- return true;
101
- // A character key
102
- if (name.length == 1 && name != ' ') {
103
- if (event.shiftKey) {
104
- // In case the name was already modified by shift, try looking
105
- // it up without its shift modifier
106
- let noShift = map[modifiers(name, event, false)];
107
- if (noShift && noShift(view.state, view.dispatch, view))
108
- return true;
109
- }
110
- if ((event.altKey || event.metaKey || event.ctrlKey) &&
111
- // Ctrl-Alt may be used for AltGr on Windows
112
- !(windows && event.ctrlKey && event.altKey) &&
113
- (baseName = base[event.keyCode]) && baseName != name) {
114
- // Try falling back to the keyCode when there's a modifier
115
- // active or the character produced isn't ASCII, and our table
116
- // produces a different name from the the keyCode. See #668,
117
- // #1060, #1529.
118
- let fromCode = map[modifiers(baseName, event)];
119
- if (fromCode && fromCode(view.state, view.dispatch, view))
120
- return true;
121
- }
122
- }
123
- return false;
124
- };
125
- }
@@ -1,4 +0,0 @@
1
- export declare const base: Record<number, string>;
2
- export declare const shift: Record<number, string>;
3
- export declare function keyName(event: KeyboardEvent): string;
4
- //# sourceMappingURL=w3c-keyname.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"w3c-keyname.d.ts","sourceRoot":"","sources":["../../../../../src/editor/src/plugins/keymap/w3c-keyname.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAqDvC,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAyBxC,CAAC;AAuBF,wBAAgB,OAAO,CAAC,KAAK,EAAE,aAAa,UAmB3C"}
@@ -1,124 +0,0 @@
1
- export const base = {
2
- 8: 'Backspace',
3
- 9: 'Tab',
4
- 10: 'Enter',
5
- 12: 'NumLock',
6
- 13: 'Enter',
7
- 16: 'Shift',
8
- 17: 'Control',
9
- 18: 'Alt',
10
- 20: 'CapsLock',
11
- 27: 'Escape',
12
- 32: ' ',
13
- 33: 'PageUp',
14
- 34: 'PageDown',
15
- 35: 'End',
16
- 36: 'Home',
17
- 37: 'ArrowLeft',
18
- 38: 'ArrowUp',
19
- 39: 'ArrowRight',
20
- 40: 'ArrowDown',
21
- 44: 'PrintScreen',
22
- 45: 'Insert',
23
- 46: 'Delete',
24
- 59: ';',
25
- 61: '=',
26
- 91: 'Meta',
27
- 92: 'Meta',
28
- 106: '*',
29
- 107: '+',
30
- 108: ',',
31
- 109: '-',
32
- 110: '.',
33
- 111: '/',
34
- 144: 'NumLock',
35
- 145: 'ScrollLock',
36
- 160: 'Shift',
37
- 161: 'Shift',
38
- 162: 'Control',
39
- 163: 'Control',
40
- 164: 'Alt',
41
- 165: 'Alt',
42
- 173: '-',
43
- 186: ';',
44
- 187: '=',
45
- 188: ',',
46
- 189: '-',
47
- 190: '.',
48
- 191: '/',
49
- 192: '`',
50
- 219: '[',
51
- 220: '\\',
52
- 221: ']',
53
- 222: "'",
54
- };
55
- export const shift = {
56
- 48: ')',
57
- 49: '!',
58
- 50: '@',
59
- 51: '#',
60
- 52: '$',
61
- 53: '%',
62
- 54: '^',
63
- 55: '&',
64
- 56: '*',
65
- 57: '(',
66
- 59: ':',
67
- 61: '+',
68
- 173: '_',
69
- 186: ':',
70
- 187: '+',
71
- 188: '<',
72
- 189: '_',
73
- 190: '>',
74
- 191: '?',
75
- 192: '~',
76
- 219: '{',
77
- 220: '|',
78
- 221: '}',
79
- 222: '"',
80
- };
81
- const mac = typeof navigator != 'undefined' && /Mac/.test(navigator.platform);
82
- const ie = typeof navigator != 'undefined' &&
83
- /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
84
- // Fill in the digit keys
85
- for (let i = 0; i < 10; i++)
86
- base[48 + i] = base[96 + i] = String(i);
87
- // The function keys
88
- for (let i = 1; i <= 24; i++)
89
- base[i + 111] = 'F' + i;
90
- // And the alphabetic keys
91
- for (let i = 65; i <= 90; i++) {
92
- base[i] = String.fromCharCode(i + 32);
93
- shift[i] = String.fromCharCode(i);
94
- }
95
- // For each code that doesn't have a shift-equivalent, copy the base name
96
- for (const code in base) {
97
- if (!shift.hasOwnProperty(code))
98
- shift[code] = base[code];
99
- }
100
- export function keyName(event) {
101
- // On macOS, keys held with Shift and Cmd don't reflect the effect of Shift in `.key`.
102
- // On IE, shift effect is never included in `.key`.
103
- const ignoreKey = mac && event.metaKey && event.shiftKey && !event.ctrlKey && !event.altKey ||
104
- ie && event.shiftKey && event.key && event.key.length == 1 ||
105
- event.key == 'Unidentified';
106
- let name = (!ignoreKey && event.key) ||
107
- (event.shiftKey ? shift : base)[event.keyCode] ||
108
- event.key || 'Unidentified';
109
- // Edge sometimes produces wrong names (Issue #3)
110
- if (name == 'Esc')
111
- name = 'Escape';
112
- if (name == 'Del')
113
- name = 'Delete';
114
- // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8860571/
115
- if (name == 'Left')
116
- name = 'ArrowLeft';
117
- if (name == 'Up')
118
- name = 'ArrowUp';
119
- if (name == 'Right')
120
- name = 'ArrowRight';
121
- if (name == 'Down')
122
- name = 'ArrowDown';
123
- return name;
124
- }
@@ -1,52 +0,0 @@
1
- import type { Node as ProseMirrorNode, ParseOptions } from 'prosemirror-model';
2
- import type { Extension } from './Extension.js';
3
- import type { Mark } from './Mark.js';
4
- import type { Node } from './Node.js';
5
- export type AnyExtension = Extension | Node | Mark;
6
- export type AnyExtensionOrReq = AnyExtension | {
7
- requires: Array<AnyExtensionOrReq | string>;
8
- };
9
- export type Content = JSONContent | JSONContent[] | null;
10
- export interface EditorConfig {
11
- element: HTMLElement;
12
- content: Content;
13
- parseOptions: ParseOptions;
14
- extensions: AnyExtensionOrReq[];
15
- cdnUrl?: string;
16
- uri?: string;
17
- languageID?: string;
18
- topNode?: string;
19
- }
20
- export type JSONContent = {
21
- type?: string;
22
- attrs?: Record<string, any>;
23
- content?: JSONContent[];
24
- marks?: {
25
- type: string;
26
- attrs?: Record<string, any>;
27
- [key: string]: any;
28
- }[];
29
- text?: string;
30
- [key: string]: any;
31
- };
32
- export type Attribute<T> = {
33
- fromDom?: (element: HTMLElement) => T;
34
- default: T;
35
- toDom?: (node: ProseMirrorNode) => T;
36
- };
37
- export interface TextRange {
38
- from: number;
39
- to: number;
40
- }
41
- export interface RawTextMapEntry {
42
- nodeIdx: number;
43
- targetRow: number;
44
- targetCol: number;
45
- sourceCol?: number;
46
- targetPos: number;
47
- }
48
- export interface RawTextResult {
49
- content: string;
50
- rawTextMap: Array<RawTextMapEntry>;
51
- }
52
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/editor/src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;AACnD,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C,QAAQ,EAAE,KAAK,CAAC,iBAAiB,GAAG,MAAM,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG,WAAW,EAAE,GAAG,IAAI,CAAC;AAEzD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,EAAE,CAAC;IACJ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;IACzB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,CAAC,CAAC;IACtC,OAAO,EAAE,CAAC,CAAC;IACX,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,CAAC,CAAC;CACtC,CAAC;AAEF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CACpC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,15 +0,0 @@
1
- import type { CoreEditor } from './CoreEditor.js';
2
- interface SelectParams {
3
- anchor: number;
4
- scrollIntoView: boolean;
5
- userEvent: string;
6
- }
7
- export interface EditorUi {
8
- showMessage(msg: string): void;
9
- showError(err: Error): void;
10
- focus(): void;
11
- select(params: SelectParams): void;
12
- }
13
- export declare function defaultUi(editor: CoreEditor): EditorUi;
14
- export {};
15
- //# sourceMappingURL=ui.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/editor/src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,QAAQ;IACvB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,CAAC;IAC5B,KAAK,IAAI,IAAI,CAAC;IACd,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;CACpC;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,QAAQ,CAmBtD"}
@@ -1,16 +0,0 @@
1
- export function defaultUi(editor) {
2
- return {
3
- showMessage(msg) {
4
- globalThis.alert(msg);
5
- },
6
- showError(err) {
7
- globalThis.alert(err.message);
8
- console.error(err);
9
- },
10
- focus() {
11
- // editor.run.focus();
12
- },
13
- select({ anchor: number, scrollIntoView: boolean, userEvent: string, }) {
14
- },
15
- };
16
- }
@@ -1,41 +0,0 @@
1
- export interface OutputMeta<K> {
2
- pos: number;
3
- rowPos: number;
4
- colPos: number;
5
- item?: K;
6
- }
7
- interface Mapping {
8
- sourceNo: number;
9
- sourceRowPos: number;
10
- sourceColPos: number;
11
- }
12
- export interface SourceMap {
13
- 'version': 3;
14
- 'file': string;
15
- 'sourceRoot': string;
16
- 'sources': Array<string>;
17
- 'sourcesContent': Array<string>;
18
- 'names': Array<string>;
19
- 'mappings': string;
20
- }
21
- export declare class SmartOutput<K> {
22
- private _rowPos;
23
- private _colPos;
24
- private _pos;
25
- private chunks;
26
- private metas;
27
- log(text: string, item?: K): void;
28
- getMetas(): OutputMeta<K>[];
29
- get chunkPos(): number;
30
- rollback(pos: number): void;
31
- get rowPos(): number;
32
- get colPos(): number;
33
- get pos(): number;
34
- endsWith(text: string): boolean;
35
- toString(): string;
36
- getSourceMap(mapper: (rowPos: number, colPos: number, pos: number, item?: K) => Mapping | void): SourceMap;
37
- }
38
- export declare function decode(string: string): number[];
39
- export declare function encode(value: number | number[]): string;
40
- export {};
41
- //# sourceMappingURL=SmartOutput.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SmartOutput.d.ts","sourceRoot":"","sources":["../../../../src/editor/src/utilities/SmartOutput.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,CAAC,CAAC;CACV;AAED,UAAU,OAAO;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,CAAC,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,WAAW,CAAC,CAAC;IACxB,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,IAAI,CAAK;IAEjB,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,KAAK,CAA4B;IAEzC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;IAyB1B,QAAQ;IAIR,IAAI,QAAQ,WAEX;IAED,QAAQ,CAAC,GAAG,EAAE,MAAM;IAKpB,IAAI,MAAM,WAET;IAED,IAAI,MAAM,WAET;IAED,IAAI,GAAG,WAEN;IAED,QAAQ,CAAC,IAAI,EAAE,MAAM;IAIrB,QAAQ;IAIR,YAAY,CACV,MAAM,EAAE,CACN,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,CAAC,KACL,OAAO,GAAG,IAAI,GAClB,SAAS;CA4Db;AAuDD,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,YAoCpC;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,UAW9C"}