@ai-ecoverse/slicc-spectrum 1.100.0 → 1.101.0
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 +14 -2
- package/dist/slicc-dummy.js +156 -21
- package/dist/slicc-dummy.js.map +3 -3
- package/dist/slicc-ui.js +331 -137
- package/dist/slicc-ui.js.map +3 -3
- package/dist/types/app/composer.d.ts +11 -0
- package/dist/types/app/settings.d.ts +9 -0
- package/dist/types/app/updates.d.ts +3 -0
- package/dist/types/dummy/index.d.ts +3 -2
- package/dist/types/dummy/updates.d.ts +5 -0
- package/dist/types/dummy.d.ts +2 -2
- package/dist/types/model/types.d.ts +20 -1
- package/package.json +2 -2
package/dist/slicc-ui.js
CHANGED
|
@@ -8716,8 +8716,8 @@ var ModelElement = class extends i2 {
|
|
|
8716
8716
|
super.disconnectedCallback();
|
|
8717
8717
|
this.#unbind();
|
|
8718
8718
|
}
|
|
8719
|
-
willUpdate(
|
|
8720
|
-
if (
|
|
8719
|
+
willUpdate(changed2) {
|
|
8720
|
+
if (changed2.has("model") && this.isConnected) this.#bind();
|
|
8721
8721
|
}
|
|
8722
8722
|
#bind() {
|
|
8723
8723
|
this.#unbind();
|
|
@@ -19871,22 +19871,22 @@ function applyFileTreeGitStatusPatch(previous3, patch) {
|
|
|
19871
19871
|
const directoriesWithChanges = new Set(previous3?.directoriesWithChanges);
|
|
19872
19872
|
const ignoredDirectoryPaths = new Set(previous3?.ignoredDirectoryPaths);
|
|
19873
19873
|
const changeCountByDirectoryPath = new Map(previous3?.changeCountByDirectoryPath);
|
|
19874
|
-
let
|
|
19874
|
+
let changed2 = false;
|
|
19875
19875
|
for (const path2 of removeEntries) {
|
|
19876
19876
|
const resolved = resolveGitStatusPath(path2);
|
|
19877
19877
|
if (resolved == null) continue;
|
|
19878
|
-
|
|
19878
|
+
changed2 = removeGitStatusPath({
|
|
19879
19879
|
canonicalPath: resolved.canonicalPath,
|
|
19880
19880
|
changeCountByDirectoryPath,
|
|
19881
19881
|
directoriesWithChanges,
|
|
19882
19882
|
ignoredDirectoryPaths,
|
|
19883
19883
|
statusByPath
|
|
19884
|
-
}) ||
|
|
19884
|
+
}) || changed2;
|
|
19885
19885
|
}
|
|
19886
19886
|
for (const entry of setEntries) {
|
|
19887
19887
|
const resolved = resolveGitStatusEntry(entry);
|
|
19888
19888
|
if (resolved == null) continue;
|
|
19889
|
-
|
|
19889
|
+
changed2 = setGitStatusPath({
|
|
19890
19890
|
canonicalPath: resolved.canonicalPath,
|
|
19891
19891
|
changeCountByDirectoryPath,
|
|
19892
19892
|
directoriesWithChanges,
|
|
@@ -19894,9 +19894,9 @@ function applyFileTreeGitStatusPatch(previous3, patch) {
|
|
|
19894
19894
|
isDirectory: resolved.isDirectory,
|
|
19895
19895
|
status: entry.status,
|
|
19896
19896
|
statusByPath
|
|
19897
|
-
}) ||
|
|
19897
|
+
}) || changed2;
|
|
19898
19898
|
}
|
|
19899
|
-
if (!
|
|
19899
|
+
if (!changed2) return previous3;
|
|
19900
19900
|
if (statusByPath.size === 0) return null;
|
|
19901
19901
|
return {
|
|
19902
19902
|
changeCountByDirectoryPath,
|
|
@@ -32544,8 +32544,8 @@ var SliccVaultButton = class extends i2 {
|
|
|
32544
32544
|
focus() {
|
|
32545
32545
|
this.#button?.post({ type: "slicc-vault", v: 1, op: "focus" });
|
|
32546
32546
|
}
|
|
32547
|
-
updated(
|
|
32548
|
-
if (
|
|
32547
|
+
updated(changed2) {
|
|
32548
|
+
if (changed2.has("vault")) this.#drop();
|
|
32549
32549
|
if (!this.#button && this.vault) this.#mount(this.vault);
|
|
32550
32550
|
this.#send();
|
|
32551
32551
|
}
|
|
@@ -32603,6 +32603,12 @@ var SliccVaultButton = class extends i2 {
|
|
|
32603
32603
|
var limit = 25 * 1024 * 1024;
|
|
32604
32604
|
var startingKey = "slicc-spectrum.starting";
|
|
32605
32605
|
var names = (files) => files.map((file) => file.name).join(", ");
|
|
32606
|
+
function reattach(files) {
|
|
32607
|
+
const all3 = files.map((file) => file.name);
|
|
32608
|
+
if (all3.length > 3) return `Attach these ${all3.length} files again: ${all3.join(", ")}.`;
|
|
32609
|
+
const listed2 = all3.length > 1 ? `${all3.slice(0, -1).join(", ")} and ${all3.at(-1)}` : all3[0];
|
|
32610
|
+
return `Attach ${listed2} again.`;
|
|
32611
|
+
}
|
|
32606
32612
|
var notKept = (files) => files.length === 1 ? `Not sent: ${files[0].name} wasn\u2019t kept after reload.` : `Not sent: ${files.length} files weren\u2019t kept after reload.`;
|
|
32607
32613
|
function session() {
|
|
32608
32614
|
try {
|
|
@@ -32878,6 +32884,7 @@ var SliccComposer = class extends ThemedElement {
|
|
|
32878
32884
|
secretError: { state: true },
|
|
32879
32885
|
secretField: { state: true },
|
|
32880
32886
|
failure: { state: true },
|
|
32887
|
+
reattach: { state: true },
|
|
32881
32888
|
agent: {}
|
|
32882
32889
|
};
|
|
32883
32890
|
#drafts = /* @__PURE__ */ new Map();
|
|
@@ -32906,6 +32913,7 @@ var SliccComposer = class extends ThemedElement {
|
|
|
32906
32913
|
this.secretError = null;
|
|
32907
32914
|
this.secretField = null;
|
|
32908
32915
|
this.failure = null;
|
|
32916
|
+
this.reattach = null;
|
|
32909
32917
|
this.agent = "";
|
|
32910
32918
|
}
|
|
32911
32919
|
static styles = [
|
|
@@ -33092,13 +33100,23 @@ var SliccComposer = class extends ThemedElement {
|
|
|
33092
33100
|
flex: none;
|
|
33093
33101
|
margin-block-start: var(--swc-spacing-50);
|
|
33094
33102
|
}
|
|
33095
|
-
.seat-note
|
|
33103
|
+
.seat-note,
|
|
33104
|
+
.reattach {
|
|
33096
33105
|
margin: var(--swc-spacing-100) 0 0;
|
|
33097
33106
|
padding-inline: var(--swc-spacing-200);
|
|
33098
33107
|
font-size: var(--swc-font-size-75);
|
|
33099
33108
|
color: var(--swc-neutral-subdued-content-color-default);
|
|
33100
33109
|
text-align: center;
|
|
33101
33110
|
}
|
|
33111
|
+
.reattach {
|
|
33112
|
+
display: flex;
|
|
33113
|
+
justify-content: center;
|
|
33114
|
+
align-items: center;
|
|
33115
|
+
gap: var(--swc-spacing-75);
|
|
33116
|
+
}
|
|
33117
|
+
.reattach swc-action-button {
|
|
33118
|
+
color: var(--swc-neutral-subdued-content-color-default);
|
|
33119
|
+
}
|
|
33102
33120
|
.popup {
|
|
33103
33121
|
position: absolute;
|
|
33104
33122
|
left: 0;
|
|
@@ -33194,15 +33212,20 @@ var SliccComposer = class extends ThemedElement {
|
|
|
33194
33212
|
}
|
|
33195
33213
|
`
|
|
33196
33214
|
];
|
|
33197
|
-
willUpdate(
|
|
33198
|
-
super.willUpdate(
|
|
33199
|
-
if (
|
|
33200
|
-
if (
|
|
33215
|
+
willUpdate(changed2) {
|
|
33216
|
+
super.willUpdate(changed2);
|
|
33217
|
+
if (changed2.has("popup") && this.popup?.kind !== "secret") clearValues(this.renderRoot);
|
|
33218
|
+
if (changed2.has("agent") && this.agent && this.model && this.agent !== this.#agent) {
|
|
33201
33219
|
this.#switch(this.agent);
|
|
33202
33220
|
}
|
|
33203
|
-
|
|
33221
|
+
if (this.reattach && !this.value.trim()) this.reattach = null;
|
|
33222
|
+
const edited = changed2.has("value") || changed2.has("attachments") || changed2.has("reattach");
|
|
33204
33223
|
if (edited && this.hasUpdated && !this.#agent && this.#starting())
|
|
33205
|
-
this.#waiting.draft = {
|
|
33224
|
+
this.#waiting.draft = {
|
|
33225
|
+
value: this.value,
|
|
33226
|
+
attachments: this.attachments,
|
|
33227
|
+
reattach: this.reattach
|
|
33228
|
+
};
|
|
33206
33229
|
}
|
|
33207
33230
|
connectedCallback() {
|
|
33208
33231
|
super.connectedCallback();
|
|
@@ -33229,8 +33252,8 @@ var SliccComposer = class extends ThemedElement {
|
|
|
33229
33252
|
for (const attachments of held) release(attachments);
|
|
33230
33253
|
}, linger);
|
|
33231
33254
|
}
|
|
33232
|
-
updated(
|
|
33233
|
-
if (
|
|
33255
|
+
updated(changed2) {
|
|
33256
|
+
if (changed2.has("popup"))
|
|
33234
33257
|
this.renderRoot.querySelector('.item[aria-selected="true"]')?.scrollIntoView({ block: "nearest" });
|
|
33235
33258
|
}
|
|
33236
33259
|
#wire() {
|
|
@@ -33307,6 +33330,11 @@ var SliccComposer = class extends ThemedElement {
|
|
|
33307
33330
|
#putBack(row) {
|
|
33308
33331
|
this.value = this.value.trim() ? `${this.value}
|
|
33309
33332
|
${row.text}` : row.text;
|
|
33333
|
+
const listed2 = new Set((this.reattach ?? []).map((file) => file.name));
|
|
33334
|
+
const fresh2 = (row.lost ?? []).filter(
|
|
33335
|
+
(file) => !listed2.has(file.name) && listed2.add(file.name)
|
|
33336
|
+
);
|
|
33337
|
+
this.reattach = [...this.reattach ?? [], ...fresh2];
|
|
33310
33338
|
this.#history = -1;
|
|
33311
33339
|
this.#unwait(row.id);
|
|
33312
33340
|
this.focus();
|
|
@@ -33322,13 +33350,18 @@ ${row.text}` : row.text;
|
|
|
33322
33350
|
}
|
|
33323
33351
|
#switch(id) {
|
|
33324
33352
|
if (this.#agent)
|
|
33325
|
-
this.#drafts.set(this.#agent, {
|
|
33353
|
+
this.#drafts.set(this.#agent, {
|
|
33354
|
+
value: this.value,
|
|
33355
|
+
attachments: this.attachments,
|
|
33356
|
+
reattach: this.reattach
|
|
33357
|
+
});
|
|
33326
33358
|
const shared3 = this.#agent || !this.isConnected ? null : this.#waiting.draft;
|
|
33327
33359
|
if (shared3 && id && !this.#drafts.has(id)) this.#waiting.draft = null;
|
|
33328
33360
|
const draft2 = this.#drafts.get(id) ?? shared3 ?? void 0;
|
|
33329
33361
|
this.#agent = id;
|
|
33330
33362
|
this.value = draft2?.value ?? "";
|
|
33331
33363
|
this.attachments = draft2?.attachments ?? [];
|
|
33364
|
+
this.reattach = draft2?.reattach ?? null;
|
|
33332
33365
|
this.popup = null;
|
|
33333
33366
|
this.#history = -1;
|
|
33334
33367
|
}
|
|
@@ -33987,6 +34020,10 @@ ${this.value}` : text5;
|
|
|
33987
34020
|
const talk = !!speech();
|
|
33988
34021
|
const held = this.#held();
|
|
33989
34022
|
const starting = this.#starting();
|
|
34023
|
+
const back = new Set(
|
|
34024
|
+
this.attachments.filter((attachment2) => !attachment2.error).map((attachment2) => attachment2.name)
|
|
34025
|
+
);
|
|
34026
|
+
const missing = (this.reattach ?? []).filter((file) => !back.has(file.name));
|
|
33990
34027
|
return b`<div class="column" @drop=${this.#mark}>
|
|
33991
34028
|
<span id="keys" class="sr" aria-hidden="true">${this.#instructions(busy)}</span>
|
|
33992
34029
|
${this.#hold()}
|
|
@@ -34018,6 +34055,7 @@ ${this.value}` : text5;
|
|
|
34018
34055
|
>
|
|
34019
34056
|
${this.attachments.map((attachment2) => this.#attachment(attachment2))}
|
|
34020
34057
|
</swc-prompt-field>
|
|
34058
|
+
${missing.length ? b`<p class="reattach" data-reattach><swc-action-button size="s" quiet data-action="reattach" @click=${() => this.renderRoot.querySelector("input[type=file]")?.click()}><swc-icon-attach slot="icon"></swc-icon-attach>${reattach(missing)}</swc-action-button></p>` : A}
|
|
34021
34059
|
<swc-popover placement="top-start" accessible-label="Add to the message" @keydown=${this.#menuKey} @swc-after-open=${() => this.renderRoot.querySelector("sp-menu")?.focus()}>
|
|
34022
34060
|
<sp-menu label="Add to the message" @change=${this.#add}>
|
|
34023
34061
|
<sp-menu-item value="upload">Upload from this computer</sp-menu-item>
|
|
@@ -34975,12 +35013,12 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
34975
35013
|
}
|
|
34976
35014
|
this.#settings(account);
|
|
34977
35015
|
}
|
|
34978
|
-
#message(message, agent, suggestion,
|
|
35016
|
+
#message(message, agent, suggestion, changed2, extra, owners, stamp, pile) {
|
|
34979
35017
|
const model = this.model;
|
|
34980
35018
|
const handlers = { ...this.#handlers, owners };
|
|
34981
35019
|
switch (message.role) {
|
|
34982
35020
|
case "assistant": {
|
|
34983
|
-
const label =
|
|
35021
|
+
const label = changed2 ? model.settings.models().find((option2) => option2.id === message.model)?.label ?? message.model : "";
|
|
34984
35022
|
return assistant(
|
|
34985
35023
|
message,
|
|
34986
35024
|
agent.name,
|
|
@@ -35044,15 +35082,15 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
35044
35082
|
previous3 = label;
|
|
35045
35083
|
}
|
|
35046
35084
|
const next = message.role === "assistant" ? message.model : void 0;
|
|
35047
|
-
const
|
|
35048
|
-
if (
|
|
35085
|
+
const changed2 = !!next && next !== shown4;
|
|
35086
|
+
if (changed2) shown4 = next;
|
|
35049
35087
|
out.push([
|
|
35050
35088
|
message.id,
|
|
35051
35089
|
this.#message(
|
|
35052
35090
|
message,
|
|
35053
35091
|
agent,
|
|
35054
35092
|
message.id === target2 ? suggestion : null,
|
|
35055
|
-
|
|
35093
|
+
changed2,
|
|
35056
35094
|
extra.get(message.id) ?? [],
|
|
35057
35095
|
owners,
|
|
35058
35096
|
stamped.has(message.id),
|
|
@@ -36607,8 +36645,8 @@ var SliccFreezer = class extends ModelElement {
|
|
|
36607
36645
|
...onWatch(model, update)
|
|
36608
36646
|
];
|
|
36609
36647
|
}
|
|
36610
|
-
willUpdate(
|
|
36611
|
-
super.willUpdate(
|
|
36648
|
+
willUpdate(changed2) {
|
|
36649
|
+
super.willUpdate(changed2);
|
|
36612
36650
|
if (!this.importable) this.refused = false;
|
|
36613
36651
|
}
|
|
36614
36652
|
focus() {
|
|
@@ -37963,8 +38001,8 @@ function grammarBase() {
|
|
|
37963
38001
|
function grammarUrls(kind, name, version2, remote, base = local, page = globalThis.document?.baseURI ?? "http://localhost/") {
|
|
37964
38002
|
const urls = [];
|
|
37965
38003
|
if (base) {
|
|
37966
|
-
const
|
|
37967
|
-
urls.push(new URL(`${kind}/dist/${name}.mjs`, new URL(
|
|
38004
|
+
const folder3 = base.endsWith("/") ? base : `${base}/`;
|
|
38005
|
+
urls.push(new URL(`${kind}/dist/${name}.mjs`, new URL(folder3, page)).href);
|
|
37968
38006
|
}
|
|
37969
38007
|
urls.push(`${remote}${kind}@${version2}/dist/${name}.mjs`);
|
|
37970
38008
|
return urls;
|
|
@@ -39206,8 +39244,8 @@ var SliccTray = class extends ModelElement {
|
|
|
39206
39244
|
const model = this.model;
|
|
39207
39245
|
if (!model) return b``;
|
|
39208
39246
|
const status2 = model.tray.status();
|
|
39209
|
-
const
|
|
39210
|
-
const connection = `${connectionLabel[status2.connection]}${
|
|
39247
|
+
const refused3 = refusedNow(model.follow?.state());
|
|
39248
|
+
const connection = `${connectionLabel[status2.connection]}${refused3 ? ", can\u2019t follow" : ""}`;
|
|
39211
39249
|
const followers = `${status2.followers.length} ${status2.followers.length === 1 ? "follower" : "followers"}`;
|
|
39212
39250
|
const light = status2.connection === "live" ? status2.name : `${status2.name}, ${connection}`;
|
|
39213
39251
|
const budget = shownBudget(status2);
|
|
@@ -39216,7 +39254,7 @@ var SliccTray = class extends ModelElement {
|
|
|
39216
39254
|
"network",
|
|
39217
39255
|
`Tray ${status2.name}: ${connection}, ${followers}`,
|
|
39218
39256
|
b`<span>
|
|
39219
|
-
<swc-status-light size="s" variant=${
|
|
39257
|
+
<swc-status-light size="s" variant=${refused3 ? "neutral" : connectionVariant[status2.connection]}>
|
|
39220
39258
|
<span class="detail">${light}</span>
|
|
39221
39259
|
</swc-status-light>
|
|
39222
39260
|
<span class="detail muted followers"><swc-icon-user-group size="s"></swc-icon-user-group>${status2.followers.length}</span>
|
|
@@ -40018,8 +40056,8 @@ var SliccNetwork = class extends ModelElement {
|
|
|
40018
40056
|
setTimeout(() => settle2.disconnect(), 1e3);
|
|
40019
40057
|
});
|
|
40020
40058
|
}
|
|
40021
|
-
willUpdate(
|
|
40022
|
-
super.willUpdate(
|
|
40059
|
+
willUpdate(changed2) {
|
|
40060
|
+
super.willUpdate(changed2);
|
|
40023
40061
|
const state2 = this.#pairing()?.state;
|
|
40024
40062
|
const was = this.#pairState;
|
|
40025
40063
|
this.#pairState = state2;
|
|
@@ -40392,19 +40430,19 @@ var SliccNetwork = class extends ModelElement {
|
|
|
40392
40430
|
const heading = `folders-${device.id}`;
|
|
40393
40431
|
return b`<div class="folders" data-folders>
|
|
40394
40432
|
<span class="subheading" id=${heading}>Folders</span>
|
|
40395
|
-
<ul aria-labelledby=${heading}>${folders2.map((
|
|
40433
|
+
<ul aria-labelledby=${heading}>${folders2.map((folder3) => this.#folder(port, device, folder3))}</ul>
|
|
40396
40434
|
</div>`;
|
|
40397
40435
|
}
|
|
40398
|
-
#folder(port, device,
|
|
40399
|
-
const action = `folder:${
|
|
40436
|
+
#folder(port, device, folder3) {
|
|
40437
|
+
const action = `folder:${folder3.source}`;
|
|
40400
40438
|
const busy = this.busy === action;
|
|
40401
|
-
const button =
|
|
40402
|
-
return b`<li data-folder=${
|
|
40439
|
+
const button = folder3.mounted ? port.ejectFolder ? b`<swc-button size="s" variant="secondary" fill-style="outline" data-action="eject-folder" data-id=${folder3.source} accessible-label=${`Eject ${folder3.mounted}`} ?pending=${busy} ?disabled=${this.#waiting(action)} @click=${() => this.#act(action, () => port.ejectFolder?.(folder3.source), "linksError")}>Eject</swc-button>` : A : port.mountFolder ? b`<swc-button size="s" variant="secondary" fill-style="outline" data-action="mount-folder" data-id=${folder3.source} accessible-label=${`Mount ${folder3.source}`} ?pending=${busy} ?disabled=${this.#waiting(action) || device.state !== "connected"} @click=${() => this.#act(action, () => this.#mountFolder(port, folder3.source), "linksError")}>Mount</swc-button>` : A;
|
|
40440
|
+
return b`<li data-folder=${folder3.source} data-mounted=${folder3.mounted ? "yes" : "no"}>
|
|
40403
40441
|
<swc-icon-folder size="s" aria-hidden="true"></swc-icon-folder>
|
|
40404
40442
|
<span class="folder">
|
|
40405
|
-
<code title=${
|
|
40406
|
-
${
|
|
40407
|
-
${
|
|
40443
|
+
<code title=${folder3.source}>${folder3.name}</code>
|
|
40444
|
+
${folder3.readonly ? b`<swc-badge size="s" variant="neutral" subtle data-readonly>Read-only</swc-badge>` : A}
|
|
40445
|
+
${folder3.mounted ? b`<span class="muted" data-mounted-at>Mounted at <code>${folder3.mounted}</code></span>` : A}
|
|
40408
40446
|
</span>
|
|
40409
40447
|
${button}
|
|
40410
40448
|
</li>`;
|
|
@@ -44639,8 +44677,56 @@ var actions = {
|
|
|
44639
44677
|
"restart-agent": "Restart agent",
|
|
44640
44678
|
reload: "Reload",
|
|
44641
44679
|
"update-now": "Update now",
|
|
44642
|
-
retry: "Retry"
|
|
44643
|
-
|
|
44680
|
+
retry: "Retry",
|
|
44681
|
+
"install-beta": "Install beta",
|
|
44682
|
+
"back-to-certified": "Back to certified"
|
|
44683
|
+
};
|
|
44684
|
+
var resting = /* @__PURE__ */ new Set(["current", "installed"]);
|
|
44685
|
+
var betaLight = ["notice", "Beta installed"];
|
|
44686
|
+
var betaActions = /* @__PURE__ */ new Set(["install-beta", "back-to-certified"]);
|
|
44687
|
+
var folder = (label) => /\((\/[^)]+)\)$/.exec(label)?.[1] ?? null;
|
|
44688
|
+
var component = (label) => label.replace(/\s*\(\/[^)]+\)$/, "");
|
|
44689
|
+
function betaText(items) {
|
|
44690
|
+
const item2 = items.find((candidate) => candidate.beta);
|
|
44691
|
+
if (!item2?.beta) return null;
|
|
44692
|
+
return `${component(item2.label)} runs beta ${item2.beta.version}, not certified`;
|
|
44693
|
+
}
|
|
44694
|
+
var release2 = (npm) => npm.latest ? `${npm.latest} on npm` : "a newer release on npm";
|
|
44695
|
+
var refused2 = (npm) => npm.reason ? `not offered: ${npm.reason}` : "not offered";
|
|
44696
|
+
var sentence = (text5) => text5[0].toUpperCase() + text5.slice(1);
|
|
44697
|
+
function npmMeta(item2) {
|
|
44698
|
+
const npm = item2.npm;
|
|
44699
|
+
const tried = item2.to === npm?.latest && (!item2.beta || item2.state === "failed");
|
|
44700
|
+
const target2 = item2.to && item2.to !== item2.from && !tried ? ` \u2192 ${item2.to}` : "";
|
|
44701
|
+
if (item2.beta) return `${item2.beta.version} beta \xB7 certified ${item2.beta.certified}${target2}`;
|
|
44702
|
+
const pinned = item2.from ? `${item2.from} (certified)${target2}` : "Not installed";
|
|
44703
|
+
if (npm?.state === "offered") return `${pinned} \xB7 ${release2(npm)}, not certified`;
|
|
44704
|
+
if (npm?.state === "not-offered") return `${pinned} \xB7 ${release2(npm)}, ${refused2(npm)}`;
|
|
44705
|
+
return null;
|
|
44706
|
+
}
|
|
44707
|
+
function changed(item2, npm) {
|
|
44708
|
+
const where2 = folder(item2.label);
|
|
44709
|
+
const changes2 = npm.changes;
|
|
44710
|
+
const gated = changes2?.gated ?? [];
|
|
44711
|
+
const count2 = changes2 ? `${changes2.count} ${changes2.count === 1 ? "package changes" : "packages change"}${where2 ? ` in ${where2}` : ""}.` : "";
|
|
44712
|
+
const text5 = [
|
|
44713
|
+
item2.beta ? `${sentence(release2(npm))}, not certified.` : "",
|
|
44714
|
+
count2,
|
|
44715
|
+
gated.length === 1 ? `${gated[0]} stays at its certified version.` : "",
|
|
44716
|
+
gated.length > 1 ? `${list5(gated)} stay at their certified versions.` : ""
|
|
44717
|
+
].filter(Boolean).join(" ");
|
|
44718
|
+
return text5 || null;
|
|
44719
|
+
}
|
|
44720
|
+
function npmNote(item2) {
|
|
44721
|
+
const npm = item2.npm;
|
|
44722
|
+
if (npm?.state === "current") return "npm: no newer release";
|
|
44723
|
+
if (npm?.state === "checking") return "Checking npm\u2026";
|
|
44724
|
+
if (npm?.state === "failed") return npm.reason ?? "Couldn\u2019t check npm";
|
|
44725
|
+
if (npm?.state === "offered") return changed(item2, npm);
|
|
44726
|
+
if (npm?.state === "not-offered" && item2.beta)
|
|
44727
|
+
return `${sentence(release2(npm))}, ${refused2(npm)}`;
|
|
44728
|
+
return null;
|
|
44729
|
+
}
|
|
44644
44730
|
var running = /* @__PURE__ */ new Set(["checking", "downloading", "linking"]);
|
|
44645
44731
|
var packageStates = {
|
|
44646
44732
|
available: null,
|
|
@@ -44755,31 +44841,31 @@ var newer = (a23, b13) => {
|
|
|
44755
44841
|
var certBlock = /<!--\s*cert-verify\s*-->([\s\S]*?)<!--\s*\/cert-verify\s*-->/g;
|
|
44756
44842
|
var notesLimit = 8192;
|
|
44757
44843
|
var noted = /* @__PURE__ */ new WeakMap();
|
|
44758
|
-
function releaseNotes(
|
|
44759
|
-
const known = noted.get(
|
|
44844
|
+
function releaseNotes(release3) {
|
|
44845
|
+
const known = noted.get(release3);
|
|
44760
44846
|
if (known) return known;
|
|
44761
|
-
const text5 =
|
|
44847
|
+
const text5 = release3.notes ?? "";
|
|
44762
44848
|
const certified = [...text5.matchAll(certBlock)].some(
|
|
44763
44849
|
([, inner]) => /^certified\b/.test(inner.trim())
|
|
44764
44850
|
);
|
|
44765
44851
|
const lines = text5.replace(certBlock, "").trim().split("\n");
|
|
44766
|
-
const heading = /^#{1,6}\s/.test(lines[0]) && lines[0].includes(
|
|
44852
|
+
const heading = /^#{1,6}\s/.test(lines[0]) && lines[0].includes(release3.version.replace(/^v/, ""));
|
|
44767
44853
|
const full = lines.slice(heading ? 1 : 0).join("\n").trim();
|
|
44768
44854
|
const cut = full.length > notesLimit;
|
|
44769
44855
|
const head2 = full.slice(0, notesLimit);
|
|
44770
44856
|
const line = head2.lastIndexOf("\n");
|
|
44771
44857
|
const body4 = cut ? `${(line > notesLimit / 2 ? head2.slice(0, line) : head2).trimEnd()}\u2026` : full;
|
|
44772
|
-
const notes2 = { release:
|
|
44773
|
-
noted.set(
|
|
44858
|
+
const notes2 = { release: release3, body: body4, certified, cut };
|
|
44859
|
+
noted.set(release3, notes2);
|
|
44774
44860
|
return notes2;
|
|
44775
44861
|
}
|
|
44776
44862
|
function whatsNew(releases, from, to) {
|
|
44777
44863
|
if (!releases || from === null || to === null || to === from) return [];
|
|
44778
|
-
const range3 = releases.filter((
|
|
44864
|
+
const range3 = releases.filter((release3) => newer(release3.version, from) > 0 && newer(release3.version, to) <= 0).sort((a23, b13) => newer(b13.version, a23.version)).map(releaseNotes);
|
|
44779
44865
|
return range3.some((entry) => entry.body) ? range3 : [];
|
|
44780
44866
|
}
|
|
44781
44867
|
var secure = (url) => /^https:\/\//i.test(url);
|
|
44782
|
-
var installed2 = (releases, version2) => releases?.find((
|
|
44868
|
+
var installed2 = (releases, version2) => releases?.find((release3) => newer(release3.version, version2) === 0 && secure(release3.url));
|
|
44783
44869
|
var snapshot = (items) => new Map(items.map(({ id, state: state2, error }) => [id, { state: state2, error }]));
|
|
44784
44870
|
function settled2(failures, before, after) {
|
|
44785
44871
|
return new Map(
|
|
@@ -44907,6 +44993,20 @@ var SliccUpdates = class extends ModelElement {
|
|
|
44907
44993
|
swc-status-light {
|
|
44908
44994
|
align-self: center;
|
|
44909
44995
|
}
|
|
44996
|
+
.title {
|
|
44997
|
+
display: flex;
|
|
44998
|
+
align-items: center;
|
|
44999
|
+
flex-wrap: wrap;
|
|
45000
|
+
gap: var(--swc-spacing-100);
|
|
45001
|
+
min-width: 0;
|
|
45002
|
+
}
|
|
45003
|
+
.npm {
|
|
45004
|
+
margin: calc(-1 * var(--swc-spacing-100)) 0 0;
|
|
45005
|
+
color: var(--swc-neutral-subdued-content-color-default);
|
|
45006
|
+
font-size: var(--swc-font-size-75);
|
|
45007
|
+
line-height: var(--swc-line-height-200);
|
|
45008
|
+
overflow-wrap: anywhere;
|
|
45009
|
+
}
|
|
44910
45010
|
.version {
|
|
44911
45011
|
font-family: var(--swc-code-font-family-stack);
|
|
44912
45012
|
}
|
|
@@ -45242,9 +45342,13 @@ var SliccUpdates = class extends ModelElement {
|
|
|
45242
45342
|
);
|
|
45243
45343
|
}
|
|
45244
45344
|
#actions(item2) {
|
|
45245
|
-
|
|
45345
|
+
const developer = typeof this.model?.updates?.setDeveloper === "function";
|
|
45346
|
+
const shown4 = item2.actions.filter(
|
|
45347
|
+
(action) => !betaActions.has(action) || developer && (action !== "install-beta" || item2.npm?.state === "offered")
|
|
45348
|
+
);
|
|
45349
|
+
if (!shown4.length) return A;
|
|
45246
45350
|
const busy = this.pending.has(item2.id);
|
|
45247
|
-
return b`<div class="actions">${
|
|
45351
|
+
return b`<div class="actions">${shown4.map(
|
|
45248
45352
|
(action) => b`<swc-button
|
|
45249
45353
|
size="m"
|
|
45250
45354
|
variant="secondary"
|
|
@@ -45267,52 +45371,61 @@ var SliccUpdates = class extends ModelElement {
|
|
|
45267
45371
|
<summary data-action="whats-new">${chevron}What’s new</summary>
|
|
45268
45372
|
<div class="releases">${entries.map(
|
|
45269
45373
|
({
|
|
45270
|
-
release:
|
|
45374
|
+
release: release3,
|
|
45271
45375
|
body: body4,
|
|
45272
45376
|
certified,
|
|
45273
45377
|
cut
|
|
45274
|
-
}) => b`<div class="release" data-version=${
|
|
45275
|
-
<p class="title" role="heading" aria-level=${level}>${secure(
|
|
45378
|
+
}) => b`<div class="release" data-version=${release3.version}>
|
|
45379
|
+
<p class="title" role="heading" aria-level=${level}>${secure(release3.url) ? b`<a class="swc-Link swc-Link--standalone" href=${release3.url} target="_blank" rel="noopener noreferrer" data-action="release-notes" aria-label=${`${label} ${release3.version} release notes`}>${release3.version}</a>` : release3.version}${certified ? b`<swc-badge size="s" variant="positive" subtle data-certified>Certified</swc-badge>` : A}</p>
|
|
45276
45380
|
${body4 ? b`<div class="markdown">${markdown(body4, { strict: true, level })}</div>` : A}
|
|
45277
|
-
${cut && secure(
|
|
45381
|
+
${cut && secure(release3.url) ? b`<p class="cut" data-cut><a class="swc-Link swc-Link--standalone" href=${release3.url} target="_blank" rel="noopener noreferrer" data-action="release-notes" aria-label=${`Read the full notes for ${label} ${release3.version}`}>Read the full notes</a></p>` : A}
|
|
45278
45382
|
</div>`
|
|
45279
45383
|
)}</div>
|
|
45280
45384
|
</details>`;
|
|
45281
45385
|
}
|
|
45282
45386
|
#releaseLink(label, version2, releases, npm) {
|
|
45283
|
-
const
|
|
45284
|
-
if (
|
|
45285
|
-
return b`<a class="swc-Link swc-Link--standalone" href=${
|
|
45387
|
+
const release3 = installed2(releases, version2);
|
|
45388
|
+
if (release3) {
|
|
45389
|
+
return b`<a class="swc-Link swc-Link--standalone" href=${release3.url} target="_blank" rel="noopener noreferrer" data-action="release-notes" aria-label=${`${label} ${version2} release notes`}>Release notes</a>`;
|
|
45286
45390
|
}
|
|
45287
45391
|
if (!npm) return A;
|
|
45288
45392
|
return b`<a class="swc-Link swc-Link--standalone" href=${`https://www.npmjs.com/package/${npm}/v/${version2}`} target="_blank" rel="noopener noreferrer" data-action="npm-page" aria-label=${`npm page for ${label} ${version2}`}>npm page</a>`;
|
|
45289
45393
|
}
|
|
45290
|
-
#version(item2) {
|
|
45291
|
-
const text5 = b`<span class="version">${item2.from ?? "Not installed"}${item2.to && item2.to !== item2.from ? b` → ${item2.to}` : A}</span>`;
|
|
45394
|
+
#version(item2, meta) {
|
|
45395
|
+
const text5 = meta ? b`<span data-npm-meta>${meta}</span>` : b`<span class="version">${item2.from ?? "Not installed"}${item2.to && item2.to !== item2.from ? b` → ${item2.to}` : A}</span>`;
|
|
45292
45396
|
const link2 = item2.from !== null && (item2.to === null || item2.to === item2.from) ? this.#releaseLink(item2.label, item2.from, item2.releases) : A;
|
|
45293
45397
|
return link2 === A ? text5 : b`<span class="installed">${text5}${link2}</span>`;
|
|
45294
45398
|
}
|
|
45295
45399
|
#item(item2) {
|
|
45296
|
-
const [variant, state2] = states[item2.state];
|
|
45400
|
+
const [variant, state2] = item2.beta && resting.has(item2.state) ? betaLight : states[item2.state];
|
|
45297
45401
|
const label = item2.state === "failed" && item2.from !== null ? "Update failed" : state2;
|
|
45298
45402
|
const error = this.failures.get(item2.id) ?? item2.error;
|
|
45403
|
+
const developer = typeof this.model?.updates?.setDeveloper === "function";
|
|
45404
|
+
const shown4 = developer ? item2 : { ...item2, npm: null };
|
|
45405
|
+
const meta = npmMeta(shown4);
|
|
45406
|
+
const note = npmNote(shown4);
|
|
45407
|
+
const ahead = shown4.npm?.state === "offered" ? shown4.npm.latest ?? null : null;
|
|
45299
45408
|
return b`<swc-divider size="s"></swc-divider>
|
|
45300
|
-
<article data-id=${item2.id} data-state=${item2.state} aria-label=${item2.label}>
|
|
45409
|
+
<article data-id=${item2.id} data-state=${item2.state} data-npm=${item2.npm?.state ?? A} aria-label=${item2.label}>
|
|
45301
45410
|
<div class="head">
|
|
45302
|
-
<
|
|
45411
|
+
<div class="title">
|
|
45412
|
+
<h2>${item2.label}</h2>
|
|
45413
|
+
${item2.beta ? b`<swc-badge size="s" variant="notice" subtle data-beta>Beta</swc-badge>` : A}
|
|
45414
|
+
</div>
|
|
45303
45415
|
<swc-status-light variant=${variant}>${label}</swc-status-light>
|
|
45304
45416
|
</div>
|
|
45305
45417
|
<div class="meta">
|
|
45306
|
-
${this.#version(item2)}
|
|
45418
|
+
${this.#version(item2, meta)}
|
|
45307
45419
|
${item2.state === "starting" ? A : this.#checked(item2.checkedAt)}
|
|
45308
45420
|
</div>
|
|
45421
|
+
${note ? b`<p class="npm" data-npm-note>${note}</p>` : A}
|
|
45309
45422
|
${this.#progress(item2)}
|
|
45310
45423
|
${error ? b`<div class="error" role="alert">
|
|
45311
45424
|
<swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle>
|
|
45312
45425
|
<span>${error}</span>
|
|
45313
45426
|
</div>` : A}
|
|
45314
45427
|
${this.#actions(item2)}
|
|
45315
|
-
${this.#whatsNew(`releases:item:${item2.id}`, item2.label, whatsNew(item2.releases, item2.from, item2.to), 3)}
|
|
45428
|
+
${this.#whatsNew(`releases:item:${item2.id}`, item2.label, whatsNew(item2.releases, item2.from, ahead ?? item2.to), 3)}
|
|
45316
45429
|
${item2.log ? b`<details ?open=${this.#logs.has(`item:${item2.id}`)} @toggle=${this.#logs.details(`item:${item2.id}`)}><summary>${chevron}Install log</summary><pre>${item2.log}</pre></details>` : A}
|
|
45317
45430
|
</article>`;
|
|
45318
45431
|
}
|
|
@@ -45583,6 +45696,12 @@ var SliccApp = class extends ThemedElement {
|
|
|
45583
45696
|
padding-inline: var(--swc-spacing-75);
|
|
45584
45697
|
border-radius: var(--swc-corner-radius-small-default);
|
|
45585
45698
|
}
|
|
45699
|
+
.update-status {
|
|
45700
|
+
display: inline-flex;
|
|
45701
|
+
align-items: center;
|
|
45702
|
+
gap: var(--swc-spacing-75);
|
|
45703
|
+
white-space: nowrap;
|
|
45704
|
+
}
|
|
45586
45705
|
header .tabs:focus-visible {
|
|
45587
45706
|
outline: var(--swc-focus-indicator-thickness) solid var(--swc-focus-indicator-color);
|
|
45588
45707
|
}
|
|
@@ -45860,7 +45979,7 @@ var SliccApp = class extends ThemedElement {
|
|
|
45860
45979
|
}
|
|
45861
45980
|
}
|
|
45862
45981
|
}
|
|
45863
|
-
updated(
|
|
45982
|
+
updated(changed2) {
|
|
45864
45983
|
const color2 = this.color;
|
|
45865
45984
|
if (this.#painted && this.#painted !== color2) {
|
|
45866
45985
|
const root2 = this.renderRoot;
|
|
@@ -45874,7 +45993,7 @@ var SliccApp = class extends ThemedElement {
|
|
|
45874
45993
|
this.panels.quietly(() => {
|
|
45875
45994
|
const layout = this.#started !== this.screen;
|
|
45876
45995
|
if (layout) this.#start(model);
|
|
45877
|
-
else if (
|
|
45996
|
+
else if (changed2.has("model")) this.#rebind(model);
|
|
45878
45997
|
this.#updates(layout);
|
|
45879
45998
|
this.#retitle();
|
|
45880
45999
|
});
|
|
@@ -46280,13 +46399,20 @@ var SliccApp = class extends ThemedElement {
|
|
|
46280
46399
|
);
|
|
46281
46400
|
}
|
|
46282
46401
|
#updatesIndicator() {
|
|
46283
|
-
const
|
|
46284
|
-
|
|
46285
|
-
const
|
|
46286
|
-
|
|
46287
|
-
|
|
46402
|
+
const items = this.#offers("updates") ? this.model?.updates?.list() ?? [] : [];
|
|
46403
|
+
const updates = updatesStatus(items);
|
|
46404
|
+
const beta = betaText(items);
|
|
46405
|
+
if (!updates && !beta) return A;
|
|
46406
|
+
const text5 = updates ? updates[0].toUpperCase() + updates.slice(1) : null;
|
|
46407
|
+
const said = [updates, beta].filter(Boolean).join(". ");
|
|
46408
|
+
const tip = [text5, beta].filter(Boolean).join(". ");
|
|
46409
|
+
return b`<swc-action-button id="updates" quiet size="s" data-updates accessible-label=${`Install / Update: ${said}`} @click=${() => this.show("updates")}>
|
|
46410
|
+
<span class="update-status">
|
|
46411
|
+
${updates ? b`<swc-status-light size="s" variant=${updatesVariant(updates)}>${this.screen === "phone" ? A : text5}</swc-status-light>` : A}
|
|
46412
|
+
${beta ? b`<swc-badge size="s" variant="notice" subtle data-beta>Beta</swc-badge>` : A}
|
|
46413
|
+
</span>
|
|
46288
46414
|
</swc-action-button>
|
|
46289
|
-
<swc-tooltip for="updates" placement="bottom">${
|
|
46415
|
+
<swc-tooltip for="updates" placement="bottom">${tip}</swc-tooltip>`;
|
|
46290
46416
|
}
|
|
46291
46417
|
#tabsIndicator() {
|
|
46292
46418
|
const state2 = this.model?.tabs?.state();
|
|
@@ -46831,8 +46957,8 @@ var SliccApprovals = class extends ModelElement {
|
|
|
46831
46957
|
#current() {
|
|
46832
46958
|
return this.model?.approvals?.decide ? waiting2(this.model, this.now).filter(({ id }) => !this.#closed.has(id)) : [];
|
|
46833
46959
|
}
|
|
46834
|
-
willUpdate(
|
|
46835
|
-
super.willUpdate(
|
|
46960
|
+
willUpdate(changed2) {
|
|
46961
|
+
super.willUpdate(changed2);
|
|
46836
46962
|
const list6 = this.#current();
|
|
46837
46963
|
const showing = this.#showing;
|
|
46838
46964
|
if (showing && this.#pending.has(showing.id)) return;
|
|
@@ -46848,8 +46974,8 @@ var SliccApprovals = class extends ModelElement {
|
|
|
46848
46974
|
this.#armed = false;
|
|
46849
46975
|
this.#arming = setTimeout(() => this.#armed = true, this.arming);
|
|
46850
46976
|
}
|
|
46851
|
-
updated(
|
|
46852
|
-
super.updated(
|
|
46977
|
+
updated(changed2) {
|
|
46978
|
+
super.updated(changed2);
|
|
46853
46979
|
const all3 = this.model?.approvals?.list() ?? [];
|
|
46854
46980
|
this.#tick(this.isConnected && all3.length > 0);
|
|
46855
46981
|
const dialog = this.renderRoot.querySelector("dialog");
|
|
@@ -47818,8 +47944,8 @@ var SliccBrowser = class extends ModelElement {
|
|
|
47818
47944
|
this.#shown = actionPage;
|
|
47819
47945
|
if (id) this.#pulse.delete(id);
|
|
47820
47946
|
}
|
|
47821
|
-
willUpdate(
|
|
47822
|
-
super.willUpdate(
|
|
47947
|
+
willUpdate(changed2) {
|
|
47948
|
+
super.willUpdate(changed2);
|
|
47823
47949
|
const chosen = this.#chosen.value;
|
|
47824
47950
|
if (chosen === void 0 || chosen === this.#focus) return;
|
|
47825
47951
|
if (chosen === null || this.model?.browser.list().some((tab) => tab.id === chosen))
|
|
@@ -48221,11 +48347,11 @@ var layouts = [
|
|
|
48221
48347
|
["unified", "Unified"],
|
|
48222
48348
|
["split", "Split"]
|
|
48223
48349
|
];
|
|
48224
|
-
function
|
|
48350
|
+
function folder2(path2) {
|
|
48225
48351
|
return path2.slice(0, path2.lastIndexOf("/")) || "/";
|
|
48226
48352
|
}
|
|
48227
48353
|
function where(change) {
|
|
48228
|
-
const at =
|
|
48354
|
+
const at = folder2(change.path);
|
|
48229
48355
|
if (!change.repo) return at;
|
|
48230
48356
|
if (at === change.repo) return "";
|
|
48231
48357
|
return at.startsWith(`${change.repo}/`) ? at.slice(change.repo.length + 1) : at;
|
|
@@ -48725,8 +48851,8 @@ var SliccLucide = class extends i2 {
|
|
|
48725
48851
|
this.name = "";
|
|
48726
48852
|
this.markup = "";
|
|
48727
48853
|
}
|
|
48728
|
-
willUpdate(
|
|
48729
|
-
if (!
|
|
48854
|
+
willUpdate(changed2) {
|
|
48855
|
+
if (!changed2.has("name")) return;
|
|
48730
48856
|
const name = this.name;
|
|
48731
48857
|
void icons2([name]).then((found) => {
|
|
48732
48858
|
if (this.name === name) this.markup = found[name] ?? "";
|
|
@@ -49265,8 +49391,8 @@ var SliccMemory = class extends ModelElement {
|
|
|
49265
49391
|
</li>`;
|
|
49266
49392
|
}
|
|
49267
49393
|
#scopes = [];
|
|
49268
|
-
willUpdate(
|
|
49269
|
-
super.willUpdate(
|
|
49394
|
+
willUpdate(changed2) {
|
|
49395
|
+
super.willUpdate(changed2);
|
|
49270
49396
|
const model = this.model;
|
|
49271
49397
|
this.#scopes = (model?.memory.scopes?.() ?? [
|
|
49272
49398
|
{ id: "global", label: "Shared" },
|
|
@@ -50037,10 +50163,10 @@ var SliccSecrets = class extends ThemedElement {
|
|
|
50037
50163
|
this.older = [];
|
|
50038
50164
|
this.more = null;
|
|
50039
50165
|
}
|
|
50040
|
-
willUpdate(
|
|
50041
|
-
super.willUpdate(
|
|
50042
|
-
const before =
|
|
50043
|
-
if (!
|
|
50166
|
+
willUpdate(changed2) {
|
|
50167
|
+
super.willUpdate(changed2);
|
|
50168
|
+
const before = changed2.get("model");
|
|
50169
|
+
if (!changed2.has("model") || before?.vault === this.model?.vault) return;
|
|
50044
50170
|
clearValues(this.renderRoot);
|
|
50045
50171
|
this.older = [];
|
|
50046
50172
|
this.more = null;
|
|
@@ -50529,11 +50655,11 @@ var SliccSecrets = class extends ThemedElement {
|
|
|
50529
50655
|
<ul class="secrets">${removed.map(row)}</ul>
|
|
50530
50656
|
</details>` : A}`;
|
|
50531
50657
|
}
|
|
50532
|
-
#refused(
|
|
50533
|
-
if (!
|
|
50658
|
+
#refused(refused3) {
|
|
50659
|
+
if (!refused3.length) return A;
|
|
50534
50660
|
return b`<h3 id="secrets-refused">Rules SLICC refused</h3>
|
|
50535
50661
|
<ul class="refused" aria-labelledby="secrets-refused" data-refused>
|
|
50536
|
-
${
|
|
50662
|
+
${refused3.map((item2) => b`<li data-refused-secret=${item2.secret}><span><code>${item2.secret}</code> to ${ruleLine(item2.rule)}</span><span class="muted">${item2.reason}</span></li>`)}
|
|
50537
50663
|
</ul>`;
|
|
50538
50664
|
}
|
|
50539
50665
|
#provider(id) {
|
|
@@ -50802,12 +50928,17 @@ var SliccSettings = class extends ThemedElement {
|
|
|
50802
50928
|
picking: { state: true },
|
|
50803
50929
|
adding: { state: true },
|
|
50804
50930
|
query: { state: true },
|
|
50805
|
-
filled: { state: true }
|
|
50931
|
+
filled: { state: true },
|
|
50932
|
+
developing: { state: true },
|
|
50933
|
+
developerError: { state: true }
|
|
50806
50934
|
};
|
|
50807
50935
|
#waits = new SignInWaits(() => this.requestUpdate());
|
|
50808
50936
|
#landing = null;
|
|
50809
50937
|
#away = false;
|
|
50810
50938
|
#bases = /* @__PURE__ */ new Map();
|
|
50939
|
+
#wanted = null;
|
|
50940
|
+
#developerPort;
|
|
50941
|
+
#call = 0;
|
|
50811
50942
|
#scroll = new ViewScroll(this, "settings:scroll", { scroller: () => this, rows: "[data-id]" });
|
|
50812
50943
|
constructor() {
|
|
50813
50944
|
super();
|
|
@@ -50820,6 +50951,8 @@ var SliccSettings = class extends ThemedElement {
|
|
|
50820
50951
|
this.adding = null;
|
|
50821
50952
|
this.query = "";
|
|
50822
50953
|
this.filled = /* @__PURE__ */ new Set();
|
|
50954
|
+
this.developing = false;
|
|
50955
|
+
this.developerError = null;
|
|
50823
50956
|
}
|
|
50824
50957
|
static styles = [
|
|
50825
50958
|
fieldStyles,
|
|
@@ -50943,6 +51076,21 @@ var SliccSettings = class extends ThemedElement {
|
|
|
50943
51076
|
.switched {
|
|
50944
51077
|
grid-column: 2;
|
|
50945
51078
|
}
|
|
51079
|
+
.developer {
|
|
51080
|
+
display: grid;
|
|
51081
|
+
gap: var(--swc-spacing-75);
|
|
51082
|
+
padding-block: var(--swc-spacing-75);
|
|
51083
|
+
}
|
|
51084
|
+
.toggle {
|
|
51085
|
+
display: flex;
|
|
51086
|
+
align-items: center;
|
|
51087
|
+
gap: var(--swc-spacing-100);
|
|
51088
|
+
}
|
|
51089
|
+
.developer .hint,
|
|
51090
|
+
.developer .failure {
|
|
51091
|
+
margin: 0;
|
|
51092
|
+
line-height: var(--swc-line-height-200);
|
|
51093
|
+
}
|
|
50946
51094
|
.failure,
|
|
50947
51095
|
.problem {
|
|
50948
51096
|
display: flex;
|
|
@@ -51142,8 +51290,17 @@ var SliccSettings = class extends ThemedElement {
|
|
|
51142
51290
|
update();
|
|
51143
51291
|
};
|
|
51144
51292
|
queueMicrotask(() => settleModels(model));
|
|
51293
|
+
if (model.updates !== this.#developerPort) {
|
|
51294
|
+
this.#developerPort = model.updates;
|
|
51295
|
+
this.#call += 1;
|
|
51296
|
+
this.developing = false;
|
|
51297
|
+
this.developerError = null;
|
|
51298
|
+
this.#wanted = null;
|
|
51299
|
+
}
|
|
51300
|
+
const developer = typeof model.updates?.setDeveloper === "function";
|
|
51145
51301
|
return [
|
|
51146
51302
|
...super.subscribe(model),
|
|
51303
|
+
...developer && model.updates ? [model.updates.on("items", update)] : [],
|
|
51147
51304
|
model.settings.on("settings", settle2),
|
|
51148
51305
|
model.settings.on("accounts", settle2),
|
|
51149
51306
|
model.settings.on("providers", update),
|
|
@@ -51180,6 +51337,42 @@ var SliccSettings = class extends ThemedElement {
|
|
|
51180
51337
|
#checked(event2) {
|
|
51181
51338
|
return event2.target.checked;
|
|
51182
51339
|
}
|
|
51340
|
+
async #developer(event2) {
|
|
51341
|
+
const port = this.model?.updates;
|
|
51342
|
+
const on2 = this.#checked(event2);
|
|
51343
|
+
const call = ++this.#call;
|
|
51344
|
+
this.#wanted = on2;
|
|
51345
|
+
this.developing = true;
|
|
51346
|
+
this.developerError = null;
|
|
51347
|
+
try {
|
|
51348
|
+
await port?.setDeveloper?.(on2);
|
|
51349
|
+
} catch (error) {
|
|
51350
|
+
if (call === this.#call) {
|
|
51351
|
+
this.developerError = error instanceof Error ? error.message : String(error);
|
|
51352
|
+
}
|
|
51353
|
+
} finally {
|
|
51354
|
+
if (call === this.#call) {
|
|
51355
|
+
this.#wanted = null;
|
|
51356
|
+
this.developing = false;
|
|
51357
|
+
}
|
|
51358
|
+
}
|
|
51359
|
+
}
|
|
51360
|
+
#developerRow() {
|
|
51361
|
+
const port = this.model?.updates;
|
|
51362
|
+
if (typeof port?.setDeveloper !== "function") return A;
|
|
51363
|
+
const on2 = port.developer?.() ?? false;
|
|
51364
|
+
return b`<div class="row">
|
|
51365
|
+
<span class="label">Updates</span>
|
|
51366
|
+
<div class="developer">
|
|
51367
|
+
<div class="toggle">
|
|
51368
|
+
<sp-switch .checked=${l(this.#wanted ?? on2)} ?disabled=${this.developing} aria-busy=${this.developing ? "true" : A} data-setting="developer" @change=${(event2) => void this.#developer(event2)}>Developer mode</sp-switch>
|
|
51369
|
+
${this.developing ? b`<swc-progress-circle size="s" indeterminate label="Saving developer mode" data-pending></swc-progress-circle>` : A}
|
|
51370
|
+
</div>
|
|
51371
|
+
<p class="hint">Check npm for newer releases that aren't certified yet, and offer them as betas in Install / Update.</p>
|
|
51372
|
+
${this.developerError ? b`<p class="failure" role="alert" data-error><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle><span>${this.developerError}</span></p>` : A}
|
|
51373
|
+
</div>
|
|
51374
|
+
</div>`;
|
|
51375
|
+
}
|
|
51183
51376
|
#cancelled = /* @__PURE__ */ new Set();
|
|
51184
51377
|
#busy(id, on2) {
|
|
51185
51378
|
const rest = [...this.pending].filter((candidate) => candidate !== id);
|
|
@@ -51892,10 +52085,10 @@ var SliccSettings = class extends ThemedElement {
|
|
|
51892
52085
|
this.adding = null;
|
|
51893
52086
|
this.picking = true;
|
|
51894
52087
|
}
|
|
51895
|
-
updated(
|
|
51896
|
-
super.updated(
|
|
52088
|
+
updated(changed2) {
|
|
52089
|
+
super.updated(changed2);
|
|
51897
52090
|
const dialog = this.#dialog;
|
|
51898
|
-
if (!
|
|
52091
|
+
if (!changed2.has("picking") || !dialog || dialog.open) return;
|
|
51899
52092
|
dialog.showModal();
|
|
51900
52093
|
const field = this.renderRoot.querySelector("sp-search");
|
|
51901
52094
|
void field.updateComplete.then(() => field.focus());
|
|
@@ -52142,6 +52335,7 @@ var SliccSettings = class extends ThemedElement {
|
|
|
52142
52335
|
<sp-menu-item value="split">Split</sp-menu-item>
|
|
52143
52336
|
</sp-picker>
|
|
52144
52337
|
</div>
|
|
52338
|
+
${this.#developerRow()}
|
|
52145
52339
|
</div>
|
|
52146
52340
|
<h2 data-section="accounts">Accounts</h2>
|
|
52147
52341
|
${this.#providerList(providers)}
|
|
@@ -52546,8 +52740,8 @@ var SliccSprinkle = class extends ThemedElement {
|
|
|
52546
52740
|
};
|
|
52547
52741
|
ask.call(port, id, "getState", []).then(settle2, () => settle2(null));
|
|
52548
52742
|
}
|
|
52549
|
-
willUpdate(
|
|
52550
|
-
super.willUpdate(
|
|
52743
|
+
willUpdate(changed2) {
|
|
52744
|
+
super.willUpdate(changed2);
|
|
52551
52745
|
const port = this.model?.sprinkles;
|
|
52552
52746
|
if (port?.call && (this.#held.port !== port || this.#held.id !== this.sprinkle))
|
|
52553
52747
|
this.#hold(port, port.call, this.sprinkle);
|
|
@@ -52596,8 +52790,8 @@ ${data.html}`;
|
|
|
52596
52790
|
this.#frame = { key: key2, doc: frameDocument(data.html, this.color, data.name, state2) };
|
|
52597
52791
|
return this.#frame.doc;
|
|
52598
52792
|
}
|
|
52599
|
-
updated(
|
|
52600
|
-
super.updated(
|
|
52793
|
+
updated(changed2) {
|
|
52794
|
+
super.updated(changed2);
|
|
52601
52795
|
const frame = this.renderRoot.querySelector("iframe");
|
|
52602
52796
|
frame?.contentWindow?.postMessage({ type: "slicc-theme", color: this.color }, "*");
|
|
52603
52797
|
if (frame && this.#focusLater) {
|
|
@@ -52982,13 +53176,13 @@ var SliccValueRequest = class extends ThemedElement {
|
|
|
52982
53176
|
if (this.model?.vault === vault) this.busy = false;
|
|
52983
53177
|
}
|
|
52984
53178
|
}
|
|
52985
|
-
willUpdate(
|
|
52986
|
-
super.willUpdate(
|
|
53179
|
+
willUpdate(changed2) {
|
|
53180
|
+
super.willUpdate(changed2);
|
|
52987
53181
|
const current = this.#current(this.#queue());
|
|
52988
53182
|
if ((current?.id ?? "") !== this.#shown) clearValues(this.renderRoot);
|
|
52989
53183
|
}
|
|
52990
|
-
updated(
|
|
52991
|
-
super.updated(
|
|
53184
|
+
updated(changed2) {
|
|
53185
|
+
super.updated(changed2);
|
|
52992
53186
|
const dialog = this.renderRoot.querySelector("dialog");
|
|
52993
53187
|
this.#tick(this.isConnected && !!dialog);
|
|
52994
53188
|
const key2 = dialog?.dataset.request ?? "";
|
|
@@ -72224,25 +72418,25 @@ var Diff = class {
|
|
|
72224
72418
|
const componentLen = components.length;
|
|
72225
72419
|
let componentPos = 0, newPos = 0, oldPos = 0;
|
|
72226
72420
|
for (; componentPos < componentLen; componentPos++) {
|
|
72227
|
-
const
|
|
72228
|
-
if (!
|
|
72229
|
-
if (!
|
|
72230
|
-
let value = newTokens.slice(newPos, newPos +
|
|
72421
|
+
const component2 = components[componentPos];
|
|
72422
|
+
if (!component2.removed) {
|
|
72423
|
+
if (!component2.added && this.useLongestToken) {
|
|
72424
|
+
let value = newTokens.slice(newPos, newPos + component2.count);
|
|
72231
72425
|
value = value.map(function(value2, i26) {
|
|
72232
72426
|
const oldValue = oldTokens[oldPos + i26];
|
|
72233
72427
|
return oldValue.length > value2.length ? oldValue : value2;
|
|
72234
72428
|
});
|
|
72235
|
-
|
|
72429
|
+
component2.value = this.join(value);
|
|
72236
72430
|
} else {
|
|
72237
|
-
|
|
72431
|
+
component2.value = this.join(newTokens.slice(newPos, newPos + component2.count));
|
|
72238
72432
|
}
|
|
72239
|
-
newPos +=
|
|
72240
|
-
if (!
|
|
72241
|
-
oldPos +=
|
|
72433
|
+
newPos += component2.count;
|
|
72434
|
+
if (!component2.added) {
|
|
72435
|
+
oldPos += component2.count;
|
|
72242
72436
|
}
|
|
72243
72437
|
} else {
|
|
72244
|
-
|
|
72245
|
-
oldPos +=
|
|
72438
|
+
component2.value = this.join(oldTokens.slice(oldPos, oldPos + component2.count));
|
|
72439
|
+
oldPos += component2.count;
|
|
72246
72440
|
}
|
|
72247
72441
|
}
|
|
72248
72442
|
return components;
|
|
@@ -81142,8 +81336,8 @@ var DockviewApi = class {
|
|
|
81142
81336
|
get messages() {
|
|
81143
81337
|
return resolveMessages(this.component.options.messages);
|
|
81144
81338
|
}
|
|
81145
|
-
constructor(
|
|
81146
|
-
this.component =
|
|
81339
|
+
constructor(component2) {
|
|
81340
|
+
this.component = component2;
|
|
81147
81341
|
}
|
|
81148
81342
|
/**
|
|
81149
81343
|
* Focus the component. Will try to focus an active panel if one exists.
|
|
@@ -82702,10 +82896,10 @@ var PanelApiImpl = class extends CompositeDisposable {
|
|
|
82702
82896
|
get height() {
|
|
82703
82897
|
return this._height;
|
|
82704
82898
|
}
|
|
82705
|
-
constructor(id,
|
|
82899
|
+
constructor(id, component2) {
|
|
82706
82900
|
super();
|
|
82707
82901
|
this.id = id;
|
|
82708
|
-
this.component =
|
|
82902
|
+
this.component = component2;
|
|
82709
82903
|
this._isFocused = false;
|
|
82710
82904
|
this._isActive = false;
|
|
82711
82905
|
this._isVisible = true;
|
|
@@ -82773,10 +82967,10 @@ var BasePanelView = class extends CompositeDisposable {
|
|
|
82773
82967
|
var _this$_params;
|
|
82774
82968
|
return (_this$_params = this._params) === null || _this$_params === void 0 ? void 0 : _this$_params.params;
|
|
82775
82969
|
}
|
|
82776
|
-
constructor(id,
|
|
82970
|
+
constructor(id, component2, api) {
|
|
82777
82971
|
super();
|
|
82778
82972
|
this.id = id;
|
|
82779
|
-
this.component =
|
|
82973
|
+
this.component = component2;
|
|
82780
82974
|
this.api = api;
|
|
82781
82975
|
this._height = 0;
|
|
82782
82976
|
this._width = 0;
|
|
@@ -88235,8 +88429,8 @@ var DockviewGroupPanelModel = class extends CompositeDisposable {
|
|
|
88235
88429
|
}
|
|
88236
88430
|
};
|
|
88237
88431
|
var GridviewPanelApiImpl = class extends PanelApiImpl {
|
|
88238
|
-
constructor(id,
|
|
88239
|
-
super(id,
|
|
88432
|
+
constructor(id, component2, panel) {
|
|
88433
|
+
super(id, component2);
|
|
88240
88434
|
this._onDidConstraintsChangeInternal = new Emitter2();
|
|
88241
88435
|
this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
|
|
88242
88436
|
this._onDidConstraintsChange = new Emitter2();
|
|
@@ -88310,8 +88504,8 @@ var GridviewPanel = class extends BasePanelView {
|
|
|
88310
88504
|
get isVisible() {
|
|
88311
88505
|
return this.api.isVisible;
|
|
88312
88506
|
}
|
|
88313
|
-
constructor(id,
|
|
88314
|
-
super(id,
|
|
88507
|
+
constructor(id, component2, options2, api) {
|
|
88508
|
+
super(id, component2, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id, component2));
|
|
88315
88509
|
this._evaluatedMinimumWidth = 0;
|
|
88316
88510
|
this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
88317
88511
|
this._evaluatedMinimumHeight = 0;
|
|
@@ -88654,8 +88848,8 @@ var DockviewPanelApiImpl = class extends GridviewPanelApiImpl {
|
|
|
88654
88848
|
get tabComponent() {
|
|
88655
88849
|
return this._tabComponent;
|
|
88656
88850
|
}
|
|
88657
|
-
constructor(panel, group, accessor,
|
|
88658
|
-
super(panel.id,
|
|
88851
|
+
constructor(panel, group, accessor, component2, tabComponent) {
|
|
88852
|
+
super(panel.id, component2);
|
|
88659
88853
|
this.panel = panel;
|
|
88660
88854
|
this.accessor = accessor;
|
|
88661
88855
|
this._onDidTitleChange = new Emitter2();
|
|
@@ -88787,7 +88981,7 @@ var DockviewPanel = class extends CompositeDisposable {
|
|
|
88787
88981
|
get maximumHeight() {
|
|
88788
88982
|
return this._maximumHeight;
|
|
88789
88983
|
}
|
|
88790
|
-
constructor(id,
|
|
88984
|
+
constructor(id, component2, tabComponent, accessor, containerApi, group, view, options2) {
|
|
88791
88985
|
super();
|
|
88792
88986
|
this.id = id;
|
|
88793
88987
|
this.accessor = accessor;
|
|
@@ -88800,7 +88994,7 @@ var DockviewPanel = class extends CompositeDisposable {
|
|
|
88800
88994
|
this._minimumHeight = options2.minimumHeight;
|
|
88801
88995
|
this._maximumWidth = options2.maximumWidth;
|
|
88802
88996
|
this._maximumHeight = options2.maximumHeight;
|
|
88803
|
-
this.api = new DockviewPanelApiImpl(this, this._group, accessor,
|
|
88997
|
+
this.api = new DockviewPanelApiImpl(this, this._group, accessor, component2, tabComponent);
|
|
88804
88998
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
88805
88999
|
accessor.setActivePanel(this);
|
|
88806
89000
|
}), this.api.onDidSizeChange((event2) => {
|
|
@@ -89011,11 +89205,11 @@ var DockviewPanelModel = class {
|
|
|
89011
89205
|
const name = componentName !== null && componentName !== void 0 ? componentName : this.accessor.options.defaultTabComponent;
|
|
89012
89206
|
if (name) {
|
|
89013
89207
|
if (this.accessor.options.createTabComponent) {
|
|
89014
|
-
const
|
|
89208
|
+
const component2 = this.accessor.options.createTabComponent({
|
|
89015
89209
|
id,
|
|
89016
89210
|
name
|
|
89017
89211
|
});
|
|
89018
|
-
if (
|
|
89212
|
+
if (component2) return component2;
|
|
89019
89213
|
else return new DefaultTab();
|
|
89020
89214
|
}
|
|
89021
89215
|
console.warn(`dockview: tabComponent '${componentName}' was not found. falling back to the default tab.`);
|
|
@@ -91259,10 +91453,10 @@ var DropTargetAnchorContainer = class extends CompositeDisposable {
|
|
|
91259
91453
|
},
|
|
91260
91454
|
getElements: (event2, outline) => {
|
|
91261
91455
|
this._cancelPendingClear();
|
|
91262
|
-
const
|
|
91456
|
+
const changed2 = this._outline !== outline;
|
|
91263
91457
|
this._outline = outline;
|
|
91264
91458
|
if (this._model) {
|
|
91265
|
-
this._model.changed =
|
|
91459
|
+
this._model.changed = changed2;
|
|
91266
91460
|
return this._model;
|
|
91267
91461
|
}
|
|
91268
91462
|
const container = this.createContainer();
|
|
@@ -91270,7 +91464,7 @@ var DropTargetAnchorContainer = class extends CompositeDisposable {
|
|
|
91270
91464
|
this._model = {
|
|
91271
91465
|
root: container,
|
|
91272
91466
|
overlay: anchor,
|
|
91273
|
-
changed
|
|
91467
|
+
changed: changed2
|
|
91274
91468
|
};
|
|
91275
91469
|
container.appendChild(anchor);
|
|
91276
91470
|
this.element.appendChild(container);
|