@ai-ecoverse/slicc-spectrum 1.96.0 → 1.96.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/README.md +1 -1
- package/dist/{chunk-CVMI4FSY.js → chunk-YUDOYEMB.js} +2 -2
- package/dist/chunk-YUDOYEMB.js.map +7 -0
- package/dist/slicc-dummy.js +30 -2
- package/dist/slicc-dummy.js.map +3 -3
- package/dist/slicc-kernel-model.js +1 -1
- package/dist/slicc-ui.js +327 -119
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/ansi.d.ts +18 -0
- package/dist/types/dummy/script.d.ts +1 -0
- package/package.json +2 -2
- package/dist/chunk-CVMI4FSY.js.map +0 -7
package/dist/slicc-ui.js
CHANGED
|
@@ -8743,40 +8743,40 @@ function schemeOf(media2) {
|
|
|
8743
8743
|
if (!query.startsWith("not")) return scheme;
|
|
8744
8744
|
return scheme === "dark" ? "light" : "dark";
|
|
8745
8745
|
}
|
|
8746
|
-
function apply(doc,
|
|
8746
|
+
function apply(doc, paint2, color2) {
|
|
8747
8747
|
doc.documentElement.style.colorScheme = color2;
|
|
8748
8748
|
const metas = [...doc.head.querySelectorAll('meta[name="theme-color"]')];
|
|
8749
|
-
for (const meta of metas) if (!
|
|
8749
|
+
for (const meta of metas) if (!paint2.tones.has(meta)) paint2.tones.set(meta, meta.content);
|
|
8750
8750
|
const own5 = metas.find((meta) => schemeOf(meta.media ?? "") === color2);
|
|
8751
8751
|
if (!own5) return;
|
|
8752
|
-
const tone =
|
|
8752
|
+
const tone = paint2.tones.get(own5);
|
|
8753
8753
|
for (const meta of metas) meta.content = tone;
|
|
8754
8754
|
}
|
|
8755
8755
|
function holdDocument(doc) {
|
|
8756
|
-
const
|
|
8756
|
+
const paint2 = paints.get(doc) ?? {
|
|
8757
8757
|
scheme: doc.documentElement.style.colorScheme,
|
|
8758
8758
|
priority: doc.documentElement.style.getPropertyPriority("color-scheme"),
|
|
8759
8759
|
tones: /* @__PURE__ */ new Map(),
|
|
8760
8760
|
holds: /* @__PURE__ */ new Map()
|
|
8761
8761
|
};
|
|
8762
|
-
paints.set(doc,
|
|
8762
|
+
paints.set(doc, paint2);
|
|
8763
8763
|
const key2 = {};
|
|
8764
|
-
|
|
8764
|
+
paint2.holds.set(key2, null);
|
|
8765
8765
|
return {
|
|
8766
8766
|
paint(color2) {
|
|
8767
|
-
if (!
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
apply(doc,
|
|
8767
|
+
if (!paint2.holds.has(key2)) return;
|
|
8768
|
+
paint2.holds.delete(key2);
|
|
8769
|
+
paint2.holds.set(key2, color2);
|
|
8770
|
+
apply(doc, paint2, color2);
|
|
8771
8771
|
},
|
|
8772
8772
|
release() {
|
|
8773
|
-
if (!
|
|
8774
|
-
const left = [...
|
|
8775
|
-
if (left.length) return apply(doc,
|
|
8776
|
-
if (
|
|
8773
|
+
if (!paint2.holds.delete(key2)) return;
|
|
8774
|
+
const left = [...paint2.holds.values()].filter((color2) => color2 !== null);
|
|
8775
|
+
if (left.length) return apply(doc, paint2, left[left.length - 1]);
|
|
8776
|
+
if (paint2.holds.size) return;
|
|
8777
8777
|
paints.delete(doc);
|
|
8778
|
-
doc.documentElement.style.setProperty("color-scheme",
|
|
8779
|
-
for (const [meta, tone] of
|
|
8778
|
+
doc.documentElement.style.setProperty("color-scheme", paint2.scheme, paint2.priority);
|
|
8779
|
+
for (const [meta, tone] of paint2.tones) meta.content = tone;
|
|
8780
8780
|
}
|
|
8781
8781
|
};
|
|
8782
8782
|
}
|
|
@@ -12303,9 +12303,9 @@ function factoryTitle(effects, ok4, nok, type, markerType, stringType) {
|
|
|
12303
12303
|
return atBreak(code3);
|
|
12304
12304
|
}
|
|
12305
12305
|
effects.consume(code3);
|
|
12306
|
-
return code3 === 92 ?
|
|
12306
|
+
return code3 === 92 ? escape3 : inside;
|
|
12307
12307
|
}
|
|
12308
|
-
function
|
|
12308
|
+
function escape3(code3) {
|
|
12309
12309
|
if (code3 === marker || code3 === 92) {
|
|
12310
12310
|
effects.consume(code3);
|
|
12311
12311
|
return inside;
|
|
@@ -21041,8 +21041,8 @@ var PATH_STORE_NODE_FLAGS_MASK = 7;
|
|
|
21041
21041
|
var PATH_STORE_NODE_KIND_SHIFT = 3;
|
|
21042
21042
|
var PATH_STORE_NODE_KIND_MASK = 1 << PATH_STORE_NODE_KIND_SHIFT;
|
|
21043
21043
|
var PATH_STORE_NODE_DEPTH_SHIFT = 4;
|
|
21044
|
-
function createNodeDepthAndFlags(depth,
|
|
21045
|
-
return depth << PATH_STORE_NODE_DEPTH_SHIFT | kind << PATH_STORE_NODE_KIND_SHIFT |
|
|
21044
|
+
function createNodeDepthAndFlags(depth, flags2, kind = 0) {
|
|
21045
|
+
return depth << PATH_STORE_NODE_DEPTH_SHIFT | kind << PATH_STORE_NODE_KIND_SHIFT | flags2;
|
|
21046
21046
|
}
|
|
21047
21047
|
function getNodeDepth(node2) {
|
|
21048
21048
|
return node2.depthAndFlags >>> PATH_STORE_NODE_DEPTH_SHIFT;
|
|
@@ -29392,6 +29392,229 @@ var FileTree = class {
|
|
|
29392
29392
|
}
|
|
29393
29393
|
};
|
|
29394
29394
|
|
|
29395
|
+
// src/app/ansi.ts
|
|
29396
|
+
var lightPalette = [
|
|
29397
|
+
"gray-800",
|
|
29398
|
+
"negative-color-900",
|
|
29399
|
+
"positive-color-900",
|
|
29400
|
+
"notice-color-1000",
|
|
29401
|
+
"informative-color-900",
|
|
29402
|
+
"purple-900",
|
|
29403
|
+
"cyan-1000",
|
|
29404
|
+
"gray-600",
|
|
29405
|
+
"gray-700",
|
|
29406
|
+
"negative-color-1000",
|
|
29407
|
+
"positive-color-1000",
|
|
29408
|
+
"notice-color-1100",
|
|
29409
|
+
"informative-color-1000",
|
|
29410
|
+
"purple-1000",
|
|
29411
|
+
"cyan-1100",
|
|
29412
|
+
"gray-800"
|
|
29413
|
+
];
|
|
29414
|
+
var terminalPalette = r(
|
|
29415
|
+
lightPalette.map((token2, n37) => `--slicc-terminal-color-${n37}: var(--swc-${token2});`).join("\n")
|
|
29416
|
+
);
|
|
29417
|
+
var tints = [
|
|
29418
|
+
"gray-800",
|
|
29419
|
+
"negative-subtle-background-color-default",
|
|
29420
|
+
"positive-subtle-background-color-default",
|
|
29421
|
+
"notice-subtle-background-color-default",
|
|
29422
|
+
"informative-subtle-background-color-default",
|
|
29423
|
+
"purple-subtle-background-color-default",
|
|
29424
|
+
"cyan-subtle-background-color-default",
|
|
29425
|
+
"gray-subtle-background-color-default"
|
|
29426
|
+
];
|
|
29427
|
+
var plain = {
|
|
29428
|
+
bold: false,
|
|
29429
|
+
dim: false,
|
|
29430
|
+
italic: false,
|
|
29431
|
+
underline: false,
|
|
29432
|
+
inverse: false,
|
|
29433
|
+
fg: null,
|
|
29434
|
+
bg: null
|
|
29435
|
+
};
|
|
29436
|
+
var levels = [0, 95, 135, 175, 215, 255];
|
|
29437
|
+
function indexed(n37) {
|
|
29438
|
+
if (!Number.isInteger(n37) || n37 < 0 || n37 > 255) return null;
|
|
29439
|
+
if (n37 < 16) return n37;
|
|
29440
|
+
if (n37 >= 232) {
|
|
29441
|
+
const grey = 8 + (n37 - 232) * 10;
|
|
29442
|
+
return `rgb(${grey}, ${grey}, ${grey})`;
|
|
29443
|
+
}
|
|
29444
|
+
const cube = n37 - 16;
|
|
29445
|
+
const [r40, g7, b13] = [Math.floor(cube / 36), Math.floor(cube / 6) % 6, cube % 6].map(
|
|
29446
|
+
(level) => levels[level]
|
|
29447
|
+
);
|
|
29448
|
+
return `rgb(${r40}, ${g7}, ${b13})`;
|
|
29449
|
+
}
|
|
29450
|
+
function channel(value) {
|
|
29451
|
+
return Number.isInteger(value) && value >= 0 && value <= 255 ? value : null;
|
|
29452
|
+
}
|
|
29453
|
+
function extended(params, at) {
|
|
29454
|
+
const mode2 = params[at + 1];
|
|
29455
|
+
if (mode2 === 5) return { color: indexed(params[at + 2]), used: 2 };
|
|
29456
|
+
if (mode2 === 2) {
|
|
29457
|
+
const rgb = params.slice(at + 2, at + 5).map(channel);
|
|
29458
|
+
const ok4 = rgb.length === 3 && rgb.every((value) => value !== null);
|
|
29459
|
+
return { color: ok4 ? `rgb(${rgb.join(", ")})` : null, used: 4 };
|
|
29460
|
+
}
|
|
29461
|
+
return { color: null, used: 0 };
|
|
29462
|
+
}
|
|
29463
|
+
function numbers(text5) {
|
|
29464
|
+
return text5.split(":").map((part2) => part2 === "" ? 0 : Number(part2));
|
|
29465
|
+
}
|
|
29466
|
+
var flags = {
|
|
29467
|
+
0: plain,
|
|
29468
|
+
1: { bold: true },
|
|
29469
|
+
2: { dim: true },
|
|
29470
|
+
3: { italic: true },
|
|
29471
|
+
4: { underline: true },
|
|
29472
|
+
7: { inverse: true },
|
|
29473
|
+
22: { bold: false, dim: false },
|
|
29474
|
+
23: { italic: false },
|
|
29475
|
+
24: { underline: false },
|
|
29476
|
+
27: { inverse: false },
|
|
29477
|
+
39: { fg: null },
|
|
29478
|
+
49: { bg: null }
|
|
29479
|
+
};
|
|
29480
|
+
var ranges = [
|
|
29481
|
+
[30, "fg", 0],
|
|
29482
|
+
[40, "bg", 0],
|
|
29483
|
+
[90, "fg", 8],
|
|
29484
|
+
[100, "bg", 8]
|
|
29485
|
+
];
|
|
29486
|
+
function simple(code3) {
|
|
29487
|
+
const flag = flags[code3];
|
|
29488
|
+
if (flag) return flag;
|
|
29489
|
+
const range3 = ranges.find(([start2]) => code3 >= start2 && code3 < start2 + 8);
|
|
29490
|
+
return range3 ? { [range3[1]]: code3 - range3[0] + range3[2] } : null;
|
|
29491
|
+
}
|
|
29492
|
+
function wide(groups2, i26) {
|
|
29493
|
+
const group = groups2[i26];
|
|
29494
|
+
if (group.length === 1)
|
|
29495
|
+
return extended(
|
|
29496
|
+
groups2.slice(i26).map((entry) => entry[0]),
|
|
29497
|
+
0
|
|
29498
|
+
);
|
|
29499
|
+
const spaced = group[1] === 2 && group.length > 5;
|
|
29500
|
+
return { color: extended(spaced ? [0, 2, ...group.slice(3)] : group, 0).color, used: 0 };
|
|
29501
|
+
}
|
|
29502
|
+
function sgr(style, body4) {
|
|
29503
|
+
const next = { ...style };
|
|
29504
|
+
const groups2 = body4 === "" ? [[0]] : body4.split(";").map(numbers);
|
|
29505
|
+
for (let i26 = 0; i26 < groups2.length; i26++) {
|
|
29506
|
+
const group = groups2[i26];
|
|
29507
|
+
const code3 = group[0];
|
|
29508
|
+
if (code3 === 38 || code3 === 48) {
|
|
29509
|
+
const { color: color2, used } = wide(groups2, i26);
|
|
29510
|
+
i26 += used;
|
|
29511
|
+
if (color2 !== null) next[code3 === 38 ? "fg" : "bg"] = color2;
|
|
29512
|
+
} else if (code3 === 4 && group.length > 1) next.underline = group[1] !== 0;
|
|
29513
|
+
else Object.assign(next, simple(code3));
|
|
29514
|
+
}
|
|
29515
|
+
return next;
|
|
29516
|
+
}
|
|
29517
|
+
function terminated(text5, from, streaming) {
|
|
29518
|
+
for (let i26 = from; i26 < text5.length; i26++) {
|
|
29519
|
+
if (text5[i26] === "\x07") return i26 + 1;
|
|
29520
|
+
if (text5[i26] === "\x1B" && text5[i26 + 1] === "\\") return i26 + 2;
|
|
29521
|
+
}
|
|
29522
|
+
if (streaming) return -1;
|
|
29523
|
+
const line = text5.indexOf("\n", from);
|
|
29524
|
+
return line === -1 ? text5.length : line;
|
|
29525
|
+
}
|
|
29526
|
+
function csi(text5, from) {
|
|
29527
|
+
for (let i26 = from; i26 < text5.length; i26++) {
|
|
29528
|
+
const code3 = text5.charCodeAt(i26);
|
|
29529
|
+
if (code3 >= 64 && code3 <= 126) {
|
|
29530
|
+
return { end: i26 + 1, body: text5.slice(from, i26), final: text5[i26] };
|
|
29531
|
+
}
|
|
29532
|
+
if (code3 < 32 || code3 > 63) return { end: i26, body: "", final: "" };
|
|
29533
|
+
}
|
|
29534
|
+
return null;
|
|
29535
|
+
}
|
|
29536
|
+
function escape(text5, at, style, streaming) {
|
|
29537
|
+
const kind = text5[at + 1];
|
|
29538
|
+
if (kind === void 0) return { end: -1, style };
|
|
29539
|
+
if (kind === "[") {
|
|
29540
|
+
const found = csi(text5, at + 2);
|
|
29541
|
+
if (!found) return { end: -1, style };
|
|
29542
|
+
const styled = found.final === "m" && /^[\d;:]*$/.test(found.body);
|
|
29543
|
+
return { end: found.end, style: styled ? sgr(style, found.body) : style };
|
|
29544
|
+
}
|
|
29545
|
+
if ("]PX^_".includes(kind)) return { end: terminated(text5, at + 2, streaming), style };
|
|
29546
|
+
let i26 = at + 1;
|
|
29547
|
+
while (i26 < text5.length && text5.charCodeAt(i26) >= 32 && text5.charCodeAt(i26) <= 47) i26++;
|
|
29548
|
+
if (i26 === text5.length) return { end: -1, style };
|
|
29549
|
+
const final = text5.charCodeAt(i26);
|
|
29550
|
+
return { end: final >= 48 && final <= 126 ? i26 + 1 : at + 1, style };
|
|
29551
|
+
}
|
|
29552
|
+
function parseAnsi(text5, streaming = false) {
|
|
29553
|
+
const runs2 = [];
|
|
29554
|
+
let style = plain;
|
|
29555
|
+
let start2 = 0;
|
|
29556
|
+
const push2 = (end) => {
|
|
29557
|
+
if (end <= start2) return;
|
|
29558
|
+
const last = runs2.at(-1);
|
|
29559
|
+
const piece = text5.slice(start2, end);
|
|
29560
|
+
if (last?.style === style) last.text += piece;
|
|
29561
|
+
else runs2.push({ text: piece, style });
|
|
29562
|
+
};
|
|
29563
|
+
let i26 = text5.indexOf("\x1B");
|
|
29564
|
+
while (i26 !== -1) {
|
|
29565
|
+
push2(i26);
|
|
29566
|
+
const found = escape(text5, i26, style, streaming);
|
|
29567
|
+
if (found.end === -1) return runs2;
|
|
29568
|
+
style = found.style;
|
|
29569
|
+
start2 = found.end;
|
|
29570
|
+
i26 = text5.indexOf("\x1B", start2);
|
|
29571
|
+
}
|
|
29572
|
+
push2(text5.length);
|
|
29573
|
+
return runs2;
|
|
29574
|
+
}
|
|
29575
|
+
function swatch(color2) {
|
|
29576
|
+
if (color2 === null) return null;
|
|
29577
|
+
return typeof color2 === "number" ? `var(--slicc-terminal-color-${color2}, var(--swc-${lightPalette[color2]}))` : color2;
|
|
29578
|
+
}
|
|
29579
|
+
function on(rgb) {
|
|
29580
|
+
const [r40, g7, b13] = rgb.match(/\d+/g).map((value) => {
|
|
29581
|
+
const v13 = Number(value) / 255;
|
|
29582
|
+
return v13 <= 0.03928 ? v13 / 12.92 : ((v13 + 0.055) / 1.055) ** 2.4;
|
|
29583
|
+
});
|
|
29584
|
+
return 0.2126 * r40 + 0.7152 * g7 + 0.0722 * b13 > 0.179 ? "var(--swc-black)" : "var(--swc-white)";
|
|
29585
|
+
}
|
|
29586
|
+
function paint(style) {
|
|
29587
|
+
let { fg, bg } = style;
|
|
29588
|
+
if (style.inverse && fg === null && bg === null) {
|
|
29589
|
+
return ["var(--swc-background-layer-1-color)", "var(--swc-neutral-content-color-default)"];
|
|
29590
|
+
}
|
|
29591
|
+
if (style.inverse) [fg, bg] = [bg, fg];
|
|
29592
|
+
if (style.dim && typeof fg === "number" && fg >= 8) fg -= 8;
|
|
29593
|
+
if (style.dim && fg === null && bg === null) {
|
|
29594
|
+
return ["var(--swc-neutral-subdued-content-color-default)", null];
|
|
29595
|
+
}
|
|
29596
|
+
if (bg === null) return [swatch(fg), null];
|
|
29597
|
+
if (typeof bg === "string") return [typeof fg === "string" ? fg : on(bg), bg];
|
|
29598
|
+
const tint = `var(--swc-${bg === 8 ? "gray-700" : tints[bg % 8]})`;
|
|
29599
|
+
return [bg % 8 === 0 ? "var(--swc-gray-25)" : null, tint];
|
|
29600
|
+
}
|
|
29601
|
+
function inline3(style) {
|
|
29602
|
+
const [fg, bg] = paint(style);
|
|
29603
|
+
return [
|
|
29604
|
+
fg ? `color: ${fg}` : "",
|
|
29605
|
+
bg ? `background: ${bg}` : "",
|
|
29606
|
+
style.bold ? "font-weight: var(--swc-bold-font-weight)" : "",
|
|
29607
|
+
style.italic ? "font-style: italic" : "",
|
|
29608
|
+
style.underline ? "text-decoration: underline" : ""
|
|
29609
|
+
].filter(Boolean).join("; ");
|
|
29610
|
+
}
|
|
29611
|
+
function ansi(text5, streaming = false) {
|
|
29612
|
+
return parseAnsi(text5, streaming).map((run) => {
|
|
29613
|
+
const style = inline3(run.style);
|
|
29614
|
+
return style ? b`<span style=${style}>${run.text}</span>` : run.text;
|
|
29615
|
+
});
|
|
29616
|
+
}
|
|
29617
|
+
|
|
29395
29618
|
// src/app/sign-in.ts
|
|
29396
29619
|
var continuing = "Continue in the sign-in window that opened.";
|
|
29397
29620
|
var closed = "Closed the sign-in window? Cancel, then Log in again.";
|
|
@@ -29711,7 +29934,7 @@ function tool(call, color2 = "light", options2 = {}) {
|
|
|
29711
29934
|
const label = `${call.title}, ${statusLabel2(call.status)}`;
|
|
29712
29935
|
const content3 = b`<div class="call">
|
|
29713
29936
|
${body(call, color2)}
|
|
29714
|
-
${call.output ? b`<pre class="output">${call.output}</pre>` : A}
|
|
29937
|
+
${call.output ? b`<pre class="output">${ansi(call.output, call.status === "running")}</pre>` : A}
|
|
29715
29938
|
${call.notes?.length ? notes(call.notes) : A}
|
|
29716
29939
|
${call.image ? b`<img class="shot" src=${call.image} alt=${call.title} />` : A}
|
|
29717
29940
|
${call.meta ? b`<span class="tool-meta">${call.meta}</span>` : A}
|
|
@@ -32500,13 +32723,13 @@ var SliccFiles = class extends ModelElement {
|
|
|
32500
32723
|
item2?.select();
|
|
32501
32724
|
tree.reveal(path2, false);
|
|
32502
32725
|
}
|
|
32503
|
-
#busy(at,
|
|
32726
|
+
#busy(at, on2) {
|
|
32504
32727
|
if (at === void 0) {
|
|
32505
|
-
this.mounting =
|
|
32728
|
+
this.mounting = on2;
|
|
32506
32729
|
return;
|
|
32507
32730
|
}
|
|
32508
32731
|
const inserting = new Set(this.inserting);
|
|
32509
|
-
if (
|
|
32732
|
+
if (on2) inserting.add(at);
|
|
32510
32733
|
else inserting.delete(at);
|
|
32511
32734
|
this.inserting = inserting;
|
|
32512
32735
|
}
|
|
@@ -38645,22 +38868,7 @@ var SliccTerminalPanel = class extends ThemedElement {
|
|
|
38645
38868
|
--slicc-terminal-font-size: var(--swc-font-size-100);
|
|
38646
38869
|
}
|
|
38647
38870
|
:host([color='light']) {
|
|
38648
|
-
|
|
38649
|
-
--slicc-terminal-color-1: var(--swc-negative-color-900);
|
|
38650
|
-
--slicc-terminal-color-2: var(--swc-positive-color-900);
|
|
38651
|
-
--slicc-terminal-color-3: var(--swc-notice-color-1000);
|
|
38652
|
-
--slicc-terminal-color-4: var(--swc-informative-color-900);
|
|
38653
|
-
--slicc-terminal-color-5: var(--swc-purple-900);
|
|
38654
|
-
--slicc-terminal-color-6: var(--swc-cyan-1000);
|
|
38655
|
-
--slicc-terminal-color-7: var(--swc-gray-600);
|
|
38656
|
-
--slicc-terminal-color-8: var(--swc-gray-700);
|
|
38657
|
-
--slicc-terminal-color-9: var(--swc-negative-color-1000);
|
|
38658
|
-
--slicc-terminal-color-10: var(--swc-positive-color-1000);
|
|
38659
|
-
--slicc-terminal-color-11: var(--swc-notice-color-1100);
|
|
38660
|
-
--slicc-terminal-color-12: var(--swc-informative-color-1000);
|
|
38661
|
-
--slicc-terminal-color-13: var(--swc-purple-1000);
|
|
38662
|
-
--slicc-terminal-color-14: var(--swc-cyan-1100);
|
|
38663
|
-
--slicc-terminal-color-15: var(--swc-gray-800);
|
|
38871
|
+
${terminalPalette}
|
|
38664
38872
|
}
|
|
38665
38873
|
`
|
|
38666
38874
|
];
|
|
@@ -43237,13 +43445,13 @@ function touched2(cwds, word, whole) {
|
|
|
43237
43445
|
}
|
|
43238
43446
|
return null;
|
|
43239
43447
|
}
|
|
43240
|
-
function
|
|
43241
|
-
const
|
|
43448
|
+
function ansi2(command3) {
|
|
43449
|
+
const escape3 = /\\(?:x([0-9a-fA-F]{1,2})|u([0-9a-fA-F]{1,4})|U([0-9a-fA-F]{1,8})|([0-7]{1,3})|([\s\S]))/g;
|
|
43242
43450
|
return command3.replace(
|
|
43243
43451
|
/\$'((?:[^'\\]|\\[\s\S])*)'/g,
|
|
43244
|
-
(_9, body4) => `'${body4.replace(
|
|
43452
|
+
(_9, body4) => `'${body4.replace(escape3, (_match, hex, short2, long, octal, plain2) => {
|
|
43245
43453
|
if (octal) return String.fromCharCode(Number.parseInt(octal, 8));
|
|
43246
|
-
if (
|
|
43454
|
+
if (plain2) return plain2;
|
|
43247
43455
|
return String.fromCodePoint(
|
|
43248
43456
|
Math.min(Number.parseInt(hex ?? short2 ?? long, 16), 1114111)
|
|
43249
43457
|
);
|
|
@@ -43339,10 +43547,10 @@ function reach2(command3, cwd) {
|
|
|
43339
43547
|
const start2 = absolute("/", cwd ?? "/");
|
|
43340
43548
|
if (protects(start2, false)) return start2;
|
|
43341
43549
|
const cwds = /* @__PURE__ */ new Set([start2]);
|
|
43342
|
-
const text5 = unglob(
|
|
43343
|
-
const
|
|
43550
|
+
const text5 = unglob(ansi2(command3.replace(/\\\n/g, "")));
|
|
43551
|
+
const plain2 = text5.split(separators).map((segment2) => commas(segment2.split(/[\s<>=]+/).map((word) => word.replace(/['"\\]/g, ""))));
|
|
43344
43552
|
const aware = shield(text5).split(separators).map((segment2) => commas(quoted(unshield(segment2))));
|
|
43345
|
-
const segments = JSON.stringify(aware) === JSON.stringify(
|
|
43553
|
+
const segments = JSON.stringify(aware) === JSON.stringify(plain2) ? plain2 : [...plain2, ...aware];
|
|
43346
43554
|
const whole = segments.some((words) => words.length > 0 && !trusted(words[0]));
|
|
43347
43555
|
for (const words of segments) {
|
|
43348
43556
|
const hit = scan2(words, cwds, whole);
|
|
@@ -43549,9 +43757,9 @@ var SliccApprovals = class extends ModelElement {
|
|
|
43549
43757
|
clearTimeout(this.#arming);
|
|
43550
43758
|
this.#showing = null;
|
|
43551
43759
|
}
|
|
43552
|
-
#tick(
|
|
43553
|
-
if (
|
|
43554
|
-
if (!
|
|
43760
|
+
#tick(on2) {
|
|
43761
|
+
if (on2 && !this.#timer) this.#timer = setInterval(() => this.now = Date.now(), 1e3);
|
|
43762
|
+
if (!on2 && this.#timer) {
|
|
43555
43763
|
clearInterval(this.#timer);
|
|
43556
43764
|
this.#timer = null;
|
|
43557
43765
|
}
|
|
@@ -44932,10 +45140,10 @@ var SliccBrowser = class extends ModelElement {
|
|
|
44932
45140
|
}
|
|
44933
45141
|
#detail(tabs, tab) {
|
|
44934
45142
|
const narrow = this.#width < narrowWidth;
|
|
44935
|
-
const
|
|
45143
|
+
const wide2 = this.#width >= wideWidth;
|
|
44936
45144
|
const copy = this.#copied === "url" ? "Copied" : this.#copied === "failed" ? "Couldn\u2019t copy" : "Copy";
|
|
44937
|
-
return b`<div class=${`focused${
|
|
44938
|
-
${
|
|
45145
|
+
return b`<div class=${`focused${wide2 ? " wide" : ""}${narrow ? " narrow" : ""}`}>
|
|
45146
|
+
${wide2 ? this.#list(tabs, tab) : A}
|
|
44939
45147
|
<section class="detail" aria-label=${tab.title}>
|
|
44940
45148
|
<div class="bar">
|
|
44941
45149
|
<swc-action-button size="s" quiet data-action="all-tabs" @click=${(event2) => {
|
|
@@ -44944,7 +45152,7 @@ var SliccBrowser = class extends ModelElement {
|
|
|
44944
45152
|
() => this.focusWith({ focusVisible: event2.detail === 0 }, ".window")
|
|
44945
45153
|
);
|
|
44946
45154
|
}}><swc-icon-chevron-left slot="icon"></swc-icon-chevron-left>All tabs (${tabs.length})</swc-action-button>
|
|
44947
|
-
${
|
|
45155
|
+
${wide2 ? A : this.#picker(tabs, tab)}
|
|
44948
45156
|
</div>
|
|
44949
45157
|
<div class="address">
|
|
44950
45158
|
<span class="url" title=${tab.url}>${narrow ? place2(tab.url) : tab.url}</span>
|
|
@@ -47887,7 +48095,7 @@ function load() {
|
|
|
47887
48095
|
function pascal(name) {
|
|
47888
48096
|
return name.replace(/(^|-)([a-z0-9])/g, (_9, _dash, char) => char.toUpperCase());
|
|
47889
48097
|
}
|
|
47890
|
-
var
|
|
48098
|
+
var escape2 = (value) => String(value).replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<");
|
|
47891
48099
|
function svg(name, node2) {
|
|
47892
48100
|
const attributes = {
|
|
47893
48101
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -47901,7 +48109,7 @@ function svg(name, node2) {
|
|
|
47901
48109
|
"stroke-linejoin": "round",
|
|
47902
48110
|
class: `lucide lucide-${name}`
|
|
47903
48111
|
};
|
|
47904
|
-
const attrs = (entries) => Object.entries(entries).map(([key2, value]) => ` ${key2}="${
|
|
48112
|
+
const attrs = (entries) => Object.entries(entries).map(([key2, value]) => ` ${key2}="${escape2(value)}"`).join("");
|
|
47905
48113
|
const children = node2.map(([tag3, child]) => `<${tag3}${attrs(child)}/>`).join("");
|
|
47906
48114
|
return `<svg${attrs(attributes)}>${children}</svg>`;
|
|
47907
48115
|
}
|
|
@@ -48542,17 +48750,17 @@ function byName(a23, b13) {
|
|
|
48542
48750
|
return a23.name < b13.name ? -1 : a23.name > b13.name ? 1 : 0;
|
|
48543
48751
|
}
|
|
48544
48752
|
function sourceLine(secret, devices) {
|
|
48545
|
-
const
|
|
48753
|
+
const on2 = secret.sourceDevice ? ` on ${deviceName2(secret.sourceDevice, devices)}` : "";
|
|
48546
48754
|
const [kind, detail = ""] = secret.source.split(/:(.*)/s);
|
|
48547
|
-
if (kind === "settings") return `Entered in SLICC${
|
|
48548
|
-
if (kind === "popup") return `Entered in the vault${
|
|
48549
|
-
if (kind === "process") return `Saved by a program${
|
|
48755
|
+
if (kind === "settings") return `Entered in SLICC${on2}`;
|
|
48756
|
+
if (kind === "popup") return `Entered in the vault${on2}`;
|
|
48757
|
+
if (kind === "process") return `Saved by a program${on2}`;
|
|
48550
48758
|
if (kind === "import") return `Imported from ${detail}`;
|
|
48551
48759
|
if (kind === "oauth") {
|
|
48552
48760
|
const as = secret.account ? ` as ${secret.account}` : "";
|
|
48553
48761
|
return `Signed in to ${secret.provider ?? detail}${as}`;
|
|
48554
48762
|
}
|
|
48555
|
-
return `A jerk lease for ${detail.split("@")[0]}${
|
|
48763
|
+
return `A jerk lease for ${detail.split("@")[0]}${on2}`;
|
|
48556
48764
|
}
|
|
48557
48765
|
function startOfDay(now) {
|
|
48558
48766
|
const date = new Date(now);
|
|
@@ -49281,9 +49489,9 @@ var SliccSecrets = class extends ThemedElement {
|
|
|
49281
49489
|
}
|
|
49282
49490
|
}
|
|
49283
49491
|
#pick(name, event2) {
|
|
49284
|
-
const
|
|
49492
|
+
const on2 = event2.currentTarget.checked;
|
|
49285
49493
|
this.picked = new Set(
|
|
49286
|
-
|
|
49494
|
+
on2 ? [...this.picked, name] : [...this.picked].filter((item2) => item2 !== name)
|
|
49287
49495
|
);
|
|
49288
49496
|
}
|
|
49289
49497
|
async exportAll(vault, trigger2 = null) {
|
|
@@ -50157,9 +50365,9 @@ var SliccSettings = class extends ThemedElement {
|
|
|
50157
50365
|
return event2.target.checked;
|
|
50158
50366
|
}
|
|
50159
50367
|
#cancelled = /* @__PURE__ */ new Set();
|
|
50160
|
-
#busy(id,
|
|
50368
|
+
#busy(id, on2) {
|
|
50161
50369
|
const rest = [...this.pending].filter((candidate) => candidate !== id);
|
|
50162
|
-
this.pending = new Set(
|
|
50370
|
+
this.pending = new Set(on2 ? [...rest, id] : rest);
|
|
50163
50371
|
}
|
|
50164
50372
|
async connect(id, secret, fields) {
|
|
50165
50373
|
this.#busy(id, true);
|
|
@@ -51853,9 +52061,9 @@ var SliccValueRequest = class extends ThemedElement {
|
|
|
51853
52061
|
#current(queue) {
|
|
51854
52062
|
return queue.find(({ id }) => id === this.#front) ?? queue.find(({ id }) => !this.#later.has(id)) ?? null;
|
|
51855
52063
|
}
|
|
51856
|
-
#tick(
|
|
51857
|
-
if (
|
|
51858
|
-
if (!
|
|
52064
|
+
#tick(on2) {
|
|
52065
|
+
if (on2 && !this.#timer) this.#timer = setInterval(() => this.now = Date.now(), 1e3);
|
|
52066
|
+
if (!on2 && this.#timer) {
|
|
51859
52067
|
clearInterval(this.#timer);
|
|
51860
52068
|
this.#timer = null;
|
|
51861
52069
|
}
|
|
@@ -60905,7 +61113,7 @@ function createColorPalette(namedColorsMap = defaultNamedColorsMap) {
|
|
|
60905
61113
|
if (colorTable) return colorTable;
|
|
60906
61114
|
colorTable = [];
|
|
60907
61115
|
for (let i26 = 0; i26 < namedColors.length; i26++) colorTable.push(namedColor(namedColors[i26]));
|
|
60908
|
-
let
|
|
61116
|
+
let levels2 = [
|
|
60909
61117
|
0,
|
|
60910
61118
|
95,
|
|
60911
61119
|
135,
|
|
@@ -60914,9 +61122,9 @@ function createColorPalette(namedColorsMap = defaultNamedColorsMap) {
|
|
|
60914
61122
|
255
|
|
60915
61123
|
];
|
|
60916
61124
|
for (let r40 = 0; r40 < 6; r40++) for (let g7 = 0; g7 < 6; g7++) for (let b13 = 0; b13 < 6; b13++) colorTable.push(rgbColor([
|
|
60917
|
-
|
|
60918
|
-
|
|
60919
|
-
|
|
61125
|
+
levels2[r40],
|
|
61126
|
+
levels2[g7],
|
|
61127
|
+
levels2[b13]
|
|
60920
61128
|
]));
|
|
60921
61129
|
let level = 8;
|
|
60922
61130
|
for (let i26 = 0; i26 < 24; i26++, level += 10) colorTable.push(rgbColor([
|
|
@@ -63246,9 +63454,9 @@ var FirstPassVisitor = {
|
|
|
63246
63454
|
},
|
|
63247
63455
|
exit({ node: node2 }, { flagDirectivesByAlt }) {
|
|
63248
63456
|
if (flagDirectivesByAlt.get(node2)?.length) {
|
|
63249
|
-
const
|
|
63250
|
-
if (
|
|
63251
|
-
const flagGroup = A8({ flags });
|
|
63457
|
+
const flags2 = getCombinedFlagModsFromFlagNodes(flagDirectivesByAlt.get(node2));
|
|
63458
|
+
if (flags2) {
|
|
63459
|
+
const flagGroup = A8({ flags: flags2 });
|
|
63252
63460
|
flagGroup.body[0].body = node2.body;
|
|
63253
63461
|
node2.body = [setParentDeep(flagGroup, node2)];
|
|
63254
63462
|
}
|
|
@@ -63384,12 +63592,12 @@ var FirstPassVisitor = {
|
|
|
63384
63592
|
}
|
|
63385
63593
|
},
|
|
63386
63594
|
Directive({ node: node2, parent, root: root2, remove: remove2, replaceWith, removeAllPrevSiblings, removeAllNextSiblings }) {
|
|
63387
|
-
const { kind, flags } = node2;
|
|
63595
|
+
const { kind, flags: flags2 } = node2;
|
|
63388
63596
|
if (kind === "flags") {
|
|
63389
|
-
if (!
|
|
63597
|
+
if (!flags2.enable && !flags2.disable) {
|
|
63390
63598
|
remove2();
|
|
63391
63599
|
} else {
|
|
63392
|
-
const flagGroup = A8({ flags });
|
|
63600
|
+
const flagGroup = A8({ flags: flags2 });
|
|
63393
63601
|
flagGroup.body[0].body = removeAllNextSiblings();
|
|
63394
63602
|
replaceWith(setParentDeep(flagGroup, parent), { traverse: true });
|
|
63395
63603
|
}
|
|
@@ -63769,13 +63977,13 @@ function getAndStoreJsGroupName(name, map) {
|
|
|
63769
63977
|
function getCombinedFlagModsFromFlagNodes(flagNodes) {
|
|
63770
63978
|
const flagProps = ["dotAll", "ignoreCase"];
|
|
63771
63979
|
const combinedFlags = { enable: {}, disable: {} };
|
|
63772
|
-
flagNodes.forEach(({ flags }) => {
|
|
63980
|
+
flagNodes.forEach(({ flags: flags2 }) => {
|
|
63773
63981
|
flagProps.forEach((prop) => {
|
|
63774
|
-
if (
|
|
63982
|
+
if (flags2.enable?.[prop]) {
|
|
63775
63983
|
delete combinedFlags.disable[prop];
|
|
63776
63984
|
combinedFlags.enable[prop] = true;
|
|
63777
63985
|
}
|
|
63778
|
-
if (
|
|
63986
|
+
if (flags2.disable?.[prop]) {
|
|
63779
63987
|
combinedFlags.disable[prop] = true;
|
|
63780
63988
|
}
|
|
63781
63989
|
});
|
|
@@ -64162,8 +64370,8 @@ var generator = {
|
|
|
64162
64370
|
const extraChars = /* @__PURE__ */ new Set();
|
|
64163
64371
|
if (state2.useAppliedIgnoreCase && state2.currentFlags.ignoreCase) {
|
|
64164
64372
|
const charsOutsideRange = getCasesOutsideCharClassRange(node2);
|
|
64165
|
-
const
|
|
64166
|
-
|
|
64373
|
+
const ranges2 = getCodePointRangesFromChars(charsOutsideRange);
|
|
64374
|
+
ranges2.forEach((value) => {
|
|
64167
64375
|
extraChars.add(
|
|
64168
64376
|
Array.isArray(value) ? `${getCharEscape(value[0], escOpts)}-${getCharEscape(value[1], escOpts)}` : getCharEscape(value, escOpts)
|
|
64169
64377
|
);
|
|
@@ -64211,14 +64419,14 @@ var generator = {
|
|
|
64211
64419
|
/**
|
|
64212
64420
|
@param {GroupNode} node
|
|
64213
64421
|
*/
|
|
64214
|
-
Group({ atomic: atomic2, body: body4, flags, parent }, state2, gen) {
|
|
64422
|
+
Group({ atomic: atomic2, body: body4, flags: flags2, parent }, state2, gen) {
|
|
64215
64423
|
const currentFlags = state2.currentFlags;
|
|
64216
|
-
if (
|
|
64217
|
-
state2.currentFlags = getNewCurrentFlags(currentFlags,
|
|
64424
|
+
if (flags2) {
|
|
64425
|
+
state2.currentFlags = getNewCurrentFlags(currentFlags, flags2);
|
|
64218
64426
|
}
|
|
64219
64427
|
const contents = body4.map(gen).join("|");
|
|
64220
64428
|
const result = !state2.verbose && body4.length === 1 && // Single alt
|
|
64221
|
-
parent.type !== "Quantifier" && !atomic2 && (!state2.useFlagMods || !
|
|
64429
|
+
parent.type !== "Quantifier" && !atomic2 && (!state2.useFlagMods || !flags2) ? contents : `(?${getGroupPrefix(atomic2, flags2, state2.useFlagMods)}${contents})`;
|
|
64222
64430
|
state2.currentFlags = currentFlags;
|
|
64223
64431
|
return result;
|
|
64224
64432
|
},
|
|
@@ -64466,14 +64674,14 @@ var EmulatedRegExp = class _EmulatedRegExp extends RegExp {
|
|
|
64466
64674
|
@param {EmulatedRegExp} pattern
|
|
64467
64675
|
@param {string} [flags]
|
|
64468
64676
|
*/
|
|
64469
|
-
constructor(pattern2,
|
|
64677
|
+
constructor(pattern2, flags2, options2) {
|
|
64470
64678
|
const lazyCompile = !!options2?.lazyCompile;
|
|
64471
64679
|
if (pattern2 instanceof RegExp) {
|
|
64472
64680
|
if (options2) {
|
|
64473
64681
|
throw new Error("Cannot provide options when copying a regexp");
|
|
64474
64682
|
}
|
|
64475
64683
|
const re3 = pattern2;
|
|
64476
|
-
super(re3,
|
|
64684
|
+
super(re3, flags2);
|
|
64477
64685
|
this.#pattern = re3.source;
|
|
64478
64686
|
if (re3 instanceof _EmulatedRegExp) {
|
|
64479
64687
|
this.#captureMap = re3.#captureMap;
|
|
@@ -64488,7 +64696,7 @@ var EmulatedRegExp = class _EmulatedRegExp extends RegExp {
|
|
|
64488
64696
|
transfers: [],
|
|
64489
64697
|
...options2
|
|
64490
64698
|
};
|
|
64491
|
-
super(lazyCompile ? "" : pattern2,
|
|
64699
|
+
super(lazyCompile ? "" : pattern2, flags2);
|
|
64492
64700
|
this.#pattern = pattern2;
|
|
64493
64701
|
this.#captureMap = createCaptureMap(opts.hiddenCaptures, opts.transfers);
|
|
64494
64702
|
this.#strategy = opts.strategy;
|
|
@@ -67783,8 +67991,8 @@ function relativeLuminance(color2) {
|
|
|
67783
67991
|
const r40 = rgba[0] / 255;
|
|
67784
67992
|
const g7 = rgba[1] / 255;
|
|
67785
67993
|
const b13 = rgba[2] / 255;
|
|
67786
|
-
const
|
|
67787
|
-
return 0.2126 *
|
|
67994
|
+
const channel2 = (v13) => v13 <= 0.03928 ? v13 / 12.92 : ((v13 + 0.055) / 1.055) ** 2.4;
|
|
67995
|
+
return 0.2126 * channel2(r40) + 0.7152 * channel2(g7) + 0.0722 * channel2(b13);
|
|
67788
67996
|
}
|
|
67789
67997
|
function isFullyTransparent(color2) {
|
|
67790
67998
|
if (color2 == null) return false;
|
|
@@ -72121,7 +72329,7 @@ function isAdditionLineRenderable({ fileDiff, lineNumber, expandedHunks, collaps
|
|
|
72121
72329
|
}
|
|
72122
72330
|
function getNearestRenderableAdditionLine({ fileDiff, lineNumber, direction, expandedHunks, collapsedContextThreshold }) {
|
|
72123
72331
|
if (expandedHunks === true || fileDiff.isPartial) return lineNumber;
|
|
72124
|
-
const
|
|
72332
|
+
const ranges2 = [];
|
|
72125
72333
|
let modeledEnd = 1;
|
|
72126
72334
|
for (const [hunkIndex, hunk] of fileDiff.hunks.entries()) {
|
|
72127
72335
|
const [hunkStart, hunkEnd] = getHunkAdditionLineRange(hunk);
|
|
@@ -72133,12 +72341,12 @@ function getNearestRenderableAdditionLine({ fileDiff, lineNumber, direction, exp
|
|
|
72133
72341
|
collapsedContextThreshold
|
|
72134
72342
|
});
|
|
72135
72343
|
const gapStart = hunkStart - region.rangeSize;
|
|
72136
|
-
if (region.renderAll)
|
|
72344
|
+
if (region.renderAll) ranges2.push([gapStart, hunkStart]);
|
|
72137
72345
|
else {
|
|
72138
|
-
if (region.fromStart > 0)
|
|
72139
|
-
if (region.fromEnd > 0)
|
|
72346
|
+
if (region.fromStart > 0) ranges2.push([gapStart, gapStart + region.fromStart]);
|
|
72347
|
+
if (region.fromEnd > 0) ranges2.push([hunkStart - region.fromEnd, hunkStart]);
|
|
72140
72348
|
}
|
|
72141
|
-
|
|
72349
|
+
ranges2.push([hunkStart, hunkEnd]);
|
|
72142
72350
|
modeledEnd = hunkEnd;
|
|
72143
72351
|
}
|
|
72144
72352
|
const trailingRegion = getTrailingExpandedRegion({
|
|
@@ -72151,16 +72359,16 @@ function getNearestRenderableAdditionLine({ fileDiff, lineNumber, direction, exp
|
|
|
72151
72359
|
if (trailingRegion != null) {
|
|
72152
72360
|
const trailingStart = modeledEnd;
|
|
72153
72361
|
modeledEnd = trailingStart + trailingRegion.rangeSize;
|
|
72154
|
-
if (trailingRegion.renderAll)
|
|
72155
|
-
else if (trailingRegion.fromStart > 0)
|
|
72362
|
+
if (trailingRegion.renderAll) ranges2.push([trailingStart, modeledEnd]);
|
|
72363
|
+
else if (trailingRegion.fromStart > 0) ranges2.push([trailingStart, trailingStart + trailingRegion.fromStart]);
|
|
72156
72364
|
}
|
|
72157
72365
|
if (lineNumber >= modeledEnd) return lineNumber;
|
|
72158
72366
|
if (direction === "down") {
|
|
72159
|
-
for (const [start2, end] of
|
|
72367
|
+
for (const [start2, end] of ranges2) if (end > lineNumber) return Math.max(start2, lineNumber);
|
|
72160
72368
|
return;
|
|
72161
72369
|
}
|
|
72162
|
-
for (let index2 =
|
|
72163
|
-
const [start2, end] =
|
|
72370
|
+
for (let index2 = ranges2.length - 1; index2 >= 0; index2--) {
|
|
72371
|
+
const [start2, end] = ranges2[index2];
|
|
72164
72372
|
if (start2 <= lineNumber) return Math.min(end - 1, lineNumber);
|
|
72165
72373
|
}
|
|
72166
72374
|
}
|
|
@@ -72522,19 +72730,19 @@ function getHunkPrefixCounts({ diff, expandedHunks, collapsedContextThreshold })
|
|
|
72522
72730
|
}
|
|
72523
72731
|
function getContextLineIterationBounds(state2, count2, diffStyle) {
|
|
72524
72732
|
if (!state2.isWindowedHighlight || count2 <= 0) return [0, count2];
|
|
72525
|
-
const
|
|
72733
|
+
const ranges2 = [];
|
|
72526
72734
|
function pushRange(currentCount) {
|
|
72527
72735
|
const start3 = Math.max(0, state2.viewportStart - currentCount);
|
|
72528
72736
|
const end2 = Math.min(count2, state2.viewportEnd - currentCount);
|
|
72529
|
-
if (end2 > start3)
|
|
72737
|
+
if (end2 > start3) ranges2.push([start3, end2]);
|
|
72530
72738
|
}
|
|
72531
72739
|
if (diffStyle !== "split") pushRange(state2.unifiedCount);
|
|
72532
72740
|
if (diffStyle !== "unified") pushRange(state2.splitCount);
|
|
72533
|
-
if (
|
|
72534
|
-
let start2 =
|
|
72535
|
-
let end =
|
|
72536
|
-
for (let index2 = 1; index2 <
|
|
72537
|
-
const range3 =
|
|
72741
|
+
if (ranges2.length === 0) return [0, 0];
|
|
72742
|
+
let start2 = ranges2[0][0];
|
|
72743
|
+
let end = ranges2[0][1];
|
|
72744
|
+
for (let index2 = 1; index2 < ranges2.length; index2++) {
|
|
72745
|
+
const range3 = ranges2[index2];
|
|
72538
72746
|
start2 = Math.min(start2, range3[0]);
|
|
72539
72747
|
end = Math.max(end, range3[1]);
|
|
72540
72748
|
}
|
|
@@ -89487,15 +89695,15 @@ function buildColorPicker(tabGroup, palette) {
|
|
|
89487
89695
|
wrapper.className = "dv-context-menu-color-picker";
|
|
89488
89696
|
if (!palette.enabled) return wrapper;
|
|
89489
89697
|
for (const entry of palette.entries()) {
|
|
89490
|
-
const
|
|
89491
|
-
|
|
89492
|
-
|
|
89493
|
-
if (entry.label)
|
|
89494
|
-
if (tabGroup.color === entry.id)
|
|
89495
|
-
|
|
89698
|
+
const swatch2 = document.createElement("div");
|
|
89699
|
+
swatch2.className = "dv-context-menu-color-swatch";
|
|
89700
|
+
swatch2.style.setProperty("--dv-tab-group-color", entry.value);
|
|
89701
|
+
if (entry.label) swatch2.title = entry.label;
|
|
89702
|
+
if (tabGroup.color === entry.id) swatch2.classList.add("dv-context-menu-color-swatch--selected");
|
|
89703
|
+
swatch2.addEventListener("click", () => {
|
|
89496
89704
|
tabGroup.setColor(entry.id);
|
|
89497
89705
|
});
|
|
89498
|
-
wrapper.appendChild(
|
|
89706
|
+
wrapper.appendChild(swatch2);
|
|
89499
89707
|
}
|
|
89500
89708
|
return wrapper;
|
|
89501
89709
|
}
|
|
@@ -90018,7 +90226,7 @@ function createDismissableLayer(options2) {
|
|
|
90018
90226
|
var _options$window, _options$capture, _options$escape, _options$keys, _options$outsidePoint, _options$pointerDownG, _options$now;
|
|
90019
90227
|
const win = (_options$window = options2.window) !== null && _options$window !== void 0 ? _options$window : window;
|
|
90020
90228
|
const capture = (_options$capture = options2.capture) !== null && _options$capture !== void 0 ? _options$capture : false;
|
|
90021
|
-
const
|
|
90229
|
+
const escape3 = (_options$escape = options2.escape) !== null && _options$escape !== void 0 ? _options$escape : true;
|
|
90022
90230
|
const keys = (_options$keys = options2.keys) !== null && _options$keys !== void 0 ? _options$keys : [];
|
|
90023
90231
|
const outside2 = (_options$outsidePoint = options2.outsidePointerDown) !== null && _options$outsidePoint !== void 0 ? _options$outsidePoint : true;
|
|
90024
90232
|
const grace = (_options$pointerDownG = options2.pointerDownGraceMs) !== null && _options$pointerDownG !== void 0 ? _options$pointerDownG : 0;
|
|
@@ -90030,8 +90238,8 @@ function createDismissableLayer(options2) {
|
|
|
90030
90238
|
if (options2.isInside) return options2.isInside(event2);
|
|
90031
90239
|
return isEventWithin(event2, (_options$elements = (_options$elements2 = options2.elements) === null || _options$elements2 === void 0 ? void 0 : _options$elements2.call(options2)) !== null && _options$elements !== void 0 ? _options$elements : []);
|
|
90032
90240
|
};
|
|
90033
|
-
if (
|
|
90034
|
-
if (
|
|
90241
|
+
if (escape3 || keys.length > 0) disposables.addDisposables(addDisposableListener(win, "keydown", (event2) => {
|
|
90242
|
+
if (escape3 && event2.key === "Escape" || keys.includes(event2.key)) options2.onDismiss();
|
|
90035
90243
|
}, capture));
|
|
90036
90244
|
if (outside2 || options2.onInsidePointerDown) disposables.addDisposables(addDisposableListener(win, "pointerdown", (event2) => {
|
|
90037
90245
|
if (isInside(event2)) {
|