@ai-ecoverse/slicc-spectrum 1.90.0 → 1.92.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.
@@ -6,7 +6,7 @@ import {
6
6
  DummySettings,
7
7
  clock,
8
8
  dummySettingsKey
9
- } from "./chunk-VRFAMBWK.js";
9
+ } from "./chunk-3CM23WFV.js";
10
10
  import {
11
11
  Emitter
12
12
  } from "./chunk-T5NHW4KC.js";
package/dist/slicc-ui.js CHANGED
@@ -39792,7 +39792,8 @@ var fieldStyles = i`
39792
39792
  font-size: var(--swc-font-size-75);
39793
39793
  color: var(--swc-neutral-subdued-content-color-default);
39794
39794
  }
39795
- .field input:not([type='checkbox']) {
39795
+ .field input:not([type='checkbox']),
39796
+ .field select {
39796
39797
  box-sizing: border-box;
39797
39798
  inline-size: 100%;
39798
39799
  font: inherit;
@@ -39803,7 +39804,8 @@ var fieldStyles = i`
39803
39804
  background: var(--swc-background-layer-2-color);
39804
39805
  color: inherit;
39805
39806
  }
39806
- .field input[aria-invalid='true'] {
39807
+ .field input[aria-invalid='true'],
39808
+ .field select[aria-invalid='true'] {
39807
39809
  border-color: var(--swc-negative-border-color-default);
39808
39810
  }
39809
39811
  .field input[type='file'] {
@@ -39820,6 +39822,7 @@ var fieldStyles = i`
39820
39822
  color: inherit;
39821
39823
  }
39822
39824
  .field input:focus-visible,
39825
+ .field select:focus-visible,
39823
39826
  input[type='checkbox']:focus-visible {
39824
39827
  outline: var(--swc-focus-indicator-thickness) solid var(--swc-focus-indicator-color);
39825
39828
  outline-offset: var(--swc-focus-ring-gap);
@@ -41851,6 +41854,8 @@ function auditLine(entry, devices) {
41851
41854
  return b`Removed`;
41852
41855
  case "restore":
41853
41856
  return b`Restored`;
41857
+ case "endpoints":
41858
+ return b`Removed custom model URLs an agent set, automatically: ${entry.purged.map((item2, index) => b`${index ? ", " : ""}${item2.provider} <code>${item2.url}</code>`)}`;
41854
41859
  case "refresh":
41855
41860
  return entry.grant ? b`Refreshed automatically with the sign-in <code>${entry.grant}</code>` : b`Refreshed automatically`;
41856
41861
  default:
@@ -42738,10 +42743,10 @@ var SliccSecrets = class extends ThemedElement {
42738
42743
  }
42739
42744
  #entry(entry, devices) {
42740
42745
  const date = new Date(entry.at);
42741
- const name = entry.type === "policy" ? null : entry.name;
42746
+ const name = entry.type === "policy" || entry.type === "endpoints" ? null : entry.name;
42742
42747
  return b`<li data-seq=${entry.seq} data-type=${entry.type}>
42743
42748
  <time datetime=${date.toISOString()} title=${date.toLocaleString("en-GB", { dateStyle: "medium", timeStyle: "short" })}>${since(entry.at)}</time>
42744
- <span class="what">${name ? b`<code>${name}</code> · ` : A}${auditLine(entry, devices)}${entry.type === "policy" || entry.type === "refresh" ? A : b` <span class="by">by ${who(entry)}</span>`}</span>
42749
+ <span class="what">${name ? b`<code>${name}</code> · ` : A}${auditLine(entry, devices)}${entry.type === "policy" || entry.type === "refresh" || entry.type === "endpoints" ? A : b` <span class="by">by ${who(entry)}</span>`}</span>
42745
42750
  </li>`;
42746
42751
  }
42747
42752
  #audit(vault, list5, entries, devices) {
@@ -43162,7 +43167,7 @@ var SliccSettings = class extends ThemedElement {
43162
43167
  this.problem = { id, field, message };
43163
43168
  void this.updateComplete.then(
43164
43169
  () => this.renderRoot.querySelector(
43165
- field === "value" ? ".key input[data-field=value]" : `.key input[data-account-field="${field}"]`
43170
+ field === "value" ? ".key input[data-field=value]" : `.key [data-account-field="${field}"]`
43166
43171
  )?.focus()
43167
43172
  );
43168
43173
  }
@@ -43170,12 +43175,10 @@ var SliccSettings = class extends ThemedElement {
43170
43175
  if (!account.fields?.length) return void 0;
43171
43176
  const values = {};
43172
43177
  for (const field of account.fields) {
43173
- const input = form.querySelector(
43174
- `input[data-account-field="${field.name}"]`
43175
- );
43178
+ const input = form.querySelector(`[data-account-field="${field.name}"]`);
43176
43179
  const value = input.value.trim();
43177
43180
  if (value) values[field.name] = value;
43178
- else if (field.required) {
43181
+ else if (field.required && field.options?.length !== 0) {
43179
43182
  this.#refuse(account.id, field.name, `${field.label} can\u2019t be empty`);
43180
43183
  return null;
43181
43184
  }
@@ -43242,7 +43245,26 @@ var SliccSettings = class extends ThemedElement {
43242
43245
  }
43243
43246
  #extra(account) {
43244
43247
  return (account.fields ?? []).map(
43245
- (field) => b`<label class="field"><span>${field.label}</span><input
43248
+ (field) => b`<label class="field">
43249
+ <span>${field.label}</span>${this.#control(account, field)}
43250
+ </label>
43251
+ ${this.#problem(account, field.name)}`
43252
+ );
43253
+ }
43254
+ #control(account, field) {
43255
+ if (field.options) {
43256
+ const chosen = field.value ?? field.options[0]?.value;
43257
+ return b`<select
43258
+ data-account-field=${field.name}
43259
+ ?disabled=${!field.options.length}
43260
+ aria-required=${field.required ? "true" : A}
43261
+ aria-invalid=${this.#invalid(account, field.name)}
43262
+ aria-describedby=${this.#described(account, field.name)}
43263
+ >
43264
+ ${field.options.map((option2) => b`<option value=${option2.value} ?selected=${option2.value === chosen}>${option2.label}</option>`)}
43265
+ </select>`;
43266
+ }
43267
+ return b`<input
43246
43268
  type="text"
43247
43269
  autocomplete="off"
43248
43270
  spellcheck="false"
@@ -43250,9 +43272,7 @@ var SliccSettings = class extends ThemedElement {
43250
43272
  aria-required=${field.required ? "true" : A}
43251
43273
  aria-invalid=${this.#invalid(account, field.name)}
43252
43274
  aria-describedby=${this.#described(account, field.name)}
43253
- /></label>
43254
- ${this.#problem(account, field.name)}`
43255
- );
43275
+ />`;
43256
43276
  }
43257
43277
  #unlock(vault) {
43258
43278
  return b`<div class="locked" data-locked>