@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,405 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/arcade.js
|
|
2
|
+
/** @type LanguageFn */
|
|
3
|
+
function arcade(hljs) {
|
|
4
|
+
const regex = hljs.regex;
|
|
5
|
+
const IDENT_RE = "[A-Za-z_][0-9A-Za-z_]*";
|
|
6
|
+
const KEYWORDS = {
|
|
7
|
+
keyword: [
|
|
8
|
+
"break",
|
|
9
|
+
"case",
|
|
10
|
+
"catch",
|
|
11
|
+
"continue",
|
|
12
|
+
"debugger",
|
|
13
|
+
"do",
|
|
14
|
+
"else",
|
|
15
|
+
"export",
|
|
16
|
+
"for",
|
|
17
|
+
"function",
|
|
18
|
+
"if",
|
|
19
|
+
"import",
|
|
20
|
+
"in",
|
|
21
|
+
"new",
|
|
22
|
+
"of",
|
|
23
|
+
"return",
|
|
24
|
+
"switch",
|
|
25
|
+
"try",
|
|
26
|
+
"var",
|
|
27
|
+
"void",
|
|
28
|
+
"while"
|
|
29
|
+
],
|
|
30
|
+
literal: [
|
|
31
|
+
"BackSlash",
|
|
32
|
+
"DoubleQuote",
|
|
33
|
+
"ForwardSlash",
|
|
34
|
+
"Infinity",
|
|
35
|
+
"NaN",
|
|
36
|
+
"NewLine",
|
|
37
|
+
"PI",
|
|
38
|
+
"SingleQuote",
|
|
39
|
+
"Tab",
|
|
40
|
+
"TextFormatting",
|
|
41
|
+
"false",
|
|
42
|
+
"null",
|
|
43
|
+
"true",
|
|
44
|
+
"undefined"
|
|
45
|
+
],
|
|
46
|
+
built_in: [
|
|
47
|
+
"Abs",
|
|
48
|
+
"Acos",
|
|
49
|
+
"All",
|
|
50
|
+
"Angle",
|
|
51
|
+
"Any",
|
|
52
|
+
"Area",
|
|
53
|
+
"AreaGeodetic",
|
|
54
|
+
"Array",
|
|
55
|
+
"Asin",
|
|
56
|
+
"Atan",
|
|
57
|
+
"Atan2",
|
|
58
|
+
"Attachments",
|
|
59
|
+
"Average",
|
|
60
|
+
"Back",
|
|
61
|
+
"Bearing",
|
|
62
|
+
"Boolean",
|
|
63
|
+
"Buffer",
|
|
64
|
+
"BufferGeodetic",
|
|
65
|
+
"Ceil",
|
|
66
|
+
"Centroid",
|
|
67
|
+
"ChangeTimeZone",
|
|
68
|
+
"Clip",
|
|
69
|
+
"Concatenate",
|
|
70
|
+
"Console",
|
|
71
|
+
"Constrain",
|
|
72
|
+
"Contains",
|
|
73
|
+
"ConvertDirection",
|
|
74
|
+
"ConvexHull",
|
|
75
|
+
"Cos",
|
|
76
|
+
"Count",
|
|
77
|
+
"Crosses",
|
|
78
|
+
"Cut",
|
|
79
|
+
"Date|0",
|
|
80
|
+
"DateAdd",
|
|
81
|
+
"DateDiff",
|
|
82
|
+
"DateOnly",
|
|
83
|
+
"Day",
|
|
84
|
+
"Decode",
|
|
85
|
+
"DefaultValue",
|
|
86
|
+
"Densify",
|
|
87
|
+
"DensifyGeodetic",
|
|
88
|
+
"Dictionary",
|
|
89
|
+
"Difference",
|
|
90
|
+
"Disjoint",
|
|
91
|
+
"Distance",
|
|
92
|
+
"DistanceGeodetic",
|
|
93
|
+
"DistanceToCoordinate",
|
|
94
|
+
"Distinct",
|
|
95
|
+
"Domain",
|
|
96
|
+
"DomainCode",
|
|
97
|
+
"DomainName",
|
|
98
|
+
"EnvelopeIntersects",
|
|
99
|
+
"Equals",
|
|
100
|
+
"Erase",
|
|
101
|
+
"Exp",
|
|
102
|
+
"Expects",
|
|
103
|
+
"Extent",
|
|
104
|
+
"Feature",
|
|
105
|
+
"FeatureInFilter",
|
|
106
|
+
"FeatureSet",
|
|
107
|
+
"FeatureSetByAssociation",
|
|
108
|
+
"FeatureSetById",
|
|
109
|
+
"FeatureSetByName",
|
|
110
|
+
"FeatureSetByPortalItem",
|
|
111
|
+
"FeatureSetByRelationshipClass",
|
|
112
|
+
"FeatureSetByRelationshipName",
|
|
113
|
+
"Filter",
|
|
114
|
+
"FilterBySubtypeCode",
|
|
115
|
+
"Find",
|
|
116
|
+
"First|0",
|
|
117
|
+
"Floor",
|
|
118
|
+
"FromCharCode",
|
|
119
|
+
"FromCodePoint",
|
|
120
|
+
"FromJSON",
|
|
121
|
+
"Front",
|
|
122
|
+
"GdbVersion",
|
|
123
|
+
"Generalize",
|
|
124
|
+
"Geometry",
|
|
125
|
+
"GetEnvironment",
|
|
126
|
+
"GetFeatureSet",
|
|
127
|
+
"GetFeatureSetInfo",
|
|
128
|
+
"GetUser",
|
|
129
|
+
"GroupBy",
|
|
130
|
+
"Guid",
|
|
131
|
+
"HasKey",
|
|
132
|
+
"HasValue",
|
|
133
|
+
"Hash",
|
|
134
|
+
"Hour",
|
|
135
|
+
"IIf",
|
|
136
|
+
"ISOMonth",
|
|
137
|
+
"ISOWeek",
|
|
138
|
+
"ISOWeekday",
|
|
139
|
+
"ISOYear",
|
|
140
|
+
"Includes",
|
|
141
|
+
"IndexOf",
|
|
142
|
+
"Insert",
|
|
143
|
+
"Intersection",
|
|
144
|
+
"Intersects",
|
|
145
|
+
"IsEmpty",
|
|
146
|
+
"IsNan",
|
|
147
|
+
"IsSelfIntersecting",
|
|
148
|
+
"IsSimple",
|
|
149
|
+
"KnowledgeGraphByPortalItem",
|
|
150
|
+
"Left|0",
|
|
151
|
+
"Length",
|
|
152
|
+
"Length3D",
|
|
153
|
+
"LengthGeodetic",
|
|
154
|
+
"Log",
|
|
155
|
+
"Lower",
|
|
156
|
+
"Map",
|
|
157
|
+
"Max",
|
|
158
|
+
"Mean",
|
|
159
|
+
"MeasureToCoordinate",
|
|
160
|
+
"Mid",
|
|
161
|
+
"Millisecond",
|
|
162
|
+
"Min",
|
|
163
|
+
"Minute",
|
|
164
|
+
"Month",
|
|
165
|
+
"MultiPartToSinglePart",
|
|
166
|
+
"Multipoint",
|
|
167
|
+
"NearestCoordinate",
|
|
168
|
+
"NearestVertex",
|
|
169
|
+
"NextSequenceValue",
|
|
170
|
+
"None",
|
|
171
|
+
"Now",
|
|
172
|
+
"Number",
|
|
173
|
+
"Offset",
|
|
174
|
+
"OrderBy",
|
|
175
|
+
"Overlaps",
|
|
176
|
+
"Point",
|
|
177
|
+
"PointToCoordinate",
|
|
178
|
+
"Polygon",
|
|
179
|
+
"Polyline",
|
|
180
|
+
"Pop",
|
|
181
|
+
"Portal",
|
|
182
|
+
"Pow",
|
|
183
|
+
"Proper",
|
|
184
|
+
"Push",
|
|
185
|
+
"QueryGraph",
|
|
186
|
+
"Random",
|
|
187
|
+
"Reduce",
|
|
188
|
+
"Relate",
|
|
189
|
+
"Replace",
|
|
190
|
+
"Resize",
|
|
191
|
+
"Reverse",
|
|
192
|
+
"Right|0",
|
|
193
|
+
"RingIsClockwise",
|
|
194
|
+
"Rotate",
|
|
195
|
+
"Round",
|
|
196
|
+
"Schema",
|
|
197
|
+
"Second",
|
|
198
|
+
"SetGeometry",
|
|
199
|
+
"Simplify",
|
|
200
|
+
"Sin",
|
|
201
|
+
"Slice",
|
|
202
|
+
"Sort",
|
|
203
|
+
"Splice",
|
|
204
|
+
"Split",
|
|
205
|
+
"Sqrt",
|
|
206
|
+
"StandardizeFilename",
|
|
207
|
+
"StandardizeGuid",
|
|
208
|
+
"Stdev",
|
|
209
|
+
"SubtypeCode",
|
|
210
|
+
"SubtypeName",
|
|
211
|
+
"Subtypes",
|
|
212
|
+
"Sum",
|
|
213
|
+
"SymmetricDifference",
|
|
214
|
+
"Tan",
|
|
215
|
+
"Text",
|
|
216
|
+
"Time",
|
|
217
|
+
"TimeZone",
|
|
218
|
+
"TimeZoneOffset",
|
|
219
|
+
"Timestamp",
|
|
220
|
+
"ToCharCode",
|
|
221
|
+
"ToCodePoint",
|
|
222
|
+
"ToHex",
|
|
223
|
+
"ToLocal",
|
|
224
|
+
"ToUTC",
|
|
225
|
+
"Today",
|
|
226
|
+
"Top|0",
|
|
227
|
+
"Touches",
|
|
228
|
+
"TrackAccelerationAt",
|
|
229
|
+
"TrackAccelerationWindow",
|
|
230
|
+
"TrackCurrentAcceleration",
|
|
231
|
+
"TrackCurrentDistance",
|
|
232
|
+
"TrackCurrentSpeed",
|
|
233
|
+
"TrackCurrentTime",
|
|
234
|
+
"TrackDistanceAt",
|
|
235
|
+
"TrackDistanceWindow",
|
|
236
|
+
"TrackDuration",
|
|
237
|
+
"TrackFieldWindow",
|
|
238
|
+
"TrackGeometryWindow",
|
|
239
|
+
"TrackIndex",
|
|
240
|
+
"TrackSpeedAt",
|
|
241
|
+
"TrackSpeedWindow",
|
|
242
|
+
"TrackStartTime",
|
|
243
|
+
"TrackWindow",
|
|
244
|
+
"Trim",
|
|
245
|
+
"TypeOf",
|
|
246
|
+
"Union",
|
|
247
|
+
"Upper",
|
|
248
|
+
"UrlEncode",
|
|
249
|
+
"Variance",
|
|
250
|
+
"Week",
|
|
251
|
+
"Weekday",
|
|
252
|
+
"When|0",
|
|
253
|
+
"Within",
|
|
254
|
+
"Year|0"
|
|
255
|
+
]
|
|
256
|
+
};
|
|
257
|
+
const SYMBOL = {
|
|
258
|
+
className: "symbol",
|
|
259
|
+
begin: "\\$" + regex.either(...[
|
|
260
|
+
"aggregatedFeatures",
|
|
261
|
+
"analytic",
|
|
262
|
+
"config",
|
|
263
|
+
"datapoint",
|
|
264
|
+
"datastore",
|
|
265
|
+
"editcontext",
|
|
266
|
+
"feature",
|
|
267
|
+
"featureSet",
|
|
268
|
+
"feedfeature",
|
|
269
|
+
"fencefeature",
|
|
270
|
+
"fencenotificationtype",
|
|
271
|
+
"graph",
|
|
272
|
+
"join",
|
|
273
|
+
"layer",
|
|
274
|
+
"locationupdate",
|
|
275
|
+
"map",
|
|
276
|
+
"measure",
|
|
277
|
+
"measure",
|
|
278
|
+
"originalFeature",
|
|
279
|
+
"record",
|
|
280
|
+
"reference",
|
|
281
|
+
"rowindex",
|
|
282
|
+
"sourcedatastore",
|
|
283
|
+
"sourcefeature",
|
|
284
|
+
"sourcelayer",
|
|
285
|
+
"target",
|
|
286
|
+
"targetdatastore",
|
|
287
|
+
"targetfeature",
|
|
288
|
+
"targetlayer",
|
|
289
|
+
"userInput",
|
|
290
|
+
"value",
|
|
291
|
+
"variables",
|
|
292
|
+
"view"
|
|
293
|
+
])
|
|
294
|
+
};
|
|
295
|
+
const NUMBER = {
|
|
296
|
+
className: "number",
|
|
297
|
+
variants: [
|
|
298
|
+
{ begin: "\\b(0[bB][01]+)" },
|
|
299
|
+
{ begin: "\\b(0[oO][0-7]+)" },
|
|
300
|
+
{ begin: hljs.C_NUMBER_RE }
|
|
301
|
+
],
|
|
302
|
+
relevance: 0
|
|
303
|
+
};
|
|
304
|
+
const SUBST = {
|
|
305
|
+
className: "subst",
|
|
306
|
+
begin: "\\$\\{",
|
|
307
|
+
end: "\\}",
|
|
308
|
+
keywords: KEYWORDS,
|
|
309
|
+
contains: []
|
|
310
|
+
};
|
|
311
|
+
const TEMPLATE_STRING = {
|
|
312
|
+
className: "string",
|
|
313
|
+
begin: "`",
|
|
314
|
+
end: "`",
|
|
315
|
+
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
|
|
316
|
+
};
|
|
317
|
+
SUBST.contains = [
|
|
318
|
+
hljs.APOS_STRING_MODE,
|
|
319
|
+
hljs.QUOTE_STRING_MODE,
|
|
320
|
+
TEMPLATE_STRING,
|
|
321
|
+
NUMBER,
|
|
322
|
+
hljs.REGEXP_MODE
|
|
323
|
+
];
|
|
324
|
+
const PARAMS_CONTAINS = SUBST.contains.concat([hljs.C_BLOCK_COMMENT_MODE, hljs.C_LINE_COMMENT_MODE]);
|
|
325
|
+
return {
|
|
326
|
+
name: "ArcGIS Arcade",
|
|
327
|
+
case_insensitive: true,
|
|
328
|
+
keywords: KEYWORDS,
|
|
329
|
+
contains: [
|
|
330
|
+
hljs.APOS_STRING_MODE,
|
|
331
|
+
hljs.QUOTE_STRING_MODE,
|
|
332
|
+
TEMPLATE_STRING,
|
|
333
|
+
hljs.C_LINE_COMMENT_MODE,
|
|
334
|
+
hljs.C_BLOCK_COMMENT_MODE,
|
|
335
|
+
SYMBOL,
|
|
336
|
+
NUMBER,
|
|
337
|
+
{
|
|
338
|
+
begin: /[{,]\s*/,
|
|
339
|
+
relevance: 0,
|
|
340
|
+
contains: [{
|
|
341
|
+
begin: IDENT_RE + "\\s*:",
|
|
342
|
+
returnBegin: true,
|
|
343
|
+
relevance: 0,
|
|
344
|
+
contains: [{
|
|
345
|
+
className: "attr",
|
|
346
|
+
begin: IDENT_RE,
|
|
347
|
+
relevance: 0
|
|
348
|
+
}]
|
|
349
|
+
}]
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
begin: "(" + hljs.RE_STARTERS_RE + "|\\b(return)\\b)\\s*",
|
|
353
|
+
keywords: "return",
|
|
354
|
+
contains: [
|
|
355
|
+
hljs.C_LINE_COMMENT_MODE,
|
|
356
|
+
hljs.C_BLOCK_COMMENT_MODE,
|
|
357
|
+
hljs.REGEXP_MODE,
|
|
358
|
+
{
|
|
359
|
+
className: "function",
|
|
360
|
+
begin: "(\\(.*?\\)|" + IDENT_RE + ")\\s*=>",
|
|
361
|
+
returnBegin: true,
|
|
362
|
+
end: "\\s*=>",
|
|
363
|
+
contains: [{
|
|
364
|
+
className: "params",
|
|
365
|
+
variants: [
|
|
366
|
+
{ begin: IDENT_RE },
|
|
367
|
+
{ begin: /\(\s*\)/ },
|
|
368
|
+
{
|
|
369
|
+
begin: /\(/,
|
|
370
|
+
end: /\)/,
|
|
371
|
+
excludeBegin: true,
|
|
372
|
+
excludeEnd: true,
|
|
373
|
+
keywords: KEYWORDS,
|
|
374
|
+
contains: PARAMS_CONTAINS
|
|
375
|
+
}
|
|
376
|
+
]
|
|
377
|
+
}]
|
|
378
|
+
}
|
|
379
|
+
],
|
|
380
|
+
relevance: 0
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
beginKeywords: "function",
|
|
384
|
+
end: /\{/,
|
|
385
|
+
excludeEnd: true,
|
|
386
|
+
contains: [hljs.inherit(hljs.TITLE_MODE, {
|
|
387
|
+
className: "title.function",
|
|
388
|
+
begin: IDENT_RE
|
|
389
|
+
}), {
|
|
390
|
+
className: "params",
|
|
391
|
+
begin: /\(/,
|
|
392
|
+
end: /\)/,
|
|
393
|
+
excludeBegin: true,
|
|
394
|
+
excludeEnd: true,
|
|
395
|
+
contains: PARAMS_CONTAINS
|
|
396
|
+
}],
|
|
397
|
+
illegal: /\[|%/
|
|
398
|
+
},
|
|
399
|
+
{ begin: /\$[(.]/ }
|
|
400
|
+
],
|
|
401
|
+
illegal: /#(?!!)/
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
//#endregion
|
|
405
|
+
export { arcade as default };
|