@ai-ecoverse/slicc-spectrum 1.103.0 → 1.103.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 +3 -1
- package/dist/slicc-ui.js +134 -87
- package/dist/slicc-ui.js.map +3 -3
- package/dist/types/app/composer.d.ts +1 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -199,6 +199,7 @@ Every surface has a home side, left, center or right.
|
|
|
199
199
|
Every panel has an icon in the left or right rail (on a phone, in one bar at the bottom, with the rest in its More menu).
|
|
200
200
|
The icon stays when its panel is open; while the panel is visible it shows selected (`.selected`, `data-visible`, labelled "{Title}, shown").
|
|
201
201
|
One click puts a closed panel back on its side, next to its neighbours, or brings an open one to the front.
|
|
202
|
+
A touch or pen tap on a rail button closes its tooltip: a Gen2 `swc-tooltip` ignores focus that comes in the same task as `pointerdown`, but a tap focuses the button a task later, so the tooltip opened and stayed while the button kept focus (after a tap on Chat, which leaves focus where it is).
|
|
202
203
|
Each thread, a cone's or a scoop's conversation, opens in its own chat panel (`chat:<agent id>`), as a tab in the same group as the other chats.
|
|
203
204
|
Selecting a thread opens or reveals its tab, activating a chat tab selects its thread, and a thread's chat closes when the thread goes away (frozen or deleted).
|
|
204
205
|
|
|
@@ -351,7 +352,7 @@ The field's status icon, which is decorative, follows the input: the AI logo whe
|
|
|
351
352
|
Drafts are kept per agent.
|
|
352
353
|
On a follower while the link reconnects, the field is disabled and says so; the draft stays.
|
|
353
354
|
While the agent port's `starting()` returns a line (no agent yet, but one is on its way), the composer stays usable: its placeholder is that line, there are no `/` or `@` popups, and sending, attachments included, adds a row above the field that reads "Sent when the agent starts" (`li.queued[data-mode="starting"]`), which can be dropped (`data-action="unqueue"`); a row with text and files says how many files go with it (`[data-files]`).
|
|
354
|
-
Whenever the model changes or its agent port fires `starting` or `agents`, and the current model's port has no line (`null`, or no `starting` at all) and `agent.list()` has an agent, the
|
|
355
|
+
Whenever the model changes or its agent port fires `starting` or `agents`, and the current model's port has no line (`null`, or no `starting` at all) and `agent.list()` has an agent, the page sends the rows in order to that model's active agent (else the first one) through `agent.send`, the first like a normal send and the rest with `mode: 'queue'`, and the rows go; if the line clears with no agent, the rows stay until one comes. Inside `<slicc-app>`, the app sends them for its current `model`, once, whether or not a composer is connected, so they also go while the chat is hidden (dockview detaches hidden panels, such as when Install / Update opens in the chat's group); a composer outside `<slicc-app>` sends them for its document, once however many are connected.
|
|
355
356
|
A line that comes back closes an open `/` or `@` popup.
|
|
356
357
|
The rows are kept for the page (for the `<slicc-app>` the composer is in, else for the document), not for the model, so a model swap (an embedder that puts a new `SliccModel` on `<slicc-app>` once the agent is there), a layout switch and a dock rebuild keep them.
|
|
357
358
|
They're also kept in `sessionStorage` (`slicc-spectrum.starting`, so per origin and per tab) until they're sent or dropped: each row's text and `mode`, and only the name, type and size of its attachments, never their contents; each page (each `<slicc-app>`, or the document) rewrites only its own rows there.
|
|
@@ -628,6 +629,7 @@ Files and diffs open in one editor group next to the chat.
|
|
|
628
629
|
Panels ask for them with `open-file` and `open-diff` events (`{ path }`), which `<slicc-app>` handles, or call `app.open('file' | 'diff', path)`.
|
|
629
630
|
|
|
630
631
|
Keys: <kbd>Alt</kbd>+<kbd>1</kbd>… opens and focuses a panel, <kbd>F6</kbd> and <kbd>Shift</kbd>+<kbd>F6</kbd> move between groups, <kbd>Ctrl</kbd>+<kbd>]</kbd> and <kbd>Ctrl</kbd>+<kbd>[</kbd> between tabs, <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd> switches the theme.
|
|
632
|
+
Focusing a chat panel this way, or with `show('chat')`, right after a touch or pen tap leaves focus where it is, so no on-screen keyboard opens and the empty log shows no ring; after a key or a mouse click it focuses the composer (its log without one) with a fine pointer, and the log with a coarse one.
|
|
631
633
|
In terminal and browser tab strips, <kbd>←</kbd> and <kbd>→</kbd> switch tabs.
|
|
632
634
|
In the agents and changes lists, arrows, <kbd>Home</kbd>, <kbd>End</kbd> and <kbd>Enter</kbd>; in the file tree, its own arrow keys and <kbd>Enter</kbd> to open.
|
|
633
635
|
In the composer, <kbd>Enter</kbd> sends, <kbd>Shift</kbd>+<kbd>Enter</kbd> adds a line and <kbd>Esc</kbd> stops a reply.
|
package/dist/slicc-ui.js
CHANGED
|
@@ -23560,6 +23560,80 @@ function owner(node2) {
|
|
|
23560
23560
|
}
|
|
23561
23561
|
return node2.ownerDocument;
|
|
23562
23562
|
}
|
|
23563
|
+
function pageOf(key2) {
|
|
23564
|
+
const known = pages.get(key2);
|
|
23565
|
+
if (known) return known;
|
|
23566
|
+
const owned = /* @__PURE__ */ new Set();
|
|
23567
|
+
const found = {
|
|
23568
|
+
rows: restore(owned),
|
|
23569
|
+
owned,
|
|
23570
|
+
draft: null,
|
|
23571
|
+
hosts: /* @__PURE__ */ new Set(),
|
|
23572
|
+
watched: /* @__PURE__ */ new Map()
|
|
23573
|
+
};
|
|
23574
|
+
pages.set(key2, found);
|
|
23575
|
+
return found;
|
|
23576
|
+
}
|
|
23577
|
+
function settle(page, rows2) {
|
|
23578
|
+
page.rows = rows2;
|
|
23579
|
+
keep(page.owned, rows2);
|
|
23580
|
+
for (const host4 of [...page.hosts]) host4.requestUpdate();
|
|
23581
|
+
}
|
|
23582
|
+
function post(model, id, message) {
|
|
23583
|
+
const attachments = message.attachments ?? [];
|
|
23584
|
+
const done2 = () => retire(model.agent, id, attachments);
|
|
23585
|
+
model.agent.send(id, { ...message, attachments }).then(done2, done2);
|
|
23586
|
+
}
|
|
23587
|
+
function deliver(model, id, message, mode2) {
|
|
23588
|
+
const busy = model.agent.busy(id);
|
|
23589
|
+
const resolved = mode2 === "queue" ? busy ? "queue" : "send" : busy || mode2 === "steer" ? "steer" : "send";
|
|
23590
|
+
post(model, id, { text: message.text, attachments: message.attachments, mode: resolved });
|
|
23591
|
+
}
|
|
23592
|
+
function arrived(page, model) {
|
|
23593
|
+
const waiting3 = page.rows;
|
|
23594
|
+
const agents = model.agent.list();
|
|
23595
|
+
if (!(waiting3.length && agents.length) || model.agent.starting?.()) return;
|
|
23596
|
+
const active = model.agent.active();
|
|
23597
|
+
const id = agents.some((agent) => agent.id === active) ? active : agents[0].id;
|
|
23598
|
+
const sendable = (row) => !!(row.text || row.attachments.length) && !row.lost?.length;
|
|
23599
|
+
const [first2, ...rest] = waiting3.filter(sendable);
|
|
23600
|
+
if (!first2) return;
|
|
23601
|
+
const held2 = waiting3.filter((row) => !sendable(row));
|
|
23602
|
+
settle(page, held2);
|
|
23603
|
+
deliver(model, id, first2, "queue");
|
|
23604
|
+
for (const { text: text5, attachments } of rest) post(model, id, { text: text5, attachments, mode: "queue" });
|
|
23605
|
+
}
|
|
23606
|
+
function watch(page, model) {
|
|
23607
|
+
const arrive = () => arrived(page, model);
|
|
23608
|
+
let live = true;
|
|
23609
|
+
queueMicrotask(() => {
|
|
23610
|
+
if (live) arrive();
|
|
23611
|
+
});
|
|
23612
|
+
const known = page.watched.get(model);
|
|
23613
|
+
if (known) known.count++;
|
|
23614
|
+
else {
|
|
23615
|
+
const offs = [
|
|
23616
|
+
model.agent.on("agents", arrive),
|
|
23617
|
+
...model.agent.starting ? [model.agent.on("starting", arrive)] : []
|
|
23618
|
+
];
|
|
23619
|
+
page.watched.set(model, {
|
|
23620
|
+
count: 1,
|
|
23621
|
+
off: () => {
|
|
23622
|
+
for (const off of offs) off();
|
|
23623
|
+
}
|
|
23624
|
+
});
|
|
23625
|
+
}
|
|
23626
|
+
return () => {
|
|
23627
|
+
live = false;
|
|
23628
|
+
const entry = page.watched.get(model);
|
|
23629
|
+
if (--entry.count) return;
|
|
23630
|
+
entry.off();
|
|
23631
|
+
page.watched.delete(model);
|
|
23632
|
+
};
|
|
23633
|
+
}
|
|
23634
|
+
function flushStarting(node2, model) {
|
|
23635
|
+
return watch(pageOf(owner(node2)), model);
|
|
23636
|
+
}
|
|
23563
23637
|
var PageQueue = class {
|
|
23564
23638
|
#host;
|
|
23565
23639
|
#owner = null;
|
|
@@ -23569,22 +23643,13 @@ var PageQueue = class {
|
|
|
23569
23643
|
}
|
|
23570
23644
|
#page() {
|
|
23571
23645
|
this.#owner ??= this.#host.isConnected ? owner(this.#host) : null;
|
|
23572
|
-
|
|
23573
|
-
const known = pages.get(page);
|
|
23574
|
-
if (known) return known;
|
|
23575
|
-
const owned = /* @__PURE__ */ new Set();
|
|
23576
|
-
const found = { rows: restore(owned), owned, draft: null, hosts: /* @__PURE__ */ new Set() };
|
|
23577
|
-
pages.set(page, found);
|
|
23578
|
-
return found;
|
|
23646
|
+
return pageOf(this.#owner ?? this.#host.ownerDocument);
|
|
23579
23647
|
}
|
|
23580
23648
|
get value() {
|
|
23581
23649
|
return this.#page().rows;
|
|
23582
23650
|
}
|
|
23583
23651
|
set value(rows2) {
|
|
23584
|
-
|
|
23585
|
-
page.rows = rows2;
|
|
23586
|
-
keep(page.owned, rows2);
|
|
23587
|
-
for (const host4 of [...page.hosts]) host4.requestUpdate();
|
|
23652
|
+
settle(this.#page(), rows2);
|
|
23588
23653
|
}
|
|
23589
23654
|
get draft() {
|
|
23590
23655
|
return this.#page().draft;
|
|
@@ -23592,6 +23657,9 @@ var PageQueue = class {
|
|
|
23592
23657
|
set draft(draft2) {
|
|
23593
23658
|
this.#page().draft = draft2;
|
|
23594
23659
|
}
|
|
23660
|
+
watch(model) {
|
|
23661
|
+
return this.#owner === this.#host.ownerDocument ? [watch(this.#page(), model)] : [];
|
|
23662
|
+
}
|
|
23595
23663
|
hostConnected() {
|
|
23596
23664
|
this.#owner = owner(this.#host);
|
|
23597
23665
|
this.#page().hosts.add(this.#host);
|
|
@@ -24152,9 +24220,9 @@ var SliccComposer = class extends ThemedElement {
|
|
|
24152
24220
|
this.#paths = entries.filter((entry) => entry.kind === "file").map((entry) => entry.path);
|
|
24153
24221
|
});
|
|
24154
24222
|
const update = () => this.requestUpdate();
|
|
24155
|
-
queueMicrotask(() => this.#arrived());
|
|
24156
24223
|
return [
|
|
24157
24224
|
...super.subscribe(model),
|
|
24225
|
+
...this.#waiting.watch(model),
|
|
24158
24226
|
model.agent.on("active", (id) => {
|
|
24159
24227
|
if (!this.agent) this.#switch(id);
|
|
24160
24228
|
}),
|
|
@@ -24162,15 +24230,11 @@ var SliccComposer = class extends ThemedElement {
|
|
|
24162
24230
|
if (hold2?.reason !== "locked") this.blocked = false;
|
|
24163
24231
|
update();
|
|
24164
24232
|
}),
|
|
24165
|
-
model.agent.on("agents",
|
|
24166
|
-
this.#arrived();
|
|
24167
|
-
update();
|
|
24168
|
-
}),
|
|
24233
|
+
model.agent.on("agents", update),
|
|
24169
24234
|
...model.agent.starting ? [
|
|
24170
24235
|
model.agent.on("starting", () => {
|
|
24171
24236
|
if (this.#starting() && this.popup?.kind !== "file" && this.popup?.kind !== "secret")
|
|
24172
24237
|
this.popup = null;
|
|
24173
|
-
this.#arrived();
|
|
24174
24238
|
update();
|
|
24175
24239
|
})
|
|
24176
24240
|
] : [],
|
|
@@ -24187,21 +24251,6 @@ var SliccComposer = class extends ThemedElement {
|
|
|
24187
24251
|
#starting() {
|
|
24188
24252
|
return this.model?.agent.starting?.() ?? null;
|
|
24189
24253
|
}
|
|
24190
|
-
#arrived() {
|
|
24191
|
-
const model = this.model;
|
|
24192
|
-
const waiting3 = this.#waiting.value;
|
|
24193
|
-
const agents = model?.agent.list() ?? [];
|
|
24194
|
-
if (!(model && waiting3.length && agents.length) || this.#starting()) return;
|
|
24195
|
-
const active = model.agent.active();
|
|
24196
|
-
const id = agents.some((agent) => agent.id === active) ? active : agents[0].id;
|
|
24197
|
-
const sendable = (row) => !!(row.text || row.attachments.length) && !row.lost?.length;
|
|
24198
|
-
const [first2, ...rest] = waiting3.filter(sendable);
|
|
24199
|
-
if (!first2) return;
|
|
24200
|
-
this.#waiting.value = waiting3.filter((row) => !sendable(row));
|
|
24201
|
-
this.#deliver(model, id, first2, "queue");
|
|
24202
|
-
for (const { text: text5, attachments } of rest)
|
|
24203
|
-
this.#post(model, id, { text: text5, attachments, mode: "queue" });
|
|
24204
|
-
}
|
|
24205
24254
|
#putBack(row) {
|
|
24206
24255
|
this.value = this.value.trim() ? `${this.value}
|
|
24207
24256
|
${row.text}` : row.text;
|
|
@@ -24282,17 +24331,7 @@ ${row.text}` : row.text;
|
|
|
24282
24331
|
known.run(model, this.#agent, (command3[2] ?? "").trim());
|
|
24283
24332
|
return;
|
|
24284
24333
|
}
|
|
24285
|
-
|
|
24286
|
-
}
|
|
24287
|
-
#deliver(model, id, message, mode2) {
|
|
24288
|
-
const busy = model.agent.busy(id);
|
|
24289
|
-
const resolved = mode2 === "queue" ? busy ? "queue" : "send" : busy || mode2 === "steer" ? "steer" : "send";
|
|
24290
|
-
this.#post(model, id, { text: message.text, attachments: message.attachments, mode: resolved });
|
|
24291
|
-
}
|
|
24292
|
-
#post(model, id, message) {
|
|
24293
|
-
const attachments = message.attachments ?? [];
|
|
24294
|
-
const done2 = () => retire(model.agent, id, attachments);
|
|
24295
|
-
model.agent.send(id, { ...message, attachments }).then(done2, done2);
|
|
24334
|
+
deliver(model, this.#agent, { text: text5, attachments }, mode2);
|
|
24296
24335
|
}
|
|
24297
24336
|
#propose(model, text5) {
|
|
24298
24337
|
this.value = "";
|
|
@@ -25018,12 +25057,12 @@ function settleModels(model) {
|
|
|
25018
25057
|
if (settling.has(model) || !controls(model)) return;
|
|
25019
25058
|
settling.add(model);
|
|
25020
25059
|
try {
|
|
25021
|
-
|
|
25060
|
+
settle2(model);
|
|
25022
25061
|
} finally {
|
|
25023
25062
|
settling.delete(model);
|
|
25024
25063
|
}
|
|
25025
25064
|
}
|
|
25026
|
-
function
|
|
25065
|
+
function settle2(model) {
|
|
25027
25066
|
const offered = chatModels(model.settings.models());
|
|
25028
25067
|
const pick = fallbackModel(offered);
|
|
25029
25068
|
if (!pick) return;
|
|
@@ -25346,8 +25385,8 @@ function dock(entries, messages, seat) {
|
|
|
25346
25385
|
return { items, asks };
|
|
25347
25386
|
}
|
|
25348
25387
|
var failed = (message) => message.role === "assistant" ? message.status === "error" : message.role === "system" && message.kind === "error";
|
|
25349
|
-
function empty3(
|
|
25350
|
-
if (
|
|
25388
|
+
function empty3(watch2, seat, name) {
|
|
25389
|
+
if (watch2) return "No messages yet.";
|
|
25351
25390
|
return seat ? `No messages yet. Say hello to ${name}.` : `No messages yet. Ask ${name} something.`;
|
|
25352
25391
|
}
|
|
25353
25392
|
function carriesFiles(event2) {
|
|
@@ -25747,7 +25786,7 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
25747
25786
|
}
|
|
25748
25787
|
};
|
|
25749
25788
|
subscribe(model) {
|
|
25750
|
-
const
|
|
25789
|
+
const settle3 = () => {
|
|
25751
25790
|
settleModels(model);
|
|
25752
25791
|
this.requestUpdate();
|
|
25753
25792
|
};
|
|
@@ -25762,14 +25801,14 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
25762
25801
|
return [
|
|
25763
25802
|
...super.subscribe(model),
|
|
25764
25803
|
() => width.disconnect(),
|
|
25765
|
-
model.settings.on("settings",
|
|
25766
|
-
model.settings.on("accounts",
|
|
25804
|
+
model.settings.on("settings", settle3),
|
|
25805
|
+
model.settings.on("accounts", settle3),
|
|
25767
25806
|
model.agent.on("active", () => {
|
|
25768
25807
|
if (!this.agent) this.#refresh(true);
|
|
25769
25808
|
}),
|
|
25770
|
-
model.agent.on("agents",
|
|
25809
|
+
model.agent.on("agents", settle3),
|
|
25771
25810
|
...model.tabs ? [model.tabs.on("tabs", () => this.requestUpdate())] : [],
|
|
25772
|
-
...onWatch(model,
|
|
25811
|
+
...onWatch(model, settle3),
|
|
25773
25812
|
...model.agent.starting ? [model.agent.on("starting", () => this.requestUpdate())] : [],
|
|
25774
25813
|
model.agent.on("messages", (agentId) => {
|
|
25775
25814
|
if (agentId === this.#id()) this.#refresh(this.#sent(agentId));
|
|
@@ -25971,8 +26010,8 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
25971
26010
|
this.#observe();
|
|
25972
26011
|
}
|
|
25973
26012
|
focus() {
|
|
25974
|
-
if (
|
|
25975
|
-
|
|
26013
|
+
if (touched) return;
|
|
26014
|
+
if (globalThis.matchMedia("(pointer: fine)").matches) this.focusOn("slicc-composer", ".log");
|
|
25976
26015
|
else this.focusOn(".log");
|
|
25977
26016
|
}
|
|
25978
26017
|
#id() {
|
|
@@ -26239,9 +26278,9 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
26239
26278
|
this.#handlers.model = this.model ?? null;
|
|
26240
26279
|
const agent = this.#agent();
|
|
26241
26280
|
this.#switched(agent);
|
|
26242
|
-
const
|
|
26281
|
+
const watch2 = watchOnly(this.model);
|
|
26243
26282
|
const seat = this.model?.seat;
|
|
26244
|
-
this.#handlers.readOnly = !!agent?.frozen || !!
|
|
26283
|
+
this.#handlers.readOnly = !!agent?.frozen || !!watch2 || !!seat;
|
|
26245
26284
|
this.#handlers.agentId = agent?.id;
|
|
26246
26285
|
this.#handlers.seat = seat?.label;
|
|
26247
26286
|
const messages = agent ? this.model?.agent.messages(agent.id) ?? [] : [];
|
|
@@ -26274,7 +26313,7 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
26274
26313
|
items,
|
|
26275
26314
|
([key2]) => key2,
|
|
26276
26315
|
([, item2]) => item2
|
|
26277
|
-
)}</swc-conversation-thread>` : this.model?.tabs?.state().role === "connecting" ? b`<div class="empty" data-connecting>${connecting}</div>` : this.model?.agent.starting?.() ? A : b`<div class="empty" data-empty>${empty3(
|
|
26316
|
+
)}</swc-conversation-thread>` : this.model?.tabs?.state().role === "connecting" ? b`<div class="empty" data-connecting>${connecting}</div>` : this.model?.agent.starting?.() ? A : b`<div class="empty" data-empty>${empty3(watch2, seat, agent?.name ?? "the agent")}</div>`}
|
|
26278
26317
|
</div>
|
|
26279
26318
|
</div>
|
|
26280
26319
|
${this.behind ? this.#latest(count2 - this.#mark) : A}
|
|
@@ -26287,7 +26326,7 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
26287
26326
|
</swc-illustrated-message>
|
|
26288
26327
|
</swc-dropzone>` : A}
|
|
26289
26328
|
<p class="sr" role="status" data-announce="drop">${this.dropping ? "Drop to attach files to your message" : ""}</p>
|
|
26290
|
-
${
|
|
26329
|
+
${watch2 ? watch2 === following(this.model)?.refused ? A : b`<p class="watch-only" role="note" data-follow="watch">${watch2}</p>` : this.model && !agent?.frozen ? b`<slicc-composer .model=${this.model} .agent=${this.agent}></slicc-composer>` : A}
|
|
26291
26330
|
`;
|
|
26292
26331
|
}
|
|
26293
26332
|
};
|
|
@@ -31041,10 +31080,10 @@ var SliccNetwork = class extends ModelElement {
|
|
|
31041
31080
|
const scroll = () => this.renderRoot.querySelector("[data-pairing]")?.scrollIntoView({ block: "nearest" });
|
|
31042
31081
|
scroll();
|
|
31043
31082
|
this.#settle?.disconnect();
|
|
31044
|
-
const
|
|
31045
|
-
|
|
31046
|
-
this.#settle =
|
|
31047
|
-
setTimeout(() =>
|
|
31083
|
+
const settle3 = new ResizeObserver(scroll);
|
|
31084
|
+
settle3.observe(this.renderRoot.querySelector(".page"));
|
|
31085
|
+
this.#settle = settle3;
|
|
31086
|
+
setTimeout(() => settle3.disconnect(), 1e3);
|
|
31048
31087
|
});
|
|
31049
31088
|
}
|
|
31050
31089
|
willUpdate(changed2) {
|
|
@@ -32784,9 +32823,9 @@ var SliccTerminalPanel = class extends ThemedElement {
|
|
|
32784
32823
|
}
|
|
32785
32824
|
#seen(panel, screen) {
|
|
32786
32825
|
const sized = laid(panel.api) ? Promise.resolve() : new Promise((resolve2) => {
|
|
32787
|
-
const
|
|
32826
|
+
const watch2 = panel.api.onDidDimensionsChange((size4) => {
|
|
32788
32827
|
if (!laid(size4)) return;
|
|
32789
|
-
|
|
32828
|
+
watch2.dispose();
|
|
32790
32829
|
resolve2();
|
|
32791
32830
|
});
|
|
32792
32831
|
});
|
|
@@ -37049,14 +37088,14 @@ var SliccApp = class extends ThemedElement {
|
|
|
37049
37088
|
}
|
|
37050
37089
|
subscribe(model) {
|
|
37051
37090
|
const update = () => this.requestUpdate();
|
|
37052
|
-
const
|
|
37053
|
-
queueMicrotask(
|
|
37091
|
+
const settle3 = () => settleModels(model);
|
|
37092
|
+
queueMicrotask(settle3);
|
|
37054
37093
|
return [
|
|
37055
37094
|
...super.subscribe(model),
|
|
37056
|
-
model.settings.on("settings",
|
|
37057
|
-
model.settings.on("accounts",
|
|
37095
|
+
model.settings.on("settings", settle3),
|
|
37096
|
+
model.settings.on("accounts", settle3),
|
|
37058
37097
|
model.agent.on("agents", () => {
|
|
37059
|
-
|
|
37098
|
+
settle3();
|
|
37060
37099
|
this.#prune();
|
|
37061
37100
|
update();
|
|
37062
37101
|
}),
|
|
@@ -37081,17 +37120,18 @@ var SliccApp = class extends ThemedElement {
|
|
|
37081
37120
|
...model.tabs ? [model.tabs.on("tabs", update)] : [],
|
|
37082
37121
|
...model.agent.readOnly ? [
|
|
37083
37122
|
model.agent.on("readOnly", () => {
|
|
37084
|
-
|
|
37123
|
+
settle3();
|
|
37085
37124
|
update();
|
|
37086
37125
|
})
|
|
37087
37126
|
] : [],
|
|
37088
37127
|
...model.follow ? [
|
|
37089
37128
|
model.follow.on("follow", () => {
|
|
37090
|
-
|
|
37129
|
+
settle3();
|
|
37091
37130
|
this.#followed(model);
|
|
37092
37131
|
update();
|
|
37093
37132
|
})
|
|
37094
|
-
] : []
|
|
37133
|
+
] : [],
|
|
37134
|
+
flushStarting(this, model)
|
|
37095
37135
|
];
|
|
37096
37136
|
}
|
|
37097
37137
|
connectedCallback() {
|
|
@@ -37436,12 +37476,19 @@ var SliccApp = class extends ThemedElement {
|
|
|
37436
37476
|
event2.preventDefault();
|
|
37437
37477
|
this.#detach(id, null, false);
|
|
37438
37478
|
}
|
|
37479
|
+
#railClick(event2, id) {
|
|
37480
|
+
if (event2.pointerType === "touch" || event2.pointerType === "pen")
|
|
37481
|
+
[...this.renderRoot.querySelectorAll("swc-tooltip")].find(
|
|
37482
|
+
(tip) => tip.getAttribute("for") === `rail-${id}`
|
|
37483
|
+
).open = false;
|
|
37484
|
+
this.show(id);
|
|
37485
|
+
}
|
|
37439
37486
|
#railButton(item2, side) {
|
|
37440
37487
|
const changes2 = item2.id === "changes" ? this.#changes() : 0;
|
|
37441
37488
|
const driven = item2.id === "browser" && !!this.model?.browser.list().some((tab) => tab.controlled);
|
|
37442
37489
|
const visible2 = shown2(this.dock, item2.id);
|
|
37443
37490
|
const label = `${visible2 ? `${item2.title}, shown` : `Open ${item2.title}`}${changes2 ? `, ${changeCount(changes2)}` : driven ? ", a tab is in use" : ""}`;
|
|
37444
|
-
const button = u22`<swc-action-button id=${`rail-${item2.id}`} class=${visible2 ? "selected" : ""} quiet size="m" accessible-label=${label} data-surface=${item2.id} data-cone=${o2(item2.cone)} ?data-visible=${visible2} @click=${() => this
|
|
37491
|
+
const button = u22`<swc-action-button id=${`rail-${item2.id}`} class=${visible2 ? "selected" : ""} quiet size="m" accessible-label=${label} data-surface=${item2.id} data-cone=${o2(item2.cone)} ?data-visible=${visible2} @click=${(event2) => this.#railClick(event2, item2.id)}>${railIcon(item2.icon)}</swc-action-button>`;
|
|
37445
37492
|
const tooltip = b`<swc-tooltip for=${`rail-${item2.id}`} placement=${{ left: "end", right: "start", bottom: "top" }[side]}>${item2.title}</swc-tooltip>`;
|
|
37446
37493
|
return changes2 ? b`<span class="badged">${button}<swc-badge size="s" variant="neutral" aria-hidden="true">${changes2}</swc-badge></span>${tooltip}` : driven ? b`<span class="badged">${button}<span class="dot" data-driven aria-hidden="true"></span></span>${tooltip}` : b`${button}${tooltip}`;
|
|
37447
37494
|
}
|
|
@@ -42576,7 +42623,7 @@ var SliccSettings = class extends ThemedElement {
|
|
|
42576
42623
|
];
|
|
42577
42624
|
subscribe(model) {
|
|
42578
42625
|
const update = () => this.requestUpdate();
|
|
42579
|
-
const
|
|
42626
|
+
const settle3 = () => {
|
|
42580
42627
|
settleModels(model);
|
|
42581
42628
|
update();
|
|
42582
42629
|
};
|
|
@@ -42592,8 +42639,8 @@ var SliccSettings = class extends ThemedElement {
|
|
|
42592
42639
|
return [
|
|
42593
42640
|
...super.subscribe(model),
|
|
42594
42641
|
...developer && model.updates ? [model.updates.on("items", update)] : [],
|
|
42595
|
-
model.settings.on("settings",
|
|
42596
|
-
model.settings.on("accounts",
|
|
42642
|
+
model.settings.on("settings", settle3),
|
|
42643
|
+
model.settings.on("accounts", settle3),
|
|
42597
42644
|
model.settings.on("providers", update),
|
|
42598
42645
|
...model.vault ? [model.vault.on("status", update), model.vault.on("list", update)] : []
|
|
42599
42646
|
];
|
|
@@ -44063,12 +44110,12 @@ var SliccSprinkle = class extends ThemedElement {
|
|
|
44063
44110
|
const held2 = { port, id, ready: false, value: null };
|
|
44064
44111
|
this.#held = held2;
|
|
44065
44112
|
this.#frame = { key: "", doc: "" };
|
|
44066
|
-
const
|
|
44113
|
+
const settle3 = (value) => {
|
|
44067
44114
|
held2.value = value ?? null;
|
|
44068
44115
|
held2.ready = true;
|
|
44069
44116
|
if (this.#held === held2) this.requestUpdate();
|
|
44070
44117
|
};
|
|
44071
|
-
ask.call(port, id, "getState", []).then(
|
|
44118
|
+
ask.call(port, id, "getState", []).then(settle3, () => settle3(null));
|
|
44072
44119
|
}
|
|
44073
44120
|
willUpdate(changed2) {
|
|
44074
44121
|
super.willUpdate(changed2);
|
|
@@ -44142,15 +44189,15 @@ ${data.html}`;
|
|
|
44142
44189
|
const bridged = !!this.model?.sprinkles.call;
|
|
44143
44190
|
if (bridged && !this.#held.ready) return b``;
|
|
44144
44191
|
const state2 = bridged ? this.#held : void 0;
|
|
44145
|
-
const
|
|
44146
|
-
const caption2 =
|
|
44192
|
+
const watch2 = !!watchOnly(this.model) || !!this.model?.seat;
|
|
44193
|
+
const caption2 = watch2 ? b`<span class="view-only" data-view-only>View only on this device</span>` : A;
|
|
44147
44194
|
const style = `color-scheme:${this.color};${this.inline ? `height:${this.height}px;` : ""}`;
|
|
44148
44195
|
const frame = b`${i22(
|
|
44149
44196
|
this.#mounts,
|
|
44150
|
-
b`<iframe title=${data.title} sandbox="allow-scripts" ?inert=${
|
|
44197
|
+
b`<iframe title=${data.title} sandbox="allow-scripts" ?inert=${watch2} style=${style} .srcdoc=${this.#document(data, state2)}></iframe>`
|
|
44151
44198
|
)}`;
|
|
44152
44199
|
if (!this.inline)
|
|
44153
|
-
return
|
|
44200
|
+
return watch2 ? b`<div class="panel"><div class="bar">${caption2}</div>${frame}</div>` : frame;
|
|
44154
44201
|
return b`<div class="handle" draggable="true" title="Drag into the dock or a rail to open as a panel" @dragstart=${this.#drag}>
|
|
44155
44202
|
${grip}
|
|
44156
44203
|
<span class="name">${data.title}</span>
|
|
@@ -53244,21 +53291,21 @@ function getTransformers(options2) {
|
|
|
53244
53291
|
}
|
|
53245
53292
|
function sortTransformersByEnforcement(transformers) {
|
|
53246
53293
|
const pre = [];
|
|
53247
|
-
const
|
|
53294
|
+
const post2 = [];
|
|
53248
53295
|
const normal = [];
|
|
53249
53296
|
for (const transformer of transformers) switch (transformer.enforce) {
|
|
53250
53297
|
case "pre":
|
|
53251
53298
|
pre.push(transformer);
|
|
53252
53299
|
break;
|
|
53253
53300
|
case "post":
|
|
53254
|
-
|
|
53301
|
+
post2.push(transformer);
|
|
53255
53302
|
break;
|
|
53256
53303
|
default:
|
|
53257
53304
|
normal.push(transformer);
|
|
53258
53305
|
}
|
|
53259
53306
|
return {
|
|
53260
53307
|
pre,
|
|
53261
|
-
post,
|
|
53308
|
+
post: post2,
|
|
53262
53309
|
normal
|
|
53263
53310
|
};
|
|
53264
53311
|
}
|
|
@@ -55276,8 +55323,8 @@ function recursion(pattern2, data) {
|
|
|
55276
55323
|
numCapturesPassed
|
|
55277
55324
|
);
|
|
55278
55325
|
const pre = pattern2.slice(0, startPos);
|
|
55279
|
-
const
|
|
55280
|
-
pattern2 = `${pre}${expansion2}${
|
|
55326
|
+
const post2 = pattern2.slice(startPos + groupContents.length);
|
|
55327
|
+
pattern2 = `${pre}${expansion2}${post2}`;
|
|
55281
55328
|
token.lastIndex += expansion2.length - m16.length - groupContentsLeft.length - groupContentsRight.length;
|
|
55282
55329
|
openGroups.forEach((g7) => g7.hasRecursedWithin = true);
|
|
55283
55330
|
hasRecursed = true;
|