@cloudlet/toast 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"host.js","names":["_Fragment","inertClone","clone","element","node","name","nested","snapshotContainers","removed","Host","Component","createHostRuntime","#runtime","rulePaths","CLEAR_CONFIRM","clamp01","value","inertRef","px","blur","reduced","amount","token","style","fallback","doc","owner","view","rootRef","createRef","styleRef","stackRef","shellRef","clipRef","bgRef","pathRef","exitRef","slideOutRef","chromeOutRef","announcer","createAnnouncer","bridge","lease","previousFocus","navigating","focusedBefore","restoreAfterCommit","cleanup","rules","mounted","activation","repeating","motion","overrides","constants","resolveMotion","syncConstants","next","hovering","observer","layout","slideTop","lastBodyUpdate","tokens","measurable","shapeMode","revealing","heldTails","badgeCount","progressFill","progressHandle","progressActive","unreadable","swipe","rtl","peek","gestureTarget","fling","armed","disarmTimer","failedFormatters","formatterErrors","format","args","text","formatter","error","reportFormatterErrors","pause","hover","active","rejectSlotFocus","rememberExternal","previous","restoreFocus","ancestor","restoreExternalFocus","original","restored","syncFocus","inside","measureViewport","width","height","rect","visibleViewport","edge","bottomEdge","edgeSign","write","r","still","frame","radius","bottom","top","svg","createRoundedRectPath","scale","x","inward","index","rule","slot","shift","measure","stack","clip","presented","shellView","bounds","syncReadable","host","open","corner","bodyElement","syncScrollStop","body","title","heading","acknowledgePresentation","presentation","reveal","group","relayout","primaryFocus","root","commitFocusRequest","request","target","focused","clear","takeSnapshots","shell","clones","plan","leaving","chrome","head","now","rapid","badge","page","place","container","layer","animate","pending","planShell","containers","done","tailsDone","exitDone","from","to","flung","offset","finished","syncProgress","progress","fill","determinate","appeared","setPeek","dismissSession","decision","decideRelease","velocity","handle","neighbour","side","navigateSession","follow","rubberBand","settle","shown","collapseSession","toward","resist","MOTION","reach","beginSwipe","y","input","released","axis","componentDidMount","sheet","instance","path","createSwipe","media","createShellMotion","callback","id","preference","wide","scheme","followScheme","placement","visibility","listeners","snapshot","draft","item","event","type","listener","capture","emptyView","getSnapshotBeforeUpdate","before","after","navigation","structure","clearable","componentDidUpdate","disarm","componentWillUnmount","update","pressClear","props","navigate","onIslandKey","render","labels","defaultLabels","options","dir","theme","islandId","current","preview","position","tails","slotRenderer","total","confirm","part","partClasses","Fragment","OffsetStyles","oneShot","tail","Heading","Body","form","SlidePreview","closeButton","missed","ref","useRef","useLayoutEffect","offsets"],"sources":["../../src/react/host.tsx"],"sourcesContent":["import { Component, createRef, useLayoutEffect, useRef } from 'react';\nimport type { KeyboardEvent as ReactKeyboardEvent, ReactNode } from 'react';\nimport type { HostLease, RendererBridge, RendererSnapshot } from '../contracts/internal.js';\nimport type { NotificationHandle } from '../contracts/identity.js';\nimport type { NotificationSnapshot } from '../contracts/snapshots.js';\nimport type { ToasterOffsets, ToasterProps } from '../react.js';\nimport { Body, closeButton, defaultLabels, Heading, partClasses, SlidePreview, slotRenderer } from './card.js';\nimport { createAnnouncer } from './announcer.js';\nimport { createSwipe, decideRelease, rubberBand } from './gestures.js';\nimport type { SwipeCandidate, SwipeSession } from './gestures.js';\nimport { createShellMotion, MOTION, resolveMotion } from './motion.js';\nimport type { Fling, ShapeMode, ShellFrame, ShellMotion, SwapLayer } from './motion.js';\nimport { createRoundedRectPath } from './shape.js';\nimport { emptyView, planShell, shellView } from './plan.js';\nimport type { ShellPlan, ShellView } from './plan.js';\nimport { visibleViewport } from './viewport.js';\n\ninterface HostProps {\n readonly bridge: RendererBridge<ReactNode>;\n readonly lease: HostLease;\n readonly snapshot: RendererSnapshot<ReactNode>;\n readonly options: ToasterProps;\n readonly document: Document;\n}\n\ntype Presented = NotificationSnapshot<ReactNode>;\n\n/** Snapshots are frozen inert DOM pictures: no ids, roles, aria, links or nested snapshots. */\nfunction inertClone<T extends Element>(element: T): T {\n const clone = element.cloneNode(true) as T;\n for (const node of [clone, ...clone.querySelectorAll('*')]) {\n for (const { name } of [...node.attributes]) {\n if (name === 'id' || name === 'role' || name === 'tabindex' || name === 'href' || name.startsWith('aria-')\n || name.startsWith('data-cloudlet-')) node.removeAttribute(name);\n }\n }\n for (const nested of clone.querySelectorAll(snapshotContainers)) nested.replaceChildren();\n for (const removed of clone.querySelectorAll('.cloudlet-live,.cloudlet-pill')) removed.remove();\n return clone;\n}\nconst snapshotContainers = '.cloudlet-exit,.cloudlet-slide-out,.cloudlet-chrome-out,.cloudlet-heading-out,.cloudlet-body-out,.cloudlet-badge-out,.cloudlet-page-out';\ntype Layer = 'exit' | 'slide' | 'chrome' | SwapLayer;\n\ninterface Pending {\n readonly plan: ShellPlan;\n readonly clones: Partial<Record<Layer, Element>>;\n /** Visual position of the shared heading before a morph, for FLIP. */\n readonly heading: DOMRect | null;\n /** Layout height before the commit: bottom-edge snapshots keep their distance to the bottom. */\n readonly height: number;\n}\n\n/**\n * Owns all DOM focus, motion and environmental resources for one attachment.\n * One persistent shell renders both the collapsed pill and the Island: an SVG\n * rounded-rect path, the same path as HTML clip-path, and measured HTML inside.\n */\nexport class Host extends Component<HostProps> {\n readonly #runtime = createHostRuntime(this);\n override componentDidMount = this.#runtime.componentDidMount;\n override getSnapshotBeforeUpdate = this.#runtime.getSnapshotBeforeUpdate;\n override componentDidUpdate = this.#runtime.componentDidUpdate;\n override componentWillUnmount = this.#runtime.componentWillUnmount;\n override render = this.#runtime.render;\n}\n\nconst rulePaths = {\n viewport: '',\n shell: ' .cloudlet-stack > .cloudlet-shell',\n bg: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-bg',\n clip: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip',\n badge: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-badge',\n badgeIn: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-badge > .cloudlet-badge-value',\n badgeOut: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-badge > .cloudlet-badge-out',\n slideOut: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-slide-out',\n peek: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-peek',\n chrome: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > :is(.cloudlet-close,.cloudlet-indicator)',\n chromeOut: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-chrome-out',\n headerIn: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-slide > .cloudlet-header > .cloudlet-heading',\n headerOut: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-slide > .cloudlet-header > .cloudlet-heading-out',\n body: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-slide > .cloudlet-body',\n bodyOut: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-slide > .cloudlet-body-out',\n pageIn: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-indicator > .cloudlet-page > .cloudlet-page-value',\n pageOut: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-indicator > .cloudlet-page > .cloudlet-page-out',\n tail1: ' .cloudlet-stack > [data-cloudlet-tail=\"1\"]',\n tail2: ' .cloudlet-stack > [data-cloudlet-tail=\"2\"]',\n exit: ' .cloudlet-stack > .cloudlet-exit',\n exitClip: ' .cloudlet-stack > .cloudlet-exit > .cloudlet-shell > .cloudlet-clip',\n exitBg: ' .cloudlet-stack > .cloudlet-exit > .cloudlet-shell > .cloudlet-bg',\n exitBadge: ' .cloudlet-stack > .cloudlet-exit > .cloudlet-shell > .cloudlet-badge',\n} as const;\ntype Rule = keyof typeof rulePaths;\n\n/** Milliseconds the clear button waits for its second press. */\nconst CLEAR_CONFIRM = 3000;\nconst clamp01 = (value: number) => Math.max(0, Math.min(1, value));\n/** Native `inert` without relying on React 19's boolean prop (React 18.2 is supported). */\nconst inertRef = (node: HTMLElement | null) => node?.setAttribute('inert', '');\nconst px = (value: number) => `${Math.round(value * 100) / 100}px`;\nconst blur = (amount: number, reduced: boolean) => reduced || amount <= 0.01 ? 'none' : `blur(${px(amount)})`;\nfunction token(style: CSSStyleDeclaration | undefined, name: string, fallback: number) {\n const value = parseFloat(style?.getPropertyValue(name) ?? '');\n return Number.isFinite(value) ? value : fallback;\n}\n\n// Keep React's pre-mutation lifecycle for focus and snapshots. Attachment state is\n// closure-private, so ordinary lexical minification needs no property mangling.\nfunction createHostRuntime(owner: Host) {\n // Toaster keys Host by lease; these capabilities stay fixed for its lifetime.\n const { bridge, lease, document: doc } = owner.props;\n const view = doc.defaultView;\n const rootRef = createRef<HTMLDivElement>();\n const styleRef = createRef<HTMLStyleElement>();\n const stackRef = createRef<HTMLDivElement>();\n const shellRef = createRef<HTMLDivElement>();\n const clipRef = createRef<HTMLDivElement>();\n const bgRef = createRef<SVGSVGElement>();\n const pathRef = createRef<SVGPathElement>();\n const exitRef = createRef<HTMLDivElement>();\n const slideOutRef = createRef<HTMLDivElement>();\n const chromeOutRef = createRef<HTMLDivElement>();\n const announcer = createAnnouncer(bridge, lease, doc, () => owner.props.options.announcements);\n let previousFocus: HTMLElement | null = null;\n let navigating: NotificationHandle | null = null;\n let focusedBefore: HTMLElement | null = null;\n let restoreAfterCommit = false;\n let cleanup: (() => void) | null = null;\n let rules: Partial<Record<Rule, CSSStyleDeclaration>> = {};\n let mounted = false;\n let activation: Element | null = null;\n let repeating = false;\n let motion: ShellMotion | null = null;\n // `ToasterMotion.overrides` (debugging): resolved only when the object changes.\n let overrides = owner.props.options.motion?.overrides;\n let constants = resolveMotion(overrides);\n const syncConstants = () => {\n const next = owner.props.options.motion?.overrides;\n if (next === overrides) return;\n overrides = next;\n constants = resolveMotion(next);\n motion?.setConstants(constants);\n };\n let reduced = false;\n let hovering = false;\n let observer: ResizeObserver | null = null;\n /** Live layout box of the shell (the target shape); the SVG and clip follow it. */\n let layout = { width: 0, height: 0, bodyTop: 0 };\n /** Top of the body that left in the running slide (the outgoing snapshot sits there). */\n let slideTop = 0;\n /** When the body last changed: a stream of updates crossfades once (`bodyQuiet`), then changes in place. */\n let lastBodyUpdate = -Infinity;\n let tokens = { tailOffset: 4, tailScale: 0.9, pillHeight: 44 };\n let measurable = false;\n let shapeMode: ShapeMode = 'instant';\n /** Motion groups that still hide the presented content; presentation waits for none. */\n const revealing = new Set<string>();\n /** Tails kept mounted while they retract or fade out. */\n let heldTails = 0;\n let badgeCount = 2;\n let progressFill: SVGCircleElement | null = null;\n let progressHandle: NotificationHandle | null = null;\n let progressActive = false;\n let unreadable: NotificationHandle | null = null;\n let swipe: ReturnType<typeof createSwipe> | null = null;\n /** Document direction of the last render: physical swipe/slide sides mirror in RTL. */\n let rtl = false;\n /** Inert neighbour shown only while a finger drags the Island content; side +1 is physically right. */\n let peek: { readonly handle: NotificationHandle; readonly side: 1 | -1 } | null = null;\n /** The record a running swipe (or its intent window) belongs to; a change of target cancels it. */\n let gestureTarget: { readonly handle: NotificationHandle; readonly open: boolean } | null = null;\n /** A committed swipe dismiss: its exit snapshot keeps flying from the release point. */\n let fling: (Fling & { readonly handle: NotificationHandle }) | null = null;\n /** The clear button's first press arms it; a second press within `CLEAR_CONFIRM` clears the stack. */\n let armed = false;\n let disarmTimer: number | undefined;\n // Formatter failures found during render are reported after commit, once per function.\n const failedFormatters = new WeakSet<object>();\n const formatterErrors: unknown[] = [];\n function format<Args extends readonly unknown[]>(formatter: (...args: Args) => string, fallback: (...args: Args) => string, ...args: Args): string {\n try {\n const text = formatter(...args);\n if (typeof text !== 'string') throw new TypeError('Label formatter must return a string');\n return text;\n } catch (error) {\n if (!failedFormatters.has(formatter)) { failedFormatters.add(formatter); formatterErrors.push(error); }\n return fallback(...args);\n }\n }\n function reportFormatterErrors() {\n for (const error of formatterErrors.splice(0)) bridge.reportDiagnostic(lease, { code: 'formatter-error',\n source: 'Toaster.labels', message: 'A label formatter failed', error });\n }\n const pause = (reason: 'focus' | 'hover' | 'document-hidden' | 'window-blur', active: boolean) =>\n bridge.setPause(lease, { scope: 'host', reason, active });\n const hover = (active: boolean) => {\n if (hovering === active) return;\n hovering = active;\n pause('hover', active);\n motion?.setHover(active);\n };\n const rejectSlotFocus = (previous: EventTarget | null) => {\n rememberExternal(previous);\n if (view && previous instanceof view.HTMLElement && !previous.closest('.cloudlet-slot') && restoreFocus(previous)) return;\n if (!restoreFocus(previousFocus)) {\n const active = doc.activeElement;\n if (view && active instanceof view.HTMLElement) active.blur();\n rootRef.current?.focus({ preventScroll: true });\n }\n };\n\n function rememberExternal(element: EventTarget | null) {\n if (view && element instanceof view.HTMLElement && element !== doc.body\n && !rootRef.current?.contains(element)) previousFocus = element;\n }\n function restoreFocus(element: HTMLElement | null): boolean {\n if (!element?.isConnected || element.closest('[hidden],[inert],[aria-hidden=\"true\"]')\n || element.matches(':disabled')) return false;\n for (let ancestor: HTMLElement | null = element; ancestor; ancestor = ancestor.parentElement) {\n const style = view?.getComputedStyle(ancestor);\n if (style?.display === 'none' || style?.visibility === 'hidden' || style?.visibility === 'collapse'\n || style?.contentVisibility === 'hidden') return false;\n }\n element.focus({ preventScroll: true });\n return doc.activeElement === element;\n }\n function restoreExternalFocus(): boolean {\n if (restoreFocus(previousFocus)) return true;\n for (const element of doc.querySelectorAll<HTMLElement>('button,a[href],input,select,textarea,summary,[tabindex]')) {\n if (element.tabIndex >= 0 && !element.closest('.cloudlet-host') && restoreFocus(element)) return true;\n }\n // The application may have removed every external control. Leave the empty\n // notification region without adding a permanent stop to the document order.\n const original = doc.body.getAttribute('tabindex');\n doc.body.setAttribute('tabindex', '-1');\n const restored = restoreFocus(doc.body);\n if (original === null) doc.body.removeAttribute('tabindex'); else doc.body.setAttribute('tabindex', original);\n return restored;\n }\n const syncFocus = (element: Element | null) => {\n const inside = !!element && !!rootRef.current?.contains(element);\n pause('focus', inside);\n bridge.setFocused(lease, inside ? bridge.getSnapshot().presentation?.handle ?? null : null);\n };\n function measureViewport() {\n if (!mounted || !view) return;\n const width = doc.documentElement.clientWidth || view.innerWidth;\n const height = doc.documentElement.clientHeight || view.innerHeight;\n const rect = visibleViewport(width, height, view.visualViewport);\n for (const edge of ['top', 'right', 'bottom', 'left', 'width', 'height'] as const) {\n rules.viewport?.setProperty(`--cloudlet-viewport-${edge}`, `${rect[edge]}px`);\n }\n }\n const bottomEdge = () => rootRef.current?.dataset.edge === 'bottom';\n const edgeSign = (): -1 | 1 => bottomEdge() ? 1 : -1;\n\n /** The only DOM writer of animated values: scoped CSSOM rules and SVG attributes. */\n function write(frame: ShellFrame) {\n const r = rules;\n const { reduced: still } = frame;\n const width = Math.max(0, frame.width);\n const height = Math.max(0, frame.height);\n const radius = Math.min(Math.max(0, frame.radius), width / 2, height / 2);\n // At the bottom edge the silhouette grows upwards: it is anchored to the layout bottom.\n const bottom = bottomEdge();\n const top = bottom ? layout.height - height : 0;\n if (r.shell) {\n r.shell.opacity = String(clamp01(frame.opacity));\n r.shell.transform = still ? 'none' : `translate(${px(frame.dragX)}, ${px(frame.y + frame.dragY)}) scale(${frame.scale})`;\n }\n const svg = bgRef.current;\n if (svg) {\n svg.setAttribute('width', String(width));\n svg.setAttribute('height', String(height));\n pathRef.current?.setAttribute('d', createRoundedRectPath(width, height, radius));\n }\n // The shadow token is a box-shadow: the SVG box follows the path's corners.\n if (r.bg) {\n r.bg.borderRadius = px(radius);\n // Layout keeps the box at the top and a transform carries it to the bottom edge: a growing\n // silhouette then moves no layout start point, so the morph is not counted as layout shift (CLS).\n r.bg.top = '0px'; r.bg.bottom = 'auto';\n r.bg.transform = `translateX(-50%) translateY(${px(top)})`;\n }\n if (r.clip) r.clip.clipPath = `path(\"${createRoundedRectPath(width, height, radius, (layout.width - width) / 2, top)}\")`;\n if (r.badge) {\n const scale = still ? 1 : constants.badge.scale + (1 - constants.badge.scale) * frame.badge;\n // Outer corner: top right, mirrored in RTL; the bottom corner at the bottom edge.\n const x = (width / 2 - 10) * (rtl ? -1 : 1);\n r.badge.opacity = String(clamp01(frame.badge));\n r.badge.transform = `translate(calc(${px(x)} - 50%), ${bottom ? '6px' : '-6px'}) scale(${scale})`;\n }\n // Tails peek out one step towards the centre of the screen.\n const inward = bottom ? -1 : 1;\n for (const index of [1, 2] as const) {\n const rule = r[`tail${index}`];\n if (!rule) continue;\n const slot = frame[`tail${index}`];\n rule.width = px(width);\n rule.height = px(Math.min(height, tokens.pillHeight));\n rule.opacity = String(clamp01(frame[`tail${index}Opacity`]));\n rule.transform = `translateX(-50%) translateY(${px(inward * slot * (tokens.tailOffset + constants.hoverLift * frame.lift))}) scale(${Math.pow(tokens.tailScale, slot)})`;\n }\n if (r.slideOut) {\n r.slideOut.transform = still ? 'none' : `translateX(${px(frame.slide - frame.slideDirection * frame.slideWidth)})`;\n r.slideOut.opacity = String(clamp01(frame.slideOut));\n }\n if (r.peek) {\n r.peek.width = px(layout.width);\n r.peek.top = px(layout.bodyTop);\n r.peek.transform = `translateX(${px(frame.slide + (peek?.side ?? 0) * layout.width)})`;\n }\n const shift = still ? 'none' : `translate(${px(frame.headX)}, ${px(frame.headY)})`;\n if (r.headerIn) r.headerIn.transform = shift;\n if (r.headerOut) r.headerOut.transform = shift;\n for (const [rule, value] of [[r.headerIn, frame.headerIn], [r.headerOut, frame.headerOut],\n [r.badgeIn, frame.badgeIn], [r.badgeOut, frame.badgeOut], [r.pageIn, frame.pageIn], [r.pageOut, frame.pageOut]] as const) {\n if (!rule) continue;\n rule.opacity = String(clamp01(value));\n rule.filter = blur((1 - clamp01(value)) * constants.blur, still);\n }\n if (r.chrome) {\n r.chrome.opacity = String(clamp01(frame.chrome));\n r.chrome.transform = still ? 'none' : `translateY(${px((1 - clamp01(frame.chrome)) * constants.chromeOffset)})`;\n }\n if (r.chromeOut) r.chromeOut.opacity = String(clamp01(frame.chromeOut));\n if (r.body) {\n // The body carries the slide between notifications; the header above it blur-swaps instead.\n r.body.opacity = String(clamp01(frame.chrome) * clamp01(frame.bodyIn) * clamp01(frame.slideIn));\n r.body.transform = still ? 'none'\n : `translateX(${px(frame.slide)}) translateY(${px((1 - clamp01(frame.chrome)) * constants.chromeOffset + (1 - clamp01(frame.bodyIn)) * constants.bodyOffset)})`;\n }\n if (r.bodyOut) r.bodyOut.opacity = String(clamp01(frame.bodyOut));\n if (r.exit) {\n r.exit.opacity = String(clamp01(frame.exitOpacity));\n r.exit.transform = still ? 'translateX(-50%)' : `translateX(-50%) translate(${px(frame.exitX)}, ${px(frame.exitY)}) scale(${frame.exitScale})`;\n }\n if (progressActive && progressFill?.isConnected) progressFill.setAttribute('stroke-dasharray', `${Math.round(frame.progress * 10000) / 100} 100`);\n }\n\n /** Layout size of the stack equals the shell's target box and is unaffected by its transforms. */\n function measure() {\n const stack = stackRef.current;\n const clip = clipRef.current;\n const presented = shellView(owner.props.snapshot).presented;\n if (!stack || !clip || !view || !motion || !presented) { measurable = false; return; }\n const bounds = stack.getBoundingClientRect();\n measurable = bounds.width > 0 && bounds.height > 0;\n syncReadable(presented);\n if (!measurable) return;\n const host = view.getComputedStyle(rootRef.current!);\n tokens = { tailOffset: token(host, '--cloudlet-tail-offset', 4), tailScale: token(host, '--cloudlet-tail-scale', 0.9),\n pillHeight: token(host, '--cloudlet-pill-height', 44) };\n const open = owner.props.snapshot.island.open;\n const corner = parseFloat(view.getComputedStyle(clip).borderTopLeftRadius);\n const radius = Math.min(Number.isFinite(corner) ? corner : open ? 24 : bounds.height / 2, bounds.height / 2, bounds.width / 2);\n layout = { width: bounds.width, height: bounds.height, bodyTop: bodyElement()?.offsetTop ?? 0 };\n motion.setShape({ width: bounds.width, height: bounds.height, radius }, shapeMode);\n shapeMode = 'close';\n syncScrollStop();\n }\n /**\n * A body that scrolls is a named tab stop (WCAG 2.1.1): Safari never makes scrollers focusable,\n * and a focused action below a long description cannot scroll back up to it.\n */\n function syncScrollStop() {\n const body = bodyElement();\n if (!body) return;\n const title = heading()?.querySelector('[data-cloudlet-title]')?.id;\n if (body.scrollHeight - body.clientHeight > 1 && title) {\n body.tabIndex = 0;\n body.setAttribute('role', 'group');\n body.setAttribute('aria-labelledby', title);\n } else for (const name of ['tabindex', 'role', 'aria-labelledby']) body.removeAttribute(name);\n }\n /** A readable record that loses its geometry (hidden host, zero viewport) stops spending time. */\n function syncReadable(presented: Presented | null) {\n const next = presented && !measurable && bridge.getSnapshot().presentation?.readable ? presented.handle : null;\n if (next === unreadable) return;\n if (unreadable) bridge.setPause(lease, { scope: 'notification', handle: unreadable, reason: 'content-transition', active: false });\n unreadable = next;\n if (next) bridge.setPause(lease, { scope: 'notification', handle: next, reason: 'content-transition', active: true });\n }\n /** The presented record is readable once its live slide is visible and no transition still hides it. */\n function acknowledgePresentation() {\n const presentation = bridge.getSnapshot().presentation;\n if (!presentation?.token || presentation.readable || revealing.size) return;\n const node = shellRef.current?.querySelector(`[data-cloudlet-presented=\"${presentation.handle.generation}\"]`);\n const bounds = node?.getBoundingClientRect();\n if (!node || !measurable || !bounds?.width || !bounds.height || view?.getComputedStyle(node).visibility === 'hidden') return;\n bridge.acknowledgePresentation(lease, presentation.handle, presentation.token);\n }\n const reveal = (group: string) => {\n revealing.add(group);\n return () => { revealing.delete(group); acknowledgePresentation(); };\n };\n const relayout = () => { measureViewport(); measure(); acknowledgePresentation(); };\n function primaryFocus(): HTMLElement | null {\n const root = rootRef.current;\n return (owner.props.snapshot.island.open ? root?.querySelector<HTMLElement>('.cloudlet-slide [data-cloudlet-title]') : null)\n ?? root?.querySelector<HTMLElement>('[data-cloudlet-pill]') ?? null;\n }\n function commitFocusRequest() {\n const request = owner.props.snapshot.focusRequest;\n if (!request || bridge.getSnapshot().focusRequest?.token !== request.token) return;\n const root = rootRef.current;\n const target = request.target;\n let element: HTMLElement | null = null;\n if (target.kind === 'anchor') element = root;\n // The acknowledgement lives in the Island; collapsed, the pill names the missed count.\n else if (target.kind === 'overflow') element = root?.querySelector('[data-cloudlet-overflow]') ?? root?.querySelector('[data-cloudlet-pill]') ?? null;\n else if (target.kind === 'notification') {\n const presented = shellRef.current?.querySelector<HTMLElement>(`[data-cloudlet-presented=\"${target.handle.generation}\"]`);\n element = !presented ? null : target.control\n ? shellRef.current!.querySelector(`[data-cloudlet-control=\"${target.control}\"]`) : primaryFocus();\n }\n rememberExternal(doc.activeElement);\n const focused = restoreFocus(element);\n bridge.acknowledgeFocus(lease, request.token, focused ? 'focused' : 'unavailable');\n }\n function clear(layer: Element | null | undefined) { layer?.replaceChildren(); }\n function heading() { return shellRef.current?.querySelector<HTMLElement>(':scope > .cloudlet-clip > .cloudlet-slide > .cloudlet-header > .cloudlet-heading') ?? null; }\n function bodyElement() { return shellRef.current?.querySelector<HTMLElement>(':scope > .cloudlet-clip > .cloudlet-slide > .cloudlet-body') ?? null; }\n /** Pre-mutation pictures of every layer the commit is about to change (one per layer). */\n function takeSnapshots(plan: ShellPlan): Partial<Record<Layer, Element>> {\n const shell = shellRef.current;\n const clip = clipRef.current;\n if (!shell || !clip || !measurable) return {};\n const clones: Partial<Record<Layer, Element>> = {};\n if (plan.presence === 'exit' || plan.presence === 'rise' || plan.presence === 'replace') {\n clones.exit = inertClone(shell);\n // The snapshot keeps the silhouette it had at this instant.\n if (rules.exitClip) rules.exitClip.clipPath = rules.clip?.clipPath ?? '';\n if (rules.exitBg) rules.exitBg.borderRadius = rules.bg?.borderRadius ?? '';\n if (rules.exitBadge) { rules.exitBadge.opacity = rules.badge?.opacity ?? ''; rules.exitBadge.transform = rules.badge?.transform ?? ''; }\n if (rules.exit) rules.exit.width = px(layout.width);\n }\n const leaving = bodyElement();\n if (plan.slide && leaving) {\n // Only the body slides out; the heading blur-swaps in place (plan.header).\n clones.slide = inertClone(leaving);\n slideTop = leaving.offsetTop;\n if (rules.slideOut) rules.slideOut.width = px(layout.width);\n }\n if (plan.morph === 'close') {\n const chrome = inertClone(clip);\n // The live header stays on top; only body, close and indicator fade out.\n chrome.querySelector('.cloudlet-header')?.classList.add('cloudlet-ghost');\n clones.chrome = chrome;\n if (rules.chromeOut) rules.chromeOut.width = px(layout.width);\n }\n const head = heading();\n if (plan.header && head) clones.header = inertClone(head);\n const body = bodyElement();\n // Rapid updates (progress text every 150 ms) must not restart the crossfade: within\n // `bodyQuiet` of the previous update the new text lands in place.\n const now = motion?.now() ?? 0;\n const rapid = plan.body && now - lastBodyUpdate < (motion?.constants.bodyQuiet ?? 0);\n if (plan.body) lastBodyUpdate = now;\n if (plan.body && !plan.slide && body && !rapid && !motion?.swapping('body')) {\n clones.body = inertClone(body);\n if (rules.bodyOut) rules.bodyOut.top = px(body.offsetTop);\n }\n const badge = shell.querySelector(':scope > .cloudlet-badge > .cloudlet-badge-value');\n if (plan.badge && badge) clones.badge = inertClone(badge);\n const page = clip.querySelector(':scope > .cloudlet-indicator > .cloudlet-page > .cloudlet-page-value');\n if (plan.page && page) clones.page = inertClone(page);\n return clones;\n }\n function place(layer: Layer, clone: Element) {\n const shell = shellRef.current;\n const container = layer === 'exit' ? exitRef.current : layer === 'slide' ? slideOutRef.current\n : layer === 'chrome' ? chromeOutRef.current\n : layer === 'header' ? shell?.querySelector(':scope > .cloudlet-clip > .cloudlet-slide > .cloudlet-header > .cloudlet-heading-out')\n : layer === 'body' ? shell?.querySelector(':scope > .cloudlet-clip > .cloudlet-slide > .cloudlet-body-out')\n : layer === 'badge' ? shell?.querySelector(':scope > .cloudlet-badge > .cloudlet-badge-out')\n : shell?.querySelector(':scope > .cloudlet-clip > .cloudlet-indicator > .cloudlet-page > .cloudlet-page-out');\n if (!container) return null;\n // Set the native attribute without relying on React 19's inert prop support.\n container.setAttribute('inert', '');\n container.replaceChildren(clone);\n return container;\n }\n function animate(previous: ShellView, next: ShellView, pending: Pending | null) {\n if (!motion) return;\n const plan = pending?.plan ?? planShell(previous, next);\n // Before any write of this commit: the writer must know which bar it owns.\n syncProgress(next);\n const containers: Partial<Record<Layer, Element | null>> = {};\n for (const [layer, clone] of Object.entries(pending?.clones ?? {}) as [Layer, Element][]) containers[layer] = place(layer, clone);\n const done = (layer: Layer) => () => clear(containers[layer]);\n const tailsDone = () => { if (heldTails) { heldTails = 0; owner.forceUpdate(); } };\n const exitDone = () => clear(exitRef.current);\n if (plan.presence === 'enter') shapeMode = 'instant';\n else if (plan.morph === 'open') shapeMode = 'open';\n measure();\n const from = pending?.heading;\n const to = from && plan.morph !== 'none' ? heading()?.getBoundingClientRect() : null;\n if (from && to) motion.shiftHeading(from.left - to.left, from.top - to.top, plan.morph === 'open' ? 'open' : 'close');\n const edge = edgeSign();\n const flung = fling && previous.presented?.handle === fling.handle && !next.stack.includes(fling.handle) ? fling : undefined;\n if (fling && !next.stack.includes(fling.handle)) fling = null;\n if (plan.presence === 'exit' || plan.presence === 'rise' || plan.presence === 'replace') {\n if (containers.exit) motion.exit(edge, exitDone, flung);\n else if (flung) motion.release('dragX', 0);\n if (plan.presence === 'exit') motion.hide();\n }\n // An arrival keeps the shell: the title blur-swaps and the width springs to the new text.\n if (plan.presence === 'enter' || plan.presence === 'replace') {\n motion.enter(edge, reveal('presence'));\n if (plan.presence === 'enter') {\n motion.setTails(next.depth, 'settle', 0, tailsDone);\n if (next.open) motion.open(); else motion.setBadge(next.badge);\n }\n }\n if (plan.presence === 'rise') {\n motion.rise(-edge * tokens.tailOffset, tokens.tailScale, reveal('presence'));\n motion.swap('header', reveal('header'), true);\n }\n if (plan.tails === 'arrival' || plan.tails === 'rise' || plan.tails === 'settle') {\n if (next.depth < previous.depth) heldTails = Math.max(heldTails, previous.depth);\n motion.setTails(next.depth, plan.tails, previous.depth, tailsDone);\n }\n if (plan.morph === 'open') {\n heldTails = Math.max(heldTails, previous.depth);\n motion.open(tailsDone);\n } else if (plan.morph === 'close') motion.collapse(next.depth, next.badge, { chrome: done('chrome'), tails: tailsDone });\n // Bottom edge: a snapshot keeps its distance to the anchored bottom while the layout height changes.\n const offset = bottomEdge() && pending ? layout.height - pending.height : 0;\n if (rules.slideOut) rules.slideOut.top = px(offset + slideTop);\n if (rules.chromeOut && containers.chrome) rules.chromeOut.top = px(offset);\n if (plan.slide) {\n const finished = reveal('slide');\n // The plan is logical (+1 towards older records); older records lie to the left in RTL.\n motion.slide(rtl ? -plan.slide as 1 | -1 : plan.slide, layout.width, () => { clear(containers.slide); finished(); });\n }\n if (containers.header) {\n const finished = reveal('header');\n motion.swap('header', () => { clear(containers.header); finished(); });\n }\n if (containers.body) motion.swap('body', done('body'));\n if (containers.badge) motion.swap('badge', done('badge'));\n if (containers.page) motion.swap('page', done('page'));\n if (!next.open && previous.presented && next.presented && plan.morph === 'none') motion.setBadge(next.badge);\n // Terminal updates of the same record re-pend its presentation before the swap hides it.\n const presentation = bridge.getSnapshot().presentation;\n if (plan.begin && plan.header && next.presented && presentation?.token && presentation.readable\n && presentation.handle === next.presented.handle) bridge.beginPresentation(lease, next.presented.handle, presentation.token);\n }\n function syncProgress(next: ShellView) {\n const presented = next.presented;\n // The ring lives around the shared status icon: in the pill and in the Island.\n const progress = presented?.content.progress;\n const fill = heading()?.querySelector<SVGCircleElement>(':scope > .cloudlet-icon > .cloudlet-ring > .cloudlet-progress-fill') ?? null;\n const determinate = progress?.kind === 'determinate';\n // A new ring, record or determinate phase starts at its value; later values tween.\n const appeared = fill !== progressFill || presented?.handle !== progressHandle || !progressActive;\n progressFill = fill;\n progressHandle = presented?.handle ?? null;\n progressActive = determinate && !!fill;\n motion?.setProgress(determinate ? progress.value : null, appeared);\n }\n function setPeek(next: typeof peek) {\n if (peek?.handle === next?.handle && peek?.side === next?.side) return;\n peek = next;\n owner.forceUpdate();\n }\n /** Stack: the pill follows the finger; a release past the threshold dismisses it (`reason: 'swipe'`). */\n function dismissSession(handle: NotificationHandle): SwipeSession {\n return {\n move: offset => motion?.drag('dragX', offset),\n end: (offset, velocity) => {\n const decision = decideRelease(offset, velocity, layout.width, { negative: true, positive: true });\n if (decision) {\n fling = { handle, direction: decision, distance: layout.width, velocity: velocity * 1000 };\n if (bridge.dismiss(lease, handle, 'swipe').status === 'applied') return;\n fling = null;\n }\n motion?.release('dragX', velocity * 1000);\n },\n cancel: () => motion?.release('dragX', 0),\n };\n }\n /** Physical neighbour of a record: side +1 is to the right, where older records lie in LTR. */\n function neighbour(handle: NotificationHandle, side: 1 | -1): NotificationHandle | null {\n const stack = owner.props.snapshot.stack;\n const index = stack.indexOf(handle);\n return index < 0 ? null : stack[index + side * (rtl ? -1 : 1)] ?? null;\n }\n /**\n * Island: the content follows the finger inside the fixed shell with the inert\n * neighbour beside it; without a neighbour the edge resists. A release towards a\n * neighbour navigates and the slide continues from the release point and velocity.\n */\n function navigateSession(handle: NotificationHandle): SwipeSession {\n const follow = (offset: number) => {\n const side = offset < 0 ? 1 : -1;\n const target = offset ? neighbour(handle, side) : null;\n setPeek(target ? { handle: target, side } : null);\n return target ? Math.max(-layout.width, Math.min(layout.width, offset)) : rubberBand(offset, layout.width);\n };\n const settle = (velocity: number) => motion?.release('slide', velocity, () => setPeek(null));\n return {\n move: offset => motion?.drag('slide', follow(offset)),\n end: (offset, velocity) => {\n const decision = decideRelease(offset, velocity, layout.width,\n { negative: !!neighbour(handle, 1), positive: !!neighbour(handle, -1) });\n const target = decision ? neighbour(handle, decision < 0 ? 1 : -1) : null;\n if (target) {\n const shown = peek;\n // The commit replaces the preview by the live slide at the same place.\n peek = null;\n motion?.fling('slide', velocity * 1000);\n if (bridge.navigate(lease, target).status === 'applied') return;\n peek = shown;\n }\n settle(peek ? velocity * 1000 : 0);\n },\n cancel: () => settle(0),\n };\n }\n /** Island header: a vertical swipe towards the screen edge collapses to the stack (not a dismiss). */\n function collapseSession(): SwipeSession {\n const toward = bottomEdge() ? 1 : -1;\n // Towards the edge the Island stretches softly; away from it the resistance is strong.\n const resist = (offset: number) => rubberBand(offset, offset * toward > 0 ? layout.height : MOTION.swipe.minDistance);\n return {\n move: offset => motion?.drag('dragY', resist(offset)),\n end: (offset, velocity) => {\n motion?.release('dragY', 0);\n // The edge is a short reach away (gutter + safe area): `edge` px also commits.\n const reach = Math.min(layout.height, MOTION.swipe.edge / MOTION.swipe.distance);\n if (decideRelease(offset, velocity, reach, { negative: toward < 0, positive: toward > 0 })) bridge.collapseIsland(lease);\n },\n cancel: () => motion?.release('dragY', 0),\n };\n }\n /** Which swipes a pointerdown or a wheel stream may start; reduced motion turns swipes off. */\n function beginSwipe(target: Element, input: 'pointer' | 'wheel'): SwipeCandidate | null {\n const shell = shellRef.current;\n const clip = clipRef.current;\n const { presented, open } = shellView(owner.props.snapshot);\n if (reduced || !motion || !measurable || !shell || !clip || !presented || !shell.contains(target)) return null;\n let x: boolean;\n let y = false;\n if (!open) x = input === 'pointer' && !!target.closest('[data-cloudlet-pill]');\n else {\n x = clip.contains(target);\n y = x && input === 'pointer' && !!target.closest('.cloudlet-clip > .cloudlet-slide > .cloudlet-header');\n }\n if (!x && !y) return null;\n const { handle } = presented;\n // Hold the record from the first contact: TTL, attention and the target cannot change under the finger.\n if (bridge.setPause(lease, { scope: 'notification', handle, reason: 'gesture', active: true }).status === 'rejected') return null;\n gestureTarget = { handle, open };\n let released = false;\n return {\n x, y,\n start: axis => !open ? dismissSession(handle) : axis === 'x' ? navigateSession(handle) : collapseSession(),\n release() {\n if (released) return;\n released = true;\n gestureTarget = null;\n bridge.setPause(lease, { scope: 'notification', handle, reason: 'gesture', active: false });\n },\n };\n }\n function componentDidMount() {\n const root = rootRef.current;\n const shell = shellRef.current;\n if (!root || !view || !shell) return;\n mounted = true;\n const sheet = styleRef.current?.sheet;\n const instance = `[data-cloudlet-instance=\"${owner.props.snapshot.controller}\"]`;\n if (sheet) {\n for (const [name, path] of Object.entries(rulePaths) as [Rule, string][]) {\n const index = sheet.insertRule(`${instance}${path} {}`, sheet.cssRules.length);\n rules[name] = (sheet.cssRules[index] as CSSStyleRule).style;\n }\n }\n for (const container of [exitRef.current, slideOutRef.current, chromeOutRef.current]) container?.setAttribute('inert', '');\n announcer.mount(root);\n swipe = createSwipe(root, { begin: beginSwipe, now: () => view.performance.now() });\n const media = view.matchMedia?.('(prefers-reduced-motion: reduce)');\n reduced = media?.matches ?? false;\n root.dataset.reducedMotion = String(reduced);\n motion = createShellMotion({\n now: () => view.performance.now(), requestFrame: callback => view.requestAnimationFrame(callback),\n cancelFrame: id => view.cancelAnimationFrame(id), write, reducedMotion: reduced,\n timeScale: owner.props.options.motion?.timeScale, constants,\n });\n const preference = () => {\n reduced = media?.matches ?? false;\n root.dataset.reducedMotion = String(reduced);\n if (reduced) swipe?.cancel();\n motion?.setReducedMotion(reduced);\n };\n // `auto` follows the same breakpoint as the stylesheet: re-render when it flips.\n const wide = view.matchMedia?.('(min-width: 48rem)');\n // `data-resolved-theme` follows the system scheme while the theme is `system`.\n const scheme = view.matchMedia?.('(prefers-color-scheme: dark)');\n const followScheme = () => { if ((owner.props.options.theme ?? 'system') === 'system') owner.forceUpdate(); };\n const placement = () => { if ((owner.props.options.position ?? 'auto') === 'auto') { swipe?.cancel(); owner.forceUpdate(); } };\n const visibility = () => pause('document-hidden', doc.visibilityState === 'hidden');\n // A pointer press outside the open Island collapses it to the stack.\n const outside = (event: Event) => {\n const snapshot = bridge.getSnapshot();\n // Unsent text holds the Island open; Escape and the pill's own controls still collapse it.\n const draft = snapshot.notifications.some(item => item.handle === snapshot.island.current && item.draft);\n if (snapshot.island.open && !draft && event.target instanceof view.Node && !root.contains(event.target)) bridge.collapseIsland(lease);\n };\n // No mouseout reaches the host when the hovered card is removed or hidden under a still pointer\n // (React then never sees the leave): the next pointer over anything outside releases the pause.\n const hoverOutside = (event: Event) => {\n if (hovering && !(event.target instanceof view.Node && root.contains(event.target))) hover(false);\n };\n const listeners: [EventTarget, string, EventListener, boolean?][] = [\n [doc, 'visibilitychange', visibility],\n [doc, 'pointerdown', outside, true],\n [doc, 'pointerover', hoverOutside, true],\n [view, 'focus', () => pause('window-blur', false)],\n [view, 'blur', () => pause('window-blur', true)],\n [view, 'resize', relayout],\n ];\n if (media) listeners.push([media, 'change', preference]);\n if (wide) listeners.push([wide, 'change', placement]);\n if (scheme) listeners.push([scheme, 'change', followScheme]);\n if (view.visualViewport) listeners.push([view.visualViewport, 'resize', relayout], [view.visualViewport, 'scroll', measureViewport]);\n for (const [target, type, listener, capture] of listeners) target.addEventListener(type, listener, capture);\n cleanup = () => { for (const [target, type, listener, capture] of listeners) target.removeEventListener(type, listener, capture); };\n // Measure HTML only: the clip's layout box never depends on animated values.\n observer = view.ResizeObserver ? new view.ResizeObserver(() => { measure(); acknowledgePresentation(); }) : null;\n if (clipRef.current) observer?.observe(clipRef.current);\n observer?.observe(root);\n visibility();\n pause('window-blur', !doc.hasFocus());\n syncFocus(doc.activeElement);\n measureViewport();\n reportFormatterErrors();\n animate(emptyView, shellView(owner.props.snapshot), null);\n acknowledgePresentation();\n commitFocusRequest();\n }\n function getSnapshotBeforeUpdate(previous: HostProps): Pending | null {\n const before = shellView(previous.snapshot);\n const after = shellView(owner.props.snapshot);\n const plan = planShell(before, after);\n const pending = { plan, clones: takeSnapshots(plan), heading: plan.morph !== 'none' && measurable ? heading()?.getBoundingClientRect() ?? null : null,\n height: layout.height };\n const navigation = navigating;\n navigating = null;\n focusedBefore = null;\n // Navigation keeps browser focus semantics: never redirect focus after a followed link.\n if (navigation && previous.snapshot.notifications.some(item => item.handle === navigation)\n && !owner.props.snapshot.notifications.some(item => item.handle === navigation)) return pending;\n const root = rootRef.current;\n const active = doc.activeElement;\n if (!root || !view || !(active instanceof view.HTMLElement) || active === root || !root.contains(active)\n // `clearAll` turning false removes the clear button without a snapshot change.\n || (structure(previous.snapshot) === structure(owner.props.snapshot) && clearable(previous) === clearable(owner.props))) return pending;\n // The commit may remove or hide the focused branch: park focus on the stable anchor\n // (or outside after the last record) before React mutates the DOM.\n focusedBefore = active;\n const next = owner.props.snapshot;\n restoreAfterCommit = !next.notifications.length && !next.overflow.pending;\n if (!restoreAfterCommit || !restoreExternalFocus()) root.focus({ preventScroll: true });\n return pending;\n }\n function componentDidUpdate(previous: HostProps, _state: unknown, pending: Pending | null) {\n const before = focusedBefore;\n focusedBefore = null;\n if (restoreAfterCommit) {\n restoreAfterCommit = false;\n // React may restore pre-commit focus; leave the empty region again.\n restoreExternalFocus();\n } else if (before && !restoreFocus(before)) {\n // A removed or hidden control hands focus to the Island title, then the pill, then overflow.\n const target = primaryFocus() ?? rootRef.current?.querySelector<HTMLElement>('[data-cloudlet-overflow]') ?? null;\n if (!restoreFocus(target)) rootRef.current?.focus({ preventScroll: true });\n }\n // The button left (collapse, the stack shrank, the prop): the next one starts unarmed.\n if (armed && !clearable(owner.props)) disarm(false);\n motion?.setTimeScale(owner.props.options.motion?.timeScale);\n syncConstants();\n // A swipe never continues on another record or state (arrival, programmatic dismiss, Escape).\n const next = shellView(owner.props.snapshot);\n if (gestureTarget && (gestureTarget.handle !== next.presented?.handle || gestureTarget.open !== next.open)) swipe?.cancel();\n if (peek && (!next.open || !next.stack.includes(peek.handle))) { swipe?.cancel(); setPeek(null); }\n if (previous.snapshot !== owner.props.snapshot) animate(shellView(previous.snapshot), next, pending);\n else measure();\n reportFormatterErrors();\n acknowledgePresentation();\n commitFocusRequest();\n // Focus moved by this lifecycle during commit emits no React focus events: reconcile the pause.\n syncFocus(doc.activeElement);\n }\n function componentWillUnmount() {\n swipe?.dispose(); swipe = null;\n peek = null; fling = null;\n disarm(false);\n announcer.dispose();\n mounted = false;\n cleanup?.(); cleanup = null;\n observer?.disconnect(); observer = null;\n motion?.dispose(); motion = null;\n revealing.clear();\n const sheet = styleRef.current?.sheet;\n if (sheet) while (sheet.cssRules.length) sheet.deleteRule(0);\n rules = {};\n for (const container of [exitRef.current, slideOutRef.current, chromeOutRef.current]) clear(container);\n progressFill = null;\n const active = doc.activeElement;\n if (rootRef.current?.contains(active) && !restoreExternalFocus()) {\n // There is no surviving internal anchor when the entire host is removed.\n (active as HTMLElement | null)?.blur();\n }\n }\n function disarm(update = true) {\n view?.clearTimeout(disarmTimer);\n disarmTimer = undefined;\n if (!armed) return;\n armed = false;\n if (update && mounted) owner.forceUpdate();\n }\n function pressClear() {\n if (armed) {\n disarm();\n bridge.clearAll(lease);\n return;\n }\n armed = true;\n disarmTimer = view?.setTimeout(disarm, CLEAR_CONFIRM);\n owner.forceUpdate();\n }\n const clearable = (props: HostProps) => props.options.clearAll !== false && shellView(props.snapshot).open && props.snapshot.stack.length > 1;\n const navigate = (handle: NotificationHandle) => {\n navigating = handle;\n if (bridge.dismiss(lease, handle, 'navigation').status !== 'applied') navigating = null;\n };\n function onIslandKey(event: ReactKeyboardEvent, stack: readonly NotificationHandle[], index: number, rtl: boolean) {\n if (event.defaultPrevented) return;\n let next: number | null = null;\n // An IME composition owns Escape and the arrows until it ends.\n if (event.nativeEvent.isComposing) return;\n if (event.key === 'Escape') {\n event.preventDefault();\n bridge.collapseIsland(lease);\n return;\n }\n // The arrows, Home and End move the caret inside a form field.\n if ((event.target as Element).closest('input, textarea')) return;\n // A focused scrolling body keeps Home/End for its own scroll.\n if ((event.key === 'Home' || event.key === 'End') && event.target === bodyElement() && bodyElement()?.tabIndex === 0) return;\n if (event.key === 'Home') next = 0;\n else if (event.key === 'End') next = stack.length - 1;\n else if (event.key === 'ArrowRight') next = index + (rtl ? -1 : 1);\n else if (event.key === 'ArrowLeft') next = index + (rtl ? 1 : -1);\n const handle = next === null ? undefined : stack[next];\n if (!handle) return;\n event.preventDefault();\n bridge.navigate(lease, handle);\n }\n function render() {\n const { snapshot, options } = owner.props;\n const labels = { ...defaultLabels, ...options.labels };\n const instance = snapshot.controller ?? 'cloudlet';\n const dir = options.dir ?? (doc.documentElement.dir === 'rtl' ? 'rtl' : 'ltr');\n const theme = options.theme ?? 'system';\n rtl = dir === 'rtl';\n const islandId = `${instance}-island`;\n const current = shellView(snapshot);\n const { presented, open, total, index, missed } = current;\n if (current.badge) badgeCount = current.count;\n const preview = open && peek ? snapshot.notifications.find(item => item.handle === peek!.handle) : undefined;\n const position = options.position ?? 'auto';\n const bottom = position === 'bottom-center' || (position === 'auto' && view?.matchMedia?.('(min-width: 48rem)').matches === false);\n const tails = Math.min(2, Math.max(current.depth, heldTails));\n const slot = presented ? slotRenderer(bridge, lease, presented.handle, rejectSlotFocus) : null;\n const page = format(labels.page, defaultLabels.page, index + 1, total);\n const confirm = format(labels.clearAllConfirm, defaultLabels.clearAllConfirm, total);\n const part = partClasses(options.classNames);\n return <>\n {options.offsets && <OffsetStyles key={options.nonce ?? ''} instance={instance} offsets={options.offsets} nonce={options.nonce} />}\n <div ref={rootRef} className={part('host', 'cloudlet-host')} role=\"region\" aria-label={labels.region} tabIndex={-1}\n data-cloudlet-focus-anchor=\"\" data-cloudlet-instance={instance} data-theme={theme}\n data-resolved-theme={theme === 'system' ? view?.matchMedia?.('(prefers-color-scheme: dark)').matches ? 'dark' : 'light' : theme}\n data-position={position} data-edge={bottom ? 'bottom' : 'top'} data-state={open ? 'island' : 'stack'}\n data-island-reason={snapshot.island.reason ?? undefined} data-overflow={snapshot.overflow.pending} dir={dir}\n onPointerDownCapture={event => { activation = (event.target as Element).closest('button'); }}\n onPointerCancelCapture={() => { activation = null; }}\n onKeyDownCapture={event => {\n if ((event.key === 'Enter' || event.key === ' ') && (event.target as Element).closest('button')) {\n repeating = event.repeat;\n if (event.repeat) event.preventDefault();\n else activation = (event.target as Element).closest('button');\n }\n }}\n onKeyUpCapture={() => { repeating = false; }}\n onClickCapture={event => {\n const target = (event.target as Element).closest('button');\n // A double click must not fire a one-shot action twice; close, the pill and the dots are\n // repeatable on purpose (each click dismisses or shows another record).\n // The clear button counts too: a double click must not arm and confirm it at once.\n const oneShot = !!target?.matches('[data-cloudlet-control=\"action\"], [data-cloudlet-control=\"retry\"], [data-cloudlet-control=\"cancel\"], [data-cloudlet-control=\"clear\"]');\n if (target && (repeating || (oneShot && event.detail > 1) || (activation && activation !== target))) { event.preventDefault(); event.stopPropagation(); }\n activation = null;\n }}\n onFocus={event => {\n rememberExternal(event.relatedTarget);\n // A rich slot capture handler can already have redirected this focus.\n syncFocus(doc.activeElement);\n }}\n onBlur={event => syncFocus(view && event.relatedTarget instanceof view.Element ? event.relatedTarget : null)}\n onMouseEnter={() => hover(true)}\n onMouseLeave={() => hover(false)}>\n <style ref={styleRef} nonce={options.nonce} data-cloudlet-motion=\"\" />\n <div ref={stackRef} className={part('stack', 'cloudlet-stack')} data-empty={!presented}>\n {[1, 2].filter(tail => tail <= tails).map(tail => <div key={tail} className={part('tail', 'cloudlet-tail')} data-cloudlet-tail={tail} aria-hidden=\"true\" />)}\n <div ref={shellRef} id={islandId} className={part('island', 'cloudlet-shell')} hidden={!presented} data-state={open ? 'island' : 'stack'}\n data-kind={presented?.kind}\n {...(open ? { role: 'region', 'aria-roledescription': labels.carousel, 'aria-label': labels.island, 'aria-describedby': `${islandId}-hint` } : {})}\n onKeyDown={open ? event => onIslandKey(event, snapshot.stack, index, dir === 'rtl') : undefined}>\n <svg ref={bgRef} className=\"cloudlet-bg\" aria-hidden=\"true\" focusable=\"false\"><path ref={pathRef} /></svg>\n <div ref={clipRef} className=\"cloudlet-clip\">\n <div ref={slideOutRef} className=\"cloudlet-slide-out\" aria-hidden=\"true\" />\n {presented && slot && <div className=\"cloudlet-slide\" data-cloudlet-presented={presented.handle.generation}\n data-kind={presented.kind} data-current=\"true\"\n {...(open ? { role: 'group', 'aria-roledescription': labels.slide, 'aria-label': page } : {})}>\n <div className={part('header', 'cloudlet-header')} aria-hidden={open ? undefined : 'true'}>\n <Heading notification={presented} slot={slot} part={part} titleId={`${islandId}-title`} />\n <div className=\"cloudlet-heading-out\" aria-hidden=\"true\" />\n </div>\n {open && <Body notification={presented} form={snapshot.forms.find(form => form.handle === presented.handle)} bridge={bridge}\n lease={lease} labels={labels} navigate={navigate} slot={slot} part={part} titleId={`${islandId}-title`} />}\n <div className=\"cloudlet-body-out\" aria-hidden=\"true\" />\n </div>}\n {preview && <div ref={inertRef} className=\"cloudlet-peek\" aria-hidden=\"true\"><SlidePreview notification={preview} labels={labels} part={part} /></div>}\n {presented && open && closeButton(labels, part, () => bridge.dismiss(lease, presented.handle, 'close-button'))}\n {open && (total > 1 || missed > 0) && <div className={part('indicator', 'cloudlet-indicator')}>{total > 5\n ? <p className=\"cloudlet-page\" aria-hidden=\"true\"><span className=\"cloudlet-page-value\">{page}</span><span className=\"cloudlet-page-out\" /></p>\n : total > 1 && <div className=\"cloudlet-dots\">{snapshot.stack.map((handle, position) =>\n <button key={handle.generation} type=\"button\" className=\"cloudlet-dot-button\" aria-current={position === index ? 'true' : undefined}\n aria-label={format(labels.page, defaultLabels.page, position + 1, total)} onClick={() => bridge.navigate(lease, handle)}>\n <span className=\"cloudlet-dot\" aria-hidden=\"true\" />\n </button>)}</div>}\n {clearable(owner.props) && <>\n {/* Both labels share one cell, so the button keeps its width when it arms. */}\n <button type=\"button\" className={part('clear', 'cloudlet-clear')} data-cloudlet-control=\"clear\" data-armed={armed}\n onClick={pressClear} onBlur={() => disarm()}>\n <span aria-hidden={armed || undefined}>{labels.clearAll}</span><span aria-hidden={!armed || undefined}>{confirm}</span>\n </button>\n <span role=\"status\" className=\"cloudlet-live\">{armed ? confirm : ''}</span>\n </>}\n {missed > 0 && <div className={part('overflow', 'cloudlet-overflow')}>\n <p>{format(labels.overflowCount, defaultLabels.overflowCount, missed)}</p>\n <button type=\"button\" data-cloudlet-overflow=\"\" onClick={() => bridge.acknowledgeOverflow(lease)}>{labels.acknowledgeOverflow}</button>\n </div>}</div>}\n {open && <span id={`${islandId}-hint`} className=\"cloudlet-live\">{labels.collapse}</span>}\n <div ref={chromeOutRef} className=\"cloudlet-chrome-out\" aria-hidden=\"true\" />\n </div>\n {presented && !open && <button type=\"button\" className={part('pill', 'cloudlet-pill')} data-cloudlet-pill=\"\"\n aria-expanded=\"false\" aria-controls={islandId} onClick={() => bridge.openIsland(lease, 'user')}\n aria-label={[format(labels.stackSummary, defaultLabels.stackSummary, presented.content.title, total, missed),\n ...(presented.draft ? [labels.draft] : [])].join(', ')} />}\n <span className={part('badge', 'cloudlet-badge')} aria-hidden=\"true\"><span className=\"cloudlet-badge-value\">{badgeCount}</span><span className=\"cloudlet-badge-out\" /></span>\n </div>\n <div ref={exitRef} className=\"cloudlet-exit\" aria-hidden=\"true\" />\n </div>\n </div>\n </>;\n }\n return { componentDidMount, getSnapshotBeforeUpdate, componentDidUpdate, componentWillUnmount, render };\n}\n\n/** Changes that can remove or hide a focused control. */\nfunction structure(snapshot: RendererSnapshot<ReactNode>): string {\n const presented = snapshot.notifications.find(item => item.location === 'current');\n return [snapshot.island.open, snapshot.overflow.pending, snapshot.stack.map(handle => handle.generation).join(','),\n presented?.handle.generation, presented?.content.action?.kind, presented?.action.status, presented?.operation?.status,\n presented?.operation?.canRetry, presented?.operation?.canCancel].join('|');\n}\n\n/** Only these generated blocks use nonce. No style attribute or cssText is used. */\nfunction OffsetStyles({ instance, offsets, nonce }: { instance: string; offsets: ToasterOffsets; nonce: string | undefined }) {\n const ref = useRef<HTMLStyleElement>(null);\n useLayoutEffect(() => {\n const sheet = ref.current?.sheet;\n if (!sheet) return;\n const index = sheet.insertRule(`[data-cloudlet-instance=\"${instance}\"] {}`);\n const rule = sheet.cssRules[index] as CSSStyleRule;\n for (const group of ['gutter', 'obstruction'] as const) {\n for (const edge of ['top', 'right', 'bottom', 'left'] as const) {\n const value = offsets[group]?.[edge];\n if (typeof value === 'number' && Number.isFinite(value) && value >= 0) rule.style.setProperty(`--cloudlet-${group}-${edge}`, `${value}px`);\n }\n }\n return () => { sheet.deleteRule(index); };\n }, [instance, offsets]);\n return <style ref={ref} nonce={nonce} data-cloudlet-offsets={instance} />;\n}\n"],"mappings":";;;;;;;;;;AA4BA,SAASC,EAA8B,GAAe;CACpD,IAAMC,IAAQC,EAAQ,UAAU,EAAI;CACpC,KAAK,IAAMC,KAAQ,CAACF,GAAO,GAAGA,EAAM,iBAAiB,GAAG,CAAC,GACvD,KAAK,IAAM,EAAE,aAAU,CAAC,GAAGE,EAAK,UAAU,GACxC,CAAIC,MAAS,QAAQA,MAAS,UAAUA,MAAS,cAAcA,MAAS,UAAUA,EAAK,WAAW,OAAO,KACpGA,EAAK,WAAW,gBAAgB,MAAGD,EAAK,gBAAgBC,CAAI;CAGrE,KAAK,IAAMC,KAAUJ,EAAM,iBAAiBK,CAAkB,GAAG,EAAO,gBAAgB;CACxF,KAAK,IAAMC,KAAWN,EAAM,iB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AAS;CACjF,OAAO;EAACF,EAAS,OAAO;EAAMA,EAAS,SAAS;EAASA,EAAS,MAAM,KAAI,MAAUlC,EAAO,UAAU,CAAC,CAAC,KAAK,GAAG;EAC/G5D,GAAW,OAAO;EAAYA,GAAW,QAAQ,QAAQ;EAAMA,GAAW,OAAO;EAAQA,GAAW,WAAW;EAC/GA,GAAW,WAAW;EAAUA,GAAW,WAAW;CAAS,CAAC,CAAC,KAAK,GAAG;AAC7E;AAGA,SAASqI,GAAa,EAAE,aAAU,YAAS,YAAmF;CAC5H,IAAMS,IAAMC,EAAyB,IAAI;CAczC,OAbAC,QAAsB;EACpB,IAAMjE,IAAQ+D,EAAI,SAAS;EAC3B,IAAI,CAAC/D,GAAO;EACZ,IAAMtF,IAAQsF,EAAM,WAAW,4BAA4BC,EAAS,MAAM,GACpEtF,IAAOqF,EAAM,SAAStF;EAC5B,KAAK,IAAMsB,KAAS,CAAC,UAAU,aAAa,GAC1C,KAAK,IAAMrC,KAAQ;GAAC;GAAO;GAAS;GAAU;EAAM,GAAY;GAC9D,IAAM1F,IAAQiQ,EAAQlI,EAAM,GAAGrC;GAC/B,AAAI,OAAO1F,KAAU,YAAY,OAAO,SAASA,CAAK,KAAKA,KAAS,KAAG0G,EAAK,MAAM,YAAY,cAAcqB,EAAM,GAAGrC,KAAQ,GAAG1F,EAAM,GAAG;EAC3I;EAEF,aAAa;GAAE,EAAM,WAAWyG,CAAK;EAAG;CAC1C,GAAG,CAACuF,GAAUiE,CAAO,CAAC,GACf,kBAAC,SAAD;EAAY;EAAY;EAAO,yBAAuBjE;CAAW,CAAA;AAC1E"}
1
+ {"version":3,"file":"host.js","names":["_Fragment","inertClone","clone","element","node","name","nested","snapshotContainers","removed","Host","Component","createHostRuntime","#runtime","rulePaths","CLEAR_CONFIRM","clamp01","value","inertRef","px","blur","reduced","amount","token","style","fallback","doc","owner","view","rootRef","createRef","styleRef","stackRef","shellRef","clipRef","bgRef","pathRef","exitRef","slideOutRef","chromeOutRef","announcer","createAnnouncer","bridge","lease","previousFocus","navigating","focusedBefore","restoreAfterCommit","cleanup","rules","mounted","activation","repeating","motion","overrides","constants","resolveMotion","syncConstants","next","hovering","observer","layout","slideTop","lastBodyUpdate","tokens","measurable","shapeMode","revealing","heldTails","badgeCount","progressFill","progressHandle","progressActive","unreadable","swipe","rtl","peek","gestureTarget","fling","armed","disarmTimer","failedFormatters","formatterErrors","format","args","text","formatter","error","reportFormatterErrors","pause","hover","active","rejectSlotFocus","rememberExternal","previous","restoreFocus","ancestor","restoreExternalFocus","original","restored","syncFocus","inside","measureViewport","width","height","rect","visibleViewport","edge","bottomEdge","edgeSign","anchor","align","write","r","still","frame","radius","bottom","top","along","hang","left","svg","createRoundedRectPath","scale","x","inward","index","rule","slot","shift","measure","stack","clip","presented","shellView","bounds","syncReadable","host","open","corner","bodyElement","syncScrollStop","body","title","heading","acknowledgePresentation","presentation","reveal","group","relayout","primaryFocus","root","commitFocusRequest","request","target","focused","clear","takeSnapshots","shell","clones","plan","leaving","chrome","head","now","rapid","badge","page","place","container","layer","animate","pending","planShell","containers","done","tailsDone","exitDone","from","to","flung","offset","finished","syncProgress","progress","fill","determinate","appeared","setPeek","dismissSession","decision","decideRelease","velocity","handle","neighbour","side","navigateSession","follow","rubberBand","settle","shown","collapseSession","toward","resist","MOTION","reach","beginSwipe","y","input","released","axis","claimsWheel","componentDidMount","sheet","instance","path","createSwipe","media","createShellMotion","callback","id","preference","wide","scheme","followScheme","placement","visibility","listeners","snapshot","draft","item","event","type","listener","capture","emptyView","getSnapshotBeforeUpdate","before","after","navigation","structure","clearable","componentDidUpdate","disarm","componentWillUnmount","update","pressClear","props","navigate","onIslandKey","render","labels","defaultLabels","options","dir","theme","islandId","current","preview","position","named","tails","slotRenderer","total","confirm","part","partClasses","Fragment","OffsetStyles","oneShot","tail","Heading","Body","form","SlidePreview","closeButton","missed","ref","useRef","useLayoutEffect","offsets"],"sources":["../../src/react/host.tsx"],"sourcesContent":["import { Component, createRef, useLayoutEffect, useRef } from 'react';\nimport type { KeyboardEvent as ReactKeyboardEvent, ReactNode } from 'react';\nimport type { HostLease, RendererBridge, RendererSnapshot } from '../contracts/internal.js';\nimport type { NotificationHandle } from '../contracts/identity.js';\nimport type { NotificationSnapshot } from '../contracts/snapshots.js';\nimport type { ToasterOffsets, ToasterProps } from '../react.js';\nimport { Body, closeButton, defaultLabels, Heading, partClasses, SlidePreview, slotRenderer } from './card.js';\nimport { createAnnouncer } from './announcer.js';\nimport { createSwipe, decideRelease, rubberBand } from './gestures.js';\nimport type { SwipeCandidate, SwipeSession } from './gestures.js';\nimport { createShellMotion, MOTION, resolveMotion } from './motion.js';\nimport type { Fling, ShapeMode, ShellFrame, ShellMotion, SwapLayer } from './motion.js';\nimport { createRoundedRectPath } from './shape.js';\nimport { emptyView, planShell, shellView } from './plan.js';\nimport type { ShellPlan, ShellView } from './plan.js';\nimport { visibleViewport } from './viewport.js';\n\ninterface HostProps {\n readonly bridge: RendererBridge<ReactNode>;\n readonly lease: HostLease;\n readonly snapshot: RendererSnapshot<ReactNode>;\n readonly options: ToasterProps;\n readonly document: Document;\n}\n\ntype Presented = NotificationSnapshot<ReactNode>;\n\n/** Snapshots are frozen inert DOM pictures: no ids, roles, aria, links or nested snapshots. */\nfunction inertClone<T extends Element>(element: T): T {\n const clone = element.cloneNode(true) as T;\n for (const node of [clone, ...clone.querySelectorAll('*')]) {\n for (const { name } of [...node.attributes]) {\n if (name === 'id' || name === 'role' || name === 'tabindex' || name === 'href' || name.startsWith('aria-')\n || name.startsWith('data-cloudlet-')) node.removeAttribute(name);\n }\n }\n for (const nested of clone.querySelectorAll(snapshotContainers)) nested.replaceChildren();\n for (const removed of clone.querySelectorAll('.cloudlet-live,.cloudlet-pill')) removed.remove();\n return clone;\n}\nconst snapshotContainers = '.cloudlet-exit,.cloudlet-slide-out,.cloudlet-chrome-out,.cloudlet-heading-out,.cloudlet-body-out,.cloudlet-badge-out,.cloudlet-page-out';\ntype Layer = 'exit' | 'slide' | 'chrome' | SwapLayer;\n\ninterface Pending {\n readonly plan: ShellPlan;\n readonly clones: Partial<Record<Layer, Element>>;\n /** Visual position of the shared heading before a morph, for FLIP. */\n readonly heading: DOMRect | null;\n /** Layout height before the commit: bottom-edge snapshots keep their distance to the bottom. */\n readonly height: number;\n}\n\n/**\n * Owns all DOM focus, motion and environmental resources for one attachment.\n * One persistent shell renders both the collapsed pill and the Island: an SVG\n * rounded-rect path, the same path as HTML clip-path, and measured HTML inside.\n */\nexport class Host extends Component<HostProps> {\n readonly #runtime = createHostRuntime(this);\n override componentDidMount = this.#runtime.componentDidMount;\n override getSnapshotBeforeUpdate = this.#runtime.getSnapshotBeforeUpdate;\n override componentDidUpdate = this.#runtime.componentDidUpdate;\n override componentWillUnmount = this.#runtime.componentWillUnmount;\n override render = this.#runtime.render;\n}\n\nconst rulePaths = {\n viewport: '',\n shell: ' .cloudlet-stack > .cloudlet-shell',\n bg: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-bg',\n clip: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip',\n badge: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-badge',\n badgeIn: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-badge > .cloudlet-badge-value',\n badgeOut: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-badge > .cloudlet-badge-out',\n slideOut: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-slide-out',\n peek: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-peek',\n chrome: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > :is(.cloudlet-close,.cloudlet-indicator)',\n chromeOut: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-chrome-out',\n headerIn: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-slide > .cloudlet-header > .cloudlet-heading',\n headerOut: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-slide > .cloudlet-header > .cloudlet-heading-out',\n body: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-slide > .cloudlet-body',\n bodyOut: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-slide > .cloudlet-body-out',\n pageIn: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-indicator > .cloudlet-page > .cloudlet-page-value',\n pageOut: ' .cloudlet-stack > .cloudlet-shell > .cloudlet-clip > .cloudlet-indicator > .cloudlet-page > .cloudlet-page-out',\n tail1: ' .cloudlet-stack > [data-cloudlet-tail=\"1\"]',\n tail2: ' .cloudlet-stack > [data-cloudlet-tail=\"2\"]',\n exit: ' .cloudlet-stack > .cloudlet-exit',\n exitClip: ' .cloudlet-stack > .cloudlet-exit > .cloudlet-shell > .cloudlet-clip',\n exitBg: ' .cloudlet-stack > .cloudlet-exit > .cloudlet-shell > .cloudlet-bg',\n exitBadge: ' .cloudlet-stack > .cloudlet-exit > .cloudlet-shell > .cloudlet-badge',\n} as const;\ntype Rule = keyof typeof rulePaths;\n\n/** Milliseconds the clear button waits for its second press. */\nconst CLEAR_CONFIRM = 3000;\nconst clamp01 = (value: number) => Math.max(0, Math.min(1, value));\n/** Native `inert` without relying on React 19's boolean prop (React 18.2 is supported). */\nconst inertRef = (node: HTMLElement | null) => node?.setAttribute('inert', '');\nconst px = (value: number) => `${Math.round(value * 100) / 100}px`;\nconst blur = (amount: number, reduced: boolean) => reduced || amount <= 0.01 ? 'none' : `blur(${px(amount)})`;\nfunction token(style: CSSStyleDeclaration | undefined, name: string, fallback: number) {\n const value = parseFloat(style?.getPropertyValue(name) ?? '');\n return Number.isFinite(value) ? value : fallback;\n}\n\n// Keep React's pre-mutation lifecycle for focus and snapshots. Attachment state is\n// closure-private, so ordinary lexical minification needs no property mangling.\nfunction createHostRuntime(owner: Host) {\n // Toaster keys Host by lease; these capabilities stay fixed for its lifetime.\n const { bridge, lease, document: doc } = owner.props;\n const view = doc.defaultView;\n const rootRef = createRef<HTMLDivElement>();\n const styleRef = createRef<HTMLStyleElement>();\n const stackRef = createRef<HTMLDivElement>();\n const shellRef = createRef<HTMLDivElement>();\n const clipRef = createRef<HTMLDivElement>();\n const bgRef = createRef<SVGSVGElement>();\n const pathRef = createRef<SVGPathElement>();\n const exitRef = createRef<HTMLDivElement>();\n const slideOutRef = createRef<HTMLDivElement>();\n const chromeOutRef = createRef<HTMLDivElement>();\n const announcer = createAnnouncer(bridge, lease, doc, () => owner.props.options.announcements);\n let previousFocus: HTMLElement | null = null;\n let navigating: NotificationHandle | null = null;\n let focusedBefore: HTMLElement | null = null;\n let restoreAfterCommit = false;\n let cleanup: (() => void) | null = null;\n let rules: Partial<Record<Rule, CSSStyleDeclaration>> = {};\n let mounted = false;\n let activation: Element | null = null;\n let repeating = false;\n let motion: ShellMotion | null = null;\n // `ToasterMotion.overrides` (debugging): resolved only when the object changes.\n let overrides = owner.props.options.motion?.overrides;\n let constants = resolveMotion(overrides);\n const syncConstants = () => {\n const next = owner.props.options.motion?.overrides;\n if (next === overrides) return;\n overrides = next;\n constants = resolveMotion(next);\n motion?.setConstants(constants);\n };\n let reduced = false;\n let hovering = false;\n let observer: ResizeObserver | null = null;\n /** Live layout box of the shell (the target shape); the SVG and clip follow it. */\n let layout = { width: 0, height: 0, bodyTop: 0 };\n /** Top of the body that left in the running slide (the outgoing snapshot sits there). */\n let slideTop = 0;\n /** When the body last changed: a stream of updates crossfades once (`bodyQuiet`), then changes in place. */\n let lastBodyUpdate = -Infinity;\n let tokens = { tailOffset: 4, tailScale: 0.9, pillHeight: 44 };\n let measurable = false;\n let shapeMode: ShapeMode = 'instant';\n /** Motion groups that still hide the presented content; presentation waits for none. */\n const revealing = new Set<string>();\n /** Tails kept mounted while they retract or fade out. */\n let heldTails = 0;\n let badgeCount = 2;\n let progressFill: SVGCircleElement | null = null;\n let progressHandle: NotificationHandle | null = null;\n let progressActive = false;\n let unreadable: NotificationHandle | null = null;\n let swipe: ReturnType<typeof createSwipe> | null = null;\n /** Document direction of the last render: physical swipe/slide sides mirror in RTL. */\n let rtl = false;\n /** Inert neighbour shown only while a finger drags the Island content; side +1 is physically right. */\n let peek: { readonly handle: NotificationHandle; readonly side: 1 | -1 } | null = null;\n /** The record a running swipe (or its intent window) belongs to; a change of target cancels it. */\n let gestureTarget: { readonly handle: NotificationHandle; readonly open: boolean } | null = null;\n /** A committed swipe dismiss: its exit snapshot keeps flying from the release point. */\n let fling: (Fling & { readonly handle: NotificationHandle }) | null = null;\n /** The clear button's first press arms it; a second press within `CLEAR_CONFIRM` clears the stack. */\n let armed = false;\n let disarmTimer: number | undefined;\n // Formatter failures found during render are reported after commit, once per function.\n const failedFormatters = new WeakSet<object>();\n const formatterErrors: unknown[] = [];\n function format<Args extends readonly unknown[]>(formatter: (...args: Args) => string, fallback: (...args: Args) => string, ...args: Args): string {\n try {\n const text = formatter(...args);\n if (typeof text !== 'string') throw new TypeError('Label formatter must return a string');\n return text;\n } catch (error) {\n if (!failedFormatters.has(formatter)) { failedFormatters.add(formatter); formatterErrors.push(error); }\n return fallback(...args);\n }\n }\n function reportFormatterErrors() {\n for (const error of formatterErrors.splice(0)) bridge.reportDiagnostic(lease, { code: 'formatter-error',\n source: 'Toaster.labels', message: 'A label formatter failed', error });\n }\n const pause = (reason: 'focus' | 'hover' | 'document-hidden' | 'window-blur', active: boolean) =>\n bridge.setPause(lease, { scope: 'host', reason, active });\n const hover = (active: boolean) => {\n if (hovering === active) return;\n hovering = active;\n pause('hover', active);\n motion?.setHover(active);\n };\n const rejectSlotFocus = (previous: EventTarget | null) => {\n rememberExternal(previous);\n if (view && previous instanceof view.HTMLElement && !previous.closest('.cloudlet-slot') && restoreFocus(previous)) return;\n if (!restoreFocus(previousFocus)) {\n const active = doc.activeElement;\n if (view && active instanceof view.HTMLElement) active.blur();\n rootRef.current?.focus({ preventScroll: true });\n }\n };\n\n function rememberExternal(element: EventTarget | null) {\n if (view && element instanceof view.HTMLElement && element !== doc.body\n && !rootRef.current?.contains(element)) previousFocus = element;\n }\n function restoreFocus(element: HTMLElement | null): boolean {\n if (!element?.isConnected || element.closest('[hidden],[inert],[aria-hidden=\"true\"]')\n || element.matches(':disabled')) return false;\n for (let ancestor: HTMLElement | null = element; ancestor; ancestor = ancestor.parentElement) {\n const style = view?.getComputedStyle(ancestor);\n if (style?.display === 'none' || style?.visibility === 'hidden' || style?.visibility === 'collapse'\n || style?.contentVisibility === 'hidden') return false;\n }\n element.focus({ preventScroll: true });\n return doc.activeElement === element;\n }\n function restoreExternalFocus(): boolean {\n if (restoreFocus(previousFocus)) return true;\n for (const element of doc.querySelectorAll<HTMLElement>('button,a[href],input,select,textarea,summary,[tabindex]')) {\n if (element.tabIndex >= 0 && !element.closest('.cloudlet-host') && restoreFocus(element)) return true;\n }\n // The application may have removed every external control. Leave the empty\n // notification region without adding a permanent stop to the document order.\n const original = doc.body.getAttribute('tabindex');\n doc.body.setAttribute('tabindex', '-1');\n const restored = restoreFocus(doc.body);\n if (original === null) doc.body.removeAttribute('tabindex'); else doc.body.setAttribute('tabindex', original);\n return restored;\n }\n const syncFocus = (element: Element | null) => {\n const inside = !!element && !!rootRef.current?.contains(element);\n pause('focus', inside);\n bridge.setFocused(lease, inside ? bridge.getSnapshot().presentation?.handle ?? null : null);\n };\n function measureViewport() {\n if (!mounted || !view) return;\n const width = doc.documentElement.clientWidth || view.innerWidth;\n const height = doc.documentElement.clientHeight || view.innerHeight;\n const rect = visibleViewport(width, height, view.visualViewport);\n for (const edge of ['top', 'right', 'bottom', 'left', 'width', 'height'] as const) {\n rules.viewport?.setProperty(`--cloudlet-viewport-${edge}`, `${rect[edge]}px`);\n }\n }\n const bottomEdge = () => rootRef.current?.dataset.edge === 'bottom';\n const edgeSign = (): -1 | 1 => bottomEdge() ? 1 : -1;\n /** Where the layers hang in the stack's layout box: 0 at its left, ½ in the centre, 1 at its right (CSS `--cloudlet-anchor`). */\n const anchor = () => { const align = rootRef.current?.dataset.align; return align === 'left' ? 0 : align === 'right' ? 1 : 0.5; };\n\n /** The only DOM writer of animated values: scoped CSSOM rules and SVG attributes. */\n function write(frame: ShellFrame) {\n const r = rules;\n const { reduced: still } = frame;\n const width = Math.max(0, frame.width);\n const height = Math.max(0, frame.height);\n const radius = Math.min(Math.max(0, frame.radius), width / 2, height / 2);\n // At the bottom edge the silhouette grows upwards: it is anchored to the layout bottom.\n const bottom = bottomEdge();\n const top = bottom ? layout.height - height : 0;\n // A side position keeps the silhouette against its edge of the layout box: the morph grows away from it.\n const along = anchor();\n const hang = `translateX(${-along * 100}%)`;\n const left = (layout.width - width) * along;\n if (r.shell) {\n r.shell.opacity = String(clamp01(frame.opacity));\n r.shell.transform = still ? 'none' : `translate(${px(frame.dragX)}, ${px(frame.y + frame.dragY)}) scale(${frame.scale})`;\n }\n const svg = bgRef.current;\n if (svg) {\n svg.setAttribute('width', String(width));\n svg.setAttribute('height', String(height));\n pathRef.current?.setAttribute('d', createRoundedRectPath(width, height, radius));\n }\n // The shadow token is a box-shadow: the SVG box follows the path's corners.\n if (r.bg) {\n r.bg.borderRadius = px(radius);\n // Layout keeps the box at the top and a transform carries it to the bottom edge: a growing\n // silhouette then moves no layout start point, so the morph is not counted as layout shift (CLS).\n r.bg.top = '0px'; r.bg.bottom = 'auto';\n r.bg.transform = `${hang} translateY(${px(top)})`;\n }\n if (r.clip) r.clip.clipPath = `path(\"${createRoundedRectPath(width, height, radius, left, top)}\")`;\n if (r.badge) {\n const scale = still ? 1 : constants.badge.scale + (1 - constants.badge.scale) * frame.badge;\n // Outer corner: top right, mirrored in RTL; the bottom corner at the bottom edge. The badge hangs from the layout centre.\n const x = (rtl ? left + 10 : left + width - 10) - layout.width / 2;\n r.badge.opacity = String(clamp01(frame.badge));\n r.badge.transform = `translate(calc(${px(x)} - 50%), ${bottom ? '6px' : '-6px'}) scale(${scale})`;\n }\n // Tails peek out one step towards the centre of the screen.\n const inward = bottom ? -1 : 1;\n for (const index of [1, 2] as const) {\n const rule = r[`tail${index}`];\n if (!rule) continue;\n const slot = frame[`tail${index}`];\n rule.width = px(width);\n rule.height = px(Math.min(height, tokens.pillHeight));\n rule.opacity = String(clamp01(frame[`tail${index}Opacity`]));\n rule.transform = `${hang} translateY(${px(inward * slot * (tokens.tailOffset + constants.hoverLift * frame.lift))}) scale(${Math.pow(tokens.tailScale, slot)})`;\n }\n if (r.slideOut) {\n r.slideOut.transform = still ? 'none' : `translateX(${px(frame.slide - frame.slideDirection * frame.slideWidth)})`;\n r.slideOut.opacity = String(clamp01(frame.slideOut));\n }\n if (r.peek) {\n r.peek.width = px(layout.width);\n r.peek.top = px(layout.bodyTop);\n r.peek.transform = `translateX(${px(frame.slide + (peek?.side ?? 0) * layout.width)})`;\n }\n const shift = still ? 'none' : `translate(${px(frame.headX)}, ${px(frame.headY)})`;\n if (r.headerIn) r.headerIn.transform = shift;\n if (r.headerOut) r.headerOut.transform = shift;\n for (const [rule, value] of [[r.headerIn, frame.headerIn], [r.headerOut, frame.headerOut],\n [r.badgeIn, frame.badgeIn], [r.badgeOut, frame.badgeOut], [r.pageIn, frame.pageIn], [r.pageOut, frame.pageOut]] as const) {\n if (!rule) continue;\n rule.opacity = String(clamp01(value));\n rule.filter = blur((1 - clamp01(value)) * constants.blur, still);\n }\n if (r.chrome) {\n r.chrome.opacity = String(clamp01(frame.chrome));\n r.chrome.transform = still ? 'none' : `translateY(${px((1 - clamp01(frame.chrome)) * constants.chromeOffset)})`;\n }\n if (r.chromeOut) r.chromeOut.opacity = String(clamp01(frame.chromeOut));\n if (r.body) {\n // The body carries the slide between notifications; the header above it blur-swaps instead.\n r.body.opacity = String(clamp01(frame.chrome) * clamp01(frame.bodyIn) * clamp01(frame.slideIn));\n r.body.transform = still ? 'none'\n : `translateX(${px(frame.slide)}) translateY(${px((1 - clamp01(frame.chrome)) * constants.chromeOffset + (1 - clamp01(frame.bodyIn)) * constants.bodyOffset)})`;\n }\n if (r.bodyOut) r.bodyOut.opacity = String(clamp01(frame.bodyOut));\n if (r.exit) {\n r.exit.opacity = String(clamp01(frame.exitOpacity));\n r.exit.transform = still ? hang : `${hang} translate(${px(frame.exitX)}, ${px(frame.exitY)}) scale(${frame.exitScale})`;\n }\n if (progressActive && progressFill?.isConnected) progressFill.setAttribute('stroke-dasharray', `${Math.round(frame.progress * 10000) / 100} 100`);\n }\n\n /** Layout size of the stack equals the shell's target box and is unaffected by its transforms. */\n function measure() {\n const stack = stackRef.current;\n const clip = clipRef.current;\n const presented = shellView(owner.props.snapshot).presented;\n if (!stack || !clip || !view || !motion || !presented) { measurable = false; return; }\n const bounds = stack.getBoundingClientRect();\n measurable = bounds.width > 0 && bounds.height > 0;\n syncReadable(presented);\n if (!measurable) return;\n const host = view.getComputedStyle(rootRef.current!);\n tokens = { tailOffset: token(host, '--cloudlet-tail-offset', 4), tailScale: token(host, '--cloudlet-tail-scale', 0.9),\n pillHeight: token(host, '--cloudlet-pill-height', 44) };\n const open = owner.props.snapshot.island.open;\n const corner = parseFloat(view.getComputedStyle(clip).borderTopLeftRadius);\n const radius = Math.min(Number.isFinite(corner) ? corner : open ? 24 : bounds.height / 2, bounds.height / 2, bounds.width / 2);\n layout = { width: bounds.width, height: bounds.height, bodyTop: bodyElement()?.offsetTop ?? 0 };\n motion.setShape({ width: bounds.width, height: bounds.height, radius }, shapeMode);\n shapeMode = 'close';\n syncScrollStop();\n }\n /**\n * A body that scrolls is a named tab stop (WCAG 2.1.1): Safari never makes scrollers focusable,\n * and a focused action below a long description cannot scroll back up to it.\n */\n function syncScrollStop() {\n const body = bodyElement();\n if (!body) return;\n const title = heading()?.querySelector('[data-cloudlet-title]')?.id;\n if (body.scrollHeight - body.clientHeight > 1 && title) {\n body.tabIndex = 0;\n body.setAttribute('role', 'group');\n body.setAttribute('aria-labelledby', title);\n } else for (const name of ['tabindex', 'role', 'aria-labelledby']) body.removeAttribute(name);\n }\n /** A readable record that loses its geometry (hidden host, zero viewport) stops spending time. */\n function syncReadable(presented: Presented | null) {\n const next = presented && !measurable && bridge.getSnapshot().presentation?.readable ? presented.handle : null;\n if (next === unreadable) return;\n if (unreadable) bridge.setPause(lease, { scope: 'notification', handle: unreadable, reason: 'content-transition', active: false });\n unreadable = next;\n if (next) bridge.setPause(lease, { scope: 'notification', handle: next, reason: 'content-transition', active: true });\n }\n /** The presented record is readable once its live slide is visible and no transition still hides it. */\n function acknowledgePresentation() {\n const presentation = bridge.getSnapshot().presentation;\n if (!presentation?.token || presentation.readable || revealing.size) return;\n const node = shellRef.current?.querySelector(`[data-cloudlet-presented=\"${presentation.handle.generation}\"]`);\n const bounds = node?.getBoundingClientRect();\n if (!node || !measurable || !bounds?.width || !bounds.height || view?.getComputedStyle(node).visibility === 'hidden') return;\n bridge.acknowledgePresentation(lease, presentation.handle, presentation.token);\n }\n const reveal = (group: string) => {\n revealing.add(group);\n return () => { revealing.delete(group); acknowledgePresentation(); };\n };\n const relayout = () => { measureViewport(); measure(); acknowledgePresentation(); };\n function primaryFocus(): HTMLElement | null {\n const root = rootRef.current;\n return (owner.props.snapshot.island.open ? root?.querySelector<HTMLElement>('.cloudlet-slide [data-cloudlet-title]') : null)\n ?? root?.querySelector<HTMLElement>('[data-cloudlet-pill]') ?? null;\n }\n function commitFocusRequest() {\n const request = owner.props.snapshot.focusRequest;\n if (!request || bridge.getSnapshot().focusRequest?.token !== request.token) return;\n const root = rootRef.current;\n const target = request.target;\n let element: HTMLElement | null = null;\n if (target.kind === 'anchor') element = root;\n // The acknowledgement lives in the Island; collapsed, the pill names the missed count.\n else if (target.kind === 'overflow') element = root?.querySelector('[data-cloudlet-overflow]') ?? root?.querySelector('[data-cloudlet-pill]') ?? null;\n else if (target.kind === 'notification') {\n const presented = shellRef.current?.querySelector<HTMLElement>(`[data-cloudlet-presented=\"${target.handle.generation}\"]`);\n element = !presented ? null : target.control\n ? shellRef.current!.querySelector(`[data-cloudlet-control=\"${target.control}\"]`) : primaryFocus();\n }\n rememberExternal(doc.activeElement);\n const focused = restoreFocus(element);\n bridge.acknowledgeFocus(lease, request.token, focused ? 'focused' : 'unavailable');\n }\n function clear(layer: Element | null | undefined) { layer?.replaceChildren(); }\n function heading() { return shellRef.current?.querySelector<HTMLElement>(':scope > .cloudlet-clip > .cloudlet-slide > .cloudlet-header > .cloudlet-heading') ?? null; }\n function bodyElement() { return shellRef.current?.querySelector<HTMLElement>(':scope > .cloudlet-clip > .cloudlet-slide > .cloudlet-body') ?? null; }\n /** Pre-mutation pictures of every layer the commit is about to change (one per layer). */\n function takeSnapshots(plan: ShellPlan): Partial<Record<Layer, Element>> {\n const shell = shellRef.current;\n const clip = clipRef.current;\n if (!shell || !clip || !measurable) return {};\n const clones: Partial<Record<Layer, Element>> = {};\n if (plan.presence === 'exit' || plan.presence === 'rise' || plan.presence === 'replace') {\n clones.exit = inertClone(shell);\n // The snapshot keeps the silhouette it had at this instant.\n if (rules.exitClip) rules.exitClip.clipPath = rules.clip?.clipPath ?? '';\n if (rules.exitBg) rules.exitBg.borderRadius = rules.bg?.borderRadius ?? '';\n if (rules.exitBadge) { rules.exitBadge.opacity = rules.badge?.opacity ?? ''; rules.exitBadge.transform = rules.badge?.transform ?? ''; }\n if (rules.exit) rules.exit.width = px(layout.width);\n }\n const leaving = bodyElement();\n if (plan.slide && leaving) {\n // Only the body slides out; the heading blur-swaps in place (plan.header).\n clones.slide = inertClone(leaving);\n slideTop = leaving.offsetTop;\n if (rules.slideOut) rules.slideOut.width = px(layout.width);\n }\n if (plan.morph === 'close') {\n const chrome = inertClone(clip);\n // The live header stays on top; only body, close and indicator fade out.\n chrome.querySelector('.cloudlet-header')?.classList.add('cloudlet-ghost');\n clones.chrome = chrome;\n if (rules.chromeOut) rules.chromeOut.width = px(layout.width);\n }\n const head = heading();\n if (plan.header && head) clones.header = inertClone(head);\n const body = bodyElement();\n // Rapid updates (progress text every 150 ms) must not restart the crossfade: within\n // `bodyQuiet` of the previous update the new text lands in place.\n const now = motion?.now() ?? 0;\n const rapid = plan.body && now - lastBodyUpdate < (motion?.constants.bodyQuiet ?? 0);\n if (plan.body) lastBodyUpdate = now;\n if (plan.body && !plan.slide && body && !rapid && !motion?.swapping('body')) {\n clones.body = inertClone(body);\n if (rules.bodyOut) rules.bodyOut.top = px(body.offsetTop);\n }\n const badge = shell.querySelector(':scope > .cloudlet-badge > .cloudlet-badge-value');\n if (plan.badge && badge) clones.badge = inertClone(badge);\n const page = clip.querySelector(':scope > .cloudlet-indicator > .cloudlet-page > .cloudlet-page-value');\n if (plan.page && page) clones.page = inertClone(page);\n return clones;\n }\n function place(layer: Layer, clone: Element) {\n const shell = shellRef.current;\n const container = layer === 'exit' ? exitRef.current : layer === 'slide' ? slideOutRef.current\n : layer === 'chrome' ? chromeOutRef.current\n : layer === 'header' ? shell?.querySelector(':scope > .cloudlet-clip > .cloudlet-slide > .cloudlet-header > .cloudlet-heading-out')\n : layer === 'body' ? shell?.querySelector(':scope > .cloudlet-clip > .cloudlet-slide > .cloudlet-body-out')\n : layer === 'badge' ? shell?.querySelector(':scope > .cloudlet-badge > .cloudlet-badge-out')\n : shell?.querySelector(':scope > .cloudlet-clip > .cloudlet-indicator > .cloudlet-page > .cloudlet-page-out');\n if (!container) return null;\n // Set the native attribute without relying on React 19's inert prop support.\n container.setAttribute('inert', '');\n container.replaceChildren(clone);\n return container;\n }\n function animate(previous: ShellView, next: ShellView, pending: Pending | null) {\n if (!motion) return;\n const plan = pending?.plan ?? planShell(previous, next);\n // Before any write of this commit: the writer must know which bar it owns.\n syncProgress(next);\n const containers: Partial<Record<Layer, Element | null>> = {};\n for (const [layer, clone] of Object.entries(pending?.clones ?? {}) as [Layer, Element][]) containers[layer] = place(layer, clone);\n const done = (layer: Layer) => () => clear(containers[layer]);\n const tailsDone = () => { if (heldTails) { heldTails = 0; owner.forceUpdate(); } };\n const exitDone = () => clear(exitRef.current);\n if (plan.presence === 'enter') shapeMode = 'instant';\n else if (plan.morph === 'open') shapeMode = 'open';\n measure();\n const from = pending?.heading;\n const to = from && plan.morph !== 'none' ? heading()?.getBoundingClientRect() : null;\n if (from && to) motion.shiftHeading(from.left - to.left, from.top - to.top, plan.morph === 'open' ? 'open' : 'close');\n const edge = edgeSign();\n const flung = fling && previous.presented?.handle === fling.handle && !next.stack.includes(fling.handle) ? fling : undefined;\n if (fling && !next.stack.includes(fling.handle)) fling = null;\n if (plan.presence === 'exit' || plan.presence === 'rise' || plan.presence === 'replace') {\n if (containers.exit) motion.exit(edge, exitDone, flung);\n else if (flung) motion.release('dragX', 0);\n if (plan.presence === 'exit') motion.hide();\n }\n // An arrival keeps the shell: the title blur-swaps and the width springs to the new text.\n if (plan.presence === 'enter' || plan.presence === 'replace') {\n motion.enter(edge, reveal('presence'));\n if (plan.presence === 'enter') {\n motion.setTails(next.depth, 'settle', 0, tailsDone);\n if (next.open) motion.open(); else motion.setBadge(next.badge);\n }\n }\n if (plan.presence === 'rise') {\n motion.rise(-edge * tokens.tailOffset, tokens.tailScale, reveal('presence'));\n motion.swap('header', reveal('header'), true);\n }\n if (plan.tails === 'arrival' || plan.tails === 'rise' || plan.tails === 'settle') {\n if (next.depth < previous.depth) heldTails = Math.max(heldTails, previous.depth);\n motion.setTails(next.depth, plan.tails, previous.depth, tailsDone);\n }\n if (plan.morph === 'open') {\n heldTails = Math.max(heldTails, previous.depth);\n motion.open(tailsDone);\n } else if (plan.morph === 'close') motion.collapse(next.depth, next.badge, { chrome: done('chrome'), tails: tailsDone });\n // Bottom edge: a snapshot keeps its distance to the anchored bottom while the layout height changes.\n const offset = bottomEdge() && pending ? layout.height - pending.height : 0;\n if (rules.slideOut) rules.slideOut.top = px(offset + slideTop);\n if (rules.chromeOut && containers.chrome) rules.chromeOut.top = px(offset);\n if (plan.slide) {\n const finished = reveal('slide');\n // The plan is logical (+1 towards older records); older records lie to the left in RTL.\n motion.slide(rtl ? -plan.slide as 1 | -1 : plan.slide, layout.width, () => { clear(containers.slide); finished(); });\n }\n if (containers.header) {\n const finished = reveal('header');\n motion.swap('header', () => { clear(containers.header); finished(); });\n }\n if (containers.body) motion.swap('body', done('body'));\n if (containers.badge) motion.swap('badge', done('badge'));\n if (containers.page) motion.swap('page', done('page'));\n if (!next.open && previous.presented && next.presented && plan.morph === 'none') motion.setBadge(next.badge);\n // Terminal updates of the same record re-pend its presentation before the swap hides it.\n const presentation = bridge.getSnapshot().presentation;\n if (plan.begin && plan.header && next.presented && presentation?.token && presentation.readable\n && presentation.handle === next.presented.handle) bridge.beginPresentation(lease, next.presented.handle, presentation.token);\n }\n function syncProgress(next: ShellView) {\n const presented = next.presented;\n // The ring lives around the shared status icon: in the pill and in the Island.\n const progress = presented?.content.progress;\n const fill = heading()?.querySelector<SVGCircleElement>(':scope > .cloudlet-icon > .cloudlet-ring > .cloudlet-progress-fill') ?? null;\n const determinate = progress?.kind === 'determinate';\n // A new ring, record or determinate phase starts at its value; later values tween.\n const appeared = fill !== progressFill || presented?.handle !== progressHandle || !progressActive;\n progressFill = fill;\n progressHandle = presented?.handle ?? null;\n progressActive = determinate && !!fill;\n motion?.setProgress(determinate ? progress.value : null, appeared);\n }\n function setPeek(next: typeof peek) {\n if (peek?.handle === next?.handle && peek?.side === next?.side) return;\n peek = next;\n owner.forceUpdate();\n }\n /** Stack: the pill follows the finger; a release past the threshold dismisses it (`reason: 'swipe'`). */\n function dismissSession(handle: NotificationHandle): SwipeSession {\n return {\n move: offset => motion?.drag('dragX', offset),\n end: (offset, velocity) => {\n const decision = decideRelease(offset, velocity, layout.width, { negative: true, positive: true });\n if (decision) {\n fling = { handle, direction: decision, distance: layout.width, velocity: velocity * 1000 };\n if (bridge.dismiss(lease, handle, 'swipe').status === 'applied') return;\n fling = null;\n }\n motion?.release('dragX', velocity * 1000);\n },\n cancel: () => motion?.release('dragX', 0),\n };\n }\n /** Physical neighbour of a record: side +1 is to the right, where older records lie in LTR. */\n function neighbour(handle: NotificationHandle, side: 1 | -1): NotificationHandle | null {\n const stack = owner.props.snapshot.stack;\n const index = stack.indexOf(handle);\n return index < 0 ? null : stack[index + side * (rtl ? -1 : 1)] ?? null;\n }\n /**\n * Island: the content follows the finger inside the fixed shell with the inert\n * neighbour beside it; without a neighbour the edge resists. A release towards a\n * neighbour navigates and the slide continues from the release point and velocity.\n */\n function navigateSession(handle: NotificationHandle): SwipeSession {\n const follow = (offset: number) => {\n const side = offset < 0 ? 1 : -1;\n const target = offset ? neighbour(handle, side) : null;\n setPeek(target ? { handle: target, side } : null);\n return target ? Math.max(-layout.width, Math.min(layout.width, offset)) : rubberBand(offset, layout.width);\n };\n const settle = (velocity: number) => motion?.release('slide', velocity, () => setPeek(null));\n return {\n move: offset => motion?.drag('slide', follow(offset)),\n end: (offset, velocity) => {\n const decision = decideRelease(offset, velocity, layout.width,\n { negative: !!neighbour(handle, 1), positive: !!neighbour(handle, -1) });\n const target = decision ? neighbour(handle, decision < 0 ? 1 : -1) : null;\n if (target) {\n const shown = peek;\n // The commit replaces the preview by the live slide at the same place.\n peek = null;\n motion?.fling('slide', velocity * 1000);\n if (bridge.navigate(lease, target).status === 'applied') return;\n peek = shown;\n }\n settle(peek ? velocity * 1000 : 0);\n },\n cancel: () => settle(0),\n };\n }\n /** Island header: a vertical swipe towards the screen edge collapses to the stack (not a dismiss). */\n function collapseSession(): SwipeSession {\n const toward = bottomEdge() ? 1 : -1;\n // Towards the edge the Island stretches softly; away from it the resistance is strong.\n const resist = (offset: number) => rubberBand(offset, offset * toward > 0 ? layout.height : MOTION.swipe.minDistance);\n return {\n move: offset => motion?.drag('dragY', resist(offset)),\n end: (offset, velocity) => {\n motion?.release('dragY', 0);\n // The edge is a short reach away (gutter + safe area): `edge` px also commits.\n const reach = Math.min(layout.height, MOTION.swipe.edge / MOTION.swipe.distance);\n if (decideRelease(offset, velocity, reach, { negative: toward < 0, positive: toward > 0 })) bridge.collapseIsland(lease);\n },\n cancel: () => motion?.release('dragY', 0),\n };\n }\n /** Which swipes a pointerdown or a wheel stream may start; reduced motion turns swipes off. */\n function beginSwipe(target: Element, input: 'pointer' | 'wheel'): SwipeCandidate | null {\n const shell = shellRef.current;\n const clip = clipRef.current;\n const { presented, open } = shellView(owner.props.snapshot);\n if (reduced || !motion || !measurable || !shell || !clip || !presented || !shell.contains(target)) return null;\n let x: boolean;\n let y = false;\n if (!open) x = input === 'pointer' && !!target.closest('[data-cloudlet-pill]');\n else {\n x = clip.contains(target);\n y = x && input === 'pointer' && !!target.closest('.cloudlet-clip > .cloudlet-slide > .cloudlet-header');\n }\n if (!x && !y) return null;\n const { handle } = presented;\n // Hold the record from the first contact: TTL, attention and the target cannot change under the finger.\n if (bridge.setPause(lease, { scope: 'notification', handle, reason: 'gesture', active: true }).status === 'rejected') return null;\n gestureTarget = { handle, open };\n let released = false;\n return {\n x, y,\n start: axis => !open ? dismissSession(handle) : axis === 'x' ? navigateSession(handle) : collapseSession(),\n release() {\n if (released) return;\n released = true;\n gestureTarget = null;\n bridge.setPause(lease, { scope: 'notification', handle, reason: 'gesture', active: false });\n },\n };\n }\n /** A wheel stream over the open Island never reaches the browser's back/forward swipe. */\n function claimsWheel(target: Element): boolean {\n const shell = shellRef.current;\n return !!shell && shellView(owner.props.snapshot).open && shell.contains(target);\n }\n function componentDidMount() {\n const root = rootRef.current;\n const shell = shellRef.current;\n if (!root || !view || !shell) return;\n mounted = true;\n const sheet = styleRef.current?.sheet;\n const instance = `[data-cloudlet-instance=\"${owner.props.snapshot.controller}\"]`;\n if (sheet) {\n for (const [name, path] of Object.entries(rulePaths) as [Rule, string][]) {\n const index = sheet.insertRule(`${instance}${path} {}`, sheet.cssRules.length);\n rules[name] = (sheet.cssRules[index] as CSSStyleRule).style;\n }\n }\n for (const container of [exitRef.current, slideOutRef.current, chromeOutRef.current]) container?.setAttribute('inert', '');\n announcer.mount(root);\n swipe = createSwipe(root, { begin: beginSwipe, claimsWheel, now: () => view.performance.now() });\n const media = view.matchMedia?.('(prefers-reduced-motion: reduce)');\n reduced = media?.matches ?? false;\n root.dataset.reducedMotion = String(reduced);\n motion = createShellMotion({\n now: () => view.performance.now(), requestFrame: callback => view.requestAnimationFrame(callback),\n cancelFrame: id => view.cancelAnimationFrame(id), write, reducedMotion: reduced,\n timeScale: owner.props.options.motion?.timeScale, constants,\n });\n const preference = () => {\n reduced = media?.matches ?? false;\n root.dataset.reducedMotion = String(reduced);\n if (reduced) swipe?.cancel();\n motion?.setReducedMotion(reduced);\n };\n // `auto` follows the same breakpoint as the stylesheet: re-render when it flips.\n const wide = view.matchMedia?.('(min-width: 48rem)');\n // `data-resolved-theme` follows the system scheme while the theme is `system`.\n const scheme = view.matchMedia?.('(prefers-color-scheme: dark)');\n const followScheme = () => { if ((owner.props.options.theme ?? 'system') === 'system') owner.forceUpdate(); };\n const placement = () => { if ((owner.props.options.position ?? 'auto') === 'auto') { swipe?.cancel(); owner.forceUpdate(); } };\n const visibility = () => pause('document-hidden', doc.visibilityState === 'hidden');\n // A pointer press outside the open Island collapses it to the stack.\n const outside = (event: Event) => {\n const snapshot = bridge.getSnapshot();\n // Unsent text holds the Island open; Escape and the pill's own controls still collapse it.\n const draft = snapshot.notifications.some(item => item.handle === snapshot.island.current && item.draft);\n if (snapshot.island.open && !draft && event.target instanceof view.Node && !root.contains(event.target)) bridge.collapseIsland(lease);\n };\n // No mouseout reaches the host when the hovered card is removed or hidden under a still pointer\n // (React then never sees the leave): the next pointer over anything outside releases the pause.\n const hoverOutside = (event: Event) => {\n if (hovering && !(event.target instanceof view.Node && root.contains(event.target))) hover(false);\n };\n const listeners: [EventTarget, string, EventListener, boolean?][] = [\n [doc, 'visibilitychange', visibility],\n [doc, 'pointerdown', outside, true],\n [doc, 'pointerover', hoverOutside, true],\n [view, 'focus', () => pause('window-blur', false)],\n [view, 'blur', () => pause('window-blur', true)],\n [view, 'resize', relayout],\n ];\n if (media) listeners.push([media, 'change', preference]);\n if (wide) listeners.push([wide, 'change', placement]);\n if (scheme) listeners.push([scheme, 'change', followScheme]);\n if (view.visualViewport) listeners.push([view.visualViewport, 'resize', relayout], [view.visualViewport, 'scroll', measureViewport]);\n for (const [target, type, listener, capture] of listeners) target.addEventListener(type, listener, capture);\n cleanup = () => { for (const [target, type, listener, capture] of listeners) target.removeEventListener(type, listener, capture); };\n // Measure HTML only: the clip's layout box never depends on animated values.\n observer = view.ResizeObserver ? new view.ResizeObserver(() => { measure(); acknowledgePresentation(); }) : null;\n if (clipRef.current) observer?.observe(clipRef.current);\n observer?.observe(root);\n visibility();\n pause('window-blur', !doc.hasFocus());\n syncFocus(doc.activeElement);\n measureViewport();\n reportFormatterErrors();\n animate(emptyView, shellView(owner.props.snapshot), null);\n acknowledgePresentation();\n commitFocusRequest();\n }\n function getSnapshotBeforeUpdate(previous: HostProps): Pending | null {\n const before = shellView(previous.snapshot);\n const after = shellView(owner.props.snapshot);\n const plan = planShell(before, after);\n const pending = { plan, clones: takeSnapshots(plan), heading: plan.morph !== 'none' && measurable ? heading()?.getBoundingClientRect() ?? null : null,\n height: layout.height };\n const navigation = navigating;\n navigating = null;\n focusedBefore = null;\n // Navigation keeps browser focus semantics: never redirect focus after a followed link.\n if (navigation && previous.snapshot.notifications.some(item => item.handle === navigation)\n && !owner.props.snapshot.notifications.some(item => item.handle === navigation)) return pending;\n const root = rootRef.current;\n const active = doc.activeElement;\n if (!root || !view || !(active instanceof view.HTMLElement) || active === root || !root.contains(active)\n // `clearAll` turning false removes the clear button without a snapshot change.\n || (structure(previous.snapshot) === structure(owner.props.snapshot) && clearable(previous) === clearable(owner.props))) return pending;\n // The commit may remove or hide the focused branch: park focus on the stable anchor\n // (or outside after the last record) before React mutates the DOM.\n focusedBefore = active;\n const next = owner.props.snapshot;\n restoreAfterCommit = !next.notifications.length && !next.overflow.pending;\n if (!restoreAfterCommit || !restoreExternalFocus()) root.focus({ preventScroll: true });\n return pending;\n }\n function componentDidUpdate(previous: HostProps, _state: unknown, pending: Pending | null) {\n const before = focusedBefore;\n focusedBefore = null;\n if (restoreAfterCommit) {\n restoreAfterCommit = false;\n // React may restore pre-commit focus; leave the empty region again.\n restoreExternalFocus();\n } else if (before && !restoreFocus(before)) {\n // A removed or hidden control hands focus to the Island title, then the pill, then overflow.\n const target = primaryFocus() ?? rootRef.current?.querySelector<HTMLElement>('[data-cloudlet-overflow]') ?? null;\n if (!restoreFocus(target)) rootRef.current?.focus({ preventScroll: true });\n }\n // The button left (collapse, the stack shrank, the prop): the next one starts unarmed.\n if (armed && !clearable(owner.props)) disarm(false);\n motion?.setTimeScale(owner.props.options.motion?.timeScale);\n syncConstants();\n // A swipe never continues on another record or state (arrival, programmatic dismiss, Escape).\n const next = shellView(owner.props.snapshot);\n if (gestureTarget && (gestureTarget.handle !== next.presented?.handle || gestureTarget.open !== next.open)) swipe?.cancel();\n if (peek && (!next.open || !next.stack.includes(peek.handle))) { swipe?.cancel(); setPeek(null); }\n if (previous.snapshot !== owner.props.snapshot) animate(shellView(previous.snapshot), next, pending);\n else measure();\n reportFormatterErrors();\n acknowledgePresentation();\n commitFocusRequest();\n // Focus moved by this lifecycle during commit emits no React focus events: reconcile the pause.\n syncFocus(doc.activeElement);\n }\n function componentWillUnmount() {\n swipe?.dispose(); swipe = null;\n peek = null; fling = null;\n disarm(false);\n announcer.dispose();\n mounted = false;\n cleanup?.(); cleanup = null;\n observer?.disconnect(); observer = null;\n motion?.dispose(); motion = null;\n revealing.clear();\n const sheet = styleRef.current?.sheet;\n if (sheet) while (sheet.cssRules.length) sheet.deleteRule(0);\n rules = {};\n for (const container of [exitRef.current, slideOutRef.current, chromeOutRef.current]) clear(container);\n progressFill = null;\n const active = doc.activeElement;\n if (rootRef.current?.contains(active) && !restoreExternalFocus()) {\n // There is no surviving internal anchor when the entire host is removed.\n (active as HTMLElement | null)?.blur();\n }\n }\n function disarm(update = true) {\n view?.clearTimeout(disarmTimer);\n disarmTimer = undefined;\n if (!armed) return;\n armed = false;\n if (update && mounted) owner.forceUpdate();\n }\n function pressClear() {\n if (armed) {\n disarm();\n bridge.clearAll(lease);\n return;\n }\n armed = true;\n disarmTimer = view?.setTimeout(disarm, CLEAR_CONFIRM);\n owner.forceUpdate();\n }\n const clearable = (props: HostProps) => props.options.clearAll !== false && shellView(props.snapshot).open && props.snapshot.stack.length > 1;\n const navigate = (handle: NotificationHandle) => {\n navigating = handle;\n if (bridge.dismiss(lease, handle, 'navigation').status !== 'applied') navigating = null;\n };\n function onIslandKey(event: ReactKeyboardEvent, stack: readonly NotificationHandle[], index: number, rtl: boolean) {\n if (event.defaultPrevented) return;\n let next: number | null = null;\n // An IME composition owns Escape and the arrows until it ends.\n if (event.nativeEvent.isComposing) return;\n if (event.key === 'Escape') {\n event.preventDefault();\n bridge.collapseIsland(lease);\n return;\n }\n // The arrows, Home and End move the caret inside a form field.\n if ((event.target as Element).closest('input, textarea')) return;\n // A focused scrolling body keeps Home/End for its own scroll.\n if ((event.key === 'Home' || event.key === 'End') && event.target === bodyElement() && bodyElement()?.tabIndex === 0) return;\n if (event.key === 'Home') next = 0;\n else if (event.key === 'End') next = stack.length - 1;\n else if (event.key === 'ArrowRight') next = index + (rtl ? -1 : 1);\n else if (event.key === 'ArrowLeft') next = index + (rtl ? 1 : -1);\n const handle = next === null ? undefined : stack[next];\n if (!handle) return;\n event.preventDefault();\n bridge.navigate(lease, handle);\n }\n function render() {\n const { snapshot, options } = owner.props;\n const labels = { ...defaultLabels, ...options.labels };\n const instance = snapshot.controller ?? 'cloudlet';\n const dir = options.dir ?? (doc.documentElement.dir === 'rtl' ? 'rtl' : 'ltr');\n const theme = options.theme ?? 'system';\n rtl = dir === 'rtl';\n const islandId = `${instance}-island`;\n const current = shellView(snapshot);\n const { presented, open, total, index, missed } = current;\n if (current.badge) badgeCount = current.count;\n const preview = open && peek ? snapshot.notifications.find(item => item.handle === peek!.handle) : undefined;\n const position = options.position ?? 'auto';\n const named = String(position);\n const bottom = named.startsWith('bottom-') || (position === 'auto' && view?.matchMedia?.('(min-width: 48rem)').matches === false);\n const align = named.endsWith('-left') ? 'left' : named.endsWith('-right') ? 'right' : 'center';\n const tails = Math.min(2, Math.max(current.depth, heldTails));\n const slot = presented ? slotRenderer(bridge, lease, presented.handle, rejectSlotFocus) : null;\n const page = format(labels.page, defaultLabels.page, index + 1, total);\n const confirm = format(labels.clearAllConfirm, defaultLabels.clearAllConfirm, total);\n const part = partClasses(options.classNames);\n return <>\n {options.offsets && <OffsetStyles key={options.nonce ?? ''} instance={instance} offsets={options.offsets} nonce={options.nonce} />}\n <div ref={rootRef} className={part('host', 'cloudlet-host')} role=\"region\" aria-label={labels.region} tabIndex={-1}\n data-cloudlet-focus-anchor=\"\" data-cloudlet-instance={instance} data-theme={theme}\n data-resolved-theme={theme === 'system' ? view?.matchMedia?.('(prefers-color-scheme: dark)').matches ? 'dark' : 'light' : theme}\n data-position={position} data-edge={bottom ? 'bottom' : 'top'} data-align={align} data-state={open ? 'island' : 'stack'}\n data-island-reason={snapshot.island.reason ?? undefined} data-overflow={snapshot.overflow.pending} dir={dir}\n onPointerDownCapture={event => { activation = (event.target as Element).closest('button'); }}\n onPointerCancelCapture={() => { activation = null; }}\n onKeyDownCapture={event => {\n if ((event.key === 'Enter' || event.key === ' ') && (event.target as Element).closest('button')) {\n repeating = event.repeat;\n if (event.repeat) event.preventDefault();\n else activation = (event.target as Element).closest('button');\n }\n }}\n onKeyUpCapture={() => { repeating = false; }}\n onClickCapture={event => {\n const target = (event.target as Element).closest('button');\n // A double click must not fire a one-shot action twice; close, the pill and the dots are\n // repeatable on purpose (each click dismisses or shows another record).\n // The clear button counts too: a double click must not arm and confirm it at once.\n const oneShot = !!target?.matches('[data-cloudlet-control=\"action\"], [data-cloudlet-control=\"retry\"], [data-cloudlet-control=\"cancel\"], [data-cloudlet-control=\"clear\"]');\n if (target && (repeating || (oneShot && event.detail > 1) || (activation && activation !== target))) { event.preventDefault(); event.stopPropagation(); }\n activation = null;\n }}\n onFocus={event => {\n rememberExternal(event.relatedTarget);\n // A rich slot capture handler can already have redirected this focus.\n syncFocus(doc.activeElement);\n }}\n onBlur={event => syncFocus(view && event.relatedTarget instanceof view.Element ? event.relatedTarget : null)}\n onMouseEnter={() => hover(true)}\n onMouseLeave={() => hover(false)}>\n <style ref={styleRef} nonce={options.nonce} data-cloudlet-motion=\"\" />\n <div ref={stackRef} className={part('stack', 'cloudlet-stack')} data-empty={!presented}>\n {[1, 2].filter(tail => tail <= tails).map(tail => <div key={tail} className={part('tail', 'cloudlet-tail')} data-cloudlet-tail={tail} aria-hidden=\"true\" />)}\n <div ref={shellRef} id={islandId} className={part('island', 'cloudlet-shell')} hidden={!presented} data-state={open ? 'island' : 'stack'}\n data-kind={presented?.kind}\n {...(open ? { role: 'region', 'aria-roledescription': labels.carousel, 'aria-label': labels.island, 'aria-describedby': `${islandId}-hint` } : {})}\n onKeyDown={open ? event => onIslandKey(event, snapshot.stack, index, dir === 'rtl') : undefined}>\n <svg ref={bgRef} className=\"cloudlet-bg\" aria-hidden=\"true\" focusable=\"false\"><path ref={pathRef} /></svg>\n <div ref={clipRef} className=\"cloudlet-clip\">\n <div ref={slideOutRef} className=\"cloudlet-slide-out\" aria-hidden=\"true\" />\n {presented && slot && <div className=\"cloudlet-slide\" data-cloudlet-presented={presented.handle.generation}\n data-kind={presented.kind} data-current=\"true\"\n {...(open ? { role: 'group', 'aria-roledescription': labels.slide, 'aria-label': page } : {})}>\n <div className={part('header', 'cloudlet-header')} aria-hidden={open ? undefined : 'true'}>\n <Heading notification={presented} slot={slot} part={part} titleId={`${islandId}-title`} />\n <div className=\"cloudlet-heading-out\" aria-hidden=\"true\" />\n </div>\n {open && <Body notification={presented} form={snapshot.forms.find(form => form.handle === presented.handle)} bridge={bridge}\n lease={lease} labels={labels} navigate={navigate} slot={slot} part={part} titleId={`${islandId}-title`} />}\n <div className=\"cloudlet-body-out\" aria-hidden=\"true\" />\n </div>}\n {preview && <div ref={inertRef} className=\"cloudlet-peek\" aria-hidden=\"true\"><SlidePreview notification={preview} labels={labels} part={part} /></div>}\n {presented && open && closeButton(labels, part, () => bridge.dismiss(lease, presented.handle, 'close-button'))}\n {open && (total > 1 || missed > 0) && <div className={part('indicator', 'cloudlet-indicator')}>{total > 5\n ? <p className=\"cloudlet-page\" aria-hidden=\"true\"><span className=\"cloudlet-page-value\">{page}</span><span className=\"cloudlet-page-out\" /></p>\n : total > 1 && <div className=\"cloudlet-dots\">{snapshot.stack.map((handle, position) =>\n <button key={handle.generation} type=\"button\" className=\"cloudlet-dot-button\" aria-current={position === index ? 'true' : undefined}\n aria-label={format(labels.page, defaultLabels.page, position + 1, total)} onClick={() => bridge.navigate(lease, handle)}>\n <span className=\"cloudlet-dot\" aria-hidden=\"true\" />\n </button>)}</div>}\n {clearable(owner.props) && <>\n {/* Both labels share one cell, so the button keeps its width when it arms. */}\n <button type=\"button\" className={part('clear', 'cloudlet-clear')} data-cloudlet-control=\"clear\" data-armed={armed}\n onClick={pressClear} onBlur={() => disarm()}>\n <span aria-hidden={armed || undefined}>{labels.clearAll}</span><span aria-hidden={!armed || undefined}>{confirm}</span>\n </button>\n <span role=\"status\" className=\"cloudlet-live\">{armed ? confirm : ''}</span>\n </>}\n {missed > 0 && <div className={part('overflow', 'cloudlet-overflow')}>\n <p>{format(labels.overflowCount, defaultLabels.overflowCount, missed)}</p>\n <button type=\"button\" data-cloudlet-overflow=\"\" onClick={() => bridge.acknowledgeOverflow(lease)}>{labels.acknowledgeOverflow}</button>\n </div>}</div>}\n {open && <span id={`${islandId}-hint`} className=\"cloudlet-live\">{labels.collapse}</span>}\n <div ref={chromeOutRef} className=\"cloudlet-chrome-out\" aria-hidden=\"true\" />\n </div>\n {presented && !open && <button type=\"button\" className={part('pill', 'cloudlet-pill')} data-cloudlet-pill=\"\"\n aria-expanded=\"false\" aria-controls={islandId} onClick={() => bridge.openIsland(lease, 'user')}\n aria-label={[format(labels.stackSummary, defaultLabels.stackSummary, presented.content.title, total, missed),\n ...(presented.draft ? [labels.draft] : [])].join(', ')} />}\n <span className={part('badge', 'cloudlet-badge')} aria-hidden=\"true\"><span className=\"cloudlet-badge-value\">{badgeCount}</span><span className=\"cloudlet-badge-out\" /></span>\n </div>\n <div ref={exitRef} className=\"cloudlet-exit\" aria-hidden=\"true\" />\n </div>\n </div>\n </>;\n }\n return { componentDidMount, getSnapshotBeforeUpdate, componentDidUpdate, componentWillUnmount, render };\n}\n\n/** Changes that can remove or hide a focused control. */\nfunction structure(snapshot: RendererSnapshot<ReactNode>): string {\n const presented = snapshot.notifications.find(item => item.location === 'current');\n return [snapshot.island.open, snapshot.overflow.pending, snapshot.stack.map(handle => handle.generation).join(','),\n presented?.handle.generation, presented?.content.action?.kind, presented?.action.status, presented?.operation?.status,\n presented?.operation?.canRetry, presented?.operation?.canCancel].join('|');\n}\n\n/** Only these generated blocks use nonce. No style attribute or cssText is used. */\nfunction OffsetStyles({ instance, offsets, nonce }: { instance: string; offsets: ToasterOffsets; nonce: string | undefined }) {\n const ref = useRef<HTMLStyleElement>(null);\n useLayoutEffect(() => {\n const sheet = ref.current?.sheet;\n if (!sheet) return;\n const index = sheet.insertRule(`[data-cloudlet-instance=\"${instance}\"] {}`);\n const rule = sheet.cssRules[index] as CSSStyleRule;\n for (const group of ['gutter', 'obstruction'] as const) {\n for (const edge of ['top', 'right', 'bottom', 'left'] as const) {\n const value = offsets[group]?.[edge];\n if (typeof value === 'number' && Number.isFinite(value) && value >= 0) rule.style.setProperty(`--cloudlet-${group}-${edge}`, `${value}px`);\n }\n }\n return () => { sheet.deleteRule(index); };\n }, [instance, offsets]);\n return <style ref={ref} nonce={nonce} data-cloudlet-offsets={instance} />;\n}\n"],"mappings":";;;;;;;;;;AA4BA,SAASC,EAA8B,GAAe;CACpD,IAAMC,IAAQC,EAAQ,UAAU,EAAI;CACpC,KAAK,IAAMC,KAAQ,CAACF,GAAO,GAAGA,EAAM,iBAAiB,GAAG,CAAC,GACvD,KAAK,IAAM,EAAE,aAAU,CAAC,GAAGE,EAAK,UAAU,GACxC,CAAIC,MAAS,QAAQA,MAAS,UAAUA,MAAS,cAAcA,MAAS,UAAUA,EAAK,WAAW,OAAO,KACpGA,EAAK,WAAW,gBAAgB,MAAGD,EAAK,gBAAgBC,CAAI;CAGrE,KAAK,IAAM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KAAS,CAAC,UAAU,aAAa,GAC1C,KAAK,IAAM1C,KAAQ;GAAC;GAAO;GAAS;GAAU;EAAM,GAAY;GAC9D,IAAM1F,IAAQwQ,EAAQpI,EAAM,GAAG1C;GAC/B,AAAI,OAAO1F,KAAU,YAAY,OAAO,SAASA,CAAK,KAAKA,KAAS,KAAG+G,EAAK,MAAM,YAAY,cAAcqB,EAAM,GAAG1C,KAAQ,GAAG1F,EAAM,GAAG;EAC3I;EAEF,aAAa;GAAE,EAAM,WAAW8G,CAAK;EAAG;CAC1C,GAAG,CAACwF,GAAUkE,CAAO,CAAC,GACf,kBAAC,SAAD;EAAY;EAAY;EAAO,yBAAuBlE;CAAW,CAAA;AAC1E"}
package/dist/react.d.ts CHANGED
@@ -154,7 +154,8 @@ export interface ToasterMotion {
154
154
  /** Styling hooks of the renderer; see `ToasterProps.classNames`. */
155
155
  export type CloudletPart = 'host' | 'stack' | 'pill' | 'tail' | 'badge' | 'island' | 'header' | 'icon' | 'title' | 'close' | 'body' | 'description' | 'actions' | 'action' | 'indicator' | 'clear' | 'overflow' | 'form' | 'field' | 'field-error';
156
156
  export interface ToasterProps {
157
- readonly position?: 'auto' | 'top-center' | 'bottom-center';
157
+ /** Physical: `-left` and `-right` stay on that side in RTL too. Default `auto`. */
158
+ readonly position?: 'auto' | 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
158
159
  readonly theme?: 'system' | 'light' | 'dark';
159
160
  readonly dir?: 'ltr' | 'rtl';
160
161
  /** Read after mount; a connected HTML Element in the mounting root's document. Fixed until remount. */
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACpG,OAAO,KAAK,E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