strata-react 1.3.28 → 2.0.1

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/UPGRADING.md CHANGED
@@ -11,6 +11,11 @@ time. While the version is 0.x, any release may break.
11
11
 
12
12
  Every PR that changes what an app sees adds a line here (see `CLAUDE.md`, "Changelog").
13
13
 
14
+ ## 2026-11-27 (no beckon under reduced motion)
15
+
16
+ - `ChoiceGrid`/`PlaceBoard` `beckon`: under `prefers-reduced-motion: reduce` no tile gets `data-beckon` or its border. A test that waits for `[data-beckon]` with `matchMedia` stubbed to reduce must not.
17
+ - Visual baselines of a screen with `beckon` that caught a lit tile now show none.
18
+
14
19
  ## 2026-11-27 (ChoiceGrid and PlaceBoard tiles cap their pictures)
15
20
 
16
21
  - `ChoiceGrid` tiles and `PlaceBoard` pieces are size containers, and a picture is drawn at `type-picture` but never more than 75% of its tile. Visual baselines of these may move by a few pixels, and a held `PlaceBoard` piece no longer grows past its square; look at the diffs and update.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as AsyncActionOptions, B as RowAction, C as useColorScheme, D as DensityName, E as Density, F as useAsyncAction, H as buttonVariants, I as Button, L as ButtonProps, M as AsyncLabels, N as FieldErrors, O as DensityProps, P as Phase, R as IconButton, S as palettes, T as useSystemColorScheme, U as ControlSize, V as RowActionProps, W as IconComponent, _ as PaletteOption, a as browserMicrophone, b as colorSchemeScript, c as COLOR_SCHEME_STORAGE_KEY, d as ColorSchemeLabels, f as ColorSchemePreference, g as PaletteChoice, h as PALETTE_STORAGE_KEY, i as MicrophoneStream, j as AsyncButton, k as AsyncAction, l as ColorScheme, m as DEFAULT_PALETTE, n as MicrophoneContext, o as explainMicrophoneError, p as ColorSchemeState, r as MicrophoneError, s as useMicrophone, t as Microphone, u as ColorSchemeChoice, v as PaletteState, w as usePalette, x as paletteScript, y as ThemeProvider, z as IconButtonProps } from "./microphone-DDOnQHxf.js";
1
+ import { A as AsyncActionOptions, B as RowAction, C as useColorScheme, D as DensityName, E as Density, F as useAsyncAction, H as buttonVariants, I as Button, L as ButtonProps, M as AsyncLabels, N as FieldErrors, O as DensityProps, P as Phase, R as IconButton, S as palettes, T as useSystemColorScheme, U as ControlSize, V as RowActionProps, W as IconComponent, _ as PaletteOption, a as browserMicrophone, b as colorSchemeScript, c as COLOR_SCHEME_STORAGE_KEY, d as ColorSchemeLabels, f as ColorSchemePreference, g as PaletteChoice, h as PALETTE_STORAGE_KEY, i as MicrophoneStream, j as AsyncButton, k as AsyncAction, l as ColorScheme, m as DEFAULT_PALETTE, n as MicrophoneContext, o as explainMicrophoneError, p as ColorSchemeState, r as MicrophoneError, s as useMicrophone, t as Microphone, u as ColorSchemeChoice, v as PaletteState, w as usePalette, x as paletteScript, y as ThemeProvider, z as IconButtonProps } from "./microphone-BI7HNGxj.js";
2
2
  import { n as geo, t as LatLng } from "./geo-DfKa9JtK.js";
3
3
  import { $ as LineChartGroupProps, A as RateChoice, B as VolumeControlProps, C as SpanBehaviour, D as useMediaSpans, E as SpanWords, F as StageGuides, G as isTypingTarget, H as HotkeysOptions, I as TimeReadout, J as ChartMark, K as keyName, L as Transport, M as SeekBarProps, N as SeekBarSpan, O as MediaStage, P as SpanStrip, Q as LineChartGroup, R as TransportProps, S as SpanActionsNotice, T as SpanOutcome, U as KeysLegend, V as transportShortcuts, W as Shortcut, X as GroupedChart, Y as ChartSpan, Z as LineChart, _ as MediaProgress, _t as skipAction, a as MediaPlayerProps, at as valueAt, b as PlayerNotice, bt as usePlayerWarnings, c as MediaSource, ct as CursorScope, d as SPEECH_RATES, dt as useSharedCursor, et as LineChartProps, f as SourceAttacher, ft as MediaMark, g as useMediaElement, gt as marksFor, h as useAttachedSource, ht as SkipSteps, i as MediaPlayer, it as logScale, j as SeekBar, k as Precision, l as MediaWindow, lt as CursorScopeProps, m as StreamContext, mt as SkipLevel, n as MediaElementState, nt as SpanTone, o as MediaProblem, ot as CursorMapping, p as StreamAttachment, pt as SkipAction, q as useHotkeys, r as MediaHeading, rt as YScale, s as MediaSession, st as CursorOwner, t as MediaElementOptions, tt as Point, u as ResumeWords, ut as SharedCursor, v as MediaSpanData, vt as PlayerWarning, w as SpanKind, x as SpanActions, y as MediaSpansState, yt as PlayerWarningEvent, z as VolumeControl } from "./media-player-BETa3P7K.js";
4
4
  import { ClassValue } from "clsx";
package/dist/index.js CHANGED
@@ -12421,14 +12421,26 @@ function nextBeckon(open, last) {
12421
12421
  return others[Math.floor(Math.random() * others.length)] ?? null;
12422
12422
  }
12423
12423
  const SEP$1 = "\0";
12424
- /** Which of `open` pulses now, moving every `ms` while `on`; null when off or none is open. The class alternates
12424
+ const REDUCE = "(prefers-reduced-motion: reduce)";
12425
+ const reduceQuery = () => typeof matchMedia === "function" ? matchMedia(REDUCE) : null;
12426
+ function subscribeReduce(change) {
12427
+ const q = reduceQuery();
12428
+ q?.addEventListener("change", change);
12429
+ return () => q?.removeEventListener("change", change);
12430
+ }
12431
+ /** Whether the person asked for reduced motion; false where there is no `matchMedia` (a server, plain jsdom). */
12432
+ function useReducedMotion() {
12433
+ return React.useSyncExternalStore(subscribeReduce, () => reduceQuery()?.matches ?? false, () => false);
12434
+ }
12435
+ /** Which of `open` pulses now, moving every `ms` while `on`; null when off, when none is open or under reduced motion. The class alternates
12425
12436
  * between two names of the same pulse each beat: a CSS animation runs again only when its name changes, so the last
12426
12437
  * open tile, lit beat after beat, still pulses each time (Codex on #400). */
12427
12438
  function useBeckon(on, open, ms) {
12428
12439
  const [lit, setLit] = React.useState(null);
12429
12440
  const openKey = open.join(SEP$1);
12441
+ const still = useReducedMotion();
12430
12442
  React.useEffect(() => {
12431
- if (!on || openKey === "") return;
12443
+ if (!on || still || openKey === "") return;
12432
12444
  const keys = openKey.split(SEP$1);
12433
12445
  let last = null;
12434
12446
  let beat = 0;
@@ -12446,6 +12458,7 @@ function useBeckon(on, open, ms) {
12446
12458
  };
12447
12459
  }, [
12448
12460
  on,
12461
+ still,
12449
12462
  openKey,
12450
12463
  ms
12451
12464
  ]);