@threadlabs/looma 0.18.6 → 0.19.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 (215) 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/dist/index.js +1 -1
  6. package/editor/chunks/extensions.js +24 -3
  7. package/editor/extensions/preset.d.ts +2 -0
  8. package/editor/extensions/table-commands.d.ts +1 -1
  9. package/editor/table-overlay.d.ts +8 -3
  10. package/package.json +2 -1
  11. package/styles/ui-editor-table-overlay.css +30 -0
  12. package/styles/ui-editor-table-toolbar.css +7 -2
  13. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  14. package/vanilla/UiEditorTableOverlay.js +9 -3
  15. package/vue/UiEditorTableOverlay.d.ts +8 -0
  16. package/vue/UiEditorTableOverlay.vue +45 -2
  17. package/vue/UiEditorTableToolbar.vue +7 -2
  18. package/vue/chunks/1c.js +106 -0
  19. package/vue/chunks/UiEditorTableOverlay.js +14 -4
  20. package/vue/chunks/UiEditorTableToolbar.js +1 -1
  21. package/vue/chunks/abnf.js +61 -0
  22. package/vue/chunks/accesslog.js +72 -0
  23. package/vue/chunks/actionscript.js +139 -0
  24. package/vue/chunks/ada.js +183 -0
  25. package/vue/chunks/angelscript.js +141 -0
  26. package/vue/chunks/apache.js +88 -0
  27. package/vue/chunks/applescript.js +99 -0
  28. package/vue/chunks/arcade.js +405 -0
  29. package/vue/chunks/arduino.js +871 -0
  30. package/vue/chunks/armasm.js +65 -0
  31. package/vue/chunks/asciidoc.js +181 -0
  32. package/vue/chunks/aspectj.js +202 -0
  33. package/vue/chunks/autohotkey.js +54 -0
  34. package/vue/chunks/autoit.js +132 -0
  35. package/vue/chunks/avrasm.js +46 -0
  36. package/vue/chunks/awk.js +58 -0
  37. package/vue/chunks/axapta.js +167 -0
  38. package/vue/chunks/bash.js +358 -0
  39. package/vue/chunks/basic.js +221 -0
  40. package/vue/chunks/bnf.js +27 -0
  41. package/vue/chunks/brainfuck.js +40 -0
  42. package/vue/chunks/c.js +265 -0
  43. package/vue/chunks/cal.js +136 -0
  44. package/vue/chunks/capnproto.js +86 -0
  45. package/vue/chunks/ceylon.js +125 -0
  46. package/vue/chunks/clean.js +54 -0
  47. package/vue/chunks/clojure-repl.js +17 -0
  48. package/vue/chunks/clojure.js +133 -0
  49. package/vue/chunks/cmake.js +23 -0
  50. package/vue/chunks/coffeescript.js +291 -0
  51. package/vue/chunks/coq.js +436 -0
  52. package/vue/chunks/cos.js +77 -0
  53. package/vue/chunks/cpp.js +492 -0
  54. package/vue/chunks/crmsh.js +80 -0
  55. package/vue/chunks/crystal.js +260 -0
  56. package/vue/chunks/csharp.js +376 -0
  57. package/vue/chunks/csp.js +52 -0
  58. package/vue/chunks/css.js +890 -0
  59. package/vue/chunks/d.js +184 -0
  60. package/vue/chunks/dart.js +226 -0
  61. package/vue/chunks/delphi.js +227 -0
  62. package/vue/chunks/diff.js +40 -0
  63. package/vue/chunks/django.js +43 -0
  64. package/vue/chunks/dns.js +66 -0
  65. package/vue/chunks/dockerfile.js +35 -0
  66. package/vue/chunks/dos.js +147 -0
  67. package/vue/chunks/dsconfig.js +55 -0
  68. package/vue/chunks/dts.js +119 -0
  69. package/vue/chunks/dust.js +33 -0
  70. package/vue/chunks/ebnf.js +40 -0
  71. package/vue/chunks/elixir.js +241 -0
  72. package/vue/chunks/elm.js +103 -0
  73. package/vue/chunks/erb.js +17 -0
  74. package/vue/chunks/erlang-repl.js +41 -0
  75. package/vue/chunks/erlang.js +236 -0
  76. package/vue/chunks/excel.js +562 -0
  77. package/vue/chunks/fix.js +30 -0
  78. package/vue/chunks/flix.js +60 -0
  79. package/vue/chunks/fortran.js +543 -0
  80. package/vue/chunks/fsharp.js +440 -0
  81. package/vue/chunks/gams.js +134 -0
  82. package/vue/chunks/gauss.js +167 -0
  83. package/vue/chunks/gcode.js +131 -0
  84. package/vue/chunks/gherkin.js +41 -0
  85. package/vue/chunks/glsl.js +25 -0
  86. package/vue/chunks/gml.js +3119 -0
  87. package/vue/chunks/go.js +140 -0
  88. package/vue/chunks/golo.js +72 -0
  89. package/vue/chunks/gradle.js +181 -0
  90. package/vue/chunks/graphql.js +68 -0
  91. package/vue/chunks/groovy.js +159 -0
  92. package/vue/chunks/haml.js +96 -0
  93. package/vue/chunks/handlebars.js +191 -0
  94. package/vue/chunks/haskell.js +149 -0
  95. package/vue/chunks/haxe.js +142 -0
  96. package/vue/chunks/hsp.js +45 -0
  97. package/vue/chunks/http.js +77 -0
  98. package/vue/chunks/hy.js +92 -0
  99. package/vue/chunks/inform7.js +45 -0
  100. package/vue/chunks/ini.js +94 -0
  101. package/vue/chunks/irpf90.js +52 -0
  102. package/vue/chunks/isbl.js +112 -0
  103. package/vue/chunks/java.js +237 -0
  104. package/vue/chunks/javascript.js +570 -0
  105. package/vue/chunks/jboss-cli.js +46 -0
  106. package/vue/chunks/json.js +45 -0
  107. package/vue/chunks/julia-repl.js +18 -0
  108. package/vue/chunks/julia.js +353 -0
  109. package/vue/chunks/kotlin.js +216 -0
  110. package/vue/chunks/lasso.js +127 -0
  111. package/vue/chunks/latex.js +206 -0
  112. package/vue/chunks/ldif.js +25 -0
  113. package/vue/chunks/leaf.js +72 -0
  114. package/vue/chunks/less.js +953 -0
  115. package/vue/chunks/lisp.js +119 -0
  116. package/vue/chunks/livecodeserver.js +86 -0
  117. package/vue/chunks/livescript.js +309 -0
  118. package/vue/chunks/llvm.js +77 -0
  119. package/vue/chunks/lsl.js +55 -0
  120. package/vue/chunks/lua.js +49 -0
  121. package/vue/chunks/makefile.js +62 -0
  122. package/vue/chunks/markdown.js +194 -0
  123. package/vue/chunks/mathematica.js +7317 -0
  124. package/vue/chunks/matlab.js +70 -0
  125. package/vue/chunks/maxima.js +38 -0
  126. package/vue/chunks/mel.js +24 -0
  127. package/vue/chunks/mercury.js +62 -0
  128. package/vue/chunks/mipsasm.js +53 -0
  129. package/vue/chunks/mizar.js +10 -0
  130. package/vue/chunks/mojolicious.js +27 -0
  131. package/vue/chunks/monkey.js +158 -0
  132. package/vue/chunks/moonscript.js +102 -0
  133. package/vue/chunks/n1ql.js +346 -0
  134. package/vue/chunks/nestedtext.js +66 -0
  135. package/vue/chunks/nginx.js +127 -0
  136. package/vue/chunks/nim.js +174 -0
  137. package/vue/chunks/nix.js +334 -0
  138. package/vue/chunks/node-repl.js +20 -0
  139. package/vue/chunks/nsis.js +515 -0
  140. package/vue/chunks/objectivec.js +235 -0
  141. package/vue/chunks/ocaml.js +52 -0
  142. package/vue/chunks/openscad.js +66 -0
  143. package/vue/chunks/oxygene.js +58 -0
  144. package/vue/chunks/parser3.js +40 -0
  145. package/vue/chunks/perl.js +454 -0
  146. package/vue/chunks/pf.js +30 -0
  147. package/vue/chunks/pgsql.js +196 -0
  148. package/vue/chunks/php-template.js +43 -0
  149. package/vue/chunks/php.js +527 -0
  150. package/vue/chunks/plaintext.js +10 -0
  151. package/vue/chunks/pony.js +60 -0
  152. package/vue/chunks/powershell.js +208 -0
  153. package/vue/chunks/processing.js +407 -0
  154. package/vue/chunks/profile.js +38 -0
  155. package/vue/chunks/prolog.js +62 -0
  156. package/vue/chunks/properties.js +45 -0
  157. package/vue/chunks/protobuf.js +63 -0
  158. package/vue/chunks/puppet.js +87 -0
  159. package/vue/chunks/purebasic.js +42 -0
  160. package/vue/chunks/python-repl.js +19 -0
  161. package/vue/chunks/python.js +357 -0
  162. package/vue/chunks/q.js +21 -0
  163. package/vue/chunks/qml.js +134 -0
  164. package/vue/chunks/r.js +145 -0
  165. package/vue/chunks/reasonml.js +134 -0
  166. package/vue/chunks/rib.js +16 -0
  167. package/vue/chunks/roboconf.js +54 -0
  168. package/vue/chunks/routeros.js +109 -0
  169. package/vue/chunks/rsl.js +138 -0
  170. package/vue/chunks/ruby.js +322 -0
  171. package/vue/chunks/ruleslanguage.js +26 -0
  172. package/vue/chunks/rust.js +296 -0
  173. package/vue/chunks/sas.js +533 -0
  174. package/vue/chunks/scala.js +173 -0
  175. package/vue/chunks/scheme.js +118 -0
  176. package/vue/chunks/scilab.js +45 -0
  177. package/vue/chunks/scss.js +900 -0
  178. package/vue/chunks/shell.js +18 -0
  179. package/vue/chunks/smali.js +113 -0
  180. package/vue/chunks/smalltalk.js +59 -0
  181. package/vue/chunks/sml.js +49 -0
  182. package/vue/chunks/sqf.js +2599 -0
  183. package/vue/chunks/sql.js +624 -0
  184. package/vue/chunks/stan.js +471 -0
  185. package/vue/chunks/stata.js +33 -0
  186. package/vue/chunks/step21.js +53 -0
  187. package/vue/chunks/stylus.js +925 -0
  188. package/vue/chunks/subunit.js +34 -0
  189. package/vue/chunks/swift.js +699 -0
  190. package/vue/chunks/taggerscript.js +37 -0
  191. package/vue/chunks/tap.js +30 -0
  192. package/vue/chunks/tcl.js +165 -0
  193. package/vue/chunks/thrift.js +65 -0
  194. package/vue/chunks/tp.js +155 -0
  195. package/vue/chunks/twig.js +232 -0
  196. package/vue/chunks/typescript.js +672 -0
  197. package/vue/chunks/vala.js +39 -0
  198. package/vue/chunks/vbnet.js +86 -0
  199. package/vue/chunks/vbscript-html.js +14 -0
  200. package/vue/chunks/vbscript.js +200 -0
  201. package/vue/chunks/verilog.js +534 -0
  202. package/vue/chunks/vhdl.js +190 -0
  203. package/vue/chunks/vim.js +54 -0
  204. package/vue/chunks/wasm.js +111 -0
  205. package/vue/chunks/wren.js +229 -0
  206. package/vue/chunks/x86asm.js +64 -0
  207. package/vue/chunks/xl.js +192 -0
  208. package/vue/chunks/xml.js +175 -0
  209. package/vue/chunks/xquery.js +303 -0
  210. package/vue/chunks/yaml.js +159 -0
  211. package/vue/chunks/zephir.js +74 -0
  212. package/vue/components.css +119 -85
  213. package/vue/editor/LoomaEditor.d.ts +7 -7
  214. package/vue/editor/code-language-catalog.d.ts +196 -0
  215. package/vue/editor/index.js +290 -20
@@ -0,0 +1,43 @@
1
+ //#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/php-template.js
2
+ function phpTemplate(hljs) {
3
+ return {
4
+ name: "PHP template",
5
+ subLanguage: "xml",
6
+ contains: [{
7
+ begin: /<\?(php|=)?/,
8
+ end: /\?>/,
9
+ subLanguage: "php",
10
+ contains: [
11
+ {
12
+ begin: "/\\*",
13
+ end: "\\*/",
14
+ skip: true
15
+ },
16
+ {
17
+ begin: "b\"",
18
+ end: "\"",
19
+ skip: true
20
+ },
21
+ {
22
+ begin: "b'",
23
+ end: "'",
24
+ skip: true
25
+ },
26
+ hljs.inherit(hljs.APOS_STRING_MODE, {
27
+ illegal: null,
28
+ className: null,
29
+ contains: null,
30
+ skip: true
31
+ }),
32
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {
33
+ illegal: null,
34
+ className: null,
35
+ contains: null,
36
+ skip: true
37
+ })
38
+ ]
39
+ }]
40
+ };
41
+ }
42
+ //#endregion
43
+ export { phpTemplate as default };
@@ -0,0 +1,527 @@
1
+ //#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/php.js
2
+ /**
3
+ * @param {HLJSApi} hljs
4
+ * @returns {LanguageDetail}
5
+ * */
6
+ function php(hljs) {
7
+ const regex = hljs.regex;
8
+ const NOT_PERL_ETC = /(?![A-Za-z0-9])(?![$])/;
9
+ const IDENT_RE = regex.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/, NOT_PERL_ETC);
10
+ const PASCAL_CASE_CLASS_NAME_RE = regex.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/, NOT_PERL_ETC);
11
+ const UPCASE_NAME_RE = regex.concat(/[A-Z]+/, NOT_PERL_ETC);
12
+ const VARIABLE = {
13
+ scope: "variable",
14
+ match: "\\$+" + IDENT_RE
15
+ };
16
+ const PREPROCESSOR = {
17
+ scope: "meta",
18
+ variants: [
19
+ {
20
+ begin: /<\?php/,
21
+ relevance: 10
22
+ },
23
+ { begin: /<\?=/ },
24
+ {
25
+ begin: /<\?/,
26
+ relevance: .1
27
+ },
28
+ { begin: /\?>/ }
29
+ ]
30
+ };
31
+ const SUBST = {
32
+ scope: "subst",
33
+ variants: [{ begin: /\$\w+/ }, {
34
+ begin: /\{\$/,
35
+ end: /\}/
36
+ }]
37
+ };
38
+ const SINGLE_QUOTED = hljs.inherit(hljs.APOS_STRING_MODE, { illegal: null });
39
+ const DOUBLE_QUOTED = hljs.inherit(hljs.QUOTE_STRING_MODE, {
40
+ illegal: null,
41
+ contains: hljs.QUOTE_STRING_MODE.contains.concat(SUBST)
42
+ });
43
+ const HEREDOC = {
44
+ begin: /<<<[ \t]*(?:(\w+)|"(\w+)")\n/,
45
+ end: /[ \t]*(\w+)\b/,
46
+ contains: hljs.QUOTE_STRING_MODE.contains.concat(SUBST),
47
+ "on:begin": (m, resp) => {
48
+ resp.data._beginMatch = m[1] || m[2];
49
+ },
50
+ "on:end": (m, resp) => {
51
+ if (resp.data._beginMatch !== m[1]) resp.ignoreMatch();
52
+ }
53
+ };
54
+ const NOWDOC = hljs.END_SAME_AS_BEGIN({
55
+ begin: /<<<[ \t]*'(\w+)'\n/,
56
+ end: /[ \t]*(\w+)\b/
57
+ });
58
+ const WHITESPACE = "[ \n]";
59
+ const STRING = {
60
+ scope: "string",
61
+ variants: [
62
+ DOUBLE_QUOTED,
63
+ SINGLE_QUOTED,
64
+ HEREDOC,
65
+ NOWDOC
66
+ ]
67
+ };
68
+ const NUMBER = {
69
+ scope: "number",
70
+ variants: [
71
+ { begin: `\\b0[bB][01]+(?:_[01]+)*\\b` },
72
+ { begin: `\\b0[oO][0-7]+(?:_[0-7]+)*\\b` },
73
+ { begin: `\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b` },
74
+ { begin: `(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?` }
75
+ ],
76
+ relevance: 0
77
+ };
78
+ const LITERALS = [
79
+ "false",
80
+ "null",
81
+ "true"
82
+ ];
83
+ const KWS = [
84
+ "__CLASS__",
85
+ "__DIR__",
86
+ "__FILE__",
87
+ "__FUNCTION__",
88
+ "__COMPILER_HALT_OFFSET__",
89
+ "__LINE__",
90
+ "__METHOD__",
91
+ "__NAMESPACE__",
92
+ "__TRAIT__",
93
+ "die",
94
+ "echo",
95
+ "exit",
96
+ "include",
97
+ "include_once",
98
+ "print",
99
+ "require",
100
+ "require_once",
101
+ "array",
102
+ "abstract",
103
+ "and",
104
+ "as",
105
+ "binary",
106
+ "bool",
107
+ "boolean",
108
+ "break",
109
+ "callable",
110
+ "case",
111
+ "catch",
112
+ "class",
113
+ "clone",
114
+ "const",
115
+ "continue",
116
+ "declare",
117
+ "default",
118
+ "do",
119
+ "double",
120
+ "else",
121
+ "elseif",
122
+ "empty",
123
+ "enddeclare",
124
+ "endfor",
125
+ "endforeach",
126
+ "endif",
127
+ "endswitch",
128
+ "endwhile",
129
+ "enum",
130
+ "eval",
131
+ "extends",
132
+ "final",
133
+ "finally",
134
+ "float",
135
+ "for",
136
+ "foreach",
137
+ "from",
138
+ "global",
139
+ "goto",
140
+ "if",
141
+ "implements",
142
+ "instanceof",
143
+ "insteadof",
144
+ "int",
145
+ "integer",
146
+ "interface",
147
+ "isset",
148
+ "iterable",
149
+ "list",
150
+ "match|0",
151
+ "mixed",
152
+ "new",
153
+ "never",
154
+ "object",
155
+ "or",
156
+ "private",
157
+ "protected",
158
+ "public",
159
+ "readonly",
160
+ "real",
161
+ "return",
162
+ "string",
163
+ "switch",
164
+ "throw",
165
+ "trait",
166
+ "try",
167
+ "unset",
168
+ "use",
169
+ "var",
170
+ "void",
171
+ "while",
172
+ "xor",
173
+ "yield"
174
+ ];
175
+ const BUILT_INS = [
176
+ "Error|0",
177
+ "AppendIterator",
178
+ "ArgumentCountError",
179
+ "ArithmeticError",
180
+ "ArrayIterator",
181
+ "ArrayObject",
182
+ "AssertionError",
183
+ "BadFunctionCallException",
184
+ "BadMethodCallException",
185
+ "CachingIterator",
186
+ "CallbackFilterIterator",
187
+ "CompileError",
188
+ "Countable",
189
+ "DirectoryIterator",
190
+ "DivisionByZeroError",
191
+ "DomainException",
192
+ "EmptyIterator",
193
+ "ErrorException",
194
+ "Exception",
195
+ "FilesystemIterator",
196
+ "FilterIterator",
197
+ "GlobIterator",
198
+ "InfiniteIterator",
199
+ "InvalidArgumentException",
200
+ "IteratorIterator",
201
+ "LengthException",
202
+ "LimitIterator",
203
+ "LogicException",
204
+ "MultipleIterator",
205
+ "NoRewindIterator",
206
+ "OutOfBoundsException",
207
+ "OutOfRangeException",
208
+ "OuterIterator",
209
+ "OverflowException",
210
+ "ParentIterator",
211
+ "ParseError",
212
+ "RangeException",
213
+ "RecursiveArrayIterator",
214
+ "RecursiveCachingIterator",
215
+ "RecursiveCallbackFilterIterator",
216
+ "RecursiveDirectoryIterator",
217
+ "RecursiveFilterIterator",
218
+ "RecursiveIterator",
219
+ "RecursiveIteratorIterator",
220
+ "RecursiveRegexIterator",
221
+ "RecursiveTreeIterator",
222
+ "RegexIterator",
223
+ "RuntimeException",
224
+ "SeekableIterator",
225
+ "SplDoublyLinkedList",
226
+ "SplFileInfo",
227
+ "SplFileObject",
228
+ "SplFixedArray",
229
+ "SplHeap",
230
+ "SplMaxHeap",
231
+ "SplMinHeap",
232
+ "SplObjectStorage",
233
+ "SplObserver",
234
+ "SplPriorityQueue",
235
+ "SplQueue",
236
+ "SplStack",
237
+ "SplSubject",
238
+ "SplTempFileObject",
239
+ "TypeError",
240
+ "UnderflowException",
241
+ "UnexpectedValueException",
242
+ "UnhandledMatchError",
243
+ "ArrayAccess",
244
+ "BackedEnum",
245
+ "Closure",
246
+ "Fiber",
247
+ "Generator",
248
+ "Iterator",
249
+ "IteratorAggregate",
250
+ "Serializable",
251
+ "Stringable",
252
+ "Throwable",
253
+ "Traversable",
254
+ "UnitEnum",
255
+ "WeakReference",
256
+ "WeakMap",
257
+ "Directory",
258
+ "__PHP_Incomplete_Class",
259
+ "parent",
260
+ "php_user_filter",
261
+ "self",
262
+ "static",
263
+ "stdClass"
264
+ ];
265
+ /** Dual-case keywords
266
+ *
267
+ * ["then","FILE"] =>
268
+ * ["then", "THEN", "FILE", "file"]
269
+ *
270
+ * @param {string[]} items */
271
+ const dualCase = (items) => {
272
+ /** @type string[] */
273
+ const result = [];
274
+ items.forEach((item) => {
275
+ result.push(item);
276
+ if (item.toLowerCase() === item) result.push(item.toUpperCase());
277
+ else result.push(item.toLowerCase());
278
+ });
279
+ return result;
280
+ };
281
+ const KEYWORDS = {
282
+ keyword: KWS,
283
+ literal: dualCase(LITERALS),
284
+ built_in: BUILT_INS
285
+ };
286
+ /**
287
+ * @param {string[]} items */
288
+ const normalizeKeywords = (items) => {
289
+ return items.map((item) => {
290
+ return item.replace(/\|\d+$/, "");
291
+ });
292
+ };
293
+ const CONSTRUCTOR_CALL = { variants: [{
294
+ match: [
295
+ /new/,
296
+ regex.concat(WHITESPACE, "+"),
297
+ regex.concat("(?!", normalizeKeywords(BUILT_INS).join("\\b|"), "\\b)"),
298
+ PASCAL_CASE_CLASS_NAME_RE
299
+ ],
300
+ scope: {
301
+ 1: "keyword",
302
+ 4: "title.class"
303
+ }
304
+ }] };
305
+ const CONSTANT_REFERENCE = regex.concat(IDENT_RE, "\\b(?!\\()");
306
+ const LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON = { variants: [
307
+ {
308
+ match: [regex.concat(/::/, regex.lookahead(/(?!class\b)/)), CONSTANT_REFERENCE],
309
+ scope: { 2: "variable.constant" }
310
+ },
311
+ {
312
+ match: [/::/, /class/],
313
+ scope: { 2: "variable.language" }
314
+ },
315
+ {
316
+ match: [
317
+ PASCAL_CASE_CLASS_NAME_RE,
318
+ regex.concat(/::/, regex.lookahead(/(?!class\b)/)),
319
+ CONSTANT_REFERENCE
320
+ ],
321
+ scope: {
322
+ 1: "title.class",
323
+ 3: "variable.constant"
324
+ }
325
+ },
326
+ {
327
+ match: [PASCAL_CASE_CLASS_NAME_RE, regex.concat("::", regex.lookahead(/(?!class\b)/))],
328
+ scope: { 1: "title.class" }
329
+ },
330
+ {
331
+ match: [
332
+ PASCAL_CASE_CLASS_NAME_RE,
333
+ /::/,
334
+ /class/
335
+ ],
336
+ scope: {
337
+ 1: "title.class",
338
+ 3: "variable.language"
339
+ }
340
+ }
341
+ ] };
342
+ const NAMED_ARGUMENT = {
343
+ scope: "attr",
344
+ match: regex.concat(IDENT_RE, regex.lookahead(":"), regex.lookahead(/(?!::)/))
345
+ };
346
+ const PARAMS_MODE = {
347
+ relevance: 0,
348
+ begin: /\(/,
349
+ end: /\)/,
350
+ keywords: KEYWORDS,
351
+ contains: [
352
+ NAMED_ARGUMENT,
353
+ VARIABLE,
354
+ LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,
355
+ hljs.C_BLOCK_COMMENT_MODE,
356
+ hljs.C_LINE_COMMENT_MODE,
357
+ hljs.HASH_COMMENT_MODE,
358
+ STRING,
359
+ NUMBER,
360
+ CONSTRUCTOR_CALL
361
+ ]
362
+ };
363
+ const FUNCTION_INVOKE = {
364
+ relevance: 0,
365
+ match: [
366
+ /\b/,
367
+ regex.concat("(?!fn\\b|function\\b|", normalizeKeywords(KWS).join("\\b|"), "|", normalizeKeywords(BUILT_INS).join("\\b|"), "\\b)"),
368
+ IDENT_RE,
369
+ regex.concat(WHITESPACE, "*"),
370
+ regex.lookahead(/(?=\()/)
371
+ ],
372
+ scope: { 3: "title.function.invoke" },
373
+ contains: [PARAMS_MODE]
374
+ };
375
+ PARAMS_MODE.contains.push(FUNCTION_INVOKE);
376
+ const ATTRIBUTE_CONTAINS = [
377
+ NAMED_ARGUMENT,
378
+ LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,
379
+ hljs.C_BLOCK_COMMENT_MODE,
380
+ hljs.C_LINE_COMMENT_MODE,
381
+ hljs.HASH_COMMENT_MODE,
382
+ STRING,
383
+ NUMBER,
384
+ CONSTRUCTOR_CALL
385
+ ];
386
+ const ATTRIBUTES = {
387
+ begin: regex.concat(/#\[\s*\\?/, regex.either(PASCAL_CASE_CLASS_NAME_RE, UPCASE_NAME_RE)),
388
+ beginScope: "meta",
389
+ end: /]/,
390
+ endScope: "meta",
391
+ keywords: {
392
+ literal: LITERALS,
393
+ keyword: ["new", "array"]
394
+ },
395
+ contains: [
396
+ {
397
+ begin: /\[/,
398
+ end: /]/,
399
+ keywords: {
400
+ literal: LITERALS,
401
+ keyword: ["new", "array"]
402
+ },
403
+ contains: ["self", ...ATTRIBUTE_CONTAINS]
404
+ },
405
+ ...ATTRIBUTE_CONTAINS,
406
+ {
407
+ scope: "meta",
408
+ variants: [{ match: PASCAL_CASE_CLASS_NAME_RE }, { match: UPCASE_NAME_RE }]
409
+ }
410
+ ]
411
+ };
412
+ return {
413
+ case_insensitive: false,
414
+ keywords: KEYWORDS,
415
+ contains: [
416
+ ATTRIBUTES,
417
+ hljs.HASH_COMMENT_MODE,
418
+ hljs.COMMENT("//", "$"),
419
+ hljs.COMMENT("/\\*", "\\*/", { contains: [{
420
+ scope: "doctag",
421
+ match: "@[A-Za-z]+"
422
+ }] }),
423
+ {
424
+ match: /__halt_compiler\(\);/,
425
+ keywords: "__halt_compiler",
426
+ starts: {
427
+ scope: "comment",
428
+ end: hljs.MATCH_NOTHING_RE,
429
+ contains: [{
430
+ match: /\?>/,
431
+ scope: "meta",
432
+ endsParent: true
433
+ }]
434
+ }
435
+ },
436
+ PREPROCESSOR,
437
+ {
438
+ scope: "variable.language",
439
+ match: /\$this\b/
440
+ },
441
+ VARIABLE,
442
+ FUNCTION_INVOKE,
443
+ LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,
444
+ {
445
+ match: [
446
+ /const/,
447
+ /\s/,
448
+ IDENT_RE
449
+ ],
450
+ scope: {
451
+ 1: "keyword",
452
+ 3: "variable.constant"
453
+ }
454
+ },
455
+ CONSTRUCTOR_CALL,
456
+ {
457
+ scope: "function",
458
+ relevance: 0,
459
+ beginKeywords: "fn function",
460
+ end: /[;{]/,
461
+ excludeEnd: true,
462
+ illegal: "[$%\\[]",
463
+ contains: [
464
+ { beginKeywords: "use" },
465
+ hljs.UNDERSCORE_TITLE_MODE,
466
+ {
467
+ begin: "=>",
468
+ endsParent: true
469
+ },
470
+ {
471
+ scope: "params",
472
+ begin: "\\(",
473
+ end: "\\)",
474
+ excludeBegin: true,
475
+ excludeEnd: true,
476
+ keywords: KEYWORDS,
477
+ contains: [
478
+ "self",
479
+ ATTRIBUTES,
480
+ VARIABLE,
481
+ LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,
482
+ hljs.C_BLOCK_COMMENT_MODE,
483
+ hljs.C_LINE_COMMENT_MODE,
484
+ hljs.HASH_COMMENT_MODE,
485
+ STRING,
486
+ NUMBER
487
+ ]
488
+ }
489
+ ]
490
+ },
491
+ {
492
+ scope: "class",
493
+ variants: [{
494
+ beginKeywords: "enum",
495
+ illegal: /[($"]/
496
+ }, {
497
+ beginKeywords: "class interface trait",
498
+ illegal: /[:($"]/
499
+ }],
500
+ relevance: 0,
501
+ end: /\{/,
502
+ excludeEnd: true,
503
+ contains: [{ beginKeywords: "extends implements" }, hljs.UNDERSCORE_TITLE_MODE]
504
+ },
505
+ {
506
+ beginKeywords: "namespace",
507
+ relevance: 0,
508
+ end: ";",
509
+ illegal: /[.']/,
510
+ contains: [hljs.inherit(hljs.UNDERSCORE_TITLE_MODE, { scope: "title.class" })]
511
+ },
512
+ {
513
+ beginKeywords: "use",
514
+ relevance: 0,
515
+ end: ";",
516
+ contains: [{
517
+ match: /\b(as|const|function)\b/,
518
+ scope: "keyword"
519
+ }, hljs.UNDERSCORE_TITLE_MODE]
520
+ },
521
+ STRING,
522
+ NUMBER
523
+ ]
524
+ };
525
+ }
526
+ //#endregion
527
+ export { php as default };
@@ -0,0 +1,10 @@
1
+ //#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/plaintext.js
2
+ function plaintext(hljs) {
3
+ return {
4
+ name: "Plain text",
5
+ aliases: ["text", "txt"],
6
+ disableAutodetect: true
7
+ };
8
+ }
9
+ //#endregion
10
+ export { plaintext as default };
@@ -0,0 +1,60 @@
1
+ //#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/pony.js
2
+ function pony(hljs) {
3
+ /**
4
+ * The `FUNCTION` and `CLASS` modes were intentionally removed to simplify
5
+ * highlighting and fix cases like
6
+ * ```
7
+ * interface Iterator[A: A]
8
+ * fun has_next(): Bool
9
+ * fun next(): A?
10
+ * ```
11
+ * where it is valid to have a function head without a body
12
+ */
13
+ return {
14
+ name: "Pony",
15
+ keywords: {
16
+ keyword: "actor addressof and as be break class compile_error compile_intrinsic consume continue delegate digestof do else elseif embed end error for fun if ifdef in interface is isnt lambda let match new not object or primitive recover repeat return struct then trait try type until use var where while with xor",
17
+ meta: "iso val tag trn box ref",
18
+ literal: "this false true"
19
+ },
20
+ contains: [
21
+ {
22
+ className: "type",
23
+ begin: "\\b_?[A-Z][\\w]*",
24
+ relevance: 0
25
+ },
26
+ {
27
+ className: "string",
28
+ begin: "\"\"\"",
29
+ end: "\"\"\"",
30
+ relevance: 10
31
+ },
32
+ {
33
+ className: "string",
34
+ begin: "\"",
35
+ end: "\"",
36
+ contains: [hljs.BACKSLASH_ESCAPE]
37
+ },
38
+ {
39
+ className: "string",
40
+ begin: "'",
41
+ end: "'",
42
+ contains: [hljs.BACKSLASH_ESCAPE],
43
+ relevance: 0
44
+ },
45
+ {
46
+ begin: hljs.IDENT_RE + "'",
47
+ relevance: 0
48
+ },
49
+ {
50
+ className: "number",
51
+ begin: "(-?)(\\b0[xX][a-fA-F0-9]+|\\b0[bB][01]+|(\\b\\d+(_\\d+)?(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",
52
+ relevance: 0
53
+ },
54
+ hljs.C_LINE_COMMENT_MODE,
55
+ hljs.C_BLOCK_COMMENT_MODE
56
+ ]
57
+ };
58
+ }
59
+ //#endregion
60
+ export { pony as default };