@sciexpr/vue 0.2.0 → 0.2.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/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +253 -241
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +5 -4
package/dist/index.mjs
CHANGED
|
@@ -1,64 +1,68 @@
|
|
|
1
|
-
import { ref as v, watch as
|
|
1
|
+
import { ref as v, watch as B, shallowRef as te, defineComponent as E, useSlots as ae, openBlock as i, createElementBlock as m, normalizeClass as N, unref as S, toDisplayString as w, computed as F, inject as Y, provide as K, Fragment as C, renderList as $, createCommentVNode as M, renderSlot as oe, createTextVNode as le, createElementVNode as h, createBlock as G, Teleport as ne, normalizeStyle as H, withDirectives as D, vModelText as j, createVNode as se, nextTick as V, createStaticVNode as ce, vShow as Z, onMounted as ie, onUnmounted as re } from "vue";
|
|
2
2
|
import { KatexRenderer as Q, UnicodeRenderer as ue, MathMLRenderer as de } from "@sciexpr/renderer";
|
|
3
3
|
import { ParserRegistry as U } from "@sciexpr/parser";
|
|
4
|
-
import { AIPipeline as
|
|
4
|
+
import { AIPipeline as O } from "@sciexpr/ai";
|
|
5
5
|
import { ExpressionKind as me } from "@sciexpr/core";
|
|
6
6
|
function ut(e) {
|
|
7
|
-
const o = v(""), l = v(""), n = v(""), c = v(null),
|
|
8
|
-
function
|
|
7
|
+
const o = v(""), l = v(""), n = v(""), c = v(null), r = new U(), u = e.katexRenderer ?? new Q(), a = new ue(), s = new de();
|
|
8
|
+
function d(t) {
|
|
9
9
|
var b;
|
|
10
10
|
try {
|
|
11
|
-
const
|
|
12
|
-
if (!
|
|
11
|
+
const y = r.parse(t, { hint: "auto" });
|
|
12
|
+
if (!y || y.children.length === 0) {
|
|
13
13
|
o.value = "", c.value = null;
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
|
-
const g =
|
|
16
|
+
const g = u.render(y, {
|
|
17
17
|
displayMode: e.displayMode,
|
|
18
18
|
...e.renderOptions
|
|
19
19
|
});
|
|
20
|
-
o.value = g.value, (b = g.warnings) != null && b.length, l.value = s.render(
|
|
21
|
-
} catch (
|
|
20
|
+
o.value = g.value, (b = g.warnings) != null && b.length, l.value = s.render(y).value, n.value = a.render(y).value, c.value = null;
|
|
21
|
+
} catch (y) {
|
|
22
22
|
c.value = {
|
|
23
|
-
message:
|
|
23
|
+
message: y instanceof Error ? y.message : String(y)
|
|
24
24
|
}, o.value = "";
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
}, { immediate: !0 }), {
|
|
27
|
+
return B(e.source, (t) => {
|
|
28
|
+
d(t);
|
|
29
|
+
}, { immediate: !0 }), u.ready.then(() => {
|
|
30
|
+
d(e.source.value);
|
|
31
|
+
}), {
|
|
30
32
|
html: o,
|
|
31
33
|
mathml: l,
|
|
32
34
|
unicode: n,
|
|
33
35
|
error: c,
|
|
34
|
-
render:
|
|
36
|
+
render: d
|
|
35
37
|
};
|
|
36
38
|
}
|
|
37
39
|
function J(e) {
|
|
38
|
-
const o = v(""), l = v(null), n = te(null), c = new U(),
|
|
39
|
-
function
|
|
40
|
+
const o = v(""), l = v(null), n = te(null), c = new U(), r = new Q();
|
|
41
|
+
function u(a) {
|
|
40
42
|
var s;
|
|
41
43
|
try {
|
|
42
|
-
const
|
|
43
|
-
if (n.value =
|
|
44
|
+
const d = c.parse(a, { hint: "auto" });
|
|
45
|
+
if (n.value = d, !d || d.children.length === 0) {
|
|
44
46
|
o.value = "", l.value = null;
|
|
45
47
|
return;
|
|
46
48
|
}
|
|
47
|
-
const
|
|
49
|
+
const t = r.render(d, {
|
|
48
50
|
displayMode: ((s = e.displayMode) == null ? void 0 : s.value) ?? !1
|
|
49
51
|
});
|
|
50
|
-
o.value =
|
|
51
|
-
} catch (
|
|
52
|
+
o.value = t.value, l.value = null;
|
|
53
|
+
} catch (d) {
|
|
52
54
|
l.value = {
|
|
53
|
-
message:
|
|
54
|
-
}, o.value =
|
|
55
|
+
message: d instanceof Error ? d.message : String(d)
|
|
56
|
+
}, o.value = a;
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
}, { immediate: !0 }),
|
|
59
|
+
return B([e.source, e.displayMode ?? v(!1)], ([a]) => {
|
|
60
|
+
u(a);
|
|
61
|
+
}, { immediate: !0 }), r.ready.then(() => {
|
|
62
|
+
u(e.source.value);
|
|
63
|
+
}), { html: o, error: l, ast: n, render: u };
|
|
60
64
|
}
|
|
61
|
-
const pe = ["data-source"], be = ["title"], xe = ["innerHTML"], ve = /* @__PURE__ */
|
|
65
|
+
const pe = ["data-source"], be = ["title"], xe = ["innerHTML"], ve = /* @__PURE__ */ E({
|
|
62
66
|
__name: "Formula",
|
|
63
67
|
props: {
|
|
64
68
|
source: { default: "" },
|
|
@@ -68,101 +72,109 @@ const pe = ["data-source"], be = ["title"], xe = ["innerHTML"], ve = /* @__PURE_
|
|
|
68
72
|
fallbackText: { default: "" }
|
|
69
73
|
},
|
|
70
74
|
setup(e) {
|
|
71
|
-
var
|
|
72
|
-
const o = e, l = ae(), n = (
|
|
75
|
+
var s, d, t;
|
|
76
|
+
const o = e, l = ae(), n = (t = (d = (s = l.default) == null ? void 0 : s.call(l)) == null ? void 0 : d[0]) == null ? void 0 : t.children, c = v(o.source || n || "");
|
|
77
|
+
B(() => o.source, (b) => {
|
|
78
|
+
c.value = b || n || "";
|
|
79
|
+
});
|
|
80
|
+
const r = v(o.displayMode);
|
|
81
|
+
B(() => o.displayMode, (b) => {
|
|
82
|
+
r.value = b;
|
|
83
|
+
});
|
|
84
|
+
const { html: u, error: a } = J({
|
|
73
85
|
source: c,
|
|
74
|
-
displayMode:
|
|
86
|
+
displayMode: r
|
|
75
87
|
});
|
|
76
|
-
return (
|
|
88
|
+
return (b, y) => (i(), m("span", {
|
|
77
89
|
class: N(["sciexpr-formula", o.className, {
|
|
78
90
|
"sciexpr-display": o.displayMode,
|
|
79
|
-
"sciexpr-error": S(
|
|
91
|
+
"sciexpr-error": S(a)
|
|
80
92
|
}]),
|
|
81
93
|
"data-source": c.value
|
|
82
94
|
}, [
|
|
83
|
-
S(
|
|
95
|
+
S(a) ? (i(), m("span", {
|
|
84
96
|
key: 0,
|
|
85
97
|
class: "sciexpr-formula-error",
|
|
86
|
-
title: S(
|
|
87
|
-
}, w(e.fallbackText || c.value), 9, be)) : (i(),
|
|
98
|
+
title: S(a).message
|
|
99
|
+
}, w(e.fallbackText || c.value), 9, be)) : (i(), m("span", {
|
|
88
100
|
key: 1,
|
|
89
101
|
innerHTML: S(u),
|
|
90
102
|
class: "sciexpr-formula-content"
|
|
91
103
|
}, null, 8, xe))
|
|
92
104
|
], 10, pe));
|
|
93
105
|
}
|
|
94
|
-
}),
|
|
106
|
+
}), A = (e, o) => {
|
|
95
107
|
const l = e.__vccOpts || e;
|
|
96
108
|
for (const [n, c] of o)
|
|
97
109
|
l[n] = c;
|
|
98
110
|
return l;
|
|
99
|
-
}, dt = /* @__PURE__ */
|
|
111
|
+
}, dt = /* @__PURE__ */ A(ve, [["__scopeId", "data-v-557e5ff9"]]);
|
|
100
112
|
function fe(e) {
|
|
101
|
-
const o = v(e.initialValue ?? ""), l = v(0), n = v(""), c = v(null),
|
|
102
|
-
function
|
|
113
|
+
const o = v(e.initialValue ?? ""), l = v(0), n = v(""), c = v(null), r = v(null), u = new U();
|
|
114
|
+
function a(g, I) {
|
|
103
115
|
o.value = g, I !== void 0 && (l.value = I);
|
|
104
116
|
}
|
|
105
117
|
function s(g) {
|
|
106
|
-
const I = o.value.slice(0, l.value),
|
|
107
|
-
o.value = I + g +
|
|
118
|
+
const I = o.value.slice(0, l.value), T = o.value.slice(l.value);
|
|
119
|
+
o.value = I + g + T, l.value += g.length;
|
|
108
120
|
}
|
|
109
|
-
function
|
|
110
|
-
const
|
|
111
|
-
o.value = g +
|
|
121
|
+
function d(g, I) {
|
|
122
|
+
const T = o.value;
|
|
123
|
+
o.value = g + T + I, l.value = o.value.length;
|
|
112
124
|
}
|
|
113
|
-
function
|
|
125
|
+
function t() {
|
|
114
126
|
try {
|
|
115
|
-
const g =
|
|
116
|
-
return
|
|
127
|
+
const g = u.parse(o.value, { hint: "auto" });
|
|
128
|
+
return r.value = g, g;
|
|
117
129
|
} catch {
|
|
118
|
-
return
|
|
130
|
+
return r.value = null, null;
|
|
119
131
|
}
|
|
120
132
|
}
|
|
121
|
-
const b = F(() => o.value.trim().length === 0),
|
|
133
|
+
const b = F(() => o.value.trim().length === 0), y = F(() => o.value);
|
|
122
134
|
return {
|
|
123
135
|
// State
|
|
124
136
|
value: o,
|
|
125
137
|
cursor: l,
|
|
126
138
|
html: n,
|
|
127
|
-
ast:
|
|
139
|
+
ast: r,
|
|
128
140
|
error: c,
|
|
129
141
|
// Computed
|
|
130
142
|
isEmpty: b,
|
|
131
|
-
latexSource:
|
|
143
|
+
latexSource: y,
|
|
132
144
|
// Actions
|
|
133
|
-
handleInput:
|
|
145
|
+
handleInput: a,
|
|
134
146
|
insertText: s,
|
|
135
|
-
wrapSelection:
|
|
136
|
-
parse:
|
|
147
|
+
wrapSelection: d,
|
|
148
|
+
parse: t
|
|
137
149
|
};
|
|
138
150
|
}
|
|
139
151
|
function ye(e) {
|
|
140
|
-
const o = v([]), l = v(!1), n = v(0), c = v(""),
|
|
141
|
-
async function
|
|
142
|
-
if (!
|
|
152
|
+
const o = v([]), l = v(!1), n = v(0), c = v(""), r = e.pipeline ?? new O(), u = e.config ?? { enabled: !0, minTriggerLength: 2, maxItems: 10 };
|
|
153
|
+
async function a(b, y) {
|
|
154
|
+
if (!u.enabled) {
|
|
143
155
|
l.value = !1;
|
|
144
156
|
return;
|
|
145
157
|
}
|
|
146
|
-
const g = he(b,
|
|
147
|
-
if (!g || g.length < (
|
|
158
|
+
const g = he(b, y);
|
|
159
|
+
if (!g || g.length < (u.minTriggerLength ?? 2)) {
|
|
148
160
|
l.value = !1;
|
|
149
161
|
return;
|
|
150
162
|
}
|
|
151
163
|
c.value = g;
|
|
152
164
|
const I = {
|
|
153
165
|
currentInput: b,
|
|
154
|
-
cursorPosition:
|
|
166
|
+
cursorPosition: y,
|
|
155
167
|
expressionType: me.Math
|
|
156
|
-
},
|
|
157
|
-
o.value =
|
|
168
|
+
}, T = await r.getCompletions(I);
|
|
169
|
+
o.value = T.items.slice(0, u.maxItems ?? 10), l.value = o.value.length > 0, n.value = 0;
|
|
158
170
|
}
|
|
159
171
|
function s(b) {
|
|
160
172
|
return l.value = !1, b.text;
|
|
161
173
|
}
|
|
162
|
-
function
|
|
174
|
+
function d(b) {
|
|
163
175
|
b === "up" ? n.value = Math.max(0, n.value - 1) : n.value = Math.min(o.value.length - 1, n.value + 1);
|
|
164
176
|
}
|
|
165
|
-
function
|
|
177
|
+
function t() {
|
|
166
178
|
l.value = !1, o.value = [];
|
|
167
179
|
}
|
|
168
180
|
return {
|
|
@@ -170,33 +182,33 @@ function ye(e) {
|
|
|
170
182
|
visible: l,
|
|
171
183
|
selectedIndex: n,
|
|
172
184
|
query: c,
|
|
173
|
-
trigger:
|
|
185
|
+
trigger: a,
|
|
174
186
|
select: s,
|
|
175
|
-
moveSelection:
|
|
176
|
-
close:
|
|
187
|
+
moveSelection: d,
|
|
188
|
+
close: t
|
|
177
189
|
};
|
|
178
190
|
}
|
|
179
191
|
function he(e, o) {
|
|
180
192
|
const l = e.slice(0, o), n = l.lastIndexOf("\\");
|
|
181
193
|
if (n !== -1) {
|
|
182
|
-
const
|
|
183
|
-
if (
|
|
194
|
+
const u = l.slice(n).match(/^\\[a-zA-Z]*$/);
|
|
195
|
+
if (u) return u[0];
|
|
184
196
|
}
|
|
185
197
|
const c = l.match(/([a-zA-Z_]+)$/);
|
|
186
198
|
return c ? c[1] : "";
|
|
187
199
|
}
|
|
188
|
-
const
|
|
200
|
+
const q = Symbol("sciexpr-ai-pipeline");
|
|
189
201
|
function ge(e) {
|
|
190
|
-
const o = e ? new
|
|
191
|
-
function l(
|
|
192
|
-
const
|
|
193
|
-
K(
|
|
202
|
+
const o = e ? new O(e) : Y(q, null);
|
|
203
|
+
function l(r) {
|
|
204
|
+
const u = new O(r);
|
|
205
|
+
K(q, u);
|
|
194
206
|
}
|
|
195
|
-
function n(
|
|
196
|
-
o && K(
|
|
207
|
+
function n(r) {
|
|
208
|
+
o && K(q, new O({ completionProvider: r }));
|
|
197
209
|
}
|
|
198
|
-
function c(
|
|
199
|
-
o && K(
|
|
210
|
+
function c(r) {
|
|
211
|
+
o && K(q, new O({ knowledgeBaseProvider: r }));
|
|
200
212
|
}
|
|
201
213
|
return {
|
|
202
214
|
pipeline: o,
|
|
@@ -208,7 +220,7 @@ function ge(e) {
|
|
|
208
220
|
const we = {
|
|
209
221
|
key: 0,
|
|
210
222
|
class: "sciexpr-toolbar-group-label"
|
|
211
|
-
}, ke = ["title", "disabled", "onClick"], Ce = /* @__PURE__ */
|
|
223
|
+
}, ke = ["title", "disabled", "onClick"], Ce = /* @__PURE__ */ E({
|
|
212
224
|
__name: "Toolbar",
|
|
213
225
|
props: {
|
|
214
226
|
categories: {},
|
|
@@ -292,31 +304,31 @@ const we = {
|
|
|
292
304
|
]
|
|
293
305
|
}
|
|
294
306
|
];
|
|
295
|
-
function c(
|
|
296
|
-
l("insert",
|
|
307
|
+
function c(r) {
|
|
308
|
+
l("insert", r);
|
|
297
309
|
}
|
|
298
|
-
return (
|
|
310
|
+
return (r, u) => (i(), m("div", {
|
|
299
311
|
class: N(["sciexpr-toolbar", { "sciexpr-toolbar-compact": e.compact }]),
|
|
300
312
|
role: "toolbar",
|
|
301
313
|
"aria-label": "Formula toolbar"
|
|
302
314
|
}, [
|
|
303
|
-
(i(),
|
|
304
|
-
key:
|
|
315
|
+
(i(), m(C, null, $(n, (a) => (i(), m(C, {
|
|
316
|
+
key: a.id
|
|
305
317
|
}, [
|
|
306
|
-
!e.categories || e.categories.includes(
|
|
318
|
+
!e.categories || e.categories.includes(a.id) ? (i(), m("div", {
|
|
307
319
|
key: 0,
|
|
308
320
|
class: N(["sciexpr-toolbar-group", { "sciexpr-toolbar-group-compact": e.compact }])
|
|
309
321
|
}, [
|
|
310
|
-
e.compact ? M("", !0) : (i(),
|
|
311
|
-
(i(!0),
|
|
322
|
+
e.compact ? M("", !0) : (i(), m("span", we, w(a.icon) + " " + w(a.label), 1)),
|
|
323
|
+
(i(!0), m(C, null, $(a.commands, (s) => (i(), m("button", {
|
|
312
324
|
key: s.latex,
|
|
313
325
|
class: N(["sciexpr-toolbar-btn", { "sciexpr-toolbar-btn-compact": e.compact }]),
|
|
314
326
|
title: s.description,
|
|
315
327
|
disabled: e.disabled,
|
|
316
328
|
type: "button",
|
|
317
|
-
onClick: (
|
|
329
|
+
onClick: (d) => c(s.latex)
|
|
318
330
|
}, [
|
|
319
|
-
oe(
|
|
331
|
+
oe(r.$slots, `btn-${s.label}`, { command: s }, () => [
|
|
320
332
|
le(w(s.label), 1)
|
|
321
333
|
], !0)
|
|
322
334
|
], 10, ke))), 128))
|
|
@@ -324,7 +336,7 @@ const we = {
|
|
|
324
336
|
], 64))), 64))
|
|
325
337
|
], 2));
|
|
326
338
|
}
|
|
327
|
-
}), Se = /* @__PURE__ */
|
|
339
|
+
}), Se = /* @__PURE__ */ A(Ce, [["__scopeId", "data-v-329eccb9"]]), Ne = {
|
|
328
340
|
key: 0,
|
|
329
341
|
class: "sciexpr-preview-error"
|
|
330
342
|
}, _e = {
|
|
@@ -336,7 +348,7 @@ const we = {
|
|
|
336
348
|
}, Ie = {
|
|
337
349
|
key: 3,
|
|
338
350
|
class: "sciexpr-preview-source"
|
|
339
|
-
}, Le = /* @__PURE__ */
|
|
351
|
+
}, Le = /* @__PURE__ */ E({
|
|
340
352
|
__name: "LivePreview",
|
|
341
353
|
props: {
|
|
342
354
|
source: {},
|
|
@@ -345,38 +357,38 @@ const we = {
|
|
|
345
357
|
},
|
|
346
358
|
setup(e) {
|
|
347
359
|
const o = e, l = v(o.source), n = v(o.displayMode);
|
|
348
|
-
|
|
349
|
-
l.value =
|
|
350
|
-
}),
|
|
351
|
-
n.value =
|
|
360
|
+
B(() => o.source, (u) => {
|
|
361
|
+
l.value = u;
|
|
362
|
+
}), B(() => o.displayMode, (u) => {
|
|
363
|
+
n.value = u;
|
|
352
364
|
});
|
|
353
|
-
const { html: c, error:
|
|
365
|
+
const { html: c, error: r } = J({
|
|
354
366
|
source: l,
|
|
355
367
|
displayMode: n
|
|
356
368
|
});
|
|
357
|
-
return (
|
|
369
|
+
return (u, a) => (i(), m("div", {
|
|
358
370
|
class: N(["sciexpr-preview", { "sciexpr-preview-display": e.displayMode }])
|
|
359
371
|
}, [
|
|
360
|
-
S(
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
])) : S(c) ? (i(),
|
|
364
|
-
|
|
365
|
-
])) : (i(),
|
|
366
|
-
|
|
372
|
+
S(r) ? (i(), m("div", Ne, [
|
|
373
|
+
a[0] || (a[0] = h("span", { class: "sciexpr-preview-error-icon" }, "⚠", -1)),
|
|
374
|
+
h("span", null, w(S(r).message), 1)
|
|
375
|
+
])) : S(c) ? (i(), m("div", _e, [
|
|
376
|
+
h("span", { innerHTML: S(c) }, null, 8, $e)
|
|
377
|
+
])) : (i(), m("div", Me, [...a[1] || (a[1] = [
|
|
378
|
+
h("span", { class: "sciexpr-preview-empty-text" }, "Preview", -1)
|
|
367
379
|
])])),
|
|
368
|
-
e.showSource && e.source ? (i(),
|
|
369
|
-
|
|
380
|
+
e.showSource && e.source ? (i(), m("div", Ie, [
|
|
381
|
+
h("code", null, w(e.source), 1)
|
|
370
382
|
])) : M("", !0)
|
|
371
383
|
], 2));
|
|
372
384
|
}
|
|
373
|
-
}), Pe = /* @__PURE__ */
|
|
385
|
+
}), Pe = /* @__PURE__ */ A(Le, [["__scopeId", "data-v-b3730bc4"]]), Re = ["aria-selected", "onClick", "onMouseenter"], Te = { class: "sciexpr-autocomplete-label" }, Be = {
|
|
374
386
|
key: 0,
|
|
375
387
|
class: "sciexpr-autocomplete-desc"
|
|
376
388
|
}, Ee = {
|
|
377
389
|
key: 1,
|
|
378
390
|
class: "sciexpr-autocomplete-source"
|
|
379
|
-
}, Ae = /* @__PURE__ */
|
|
391
|
+
}, Ae = /* @__PURE__ */ E({
|
|
380
392
|
__name: "AutocompleteDropdown",
|
|
381
393
|
props: {
|
|
382
394
|
items: {},
|
|
@@ -386,46 +398,46 @@ const we = {
|
|
|
386
398
|
},
|
|
387
399
|
emits: ["select", "close"],
|
|
388
400
|
setup(e, { emit: o }) {
|
|
389
|
-
const l = o, n = Y(
|
|
390
|
-
function c(
|
|
391
|
-
l("select",
|
|
401
|
+
const l = o, n = Y(q, null);
|
|
402
|
+
function c(u) {
|
|
403
|
+
l("select", u);
|
|
392
404
|
}
|
|
393
|
-
function u
|
|
405
|
+
function r(u) {
|
|
394
406
|
return {
|
|
395
407
|
symbol: "#0d6efd",
|
|
396
408
|
command: "#6f42c1",
|
|
397
409
|
template: "#198754",
|
|
398
410
|
correction: "#fd7e14",
|
|
399
411
|
formula: "#d63384"
|
|
400
|
-
}[
|
|
412
|
+
}[u] ?? "#6c757d";
|
|
401
413
|
}
|
|
402
|
-
return (
|
|
403
|
-
e.visible && e.items.length > 0 ? (i(),
|
|
414
|
+
return (u, a) => (i(), G(ne, { to: "body" }, [
|
|
415
|
+
e.visible && e.items.length > 0 ? (i(), m("div", {
|
|
404
416
|
key: 0,
|
|
405
417
|
class: "sciexpr-autocomplete",
|
|
406
418
|
style: H(e.position ? { top: e.position.top + "px", left: e.position.left + "px" } : {}),
|
|
407
419
|
role: "listbox"
|
|
408
420
|
}, [
|
|
409
|
-
(i(!0),
|
|
410
|
-
key: `${s.text}-${
|
|
411
|
-
class: N(["sciexpr-autocomplete-item", { selected:
|
|
421
|
+
(i(!0), m(C, null, $(e.items, (s, d) => (i(), m("div", {
|
|
422
|
+
key: `${s.text}-${d}`,
|
|
423
|
+
class: N(["sciexpr-autocomplete-item", { selected: d === e.selectedIndex }]),
|
|
412
424
|
role: "option",
|
|
413
|
-
"aria-selected":
|
|
414
|
-
onClick: (
|
|
415
|
-
onMouseenter: (
|
|
425
|
+
"aria-selected": d === e.selectedIndex,
|
|
426
|
+
onClick: (t) => c(s),
|
|
427
|
+
onMouseenter: (t) => u.$emit("select", s)
|
|
416
428
|
}, [
|
|
417
|
-
|
|
429
|
+
h("span", {
|
|
418
430
|
class: "sciexpr-autocomplete-category",
|
|
419
|
-
style: H({ background:
|
|
431
|
+
style: H({ background: r(s.category) })
|
|
420
432
|
}, w(s.category), 5),
|
|
421
|
-
|
|
422
|
-
s.description ? (i(),
|
|
423
|
-
S(n) ? (i(),
|
|
424
|
-
], 42,
|
|
433
|
+
h("span", Te, w(s.label), 1),
|
|
434
|
+
s.description ? (i(), m("span", Be, w(s.description), 1)) : M("", !0),
|
|
435
|
+
S(n) ? (i(), m("span", Ee, w(s.previewHtml ? "AI" : ""), 1)) : M("", !0)
|
|
436
|
+
], 42, Re))), 128))
|
|
425
437
|
], 4)) : M("", !0)
|
|
426
438
|
]));
|
|
427
439
|
}
|
|
428
|
-
}), Oe = /* @__PURE__ */
|
|
440
|
+
}), Oe = /* @__PURE__ */ A(Ae, [["__scopeId", "data-v-d18e03d1"]]), qe = { class: "sciexpr-editor-input-wrap" }, Fe = ["placeholder", "readonly", "rows"], He = /* @__PURE__ */ E({
|
|
429
441
|
__name: "FormulaEditor",
|
|
430
442
|
props: {
|
|
431
443
|
value: { default: "" },
|
|
@@ -440,100 +452,100 @@ const we = {
|
|
|
440
452
|
},
|
|
441
453
|
emits: ["update:value", "change", "error"],
|
|
442
454
|
setup(e, { emit: o }) {
|
|
443
|
-
const l = e, n = o, c = v(null),
|
|
444
|
-
|
|
445
|
-
|
|
455
|
+
const l = e, n = o, c = v(null), r = v(null), u = v({ top: 0, left: 0 }), a = v(l.value);
|
|
456
|
+
B(() => l.value, (p) => {
|
|
457
|
+
a.value = p;
|
|
446
458
|
});
|
|
447
|
-
const s = fe({ initialValue:
|
|
459
|
+
const s = fe({ initialValue: a.value }), { pipeline: d } = ge(), t = ye({
|
|
448
460
|
config: l.autocomplete,
|
|
449
|
-
pipeline:
|
|
461
|
+
pipeline: d
|
|
450
462
|
});
|
|
451
463
|
function b(p) {
|
|
452
464
|
const x = p.target, f = x.value, k = x.selectionStart;
|
|
453
|
-
|
|
465
|
+
a.value = f, s.value.value = f, s.cursor.value = k, n("update:value", f), n("change", f), t.trigger(f, k), W();
|
|
454
466
|
}
|
|
455
|
-
function
|
|
456
|
-
if (
|
|
467
|
+
function y(p) {
|
|
468
|
+
if (t.visible.value) {
|
|
457
469
|
if (p.key === "ArrowDown") {
|
|
458
|
-
p.preventDefault(),
|
|
470
|
+
p.preventDefault(), t.moveSelection("down");
|
|
459
471
|
return;
|
|
460
472
|
}
|
|
461
473
|
if (p.key === "ArrowUp") {
|
|
462
|
-
p.preventDefault(),
|
|
474
|
+
p.preventDefault(), t.moveSelection("up");
|
|
463
475
|
return;
|
|
464
476
|
}
|
|
465
477
|
if (p.key === "Enter" || p.key === "Tab") {
|
|
466
478
|
p.preventDefault();
|
|
467
|
-
const x =
|
|
479
|
+
const x = t.suggestions.value[t.selectedIndex.value];
|
|
468
480
|
x && z(x.text);
|
|
469
481
|
return;
|
|
470
482
|
}
|
|
471
483
|
if (p.key === "Escape") {
|
|
472
|
-
|
|
484
|
+
t.close();
|
|
473
485
|
return;
|
|
474
486
|
}
|
|
475
487
|
}
|
|
476
|
-
(p.ctrlKey || p.metaKey) && (p.key === "b" && (p.preventDefault(), ee("\\mathbf{", "}")), p.key === "/" && (p.preventDefault(),
|
|
488
|
+
(p.ctrlKey || p.metaKey) && (p.key === "b" && (p.preventDefault(), ee("\\mathbf{", "}")), p.key === "/" && (p.preventDefault(), T("\\frac{}{}")));
|
|
477
489
|
}
|
|
478
490
|
function g(p) {
|
|
479
|
-
|
|
491
|
+
T(p);
|
|
480
492
|
}
|
|
481
493
|
function I(p) {
|
|
482
494
|
z(p.text);
|
|
483
495
|
}
|
|
484
|
-
function
|
|
496
|
+
function T(p) {
|
|
485
497
|
const x = c.value;
|
|
486
498
|
if (!x) return;
|
|
487
|
-
const f = x.selectionStart, k = x.selectionEnd, L =
|
|
488
|
-
|
|
499
|
+
const f = x.selectionStart, k = x.selectionEnd, L = a.value.slice(0, f), P = a.value.slice(k);
|
|
500
|
+
a.value = L + p + P, n("update:value", a.value), V(() => {
|
|
489
501
|
x.focus();
|
|
490
502
|
const _ = f + p.length;
|
|
491
|
-
x.setSelectionRange(_, _),
|
|
503
|
+
x.setSelectionRange(_, _), t.close();
|
|
492
504
|
});
|
|
493
505
|
}
|
|
494
506
|
function z(p) {
|
|
495
507
|
const x = c.value;
|
|
496
508
|
if (!x) return;
|
|
497
|
-
const f = x.selectionStart, k =
|
|
509
|
+
const f = x.selectionStart, k = a.value.slice(0, f), L = k.lastIndexOf("\\");
|
|
498
510
|
let P;
|
|
499
511
|
if (L !== -1 && f - L < 30)
|
|
500
512
|
P = L;
|
|
501
513
|
else {
|
|
502
|
-
const
|
|
503
|
-
P =
|
|
514
|
+
const R = k.match(/([a-zA-Z_]+)$/);
|
|
515
|
+
P = R ? f - R[0].length : f;
|
|
504
516
|
}
|
|
505
|
-
const _ =
|
|
506
|
-
|
|
517
|
+
const _ = a.value.slice(f);
|
|
518
|
+
a.value = a.value.slice(0, P) + p + _, n("update:value", a.value), V(() => {
|
|
507
519
|
x.focus();
|
|
508
|
-
const
|
|
509
|
-
x.setSelectionRange(
|
|
520
|
+
const R = P + p.length;
|
|
521
|
+
x.setSelectionRange(R, R), t.close();
|
|
510
522
|
});
|
|
511
523
|
}
|
|
512
524
|
function ee(p, x) {
|
|
513
525
|
const f = c.value;
|
|
514
526
|
if (!f) return;
|
|
515
|
-
const k = f.selectionStart, L = f.selectionEnd, P =
|
|
516
|
-
|
|
527
|
+
const k = f.selectionStart, L = f.selectionEnd, P = a.value.slice(k, L) || "", _ = a.value.slice(0, k) + p + P + x + a.value.slice(L);
|
|
528
|
+
a.value = _, n("update:value", _), V(() => {
|
|
517
529
|
f.focus();
|
|
518
|
-
const
|
|
519
|
-
f.setSelectionRange(
|
|
530
|
+
const R = k + p.length + P.length;
|
|
531
|
+
f.setSelectionRange(R, R);
|
|
520
532
|
});
|
|
521
533
|
}
|
|
522
534
|
function W() {
|
|
523
535
|
const p = c.value;
|
|
524
536
|
if (!p) return;
|
|
525
|
-
const x = p.getBoundingClientRect(), f = p.selectionStart, k = 20, L = 8, _ =
|
|
526
|
-
`),
|
|
527
|
-
|
|
537
|
+
const x = p.getBoundingClientRect(), f = p.selectionStart, k = 20, L = 8, _ = a.value.slice(0, f).split(`
|
|
538
|
+
`), R = _[_.length - 1].length;
|
|
539
|
+
u.value = {
|
|
528
540
|
top: x.top + _.length * k + 24 + window.scrollY,
|
|
529
|
-
left: x.left +
|
|
541
|
+
left: x.left + R * L + window.scrollX
|
|
530
542
|
};
|
|
531
543
|
}
|
|
532
|
-
return F(() =>
|
|
544
|
+
return F(() => a.value.trim().length > 0), (p, x) => {
|
|
533
545
|
var f;
|
|
534
|
-
return i(),
|
|
546
|
+
return i(), m("div", {
|
|
535
547
|
ref_key: "editorRef",
|
|
536
|
-
ref:
|
|
548
|
+
ref: r,
|
|
537
549
|
class: N(["sciexpr-editor", { "sciexpr-editor-display": e.displayMode }])
|
|
538
550
|
}, [
|
|
539
551
|
e.showToolbar && !e.readonly ? (i(), G(Se, {
|
|
@@ -541,11 +553,11 @@ const we = {
|
|
|
541
553
|
categories: (f = e.toolbar) == null ? void 0 : f.categories,
|
|
542
554
|
onInsert: g
|
|
543
555
|
}, null, 8, ["categories"])) : M("", !0),
|
|
544
|
-
|
|
545
|
-
D(
|
|
556
|
+
h("div", qe, [
|
|
557
|
+
D(h("textarea", {
|
|
546
558
|
ref_key: "textareaRef",
|
|
547
559
|
ref: c,
|
|
548
|
-
"onUpdate:modelValue": x[0] || (x[0] = (k) =>
|
|
560
|
+
"onUpdate:modelValue": x[0] || (x[0] = (k) => a.value = k),
|
|
549
561
|
class: N(["sciexpr-editor-textarea", {
|
|
550
562
|
"sciexpr-editor-textarea-display": e.displayMode,
|
|
551
563
|
"sciexpr-editor-textarea-readonly": e.readonly
|
|
@@ -559,30 +571,30 @@ const we = {
|
|
|
559
571
|
autocorrect: "off",
|
|
560
572
|
autocapitalize: "off",
|
|
561
573
|
onInput: b,
|
|
562
|
-
onKeydown:
|
|
574
|
+
onKeydown: y,
|
|
563
575
|
onFocus: W
|
|
564
576
|
}, null, 42, Fe), [
|
|
565
|
-
[j,
|
|
577
|
+
[j, a.value]
|
|
566
578
|
])
|
|
567
579
|
]),
|
|
568
580
|
se(Oe, {
|
|
569
|
-
items: S(
|
|
570
|
-
visible: S(
|
|
571
|
-
"selected-index": S(
|
|
572
|
-
position:
|
|
581
|
+
items: S(t).suggestions.value,
|
|
582
|
+
visible: S(t).visible.value,
|
|
583
|
+
"selected-index": S(t).selectedIndex.value,
|
|
584
|
+
position: u.value,
|
|
573
585
|
onSelect: I,
|
|
574
|
-
onClose: x[1] || (x[1] = (k) => S(
|
|
586
|
+
onClose: x[1] || (x[1] = (k) => S(t).close())
|
|
575
587
|
}, null, 8, ["items", "visible", "selected-index", "position"]),
|
|
576
588
|
e.showPreview ? (i(), G(Pe, {
|
|
577
589
|
key: 1,
|
|
578
|
-
source:
|
|
590
|
+
source: a.value,
|
|
579
591
|
"display-mode": e.displayMode,
|
|
580
592
|
"show-source": !1
|
|
581
593
|
}, null, 8, ["source", "display-mode"])) : M("", !0)
|
|
582
594
|
], 2);
|
|
583
595
|
};
|
|
584
596
|
}
|
|
585
|
-
}), mt = /* @__PURE__ */
|
|
597
|
+
}), mt = /* @__PURE__ */ A(He, [["__scopeId", "data-v-d6181c80"]]), De = { class: "sciexpr-symbol-panel" }, Ke = { class: "sciexpr-symbol-search" }, Ve = { class: "sciexpr-symbol-tabs" }, Ge = ["onClick"], Ue = { class: "sciexpr-symbol-grid" }, ze = ["title", "disabled", "onClick"], We = { class: "sciexpr-symbol-unicode" }, Ze = { class: "sciexpr-symbol-name" }, Xe = ["title", "disabled", "onClick"], Ye = { class: "sciexpr-symbol-unicode" }, je = { class: "sciexpr-symbol-name" }, Qe = /* @__PURE__ */ E({
|
|
586
598
|
__name: "SymbolPanel",
|
|
587
599
|
props: {
|
|
588
600
|
disabled: { type: Boolean }
|
|
@@ -701,78 +713,78 @@ const we = {
|
|
|
701
713
|
{ latex: "\\ce{->[H2O]}", unicode: "→[H₂O]", name: "With condition" }
|
|
702
714
|
]
|
|
703
715
|
}
|
|
704
|
-
], c = v(n[0].id),
|
|
705
|
-
if (!
|
|
706
|
-
const s =
|
|
707
|
-
return n.map((
|
|
708
|
-
...
|
|
709
|
-
symbols:
|
|
710
|
-
(
|
|
716
|
+
], c = v(n[0].id), r = v(""), u = F(() => {
|
|
717
|
+
if (!r.value) return n;
|
|
718
|
+
const s = r.value.toLowerCase();
|
|
719
|
+
return n.map((d) => ({
|
|
720
|
+
...d,
|
|
721
|
+
symbols: d.symbols.filter(
|
|
722
|
+
(t) => t.name.toLowerCase().includes(s) || t.latex.toLowerCase().includes(s)
|
|
711
723
|
)
|
|
712
|
-
})).filter((
|
|
724
|
+
})).filter((d) => d.symbols.length > 0);
|
|
713
725
|
});
|
|
714
|
-
function
|
|
726
|
+
function a(s) {
|
|
715
727
|
l("insert", s);
|
|
716
728
|
}
|
|
717
|
-
return (s,
|
|
718
|
-
|
|
719
|
-
D(
|
|
720
|
-
"onUpdate:modelValue":
|
|
729
|
+
return (s, d) => (i(), m("div", De, [
|
|
730
|
+
h("div", Ke, [
|
|
731
|
+
D(h("input", {
|
|
732
|
+
"onUpdate:modelValue": d[0] || (d[0] = (t) => r.value = t),
|
|
721
733
|
type: "text",
|
|
722
734
|
class: "sciexpr-symbol-search-input",
|
|
723
735
|
placeholder: "Search symbols..."
|
|
724
736
|
}, null, 512), [
|
|
725
|
-
[j,
|
|
737
|
+
[j, r.value]
|
|
726
738
|
])
|
|
727
739
|
]),
|
|
728
|
-
|
|
729
|
-
(i(),
|
|
730
|
-
key:
|
|
731
|
-
class: N(["sciexpr-symbol-tab", { active: c.value ===
|
|
732
|
-
onClick: (b) => c.value =
|
|
740
|
+
h("div", Ve, [
|
|
741
|
+
(i(), m(C, null, $(n, (t) => h("button", {
|
|
742
|
+
key: t.id,
|
|
743
|
+
class: N(["sciexpr-symbol-tab", { active: c.value === t.id }]),
|
|
744
|
+
onClick: (b) => c.value = t.id,
|
|
733
745
|
type: "button"
|
|
734
|
-
}, w(
|
|
746
|
+
}, w(t.label), 11, Ge)), 64))
|
|
735
747
|
]),
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
key:
|
|
748
|
+
h("div", Ue, [
|
|
749
|
+
r.value ? (i(!0), m(C, { key: 0 }, $(u.value, (t) => (i(), m(C, {
|
|
750
|
+
key: t.id
|
|
739
751
|
}, [
|
|
740
|
-
(i(!0),
|
|
752
|
+
(i(!0), m(C, null, $(t.symbols, (b) => (i(), m("button", {
|
|
741
753
|
key: b.latex,
|
|
742
754
|
class: N(["sciexpr-symbol-btn", { "sciexpr-symbol-btn-disabled": e.disabled }]),
|
|
743
755
|
title: `${b.name} — ${b.latex}`,
|
|
744
756
|
disabled: e.disabled,
|
|
745
757
|
type: "button",
|
|
746
|
-
onClick: (
|
|
758
|
+
onClick: (y) => a(b.latex)
|
|
747
759
|
}, [
|
|
748
|
-
|
|
749
|
-
|
|
760
|
+
h("span", We, w(b.unicode), 1),
|
|
761
|
+
h("span", Ze, w(b.name), 1)
|
|
750
762
|
], 10, ze))), 128))
|
|
751
|
-
], 64))), 128)) : (i(),
|
|
752
|
-
key:
|
|
763
|
+
], 64))), 128)) : (i(), m(C, { key: 1 }, $(n, (t) => (i(), m(C, {
|
|
764
|
+
key: t.id
|
|
753
765
|
}, [
|
|
754
|
-
c.value ===
|
|
766
|
+
c.value === t.id ? (i(!0), m(C, { key: 0 }, $(t.symbols, (b) => (i(), m("button", {
|
|
755
767
|
key: b.latex,
|
|
756
768
|
class: N(["sciexpr-symbol-btn", { "sciexpr-symbol-btn-disabled": e.disabled }]),
|
|
757
769
|
title: `${b.name} — ${b.latex}`,
|
|
758
770
|
disabled: e.disabled,
|
|
759
771
|
type: "button",
|
|
760
|
-
onClick: (
|
|
772
|
+
onClick: (y) => a(b.latex)
|
|
761
773
|
}, [
|
|
762
|
-
|
|
763
|
-
|
|
774
|
+
h("span", Ye, w(b.unicode), 1),
|
|
775
|
+
h("span", je, w(b.name), 1)
|
|
764
776
|
], 10, Xe))), 128)) : M("", !0)
|
|
765
777
|
], 64))), 64))
|
|
766
778
|
])
|
|
767
779
|
]));
|
|
768
780
|
}
|
|
769
|
-
}), pt = /* @__PURE__ */
|
|
781
|
+
}), pt = /* @__PURE__ */ A(Qe, [["__scopeId", "data-v-8a9ec119"]]), Je = { class: "sciexpr-element-grid" }, et = ["title", "disabled", "onClick"], tt = {
|
|
770
782
|
key: 0,
|
|
771
783
|
class: "sciexpr-element-number"
|
|
772
784
|
}, at = {
|
|
773
785
|
key: 1,
|
|
774
786
|
class: "sciexpr-element-symbol"
|
|
775
|
-
}, X = 18, ot = 6, lt = /* @__PURE__ */
|
|
787
|
+
}, X = 18, ot = 6, lt = /* @__PURE__ */ E({
|
|
776
788
|
__name: "ElementTable",
|
|
777
789
|
props: {
|
|
778
790
|
disabled: { type: Boolean },
|
|
@@ -824,70 +836,70 @@ const we = {
|
|
|
824
836
|
{ symbol: "Pt", name: "Platinum", atomicNumber: 78, row: 6, col: 10, block: "d" },
|
|
825
837
|
{ symbol: "Pb", name: "Lead", atomicNumber: 82, row: 6, col: 14, block: "p" }
|
|
826
838
|
], c = F(() => {
|
|
827
|
-
const
|
|
839
|
+
const a = [];
|
|
828
840
|
for (let s = 0; s < ot; s++)
|
|
829
|
-
|
|
841
|
+
a.push(new Array(X).fill(null));
|
|
830
842
|
for (const s of n)
|
|
831
|
-
|
|
832
|
-
return
|
|
843
|
+
a[s.row - 1][s.col - 1] = s;
|
|
844
|
+
return a;
|
|
833
845
|
});
|
|
834
|
-
function
|
|
846
|
+
function r(a) {
|
|
835
847
|
return {
|
|
836
848
|
s: "#ff6b6b",
|
|
837
849
|
p: "#ffd93d",
|
|
838
850
|
d: "#6bcb77",
|
|
839
851
|
f: "#4d96ff"
|
|
840
|
-
}[
|
|
852
|
+
}[a] ?? "#adb5bd";
|
|
841
853
|
}
|
|
842
|
-
function
|
|
843
|
-
l("insert",
|
|
854
|
+
function u(a) {
|
|
855
|
+
l("insert", a);
|
|
844
856
|
}
|
|
845
|
-
return (
|
|
857
|
+
return (a, s) => (i(), m("div", {
|
|
846
858
|
class: N(["sciexpr-element-table", { "sciexpr-element-table-compact": e.compact }])
|
|
847
859
|
}, [
|
|
848
860
|
s[0] || (s[0] = ce('<div class="sciexpr-element-legend" data-v-a5437c7c><span class="legend-item" data-v-a5437c7c><span class="legend-dot" style="background:#ff6b6b;" data-v-a5437c7c></span> s-block</span><span class="legend-item" data-v-a5437c7c><span class="legend-dot" style="background:#ffd93d;" data-v-a5437c7c></span> p-block</span><span class="legend-item" data-v-a5437c7c><span class="legend-dot" style="background:#6bcb77;" data-v-a5437c7c></span> d-block</span><span class="legend-item" data-v-a5437c7c><span class="legend-dot" style="background:#4d96ff;" data-v-a5437c7c></span> f-block</span></div>', 1)),
|
|
849
|
-
|
|
850
|
-
(i(!0),
|
|
851
|
-
key: c.value.indexOf(
|
|
861
|
+
h("div", Je, [
|
|
862
|
+
(i(!0), m(C, null, $(c.value, (d) => (i(), m(C, {
|
|
863
|
+
key: c.value.indexOf(d)
|
|
852
864
|
}, [
|
|
853
|
-
(i(!0),
|
|
865
|
+
(i(!0), m(C, null, $(d, (t, b) => D((i(), m("button", {
|
|
854
866
|
key: b,
|
|
855
867
|
class: N(["sciexpr-element-cell", {
|
|
856
868
|
"sciexpr-element-cell-compact": e.compact,
|
|
857
869
|
"sciexpr-element-cell-disabled": e.disabled
|
|
858
870
|
}]),
|
|
859
|
-
style: H(
|
|
860
|
-
gridRow:
|
|
861
|
-
gridColumn:
|
|
862
|
-
"--block-color":
|
|
871
|
+
style: H(t ? {
|
|
872
|
+
gridRow: t.row,
|
|
873
|
+
gridColumn: t.col,
|
|
874
|
+
"--block-color": r(t.block)
|
|
863
875
|
} : {}),
|
|
864
|
-
title:
|
|
876
|
+
title: t ? `${t.name} (${t.atomicNumber})` : "",
|
|
865
877
|
disabled: e.disabled,
|
|
866
878
|
type: "button",
|
|
867
|
-
onClick: (
|
|
879
|
+
onClick: (y) => t && u(t.symbol)
|
|
868
880
|
}, [
|
|
869
|
-
|
|
870
|
-
|
|
881
|
+
t ? (i(), m("span", tt, w(t.atomicNumber), 1)) : M("", !0),
|
|
882
|
+
t ? (i(), m("span", at, w(t.symbol), 1)) : M("", !0)
|
|
871
883
|
], 14, et)), [
|
|
872
|
-
[Z,
|
|
884
|
+
[Z, t !== null]
|
|
873
885
|
])), 128)),
|
|
874
|
-
(i(),
|
|
875
|
-
key: "empty-" +
|
|
886
|
+
(i(), m(C, null, $(X, (t) => D(h("div", {
|
|
887
|
+
key: "empty-" + t,
|
|
876
888
|
class: "sciexpr-element-cell sciexpr-element-empty",
|
|
877
|
-
style: H({ gridRow: c.value.indexOf(
|
|
889
|
+
style: H({ gridRow: c.value.indexOf(d) + 1, gridColumn: t })
|
|
878
890
|
}, null, 4), [
|
|
879
|
-
[Z, !
|
|
891
|
+
[Z, !d[t - 1]]
|
|
880
892
|
])), 64))
|
|
881
893
|
], 64))), 128))
|
|
882
894
|
])
|
|
883
895
|
], 2));
|
|
884
896
|
}
|
|
885
|
-
}), bt = /* @__PURE__ */
|
|
897
|
+
}), bt = /* @__PURE__ */ A(lt, [["__scopeId", "data-v-a5437c7c"]]);
|
|
886
898
|
function xt(e) {
|
|
887
899
|
function o(l) {
|
|
888
900
|
for (const n of e) {
|
|
889
|
-
const c = l.key.toLowerCase() === n.key.toLowerCase(),
|
|
890
|
-
if (c &&
|
|
901
|
+
const c = l.key.toLowerCase() === n.key.toLowerCase(), r = !!n.ctrl === (l.ctrlKey || l.metaKey), u = !!n.shift === l.shiftKey, a = !!n.alt === l.altKey;
|
|
902
|
+
if (c && r && u && a) {
|
|
891
903
|
l.preventDefault(), n.action();
|
|
892
904
|
return;
|
|
893
905
|
}
|
|
@@ -912,7 +924,7 @@ const vt = [
|
|
|
912
924
|
}, description: "Superscript (^)" }
|
|
913
925
|
];
|
|
914
926
|
export {
|
|
915
|
-
|
|
927
|
+
q as AI_PIPELINE_KEY,
|
|
916
928
|
Oe as AutocompleteDropdown,
|
|
917
929
|
vt as BUILTIN_SHORTCUTS,
|
|
918
930
|
bt as ElementTable,
|