@code0-tech/pictor 0.0.0-mvp.40 → 0.0.0-mvp.42

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 (56) hide show
  1. package/dist/assets/components/data-table/DataTable.style.css +1 -0
  2. package/dist/assets/components/menu/Menu.style.css +1 -1
  3. package/dist/components/d-flow/DFlow.service.js +80 -100
  4. package/dist/components/d-flow-data-type/DFlowDataType.service.js +6 -7
  5. package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.d.ts +1 -1
  6. package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.js +15 -15
  7. package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.d.ts +1 -1
  8. package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.js +17 -17
  9. package/dist/components/d-flow-data-type/rules/DFlowDataTypeParentRule.d.ts +1 -1
  10. package/dist/components/d-flow-data-type/rules/DFlowDataTypeParentRule.js +1 -1
  11. package/dist/components/d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.d.ts +2 -1
  12. package/dist/components/d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js +87 -85
  13. package/dist/components/d-flow-data-type/rules/DFlowDataTypeRule.d.ts +2 -1
  14. package/dist/components/d-flow-function/DFlowFunction.input.hook.d.ts +2 -1
  15. package/dist/components/d-flow-function/DFlowFunction.input.hook.js +5 -5
  16. package/dist/components/d-flow-function/DFlowFunction.return.hook.d.ts +2 -1
  17. package/dist/components/d-flow-function/DFlowFunction.return.hook.js +5 -5
  18. package/dist/components/d-flow-input/DFlowInputDataTypeEditDialog.js +1 -1
  19. package/dist/components/d-flow-input/DFlowInputReferenceBadge.js +17 -17
  20. package/dist/components/d-flow-node/DFlowNode.return.hook.d.ts +5 -0
  21. package/dist/components/d-flow-node/DFlowNode.return.hook.js +27 -0
  22. package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.js +90 -91
  23. package/dist/components/d-flow-validation/DDataTypeValidation.hook.js +1 -1
  24. package/dist/components/d-flow-validation/DNodeValidation.hook.js +33 -33
  25. package/dist/components/d-flow-validation/DValueValidation.hook.d.ts +2 -1
  26. package/dist/components/d-flow-validation/DValueValidation.hook.js +5 -5
  27. package/dist/components/d-project/DNamespaceProject.service.d.ts +2 -1
  28. package/dist/components/data-table/DataTable.d.ts +23 -0
  29. package/dist/components/data-table/DataTable.js +41 -0
  30. package/dist/components/data-table/DataTableColumn.d.ts +6 -0
  31. package/dist/components/data-table/DataTableColumn.js +22 -0
  32. package/dist/components/data-table/DataTableFilterInput.d.ts +18 -0
  33. package/dist/components/data-table/DataTableFilterInput.js +210 -0
  34. package/dist/components/data-table/DataTableFilterSuggestionMenu.d.ts +7 -0
  35. package/dist/components/data-table/DataTableFilterSuggestionMenu.js +53 -0
  36. package/dist/components/data-table/index.d.ts +4 -0
  37. package/dist/components/data-table/index.js +11 -0
  38. package/dist/components/editor/Editor.d.ts +9 -3
  39. package/dist/components/editor/Editor.js +249 -174
  40. package/dist/components/menu/Menu.d.ts +5 -1
  41. package/dist/components/menu/Menu.js +73 -57
  42. package/dist/index.d.ts +1 -0
  43. package/dist/index.js +182 -171
  44. package/dist/node_modules/@lezer/highlight/dist/index.js +132 -169
  45. package/dist/utils/generics.d.ts +2 -1
  46. package/dist/utils/generics.js +84 -80
  47. package/package.json +32 -21
  48. package/dist/node_modules/@codemirror/language/dist/index.js +0 -429
  49. package/dist/node_modules/@codemirror/lint/dist/index.js +0 -515
  50. package/dist/node_modules/@codemirror/state/dist/index.js +0 -2614
  51. package/dist/node_modules/@codemirror/view/dist/index.js +0 -6227
  52. package/dist/node_modules/@lezer/common/dist/index.js +0 -1357
  53. package/dist/node_modules/@marijn/find-cluster-break/src/index.js +0 -69
  54. package/dist/node_modules/crelt/index.js +0 -27
  55. package/dist/node_modules/style-mod/src/style-mod.js +0 -109
  56. package/dist/node_modules/w3c-keyname/index.js +0 -88
@@ -1,515 +0,0 @@
1
- import { ViewPlugin as V, EditorView as I, hoverTooltip as W, Decoration as C, showPanel as q, WidgetType as N, logException as U } from "../../view/dist/index.js";
2
- import { Facet as Y, StateField as j, combineConfig as Z, StateEffect as D, RangeSetBuilder as G } from "../../state/dist/index.js";
3
- import x from "../../../crelt/index.js";
4
- class B {
5
- constructor(e, s, i) {
6
- this.from = e, this.to = s, this.diagnostic = i;
7
- }
8
- }
9
- class v {
10
- constructor(e, s, i) {
11
- this.diagnostics = e, this.panel = s, this.selected = i;
12
- }
13
- static init(e, s, i) {
14
- let n = i.facet(y).markerFilter;
15
- n && (e = n(e, i));
16
- let o = e.slice().sort((h, p) => h.from - p.from || h.to - p.to), r = new G(), l = [], c = 0, a = i.doc.iter(), f = 0, w = i.doc.length;
17
- for (let h = 0; ; ) {
18
- let p = h == o.length ? null : o[h];
19
- if (!p && !l.length)
20
- break;
21
- let u, m;
22
- if (l.length)
23
- u = c, m = l.reduce((d, k) => Math.min(d, k.to), p && p.from > u ? p.from : 1e8);
24
- else {
25
- if (u = p.from, u > w)
26
- break;
27
- m = p.to, l.push(p), h++;
28
- }
29
- for (; h < o.length; ) {
30
- let d = o[h];
31
- if (d.from == u && (d.to > d.from || d.to == u))
32
- l.push(d), h++, m = Math.min(d.to, m);
33
- else {
34
- m = Math.min(d.from, m);
35
- break;
36
- }
37
- }
38
- m = Math.min(m, w);
39
- let R = !1;
40
- if (l.some((d) => d.from == u && (d.to == m || m == w)) && (R = u == m, !R && m - u < 10)) {
41
- let d = u - (f + a.value.length);
42
- d > 0 && (a.next(d), f = u);
43
- for (let k = u; ; ) {
44
- if (k >= m) {
45
- R = !0;
46
- break;
47
- }
48
- if (!a.lineBreak && f + a.value.length > k)
49
- break;
50
- k = f + a.value.length, f += a.value.length, a.next();
51
- }
52
- }
53
- let M = ce(l);
54
- if (R)
55
- r.add(u, u, C.widget({
56
- widget: new oe(M),
57
- diagnostics: l.slice()
58
- }));
59
- else {
60
- let d = l.reduce((k, L) => L.markClass ? k + " " + L.markClass : k, "");
61
- r.add(u, m, C.mark({
62
- class: "cm-lintRange cm-lintRange-" + M + d,
63
- diagnostics: l.slice(),
64
- inclusiveEnd: l.some((k) => k.to > m)
65
- }));
66
- }
67
- if (c = m, c == w)
68
- break;
69
- for (let d = 0; d < l.length; d++)
70
- l[d].to <= c && l.splice(d--, 1);
71
- }
72
- let g = r.finish();
73
- return new v(g, s, S(g));
74
- }
75
- }
76
- function S(t, e = null, s = 0) {
77
- let i = null;
78
- return t.between(s, 1e9, (n, o, { spec: r }) => {
79
- if (!(e && r.diagnostics.indexOf(e) < 0))
80
- if (!i)
81
- i = new B(n, o, e || r.diagnostics[0]);
82
- else {
83
- if (r.diagnostics.indexOf(i.diagnostic) < 0)
84
- return !1;
85
- i = new B(i.from, o, i.diagnostic);
86
- }
87
- }), i;
88
- }
89
- function J(t, e) {
90
- let s = e.pos, i = e.end || s, n = t.state.facet(y).hideOn(t, s, i);
91
- if (n != null)
92
- return n;
93
- let o = t.startState.doc.lineAt(e.pos);
94
- return !!(t.effects.some((r) => r.is(A)) || t.changes.touchesRange(o.from, Math.max(o.to, i)));
95
- }
96
- function Q(t, e) {
97
- return t.field(b, !1) ? e : e.concat(D.appendConfig.of(_));
98
- }
99
- function X(t, e) {
100
- return {
101
- effects: Q(t, [A.of(e)])
102
- };
103
- }
104
- const A = /* @__PURE__ */ D.define(), $ = /* @__PURE__ */ D.define(), z = /* @__PURE__ */ D.define(), b = /* @__PURE__ */ j.define({
105
- create() {
106
- return new v(C.none, null, null);
107
- },
108
- update(t, e) {
109
- if (e.docChanged && t.diagnostics.size) {
110
- let s = t.diagnostics.map(e.changes), i = null, n = t.panel;
111
- if (t.selected) {
112
- let o = e.changes.mapPos(t.selected.from, 1);
113
- i = S(s, t.selected.diagnostic, o) || S(s, null, o);
114
- }
115
- !s.size && n && e.state.facet(y).autoPanel && (n = null), t = new v(s, n, i);
116
- }
117
- for (let s of e.effects)
118
- if (s.is(A)) {
119
- let i = e.state.facet(y).autoPanel ? s.value.length ? P.open : null : t.panel;
120
- t = v.init(s.value, i, e.state);
121
- } else s.is($) ? t = new v(t.diagnostics, s.value ? P.open : null, t.selected) : s.is(z) && (t = new v(t.diagnostics, t.panel, s.value));
122
- return t;
123
- },
124
- provide: (t) => [
125
- q.from(t, (e) => e.panel),
126
- I.decorations.from(t, (e) => e.diagnostics)
127
- ]
128
- }), ee = /* @__PURE__ */ C.mark({ class: "cm-lintRange cm-lintRange-active" });
129
- function te(t, e, s) {
130
- let { diagnostics: i } = t.state.field(b), n, o = -1, r = -1;
131
- i.between(e - (s < 0 ? 1 : 0), e + (s > 0 ? 1 : 0), (c, a, { spec: f }) => {
132
- if (e >= c && e <= a && (c == a || (e > c || s > 0) && (e < a || s < 0)))
133
- return n = f.diagnostics, o = c, r = a, !1;
134
- });
135
- let l = t.state.facet(y).tooltipFilter;
136
- return n && l && (n = l(n, t.state)), n ? {
137
- pos: o,
138
- end: r,
139
- above: t.state.doc.lineAt(o).to < r,
140
- create() {
141
- return { dom: ie(t, n) };
142
- }
143
- } : null;
144
- }
145
- function ie(t, e) {
146
- return x("ul", { class: "cm-tooltip-lint" }, e.map((s) => K(t, s, !1)));
147
- }
148
- const F = (t) => {
149
- let e = t.state.field(b, !1);
150
- return !e || !e.panel ? !1 : (t.dispatch({ effects: $.of(!1) }), !0);
151
- }, se = /* @__PURE__ */ V.fromClass(class {
152
- constructor(t) {
153
- this.view = t, this.timeout = -1, this.set = !0;
154
- let { delay: e } = t.state.facet(y);
155
- this.lintTime = Date.now() + e, this.run = this.run.bind(this), this.timeout = setTimeout(this.run, e);
156
- }
157
- run() {
158
- clearTimeout(this.timeout);
159
- let t = Date.now();
160
- if (t < this.lintTime - 10)
161
- this.timeout = setTimeout(this.run, this.lintTime - t);
162
- else {
163
- this.set = !1;
164
- let { state: e } = this.view, { sources: s } = e.facet(y);
165
- s.length && ne(s.map((i) => Promise.resolve(i(this.view))), (i) => {
166
- this.view.state.doc == e.doc && this.view.dispatch(X(this.view.state, i.reduce((n, o) => n.concat(o))));
167
- }, (i) => {
168
- U(this.view.state, i);
169
- });
170
- }
171
- }
172
- update(t) {
173
- let e = t.state.facet(y);
174
- (t.docChanged || e != t.startState.facet(y) || e.needsRefresh && e.needsRefresh(t)) && (this.lintTime = Date.now() + e.delay, this.set || (this.set = !0, this.timeout = setTimeout(this.run, e.delay)));
175
- }
176
- force() {
177
- this.set && (this.lintTime = Date.now(), this.run());
178
- }
179
- destroy() {
180
- clearTimeout(this.timeout);
181
- }
182
- });
183
- function ne(t, e, s) {
184
- let i = [], n = -1;
185
- for (let o of t)
186
- o.then((r) => {
187
- i.push(r), clearTimeout(n), i.length == t.length ? e(i) : n = setTimeout(() => e(i), 200);
188
- }, s);
189
- }
190
- const y = /* @__PURE__ */ Y.define({
191
- combine(t) {
192
- return {
193
- sources: t.map((e) => e.source).filter((e) => e != null),
194
- ...Z(t.map((e) => e.config), {
195
- delay: 750,
196
- markerFilter: null,
197
- tooltipFilter: null,
198
- needsRefresh: null,
199
- hideOn: () => null
200
- }, {
201
- delay: Math.max,
202
- markerFilter: E,
203
- tooltipFilter: E,
204
- needsRefresh: (e, s) => e ? s ? (i) => e(i) || s(i) : e : s,
205
- hideOn: (e, s) => e ? s ? (i, n, o) => e(i, n, o) || s(i, n, o) : e : s,
206
- autoPanel: (e, s) => e || s
207
- })
208
- };
209
- }
210
- });
211
- function E(t, e) {
212
- return t ? e ? (s, i) => e(t(s, i), i) : t : e;
213
- }
214
- function me(t, e = {}) {
215
- return [
216
- y.of({ source: t, config: e }),
217
- se,
218
- _
219
- ];
220
- }
221
- function H(t) {
222
- let e = [];
223
- if (t)
224
- e: for (let { name: s } of t) {
225
- for (let i = 0; i < s.length; i++) {
226
- let n = s[i];
227
- if (/[a-zA-Z]/.test(n) && !e.some((o) => o.toLowerCase() == n.toLowerCase())) {
228
- e.push(n);
229
- continue e;
230
- }
231
- }
232
- e.push("");
233
- }
234
- return e;
235
- }
236
- function K(t, e, s) {
237
- var i;
238
- let n = s ? H(e.actions) : [];
239
- return x("li", { class: "cm-diagnostic cm-diagnostic-" + e.severity }, x("span", { class: "cm-diagnosticText" }, e.renderMessage ? e.renderMessage(t) : e.message), (i = e.actions) === null || i === void 0 ? void 0 : i.map((o, r) => {
240
- let l = !1, c = (h) => {
241
- if (h.preventDefault(), l)
242
- return;
243
- l = !0;
244
- let p = S(t.state.field(b).diagnostics, e);
245
- p && o.apply(t, p.from, p.to);
246
- }, { name: a } = o, f = n[r] ? a.indexOf(n[r]) : -1, w = f < 0 ? a : [
247
- a.slice(0, f),
248
- x("u", a.slice(f, f + 1)),
249
- a.slice(f + 1)
250
- ], g = o.markClass ? " " + o.markClass : "";
251
- return x("button", {
252
- type: "button",
253
- class: "cm-diagnosticAction" + g,
254
- onclick: c,
255
- onmousedown: c,
256
- "aria-label": ` Action: ${a}${f < 0 ? "" : ` (access key "${n[r]})"`}.`
257
- }, w);
258
- }), e.source && x("div", { class: "cm-diagnosticSource" }, e.source));
259
- }
260
- class oe extends N {
261
- constructor(e) {
262
- super(), this.sev = e;
263
- }
264
- eq(e) {
265
- return e.sev == this.sev;
266
- }
267
- toDOM() {
268
- return x("span", { class: "cm-lintPoint cm-lintPoint-" + this.sev });
269
- }
270
- }
271
- class O {
272
- constructor(e, s) {
273
- this.diagnostic = s, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = K(e, s, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option");
274
- }
275
- }
276
- class P {
277
- constructor(e) {
278
- this.view = e, this.items = [];
279
- let s = (n) => {
280
- if (!(n.ctrlKey || n.altKey || n.metaKey)) {
281
- if (n.keyCode == 27)
282
- F(this.view), this.view.focus();
283
- else if (n.keyCode == 38 || n.keyCode == 33)
284
- this.moveSelection((this.selectedIndex - 1 + this.items.length) % this.items.length);
285
- else if (n.keyCode == 40 || n.keyCode == 34)
286
- this.moveSelection((this.selectedIndex + 1) % this.items.length);
287
- else if (n.keyCode == 36)
288
- this.moveSelection(0);
289
- else if (n.keyCode == 35)
290
- this.moveSelection(this.items.length - 1);
291
- else if (n.keyCode == 13)
292
- this.view.focus();
293
- else if (n.keyCode >= 65 && n.keyCode <= 90 && this.selectedIndex >= 0) {
294
- let { diagnostic: o } = this.items[this.selectedIndex], r = H(o.actions);
295
- for (let l = 0; l < r.length; l++)
296
- if (r[l].toUpperCase().charCodeAt(0) == n.keyCode) {
297
- let c = S(this.view.state.field(b).diagnostics, o);
298
- c && o.actions[l].apply(e, c.from, c.to);
299
- }
300
- } else
301
- return;
302
- n.preventDefault();
303
- }
304
- }, i = (n) => {
305
- for (let o = 0; o < this.items.length; o++)
306
- this.items[o].dom.contains(n.target) && this.moveSelection(o);
307
- };
308
- this.list = x("ul", {
309
- tabIndex: 0,
310
- role: "listbox",
311
- "aria-label": this.view.state.phrase("Diagnostics"),
312
- onkeydown: s,
313
- onclick: i
314
- }), this.dom = x("div", { class: "cm-panel-lint" }, this.list, x("button", {
315
- type: "button",
316
- name: "close",
317
- "aria-label": this.view.state.phrase("close"),
318
- onclick: () => F(this.view)
319
- }, "×")), this.update();
320
- }
321
- get selectedIndex() {
322
- let e = this.view.state.field(b).selected;
323
- if (!e)
324
- return -1;
325
- for (let s = 0; s < this.items.length; s++)
326
- if (this.items[s].diagnostic == e.diagnostic)
327
- return s;
328
- return -1;
329
- }
330
- update() {
331
- let { diagnostics: e, selected: s } = this.view.state.field(b), i = 0, n = !1, o = null, r = /* @__PURE__ */ new Set();
332
- for (e.between(0, this.view.state.doc.length, (l, c, { spec: a }) => {
333
- for (let f of a.diagnostics) {
334
- if (r.has(f))
335
- continue;
336
- r.add(f);
337
- let w = -1, g;
338
- for (let h = i; h < this.items.length; h++)
339
- if (this.items[h].diagnostic == f) {
340
- w = h;
341
- break;
342
- }
343
- w < 0 ? (g = new O(this.view, f), this.items.splice(i, 0, g), n = !0) : (g = this.items[w], w > i && (this.items.splice(i, w - i), n = !0)), s && g.diagnostic == s.diagnostic ? g.dom.hasAttribute("aria-selected") || (g.dom.setAttribute("aria-selected", "true"), o = g) : g.dom.hasAttribute("aria-selected") && g.dom.removeAttribute("aria-selected"), i++;
344
- }
345
- }); i < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0); )
346
- n = !0, this.items.pop();
347
- this.items.length == 0 && (this.items.push(new O(this.view, {
348
- from: -1,
349
- to: -1,
350
- severity: "info",
351
- message: this.view.state.phrase("No diagnostics")
352
- })), n = !0), o ? (this.list.setAttribute("aria-activedescendant", o.id), this.view.requestMeasure({
353
- key: this,
354
- read: () => ({ sel: o.dom.getBoundingClientRect(), panel: this.list.getBoundingClientRect() }),
355
- write: ({ sel: l, panel: c }) => {
356
- let a = c.height / this.list.offsetHeight;
357
- l.top < c.top ? this.list.scrollTop -= (c.top - l.top) / a : l.bottom > c.bottom && (this.list.scrollTop += (l.bottom - c.bottom) / a);
358
- }
359
- })) : this.selectedIndex < 0 && this.list.removeAttribute("aria-activedescendant"), n && this.sync();
360
- }
361
- sync() {
362
- let e = this.list.firstChild;
363
- function s() {
364
- let i = e;
365
- e = i.nextSibling, i.remove();
366
- }
367
- for (let i of this.items)
368
- if (i.dom.parentNode == this.list) {
369
- for (; e != i.dom; )
370
- s();
371
- e = i.dom.nextSibling;
372
- } else
373
- this.list.insertBefore(i.dom, e);
374
- for (; e; )
375
- s();
376
- }
377
- moveSelection(e) {
378
- if (this.selectedIndex < 0)
379
- return;
380
- let s = this.view.state.field(b), i = S(s.diagnostics, this.items[e].diagnostic);
381
- i && this.view.dispatch({
382
- selection: { anchor: i.from, head: i.to },
383
- scrollIntoView: !0,
384
- effects: z.of(i)
385
- });
386
- }
387
- static open(e) {
388
- return new P(e);
389
- }
390
- }
391
- function le(t, e = 'viewBox="0 0 40 40"') {
392
- return `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`;
393
- }
394
- function T(t) {
395
- return le(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`, 'width="6" height="3"');
396
- }
397
- const re = /* @__PURE__ */ I.baseTheme({
398
- ".cm-diagnostic": {
399
- padding: "3px 6px 3px 8px",
400
- marginLeft: "-1px",
401
- display: "block",
402
- whiteSpace: "pre-wrap"
403
- },
404
- ".cm-diagnostic-error": { borderLeft: "5px solid #d11" },
405
- ".cm-diagnostic-warning": { borderLeft: "5px solid orange" },
406
- ".cm-diagnostic-info": { borderLeft: "5px solid #999" },
407
- ".cm-diagnostic-hint": { borderLeft: "5px solid #66d" },
408
- ".cm-diagnosticAction": {
409
- font: "inherit",
410
- border: "none",
411
- padding: "2px 4px",
412
- backgroundColor: "#444",
413
- color: "white",
414
- borderRadius: "3px",
415
- marginLeft: "8px",
416
- cursor: "pointer"
417
- },
418
- ".cm-diagnosticSource": {
419
- fontSize: "70%",
420
- opacity: 0.7
421
- },
422
- ".cm-lintRange": {
423
- backgroundPosition: "left bottom",
424
- backgroundRepeat: "repeat-x",
425
- paddingBottom: "0.7px"
426
- },
427
- ".cm-lintRange-error": { backgroundImage: /* @__PURE__ */ T("#d11") },
428
- ".cm-lintRange-warning": { backgroundImage: /* @__PURE__ */ T("orange") },
429
- ".cm-lintRange-info": { backgroundImage: /* @__PURE__ */ T("#999") },
430
- ".cm-lintRange-hint": { backgroundImage: /* @__PURE__ */ T("#66d") },
431
- ".cm-lintRange-active": { backgroundColor: "#ffdd9980" },
432
- ".cm-tooltip-lint": {
433
- padding: 0,
434
- margin: 0
435
- },
436
- ".cm-lintPoint": {
437
- position: "relative",
438
- "&:after": {
439
- content: '""',
440
- position: "absolute",
441
- bottom: 0,
442
- left: "-2px",
443
- borderLeft: "3px solid transparent",
444
- borderRight: "3px solid transparent",
445
- borderBottom: "4px solid #d11"
446
- }
447
- },
448
- ".cm-lintPoint-warning": {
449
- "&:after": { borderBottomColor: "orange" }
450
- },
451
- ".cm-lintPoint-info": {
452
- "&:after": { borderBottomColor: "#999" }
453
- },
454
- ".cm-lintPoint-hint": {
455
- "&:after": { borderBottomColor: "#66d" }
456
- },
457
- ".cm-panel.cm-panel-lint": {
458
- position: "relative",
459
- "& ul": {
460
- maxHeight: "100px",
461
- overflowY: "auto",
462
- "& [aria-selected]": {
463
- backgroundColor: "#ddd",
464
- "& u": { textDecoration: "underline" }
465
- },
466
- "&:focus [aria-selected]": {
467
- background_fallback: "#bdf",
468
- backgroundColor: "Highlight",
469
- color_fallback: "white",
470
- color: "HighlightText"
471
- },
472
- "& u": { textDecoration: "none" },
473
- padding: 0,
474
- margin: 0
475
- },
476
- "& [name=close]": {
477
- position: "absolute",
478
- top: "0",
479
- right: "2px",
480
- background: "inherit",
481
- border: "none",
482
- font: "inherit",
483
- padding: 0,
484
- margin: 0
485
- }
486
- }
487
- });
488
- function ae(t) {
489
- return t == "error" ? 4 : t == "warning" ? 3 : t == "info" ? 2 : 1;
490
- }
491
- function ce(t) {
492
- let e = "hint", s = 1;
493
- for (let i of t) {
494
- let n = ae(i.severity);
495
- n > s && (s = n, e = i.severity);
496
- }
497
- return e;
498
- }
499
- const _ = [
500
- b,
501
- /* @__PURE__ */ I.decorations.compute([b], (t) => {
502
- let { selected: e, panel: s } = t.field(b);
503
- return !e || !s || e.from == e.to ? C.none : C.set([
504
- ee.range(e.from, e.to)
505
- ]);
506
- }),
507
- /* @__PURE__ */ W(te, { hideOn: J }),
508
- re
509
- ];
510
- export {
511
- F as closeLintPanel,
512
- me as linter,
513
- X as setDiagnostics,
514
- A as setDiagnosticsEffect
515
- };