@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,37 @@
1
+ //#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/taggerscript.js
2
+ function taggerscript(hljs) {
3
+ return {
4
+ name: "Tagger Script",
5
+ contains: [
6
+ {
7
+ className: "comment",
8
+ begin: /\$noop\(/,
9
+ end: /\)/,
10
+ contains: [{ begin: /\\[()]/ }, {
11
+ begin: /\(/,
12
+ end: /\)/,
13
+ contains: [{ begin: /\\[()]/ }, "self"]
14
+ }],
15
+ relevance: 10
16
+ },
17
+ {
18
+ className: "keyword",
19
+ begin: /\$[_a-zA-Z0-9]+(?=\()/
20
+ },
21
+ {
22
+ className: "variable",
23
+ begin: /%[_a-zA-Z0-9:]+%/
24
+ },
25
+ {
26
+ className: "symbol",
27
+ begin: /\\[\\nt$%,()]/
28
+ },
29
+ {
30
+ className: "symbol",
31
+ begin: /\\u[a-fA-F0-9]{4}/
32
+ }
33
+ ]
34
+ };
35
+ }
36
+ //#endregion
37
+ export { taggerscript as default };
@@ -0,0 +1,30 @@
1
+ //#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/tap.js
2
+ function tap(hljs) {
3
+ return {
4
+ name: "Test Anything Protocol",
5
+ case_insensitive: true,
6
+ contains: [
7
+ hljs.HASH_COMMENT_MODE,
8
+ {
9
+ className: "meta",
10
+ variants: [{ begin: "^TAP version (\\d+)$" }, { begin: "^1\\.\\.(\\d+)$" }]
11
+ },
12
+ {
13
+ begin: /---$/,
14
+ end: "\\.\\.\\.$",
15
+ subLanguage: "yaml",
16
+ relevance: 0
17
+ },
18
+ {
19
+ className: "number",
20
+ begin: " (\\d+) "
21
+ },
22
+ {
23
+ className: "symbol",
24
+ variants: [{ begin: "^ok" }, { begin: "^not ok" }]
25
+ }
26
+ ]
27
+ };
28
+ }
29
+ //#endregion
30
+ export { tap as default };
@@ -0,0 +1,165 @@
1
+ //#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/tcl.js
2
+ function tcl(hljs) {
3
+ const regex = hljs.regex;
4
+ const TCL_IDENT = /[a-zA-Z_][a-zA-Z0-9_]*/;
5
+ const NUMBER = {
6
+ className: "number",
7
+ variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]
8
+ };
9
+ return {
10
+ name: "Tcl",
11
+ aliases: ["tk"],
12
+ keywords: [
13
+ "after",
14
+ "append",
15
+ "apply",
16
+ "array",
17
+ "auto_execok",
18
+ "auto_import",
19
+ "auto_load",
20
+ "auto_mkindex",
21
+ "auto_mkindex_old",
22
+ "auto_qualify",
23
+ "auto_reset",
24
+ "bgerror",
25
+ "binary",
26
+ "break",
27
+ "catch",
28
+ "cd",
29
+ "chan",
30
+ "clock",
31
+ "close",
32
+ "concat",
33
+ "continue",
34
+ "dde",
35
+ "dict",
36
+ "encoding",
37
+ "eof",
38
+ "error",
39
+ "eval",
40
+ "exec",
41
+ "exit",
42
+ "expr",
43
+ "fblocked",
44
+ "fconfigure",
45
+ "fcopy",
46
+ "file",
47
+ "fileevent",
48
+ "filename",
49
+ "flush",
50
+ "for",
51
+ "foreach",
52
+ "format",
53
+ "gets",
54
+ "glob",
55
+ "global",
56
+ "history",
57
+ "http",
58
+ "if",
59
+ "incr",
60
+ "info",
61
+ "interp",
62
+ "join",
63
+ "lappend|10",
64
+ "lassign|10",
65
+ "lindex|10",
66
+ "linsert|10",
67
+ "list",
68
+ "llength|10",
69
+ "load",
70
+ "lrange|10",
71
+ "lrepeat|10",
72
+ "lreplace|10",
73
+ "lreverse|10",
74
+ "lsearch|10",
75
+ "lset|10",
76
+ "lsort|10",
77
+ "mathfunc",
78
+ "mathop",
79
+ "memory",
80
+ "msgcat",
81
+ "namespace",
82
+ "open",
83
+ "package",
84
+ "parray",
85
+ "pid",
86
+ "pkg::create",
87
+ "pkg_mkIndex",
88
+ "platform",
89
+ "platform::shell",
90
+ "proc",
91
+ "puts",
92
+ "pwd",
93
+ "read",
94
+ "refchan",
95
+ "regexp",
96
+ "registry",
97
+ "regsub|10",
98
+ "rename",
99
+ "return",
100
+ "safe",
101
+ "scan",
102
+ "seek",
103
+ "set",
104
+ "socket",
105
+ "source",
106
+ "split",
107
+ "string",
108
+ "subst",
109
+ "switch",
110
+ "tcl_endOfWord",
111
+ "tcl_findLibrary",
112
+ "tcl_startOfNextWord",
113
+ "tcl_startOfPreviousWord",
114
+ "tcl_wordBreakAfter",
115
+ "tcl_wordBreakBefore",
116
+ "tcltest",
117
+ "tclvars",
118
+ "tell",
119
+ "time",
120
+ "tm",
121
+ "trace",
122
+ "unknown",
123
+ "unload",
124
+ "unset",
125
+ "update",
126
+ "uplevel",
127
+ "upvar",
128
+ "variable",
129
+ "vwait",
130
+ "while"
131
+ ],
132
+ contains: [
133
+ hljs.COMMENT(";[ \\t]*#", "$"),
134
+ hljs.COMMENT("^[ \\t]*#", "$"),
135
+ {
136
+ beginKeywords: "proc",
137
+ end: "[\\{]",
138
+ excludeEnd: true,
139
+ contains: [{
140
+ className: "title",
141
+ begin: "[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",
142
+ end: "[ \\t\\n\\r]",
143
+ endsWithParent: true,
144
+ excludeEnd: true
145
+ }]
146
+ },
147
+ {
148
+ className: "variable",
149
+ variants: [{ begin: regex.concat(/\$/, regex.optional(/::/), TCL_IDENT, "(::", TCL_IDENT, ")*") }, {
150
+ begin: "\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",
151
+ end: "\\}",
152
+ contains: [NUMBER]
153
+ }]
154
+ },
155
+ {
156
+ className: "string",
157
+ contains: [hljs.BACKSLASH_ESCAPE],
158
+ variants: [hljs.inherit(hljs.QUOTE_STRING_MODE, { illegal: null })]
159
+ },
160
+ NUMBER
161
+ ]
162
+ };
163
+ }
164
+ //#endregion
165
+ export { tcl as default };
@@ -0,0 +1,65 @@
1
+ //#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/thrift.js
2
+ function thrift(hljs) {
3
+ const TYPES = [
4
+ "bool",
5
+ "byte",
6
+ "i16",
7
+ "i32",
8
+ "i64",
9
+ "double",
10
+ "string",
11
+ "binary"
12
+ ];
13
+ return {
14
+ name: "Thrift",
15
+ keywords: {
16
+ keyword: [
17
+ "namespace",
18
+ "const",
19
+ "typedef",
20
+ "struct",
21
+ "enum",
22
+ "service",
23
+ "exception",
24
+ "void",
25
+ "oneway",
26
+ "set",
27
+ "list",
28
+ "map",
29
+ "required",
30
+ "optional"
31
+ ],
32
+ type: TYPES,
33
+ literal: "true false"
34
+ },
35
+ contains: [
36
+ hljs.QUOTE_STRING_MODE,
37
+ hljs.NUMBER_MODE,
38
+ hljs.C_LINE_COMMENT_MODE,
39
+ hljs.C_BLOCK_COMMENT_MODE,
40
+ {
41
+ className: "class",
42
+ beginKeywords: "struct enum service exception",
43
+ end: /\{/,
44
+ illegal: /\n/,
45
+ contains: [hljs.inherit(hljs.TITLE_MODE, { starts: {
46
+ endsWithParent: true,
47
+ excludeEnd: true
48
+ } })]
49
+ },
50
+ {
51
+ begin: "\\b(set|list|map)\\s*<",
52
+ keywords: { type: [
53
+ ...TYPES,
54
+ "set",
55
+ "list",
56
+ "map"
57
+ ] },
58
+ end: ">",
59
+ contains: ["self"]
60
+ }
61
+ ]
62
+ };
63
+ }
64
+ //#endregion
65
+ export { thrift as default };
@@ -0,0 +1,155 @@
1
+ //#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/tp.js
2
+ function tp(hljs) {
3
+ const TPID = {
4
+ className: "number",
5
+ begin: "[1-9][0-9]*",
6
+ relevance: 0
7
+ };
8
+ const TPLABEL = {
9
+ className: "symbol",
10
+ begin: ":[^\\]]+"
11
+ };
12
+ return {
13
+ name: "TP",
14
+ keywords: {
15
+ keyword: [
16
+ "ABORT",
17
+ "ACC",
18
+ "ADJUST",
19
+ "AND",
20
+ "AP_LD",
21
+ "BREAK",
22
+ "CALL",
23
+ "CNT",
24
+ "COL",
25
+ "CONDITION",
26
+ "CONFIG",
27
+ "DA",
28
+ "DB",
29
+ "DIV",
30
+ "DETECT",
31
+ "ELSE",
32
+ "END",
33
+ "ENDFOR",
34
+ "ERR_NUM",
35
+ "ERROR_PROG",
36
+ "FINE",
37
+ "FOR",
38
+ "GP",
39
+ "GUARD",
40
+ "INC",
41
+ "IF",
42
+ "JMP",
43
+ "LINEAR_MAX_SPEED",
44
+ "LOCK",
45
+ "MOD",
46
+ "MONITOR",
47
+ "OFFSET",
48
+ "Offset",
49
+ "OR",
50
+ "OVERRIDE",
51
+ "PAUSE",
52
+ "PREG",
53
+ "PTH",
54
+ "RT_LD",
55
+ "RUN",
56
+ "SELECT",
57
+ "SKIP",
58
+ "Skip",
59
+ "TA",
60
+ "TB",
61
+ "TO",
62
+ "TOOL_OFFSET",
63
+ "Tool_Offset",
64
+ "UF",
65
+ "UT",
66
+ "UFRAME_NUM",
67
+ "UTOOL_NUM",
68
+ "UNLOCK",
69
+ "WAIT",
70
+ "X",
71
+ "Y",
72
+ "Z",
73
+ "W",
74
+ "P",
75
+ "R",
76
+ "STRLEN",
77
+ "SUBSTR",
78
+ "FINDSTR",
79
+ "VOFFSET",
80
+ "PROG",
81
+ "ATTR",
82
+ "MN",
83
+ "POS"
84
+ ],
85
+ literal: [
86
+ "ON",
87
+ "OFF",
88
+ "max_speed",
89
+ "LPOS",
90
+ "JPOS",
91
+ "ENABLE",
92
+ "DISABLE",
93
+ "START",
94
+ "STOP",
95
+ "RESET"
96
+ ]
97
+ },
98
+ contains: [
99
+ {
100
+ className: "built_in",
101
+ begin: "(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",
102
+ end: "\\]",
103
+ contains: [
104
+ "self",
105
+ TPID,
106
+ TPLABEL
107
+ ]
108
+ },
109
+ {
110
+ className: "built_in",
111
+ begin: "(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",
112
+ end: "\\]",
113
+ contains: [
114
+ "self",
115
+ TPID,
116
+ hljs.QUOTE_STRING_MODE,
117
+ TPLABEL
118
+ ]
119
+ },
120
+ {
121
+ className: "keyword",
122
+ begin: "/(PROG|ATTR|MN|POS|END)\\b"
123
+ },
124
+ {
125
+ className: "keyword",
126
+ begin: "(CALL|RUN|POINT_LOGIC|LBL)\\b"
127
+ },
128
+ {
129
+ className: "keyword",
130
+ begin: "\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"
131
+ },
132
+ {
133
+ className: "number",
134
+ begin: "\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",
135
+ relevance: 0
136
+ },
137
+ hljs.COMMENT("//", "[;$]"),
138
+ hljs.COMMENT("!", "[;$]"),
139
+ hljs.COMMENT("--eg:", "$"),
140
+ hljs.QUOTE_STRING_MODE,
141
+ {
142
+ className: "string",
143
+ begin: "'",
144
+ end: "'"
145
+ },
146
+ hljs.C_NUMBER_MODE,
147
+ {
148
+ className: "variable",
149
+ begin: "\\$[A-Za-z0-9_]+"
150
+ }
151
+ ]
152
+ };
153
+ }
154
+ //#endregion
155
+ export { tp as default };
@@ -0,0 +1,232 @@
1
+ //#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/twig.js
2
+ function twig(hljs) {
3
+ const regex = hljs.regex;
4
+ const FUNCTION_NAMES = [
5
+ "absolute_url",
6
+ "asset|0",
7
+ "asset_version",
8
+ "attribute",
9
+ "block",
10
+ "constant",
11
+ "controller|0",
12
+ "country_timezones",
13
+ "csrf_token",
14
+ "cycle",
15
+ "date",
16
+ "dump",
17
+ "expression",
18
+ "form|0",
19
+ "form_end",
20
+ "form_errors",
21
+ "form_help",
22
+ "form_label",
23
+ "form_rest",
24
+ "form_row",
25
+ "form_start",
26
+ "form_widget",
27
+ "html_classes",
28
+ "include",
29
+ "is_granted",
30
+ "logout_path",
31
+ "logout_url",
32
+ "max",
33
+ "min",
34
+ "parent",
35
+ "path|0",
36
+ "random",
37
+ "range",
38
+ "relative_path",
39
+ "render",
40
+ "render_esi",
41
+ "source",
42
+ "template_from_string",
43
+ "url|0"
44
+ ];
45
+ const FILTERS = [
46
+ "abs",
47
+ "abbr_class",
48
+ "abbr_method",
49
+ "batch",
50
+ "capitalize",
51
+ "column",
52
+ "convert_encoding",
53
+ "country_name",
54
+ "currency_name",
55
+ "currency_symbol",
56
+ "data_uri",
57
+ "date",
58
+ "date_modify",
59
+ "default",
60
+ "escape",
61
+ "file_excerpt",
62
+ "file_link",
63
+ "file_relative",
64
+ "filter",
65
+ "first",
66
+ "format",
67
+ "format_args",
68
+ "format_args_as_text",
69
+ "format_currency",
70
+ "format_date",
71
+ "format_datetime",
72
+ "format_file",
73
+ "format_file_from_text",
74
+ "format_number",
75
+ "format_time",
76
+ "html_to_markdown",
77
+ "humanize",
78
+ "inky_to_html",
79
+ "inline_css",
80
+ "join",
81
+ "json_encode",
82
+ "keys",
83
+ "language_name",
84
+ "last",
85
+ "length",
86
+ "locale_name",
87
+ "lower",
88
+ "map",
89
+ "markdown",
90
+ "markdown_to_html",
91
+ "merge",
92
+ "nl2br",
93
+ "number_format",
94
+ "raw",
95
+ "reduce",
96
+ "replace",
97
+ "reverse",
98
+ "round",
99
+ "slice",
100
+ "slug",
101
+ "sort",
102
+ "spaceless",
103
+ "split",
104
+ "striptags",
105
+ "timezone_name",
106
+ "title",
107
+ "trans",
108
+ "transchoice",
109
+ "trim",
110
+ "u|0",
111
+ "upper",
112
+ "url_encode",
113
+ "yaml_dump",
114
+ "yaml_encode"
115
+ ];
116
+ let TAG_NAMES = [
117
+ "apply",
118
+ "autoescape",
119
+ "block",
120
+ "cache",
121
+ "deprecated",
122
+ "do",
123
+ "embed",
124
+ "extends",
125
+ "filter",
126
+ "flush",
127
+ "for",
128
+ "form_theme",
129
+ "from",
130
+ "if",
131
+ "import",
132
+ "include",
133
+ "macro",
134
+ "sandbox",
135
+ "set",
136
+ "stopwatch",
137
+ "trans",
138
+ "trans_default_domain",
139
+ "transchoice",
140
+ "use",
141
+ "verbatim",
142
+ "with"
143
+ ];
144
+ TAG_NAMES = TAG_NAMES.concat(TAG_NAMES.map((t) => `end${t}`));
145
+ const STRING = {
146
+ scope: "string",
147
+ variants: [{
148
+ begin: /'/,
149
+ end: /'/
150
+ }, {
151
+ begin: /"/,
152
+ end: /"/
153
+ }]
154
+ };
155
+ const NUMBER = {
156
+ scope: "number",
157
+ match: /\d+/
158
+ };
159
+ const PARAMS = {
160
+ begin: /\(/,
161
+ end: /\)/,
162
+ excludeBegin: true,
163
+ excludeEnd: true,
164
+ contains: [STRING, NUMBER]
165
+ };
166
+ const FUNCTIONS = {
167
+ beginKeywords: FUNCTION_NAMES.join(" "),
168
+ keywords: { name: FUNCTION_NAMES },
169
+ relevance: 0,
170
+ contains: [PARAMS]
171
+ };
172
+ const FILTER = {
173
+ match: /\|(?=[A-Za-z_]+:?)/,
174
+ beginScope: "punctuation",
175
+ relevance: 0,
176
+ contains: [{
177
+ match: /[A-Za-z_]+:?/,
178
+ keywords: FILTERS
179
+ }]
180
+ };
181
+ const tagNamed = (tagnames, { relevance }) => {
182
+ return {
183
+ beginScope: {
184
+ 1: "template-tag",
185
+ 3: "name"
186
+ },
187
+ relevance: relevance || 2,
188
+ endScope: "template-tag",
189
+ begin: [
190
+ /\{%/,
191
+ /\s*/,
192
+ regex.either(...tagnames)
193
+ ],
194
+ end: /%\}/,
195
+ keywords: "in",
196
+ contains: [
197
+ FILTER,
198
+ FUNCTIONS,
199
+ STRING,
200
+ NUMBER
201
+ ]
202
+ };
203
+ };
204
+ const CUSTOM_TAG_RE = /[a-z_]+/;
205
+ const TAG = tagNamed(TAG_NAMES, { relevance: 2 });
206
+ const CUSTOM_TAG = tagNamed([CUSTOM_TAG_RE], { relevance: 1 });
207
+ return {
208
+ name: "Twig",
209
+ aliases: ["craftcms"],
210
+ case_insensitive: true,
211
+ subLanguage: "xml",
212
+ contains: [
213
+ hljs.COMMENT(/\{#/, /#\}/),
214
+ TAG,
215
+ CUSTOM_TAG,
216
+ {
217
+ className: "template-variable",
218
+ begin: /\{\{/,
219
+ end: /\}\}/,
220
+ contains: [
221
+ "self",
222
+ FILTER,
223
+ FUNCTIONS,
224
+ STRING,
225
+ NUMBER
226
+ ]
227
+ }
228
+ ]
229
+ };
230
+ }
231
+ //#endregion
232
+ export { twig as default };