@ai-ecoverse/slicc-spectrum 1.28.1 → 1.29.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/dist/slicc-ui.js CHANGED
@@ -13930,6 +13930,7 @@ e25("swc-icon-alert-triangle", o51);
13930
13930
  // src/app/updates.ts
13931
13931
  var states = {
13932
13932
  current: ["neutral", "Up to date"],
13933
+ queued: ["neutral", "Waiting"],
13933
13934
  checking: ["info", "Checking"],
13934
13935
  downloading: ["info", "Downloading"],
13935
13936
  linking: ["info", "Linking"],
@@ -14193,7 +14194,8 @@ var SliccUpdates = class extends ModelElement {
14193
14194
  return b`<span>Checked <time datetime=${date.toISOString()}>${shown}</time></span>`;
14194
14195
  }
14195
14196
  #item(item2) {
14196
- const [variant, label] = states[item2.state];
14197
+ const [variant, state] = states[item2.state];
14198
+ const label = item2.state === "failed" && item2.from !== null ? "Update failed" : state;
14197
14199
  const error = this.failures.get(item2.id) ?? item2.error;
14198
14200
  return b`<swc-divider size="s"></swc-divider>
14199
14201
  <article data-id=${item2.id} data-state=${item2.state} aria-label=${item2.label}>
@@ -14251,6 +14253,30 @@ function updatesVariant(status2) {
14251
14253
  if (status2.startsWith("updating")) return "info";
14252
14254
  return "notice";
14253
14255
  }
14256
+ var overscrollLocks = /* @__PURE__ */ new WeakMap();
14257
+ function lockOverscroll(document2) {
14258
+ const lock = overscrollLocks.get(document2) ?? { count: 0, restore: () => {
14259
+ } };
14260
+ overscrollLocks.set(document2, lock);
14261
+ if (lock.count === 0) {
14262
+ const saved = [document2.documentElement, document2.body].flatMap(
14263
+ ({ style }) => ["overscroll-behavior-x", "overscroll-behavior-y"].map((name) => {
14264
+ const value = style.getPropertyValue(name);
14265
+ const priority = style.getPropertyPriority(name);
14266
+ style.setProperty(name, "none", "important");
14267
+ return () => style.setProperty(name, value, priority);
14268
+ })
14269
+ );
14270
+ lock.restore = () => {
14271
+ for (const restore of saved) restore();
14272
+ };
14273
+ }
14274
+ lock.count += 1;
14275
+ return () => {
14276
+ lock.count -= 1;
14277
+ if (lock.count === 0) lock.restore();
14278
+ };
14279
+ }
14254
14280
  var SliccApp = class extends ThemedElement {
14255
14281
  static properties = {
14256
14282
  ...ThemedElement.properties,
@@ -14268,6 +14294,7 @@ var SliccApp = class extends ThemedElement {
14268
14294
  #started = null;
14269
14295
  #saving = false;
14270
14296
  #updatesPort;
14297
+ #unlock;
14271
14298
  #updatesVisibility = null;
14272
14299
  constructor() {
14273
14300
  super();
@@ -14456,12 +14483,14 @@ var SliccApp = class extends ThemedElement {
14456
14483
  this.ownerDocument.addEventListener("keydown", this.#keydown, true);
14457
14484
  this.#fonts();
14458
14485
  installProperties(this.ownerDocument);
14486
+ this.#unlock = lockOverscroll(this.ownerDocument);
14459
14487
  this.#resize = new ResizeObserver(() => this.#measure());
14460
14488
  this.#resize.observe(this);
14461
14489
  }
14462
14490
  disconnectedCallback() {
14463
14491
  super.disconnectedCallback();
14464
14492
  this.ownerDocument.removeEventListener("keydown", this.#keydown, true);
14493
+ this.#unlock();
14465
14494
  this.#resize?.disconnect();
14466
14495
  }
14467
14496
  get fontBase() {