@ai-ecoverse/slicc-spectrum 1.47.0 → 1.47.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/README.md +1 -1
- package/dist/slicc-dummy.js +5 -1
- package/dist/slicc-dummy.js.map +2 -2
- package/dist/slicc-ui.js +16 -6
- package/dist/slicc-ui.js.map +3 -3
- package/dist/types/app/network.d.ts +2 -1
- package/package.json +3 -3
package/dist/slicc-ui.js
CHANGED
|
@@ -10924,9 +10924,20 @@ function unlinkBody(device, isExit) {
|
|
|
10924
10924
|
var wholeWeb = /* @__PURE__ */ new Set([
|
|
10925
10925
|
"proxy",
|
|
10926
10926
|
"extension",
|
|
10927
|
-
"tailnet"
|
|
10927
|
+
"tailnet",
|
|
10928
|
+
"link"
|
|
10928
10929
|
]);
|
|
10930
|
+
function routeOf(status2) {
|
|
10931
|
+
return status2.exit?.kind === "link" ? "link" : status2.route;
|
|
10932
|
+
}
|
|
10933
|
+
function linkLine(status2, id) {
|
|
10934
|
+
const device = status2.links?.devices.find((item2) => item2.id === id);
|
|
10935
|
+
if (!device) return "Waiting for a linked device that isn\u2019t connected.";
|
|
10936
|
+
if (device.state !== "connected") return `Waiting for the linked device ${device.name}.`;
|
|
10937
|
+
return device.policy ? `Through the linked device ${device.name}, which reaches ${device.policy}.` : `Through the linked device ${device.name}.`;
|
|
10938
|
+
}
|
|
10929
10939
|
function routeLine(status2) {
|
|
10940
|
+
if (status2.exit?.kind === "link") return linkLine(status2, status2.exit.id);
|
|
10930
10941
|
const node = status2.route === "tailnet" ? status2.tailnet?.exitNode : null;
|
|
10931
10942
|
return node ? `Through the Tailscale exit node ${node}, which reaches every site.` : routes[status2.route ?? "none"];
|
|
10932
10943
|
}
|
|
@@ -11342,13 +11353,12 @@ var SliccNetwork = class extends ModelElement {
|
|
|
11342
11353
|
const exit = status2.exit;
|
|
11343
11354
|
if (!exit) return A;
|
|
11344
11355
|
if (exit.kind === "tailnet") {
|
|
11356
|
+
if (status2.route === "tailnet") return A;
|
|
11345
11357
|
const name = status2.tailnet?.exitNodes?.find((node) => node.id === exit.node)?.name;
|
|
11346
11358
|
return b`<p data-exit="node">${name ? `Internet through the Tailscale exit node ${name}.` : "Internet through an automatic Tailscale exit node."}</p>`;
|
|
11347
11359
|
}
|
|
11348
11360
|
const device = status2.links?.devices.find((item2) => item2.id === exit.id);
|
|
11349
|
-
if (device?.state === "connected")
|
|
11350
|
-
return b`<p data-exit="device">Internet through the linked device ${device.name}.</p>`;
|
|
11351
|
-
}
|
|
11361
|
+
if (device?.state === "connected") return A;
|
|
11352
11362
|
const who = device ? `${device.name} is ${device.state}` : "The linked device isn\u2019t connected";
|
|
11353
11363
|
return b`<div class="warning" data-exit="device" data-held><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle><span>${who}. Internet traffic waits until it’s connected.</span></div>`;
|
|
11354
11364
|
}
|
|
@@ -11489,7 +11499,7 @@ var SliccNetwork = class extends ModelElement {
|
|
|
11489
11499
|
<h2 id="state">Connection</h2>
|
|
11490
11500
|
<swc-status-light variant=${variant} data-health=${status2.health}>${label}</swc-status-light>
|
|
11491
11501
|
</div>
|
|
11492
|
-
<p data-route=${status2
|
|
11502
|
+
<p data-route=${routeOf(status2) ?? "none"}>${routeLine(status2)}</p>
|
|
11493
11503
|
${status2.detail ? b`<p class="detail">${status2.detail}</p>` : A}
|
|
11494
11504
|
${this.#exitPicker(port, status2)}
|
|
11495
11505
|
${status2.browser ? b`<p data-browser=${automationOf(status2.browser)}>${automation[automationOf(status2.browser)]}${status2.browser.detail ? b` <span class="detail">${status2.browser.detail}</span>` : A}</p>` : A}
|
|
@@ -11507,7 +11517,7 @@ var SliccNetwork = class extends ModelElement {
|
|
|
11507
11517
|
});
|
|
11508
11518
|
}
|
|
11509
11519
|
#whole(status2) {
|
|
11510
|
-
if (wholeWeb.has(status2
|
|
11520
|
+
if (wholeWeb.has(routeOf(status2))) {
|
|
11511
11521
|
return b`<details><summary>Other ways to reach the whole web</summary><div>${this.#ways(status2)}</div></details>`;
|
|
11512
11522
|
}
|
|
11513
11523
|
return b`<section aria-labelledby="whole">
|