@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.
Files changed (164) hide show
  1. package/dist/{CkHistory.vue_vue_type_script_setup_true_lang-D9Ph9eYp.js → CkHistory.vue_vue_type_script_setup_true_lang-Cr8vF94e.js} +214 -107
  2. package/dist/apl-fqmucPXA.js +140 -0
  3. package/dist/asciiarmor-DucZyvP0.js +56 -0
  4. package/dist/asn1-BnOEsgAm.js +144 -0
  5. package/dist/asterisk-QAlztEwS.js +345 -0
  6. package/dist/brainfuck-DZVCuF_t.js +53 -0
  7. package/dist/chat-kit.css +1166 -1
  8. package/dist/clike-CTYGlS6x.js +799 -0
  9. package/dist/clojure-BhXMqnxz.js +849 -0
  10. package/dist/cmake-BGaNd9E7.js +71 -0
  11. package/dist/cobol-4yqQntpt.js +120 -0
  12. package/dist/coffeescript-D2dXvhEc.js +308 -0
  13. package/dist/commonlisp-CF_VNHQR.js +130 -0
  14. package/dist/components/base/CkMilkdownEditor/CkMilkdownEditor.stories.d.ts +41 -0
  15. package/dist/components/base/CkMilkdownEditor/CkMilkdownEditor.stories.d.ts.map +1 -0
  16. package/dist/components/base/CkMilkdownEditor/CkMilkdownEditor.vue.d.ts +26 -0
  17. package/dist/components/base/CkMilkdownEditor/CkMilkdownEditor.vue.d.ts.map +1 -0
  18. package/dist/components/base/CkMilkdownEditor/codeMirrorTheme.d.ts +20 -0
  19. package/dist/components/base/CkMilkdownEditor/codeMirrorTheme.d.ts.map +1 -0
  20. package/dist/components/base/CkMilkdownEditor/createCrepeEditor.d.ts +42 -0
  21. package/dist/components/base/CkMilkdownEditor/createCrepeEditor.d.ts.map +1 -0
  22. package/dist/components/base/CkMilkdownEditor/crepeIcons.d.ts +33 -0
  23. package/dist/components/base/CkMilkdownEditor/crepeIcons.d.ts.map +1 -0
  24. package/dist/components/base/CkMilkdownEditor/index.d.ts +3 -0
  25. package/dist/components/base/CkMilkdownEditor/index.d.ts.map +1 -0
  26. package/dist/components/base/CkMilkdownEditor/markdownClassAttrs.d.ts +16 -0
  27. package/dist/components/base/CkMilkdownEditor/markdownClassAttrs.d.ts.map +1 -0
  28. package/dist/components/base/CkMilkdownEditor/types.d.ts +98 -0
  29. package/dist/components/base/CkMilkdownEditor/types.d.ts.map +1 -0
  30. package/dist/components/base/index.d.ts +2 -0
  31. package/dist/components/base/index.d.ts.map +1 -1
  32. package/dist/components/index.d.ts +2 -2
  33. package/dist/components/index.d.ts.map +1 -1
  34. package/dist/components/index.js +12 -11
  35. package/dist/createCrepeEditor-CFbvSH3s.js +74141 -0
  36. package/dist/crystal-DyuLTqLs.js +398 -0
  37. package/dist/css-DkSyTW67.js +1772 -0
  38. package/dist/cypher-Dlu_3r4V.js +121 -0
  39. package/dist/d-UURgV0Ux.js +179 -0
  40. package/dist/diff-B_Bi2Crb.js +25 -0
  41. package/dist/dockerfile-Bvk733Ga.js +201 -0
  42. package/dist/dtd-Dy74G54E.js +114 -0
  43. package/dist/dylan-TSb-Nfix.js +314 -0
  44. package/dist/ebnf-4fKAGW3a.js +140 -0
  45. package/dist/ecl-B59qGGVg.js +178 -0
  46. package/dist/eiffel-Dze7nlu3.js +134 -0
  47. package/dist/elm-DG7jkhNZ.js +176 -0
  48. package/dist/erlang-BO6gOnGA.js +674 -0
  49. package/dist/factor-CMxFHDqz.js +65 -0
  50. package/dist/fcl-CDDUNjTj.js +141 -0
  51. package/dist/forth-B9D2JCeE.js +116 -0
  52. package/dist/fortran-CAG2BFbe.js +467 -0
  53. package/dist/gas-0Aw8zDr5.js +293 -0
  54. package/dist/gherkin-DhZlEZiy.js +115 -0
  55. package/dist/groovy-CpwJiBl7.js +223 -0
  56. package/dist/handlers/index.js +1 -1
  57. package/dist/handlers/useChatKitLabels.d.ts +27 -0
  58. package/dist/handlers/useChatKitLabels.d.ts.map +1 -1
  59. package/dist/haskell-ySd-OUo8.js +459 -0
  60. package/dist/haxe-7MlzfeYV.js +514 -0
  61. package/dist/http-BqypyemW.js +79 -0
  62. package/dist/idl-4HIGJlDI.js +985 -0
  63. package/dist/index-A5rWjRtZ.js +689 -0
  64. package/dist/index-B0ldhzaj.js +385 -0
  65. package/dist/index-BVOjyn3y.js +2490 -0
  66. package/dist/index-BWvkps_G.js +309 -0
  67. package/dist/index-BaS8OW8V.js +151 -0
  68. package/dist/index-BlHHEbV-.js +406 -0
  69. package/dist/index-BoqzHVNB.js +82 -0
  70. package/dist/index-C6zYjwIQ.js +704 -0
  71. package/dist/index-CMJGuXap.js +330 -0
  72. package/dist/index-CRfGWVdQ.js +116 -0
  73. package/dist/index-C_gTb50u.js +81 -0
  74. package/dist/index-DSU7cBGz.js +178 -0
  75. package/dist/index-DSq3gvqU.js +1767 -0
  76. package/dist/index-Da3777l2.js +289 -0
  77. package/dist/index-DdlzabmR.js +1021 -0
  78. package/dist/index-DhY_9bdS.js +61 -0
  79. package/dist/index-Dm6C1blN.js +1052 -0
  80. package/dist/index-Tj3pzx-E.js +327 -0
  81. package/dist/index-ZeRS5rER.js +97 -0
  82. package/dist/index-gzleljO6.js +157 -0
  83. package/dist/index-naWlQpaL.js +642 -0
  84. package/dist/index-sKO1lHHC.js +312 -0
  85. package/dist/index.d.ts +2 -2
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/index.js +14 -13
  88. package/dist/javascript-Bt8B7yTi.js +992 -0
  89. package/dist/julia-Bs6JJhYG.js +407 -0
  90. package/dist/livescript-DmzgM3Yt.js +296 -0
  91. package/dist/lua-Cvg8VrAA.js +256 -0
  92. package/dist/mathematica-DNLOL9PQ.js +110 -0
  93. package/dist/mbox-Ga7d4MMN.js +117 -0
  94. package/dist/mirc-Dma3B8rS.js +107 -0
  95. package/dist/mllike-DHn7xckP.js +334 -0
  96. package/dist/modelica-0d55jYY0.js +147 -0
  97. package/dist/mscgen-DdqZYINH.js +135 -0
  98. package/dist/mumps-Btr8VblO.js +93 -0
  99. package/dist/nginx-DTDtBDVN.js +141 -0
  100. package/dist/nsis-CyKBdPWp.js +62 -0
  101. package/dist/ntriples-CvgOYMpL.js +153 -0
  102. package/dist/octave-DYBj3-tl.js +200 -0
  103. package/dist/oz-R_e8WMIi.js +231 -0
  104. package/dist/pascal-GD8iposT.js +105 -0
  105. package/dist/perl-DL9mHpoi.js +1105 -0
  106. package/dist/pig-C_4T4YIV.js +101 -0
  107. package/dist/powershell-B0suO7Vd.js +328 -0
  108. package/dist/properties-BR-vP1aU.js +58 -0
  109. package/dist/protobuf-BxgpyhoW.js +77 -0
  110. package/dist/pug-vHnWR0UE.js +405 -0
  111. package/dist/puppet-Bdao66PW.js +137 -0
  112. package/dist/python-BFGRmuZ9.js +426 -0
  113. package/dist/q-CrbCVq4a.js +131 -0
  114. package/dist/r-V7nswm59.js +170 -0
  115. package/dist/rpm-C-DLY-If.js +109 -0
  116. package/dist/ruby-CQTpZw6f.js +331 -0
  117. package/dist/sas-D2UG-yhZ.js +207 -0
  118. package/dist/scheme-BKzrkGJD.js +222 -0
  119. package/dist/shell-BlsXDxCn.js +222 -0
  120. package/dist/sieve-CjwBwOY5.js +135 -0
  121. package/dist/simple-mode-DMneyfDu.js +130 -0
  122. package/dist/smalltalk-BOIGQuhN.js +121 -0
  123. package/dist/solr-CwD7U71z.js +69 -0
  124. package/dist/sparql-DYskk2vE.js +249 -0
  125. package/dist/spreadsheet-Bgtt3oLP.js +87 -0
  126. package/dist/sql-Cei9CMfk.js +342 -0
  127. package/dist/stex-C1nZSzAw.js +230 -0
  128. package/dist/stylus-BkS-boTH.js +565 -0
  129. package/dist/swift-FRZi1uvB.js +291 -0
  130. package/dist/tcl-CUcaCdmq.js +114 -0
  131. package/dist/textile-BnFpjsrl.js +414 -0
  132. package/dist/tiddlywiki-CjprD-Qp.js +218 -0
  133. package/dist/tiki-DK9DOeWn.js +268 -0
  134. package/dist/toml-BOuWGMcf.js +76 -0
  135. package/dist/troff-E1bJ0PPL.js +61 -0
  136. package/dist/ttcn-cfg-Dc39-fIP.js +133 -0
  137. package/dist/ttcn-tKd4HLu4.js +192 -0
  138. package/dist/turtle-Dq7-1WAf.js +124 -0
  139. package/dist/{useChatKitLabels-368lodS5.js → useChatKitLabels-Ww1Q7xUr.js} +25 -2
  140. package/dist/vb-Dp90gtsv.js +196 -0
  141. package/dist/vbscript-Bfn8O8I7.js +478 -0
  142. package/dist/velocity-BwIZK1TH.js +149 -0
  143. package/dist/verilog-CnT9bMk0.js +429 -0
  144. package/dist/vhdl-DCkMIyT9.js +158 -0
  145. package/dist/webidl-BTLTThCm.js +204 -0
  146. package/dist/xquery-BrBUuxMR.js +525 -0
  147. package/dist/yacas-b5lAVEIl.js +130 -0
  148. package/dist/z80-ClgwfNdB.js +92 -0
  149. package/package.json +10 -4
  150. package/src/components/base/CkMilkdownEditor/CkMilkdownEditor.spec.ts +221 -0
  151. package/src/components/base/CkMilkdownEditor/CkMilkdownEditor.stories.ts +274 -0
  152. package/src/components/base/CkMilkdownEditor/CkMilkdownEditor.vue +151 -0
  153. package/src/components/base/CkMilkdownEditor/codeMirrorTheme.ts +132 -0
  154. package/src/components/base/CkMilkdownEditor/createCrepeEditor.ts +192 -0
  155. package/src/components/base/CkMilkdownEditor/crepeIcons.ts +77 -0
  156. package/src/components/base/CkMilkdownEditor/index.ts +2 -0
  157. package/src/components/base/CkMilkdownEditor/markdownClassAttrs.ts +64 -0
  158. package/src/components/base/CkMilkdownEditor/milkdown-theme.css +441 -0
  159. package/src/components/base/CkMilkdownEditor/types.ts +100 -0
  160. package/src/components/base/CkPromptInputDisclaimer/CkPromptInputDisclaimer.stories.ts +2 -2
  161. package/src/components/base/index.ts +6 -0
  162. package/src/components/index.ts +4 -0
  163. package/src/handlers/useChatKitLabels.ts +27 -0
  164. package/src/index.ts +4 -0
@@ -0,0 +1,230 @@
1
+ function mkStex(mathMode) {
2
+ function pushCommand(state, command) {
3
+ state.cmdState.push(command);
4
+ }
5
+ function peekCommand(state) {
6
+ if (state.cmdState.length > 0) {
7
+ return state.cmdState[state.cmdState.length - 1];
8
+ } else {
9
+ return null;
10
+ }
11
+ }
12
+ function popCommand(state) {
13
+ var plug = state.cmdState.pop();
14
+ if (plug) {
15
+ plug.closeBracket();
16
+ }
17
+ }
18
+ function getMostPowerful(state) {
19
+ var context = state.cmdState;
20
+ for (var i = context.length - 1; i >= 0; i--) {
21
+ var plug = context[i];
22
+ if (plug.name == "DEFAULT") {
23
+ continue;
24
+ }
25
+ return plug;
26
+ }
27
+ return { styleIdentifier: function() {
28
+ return null;
29
+ } };
30
+ }
31
+ function addPluginPattern(pluginName, cmdStyle, styles) {
32
+ return function() {
33
+ this.name = pluginName;
34
+ this.bracketNo = 0;
35
+ this.style = cmdStyle;
36
+ this.styles = styles;
37
+ this.argument = null;
38
+ this.styleIdentifier = function() {
39
+ return this.styles[this.bracketNo - 1] || null;
40
+ };
41
+ this.openBracket = function() {
42
+ this.bracketNo++;
43
+ return "bracket";
44
+ };
45
+ this.closeBracket = function() {
46
+ };
47
+ };
48
+ }
49
+ var plugins = {};
50
+ plugins["importmodule"] = addPluginPattern("importmodule", "tag", ["string", "builtin"]);
51
+ plugins["documentclass"] = addPluginPattern("documentclass", "tag", ["", "atom"]);
52
+ plugins["usepackage"] = addPluginPattern("usepackage", "tag", ["atom"]);
53
+ plugins["begin"] = addPluginPattern("begin", "tag", ["atom"]);
54
+ plugins["end"] = addPluginPattern("end", "tag", ["atom"]);
55
+ plugins["label"] = addPluginPattern("label", "tag", ["atom"]);
56
+ plugins["ref"] = addPluginPattern("ref", "tag", ["atom"]);
57
+ plugins["eqref"] = addPluginPattern("eqref", "tag", ["atom"]);
58
+ plugins["cite"] = addPluginPattern("cite", "tag", ["atom"]);
59
+ plugins["bibitem"] = addPluginPattern("bibitem", "tag", ["atom"]);
60
+ plugins["Bibitem"] = addPluginPattern("Bibitem", "tag", ["atom"]);
61
+ plugins["RBibitem"] = addPluginPattern("RBibitem", "tag", ["atom"]);
62
+ plugins["DEFAULT"] = function() {
63
+ this.name = "DEFAULT";
64
+ this.style = "tag";
65
+ this.styleIdentifier = this.openBracket = this.closeBracket = function() {
66
+ };
67
+ };
68
+ function setState(state, f) {
69
+ state.f = f;
70
+ }
71
+ function normal(source, state) {
72
+ var plug;
73
+ if (source.match(/^\\[a-zA-Z@\xc0-\u1fff\u2060-\uffff]+/)) {
74
+ var cmdName = source.current().slice(1);
75
+ plug = plugins.hasOwnProperty(cmdName) ? plugins[cmdName] : plugins["DEFAULT"];
76
+ plug = new plug();
77
+ pushCommand(state, plug);
78
+ setState(state, beginParams);
79
+ return plug.style;
80
+ }
81
+ if (source.match(/^\\[$&%#{}_]/)) {
82
+ return "tag";
83
+ }
84
+ if (source.match(/^\\[,;!\/\\]/)) {
85
+ return "tag";
86
+ }
87
+ if (source.match("\\[")) {
88
+ setState(state, function(source2, state2) {
89
+ return inMathMode(source2, state2, "\\]");
90
+ });
91
+ return "keyword";
92
+ }
93
+ if (source.match("\\(")) {
94
+ setState(state, function(source2, state2) {
95
+ return inMathMode(source2, state2, "\\)");
96
+ });
97
+ return "keyword";
98
+ }
99
+ if (source.match("$$")) {
100
+ setState(state, function(source2, state2) {
101
+ return inMathMode(source2, state2, "$$");
102
+ });
103
+ return "keyword";
104
+ }
105
+ if (source.match("$")) {
106
+ setState(state, function(source2, state2) {
107
+ return inMathMode(source2, state2, "$");
108
+ });
109
+ return "keyword";
110
+ }
111
+ var ch = source.next();
112
+ if (ch == "%") {
113
+ source.skipToEnd();
114
+ return "comment";
115
+ } else if (ch == "}" || ch == "]") {
116
+ plug = peekCommand(state);
117
+ if (plug) {
118
+ plug.closeBracket(ch);
119
+ setState(state, beginParams);
120
+ } else {
121
+ return "error";
122
+ }
123
+ return "bracket";
124
+ } else if (ch == "{" || ch == "[") {
125
+ plug = plugins["DEFAULT"];
126
+ plug = new plug();
127
+ pushCommand(state, plug);
128
+ return "bracket";
129
+ } else if (/\d/.test(ch)) {
130
+ source.eatWhile(/[\w.%]/);
131
+ return "atom";
132
+ } else {
133
+ source.eatWhile(/[\w\-_]/);
134
+ plug = getMostPowerful(state);
135
+ if (plug.name == "begin") {
136
+ plug.argument = source.current();
137
+ }
138
+ return plug.styleIdentifier();
139
+ }
140
+ }
141
+ function inMathMode(source, state, endModeSeq) {
142
+ if (source.eatSpace()) {
143
+ return null;
144
+ }
145
+ if (endModeSeq && source.match(endModeSeq)) {
146
+ setState(state, normal);
147
+ return "keyword";
148
+ }
149
+ if (source.match(/^\\[a-zA-Z@]+/)) {
150
+ return "tag";
151
+ }
152
+ if (source.match(/^[a-zA-Z]+/)) {
153
+ return "variableName.special";
154
+ }
155
+ if (source.match(/^\\[$&%#{}_]/)) {
156
+ return "tag";
157
+ }
158
+ if (source.match(/^\\[,;!\/]/)) {
159
+ return "tag";
160
+ }
161
+ if (source.match(/^[\^_&]/)) {
162
+ return "tag";
163
+ }
164
+ if (source.match(/^[+\-<>|=,\/@!*:;'"`~#?]/)) {
165
+ return null;
166
+ }
167
+ if (source.match(/^(\d+\.\d*|\d*\.\d+|\d+)/)) {
168
+ return "number";
169
+ }
170
+ var ch = source.next();
171
+ if (ch == "{" || ch == "}" || ch == "[" || ch == "]" || ch == "(" || ch == ")") {
172
+ return "bracket";
173
+ }
174
+ if (ch == "%") {
175
+ source.skipToEnd();
176
+ return "comment";
177
+ }
178
+ return "error";
179
+ }
180
+ function beginParams(source, state) {
181
+ var ch = source.peek(), lastPlug;
182
+ if (ch == "{" || ch == "[") {
183
+ lastPlug = peekCommand(state);
184
+ lastPlug.openBracket(ch);
185
+ source.eat(ch);
186
+ setState(state, normal);
187
+ return "bracket";
188
+ }
189
+ if (/[ \t\r]/.test(ch)) {
190
+ source.eat(ch);
191
+ return null;
192
+ }
193
+ setState(state, normal);
194
+ popCommand(state);
195
+ return normal(source, state);
196
+ }
197
+ return {
198
+ name: "stex",
199
+ startState: function() {
200
+ var f = mathMode ? function(source, state) {
201
+ return inMathMode(source, state);
202
+ } : normal;
203
+ return {
204
+ cmdState: [],
205
+ f
206
+ };
207
+ },
208
+ copyState: function(s) {
209
+ return {
210
+ cmdState: s.cmdState.slice(),
211
+ f: s.f
212
+ };
213
+ },
214
+ token: function(stream, state) {
215
+ return state.f(stream, state);
216
+ },
217
+ blankLine: function(state) {
218
+ state.f = normal;
219
+ state.cmdState.length = 0;
220
+ },
221
+ languageData: {
222
+ commentTokens: { line: "%" }
223
+ }
224
+ };
225
+ }
226
+ const stex = mkStex(false);
227
+ mkStex(true);
228
+ export {
229
+ stex
230
+ };