@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.
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +34 -3
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.js +55 -0
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +7 -2
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.js +29 -0
- package/components/ui-tree-item/ui-tree-item.html +5 -5
- package/components/ui-tree-item/ui-tree-item.js +20 -3
- package/dist/index.js +1 -1
- package/editor/chunks/extensions.js +24 -3
- package/editor/extensions/preset.d.ts +2 -0
- package/editor/extensions/table-commands.d.ts +1 -1
- package/editor/table-overlay.d.ts +8 -3
- package/package.json +2 -1
- package/styles/ui-editor-table-overlay.css +30 -0
- package/styles/ui-editor-table-toolbar.css +7 -2
- package/styles/ui-tree-item.css +5 -5
- package/vanilla/UiEditorTableOverlay.d.ts +1 -1
- package/vanilla/UiEditorTableOverlay.js +9 -3
- package/vue/UiEditorTableOverlay.d.ts +8 -0
- package/vue/UiEditorTableOverlay.vue +45 -2
- package/vue/UiEditorTableToolbar.vue +7 -2
- package/vue/UiTreeItem.vue +5 -5
- package/vue/chunks/1c.js +106 -0
- package/vue/chunks/UiEditorTableOverlay.js +14 -4
- package/vue/chunks/UiEditorTableToolbar.js +1 -1
- package/vue/chunks/UiTreeItem.js +1 -1
- package/vue/chunks/abnf.js +61 -0
- package/vue/chunks/accesslog.js +72 -0
- package/vue/chunks/actionscript.js +139 -0
- package/vue/chunks/ada.js +183 -0
- package/vue/chunks/angelscript.js +141 -0
- package/vue/chunks/apache.js +88 -0
- package/vue/chunks/applescript.js +99 -0
- package/vue/chunks/arcade.js +405 -0
- package/vue/chunks/arduino.js +871 -0
- package/vue/chunks/armasm.js +65 -0
- package/vue/chunks/asciidoc.js +181 -0
- package/vue/chunks/aspectj.js +202 -0
- package/vue/chunks/autohotkey.js +54 -0
- package/vue/chunks/autoit.js +132 -0
- package/vue/chunks/avrasm.js +46 -0
- package/vue/chunks/awk.js +58 -0
- package/vue/chunks/axapta.js +167 -0
- package/vue/chunks/bash.js +358 -0
- package/vue/chunks/basic.js +221 -0
- package/vue/chunks/bnf.js +27 -0
- package/vue/chunks/brainfuck.js +40 -0
- package/vue/chunks/c.js +265 -0
- package/vue/chunks/cal.js +136 -0
- package/vue/chunks/capnproto.js +86 -0
- package/vue/chunks/ceylon.js +125 -0
- package/vue/chunks/clean.js +54 -0
- package/vue/chunks/clojure-repl.js +17 -0
- package/vue/chunks/clojure.js +133 -0
- package/vue/chunks/cmake.js +23 -0
- package/vue/chunks/coffeescript.js +291 -0
- package/vue/chunks/coq.js +436 -0
- package/vue/chunks/cos.js +77 -0
- package/vue/chunks/cpp.js +492 -0
- package/vue/chunks/crmsh.js +80 -0
- package/vue/chunks/crystal.js +260 -0
- package/vue/chunks/csharp.js +376 -0
- package/vue/chunks/csp.js +52 -0
- package/vue/chunks/css.js +890 -0
- package/vue/chunks/d.js +184 -0
- package/vue/chunks/dart.js +226 -0
- package/vue/chunks/delphi.js +227 -0
- package/vue/chunks/diff.js +40 -0
- package/vue/chunks/django.js +43 -0
- package/vue/chunks/dns.js +66 -0
- package/vue/chunks/dockerfile.js +35 -0
- package/vue/chunks/dos.js +147 -0
- package/vue/chunks/dsconfig.js +55 -0
- package/vue/chunks/dts.js +119 -0
- package/vue/chunks/dust.js +33 -0
- package/vue/chunks/ebnf.js +40 -0
- package/vue/chunks/elixir.js +241 -0
- package/vue/chunks/elm.js +103 -0
- package/vue/chunks/erb.js +17 -0
- package/vue/chunks/erlang-repl.js +41 -0
- package/vue/chunks/erlang.js +236 -0
- package/vue/chunks/excel.js +562 -0
- package/vue/chunks/fix.js +30 -0
- package/vue/chunks/flix.js +60 -0
- package/vue/chunks/fortran.js +543 -0
- package/vue/chunks/fsharp.js +440 -0
- package/vue/chunks/gams.js +134 -0
- package/vue/chunks/gauss.js +167 -0
- package/vue/chunks/gcode.js +131 -0
- package/vue/chunks/gherkin.js +41 -0
- package/vue/chunks/glsl.js +25 -0
- package/vue/chunks/gml.js +3119 -0
- package/vue/chunks/go.js +140 -0
- package/vue/chunks/golo.js +72 -0
- package/vue/chunks/gradle.js +181 -0
- package/vue/chunks/graphql.js +68 -0
- package/vue/chunks/groovy.js +159 -0
- package/vue/chunks/haml.js +96 -0
- package/vue/chunks/handlebars.js +191 -0
- package/vue/chunks/haskell.js +149 -0
- package/vue/chunks/haxe.js +142 -0
- package/vue/chunks/hsp.js +45 -0
- package/vue/chunks/http.js +77 -0
- package/vue/chunks/hy.js +92 -0
- package/vue/chunks/inform7.js +45 -0
- package/vue/chunks/ini.js +94 -0
- package/vue/chunks/irpf90.js +52 -0
- package/vue/chunks/isbl.js +112 -0
- package/vue/chunks/java.js +237 -0
- package/vue/chunks/javascript.js +570 -0
- package/vue/chunks/jboss-cli.js +46 -0
- package/vue/chunks/json.js +45 -0
- package/vue/chunks/julia-repl.js +18 -0
- package/vue/chunks/julia.js +353 -0
- package/vue/chunks/kotlin.js +216 -0
- package/vue/chunks/lasso.js +127 -0
- package/vue/chunks/latex.js +206 -0
- package/vue/chunks/ldif.js +25 -0
- package/vue/chunks/leaf.js +72 -0
- package/vue/chunks/less.js +953 -0
- package/vue/chunks/lisp.js +119 -0
- package/vue/chunks/livecodeserver.js +86 -0
- package/vue/chunks/livescript.js +309 -0
- package/vue/chunks/llvm.js +77 -0
- package/vue/chunks/lsl.js +55 -0
- package/vue/chunks/lua.js +49 -0
- package/vue/chunks/makefile.js +62 -0
- package/vue/chunks/markdown.js +194 -0
- package/vue/chunks/mathematica.js +7317 -0
- package/vue/chunks/matlab.js +70 -0
- package/vue/chunks/maxima.js +38 -0
- package/vue/chunks/mel.js +24 -0
- package/vue/chunks/mercury.js +62 -0
- package/vue/chunks/mipsasm.js +53 -0
- package/vue/chunks/mizar.js +10 -0
- package/vue/chunks/mojolicious.js +27 -0
- package/vue/chunks/monkey.js +158 -0
- package/vue/chunks/moonscript.js +102 -0
- package/vue/chunks/n1ql.js +346 -0
- package/vue/chunks/nestedtext.js +66 -0
- package/vue/chunks/nginx.js +127 -0
- package/vue/chunks/nim.js +174 -0
- package/vue/chunks/nix.js +334 -0
- package/vue/chunks/node-repl.js +20 -0
- package/vue/chunks/nsis.js +515 -0
- package/vue/chunks/objectivec.js +235 -0
- package/vue/chunks/ocaml.js +52 -0
- package/vue/chunks/openscad.js +66 -0
- package/vue/chunks/oxygene.js +58 -0
- package/vue/chunks/parser3.js +40 -0
- package/vue/chunks/perl.js +454 -0
- package/vue/chunks/pf.js +30 -0
- package/vue/chunks/pgsql.js +196 -0
- package/vue/chunks/php-template.js +43 -0
- package/vue/chunks/php.js +527 -0
- package/vue/chunks/plaintext.js +10 -0
- package/vue/chunks/pony.js +60 -0
- package/vue/chunks/powershell.js +208 -0
- package/vue/chunks/processing.js +407 -0
- package/vue/chunks/profile.js +38 -0
- package/vue/chunks/prolog.js +62 -0
- package/vue/chunks/properties.js +45 -0
- package/vue/chunks/protobuf.js +63 -0
- package/vue/chunks/puppet.js +87 -0
- package/vue/chunks/purebasic.js +42 -0
- package/vue/chunks/python-repl.js +19 -0
- package/vue/chunks/python.js +357 -0
- package/vue/chunks/q.js +21 -0
- package/vue/chunks/qml.js +134 -0
- package/vue/chunks/r.js +145 -0
- package/vue/chunks/reasonml.js +134 -0
- package/vue/chunks/rib.js +16 -0
- package/vue/chunks/roboconf.js +54 -0
- package/vue/chunks/routeros.js +109 -0
- package/vue/chunks/rsl.js +138 -0
- package/vue/chunks/ruby.js +322 -0
- package/vue/chunks/ruleslanguage.js +26 -0
- package/vue/chunks/rust.js +296 -0
- package/vue/chunks/sas.js +533 -0
- package/vue/chunks/scala.js +173 -0
- package/vue/chunks/scheme.js +118 -0
- package/vue/chunks/scilab.js +45 -0
- package/vue/chunks/scss.js +900 -0
- package/vue/chunks/shell.js +18 -0
- package/vue/chunks/smali.js +113 -0
- package/vue/chunks/smalltalk.js +59 -0
- package/vue/chunks/sml.js +49 -0
- package/vue/chunks/sqf.js +2599 -0
- package/vue/chunks/sql.js +624 -0
- package/vue/chunks/stan.js +471 -0
- package/vue/chunks/stata.js +33 -0
- package/vue/chunks/step21.js +53 -0
- package/vue/chunks/stylus.js +925 -0
- package/vue/chunks/subunit.js +34 -0
- package/vue/chunks/swift.js +699 -0
- package/vue/chunks/taggerscript.js +37 -0
- package/vue/chunks/tap.js +30 -0
- package/vue/chunks/tcl.js +165 -0
- package/vue/chunks/thrift.js +65 -0
- package/vue/chunks/tp.js +155 -0
- package/vue/chunks/twig.js +232 -0
- package/vue/chunks/typescript.js +672 -0
- package/vue/chunks/vala.js +39 -0
- package/vue/chunks/vbnet.js +86 -0
- package/vue/chunks/vbscript-html.js +14 -0
- package/vue/chunks/vbscript.js +200 -0
- package/vue/chunks/verilog.js +534 -0
- package/vue/chunks/vhdl.js +190 -0
- package/vue/chunks/vim.js +54 -0
- package/vue/chunks/wasm.js +111 -0
- package/vue/chunks/wren.js +229 -0
- package/vue/chunks/x86asm.js +64 -0
- package/vue/chunks/xl.js +192 -0
- package/vue/chunks/xml.js +175 -0
- package/vue/chunks/xquery.js +303 -0
- package/vue/chunks/yaml.js +159 -0
- package/vue/chunks/zephir.js +74 -0
- package/vue/components.css +204 -170
- package/vue/editor/LoomaEditor.d.ts +7 -7
- package/vue/editor/code-language-catalog.d.ts +196 -0
- package/vue/editor/index.js +290 -20
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/rust.js
|
|
2
|
+
/** @type LanguageFn */
|
|
3
|
+
function rust(hljs) {
|
|
4
|
+
const regex = hljs.regex;
|
|
5
|
+
const RAW_IDENTIFIER = /(r#)?/;
|
|
6
|
+
const UNDERSCORE_IDENT_RE = regex.concat(RAW_IDENTIFIER, hljs.UNDERSCORE_IDENT_RE);
|
|
7
|
+
const IDENT_RE = regex.concat(RAW_IDENTIFIER, hljs.IDENT_RE);
|
|
8
|
+
const FUNCTION_INVOKE = {
|
|
9
|
+
className: "title.function.invoke",
|
|
10
|
+
relevance: 0,
|
|
11
|
+
begin: regex.concat(/\b/, /(?!let|for|while|if|else|match\b)/, IDENT_RE, regex.lookahead(/\s*\(/))
|
|
12
|
+
};
|
|
13
|
+
const NUMBER_SUFFIX = "([ui](8|16|32|64|128|size)|f(32|64))?";
|
|
14
|
+
const KEYWORDS = [
|
|
15
|
+
"abstract",
|
|
16
|
+
"as",
|
|
17
|
+
"async",
|
|
18
|
+
"await",
|
|
19
|
+
"become",
|
|
20
|
+
"box",
|
|
21
|
+
"break",
|
|
22
|
+
"const",
|
|
23
|
+
"continue",
|
|
24
|
+
"crate",
|
|
25
|
+
"do",
|
|
26
|
+
"dyn",
|
|
27
|
+
"else",
|
|
28
|
+
"enum",
|
|
29
|
+
"extern",
|
|
30
|
+
"false",
|
|
31
|
+
"final",
|
|
32
|
+
"fn",
|
|
33
|
+
"for",
|
|
34
|
+
"if",
|
|
35
|
+
"impl",
|
|
36
|
+
"in",
|
|
37
|
+
"let",
|
|
38
|
+
"loop",
|
|
39
|
+
"macro",
|
|
40
|
+
"match",
|
|
41
|
+
"mod",
|
|
42
|
+
"move",
|
|
43
|
+
"mut",
|
|
44
|
+
"override",
|
|
45
|
+
"priv",
|
|
46
|
+
"pub",
|
|
47
|
+
"ref",
|
|
48
|
+
"return",
|
|
49
|
+
"self",
|
|
50
|
+
"Self",
|
|
51
|
+
"static",
|
|
52
|
+
"struct",
|
|
53
|
+
"super",
|
|
54
|
+
"trait",
|
|
55
|
+
"true",
|
|
56
|
+
"try",
|
|
57
|
+
"type",
|
|
58
|
+
"typeof",
|
|
59
|
+
"union",
|
|
60
|
+
"unsafe",
|
|
61
|
+
"unsized",
|
|
62
|
+
"use",
|
|
63
|
+
"virtual",
|
|
64
|
+
"where",
|
|
65
|
+
"while",
|
|
66
|
+
"yield"
|
|
67
|
+
];
|
|
68
|
+
const LITERALS = [
|
|
69
|
+
"true",
|
|
70
|
+
"false",
|
|
71
|
+
"Some",
|
|
72
|
+
"None",
|
|
73
|
+
"Ok",
|
|
74
|
+
"Err"
|
|
75
|
+
];
|
|
76
|
+
const BUILTINS = [
|
|
77
|
+
"drop ",
|
|
78
|
+
"Copy",
|
|
79
|
+
"Send",
|
|
80
|
+
"Sized",
|
|
81
|
+
"Sync",
|
|
82
|
+
"Drop",
|
|
83
|
+
"Fn",
|
|
84
|
+
"FnMut",
|
|
85
|
+
"FnOnce",
|
|
86
|
+
"ToOwned",
|
|
87
|
+
"Clone",
|
|
88
|
+
"Debug",
|
|
89
|
+
"PartialEq",
|
|
90
|
+
"PartialOrd",
|
|
91
|
+
"Eq",
|
|
92
|
+
"Ord",
|
|
93
|
+
"AsRef",
|
|
94
|
+
"AsMut",
|
|
95
|
+
"Into",
|
|
96
|
+
"From",
|
|
97
|
+
"Default",
|
|
98
|
+
"Iterator",
|
|
99
|
+
"Extend",
|
|
100
|
+
"IntoIterator",
|
|
101
|
+
"DoubleEndedIterator",
|
|
102
|
+
"ExactSizeIterator",
|
|
103
|
+
"SliceConcatExt",
|
|
104
|
+
"ToString",
|
|
105
|
+
"assert!",
|
|
106
|
+
"assert_eq!",
|
|
107
|
+
"bitflags!",
|
|
108
|
+
"bytes!",
|
|
109
|
+
"cfg!",
|
|
110
|
+
"col!",
|
|
111
|
+
"concat!",
|
|
112
|
+
"concat_idents!",
|
|
113
|
+
"debug_assert!",
|
|
114
|
+
"debug_assert_eq!",
|
|
115
|
+
"env!",
|
|
116
|
+
"eprintln!",
|
|
117
|
+
"panic!",
|
|
118
|
+
"file!",
|
|
119
|
+
"format!",
|
|
120
|
+
"format_args!",
|
|
121
|
+
"include_bytes!",
|
|
122
|
+
"include_str!",
|
|
123
|
+
"line!",
|
|
124
|
+
"local_data_key!",
|
|
125
|
+
"module_path!",
|
|
126
|
+
"option_env!",
|
|
127
|
+
"print!",
|
|
128
|
+
"println!",
|
|
129
|
+
"select!",
|
|
130
|
+
"stringify!",
|
|
131
|
+
"try!",
|
|
132
|
+
"unimplemented!",
|
|
133
|
+
"unreachable!",
|
|
134
|
+
"vec!",
|
|
135
|
+
"write!",
|
|
136
|
+
"writeln!",
|
|
137
|
+
"macro_rules!",
|
|
138
|
+
"assert_ne!",
|
|
139
|
+
"debug_assert_ne!"
|
|
140
|
+
];
|
|
141
|
+
const TYPES = [
|
|
142
|
+
"i8",
|
|
143
|
+
"i16",
|
|
144
|
+
"i32",
|
|
145
|
+
"i64",
|
|
146
|
+
"i128",
|
|
147
|
+
"isize",
|
|
148
|
+
"u8",
|
|
149
|
+
"u16",
|
|
150
|
+
"u32",
|
|
151
|
+
"u64",
|
|
152
|
+
"u128",
|
|
153
|
+
"usize",
|
|
154
|
+
"f32",
|
|
155
|
+
"f64",
|
|
156
|
+
"str",
|
|
157
|
+
"char",
|
|
158
|
+
"bool",
|
|
159
|
+
"Box",
|
|
160
|
+
"Option",
|
|
161
|
+
"Result",
|
|
162
|
+
"String",
|
|
163
|
+
"Vec"
|
|
164
|
+
];
|
|
165
|
+
return {
|
|
166
|
+
name: "Rust",
|
|
167
|
+
aliases: ["rs"],
|
|
168
|
+
keywords: {
|
|
169
|
+
$pattern: hljs.IDENT_RE + "!?",
|
|
170
|
+
type: TYPES,
|
|
171
|
+
keyword: KEYWORDS,
|
|
172
|
+
literal: LITERALS,
|
|
173
|
+
built_in: BUILTINS
|
|
174
|
+
},
|
|
175
|
+
illegal: "</",
|
|
176
|
+
contains: [
|
|
177
|
+
hljs.C_LINE_COMMENT_MODE,
|
|
178
|
+
hljs.COMMENT("/\\*", "\\*/", { contains: ["self"] }),
|
|
179
|
+
hljs.inherit(hljs.QUOTE_STRING_MODE, {
|
|
180
|
+
begin: /b?"/,
|
|
181
|
+
illegal: null
|
|
182
|
+
}),
|
|
183
|
+
{
|
|
184
|
+
className: "symbol",
|
|
185
|
+
begin: /'[a-zA-Z_][a-zA-Z0-9_]*(?!')/
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
scope: "string",
|
|
189
|
+
variants: [{ begin: /b?r(#*)"(.|\n)*?"\1(?!#)/ }, {
|
|
190
|
+
begin: /b?'/,
|
|
191
|
+
end: /'/,
|
|
192
|
+
contains: [{
|
|
193
|
+
scope: "char.escape",
|
|
194
|
+
match: /\\('|\w|x\w{2}|u\w{4}|U\w{8})/
|
|
195
|
+
}]
|
|
196
|
+
}]
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
className: "number",
|
|
200
|
+
variants: [
|
|
201
|
+
{ begin: "\\b0b([01_]+)" + NUMBER_SUFFIX },
|
|
202
|
+
{ begin: "\\b0o([0-7_]+)" + NUMBER_SUFFIX },
|
|
203
|
+
{ begin: "\\b0x([A-Fa-f0-9_]+)" + NUMBER_SUFFIX },
|
|
204
|
+
{ begin: "\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)" + NUMBER_SUFFIX }
|
|
205
|
+
],
|
|
206
|
+
relevance: 0
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
begin: [
|
|
210
|
+
/fn/,
|
|
211
|
+
/\s+/,
|
|
212
|
+
UNDERSCORE_IDENT_RE
|
|
213
|
+
],
|
|
214
|
+
className: {
|
|
215
|
+
1: "keyword",
|
|
216
|
+
3: "title.function"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
className: "meta",
|
|
221
|
+
begin: "#!?\\[",
|
|
222
|
+
end: "\\]",
|
|
223
|
+
contains: [{
|
|
224
|
+
className: "string",
|
|
225
|
+
begin: /"/,
|
|
226
|
+
end: /"/,
|
|
227
|
+
contains: [hljs.BACKSLASH_ESCAPE]
|
|
228
|
+
}]
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
begin: [
|
|
232
|
+
/let/,
|
|
233
|
+
/\s+/,
|
|
234
|
+
/(?:mut\s+)?/,
|
|
235
|
+
UNDERSCORE_IDENT_RE
|
|
236
|
+
],
|
|
237
|
+
className: {
|
|
238
|
+
1: "keyword",
|
|
239
|
+
3: "keyword",
|
|
240
|
+
4: "variable"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
begin: [
|
|
245
|
+
/for/,
|
|
246
|
+
/\s+/,
|
|
247
|
+
UNDERSCORE_IDENT_RE,
|
|
248
|
+
/\s+/,
|
|
249
|
+
/in/
|
|
250
|
+
],
|
|
251
|
+
className: {
|
|
252
|
+
1: "keyword",
|
|
253
|
+
3: "variable",
|
|
254
|
+
5: "keyword"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
begin: [
|
|
259
|
+
/type/,
|
|
260
|
+
/\s+/,
|
|
261
|
+
UNDERSCORE_IDENT_RE
|
|
262
|
+
],
|
|
263
|
+
className: {
|
|
264
|
+
1: "keyword",
|
|
265
|
+
3: "title.class"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
begin: [
|
|
270
|
+
/(?:trait|enum|struct|union|impl|for)/,
|
|
271
|
+
/\s+/,
|
|
272
|
+
UNDERSCORE_IDENT_RE
|
|
273
|
+
],
|
|
274
|
+
className: {
|
|
275
|
+
1: "keyword",
|
|
276
|
+
3: "title.class"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
begin: hljs.IDENT_RE + "::",
|
|
281
|
+
keywords: {
|
|
282
|
+
keyword: "Self",
|
|
283
|
+
built_in: BUILTINS,
|
|
284
|
+
type: TYPES
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
className: "punctuation",
|
|
289
|
+
begin: "->"
|
|
290
|
+
},
|
|
291
|
+
FUNCTION_INVOKE
|
|
292
|
+
]
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
//#endregion
|
|
296
|
+
export { rust as default };
|