@vectoriox/iox-ui 5.162.0 → 5.164.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.
Files changed (47) hide show
  1. package/actions-core/index.d.ts +171 -3
  2. package/assist-core/index.d.ts +3 -2
  3. package/composite-core/index.d.ts +195 -3
  4. package/fesm2022/vectoriox-iox-ui-actions-core.mjs +243 -2
  5. package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
  6. package/fesm2022/vectoriox-iox-ui-assist-core.mjs +6 -5
  7. package/fesm2022/vectoriox-iox-ui-assist-core.mjs.map +1 -1
  8. package/fesm2022/vectoriox-iox-ui-composite-core.mjs +413 -163
  9. package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
  10. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +456 -27
  11. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  12. package/fesm2022/vectoriox-iox-ui-harness-core.mjs +140 -1
  13. package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
  14. package/fesm2022/vectoriox-iox-ui-scene-core.mjs +83 -23
  15. package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
  16. package/fesm2022/vectoriox-iox-ui.mjs +387 -11
  17. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  18. package/generation-core/index.d.ts +87 -12
  19. package/harness-core/index.d.ts +132 -2
  20. package/index.d.ts +108 -3
  21. package/package.json +1 -1
  22. package/scene-core/index.d.ts +45 -13
  23. package/src/actions-core/popup-arrival.ts +328 -0
  24. package/src/actions-core/public-api.ts +1 -0
  25. package/src/assist-core/media-generate.ts +6 -5
  26. package/src/composite-core/composite-kinds.ts +9 -0
  27. package/src/composite-core/popup.ts +285 -0
  28. package/src/composite-core/public-api.ts +1 -0
  29. package/src/generation-core/ai-run.ts +65 -2
  30. package/src/generation-core/check-layout.ts +34 -4
  31. package/src/generation-core/compose-layout.ts +211 -10
  32. package/src/generation-core/compose-site.ts +2 -0
  33. package/src/generation-core/layout-drawers.ts +106 -0
  34. package/src/generation-core/layout-fingerprint.ts +3 -0
  35. package/src/generation-core/layout-language.ts +4 -0
  36. package/src/generation-core/layout-space.ts +3 -2
  37. package/src/generation-core/layout-wire.ts +15 -3
  38. package/src/generation-core/patterns.ts +4 -0
  39. package/src/generation-core/pictures.ts +4 -3
  40. package/src/generation-core/site-spec.generated.ts +57 -5
  41. package/src/harness-core/business-types.ts +2 -0
  42. package/src/harness-core/harness-spec.generated.ts +83 -0
  43. package/src/harness-core/popup-stance.ts +111 -0
  44. package/src/harness-core/public-api.ts +1 -0
  45. package/src/scene-core/scene.ts +3 -0
  46. package/src/scene-core/scroll-driver.ts +97 -25
  47. package/styles/iox-design.css +141 -2
@@ -11,10 +11,11 @@ import { LIGHT_UP_PIECE_CAP, SplitText, splitText } from './split-text';
11
11
  * canvas's zoom the same rectangle divides by the same zoom, and the answer is the same at any scale.
12
12
  *
13
13
  * - The value is DAMPED: the scroll stops and the page settles a moment later. This is much of the prototype's weight,
14
- * and why this is not a CSS scroll timeline, which cannot do it. Smoothed ONCE (award plan "Reddottours", RT-D2): when
15
- * the page itself scrolls through Lenis its scroll is already smoothed, so the driver FOLLOWS it with no damping of
16
- * its own (`follow`) — a second damping on top made every picture trail the hand. The canvas (its Lenis scrolls a
17
- * wrapper the driver pins against) and a page the browser scrolls natively keep the driver's damping.
14
+ * and why this is not a CSS scroll timeline, which cannot do it. Smoothed ONCE (award plan "Reddottours", RT-D2): while
15
+ * Lenis is smoothing the page's scroll, the driver FOLLOWS it with no damping of its own (`follow`) — a second damping
16
+ * on top made every picture trail the hand — and reads it where Lenis has it, not on the whole pixel the browser keeps
17
+ * (a film turns that pixel into a visible step, vectoriox/iox-ui#140). A scroll Lenis does not smooth (a jump, the
18
+ * keyboard, the scroll bar) is damped as on a page the browser scrolls natively, and so is the canvas (it pins).
18
19
  * - The live site pins with `position: sticky`, on the compositor. The canvas cannot (its page never scrolls itself,
19
20
  * its Lenis scrolls a wrapper around a zoomed frame), so `pin` holds the stage there with `translate` instead.
20
21
  * `translate`, not `transform`: a Stage may carry tracks of its own.
@@ -30,8 +31,11 @@ const MAX_FRAME_SECONDS = 0.1;
30
31
  const WAKING_FRAME_SECONDS = 1 / 60;
31
32
  const STAGE_SELECTOR = `.iox-role-${SceneRole.Stage.replace(/\./g, '-')}, [${SceneAttribute.Stage}]`;
32
33
  const TRANSFORM_WILL_CHANGE = 'transform, opacity';
33
- /** The class Lenis keeps on the element it scrolls (the document's root, on the live site) for as long as it runs. */
34
- export const LENIS_ROOT_CLASS = 'lenis';
34
+ /** The class Lenis keeps on the element it scrolls only while it is SMOOTHING a scroll (a jump, the keyboard and the scroll
35
+ * bar are not smoothed): what a driver with no named scroller reads. */
36
+ export const LENIS_SMOOTH_CLASS = 'lenis-smooth';
37
+ /** The most the browser's rounding of the scroll can hide, page px; a larger gap is not rounding and is never added. */
38
+ const MAX_SUBPIXEL = 1;
35
39
  /** A crossing that moved less than this since the last frame has stopped moving (it is a 0–1 value). */
36
40
  const CROSSING_SETTLED = 0.0001;
37
41
 
@@ -49,6 +53,52 @@ export const SCENE_WAKE_EVENT = 'iox-scene-wake';
49
53
  */
50
54
  const HELD = new WeakMap<HTMLElement, ScrollDriver>();
51
55
 
56
+ /**
57
+ * The page's smooth scroller as the driver reads it — a Lenis instance is one as it is: whether it is smoothing a scroll
58
+ * right now, where it has the page (`scroll`, unrounded) and where the browser drew it (`actualScroll`, on a whole pixel).
59
+ */
60
+ export interface SmoothScroller {
61
+ readonly isSmooth: boolean;
62
+ readonly scroll: number;
63
+ readonly actualScroll: number;
64
+ }
65
+
66
+ const PAGE_SCROLLERS = new WeakMap<Window, SmoothScroller>();
67
+
68
+ /**
69
+ * Name (or, with null, forget) the scroller that smooths a window's DOCUMENT — the iox-ui page scroller does, when it
70
+ * starts Lenis on the document. Every driver on that window reads it; a scroller of a wrapper is never named here.
71
+ */
72
+ export function setPageScroller(host: Window, scroller: SmoothScroller | null): void {
73
+ if (scroller) PAGE_SCROLLERS.set(host, scroller);
74
+ else PAGE_SCROLLERS.delete(host);
75
+ }
76
+
77
+ /** The scroller named for a window's document, if any. */
78
+ export function pageScroller(host: Window): SmoothScroller | null {
79
+ return PAGE_SCROLLERS.get(host) ?? null;
80
+ }
81
+
82
+ /**
83
+ * Page px the scroller has the page past where the browser drew it (its whole pixel): what a driver adds back, so a film
84
+ * never steps by the page's pixels. Read while smoothing AND after: a smoothing ends on its own unrounded value, and the
85
+ * film rests there rather than stepping back onto the pixel. 0 with no scroller, or a gap larger than rounding makes.
86
+ */
87
+ export function scrollSubpixel(scroller: SmoothScroller | null): number {
88
+ if (!scroller) return 0;
89
+ const gap = scroller.scroll - scroller.actualScroll;
90
+ return Number.isFinite(gap) && Math.abs(gap) <= MAX_SUBPIXEL ? gap : 0;
91
+ }
92
+
93
+ /**
94
+ * One frame of a driver that FOLLOWS an already smoothed scroll (RT-D2): the scroll's own move since the last frame is
95
+ * taken whole, and only a gap left from before (a damped jump the smoothing then continued) is damped away. With no gap
96
+ * it stands exactly on the scroll; it never snaps across one.
97
+ */
98
+ export function followToward(current: number, previousTarget: number, target: number, seconds: number, rate: number = SCENE_DAMPING): number {
99
+ return dampToward(current + (target - previousTarget), target, seconds, rate);
100
+ }
101
+
52
102
  /** The slider a stage carries when the scroll plays it: a booted Swiper (it sets `el.swiper`), read by shape. */
53
103
  interface PlayedSlider { slides?: ArrayLike<unknown>; setProgress?: (progress: number, speed?: number) => void; destroyed?: boolean }
54
104
  function sliderOf(stage: HTMLElement | null): PlayedSlider | null {
@@ -120,9 +170,10 @@ export interface ScrollDriverOptions {
120
170
  observe?: boolean;
121
171
  damping?: number;
122
172
  /**
123
- * Follow the scroll exactly, with no damping of its own (RT-D2): true when something already smooths the scroll the
124
- * driver reads. A function is asked on every frame. Absent: true while Lenis runs on the host's document (its root
125
- * carries `LENIS_ROOT_CLASS`) and the driver does not `pin` (the canvas keeps its damping).
173
+ * Follow the scroll, with no damping of its own (RT-D2): true when something already smooths the scroll the driver
174
+ * reads. A function is asked on every frame. Absent: true while the page's scroller (`setPageScroller`; else a Lenis
175
+ * marking the document's root `LENIS_SMOOTH_CLASS`) is SMOOTHING a scroll and the driver does not `pin` — a jump, the
176
+ * keyboard and the scroll bar are not smoothed by Lenis, and the canvas keeps its damping.
126
177
  */
127
178
  follow?: boolean | (() => boolean);
128
179
  /** Called after every frame it writes, outside any framework's zone (the canvas's selection box follows on it). */
@@ -225,6 +276,8 @@ interface Scene {
225
276
  target: number;
226
277
  /** Page px scrolled past the hold's start, over the hold and the leaving (`travel + exit`): what is damped. */
227
278
  position: number;
279
+ /** Where the scroll stood in the last frame, the same px: a driver that follows takes the scroll's move since. */
280
+ along: number;
228
281
  /** Page px and the stage's own width, measured when something resizes and never per frame. */
229
282
  height: number;
230
283
  travel: number;
@@ -274,7 +327,7 @@ export class ScrollDriver {
274
327
  if (holder && holder !== this) return false;
275
328
  this.remove(root);
276
329
  HELD.set(root, this);
277
- const scene: Scene = { root, stage: null, layers: [], progress: 0, target: 0, position: 0, height: 0, travel: 0, exit: 0, stick: 0, phone: false, inlineSign: 1, fresh: true, mutations: null };
330
+ const scene: Scene = { root, stage: null, layers: [], progress: 0, target: 0, position: 0, along: 0, height: 0, travel: 0, exit: 0, stick: 0, phone: false, inlineSign: 1, fresh: true, mutations: null };
278
331
  this.scenes.set(root, scene);
279
332
  this.resize?.observe(root);
280
333
  if (this.options.observe) {
@@ -451,21 +504,28 @@ export class ScrollDriver {
451
504
  const seconds = this.lastTime ? Math.min(MAX_FRAME_SECONDS, (now - this.lastTime) / 1000) : WAKING_FRAME_SECONDS;
452
505
  this.lastTime = now;
453
506
  const follow = this.following();
454
- const reads = [...this.scenes.values()].map(scene => this.read(scene));
507
+ // Where the page's scroller has the page beyond the browser's whole pixel: read with it, so a film does not step by
508
+ // pixels. Not when the host says outright how to follow (`follow`): it reads its own scroll.
509
+ const subpixel = this.options.follow === undefined ? scrollSubpixel(this.scroller()) : 0;
510
+ const reads = [...this.scenes.values()].map(scene => this.read(scene, subpixel));
455
511
  // Each layer that moves over its own crossing is read with the rest, before any write: where its row stood after the
456
512
  // last frame. A row that moved since is read again on the next frame, so the crossing lands where the row lands.
457
513
  const crossed = reads.map(({ scene }) => this.readCrossings(scene)).some(Boolean);
458
514
  const view = this.links.size ? this.viewBox() : null;
459
- const linkReads = [...this.links].map(state => this.readLink(state, view!));
515
+ const linkReads = [...this.links].map(state => this.readLink(state, view!, subpixel));
460
516
  let moving = crossed;
461
517
  for (const { scene, local, along } of reads) {
462
518
  if (this.options.pin && scene.stage) scene.stage.style.setProperty('translate', `0 ${local}px`);
463
- const immediate = scene.fresh || follow;
464
- const next = immediate ? along : dampToward(scene.position, along, seconds, this.options.damping);
465
- // The step onto the scroll is what is left: taken once it is under SETTLED_PX, so it never shows.
466
- const settled = immediate || Math.abs(along - scene.position) < SETTLED_PX;
519
+ const next = scene.fresh ? along
520
+ : follow ? followToward(scene.position, scene.along, along, seconds, this.options.damping)
521
+ : dampToward(scene.position, along, seconds, this.options.damping);
522
+ // The step onto the scroll is what is left: taken once it is under SETTLED_PX, so it never shows. Following, what
523
+ // is left is the gap from before (the scroll's own move is taken whole).
524
+ const gap = follow ? scene.along - scene.position : along - scene.position;
525
+ const settled = scene.fresh || Math.abs(gap) < SETTLED_PX;
467
526
  const before = scene.position;
468
527
  scene.position = settled ? along : next;
528
+ scene.along = along;
469
529
  // A crossing was read before this frame moved its row: it is read again on the next frame, after the move.
470
530
  if (scene.position !== before && scene.layers.some(layer => layer.crosses)) moving = true;
471
531
  const target = scene.travel > 0 ? local / scene.travel : 0;
@@ -477,9 +537,12 @@ export class ScrollDriver {
477
537
  moving = moving || !settled;
478
538
  }
479
539
  for (const { state, target } of linkReads) {
480
- const immediate = state.fresh || !!state.link.immediate || follow;
481
- const next = immediate ? target : dampToward(state.progress, target, seconds, this.options.damping);
482
- const settled = immediate || Math.abs(target - state.progress) * Math.max(1, state.geometry.distance) < SETTLED_PX;
540
+ const immediate = state.fresh || !!state.link.immediate;
541
+ const next = immediate ? target
542
+ : follow ? followToward(state.progress, state.target, target, seconds, this.options.damping)
543
+ : dampToward(state.progress, target, seconds, this.options.damping);
544
+ const gap = follow ? state.target - state.progress : target - state.progress;
545
+ const settled = immediate || Math.abs(gap) * Math.max(1, state.geometry.distance) < SETTLED_PX;
483
546
  state.progress = settled ? target : next;
484
547
  state.target = target;
485
548
  state.fresh = false;
@@ -490,12 +553,18 @@ export class ScrollDriver {
490
553
  else this.lastTime = 0;
491
554
  };
492
555
 
493
- /** True when the scroll the driver reads is already smoothed: it follows it exactly (RT-D2). */
556
+ /** True when the scroll the driver reads is being smoothed right now: it follows it (RT-D2). */
494
557
  private following(): boolean {
495
558
  const follow = this.options.follow;
496
559
  if (typeof follow === 'function') return follow();
497
560
  if (typeof follow === 'boolean') return follow;
498
- return !this.options.pin && !!this.host.document?.documentElement?.classList.contains(LENIS_ROOT_CLASS);
561
+ if (this.options.pin) return false;
562
+ const scroller = this.scroller();
563
+ return scroller ? scroller.isSmooth : !!this.host.document?.documentElement?.classList.contains(LENIS_SMOOTH_CLASS);
564
+ }
565
+
566
+ private scroller(): SmoothScroller | null {
567
+ return this.options.pin ? null : pageScroller(this.host);
499
568
  }
500
569
 
501
570
  /**
@@ -527,8 +596,10 @@ export class ScrollDriver {
527
596
  return this.options.view?.() ?? { top: 0, height: this.host.innerHeight };
528
597
  }
529
598
 
530
- private readLink(state: LinkState, view: ScrollBox): { state: LinkState; target: number } {
531
- const { box, zoom } = layoutBoxOnScreen(state.link.measured, state.link.within ?? null);
599
+ private readLink(state: LinkState, view: ScrollBox, subpixel = 0): { state: LinkState; target: number } {
600
+ const measured = layoutBoxOnScreen(state.link.measured, state.link.within ?? null);
601
+ const zoom = measured.zoom;
602
+ const box = subpixel ? { top: measured.box.top - subpixel, height: measured.box.height } : measured.box;
532
603
  const z = zoom || 1;
533
604
  const target = rangeProgress(state.link.range, box, view);
534
605
  state.geometry = { distance: rangeDistance(state.link.range, box, view) / z, viewHeight: view.height / z, opening: this.openingOf(state.link, box, view) };
@@ -544,8 +615,9 @@ export class ScrollDriver {
544
615
  return rangeProgress(link.range, { top: view.top + (box.top - top), height: box.height }, view);
545
616
  }
546
617
 
547
- private read(scene: Scene): { scene: Scene; local: number; along: number } {
548
- const rect = scene.root.getBoundingClientRect();
618
+ private read(scene: Scene, subpixel = 0): { scene: Scene; local: number; along: number } {
619
+ const box = scene.root.getBoundingClientRect();
620
+ const rect = { top: box.top - subpixel, height: box.height };
549
621
  const origin = this.options.originOf?.(scene.root)?.getBoundingClientRect().top ?? 0;
550
622
  const zoom = scene.height ? rect.height / scene.height : 1;
551
623
  const { local } = sceneScrollState(rect.top, origin + scene.stick * zoom, zoom, scene.travel);
@@ -89,6 +89,26 @@ iox-gallery.iox-es-media[data-iox-empty] > .iox-gallery {
89
89
  overflow-x: clip;
90
90
  }
91
91
 
92
+ /* AW9 (award plan "Reddottours"). A sideways walk on a phone is a row the visitor swipes (RT-D4): each screen is a card
93
+ the row snaps to, the next one peeking. A drawer's spine (`drawers`) stands on end beside its step, and is a label above
94
+ the step on a phone. The sizes are the nodes' own (`composeLayout`); only what a node has no style for is here. Written
95
+ twice, because a size query (the canvas) and a media query cannot share a block. Reduced motion and no script flow
96
+ them (scene-core `SCENE_FLOW_RULES`). */
97
+ .iox-role-scene-drawer-spine {
98
+ writing-mode: vertical-rl;
99
+ rotate: 180deg;
100
+ }
101
+ @media (max-width: 767px) {
102
+ .iox-role-scene-walk { overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
103
+ .iox-role-scene-walk-screen { scroll-snap-align: start; }
104
+ .iox-role-scene-drawer-spine { writing-mode: horizontal-tb; rotate: none; }
105
+ }
106
+ @container iox-canvas (max-width: 767px) {
107
+ .iox-role-scene-walk { overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
108
+ .iox-role-scene-walk-screen { scroll-snap-align: start; }
109
+ .iox-role-scene-drawer-spine { writing-mode: horizontal-tb; rotate: none; }
110
+ }
111
+
92
112
  /* ── Card v2 (composite T23; complex-components board 8) ──────────────────────────────────────────
93
113
  The parts are ordinary nodes; `nodeDesignClasses` writes `iox-role-<role>` on each, so these rules are
94
114
  the same in every renderer. Zero-specificity where an author's own value must win. */
@@ -968,11 +988,130 @@ body:not(.builder-active):has(.iox-bar-reserve) { padding-bottom: calc(var(--iox
968
988
  }
969
989
 
970
990
  /* A closed live dialog never shows, whatever display its node sets (a drawer lays its parts out as a
971
- flex column): an author rule would otherwise beat the UA's `dialog:not([open]) { display: none }`. */
972
- dialog[data-iox-dialog]:not([open]) {
991
+ flex column): an author rule would otherwise beat the UA's `dialog:not([open]) { display: none }`.
992
+ Popups PU1: a NON-modal dialog (a popup's corner / bar) is shown with `showPopover()` and never gets `[open]` — it is
993
+ shown while `:popover-open`. Inside `:is()` (forgiving), so a browser without the Popover API still hides every closed
994
+ dialog. */
995
+ dialog[data-iox-dialog]:not([open]):not(:is(:popover-open)) {
973
996
  display: none;
974
997
  }
975
998
 
999
+ /* ── POPUPS (popups-plan.md §3b, §6, §7, §8 — PU1) ─────────────────────────────────────────────────────────────────────
1000
+ A popup is a Dialog with `data-iox-popup` (its kind) and `data-iox-popup-form`, opened by the popup runtime:
1001
+ · `corner` — a card at the bottom-right corner, `--iox-popup-inset` from both edges (the same corner on a Hebrew
1002
+ site, popups-plan §3b), sliding in from that edge; NON-modal (`showPopover`).
1003
+ · `bar` — one line along the bottom edge (≤ 64px; ≤ 88px on a phone), rising from it; NON-modal.
1004
+ · `centred` — a newsletter's modal card on a laptop (`showModal`, the look's scrim), growing from .97; on a phone the
1005
+ runtime opens it as the corner card.
1006
+ · on a phone (≤ 767px) every card is a bottom card at most 30% of the screen high, inset by the smaller of the token and
1007
+ 12px, above a bottom bar and the safe area; it rises 24px as it fades in (a slide from the side reads as a page change).
1008
+ Motion (Emil): transitions, never keyframes — a close mid-arrival leaves from where it is; transform / opacity only; the
1009
+ look's ease-enter / ease-exit; `popup-dur-in` × the How-animated scale the runtime writes, the exit `popup-dur-out`;
1010
+ Still fades only; reduced motion a ≤ 200ms fade, no movement. Specificity: above the styled dialog's own enter / leave
1011
+ (0,3,1) so a popup's motion is its own. */
1012
+ dialog[data-iox-dialog][data-iox-popup] {
1013
+ --popup-inset: var(--iox-popup-inset);
1014
+ --popup-in: calc(var(--iox-popup-dur-in) * var(--popup-scale, 1));
1015
+ --popup-out: calc(var(--iox-popup-dur-out) * var(--popup-scale, 1));
1016
+ --popup-from-x: 0px;
1017
+ --popup-from-y: 0px;
1018
+ --popup-from-scale: 1;
1019
+ box-sizing: border-box;
1020
+ overflow: auto;
1021
+ overscroll-behavior: contain;
1022
+ transition:
1023
+ translate var(--popup-in) var(--iox-ease-enter),
1024
+ scale var(--popup-in) var(--iox-ease-enter),
1025
+ opacity var(--popup-in) var(--iox-ease-enter),
1026
+ overlay var(--popup-in) allow-discrete,
1027
+ display var(--popup-in) allow-discrete;
1028
+ }
1029
+ dialog[data-iox-dialog][data-iox-popup]:is([data-iox-popup-form='corner'], [data-iox-popup-form='bar']) {
1030
+ position: fixed;
1031
+ margin: 0;
1032
+ }
1033
+ dialog[data-iox-dialog][data-iox-popup][data-iox-popup-form='corner'] {
1034
+ --popup-from-x: calc(100% + var(--popup-inset));
1035
+ inset: auto var(--popup-inset) calc(var(--popup-inset) + env(safe-area-inset-bottom, 0px)) auto;
1036
+ min-width: min(360px, calc(100vw - var(--popup-inset) * 2));
1037
+ max-width: min(560px, calc(100vw - var(--popup-inset) * 2));
1038
+ max-height: calc(100dvh - var(--popup-inset) * 2);
1039
+ }
1040
+ dialog[data-iox-dialog][data-iox-popup][data-iox-popup-form='bar'] {
1041
+ --popup-from-y: 100%;
1042
+ inset: auto 0 0 0;
1043
+ width: 100%;
1044
+ max-width: 100%;
1045
+ max-height: 64px;
1046
+ border-radius: 0;
1047
+ padding-bottom: env(safe-area-inset-bottom, 0px);
1048
+ }
1049
+ dialog[data-iox-dialog][data-iox-popup][data-iox-popup-form='centred'] { --popup-from-scale: 0.97; transform-origin: center; }
1050
+ /* Non-modal: no scrim, nothing under it is covered — the page stays fully usable. */
1051
+ dialog[data-iox-dialog][data-iox-popup]:is([data-iox-dialog-nonmodal], [aria-modal='false'])::backdrop { display: none; }
1052
+ /* Its ✕ is a real button, 44 × 44, its hover only for a mouse (§7). */
1053
+ dialog[data-iox-dialog][data-iox-popup] > .iox-dialog-close {
1054
+ width: 44px;
1055
+ min-width: 44px;
1056
+ height: 44px;
1057
+ flex-shrink: 0;
1058
+ align-self: flex-start;
1059
+ }
1060
+ dialog[data-iox-dialog][data-iox-popup]:has(> .iox-dialog-close) { padding-inline-end: max(var(--iox-dialog-pad, 0px), 56px); }
1061
+ dialog[data-iox-dialog][data-iox-popup]:is([open], :popover-open):not([data-iox-closing]) {
1062
+ translate: 0px 0px;
1063
+ scale: 1;
1064
+ opacity: 1;
1065
+ }
1066
+ dialog[data-iox-dialog][data-iox-popup]:is([data-iox-closing], :not([open]):not(:popover-open)) {
1067
+ translate: var(--popup-from-x) var(--popup-from-y);
1068
+ scale: var(--popup-from-scale);
1069
+ opacity: 0;
1070
+ transition-timing-function: var(--iox-ease-exit);
1071
+ transition-duration: var(--popup-out);
1072
+ }
1073
+ @starting-style {
1074
+ dialog[data-iox-dialog][data-iox-popup]:is([open], :popover-open) {
1075
+ translate: var(--popup-from-x) var(--popup-from-y);
1076
+ scale: var(--popup-from-scale);
1077
+ opacity: 0;
1078
+ }
1079
+ }
1080
+ @media (max-width: 767px) {
1081
+ dialog[data-iox-dialog][data-iox-popup]:not([data-iox-popup-form='bar']) {
1082
+ --popup-inset: min(var(--iox-popup-inset), 12px);
1083
+ --popup-from-x: 0px;
1084
+ --popup-from-y: 24px;
1085
+ --popup-from-scale: 1;
1086
+ position: fixed;
1087
+ inset: auto var(--popup-inset) calc(var(--popup-inset) + env(safe-area-inset-bottom, 0px)) var(--popup-inset);
1088
+ margin: 0;
1089
+ width: auto;
1090
+ min-width: 0;
1091
+ max-width: none;
1092
+ max-height: 30dvh;
1093
+ }
1094
+ dialog[data-iox-dialog][data-iox-popup][data-iox-popup-form='bar'] { max-height: 88px; }
1095
+ html:has(.iox-bar-reserve) dialog[data-iox-dialog][data-iox-popup]:not([data-iox-popup-form='bar']) {
1096
+ inset-block-end: calc(var(--popup-inset) + var(--iox-tabbar-height, 64px) + env(safe-area-inset-bottom, 0px));
1097
+ }
1098
+ }
1099
+ /* Still (How animated) moves nothing — it fades; reduced motion is a ≤ 200ms fade (gentler, never zero; Off stays 0ms). */
1100
+ dialog[data-iox-dialog][data-iox-popup][data-iox-popup-still] {
1101
+ --popup-from-x: 0px;
1102
+ --popup-from-y: 0px;
1103
+ --popup-from-scale: 1;
1104
+ }
1105
+ @media (prefers-reduced-motion: reduce) {
1106
+ dialog[data-iox-dialog][data-iox-popup][data-iox-popup-form] {
1107
+ --popup-from-x: 0px;
1108
+ --popup-from-y: 0px;
1109
+ --popup-from-scale: 1;
1110
+ --popup-in: min(var(--iox-popup-dur-in), 200ms);
1111
+ --popup-out: min(var(--iox-popup-dur-out), 200ms);
1112
+ }
1113
+ }
1114
+
976
1115
  /* A bottom-bar item reads the ITEM's ink (the contract's inkScopes): its icon and label change together. */
977
1116
  .iox-es-bottom-bar-item {
978
1117
  --iox-icon-color: currentColor;