@wildwinter/app-shell 0.19.0 → 0.20.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
@@ -334,6 +334,11 @@ interface GameIdEditorOptions {
334
334
  validate?: (gameId: string) => boolean;
335
335
  /** Where the panel goes, for hosts that anchor it somewhere tight. */
336
336
  prefer?: "left" | "below" | "centre";
337
+ /** Chrome the panel must not cover, passed through to the anchored panel: an
338
+ * app with a problems bar along the bottom wants it usable while an address
339
+ * is being edited. Without this the editor is the one panel in a host that
340
+ * can land on top of its own bars. */
341
+ keepClear?: string[];
337
342
  }
338
343
  /**
339
344
  * Open it. Returns false when that click TOGGLED the panel shut, which is the
@@ -462,6 +467,12 @@ interface CommentsOptions {
462
467
  deleteMessage?: (threadId: string, index: number) => void;
463
468
  /** Where the panel sits: "centre" for a point on a canvas (see anchored.ts). */
464
469
  prefer?: "left" | "below" | "centre";
470
+ /**
471
+ * Chrome the panel must not cover. Defaults to `[".problembar"]`, which was
472
+ * hardcoded here and should not have been: one app's class name in shared
473
+ * code, and it misses any OTHER bar a host has. A second app arrived with two.
474
+ */
475
+ keepClear?: string[];
465
476
  /**
466
477
  * The text a thread is pinned to, shown above it as a quotation.
467
478
  *
package/dist/index.d.ts CHANGED
@@ -334,6 +334,11 @@ interface GameIdEditorOptions {
334
334
  validate?: (gameId: string) => boolean;
335
335
  /** Where the panel goes, for hosts that anchor it somewhere tight. */
336
336
  prefer?: "left" | "below" | "centre";
337
+ /** Chrome the panel must not cover, passed through to the anchored panel: an
338
+ * app with a problems bar along the bottom wants it usable while an address
339
+ * is being edited. Without this the editor is the one panel in a host that
340
+ * can land on top of its own bars. */
341
+ keepClear?: string[];
337
342
  }
338
343
  /**
339
344
  * Open it. Returns false when that click TOGGLED the panel shut, which is the
@@ -462,6 +467,12 @@ interface CommentsOptions {
462
467
  deleteMessage?: (threadId: string, index: number) => void;
463
468
  /** Where the panel sits: "centre" for a point on a canvas (see anchored.ts). */
464
469
  prefer?: "left" | "below" | "centre";
470
+ /**
471
+ * Chrome the panel must not cover. Defaults to `[".problembar"]`, which was
472
+ * hardcoded here and should not have been: one app's class name in shared
473
+ * code, and it misses any OTHER bar a host has. A second app arrived with two.
474
+ */
475
+ keepClear?: string[];
465
476
  /**
466
477
  * The text a thread is pinned to, shown above it as a quotation.
467
478
  *
package/dist/index.js CHANGED
@@ -705,7 +705,8 @@ function openGameIdEditor(opts) {
705
705
  className: "shell-id-editor",
706
706
  title: opts.title ?? "Game ID",
707
707
  width: 260,
708
- ...opts.prefer !== void 0 ? { prefer: opts.prefer } : {}
708
+ ...opts.prefer !== void 0 ? { prefer: opts.prefer } : {},
709
+ ...opts.keepClear !== void 0 ? { keepClear: opts.keepClear } : {}
709
710
  });
710
711
  if (!panel) return false;
711
712
  const input = el("input", "shell-id-input");
@@ -1004,7 +1005,7 @@ function openComments(opts) {
1004
1005
  // want it to the left; and never over the problems bar, which an author may
1005
1006
  // be stepping through while reading the thread.
1006
1007
  prefer: opts.prefer ?? "below",
1007
- keepClear: [".problembar"]
1008
+ keepClear: opts.keepClear ?? [".problembar"]
1008
1009
  });
1009
1010
  if (!panel) return;
1010
1011
  const { body, close } = panel;