@aleph-alpha/chat-kit 6.0.0 → 6.1.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/dist/{CkHistory.vue_vue_type_script_setup_true_lang-D9Ph9eYp.js → CkHistory.vue_vue_type_script_setup_true_lang-Cr8vF94e.js} +214 -107
- package/dist/apl-fqmucPXA.js +140 -0
- package/dist/asciiarmor-DucZyvP0.js +56 -0
- package/dist/asn1-BnOEsgAm.js +144 -0
- package/dist/asterisk-QAlztEwS.js +345 -0
- package/dist/brainfuck-DZVCuF_t.js +53 -0
- package/dist/chat-kit.css +1166 -1
- package/dist/clike-CTYGlS6x.js +799 -0
- package/dist/clojure-BhXMqnxz.js +849 -0
- package/dist/cmake-BGaNd9E7.js +71 -0
- package/dist/cobol-4yqQntpt.js +120 -0
- package/dist/coffeescript-D2dXvhEc.js +308 -0
- package/dist/commonlisp-CF_VNHQR.js +130 -0
- package/dist/components/base/CkMilkdownEditor/CkMilkdownEditor.stories.d.ts +41 -0
- package/dist/components/base/CkMilkdownEditor/CkMilkdownEditor.stories.d.ts.map +1 -0
- package/dist/components/base/CkMilkdownEditor/CkMilkdownEditor.vue.d.ts +26 -0
- package/dist/components/base/CkMilkdownEditor/CkMilkdownEditor.vue.d.ts.map +1 -0
- package/dist/components/base/CkMilkdownEditor/codeMirrorTheme.d.ts +20 -0
- package/dist/components/base/CkMilkdownEditor/codeMirrorTheme.d.ts.map +1 -0
- package/dist/components/base/CkMilkdownEditor/createCrepeEditor.d.ts +42 -0
- package/dist/components/base/CkMilkdownEditor/createCrepeEditor.d.ts.map +1 -0
- package/dist/components/base/CkMilkdownEditor/crepeIcons.d.ts +33 -0
- package/dist/components/base/CkMilkdownEditor/crepeIcons.d.ts.map +1 -0
- package/dist/components/base/CkMilkdownEditor/index.d.ts +3 -0
- package/dist/components/base/CkMilkdownEditor/index.d.ts.map +1 -0
- package/dist/components/base/CkMilkdownEditor/markdownClassAttrs.d.ts +16 -0
- package/dist/components/base/CkMilkdownEditor/markdownClassAttrs.d.ts.map +1 -0
- package/dist/components/base/CkMilkdownEditor/types.d.ts +98 -0
- package/dist/components/base/CkMilkdownEditor/types.d.ts.map +1 -0
- package/dist/components/base/index.d.ts +2 -0
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +12 -11
- package/dist/createCrepeEditor-CFbvSH3s.js +74141 -0
- package/dist/crystal-DyuLTqLs.js +398 -0
- package/dist/css-DkSyTW67.js +1772 -0
- package/dist/cypher-Dlu_3r4V.js +121 -0
- package/dist/d-UURgV0Ux.js +179 -0
- package/dist/diff-B_Bi2Crb.js +25 -0
- package/dist/dockerfile-Bvk733Ga.js +201 -0
- package/dist/dtd-Dy74G54E.js +114 -0
- package/dist/dylan-TSb-Nfix.js +314 -0
- package/dist/ebnf-4fKAGW3a.js +140 -0
- package/dist/ecl-B59qGGVg.js +178 -0
- package/dist/eiffel-Dze7nlu3.js +134 -0
- package/dist/elm-DG7jkhNZ.js +176 -0
- package/dist/erlang-BO6gOnGA.js +674 -0
- package/dist/factor-CMxFHDqz.js +65 -0
- package/dist/fcl-CDDUNjTj.js +141 -0
- package/dist/forth-B9D2JCeE.js +116 -0
- package/dist/fortran-CAG2BFbe.js +467 -0
- package/dist/gas-0Aw8zDr5.js +293 -0
- package/dist/gherkin-DhZlEZiy.js +115 -0
- package/dist/groovy-CpwJiBl7.js +223 -0
- package/dist/handlers/index.js +1 -1
- package/dist/handlers/useChatKitLabels.d.ts +27 -0
- package/dist/handlers/useChatKitLabels.d.ts.map +1 -1
- package/dist/haskell-ySd-OUo8.js +459 -0
- package/dist/haxe-7MlzfeYV.js +514 -0
- package/dist/http-BqypyemW.js +79 -0
- package/dist/idl-4HIGJlDI.js +985 -0
- package/dist/index-A5rWjRtZ.js +689 -0
- package/dist/index-B0ldhzaj.js +385 -0
- package/dist/index-BVOjyn3y.js +2490 -0
- package/dist/index-BWvkps_G.js +309 -0
- package/dist/index-BaS8OW8V.js +151 -0
- package/dist/index-BlHHEbV-.js +406 -0
- package/dist/index-BoqzHVNB.js +82 -0
- package/dist/index-C6zYjwIQ.js +704 -0
- package/dist/index-CMJGuXap.js +330 -0
- package/dist/index-CRfGWVdQ.js +116 -0
- package/dist/index-C_gTb50u.js +81 -0
- package/dist/index-DSU7cBGz.js +178 -0
- package/dist/index-DSq3gvqU.js +1767 -0
- package/dist/index-Da3777l2.js +289 -0
- package/dist/index-DdlzabmR.js +1021 -0
- package/dist/index-DhY_9bdS.js +61 -0
- package/dist/index-Dm6C1blN.js +1052 -0
- package/dist/index-Tj3pzx-E.js +327 -0
- package/dist/index-ZeRS5rER.js +97 -0
- package/dist/index-gzleljO6.js +157 -0
- package/dist/index-naWlQpaL.js +642 -0
- package/dist/index-sKO1lHHC.js +312 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -13
- package/dist/javascript-Bt8B7yTi.js +992 -0
- package/dist/julia-Bs6JJhYG.js +407 -0
- package/dist/livescript-DmzgM3Yt.js +296 -0
- package/dist/lua-Cvg8VrAA.js +256 -0
- package/dist/mathematica-DNLOL9PQ.js +110 -0
- package/dist/mbox-Ga7d4MMN.js +117 -0
- package/dist/mirc-Dma3B8rS.js +107 -0
- package/dist/mllike-DHn7xckP.js +334 -0
- package/dist/modelica-0d55jYY0.js +147 -0
- package/dist/mscgen-DdqZYINH.js +135 -0
- package/dist/mumps-Btr8VblO.js +93 -0
- package/dist/nginx-DTDtBDVN.js +141 -0
- package/dist/nsis-CyKBdPWp.js +62 -0
- package/dist/ntriples-CvgOYMpL.js +153 -0
- package/dist/octave-DYBj3-tl.js +200 -0
- package/dist/oz-R_e8WMIi.js +231 -0
- package/dist/pascal-GD8iposT.js +105 -0
- package/dist/perl-DL9mHpoi.js +1105 -0
- package/dist/pig-C_4T4YIV.js +101 -0
- package/dist/powershell-B0suO7Vd.js +328 -0
- package/dist/properties-BR-vP1aU.js +58 -0
- package/dist/protobuf-BxgpyhoW.js +77 -0
- package/dist/pug-vHnWR0UE.js +405 -0
- package/dist/puppet-Bdao66PW.js +137 -0
- package/dist/python-BFGRmuZ9.js +426 -0
- package/dist/q-CrbCVq4a.js +131 -0
- package/dist/r-V7nswm59.js +170 -0
- package/dist/rpm-C-DLY-If.js +109 -0
- package/dist/ruby-CQTpZw6f.js +331 -0
- package/dist/sas-D2UG-yhZ.js +207 -0
- package/dist/scheme-BKzrkGJD.js +222 -0
- package/dist/shell-BlsXDxCn.js +222 -0
- package/dist/sieve-CjwBwOY5.js +135 -0
- package/dist/simple-mode-DMneyfDu.js +130 -0
- package/dist/smalltalk-BOIGQuhN.js +121 -0
- package/dist/solr-CwD7U71z.js +69 -0
- package/dist/sparql-DYskk2vE.js +249 -0
- package/dist/spreadsheet-Bgtt3oLP.js +87 -0
- package/dist/sql-Cei9CMfk.js +342 -0
- package/dist/stex-C1nZSzAw.js +230 -0
- package/dist/stylus-BkS-boTH.js +565 -0
- package/dist/swift-FRZi1uvB.js +291 -0
- package/dist/tcl-CUcaCdmq.js +114 -0
- package/dist/textile-BnFpjsrl.js +414 -0
- package/dist/tiddlywiki-CjprD-Qp.js +218 -0
- package/dist/tiki-DK9DOeWn.js +268 -0
- package/dist/toml-BOuWGMcf.js +76 -0
- package/dist/troff-E1bJ0PPL.js +61 -0
- package/dist/ttcn-cfg-Dc39-fIP.js +133 -0
- package/dist/ttcn-tKd4HLu4.js +192 -0
- package/dist/turtle-Dq7-1WAf.js +124 -0
- package/dist/{useChatKitLabels-368lodS5.js → useChatKitLabels-Ww1Q7xUr.js} +25 -2
- package/dist/vb-Dp90gtsv.js +196 -0
- package/dist/vbscript-Bfn8O8I7.js +478 -0
- package/dist/velocity-BwIZK1TH.js +149 -0
- package/dist/verilog-CnT9bMk0.js +429 -0
- package/dist/vhdl-DCkMIyT9.js +158 -0
- package/dist/webidl-BTLTThCm.js +204 -0
- package/dist/xquery-BrBUuxMR.js +525 -0
- package/dist/yacas-b5lAVEIl.js +130 -0
- package/dist/z80-ClgwfNdB.js +92 -0
- package/package.json +10 -4
- package/src/components/base/CkMilkdownEditor/CkMilkdownEditor.spec.ts +221 -0
- package/src/components/base/CkMilkdownEditor/CkMilkdownEditor.stories.ts +274 -0
- package/src/components/base/CkMilkdownEditor/CkMilkdownEditor.vue +151 -0
- package/src/components/base/CkMilkdownEditor/codeMirrorTheme.ts +132 -0
- package/src/components/base/CkMilkdownEditor/createCrepeEditor.ts +192 -0
- package/src/components/base/CkMilkdownEditor/crepeIcons.ts +77 -0
- package/src/components/base/CkMilkdownEditor/index.ts +2 -0
- package/src/components/base/CkMilkdownEditor/markdownClassAttrs.ts +64 -0
- package/src/components/base/CkMilkdownEditor/milkdown-theme.css +441 -0
- package/src/components/base/CkMilkdownEditor/types.ts +100 -0
- package/src/components/base/CkPromptInputDisclaimer/CkPromptInputDisclaimer.stories.ts +2 -2
- package/src/components/base/index.ts +6 -0
- package/src/components/index.ts +4 -0
- package/src/handlers/useChatKitLabels.ts +27 -0
- package/src/index.ts +4 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
function words(str) {
|
|
2
|
+
var obj = {}, words2 = str.split(" ");
|
|
3
|
+
for (var i = 0; i < words2.length; ++i) obj[words2[i]] = true;
|
|
4
|
+
return obj;
|
|
5
|
+
}
|
|
6
|
+
const parserConfig = {
|
|
7
|
+
keywords: words("activate address alive all alt altstep and and4b any break case component const continue control deactivate display do else encode enumerated except exception execute extends extension external for from function goto group if import in infinity inout interleave label language length log match message mixed mod modifies module modulepar mtc noblock not not4b nowait of on optional or or4b out override param pattern port procedure record recursive rem repeat return runs select self sender set signature system template testcase to type union value valueof var variant while with xor xor4b"),
|
|
8
|
+
builtin: words("bit2hex bit2int bit2oct bit2str char2int char2oct encvalue decomp decvalue float2int float2str hex2bit hex2int hex2oct hex2str int2bit int2char int2float int2hex int2oct int2str int2unichar isbound ischosen ispresent isvalue lengthof log2str oct2bit oct2char oct2hex oct2int oct2str regexp replace rnd sizeof str2bit str2float str2hex str2int str2oct substr unichar2int unichar2char enum2int"),
|
|
9
|
+
types: words("anytype bitstring boolean char charstring default float hexstring integer objid octetstring universal verdicttype timer"),
|
|
10
|
+
timerOps: words("read running start stop timeout"),
|
|
11
|
+
portOps: words("call catch check clear getcall getreply halt raise receive reply send trigger"),
|
|
12
|
+
configOps: words("create connect disconnect done kill killed map unmap"),
|
|
13
|
+
verdictOps: words("getverdict setverdict"),
|
|
14
|
+
sutOps: words("action"),
|
|
15
|
+
functionOps: words("apply derefers refers"),
|
|
16
|
+
verdictConsts: words("error fail inconc none pass"),
|
|
17
|
+
booleanConsts: words("true false"),
|
|
18
|
+
otherConsts: words("null NULL omit"),
|
|
19
|
+
visibilityModifiers: words("private public friend"),
|
|
20
|
+
templateMatch: words("complement ifpresent subset superset permutation")
|
|
21
|
+
};
|
|
22
|
+
var wordList = [];
|
|
23
|
+
function add(obj) {
|
|
24
|
+
if (obj) {
|
|
25
|
+
for (var prop in obj) if (obj.hasOwnProperty(prop))
|
|
26
|
+
wordList.push(prop);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
add(parserConfig.keywords);
|
|
30
|
+
add(parserConfig.builtin);
|
|
31
|
+
add(parserConfig.timerOps);
|
|
32
|
+
add(parserConfig.portOps);
|
|
33
|
+
var keywords = parserConfig.keywords || {}, builtin = parserConfig.builtin || {}, timerOps = parserConfig.timerOps || {}, portOps = parserConfig.portOps || {}, configOps = parserConfig.configOps || {}, verdictOps = parserConfig.verdictOps || {}, sutOps = parserConfig.sutOps || {}, functionOps = parserConfig.functionOps || {}, verdictConsts = parserConfig.verdictConsts || {}, booleanConsts = parserConfig.booleanConsts || {}, otherConsts = parserConfig.otherConsts || {}, types = parserConfig.types || {}, visibilityModifiers = parserConfig.visibilityModifiers || {}, templateMatch = parserConfig.templateMatch || {}, indentStatements = parserConfig.indentStatements !== false;
|
|
34
|
+
var isOperatorChar = /[+\-*&@=<>!\/]/;
|
|
35
|
+
var curPunc;
|
|
36
|
+
function tokenBase(stream, state) {
|
|
37
|
+
var ch = stream.next();
|
|
38
|
+
if (ch == '"' || ch == "'") {
|
|
39
|
+
state.tokenize = tokenString(ch);
|
|
40
|
+
return state.tokenize(stream, state);
|
|
41
|
+
}
|
|
42
|
+
if (/[\[\]{}\(\),;\\:\?\.]/.test(ch)) {
|
|
43
|
+
curPunc = ch;
|
|
44
|
+
return "punctuation";
|
|
45
|
+
}
|
|
46
|
+
if (ch == "#") {
|
|
47
|
+
stream.skipToEnd();
|
|
48
|
+
return "atom";
|
|
49
|
+
}
|
|
50
|
+
if (ch == "%") {
|
|
51
|
+
stream.eatWhile(/\b/);
|
|
52
|
+
return "atom";
|
|
53
|
+
}
|
|
54
|
+
if (/\d/.test(ch)) {
|
|
55
|
+
stream.eatWhile(/[\w\.]/);
|
|
56
|
+
return "number";
|
|
57
|
+
}
|
|
58
|
+
if (ch == "/") {
|
|
59
|
+
if (stream.eat("*")) {
|
|
60
|
+
state.tokenize = tokenComment;
|
|
61
|
+
return tokenComment(stream, state);
|
|
62
|
+
}
|
|
63
|
+
if (stream.eat("/")) {
|
|
64
|
+
stream.skipToEnd();
|
|
65
|
+
return "comment";
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (isOperatorChar.test(ch)) {
|
|
69
|
+
if (ch == "@") {
|
|
70
|
+
if (stream.match("try") || stream.match("catch") || stream.match("lazy")) {
|
|
71
|
+
return "keyword";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
stream.eatWhile(isOperatorChar);
|
|
75
|
+
return "operator";
|
|
76
|
+
}
|
|
77
|
+
stream.eatWhile(/[\w\$_\xa1-\uffff]/);
|
|
78
|
+
var cur = stream.current();
|
|
79
|
+
if (keywords.propertyIsEnumerable(cur)) return "keyword";
|
|
80
|
+
if (builtin.propertyIsEnumerable(cur)) return "builtin";
|
|
81
|
+
if (timerOps.propertyIsEnumerable(cur)) return "def";
|
|
82
|
+
if (configOps.propertyIsEnumerable(cur)) return "def";
|
|
83
|
+
if (verdictOps.propertyIsEnumerable(cur)) return "def";
|
|
84
|
+
if (portOps.propertyIsEnumerable(cur)) return "def";
|
|
85
|
+
if (sutOps.propertyIsEnumerable(cur)) return "def";
|
|
86
|
+
if (functionOps.propertyIsEnumerable(cur)) return "def";
|
|
87
|
+
if (verdictConsts.propertyIsEnumerable(cur)) return "string";
|
|
88
|
+
if (booleanConsts.propertyIsEnumerable(cur)) return "string";
|
|
89
|
+
if (otherConsts.propertyIsEnumerable(cur)) return "string";
|
|
90
|
+
if (types.propertyIsEnumerable(cur)) return "typeName.standard";
|
|
91
|
+
if (visibilityModifiers.propertyIsEnumerable(cur))
|
|
92
|
+
return "modifier";
|
|
93
|
+
if (templateMatch.propertyIsEnumerable(cur)) return "atom";
|
|
94
|
+
return "variable";
|
|
95
|
+
}
|
|
96
|
+
function tokenString(quote) {
|
|
97
|
+
return function(stream, state) {
|
|
98
|
+
var escaped = false, next, end = false;
|
|
99
|
+
while ((next = stream.next()) != null) {
|
|
100
|
+
if (next == quote && !escaped) {
|
|
101
|
+
var afterQuote = stream.peek();
|
|
102
|
+
if (afterQuote) {
|
|
103
|
+
afterQuote = afterQuote.toLowerCase();
|
|
104
|
+
if (afterQuote == "b" || afterQuote == "h" || afterQuote == "o")
|
|
105
|
+
stream.next();
|
|
106
|
+
}
|
|
107
|
+
end = true;
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
escaped = !escaped && next == "\\";
|
|
111
|
+
}
|
|
112
|
+
if (end || false)
|
|
113
|
+
state.tokenize = null;
|
|
114
|
+
return "string";
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function tokenComment(stream, state) {
|
|
118
|
+
var maybeEnd = false, ch;
|
|
119
|
+
while (ch = stream.next()) {
|
|
120
|
+
if (ch == "/" && maybeEnd) {
|
|
121
|
+
state.tokenize = null;
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
maybeEnd = ch == "*";
|
|
125
|
+
}
|
|
126
|
+
return "comment";
|
|
127
|
+
}
|
|
128
|
+
function Context(indented, column, type, align, prev) {
|
|
129
|
+
this.indented = indented;
|
|
130
|
+
this.column = column;
|
|
131
|
+
this.type = type;
|
|
132
|
+
this.align = align;
|
|
133
|
+
this.prev = prev;
|
|
134
|
+
}
|
|
135
|
+
function pushContext(state, col, type) {
|
|
136
|
+
var indent = state.indented;
|
|
137
|
+
if (state.context && state.context.type == "statement")
|
|
138
|
+
indent = state.context.indented;
|
|
139
|
+
return state.context = new Context(indent, col, type, null, state.context);
|
|
140
|
+
}
|
|
141
|
+
function popContext(state) {
|
|
142
|
+
var t = state.context.type;
|
|
143
|
+
if (t == ")" || t == "]" || t == "}")
|
|
144
|
+
state.indented = state.context.indented;
|
|
145
|
+
return state.context = state.context.prev;
|
|
146
|
+
}
|
|
147
|
+
const ttcn = {
|
|
148
|
+
name: "ttcn",
|
|
149
|
+
startState: function() {
|
|
150
|
+
return {
|
|
151
|
+
tokenize: null,
|
|
152
|
+
context: new Context(0, 0, "top", false),
|
|
153
|
+
indented: 0,
|
|
154
|
+
startOfLine: true
|
|
155
|
+
};
|
|
156
|
+
},
|
|
157
|
+
token: function(stream, state) {
|
|
158
|
+
var ctx = state.context;
|
|
159
|
+
if (stream.sol()) {
|
|
160
|
+
if (ctx.align == null) ctx.align = false;
|
|
161
|
+
state.indented = stream.indentation();
|
|
162
|
+
state.startOfLine = true;
|
|
163
|
+
}
|
|
164
|
+
if (stream.eatSpace()) return null;
|
|
165
|
+
curPunc = null;
|
|
166
|
+
var style = (state.tokenize || tokenBase)(stream, state);
|
|
167
|
+
if (style == "comment") return style;
|
|
168
|
+
if (ctx.align == null) ctx.align = true;
|
|
169
|
+
if ((curPunc == ";" || curPunc == ":" || curPunc == ",") && ctx.type == "statement") {
|
|
170
|
+
popContext(state);
|
|
171
|
+
} else if (curPunc == "{") pushContext(state, stream.column(), "}");
|
|
172
|
+
else if (curPunc == "[") pushContext(state, stream.column(), "]");
|
|
173
|
+
else if (curPunc == "(") pushContext(state, stream.column(), ")");
|
|
174
|
+
else if (curPunc == "}") {
|
|
175
|
+
while (ctx.type == "statement") ctx = popContext(state);
|
|
176
|
+
if (ctx.type == "}") ctx = popContext(state);
|
|
177
|
+
while (ctx.type == "statement") ctx = popContext(state);
|
|
178
|
+
} else if (curPunc == ctx.type) popContext(state);
|
|
179
|
+
else if (indentStatements && ((ctx.type == "}" || ctx.type == "top") && curPunc != ";" || ctx.type == "statement" && curPunc == "newstatement"))
|
|
180
|
+
pushContext(state, stream.column(), "statement");
|
|
181
|
+
state.startOfLine = false;
|
|
182
|
+
return style;
|
|
183
|
+
},
|
|
184
|
+
languageData: {
|
|
185
|
+
indentOnInput: /^\s*[{}]$/,
|
|
186
|
+
commentTokens: { line: "//", block: { open: "/*", close: "*/" } },
|
|
187
|
+
autocomplete: wordList
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
export {
|
|
191
|
+
ttcn
|
|
192
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
var curPunc;
|
|
2
|
+
function wordRegexp(words) {
|
|
3
|
+
return new RegExp("^(?:" + words.join("|") + ")$", "i");
|
|
4
|
+
}
|
|
5
|
+
wordRegexp([]);
|
|
6
|
+
var keywords = wordRegexp(["@prefix", "@base", "a"]);
|
|
7
|
+
var operatorChars = /[*+\-<>=&|]/;
|
|
8
|
+
function tokenBase(stream, state) {
|
|
9
|
+
var ch = stream.next();
|
|
10
|
+
curPunc = null;
|
|
11
|
+
if (ch == "<" && !stream.match(/^[\s\u00a0=]/, false)) {
|
|
12
|
+
stream.match(/^[^\s\u00a0>]*>?/);
|
|
13
|
+
return "atom";
|
|
14
|
+
} else if (ch == '"' || ch == "'") {
|
|
15
|
+
state.tokenize = tokenLiteral(ch);
|
|
16
|
+
return state.tokenize(stream, state);
|
|
17
|
+
} else if (/[{}\(\),\.;\[\]]/.test(ch)) {
|
|
18
|
+
curPunc = ch;
|
|
19
|
+
return null;
|
|
20
|
+
} else if (ch == "#") {
|
|
21
|
+
stream.skipToEnd();
|
|
22
|
+
return "comment";
|
|
23
|
+
} else if (operatorChars.test(ch)) {
|
|
24
|
+
stream.eatWhile(operatorChars);
|
|
25
|
+
return null;
|
|
26
|
+
} else if (ch == ":") {
|
|
27
|
+
return "operator";
|
|
28
|
+
} else {
|
|
29
|
+
stream.eatWhile(/[_\w\d]/);
|
|
30
|
+
if (stream.peek() == ":") {
|
|
31
|
+
return "variableName.special";
|
|
32
|
+
} else {
|
|
33
|
+
var word = stream.current();
|
|
34
|
+
if (keywords.test(word)) {
|
|
35
|
+
return "meta";
|
|
36
|
+
}
|
|
37
|
+
if (ch >= "A" && ch <= "Z") {
|
|
38
|
+
return "comment";
|
|
39
|
+
} else {
|
|
40
|
+
return "keyword";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
var word = stream.current();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function tokenLiteral(quote) {
|
|
47
|
+
return function(stream, state) {
|
|
48
|
+
var escaped = false, ch;
|
|
49
|
+
while ((ch = stream.next()) != null) {
|
|
50
|
+
if (ch == quote && !escaped) {
|
|
51
|
+
state.tokenize = tokenBase;
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
escaped = !escaped && ch == "\\";
|
|
55
|
+
}
|
|
56
|
+
return "string";
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function pushContext(state, type, col) {
|
|
60
|
+
state.context = { prev: state.context, indent: state.indent, col, type };
|
|
61
|
+
}
|
|
62
|
+
function popContext(state) {
|
|
63
|
+
state.indent = state.context.indent;
|
|
64
|
+
state.context = state.context.prev;
|
|
65
|
+
}
|
|
66
|
+
const turtle = {
|
|
67
|
+
name: "turtle",
|
|
68
|
+
startState: function() {
|
|
69
|
+
return {
|
|
70
|
+
tokenize: tokenBase,
|
|
71
|
+
context: null,
|
|
72
|
+
indent: 0,
|
|
73
|
+
col: 0
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
token: function(stream, state) {
|
|
77
|
+
if (stream.sol()) {
|
|
78
|
+
if (state.context && state.context.align == null) state.context.align = false;
|
|
79
|
+
state.indent = stream.indentation();
|
|
80
|
+
}
|
|
81
|
+
if (stream.eatSpace()) return null;
|
|
82
|
+
var style = state.tokenize(stream, state);
|
|
83
|
+
if (style != "comment" && state.context && state.context.align == null && state.context.type != "pattern") {
|
|
84
|
+
state.context.align = true;
|
|
85
|
+
}
|
|
86
|
+
if (curPunc == "(") pushContext(state, ")", stream.column());
|
|
87
|
+
else if (curPunc == "[") pushContext(state, "]", stream.column());
|
|
88
|
+
else if (curPunc == "{") pushContext(state, "}", stream.column());
|
|
89
|
+
else if (/[\]\}\)]/.test(curPunc)) {
|
|
90
|
+
while (state.context && state.context.type == "pattern") popContext(state);
|
|
91
|
+
if (state.context && curPunc == state.context.type) popContext(state);
|
|
92
|
+
} else if (curPunc == "." && state.context && state.context.type == "pattern") popContext(state);
|
|
93
|
+
else if (/atom|string|variable/.test(style) && state.context) {
|
|
94
|
+
if (/[\}\]]/.test(state.context.type))
|
|
95
|
+
pushContext(state, "pattern", stream.column());
|
|
96
|
+
else if (state.context.type == "pattern" && !state.context.align) {
|
|
97
|
+
state.context.align = true;
|
|
98
|
+
state.context.col = stream.column();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return style;
|
|
102
|
+
},
|
|
103
|
+
indent: function(state, textAfter, cx) {
|
|
104
|
+
var firstChar = textAfter && textAfter.charAt(0);
|
|
105
|
+
var context = state.context;
|
|
106
|
+
if (/[\]\}]/.test(firstChar))
|
|
107
|
+
while (context && context.type == "pattern") context = context.prev;
|
|
108
|
+
var closing = context && firstChar == context.type;
|
|
109
|
+
if (!context)
|
|
110
|
+
return 0;
|
|
111
|
+
else if (context.type == "pattern")
|
|
112
|
+
return context.col;
|
|
113
|
+
else if (context.align)
|
|
114
|
+
return context.col + (closing ? 0 : 1);
|
|
115
|
+
else
|
|
116
|
+
return context.indent + (closing ? 0 : cx.unit);
|
|
117
|
+
},
|
|
118
|
+
languageData: {
|
|
119
|
+
commentTokens: { line: "#" }
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
export {
|
|
123
|
+
turtle
|
|
124
|
+
};
|
|
@@ -28707,7 +28707,16 @@ const defaultChatKitLabels = {
|
|
|
28707
28707
|
historyItemActionAriaLabel: "Conversation options",
|
|
28708
28708
|
historyItemEditAction: "Edit",
|
|
28709
28709
|
historyItemDeleteAction: "Delete",
|
|
28710
|
-
historyShowAll: "Show all"
|
|
28710
|
+
historyShowAll: "Show all",
|
|
28711
|
+
markdownEditorBold: "Bold",
|
|
28712
|
+
markdownEditorItalic: "Italic",
|
|
28713
|
+
markdownEditorStrikethrough: "Strikethrough",
|
|
28714
|
+
markdownEditorInlineCode: "Inline code",
|
|
28715
|
+
markdownEditorLink: "Link",
|
|
28716
|
+
markdownEditorLinkPlaceholder: "Paste or type a link…",
|
|
28717
|
+
markdownEditorCopyCode: "Copy code",
|
|
28718
|
+
markdownEditorSearchLanguage: "Search language…",
|
|
28719
|
+
markdownEditorNoLanguageFound: "No language found"
|
|
28711
28720
|
};
|
|
28712
28721
|
const CHAT_KIT_LABELS = /* @__PURE__ */ Symbol("chat-kit-labels");
|
|
28713
28722
|
function provideChatKitLabels(labels) {
|
|
@@ -28724,11 +28733,25 @@ function useChatKitLabels() {
|
|
|
28724
28733
|
}
|
|
28725
28734
|
export {
|
|
28726
28735
|
CHAT_KIT_LABELS as C,
|
|
28736
|
+
SKIP as S,
|
|
28727
28737
|
remarkNormalizeMath as a,
|
|
28728
28738
|
useMarkdownParser as b,
|
|
28739
|
+
formatHeadingAsSetext as c,
|
|
28729
28740
|
defaultChatKitLabels as d,
|
|
28741
|
+
decodeString as e,
|
|
28742
|
+
formatCodeAsIndented as f,
|
|
28743
|
+
encodeCharacterReference as g,
|
|
28744
|
+
patternInScope as h,
|
|
28745
|
+
handle$1 as i,
|
|
28746
|
+
unified as j,
|
|
28747
|
+
remarkParse as k,
|
|
28748
|
+
visitParents as l,
|
|
28749
|
+
remarkGfm as m,
|
|
28730
28750
|
normalizeMathDelimiters as n,
|
|
28751
|
+
remarkMath as o,
|
|
28731
28752
|
provideChatKitLabels as p,
|
|
28732
28753
|
remarkCitations as r,
|
|
28733
|
-
useChatKitLabels as u
|
|
28754
|
+
useChatKitLabels as u,
|
|
28755
|
+
visit as v,
|
|
28756
|
+
zwitch as z
|
|
28734
28757
|
};
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
var ERRORCLASS = "error";
|
|
2
|
+
function wordRegexp(words) {
|
|
3
|
+
return new RegExp("^((" + words.join(")|(") + "))\\b", "i");
|
|
4
|
+
}
|
|
5
|
+
var singleOperators = new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]");
|
|
6
|
+
var singleDelimiters = new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]");
|
|
7
|
+
var doubleOperators = new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))");
|
|
8
|
+
var doubleDelimiters = new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))");
|
|
9
|
+
var tripleDelimiters = new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))");
|
|
10
|
+
var identifiers = new RegExp("^[_A-Za-z][_A-Za-z0-9]*");
|
|
11
|
+
var openingKeywords = ["class", "module", "sub", "enum", "select", "while", "if", "function", "get", "set", "property", "try", "structure", "synclock", "using", "with"];
|
|
12
|
+
var middleKeywords = ["else", "elseif", "case", "catch", "finally"];
|
|
13
|
+
var endKeywords = ["next", "loop"];
|
|
14
|
+
var operatorKeywords = ["and", "andalso", "or", "orelse", "xor", "in", "not", "is", "isnot", "like"];
|
|
15
|
+
var wordOperators = wordRegexp(operatorKeywords);
|
|
16
|
+
var commonKeywords = ["#const", "#else", "#elseif", "#end", "#if", "#region", "addhandler", "addressof", "alias", "as", "byref", "byval", "cbool", "cbyte", "cchar", "cdate", "cdbl", "cdec", "cint", "clng", "cobj", "compare", "const", "continue", "csbyte", "cshort", "csng", "cstr", "cuint", "culng", "cushort", "declare", "default", "delegate", "dim", "directcast", "each", "erase", "error", "event", "exit", "explicit", "false", "for", "friend", "gettype", "goto", "handles", "implements", "imports", "infer", "inherits", "interface", "isfalse", "istrue", "lib", "me", "mod", "mustinherit", "mustoverride", "my", "mybase", "myclass", "namespace", "narrowing", "new", "nothing", "notinheritable", "notoverridable", "of", "off", "on", "operator", "option", "optional", "out", "overloads", "overridable", "overrides", "paramarray", "partial", "private", "protected", "public", "raiseevent", "readonly", "redim", "removehandler", "resume", "return", "shadows", "shared", "static", "step", "stop", "strict", "then", "throw", "to", "true", "trycast", "typeof", "until", "until", "when", "widening", "withevents", "writeonly"];
|
|
17
|
+
var commontypes = ["object", "boolean", "char", "string", "byte", "sbyte", "short", "ushort", "int16", "uint16", "integer", "uinteger", "int32", "uint32", "long", "ulong", "int64", "uint64", "decimal", "single", "double", "float", "date", "datetime", "intptr", "uintptr"];
|
|
18
|
+
var keywords = wordRegexp(commonKeywords);
|
|
19
|
+
var types = wordRegexp(commontypes);
|
|
20
|
+
var stringPrefixes = '"';
|
|
21
|
+
var opening = wordRegexp(openingKeywords);
|
|
22
|
+
var middle = wordRegexp(middleKeywords);
|
|
23
|
+
var closing = wordRegexp(endKeywords);
|
|
24
|
+
var doubleClosing = wordRegexp(["end"]);
|
|
25
|
+
var doOpening = wordRegexp(["do"]);
|
|
26
|
+
function indent(_stream, state) {
|
|
27
|
+
state.currentIndent++;
|
|
28
|
+
}
|
|
29
|
+
function dedent(_stream, state) {
|
|
30
|
+
state.currentIndent--;
|
|
31
|
+
}
|
|
32
|
+
function tokenBase(stream, state) {
|
|
33
|
+
if (stream.eatSpace()) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
var ch = stream.peek();
|
|
37
|
+
if (ch === "'") {
|
|
38
|
+
stream.skipToEnd();
|
|
39
|
+
return "comment";
|
|
40
|
+
}
|
|
41
|
+
if (stream.match(/^((&H)|(&O))?[0-9\.a-f]/i, false)) {
|
|
42
|
+
var floatLiteral = false;
|
|
43
|
+
if (stream.match(/^\d*\.\d+F?/i)) {
|
|
44
|
+
floatLiteral = true;
|
|
45
|
+
} else if (stream.match(/^\d+\.\d*F?/)) {
|
|
46
|
+
floatLiteral = true;
|
|
47
|
+
} else if (stream.match(/^\.\d+F?/)) {
|
|
48
|
+
floatLiteral = true;
|
|
49
|
+
}
|
|
50
|
+
if (floatLiteral) {
|
|
51
|
+
stream.eat(/J/i);
|
|
52
|
+
return "number";
|
|
53
|
+
}
|
|
54
|
+
var intLiteral = false;
|
|
55
|
+
if (stream.match(/^&H[0-9a-f]+/i)) {
|
|
56
|
+
intLiteral = true;
|
|
57
|
+
} else if (stream.match(/^&O[0-7]+/i)) {
|
|
58
|
+
intLiteral = true;
|
|
59
|
+
} else if (stream.match(/^[1-9]\d*F?/)) {
|
|
60
|
+
stream.eat(/J/i);
|
|
61
|
+
intLiteral = true;
|
|
62
|
+
} else if (stream.match(/^0(?![\dx])/i)) {
|
|
63
|
+
intLiteral = true;
|
|
64
|
+
}
|
|
65
|
+
if (intLiteral) {
|
|
66
|
+
stream.eat(/L/i);
|
|
67
|
+
return "number";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (stream.match(stringPrefixes)) {
|
|
71
|
+
state.tokenize = tokenStringFactory(stream.current());
|
|
72
|
+
return state.tokenize(stream, state);
|
|
73
|
+
}
|
|
74
|
+
if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters)) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
if (stream.match(doubleOperators) || stream.match(singleOperators) || stream.match(wordOperators)) {
|
|
78
|
+
return "operator";
|
|
79
|
+
}
|
|
80
|
+
if (stream.match(singleDelimiters)) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
if (stream.match(doOpening)) {
|
|
84
|
+
indent(stream, state);
|
|
85
|
+
state.doInCurrentLine = true;
|
|
86
|
+
return "keyword";
|
|
87
|
+
}
|
|
88
|
+
if (stream.match(opening)) {
|
|
89
|
+
if (!state.doInCurrentLine)
|
|
90
|
+
indent(stream, state);
|
|
91
|
+
else
|
|
92
|
+
state.doInCurrentLine = false;
|
|
93
|
+
return "keyword";
|
|
94
|
+
}
|
|
95
|
+
if (stream.match(middle)) {
|
|
96
|
+
return "keyword";
|
|
97
|
+
}
|
|
98
|
+
if (stream.match(doubleClosing)) {
|
|
99
|
+
dedent(stream, state);
|
|
100
|
+
dedent(stream, state);
|
|
101
|
+
return "keyword";
|
|
102
|
+
}
|
|
103
|
+
if (stream.match(closing)) {
|
|
104
|
+
dedent(stream, state);
|
|
105
|
+
return "keyword";
|
|
106
|
+
}
|
|
107
|
+
if (stream.match(types)) {
|
|
108
|
+
return "keyword";
|
|
109
|
+
}
|
|
110
|
+
if (stream.match(keywords)) {
|
|
111
|
+
return "keyword";
|
|
112
|
+
}
|
|
113
|
+
if (stream.match(identifiers)) {
|
|
114
|
+
return "variable";
|
|
115
|
+
}
|
|
116
|
+
stream.next();
|
|
117
|
+
return ERRORCLASS;
|
|
118
|
+
}
|
|
119
|
+
function tokenStringFactory(delimiter) {
|
|
120
|
+
var singleline = delimiter.length == 1;
|
|
121
|
+
var OUTCLASS = "string";
|
|
122
|
+
return function(stream, state) {
|
|
123
|
+
while (!stream.eol()) {
|
|
124
|
+
stream.eatWhile(/[^'"]/);
|
|
125
|
+
if (stream.match(delimiter)) {
|
|
126
|
+
state.tokenize = tokenBase;
|
|
127
|
+
return OUTCLASS;
|
|
128
|
+
} else {
|
|
129
|
+
stream.eat(/['"]/);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (singleline) {
|
|
133
|
+
state.tokenize = tokenBase;
|
|
134
|
+
}
|
|
135
|
+
return OUTCLASS;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
function tokenLexer(stream, state) {
|
|
139
|
+
var style = state.tokenize(stream, state);
|
|
140
|
+
var current = stream.current();
|
|
141
|
+
if (current === ".") {
|
|
142
|
+
style = state.tokenize(stream, state);
|
|
143
|
+
if (style === "variable") {
|
|
144
|
+
return "variable";
|
|
145
|
+
} else {
|
|
146
|
+
return ERRORCLASS;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
var delimiter_index = "[({".indexOf(current);
|
|
150
|
+
if (delimiter_index !== -1) {
|
|
151
|
+
indent(stream, state);
|
|
152
|
+
}
|
|
153
|
+
delimiter_index = "])}".indexOf(current);
|
|
154
|
+
if (delimiter_index !== -1) {
|
|
155
|
+
if (dedent(stream, state)) {
|
|
156
|
+
return ERRORCLASS;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return style;
|
|
160
|
+
}
|
|
161
|
+
const vb = {
|
|
162
|
+
name: "vb",
|
|
163
|
+
startState: function() {
|
|
164
|
+
return {
|
|
165
|
+
tokenize: tokenBase,
|
|
166
|
+
lastToken: null,
|
|
167
|
+
currentIndent: 0,
|
|
168
|
+
nextLineIndent: 0,
|
|
169
|
+
doInCurrentLine: false
|
|
170
|
+
};
|
|
171
|
+
},
|
|
172
|
+
token: function(stream, state) {
|
|
173
|
+
if (stream.sol()) {
|
|
174
|
+
state.currentIndent += state.nextLineIndent;
|
|
175
|
+
state.nextLineIndent = 0;
|
|
176
|
+
state.doInCurrentLine = 0;
|
|
177
|
+
}
|
|
178
|
+
var style = tokenLexer(stream, state);
|
|
179
|
+
state.lastToken = { style, content: stream.current() };
|
|
180
|
+
return style;
|
|
181
|
+
},
|
|
182
|
+
indent: function(state, textAfter, cx) {
|
|
183
|
+
var trueText = textAfter.replace(/^\s+|\s+$/g, "");
|
|
184
|
+
if (trueText.match(closing) || trueText.match(doubleClosing) || trueText.match(middle)) return cx.unit * (state.currentIndent - 1);
|
|
185
|
+
if (state.currentIndent < 0) return 0;
|
|
186
|
+
return state.currentIndent * cx.unit;
|
|
187
|
+
},
|
|
188
|
+
languageData: {
|
|
189
|
+
closeBrackets: { brackets: ["(", "[", "{", '"'] },
|
|
190
|
+
commentTokens: { line: "'" },
|
|
191
|
+
autocomplete: openingKeywords.concat(middleKeywords).concat(endKeywords).concat(operatorKeywords).concat(commonKeywords).concat(commontypes)
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
export {
|
|
195
|
+
vb
|
|
196
|
+
};
|