@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.
- 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/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/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/chunks/1c.js +106 -0
- package/vue/chunks/UiEditorTableOverlay.js +14 -4
- package/vue/chunks/UiEditorTableToolbar.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 +119 -85
- 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,138 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/rsl.js
|
|
2
|
+
function rsl(hljs) {
|
|
3
|
+
const BUILT_INS = [
|
|
4
|
+
"abs",
|
|
5
|
+
"acos",
|
|
6
|
+
"ambient",
|
|
7
|
+
"area",
|
|
8
|
+
"asin",
|
|
9
|
+
"atan",
|
|
10
|
+
"atmosphere",
|
|
11
|
+
"attribute",
|
|
12
|
+
"calculatenormal",
|
|
13
|
+
"ceil",
|
|
14
|
+
"cellnoise",
|
|
15
|
+
"clamp",
|
|
16
|
+
"comp",
|
|
17
|
+
"concat",
|
|
18
|
+
"cos",
|
|
19
|
+
"degrees",
|
|
20
|
+
"depth",
|
|
21
|
+
"Deriv",
|
|
22
|
+
"diffuse",
|
|
23
|
+
"distance",
|
|
24
|
+
"Du",
|
|
25
|
+
"Dv",
|
|
26
|
+
"environment",
|
|
27
|
+
"exp",
|
|
28
|
+
"faceforward",
|
|
29
|
+
"filterstep",
|
|
30
|
+
"floor",
|
|
31
|
+
"format",
|
|
32
|
+
"fresnel",
|
|
33
|
+
"incident",
|
|
34
|
+
"length",
|
|
35
|
+
"lightsource",
|
|
36
|
+
"log",
|
|
37
|
+
"match",
|
|
38
|
+
"max",
|
|
39
|
+
"min",
|
|
40
|
+
"mod",
|
|
41
|
+
"noise",
|
|
42
|
+
"normalize",
|
|
43
|
+
"ntransform",
|
|
44
|
+
"opposite",
|
|
45
|
+
"option",
|
|
46
|
+
"phong",
|
|
47
|
+
"pnoise",
|
|
48
|
+
"pow",
|
|
49
|
+
"printf",
|
|
50
|
+
"ptlined",
|
|
51
|
+
"radians",
|
|
52
|
+
"random",
|
|
53
|
+
"reflect",
|
|
54
|
+
"refract",
|
|
55
|
+
"renderinfo",
|
|
56
|
+
"round",
|
|
57
|
+
"setcomp",
|
|
58
|
+
"setxcomp",
|
|
59
|
+
"setycomp",
|
|
60
|
+
"setzcomp",
|
|
61
|
+
"shadow",
|
|
62
|
+
"sign",
|
|
63
|
+
"sin",
|
|
64
|
+
"smoothstep",
|
|
65
|
+
"specular",
|
|
66
|
+
"specularbrdf",
|
|
67
|
+
"spline",
|
|
68
|
+
"sqrt",
|
|
69
|
+
"step",
|
|
70
|
+
"tan",
|
|
71
|
+
"texture",
|
|
72
|
+
"textureinfo",
|
|
73
|
+
"trace",
|
|
74
|
+
"transform",
|
|
75
|
+
"vtransform",
|
|
76
|
+
"xcomp",
|
|
77
|
+
"ycomp",
|
|
78
|
+
"zcomp"
|
|
79
|
+
];
|
|
80
|
+
const TYPES = [
|
|
81
|
+
"matrix",
|
|
82
|
+
"float",
|
|
83
|
+
"color",
|
|
84
|
+
"point",
|
|
85
|
+
"normal",
|
|
86
|
+
"vector"
|
|
87
|
+
];
|
|
88
|
+
const KEYWORDS = [
|
|
89
|
+
"while",
|
|
90
|
+
"for",
|
|
91
|
+
"if",
|
|
92
|
+
"do",
|
|
93
|
+
"return",
|
|
94
|
+
"else",
|
|
95
|
+
"break",
|
|
96
|
+
"extern",
|
|
97
|
+
"continue"
|
|
98
|
+
];
|
|
99
|
+
const CLASS_DEFINITION = {
|
|
100
|
+
match: [
|
|
101
|
+
/(surface|displacement|light|volume|imager)/,
|
|
102
|
+
/\s+/,
|
|
103
|
+
hljs.IDENT_RE
|
|
104
|
+
],
|
|
105
|
+
scope: {
|
|
106
|
+
1: "keyword",
|
|
107
|
+
3: "title.class"
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
return {
|
|
111
|
+
name: "RenderMan RSL",
|
|
112
|
+
keywords: {
|
|
113
|
+
keyword: KEYWORDS,
|
|
114
|
+
built_in: BUILT_INS,
|
|
115
|
+
type: TYPES
|
|
116
|
+
},
|
|
117
|
+
illegal: "</",
|
|
118
|
+
contains: [
|
|
119
|
+
hljs.C_LINE_COMMENT_MODE,
|
|
120
|
+
hljs.C_BLOCK_COMMENT_MODE,
|
|
121
|
+
hljs.QUOTE_STRING_MODE,
|
|
122
|
+
hljs.APOS_STRING_MODE,
|
|
123
|
+
hljs.C_NUMBER_MODE,
|
|
124
|
+
{
|
|
125
|
+
className: "meta",
|
|
126
|
+
begin: "#",
|
|
127
|
+
end: "$"
|
|
128
|
+
},
|
|
129
|
+
CLASS_DEFINITION,
|
|
130
|
+
{
|
|
131
|
+
beginKeywords: "illuminate illuminance gather",
|
|
132
|
+
end: "\\("
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
export { rsl as default };
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/ruby.js
|
|
2
|
+
function ruby(hljs) {
|
|
3
|
+
const regex = hljs.regex;
|
|
4
|
+
const RUBY_METHOD_RE = "([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)";
|
|
5
|
+
const CLASS_NAME_RE = regex.either(/\b([A-Z]+[a-z0-9]+)+/, /\b([A-Z]+[a-z0-9]+)+[A-Z]+/);
|
|
6
|
+
const CLASS_NAME_WITH_NAMESPACE_RE = regex.concat(CLASS_NAME_RE, /(::\w+)*/);
|
|
7
|
+
const RUBY_KEYWORDS = {
|
|
8
|
+
"variable.constant": [
|
|
9
|
+
"__FILE__",
|
|
10
|
+
"__LINE__",
|
|
11
|
+
"__ENCODING__"
|
|
12
|
+
],
|
|
13
|
+
"variable.language": ["self", "super"],
|
|
14
|
+
keyword: [
|
|
15
|
+
"alias",
|
|
16
|
+
"and",
|
|
17
|
+
"begin",
|
|
18
|
+
"BEGIN",
|
|
19
|
+
"break",
|
|
20
|
+
"case",
|
|
21
|
+
"class",
|
|
22
|
+
"defined",
|
|
23
|
+
"do",
|
|
24
|
+
"else",
|
|
25
|
+
"elsif",
|
|
26
|
+
"end",
|
|
27
|
+
"END",
|
|
28
|
+
"ensure",
|
|
29
|
+
"for",
|
|
30
|
+
"if",
|
|
31
|
+
"in",
|
|
32
|
+
"module",
|
|
33
|
+
"next",
|
|
34
|
+
"not",
|
|
35
|
+
"or",
|
|
36
|
+
"redo",
|
|
37
|
+
"require",
|
|
38
|
+
"rescue",
|
|
39
|
+
"retry",
|
|
40
|
+
"return",
|
|
41
|
+
"then",
|
|
42
|
+
"undef",
|
|
43
|
+
"unless",
|
|
44
|
+
"until",
|
|
45
|
+
"when",
|
|
46
|
+
"while",
|
|
47
|
+
"yield",
|
|
48
|
+
...[
|
|
49
|
+
"include",
|
|
50
|
+
"extend",
|
|
51
|
+
"prepend",
|
|
52
|
+
"public",
|
|
53
|
+
"private",
|
|
54
|
+
"protected",
|
|
55
|
+
"raise",
|
|
56
|
+
"throw"
|
|
57
|
+
]
|
|
58
|
+
],
|
|
59
|
+
built_in: [
|
|
60
|
+
"proc",
|
|
61
|
+
"lambda",
|
|
62
|
+
"attr_accessor",
|
|
63
|
+
"attr_reader",
|
|
64
|
+
"attr_writer",
|
|
65
|
+
"define_method",
|
|
66
|
+
"private_constant",
|
|
67
|
+
"module_function"
|
|
68
|
+
],
|
|
69
|
+
literal: [
|
|
70
|
+
"true",
|
|
71
|
+
"false",
|
|
72
|
+
"nil"
|
|
73
|
+
]
|
|
74
|
+
};
|
|
75
|
+
const YARDOCTAG = {
|
|
76
|
+
className: "doctag",
|
|
77
|
+
begin: "@[A-Za-z]+"
|
|
78
|
+
};
|
|
79
|
+
const IRB_OBJECT = {
|
|
80
|
+
begin: "#<",
|
|
81
|
+
end: ">"
|
|
82
|
+
};
|
|
83
|
+
const COMMENT_MODES = [
|
|
84
|
+
hljs.COMMENT("#", "$", { contains: [YARDOCTAG] }),
|
|
85
|
+
hljs.COMMENT("^=begin", "^=end", {
|
|
86
|
+
contains: [YARDOCTAG],
|
|
87
|
+
relevance: 10
|
|
88
|
+
}),
|
|
89
|
+
hljs.COMMENT("^__END__", hljs.MATCH_NOTHING_RE)
|
|
90
|
+
];
|
|
91
|
+
const SUBST = {
|
|
92
|
+
className: "subst",
|
|
93
|
+
begin: /#\{/,
|
|
94
|
+
end: /\}/,
|
|
95
|
+
keywords: RUBY_KEYWORDS
|
|
96
|
+
};
|
|
97
|
+
const STRING = {
|
|
98
|
+
className: "string",
|
|
99
|
+
contains: [hljs.BACKSLASH_ESCAPE, SUBST],
|
|
100
|
+
variants: [
|
|
101
|
+
{
|
|
102
|
+
begin: /'/,
|
|
103
|
+
end: /'/
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
begin: /"/,
|
|
107
|
+
end: /"/
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
begin: /`/,
|
|
111
|
+
end: /`/
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
begin: /%[qQwWx]?\(/,
|
|
115
|
+
end: /\)/
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
begin: /%[qQwWx]?\[/,
|
|
119
|
+
end: /\]/
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
begin: /%[qQwWx]?\{/,
|
|
123
|
+
end: /\}/
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
begin: /%[qQwWx]?</,
|
|
127
|
+
end: />/
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
begin: /%[qQwWx]?\//,
|
|
131
|
+
end: /\//
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
begin: /%[qQwWx]?%/,
|
|
135
|
+
end: /%/
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
begin: /%[qQwWx]?-/,
|
|
139
|
+
end: /-/
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
begin: /%[qQwWx]?\|/,
|
|
143
|
+
end: /\|/
|
|
144
|
+
},
|
|
145
|
+
{ begin: /\B\?(\\\d{1,3})/ },
|
|
146
|
+
{ begin: /\B\?(\\x[A-Fa-f0-9]{1,2})/ },
|
|
147
|
+
{ begin: /\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/ },
|
|
148
|
+
{ begin: /\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/ },
|
|
149
|
+
{ begin: /\B\?\\(c|C-)[\x20-\x7e]/ },
|
|
150
|
+
{ begin: /\B\?\\?\S/ },
|
|
151
|
+
{
|
|
152
|
+
begin: regex.concat(/<<[-~]?'?/, regex.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),
|
|
153
|
+
contains: [hljs.END_SAME_AS_BEGIN({
|
|
154
|
+
begin: /(\w+)/,
|
|
155
|
+
end: /(\w+)/,
|
|
156
|
+
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
|
|
157
|
+
})]
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
};
|
|
161
|
+
const decimal = "[1-9](_?[0-9])*|0";
|
|
162
|
+
const digits = "[0-9](_?[0-9])*";
|
|
163
|
+
const NUMBER = {
|
|
164
|
+
className: "number",
|
|
165
|
+
relevance: 0,
|
|
166
|
+
variants: [
|
|
167
|
+
{ begin: `\\b(${decimal})(\\.(${digits}))?([eE][+-]?(${digits})|r)?i?\\b` },
|
|
168
|
+
{ begin: "\\b0[dD][0-9](_?[0-9])*r?i?\\b" },
|
|
169
|
+
{ begin: "\\b0[bB][0-1](_?[0-1])*r?i?\\b" },
|
|
170
|
+
{ begin: "\\b0[oO][0-7](_?[0-7])*r?i?\\b" },
|
|
171
|
+
{ begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b" },
|
|
172
|
+
{ begin: "\\b0(_?[0-7])+r?i?\\b" }
|
|
173
|
+
]
|
|
174
|
+
};
|
|
175
|
+
const PARAMS = { variants: [{ match: /\(\)/ }, {
|
|
176
|
+
className: "params",
|
|
177
|
+
begin: /\(/,
|
|
178
|
+
end: /(?=\))/,
|
|
179
|
+
excludeBegin: true,
|
|
180
|
+
endsParent: true,
|
|
181
|
+
keywords: RUBY_KEYWORDS
|
|
182
|
+
}] };
|
|
183
|
+
const RUBY_DEFAULT_CONTAINS = [
|
|
184
|
+
STRING,
|
|
185
|
+
{
|
|
186
|
+
variants: [{ match: [
|
|
187
|
+
/class\s+/,
|
|
188
|
+
CLASS_NAME_WITH_NAMESPACE_RE,
|
|
189
|
+
/\s+<\s+/,
|
|
190
|
+
CLASS_NAME_WITH_NAMESPACE_RE
|
|
191
|
+
] }, { match: [/\b(class|module)\s+/, CLASS_NAME_WITH_NAMESPACE_RE] }],
|
|
192
|
+
scope: {
|
|
193
|
+
2: "title.class",
|
|
194
|
+
4: "title.class.inherited"
|
|
195
|
+
},
|
|
196
|
+
keywords: RUBY_KEYWORDS
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
match: [/(include|extend)\s+/, CLASS_NAME_WITH_NAMESPACE_RE],
|
|
200
|
+
scope: { 2: "title.class" },
|
|
201
|
+
keywords: RUBY_KEYWORDS
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
relevance: 0,
|
|
205
|
+
match: [CLASS_NAME_WITH_NAMESPACE_RE, /\.new[. (]/],
|
|
206
|
+
scope: { 1: "title.class" }
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
relevance: 0,
|
|
210
|
+
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
211
|
+
className: "variable.constant"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
relevance: 0,
|
|
215
|
+
match: CLASS_NAME_RE,
|
|
216
|
+
scope: "title.class"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
match: [
|
|
220
|
+
/def/,
|
|
221
|
+
/\s+/,
|
|
222
|
+
RUBY_METHOD_RE
|
|
223
|
+
],
|
|
224
|
+
scope: {
|
|
225
|
+
1: "keyword",
|
|
226
|
+
3: "title.function"
|
|
227
|
+
},
|
|
228
|
+
contains: [PARAMS]
|
|
229
|
+
},
|
|
230
|
+
{ begin: hljs.IDENT_RE + "::" },
|
|
231
|
+
{
|
|
232
|
+
className: "symbol",
|
|
233
|
+
begin: hljs.UNDERSCORE_IDENT_RE + "(!|\\?)?:",
|
|
234
|
+
relevance: 0
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
className: "symbol",
|
|
238
|
+
begin: ":(?!\\s)",
|
|
239
|
+
contains: [STRING, { begin: RUBY_METHOD_RE }],
|
|
240
|
+
relevance: 0
|
|
241
|
+
},
|
|
242
|
+
NUMBER,
|
|
243
|
+
{
|
|
244
|
+
className: "variable",
|
|
245
|
+
begin: "(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
className: "params",
|
|
249
|
+
begin: /\|(?!=)/,
|
|
250
|
+
end: /\|/,
|
|
251
|
+
excludeBegin: true,
|
|
252
|
+
excludeEnd: true,
|
|
253
|
+
relevance: 0,
|
|
254
|
+
keywords: RUBY_KEYWORDS
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
begin: "(" + hljs.RE_STARTERS_RE + "|unless)\\s*",
|
|
258
|
+
keywords: "unless",
|
|
259
|
+
contains: [{
|
|
260
|
+
className: "regexp",
|
|
261
|
+
contains: [hljs.BACKSLASH_ESCAPE, SUBST],
|
|
262
|
+
illegal: /\n/,
|
|
263
|
+
variants: [
|
|
264
|
+
{
|
|
265
|
+
begin: "/",
|
|
266
|
+
end: "/[a-z]*"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
begin: /%r\{/,
|
|
270
|
+
end: /\}[a-z]*/
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
begin: "%r\\(",
|
|
274
|
+
end: "\\)[a-z]*"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
begin: "%r!",
|
|
278
|
+
end: "![a-z]*"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
begin: "%r\\[",
|
|
282
|
+
end: "\\][a-z]*"
|
|
283
|
+
}
|
|
284
|
+
]
|
|
285
|
+
}].concat(IRB_OBJECT, COMMENT_MODES),
|
|
286
|
+
relevance: 0
|
|
287
|
+
}
|
|
288
|
+
].concat(IRB_OBJECT, COMMENT_MODES);
|
|
289
|
+
SUBST.contains = RUBY_DEFAULT_CONTAINS;
|
|
290
|
+
PARAMS.contains = RUBY_DEFAULT_CONTAINS;
|
|
291
|
+
const IRB_DEFAULT = [{
|
|
292
|
+
begin: /^\s*=>/,
|
|
293
|
+
starts: {
|
|
294
|
+
end: "$",
|
|
295
|
+
contains: RUBY_DEFAULT_CONTAINS
|
|
296
|
+
}
|
|
297
|
+
}, {
|
|
298
|
+
className: "meta.prompt",
|
|
299
|
+
begin: "^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",
|
|
300
|
+
starts: {
|
|
301
|
+
end: "$",
|
|
302
|
+
keywords: RUBY_KEYWORDS,
|
|
303
|
+
contains: RUBY_DEFAULT_CONTAINS
|
|
304
|
+
}
|
|
305
|
+
}];
|
|
306
|
+
COMMENT_MODES.unshift(IRB_OBJECT);
|
|
307
|
+
return {
|
|
308
|
+
name: "Ruby",
|
|
309
|
+
aliases: [
|
|
310
|
+
"rb",
|
|
311
|
+
"gemspec",
|
|
312
|
+
"podspec",
|
|
313
|
+
"thor",
|
|
314
|
+
"irb"
|
|
315
|
+
],
|
|
316
|
+
keywords: RUBY_KEYWORDS,
|
|
317
|
+
illegal: /\/\*/,
|
|
318
|
+
contains: [hljs.SHEBANG({ binary: "ruby" })].concat(IRB_DEFAULT).concat(COMMENT_MODES).concat(RUBY_DEFAULT_CONTAINS)
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
//#endregion
|
|
322
|
+
export { ruby as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/ruleslanguage.js
|
|
2
|
+
function ruleslanguage(hljs) {
|
|
3
|
+
return {
|
|
4
|
+
name: "Oracle Rules Language",
|
|
5
|
+
keywords: {
|
|
6
|
+
keyword: "BILL_PERIOD BILL_START BILL_STOP RS_EFFECTIVE_START RS_EFFECTIVE_STOP RS_JURIS_CODE RS_OPCO_CODE INTDADDATTRIBUTE|5 INTDADDVMSG|5 INTDBLOCKOP|5 INTDBLOCKOPNA|5 INTDCLOSE|5 INTDCOUNT|5 INTDCOUNTSTATUSCODE|5 INTDCREATEMASK|5 INTDCREATEDAYMASK|5 INTDCREATEFACTORMASK|5 INTDCREATEHANDLE|5 INTDCREATEOVERRIDEDAYMASK|5 INTDCREATEOVERRIDEMASK|5 INTDCREATESTATUSCODEMASK|5 INTDCREATETOUPERIOD|5 INTDDELETE|5 INTDDIPTEST|5 INTDEXPORT|5 INTDGETERRORCODE|5 INTDGETERRORMESSAGE|5 INTDISEQUAL|5 INTDJOIN|5 INTDLOAD|5 INTDLOADACTUALCUT|5 INTDLOADDATES|5 INTDLOADHIST|5 INTDLOADLIST|5 INTDLOADLISTDATES|5 INTDLOADLISTENERGY|5 INTDLOADLISTHIST|5 INTDLOADRELATEDCHANNEL|5 INTDLOADSP|5 INTDLOADSTAGING|5 INTDLOADUOM|5 INTDLOADUOMDATES|5 INTDLOADUOMHIST|5 INTDLOADVERSION|5 INTDOPEN|5 INTDREADFIRST|5 INTDREADNEXT|5 INTDRECCOUNT|5 INTDRELEASE|5 INTDREPLACE|5 INTDROLLAVG|5 INTDROLLPEAK|5 INTDSCALAROP|5 INTDSCALE|5 INTDSETATTRIBUTE|5 INTDSETDSTPARTICIPANT|5 INTDSETSTRING|5 INTDSETVALUE|5 INTDSETVALUESTATUS|5 INTDSHIFTSTARTTIME|5 INTDSMOOTH|5 INTDSORT|5 INTDSPIKETEST|5 INTDSUBSET|5 INTDTOU|5 INTDTOURELEASE|5 INTDTOUVALUE|5 INTDUPDATESTATS|5 INTDVALUE|5 STDEV INTDDELETEEX|5 INTDLOADEXACTUAL|5 INTDLOADEXCUT|5 INTDLOADEXDATES|5 INTDLOADEX|5 INTDLOADEXRELATEDCHANNEL|5 INTDSAVEEX|5 MVLOAD|5 MVLOADACCT|5 MVLOADACCTDATES|5 MVLOADACCTHIST|5 MVLOADDATES|5 MVLOADHIST|5 MVLOADLIST|5 MVLOADLISTDATES|5 MVLOADLISTHIST|5 IF FOR NEXT DONE SELECT END CALL ABORT CLEAR CHANNEL FACTOR LIST NUMBER OVERRIDE SET WEEK DISTRIBUTIONNODE ELSE WHEN THEN OTHERWISE IENUM CSV INCLUDE LEAVE RIDER SAVE DELETE NOVALUE SECTION WARN SAVE_UPDATE DETERMINANT LABEL REPORT REVENUE EACH IN FROM TOTAL CHARGE BLOCK AND OR CSV_FILE RATE_CODE AUXILIARY_DEMAND UIDACCOUNT RS BILL_PERIOD_SELECT HOURS_PER_MONTH INTD_ERROR_STOP SEASON_SCHEDULE_NAME ACCOUNTFACTOR ARRAYUPPERBOUND CALLSTOREDPROC GETADOCONNECTION GETCONNECT GETDATASOURCE GETQUALIFIER GETUSERID HASVALUE LISTCOUNT LISTOP LISTUPDATE LISTVALUE PRORATEFACTOR RSPRORATE SETBINPATH SETDBMONITOR WQ_OPEN BILLINGHOURS DATE DATEFROMFLOAT DATETIMEFROMSTRING DATETIMETOSTRING DATETOFLOAT DAY DAYDIFF DAYNAME DBDATETIME HOUR MINUTE MONTH MONTHDIFF MONTHHOURS MONTHNAME ROUNDDATE SAMEWEEKDAYLASTYEAR SECOND WEEKDAY WEEKDIFF YEAR YEARDAY YEARSTR COMPSUM HISTCOUNT HISTMAX HISTMIN HISTMINNZ HISTVALUE MAXNRANGE MAXRANGE MINRANGE COMPIKVA COMPKVA COMPKVARFROMKQKW COMPLF IDATTR FLAG LF2KW LF2KWH MAXKW POWERFACTOR READING2USAGE AVGSEASON MAXSEASON MONTHLYMERGE SEASONVALUE SUMSEASON ACCTREADDATES ACCTTABLELOAD CONFIGADD CONFIGGET CREATEOBJECT CREATEREPORT EMAILCLIENT EXPBLKMDMUSAGE EXPMDMUSAGE EXPORT_USAGE FACTORINEFFECT GETUSERSPECIFIEDSTOP INEFFECT ISHOLIDAY RUNRATE SAVE_PROFILE SETREPORTTITLE USEREXIT WATFORRUNRATE TO TABLE ACOS ASIN ATAN ATAN2 BITAND CEIL COS COSECANT COSH COTANGENT DIVQUOT DIVREM EXP FABS FLOOR FMOD FREPM FREXPN LOG LOG10 MAX MAXN MIN MINNZ MODF POW ROUND ROUND2VALUE ROUNDINT SECANT SIN SINH SQROOT TAN TANH FLOAT2STRING FLOAT2STRINGNC INSTR LEFT LEN LTRIM MID RIGHT RTRIM STRING STRINGNC TOLOWER TOUPPER TRIM NUMDAYS READ_DATE STAGING",
|
|
7
|
+
built_in: "IDENTIFIER OPTIONS XML_ELEMENT XML_OP XML_ELEMENT_OF DOMDOCCREATE DOMDOCLOADFILE DOMDOCLOADXML DOMDOCSAVEFILE DOMDOCGETROOT DOMDOCADDPI DOMNODEGETNAME DOMNODEGETTYPE DOMNODEGETVALUE DOMNODEGETCHILDCT DOMNODEGETFIRSTCHILD DOMNODEGETSIBLING DOMNODECREATECHILDELEMENT DOMNODESETATTRIBUTE DOMNODEGETCHILDELEMENTCT DOMNODEGETFIRSTCHILDELEMENT DOMNODEGETSIBLINGELEMENT DOMNODEGETATTRIBUTECT DOMNODEGETATTRIBUTEI DOMNODEGETATTRIBUTEBYNAME DOMNODEGETBYNAME"
|
|
8
|
+
},
|
|
9
|
+
contains: [
|
|
10
|
+
hljs.C_LINE_COMMENT_MODE,
|
|
11
|
+
hljs.C_BLOCK_COMMENT_MODE,
|
|
12
|
+
hljs.APOS_STRING_MODE,
|
|
13
|
+
hljs.QUOTE_STRING_MODE,
|
|
14
|
+
hljs.C_NUMBER_MODE,
|
|
15
|
+
{
|
|
16
|
+
className: "literal",
|
|
17
|
+
variants: [{
|
|
18
|
+
begin: "#\\s+",
|
|
19
|
+
relevance: 0
|
|
20
|
+
}, { begin: "#[a-zA-Z .]+" }]
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { ruleslanguage as default };
|