@ai-ecoverse/slicc-spectrum 1.100.0 → 1.101.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/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(changed) {
8720
- if (changed.has("model") && this.isConnected) this.#bind();
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 changed = false;
19874
+ let changed2 = false;
19875
19875
  for (const path2 of removeEntries) {
19876
19876
  const resolved = resolveGitStatusPath(path2);
19877
19877
  if (resolved == null) continue;
19878
- changed = removeGitStatusPath({
19878
+ changed2 = removeGitStatusPath({
19879
19879
  canonicalPath: resolved.canonicalPath,
19880
19880
  changeCountByDirectoryPath,
19881
19881
  directoriesWithChanges,
19882
19882
  ignoredDirectoryPaths,
19883
19883
  statusByPath
19884
- }) || changed;
19884
+ }) || changed2;
19885
19885
  }
19886
19886
  for (const entry of setEntries) {
19887
19887
  const resolved = resolveGitStatusEntry(entry);
19888
19888
  if (resolved == null) continue;
19889
- changed = setGitStatusPath({
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
- }) || changed;
19897
+ }) || changed2;
19898
19898
  }
19899
- if (!changed) return previous3;
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(changed) {
32548
- if (changed.has("vault")) this.#drop();
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(changed) {
33198
- super.willUpdate(changed);
33199
- if (changed.has("popup") && this.popup?.kind !== "secret") clearValues(this.renderRoot);
33200
- if (changed.has("agent") && this.agent && this.model && this.agent !== this.#agent) {
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
- const edited = changed.has("value") || changed.has("attachments");
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 = { value: this.value, attachments: this.attachments };
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(changed) {
33233
- if (changed.has("popup"))
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, { value: this.value, attachments: this.attachments });
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, changed, extra, owners, stamp, pile) {
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 = changed ? model.settings.models().find((option2) => option2.id === message.model)?.label ?? message.model : "";
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 changed = !!next && next !== shown4;
35048
- if (changed) shown4 = next;
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
- changed,
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(changed) {
36611
- super.willUpdate(changed);
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 folder2 = base.endsWith("/") ? base : `${base}/`;
37967
- urls.push(new URL(`${kind}/dist/${name}.mjs`, new URL(folder2, page)).href);
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 refused2 = refusedNow(model.follow?.state());
39210
- const connection = `${connectionLabel[status2.connection]}${refused2 ? ", can\u2019t follow" : ""}`;
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=${refused2 ? "neutral" : connectionVariant[status2.connection]}>
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(changed) {
40022
- super.willUpdate(changed);
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((folder2) => this.#folder(port, device, folder2))}</ul>
40433
+ <ul aria-labelledby=${heading}>${folders2.map((folder3) => this.#folder(port, device, folder3))}</ul>
40396
40434
  </div>`;
40397
40435
  }
40398
- #folder(port, device, folder2) {
40399
- const action = `folder:${folder2.source}`;
40436
+ #folder(port, device, folder3) {
40437
+ const action = `folder:${folder3.source}`;
40400
40438
  const busy = this.busy === action;
40401
- const button = folder2.mounted ? port.ejectFolder ? b`<swc-button size="s" variant="secondary" fill-style="outline" data-action="eject-folder" data-id=${folder2.source} accessible-label=${`Eject ${folder2.mounted}`} ?pending=${busy} ?disabled=${this.#waiting(action)} @click=${() => this.#act(action, () => port.ejectFolder?.(folder2.source), "linksError")}>Eject</swc-button>` : A : port.mountFolder ? b`<swc-button size="s" variant="secondary" fill-style="outline" data-action="mount-folder" data-id=${folder2.source} accessible-label=${`Mount ${folder2.source}`} ?pending=${busy} ?disabled=${this.#waiting(action) || device.state !== "connected"} @click=${() => this.#act(action, () => this.#mountFolder(port, folder2.source), "linksError")}>Mount</swc-button>` : A;
40402
- return b`<li data-folder=${folder2.source} data-mounted=${folder2.mounted ? "yes" : "no"}>
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=${folder2.source}>${folder2.name}</code>
40406
- ${folder2.readonly ? b`<swc-badge size="s" variant="neutral" subtle data-readonly>Read-only</swc-badge>` : A}
40407
- ${folder2.mounted ? b`<span class="muted" data-mounted-at>Mounted at <code>${folder2.mounted}</code></span>` : A}
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(release2) {
44759
- const known = noted.get(release2);
44844
+ function releaseNotes(release3) {
44845
+ const known = noted.get(release3);
44760
44846
  if (known) return known;
44761
- const text5 = release2.notes ?? "";
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(release2.version.replace(/^v/, ""));
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: release2, body: body4, certified, cut };
44773
- noted.set(release2, notes2);
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((release2) => newer(release2.version, from) > 0 && newer(release2.version, to) <= 0).sort((a23, b13) => newer(b13.version, a23.version)).map(releaseNotes);
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((release2) => newer(release2.version, version2) === 0 && secure(release2.url));
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
  }
@@ -45080,6 +45180,21 @@ var SliccUpdates = class extends ModelElement {
45080
45180
  .release {
45081
45181
  min-width: 0;
45082
45182
  }
45183
+ .older-releases {
45184
+ display: grid;
45185
+ grid-template-columns: minmax(0, 1fr);
45186
+ gap: var(--swc-spacing-200);
45187
+ }
45188
+ .older-releases > details > summary {
45189
+ width: 100%;
45190
+ }
45191
+ .older-releases > details[open]:not(:last-child) {
45192
+ margin-block-end: var(--swc-spacing-200);
45193
+ }
45194
+ .older-releases > .older,
45195
+ .older-releases > details > :not(summary) {
45196
+ padding-inline-start: calc(var(--swc-workflow-icon-small) + var(--swc-spacing-75));
45197
+ }
45083
45198
  .title {
45084
45199
  margin: 0;
45085
45200
  font-size: var(--swc-font-size-100);
@@ -45242,9 +45357,13 @@ var SliccUpdates = class extends ModelElement {
45242
45357
  );
45243
45358
  }
45244
45359
  #actions(item2) {
45245
- if (!item2.actions.length) return A;
45360
+ const developer = typeof this.model?.updates?.setDeveloper === "function";
45361
+ const shown4 = item2.actions.filter(
45362
+ (action) => !betaActions.has(action) || developer && (action !== "install-beta" || item2.npm?.state === "offered")
45363
+ );
45364
+ if (!shown4.length) return A;
45246
45365
  const busy = this.pending.has(item2.id);
45247
- return b`<div class="actions">${item2.actions.map(
45366
+ return b`<div class="actions">${shown4.map(
45248
45367
  (action) => b`<swc-button
45249
45368
  size="m"
45250
45369
  variant="secondary"
@@ -45261,58 +45380,81 @@ var SliccUpdates = class extends ModelElement {
45261
45380
  const shown4 = date.toLocaleString("en-GB", { dateStyle: "medium", timeStyle: "short" });
45262
45381
  return b`<span>Checked <time datetime=${date.toISOString()}>${shown4}</time></span>`;
45263
45382
  }
45383
+ #title({ release: release3, certified }, label) {
45384
+ return b`${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}`;
45385
+ }
45386
+ #notes({ release: release3, body: body4, cut }, label, level) {
45387
+ return b`${body4 ? b`<div class="markdown">${markdown(body4, { strict: true, level })}</div>` : A}
45388
+ ${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}`;
45389
+ }
45390
+ #older(key2, entry, label, level) {
45391
+ const version2 = entry.release.version;
45392
+ if (!entry.body) {
45393
+ return b`<div class="release older" data-version=${version2}><p class="title" role="heading" aria-level=${level}>${this.#title(entry, label)}</p></div>`;
45394
+ }
45395
+ const id = `${key2}:${version2}`;
45396
+ return b`<details class="release" data-version=${version2} ?open=${this.#logs.has(id)} @toggle=${this.#logs.details(id)}>
45397
+ <summary data-action="release" aria-label=${`${label} ${version2} notes${entry.certified ? ", certified" : ""}`}>${chevron}<span class="title" role="heading" aria-level=${level}>${this.#title(entry, label)}</span></summary>
45398
+ ${this.#notes(entry, label, level)}
45399
+ </details>`;
45400
+ }
45264
45401
  #whatsNew(key2, label, entries, level) {
45265
45402
  if (!entries.length) return A;
45403
+ const [newest, ...older] = entries;
45266
45404
  return b`<details data-releases ?open=${this.#logs.has(key2)} @toggle=${this.#logs.details(key2)}>
45267
45405
  <summary data-action="whats-new">${chevron}What’s new</summary>
45268
- <div class="releases">${entries.map(
45269
- ({
45270
- release: release2,
45271
- body: body4,
45272
- certified,
45273
- cut
45274
- }) => b`<div class="release" data-version=${release2.version}>
45275
- <p class="title" role="heading" aria-level=${level}>${secure(release2.url) ? b`<a class="swc-Link swc-Link--standalone" href=${release2.url} target="_blank" rel="noopener noreferrer" data-action="release-notes" aria-label=${`${label} ${release2.version} release notes`}>${release2.version}</a>` : release2.version}${certified ? b`<swc-badge size="s" variant="positive" subtle data-certified>Certified</swc-badge>` : A}</p>
45276
- ${body4 ? b`<div class="markdown">${markdown(body4, { strict: true, level })}</div>` : A}
45277
- ${cut && secure(release2.url) ? b`<p class="cut" data-cut><a class="swc-Link swc-Link--standalone" href=${release2.url} target="_blank" rel="noopener noreferrer" data-action="release-notes" aria-label=${`Read the full notes for ${label} ${release2.version}`}>Read the full notes</a></p>` : A}
45278
- </div>`
45279
- )}</div>
45406
+ <div class="releases">
45407
+ <div class="release" data-version=${newest.release.version} data-newest>
45408
+ <p class="title" role="heading" aria-level=${level}>${this.#title(newest, label)}</p>
45409
+ ${this.#notes(newest, label, level)}
45410
+ </div>
45411
+ ${older.length ? b`<div class="older-releases">${older.map((entry) => this.#older(key2, entry, label, level))}</div>` : A}
45412
+ </div>
45280
45413
  </details>`;
45281
45414
  }
45282
45415
  #releaseLink(label, version2, releases, npm) {
45283
- const release2 = installed2(releases, version2);
45284
- if (release2) {
45285
- return b`<a class="swc-Link swc-Link--standalone" href=${release2.url} target="_blank" rel="noopener noreferrer" data-action="release-notes" aria-label=${`${label} ${version2} release notes`}>Release notes</a>`;
45416
+ const release3 = installed2(releases, version2);
45417
+ if (release3) {
45418
+ 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
45419
  }
45287
45420
  if (!npm) return A;
45288
45421
  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
45422
  }
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>`;
45423
+ #version(item2, meta) {
45424
+ 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
45425
  const link2 = item2.from !== null && (item2.to === null || item2.to === item2.from) ? this.#releaseLink(item2.label, item2.from, item2.releases) : A;
45293
45426
  return link2 === A ? text5 : b`<span class="installed">${text5}${link2}</span>`;
45294
45427
  }
45295
45428
  #item(item2) {
45296
- const [variant, state2] = states[item2.state];
45429
+ const [variant, state2] = item2.beta && resting.has(item2.state) ? betaLight : states[item2.state];
45297
45430
  const label = item2.state === "failed" && item2.from !== null ? "Update failed" : state2;
45298
45431
  const error = this.failures.get(item2.id) ?? item2.error;
45432
+ const developer = typeof this.model?.updates?.setDeveloper === "function";
45433
+ const shown4 = developer ? item2 : { ...item2, npm: null };
45434
+ const meta = npmMeta(shown4);
45435
+ const note = npmNote(shown4);
45436
+ const ahead = shown4.npm?.state === "offered" ? shown4.npm.latest ?? null : null;
45299
45437
  return b`<swc-divider size="s"></swc-divider>
45300
- <article data-id=${item2.id} data-state=${item2.state} aria-label=${item2.label}>
45438
+ <article data-id=${item2.id} data-state=${item2.state} data-npm=${item2.npm?.state ?? A} aria-label=${item2.label}>
45301
45439
  <div class="head">
45302
- <h2>${item2.label}</h2>
45440
+ <div class="title">
45441
+ <h2>${item2.label}</h2>
45442
+ ${item2.beta ? b`<swc-badge size="s" variant="notice" subtle data-beta>Beta</swc-badge>` : A}
45443
+ </div>
45303
45444
  <swc-status-light variant=${variant}>${label}</swc-status-light>
45304
45445
  </div>
45305
45446
  <div class="meta">
45306
- ${this.#version(item2)}
45447
+ ${this.#version(item2, meta)}
45307
45448
  ${item2.state === "starting" ? A : this.#checked(item2.checkedAt)}
45308
45449
  </div>
45450
+ ${note ? b`<p class="npm" data-npm-note>${note}</p>` : A}
45309
45451
  ${this.#progress(item2)}
45310
45452
  ${error ? b`<div class="error" role="alert">
45311
45453
  <swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle>
45312
45454
  <span>${error}</span>
45313
45455
  </div>` : A}
45314
45456
  ${this.#actions(item2)}
45315
- ${this.#whatsNew(`releases:item:${item2.id}`, item2.label, whatsNew(item2.releases, item2.from, item2.to), 3)}
45457
+ ${this.#whatsNew(`releases:item:${item2.id}`, item2.label, whatsNew(item2.releases, item2.from, ahead ?? item2.to), 3)}
45316
45458
  ${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
45459
  </article>`;
45318
45460
  }
@@ -45583,6 +45725,12 @@ var SliccApp = class extends ThemedElement {
45583
45725
  padding-inline: var(--swc-spacing-75);
45584
45726
  border-radius: var(--swc-corner-radius-small-default);
45585
45727
  }
45728
+ .update-status {
45729
+ display: inline-flex;
45730
+ align-items: center;
45731
+ gap: var(--swc-spacing-75);
45732
+ white-space: nowrap;
45733
+ }
45586
45734
  header .tabs:focus-visible {
45587
45735
  outline: var(--swc-focus-indicator-thickness) solid var(--swc-focus-indicator-color);
45588
45736
  }
@@ -45860,7 +46008,7 @@ var SliccApp = class extends ThemedElement {
45860
46008
  }
45861
46009
  }
45862
46010
  }
45863
- updated(changed) {
46011
+ updated(changed2) {
45864
46012
  const color2 = this.color;
45865
46013
  if (this.#painted && this.#painted !== color2) {
45866
46014
  const root2 = this.renderRoot;
@@ -45874,7 +46022,7 @@ var SliccApp = class extends ThemedElement {
45874
46022
  this.panels.quietly(() => {
45875
46023
  const layout = this.#started !== this.screen;
45876
46024
  if (layout) this.#start(model);
45877
- else if (changed.has("model")) this.#rebind(model);
46025
+ else if (changed2.has("model")) this.#rebind(model);
45878
46026
  this.#updates(layout);
45879
46027
  this.#retitle();
45880
46028
  });
@@ -46280,13 +46428,20 @@ var SliccApp = class extends ThemedElement {
46280
46428
  );
46281
46429
  }
46282
46430
  #updatesIndicator() {
46283
- const updates = this.#offers("updates") ? updatesStatus(this.model?.updates?.list() ?? []) : null;
46284
- if (!updates) return A;
46285
- const text5 = updates[0].toUpperCase() + updates.slice(1);
46286
- return b`<swc-action-button id="updates" quiet size="s" data-updates accessible-label=${`Install / Update: ${updates}`} @click=${() => this.show("updates")}>
46287
- <swc-status-light size="s" variant=${updatesVariant(updates)}>${this.screen === "phone" ? A : text5}</swc-status-light>
46431
+ const items = this.#offers("updates") ? this.model?.updates?.list() ?? [] : [];
46432
+ const updates = updatesStatus(items);
46433
+ const beta = betaText(items);
46434
+ if (!updates && !beta) return A;
46435
+ const text5 = updates ? updates[0].toUpperCase() + updates.slice(1) : null;
46436
+ const said = [updates, beta].filter(Boolean).join(". ");
46437
+ const tip = [text5, beta].filter(Boolean).join(". ");
46438
+ return b`<swc-action-button id="updates" quiet size="s" data-updates accessible-label=${`Install / Update: ${said}`} @click=${() => this.show("updates")}>
46439
+ <span class="update-status">
46440
+ ${updates ? b`<swc-status-light size="s" variant=${updatesVariant(updates)}>${this.screen === "phone" ? A : text5}</swc-status-light>` : A}
46441
+ ${beta ? b`<swc-badge size="s" variant="notice" subtle data-beta>Beta</swc-badge>` : A}
46442
+ </span>
46288
46443
  </swc-action-button>
46289
- <swc-tooltip for="updates" placement="bottom">${text5}</swc-tooltip>`;
46444
+ <swc-tooltip for="updates" placement="bottom">${tip}</swc-tooltip>`;
46290
46445
  }
46291
46446
  #tabsIndicator() {
46292
46447
  const state2 = this.model?.tabs?.state();
@@ -46831,8 +46986,8 @@ var SliccApprovals = class extends ModelElement {
46831
46986
  #current() {
46832
46987
  return this.model?.approvals?.decide ? waiting2(this.model, this.now).filter(({ id }) => !this.#closed.has(id)) : [];
46833
46988
  }
46834
- willUpdate(changed) {
46835
- super.willUpdate(changed);
46989
+ willUpdate(changed2) {
46990
+ super.willUpdate(changed2);
46836
46991
  const list6 = this.#current();
46837
46992
  const showing = this.#showing;
46838
46993
  if (showing && this.#pending.has(showing.id)) return;
@@ -46848,8 +47003,8 @@ var SliccApprovals = class extends ModelElement {
46848
47003
  this.#armed = false;
46849
47004
  this.#arming = setTimeout(() => this.#armed = true, this.arming);
46850
47005
  }
46851
- updated(changed) {
46852
- super.updated(changed);
47006
+ updated(changed2) {
47007
+ super.updated(changed2);
46853
47008
  const all3 = this.model?.approvals?.list() ?? [];
46854
47009
  this.#tick(this.isConnected && all3.length > 0);
46855
47010
  const dialog = this.renderRoot.querySelector("dialog");
@@ -47818,8 +47973,8 @@ var SliccBrowser = class extends ModelElement {
47818
47973
  this.#shown = actionPage;
47819
47974
  if (id) this.#pulse.delete(id);
47820
47975
  }
47821
- willUpdate(changed) {
47822
- super.willUpdate(changed);
47976
+ willUpdate(changed2) {
47977
+ super.willUpdate(changed2);
47823
47978
  const chosen = this.#chosen.value;
47824
47979
  if (chosen === void 0 || chosen === this.#focus) return;
47825
47980
  if (chosen === null || this.model?.browser.list().some((tab) => tab.id === chosen))
@@ -48221,11 +48376,11 @@ var layouts = [
48221
48376
  ["unified", "Unified"],
48222
48377
  ["split", "Split"]
48223
48378
  ];
48224
- function folder(path2) {
48379
+ function folder2(path2) {
48225
48380
  return path2.slice(0, path2.lastIndexOf("/")) || "/";
48226
48381
  }
48227
48382
  function where(change) {
48228
- const at = folder(change.path);
48383
+ const at = folder2(change.path);
48229
48384
  if (!change.repo) return at;
48230
48385
  if (at === change.repo) return "";
48231
48386
  return at.startsWith(`${change.repo}/`) ? at.slice(change.repo.length + 1) : at;
@@ -48725,8 +48880,8 @@ var SliccLucide = class extends i2 {
48725
48880
  this.name = "";
48726
48881
  this.markup = "";
48727
48882
  }
48728
- willUpdate(changed) {
48729
- if (!changed.has("name")) return;
48883
+ willUpdate(changed2) {
48884
+ if (!changed2.has("name")) return;
48730
48885
  const name = this.name;
48731
48886
  void icons2([name]).then((found) => {
48732
48887
  if (this.name === name) this.markup = found[name] ?? "";
@@ -49265,8 +49420,8 @@ var SliccMemory = class extends ModelElement {
49265
49420
  </li>`;
49266
49421
  }
49267
49422
  #scopes = [];
49268
- willUpdate(changed) {
49269
- super.willUpdate(changed);
49423
+ willUpdate(changed2) {
49424
+ super.willUpdate(changed2);
49270
49425
  const model = this.model;
49271
49426
  this.#scopes = (model?.memory.scopes?.() ?? [
49272
49427
  { id: "global", label: "Shared" },
@@ -50037,10 +50192,10 @@ var SliccSecrets = class extends ThemedElement {
50037
50192
  this.older = [];
50038
50193
  this.more = null;
50039
50194
  }
50040
- willUpdate(changed) {
50041
- super.willUpdate(changed);
50042
- const before = changed.get("model");
50043
- if (!changed.has("model") || before?.vault === this.model?.vault) return;
50195
+ willUpdate(changed2) {
50196
+ super.willUpdate(changed2);
50197
+ const before = changed2.get("model");
50198
+ if (!changed2.has("model") || before?.vault === this.model?.vault) return;
50044
50199
  clearValues(this.renderRoot);
50045
50200
  this.older = [];
50046
50201
  this.more = null;
@@ -50529,11 +50684,11 @@ var SliccSecrets = class extends ThemedElement {
50529
50684
  <ul class="secrets">${removed.map(row)}</ul>
50530
50685
  </details>` : A}`;
50531
50686
  }
50532
- #refused(refused2) {
50533
- if (!refused2.length) return A;
50687
+ #refused(refused3) {
50688
+ if (!refused3.length) return A;
50534
50689
  return b`<h3 id="secrets-refused">Rules SLICC refused</h3>
50535
50690
  <ul class="refused" aria-labelledby="secrets-refused" data-refused>
50536
- ${refused2.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>`)}
50691
+ ${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
50692
  </ul>`;
50538
50693
  }
50539
50694
  #provider(id) {
@@ -50802,12 +50957,17 @@ var SliccSettings = class extends ThemedElement {
50802
50957
  picking: { state: true },
50803
50958
  adding: { state: true },
50804
50959
  query: { state: true },
50805
- filled: { state: true }
50960
+ filled: { state: true },
50961
+ developing: { state: true },
50962
+ developerError: { state: true }
50806
50963
  };
50807
50964
  #waits = new SignInWaits(() => this.requestUpdate());
50808
50965
  #landing = null;
50809
50966
  #away = false;
50810
50967
  #bases = /* @__PURE__ */ new Map();
50968
+ #wanted = null;
50969
+ #developerPort;
50970
+ #call = 0;
50811
50971
  #scroll = new ViewScroll(this, "settings:scroll", { scroller: () => this, rows: "[data-id]" });
50812
50972
  constructor() {
50813
50973
  super();
@@ -50820,6 +50980,8 @@ var SliccSettings = class extends ThemedElement {
50820
50980
  this.adding = null;
50821
50981
  this.query = "";
50822
50982
  this.filled = /* @__PURE__ */ new Set();
50983
+ this.developing = false;
50984
+ this.developerError = null;
50823
50985
  }
50824
50986
  static styles = [
50825
50987
  fieldStyles,
@@ -50943,6 +51105,21 @@ var SliccSettings = class extends ThemedElement {
50943
51105
  .switched {
50944
51106
  grid-column: 2;
50945
51107
  }
51108
+ .developer {
51109
+ display: grid;
51110
+ gap: var(--swc-spacing-75);
51111
+ padding-block: var(--swc-spacing-75);
51112
+ }
51113
+ .toggle {
51114
+ display: flex;
51115
+ align-items: center;
51116
+ gap: var(--swc-spacing-100);
51117
+ }
51118
+ .developer .hint,
51119
+ .developer .failure {
51120
+ margin: 0;
51121
+ line-height: var(--swc-line-height-200);
51122
+ }
50946
51123
  .failure,
50947
51124
  .problem {
50948
51125
  display: flex;
@@ -51142,8 +51319,17 @@ var SliccSettings = class extends ThemedElement {
51142
51319
  update();
51143
51320
  };
51144
51321
  queueMicrotask(() => settleModels(model));
51322
+ if (model.updates !== this.#developerPort) {
51323
+ this.#developerPort = model.updates;
51324
+ this.#call += 1;
51325
+ this.developing = false;
51326
+ this.developerError = null;
51327
+ this.#wanted = null;
51328
+ }
51329
+ const developer = typeof model.updates?.setDeveloper === "function";
51145
51330
  return [
51146
51331
  ...super.subscribe(model),
51332
+ ...developer && model.updates ? [model.updates.on("items", update)] : [],
51147
51333
  model.settings.on("settings", settle2),
51148
51334
  model.settings.on("accounts", settle2),
51149
51335
  model.settings.on("providers", update),
@@ -51180,6 +51366,42 @@ var SliccSettings = class extends ThemedElement {
51180
51366
  #checked(event2) {
51181
51367
  return event2.target.checked;
51182
51368
  }
51369
+ async #developer(event2) {
51370
+ const port = this.model?.updates;
51371
+ const on2 = this.#checked(event2);
51372
+ const call = ++this.#call;
51373
+ this.#wanted = on2;
51374
+ this.developing = true;
51375
+ this.developerError = null;
51376
+ try {
51377
+ await port?.setDeveloper?.(on2);
51378
+ } catch (error) {
51379
+ if (call === this.#call) {
51380
+ this.developerError = error instanceof Error ? error.message : String(error);
51381
+ }
51382
+ } finally {
51383
+ if (call === this.#call) {
51384
+ this.#wanted = null;
51385
+ this.developing = false;
51386
+ }
51387
+ }
51388
+ }
51389
+ #developerRow() {
51390
+ const port = this.model?.updates;
51391
+ if (typeof port?.setDeveloper !== "function") return A;
51392
+ const on2 = port.developer?.() ?? false;
51393
+ return b`<div class="row">
51394
+ <span class="label">Updates</span>
51395
+ <div class="developer">
51396
+ <div class="toggle">
51397
+ <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>
51398
+ ${this.developing ? b`<swc-progress-circle size="s" indeterminate label="Saving developer mode" data-pending></swc-progress-circle>` : A}
51399
+ </div>
51400
+ <p class="hint">Check npm for newer releases that aren't certified yet, and offer them as betas in Install / Update.</p>
51401
+ ${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}
51402
+ </div>
51403
+ </div>`;
51404
+ }
51183
51405
  #cancelled = /* @__PURE__ */ new Set();
51184
51406
  #busy(id, on2) {
51185
51407
  const rest = [...this.pending].filter((candidate) => candidate !== id);
@@ -51892,10 +52114,10 @@ var SliccSettings = class extends ThemedElement {
51892
52114
  this.adding = null;
51893
52115
  this.picking = true;
51894
52116
  }
51895
- updated(changed) {
51896
- super.updated(changed);
52117
+ updated(changed2) {
52118
+ super.updated(changed2);
51897
52119
  const dialog = this.#dialog;
51898
- if (!changed.has("picking") || !dialog || dialog.open) return;
52120
+ if (!changed2.has("picking") || !dialog || dialog.open) return;
51899
52121
  dialog.showModal();
51900
52122
  const field = this.renderRoot.querySelector("sp-search");
51901
52123
  void field.updateComplete.then(() => field.focus());
@@ -52142,6 +52364,7 @@ var SliccSettings = class extends ThemedElement {
52142
52364
  <sp-menu-item value="split">Split</sp-menu-item>
52143
52365
  </sp-picker>
52144
52366
  </div>
52367
+ ${this.#developerRow()}
52145
52368
  </div>
52146
52369
  <h2 data-section="accounts">Accounts</h2>
52147
52370
  ${this.#providerList(providers)}
@@ -52546,8 +52769,8 @@ var SliccSprinkle = class extends ThemedElement {
52546
52769
  };
52547
52770
  ask.call(port, id, "getState", []).then(settle2, () => settle2(null));
52548
52771
  }
52549
- willUpdate(changed) {
52550
- super.willUpdate(changed);
52772
+ willUpdate(changed2) {
52773
+ super.willUpdate(changed2);
52551
52774
  const port = this.model?.sprinkles;
52552
52775
  if (port?.call && (this.#held.port !== port || this.#held.id !== this.sprinkle))
52553
52776
  this.#hold(port, port.call, this.sprinkle);
@@ -52596,8 +52819,8 @@ ${data.html}`;
52596
52819
  this.#frame = { key: key2, doc: frameDocument(data.html, this.color, data.name, state2) };
52597
52820
  return this.#frame.doc;
52598
52821
  }
52599
- updated(changed) {
52600
- super.updated(changed);
52822
+ updated(changed2) {
52823
+ super.updated(changed2);
52601
52824
  const frame = this.renderRoot.querySelector("iframe");
52602
52825
  frame?.contentWindow?.postMessage({ type: "slicc-theme", color: this.color }, "*");
52603
52826
  if (frame && this.#focusLater) {
@@ -52982,13 +53205,13 @@ var SliccValueRequest = class extends ThemedElement {
52982
53205
  if (this.model?.vault === vault) this.busy = false;
52983
53206
  }
52984
53207
  }
52985
- willUpdate(changed) {
52986
- super.willUpdate(changed);
53208
+ willUpdate(changed2) {
53209
+ super.willUpdate(changed2);
52987
53210
  const current = this.#current(this.#queue());
52988
53211
  if ((current?.id ?? "") !== this.#shown) clearValues(this.renderRoot);
52989
53212
  }
52990
- updated(changed) {
52991
- super.updated(changed);
53213
+ updated(changed2) {
53214
+ super.updated(changed2);
52992
53215
  const dialog = this.renderRoot.querySelector("dialog");
52993
53216
  this.#tick(this.isConnected && !!dialog);
52994
53217
  const key2 = dialog?.dataset.request ?? "";
@@ -72224,25 +72447,25 @@ var Diff = class {
72224
72447
  const componentLen = components.length;
72225
72448
  let componentPos = 0, newPos = 0, oldPos = 0;
72226
72449
  for (; componentPos < componentLen; componentPos++) {
72227
- const component = components[componentPos];
72228
- if (!component.removed) {
72229
- if (!component.added && this.useLongestToken) {
72230
- let value = newTokens.slice(newPos, newPos + component.count);
72450
+ const component2 = components[componentPos];
72451
+ if (!component2.removed) {
72452
+ if (!component2.added && this.useLongestToken) {
72453
+ let value = newTokens.slice(newPos, newPos + component2.count);
72231
72454
  value = value.map(function(value2, i26) {
72232
72455
  const oldValue = oldTokens[oldPos + i26];
72233
72456
  return oldValue.length > value2.length ? oldValue : value2;
72234
72457
  });
72235
- component.value = this.join(value);
72458
+ component2.value = this.join(value);
72236
72459
  } else {
72237
- component.value = this.join(newTokens.slice(newPos, newPos + component.count));
72460
+ component2.value = this.join(newTokens.slice(newPos, newPos + component2.count));
72238
72461
  }
72239
- newPos += component.count;
72240
- if (!component.added) {
72241
- oldPos += component.count;
72462
+ newPos += component2.count;
72463
+ if (!component2.added) {
72464
+ oldPos += component2.count;
72242
72465
  }
72243
72466
  } else {
72244
- component.value = this.join(oldTokens.slice(oldPos, oldPos + component.count));
72245
- oldPos += component.count;
72467
+ component2.value = this.join(oldTokens.slice(oldPos, oldPos + component2.count));
72468
+ oldPos += component2.count;
72246
72469
  }
72247
72470
  }
72248
72471
  return components;
@@ -81142,8 +81365,8 @@ var DockviewApi = class {
81142
81365
  get messages() {
81143
81366
  return resolveMessages(this.component.options.messages);
81144
81367
  }
81145
- constructor(component) {
81146
- this.component = component;
81368
+ constructor(component2) {
81369
+ this.component = component2;
81147
81370
  }
81148
81371
  /**
81149
81372
  * Focus the component. Will try to focus an active panel if one exists.
@@ -82702,10 +82925,10 @@ var PanelApiImpl = class extends CompositeDisposable {
82702
82925
  get height() {
82703
82926
  return this._height;
82704
82927
  }
82705
- constructor(id, component) {
82928
+ constructor(id, component2) {
82706
82929
  super();
82707
82930
  this.id = id;
82708
- this.component = component;
82931
+ this.component = component2;
82709
82932
  this._isFocused = false;
82710
82933
  this._isActive = false;
82711
82934
  this._isVisible = true;
@@ -82773,10 +82996,10 @@ var BasePanelView = class extends CompositeDisposable {
82773
82996
  var _this$_params;
82774
82997
  return (_this$_params = this._params) === null || _this$_params === void 0 ? void 0 : _this$_params.params;
82775
82998
  }
82776
- constructor(id, component, api) {
82999
+ constructor(id, component2, api) {
82777
83000
  super();
82778
83001
  this.id = id;
82779
- this.component = component;
83002
+ this.component = component2;
82780
83003
  this.api = api;
82781
83004
  this._height = 0;
82782
83005
  this._width = 0;
@@ -88235,8 +88458,8 @@ var DockviewGroupPanelModel = class extends CompositeDisposable {
88235
88458
  }
88236
88459
  };
88237
88460
  var GridviewPanelApiImpl = class extends PanelApiImpl {
88238
- constructor(id, component, panel) {
88239
- super(id, component);
88461
+ constructor(id, component2, panel) {
88462
+ super(id, component2);
88240
88463
  this._onDidConstraintsChangeInternal = new Emitter2();
88241
88464
  this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
88242
88465
  this._onDidConstraintsChange = new Emitter2();
@@ -88310,8 +88533,8 @@ var GridviewPanel = class extends BasePanelView {
88310
88533
  get isVisible() {
88311
88534
  return this.api.isVisible;
88312
88535
  }
88313
- constructor(id, component, options2, api) {
88314
- super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id, component));
88536
+ constructor(id, component2, options2, api) {
88537
+ super(id, component2, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id, component2));
88315
88538
  this._evaluatedMinimumWidth = 0;
88316
88539
  this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
88317
88540
  this._evaluatedMinimumHeight = 0;
@@ -88654,8 +88877,8 @@ var DockviewPanelApiImpl = class extends GridviewPanelApiImpl {
88654
88877
  get tabComponent() {
88655
88878
  return this._tabComponent;
88656
88879
  }
88657
- constructor(panel, group, accessor, component, tabComponent) {
88658
- super(panel.id, component);
88880
+ constructor(panel, group, accessor, component2, tabComponent) {
88881
+ super(panel.id, component2);
88659
88882
  this.panel = panel;
88660
88883
  this.accessor = accessor;
88661
88884
  this._onDidTitleChange = new Emitter2();
@@ -88787,7 +89010,7 @@ var DockviewPanel = class extends CompositeDisposable {
88787
89010
  get maximumHeight() {
88788
89011
  return this._maximumHeight;
88789
89012
  }
88790
- constructor(id, component, tabComponent, accessor, containerApi, group, view, options2) {
89013
+ constructor(id, component2, tabComponent, accessor, containerApi, group, view, options2) {
88791
89014
  super();
88792
89015
  this.id = id;
88793
89016
  this.accessor = accessor;
@@ -88800,7 +89023,7 @@ var DockviewPanel = class extends CompositeDisposable {
88800
89023
  this._minimumHeight = options2.minimumHeight;
88801
89024
  this._maximumWidth = options2.maximumWidth;
88802
89025
  this._maximumHeight = options2.maximumHeight;
88803
- this.api = new DockviewPanelApiImpl(this, this._group, accessor, component, tabComponent);
89026
+ this.api = new DockviewPanelApiImpl(this, this._group, accessor, component2, tabComponent);
88804
89027
  this.addDisposables(this.api.onActiveChange(() => {
88805
89028
  accessor.setActivePanel(this);
88806
89029
  }), this.api.onDidSizeChange((event2) => {
@@ -89011,11 +89234,11 @@ var DockviewPanelModel = class {
89011
89234
  const name = componentName !== null && componentName !== void 0 ? componentName : this.accessor.options.defaultTabComponent;
89012
89235
  if (name) {
89013
89236
  if (this.accessor.options.createTabComponent) {
89014
- const component = this.accessor.options.createTabComponent({
89237
+ const component2 = this.accessor.options.createTabComponent({
89015
89238
  id,
89016
89239
  name
89017
89240
  });
89018
- if (component) return component;
89241
+ if (component2) return component2;
89019
89242
  else return new DefaultTab();
89020
89243
  }
89021
89244
  console.warn(`dockview: tabComponent '${componentName}' was not found. falling back to the default tab.`);
@@ -91259,10 +91482,10 @@ var DropTargetAnchorContainer = class extends CompositeDisposable {
91259
91482
  },
91260
91483
  getElements: (event2, outline) => {
91261
91484
  this._cancelPendingClear();
91262
- const changed = this._outline !== outline;
91485
+ const changed2 = this._outline !== outline;
91263
91486
  this._outline = outline;
91264
91487
  if (this._model) {
91265
- this._model.changed = changed;
91488
+ this._model.changed = changed2;
91266
91489
  return this._model;
91267
91490
  }
91268
91491
  const container = this.createContainer();
@@ -91270,7 +91493,7 @@ var DropTargetAnchorContainer = class extends CompositeDisposable {
91270
91493
  this._model = {
91271
91494
  root: container,
91272
91495
  overlay: anchor,
91273
- changed
91496
+ changed: changed2
91274
91497
  };
91275
91498
  container.appendChild(anchor);
91276
91499
  this.element.appendChild(container);