@plexui/vue 0.42.7 → 0.42.9

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.
@@ -1,17 +1,24 @@
1
1
  /**
2
- * How a phone overlay comes and goes as on iOS 27.2: a sheet grows out of the button that opened it and shrinks back
3
- * into it as it closes, on SwiftUI's spring(duration: 0.33, bounce: 0.2); a sheet the finger lets go of carries on at
4
- * the finger's speed, to its rest or off the screen. The CSS springs (--spring-sheet, --spring-menu) are these springs
5
- * sampled; a released sheet needs one that starts at the finger's speed, which only a runtime sample has.
2
+ * How a phone overlay comes and goes as on iOS 27.2. A sheet always slides up from the bottom of the screen and back
3
+ * down, never out of the button that opened it (the owner's decision, 2026-11-26): on a spring with no bounce,
4
+ * spring(duration: 0.34, bounce: 0), measured on a Reminders sheet in the simulator (half its way at 91 ms, 90% at
5
+ * 210, 99.9% at 500), the scrim on the same curve, both ways. A sheet the finger lets go of carries on at the finger's
6
+ * speed, to its rest or off the screen. A menu grows out of its control, as an iOS pull-down menu does. The CSS springs
7
+ * (--spring-sheet, --spring-menu) are these springs sampled; a released sheet needs one that starts at the finger's
8
+ * speed, which only a runtime sample has.
6
9
  */
7
- export const SHEET_SPRING = { duration: 0.33, bounce: 0.2 };
10
+ export const SHEET_SPRING = { duration: 0.34, bounce: 0 };
8
11
  /** A released sheet does not overshoot: past its rest it would lift off the bottom of the screen. */
9
12
  export const SHEET_RELEASE_SPRING = { duration: 0.33, bounce: 0 };
10
13
  export const MENU_SPRING = { duration: 0.21, bounce: 0.2 };
11
- /** The time these springs take to settle within 0.001, as --spring-sheet-duration and --spring-menu-duration. */
12
- export const SHEET_SPRING_MS = 495;
14
+ /**
15
+ * The time a sheet takes to come or go, as --spring-sheet-duration: the spring is within 0.001 of its end by then.
16
+ * A sheet pulled down leaves within it too.
17
+ */
18
+ export const SHEET_SPRING_MS = 500;
19
+ /** The time the menu's spring takes to settle within 0.001, as --spring-menu-duration. */
13
20
  export const MENU_SPRING_MS = 325;
14
- /** The longest a sheet takes to leave: back into its button, or off the screen from a finger's release. */
21
+ /** The longest a sheet takes to leave, off the screen from a finger's release. */
15
22
  export const SHEET_EXIT_MS = 500;
16
23
  const STEP = 1 / 2000;
17
24
  const SAMPLE = 1 / 120;
@@ -55,76 +62,6 @@ export function springEasing({ duration, bounce }, velocity = 0, stopAtEnd = fal
55
62
  points[0] = "0";
56
63
  return { easing: `linear(${[...points, "1"].join(", ")})`, ms: Math.round(total * 1000) };
57
64
  }
58
- // The control last pressed, by a finger, a pointer or a key: the button a sheet opened from. A menu item is no source:
59
- // its menu closes as the sheet comes, so the sheet slides up as one from a menu does on iOS.
60
- const PRESSABLE = "button, a[href], [role='button'], [role='tab'], summary";
61
- let lastPress = null;
62
- const watched = new WeakSet();
63
- const remember = (event) => {
64
- if (event instanceof KeyboardEvent && event.key !== "Enter" && event.key !== " ")
65
- return;
66
- const target = event.target;
67
- const element = target instanceof Element ? target.closest(PRESSABLE) : null;
68
- lastPress = element && !element.closest("[role='menu'], [role='listbox']") ? { element, time: event.timeStamp } : null;
69
- };
70
- /** Starts noting what each press lands on, once per document. */
71
- export function watchPresentationSources(doc) {
72
- if (!doc || watched.has(doc))
73
- return;
74
- watched.add(doc);
75
- doc.addEventListener("pointerdown", remember, { capture: true, passive: true });
76
- doc.addEventListener("keydown", remember, { capture: true, passive: true });
77
- }
78
- /** The control pressed just now, which an overlay opening now opens from, if any. */
79
- export function presentationSource(doc) {
80
- if (!doc || !lastPress)
81
- return null;
82
- const view = doc.defaultView;
83
- const recent = view && view.performance.now() - lastPress.time < 1000;
84
- return recent && lastPress.element.isConnected && lastPress.element.ownerDocument === doc ? lastPress.element : null;
85
- }
86
- const toPixels = (value, size) => {
87
- if (!value)
88
- return size / 2;
89
- const number = Number.parseFloat(value);
90
- if (!Number.isFinite(number))
91
- return size / 2;
92
- return value.endsWith("%") ? (number / 100) * size : number;
93
- };
94
- /**
95
- * The transform that lays the panel, at its rest, over the source: the panel grows out of it from there. Null when
96
- * the source is gone, has no size, lies off the screen or inside the panel: the panel then comes as it would alone.
97
- */
98
- export function sourceTransform(panel, source) {
99
- if (!source?.isConnected || panel.contains(source))
100
- return null;
101
- const view = panel.ownerDocument.defaultView;
102
- if (!view)
103
- return null;
104
- const from = source.getBoundingClientRect();
105
- if (!from.width || !from.height)
106
- return null;
107
- if (from.bottom <= 0 || from.right <= 0 || from.top >= view.innerHeight || from.left >= view.innerWidth)
108
- return null;
109
- // The rest is the panel without the transform of its entrance, its exit or a drag, nor of one under way: its layout
110
- // box, which transforms leave alone, inside its offset parent (the dialog's layer, which nothing transforms).
111
- const parent = panel.offsetParent instanceof view.HTMLElement ? panel.offsetParent : null;
112
- const base = parent?.getBoundingClientRect();
113
- const to = base
114
- ? new view.DOMRect(base.left + parent.clientLeft + panel.offsetLeft, base.top + parent.clientTop + panel.offsetTop, panel.offsetWidth, panel.offsetHeight)
115
- : panel.getBoundingClientRect();
116
- const [originX, originY] = view.getComputedStyle(panel).transformOrigin.split(" ");
117
- if (!to.width || !to.height)
118
- return null;
119
- const ox = to.left + toPixels(originX, to.width);
120
- const oy = to.top + toPixels(originY, to.height);
121
- const sx = from.width / to.width;
122
- const sy = from.height / to.height;
123
- const tx = from.left - ox - sx * (to.left - ox);
124
- const ty = from.top - oy - sy * (to.top - oy);
125
- const round = (value) => Math.round(value * 1000) / 1000;
126
- return `translate(${round(tx)}px, ${round(ty)}px) scale(${round(sx)}, ${round(sy)})`;
127
- }
128
65
  /**
129
66
  * A phone menu covers its button, its corner on the button's (menuTriggerCover.ts), and grows from its transform
130
67
  * origin, which Radix puts at that corner: the scale that makes it the button's size there is all it takes. Sizes are
@@ -138,7 +75,10 @@ export function sourceScale(panel, source) {
138
75
  const round = (value) => Math.round(value * 1000) / 1000;
139
76
  return `scale(${round(source.offsetWidth / panel.offsetWidth)}, ${round(source.offsetHeight / panel.offsetHeight)})`;
140
77
  }
141
- /** Whether a phone overlay may grow out of its button: not with reduced motion, nor in the Plex Android look. */
78
+ /**
79
+ * Whether a phone overlay moves on the iOS springs (a menu out of its button, a sheet up from the bottom): not with
80
+ * reduced motion, nor in the Plex Android look.
81
+ */
142
82
  export function growsFromButton(element) {
143
83
  const doc = element?.ownerDocument ?? (typeof document === "undefined" ? undefined : document);
144
84
  const view = doc?.defaultView;
@@ -1 +1 @@
1
- {"version":3,"file":"presentMotion.js","sourceRoot":"","sources":["../../../src/lib/presentMotion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,CAAC,MAAM,YAAY,GAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAA;AACnE,qGAAqG;AACrG,MAAM,CAAC,MAAM,oBAAoB,GAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAA;AACzE,MAAM,CAAC,MAAM,WAAW,GAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAA;AAClE,iHAAiH;AACjH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;AAClC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;AACjC,2GAA2G;AAC3G,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;AAEhC,MAAM,IAAI,GAAG,CAAC,GAAG,IAAI,CAAA;AACrB,MAAM,MAAM,GAAG,CAAC,GAAG,GAAG,CAAA;AACtB,MAAM,OAAO,GAAG,CAAC,CAAA;AAEjB;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAC1B,EAAE,QAAQ,EAAE,MAAM,EAAU,EAC5B,QAAQ,GAAG,CAAC,EACZ,SAAS,GAAG,KAAK;IAEjB,MAAM,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC/C,MAAM,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG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AAC,MAAM,EAAE,WAAW,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAA;IAC/D,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,CAAC,MAAM,CAAC,WAAW,IAAI,CAAC,MAAM,CAAC,YAAY;QAAE,OAAO,IAAI,CAAA;IACzG,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,IAAI,CAAA;IAChE,OAAO,SAAS,KAAK,CAAC,MAAM,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,KAAK,KAAK,CAAC,MAAM,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAA;AACtH,CAAC;AAED,iHAAiH;AACjH,MAAM,UAAU,eAAe,CAAC,OAAmC;IACjE,MAAM,GAAG,GAAG,OAAO,EAAE,aAAa,IAAI,CAAC,OAAO,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;IAC9F,MAAM,IAAI,GAAG,GAAG,EAAE,WAAW,CAAA;IAC7B,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAA;IAC/B,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC,kCAAkC,CAAC,CAAC,OAAO;QAAE,OAAO,KAAK,CAAA;IAC/E,OAAO,CAAC,CAAC,OAAO,IAAI,GAAG,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAA;AAC/E,CAAC","sourcesContent":["/**\n * How a phone overlay comes and goes as on iOS 27.2: a sheet grows out of the button that opened it and shrinks back\n * into it as it closes, on SwiftUI's spring(duration: 0.33, bounce: 0.2); a sheet the finger lets go of carries on at\n * the finger's speed, to its rest or off the screen. The CSS springs (--spring-sheet, --spring-menu) are these springs\n * sampled; a released sheet needs one that starts at the finger's speed, which only a runtime sample has.\n */\n\n/** SwiftUI's spring(duration:bounce:) with mass 1 */\nexport type Spring = { duration: number; bounce: number }\n\nexport const SHEET_SPRING: Spring = { duration: 0.33, bounce: 0.2 }\n/** A released sheet does not overshoot: past its rest it would lift off the bottom of the screen. */\nexport const SHEET_RELEASE_SPRING: Spring = { duration: 0.33, bounce: 0 }\nexport const MENU_SPRING: Spring = { duration: 0.21, bounce: 0.2 }\n/** The time these springs take to settle within 0.001, as --spring-sheet-duration and --spring-menu-duration. */\nexport const SHEET_SPRING_MS = 495\nexport const MENU_SPRING_MS = 325\n/** The longest a sheet takes to leave: back into its button, or off the screen from a finger's release. */\nexport const SHEET_EXIT_MS = 500\n\nconst STEP = 1 / 2000\nconst SAMPLE = 1 / 120\nconst LONGEST = 2\n\n/**\n * A spring as a CSS easing and the time it takes to settle. `velocity` is the start speed in units of the whole move\n * per second: a finger at 1 px/ms with 200 px left to go is 5. `stopAtEnd` keeps it from passing its end, as a sheet\n * let go of toward its rest must not lift off the bottom of the screen however fast it comes.\n */\nexport function springEasing(\n { duration, bounce }: Spring,\n velocity = 0,\n stopAtEnd = false,\n): { easing: string; ms: number } {\n const stiffness = (2 * Math.PI / duration) ** 2\n const damping = (4 * Math.PI * (1 - bounce)) / duration\n let x = 0\n let v = velocity\n let t = 0\n let settled = 0\n const samples: [number, number][] = [[0, 0]]\n let nextSample = SAMPLE\n while (t < LONGEST) {\n v += (-stiffness * (x - 1) - damping * v) * STEP\n x += v * STEP\n t += STEP\n if (stopAtEnd && x >= 1) {\n x = 1\n v = 0\n }\n if (Math.abs(x - 1) > 0.001 || Math.abs(v) > 0.01) settled = t\n if (t >= nextSample) {\n samples.push([t, x])\n nextSample += SAMPLE\n }\n if (t - settled > 0.3) break\n }\n const total = Math.max(settled, SAMPLE)\n const points = samples.filter(([time]) => time < total).map(([time, value]) => {\n const share = `${Math.round((time / total) * 1000) / 10}%`\n return `${Math.round(value * 1000) / 1000} ${share}`\n })\n points[0] = \"0\"\n return { easing: `linear(${[...points, \"1\"].join(\", \")})`, ms: Math.round(total * 1000) }\n}\n\n// The control last pressed, by a finger, a pointer or a key: the button a sheet opened from. A menu item is no source:\n// its menu closes as the sheet comes, so the sheet slides up as one from a menu does on iOS.\nconst PRESSABLE = \"button, a[href], [role='button'], [role='tab'], summary\"\nlet lastPress: { element: Element; time: number } | null = null\nconst watched = new WeakSet<Document>()\n\nconst remember = (event: Event) => {\n if (event instanceof KeyboardEvent && event.key !== \"Enter\" && event.key !== \" \") return\n const target = event.target\n const element = target instanceof Element ? target.closest(PRESSABLE) : null\n lastPress = element && !element.closest(\"[role='menu'], [role='listbox']\") ? { element, time: event.timeStamp } : null\n}\n\n/** Starts noting what each press lands on, once per document. */\nexport function watchPresentationSources(doc: Document | undefined) {\n if (!doc || watched.has(doc)) return\n watched.add(doc)\n doc.addEventListener(\"pointerdown\", remember, { capture: true, passive: true })\n doc.addEventListener(\"keydown\", remember, { capture: true, passive: true })\n}\n\n/** The control pressed just now, which an overlay opening now opens from, if any. */\nexport function presentationSource(doc: Document | undefined): Element | null {\n if (!doc || !lastPress) return null\n const view = doc.defaultView\n const recent = view && view.performance.now() - lastPress.time < 1000\n return recent && lastPress.element.isConnected && lastPress.element.ownerDocument === doc ? lastPress.element : null\n}\n\nconst toPixels = (value: string | undefined, size: number) => {\n if (!value) return size / 2\n const number = Number.parseFloat(value)\n if (!Number.isFinite(number)) return size / 2\n return value.endsWith(\"%\") ? (number / 100) * size : number\n}\n\n/**\n * The transform that lays the panel, at its rest, over the source: the panel grows out of it from there. Null when\n * the source is gone, has no size, lies off the screen or inside the panel: the panel then comes as it would alone.\n */\nexport function sourceTransform(panel: HTMLElement, source: Element | null): string | null {\n if (!source?.isConnected || panel.contains(source)) return null\n const view = panel.ownerDocument.defaultView\n if (!view) return null\n const from = source.getBoundingClientRect()\n if (!from.width || !from.height) return null\n if (from.bottom <= 0 || from.right <= 0 || from.top >= view.innerHeight || from.left >= view.innerWidth) return null\n // The rest is the panel without the transform of its entrance, its exit or a drag, nor of one under way: its layout\n // box, which transforms leave alone, inside its offset parent (the dialog's layer, which nothing transforms).\n const parent = panel.offsetParent instanceof view.HTMLElement ? panel.offsetParent : null\n const base = parent?.getBoundingClientRect()\n const to = base\n ? new view.DOMRect(\n base.left + parent!.clientLeft + panel.offsetLeft,\n base.top + parent!.clientTop + panel.offsetTop,\n panel.offsetWidth,\n panel.offsetHeight,\n )\n : panel.getBoundingClientRect()\n const [originX, originY] = view.getComputedStyle(panel).transformOrigin.split(\" \")\n if (!to.width || !to.height) return null\n const ox = to.left + toPixels(originX, to.width)\n const oy = to.top + toPixels(originY, to.height)\n const sx = from.width / to.width\n const sy = from.height / to.height\n const tx = from.left - ox - sx * (to.left - ox)\n const ty = from.top - oy - sy * (to.top - oy)\n const round = (value: number) => Math.round(value * 1000) / 1000\n return `translate(${round(tx)}px, ${round(ty)}px) scale(${round(sx)}, ${round(sy)})`\n}\n\n/**\n * A phone menu covers its button, its corner on the button's (menuTriggerCover.ts), and grows from its transform\n * origin, which Radix puts at that corner: the scale that makes it the button's size there is all it takes. Sizes are\n * the boxes' own, so this holds before the menu is placed.\n */\nexport function sourceScale(panel: HTMLElement, source: HTMLElement | null): string | null {\n if (!source?.isConnected || panel.contains(source)) return null\n if (!panel.offsetWidth || !panel.offsetHeight || !source.offsetWidth || !source.offsetHeight) return null\n const round = (value: number) => Math.round(value * 1000) / 1000\n return `scale(${round(source.offsetWidth / panel.offsetWidth)}, ${round(source.offsetHeight / panel.offsetHeight)})`\n}\n\n/** Whether a phone overlay may grow out of its button: not with reduced motion, nor in the Plex Android look. */\nexport function growsFromButton(element: Element | null | undefined): boolean {\n const doc = element?.ownerDocument ?? (typeof document === \"undefined\" ? undefined : document)\n const view = doc?.defaultView\n if (!doc || !view) return false\n if (view.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches) return false\n return !(element ?? doc.documentElement).closest(\"[data-platform='android']\")\n}\n"]}
1
+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,CAAC,IAAI;QAAE,OAAO,KAAK,CAAA;IAC/B,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC,kCAAkC,CAAC,CAAC,OAAO;QAAE,OAAO,KAAK,CAAA;IAC/E,OAAO,CAAC,CAAC,OAAO,IAAI,GAAG,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAA;AAC/E,CAAC","sourcesContent":["/**\n * How a phone overlay comes and goes as on iOS 27.2. A sheet always slides up from the bottom of the screen and back\n * down, never out of the button that opened it (the owner's decision, 2026-11-26): on a spring with no bounce,\n * spring(duration: 0.34, bounce: 0), measured on a Reminders sheet in the simulator (half its way at 91 ms, 90% at\n * 210, 99.9% at 500), the scrim on the same curve, both ways. A sheet the finger lets go of carries on at the finger's\n * speed, to its rest or off the screen. A menu grows out of its control, as an iOS pull-down menu does. The CSS springs\n * (--spring-sheet, --spring-menu) are these springs sampled; a released sheet needs one that starts at the finger's\n * speed, which only a runtime sample has.\n */\n\n/** SwiftUI's spring(duration:bounce:) with mass 1 */\nexport type Spring = { duration: number; bounce: number }\n\nexport const SHEET_SPRING: Spring = { duration: 0.34, bounce: 0 }\n/** A released sheet does not overshoot: past its rest it would lift off the bottom of the screen. */\nexport const SHEET_RELEASE_SPRING: Spring = { duration: 0.33, bounce: 0 }\nexport const MENU_SPRING: Spring = { duration: 0.21, bounce: 0.2 }\n/**\n * The time a sheet takes to come or go, as --spring-sheet-duration: the spring is within 0.001 of its end by then.\n * A sheet pulled down leaves within it too.\n */\nexport const SHEET_SPRING_MS = 500\n/** The time the menu's spring takes to settle within 0.001, as --spring-menu-duration. */\nexport const MENU_SPRING_MS = 325\n/** The longest a sheet takes to leave, off the screen from a finger's release. */\nexport const SHEET_EXIT_MS = 500\n\nconst STEP = 1 / 2000\nconst SAMPLE = 1 / 120\nconst LONGEST = 2\n\n/**\n * A spring as a CSS easing and the time it takes to settle. `velocity` is the start speed in units of the whole move\n * per second: a finger at 1 px/ms with 200 px left to go is 5. `stopAtEnd` keeps it from passing its end, as a sheet\n * let go of toward its rest must not lift off the bottom of the screen however fast it comes.\n */\nexport function springEasing(\n { duration, bounce }: Spring,\n velocity = 0,\n stopAtEnd = false,\n): { easing: string; ms: number } {\n const stiffness = (2 * Math.PI / duration) ** 2\n const damping = (4 * Math.PI * (1 - bounce)) / duration\n let x = 0\n let v = velocity\n let t = 0\n let settled = 0\n const samples: [number, number][] = [[0, 0]]\n let nextSample = SAMPLE\n while (t < LONGEST) {\n v += (-stiffness * (x - 1) - damping * v) * STEP\n x += v * STEP\n t += STEP\n if (stopAtEnd && x >= 1) {\n x = 1\n v = 0\n }\n if (Math.abs(x - 1) > 0.001 || Math.abs(v) > 0.01) settled = t\n if (t >= nextSample) {\n samples.push([t, x])\n nextSample += SAMPLE\n }\n if (t - settled > 0.3) break\n }\n const total = Math.max(settled, SAMPLE)\n const points = samples.filter(([time]) => time < total).map(([time, value]) => {\n const share = `${Math.round((time / total) * 1000) / 10}%`\n return `${Math.round(value * 1000) / 1000} ${share}`\n })\n points[0] = \"0\"\n return { easing: `linear(${[...points, \"1\"].join(\", \")})`, ms: Math.round(total * 1000) }\n}\n\n/**\n * A phone menu covers its button, its corner on the button's (menuTriggerCover.ts), and grows from its transform\n * origin, which Radix puts at that corner: the scale that makes it the button's size there is all it takes. Sizes are\n * the boxes' own, so this holds before the menu is placed.\n */\nexport function sourceScale(panel: HTMLElement, source: HTMLElement | null): string | null {\n if (!source?.isConnected || panel.contains(source)) return null\n if (!panel.offsetWidth || !panel.offsetHeight || !source.offsetWidth || !source.offsetHeight) return null\n const round = (value: number) => Math.round(value * 1000) / 1000\n return `scale(${round(source.offsetWidth / panel.offsetWidth)}, ${round(source.offsetHeight / panel.offsetHeight)})`\n}\n\n/**\n * Whether a phone overlay moves on the iOS springs (a menu out of its button, a sheet up from the bottom): not with\n * reduced motion, nor in the Plex Android look.\n */\nexport function growsFromButton(element: Element | null | undefined): boolean {\n const doc = element?.ownerDocument ?? (typeof document === \"undefined\" ? undefined : document)\n const view = doc?.defaultView\n if (!doc || !view) return false\n if (view.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches) return false\n return !(element ?? doc.documentElement).closest(\"[data-platform='android']\")\n}\n"]}
@@ -553,6 +553,14 @@ export declare const MenuRadioGroup: import("vue").DefineComponent<import("vue")
553
553
  type: PropType<"start" | "end">;
554
554
  default: string;
555
555
  };
556
+ /**
557
+ * How the chosen option is marked: `radio` a radio circle on every option, filled on the chosen one; `check` a
558
+ * checkmark on the chosen option alone, its place kept empty on the others. A phone draws the iOS checkmark either way.
559
+ */
560
+ indicatorVariant: {
561
+ type: PropType<"radio" | "check">;
562
+ default: string;
563
+ };
556
564
  /**
557
565
  * `horizontal` sets the options side by side, each an icon over its label and the chosen one on a fill: a mode at
558
566
  * the top of an iOS menu, above its list, as Photos orders by Added or by Captured. No radio indicator is drawn;
@@ -579,6 +587,14 @@ export declare const MenuRadioGroup: import("vue").DefineComponent<import("vue")
579
587
  type: PropType<"start" | "end">;
580
588
  default: string;
581
589
  };
590
+ /**
591
+ * How the chosen option is marked: `radio` a radio circle on every option, filled on the chosen one; `check` a
592
+ * checkmark on the chosen option alone, its place kept empty on the others. A phone draws the iOS checkmark either way.
593
+ */
594
+ indicatorVariant: {
595
+ type: PropType<"radio" | "check">;
596
+ default: string;
597
+ };
582
598
  /**
583
599
  * `horizontal` sets the options side by side, each an icon over its label and the chosen one on a fill: a mode at
584
600
  * the top of an iOS menu, above its list, as Photos orders by Added or by Captured. No radio indicator is drawn;
@@ -594,6 +610,7 @@ export declare const MenuRadioGroup: import("vue").DefineComponent<import("vue")
594
610
  }>, {
595
611
  layout: "vertical" | "horizontal";
596
612
  indicatorPosition: "end" | "start";
613
+ indicatorVariant: "radio" | "check";
597
614
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
598
615
  /** One option of a `MenuRadioGroup`. */
599
616
  export declare const MenuRadioItem: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -1,8 +1,11 @@
1
1
  /**
2
- * How a phone overlay comes and goes as on iOS 27.2: a sheet grows out of the button that opened it and shrinks back
3
- * into it as it closes, on SwiftUI's spring(duration: 0.33, bounce: 0.2); a sheet the finger lets go of carries on at
4
- * the finger's speed, to its rest or off the screen. The CSS springs (--spring-sheet, --spring-menu) are these springs
5
- * sampled; a released sheet needs one that starts at the finger's speed, which only a runtime sample has.
2
+ * How a phone overlay comes and goes as on iOS 27.2. A sheet always slides up from the bottom of the screen and back
3
+ * down, never out of the button that opened it (the owner's decision, 2026-11-26): on a spring with no bounce,
4
+ * spring(duration: 0.34, bounce: 0), measured on a Reminders sheet in the simulator (half its way at 91 ms, 90% at
5
+ * 210, 99.9% at 500), the scrim on the same curve, both ways. A sheet the finger lets go of carries on at the finger's
6
+ * speed, to its rest or off the screen. A menu grows out of its control, as an iOS pull-down menu does. The CSS springs
7
+ * (--spring-sheet, --spring-menu) are these springs sampled; a released sheet needs one that starts at the finger's
8
+ * speed, which only a runtime sample has.
6
9
  */
7
10
  /** SwiftUI's spring(duration:bounce:) with mass 1 */
8
11
  export type Spring = {
@@ -13,10 +16,14 @@ export declare const SHEET_SPRING: Spring;
13
16
  /** A released sheet does not overshoot: past its rest it would lift off the bottom of the screen. */
14
17
  export declare const SHEET_RELEASE_SPRING: Spring;
15
18
  export declare const MENU_SPRING: Spring;
16
- /** The time these springs take to settle within 0.001, as --spring-sheet-duration and --spring-menu-duration. */
17
- export declare const SHEET_SPRING_MS = 495;
19
+ /**
20
+ * The time a sheet takes to come or go, as --spring-sheet-duration: the spring is within 0.001 of its end by then.
21
+ * A sheet pulled down leaves within it too.
22
+ */
23
+ export declare const SHEET_SPRING_MS = 500;
24
+ /** The time the menu's spring takes to settle within 0.001, as --spring-menu-duration. */
18
25
  export declare const MENU_SPRING_MS = 325;
19
- /** The longest a sheet takes to leave: back into its button, or off the screen from a finger's release. */
26
+ /** The longest a sheet takes to leave, off the screen from a finger's release. */
20
27
  export declare const SHEET_EXIT_MS = 500;
21
28
  /**
22
29
  * A spring as a CSS easing and the time it takes to settle. `velocity` is the start speed in units of the whole move
@@ -27,20 +34,14 @@ export declare function springEasing({ duration, bounce }: Spring, velocity?: nu
27
34
  easing: string;
28
35
  ms: number;
29
36
  };
30
- /** Starts noting what each press lands on, once per document. */
31
- export declare function watchPresentationSources(doc: Document | undefined): void;
32
- /** The control pressed just now, which an overlay opening now opens from, if any. */
33
- export declare function presentationSource(doc: Document | undefined): Element | null;
34
- /**
35
- * The transform that lays the panel, at its rest, over the source: the panel grows out of it from there. Null when
36
- * the source is gone, has no size, lies off the screen or inside the panel: the panel then comes as it would alone.
37
- */
38
- export declare function sourceTransform(panel: HTMLElement, source: Element | null): string | null;
39
37
  /**
40
38
  * A phone menu covers its button, its corner on the button's (menuTriggerCover.ts), and grows from its transform
41
39
  * origin, which Radix puts at that corner: the scale that makes it the button's size there is all it takes. Sizes are
42
40
  * the boxes' own, so this holds before the menu is placed.
43
41
  */
44
42
  export declare function sourceScale(panel: HTMLElement, source: HTMLElement | null): string | null;
45
- /** Whether a phone overlay may grow out of its button: not with reduced motion, nor in the Plex Android look. */
43
+ /**
44
+ * Whether a phone overlay moves on the iOS springs (a menu out of its button, a sheet up from the bottom): not with
45
+ * reduced motion, nor in the Plex Android look.
46
+ */
46
47
  export declare function growsFromButton(element: Element | null | undefined): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/vue",
3
- "version": "0.42.7",
3
+ "version": "0.42.9",
4
4
  "description": "Plex UI components for Vue 3, built on Reka UI and the shared @plexui/styles CSS",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -77,7 +77,7 @@
77
77
  "@maskito/core": "5.2.2",
78
78
  "@maskito/kit": "5.2.2",
79
79
  "@maskito/vue": "5.2.2",
80
- "@plexui/styles": "^0.17.6",
80
+ "@plexui/styles": "^0.17.8",
81
81
  "@tanstack/table-core": "8.21.3",
82
82
  "@tanstack/vue-table": "8.21.3",
83
83
  "@tiptap/core": "3.21.0",