@ai-ecoverse/slicc-spectrum 1.103.1 → 1.103.2

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/slicc-ui.js CHANGED
@@ -6247,8 +6247,8 @@ var containRe = /paint|layout|strict|content/;
6247
6247
  var isNotNone = (value) => !!value && value !== "none";
6248
6248
  var isWebKitValue;
6249
6249
  function isContainingBlock(elementOrCss) {
6250
- const css2 = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
6251
- return isNotNone(css2.transform) || isNotNone(css2.translate) || isNotNone(css2.scale) || isNotNone(css2.rotate) || isNotNone(css2.perspective) || !isWebKit2() && (isNotNone(css2.backdropFilter) || isNotNone(css2.filter)) || willChangeRe.test(css2.willChange || "") || containRe.test(css2.contain || "");
6250
+ const css3 = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
6251
+ return isNotNone(css3.transform) || isNotNone(css3.translate) || isNotNone(css3.scale) || isNotNone(css3.rotate) || isNotNone(css3.perspective) || !isWebKit2() && (isNotNone(css3.backdropFilter) || isNotNone(css3.filter)) || willChangeRe.test(css3.willChange || "") || containRe.test(css3.contain || "");
6252
6252
  }
6253
6253
  function getContainingBlock(element3) {
6254
6254
  let currentNode = getParentNode(element3);
@@ -6333,9 +6333,9 @@ function getFrameElement(win) {
6333
6333
 
6334
6334
  // node_modules/@adobe/spectrum-wc-core/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
6335
6335
  function getCssDimensions(element3) {
6336
- const css2 = getComputedStyle2(element3);
6337
- let width = parseFloat(css2.width) || 0;
6338
- let height = parseFloat(css2.height) || 0;
6336
+ const css3 = getComputedStyle2(element3);
6337
+ let width = parseFloat(css3.width) || 0;
6338
+ let height = parseFloat(css3.height) || 0;
6339
6339
  const hasOffset = isHTMLElement(element3);
6340
6340
  const offsetWidth = hasOffset ? element3.offsetWidth : width;
6341
6341
  const offsetHeight = hasOffset ? element3.offsetHeight : height;
@@ -6429,9 +6429,9 @@ function getBoundingClientRect(element3, includeScale, isFixedStrategy, offsetPa
6429
6429
  while (currentIFrame && offsetParent && offsetWin !== currentWin) {
6430
6430
  const iframeScale = getScale(currentIFrame);
6431
6431
  const iframeRect = currentIFrame.getBoundingClientRect();
6432
- const css2 = getComputedStyle2(currentIFrame);
6433
- const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css2.paddingLeft)) * iframeScale.x;
6434
- const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css2.paddingTop)) * iframeScale.y;
6432
+ const css3 = getComputedStyle2(currentIFrame);
6433
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css3.paddingLeft)) * iframeScale.x;
6434
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css3.paddingTop)) * iframeScale.y;
6435
6435
  x7 *= iframeScale.x;
6436
6436
  y10 *= iframeScale.y;
6437
6437
  width *= iframeScale.x;
@@ -6821,20 +6821,20 @@ function observeMove(element3, onMove) {
6821
6821
  };
6822
6822
  let isFirstUpdate = true;
6823
6823
  function handleObserve(entries) {
6824
- const ratio = entries[0].intersectionRatio;
6825
- if (ratio !== threshold) {
6824
+ const ratio2 = entries[0].intersectionRatio;
6825
+ if (ratio2 !== threshold) {
6826
6826
  if (!isFirstUpdate) {
6827
6827
  return refresh2();
6828
6828
  }
6829
- if (!ratio) {
6829
+ if (!ratio2) {
6830
6830
  timeoutId = setTimeout(() => {
6831
6831
  refresh2(false, 1e-7);
6832
6832
  }, 1e3);
6833
6833
  } else {
6834
- refresh2(false, ratio);
6834
+ refresh2(false, ratio2);
6835
6835
  }
6836
6836
  }
6837
- if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element3.getBoundingClientRect())) {
6837
+ if (ratio2 === 1 && !rectsAreEqual(elementRectForRootMargin, element3.getBoundingClientRect())) {
6838
6838
  refresh2();
6839
6839
  }
6840
6840
  isFirstUpdate = false;
@@ -10438,6 +10438,299 @@ e25("swc-icon-new", o55);
10438
10438
  // node_modules/@adobe/spectrum-wc/dist/link.css
10439
10439
  var link_default = '/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Standalone link presentation for native `<a href>` elements.\n *\n * Default anchor appearance inside `.swc-Typography--prose` and\n * `.swc-Typography--links` ships with `typography.css` (generated). Import this\n * stylesheet when authors need explicit BEM modifiers on anchors.\n *\n */\n\n.swc-Link {\n inline-size: -moz-fit-content;\n inline-size: fit-content;\n font-family: var(--swc-sans-font-family-stack);\n font-size: var(--swc-font-size-100);\n font-style: normal;\n font-weight: 400;\n line-height: 1.30;\n color: var(--swc-link-text-color-default, var(--swc-accent-color-900));\n -webkit-text-decoration: underline;\n text-decoration: underline;\n text-decoration-thickness: 1px;\n text-underline-offset: 1px;\n transition: color 130ms ease-in-out;\n\n &:hover {\n color: var(--swc-link-text-color-hover, var(--swc-accent-color-1000));\n }\n\n &:active {\n color: var(--swc-link-text-color-down, var(--swc-accent-color-1000));\n }\n\n &:focus-visible {\n color: var(--swc-link-text-color-focus, var(--swc-accent-color-1000));\n border-radius: 4px;\n outline: 2px solid var(--swc-link-focus-indicator-color, var(--swc-blue-800));\n outline-offset: 2px;\n }\n\n &:lang(ja),\n &:lang(zh),\n &:lang(ko) {\n line-height: 1.50;\n }\n}\n\n.swc-Link--standalone {\n font-weight: 500;\n}\n\n.swc-Link--secondary {\n --swc-link-text-color-default: var(--swc-gray-800);\n --swc-link-text-color-hover: var(--swc-gray-900);\n --swc-link-text-color-down: var(--swc-gray-900);\n --swc-link-text-color-focus: var(--swc-gray-900);\n}\n\n.swc-Link--staticWhite {\n --swc-link-text-color-default: var(--swc-white);\n --swc-link-text-color-hover: var(--swc-white);\n --swc-link-text-color-down: var(--swc-white);\n --swc-link-text-color-focus: var(--swc-white);\n --swc-link-focus-indicator-color: var(--swc-white);\n}\n\n.swc-Link--staticBlack {\n --swc-link-text-color-default: var(--swc-black);\n --swc-link-text-color-hover: var(--swc-black);\n --swc-link-text-color-down: var(--swc-black);\n --swc-link-text-color-focus: var(--swc-black);\n --swc-link-focus-indicator-color: var(--swc-black);\n}\n\n.swc-Link--quiet.swc-Link--standalone {\n -webkit-text-decoration: none;\n text-decoration: none;\n}\n\n.swc-Link--quiet.swc-Link--standalone:hover {\n -webkit-text-decoration: underline;\n text-decoration: underline;\n}\n';
10440
10440
 
10441
+ // src/app/ansi.ts
10442
+ var lightPalette = [
10443
+ "gray-800",
10444
+ "negative-color-900",
10445
+ "positive-color-900",
10446
+ "notice-color-1000",
10447
+ "informative-color-900",
10448
+ "purple-900",
10449
+ "cyan-1000",
10450
+ "gray-600",
10451
+ "gray-700",
10452
+ "negative-color-1000",
10453
+ "positive-color-1000",
10454
+ "notice-color-1100",
10455
+ "informative-color-1000",
10456
+ "purple-1000",
10457
+ "cyan-1100",
10458
+ "gray-800"
10459
+ ];
10460
+ var terminalPalette = r(
10461
+ lightPalette.map((token2, n37) => `--slicc-terminal-color-${n37}: var(--swc-${token2});`).join("\n")
10462
+ );
10463
+ var tints = [
10464
+ "gray-800",
10465
+ "negative-subtle-background-color-default",
10466
+ "positive-subtle-background-color-default",
10467
+ "notice-subtle-background-color-default",
10468
+ "informative-subtle-background-color-default",
10469
+ "purple-subtle-background-color-default",
10470
+ "cyan-subtle-background-color-default",
10471
+ "gray-subtle-background-color-default"
10472
+ ];
10473
+ var plain = {
10474
+ bold: false,
10475
+ dim: false,
10476
+ italic: false,
10477
+ underline: false,
10478
+ inverse: false,
10479
+ fg: null,
10480
+ bg: null
10481
+ };
10482
+ var levels = [0, 95, 135, 175, 215, 255];
10483
+ function indexed(n37) {
10484
+ if (!Number.isInteger(n37) || n37 < 0 || n37 > 255) return null;
10485
+ if (n37 < 16) return n37;
10486
+ if (n37 >= 232) {
10487
+ const grey = 8 + (n37 - 232) * 10;
10488
+ return `rgb(${grey}, ${grey}, ${grey})`;
10489
+ }
10490
+ const cube = n37 - 16;
10491
+ const [r40, g7, b13] = [Math.floor(cube / 36), Math.floor(cube / 6) % 6, cube % 6].map(
10492
+ (level) => levels[level]
10493
+ );
10494
+ return `rgb(${r40}, ${g7}, ${b13})`;
10495
+ }
10496
+ function channel(value) {
10497
+ return Number.isInteger(value) && value >= 0 && value <= 255 ? value : null;
10498
+ }
10499
+ function extended(params, at) {
10500
+ const mode2 = params[at + 1];
10501
+ if (mode2 === 5) return { color: indexed(params[at + 2]), used: 2 };
10502
+ if (mode2 === 2) {
10503
+ const rgb = params.slice(at + 2, at + 5).map(channel);
10504
+ const ok4 = rgb.length === 3 && rgb.every((value) => value !== null);
10505
+ return { color: ok4 ? `rgb(${rgb.join(", ")})` : null, used: 4 };
10506
+ }
10507
+ return { color: null, used: 0 };
10508
+ }
10509
+ function numbers(text5) {
10510
+ return text5.split(":").map((part2) => part2 === "" ? 0 : Number(part2));
10511
+ }
10512
+ var flags = {
10513
+ 0: plain,
10514
+ 1: { bold: true },
10515
+ 2: { dim: true },
10516
+ 3: { italic: true },
10517
+ 4: { underline: true },
10518
+ 7: { inverse: true },
10519
+ 22: { bold: false, dim: false },
10520
+ 23: { italic: false },
10521
+ 24: { underline: false },
10522
+ 27: { inverse: false },
10523
+ 39: { fg: null },
10524
+ 49: { bg: null }
10525
+ };
10526
+ var ranges = [
10527
+ [30, "fg", 0],
10528
+ [40, "bg", 0],
10529
+ [90, "fg", 8],
10530
+ [100, "bg", 8]
10531
+ ];
10532
+ function simple(code3) {
10533
+ const flag = flags[code3];
10534
+ if (flag) return flag;
10535
+ const range3 = ranges.find(([start2]) => code3 >= start2 && code3 < start2 + 8);
10536
+ return range3 ? { [range3[1]]: code3 - range3[0] + range3[2] } : null;
10537
+ }
10538
+ function wide(groups2, i26) {
10539
+ const group = groups2[i26];
10540
+ if (group.length === 1)
10541
+ return extended(
10542
+ groups2.slice(i26).map((entry) => entry[0]),
10543
+ 0
10544
+ );
10545
+ const spaced = group[1] === 2 && group.length > 5;
10546
+ return { color: extended(spaced ? [0, 2, ...group.slice(3)] : group, 0).color, used: 0 };
10547
+ }
10548
+ function sgr(style, body4) {
10549
+ const next = { ...style };
10550
+ const groups2 = body4 === "" ? [[0]] : body4.split(";").map(numbers);
10551
+ for (let i26 = 0; i26 < groups2.length; i26++) {
10552
+ const group = groups2[i26];
10553
+ const code3 = group[0];
10554
+ if (code3 === 38 || code3 === 48) {
10555
+ const { color: color2, used } = wide(groups2, i26);
10556
+ i26 += used;
10557
+ if (color2 !== null) next[code3 === 38 ? "fg" : "bg"] = color2;
10558
+ } else if (code3 === 4 && group.length > 1) next.underline = group[1] !== 0;
10559
+ else Object.assign(next, simple(code3));
10560
+ }
10561
+ return next;
10562
+ }
10563
+ function terminated(text5, from, streaming) {
10564
+ for (let i26 = from; i26 < text5.length; i26++) {
10565
+ if (text5[i26] === "\x07") return i26 + 1;
10566
+ if (text5[i26] === "\x1B" && text5[i26 + 1] === "\\") return i26 + 2;
10567
+ }
10568
+ if (streaming) return -1;
10569
+ const line = text5.indexOf("\n", from);
10570
+ return line === -1 ? text5.length : line;
10571
+ }
10572
+ function csi(text5, from) {
10573
+ for (let i26 = from; i26 < text5.length; i26++) {
10574
+ const code3 = text5.charCodeAt(i26);
10575
+ if (code3 >= 64 && code3 <= 126) {
10576
+ return { end: i26 + 1, body: text5.slice(from, i26), final: text5[i26] };
10577
+ }
10578
+ if (code3 < 32 || code3 > 63) return { end: i26, body: "", final: "" };
10579
+ }
10580
+ return null;
10581
+ }
10582
+ function escape(text5, at, style, streaming) {
10583
+ const kind = text5[at + 1];
10584
+ if (kind === void 0) return { end: -1, style };
10585
+ if (kind === "[") {
10586
+ const found = csi(text5, at + 2);
10587
+ if (!found) return { end: -1, style };
10588
+ const styled = found.final === "m" && /^[\d;:]*$/.test(found.body);
10589
+ return { end: found.end, style: styled ? sgr(style, found.body) : style };
10590
+ }
10591
+ if ("]PX^_".includes(kind)) return { end: terminated(text5, at + 2, streaming), style };
10592
+ let i26 = at + 1;
10593
+ while (i26 < text5.length && text5.charCodeAt(i26) >= 32 && text5.charCodeAt(i26) <= 47) i26++;
10594
+ if (i26 === text5.length) return { end: -1, style };
10595
+ const final = text5.charCodeAt(i26);
10596
+ return { end: final >= 48 && final <= 126 ? i26 + 1 : at + 1, style };
10597
+ }
10598
+ function parseAnsi(text5, streaming = false) {
10599
+ const runs = [];
10600
+ let style = plain;
10601
+ let start2 = 0;
10602
+ const push2 = (end) => {
10603
+ if (end <= start2) return;
10604
+ const last = runs.at(-1);
10605
+ const piece = text5.slice(start2, end);
10606
+ if (last?.style === style) last.text += piece;
10607
+ else runs.push({ text: piece, style });
10608
+ };
10609
+ let i26 = text5.indexOf("\x1B");
10610
+ while (i26 !== -1) {
10611
+ push2(i26);
10612
+ const found = escape(text5, i26, style, streaming);
10613
+ if (found.end === -1) return runs;
10614
+ style = found.style;
10615
+ start2 = found.end;
10616
+ i26 = text5.indexOf("\x1B", start2);
10617
+ }
10618
+ push2(text5.length);
10619
+ return runs;
10620
+ }
10621
+ function swatch(color2) {
10622
+ if (color2 === null) return null;
10623
+ return typeof color2 === "number" ? `var(--slicc-terminal-color-${color2}, var(--swc-${lightPalette[color2]}))` : color2;
10624
+ }
10625
+ function on(rgb) {
10626
+ const [r40, g7, b13] = rgb.match(/\d+/g).map((value) => {
10627
+ const v13 = Number(value) / 255;
10628
+ return v13 <= 0.03928 ? v13 / 12.92 : ((v13 + 0.055) / 1.055) ** 2.4;
10629
+ });
10630
+ return 0.2126 * r40 + 0.7152 * g7 + 0.0722 * b13 > 0.179 ? "var(--swc-black)" : "var(--swc-white)";
10631
+ }
10632
+ function triple(color2) {
10633
+ const found = color2.match(/^rgb\((\d+), (\d+), (\d+)\)$/);
10634
+ return found ? found.slice(1).map(Number) : null;
10635
+ }
10636
+ function readSurface(root2) {
10637
+ const read = (scheme) => {
10638
+ const probe = document.createElement("div");
10639
+ probe.className = "call run-detail";
10640
+ probe.hidden = true;
10641
+ probe.style.colorScheme = scheme;
10642
+ root2.append(probe);
10643
+ const style = getComputedStyle(probe);
10644
+ const found = [triple(style.backgroundColor), triple(style.color)];
10645
+ probe.remove();
10646
+ return found;
10647
+ };
10648
+ const [light, dark] = [read("light"), read("dark")];
10649
+ if (![...light, ...dark].every(Boolean)) return void 0;
10650
+ return {
10651
+ card: [light[0], dark[0]],
10652
+ text: [light[1], dark[1]]
10653
+ };
10654
+ }
10655
+ function luminance(rgb) {
10656
+ const [r40, g7, b13] = rgb.map((value) => {
10657
+ const v13 = value / 255;
10658
+ return v13 <= 0.03928 ? v13 / 12.92 : ((v13 + 0.055) / 1.055) ** 2.4;
10659
+ });
10660
+ return 0.2126 * r40 + 0.7152 * g7 + 0.0722 * b13;
10661
+ }
10662
+ function ratio(a23, b13) {
10663
+ const [high, low] = [luminance(a23), luminance(b13)].sort((x7, y10) => y10 - x7);
10664
+ return (high + 0.05) / (low + 0.05);
10665
+ }
10666
+ function mix(color2, base, amount) {
10667
+ return color2.map(
10668
+ (value, i26) => Math.round(base[i26] + (value - base[i26]) * amount)
10669
+ );
10670
+ }
10671
+ function floor2(color2, under) {
10672
+ const black = [0, 0, 0];
10673
+ const white = [255, 255, 255];
10674
+ const pole = ratio(black, under) >= ratio(white, under) ? black : white;
10675
+ let step2 = 0;
10676
+ while (ratio(mix(pole, color2, step2 / 20), under) < 4.5) step2++;
10677
+ return mix(pole, color2, step2 / 20);
10678
+ }
10679
+ var strength = [0.12, 0.25];
10680
+ function tint(color2, card2, text5, side) {
10681
+ const amount = strength[side];
10682
+ const tinted = mix(color2, card2, amount);
10683
+ const apart = Math.hypot(...tinted.map((value, i26) => value - card2[i26]));
10684
+ return apart < 16 ? mix(text5, card2, amount) : tinted;
10685
+ }
10686
+ var css = (rgb) => `rgb(${rgb.join(", ")})`;
10687
+ var both = (pair) => `light-dark(${pair.map(css).join(", ")})`;
10688
+ function extendedPaint(fg, bg, surface2) {
10689
+ const backs = typeof bg === "string" ? surface2.card.map(
10690
+ (card2, side) => tint(triple(bg), card2, surface2.text[side], side)
10691
+ ) : null;
10692
+ const fronts = surface2.card.map(
10693
+ (card2, side) => floor2(
10694
+ typeof fg === "string" ? triple(fg) : surface2.text[side],
10695
+ backs?.[side] ?? card2
10696
+ )
10697
+ );
10698
+ return [both(fronts), backs ? both(backs) : null];
10699
+ }
10700
+ function paint(style, surface2) {
10701
+ let { fg, bg } = style;
10702
+ if (style.inverse && fg === null && bg === null) {
10703
+ return ["var(--swc-background-layer-1-color)", "var(--swc-neutral-content-color-default)"];
10704
+ }
10705
+ if (style.inverse) [fg, bg] = [bg, fg];
10706
+ if (style.dim && typeof fg === "number" && fg >= 8) fg -= 8;
10707
+ if (style.dim && fg === null && bg === null) {
10708
+ return ["var(--swc-neutral-subdued-content-color-default)", null];
10709
+ }
10710
+ const extendedColor = typeof bg === "string" || bg === null && typeof fg === "string";
10711
+ if (surface2 && extendedColor) return extendedPaint(fg, bg, surface2);
10712
+ if (bg === null) return [swatch(fg), null];
10713
+ if (typeof bg === "string") return [typeof fg === "string" ? fg : on(bg), bg];
10714
+ const tint2 = `var(--swc-${bg === 8 ? "gray-700" : tints[bg % 8]})`;
10715
+ return [bg % 8 === 0 ? "var(--swc-gray-25)" : null, tint2];
10716
+ }
10717
+ function inline2(style, surface2) {
10718
+ const [fg, bg] = paint(style, surface2);
10719
+ return [
10720
+ fg ? `color: ${fg}` : "",
10721
+ bg ? `background: ${bg}` : "",
10722
+ style.bold ? "font-weight: var(--swc-bold-font-weight)" : "",
10723
+ style.italic ? "font-style: italic" : "",
10724
+ style.underline ? "text-decoration: underline" : ""
10725
+ ].filter(Boolean).join("; ");
10726
+ }
10727
+ function ansi(text5, streaming = false, surface2) {
10728
+ return parseAnsi(text5, streaming).map((run) => {
10729
+ const style = inline2(run.style, surface2);
10730
+ return style ? b`<span style=${style}>${run.text}</span>` : run.text;
10731
+ });
10732
+ }
10733
+
10441
10734
  // src/app/command.ts
10442
10735
  var toShow = "Show the full command to allow it.";
10443
10736
  var toScroll = "Scroll to the end of the command to allow it.";
@@ -14273,229 +14566,6 @@ var o63 = class extends a10 {
14273
14566
  };
14274
14567
  e25("swc-icon-info-circle", o63);
14275
14568
 
14276
- // src/app/ansi.ts
14277
- var lightPalette = [
14278
- "gray-800",
14279
- "negative-color-900",
14280
- "positive-color-900",
14281
- "notice-color-1000",
14282
- "informative-color-900",
14283
- "purple-900",
14284
- "cyan-1000",
14285
- "gray-600",
14286
- "gray-700",
14287
- "negative-color-1000",
14288
- "positive-color-1000",
14289
- "notice-color-1100",
14290
- "informative-color-1000",
14291
- "purple-1000",
14292
- "cyan-1100",
14293
- "gray-800"
14294
- ];
14295
- var terminalPalette = r(
14296
- lightPalette.map((token2, n37) => `--slicc-terminal-color-${n37}: var(--swc-${token2});`).join("\n")
14297
- );
14298
- var tints = [
14299
- "gray-800",
14300
- "negative-subtle-background-color-default",
14301
- "positive-subtle-background-color-default",
14302
- "notice-subtle-background-color-default",
14303
- "informative-subtle-background-color-default",
14304
- "purple-subtle-background-color-default",
14305
- "cyan-subtle-background-color-default",
14306
- "gray-subtle-background-color-default"
14307
- ];
14308
- var plain = {
14309
- bold: false,
14310
- dim: false,
14311
- italic: false,
14312
- underline: false,
14313
- inverse: false,
14314
- fg: null,
14315
- bg: null
14316
- };
14317
- var levels = [0, 95, 135, 175, 215, 255];
14318
- function indexed(n37) {
14319
- if (!Number.isInteger(n37) || n37 < 0 || n37 > 255) return null;
14320
- if (n37 < 16) return n37;
14321
- if (n37 >= 232) {
14322
- const grey = 8 + (n37 - 232) * 10;
14323
- return `rgb(${grey}, ${grey}, ${grey})`;
14324
- }
14325
- const cube = n37 - 16;
14326
- const [r40, g7, b13] = [Math.floor(cube / 36), Math.floor(cube / 6) % 6, cube % 6].map(
14327
- (level) => levels[level]
14328
- );
14329
- return `rgb(${r40}, ${g7}, ${b13})`;
14330
- }
14331
- function channel(value) {
14332
- return Number.isInteger(value) && value >= 0 && value <= 255 ? value : null;
14333
- }
14334
- function extended(params, at) {
14335
- const mode2 = params[at + 1];
14336
- if (mode2 === 5) return { color: indexed(params[at + 2]), used: 2 };
14337
- if (mode2 === 2) {
14338
- const rgb = params.slice(at + 2, at + 5).map(channel);
14339
- const ok4 = rgb.length === 3 && rgb.every((value) => value !== null);
14340
- return { color: ok4 ? `rgb(${rgb.join(", ")})` : null, used: 4 };
14341
- }
14342
- return { color: null, used: 0 };
14343
- }
14344
- function numbers(text5) {
14345
- return text5.split(":").map((part2) => part2 === "" ? 0 : Number(part2));
14346
- }
14347
- var flags = {
14348
- 0: plain,
14349
- 1: { bold: true },
14350
- 2: { dim: true },
14351
- 3: { italic: true },
14352
- 4: { underline: true },
14353
- 7: { inverse: true },
14354
- 22: { bold: false, dim: false },
14355
- 23: { italic: false },
14356
- 24: { underline: false },
14357
- 27: { inverse: false },
14358
- 39: { fg: null },
14359
- 49: { bg: null }
14360
- };
14361
- var ranges = [
14362
- [30, "fg", 0],
14363
- [40, "bg", 0],
14364
- [90, "fg", 8],
14365
- [100, "bg", 8]
14366
- ];
14367
- function simple(code3) {
14368
- const flag = flags[code3];
14369
- if (flag) return flag;
14370
- const range3 = ranges.find(([start2]) => code3 >= start2 && code3 < start2 + 8);
14371
- return range3 ? { [range3[1]]: code3 - range3[0] + range3[2] } : null;
14372
- }
14373
- function wide(groups2, i26) {
14374
- const group = groups2[i26];
14375
- if (group.length === 1)
14376
- return extended(
14377
- groups2.slice(i26).map((entry) => entry[0]),
14378
- 0
14379
- );
14380
- const spaced = group[1] === 2 && group.length > 5;
14381
- return { color: extended(spaced ? [0, 2, ...group.slice(3)] : group, 0).color, used: 0 };
14382
- }
14383
- function sgr(style, body4) {
14384
- const next = { ...style };
14385
- const groups2 = body4 === "" ? [[0]] : body4.split(";").map(numbers);
14386
- for (let i26 = 0; i26 < groups2.length; i26++) {
14387
- const group = groups2[i26];
14388
- const code3 = group[0];
14389
- if (code3 === 38 || code3 === 48) {
14390
- const { color: color2, used } = wide(groups2, i26);
14391
- i26 += used;
14392
- if (color2 !== null) next[code3 === 38 ? "fg" : "bg"] = color2;
14393
- } else if (code3 === 4 && group.length > 1) next.underline = group[1] !== 0;
14394
- else Object.assign(next, simple(code3));
14395
- }
14396
- return next;
14397
- }
14398
- function terminated(text5, from, streaming) {
14399
- for (let i26 = from; i26 < text5.length; i26++) {
14400
- if (text5[i26] === "\x07") return i26 + 1;
14401
- if (text5[i26] === "\x1B" && text5[i26 + 1] === "\\") return i26 + 2;
14402
- }
14403
- if (streaming) return -1;
14404
- const line = text5.indexOf("\n", from);
14405
- return line === -1 ? text5.length : line;
14406
- }
14407
- function csi(text5, from) {
14408
- for (let i26 = from; i26 < text5.length; i26++) {
14409
- const code3 = text5.charCodeAt(i26);
14410
- if (code3 >= 64 && code3 <= 126) {
14411
- return { end: i26 + 1, body: text5.slice(from, i26), final: text5[i26] };
14412
- }
14413
- if (code3 < 32 || code3 > 63) return { end: i26, body: "", final: "" };
14414
- }
14415
- return null;
14416
- }
14417
- function escape(text5, at, style, streaming) {
14418
- const kind = text5[at + 1];
14419
- if (kind === void 0) return { end: -1, style };
14420
- if (kind === "[") {
14421
- const found = csi(text5, at + 2);
14422
- if (!found) return { end: -1, style };
14423
- const styled = found.final === "m" && /^[\d;:]*$/.test(found.body);
14424
- return { end: found.end, style: styled ? sgr(style, found.body) : style };
14425
- }
14426
- if ("]PX^_".includes(kind)) return { end: terminated(text5, at + 2, streaming), style };
14427
- let i26 = at + 1;
14428
- while (i26 < text5.length && text5.charCodeAt(i26) >= 32 && text5.charCodeAt(i26) <= 47) i26++;
14429
- if (i26 === text5.length) return { end: -1, style };
14430
- const final = text5.charCodeAt(i26);
14431
- return { end: final >= 48 && final <= 126 ? i26 + 1 : at + 1, style };
14432
- }
14433
- function parseAnsi(text5, streaming = false) {
14434
- const runs = [];
14435
- let style = plain;
14436
- let start2 = 0;
14437
- const push2 = (end) => {
14438
- if (end <= start2) return;
14439
- const last = runs.at(-1);
14440
- const piece = text5.slice(start2, end);
14441
- if (last?.style === style) last.text += piece;
14442
- else runs.push({ text: piece, style });
14443
- };
14444
- let i26 = text5.indexOf("\x1B");
14445
- while (i26 !== -1) {
14446
- push2(i26);
14447
- const found = escape(text5, i26, style, streaming);
14448
- if (found.end === -1) return runs;
14449
- style = found.style;
14450
- start2 = found.end;
14451
- i26 = text5.indexOf("\x1B", start2);
14452
- }
14453
- push2(text5.length);
14454
- return runs;
14455
- }
14456
- function swatch(color2) {
14457
- if (color2 === null) return null;
14458
- return typeof color2 === "number" ? `var(--slicc-terminal-color-${color2}, var(--swc-${lightPalette[color2]}))` : color2;
14459
- }
14460
- function on(rgb) {
14461
- const [r40, g7, b13] = rgb.match(/\d+/g).map((value) => {
14462
- const v13 = Number(value) / 255;
14463
- return v13 <= 0.03928 ? v13 / 12.92 : ((v13 + 0.055) / 1.055) ** 2.4;
14464
- });
14465
- return 0.2126 * r40 + 0.7152 * g7 + 0.0722 * b13 > 0.179 ? "var(--swc-black)" : "var(--swc-white)";
14466
- }
14467
- function paint(style) {
14468
- let { fg, bg } = style;
14469
- if (style.inverse && fg === null && bg === null) {
14470
- return ["var(--swc-background-layer-1-color)", "var(--swc-neutral-content-color-default)"];
14471
- }
14472
- if (style.inverse) [fg, bg] = [bg, fg];
14473
- if (style.dim && typeof fg === "number" && fg >= 8) fg -= 8;
14474
- if (style.dim && fg === null && bg === null) {
14475
- return ["var(--swc-neutral-subdued-content-color-default)", null];
14476
- }
14477
- if (bg === null) return [swatch(fg), null];
14478
- if (typeof bg === "string") return [typeof fg === "string" ? fg : on(bg), bg];
14479
- const tint = `var(--swc-${bg === 8 ? "gray-700" : tints[bg % 8]})`;
14480
- return [bg % 8 === 0 ? "var(--swc-gray-25)" : null, tint];
14481
- }
14482
- function inline2(style) {
14483
- const [fg, bg] = paint(style);
14484
- return [
14485
- fg ? `color: ${fg}` : "",
14486
- bg ? `background: ${bg}` : "",
14487
- style.bold ? "font-weight: var(--swc-bold-font-weight)" : "",
14488
- style.italic ? "font-style: italic" : "",
14489
- style.underline ? "text-decoration: underline" : ""
14490
- ].filter(Boolean).join("; ");
14491
- }
14492
- function ansi(text5, streaming = false) {
14493
- return parseAnsi(text5, streaming).map((run) => {
14494
- const style = inline2(run.style);
14495
- return style ? b`<span style=${style}>${run.text}</span>` : run.text;
14496
- });
14497
- }
14498
-
14499
14569
  // src/app/guard.ts
14500
14570
  var prefixes = [
14501
14571
  "sk-",
@@ -21909,7 +21979,7 @@ function step(call, context, id) {
21909
21979
  row,
21910
21980
  b`<div class="call run-detail" id=${`detail-${call.id}`} role="listitem" aria-label=${label} data-target=${call.id} ?hidden=${!open}>
21911
21981
  ${body(call, context.color)}
21912
- ${call.output ? b`<pre class="output">${ansi(call.output, call.status === "running")}</pre>` : A}
21982
+ ${call.output ? b`<pre class="output">${ansi(call.output, call.status === "running", context.surface)}</pre>` : A}
21913
21983
  ${call.notes?.length ? notes(call.notes) : A}
21914
21984
  ${call.image ? b`<img class="shot" src=${call.image} alt=${call.title} />` : A}
21915
21985
  ${call.meta ? b`<span class="tool-meta">${call.meta}</span>` : A}
@@ -26276,6 +26346,7 @@ var SliccChat = class _SliccChat extends ThemedElement {
26276
26346
  render() {
26277
26347
  this.#handlers.color = this.color;
26278
26348
  this.#handlers.model = this.model ?? null;
26349
+ this.#handlers.surface ??= readSurface(this.renderRoot);
26279
26350
  const agent = this.#agent();
26280
26351
  this.#switched(agent);
26281
26352
  const watch2 = watchOnly(this.model);
@@ -27891,9 +27962,9 @@ function sparkline(points, width = 120, height = 28) {
27891
27962
  (value, i26) => `${(i26 / (points.length - 1) * width).toFixed(1)},${(height - (value - min2) / span * (height - 2) - 1).toFixed(1)}`
27892
27963
  ).join(" ");
27893
27964
  }
27894
- function meterVariant2(ratio) {
27895
- if (ratio >= 0.9) return "negative";
27896
- if (ratio >= 0.6) return "notice";
27965
+ function meterVariant2(ratio2) {
27966
+ if (ratio2 >= 0.9) return "negative";
27967
+ if (ratio2 >= 0.6) return "notice";
27897
27968
  return "informative";
27898
27969
  }
27899
27970
  var surfaces = {
@@ -60233,9 +60304,9 @@ function transformerStyleToClass(options2 = {}) {
60233
60304
  return classToStyle;
60234
60305
  },
60235
60306
  getCSS() {
60236
- let css2 = "";
60237
- for (const [className, style] of classToStyle.entries()) css2 += `.${className}{${typeof style === "string" ? style : stringifyStyle(style)}}`;
60238
- return css2;
60307
+ let css3 = "";
60308
+ for (const [className, style] of classToStyle.entries()) css3 += `.${className}{${typeof style === "string" ? style : stringifyStyle(style)}}`;
60309
+ return css3;
60239
60310
  },
60240
60311
  clearRegistry() {
60241
60312
  classToStyle.clear();
@@ -95863,7 +95934,7 @@ var FileTree = class {
95863
95934
  };
95864
95935
 
95865
95936
  // src/components/file-tree.ts
95866
- var css = `
95937
+ var css2 = `
95867
95938
  :host {
95868
95939
  display: block;
95869
95940
  height: 100%;
@@ -96174,7 +96245,7 @@ ${view.focused}`;
96174
96245
  connectedCallback() {
96175
96246
  const root2 = this.shadowRoot ?? this.attachShadow({ mode: "open", delegatesFocus: true });
96176
96247
  if (!this.#mount) {
96177
- adoptStyles(root2, css);
96248
+ adoptStyles(root2, css2);
96178
96249
  this.#mount = document.createElement("div");
96179
96250
  this.#mount.className = "mount";
96180
96251
  root2.append(this.#mount);