@ai-ecoverse/slicc-spectrum 1.49.0 → 1.49.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
@@ -10868,8 +10868,10 @@ var automation = {
10868
10868
  function automationOf(browser) {
10869
10869
  return browser.via ?? "none";
10870
10870
  }
10871
- function browserLine(browser, links) {
10871
+ function browserLine(browser, links, route) {
10872
10872
  const via = automationOf(browser);
10873
+ if (via === "none" && route === "proxy")
10874
+ return "Browser automation: slicc-node has no browser attached.";
10873
10875
  if (via !== "link") return automation[via];
10874
10876
  const connected = (links?.devices ?? []).filter((device) => device.state === "connected");
10875
10877
  const found = connected.flatMap(
@@ -10924,8 +10926,9 @@ function remoteLight(status2) {
10924
10926
  return [`${devices.length} linked devices are ${verb} the agent.`];
10925
10927
  };
10926
10928
  const tooltip = [...say(prompting, "sending prompts to"), ...say(watching, "watching")].join(" ");
10927
- if (prompting.length) return { mode: "prompt", text: "Remote control", tooltip };
10928
- return { mode: "watch", text: "Watched remotely", tooltip };
10929
+ const by = (devices) => devices.length === 1 ? devices[0].name : `${devices.length} linked devices`;
10930
+ if (prompting.length) return { mode: "prompt", text: `Controlled by ${by(prompting)}`, tooltip };
10931
+ return { mode: "watch", text: `Watched by ${by(watching)}`, tooltip };
10929
10932
  }
10930
10933
  function linksSummary(links) {
10931
10934
  if (links.permission) return "permission";
@@ -11577,7 +11580,7 @@ var SliccNetwork = class extends ModelElement {
11577
11580
  <p data-route=${routeOf(status2) ?? "none"}>${routeLine(status2)}</p>
11578
11581
  ${status2.detail ? b`<p class="detail">${status2.detail}</p>` : A}
11579
11582
  ${this.#exitPicker(port, status2)}
11580
- ${status2.browser ? b`<p data-browser=${automationOf(status2.browser)}>${browserLine(status2.browser, status2.links)}${status2.browser.detail ? b` <span class="detail">${status2.browser.detail}</span>` : A}</p>` : A}
11583
+ ${status2.browser ? b`<p data-browser=${automationOf(status2.browser)}>${browserLine(status2.browser, status2.links, status2.route)}${status2.browser.detail ? b` <span class="detail">${status2.browser.detail}</span>` : A}</p>` : A}
11581
11584
  ${port.check ? b`<div class="actions"><swc-button size="m" variant="secondary" data-action="check" ?pending=${this.checking} @click=${() => this.check()}>Check again</swc-button></div>` : A}
11582
11585
  ${this.error ? b`<div class="error" role="alert"><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle><span>${this.error}</span></div>` : A}
11583
11586
  </section>`;
@@ -19639,16 +19642,13 @@ function requiresText(item2, all2) {
19639
19642
  const found = all2.find((other) => other.id === id);
19640
19643
  return { label: found?.label ?? id, missing: found?.version === null };
19641
19644
  });
19642
- if (!needs.length) return null;
19643
- if (item2.version === null) {
19644
- const present = needs.filter((need) => !need.missing).map((need) => need.label);
19645
- const missing = needs.filter((need) => need.missing).map((need) => need.label);
19646
- return [
19647
- present.length ? `Needs ${list2(present)}` : "",
19648
- missing.length ? `Installs ${list2(missing)} too` : ""
19649
- ].filter(Boolean).join("; ");
19650
- }
19651
- return `Needs ${list2(needs.map((need) => need.missing ? `${need.label} (not installed)` : need.label))}`;
19645
+ const present = needs.filter((need) => !need.missing).map((need) => need.label);
19646
+ const missing = needs.filter((need) => need.missing).map((need) => need.label);
19647
+ const parts2 = [
19648
+ present.length ? `Uses ${list2(present)}` : "",
19649
+ item2.version === null && missing.length ? `Installs ${list2(missing)} too` : ""
19650
+ ].filter(Boolean);
19651
+ return parts2.length ? parts2.join("; ") : null;
19652
19652
  }
19653
19653
  var snapshot = (items) => new Map(items.map(({ id, state: state2, error }) => [id, { state: state2, error }]));
19654
19654
  function settled(failures, before, after) {
@@ -19885,6 +19885,20 @@ var SliccUpdates = class extends ModelElement {
19885
19885
  line-height: var(--swc-line-height-200);
19886
19886
  overflow-wrap: anywhere;
19887
19887
  }
19888
+ .warnings {
19889
+ display: flex;
19890
+ flex-direction: column;
19891
+ gap: var(--swc-spacing-75);
19892
+ font-size: var(--swc-font-size-75);
19893
+ line-height: var(--swc-line-height-200);
19894
+ overflow-wrap: anywhere;
19895
+ --swc-icon-color: var(--swc-notice-visual-color);
19896
+ }
19897
+ .warnings span {
19898
+ display: flex;
19899
+ align-items: flex-start;
19900
+ gap: var(--swc-spacing-75);
19901
+ }
19888
19902
  .commands {
19889
19903
  display: flex;
19890
19904
  flex-wrap: wrap;
@@ -20121,6 +20135,9 @@ var SliccUpdates = class extends ModelElement {
20121
20135
  <p class="description">${item2.description}</p>
20122
20136
  ${this.#packageMeta(item2, all2)}
20123
20137
  ${item2.notes?.length ? b`<p class="notes" data-notes>${item2.notes.map((note) => b`<span>${note}</span>`)}</p>` : A}
20138
+ ${item2.warnings?.length ? b`<p class="warnings" data-warnings>${item2.warnings.map(
20139
+ (warning) => b`<span><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle>${warning}</span>`
20140
+ )}</p>` : A}
20124
20141
  ${item2.commands.length ? b`<p class="commands"><span class="hidden">Commands: </span>${item2.commands.map(
20125
20142
  (command2) => b`<code>${command2}</code>`
20126
20143
  )}</p>` : A}
@@ -20877,7 +20894,7 @@ var SliccApp = class extends ThemedElement {
20877
20894
  if (!port || !this.#offers("network")) return A;
20878
20895
  const light = remoteLight(port.status());
20879
20896
  if (!light) return A;
20880
- return b`<swc-action-button id="remote" quiet size="s" data-remote=${light.mode} accessible-label=${`${light.text}. ${light.tooltip}`} @click=${() => this.show("network")}>
20897
+ return b`<swc-action-button id="remote" quiet size="s" data-remote=${light.mode} accessible-label=${light.tooltip} @click=${() => this.show("network")}>
20881
20898
  <swc-status-light size="s" variant="info">${this.screen === "phone" ? A : light.text}</swc-status-light>
20882
20899
  </swc-action-button>
20883
20900
  <swc-tooltip for="remote" placement="bottom">${light.tooltip}</swc-tooltip>`;