@wildwinter/app-shell 0.55.0 → 0.56.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/index.d.cts CHANGED
@@ -796,7 +796,8 @@ declare function vcBadgeFor(s: ShardVc | undefined): VcBadge | null;
796
796
  declare function paintVcBadges(root: ParentNode, shards: VcMap): void;
797
797
  /** Turn a region's editing controls off - or back on, but only the ones WE
798
798
  * turned off, so a control disabled for its own reasons (the first card's
799
- * "previous", a redraw-turns box on "always") stays disabled. */
799
+ * "previous", a redraw-turns box on "always") stays disabled. `staysLive` is
800
+ * the app's own reading controls; the shell's (ALWAYS_LIVE) stay live too. */
800
801
  declare function lockControls(host: HTMLElement, off: boolean, staysLive: string): void;
801
802
  /** The notice a locked document opens with: who holds it, and why nothing types. */
802
803
  declare function lockNotice(holders: string[]): HTMLElement;
package/dist/index.d.ts CHANGED
@@ -796,7 +796,8 @@ declare function vcBadgeFor(s: ShardVc | undefined): VcBadge | null;
796
796
  declare function paintVcBadges(root: ParentNode, shards: VcMap): void;
797
797
  /** Turn a region's editing controls off - or back on, but only the ones WE
798
798
  * turned off, so a control disabled for its own reasons (the first card's
799
- * "previous", a redraw-turns box on "always") stays disabled. */
799
+ * "previous", a redraw-turns box on "always") stays disabled. `staysLive` is
800
+ * the app's own reading controls; the shell's (ALWAYS_LIVE) stay live too. */
800
801
  declare function lockControls(host: HTMLElement, off: boolean, staysLive: string): void;
801
802
  /** The notice a locked document opens with: who holds it, and why nothing types. */
802
803
  declare function lockNotice(holders: string[]): HTMLElement;
package/dist/index.js CHANGED
@@ -554,11 +554,12 @@ function paintVcBadges(root, shards) {
554
554
  host.append(span);
555
555
  });
556
556
  }
557
+ var ALWAYS_LIVE = ".shell-fold-cap";
557
558
  function lockControls(host, off, staysLive) {
558
559
  host.classList.toggle("vc-readonly", off);
559
560
  if (off) {
560
561
  host.querySelectorAll("input, textarea, select, button").forEach((c) => {
561
- if (c.disabled || staysLive !== "" && c.matches(staysLive)) return;
562
+ if (c.disabled || c.matches(ALWAYS_LIVE) || staysLive !== "" && c.matches(staysLive)) return;
562
563
  c.disabled = true;
563
564
  c.classList.add("vc-off");
564
565
  });