@reportwright/viewer 0.13.2-rc.1 → 0.13.2-rc.2

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/designer.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  setShadowStyles,
14
14
  t,
15
15
  uiFontCss
16
- } from "./chunk-2KNQVFKW.js";
16
+ } from "./chunk-4XZRLUHN.js";
17
17
  import {
18
18
  customFonts,
19
19
  fontsBase,
@@ -8246,7 +8246,7 @@ function minSize(it) {
8246
8246
  }
8247
8247
  for (const k of ["w", "h"]) if (typeof it[k] === "number" && it[k] < 1) it[k] = 1;
8248
8248
  }
8249
- function moveItems(ids, dx, dy) {
8249
+ function moveItems(ids, dx, dy, { nudge = false } = {}) {
8250
8250
  if (!dx && !dy) return;
8251
8251
  if (S().cells && wouldOverlap(S().def, ids, (it) => ({ x: it.x + dx, y: it.y + dy, w: it.w, h: it.h }))) {
8252
8252
  S().setUi({ saveError: CELL_TAKEN() });
@@ -8258,7 +8258,7 @@ function moveItems(ids, dx, dy) {
8258
8258
  const f = findItem(d, id);
8259
8259
  if (!f) continue;
8260
8260
  const room = roomFor(d, f);
8261
- f.item.x = round(clamp(f.item.x + dx, 0, Math.max(0, room - f.item.w)));
8261
+ f.item.x = round(nudge ? Math.max(0, f.item.x + dx) : clamp(f.item.x + dx, 0, Math.max(0, room - f.item.w)));
8262
8262
  f.item.y = round(Math.max(0, f.item.y + dy));
8263
8263
  growToFit(d, f);
8264
8264
  }
@@ -35023,7 +35023,7 @@ function DesignerIn({ id, initial, rev = null, lang: langIn, embed = null, user
35023
35023
  const [dx, dy] = arrows[e.key];
35024
35024
  const s = st();
35025
35025
  s.lastKey = null;
35026
- moveItems(s.sel.ids, dx * step, dy * step);
35026
+ moveItems(s.sel.ids, dx * step, dy * step, { nudge: true });
35027
35027
  }
35028
35028
  };
35029
35029
  const onLeave = (e) => {
@@ -35597,6 +35597,7 @@ a.cell-name:hover { color: var(--accent); }
35597
35597
  .vparams { width: 240px; padding: 14px; border-inline-end: 1px solid var(--line); background: var(--panel); display: grid; gap: 12px; align-content: start; overflow: auto; }
35598
35598
  .vparams h3 { margin: 0; font-size: var(--fs-sm); text-transform: uppercase; font-weight: var(--fw-strong); letter-spacing: var(--track-caps); color: var(--muted); }
35599
35599
  .vpages { overflow: auto; padding: 24px 16px 48px; display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 0; }
35600
+ .vpages:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; } /* E11: keyboard-scrollable; inset, so overflow does not clip it */
35600
35601
  .vpage { background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow-page); flex: none; content-visibility: auto; contain-intrinsic-size: auto 1100px; }
35601
35602
  .vpage svg { display: block; width: 100%; height: 100%; }
35602
35603
  .vmsg { margin: 40px auto; max-width: 520px; padding: 16px 18px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }