@plexui/vue 0.42.8 → 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.
- package/dist/es/components/Dialog/Dialog.js +15 -26
- package/dist/es/components/Dialog/Dialog.js.map +1 -1
- package/dist/es/components/Dialog/sheetDrag.js +1 -9
- package/dist/es/components/Dialog/sheetDrag.js.map +1 -1
- package/dist/es/lib/presentMotion.js +19 -79
- package/dist/es/lib/presentMotion.js.map +1 -1
- package/dist/types/lib/presentMotion.d.ts +18 -17
- package/package.json +2 -2
|
@@ -7,10 +7,8 @@ import { dismissableSurfaces, useDeferredPointerDownOutside } from "../Popover/d
|
|
|
7
7
|
import { firstElementChild } from "../Tooltip/slot.js";
|
|
8
8
|
import { TransitionGroup } from "../Transition/index.js";
|
|
9
9
|
import { attachSheetDrag } from "./sheetDrag.js";
|
|
10
|
-
import { growsFromButton,
|
|
10
|
+
import { growsFromButton, SHEET_EXIT_MS, SHEET_SPRING_MS } from "../../lib/presentMotion.js";
|
|
11
11
|
// Notes the button each press lands on from the start, so the first dialog, mounted by the press that opens it, knows it
|
|
12
|
-
if (typeof document !== "undefined")
|
|
13
|
-
watchPresentationSources(document);
|
|
14
12
|
import { watchDialogViewport } from "./dialogViewport.js";
|
|
15
13
|
import { enterStep, leaveStep, releaseStepHeight, settleStepHeight, STEP_TIMING } from "./dialogSteps.js";
|
|
16
14
|
import { PHONE_LAYOUT as PHONE_LAYOUT_SCOPE } from "../PhoneLayout/PhoneLayout.js";
|
|
@@ -457,7 +455,7 @@ export const DialogContent = defineComponent({
|
|
|
457
455
|
if (ownerKeepsOpen(request))
|
|
458
456
|
return false;
|
|
459
457
|
draggedClose.value = true;
|
|
460
|
-
// An owner that keeps it open without saying so: its next close
|
|
458
|
+
// An owner that keeps it open without saying so: its next close slides down on the sheet's spring again
|
|
461
459
|
setTimeout(() => { if (open.value)
|
|
462
460
|
draggedClose.value = false; }, SHEET_EXIT_MS);
|
|
463
461
|
if (props.confirmClose) {
|
|
@@ -469,33 +467,24 @@ export const DialogContent = defineComponent({
|
|
|
469
467
|
setOpen(false);
|
|
470
468
|
return true;
|
|
471
469
|
};
|
|
472
|
-
// A phone sheet
|
|
473
|
-
// finger's speed (lib/presentMotion)
|
|
474
|
-
let source = null;
|
|
470
|
+
// A phone sheet slides up from the bottom and back down on iOS's spring, the scrim with it, both ways on one timer;
|
|
471
|
+
// one pulled down leaves at the finger's speed (lib/presentMotion)
|
|
475
472
|
// Reactive: a sheet let go of changes its exit timer, in the render that closes it
|
|
476
473
|
const draggedClose = shallowRef(false);
|
|
477
474
|
watch(open, (isOpen) => {
|
|
478
|
-
if (
|
|
479
|
-
|
|
480
|
-
source = typeof document === "undefined" ? null : presentationSource(document);
|
|
481
|
-
draggedClose.value = false;
|
|
475
|
+
if (isOpen)
|
|
476
|
+
draggedClose.value = false;
|
|
482
477
|
}, { immediate: true, flush: "sync" });
|
|
483
478
|
const sheetMotion = () => (phoneWindow.value || phoneLayout.value) && mobilePlacement.value === "bottom" && growsFromButton(undefined);
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
watch([panelNode, open, draggedClose], ([panel]) => {
|
|
479
|
+
// The sheet's spring, in the panel's CSS (Dialog.module.css): only where the dialog times it so
|
|
480
|
+
watch([panelNode, sheetMotion], ([panel, moves]) => {
|
|
487
481
|
if (!panel)
|
|
488
482
|
return;
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
panel.
|
|
493
|
-
|
|
494
|
-
else {
|
|
495
|
-
panel.style.removeProperty("--dialog-panel-source-transform");
|
|
496
|
-
panel.removeAttribute("data-presented-from");
|
|
497
|
-
}
|
|
498
|
-
}, { flush: "post" });
|
|
483
|
+
if (moves)
|
|
484
|
+
panel.setAttribute("data-sheet-motion", "");
|
|
485
|
+
else
|
|
486
|
+
panel.removeAttribute("data-sheet-motion");
|
|
487
|
+
}, { flush: "post", immediate: true });
|
|
499
488
|
const handleInteractOutside = (event) => {
|
|
500
489
|
if (!open.value)
|
|
501
490
|
event.preventDefault();
|
|
@@ -649,8 +638,8 @@ export const DialogContent = defineComponent({
|
|
|
649
638
|
const crossesScreen = placement === "bottom" || placement === "start" || placement === "end" || placement === "fullscreen" || sheetCrosses;
|
|
650
639
|
const timing = crossesScreen ? overlayTimingLarge : overlayTiming;
|
|
651
640
|
const transitionTiming = sheetMotion() ? {
|
|
652
|
-
enterDuration:
|
|
653
|
-
exitDuration:
|
|
641
|
+
enterDuration: SHEET_SPRING_MS,
|
|
642
|
+
exitDuration: draggedClose.value ? SHEET_EXIT_MS : SHEET_SPRING_MS,
|
|
654
643
|
} : timing;
|
|
655
644
|
// Portaled out of any phone layout, a phone dialog carries its own scope, above its transition: the phone rules
|
|
656
645
|
// of the style sheet start there.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../../src/components/Dialog/Dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,QAAQ,IAAI,aAAa,EACzB,CAAC,EACD,MAAM,EACN,eAAe,EACf,SAAS,EACT,WAAW,EACX,OAAO,EACP,GAAG,EACH,UAAU,EACV,QAAQ,EACR,KAAK,EAUL,OAAO,EACP,UAAU,GACX,MAAM,KAAK,CAAA;AACZ,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,iBAAiB,IAAI,qBAAqB,EAC1C,aAAa,IAAI,iBAAiB,EAClC,YAAY,IAAI,gBAAgB,EAChC,UAAU,IAAI,cAAc,EAC5B,WAAW,IAAI,eAAe,EAC9B,UAAU,IAAI,cAAc,EAC5B,uBAAuB,EACvB,gBAAgB,EAChB,KAAK,GACN,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,cAAc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ACxG,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,CAAC,SAAS,EAAE,EAAE;gBACvE,CAAC,CAAC,eAAe,EAAE;oBACjB,GAAG,WAAW;oBACd,EAAE,EAAE,KAAK;oBACT,OAAO,EAAE,IAAI;oBACb,KAAK,EAAE,CAAC,CAAC,IAAI;oBACb,OAAO,EAAE,SAAS;oBAClB,MAAM,EAAE,SAAS;oBACjB,YAAY,EAAE,gBAAgB;oBAC9B,cAAc,EAAE,iBAAiB;iBAClC,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;aAClB,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n cloneVNode,\n computed,\n createCommentVNode,\n defineComponent,\n Fragment as FragmentVNode,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n onUnmounted,\n provide,\n ref,\n shallowRef,\n Teleport,\n watch,\n type ComputedRef,\n type CSSProperties,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n type VNode,\n type VNodeArrayChildren,\n type VNodeChild,\n isVNode,\n mergeProps,\n} from \"vue\"\nimport {\n DialogContent as RekaDialogContent,\n DialogDescription as RekaDialogDescription,\n DialogOverlay as RekaDialogOverlay,\n DialogPortal as RekaDialogPortal,\n DialogRoot as RekaDialogRoot,\n DialogTitle as RekaDialogTitle,\n FocusScope as RekaFocusScope,\n injectDialogRootContext,\n useForwardExpose,\n useId,\n} from \"reka-ui\"\nimport { useEscCloseStack } from \"../../composables/useEscCloseStack.js\"\nimport { inToastRegion } from \"../../lib/toastRegion.js\"\nimport { cancelableKeyCopy, dataAttributes, keepMovedFocus, preventDefaultHandler, toCssVariables } from \"../../lib/helpers.js\"\nimport { dismissableSurfaces, useDeferredPointerDownOutside } from \"../Popover/deferredPointerDownOutside.js\"\nimport { firstElementChild } from \"../Tooltip/slot.js\"\nimport { TransitionGroup } from \"../Transition/index.js\"\nimport { attachSheetDrag } from \"./sheetDrag.js\"\nimport { growsFromButton, presentationSource, SHEET_EXIT_MS, SHEET_SPRING_MS, sourceTransform, watchPresentationSources } from \"../../lib/presentMotion.js\"\n\n// Notes the button each press lands on from the start, so the first dialog, mounted by the press that opens it, knows it\nif (typeof document !== \"undefined\") watchPresentationSources(document)\nimport { watchDialogViewport } from \"./dialogViewport.js\"\nimport { enterStep, leaveStep, releaseStepHeight, settleStepHeight, STEP_TIMING } from \"./dialogSteps.js\"\nimport { PHONE_LAYOUT as PHONE_LAYOUT_SCOPE, type PhoneLayoutValue } from \"../PhoneLayout/PhoneLayout.js\"\nimport { overlayTiming, overlayTimingLarge, reducedMotionEnter } from \"../Transition/shared.js\"\nimport { provideFloatingBoundaryScope, useFloatingBoundaryRegistration } from \"../../composables/useFloatingBoundary.js\"\nimport { Button } from \"../Button/Button.js\"\nimport { NavigationButton } from \"../Button/NavigationButton.js\"\nimport { Popover, PopoverAnchor, PopoverContent } from \"../Popover/Popover.js\"\nimport { followTitleRows } from \"../Page/Page.js\"\nimport { barBackground, TOOLBAR_HOST, Toolbar, ToolbarLeading, ToolbarRow, ToolbarTrailing, type BarBackground, type BarBackgroundAlias } from \"../Toolbar/Toolbar.js\"\nimport { observeScrollEdges } from \"../../lib/scrollEdges.js\"\nimport s from \"@plexui/styles/components/Dialog/Dialog.module.css\"\nimport { HOLD_PRESSES_CLASS, holdEnteringPresses } from \"../../lib/holdEnteringPresses.js\"\nimport t from \"@plexui/styles/components/Toolbar/Toolbar.module.css\"\n\n// Presses that start while a dialog or menu comes in are held, as on iOS (lib/holdEnteringPresses)\nholdEnteringPresses()\n\nconst DOUBLE_CLICK = 300\n\n/** Where content lies under the bars: DialogBody reports it, the bars show their lines with it. */\ntype DialogScroll = {\n scrolled: Ref<boolean>\n contentBelow: Ref<boolean>\n notifyScroll: (scrollTop: number) => void\n /** A large Toolbar title asks for a place at the top of the body. */\n largeTitle: Ref<boolean>\n largeTitleSlot: Ref<HTMLElement | null>\n /** The place of the bar's rows under a large title, pinned under the bar once scrolled up to it. */\n largeTitleRowSlot: Ref<HTMLElement | null>\n titleRowsPinned: Ref<boolean>\n titleRowsHeight: Ref<number>\n /** The bodies there are: without one the title stays in the bar, its rows with it. */\n bodies: Ref<number>\n}\nconst DIALOG_SCROLL: InjectionKey<DialogScroll> = Symbol(\"DialogScroll\")\n// What the header of a Sheet needs from its content to become the Sheet's bar on a phone\ntype DialogSheet = {\n showClose: boolean\n /** The bar's Close asks first (`confirmClose`) */\n asksToClose: boolean\n requestClose: () => void\n setCloseButton: (button: HTMLElement | null) => void\n}\nconst DIALOG_SHEET: InjectionKey<ComputedRef<DialogSheet | null>> = Symbol(\"DialogSheet\")\n// Inside that bar: the title, the description and the header actions take the Toolbar's parts\nconst DIALOG_BAR: InjectionKey<ComputedRef<boolean>> = Symbol(\"DialogBar\")\n// A close that asks first (`confirmClose`): DialogClose inside the content asks as the Close button does\nconst DIALOG_REQUEST_CLOSE: InjectionKey<ComputedRef<(() => void) | null>> = Symbol(\"DialogRequestClose\")\n\n/**\n * What a dialog asks before it closes with unsaved changes: the question and its destructive answer. On a phone\n * Sheet it stands at the bar's Close as an iOS confirmation (a glass popover over the sheet, no dimming; a press\n * outside it keeps editing); elsewhere it is an alert with a second answer that keeps editing.\n */\nexport type DialogConfirmClose = {\n /** The question, such as \"Are you sure you want to discard this new note?\"; text or vnodes, as React takes a node */\n message: VNodeChild\n /** A quieter line under the question, such as what a save left behind */\n detail?: VNodeChild\n /** The answer that closes and loses the changes. @default \"Discard Changes\" */\n confirmLabel?: VNodeChild\n /** The alert's answer that keeps the dialog open. @default \"Keep Editing\" */\n cancelLabel?: VNodeChild\n}\n/**\n * `confirmClose` as a value, or as a function the dialog calls at each close attempt (Close, DialogClose, Escape, a\n * press outside, a sheet pulled down) before it decides: it returns the question, or nothing to close at once. An\n * owner that commits typed words only on blur commits them there, then compares.\n */\nexport type DialogConfirmCloseProp = DialogConfirmClose | (() => DialogConfirmClose | false | null | undefined) | false | null\n// Where DialogBody takes a phone Sheet's description: the first text of the content, under the bar\n// Where a phone Sheet's description goes: the top of DialogBody, or first a DialogDescriptionSlot of the content's own\ntype DialogDescriptionSlots = { body: Ref<HTMLElement | null>; own: Ref<HTMLElement | null> }\nconst DIALOG_DESCRIPTION_SLOT: InjectionKey<DialogDescriptionSlots> = Symbol(\"DialogDescriptionSlot\")\n\n// The phone layout of the Dialog style sheet (its rules for the Sheet's bar use the same query). A dialog's content\n// mounts on the client only (its portal waits for the document), so it reads the layout as it mounts, with nothing to\n// swap after it.\nconst PHONE_LAYOUT = \"(width <= 767px)\"\nconst phoneLayout = () => (typeof window !== \"undefined\" && typeof window.matchMedia === \"function\" ? window.matchMedia(PHONE_LAYOUT) : null)\nconst usePhoneLayout = (): Readonly<Ref<boolean>> => {\n // Inside a PhoneLayout, or a dialog with `layout=\"phone\"`, at any window width\n const scope = inject(PHONE_LAYOUT_SCOPE, null)\n const query = phoneLayout()\n const narrow = ref(query?.matches ?? false)\n const phone = computed(() => !!scope?.phone.value || narrow.value)\n const update = () => { narrow.value = !!query?.matches }\n if (!query) return phone\n // Safari before 14 has only the older listener methods\n if (typeof query.addEventListener !== \"function\") {\n query.addListener(update)\n onBeforeUnmount(() => query.removeListener(update))\n } else {\n query.addEventListener(\"change\", update)\n onBeforeUnmount(() => query.removeEventListener(\"change\", update))\n }\n return phone\n}\n\n// Vue port of packages/ui/src/components/Dialog/Dialog.tsx on Reka UI\n// (the Vue lineage of Radix, same anatomy). Exports are flat (`Dialog`,\n// `DialogTrigger`, ...) because runtime-compiled templates cannot resolve\n// `Dialog.Trigger` from the `components` option.\n//\n// Where Reka differs from Radix (radix-ui 1.8), the port follows Radix:\n// - The content is labelled and described only while a DialogTitle /\n// DialogDescription is mounted.\n// - A press outside (the overlay) closes it on the click that follows\n// (../Popover/deferredPointerDownOutside.ts); the overlay is a dismiss\n// surface.\n// - The portal renders once mounted, so a closed dialog server-renders\n// nothing.\n\ntype DialogContextValue = {\n open: ComputedRef<boolean>\n setOpen: (nextState: boolean) => void\n /** Mounted DialogTitle / DialogDescription parts (Radix's title and description counts) */\n titleCount: Ref<number>\n descriptionCount: Ref<number>\n /** Retain the native modal owner until its animated subtree actually unmounts. */\n mountedSurfaces: Ref<number>\n}\n\nconst DialogContextKey: InjectionKey<DialogContextValue> = Symbol(\"PlexUIDialog\")\n\nconst useDialogContext = () => {\n const context = inject(DialogContextKey, null)\n\n if (!context) {\n throw new Error(\"Dialog compound components must be used inside <Dialog>\")\n }\n\n return context\n}\n\n/** Modal dialog root. Uncontrolled by default; bind `v-model:open` to control it. */\nexport const Dialog = defineComponent({\n name: \"Dialog\",\n props: {\n open: { type: Boolean, default: undefined },\n },\n emits: {\n \"update:open\": (open: boolean) => typeof open === \"boolean\",\n },\n setup(props, { slots, emit }) {\n const internalOpen = ref(false)\n const isOpen = computed(() => props.open ?? internalOpen.value)\n const mountedSurfaces = ref(0)\n const nativeOpen = computed(() => isOpen.value || mountedSurfaces.value > 0)\n\n const setOpen = (nextState: boolean) => {\n emit(\"update:open\", nextState)\n internalOpen.value = nextState\n }\n\n provide(DialogContextKey, { open: isOpen, setOpen, titleCount: ref(0), descriptionCount: ref(0), mountedSurfaces })\n\n return () =>\n h(RekaDialogRoot, { \"open\": nativeOpen.value, \"onUpdate:open\": setOpen }, { default: () => slots.default?.() })\n },\n})\n\n// Trigger and Close render their child with the dialog wiring merged in,\n// like Reka's `asChild` parts, but run the dialog action after the child's\n// own click handlers and skip it when one called preventDefault() (Radix's\n// composeEventHandlers). Reka's parts run first and cannot be cancelled.\n// Attributes the child sets itself win, as with Radix and Reka slots. The\n// child is the first element, also through a forwarded `<slot />`.\nconst withDialogProps = (\n child: VNode | undefined,\n props: Record<string, unknown>,\n onClick: (event: Event) => void,\n ref?: (el: unknown) => void,\n) => {\n if (!child) return null\n const own = child.props ?? {}\n const extra = Object.fromEntries(Object.entries(props).filter(([key]) => !(key in own)))\n return cloneVNode(child, { ...extra, onClick, ...(ref ? { ref } : {}) }, true)\n}\n\nexport const DialogTrigger = defineComponent({\n name: \"DialogTrigger\",\n setup(_props, { slots }) {\n const rootContext = injectDialogRootContext()\n const { open, setOpen } = useDialogContext()\n const { forwardRef, currentElement } = useForwardExpose()\n rootContext.contentId ||= useId(undefined, \"reka-dialog-content\")\n // Focus returns here when the dialog closes\n onMounted(() => {\n rootContext.triggerElement.value = currentElement.value\n })\n\n const onClick = (event: Event) => {\n if (!event.defaultPrevented) setOpen(!open.value)\n }\n\n return () => {\n const isOpen = open.value\n return withDialogProps(\n firstElementChild(slots.default?.()),\n {\n \"type\": \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": isOpen || false,\n \"aria-controls\": isOpen ? rootContext.contentId : undefined,\n \"data-state\": isOpen ? \"open\" : \"closed\",\n },\n onClick,\n forwardRef as (el: unknown) => void,\n )\n }\n },\n})\n\n// Reka 2.11's force-mounted Dialog releases hideOthers when its `present`\n// becomes false, then calls the same non-idempotent cleanup again on unmount.\n// Keep its public Root open until this transition-owned subtree unmounts.\n// The logical open state still drives Plex triggers, events and exit rendering.\nconst DialogSurface = defineComponent({\n name: \"DialogSurface\",\n setup(_props, { slots }) {\n const { mountedSurfaces } = useDialogContext()\n onMounted(() => { mountedSurfaces.value++ })\n // Descendant Reka cleanup runs first; never send it present=false while alive.\n onUnmounted(() => { mountedSurfaces.value-- })\n return () => h(\"div\", slots.default?.())\n },\n})\n\n/** Overlay and panel. `class` lands on the panel, like `className` in React. */\nconst TOP_TOOLBAR = '[data-toolbar][data-placement=\"top\"]'\nconst BOTTOM_TOOLBAR = '[data-toolbar][data-placement=\"bottom\"]'\n\nexport const DialogContent = defineComponent({\n name: \"DialogContent\",\n inheritAttrs: false,\n props: {\n /** Panel width; numbers are pixels. @default 480 */\n width: { type: [Number, String] as PropType<number | string>, default: 480 },\n /** Renders the close button in the top corner. @default true */\n showClose: { type: Boolean, default: true },\n /**\n * Rounder panel and a round close button, for dialogs that sit beside pill controls.\n * @default false\n */\n pill: { type: Boolean, default: false },\n /**\n * Where the panel sits: centered, near the top, a sheet along the bottom,\n * a full-height panel on the start or end side, or the whole screen.\n * @default \"center\"\n */\n placement: { type: String as PropType<DialogPlacement>, default: \"center\" },\n /**\n * Where a phone sheet stands at 767px and below: `bottom`, or `fullscreen` for the whole screen. `center` is the\n * alert's place: without `mobileVariant` it makes the dialog an alert. @default \"fullscreen\" for a fullscreen\n * dialog, else \"bottom\"\n */\n mobilePlacement: String as PropType<Extract<DialogPlacement, \"center\" | \"bottom\" | \"fullscreen\">>,\n /**\n * The iOS presentation at 767px and below. A phone has two modal views: the sheet, which iOS gives any view it\n * presents, and the alert, a short question with its answers (UIAlertController). @default \"sheet\"\n */\n mobileVariant: String as PropType<\"alert\" | \"sheet\">,\n /** Mobile panel palette; dark mode uses elevated surfaces. @default \"plain\" */\n surface: { type: String as PropType<\"plain\" | \"grouped\">, default: \"plain\" },\n /** Called when focus moves into the dialog on open; `event.preventDefault()` keeps it for you to place. */\n onOpenAutoFocus: Function as PropType<(event: Event) => void>,\n /** Called when focus returns on close; `event.preventDefault()` keeps it elsewhere. */\n onCloseAutoFocus: Function as PropType<(event: Event) => void>,\n /**\n * Called on Escape before the dialog closes; `event.preventDefault()` keeps it open, such as for a form with\n * unsaved changes.\n */\n onEscapeKeyDown: Function as PropType<(event: KeyboardEvent) => void>,\n /**\n * Called on a press or a focus outside the dialog, and on a phone sheet pulled down to close, before it closes;\n * `event.preventDefault()` keeps it open, such as for a form with unsaved changes (the sheet then returns, as an\n * iOS sheet does under `isModalInPresentation`), or for a press on a developer panel over the page.\n */\n onInteractOutside: Function as PropType<(event: DialogInteractOutsideEvent) => void>,\n /**\n * Asks before the dialog closes, as a form with unsaved changes does: Close, DialogClose, Escape, a press outside\n * and a phone sheet pulled down all ask first. Pass it while there are changes and leave it out (or `false`) when\n * there are none. Setting `open` to false yourself, such as after Save, closes at once.\n */\n confirmClose: { type: [Object, Boolean, Function] as PropType<DialogConfirmCloseProp>, default: undefined },\n /** Stack order of the overlay and the dialog. @default 50 */\n zIndex: Number,\n /** Class, style and data attributes for the fixed layer that holds the panel. Data attributes of DialogContent land here too. */\n rootProps: Object as PropType<DialogLayerProps>,\n /** Class, style and data attributes for the overlay. */\n overlayProps: Object as PropType<DialogLayerProps>,\n /** `phone` lays the dialog out as on a phone at any window width. Inside a PhoneLayout it always is. @default \"auto\" */\n layout: { type: String as PropType<\"auto\" | \"phone\">, default: \"auto\" },\n },\n setup(props, { slots, attrs }) {\n const { open, setOpen, titleCount, descriptionCount } = useDialogContext()\n const outerPhoneLayout = inject(PHONE_LAYOUT_SCOPE, null)\n // A dialog laid out as on a phone by its own prop, outside a PhoneLayout, keeps the window: what it holds and\n // the dialogs it opens are phone ones too, for as long as the prop says so.\n const phoneLayout = computed(() => !!outerPhoneLayout?.phone.value || props.layout === \"phone\")\n const portalTarget = computed(() => outerPhoneLayout?.container.value ?? null)\n provide(PHONE_LAYOUT_SCOPE, { container: outerPhoneLayout?.container ?? shallowRef(null), phone: phoneLayout } satisfies PhoneLayoutValue)\n // DialogBody tells the bars that follow the scroll, as a large title does, the body's scroll offset. A large Toolbar\n // title lives at the top of DialogBody, where it scrolls with the body and goes under the bar, which then shows it\n // inline, as on a page; the body keeps a place for it while a title asks for one.\n const scrollListeners = new Set<(scrollTop: number) => void>()\n const largeTitleRequests = ref(0)\n const largeTitle = computed(() => largeTitleRequests.value > 0)\n const largeTitleSlot = shallowRef<HTMLElement | null>(null)\n const largeTitleRowSlot = shallowRef<HTMLElement | null>(null)\n const titleRowsPinned = ref(false)\n const titleRowsHeight = ref(0)\n const bodies = ref(0)\n const scroll: DialogScroll = {\n scrolled: ref(false),\n contentBelow: ref(false),\n notifyScroll: (scrollTop) => scrollListeners.forEach((listener) => listener(scrollTop)),\n largeTitle,\n largeTitleSlot,\n largeTitleRowSlot,\n titleRowsPinned,\n titleRowsHeight,\n bodies,\n }\n provide(DIALOG_SCROLL, scroll)\n const requestLargeTitleSlot = () => {\n largeTitleRequests.value++\n let released = false\n return () => { if (!released) { released = true; largeTitleRequests.value-- } }\n }\n // The heights the bars report themselves: a Toolbar inside content of the app's own (a form) is not the panel's child.\n const barHeights: { top?: number; bottom?: number } = {}\n let measureBars = () => {}\n provide(TOOLBAR_HOST, {\n kind: \"dialog\",\n setHeight: (placement, height) => { barHeights[placement] = height; measureBars() },\n scrolled: scroll.scrolled,\n contentBelow: scroll.contentBelow,\n subscribeScroll: (listener) => {\n scrollListeners.add(listener)\n return () => { scrollListeners.delete(listener) }\n },\n // The request stays the same, so with a body the rows mount once, in their place (Codex #68)\n requestLargeTitleSlot,\n // Until the panel has mounted the body may not have told the dialog yet (it comes after the bar): the rows wait\n // for their place rather than mount in the bar first (Codex #69)\n holdsLargeTitle: computed(() => bodies.value > 0 || !panelNode.value),\n largeTitleSlot: computed(() => (largeTitle.value ? largeTitleSlot.value : null)),\n largeTitleRowSlot: computed(() => (largeTitle.value ? largeTitleRowSlot.value : null)),\n rowsPinned: computed(() => largeTitle.value && titleRowsPinned.value),\n })\n // A phone has no other modal view than the sheet and the alert (owner 12.11: «нет такого в iOS»): a centered\n // dialog is an alert, any other a sheet, at the bottom or over the whole screen.\n const mobileVariant = computed(() => props.mobileVariant ?? (props.mobilePlacement === \"center\" ? \"alert\" : \"sheet\"))\n const phoneWindow = usePhoneLayout()\n // A close asked for while there are changes waits for the answer (`confirmClose`). A press that dismisses the\n // question itself does not ask again: one just after the question closed is that press.\n const confirming = ref(false)\n let confirmClosedAt = 0\n const setConfirming = (next: boolean) => {\n if (confirming.value && !next) confirmClosedAt = performance.now()\n confirming.value = next\n }\n watch([open, () => props.confirmClose], ([isOpen, confirm]) => { if (!isOpen || !confirm) setConfirming(false) })\n const closeButton = shallowRef<HTMLElement | null>(null)\n // Where focus returns when the question is dismissed: the field or button that asked to close\n let returnFocus: HTMLElement | null = null\n // The question a function `confirmClose` returned at the last close attempt\n const asked = shallowRef<DialogConfirmClose | null>(null)\n // Whether the dialog closed at once (no question to ask)\n const requestClose = (): boolean => {\n // A press on a dialog that is already leaving asks nothing\n if (!open.value) return false\n const confirm = props.confirmClose\n if (!confirm) { setOpen(false); return true }\n if (confirming.value || performance.now() - confirmClosedAt < DOUBLE_CLICK) return false\n // A function decides at the attempt: the owner commits what is typed, then compares\n if (typeof confirm === \"function\") {\n const question = confirm()\n if (!question) { setOpen(false); return true }\n asked.value = question\n }\n returnFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null\n setConfirming(true)\n return false\n }\n const question = () => (typeof props.confirmClose === \"function\" ? asked.value : props.confirmClose || null)\n const setCloseButton = (button: HTMLElement | null) => { closeButton.value = button }\n // The answer that discards: the question leaves first, then the dialog, as iOS dismisses the confirmation before\n // the sheet; together, the question would stand still over the sheet as it leaves.\n let confirmTimer: ReturnType<typeof setTimeout> | undefined\n onBeforeUnmount(() => clearTimeout(confirmTimer))\n // A close from outside, or a new opening, ends a discard that is still waiting for the question to leave\n watch(open, () => clearTimeout(confirmTimer))\n const confirmAndClose = () => {\n setConfirming(false)\n clearTimeout(confirmTimer)\n confirmTimer = setTimeout(() => setOpen(false), overlayTiming.exitDuration)\n }\n provide(DIALOG_REQUEST_CLOSE, computed(() => (props.confirmClose ? requestClose : null)))\n provide(DIALOG_SHEET, computed(() => (mobileVariant.value === \"sheet\"\n ? { showClose: props.showClose, asksToClose: Boolean(props.confirmClose), requestClose, setCloseButton }\n : null)))\n // A dialog opened from a header action is not inside that header's bar\n provide(DIALOG_BAR, computed(() => false))\n provide(DIALOG_DESCRIPTION_SLOT, { body: shallowRef<HTMLElement | null>(null), own: shallowRef<HTMLElement | null>(null) })\n const mobilePlacement = computed(() =>\n mobileVariant.value === \"alert\"\n ? \"center\"\n : (props.mobilePlacement ?? props.placement) === \"fullscreen\" ? \"fullscreen\" : \"bottom\",\n )\n const rootContext = injectDialogRootContext()\n // Radix's root makes the content id; Reka's trigger does, so a dialog\n // without one would render `id=\"\"`\n rootContext.contentId ||= useId(undefined, \"reka-dialog-content\")\n // Reka replaces the root's content ref as it mounts, so the layer is found from the panel once it is in place\n const panelNode = shallowRef<HTMLElement | null>(null)\n // The bar's background reaches under the pinned rows by their height, as on a page\n watch([panelNode, titleRowsHeight], ([panel, height]) => {\n if (!panel) return\n if (height > 0) panel.style.setProperty(\"--page-toolbar-rows-height\", `${height}px`)\n else panel.style.removeProperty(\"--page-toolbar-rows-height\")\n }, { flush: \"post\" })\n let stopViewport: (() => void) | undefined\n watch(\n [panelNode, portalTarget],\n ([panel, box]) => {\n stopViewport?.()\n const content = panel?.closest<HTMLElement>(\"[data-plex-dialog]\")\n stopViewport = content ? watchDialogViewport(content, box) : undefined\n },\n { flush: \"post\", immediate: true },\n )\n onBeforeUnmount(() => stopViewport?.())\n\n const handleCloseAutoFocus = (rekaEvent: Event) => {\n // Reka announces unmount before descendant scopes release their traps.\n // Match Radix (and our Menu adapter): dispatch the cancellable callback\n // on the detached content, so custom focus restoration is not trapped.\n rekaEvent.preventDefault()\n const container = rekaEvent.target instanceof HTMLElement ? rekaEvent.target : rootContext.contentElement.value\n const trigger = rootContext.triggerElement.value\n setTimeout(() => {\n const event = new CustomEvent(rekaEvent.type, { bubbles: false, cancelable: true })\n const restoreFocus = (closeEvent: Event) => {\n props.onCloseAutoFocus?.(closeEvent)\n keepMovedFocus(closeEvent)\n if (!closeEvent.defaultPrevented) trigger?.focus()\n }\n if (!container) return restoreFocus(event)\n container.addEventListener(event.type, restoreFocus)\n container.dispatchEvent(event)\n container.removeEventListener(event.type, restoreFocus)\n }, 0)\n }\n\n // Escape goes through the shared stack, as in React, so the dialog\n // closes before overlays opened earlier (a forced-open Tooltip)\n useEscCloseStack(open, (event) => {\n if (props.onEscapeKeyDown) {\n const request = cancelableKeyCopy(event)\n props.onEscapeKeyDown(request)\n if (request.defaultPrevented) return\n }\n requestClose()\n })\n\n // The second click of a double click lands on the overlay: it must not undo the first\n let openedAt = 0\n\n // The owner's handler comes first; a prevented interaction keeps the dialog open\n const ownerKeepsOpen = (event: DialogInteractOutsideEvent) => {\n props.onInteractOutside?.(event)\n return event.defaultPrevented\n }\n // Radix's modal content: a Ctrl+click (macOS right click) does not dismiss. A deferred press asks the owner when\n // the click completes it, as Radix does, so a form that changed meanwhile can still forbid closing.\n const outsidePress = useDeferredPointerDownOutside((originalEvent) => {\n const request = new CustomEvent(\"dismissableLayer.pointerDownOutside\", { cancelable: true, detail: { originalEvent } })\n if (ownerKeepsOpen(request)) return\n if (!originalEvent.ctrlKey && performance.now() - openedAt >= DOUBLE_CLICK) requestClose()\n }, () => rootContext.contentElement.value)\n const handlePointerDownOutside = (event: Parameters<typeof outsidePress.onPointerDownOutside>[0]) => {\n // The native modal owner outlives logical open. An exiting layer must not\n // start a deferred dismissal that closes a trigger-driven reopen.\n if (!open.value) return event.preventDefault()\n // A press that dismisses the question before a close keeps editing\n if (confirming.value) return event.preventDefault()\n // A press in a toast is not outside: the toast region is a layer above the dialog. The Toaster stops it\n // before Reka sees it; this holds when the Toaster mounted after the dialog.\n if (inToastRegion(event.detail.originalEvent.target)) return event.preventDefault()\n // A primary mouse or pen press waits for its click; a touch or another button dismisses now, as Reka does\n const { originalEvent } = event.detail\n if (originalEvent.button === 0 && originalEvent.pointerType !== \"touch\") return outsidePress.onPointerDownOutside(event)\n // With changes a touch or another button asks too, and Reka does not close on it\n if (props.confirmClose) {\n // The owner's veto first: it reads the event's own defaultPrevented\n const kept = ownerKeepsOpen(event as DialogInteractOutsideEvent)\n event.preventDefault()\n // A right click (button 2, or Control and a click on a Mac) is not a dismissal, as Reka and React hold (Codex #58)\n if (!kept && !originalEvent.ctrlKey && originalEvent.button !== 2) requestClose()\n return\n }\n if (!ownerKeepsOpen(event as DialogInteractOutsideEvent)) outsidePress.onPointerDownOutside(event)\n }\n // Focus moving out while a press waits for its click is that press, as on Radix: the owner hears of it once\n const handleFocusOutside = (event: Parameters<typeof outsidePress.onFocusOutside>[0]) => {\n if (inToastRegion((event as DialogInteractOutsideEvent).detail?.originalEvent.target)) return event.preventDefault()\n outsidePress.onFocusOutside(event)\n if (!event.defaultPrevented) props.onInteractOutside?.(event as DialogInteractOutsideEvent)\n // With changes focus leaving asks, as React's interact-outside does; Reka does not close on it\n if (!event.defaultPrevented && props.confirmClose) {\n event.preventDefault()\n requestClose()\n }\n }\n // A sheet pulled down asks as a press outside does: an owner that keeps the dialog open on one, such as a form\n // with unsaved changes, keeps it on the other, and the sheet returns.\n const dismissByDrag = (originalEvent: TouchEvent) => {\n const request: DialogInteractOutsideEvent = new CustomEvent(\"dialog.sheetDrag\", { cancelable: true, detail: { originalEvent } })\n if (ownerKeepsOpen(request)) return false\n draggedClose.value = true\n // An owner that keeps it open without saying so: its next close goes back into the button again\n setTimeout(() => { if (open.value) draggedClose.value = false }, SHEET_EXIT_MS)\n if (props.confirmClose) {\n const closed = requestClose()\n if (!closed) draggedClose.value = false\n return closed\n }\n setOpen(false)\n return true\n }\n\n // A phone sheet opened by a button grows out of it and shrinks back into it; one pulled down leaves at the\n // finger's speed (lib/presentMotion). The button is the one pressed as the dialog opens.\n let source: Element | null = null\n // Reactive: a sheet let go of changes its exit timer, in the render that closes it\n const draggedClose = shallowRef(false)\n watch(open, (isOpen) => {\n if (!isOpen) return\n source = typeof document === \"undefined\" ? null : presentationSource(document)\n draggedClose.value = false\n }, { immediate: true, flush: \"sync\" })\n const sheetMotion = () =>\n (phoneWindow.value || phoneLayout.value) && mobilePlacement.value === \"bottom\" && growsFromButton(undefined)\n const growsFromSource = () => sheetMotion() && source !== null\n // The panel lies over its button before it enters and before it leaves, wherever the button is by then\n watch([panelNode, open, draggedClose], ([panel]) => {\n if (!panel) return\n const from = growsFromSource() && !draggedClose.value ? sourceTransform(panel, source) : null\n if (from) {\n panel.style.setProperty(\"--dialog-panel-source-transform\", from)\n panel.setAttribute(\"data-presented-from\", \"\")\n } else {\n panel.style.removeProperty(\"--dialog-panel-source-transform\")\n panel.removeAttribute(\"data-presented-from\")\n }\n }, { flush: \"post\" })\n const handleInteractOutside = (event: Event) => {\n if (!open.value) event.preventDefault()\n }\n watch(\n open,\n (isOpen) => {\n if (isOpen) openedAt = performance.now()\n else outsidePress.reset()\n },\n { immediate: true },\n )\n\n const boundary = provideFloatingBoundaryScope()\n let panelElement: HTMLElement | undefined\n let detachDrag: (() => void) | undefined\n let barObserver: ResizeObserver | undefined\n let barChildren: MutationObserver | undefined\n const setPanelRef = (instance: unknown) => {\n const element = instance instanceof HTMLElement ? instance : undefined\n if (element === panelElement) return\n detachDrag?.()\n barObserver?.disconnect()\n barChildren?.disconnect()\n measureBars = () => {}\n detachDrag = undefined\n panelElement = element\n panelNode.value = element ?? null\n boundary.setRoot(element)\n if (element) {\n const update = () => {\n // A phone Toolbar takes the place of the header or footer bar on its side.\n // A phone Toolbar takes the place of the header or footer bar on its side: one the dialog places itself\n // before the bar its header becomes.\n const header = element.querySelector<HTMLElement>(`:scope > ${TOP_TOOLBAR}:not([data-dialog-bar])`)\n ?? element.querySelector<HTMLElement>(`:scope > ${TOP_TOOLBAR}`)\n ?? element.querySelector<HTMLElement>(`:scope > .${s.Header}`)\n const footer = element.querySelector<HTMLElement>(`:scope > ${BOTTOM_TOOLBAR}`) ?? element.querySelector<HTMLElement>(`:scope > .${s.Footer}`)\n element.style.setProperty(\"--dialog-header-height\", `${header?.offsetHeight ?? barHeights.top ?? 0}px`)\n element.style.setProperty(\"--dialog-footer-height\", `${footer?.offsetHeight ?? barHeights.bottom ?? 0}px`)\n }\n measureBars = update\n barObserver = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n const observeBars = () => {\n barObserver?.disconnect()\n element.querySelectorAll<HTMLElement>(`:scope > .${s.Header}, :scope > .${s.Footer}, :scope > [data-toolbar]`)\n .forEach((bar) => barObserver?.observe(bar, { box: \"border-box\" }))\n update()\n }\n observeBars()\n barChildren = new MutationObserver(observeBars)\n barChildren.observe(element, { childList: true })\n }\n if (element && mobilePlacement.value === \"bottom\") {\n detachDrag = attachSheetDrag(element, dismissByDrag)\n }\n }\n\n watch(mobilePlacement, () => {\n detachDrag?.()\n detachDrag = panelElement && mobilePlacement.value === \"bottom\"\n ? attachSheetDrag(panelElement, dismissByDrag)\n : undefined\n })\n onBeforeUnmount(() => { detachDrag?.(); barObserver?.disconnect(); barChildren?.disconnect() })\n\n let overlayElement: Element | undefined\n const setOverlayRef = (instance: unknown) => {\n const el = (instance as { $el?: unknown } | null)?.$el\n const element = el instanceof Element ? el : undefined\n if (element === overlayElement) return\n if (overlayElement) dismissableSurfaces.delete(overlayElement)\n overlayElement = element\n if (element) dismissableSurfaces.add(element)\n }\n\n const renderDialog = () =>\n h(DialogSurface, { key: \"dialog\" }, () => [\n h(RekaDialogOverlay, {\n ...props.overlayProps,\n class: [s.Overlay, props.overlayProps?.class],\n style: [layerStyle(), props.overlayProps?.style],\n forceMount: true,\n ref: setOverlayRef,\n \"data-state\": open.value ? \"open\" : \"closed\",\n }),\n h(\n RekaDialogContent,\n {\n ...dataAttributes(attrs),\n ...props.rootProps,\n \"forceMount\": true,\n \"class\": [s.Content, props.rootProps?.class],\n \"data-plex-dialog\": \"\",\n \"style\": [toCssVariables({ \"dialog-width\": props.width }), layerStyle(), props.rootProps?.style],\n \"data-placement\": props.placement === \"center\" ? undefined : props.placement,\n \"data-mobile-placement\": mobilePlacement.value,\n \"data-mobile-variant\": mobileVariant.value,\n \"data-surface\": props.surface,\n \"data-state\": open.value ? \"open\" : \"closed\",\n \"data-pill\": props.pill ? \"\" : undefined,\n \"onOpenAutoFocus\": props.onOpenAutoFocus,\n \"onCloseAutoFocus\": handleCloseAutoFocus,\n // Radix labels and describes the content only by mounted parts\n ...(titleCount.value > 0 ? {} : { \"aria-labelledby\": undefined }),\n ...(descriptionCount.value > 0 ? {} : { \"aria-describedby\": undefined }),\n \"onEscapeKeyDown\": preventDefaultHandler,\n \"onPointerDownOutside\": handlePointerDownOutside,\n \"onFocusOutside\": handleFocusOutside,\n \"onInteractOutside\": handleInteractOutside,\n },\n {\n default: () => [\n // The native Content is the sole focus owner while open, so it\n // keeps tracking replacement inputs. Activate this non-trapping\n // scope only during logical exit to pause the retained modal owner.\n // A second live trap would leave the paused native scope tracking\n // removed inputs; its mutation fallback could then select current text.\n h(RekaFocusScope, {\n asChild: true,\n present: !open.value,\n loop: false,\n trapped: false,\n onMountAutoFocus: preventDefaultHandler,\n onUnmountAutoFocus: preventDefaultHandler,\n }, () => h(\"div\", { class: [s.Panel, attrs.class], ref: setPanelRef }, [\n props.showClose\n ? h(DialogClose, null, {\n default: () => [\n h(NavigationButton, { \"action\": \"close\", \"variant\": \"ghost\", \"class\": s.CloseButton, \"aria-label\": \"Close dialog\" }),\n ],\n })\n : null,\n slots.default?.(),\n props.confirmClose\n ? h(ConfirmClose, {\n ...(question() ?? { message: null }),\n open: confirming.value,\n anchor: (phoneWindow.value || phoneLayout.value) && mobileVariant.value === \"sheet\" ? closeButton.value : null,\n returnFocus: () => returnFocus,\n \"onUpdate:open\": setConfirming,\n onConfirm: confirmAndClose,\n zIndex: props.zIndex,\n })\n : null,\n ])),\n ],\n },\n ),\n ])\n\n const layerStyle = () => toCssVariables({ \"dialog-z-index\": props.zIndex === undefined ? undefined : String(props.zIndex) })\n\n return () => {\n const { placement } = props\n // A sheet crosses the screen on a phone, and wherever its owner asked for one; a dialog left to its defaults\n // stays the centred panel on a desktop, with that panel's timing.\n const sheetCrosses = (phoneWindow.value || phoneLayout.value || props.mobileVariant === \"sheet\" || props.mobilePlacement !== undefined) &&\n (mobilePlacement.value === \"bottom\" || mobilePlacement.value === \"fullscreen\")\n const crossesScreen =\n placement === \"bottom\" || placement === \"start\" || placement === \"end\" || placement === \"fullscreen\" || sheetCrosses\n const timing = crossesScreen ? overlayTimingLarge : overlayTiming\n const transitionTiming = sheetMotion() ? {\n enterDuration: growsFromSource() ? SHEET_SPRING_MS : timing.enterDuration,\n exitDuration: growsFromSource() || draggedClose.value ? SHEET_EXIT_MS : timing.exitDuration,\n } : timing\n // Portaled out of any phone layout, a phone dialog carries its own scope, above its transition: the phone rules\n // of the style sheet start there.\n const scoped = (group: VNode) =>\n phoneLayout.value && !portalTarget.value ? h(\"div\", { class: s.PhoneScope, \"data-plex-layout\": \"phone\" }, [group]) : group\n return h(RekaDialogPortal, { to: portalTarget.value ?? undefined }, {\n default: () => [\n scoped(h(\n TransitionGroup,\n // A dialog mounted open enters too, as `v-if` and `open` together do\n {\n class: [s.Transition, HOLD_PRESSES_CLASS],\n ...transitionTiming,\n reducedMotionEnterDuration: reducedMotionEnter.dialog,\n overlay: true,\n preventInitialTransition: false,\n },\n // `open && <div>` in React: closed still renders the empty wrapper\n { default: () => [open.value ? renderDialog() : createCommentVNode()] },\n )),\n ],\n })\n }\n },\n})\n\n/** How a Sheet's bar meets the content scrolled under it; see `BarBackground`. `\"solid\"` is the earlier name of `\"hard\"`. */\nexport type DialogBarBackground = BarBackground | BarBackgroundAlias\n\n// The header's own parts, fragments opened up, so its actions can stand at the end of the bar\nconst headerParts = (children: VNodeArrayChildren | undefined): VNodeArrayChildren =>\n (children ?? []).flatMap((part) =>\n isVNode(part) && part.type === FragmentVNode ? headerParts(part.children as VNodeArrayChildren) : Array.isArray(part) ? headerParts(part) : [part])\nconst isHeaderAction = (part: unknown) => isVNode(part) && part.type === DialogHeaderAction\nconst isLeadingAction = (part: unknown) => isHeaderAction(part) && (part as VNode).props?.side === \"leading\"\nconst isDescription = (part: unknown) => isVNode(part) && part.type === DialogDescription\n// A ToolbarRow in the header is a row of the phone Sheet's bar, under its controls (console 15.11)\nconst isToolbarRow = (part: unknown) => isVNode(part) && part.type === ToolbarRow\n\n// The parts it holds stand outside the header's bar, as React's descriptions stand outside the bar's provider\nconst OutsideBar = defineComponent({\n name: \"DialogOutsideBar\",\n setup(_props, { slots }) {\n provide(DIALOG_BAR, computed(() => false))\n return () => slots.default?.()\n },\n})\n\nexport const DialogHeader = defineComponent({\n name: \"DialogHeader\",\n // A phone Sheet's header is the bar and the description under it: its attributes go to the bar\n inheritAttrs: false,\n props: {\n /** How the bar meets the content scrolled under it in a phone Sheet. @default \"glass\" */\n background: { type: String as PropType<DialogBarBackground>, default: \"glass\" },\n },\n setup(props, { slots, attrs }) {\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const bar = computed(() => !!sheet?.value && phone.value)\n provide(DIALOG_BAR, bar)\n return () => {\n if (!bar.value) return h(\"div\", mergeProps({ \"class\": s.Header, \"data-background\": barBackground(props.background), \"data-scrolled\": scroll?.scrolled.value ? \"\" : undefined }, attrs), slots.default?.())\n const parts = headerParts(slots.default?.())\n const descriptions = parts.filter(isDescription)\n const slot = descriptionSlot ? descriptionSlot.own.value ?? descriptionSlot.body.value : null\n // On a phone the header of a Sheet is its Toolbar (iOS 27 kit Sheets 507-24684, Toolbar - Top - iPhone\n // 1-54520): Close at the leading edge, the title alone centered on the row of controls, the header actions\n // at the trailing edge, all on one 44px row 16px under the top edge.\n return [\n h(Toolbar, mergeProps({ \"background\": props.background, \"data-dialog-bar\": \"\" }, attrs), () => [\n // A step's Back takes the leading place, as the back button of a screen pushed inside an iOS sheet\n sheet?.value?.showClose && !parts.some(isLeadingAction)\n ? h(ToolbarLeading, { class: s.BarClose }, () => [\n sheet.value?.asksToClose\n ? h(NavigationButton, {\n \"ref\": (instance: unknown) => sheet.value?.setCloseButton(elementOf(instance)),\n \"action\": \"close\",\n \"variant\": \"ghost\",\n \"aria-label\": \"Close dialog\",\n \"onClick\": () => sheet.value?.requestClose(),\n })\n : h(DialogClose, null, { default: () => [h(NavigationButton, { \"action\": \"close\", \"variant\": \"ghost\", \"aria-label\": \"Close dialog\" })] }),\n ])\n : null,\n ...parts.filter(isLeadingAction),\n h(\"div\", { class: [t.Heading, s.BarHeading] }, parts.filter((part) => !isHeaderAction(part) && !isDescription(part) && !isToolbarRow(part))),\n ...parts.filter((part) => isHeaderAction(part) && !isLeadingAction(part)),\n // Rows stand under the controls, as in a Toolbar built by hand: the bar's glass, edge and row gap. Their own\n // fragment keeps their keys apart from the actions' keys.\n h(FragmentVNode, { key: \"toolbar-rows\" }, parts.filter(isToolbarRow)),\n ]),\n // The description reads as the first text of the content, at the top of DialogBody when there is one\n descriptions.length > 0\n ? h(Teleport, { to: slot, disabled: !slot }, [h(\"div\", { class: s.SheetDescription }, [h(OutsideBar, null, () => descriptions)])])\n : null,\n ]\n }\n },\n})\n\nexport const DialogHeaderAction = defineComponent({\n name: \"DialogHeaderAction\",\n props: {\n /**\n * `leading` puts the action before the title, such as the Back of a step in `DialogSteps`: on a phone Sheet it\n * takes the place of Close, as the back button of a screen pushed inside an iOS sheet does.\n * @default \"trailing\"\n */\n side: { type: String as PropType<\"leading\" | \"trailing\">, default: \"trailing\" },\n },\n setup(props, { slots }) {\n const bar = inject(DIALOG_BAR, null)\n return () => {\n if (bar?.value && props.side === \"leading\") return h(ToolbarLeading, { class: s.BarClose }, () => slots.default?.())\n if (bar?.value) return h(ToolbarTrailing, null, () => slots.default?.())\n return h(\"div\", { \"class\": s.HeaderAction, \"data-side\": props.side === \"leading\" ? \"leading\" : undefined }, slots.default?.())\n }\n },\n})\n\n/** The scrolling part between DialogHeader and DialogFooter: with it, only the body scrolls. */\nexport const DialogBody = defineComponent({\n name: \"DialogBody\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const setDescriptionSlot = (slot: unknown) => {\n if (descriptionSlot) descriptionSlot.body.value = slot instanceof HTMLElement ? slot : null\n }\n const element = ref<HTMLElement | null>(null)\n let stop: (() => void) | undefined\n onMounted(() => {\n if (!element.value || !scroll) return\n stop = observeScrollEdges(element.value, (edges) => {\n scroll.scrolled.value = edges.scrolled\n scroll.contentBelow.value = edges.contentBelow\n })\n })\n onBeforeUnmount(() => {\n stop?.()\n if (scroll) { scroll.scrolled.value = false; scroll.contentBelow.value = false }\n })\n const setLargeTitleSlot = (slot: unknown) => {\n if (scroll) scroll.largeTitleSlot.value = slot instanceof HTMLElement ? slot : null\n }\n const setLargeTitleRowSlot = (slot: unknown) => {\n if (scroll) scroll.largeTitleRowSlot.value = slot instanceof HTMLElement ? slot : null\n }\n // The dialog moves a large title here only while a body is there\n if (scroll) scroll.bodies.value++\n onBeforeUnmount(() => { if (scroll) scroll.bodies.value-- })\n // The rows of a large title's bar pin under it once scrolled up to it, as on a page\n let stopRows: (() => void) | undefined\n if (scroll) {\n watch([element, scroll.largeTitleRowSlot], ([body, rows]) => {\n stopRows?.()\n stopRows = body && rows\n ? followTitleRows(body, rows, (pinned, height) => { scroll.titleRowsPinned.value = pinned; scroll.titleRowsHeight.value = height })\n : undefined\n }, { flush: \"post\" })\n }\n onBeforeUnmount(() => { stopRows?.(); stopRows = undefined })\n return () => h(\"div\", { ref: element, class: [s.Body, attrs.class], onScroll: scroll ? (event: Event) => scroll.notifyScroll((event.currentTarget as HTMLElement).scrollTop) : undefined }, [\n // A large Toolbar title starts the body and scrolls with it; the description comes under it\n scroll?.largeTitle.value ? h(\"div\", { ref: setLargeTitleSlot, class: s.LargeTitle }) : null,\n scroll?.largeTitle.value ? h(\"div\", { ref: setLargeTitleRowSlot, class: s.LargeTitleRows }) : null,\n sheet?.value && phone.value ? h(\"div\", { ref: setDescriptionSlot, class: s.SheetDescriptionSlot }) : null,\n slots.default?.(),\n ])\n },\n})\n\n/**\n * Where a phone Sheet's description goes in content of your own, such as a scroller inside a form so that Enter\n * submits: the description starts it, as it starts DialogBody, and it comes before the body's place. It renders\n * nothing outside a phone Sheet.\n */\nexport const DialogDescriptionSlot = defineComponent({\n name: \"DialogDescriptionSlot\",\n setup() {\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const setOwnSlot = (slot: unknown) => {\n if (descriptionSlot) descriptionSlot.own.value = slot instanceof HTMLElement ? slot : null\n }\n return () => (sheet?.value && phone.value ? h(\"div\", { ref: setOwnSlot, class: s.SheetDescriptionSlot }) : null)\n },\n})\n\nexport const DialogFooter = defineComponent({\n name: \"DialogFooter\",\n props: {\n /** Override the mobile action layout. Two alert actions default to inline, three or more and sheets to stacked. */\n mobileLayout: String as PropType<\"inline\" | \"stacked\">,\n /** How the bar meets the content scrolled under it in a phone Sheet. @default \"soft\" */\n background: { type: String as PropType<DialogBarBackground>, default: \"soft\" },\n },\n setup(props, { slots }) {\n const boundary = useFloatingBoundaryRegistration()\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const phone = usePhoneLayout()\n return () => {\n const parts = slots.default?.()\n // A phone Sheet stacks its main action on top, as an iOS setup sheet does. A footer is written with it last,\n // where a desktop row ends, so the order is turned in the page itself: focus and a screen reader meet the\n // actions in the order they are seen.\n const turned = sheet?.value && phone.value && props.mobileLayout !== \"inline\"\n return h(\"div\", {\n \"ref\": boundary?.setFooter,\n \"class\": s.Footer,\n \"data-mobile-layout\": props.mobileLayout,\n \"data-background\": barBackground(props.background),\n \"data-content-below\": scroll?.contentBelow.value ? \"\" : undefined,\n }, turned ? headerParts(parts).reverse() : parts)\n }\n },\n})\n\n/** Counts a mounted part, as Radix's title and description counts do. */\nconst useMountedCount = (count: Ref<number>) => {\n onMounted(() => {\n count.value++\n })\n onBeforeUnmount(() => {\n count.value--\n })\n}\n\nexport const DialogTitle = defineComponent({\n name: \"DialogTitle\",\n setup(_props, { slots }) {\n useMountedCount(useDialogContext().titleCount)\n const bar = inject(DIALOG_BAR, null)\n return () => h(RekaDialogTitle, { class: bar?.value ? t.Title : s.Title }, { default: () => slots.default?.() })\n },\n})\n\nexport const DialogDescription = defineComponent({\n name: \"DialogDescription\",\n setup(_props, { slots }) {\n useMountedCount(useDialogContext().descriptionCount)\n const bar = inject(DIALOG_BAR, null)\n const element = ref<{ $el?: Element } | Element | null>(null)\n const shown = ref(false)\n // The header leaves its own descriptions out of the bar. One the bar still holds, inside a part of the\n // header's own, is the title's second line (Toolbar's subtitle) when the reader sees it; one that is only\n // read out, visually hidden, leaves the title on its one line.\n const measure = () => {\n const node = element.value instanceof Element ? element.value : element.value?.$el\n shown.value = !!bar?.value && node instanceof HTMLElement && node.offsetHeight > 1 && node.offsetWidth > 1\n }\n onMounted(measure)\n watch(() => bar?.value, () => queueMicrotask(measure))\n return () => h(RekaDialogDescription, { ref: element, class: bar?.value && shown.value ? t.Subtitle : s.Description }, { default: () => slots.default?.() })\n },\n})\n\nexport const DialogClose = defineComponent({\n name: \"DialogClose\",\n setup(_props, { slots }) {\n const rootContext = injectDialogRootContext()\n const requestClose = inject(DIALOG_REQUEST_CLOSE, null)\n const onClick = (event: Event) => {\n if (event.defaultPrevented) return\n const request = requestClose?.value\n if (request) request()\n else rootContext.onOpenChange(false)\n }\n return () => withDialogProps(firstElementChild(slots.default?.()), { type: \"button\" }, onClick)\n },\n})\n\nconst elementOf = (instance: unknown): HTMLElement | null =>\n instance instanceof HTMLElement ? instance : ((instance as { $el?: unknown } | null)?.$el instanceof HTMLElement ? (instance as { $el: HTMLElement }).$el : null)\n\n// iOS asks at the button that closes (a confirmation dialog presented from the sheet's Close on iOS 27: a glass\n// popover over it, no dimming, the question in 17 regular over a full-width destructive pill); with no such button,\n// and on a desktop, the question is an alert.\nconst ConfirmClose = defineComponent({\n name: \"DialogConfirmClose\",\n props: {\n message: { type: null as unknown as PropType<VNodeChild>, required: true },\n detail: { type: null as unknown as PropType<VNodeChild>, default: undefined },\n confirmLabel: { type: null as unknown as PropType<VNodeChild>, default: \"Discard Changes\" },\n cancelLabel: { type: null as unknown as PropType<VNodeChild>, default: \"Keep Editing\" },\n open: { type: Boolean, default: false },\n /** The phone Sheet's Close: the question stands at it. Without one it is an alert. */\n anchor: { type: Object as PropType<HTMLElement | null>, default: null },\n returnFocus: { type: Function as PropType<() => HTMLElement | null>, required: true },\n /** The owner dialog's stack order: the question stands over it */\n zIndex: Number,\n },\n emits: {\n \"update:open\": (open: boolean) => typeof open === \"boolean\",\n confirm: () => true,\n },\n setup(props, { emit }) {\n const setOpen = (next: boolean) => emit(\"update:open\", next)\n const confirm = () => emit(\"confirm\")\n const messageId = useId(undefined, \"plex-confirm-close\")\n const hasDetail = () => props.detail != null && props.detail !== false\n return () => {\n const anchor = props.anchor\n if (anchor) {\n return h(Popover, { \"open\": props.open, \"onUpdate:open\": setOpen }, () => [\n h(PopoverAnchor, { element: anchor }),\n // Over the Close, its corner 6 before the button's, as the native confirmation grows out of it\n h(PopoverContent, {\n \"side\": \"bottom\",\n \"align\": \"start\",\n // Measured only while the question is open: a read of a layout on every render of the sheet forced one\n \"sideOffset\": props.open ? -anchor.offsetHeight : 0,\n \"alignOffset\": -6,\n \"collisionPadding\": 10,\n \"width\": 240,\n \"minWidth\": 240,\n \"zIndex\": props.zIndex,\n \"ariaLabelledby\": messageId,\n \"class\": s.ConfirmClose,\n \"data-dialog-confirm-close\": \"\",\n }, () => [\n h(\"p\", { id: messageId, class: s.ConfirmCloseMessage }, [props.message as VNodeArrayChildren[number]]),\n hasDetail() ? h(\"p\", { class: s.ConfirmCloseDetail }, [props.detail as VNodeArrayChildren[number]]) : null,\n h(Button, { block: true, pill: true, color: \"danger\", variant: \"soft\", class: s.ConfirmCloseAction, onClick: confirm }, () => props.confirmLabel),\n ]),\n ])\n }\n return h(Dialog, { \"open\": props.open, \"onUpdate:open\": setOpen }, () => [\n h(DialogContent, {\n \"mobileVariant\": \"alert\",\n \"surface\": \"plain\",\n \"width\": 360,\n \"showClose\": false,\n \"zIndex\": props.zIndex,\n \"data-dialog-confirm-close\": \"\",\n \"onCloseAutoFocus\": (event: Event) => {\n const target = props.returnFocus()\n if (target?.isConnected) {\n event.preventDefault()\n target.focus({ preventScroll: true })\n }\n },\n }, () => [\n // The question names the alert, as an alert's title does\n h(DialogHeader, null, () => [\n h(DialogTitle, null, () => props.message),\n hasDetail() ? h(DialogDescription, null, () => props.detail) : null,\n ]),\n h(DialogFooter, null, () => [\n h(DialogClose, null, () => [h(Button, { color: \"secondary\", variant: \"soft\" }, () => props.cancelLabel)]),\n h(Button, { color: \"danger\", onClick: confirm }, () => props.confirmLabel),\n ]),\n ]),\n ])\n }\n },\n})\n\n/** The steps of a flow inside a dialog, such as a sign-in that asks for an email and then a code. */\nexport const DialogSteps = defineComponent({\n name: \"DialogSteps\",\n props: {\n /** The step on screen. A new value brings its content in. */\n step: { type: [String, Number] as PropType<string | number>, required: true },\n /**\n * `forward` brings the new step in from the trailing edge over the one before, as a push on iOS; `back` returns\n * to a step before it.\n * @default \"forward\"\n */\n direction: { type: String as PropType<\"forward\" | \"back\">, default: \"forward\" },\n },\n setup(props, { slots }) {\n return () => {\n // Resolve this step now, so a step that leaves cannot read the next one\n const entry = h(\"div\", { \"key\": props.step, \"data-dialog-step\": \"\", \"tabindex\": -1 }, slots.default?.())\n return h(\"div\", { \"class\": s.Steps, \"data-direction\": props.direction }, [\n h(TransitionGroup, {\n ...STEP_TIMING,\n as: \"div\",\n overlay: true,\n class: s.Step,\n onEnter: enterStep,\n onExit: leaveStep,\n onExitActive: settleStepHeight,\n onExitComplete: releaseStepHeight,\n }, () => [entry]),\n ])\n }\n },\n})\n\nexport type DialogProps = InstanceType<typeof Dialog>[\"$props\"]\n\nexport type DialogPlacement = \"center\" | \"top\" | \"bottom\" | \"start\" | \"end\" | \"fullscreen\"\n\n/**\n * A press or a focus outside the dialog, or a phone sheet pulled down to close; `event.detail.originalEvent` is the\n * browser's event (a TouchEvent for the sheet).\n */\nexport type DialogInteractOutsideEvent = CustomEvent<{ originalEvent: PointerEvent | FocusEvent | TouchEvent }>\n\n/** Class, style and data attributes for one of the dialog's layers. */\nexport type DialogLayerProps = {\n class?: HTMLAttributes[\"class\"]\n style?: string | CSSProperties\n [dataAttribute: `data-${string}`]: string | number | boolean | undefined\n}\n\n/** DialogContent props; `class` lands on the panel, like `className` in React. */\nexport type DialogContentProps = InstanceType<typeof DialogContent>[\"$props\"] & { class?: HTMLAttributes[\"class\"] }\n\nexport type DialogHeaderProps = InstanceType<typeof DialogHeader>[\"$props\"]\nexport type DialogFooterProps = InstanceType<typeof DialogFooter>[\"$props\"]\nexport type DialogHeaderActionProps = InstanceType<typeof DialogHeaderAction>[\"$props\"]\nexport type DialogStepsProps = InstanceType<typeof DialogSteps>[\"$props\"]\n"]}
|
|
1
|
+
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../../src/components/Dialog/Dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,QAAQ,IAAI,aAAa,EACzB,CAAC,EACD,MAAM,EACN,eAAe,EACf,SAAS,EACT,WAAW,EACX,OAAO,EACP,GAAG,EACH,UAAU,EACV,QAAQ,EACR,KAAK,EAUL,OAAO,EACP,UAAU,GACX,MAAM,KAAK,CAAA;AACZ,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,iBAAiB,IAAI,qBAAqB,EAC1C,aAAa,IAAI,iBAAiB,EAClC,YAAY,IAAI,gBAAgB,EAChC,UAAU,IAAI,cAAc,EAC5B,WAAW,IAAI,eAAe,EAC9B,UAAU,IAAI,cAAc,EAC5B,uBAAuB,EACvB,gBAAgB,EAChB,KAAK,GACN,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC/H,OAAO,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAA;AAC7G,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO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AAM,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,kBAAkB,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;YACxG,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,CAAC,SAAS,EAAE,EAAE;gBACvE,CAAC,CAAC,eAAe,EAAE;oBACjB,GAAG,WAAW;oBACd,EAAE,EAAE,KAAK;oBACT,OAAO,EAAE,IAAI;oBACb,KAAK,EAAE,CAAC,CAAC,IAAI;oBACb,OAAO,EAAE,SAAS;oBAClB,MAAM,EAAE,SAAS;oBACjB,YAAY,EAAE,gBAAgB;oBAC9B,cAAc,EAAE,iBAAiB;iBAClC,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;aAClB,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n cloneVNode,\n computed,\n createCommentVNode,\n defineComponent,\n Fragment as FragmentVNode,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n onUnmounted,\n provide,\n ref,\n shallowRef,\n Teleport,\n watch,\n type ComputedRef,\n type CSSProperties,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n type VNode,\n type VNodeArrayChildren,\n type VNodeChild,\n isVNode,\n mergeProps,\n} from \"vue\"\nimport {\n DialogContent as RekaDialogContent,\n DialogDescription as RekaDialogDescription,\n DialogOverlay as RekaDialogOverlay,\n DialogPortal as RekaDialogPortal,\n DialogRoot as RekaDialogRoot,\n DialogTitle as RekaDialogTitle,\n FocusScope as RekaFocusScope,\n injectDialogRootContext,\n useForwardExpose,\n useId,\n} from \"reka-ui\"\nimport { useEscCloseStack } from \"../../composables/useEscCloseStack.js\"\nimport { inToastRegion } from \"../../lib/toastRegion.js\"\nimport { cancelableKeyCopy, dataAttributes, keepMovedFocus, preventDefaultHandler, toCssVariables } from \"../../lib/helpers.js\"\nimport { dismissableSurfaces, useDeferredPointerDownOutside } from \"../Popover/deferredPointerDownOutside.js\"\nimport { firstElementChild } from \"../Tooltip/slot.js\"\nimport { TransitionGroup } from \"../Transition/index.js\"\nimport { attachSheetDrag } from \"./sheetDrag.js\"\nimport { growsFromButton, SHEET_EXIT_MS, SHEET_SPRING_MS } from \"../../lib/presentMotion.js\"\n\n// Notes the button each press lands on from the start, so the first dialog, mounted by the press that opens it, knows it\nimport { watchDialogViewport } from \"./dialogViewport.js\"\nimport { enterStep, leaveStep, releaseStepHeight, settleStepHeight, STEP_TIMING } from \"./dialogSteps.js\"\nimport { PHONE_LAYOUT as PHONE_LAYOUT_SCOPE, type PhoneLayoutValue } from \"../PhoneLayout/PhoneLayout.js\"\nimport { overlayTiming, overlayTimingLarge, reducedMotionEnter } from \"../Transition/shared.js\"\nimport { provideFloatingBoundaryScope, useFloatingBoundaryRegistration } from \"../../composables/useFloatingBoundary.js\"\nimport { Button } from \"../Button/Button.js\"\nimport { NavigationButton } from \"../Button/NavigationButton.js\"\nimport { Popover, PopoverAnchor, PopoverContent } from \"../Popover/Popover.js\"\nimport { followTitleRows } from \"../Page/Page.js\"\nimport { barBackground, TOOLBAR_HOST, Toolbar, ToolbarLeading, ToolbarRow, ToolbarTrailing, type BarBackground, type BarBackgroundAlias } from \"../Toolbar/Toolbar.js\"\nimport { observeScrollEdges } from \"../../lib/scrollEdges.js\"\nimport s from \"@plexui/styles/components/Dialog/Dialog.module.css\"\nimport { HOLD_PRESSES_CLASS, holdEnteringPresses } from \"../../lib/holdEnteringPresses.js\"\nimport t from \"@plexui/styles/components/Toolbar/Toolbar.module.css\"\n\n// Presses that start while a dialog or menu comes in are held, as on iOS (lib/holdEnteringPresses)\nholdEnteringPresses()\n\nconst DOUBLE_CLICK = 300\n\n/** Where content lies under the bars: DialogBody reports it, the bars show their lines with it. */\ntype DialogScroll = {\n scrolled: Ref<boolean>\n contentBelow: Ref<boolean>\n notifyScroll: (scrollTop: number) => void\n /** A large Toolbar title asks for a place at the top of the body. */\n largeTitle: Ref<boolean>\n largeTitleSlot: Ref<HTMLElement | null>\n /** The place of the bar's rows under a large title, pinned under the bar once scrolled up to it. */\n largeTitleRowSlot: Ref<HTMLElement | null>\n titleRowsPinned: Ref<boolean>\n titleRowsHeight: Ref<number>\n /** The bodies there are: without one the title stays in the bar, its rows with it. */\n bodies: Ref<number>\n}\nconst DIALOG_SCROLL: InjectionKey<DialogScroll> = Symbol(\"DialogScroll\")\n// What the header of a Sheet needs from its content to become the Sheet's bar on a phone\ntype DialogSheet = {\n showClose: boolean\n /** The bar's Close asks first (`confirmClose`) */\n asksToClose: boolean\n requestClose: () => void\n setCloseButton: (button: HTMLElement | null) => void\n}\nconst DIALOG_SHEET: InjectionKey<ComputedRef<DialogSheet | null>> = Symbol(\"DialogSheet\")\n// Inside that bar: the title, the description and the header actions take the Toolbar's parts\nconst DIALOG_BAR: InjectionKey<ComputedRef<boolean>> = Symbol(\"DialogBar\")\n// A close that asks first (`confirmClose`): DialogClose inside the content asks as the Close button does\nconst DIALOG_REQUEST_CLOSE: InjectionKey<ComputedRef<(() => void) | null>> = Symbol(\"DialogRequestClose\")\n\n/**\n * What a dialog asks before it closes with unsaved changes: the question and its destructive answer. On a phone\n * Sheet it stands at the bar's Close as an iOS confirmation (a glass popover over the sheet, no dimming; a press\n * outside it keeps editing); elsewhere it is an alert with a second answer that keeps editing.\n */\nexport type DialogConfirmClose = {\n /** The question, such as \"Are you sure you want to discard this new note?\"; text or vnodes, as React takes a node */\n message: VNodeChild\n /** A quieter line under the question, such as what a save left behind */\n detail?: VNodeChild\n /** The answer that closes and loses the changes. @default \"Discard Changes\" */\n confirmLabel?: VNodeChild\n /** The alert's answer that keeps the dialog open. @default \"Keep Editing\" */\n cancelLabel?: VNodeChild\n}\n/**\n * `confirmClose` as a value, or as a function the dialog calls at each close attempt (Close, DialogClose, Escape, a\n * press outside, a sheet pulled down) before it decides: it returns the question, or nothing to close at once. An\n * owner that commits typed words only on blur commits them there, then compares.\n */\nexport type DialogConfirmCloseProp = DialogConfirmClose | (() => DialogConfirmClose | false | null | undefined) | false | null\n// Where DialogBody takes a phone Sheet's description: the first text of the content, under the bar\n// Where a phone Sheet's description goes: the top of DialogBody, or first a DialogDescriptionSlot of the content's own\ntype DialogDescriptionSlots = { body: Ref<HTMLElement | null>; own: Ref<HTMLElement | null> }\nconst DIALOG_DESCRIPTION_SLOT: InjectionKey<DialogDescriptionSlots> = Symbol(\"DialogDescriptionSlot\")\n\n// The phone layout of the Dialog style sheet (its rules for the Sheet's bar use the same query). A dialog's content\n// mounts on the client only (its portal waits for the document), so it reads the layout as it mounts, with nothing to\n// swap after it.\nconst PHONE_LAYOUT = \"(width <= 767px)\"\nconst phoneLayout = () => (typeof window !== \"undefined\" && typeof window.matchMedia === \"function\" ? window.matchMedia(PHONE_LAYOUT) : null)\nconst usePhoneLayout = (): Readonly<Ref<boolean>> => {\n // Inside a PhoneLayout, or a dialog with `layout=\"phone\"`, at any window width\n const scope = inject(PHONE_LAYOUT_SCOPE, null)\n const query = phoneLayout()\n const narrow = ref(query?.matches ?? false)\n const phone = computed(() => !!scope?.phone.value || narrow.value)\n const update = () => { narrow.value = !!query?.matches }\n if (!query) return phone\n // Safari before 14 has only the older listener methods\n if (typeof query.addEventListener !== \"function\") {\n query.addListener(update)\n onBeforeUnmount(() => query.removeListener(update))\n } else {\n query.addEventListener(\"change\", update)\n onBeforeUnmount(() => query.removeEventListener(\"change\", update))\n }\n return phone\n}\n\n// Vue port of packages/ui/src/components/Dialog/Dialog.tsx on Reka UI\n// (the Vue lineage of Radix, same anatomy). Exports are flat (`Dialog`,\n// `DialogTrigger`, ...) because runtime-compiled templates cannot resolve\n// `Dialog.Trigger` from the `components` option.\n//\n// Where Reka differs from Radix (radix-ui 1.8), the port follows Radix:\n// - The content is labelled and described only while a DialogTitle /\n// DialogDescription is mounted.\n// - A press outside (the overlay) closes it on the click that follows\n// (../Popover/deferredPointerDownOutside.ts); the overlay is a dismiss\n// surface.\n// - The portal renders once mounted, so a closed dialog server-renders\n// nothing.\n\ntype DialogContextValue = {\n open: ComputedRef<boolean>\n setOpen: (nextState: boolean) => void\n /** Mounted DialogTitle / DialogDescription parts (Radix's title and description counts) */\n titleCount: Ref<number>\n descriptionCount: Ref<number>\n /** Retain the native modal owner until its animated subtree actually unmounts. */\n mountedSurfaces: Ref<number>\n}\n\nconst DialogContextKey: InjectionKey<DialogContextValue> = Symbol(\"PlexUIDialog\")\n\nconst useDialogContext = () => {\n const context = inject(DialogContextKey, null)\n\n if (!context) {\n throw new Error(\"Dialog compound components must be used inside <Dialog>\")\n }\n\n return context\n}\n\n/** Modal dialog root. Uncontrolled by default; bind `v-model:open` to control it. */\nexport const Dialog = defineComponent({\n name: \"Dialog\",\n props: {\n open: { type: Boolean, default: undefined },\n },\n emits: {\n \"update:open\": (open: boolean) => typeof open === \"boolean\",\n },\n setup(props, { slots, emit }) {\n const internalOpen = ref(false)\n const isOpen = computed(() => props.open ?? internalOpen.value)\n const mountedSurfaces = ref(0)\n const nativeOpen = computed(() => isOpen.value || mountedSurfaces.value > 0)\n\n const setOpen = (nextState: boolean) => {\n emit(\"update:open\", nextState)\n internalOpen.value = nextState\n }\n\n provide(DialogContextKey, { open: isOpen, setOpen, titleCount: ref(0), descriptionCount: ref(0), mountedSurfaces })\n\n return () =>\n h(RekaDialogRoot, { \"open\": nativeOpen.value, \"onUpdate:open\": setOpen }, { default: () => slots.default?.() })\n },\n})\n\n// Trigger and Close render their child with the dialog wiring merged in,\n// like Reka's `asChild` parts, but run the dialog action after the child's\n// own click handlers and skip it when one called preventDefault() (Radix's\n// composeEventHandlers). Reka's parts run first and cannot be cancelled.\n// Attributes the child sets itself win, as with Radix and Reka slots. The\n// child is the first element, also through a forwarded `<slot />`.\nconst withDialogProps = (\n child: VNode | undefined,\n props: Record<string, unknown>,\n onClick: (event: Event) => void,\n ref?: (el: unknown) => void,\n) => {\n if (!child) return null\n const own = child.props ?? {}\n const extra = Object.fromEntries(Object.entries(props).filter(([key]) => !(key in own)))\n return cloneVNode(child, { ...extra, onClick, ...(ref ? { ref } : {}) }, true)\n}\n\nexport const DialogTrigger = defineComponent({\n name: \"DialogTrigger\",\n setup(_props, { slots }) {\n const rootContext = injectDialogRootContext()\n const { open, setOpen } = useDialogContext()\n const { forwardRef, currentElement } = useForwardExpose()\n rootContext.contentId ||= useId(undefined, \"reka-dialog-content\")\n // Focus returns here when the dialog closes\n onMounted(() => {\n rootContext.triggerElement.value = currentElement.value\n })\n\n const onClick = (event: Event) => {\n if (!event.defaultPrevented) setOpen(!open.value)\n }\n\n return () => {\n const isOpen = open.value\n return withDialogProps(\n firstElementChild(slots.default?.()),\n {\n \"type\": \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": isOpen || false,\n \"aria-controls\": isOpen ? rootContext.contentId : undefined,\n \"data-state\": isOpen ? \"open\" : \"closed\",\n },\n onClick,\n forwardRef as (el: unknown) => void,\n )\n }\n },\n})\n\n// Reka 2.11's force-mounted Dialog releases hideOthers when its `present`\n// becomes false, then calls the same non-idempotent cleanup again on unmount.\n// Keep its public Root open until this transition-owned subtree unmounts.\n// The logical open state still drives Plex triggers, events and exit rendering.\nconst DialogSurface = defineComponent({\n name: \"DialogSurface\",\n setup(_props, { slots }) {\n const { mountedSurfaces } = useDialogContext()\n onMounted(() => { mountedSurfaces.value++ })\n // Descendant Reka cleanup runs first; never send it present=false while alive.\n onUnmounted(() => { mountedSurfaces.value-- })\n return () => h(\"div\", slots.default?.())\n },\n})\n\n/** Overlay and panel. `class` lands on the panel, like `className` in React. */\nconst TOP_TOOLBAR = '[data-toolbar][data-placement=\"top\"]'\nconst BOTTOM_TOOLBAR = '[data-toolbar][data-placement=\"bottom\"]'\n\nexport const DialogContent = defineComponent({\n name: \"DialogContent\",\n inheritAttrs: false,\n props: {\n /** Panel width; numbers are pixels. @default 480 */\n width: { type: [Number, String] as PropType<number | string>, default: 480 },\n /** Renders the close button in the top corner. @default true */\n showClose: { type: Boolean, default: true },\n /**\n * Rounder panel and a round close button, for dialogs that sit beside pill controls.\n * @default false\n */\n pill: { type: Boolean, default: false },\n /**\n * Where the panel sits: centered, near the top, a sheet along the bottom,\n * a full-height panel on the start or end side, or the whole screen.\n * @default \"center\"\n */\n placement: { type: String as PropType<DialogPlacement>, default: \"center\" },\n /**\n * Where a phone sheet stands at 767px and below: `bottom`, or `fullscreen` for the whole screen. `center` is the\n * alert's place: without `mobileVariant` it makes the dialog an alert. @default \"fullscreen\" for a fullscreen\n * dialog, else \"bottom\"\n */\n mobilePlacement: String as PropType<Extract<DialogPlacement, \"center\" | \"bottom\" | \"fullscreen\">>,\n /**\n * The iOS presentation at 767px and below. A phone has two modal views: the sheet, which iOS gives any view it\n * presents, and the alert, a short question with its answers (UIAlertController). @default \"sheet\"\n */\n mobileVariant: String as PropType<\"alert\" | \"sheet\">,\n /** Mobile panel palette; dark mode uses elevated surfaces. @default \"plain\" */\n surface: { type: String as PropType<\"plain\" | \"grouped\">, default: \"plain\" },\n /** Called when focus moves into the dialog on open; `event.preventDefault()` keeps it for you to place. */\n onOpenAutoFocus: Function as PropType<(event: Event) => void>,\n /** Called when focus returns on close; `event.preventDefault()` keeps it elsewhere. */\n onCloseAutoFocus: Function as PropType<(event: Event) => void>,\n /**\n * Called on Escape before the dialog closes; `event.preventDefault()` keeps it open, such as for a form with\n * unsaved changes.\n */\n onEscapeKeyDown: Function as PropType<(event: KeyboardEvent) => void>,\n /**\n * Called on a press or a focus outside the dialog, and on a phone sheet pulled down to close, before it closes;\n * `event.preventDefault()` keeps it open, such as for a form with unsaved changes (the sheet then returns, as an\n * iOS sheet does under `isModalInPresentation`), or for a press on a developer panel over the page.\n */\n onInteractOutside: Function as PropType<(event: DialogInteractOutsideEvent) => void>,\n /**\n * Asks before the dialog closes, as a form with unsaved changes does: Close, DialogClose, Escape, a press outside\n * and a phone sheet pulled down all ask first. Pass it while there are changes and leave it out (or `false`) when\n * there are none. Setting `open` to false yourself, such as after Save, closes at once.\n */\n confirmClose: { type: [Object, Boolean, Function] as PropType<DialogConfirmCloseProp>, default: undefined },\n /** Stack order of the overlay and the dialog. @default 50 */\n zIndex: Number,\n /** Class, style and data attributes for the fixed layer that holds the panel. Data attributes of DialogContent land here too. */\n rootProps: Object as PropType<DialogLayerProps>,\n /** Class, style and data attributes for the overlay. */\n overlayProps: Object as PropType<DialogLayerProps>,\n /** `phone` lays the dialog out as on a phone at any window width. Inside a PhoneLayout it always is. @default \"auto\" */\n layout: { type: String as PropType<\"auto\" | \"phone\">, default: \"auto\" },\n },\n setup(props, { slots, attrs }) {\n const { open, setOpen, titleCount, descriptionCount } = useDialogContext()\n const outerPhoneLayout = inject(PHONE_LAYOUT_SCOPE, null)\n // A dialog laid out as on a phone by its own prop, outside a PhoneLayout, keeps the window: what it holds and\n // the dialogs it opens are phone ones too, for as long as the prop says so.\n const phoneLayout = computed(() => !!outerPhoneLayout?.phone.value || props.layout === \"phone\")\n const portalTarget = computed(() => outerPhoneLayout?.container.value ?? null)\n provide(PHONE_LAYOUT_SCOPE, { container: outerPhoneLayout?.container ?? shallowRef(null), phone: phoneLayout } satisfies PhoneLayoutValue)\n // DialogBody tells the bars that follow the scroll, as a large title does, the body's scroll offset. A large Toolbar\n // title lives at the top of DialogBody, where it scrolls with the body and goes under the bar, which then shows it\n // inline, as on a page; the body keeps a place for it while a title asks for one.\n const scrollListeners = new Set<(scrollTop: number) => void>()\n const largeTitleRequests = ref(0)\n const largeTitle = computed(() => largeTitleRequests.value > 0)\n const largeTitleSlot = shallowRef<HTMLElement | null>(null)\n const largeTitleRowSlot = shallowRef<HTMLElement | null>(null)\n const titleRowsPinned = ref(false)\n const titleRowsHeight = ref(0)\n const bodies = ref(0)\n const scroll: DialogScroll = {\n scrolled: ref(false),\n contentBelow: ref(false),\n notifyScroll: (scrollTop) => scrollListeners.forEach((listener) => listener(scrollTop)),\n largeTitle,\n largeTitleSlot,\n largeTitleRowSlot,\n titleRowsPinned,\n titleRowsHeight,\n bodies,\n }\n provide(DIALOG_SCROLL, scroll)\n const requestLargeTitleSlot = () => {\n largeTitleRequests.value++\n let released = false\n return () => { if (!released) { released = true; largeTitleRequests.value-- } }\n }\n // The heights the bars report themselves: a Toolbar inside content of the app's own (a form) is not the panel's child.\n const barHeights: { top?: number; bottom?: number } = {}\n let measureBars = () => {}\n provide(TOOLBAR_HOST, {\n kind: \"dialog\",\n setHeight: (placement, height) => { barHeights[placement] = height; measureBars() },\n scrolled: scroll.scrolled,\n contentBelow: scroll.contentBelow,\n subscribeScroll: (listener) => {\n scrollListeners.add(listener)\n return () => { scrollListeners.delete(listener) }\n },\n // The request stays the same, so with a body the rows mount once, in their place (Codex #68)\n requestLargeTitleSlot,\n // Until the panel has mounted the body may not have told the dialog yet (it comes after the bar): the rows wait\n // for their place rather than mount in the bar first (Codex #69)\n holdsLargeTitle: computed(() => bodies.value > 0 || !panelNode.value),\n largeTitleSlot: computed(() => (largeTitle.value ? largeTitleSlot.value : null)),\n largeTitleRowSlot: computed(() => (largeTitle.value ? largeTitleRowSlot.value : null)),\n rowsPinned: computed(() => largeTitle.value && titleRowsPinned.value),\n })\n // A phone has no other modal view than the sheet and the alert (owner 12.11: «нет такого в iOS»): a centered\n // dialog is an alert, any other a sheet, at the bottom or over the whole screen.\n const mobileVariant = computed(() => props.mobileVariant ?? (props.mobilePlacement === \"center\" ? \"alert\" : \"sheet\"))\n const phoneWindow = usePhoneLayout()\n // A close asked for while there are changes waits for the answer (`confirmClose`). A press that dismisses the\n // question itself does not ask again: one just after the question closed is that press.\n const confirming = ref(false)\n let confirmClosedAt = 0\n const setConfirming = (next: boolean) => {\n if (confirming.value && !next) confirmClosedAt = performance.now()\n confirming.value = next\n }\n watch([open, () => props.confirmClose], ([isOpen, confirm]) => { if (!isOpen || !confirm) setConfirming(false) })\n const closeButton = shallowRef<HTMLElement | null>(null)\n // Where focus returns when the question is dismissed: the field or button that asked to close\n let returnFocus: HTMLElement | null = null\n // The question a function `confirmClose` returned at the last close attempt\n const asked = shallowRef<DialogConfirmClose | null>(null)\n // Whether the dialog closed at once (no question to ask)\n const requestClose = (): boolean => {\n // A press on a dialog that is already leaving asks nothing\n if (!open.value) return false\n const confirm = props.confirmClose\n if (!confirm) { setOpen(false); return true }\n if (confirming.value || performance.now() - confirmClosedAt < DOUBLE_CLICK) return false\n // A function decides at the attempt: the owner commits what is typed, then compares\n if (typeof confirm === \"function\") {\n const question = confirm()\n if (!question) { setOpen(false); return true }\n asked.value = question\n }\n returnFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null\n setConfirming(true)\n return false\n }\n const question = () => (typeof props.confirmClose === \"function\" ? asked.value : props.confirmClose || null)\n const setCloseButton = (button: HTMLElement | null) => { closeButton.value = button }\n // The answer that discards: the question leaves first, then the dialog, as iOS dismisses the confirmation before\n // the sheet; together, the question would stand still over the sheet as it leaves.\n let confirmTimer: ReturnType<typeof setTimeout> | undefined\n onBeforeUnmount(() => clearTimeout(confirmTimer))\n // A close from outside, or a new opening, ends a discard that is still waiting for the question to leave\n watch(open, () => clearTimeout(confirmTimer))\n const confirmAndClose = () => {\n setConfirming(false)\n clearTimeout(confirmTimer)\n confirmTimer = setTimeout(() => setOpen(false), overlayTiming.exitDuration)\n }\n provide(DIALOG_REQUEST_CLOSE, computed(() => (props.confirmClose ? requestClose : null)))\n provide(DIALOG_SHEET, computed(() => (mobileVariant.value === \"sheet\"\n ? { showClose: props.showClose, asksToClose: Boolean(props.confirmClose), requestClose, setCloseButton }\n : null)))\n // A dialog opened from a header action is not inside that header's bar\n provide(DIALOG_BAR, computed(() => false))\n provide(DIALOG_DESCRIPTION_SLOT, { body: shallowRef<HTMLElement | null>(null), own: shallowRef<HTMLElement | null>(null) })\n const mobilePlacement = computed(() =>\n mobileVariant.value === \"alert\"\n ? \"center\"\n : (props.mobilePlacement ?? props.placement) === \"fullscreen\" ? \"fullscreen\" : \"bottom\",\n )\n const rootContext = injectDialogRootContext()\n // Radix's root makes the content id; Reka's trigger does, so a dialog\n // without one would render `id=\"\"`\n rootContext.contentId ||= useId(undefined, \"reka-dialog-content\")\n // Reka replaces the root's content ref as it mounts, so the layer is found from the panel once it is in place\n const panelNode = shallowRef<HTMLElement | null>(null)\n // The bar's background reaches under the pinned rows by their height, as on a page\n watch([panelNode, titleRowsHeight], ([panel, height]) => {\n if (!panel) return\n if (height > 0) panel.style.setProperty(\"--page-toolbar-rows-height\", `${height}px`)\n else panel.style.removeProperty(\"--page-toolbar-rows-height\")\n }, { flush: \"post\" })\n let stopViewport: (() => void) | undefined\n watch(\n [panelNode, portalTarget],\n ([panel, box]) => {\n stopViewport?.()\n const content = panel?.closest<HTMLElement>(\"[data-plex-dialog]\")\n stopViewport = content ? watchDialogViewport(content, box) : undefined\n },\n { flush: \"post\", immediate: true },\n )\n onBeforeUnmount(() => stopViewport?.())\n\n const handleCloseAutoFocus = (rekaEvent: Event) => {\n // Reka announces unmount before descendant scopes release their traps.\n // Match Radix (and our Menu adapter): dispatch the cancellable callback\n // on the detached content, so custom focus restoration is not trapped.\n rekaEvent.preventDefault()\n const container = rekaEvent.target instanceof HTMLElement ? rekaEvent.target : rootContext.contentElement.value\n const trigger = rootContext.triggerElement.value\n setTimeout(() => {\n const event = new CustomEvent(rekaEvent.type, { bubbles: false, cancelable: true })\n const restoreFocus = (closeEvent: Event) => {\n props.onCloseAutoFocus?.(closeEvent)\n keepMovedFocus(closeEvent)\n if (!closeEvent.defaultPrevented) trigger?.focus()\n }\n if (!container) return restoreFocus(event)\n container.addEventListener(event.type, restoreFocus)\n container.dispatchEvent(event)\n container.removeEventListener(event.type, restoreFocus)\n }, 0)\n }\n\n // Escape goes through the shared stack, as in React, so the dialog\n // closes before overlays opened earlier (a forced-open Tooltip)\n useEscCloseStack(open, (event) => {\n if (props.onEscapeKeyDown) {\n const request = cancelableKeyCopy(event)\n props.onEscapeKeyDown(request)\n if (request.defaultPrevented) return\n }\n requestClose()\n })\n\n // The second click of a double click lands on the overlay: it must not undo the first\n let openedAt = 0\n\n // The owner's handler comes first; a prevented interaction keeps the dialog open\n const ownerKeepsOpen = (event: DialogInteractOutsideEvent) => {\n props.onInteractOutside?.(event)\n return event.defaultPrevented\n }\n // Radix's modal content: a Ctrl+click (macOS right click) does not dismiss. A deferred press asks the owner when\n // the click completes it, as Radix does, so a form that changed meanwhile can still forbid closing.\n const outsidePress = useDeferredPointerDownOutside((originalEvent) => {\n const request = new CustomEvent(\"dismissableLayer.pointerDownOutside\", { cancelable: true, detail: { originalEvent } })\n if (ownerKeepsOpen(request)) return\n if (!originalEvent.ctrlKey && performance.now() - openedAt >= DOUBLE_CLICK) requestClose()\n }, () => rootContext.contentElement.value)\n const handlePointerDownOutside = (event: Parameters<typeof outsidePress.onPointerDownOutside>[0]) => {\n // The native modal owner outlives logical open. An exiting layer must not\n // start a deferred dismissal that closes a trigger-driven reopen.\n if (!open.value) return event.preventDefault()\n // A press that dismisses the question before a close keeps editing\n if (confirming.value) return event.preventDefault()\n // A press in a toast is not outside: the toast region is a layer above the dialog. The Toaster stops it\n // before Reka sees it; this holds when the Toaster mounted after the dialog.\n if (inToastRegion(event.detail.originalEvent.target)) return event.preventDefault()\n // A primary mouse or pen press waits for its click; a touch or another button dismisses now, as Reka does\n const { originalEvent } = event.detail\n if (originalEvent.button === 0 && originalEvent.pointerType !== \"touch\") return outsidePress.onPointerDownOutside(event)\n // With changes a touch or another button asks too, and Reka does not close on it\n if (props.confirmClose) {\n // The owner's veto first: it reads the event's own defaultPrevented\n const kept = ownerKeepsOpen(event as DialogInteractOutsideEvent)\n event.preventDefault()\n // A right click (button 2, or Control and a click on a Mac) is not a dismissal, as Reka and React hold (Codex #58)\n if (!kept && !originalEvent.ctrlKey && originalEvent.button !== 2) requestClose()\n return\n }\n if (!ownerKeepsOpen(event as DialogInteractOutsideEvent)) outsidePress.onPointerDownOutside(event)\n }\n // Focus moving out while a press waits for its click is that press, as on Radix: the owner hears of it once\n const handleFocusOutside = (event: Parameters<typeof outsidePress.onFocusOutside>[0]) => {\n if (inToastRegion((event as DialogInteractOutsideEvent).detail?.originalEvent.target)) return event.preventDefault()\n outsidePress.onFocusOutside(event)\n if (!event.defaultPrevented) props.onInteractOutside?.(event as DialogInteractOutsideEvent)\n // With changes focus leaving asks, as React's interact-outside does; Reka does not close on it\n if (!event.defaultPrevented && props.confirmClose) {\n event.preventDefault()\n requestClose()\n }\n }\n // A sheet pulled down asks as a press outside does: an owner that keeps the dialog open on one, such as a form\n // with unsaved changes, keeps it on the other, and the sheet returns.\n const dismissByDrag = (originalEvent: TouchEvent) => {\n const request: DialogInteractOutsideEvent = new CustomEvent(\"dialog.sheetDrag\", { cancelable: true, detail: { originalEvent } })\n if (ownerKeepsOpen(request)) return false\n draggedClose.value = true\n // An owner that keeps it open without saying so: its next close slides down on the sheet's spring again\n setTimeout(() => { if (open.value) draggedClose.value = false }, SHEET_EXIT_MS)\n if (props.confirmClose) {\n const closed = requestClose()\n if (!closed) draggedClose.value = false\n return closed\n }\n setOpen(false)\n return true\n }\n\n // A phone sheet slides up from the bottom and back down on iOS's spring, the scrim with it, both ways on one timer;\n // one pulled down leaves at the finger's speed (lib/presentMotion)\n // Reactive: a sheet let go of changes its exit timer, in the render that closes it\n const draggedClose = shallowRef(false)\n watch(open, (isOpen) => {\n if (isOpen) draggedClose.value = false\n }, { immediate: true, flush: \"sync\" })\n const sheetMotion = () =>\n (phoneWindow.value || phoneLayout.value) && mobilePlacement.value === \"bottom\" && growsFromButton(undefined)\n // The sheet's spring, in the panel's CSS (Dialog.module.css): only where the dialog times it so\n watch([panelNode, sheetMotion], ([panel, moves]) => {\n if (!panel) return\n if (moves) panel.setAttribute(\"data-sheet-motion\", \"\")\n else panel.removeAttribute(\"data-sheet-motion\")\n }, { flush: \"post\", immediate: true })\n const handleInteractOutside = (event: Event) => {\n if (!open.value) event.preventDefault()\n }\n watch(\n open,\n (isOpen) => {\n if (isOpen) openedAt = performance.now()\n else outsidePress.reset()\n },\n { immediate: true },\n )\n\n const boundary = provideFloatingBoundaryScope()\n let panelElement: HTMLElement | undefined\n let detachDrag: (() => void) | undefined\n let barObserver: ResizeObserver | undefined\n let barChildren: MutationObserver | undefined\n const setPanelRef = (instance: unknown) => {\n const element = instance instanceof HTMLElement ? instance : undefined\n if (element === panelElement) return\n detachDrag?.()\n barObserver?.disconnect()\n barChildren?.disconnect()\n measureBars = () => {}\n detachDrag = undefined\n panelElement = element\n panelNode.value = element ?? null\n boundary.setRoot(element)\n if (element) {\n const update = () => {\n // A phone Toolbar takes the place of the header or footer bar on its side.\n // A phone Toolbar takes the place of the header or footer bar on its side: one the dialog places itself\n // before the bar its header becomes.\n const header = element.querySelector<HTMLElement>(`:scope > ${TOP_TOOLBAR}:not([data-dialog-bar])`)\n ?? element.querySelector<HTMLElement>(`:scope > ${TOP_TOOLBAR}`)\n ?? element.querySelector<HTMLElement>(`:scope > .${s.Header}`)\n const footer = element.querySelector<HTMLElement>(`:scope > ${BOTTOM_TOOLBAR}`) ?? element.querySelector<HTMLElement>(`:scope > .${s.Footer}`)\n element.style.setProperty(\"--dialog-header-height\", `${header?.offsetHeight ?? barHeights.top ?? 0}px`)\n element.style.setProperty(\"--dialog-footer-height\", `${footer?.offsetHeight ?? barHeights.bottom ?? 0}px`)\n }\n measureBars = update\n barObserver = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n const observeBars = () => {\n barObserver?.disconnect()\n element.querySelectorAll<HTMLElement>(`:scope > .${s.Header}, :scope > .${s.Footer}, :scope > [data-toolbar]`)\n .forEach((bar) => barObserver?.observe(bar, { box: \"border-box\" }))\n update()\n }\n observeBars()\n barChildren = new MutationObserver(observeBars)\n barChildren.observe(element, { childList: true })\n }\n if (element && mobilePlacement.value === \"bottom\") {\n detachDrag = attachSheetDrag(element, dismissByDrag)\n }\n }\n\n watch(mobilePlacement, () => {\n detachDrag?.()\n detachDrag = panelElement && mobilePlacement.value === \"bottom\"\n ? attachSheetDrag(panelElement, dismissByDrag)\n : undefined\n })\n onBeforeUnmount(() => { detachDrag?.(); barObserver?.disconnect(); barChildren?.disconnect() })\n\n let overlayElement: Element | undefined\n const setOverlayRef = (instance: unknown) => {\n const el = (instance as { $el?: unknown } | null)?.$el\n const element = el instanceof Element ? el : undefined\n if (element === overlayElement) return\n if (overlayElement) dismissableSurfaces.delete(overlayElement)\n overlayElement = element\n if (element) dismissableSurfaces.add(element)\n }\n\n const renderDialog = () =>\n h(DialogSurface, { key: \"dialog\" }, () => [\n h(RekaDialogOverlay, {\n ...props.overlayProps,\n class: [s.Overlay, props.overlayProps?.class],\n style: [layerStyle(), props.overlayProps?.style],\n forceMount: true,\n ref: setOverlayRef,\n \"data-state\": open.value ? \"open\" : \"closed\",\n }),\n h(\n RekaDialogContent,\n {\n ...dataAttributes(attrs),\n ...props.rootProps,\n \"forceMount\": true,\n \"class\": [s.Content, props.rootProps?.class],\n \"data-plex-dialog\": \"\",\n \"style\": [toCssVariables({ \"dialog-width\": props.width }), layerStyle(), props.rootProps?.style],\n \"data-placement\": props.placement === \"center\" ? undefined : props.placement,\n \"data-mobile-placement\": mobilePlacement.value,\n \"data-mobile-variant\": mobileVariant.value,\n \"data-surface\": props.surface,\n \"data-state\": open.value ? \"open\" : \"closed\",\n \"data-pill\": props.pill ? \"\" : undefined,\n \"onOpenAutoFocus\": props.onOpenAutoFocus,\n \"onCloseAutoFocus\": handleCloseAutoFocus,\n // Radix labels and describes the content only by mounted parts\n ...(titleCount.value > 0 ? {} : { \"aria-labelledby\": undefined }),\n ...(descriptionCount.value > 0 ? {} : { \"aria-describedby\": undefined }),\n \"onEscapeKeyDown\": preventDefaultHandler,\n \"onPointerDownOutside\": handlePointerDownOutside,\n \"onFocusOutside\": handleFocusOutside,\n \"onInteractOutside\": handleInteractOutside,\n },\n {\n default: () => [\n // The native Content is the sole focus owner while open, so it\n // keeps tracking replacement inputs. Activate this non-trapping\n // scope only during logical exit to pause the retained modal owner.\n // A second live trap would leave the paused native scope tracking\n // removed inputs; its mutation fallback could then select current text.\n h(RekaFocusScope, {\n asChild: true,\n present: !open.value,\n loop: false,\n trapped: false,\n onMountAutoFocus: preventDefaultHandler,\n onUnmountAutoFocus: preventDefaultHandler,\n }, () => h(\"div\", { class: [s.Panel, attrs.class], ref: setPanelRef }, [\n props.showClose\n ? h(DialogClose, null, {\n default: () => [\n h(NavigationButton, { \"action\": \"close\", \"variant\": \"ghost\", \"class\": s.CloseButton, \"aria-label\": \"Close dialog\" }),\n ],\n })\n : null,\n slots.default?.(),\n props.confirmClose\n ? h(ConfirmClose, {\n ...(question() ?? { message: null }),\n open: confirming.value,\n anchor: (phoneWindow.value || phoneLayout.value) && mobileVariant.value === \"sheet\" ? closeButton.value : null,\n returnFocus: () => returnFocus,\n \"onUpdate:open\": setConfirming,\n onConfirm: confirmAndClose,\n zIndex: props.zIndex,\n })\n : null,\n ])),\n ],\n },\n ),\n ])\n\n const layerStyle = () => toCssVariables({ \"dialog-z-index\": props.zIndex === undefined ? undefined : String(props.zIndex) })\n\n return () => {\n const { placement } = props\n // A sheet crosses the screen on a phone, and wherever its owner asked for one; a dialog left to its defaults\n // stays the centred panel on a desktop, with that panel's timing.\n const sheetCrosses = (phoneWindow.value || phoneLayout.value || props.mobileVariant === \"sheet\" || props.mobilePlacement !== undefined) &&\n (mobilePlacement.value === \"bottom\" || mobilePlacement.value === \"fullscreen\")\n const crossesScreen =\n placement === \"bottom\" || placement === \"start\" || placement === \"end\" || placement === \"fullscreen\" || sheetCrosses\n const timing = crossesScreen ? overlayTimingLarge : overlayTiming\n const transitionTiming = sheetMotion() ? {\n enterDuration: SHEET_SPRING_MS,\n exitDuration: draggedClose.value ? SHEET_EXIT_MS : SHEET_SPRING_MS,\n } : timing\n // Portaled out of any phone layout, a phone dialog carries its own scope, above its transition: the phone rules\n // of the style sheet start there.\n const scoped = (group: VNode) =>\n phoneLayout.value && !portalTarget.value ? h(\"div\", { class: s.PhoneScope, \"data-plex-layout\": \"phone\" }, [group]) : group\n return h(RekaDialogPortal, { to: portalTarget.value ?? undefined }, {\n default: () => [\n scoped(h(\n TransitionGroup,\n // A dialog mounted open enters too, as `v-if` and `open` together do\n {\n class: [s.Transition, HOLD_PRESSES_CLASS],\n ...transitionTiming,\n reducedMotionEnterDuration: reducedMotionEnter.dialog,\n overlay: true,\n preventInitialTransition: false,\n },\n // `open && <div>` in React: closed still renders the empty wrapper\n { default: () => [open.value ? renderDialog() : createCommentVNode()] },\n )),\n ],\n })\n }\n },\n})\n\n/** How a Sheet's bar meets the content scrolled under it; see `BarBackground`. `\"solid\"` is the earlier name of `\"hard\"`. */\nexport type DialogBarBackground = BarBackground | BarBackgroundAlias\n\n// The header's own parts, fragments opened up, so its actions can stand at the end of the bar\nconst headerParts = (children: VNodeArrayChildren | undefined): VNodeArrayChildren =>\n (children ?? []).flatMap((part) =>\n isVNode(part) && part.type === FragmentVNode ? headerParts(part.children as VNodeArrayChildren) : Array.isArray(part) ? headerParts(part) : [part])\nconst isHeaderAction = (part: unknown) => isVNode(part) && part.type === DialogHeaderAction\nconst isLeadingAction = (part: unknown) => isHeaderAction(part) && (part as VNode).props?.side === \"leading\"\nconst isDescription = (part: unknown) => isVNode(part) && part.type === DialogDescription\n// A ToolbarRow in the header is a row of the phone Sheet's bar, under its controls (console 15.11)\nconst isToolbarRow = (part: unknown) => isVNode(part) && part.type === ToolbarRow\n\n// The parts it holds stand outside the header's bar, as React's descriptions stand outside the bar's provider\nconst OutsideBar = defineComponent({\n name: \"DialogOutsideBar\",\n setup(_props, { slots }) {\n provide(DIALOG_BAR, computed(() => false))\n return () => slots.default?.()\n },\n})\n\nexport const DialogHeader = defineComponent({\n name: \"DialogHeader\",\n // A phone Sheet's header is the bar and the description under it: its attributes go to the bar\n inheritAttrs: false,\n props: {\n /** How the bar meets the content scrolled under it in a phone Sheet. @default \"glass\" */\n background: { type: String as PropType<DialogBarBackground>, default: \"glass\" },\n },\n setup(props, { slots, attrs }) {\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const bar = computed(() => !!sheet?.value && phone.value)\n provide(DIALOG_BAR, bar)\n return () => {\n if (!bar.value) return h(\"div\", mergeProps({ \"class\": s.Header, \"data-background\": barBackground(props.background), \"data-scrolled\": scroll?.scrolled.value ? \"\" : undefined }, attrs), slots.default?.())\n const parts = headerParts(slots.default?.())\n const descriptions = parts.filter(isDescription)\n const slot = descriptionSlot ? descriptionSlot.own.value ?? descriptionSlot.body.value : null\n // On a phone the header of a Sheet is its Toolbar (iOS 27 kit Sheets 507-24684, Toolbar - Top - iPhone\n // 1-54520): Close at the leading edge, the title alone centered on the row of controls, the header actions\n // at the trailing edge, all on one 44px row 16px under the top edge.\n return [\n h(Toolbar, mergeProps({ \"background\": props.background, \"data-dialog-bar\": \"\" }, attrs), () => [\n // A step's Back takes the leading place, as the back button of a screen pushed inside an iOS sheet\n sheet?.value?.showClose && !parts.some(isLeadingAction)\n ? h(ToolbarLeading, { class: s.BarClose }, () => [\n sheet.value?.asksToClose\n ? h(NavigationButton, {\n \"ref\": (instance: unknown) => sheet.value?.setCloseButton(elementOf(instance)),\n \"action\": \"close\",\n \"variant\": \"ghost\",\n \"aria-label\": \"Close dialog\",\n \"onClick\": () => sheet.value?.requestClose(),\n })\n : h(DialogClose, null, { default: () => [h(NavigationButton, { \"action\": \"close\", \"variant\": \"ghost\", \"aria-label\": \"Close dialog\" })] }),\n ])\n : null,\n ...parts.filter(isLeadingAction),\n h(\"div\", { class: [t.Heading, s.BarHeading] }, parts.filter((part) => !isHeaderAction(part) && !isDescription(part) && !isToolbarRow(part))),\n ...parts.filter((part) => isHeaderAction(part) && !isLeadingAction(part)),\n // Rows stand under the controls, as in a Toolbar built by hand: the bar's glass, edge and row gap. Their own\n // fragment keeps their keys apart from the actions' keys.\n h(FragmentVNode, { key: \"toolbar-rows\" }, parts.filter(isToolbarRow)),\n ]),\n // The description reads as the first text of the content, at the top of DialogBody when there is one\n descriptions.length > 0\n ? h(Teleport, { to: slot, disabled: !slot }, [h(\"div\", { class: s.SheetDescription }, [h(OutsideBar, null, () => descriptions)])])\n : null,\n ]\n }\n },\n})\n\nexport const DialogHeaderAction = defineComponent({\n name: \"DialogHeaderAction\",\n props: {\n /**\n * `leading` puts the action before the title, such as the Back of a step in `DialogSteps`: on a phone Sheet it\n * takes the place of Close, as the back button of a screen pushed inside an iOS sheet does.\n * @default \"trailing\"\n */\n side: { type: String as PropType<\"leading\" | \"trailing\">, default: \"trailing\" },\n },\n setup(props, { slots }) {\n const bar = inject(DIALOG_BAR, null)\n return () => {\n if (bar?.value && props.side === \"leading\") return h(ToolbarLeading, { class: s.BarClose }, () => slots.default?.())\n if (bar?.value) return h(ToolbarTrailing, null, () => slots.default?.())\n return h(\"div\", { \"class\": s.HeaderAction, \"data-side\": props.side === \"leading\" ? \"leading\" : undefined }, slots.default?.())\n }\n },\n})\n\n/** The scrolling part between DialogHeader and DialogFooter: with it, only the body scrolls. */\nexport const DialogBody = defineComponent({\n name: \"DialogBody\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const setDescriptionSlot = (slot: unknown) => {\n if (descriptionSlot) descriptionSlot.body.value = slot instanceof HTMLElement ? slot : null\n }\n const element = ref<HTMLElement | null>(null)\n let stop: (() => void) | undefined\n onMounted(() => {\n if (!element.value || !scroll) return\n stop = observeScrollEdges(element.value, (edges) => {\n scroll.scrolled.value = edges.scrolled\n scroll.contentBelow.value = edges.contentBelow\n })\n })\n onBeforeUnmount(() => {\n stop?.()\n if (scroll) { scroll.scrolled.value = false; scroll.contentBelow.value = false }\n })\n const setLargeTitleSlot = (slot: unknown) => {\n if (scroll) scroll.largeTitleSlot.value = slot instanceof HTMLElement ? slot : null\n }\n const setLargeTitleRowSlot = (slot: unknown) => {\n if (scroll) scroll.largeTitleRowSlot.value = slot instanceof HTMLElement ? slot : null\n }\n // The dialog moves a large title here only while a body is there\n if (scroll) scroll.bodies.value++\n onBeforeUnmount(() => { if (scroll) scroll.bodies.value-- })\n // The rows of a large title's bar pin under it once scrolled up to it, as on a page\n let stopRows: (() => void) | undefined\n if (scroll) {\n watch([element, scroll.largeTitleRowSlot], ([body, rows]) => {\n stopRows?.()\n stopRows = body && rows\n ? followTitleRows(body, rows, (pinned, height) => { scroll.titleRowsPinned.value = pinned; scroll.titleRowsHeight.value = height })\n : undefined\n }, { flush: \"post\" })\n }\n onBeforeUnmount(() => { stopRows?.(); stopRows = undefined })\n return () => h(\"div\", { ref: element, class: [s.Body, attrs.class], onScroll: scroll ? (event: Event) => scroll.notifyScroll((event.currentTarget as HTMLElement).scrollTop) : undefined }, [\n // A large Toolbar title starts the body and scrolls with it; the description comes under it\n scroll?.largeTitle.value ? h(\"div\", { ref: setLargeTitleSlot, class: s.LargeTitle }) : null,\n scroll?.largeTitle.value ? h(\"div\", { ref: setLargeTitleRowSlot, class: s.LargeTitleRows }) : null,\n sheet?.value && phone.value ? h(\"div\", { ref: setDescriptionSlot, class: s.SheetDescriptionSlot }) : null,\n slots.default?.(),\n ])\n },\n})\n\n/**\n * Where a phone Sheet's description goes in content of your own, such as a scroller inside a form so that Enter\n * submits: the description starts it, as it starts DialogBody, and it comes before the body's place. It renders\n * nothing outside a phone Sheet.\n */\nexport const DialogDescriptionSlot = defineComponent({\n name: \"DialogDescriptionSlot\",\n setup() {\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const setOwnSlot = (slot: unknown) => {\n if (descriptionSlot) descriptionSlot.own.value = slot instanceof HTMLElement ? slot : null\n }\n return () => (sheet?.value && phone.value ? h(\"div\", { ref: setOwnSlot, class: s.SheetDescriptionSlot }) : null)\n },\n})\n\nexport const DialogFooter = defineComponent({\n name: \"DialogFooter\",\n props: {\n /** Override the mobile action layout. Two alert actions default to inline, three or more and sheets to stacked. */\n mobileLayout: String as PropType<\"inline\" | \"stacked\">,\n /** How the bar meets the content scrolled under it in a phone Sheet. @default \"soft\" */\n background: { type: String as PropType<DialogBarBackground>, default: \"soft\" },\n },\n setup(props, { slots }) {\n const boundary = useFloatingBoundaryRegistration()\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const phone = usePhoneLayout()\n return () => {\n const parts = slots.default?.()\n // A phone Sheet stacks its main action on top, as an iOS setup sheet does. A footer is written with it last,\n // where a desktop row ends, so the order is turned in the page itself: focus and a screen reader meet the\n // actions in the order they are seen.\n const turned = sheet?.value && phone.value && props.mobileLayout !== \"inline\"\n return h(\"div\", {\n \"ref\": boundary?.setFooter,\n \"class\": s.Footer,\n \"data-mobile-layout\": props.mobileLayout,\n \"data-background\": barBackground(props.background),\n \"data-content-below\": scroll?.contentBelow.value ? \"\" : undefined,\n }, turned ? headerParts(parts).reverse() : parts)\n }\n },\n})\n\n/** Counts a mounted part, as Radix's title and description counts do. */\nconst useMountedCount = (count: Ref<number>) => {\n onMounted(() => {\n count.value++\n })\n onBeforeUnmount(() => {\n count.value--\n })\n}\n\nexport const DialogTitle = defineComponent({\n name: \"DialogTitle\",\n setup(_props, { slots }) {\n useMountedCount(useDialogContext().titleCount)\n const bar = inject(DIALOG_BAR, null)\n return () => h(RekaDialogTitle, { class: bar?.value ? t.Title : s.Title }, { default: () => slots.default?.() })\n },\n})\n\nexport const DialogDescription = defineComponent({\n name: \"DialogDescription\",\n setup(_props, { slots }) {\n useMountedCount(useDialogContext().descriptionCount)\n const bar = inject(DIALOG_BAR, null)\n const element = ref<{ $el?: Element } | Element | null>(null)\n const shown = ref(false)\n // The header leaves its own descriptions out of the bar. One the bar still holds, inside a part of the\n // header's own, is the title's second line (Toolbar's subtitle) when the reader sees it; one that is only\n // read out, visually hidden, leaves the title on its one line.\n const measure = () => {\n const node = element.value instanceof Element ? element.value : element.value?.$el\n shown.value = !!bar?.value && node instanceof HTMLElement && node.offsetHeight > 1 && node.offsetWidth > 1\n }\n onMounted(measure)\n watch(() => bar?.value, () => queueMicrotask(measure))\n return () => h(RekaDialogDescription, { ref: element, class: bar?.value && shown.value ? t.Subtitle : s.Description }, { default: () => slots.default?.() })\n },\n})\n\nexport const DialogClose = defineComponent({\n name: \"DialogClose\",\n setup(_props, { slots }) {\n const rootContext = injectDialogRootContext()\n const requestClose = inject(DIALOG_REQUEST_CLOSE, null)\n const onClick = (event: Event) => {\n if (event.defaultPrevented) return\n const request = requestClose?.value\n if (request) request()\n else rootContext.onOpenChange(false)\n }\n return () => withDialogProps(firstElementChild(slots.default?.()), { type: \"button\" }, onClick)\n },\n})\n\nconst elementOf = (instance: unknown): HTMLElement | null =>\n instance instanceof HTMLElement ? instance : ((instance as { $el?: unknown } | null)?.$el instanceof HTMLElement ? (instance as { $el: HTMLElement }).$el : null)\n\n// iOS asks at the button that closes (a confirmation dialog presented from the sheet's Close on iOS 27: a glass\n// popover over it, no dimming, the question in 17 regular over a full-width destructive pill); with no such button,\n// and on a desktop, the question is an alert.\nconst ConfirmClose = defineComponent({\n name: \"DialogConfirmClose\",\n props: {\n message: { type: null as unknown as PropType<VNodeChild>, required: true },\n detail: { type: null as unknown as PropType<VNodeChild>, default: undefined },\n confirmLabel: { type: null as unknown as PropType<VNodeChild>, default: \"Discard Changes\" },\n cancelLabel: { type: null as unknown as PropType<VNodeChild>, default: \"Keep Editing\" },\n open: { type: Boolean, default: false },\n /** The phone Sheet's Close: the question stands at it. Without one it is an alert. */\n anchor: { type: Object as PropType<HTMLElement | null>, default: null },\n returnFocus: { type: Function as PropType<() => HTMLElement | null>, required: true },\n /** The owner dialog's stack order: the question stands over it */\n zIndex: Number,\n },\n emits: {\n \"update:open\": (open: boolean) => typeof open === \"boolean\",\n confirm: () => true,\n },\n setup(props, { emit }) {\n const setOpen = (next: boolean) => emit(\"update:open\", next)\n const confirm = () => emit(\"confirm\")\n const messageId = useId(undefined, \"plex-confirm-close\")\n const hasDetail = () => props.detail != null && props.detail !== false\n return () => {\n const anchor = props.anchor\n if (anchor) {\n return h(Popover, { \"open\": props.open, \"onUpdate:open\": setOpen }, () => [\n h(PopoverAnchor, { element: anchor }),\n // Over the Close, its corner 6 before the button's, as the native confirmation grows out of it\n h(PopoverContent, {\n \"side\": \"bottom\",\n \"align\": \"start\",\n // Measured only while the question is open: a read of a layout on every render of the sheet forced one\n \"sideOffset\": props.open ? -anchor.offsetHeight : 0,\n \"alignOffset\": -6,\n \"collisionPadding\": 10,\n \"width\": 240,\n \"minWidth\": 240,\n \"zIndex\": props.zIndex,\n \"ariaLabelledby\": messageId,\n \"class\": s.ConfirmClose,\n \"data-dialog-confirm-close\": \"\",\n }, () => [\n h(\"p\", { id: messageId, class: s.ConfirmCloseMessage }, [props.message as VNodeArrayChildren[number]]),\n hasDetail() ? h(\"p\", { class: s.ConfirmCloseDetail }, [props.detail as VNodeArrayChildren[number]]) : null,\n h(Button, { block: true, pill: true, color: \"danger\", variant: \"soft\", class: s.ConfirmCloseAction, onClick: confirm }, () => props.confirmLabel),\n ]),\n ])\n }\n return h(Dialog, { \"open\": props.open, \"onUpdate:open\": setOpen }, () => [\n h(DialogContent, {\n \"mobileVariant\": \"alert\",\n \"surface\": \"plain\",\n \"width\": 360,\n \"showClose\": false,\n \"zIndex\": props.zIndex,\n \"data-dialog-confirm-close\": \"\",\n \"onCloseAutoFocus\": (event: Event) => {\n const target = props.returnFocus()\n if (target?.isConnected) {\n event.preventDefault()\n target.focus({ preventScroll: true })\n }\n },\n }, () => [\n // The question names the alert, as an alert's title does\n h(DialogHeader, null, () => [\n h(DialogTitle, null, () => props.message),\n hasDetail() ? h(DialogDescription, null, () => props.detail) : null,\n ]),\n h(DialogFooter, null, () => [\n h(DialogClose, null, () => [h(Button, { color: \"secondary\", variant: \"soft\" }, () => props.cancelLabel)]),\n h(Button, { color: \"danger\", onClick: confirm }, () => props.confirmLabel),\n ]),\n ]),\n ])\n }\n },\n})\n\n/** The steps of a flow inside a dialog, such as a sign-in that asks for an email and then a code. */\nexport const DialogSteps = defineComponent({\n name: \"DialogSteps\",\n props: {\n /** The step on screen. A new value brings its content in. */\n step: { type: [String, Number] as PropType<string | number>, required: true },\n /**\n * `forward` brings the new step in from the trailing edge over the one before, as a push on iOS; `back` returns\n * to a step before it.\n * @default \"forward\"\n */\n direction: { type: String as PropType<\"forward\" | \"back\">, default: \"forward\" },\n },\n setup(props, { slots }) {\n return () => {\n // Resolve this step now, so a step that leaves cannot read the next one\n const entry = h(\"div\", { \"key\": props.step, \"data-dialog-step\": \"\", \"tabindex\": -1 }, slots.default?.())\n return h(\"div\", { \"class\": s.Steps, \"data-direction\": props.direction }, [\n h(TransitionGroup, {\n ...STEP_TIMING,\n as: \"div\",\n overlay: true,\n class: s.Step,\n onEnter: enterStep,\n onExit: leaveStep,\n onExitActive: settleStepHeight,\n onExitComplete: releaseStepHeight,\n }, () => [entry]),\n ])\n }\n },\n})\n\nexport type DialogProps = InstanceType<typeof Dialog>[\"$props\"]\n\nexport type DialogPlacement = \"center\" | \"top\" | \"bottom\" | \"start\" | \"end\" | \"fullscreen\"\n\n/**\n * A press or a focus outside the dialog, or a phone sheet pulled down to close; `event.detail.originalEvent` is the\n * browser's event (a TouchEvent for the sheet).\n */\nexport type DialogInteractOutsideEvent = CustomEvent<{ originalEvent: PointerEvent | FocusEvent | TouchEvent }>\n\n/** Class, style and data attributes for one of the dialog's layers. */\nexport type DialogLayerProps = {\n class?: HTMLAttributes[\"class\"]\n style?: string | CSSProperties\n [dataAttribute: `data-${string}`]: string | number | boolean | undefined\n}\n\n/** DialogContent props; `class` lands on the panel, like `className` in React. */\nexport type DialogContentProps = InstanceType<typeof DialogContent>[\"$props\"] & { class?: HTMLAttributes[\"class\"] }\n\nexport type DialogHeaderProps = InstanceType<typeof DialogHeader>[\"$props\"]\nexport type DialogFooterProps = InstanceType<typeof DialogFooter>[\"$props\"]\nexport type DialogHeaderActionProps = InstanceType<typeof DialogHeaderAction>[\"$props\"]\nexport type DialogStepsProps = InstanceType<typeof DialogSteps>[\"$props\"]\n"]}
|
|
@@ -23,8 +23,7 @@ const EXITING = "[data-exiting], [data-exiting-active]";
|
|
|
23
23
|
// A sheet at its full height says so: a sheet under it then steps back, as one presented from a sheet does on iOS.
|
|
24
24
|
// A shorter sheet leaves the one under it in place, as a medium detent does.
|
|
25
25
|
const FULL = "data-sheet-full";
|
|
26
|
-
// A sheet
|
|
27
|
-
const PRESENTED_FROM = "data-presented-from";
|
|
26
|
+
// A sheet let go of leaves down at the finger's speed, within the time the dialog gives its exit
|
|
28
27
|
const EXIT_DURATION = "--dialog-exit-duration";
|
|
29
28
|
const EXIT_EASING = "--dialog-exit-easing";
|
|
30
29
|
const reducedMotion = (view) => Boolean(view.matchMedia?.("(prefers-reduced-motion: reduce)").matches);
|
|
@@ -200,8 +199,6 @@ export const attachSheetDrag = (panel, close) => {
|
|
|
200
199
|
panel.style.setProperty(DRAG_TRANSFORM, `translateY(${travelled}px)`);
|
|
201
200
|
clearInline();
|
|
202
201
|
// The rest of the way down goes on at the finger's speed, within the time the dialog gives its exit
|
|
203
|
-
const presentedFrom = panel.hasAttribute(PRESENTED_FROM);
|
|
204
|
-
panel.removeAttribute(PRESENTED_FROM);
|
|
205
202
|
if (!reducedMotion(view)) {
|
|
206
203
|
const left = Math.max(1, height - travelled);
|
|
207
204
|
const spring = springEasing(SHEET_RELEASE_SPRING, (Math.max(0, velocity) * 1000) / left, true);
|
|
@@ -213,14 +210,9 @@ export const attachSheetDrag = (panel, close) => {
|
|
|
213
210
|
settleTimer = undefined;
|
|
214
211
|
if (!panel.isConnected || panel.closest(EXITING))
|
|
215
212
|
return;
|
|
216
|
-
// An owner that kept the dialog open without saying so: it still goes back into its button later
|
|
217
|
-
if (presentedFrom)
|
|
218
|
-
panel.setAttribute(PRESENTED_FROM, "");
|
|
219
213
|
returnToRest(travelled, velocity);
|
|
220
214
|
}, SETTLE);
|
|
221
215
|
if (close(event) === false) {
|
|
222
|
-
if (presentedFrom)
|
|
223
|
-
panel.setAttribute(PRESENTED_FROM, "");
|
|
224
216
|
returnToRest(travelled, velocity);
|
|
225
217
|
}
|
|
226
218
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheetDrag.js","sourceRoot":"","sources":["../../../../src/components/Dialog/sheetDrag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAE9F,sGAAsG;AACtG,oHAAoH;AACpH,+FAA+F;AAC/F,+GAA+G;AAC/G,4GAA4G;AAC5G,0GAA0G;AAC1G,sFAAsF;AACtF,MAAM,IAAI,GAAG,EAAE,CAAA;AACf,MAAM,WAAW,GAAG,GAAG,CAAA;AACvB,MAAM,WAAW,GAAG,GAAG,CAAA;AACvB,MAAM,IAAI,GAAG,GAAG,CAAA;AAChB,MAAM,MAAM,GAAG,GAAG,CAAA;AAClB,MAAM,WAAW,GAAG,qDAAqD,CAAA;AACzE,MAAM,QAAQ,GAAG,4FAA4F,CAAA;AAC7G,6GAA6G;AAC7G,MAAM,MAAM,GAAG,CAAC,CAAA;AAChB,yFAAyF;AACzF,MAAM,IAAI,GAAG,GAAG,CAAA;AAChB,MAAM,cAAc,GAAG,+BAA+B,CAAA;AACtD,MAAM,OAAO,GAAG,uCAAuC,CAAA;AACvD,mHAAmH;AACnH,6EAA6E;AAC7E,MAAM,IAAI,GAAG,iBAAiB,CAAA;AAC9B,qHAAqH;AACrH,MAAM,cAAc,GAAG,qBAAqB,CAAA;AAC5C,MAAM,aAAa,GAAG,wBAAwB,CAAA;AAC9C,MAAM,WAAW,GAAG,sBAAsB,CAAA;AAE1C,MAAM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SHEET_RELEASE_SPRING, springEasing } from \"../../lib/presentMotion.js\"\n\n// A bottom sheet follows the finger. A drag from its top 44px moves it 1:1, never up. Past 30% of its\n// height, or at 0.5px/ms, it closes; otherwise it returns. Either way it goes on at the finger's speed, on a spring\n// that starts at it, as a sheet let go of does on iOS. Buttons in that strip keep their press.\n// As on iOS, a pull down that starts anywhere else moves the sheet too once the content under the finger is at\n// its top: the first move decides, down and mostly vertical with every scroller under the finger at its top\n// takes the sheet; up, sideways, a move another handler took, a field, a control that pans by itself or a\n// finger that rested first (a hold: Sortable, a context menu) stays with the content.\nconst GRIP = 44\nconst CLOSE_SHARE = 0.3\nconst CLOSE_SPEED = 0.5\nconst REST = 100\nconst SETTLE = 400\nconst INTERACTIVE = \"a, button, input, select, textarea, [role='button']\"\nconst EDITABLE = \"input, textarea, select, [contenteditable]:not([contenteditable='false']), [role='slider']\"\n// The move that settles which way the finger goes, under the browser's own slop so it can still be cancelled\nconst DECIDE = 4\n// A finger that rests this long holds (a Sortable row, a context menu) rather than pulls\nconst HOLD = 200\nconst DRAG_TRANSFORM = \"--dialog-panel-drag-transform\"\nconst EXITING = \"[data-exiting], [data-exiting-active]\"\n// A sheet at its full height says so: a sheet under it then steps back, as one presented from a sheet does on iOS.\n// A shorter sheet leaves the one under it in place, as a medium detent does.\nconst FULL = \"data-sheet-full\"\n// A sheet that grew out of its button would shrink back into it; one let go of leaves down instead (Dialog sets it).\nconst PRESENTED_FROM = \"data-presented-from\"\nconst EXIT_DURATION = \"--dialog-exit-duration\"\nconst EXIT_EASING = \"--dialog-exit-easing\"\n\nconst reducedMotion = (view: Window) => Boolean(view.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches)\n\nconst watchFullHeight = (panel: HTMLElement, view: Window & typeof globalThis) => {\n if (!view.ResizeObserver) return () => {}\n const update = () => {\n const max = Number.parseFloat(view.getComputedStyle(panel).maxHeight)\n const full = Number.isFinite(max) && panel.offsetHeight >= max - 1\n if (full !== panel.hasAttribute(FULL)) panel.toggleAttribute(FULL, full)\n }\n const observer = new view.ResizeObserver(update)\n // Its height with the border, as `offsetHeight` reads it\n observer.observe(panel, { box: \"border-box\" })\n update()\n return () => {\n observer.disconnect()\n panel.removeAttribute(FULL)\n }\n}\n\n/** `close` returns false when the owner keeps the dialog open: the sheet then returns at once. */\nexport const attachSheetDrag = (panel: HTMLElement, close: (event: TouchEvent) => boolean | void) => {\n const view = panel.ownerDocument.defaultView\n if (!view) return () => {}\n const unwatchFull = watchFullHeight(panel, view)\n let startY: number | null = null\n // A touch in the content that may become a pull, until its first move says which way it goes\n let pending: { x: number; y: number; time: number; target: Element } | null = null\n // The pull began in the content: its release must not press what lies under the finger\n let fromContent = false\n let lastY = 0\n let lastTime = 0\n let speed = 0\n let settleTimer: number | undefined\n\n const stopSettling = () => {\n if (settleTimer !== undefined) view.clearTimeout(settleTimer)\n settleTimer = undefined\n panel.removeEventListener(\"transitionend\", onSettled)\n }\n const clearInline = () => {\n panel.style.transition = \"\"\n panel.style.transform = \"\"\n }\n const clear = () => {\n stopSettling()\n clearInline()\n panel.style.removeProperty(DRAG_TRANSFORM)\n panel.style.removeProperty(EXIT_DURATION)\n panel.style.removeProperty(EXIT_EASING)\n }\n const onSettled = (event: TransitionEvent) => {\n if (event.target === panel && event.propertyName === \"transform\") clear()\n }\n // `from` is where the sheet is let go of, `velocity` the finger's speed down in px/ms: the sheet starts back at it.\n const returnToRest = (from = 0, velocity = 0) => {\n stopSettling()\n if (reducedMotion(view)) {\n clear()\n return\n }\n // Back up is the way to rest: a finger still going down starts it the other way.\n const spring = springEasing(SHEET_RELEASE_SPRING, from > 0 ? (-velocity * 1000) / from : 0, true)\n panel.style.transition = `transform ${spring.ms}ms ${spring.easing}`\n panel.style.transform = \"\"\n panel.style.removeProperty(DRAG_TRANSFORM)\n panel.style.removeProperty(EXIT_DURATION)\n panel.style.removeProperty(EXIT_EASING)\n const durationText = view.getComputedStyle(panel).transitionDuration\n const duration = Number.parseFloat(durationText) * (durationText.endsWith(\"ms\") ? 1 : 1000)\n if (duration === 0) {\n clear()\n return\n }\n panel.addEventListener(\"transitionend\", onSettled)\n // A theme can lengthen the token or remove the transition altogether.\n // This cleanup must not cut a valid longer transition at the veto timeout.\n settleTimer = view.setTimeout(clear, Math.max(SETTLE, Number.isFinite(duration) ? duration : 0))\n }\n\n const begin = (clientY: number, time: number) => {\n stopSettling()\n startY = clientY\n lastY = clientY\n lastTime = time\n speed = 0\n }\n\n // Every element from the target up to the panel: one that can scroll up, or pans by itself, keeps the move.\n const contentTakes = (target: Element) => {\n for (let element: Element | null = target; element; element = element.parentElement) {\n if (element.scrollTop > 0) return true\n const touchAction = view.getComputedStyle(element).touchAction\n if (touchAction && touchAction !== \"auto\" && touchAction !== \"manipulation\" && !touchAction.includes(\"pan-y\")) return true\n if (element === panel) break\n }\n return false\n }\n\n const onStart = (event: TouchEvent) => {\n pending = null\n fromContent = false\n const phone = isPhoneLayout(panel)\n if (event.touches.length !== 1 || !phone || panel.closest(EXITING)) return\n const { clientX, clientY } = event.touches[0]\n const target = event.target instanceof view.Element ? event.target : null\n if (clientY - panel.getBoundingClientRect().top <= GRIP) {\n if (target?.closest(INTERACTIVE)) return\n begin(clientY, event.timeStamp)\n return\n }\n if (!target || target.closest(EDITABLE)) return\n pending = { x: clientX, y: clientY, time: event.timeStamp, target }\n }\n\n // The first move of a touch in the content: a pull down from the top takes the sheet from here on.\n const decide = (event: TouchEvent, touch: Touch) => {\n const start = pending!\n const dx = touch.clientX - start.x\n const dy = touch.clientY - start.y\n if (Math.max(Math.abs(dx), Math.abs(dy)) < DECIDE) return\n pending = null\n if (event.defaultPrevented || !event.cancelable || event.timeStamp - start.time > HOLD) return\n if (dy <= 0 || Math.abs(dx) > dy || contentTakes(start.target)) return\n fromContent = true\n begin(start.y, start.time)\n }\n\n const onMove = (event: TouchEvent) => {\n const touch = event.touches[0]\n if (startY === null && pending && touch) decide(event, touch)\n if (startY === null || !touch) return\n event.preventDefault()\n const { clientY } = touch\n speed = (clientY - lastY) / Math.max(1, event.timeStamp - lastTime)\n lastY = clientY\n lastTime = event.timeStamp\n panel.style.transition = \"none\"\n panel.style.transform = `translateY(${Math.max(0, clientY - startY)}px)`\n }\n\n const onEnd = (event: TouchEvent) => {\n pending = null\n if (startY === null) return\n const travelled = lastY - startY\n // A pull from the content ends where it lifted, not in a press of the row under it. A finger that barely\n // moved keeps its tap.\n if (fromContent && travelled > DECIDE && event.cancelable) event.preventDefault()\n fromContent = false\n // A finger that rested before lifting is no flick, and gives the sheet no speed.\n const moving = event.timeStamp - lastTime < REST\n const velocity = moving ? speed : 0\n const flick = speed > CLOSE_SPEED && moving\n startY = null\n if (travelled <= 0) {\n clear()\n return\n }\n const height = panel.getBoundingClientRect().height\n if (travelled > height * CLOSE_SHARE || flick) {\n // The normal/exit-start CSS states retain this exact release position.\n // No inline transform or transition may mask the active CSS exit.\n panel.style.setProperty(DRAG_TRANSFORM, `translateY(${travelled}px)`)\n clearInline()\n // The rest of the way down goes on at the finger's speed, within the time the dialog gives its exit\n const presentedFrom = panel.hasAttribute(PRESENTED_FROM)\n panel.removeAttribute(PRESENTED_FROM)\n if (!reducedMotion(view)) {\n const left = Math.max(1, height - travelled)\n const spring = springEasing(SHEET_RELEASE_SPRING, (Math.max(0, velocity) * 1000) / left, true)\n panel.style.setProperty(EXIT_DURATION, `${Math.min(spring.ms, SHEET_EXIT_MS)}ms`)\n panel.style.setProperty(EXIT_EASING, spring.easing)\n }\n // An owner can veto close. Register before close, which can detach us.\n settleTimer = view.setTimeout(() => {\n settleTimer = undefined\n if (!panel.isConnected || panel.closest(EXITING)) return\n // An owner that kept the dialog open without saying so: it still goes back into its button later\n if (presentedFrom) panel.setAttribute(PRESENTED_FROM, \"\")\n returnToRest(travelled, velocity)\n }, SETTLE)\n if (close(event) === false) {\n if (presentedFrom) panel.setAttribute(PRESENTED_FROM, \"\")\n returnToRest(travelled, velocity)\n }\n return\n }\n returnToRest(travelled, velocity)\n }\n\n const onCancel = () => {\n startY = null\n pending = null\n fromContent = false\n clear()\n }\n\n // A retained panel can reopen before its exit completes. Its new entrance\n // must return to rest, not finish at the old gesture's release offset.\n const dialog = panel.closest(\"[data-plex-dialog]\")\n const stateObserver = dialog ? new view.MutationObserver((records) => {\n if (panel.style.getPropertyValue(DRAG_TRANSFORM) &&\n dialog.getAttribute(\"data-state\") === \"open\" &&\n records.some((record) => record.oldValue === \"closed\")) clear()\n }) : undefined\n stateObserver?.observe(dialog ?? panel, {\n attributes: true, attributeFilter: [\"data-state\"], attributeOldValue: true,\n })\n\n panel.addEventListener(\"touchstart\", onStart, { passive: true })\n panel.addEventListener(\"touchmove\", onMove, { passive: false })\n panel.addEventListener(\"touchend\", onEnd)\n panel.addEventListener(\"touchcancel\", onCancel)\n\n return () => {\n unwatchFull()\n stateObserver?.disconnect()\n panel.removeEventListener(\"touchstart\", onStart)\n panel.removeEventListener(\"touchmove\", onMove)\n panel.removeEventListener(\"touchend\", onEnd)\n panel.removeEventListener(\"touchcancel\", onCancel)\n startY = null\n pending = null\n clear()\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sheetDrag.js","sourceRoot":"","sources":["../../../../src/components/Dialog/sheetDrag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAE9F,sGAAsG;AACtG,oHAAoH;AACpH,+FAA+F;AAC/F,+GAA+G;AAC/G,4GAA4G;AAC5G,0GAA0G;AAC1G,sFAAsF;AACtF,MAAM,IAAI,GAAG,EAAE,CAAA;AACf,MAAM,WAAW,GAAG,GAAG,CAAA;AACvB,MAAM,WAAW,GAAG,GAAG,CAAA;AACvB,MAAM,IAAI,GAAG,GAAG,CAAA;AAChB,MAAM,MAAM,GAAG,GAAG,CAAA;AAClB,MAAM,WAAW,GAAG,qDAAqD,CAAA;AACzE,MAAM,QAAQ,GAAG,4F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AC,CAAA","sourcesContent":["import { isPhoneLayout } from \"../../lib/phoneLayout.js\"\nimport { SHEET_EXIT_MS, SHEET_RELEASE_SPRING, springEasing } from \"../../lib/presentMotion.js\"\n\n// A bottom sheet follows the finger. A drag from its top 44px moves it 1:1, never up. Past 30% of its\n// height, or at 0.5px/ms, it closes; otherwise it returns. Either way it goes on at the finger's speed, on a spring\n// that starts at it, as a sheet let go of does on iOS. Buttons in that strip keep their press.\n// As on iOS, a pull down that starts anywhere else moves the sheet too once the content under the finger is at\n// its top: the first move decides, down and mostly vertical with every scroller under the finger at its top\n// takes the sheet; up, sideways, a move another handler took, a field, a control that pans by itself or a\n// finger that rested first (a hold: Sortable, a context menu) stays with the content.\nconst GRIP = 44\nconst CLOSE_SHARE = 0.3\nconst CLOSE_SPEED = 0.5\nconst REST = 100\nconst SETTLE = 400\nconst INTERACTIVE = \"a, button, input, select, textarea, [role='button']\"\nconst EDITABLE = \"input, textarea, select, [contenteditable]:not([contenteditable='false']), [role='slider']\"\n// The move that settles which way the finger goes, under the browser's own slop so it can still be cancelled\nconst DECIDE = 4\n// A finger that rests this long holds (a Sortable row, a context menu) rather than pulls\nconst HOLD = 200\nconst DRAG_TRANSFORM = \"--dialog-panel-drag-transform\"\nconst EXITING = \"[data-exiting], [data-exiting-active]\"\n// A sheet at its full height says so: a sheet under it then steps back, as one presented from a sheet does on iOS.\n// A shorter sheet leaves the one under it in place, as a medium detent does.\nconst FULL = \"data-sheet-full\"\n// A sheet let go of leaves down at the finger's speed, within the time the dialog gives its exit\nconst EXIT_DURATION = \"--dialog-exit-duration\"\nconst EXIT_EASING = \"--dialog-exit-easing\"\n\nconst reducedMotion = (view: Window) => Boolean(view.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches)\n\nconst watchFullHeight = (panel: HTMLElement, view: Window & typeof globalThis) => {\n if (!view.ResizeObserver) return () => {}\n const update = () => {\n const max = Number.parseFloat(view.getComputedStyle(panel).maxHeight)\n const full = Number.isFinite(max) && panel.offsetHeight >= max - 1\n if (full !== panel.hasAttribute(FULL)) panel.toggleAttribute(FULL, full)\n }\n const observer = new view.ResizeObserver(update)\n // Its height with the border, as `offsetHeight` reads it\n observer.observe(panel, { box: \"border-box\" })\n update()\n return () => {\n observer.disconnect()\n panel.removeAttribute(FULL)\n }\n}\n\n/** `close` returns false when the owner keeps the dialog open: the sheet then returns at once. */\nexport const attachSheetDrag = (panel: HTMLElement, close: (event: TouchEvent) => boolean | void) => {\n const view = panel.ownerDocument.defaultView\n if (!view) return () => {}\n const unwatchFull = watchFullHeight(panel, view)\n let startY: number | null = null\n // A touch in the content that may become a pull, until its first move says which way it goes\n let pending: { x: number; y: number; time: number; target: Element } | null = null\n // The pull began in the content: its release must not press what lies under the finger\n let fromContent = false\n let lastY = 0\n let lastTime = 0\n let speed = 0\n let settleTimer: number | undefined\n\n const stopSettling = () => {\n if (settleTimer !== undefined) view.clearTimeout(settleTimer)\n settleTimer = undefined\n panel.removeEventListener(\"transitionend\", onSettled)\n }\n const clearInline = () => {\n panel.style.transition = \"\"\n panel.style.transform = \"\"\n }\n const clear = () => {\n stopSettling()\n clearInline()\n panel.style.removeProperty(DRAG_TRANSFORM)\n panel.style.removeProperty(EXIT_DURATION)\n panel.style.removeProperty(EXIT_EASING)\n }\n const onSettled = (event: TransitionEvent) => {\n if (event.target === panel && event.propertyName === \"transform\") clear()\n }\n // `from` is where the sheet is let go of, `velocity` the finger's speed down in px/ms: the sheet starts back at it.\n const returnToRest = (from = 0, velocity = 0) => {\n stopSettling()\n if (reducedMotion(view)) {\n clear()\n return\n }\n // Back up is the way to rest: a finger still going down starts it the other way.\n const spring = springEasing(SHEET_RELEASE_SPRING, from > 0 ? (-velocity * 1000) / from : 0, true)\n panel.style.transition = `transform ${spring.ms}ms ${spring.easing}`\n panel.style.transform = \"\"\n panel.style.removeProperty(DRAG_TRANSFORM)\n panel.style.removeProperty(EXIT_DURATION)\n panel.style.removeProperty(EXIT_EASING)\n const durationText = view.getComputedStyle(panel).transitionDuration\n const duration = Number.parseFloat(durationText) * (durationText.endsWith(\"ms\") ? 1 : 1000)\n if (duration === 0) {\n clear()\n return\n }\n panel.addEventListener(\"transitionend\", onSettled)\n // A theme can lengthen the token or remove the transition altogether.\n // This cleanup must not cut a valid longer transition at the veto timeout.\n settleTimer = view.setTimeout(clear, Math.max(SETTLE, Number.isFinite(duration) ? duration : 0))\n }\n\n const begin = (clientY: number, time: number) => {\n stopSettling()\n startY = clientY\n lastY = clientY\n lastTime = time\n speed = 0\n }\n\n // Every element from the target up to the panel: one that can scroll up, or pans by itself, keeps the move.\n const contentTakes = (target: Element) => {\n for (let element: Element | null = target; element; element = element.parentElement) {\n if (element.scrollTop > 0) return true\n const touchAction = view.getComputedStyle(element).touchAction\n if (touchAction && touchAction !== \"auto\" && touchAction !== \"manipulation\" && !touchAction.includes(\"pan-y\")) return true\n if (element === panel) break\n }\n return false\n }\n\n const onStart = (event: TouchEvent) => {\n pending = null\n fromContent = false\n const phone = isPhoneLayout(panel)\n if (event.touches.length !== 1 || !phone || panel.closest(EXITING)) return\n const { clientX, clientY } = event.touches[0]\n const target = event.target instanceof view.Element ? event.target : null\n if (clientY - panel.getBoundingClientRect().top <= GRIP) {\n if (target?.closest(INTERACTIVE)) return\n begin(clientY, event.timeStamp)\n return\n }\n if (!target || target.closest(EDITABLE)) return\n pending = { x: clientX, y: clientY, time: event.timeStamp, target }\n }\n\n // The first move of a touch in the content: a pull down from the top takes the sheet from here on.\n const decide = (event: TouchEvent, touch: Touch) => {\n const start = pending!\n const dx = touch.clientX - start.x\n const dy = touch.clientY - start.y\n if (Math.max(Math.abs(dx), Math.abs(dy)) < DECIDE) return\n pending = null\n if (event.defaultPrevented || !event.cancelable || event.timeStamp - start.time > HOLD) return\n if (dy <= 0 || Math.abs(dx) > dy || contentTakes(start.target)) return\n fromContent = true\n begin(start.y, start.time)\n }\n\n const onMove = (event: TouchEvent) => {\n const touch = event.touches[0]\n if (startY === null && pending && touch) decide(event, touch)\n if (startY === null || !touch) return\n event.preventDefault()\n const { clientY } = touch\n speed = (clientY - lastY) / Math.max(1, event.timeStamp - lastTime)\n lastY = clientY\n lastTime = event.timeStamp\n panel.style.transition = \"none\"\n panel.style.transform = `translateY(${Math.max(0, clientY - startY)}px)`\n }\n\n const onEnd = (event: TouchEvent) => {\n pending = null\n if (startY === null) return\n const travelled = lastY - startY\n // A pull from the content ends where it lifted, not in a press of the row under it. A finger that barely\n // moved keeps its tap.\n if (fromContent && travelled > DECIDE && event.cancelable) event.preventDefault()\n fromContent = false\n // A finger that rested before lifting is no flick, and gives the sheet no speed.\n const moving = event.timeStamp - lastTime < REST\n const velocity = moving ? speed : 0\n const flick = speed > CLOSE_SPEED && moving\n startY = null\n if (travelled <= 0) {\n clear()\n return\n }\n const height = panel.getBoundingClientRect().height\n if (travelled > height * CLOSE_SHARE || flick) {\n // The normal/exit-start CSS states retain this exact release position.\n // No inline transform or transition may mask the active CSS exit.\n panel.style.setProperty(DRAG_TRANSFORM, `translateY(${travelled}px)`)\n clearInline()\n // The rest of the way down goes on at the finger's speed, within the time the dialog gives its exit\n if (!reducedMotion(view)) {\n const left = Math.max(1, height - travelled)\n const spring = springEasing(SHEET_RELEASE_SPRING, (Math.max(0, velocity) * 1000) / left, true)\n panel.style.setProperty(EXIT_DURATION, `${Math.min(spring.ms, SHEET_EXIT_MS)}ms`)\n panel.style.setProperty(EXIT_EASING, spring.easing)\n }\n // An owner can veto close. Register before close, which can detach us.\n settleTimer = view.setTimeout(() => {\n settleTimer = undefined\n if (!panel.isConnected || panel.closest(EXITING)) return\n returnToRest(travelled, velocity)\n }, SETTLE)\n if (close(event) === false) {\n returnToRest(travelled, velocity)\n }\n return\n }\n returnToRest(travelled, velocity)\n }\n\n const onCancel = () => {\n startY = null\n pending = null\n fromContent = false\n clear()\n }\n\n // A retained panel can reopen before its exit completes. Its new entrance\n // must return to rest, not finish at the old gesture's release offset.\n const dialog = panel.closest(\"[data-plex-dialog]\")\n const stateObserver = dialog ? new view.MutationObserver((records) => {\n if (panel.style.getPropertyValue(DRAG_TRANSFORM) &&\n dialog.getAttribute(\"data-state\") === \"open\" &&\n records.some((record) => record.oldValue === \"closed\")) clear()\n }) : undefined\n stateObserver?.observe(dialog ?? panel, {\n attributes: true, attributeFilter: [\"data-state\"], attributeOldValue: true,\n })\n\n panel.addEventListener(\"touchstart\", onStart, { passive: true })\n panel.addEventListener(\"touchmove\", onMove, { passive: false })\n panel.addEventListener(\"touchend\", onEnd)\n panel.addEventListener(\"touchcancel\", onCancel)\n\n return () => {\n unwatchFull()\n stateObserver?.disconnect()\n panel.removeEventListener(\"touchstart\", onStart)\n panel.removeEventListener(\"touchmove\", onMove)\n panel.removeEventListener(\"touchend\", onEnd)\n panel.removeEventListener(\"touchcancel\", onCancel)\n startY = null\n pending = null\n clear()\n }\n}\n"]}
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* How a phone overlay comes and goes as on iOS 27.2
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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.
|
|
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
|
-
/**
|
|
12
|
-
|
|
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
|
|
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
|
-
/**
|
|
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;
|
|
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W,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
|
+
{"version":3,"file":"presentMotion.js","sourceRoot":"","sources":["../../../src/lib/presentMotion.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,MAAM,CAAC,MAAM,YAAY,GAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,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C,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"]}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* How a phone overlay comes and goes as on iOS 27.2
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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
|
-
/**
|
|
17
|
-
|
|
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
|
|
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
|
-
/**
|
|
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.
|
|
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.
|
|
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",
|