@threadlabs/looma 0.18.6 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +34 -3
  2. package/components/ui-editor-table-overlay/ui-editor-table-overlay.js +55 -0
  3. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +7 -2
  4. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.js +29 -0
  5. package/components/ui-tree-item/ui-tree-item.html +5 -5
  6. package/components/ui-tree-item/ui-tree-item.js +20 -3
  7. package/dist/index.js +1 -1
  8. package/editor/chunks/extensions.js +24 -3
  9. package/editor/extensions/preset.d.ts +2 -0
  10. package/editor/extensions/table-commands.d.ts +1 -1
  11. package/editor/table-overlay.d.ts +8 -3
  12. package/package.json +2 -1
  13. package/styles/ui-editor-table-overlay.css +30 -0
  14. package/styles/ui-editor-table-toolbar.css +7 -2
  15. package/styles/ui-tree-item.css +5 -5
  16. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  17. package/vanilla/UiEditorTableOverlay.js +9 -3
  18. package/vue/UiEditorTableOverlay.d.ts +8 -0
  19. package/vue/UiEditorTableOverlay.vue +45 -2
  20. package/vue/UiEditorTableToolbar.vue +7 -2
  21. package/vue/UiTreeItem.vue +5 -5
  22. package/vue/chunks/1c.js +106 -0
  23. package/vue/chunks/UiEditorTableOverlay.js +14 -4
  24. package/vue/chunks/UiEditorTableToolbar.js +1 -1
  25. package/vue/chunks/UiTreeItem.js +1 -1
  26. package/vue/chunks/abnf.js +61 -0
  27. package/vue/chunks/accesslog.js +72 -0
  28. package/vue/chunks/actionscript.js +139 -0
  29. package/vue/chunks/ada.js +183 -0
  30. package/vue/chunks/angelscript.js +141 -0
  31. package/vue/chunks/apache.js +88 -0
  32. package/vue/chunks/applescript.js +99 -0
  33. package/vue/chunks/arcade.js +405 -0
  34. package/vue/chunks/arduino.js +871 -0
  35. package/vue/chunks/armasm.js +65 -0
  36. package/vue/chunks/asciidoc.js +181 -0
  37. package/vue/chunks/aspectj.js +202 -0
  38. package/vue/chunks/autohotkey.js +54 -0
  39. package/vue/chunks/autoit.js +132 -0
  40. package/vue/chunks/avrasm.js +46 -0
  41. package/vue/chunks/awk.js +58 -0
  42. package/vue/chunks/axapta.js +167 -0
  43. package/vue/chunks/bash.js +358 -0
  44. package/vue/chunks/basic.js +221 -0
  45. package/vue/chunks/bnf.js +27 -0
  46. package/vue/chunks/brainfuck.js +40 -0
  47. package/vue/chunks/c.js +265 -0
  48. package/vue/chunks/cal.js +136 -0
  49. package/vue/chunks/capnproto.js +86 -0
  50. package/vue/chunks/ceylon.js +125 -0
  51. package/vue/chunks/clean.js +54 -0
  52. package/vue/chunks/clojure-repl.js +17 -0
  53. package/vue/chunks/clojure.js +133 -0
  54. package/vue/chunks/cmake.js +23 -0
  55. package/vue/chunks/coffeescript.js +291 -0
  56. package/vue/chunks/coq.js +436 -0
  57. package/vue/chunks/cos.js +77 -0
  58. package/vue/chunks/cpp.js +492 -0
  59. package/vue/chunks/crmsh.js +80 -0
  60. package/vue/chunks/crystal.js +260 -0
  61. package/vue/chunks/csharp.js +376 -0
  62. package/vue/chunks/csp.js +52 -0
  63. package/vue/chunks/css.js +890 -0
  64. package/vue/chunks/d.js +184 -0
  65. package/vue/chunks/dart.js +226 -0
  66. package/vue/chunks/delphi.js +227 -0
  67. package/vue/chunks/diff.js +40 -0
  68. package/vue/chunks/django.js +43 -0
  69. package/vue/chunks/dns.js +66 -0
  70. package/vue/chunks/dockerfile.js +35 -0
  71. package/vue/chunks/dos.js +147 -0
  72. package/vue/chunks/dsconfig.js +55 -0
  73. package/vue/chunks/dts.js +119 -0
  74. package/vue/chunks/dust.js +33 -0
  75. package/vue/chunks/ebnf.js +40 -0
  76. package/vue/chunks/elixir.js +241 -0
  77. package/vue/chunks/elm.js +103 -0
  78. package/vue/chunks/erb.js +17 -0
  79. package/vue/chunks/erlang-repl.js +41 -0
  80. package/vue/chunks/erlang.js +236 -0
  81. package/vue/chunks/excel.js +562 -0
  82. package/vue/chunks/fix.js +30 -0
  83. package/vue/chunks/flix.js +60 -0
  84. package/vue/chunks/fortran.js +543 -0
  85. package/vue/chunks/fsharp.js +440 -0
  86. package/vue/chunks/gams.js +134 -0
  87. package/vue/chunks/gauss.js +167 -0
  88. package/vue/chunks/gcode.js +131 -0
  89. package/vue/chunks/gherkin.js +41 -0
  90. package/vue/chunks/glsl.js +25 -0
  91. package/vue/chunks/gml.js +3119 -0
  92. package/vue/chunks/go.js +140 -0
  93. package/vue/chunks/golo.js +72 -0
  94. package/vue/chunks/gradle.js +181 -0
  95. package/vue/chunks/graphql.js +68 -0
  96. package/vue/chunks/groovy.js +159 -0
  97. package/vue/chunks/haml.js +96 -0
  98. package/vue/chunks/handlebars.js +191 -0
  99. package/vue/chunks/haskell.js +149 -0
  100. package/vue/chunks/haxe.js +142 -0
  101. package/vue/chunks/hsp.js +45 -0
  102. package/vue/chunks/http.js +77 -0
  103. package/vue/chunks/hy.js +92 -0
  104. package/vue/chunks/inform7.js +45 -0
  105. package/vue/chunks/ini.js +94 -0
  106. package/vue/chunks/irpf90.js +52 -0
  107. package/vue/chunks/isbl.js +112 -0
  108. package/vue/chunks/java.js +237 -0
  109. package/vue/chunks/javascript.js +570 -0
  110. package/vue/chunks/jboss-cli.js +46 -0
  111. package/vue/chunks/json.js +45 -0
  112. package/vue/chunks/julia-repl.js +18 -0
  113. package/vue/chunks/julia.js +353 -0
  114. package/vue/chunks/kotlin.js +216 -0
  115. package/vue/chunks/lasso.js +127 -0
  116. package/vue/chunks/latex.js +206 -0
  117. package/vue/chunks/ldif.js +25 -0
  118. package/vue/chunks/leaf.js +72 -0
  119. package/vue/chunks/less.js +953 -0
  120. package/vue/chunks/lisp.js +119 -0
  121. package/vue/chunks/livecodeserver.js +86 -0
  122. package/vue/chunks/livescript.js +309 -0
  123. package/vue/chunks/llvm.js +77 -0
  124. package/vue/chunks/lsl.js +55 -0
  125. package/vue/chunks/lua.js +49 -0
  126. package/vue/chunks/makefile.js +62 -0
  127. package/vue/chunks/markdown.js +194 -0
  128. package/vue/chunks/mathematica.js +7317 -0
  129. package/vue/chunks/matlab.js +70 -0
  130. package/vue/chunks/maxima.js +38 -0
  131. package/vue/chunks/mel.js +24 -0
  132. package/vue/chunks/mercury.js +62 -0
  133. package/vue/chunks/mipsasm.js +53 -0
  134. package/vue/chunks/mizar.js +10 -0
  135. package/vue/chunks/mojolicious.js +27 -0
  136. package/vue/chunks/monkey.js +158 -0
  137. package/vue/chunks/moonscript.js +102 -0
  138. package/vue/chunks/n1ql.js +346 -0
  139. package/vue/chunks/nestedtext.js +66 -0
  140. package/vue/chunks/nginx.js +127 -0
  141. package/vue/chunks/nim.js +174 -0
  142. package/vue/chunks/nix.js +334 -0
  143. package/vue/chunks/node-repl.js +20 -0
  144. package/vue/chunks/nsis.js +515 -0
  145. package/vue/chunks/objectivec.js +235 -0
  146. package/vue/chunks/ocaml.js +52 -0
  147. package/vue/chunks/openscad.js +66 -0
  148. package/vue/chunks/oxygene.js +58 -0
  149. package/vue/chunks/parser3.js +40 -0
  150. package/vue/chunks/perl.js +454 -0
  151. package/vue/chunks/pf.js +30 -0
  152. package/vue/chunks/pgsql.js +196 -0
  153. package/vue/chunks/php-template.js +43 -0
  154. package/vue/chunks/php.js +527 -0
  155. package/vue/chunks/plaintext.js +10 -0
  156. package/vue/chunks/pony.js +60 -0
  157. package/vue/chunks/powershell.js +208 -0
  158. package/vue/chunks/processing.js +407 -0
  159. package/vue/chunks/profile.js +38 -0
  160. package/vue/chunks/prolog.js +62 -0
  161. package/vue/chunks/properties.js +45 -0
  162. package/vue/chunks/protobuf.js +63 -0
  163. package/vue/chunks/puppet.js +87 -0
  164. package/vue/chunks/purebasic.js +42 -0
  165. package/vue/chunks/python-repl.js +19 -0
  166. package/vue/chunks/python.js +357 -0
  167. package/vue/chunks/q.js +21 -0
  168. package/vue/chunks/qml.js +134 -0
  169. package/vue/chunks/r.js +145 -0
  170. package/vue/chunks/reasonml.js +134 -0
  171. package/vue/chunks/rib.js +16 -0
  172. package/vue/chunks/roboconf.js +54 -0
  173. package/vue/chunks/routeros.js +109 -0
  174. package/vue/chunks/rsl.js +138 -0
  175. package/vue/chunks/ruby.js +322 -0
  176. package/vue/chunks/ruleslanguage.js +26 -0
  177. package/vue/chunks/rust.js +296 -0
  178. package/vue/chunks/sas.js +533 -0
  179. package/vue/chunks/scala.js +173 -0
  180. package/vue/chunks/scheme.js +118 -0
  181. package/vue/chunks/scilab.js +45 -0
  182. package/vue/chunks/scss.js +900 -0
  183. package/vue/chunks/shell.js +18 -0
  184. package/vue/chunks/smali.js +113 -0
  185. package/vue/chunks/smalltalk.js +59 -0
  186. package/vue/chunks/sml.js +49 -0
  187. package/vue/chunks/sqf.js +2599 -0
  188. package/vue/chunks/sql.js +624 -0
  189. package/vue/chunks/stan.js +471 -0
  190. package/vue/chunks/stata.js +33 -0
  191. package/vue/chunks/step21.js +53 -0
  192. package/vue/chunks/stylus.js +925 -0
  193. package/vue/chunks/subunit.js +34 -0
  194. package/vue/chunks/swift.js +699 -0
  195. package/vue/chunks/taggerscript.js +37 -0
  196. package/vue/chunks/tap.js +30 -0
  197. package/vue/chunks/tcl.js +165 -0
  198. package/vue/chunks/thrift.js +65 -0
  199. package/vue/chunks/tp.js +155 -0
  200. package/vue/chunks/twig.js +232 -0
  201. package/vue/chunks/typescript.js +672 -0
  202. package/vue/chunks/vala.js +39 -0
  203. package/vue/chunks/vbnet.js +86 -0
  204. package/vue/chunks/vbscript-html.js +14 -0
  205. package/vue/chunks/vbscript.js +200 -0
  206. package/vue/chunks/verilog.js +534 -0
  207. package/vue/chunks/vhdl.js +190 -0
  208. package/vue/chunks/vim.js +54 -0
  209. package/vue/chunks/wasm.js +111 -0
  210. package/vue/chunks/wren.js +229 -0
  211. package/vue/chunks/x86asm.js +64 -0
  212. package/vue/chunks/xl.js +192 -0
  213. package/vue/chunks/xml.js +175 -0
  214. package/vue/chunks/xquery.js +303 -0
  215. package/vue/chunks/yaml.js +159 -0
  216. package/vue/chunks/zephir.js +74 -0
  217. package/vue/components.css +204 -170
  218. package/vue/editor/LoomaEditor.d.ts +7 -7
  219. package/vue/editor/code-language-catalog.d.ts +196 -0
  220. package/vue/editor/index.js +290 -20
@@ -180,6 +180,225 @@ function imageUploadContent(image) {
180
180
  };
181
181
  }
182
182
  //#endregion
183
+ //#region src/vue/editor/code-language-catalog.ts
184
+ var codeLanguageCatalog = {
185
+ "1c": () => import("../chunks/1c.js").then((module) => module.default),
186
+ "abnf": () => import("../chunks/abnf.js").then((module) => module.default),
187
+ "accesslog": () => import("../chunks/accesslog.js").then((module) => module.default),
188
+ "actionscript": () => import("../chunks/actionscript.js").then((module) => module.default),
189
+ "ada": () => import("../chunks/ada.js").then((module) => module.default),
190
+ "angelscript": () => import("../chunks/angelscript.js").then((module) => module.default),
191
+ "apache": () => import("../chunks/apache.js").then((module) => module.default),
192
+ "applescript": () => import("../chunks/applescript.js").then((module) => module.default),
193
+ "arcade": () => import("../chunks/arcade.js").then((module) => module.default),
194
+ "arduino": () => import("../chunks/arduino.js").then((module) => module.default),
195
+ "armasm": () => import("../chunks/armasm.js").then((module) => module.default),
196
+ "asciidoc": () => import("../chunks/asciidoc.js").then((module) => module.default),
197
+ "aspectj": () => import("../chunks/aspectj.js").then((module) => module.default),
198
+ "autohotkey": () => import("../chunks/autohotkey.js").then((module) => module.default),
199
+ "autoit": () => import("../chunks/autoit.js").then((module) => module.default),
200
+ "avrasm": () => import("../chunks/avrasm.js").then((module) => module.default),
201
+ "awk": () => import("../chunks/awk.js").then((module) => module.default),
202
+ "axapta": () => import("../chunks/axapta.js").then((module) => module.default),
203
+ "bash": () => import("../chunks/bash.js").then((module) => module.default),
204
+ "basic": () => import("../chunks/basic.js").then((module) => module.default),
205
+ "bnf": () => import("../chunks/bnf.js").then((module) => module.default),
206
+ "brainfuck": () => import("../chunks/brainfuck.js").then((module) => module.default),
207
+ "c": () => import("../chunks/c.js").then((module) => module.default),
208
+ "cal": () => import("../chunks/cal.js").then((module) => module.default),
209
+ "capnproto": () => import("../chunks/capnproto.js").then((module) => module.default),
210
+ "ceylon": () => import("../chunks/ceylon.js").then((module) => module.default),
211
+ "clean": () => import("../chunks/clean.js").then((module) => module.default),
212
+ "clojure": () => import("../chunks/clojure.js").then((module) => module.default),
213
+ "clojure-repl": () => import("../chunks/clojure-repl.js").then((module) => module.default),
214
+ "cmake": () => import("../chunks/cmake.js").then((module) => module.default),
215
+ "coffeescript": () => import("../chunks/coffeescript.js").then((module) => module.default),
216
+ "coq": () => import("../chunks/coq.js").then((module) => module.default),
217
+ "cos": () => import("../chunks/cos.js").then((module) => module.default),
218
+ "cpp": () => import("../chunks/cpp.js").then((module) => module.default),
219
+ "crmsh": () => import("../chunks/crmsh.js").then((module) => module.default),
220
+ "crystal": () => import("../chunks/crystal.js").then((module) => module.default),
221
+ "csharp": () => import("../chunks/csharp.js").then((module) => module.default),
222
+ "csp": () => import("../chunks/csp.js").then((module) => module.default),
223
+ "css": () => import("../chunks/css.js").then((module) => module.default),
224
+ "d": () => import("../chunks/d.js").then((module) => module.default),
225
+ "dart": () => import("../chunks/dart.js").then((module) => module.default),
226
+ "delphi": () => import("../chunks/delphi.js").then((module) => module.default),
227
+ "diff": () => import("../chunks/diff.js").then((module) => module.default),
228
+ "django": () => import("../chunks/django.js").then((module) => module.default),
229
+ "dns": () => import("../chunks/dns.js").then((module) => module.default),
230
+ "dockerfile": () => import("../chunks/dockerfile.js").then((module) => module.default),
231
+ "dos": () => import("../chunks/dos.js").then((module) => module.default),
232
+ "dsconfig": () => import("../chunks/dsconfig.js").then((module) => module.default),
233
+ "dts": () => import("../chunks/dts.js").then((module) => module.default),
234
+ "dust": () => import("../chunks/dust.js").then((module) => module.default),
235
+ "ebnf": () => import("../chunks/ebnf.js").then((module) => module.default),
236
+ "elixir": () => import("../chunks/elixir.js").then((module) => module.default),
237
+ "elm": () => import("../chunks/elm.js").then((module) => module.default),
238
+ "erb": () => import("../chunks/erb.js").then((module) => module.default),
239
+ "erlang": () => import("../chunks/erlang.js").then((module) => module.default),
240
+ "erlang-repl": () => import("../chunks/erlang-repl.js").then((module) => module.default),
241
+ "excel": () => import("../chunks/excel.js").then((module) => module.default),
242
+ "fix": () => import("../chunks/fix.js").then((module) => module.default),
243
+ "flix": () => import("../chunks/flix.js").then((module) => module.default),
244
+ "fortran": () => import("../chunks/fortran.js").then((module) => module.default),
245
+ "fsharp": () => import("../chunks/fsharp.js").then((module) => module.default),
246
+ "gams": () => import("../chunks/gams.js").then((module) => module.default),
247
+ "gauss": () => import("../chunks/gauss.js").then((module) => module.default),
248
+ "gcode": () => import("../chunks/gcode.js").then((module) => module.default),
249
+ "gherkin": () => import("../chunks/gherkin.js").then((module) => module.default),
250
+ "glsl": () => import("../chunks/glsl.js").then((module) => module.default),
251
+ "gml": () => import("../chunks/gml.js").then((module) => module.default),
252
+ "go": () => import("../chunks/go.js").then((module) => module.default),
253
+ "golo": () => import("../chunks/golo.js").then((module) => module.default),
254
+ "gradle": () => import("../chunks/gradle.js").then((module) => module.default),
255
+ "graphql": () => import("../chunks/graphql.js").then((module) => module.default),
256
+ "groovy": () => import("../chunks/groovy.js").then((module) => module.default),
257
+ "haml": () => import("../chunks/haml.js").then((module) => module.default),
258
+ "handlebars": () => import("../chunks/handlebars.js").then((module) => module.default),
259
+ "haskell": () => import("../chunks/haskell.js").then((module) => module.default),
260
+ "haxe": () => import("../chunks/haxe.js").then((module) => module.default),
261
+ "hsp": () => import("../chunks/hsp.js").then((module) => module.default),
262
+ "html": () => import("../chunks/xml.js").then((module) => module.default),
263
+ "http": () => import("../chunks/http.js").then((module) => module.default),
264
+ "hy": () => import("../chunks/hy.js").then((module) => module.default),
265
+ "inform7": () => import("../chunks/inform7.js").then((module) => module.default),
266
+ "ini": () => import("../chunks/ini.js").then((module) => module.default),
267
+ "irpf90": () => import("../chunks/irpf90.js").then((module) => module.default),
268
+ "isbl": () => import("../chunks/isbl.js").then((module) => module.default),
269
+ "java": () => import("../chunks/java.js").then((module) => module.default),
270
+ "javascript": () => import("../chunks/javascript.js").then((module) => module.default),
271
+ "jboss-cli": () => import("../chunks/jboss-cli.js").then((module) => module.default),
272
+ "json": () => import("../chunks/json.js").then((module) => module.default),
273
+ "julia": () => import("../chunks/julia.js").then((module) => module.default),
274
+ "julia-repl": () => import("../chunks/julia-repl.js").then((module) => module.default),
275
+ "kotlin": () => import("../chunks/kotlin.js").then((module) => module.default),
276
+ "lasso": () => import("../chunks/lasso.js").then((module) => module.default),
277
+ "latex": () => import("../chunks/latex.js").then((module) => module.default),
278
+ "ldif": () => import("../chunks/ldif.js").then((module) => module.default),
279
+ "leaf": () => import("../chunks/leaf.js").then((module) => module.default),
280
+ "less": () => import("../chunks/less.js").then((module) => module.default),
281
+ "lisp": () => import("../chunks/lisp.js").then((module) => module.default),
282
+ "livecodeserver": () => import("../chunks/livecodeserver.js").then((module) => module.default),
283
+ "livescript": () => import("../chunks/livescript.js").then((module) => module.default),
284
+ "llvm": () => import("../chunks/llvm.js").then((module) => module.default),
285
+ "lsl": () => import("../chunks/lsl.js").then((module) => module.default),
286
+ "lua": () => import("../chunks/lua.js").then((module) => module.default),
287
+ "makefile": () => import("../chunks/makefile.js").then((module) => module.default),
288
+ "markdown": () => import("../chunks/markdown.js").then((module) => module.default),
289
+ "mathematica": () => import("../chunks/mathematica.js").then((module) => module.default),
290
+ "matlab": () => import("../chunks/matlab.js").then((module) => module.default),
291
+ "maxima": () => import("../chunks/maxima.js").then((module) => module.default),
292
+ "mel": () => import("../chunks/mel.js").then((module) => module.default),
293
+ "mercury": () => import("../chunks/mercury.js").then((module) => module.default),
294
+ "mipsasm": () => import("../chunks/mipsasm.js").then((module) => module.default),
295
+ "mizar": () => import("../chunks/mizar.js").then((module) => module.default),
296
+ "mojolicious": () => import("../chunks/mojolicious.js").then((module) => module.default),
297
+ "monkey": () => import("../chunks/monkey.js").then((module) => module.default),
298
+ "moonscript": () => import("../chunks/moonscript.js").then((module) => module.default),
299
+ "n1ql": () => import("../chunks/n1ql.js").then((module) => module.default),
300
+ "nestedtext": () => import("../chunks/nestedtext.js").then((module) => module.default),
301
+ "nginx": () => import("../chunks/nginx.js").then((module) => module.default),
302
+ "nim": () => import("../chunks/nim.js").then((module) => module.default),
303
+ "nix": () => import("../chunks/nix.js").then((module) => module.default),
304
+ "node-repl": () => import("../chunks/node-repl.js").then((module) => module.default),
305
+ "nsis": () => import("../chunks/nsis.js").then((module) => module.default),
306
+ "objectivec": () => import("../chunks/objectivec.js").then((module) => module.default),
307
+ "ocaml": () => import("../chunks/ocaml.js").then((module) => module.default),
308
+ "openscad": () => import("../chunks/openscad.js").then((module) => module.default),
309
+ "oxygene": () => import("../chunks/oxygene.js").then((module) => module.default),
310
+ "parser3": () => import("../chunks/parser3.js").then((module) => module.default),
311
+ "perl": () => import("../chunks/perl.js").then((module) => module.default),
312
+ "pf": () => import("../chunks/pf.js").then((module) => module.default),
313
+ "pgsql": () => import("../chunks/pgsql.js").then((module) => module.default),
314
+ "php": () => import("../chunks/php.js").then((module) => module.default),
315
+ "php-template": () => import("../chunks/php-template.js").then((module) => module.default),
316
+ "plaintext": () => import("../chunks/plaintext.js").then((module) => module.default),
317
+ "pony": () => import("../chunks/pony.js").then((module) => module.default),
318
+ "powershell": () => import("../chunks/powershell.js").then((module) => module.default),
319
+ "processing": () => import("../chunks/processing.js").then((module) => module.default),
320
+ "profile": () => import("../chunks/profile.js").then((module) => module.default),
321
+ "prolog": () => import("../chunks/prolog.js").then((module) => module.default),
322
+ "properties": () => import("../chunks/properties.js").then((module) => module.default),
323
+ "protobuf": () => import("../chunks/protobuf.js").then((module) => module.default),
324
+ "puppet": () => import("../chunks/puppet.js").then((module) => module.default),
325
+ "purebasic": () => import("../chunks/purebasic.js").then((module) => module.default),
326
+ "python": () => import("../chunks/python.js").then((module) => module.default),
327
+ "python-repl": () => import("../chunks/python-repl.js").then((module) => module.default),
328
+ "q": () => import("../chunks/q.js").then((module) => module.default),
329
+ "qml": () => import("../chunks/qml.js").then((module) => module.default),
330
+ "r": () => import("../chunks/r.js").then((module) => module.default),
331
+ "reasonml": () => import("../chunks/reasonml.js").then((module) => module.default),
332
+ "rib": () => import("../chunks/rib.js").then((module) => module.default),
333
+ "roboconf": () => import("../chunks/roboconf.js").then((module) => module.default),
334
+ "routeros": () => import("../chunks/routeros.js").then((module) => module.default),
335
+ "rsl": () => import("../chunks/rsl.js").then((module) => module.default),
336
+ "ruby": () => import("../chunks/ruby.js").then((module) => module.default),
337
+ "ruleslanguage": () => import("../chunks/ruleslanguage.js").then((module) => module.default),
338
+ "rust": () => import("../chunks/rust.js").then((module) => module.default),
339
+ "sas": () => import("../chunks/sas.js").then((module) => module.default),
340
+ "scala": () => import("../chunks/scala.js").then((module) => module.default),
341
+ "scheme": () => import("../chunks/scheme.js").then((module) => module.default),
342
+ "scilab": () => import("../chunks/scilab.js").then((module) => module.default),
343
+ "scss": () => import("../chunks/scss.js").then((module) => module.default),
344
+ "shell": () => import("../chunks/shell.js").then((module) => module.default),
345
+ "smali": () => import("../chunks/smali.js").then((module) => module.default),
346
+ "smalltalk": () => import("../chunks/smalltalk.js").then((module) => module.default),
347
+ "sml": () => import("../chunks/sml.js").then((module) => module.default),
348
+ "sqf": () => import("../chunks/sqf.js").then((module) => module.default),
349
+ "sql": () => import("../chunks/sql.js").then((module) => module.default),
350
+ "stan": () => import("../chunks/stan.js").then((module) => module.default),
351
+ "stata": () => import("../chunks/stata.js").then((module) => module.default),
352
+ "step21": () => import("../chunks/step21.js").then((module) => module.default),
353
+ "stylus": () => import("../chunks/stylus.js").then((module) => module.default),
354
+ "subunit": () => import("../chunks/subunit.js").then((module) => module.default),
355
+ "swift": () => import("../chunks/swift.js").then((module) => module.default),
356
+ "taggerscript": () => import("../chunks/taggerscript.js").then((module) => module.default),
357
+ "tap": () => import("../chunks/tap.js").then((module) => module.default),
358
+ "tcl": () => import("../chunks/tcl.js").then((module) => module.default),
359
+ "thrift": () => import("../chunks/thrift.js").then((module) => module.default),
360
+ "tp": () => import("../chunks/tp.js").then((module) => module.default),
361
+ "twig": () => import("../chunks/twig.js").then((module) => module.default),
362
+ "typescript": () => import("../chunks/typescript.js").then((module) => module.default),
363
+ "vala": () => import("../chunks/vala.js").then((module) => module.default),
364
+ "vbnet": () => import("../chunks/vbnet.js").then((module) => module.default),
365
+ "vbscript": () => import("../chunks/vbscript.js").then((module) => module.default),
366
+ "vbscript-html": () => import("../chunks/vbscript-html.js").then((module) => module.default),
367
+ "verilog": () => import("../chunks/verilog.js").then((module) => module.default),
368
+ "vhdl": () => import("../chunks/vhdl.js").then((module) => module.default),
369
+ "vim": () => import("../chunks/vim.js").then((module) => module.default),
370
+ "wasm": () => import("../chunks/wasm.js").then((module) => module.default),
371
+ "wren": () => import("../chunks/wren.js").then((module) => module.default),
372
+ "x86asm": () => import("../chunks/x86asm.js").then((module) => module.default),
373
+ "xl": () => import("../chunks/xl.js").then((module) => module.default),
374
+ "xml": () => import("../chunks/xml.js").then((module) => module.default),
375
+ "xquery": () => import("../chunks/xquery.js").then((module) => module.default),
376
+ "yaml": () => import("../chunks/yaml.js").then((module) => module.default),
377
+ "zephir": () => import("../chunks/zephir.js").then((module) => module.default)
378
+ };
379
+ var autoCodeLanguageNames = [
380
+ "bash",
381
+ "c",
382
+ "cpp",
383
+ "csharp",
384
+ "css",
385
+ "go",
386
+ "html",
387
+ "java",
388
+ "javascript",
389
+ "json",
390
+ "kotlin",
391
+ "markdown",
392
+ "php",
393
+ "python",
394
+ "ruby",
395
+ "rust",
396
+ "sql",
397
+ "swift",
398
+ "typescript",
399
+ "yaml"
400
+ ];
401
+ //#endregion
183
402
  //#region src/vue/editor/LoomaEditor.ts
184
403
  var EMPTY_DOCUMENT = {
185
404
  type: "doc",
@@ -301,10 +520,10 @@ var LoomaEditor = defineComponent({
301
520
  type: Array,
302
521
  default: () => []
303
522
  },
304
- /** Code block grammars to register when this editor is created. */
523
+ /** Override the lazy built-in catalog with application-owned code grammars. An empty object disables highlighting. */
305
524
  codeLanguages: {
306
525
  type: Object,
307
- default: () => ({})
526
+ default: null
308
527
  },
309
528
  mentionItems: {
310
529
  type: Array,
@@ -530,13 +749,60 @@ var LoomaEditor = defineComponent({
530
749
  };
531
750
  };
532
751
  const authorHighlight = !props.disableHighlight;
752
+ const codeLowlight = createLowlight(props.codeLanguages ?? void 0);
753
+ const codeHighlightLowlight = props.codeLanguages === null ? {
754
+ ...codeLowlight,
755
+ highlightAuto: (value) => codeLowlight.highlightAuto(value, { subset: [...autoCodeLanguageNames] })
756
+ } : codeLowlight;
757
+ const codeLanguageNames = props.codeLanguages === null ? [...autoCodeLanguageNames, ...Object.keys(codeLanguageCatalog).filter((name) => !autoCodeLanguageNames.includes(name)).sort()] : Object.keys(props.codeLanguages).sort();
758
+ const codeUi = reactive({
759
+ open: false,
760
+ pos: 0,
761
+ language: "auto",
762
+ text: "",
763
+ grammarVersion: 0,
764
+ style: {}
765
+ });
766
+ const grammarLoads = /* @__PURE__ */ new Map();
767
+ let catalogLoad;
768
+ const refreshCodeHighlights = (instance) => {
769
+ if (instance.isDestroyed) return;
770
+ codeUi.grammarVersion += 1;
771
+ const tr = instance.state.tr;
772
+ instance.state.doc.descendants((node, pos) => {
773
+ if (node.type.name === "codeBlock") tr.setNodeMarkup(pos, void 0, node.attrs);
774
+ });
775
+ if (tr.docChanged) instance.view.dispatch(tr.setMeta("addToHistory", false));
776
+ };
777
+ const loadGrammar = (name) => {
778
+ const existing = grammarLoads.get(name);
779
+ if (existing) return existing;
780
+ const pending = codeLanguageCatalog[name]().then((grammar) => {
781
+ codeLowlight.register({ [name]: grammar });
782
+ }).catch((error) => {
783
+ grammarLoads.delete(name);
784
+ throw error;
785
+ });
786
+ grammarLoads.set(name, pending);
787
+ return pending;
788
+ };
789
+ const loadForCodeBlock = (instance, language, value) => {
790
+ if (props.codeLanguages !== null || instance.isDestroyed) return;
791
+ if (typeof language === "string" && Object.hasOwn(codeLanguageCatalog, language)) {
792
+ if (codeLowlight.registered(language) || grammarLoads.has(language)) return;
793
+ loadGrammar(language).then(() => refreshCodeHighlights(instance)).catch(() => {});
794
+ } else if (!language && value.trim()) catalogLoad ??= Promise.all(autoCodeLanguageNames.map((name) => loadGrammar(name))).then(() => refreshCodeHighlights(instance)).catch(() => {
795
+ catalogLoad = void 0;
796
+ });
797
+ };
533
798
  const editor = useEditor({
534
799
  extensions: [
535
800
  ...getDefaultEditorExtensions({
536
801
  placeholder: props.placeholder,
537
802
  mention: mentionExtension ?? false,
538
803
  disableHighlight: props.disableHighlight,
539
- codeLanguages: props.codeLanguages
804
+ codeLanguages: props.codeLanguages ?? void 0,
805
+ codeLowlight: codeHighlightLowlight
540
806
  }),
541
807
  imageDelivery.extension,
542
808
  slashExtension,
@@ -549,7 +815,12 @@ var LoomaEditor = defineComponent({
549
815
  "aria-multiline": "true",
550
816
  "aria-label": props.label
551
817
  } },
552
- onCreate: ({ editor: instance }) => emit("ready", instance),
818
+ onCreate: ({ editor: instance }) => {
819
+ emit("ready", instance);
820
+ instance.state.doc.descendants((node) => {
821
+ if (node.type.name === "codeBlock") loadForCodeBlock(instance, node.attrs.language, node.textContent);
822
+ });
823
+ },
553
824
  onFocus: ({ editor: instance }) => rememberSelection(instance),
554
825
  onSelectionUpdate: ({ editor: instance }) => {
555
826
  rememberSelection(instance);
@@ -837,15 +1108,6 @@ var LoomaEditor = defineComponent({
837
1108
  };
838
1109
  });
839
1110
  };
840
- const codeLanguageNames = Object.keys(props.codeLanguages).sort();
841
- const codeLowlight = createLowlight(props.codeLanguages);
842
- const codeUi = reactive({
843
- open: false,
844
- pos: 0,
845
- language: "auto",
846
- text: "",
847
- style: {}
848
- });
849
1111
  let codeBlurTimer;
850
1112
  const updateCodeUi = (focusSettled = false) => {
851
1113
  const instance = editor.value?.isDestroyed ? void 0 : editor.value;
@@ -856,6 +1118,7 @@ var LoomaEditor = defineComponent({
856
1118
  codeUi.open = false;
857
1119
  return;
858
1120
  }
1121
+ loadForCodeBlock(instance, block.attrs.language, block.textContent);
859
1122
  if (!instance.isFocused && !codeLanguageShell.value?.contains(document.activeElement)) {
860
1123
  clearTimeout(codeBlurTimer);
861
1124
  if (codeUi.open && !focusSettled) codeBlurTimer = setTimeout(() => updateCodeUi(true), 0);
@@ -875,13 +1138,14 @@ var LoomaEditor = defineComponent({
875
1138
  };
876
1139
  };
877
1140
  const codeLanguageOptions = computed(() => {
878
- const detected = codeUi.open && codeUi.text.trim() ? codeLowlight.highlightAuto(codeUi.text).data?.language : null;
1141
+ codeUi.grammarVersion;
1142
+ const detected = codeUi.open && codeUi.text.trim() ? codeHighlightLowlight.highlightAuto(codeUi.text).data?.language : null;
879
1143
  return [
880
1144
  {
881
1145
  value: "auto",
882
1146
  label: typeof detected === "string" ? `Auto (${detected.toUpperCase()})` : "Auto"
883
1147
  },
884
- ...codeUi.language !== "auto" && !Object.hasOwn(props.codeLanguages, codeUi.language) ? [{
1148
+ ...codeUi.language !== "auto" && !codeLanguageNames.includes(codeUi.language) ? [{
885
1149
  value: codeUi.language,
886
1150
  label: `${codeUi.language.toUpperCase()} (unavailable)`
887
1151
  }] : [],
@@ -895,7 +1159,7 @@ var LoomaEditor = defineComponent({
895
1159
  const instance = editor.value;
896
1160
  if (!instance || detail.kind !== "selection" || !detail.value) return;
897
1161
  const language = detail.value === "auto" ? null : detail.value;
898
- if (language !== null && !Object.hasOwn(props.codeLanguages, language)) return;
1162
+ if (language !== null && !codeLanguageNames.includes(language)) return;
899
1163
  const node = instance.state.doc.nodeAt(codeUi.pos);
900
1164
  if (node?.type.name !== "codeBlock") return;
901
1165
  instance.view.dispatch(closeHistory(instance.state.tr));
@@ -910,7 +1174,12 @@ var LoomaEditor = defineComponent({
910
1174
  onBeforeUnmount(() => clearTimeout(codeBlurTimer));
911
1175
  const updateTableUi = () => {
912
1176
  const instance = editor.value;
913
- if (!instance || !props.editable || !instance.isFocused && !tableInteractionActive && !hoveredTableCell) {
1177
+ const focusInTableUi = [
1178
+ tableToolbarShell.value,
1179
+ tableOverlayShell.value,
1180
+ tableMenuShell.value
1181
+ ].some((shell) => shell?.contains(document.activeElement));
1182
+ if (!instance || instance.isDestroyed || !props.editable || !instance.isFocused && !tableInteractionActive && !hoveredTableCell && !focusInTableUi) {
914
1183
  closeTableUi();
915
1184
  return;
916
1185
  }
@@ -958,7 +1227,7 @@ var LoomaEditor = defineComponent({
958
1227
  updateMobileViewport();
959
1228
  };
960
1229
  const onEditorBlur = () => {
961
- updateTableUi();
1230
+ queueMicrotask(updateTableUi);
962
1231
  updateCodeUi();
963
1232
  setTimeout(() => {
964
1233
  if (!tableInteractionActive && !editor.value?.isFocused) editorFocused.value = false;
@@ -985,7 +1254,8 @@ var LoomaEditor = defineComponent({
985
1254
  unbindEditorUi(previous);
986
1255
  bindEditorUi(instance);
987
1256
  }, { immediate: true });
988
- const onViewportChange = () => {
1257
+ const onViewportChange = (event) => {
1258
+ if (event?.type === "scroll" && event.target instanceof Node && (tableToolbarShell.value?.contains(event.target) || tableMenuShell.value?.contains(event.target))) return;
989
1259
  updateMobileViewport();
990
1260
  updateTableUi();
991
1261
  updateCodeUi();
@@ -1169,7 +1439,7 @@ var LoomaEditor = defineComponent({
1169
1439
  if (!instance) return;
1170
1440
  const table = overlayTableElement ?? selectedTableElement(instance);
1171
1441
  if (!table) return;
1172
- const targetCell = "rowIndex" in detail ? resolveTableCellAt(table, detail.rowIndex, detail.columnIndex) : resolveTableCellAt(table, detail.action.startsWith("add-row") ? Math.max(0, detail.boundaryIndex - 1) : 0, detail.action.startsWith("add-column") ? Math.max(0, detail.boundaryIndex - 1) : 0);
1442
+ const targetCell = "rowIndex" in detail ? resolveTableCellAt(table, detail.rowIndex, detail.columnIndex) : "fromIndex" in detail ? resolveTableCellAt(table, detail.action === "reorder-row" ? detail.fromIndex : 0, detail.action === "reorder-column" ? detail.fromIndex : 0) : resolveTableCellAt(table, detail.action.startsWith("add-row") ? Math.max(0, detail.boundaryIndex - 1) : 0, detail.action.startsWith("add-column") ? Math.max(0, detail.boundaryIndex - 1) : 0);
1173
1443
  if (targetCell && selectedTableElement(instance) !== table) instance.chain().focus().setTextSelection(instance.view.posAtDOM(targetCell, 0) + 1).run();
1174
1444
  if (detail.action === "open-cell-menu") {
1175
1445
  const selectedCell = selectedTableCellElement(instance);