@oomol-lab/open-flow 0.1.0-alpha.9 → 0.1.0-beta.10

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 (74) hide show
  1. package/README.md +5 -1
  2. package/dist/browser/DesignerIcon-DjgOMYI5.js +2065 -0
  3. package/dist/browser/createResourceDialog-DNBueSYZ.js +505 -0
  4. package/dist/browser/{dist-n9WmBm5w.js → dist-BKuSVKCC.js} +1 -1
  5. package/dist/browser/dist-BMRLCebL.js +1893 -0
  6. package/dist/browser/{dist-DWzdGVm9.js → dist-By46o5UV.js} +74 -74
  7. package/dist/browser/dist-CP0883sY.js +4 -0
  8. package/dist/browser/{dist-B0Q2Mn0n.js → dist-Cc0y2Pli.js} +809 -810
  9. package/dist/browser/dist-CeSZ2xSM.js +444 -0
  10. package/dist/browser/{dist-Bc9TvHYl.js → dist-Dg_VXC8f.js} +134 -135
  11. package/dist/browser/{dist-DhsGR_K3.js → dist-DmuE3M0R.js} +47 -48
  12. package/dist/browser/{dist-D5mdziGP.js → dist-DpDLsYtO.js} +18 -19
  13. package/dist/browser/dist-DxahK_I8.js +2688 -0
  14. package/dist/browser/{dist-DXgEYMFx.js → dist-meg_oHVR.js} +230 -230
  15. package/dist/browser/{esm-YIGXG-Js.js → esm-yhVU_KbQ.js} +14 -15
  16. package/dist/browser/flow-authoring-module.d.ts +2 -2
  17. package/dist/browser/flow-authoring-node.d.ts +9 -4
  18. package/dist/browser/flow-authoring.d.ts +2 -1
  19. package/dist/browser/flow-authoring.js +752 -162
  20. package/dist/browser/flow-change.d.ts +122 -13
  21. package/dist/browser/flow-change.js +326 -96
  22. package/dist/browser/flow-notifications.d.ts +5 -0
  23. package/dist/browser/flowChanges-B2ttnaj9.js +12265 -0
  24. package/dist/browser/{flowRunInputEditorStore-DXOyyY7o.js → flowRunInputEditorStore-DDidwd8h.js} +1528 -783
  25. package/dist/browser/{flowWorkspace-D7-rBA1-.js → flowWorkspace-Dr8-Hut9.js} +42428 -42499
  26. package/dist/browser/getPseudoElementBounds-5LArT6Xc.js +7147 -0
  27. package/dist/browser/icons-KIOgjHpD.js +730 -0
  28. package/dist/browser/languages-DgJehE1g.js +62 -0
  29. package/dist/browser/lib-C5Ipyfps.js +7856 -0
  30. package/dist/browser/licenses.md +119 -1
  31. package/dist/browser/main-DmjVyuWr.js +76 -0
  32. package/dist/browser/{markdownContent-ColGUxHy.js → markdownContent-DUfLdnUt.js} +4811 -4795
  33. package/dist/browser/theme.css +63 -0
  34. package/dist/browser/theme.css.d.ts +1 -0
  35. package/dist/browser/typeScriptSession-_TgJ_7Oq.js +2578 -0
  36. package/dist/browser/waitNotificationInputs-BPulOxYt.js +26 -0
  37. package/dist/browser/workbench-contract.d.ts +2 -1
  38. package/dist/browser/workbench.css +1 -1
  39. package/dist/browser/workbench.d.ts +47 -1
  40. package/dist/browser/workbench.js +1524 -1768
  41. package/dist/browser/workbenchSelect-CbXrdwxW.js +1375 -0
  42. package/dist/common/connector-action.d.ts +6 -0
  43. package/dist/common/connector-action.js +37 -29
  44. package/dist/common/control-api-conformance.d.ts +1 -0
  45. package/dist/common/control-api-conformance.js +171 -51
  46. package/dist/common/control-api-errors.d.ts +28 -0
  47. package/dist/common/control-api.d.ts +80 -21
  48. package/dist/common/control-api.js +311 -131
  49. package/dist/common/flow-encoding.d.ts +2 -2
  50. package/dist/common/flow-encoding.js +28 -9
  51. package/dist/common/flow-notifications.d.ts +5 -0
  52. package/dist/common/flow-semantics.d.ts +4 -0
  53. package/dist/common/flow-semantics.js +3544 -1098
  54. package/dist/common/integration-trigger.d.ts +1 -0
  55. package/dist/common/licenses.md +1 -25
  56. package/dist/common/localization.d.ts +21 -0
  57. package/dist/common/localization.js +62 -0
  58. package/dist/common/provider-triggers.js +4 -1
  59. package/dist/common/run-events.js +2 -1
  60. package/dist/common/run-lifecycle.d.ts +17 -2
  61. package/dist/common/run-lifecycle.js +53 -2
  62. package/dist/common/runtime-contract.d.ts +1 -1
  63. package/dist/common/runtime-contract.js +27 -0
  64. package/dist/common/scheduler.d.ts +68 -7
  65. package/dist/common/scheduler.js +528 -240
  66. package/dist/index.d.ts +2 -1
  67. package/package.json +10 -1
  68. package/dist/browser/addNodeOptions-DRndy4EK.js +0 -6910
  69. package/dist/browser/createLucideIcon-CqjqCezK.js +0 -5537
  70. package/dist/browser/createResourceDialog-A64dDFCG.js +0 -467
  71. package/dist/browser/dist-CUkceEvN.js +0 -1620
  72. package/dist/browser/dist-CVtP-E2c.js +0 -1543
  73. package/dist/browser/dist-DQVavPcf.js +0 -2328
  74. package/dist/browser/field-CKGQHCIi.js +0 -312
@@ -0,0 +1,444 @@
1
+ import { d as e, m as t, p as n, s as r, y as i } from "./dist-Mecbzdl2.js";
2
+ import { E as a, O as o, o as s, p as c, r as l, s as u, t as d, y as f } from "./dist-BKuSVKCC.js";
3
+ //#region ../../node_modules/.bun/@codemirror+lint@6.9.7/node_modules/@codemirror/lint/dist/index.js
4
+ var p = class {
5
+ constructor(e, t, n) {
6
+ this.from = e, this.to = t, this.diagnostic = n;
7
+ }
8
+ }, m = class t {
9
+ constructor(e, t, n) {
10
+ this.diagnostics = e, this.panel = t, this.selected = n;
11
+ }
12
+ static init(n, r, i) {
13
+ let a = i.facet(k).markerFilter;
14
+ a && (n = a(n, i));
15
+ let o = n.slice().sort((e, t) => e.from - t.from || e.to - t.to), s = new e(), c = [], l = 0, u = i.doc.iter(), f = 0, p = i.doc.length;
16
+ for (let e = 0;;) {
17
+ let t = e == o.length ? null : o[e];
18
+ if (!t && !c.length) break;
19
+ let n, r;
20
+ if (c.length) n = l, r = c.reduce((e, t) => Math.min(e, t.to), t && t.from > n ? t.from : 1e8);
21
+ else {
22
+ if (n = t.from, n > p) break;
23
+ r = t.to, c.push(t), e++;
24
+ }
25
+ for (; e < o.length;) {
26
+ let t = o[e];
27
+ if (t.from == n && (t.to > t.from || t.to == n)) c.push(t), e++, r = Math.min(t.to, r);
28
+ else {
29
+ r = Math.min(t.from, r);
30
+ break;
31
+ }
32
+ }
33
+ r = Math.min(r, p);
34
+ let i = !1;
35
+ if (c.some((e) => e.from == n && (e.to == r || r == p)) && (i = n == r, !i && r - n < 10)) {
36
+ let e = n - (f + u.value.length);
37
+ e > 0 && (u.next(e), f = n);
38
+ for (let e = n;;) {
39
+ if (e >= r) {
40
+ i = !0;
41
+ break;
42
+ }
43
+ if (!u.lineBreak && f + u.value.length > e) break;
44
+ e = f + u.value.length, f += u.value.length, u.next();
45
+ }
46
+ }
47
+ let a = B(c);
48
+ if (i) s.add(n, n, d.widget({
49
+ widget: new N(a),
50
+ diagnostics: c.slice()
51
+ }));
52
+ else {
53
+ let e = c.reduce((e, t) => t.markClass ? e + " " + t.markClass : e, "");
54
+ s.add(n, r, d.mark({
55
+ class: "cm-lintRange cm-lintRange-" + a + e,
56
+ diagnostics: c.slice(),
57
+ inclusiveEnd: c.some((e) => e.to > r)
58
+ }));
59
+ }
60
+ if (l = r, l == p) break;
61
+ for (let e = 0; e < c.length; e++) c[e].to <= l && c.splice(e--, 1);
62
+ }
63
+ let m = s.finish();
64
+ return new t(m, r, h(m));
65
+ }
66
+ };
67
+ function h(e, t = null, n = 0) {
68
+ let r = null;
69
+ return e.between(n, 1e9, (e, n, { spec: i }) => {
70
+ if (!(t && i.diagnostics.indexOf(t) < 0)) {
71
+ if (!r) r = new p(e, n, t || i.diagnostics[0]);
72
+ else if (i.diagnostics.indexOf(r.diagnostic) < 0) return !1;
73
+ else r = new p(r.from, n, r.diagnostic);
74
+ }
75
+ }), r;
76
+ }
77
+ function g(e, t) {
78
+ let n = t.pos, r = t.end || n, i = e.state.facet(k).hideOn(e, n, r);
79
+ if (i != null) return i;
80
+ let a = e.startState.doc.lineAt(t.pos);
81
+ return !!(e.effects.some((e) => e.is(y)) || e.changes.touchesRange(a.from, Math.max(a.to, r)));
82
+ }
83
+ function _(e, t) {
84
+ return e.field(S, !1) ? t : t.concat(n.appendConfig.of(H));
85
+ }
86
+ function v(e, t) {
87
+ return { effects: _(e, [y.of(t)]) };
88
+ }
89
+ var y = /*@__PURE__*/ n.define(), b = /*@__PURE__*/ n.define(), x = /*@__PURE__*/ n.define(), S = /*@__PURE__*/ t.define({
90
+ create() {
91
+ return new m(d.none, null, null);
92
+ },
93
+ update(e, t) {
94
+ if (t.docChanged && e.diagnostics.size) {
95
+ let n = e.diagnostics.map(t.changes), r = null, i = e.panel;
96
+ if (e.selected) {
97
+ let i = t.changes.mapPos(e.selected.from, 1);
98
+ r = h(n, e.selected.diagnostic, i) || h(n, null, i);
99
+ }
100
+ !n.size && i && t.state.facet(k).autoPanel && (i = null), e = new m(n, i, r);
101
+ }
102
+ for (let n of t.effects) if (n.is(y)) {
103
+ let r = t.state.facet(k).autoPanel ? n.value.length ? F.open : null : e.panel;
104
+ e = m.init(n.value, r, t.state);
105
+ } else n.is(b) ? e = new m(e.diagnostics, n.value ? F.open : null, e.selected) : n.is(x) && (e = new m(e.diagnostics, e.panel, n.value));
106
+ return e;
107
+ },
108
+ provide: (e) => [a.from(e, (e) => e.panel), l.decorations.from(e, (e) => e.diagnostics)]
109
+ }), C = /*@__PURE__*/ d.mark({ class: "cm-lintRange cm-lintRange-active" });
110
+ function w(e, t, n) {
111
+ let { diagnostics: r } = e.state.field(S), i, a = -1, o = -1;
112
+ r.between(t - +(n < 0), t + +(n > 0), (e, r, { spec: s }) => {
113
+ if (t >= e && t <= r && (e == r || (t > e || n > 0) && (t < r || n < 0))) return i = s.diagnostics, a = e, o = r, !1;
114
+ });
115
+ let s = e.state.facet(k).tooltipFilter;
116
+ return i && s && (i = s(i, e.state)), i ? {
117
+ pos: a,
118
+ end: o,
119
+ above: !0,
120
+ create() {
121
+ return { dom: T(e, i) };
122
+ }
123
+ } : null;
124
+ }
125
+ function T(e, t) {
126
+ return o("ul", { class: "cm-tooltip-lint" }, t.map((t) => M(e, t, !1)));
127
+ }
128
+ var E = (e) => {
129
+ let t = e.state.field(S, !1);
130
+ (!t || !t.panel) && e.dispatch({ effects: _(e.state, [b.of(!0)]) });
131
+ let n = c(e, F.open);
132
+ return n && n.dom.querySelector(".cm-panel-lint ul").focus(), !0;
133
+ }, D = (e) => {
134
+ let t = e.state.field(S, !1);
135
+ return !t || !t.panel ? !1 : (e.dispatch({ effects: b.of(!1) }), !0);
136
+ }, O = [{
137
+ key: "Mod-Shift-m",
138
+ run: E,
139
+ preventDefault: !0
140
+ }, {
141
+ key: "F8",
142
+ run: (e) => {
143
+ let t = e.state.field(S, !1);
144
+ if (!t) return !1;
145
+ let n = e.state.selection.main, r = h(t.diagnostics, null, n.to + 1);
146
+ return !r && (r = h(t.diagnostics, null, 0), !r || r.from == n.from && r.to == n.to) ? !1 : (e.dispatch({
147
+ selection: {
148
+ anchor: r.from,
149
+ head: r.to
150
+ },
151
+ scrollIntoView: !0
152
+ }), u(e, r.from, 1, {
153
+ tooltip: V,
154
+ until: (e) => e.docChanged || e.newSelection.main.head < r.from || e.newSelection.main.head > r.to
155
+ }), !0);
156
+ }
157
+ }], k = /*@__PURE__*/ r.define({ combine(e) {
158
+ return {
159
+ sources: e.map((e) => e.source).filter((e) => e != null),
160
+ ...i(e.map((e) => e.config), {
161
+ delay: 750,
162
+ markerFilter: null,
163
+ tooltipFilter: null,
164
+ needsRefresh: null,
165
+ hideOn: () => null
166
+ }, {
167
+ delay: Math.max,
168
+ markerFilter: A,
169
+ tooltipFilter: A,
170
+ needsRefresh: (e, t) => e ? t ? (n) => e(n) || t(n) : e : t,
171
+ hideOn: (e, t) => e ? t ? (n, r, i) => e(n, r, i) || t(n, r, i) : e : t,
172
+ autoPanel: (e, t) => e || t
173
+ })
174
+ };
175
+ } });
176
+ function A(e, t) {
177
+ return e ? t ? (n, r) => t(e(n, r), r) : e : t;
178
+ }
179
+ function j(e) {
180
+ let t = [];
181
+ if (e) actions: for (let { name: n } of e) {
182
+ for (let e = 0; e < n.length; e++) {
183
+ let r = n[e];
184
+ if (/[a-zA-Z]/.test(r) && !t.some((e) => e.toLowerCase() == r.toLowerCase())) {
185
+ t.push(r);
186
+ continue actions;
187
+ }
188
+ }
189
+ t.push("");
190
+ }
191
+ return t;
192
+ }
193
+ function M(e, t, n) {
194
+ let r = n ? j(t.actions) : [];
195
+ return o("li", { class: "cm-diagnostic cm-diagnostic-" + t.severity }, o("span", { class: "cm-diagnosticText" }, t.renderMessage ? t.renderMessage(e) : t.message), t.actions?.map((n, i) => {
196
+ let a = !1, s = (r) => {
197
+ if (r.preventDefault(), a) return;
198
+ a = !0;
199
+ let i = h(e.state.field(S).diagnostics, t);
200
+ i && n.apply(e, i.from, i.to);
201
+ }, { name: c } = n, l = r[i] ? c.indexOf(r[i]) : -1, u = l < 0 ? c : [
202
+ c.slice(0, l),
203
+ o("u", c.slice(l, l + 1)),
204
+ c.slice(l + 1)
205
+ ], d = n.markClass ? " " + n.markClass : "";
206
+ return o("button", {
207
+ type: "button",
208
+ class: "cm-diagnosticAction" + d,
209
+ onclick: s,
210
+ onmousedown: s,
211
+ "aria-label": ` Action: ${c}${l < 0 ? "" : ` (access key "${r[i]})"`}.`
212
+ }, u);
213
+ }), t.source && o("div", { class: "cm-diagnosticSource" }, t.source));
214
+ }
215
+ var N = class extends s {
216
+ constructor(e) {
217
+ super(), this.sev = e;
218
+ }
219
+ eq(e) {
220
+ return e.sev == this.sev;
221
+ }
222
+ toDOM() {
223
+ return o("span", { class: "cm-lintPoint cm-lintPoint-" + this.sev });
224
+ }
225
+ }, P = class {
226
+ constructor(e, t) {
227
+ this.diagnostic = t, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = M(e, t, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option");
228
+ }
229
+ }, F = class e {
230
+ constructor(e) {
231
+ this.view = e, this.items = [];
232
+ let t = (t) => {
233
+ if (!(t.ctrlKey || t.altKey || t.metaKey)) {
234
+ if (t.keyCode == 27) D(this.view), this.view.focus();
235
+ else if (t.keyCode == 38 || t.keyCode == 33) this.moveSelection((this.selectedIndex - 1 + this.items.length) % this.items.length);
236
+ else if (t.keyCode == 40 || t.keyCode == 34) this.moveSelection((this.selectedIndex + 1) % this.items.length);
237
+ else if (t.keyCode == 36) this.moveSelection(0);
238
+ else if (t.keyCode == 35) this.moveSelection(this.items.length - 1);
239
+ else if (t.keyCode == 13) this.view.focus();
240
+ else if (t.keyCode >= 65 && t.keyCode <= 90 && this.selectedIndex >= 0) {
241
+ let { diagnostic: n } = this.items[this.selectedIndex], r = j(n.actions);
242
+ for (let i = 0; i < r.length; i++) if (r[i].toUpperCase().charCodeAt(0) == t.keyCode) {
243
+ let t = h(this.view.state.field(S).diagnostics, n);
244
+ t && n.actions[i].apply(e, t.from, t.to);
245
+ }
246
+ } else return;
247
+ t.preventDefault();
248
+ }
249
+ }, n = (e) => {
250
+ for (let t = 0; t < this.items.length; t++) this.items[t].dom.contains(e.target) && this.moveSelection(t);
251
+ };
252
+ this.list = o("ul", {
253
+ tabIndex: 0,
254
+ role: "listbox",
255
+ "aria-label": this.view.state.phrase("Diagnostics"),
256
+ onkeydown: t,
257
+ onclick: n
258
+ }), this.dom = o("div", { class: "cm-panel-lint" }, this.list, o("button", {
259
+ type: "button",
260
+ name: "close",
261
+ "aria-label": this.view.state.phrase("close"),
262
+ onclick: () => D(this.view)
263
+ }, "×")), this.update();
264
+ }
265
+ get selectedIndex() {
266
+ let e = this.view.state.field(S).selected;
267
+ if (!e) return -1;
268
+ for (let t = 0; t < this.items.length; t++) if (this.items[t].diagnostic == e.diagnostic) return t;
269
+ return -1;
270
+ }
271
+ update() {
272
+ let { diagnostics: e, selected: t } = this.view.state.field(S), n = 0, r = !1, i = null, a = /* @__PURE__ */ new Set();
273
+ for (e.between(0, this.view.state.doc.length, (e, o, { spec: s }) => {
274
+ for (let e of s.diagnostics) {
275
+ if (a.has(e)) continue;
276
+ a.add(e);
277
+ let o = -1, s;
278
+ for (let t = n; t < this.items.length; t++) if (this.items[t].diagnostic == e) {
279
+ o = t;
280
+ break;
281
+ }
282
+ o < 0 ? (s = new P(this.view, e), this.items.splice(n, 0, s), r = !0) : (s = this.items[o], o > n && (this.items.splice(n, o - n), r = !0)), t && s.diagnostic == t.diagnostic ? s.dom.hasAttribute("aria-selected") || (s.dom.setAttribute("aria-selected", "true"), i = s) : s.dom.hasAttribute("aria-selected") && s.dom.removeAttribute("aria-selected"), n++;
283
+ }
284
+ }); n < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0);) r = !0, this.items.pop();
285
+ this.items.length == 0 && (this.items.push(new P(this.view, {
286
+ from: -1,
287
+ to: -1,
288
+ severity: "info",
289
+ message: this.view.state.phrase("No diagnostics")
290
+ })), r = !0), i ? (this.list.setAttribute("aria-activedescendant", i.id), this.view.requestMeasure({
291
+ key: this,
292
+ read: () => ({
293
+ sel: i.dom.getBoundingClientRect(),
294
+ panel: this.list.getBoundingClientRect()
295
+ }),
296
+ write: ({ sel: e, panel: t }) => {
297
+ let n = t.height / this.list.offsetHeight;
298
+ e.top < t.top ? this.list.scrollTop -= (t.top - e.top) / n : e.bottom > t.bottom && (this.list.scrollTop += (e.bottom - t.bottom) / n);
299
+ }
300
+ })) : this.selectedIndex < 0 && this.list.removeAttribute("aria-activedescendant"), r && this.sync();
301
+ }
302
+ sync() {
303
+ let e = this.list.firstChild;
304
+ function t() {
305
+ let t = e;
306
+ e = t.nextSibling, t.remove();
307
+ }
308
+ for (let n of this.items) if (n.dom.parentNode == this.list) {
309
+ for (; e != n.dom;) t();
310
+ e = n.dom.nextSibling;
311
+ } else this.list.insertBefore(n.dom, e);
312
+ for (; e;) t();
313
+ }
314
+ moveSelection(e) {
315
+ if (this.selectedIndex < 0) return;
316
+ let t = h(this.view.state.field(S).diagnostics, this.items[e].diagnostic);
317
+ t && this.view.dispatch({
318
+ selection: {
319
+ anchor: t.from,
320
+ head: t.to
321
+ },
322
+ scrollIntoView: !0,
323
+ effects: x.of(t)
324
+ });
325
+ }
326
+ static open(t) {
327
+ return new e(t);
328
+ }
329
+ };
330
+ function I(e, t = "viewBox=\"0 0 40 40\"") {
331
+ return `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`;
332
+ }
333
+ function L(e) {
334
+ return I(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`, "width=\"6\" height=\"3\"");
335
+ }
336
+ var R = /*@__PURE__*/ l.baseTheme({
337
+ ".cm-diagnostic": {
338
+ padding: "3px 6px 3px 8px",
339
+ marginLeft: "-1px",
340
+ display: "block",
341
+ whiteSpace: "pre-wrap"
342
+ },
343
+ ".cm-diagnostic-error": { borderLeft: "5px solid #d11" },
344
+ ".cm-diagnostic-warning": { borderLeft: "5px solid orange" },
345
+ ".cm-diagnostic-info": { borderLeft: "5px solid #999" },
346
+ ".cm-diagnostic-hint": { borderLeft: "5px solid #66d" },
347
+ ".cm-diagnosticAction": {
348
+ font: "inherit",
349
+ border: "none",
350
+ padding: "2px 4px",
351
+ backgroundColor: "#444",
352
+ color: "white",
353
+ borderRadius: "3px",
354
+ marginLeft: "8px",
355
+ cursor: "pointer"
356
+ },
357
+ ".cm-diagnosticSource": {
358
+ fontSize: "70%",
359
+ opacity: .7
360
+ },
361
+ ".cm-lintRange": {
362
+ backgroundPosition: "left bottom",
363
+ backgroundRepeat: "repeat-x",
364
+ paddingBottom: "0.7px"
365
+ },
366
+ ".cm-lintRange-error": { backgroundImage: /*@__PURE__*/ L("#f11") },
367
+ ".cm-lintRange-warning": { backgroundImage: /*@__PURE__*/ L("orange") },
368
+ ".cm-lintRange-info": { backgroundImage: /*@__PURE__*/ L("#999") },
369
+ ".cm-lintRange-hint": { backgroundImage: /*@__PURE__*/ L("#66d") },
370
+ ".cm-lintRange-active": { backgroundColor: "#ffdd9980" },
371
+ ".cm-tooltip-lint": {
372
+ padding: 0,
373
+ margin: 0
374
+ },
375
+ ".cm-lintPoint": {
376
+ position: "relative",
377
+ "&:after": {
378
+ content: "\"\"",
379
+ position: "absolute",
380
+ bottom: 0,
381
+ left: "-2px",
382
+ borderLeft: "3px solid transparent",
383
+ borderRight: "3px solid transparent",
384
+ borderBottom: "4px solid #d11"
385
+ }
386
+ },
387
+ ".cm-lintPoint-warning": { "&:after": { borderBottomColor: "orange" } },
388
+ ".cm-lintPoint-info": { "&:after": { borderBottomColor: "#999" } },
389
+ ".cm-lintPoint-hint": { "&:after": { borderBottomColor: "#66d" } },
390
+ ".cm-panel.cm-panel-lint": {
391
+ position: "relative",
392
+ "& ul": {
393
+ maxHeight: "100px",
394
+ overflowY: "auto",
395
+ "& [aria-selected]": {
396
+ backgroundColor: "#ddd",
397
+ "& u": { textDecoration: "underline" }
398
+ },
399
+ "&:focus [aria-selected]": {
400
+ background_fallback: "#bdf",
401
+ backgroundColor: "Highlight",
402
+ color_fallback: "white",
403
+ color: "HighlightText"
404
+ },
405
+ "& u": { textDecoration: "none" },
406
+ padding: 0,
407
+ margin: 0
408
+ },
409
+ "& [name=close]": {
410
+ position: "absolute",
411
+ top: "0",
412
+ right: "2px",
413
+ background: "inherit",
414
+ border: "none",
415
+ font: "inherit",
416
+ padding: 0,
417
+ margin: 0
418
+ }
419
+ },
420
+ "&dark .cm-lintRange-active": { backgroundColor: "#86714a80" },
421
+ "&dark .cm-panel.cm-panel-lint ul": { "& [aria-selected]": { backgroundColor: "#2e343e" } }
422
+ });
423
+ function z(e) {
424
+ return e == "error" ? 4 : e == "warning" ? 3 : e == "info" ? 2 : 1;
425
+ }
426
+ function B(e) {
427
+ let t = "hint", n = 1;
428
+ for (let r of e) {
429
+ let e = z(r.severity);
430
+ e > n && (n = e, t = r.severity);
431
+ }
432
+ return t;
433
+ }
434
+ var V = /*@__PURE__*/ f(w, { hideOn: g }), H = [
435
+ S,
436
+ /*@__PURE__*/ l.decorations.compute([S], (e) => {
437
+ let { selected: t, panel: n } = e.field(S);
438
+ return !t || !n || t.from == t.to ? d.none : d.set([C.range(t.from, t.to)]);
439
+ }),
440
+ V,
441
+ R
442
+ ];
443
+ //#endregion
444
+ export { v as n, O as t };