@cloudlet/toast 1.4.0-rc.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/CHANGELOG.md +181 -0
  2. package/README.md +30 -5
  3. package/dist/agent.d.ts.map +1 -1
  4. package/dist/agent.js +19 -15
  5. package/dist/agent.js.map +1 -1
  6. package/dist/center-react.d.ts +286 -0
  7. package/dist/center-react.d.ts.map +1 -0
  8. package/dist/center-react.js +2 -0
  9. package/dist/center.d.ts +3 -0
  10. package/dist/center.d.ts.map +1 -0
  11. package/dist/center.js +1 -0
  12. package/dist/core/agent-port.d.ts +2 -0
  13. package/dist/core/agent-port.d.ts.map +1 -1
  14. package/dist/core/agent-port.js +3 -0
  15. package/dist/core/agent-port.js.map +1 -1
  16. package/dist/react/card.d.ts +4 -0
  17. package/dist/react/card.d.ts.map +1 -1
  18. package/dist/react/card.js +3 -8
  19. package/dist/react/card.js.map +1 -1
  20. package/dist/react/center-backdrop.d.ts +69 -0
  21. package/dist/react/center-backdrop.d.ts.map +1 -0
  22. package/dist/react/center-backdrop.js +81 -0
  23. package/dist/react/center-backdrop.js.map +1 -0
  24. package/dist/react/center-clear.d.ts +16 -0
  25. package/dist/react/center-clear.d.ts.map +1 -0
  26. package/dist/react/center-clear.js +24 -0
  27. package/dist/react/center-clear.js.map +1 -0
  28. package/dist/react/center-gestures.d.ts +47 -0
  29. package/dist/react/center-gestures.d.ts.map +1 -0
  30. package/dist/react/center-gestures.js +74 -0
  31. package/dist/react/center-gestures.js.map +1 -0
  32. package/dist/react/center-motion.d.ts +174 -0
  33. package/dist/react/center-motion.d.ts.map +1 -0
  34. package/dist/react/center-motion.js +344 -0
  35. package/dist/react/center-motion.js.map +1 -0
  36. package/dist/react/center.d.ts +15 -0
  37. package/dist/react/center.d.ts.map +1 -0
  38. package/dist/react/center.js +1287 -0
  39. package/dist/react/center.js.map +1 -0
  40. package/dist/react/focus.d.ts +7 -0
  41. package/dist/react/focus.d.ts.map +1 -0
  42. package/dist/react/focus.js +14 -0
  43. package/dist/react/focus.js.map +1 -0
  44. package/dist/react/gestures.d.ts +33 -2
  45. package/dist/react/gestures.d.ts.map +1 -1
  46. package/dist/react/gestures.js +181 -149
  47. package/dist/react/gestures.js.map +1 -1
  48. package/dist/react/host.d.ts.map +1 -1
  49. package/dist/react/host.js +287 -283
  50. package/dist/react/host.js.map +1 -1
  51. package/dist/react/motion.d.ts +18 -11
  52. package/dist/react/motion.d.ts.map +1 -1
  53. package/dist/react/motion.js +6 -3
  54. package/dist/react/motion.js.map +1 -1
  55. package/dist/react/reduced.d.ts +24 -0
  56. package/dist/react/reduced.d.ts.map +1 -0
  57. package/dist/react/reduced.js +35 -0
  58. package/dist/react/reduced.js.map +1 -0
  59. package/dist/react/zoom.d.ts +12 -0
  60. package/dist/react/zoom.d.ts.map +1 -0
  61. package/dist/react/zoom.js +21 -0
  62. package/dist/react/zoom.js.map +1 -0
  63. package/dist/react.d.ts +4 -0
  64. package/dist/react.d.ts.map +1 -1
  65. package/dist/styles.css +1 -1
  66. package/package.json +3 -2
  67. package/src/agent.ts +11 -6
  68. package/src/center-react.ts +300 -0
  69. package/src/center.ts +27 -0
  70. package/src/core/agent-port.ts +3 -0
  71. package/src/react/card.tsx +5 -6
  72. package/src/react/center-backdrop.tsx +151 -0
  73. package/src/react/center-clear.ts +56 -0
  74. package/src/react/center-gestures.ts +143 -0
  75. package/src/react/center-motion.ts +504 -0
  76. package/src/react/center.tsx +1557 -0
  77. package/src/react/focus.ts +18 -0
  78. package/src/react/gestures.ts +127 -37
  79. package/src/react/host.tsx +17 -5
  80. package/src/react/motion.ts +16 -9
  81. package/src/react/reduced.ts +52 -0
  82. package/src/react/zoom.ts +26 -0
  83. package/src/react.ts +4 -0
@@ -1 +1 @@
1
- {"version":3,"file":"motion.js","names":["tweenGenerator","tween","MOTION","tunable","positive","resolveMotion","overrides","valid","value","key","result","base","override","fields","field","channelKeys","spatial","initial","swaps","m","validScale","createShellMotion","values","groups","frame","disposed","measured","reduced","options","timeScale","slideDirection","slideWidth","active","keys","output","write","sample","state","animation","elapsed","time","next","schedule","tick","complete","name","group","jump","to","target","spec","tween","spring","after","done","request","change","enterSpring","exitSpring","badgeSpring","tween$1","duration","remaining","t","end","swap","incoming","outgoing","inMs","outMs","layer","incomingOnly","tails","index","slot","opacity","start","from","depth","delay","tailKeys","mode","delta","dx","dy","edge","offset","scale","fling","previousDepth","direction","width","channel","velocity","immediate"],"sources":["../../src/react/motion.ts"],"sourcesContent":["import type { CloudletMotionConstants, CloudletMotionOverrides } from '../react.js';\nimport { spring, tween as tweenGenerator } from './generators.js';\nimport type { Generator } from './generators.js';\n\n/**\n * Values tuned on the laboratory, the one place\n * to tune them. Durations are milliseconds at `timeScale: 1`; offsets are CSS px.\n */\nexport const MOTION = {\n /** First pill of an empty stack: scale and translateY on the spring, opacity on a `fade` ms tween (it grows, not fades). */\n enter: { duration: 200, bounce: 0.25, scale: 0.25, offset: 1, fade: 160 },\n /** Exit of the last record or of the dismissed top pill: the reverse of entering (same scale and offset). */\n exit: { duration: 300, bounce: 0 },\n /** Shape springs: opening, and collapsing or adjusting to new content. */\n shapeOpen: { stiffness: 900, damping: 60, mass: 2 },\n shapeClose: { stiffness: 900, damping: 45, mass: 1 },\n /** Tails retract in the first 150 ms of opening and return in the last 150 ms of collapsing. */\n tails: 150,\n /** Close button, body and indicator: delayed fade + 4 px on open, 70 ms fade on collapse. */\n chromeDelay: 100, chromeIn: 200, chromeOut: 70, chromeOffset: 4,\n /** Title and icon blur swap: outgoing 0→6 px and 1→0, incoming 6→0 px and 0→1. */\n headerOut: 200, headerIn: 260, blur: 6,\n /** Body crossfade: outgoing opacity, incoming opacity + translateY 4→0; a stream of updates (progress) crossfades once, then changes in place. */\n bodyOut: 120, bodyIn: 200, bodyOffset: 4, bodyQuiet: 600,\n /** Horizontal slide of the body between notifications (the heading blur-swaps in place); swipes release with it. */\n slide: { stiffness: 1200, damping: 60, mass: 1 },\n /** Badge presence (scale .6↔1, opacity), badge number and indicator text blur swap. */\n badge: { duration: 200, bounce: 0, scale: 0.6 }, countSwap: 160,\n /** Numeric progress value tween. */\n progress: 1000,\n /** Hover spreads the tails by 2 px per step. */\n hover: 200, hoverLift: 2,\n /** Reduced motion: every transition becomes an opacity change of this length; swipes are off. */\n reduced: 80,\n /**\n * Swipes: the axis is decided after `intent` px; a release commits past\n * `distance` of the swiped dimension, or after `minDistance` px with `velocity` px/ms\n * towards the commit (a flick back cancels). Edges resist with the rubber-band\n * coefficient; a trackpad swipe ends after `wheelIdle` ms without wheel events and commits\n * as soon as its release would; for `wheelLock` ms after that the same stream cannot commit\n * again (one gesture keeps accelerating), later only a faster or reversed delta starts a new swipe.\n * Released offsets spring home with the `slide` spring and the release velocity.\n * Collapsing towards the screen edge has little room: it also commits after `edge` px.\n */\n swipe: { intent: 8, distance: 0.3, minDistance: 24, velocity: 0.5, edge: 32, rubberBand: 0.55, wheelIdle: 140, wheelLock: 400, suppressClick: 500 },\n} as const;\n\n/** The tunable part of MOTION: everything but the swipe thresholds. */\nconst tunable: CloudletMotionConstants = MOTION;\nconst positive = new Set(['stiffness', 'mass']);\n\n/**\n * Resolves `ToasterMotion.overrides` (a debugging channel) onto the starting\n * values. A field that is not a finite number in range (springs: stiffness and mass > 0,\n * everything else ≥ 0) keeps its default; unknown keys are ignored.\n */\nexport function resolveMotion(overrides: CloudletMotionOverrides | undefined): CloudletMotionConstants {\n if (!overrides || typeof overrides !== 'object') return tunable;\n const valid = (key: string, value: unknown): value is number =>\n typeof value === 'number' && Number.isFinite(value) && (positive.has(key) ? value > 0 : value >= 0);\n const result: Record<string, unknown> = {};\n for (const [key, base] of Object.entries(tunable) as [string, unknown][]) {\n if (key === 'swipe') continue;\n const override = (overrides as Record<string, unknown>)[key];\n if (typeof base === 'number') result[key] = valid(key, override) ? override : base;\n else {\n const fields = { ...(base as Record<string, number>) };\n if (override && typeof override === 'object') {\n for (const field of Object.keys(fields)) {\n const value = (override as Record<string, unknown>)[field];\n if (valid(field, value)) fields[field] = value;\n }\n }\n result[key] = fields;\n }\n }\n return result as unknown as CloudletMotionConstants;\n}\n\nconst channelKeys = [\n 'opacity', 'scale', 'y', 'width', 'height', 'radius',\n 'tail1', 'tail1Opacity', 'tail2', 'tail2Opacity', 'lift', 'badge',\n 'chrome', 'chromeOut', 'headerIn', 'headerOut', 'bodyIn', 'bodyOut',\n 'slide', 'slideIn', 'slideOut', 'badgeIn', 'badgeOut', 'pageIn', 'pageOut',\n 'progress', 'exitOpacity', 'exitScale', 'exitY', 'exitX', 'headX', 'headY', 'dragX', 'dragY',\n] as const;\nexport type Channel = typeof channelKeys[number];\n/** Spatial channels jump under reduced motion; every other channel fades for MOTION.reduced. */\nconst spatial = new Set<Channel>(['scale', 'y', 'width', 'height', 'radius', 'tail1', 'tail2', 'lift', 'slide', 'progress',\n 'exitScale', 'exitY', 'exitX', 'headX', 'headY', 'dragX', 'dragY']);\nconst initial: Partial<Record<Channel, number>> = { scale: 1, headerIn: 1, bodyIn: 1, slideIn: 1, badgeIn: 1, pageIn: 1, exitScale: 1 };\n\nexport type ShellFrame = Readonly<Record<Channel, number>> & {\n readonly reduced: boolean;\n /** +1 when the incoming slide arrives from the inline end, −1 from the start. */\n readonly slideDirection: number;\n readonly slideWidth: number;\n};\nexport type SwapLayer = 'header' | 'body' | 'badge' | 'page';\nexport type ShapeMode = 'open' | 'close' | 'instant';\nexport interface ShellGeometry { readonly width: number; readonly height: number; readonly radius: number }\n/** Channels a finger moves directly: the pill or Island (`dragX`, `dragY`) and the Island content (`slide`). */\nexport type DragChannel = 'dragX' | 'dragY' | 'slide';\n/** A swipe-dismissed pill keeps flying sideways from where the finger released it. */\nexport interface Fling { readonly direction: 1 | -1; readonly distance: number; readonly velocity: number }\n\ninterface ShellMotionOptions {\n readonly now: () => number;\n readonly requestFrame: (callback: (time: number) => void) => number;\n readonly cancelFrame: (frame: number) => void;\n /** The sole DOM writer: scoped CSSOM rules and SVG attributes, never a style attribute. */\n readonly write: (frame: ShellFrame) => void;\n readonly reducedMotion?: boolean;\n readonly timeScale?: number | undefined;\n /** Resolved constants (`resolveMotion`); MOTION when omitted. */\n readonly constants?: CloudletMotionConstants | undefined;\n}\n\ntype Spec =\n | { readonly stiffness: number; readonly damping: number; readonly mass: number }\n | { readonly duration: number; readonly bounce: number }\n | { readonly tween: number };\ninterface ChannelState {\n value: number;\n target: number;\n /** Real-time units per second, independent of timeScale. */\n velocity: number;\n animation: { generator: Generator; start: number; delay: number } | null;\n}\n\nconst swaps = (m: CloudletMotionConstants): Record<SwapLayer | 'chrome', readonly [Channel, Channel, number, number]> => ({\n header: ['headerIn', 'headerOut', m.headerIn, m.headerOut],\n body: ['bodyIn', 'bodyOut', m.bodyIn, m.bodyOut],\n badge: ['badgeIn', 'badgeOut', m.countSwap, m.countSwap],\n page: ['pageIn', 'pageOut', m.countSwap, m.countSwap],\n chrome: ['chrome', 'chromeOut', m.chromeIn, m.chromeOut],\n});\nconst validScale = (value: number | undefined) => typeof value === 'number' && Number.isFinite(value) && value > 0 ? value : 1;\n\n/**\n * One RAF sampler per host over the generators of generators.ts (the numeric part of\n * Motion 14.3.0, frame-exact by the reference test): next() takes milliseconds,\n * velocity() returns the analytical units/s derivative accepted by the next\n * physical spring, so every retarget starts from the current value and speed.\n * Time-defined springs (duration/bounce) intentionally ignore velocity there.\n * `timeScale` stretches generator time for every channel at once. Nothing is\n * scheduled while idle; completion callbacks run only for the latest request\n * of their group and never synchronously.\n */\nexport function createShellMotion(options: ShellMotionOptions) {\n const values = Object.fromEntries(channelKeys.map(key => {\n const value = initial[key] ?? 0;\n return [key, { value, target: value, velocity: 0, animation: null } satisfies ChannelState];\n })) as Record<Channel, ChannelState>;\n const groups = new Map<string, { keys: readonly Channel[]; done: () => void }>();\n let frame: number | null = null;\n let disposed = false;\n let measured = false;\n let reduced = options.reducedMotion ?? false;\n let timeScale = validScale(options.timeScale);\n // Read at the start of every transition: new values apply live, running ones finish as started.\n let m = options.constants ?? tunable;\n let slideDirection = 1;\n let slideWidth = 0;\n\n const active = (keys: readonly Channel[]) => keys.some(key => values[key].animation !== null);\n const output = (): ShellFrame => {\n const result = { reduced, slideDirection, slideWidth } as Record<string, number | boolean>;\n for (const key of channelKeys) result[key] = values[key].value;\n return result as unknown as ShellFrame;\n };\n const write = () => { if (measured && !disposed) options.write(output()); };\n function sample(time: number) {\n for (const key of channelKeys) {\n const state = values[key];\n const animation = state.animation;\n if (!animation) continue;\n const elapsed = Math.max(0, (time - animation.start) * timeScale - animation.delay);\n const next = animation.generator.next(elapsed);\n state.value = next.value;\n state.velocity = next.done ? 0 : (animation.generator.velocity?.(elapsed) ?? 0) * timeScale;\n if (next.done) { state.animation = null; state.value = state.target; }\n }\n }\n function schedule() {\n if (!disposed && frame === null) frame = options.requestFrame(tick);\n }\n function complete() {\n for (const [name, group] of [...groups]) {\n if (disposed) return;\n if (groups.get(name) !== group || active(group.keys)) continue;\n // Clear before invoking: completion can synchronously retarget or dispose.\n groups.delete(name);\n group.done();\n }\n }\n function tick(time: number) {\n frame = null;\n if (disposed) return;\n sample(time);\n write();\n complete();\n if (active(channelKeys)) schedule();\n }\n function jump(key: Channel, value: number) {\n const state = values[key];\n state.value = state.target = value;\n state.velocity = 0;\n state.animation = null;\n }\n function to(key: Channel, target: number, spec: Spec, time: number, delay = 0) {\n const state = values[key];\n if (reduced) {\n if (spatial.has(key)) return jump(key, target);\n spec = { tween: m.reduced };\n delay = 0;\n }\n state.target = target;\n if (state.value === target && !state.animation) return;\n const generator = 'tween' in spec\n ? tweenGenerator(state.value, target, spec.tween)\n : spring({ from: state.value, to: target, velocity: state.velocity / timeScale, ...spec });\n state.animation = { generator, start: time, delay };\n }\n function after(name: string, keys: readonly Channel[], done?: () => void) {\n if (done) groups.set(name, { keys, done }); else groups.delete(name);\n }\n /** Shared entry for every public request: sample now, mutate, write the first frame, schedule. */\n function request(change: (time: number) => void) {\n if (disposed) return;\n const time = options.now();\n sample(time);\n change(time);\n write();\n // Completions are always delivered from a frame, never synchronously.\n if (groups.size || active(channelKeys)) schedule();\n }\n const enterSpring = () => ({ duration: m.enter.duration, bounce: m.enter.bounce });\n const exitSpring = () => ({ duration: m.exit.duration, bounce: m.exit.bounce });\n const badgeSpring = () => ({ duration: m.badge.duration, bounce: m.badge.bounce });\n const tween = (duration: number) => ({ tween: duration });\n\n /** Visual settle time of a running channel in real milliseconds (bounded, includes a pending delay). */\n function remaining(key: Channel, time: number): number {\n const animation = values[key].animation;\n if (!animation) return 0;\n const target = values[key].target;\n const elapsed = (time - animation.start) * timeScale - animation.delay;\n let t = Math.max(0, elapsed);\n for (const end = t + 2000; t < end; t += 8) {\n const next = animation.generator.next(t);\n if (next.done || Math.abs(next.value - target) < 0.5) break;\n }\n // Generators keep mutable iterator state: resample the current time.\n animation.generator.next(Math.max(0, elapsed));\n return (t - elapsed) / timeScale;\n }\n function swap(layer: SwapLayer | 'chrome', time: number, done?: () => void, incomingOnly = false) {\n const [incoming, outgoing, inMs, outMs] = swaps(m)[layer];\n // The live layer was just cloned: the snapshot continues from its current look.\n jump(outgoing, incomingOnly ? 0 : values[incoming].value);\n jump(incoming, 0);\n to(outgoing, 0, tween(outMs), time);\n to(incoming, 1, tween(inMs), time, layer === 'chrome' ? m.chromeDelay : 0);\n after(layer, [incoming, outgoing], done);\n }\n function tails(depth: number, time: number, spec: Spec, delay: number, from?: (index: number) => { slot?: number; opacity?: number }) {\n for (const index of [1, 2] as const) {\n const slot = `tail${index}` as const;\n const opacity = `tail${index}Opacity` as const;\n const start = from?.(index);\n if (start?.slot !== undefined) jump(slot, start.slot);\n if (start?.opacity !== undefined) jump(opacity, start.opacity);\n if (index <= depth) {\n to(slot, index, spec, time, delay);\n to(opacity, 1, 'tween' in spec ? spec : tween(m.tails), time, delay);\n } else to(opacity, 0, tween(m.tails), time);\n }\n }\n const tailKeys: readonly Channel[] = ['tail1', 'tail1Opacity', 'tail2', 'tail2Opacity', 'badge'];\n\n return {\n /** Target geometry measured from HTML; the first measurement and `instant` never animate. */\n setShape(target: ShellGeometry, mode: ShapeMode) {\n request(time => {\n const spec = mode === 'open' ? m.shapeOpen : m.shapeClose;\n for (const key of ['width', 'height', 'radius'] as const) {\n if (!measured || mode === 'instant') jump(key, target[key]);\n else if (values[key].target !== target[key]) to(key, target[key], spec, time);\n }\n measured = true;\n });\n },\n /**\n * The title and icon are the same nodes in both states, so a morph moves them\n * (FLIP): the layout jump is cancelled and springs back with the shape. Text never scales.\n */\n shiftHeading(dx: number, dy: number, mode: ShapeMode) {\n request(time => {\n const spec = mode === 'open' ? m.shapeOpen : m.shapeClose;\n for (const [key, delta] of [['headX', dx], ['headY', dy]] as const) {\n if (!Number.isFinite(delta) || Math.abs(delta) < 0.5) continue;\n values[key].value += delta;\n to(key, 0, spec, time);\n }\n });\n },\n /** The first pill: opacity 0→1 (tween), scale and translateY from the edge on the enter spring. */\n enter(edge: -1 | 1, done?: () => void) {\n request(time => {\n jump('opacity', 0); jump('scale', m.enter.scale); jump('y', edge * m.enter.offset);\n // The shell becomes opaque within `fade`; only scale and y follow the spring.\n to('opacity', 1, tween(m.enter.fade), time);\n for (const key of ['scale', 'y'] as const) to(key, key === 'y' ? 0 : 1, enterSpring(), time);\n after('presence', ['opacity', 'scale', 'y'], done);\n });\n },\n /** The first tail moves up into the pill's place after the top pill was dismissed. */\n rise(offset: number, scale: number, done?: () => void) {\n request(time => {\n jump('y', offset); jump('scale', scale);\n to('y', 0, enterSpring(), time); to('scale', 1, enterSpring(), time); to('opacity', 1, enterSpring(), time);\n after('presence', ['opacity', 'scale', 'y'], done);\n });\n },\n /**\n * The exit layer leaves from the shell's current presence; the shell itself is free again.\n * With a fling (swipe dismiss) the snapshot continues sideways with the release velocity\n * (px/s) instead of falling back to the edge, and the live shell returns to the centre.\n */\n exit(edge: -1 | 1, done?: () => void, fling?: Fling) {\n request(time => {\n jump('exitOpacity', values.opacity.value); jump('exitScale', values.scale.value);\n jump('exitY', values.y.value + values.dragY.value); jump('exitX', fling ? values.dragX.value : 0);\n to('exitOpacity', 0, exitSpring(), time);\n if (fling) {\n values.exitX.velocity = fling.velocity;\n to('exitX', fling.direction * fling.distance, m.slide, time);\n } else {\n to('exitScale', m.enter.scale, exitSpring(), time);\n to('exitY', edge * m.enter.offset, exitSpring(), time);\n }\n jump('dragX', 0); jump('dragY', 0);\n after('exit', ['exitOpacity', 'exitScale', 'exitY', 'exitX'], done);\n });\n },\n /** Hides the live shell at once (its look moved to the exit layer). */\n hide() { request(() => jump('opacity', 0)); },\n /**\n * Collapsed stack depth (0–2 tails). `arrival`: tails shift back from the pill;\n * `rise`: they move up one step; `settle`: spring to their slots in place.\n */\n setTails(depth: number, change: 'arrival' | 'rise' | 'settle', previousDepth: number, done?: () => void) {\n request(time => {\n if (change === 'settle') tails(depth, time, enterSpring(), 0);\n else tails(depth, time, enterSpring(), 0, index => {\n if (index > depth) return { opacity: 0 };\n if (change === 'arrival') return { slot: index - 1, opacity: 1 };\n return { slot: index + 1, opacity: index + 1 <= previousDepth ? 1 : 0 };\n });\n after('tails', tailKeys, done);\n });\n },\n setBadge(visible: boolean) { request(time => to('badge', visible ? 1 : 0, badgeSpring(), time)); },\n /** True while the layer's incoming side is still fading in: a further update joins it instead of restarting. */\n swapping(layer: SwapLayer): boolean { return !!values[swaps(m)[layer][0]].animation; },\n /** The sampler's clock (real ms), so the host's update timing follows the same source. */\n now(): number { return options.now(); },\n /** Opening: tails and badge leave in 150 ms; close, body and indicator appear after 100 ms. */\n open(done?: () => void) {\n request(time => {\n for (const index of [1, 2] as const) { to(`tail${index}`, 0, tween(m.tails), time); to(`tail${index}Opacity`, 0, tween(m.tails), time); }\n to('badge', 0, tween(m.tails), time);\n jump('chromeOut', 0);\n jump('chrome', 0);\n to('chrome', 1, tween(m.chromeIn), time, m.chromeDelay);\n after('tails', tailKeys, done);\n });\n },\n /**\n * Collapsing: the chrome snapshot fades in 70 ms while the shape springs back;\n * tails and badge return during the last 150 ms of the shape spring.\n */\n collapse(depth: number, badge: boolean, done?: { chrome?: () => void; tails?: () => void }) {\n request(time => {\n jump('chrome', 0);\n jump('chromeOut', 1);\n to('chromeOut', 0, tween(m.chromeOut), time);\n after('chrome', ['chromeOut'], done?.chrome);\n const delay = Math.max(0, Math.max(remaining('width', time), remaining('height', time)) - m.tails) * timeScale;\n tails(depth, time, tween(m.tails), delay, () => ({ slot: 0, opacity: 0 }));\n to('badge', badge ? 1 : 0, tween(m.tails), time, delay);\n after('tails', tailKeys, done?.tails);\n });\n },\n /** One outgoing snapshot per layer: a new swap restarts from the live layer's current look. */\n swap(layer: SwapLayer, done?: () => void, incomingOnly = false) {\n request(time => swap(layer, time, done, incomingOnly));\n },\n /** Slide inside a fixed shell. The outgoing snapshot follows the incoming layer one width behind. */\n slide(direction: 1 | -1, width: number, done?: () => void) {\n request(time => {\n if (reduced) {\n jump('slide', 0);\n jump('slideOut', 1); jump('slideIn', 0);\n to('slideOut', 0, tween(m.reduced), time); to('slideIn', 1, tween(m.reduced), time);\n } else {\n jump('slideOut', 1); jump('slideIn', 1);\n // Keep the strip continuous and its velocity when a slide interrupts a slide.\n const state = values.slide;\n state.value += direction * width;\n to('slide', 0, m.slide, time);\n }\n slideDirection = direction;\n slideWidth = width;\n after('slide', ['slide', 'slideIn', 'slideOut'], done);\n });\n },\n /** The finger owns the channel: no spring, no velocity until `release`. */\n drag(channel: DragChannel, value: number) {\n request(() => { if (Number.isFinite(value)) jump(channel, value); });\n },\n /**\n * The finger lets go: the channel springs home (0) with the release velocity in px/s.\n * A committed navigation instead keeps the offset and velocity and calls `slide`.\n */\n release(channel: DragChannel, velocity: number, done?: () => void) {\n request(time => {\n values[channel].velocity = Number.isFinite(velocity) ? velocity : 0;\n to(channel, 0, m.slide, time);\n after(`release:${channel}`, [channel], done);\n });\n },\n /** Sets the speed a following `slide` starts with (a swipe released towards a neighbour). */\n fling(channel: DragChannel, velocity: number) {\n if (!disposed && !values[channel].animation) values[channel].velocity = Number.isFinite(velocity) ? velocity : 0;\n },\n setProgress(value: number | null, immediate: boolean) {\n request(time => { if (value === null || immediate) jump('progress', value ?? 0); else to('progress', value, tween(m.progress), time); });\n },\n setHover(active: boolean) { request(time => to('lift', active ? 1 : 0, tween(m.hover), time)); },\n setReducedMotion(next: boolean) {\n if (disposed || reduced === next) return;\n request(time => {\n reduced = next;\n if (!reduced) return;\n for (const key of channelKeys) {\n const state = values[key];\n if (!state.animation) continue;\n if (spatial.has(key)) jump(key, state.target);\n else { state.animation = null; state.velocity = 0; to(key, state.target, tween(m.reduced), time); }\n }\n });\n },\n setTimeScale(next: number | undefined) {\n const scale = validScale(next);\n if (disposed || scale === timeScale) return;\n const time = options.now();\n sample(time);\n // Rebase running animations so their generator time stays continuous.\n for (const key of channelKeys) {\n const animation = values[key].animation;\n if (animation) animation.start = time - (time - animation.start) * timeScale / scale;\n }\n timeScale = scale;\n },\n /** New constants apply to transitions started from now on; running ones keep their curves. */\n setConstants(next: CloudletMotionConstants) { m = next; },\n /** The constants in effect (the renderer reads offsets and blur from them). */\n get constants() { return m; },\n /** True while a frame is scheduled; an idle host never keeps a RAF loop. */\n get running() { return frame !== null; },\n dispose() {\n if (disposed) return;\n disposed = true;\n if (frame !== null) options.cancelFrame(frame);\n frame = null;\n groups.clear();\n for (const key of channelKeys) values[key].animation = null;\n },\n };\n}\n\nexport type ShellMotion = ReturnType<typeof createShellMotion>;\n"],"mappings":";;AAQA,IAAaE,IAAS;CAEpB,OAAO;EAAE,UAAU;EAAK,QAAQ;EAAM,OAAO;EAAM,QAAQ;EAAG,MAAM;CAAI;CAExE,MAAM;EAAE,UAAU;EAAK,QAAQ;CAAE;CAEjC,WAAW;EAAE,WAAW;EAAK,SAAS;EAAI,MAAM;CAAE;CAClD,YAAY;EAAE,WAAW;EAAK,SAAS;EAAI,MAAM;CAAE;CAEnD,OAAO;CAEP,aAAa;CAAK,UAAU;CAAK,WAAW;CAAI,cAAc;CAE9D,WAAW;CAAK,UAAU;CAAK,MAA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MAAW,EAAU,QAAQE,KAAQA,IAAOF,EAAU,SAAST,IAAY0D;GACjF;GACA,IAAYA;EACd;EAEA,aAAa,GAA+B;GAAE,IAAI9C;EAAM;EAExD,IAAI,YAAY;GAAE,OAAOtB;EAAG;EAE5B,IAAI,UAAU;GAAE,OAAOK,MAAU;EAAM;EACvC,UAAU;GACR,IAAI,IACJ;IAGA,AAHA,IAAW,IACPA,MAAU,QAAMI,EAAQ,YAAYJ,CAAK,GAC7C,IAAQ,MACRD,EAAO,MAAM;IACb,KAAK,IAAMd,KAAOM,GAAa,EAAON,EAAI,CAAC,YAAY;GAJ5C;EAKb;CACF;AACF"}
1
+ {"version":3,"file":"motion.js","names":["tweenGenerator","tween","MOTION","tunable","positive","resolveMotion","overrides","valid","value","key","result","base","override","fields","field","channelKeys","spatial","initial","swaps","m","validScale","createShellMotion","values","groups","frame","disposed","measured","reduced","options","timeScale","slideDirection","slideWidth","active","keys","output","write","sample","state","animation","elapsed","time","next","schedule","tick","complete","name","group","jump","to","target","spec","tween","spring","after","done","request","change","enterSpring","exitSpring","badgeSpring","tween$1","duration","remaining","t","end","swap","incoming","outgoing","inMs","outMs","layer","incomingOnly","tails","index","slot","opacity","start","from","depth","delay","tailKeys","mode","delta","dx","dy","edge","offset","scale","fling","previousDepth","direction","width","channel","velocity","immediate"],"sources":["../../src/react/motion.ts"],"sourcesContent":["import type { CloudletMotionConstants, CloudletMotionOverrides } from '../react.js';\nimport { spring, tween as tweenGenerator } from './generators.js';\nimport type { Generator } from './generators.js';\n\n/**\n * Values tuned on the laboratory, the one place\n * to tune them. Durations are milliseconds at `timeScale: 1`; offsets are CSS px.\n */\nexport const MOTION = {\n /** First pill of an empty stack: scale and translateY on the spring, opacity on a `fade` ms tween (it grows, not fades). */\n enter: { duration: 200, bounce: 0.25, scale: 0.25, offset: 1, fade: 160 },\n /** Exit of the last record or of the dismissed top pill: the reverse of entering (same scale and offset). */\n exit: { duration: 300, bounce: 0 },\n /** Shape springs: opening, and collapsing or adjusting to new content. */\n shapeOpen: { stiffness: 900, damping: 60, mass: 2 },\n shapeClose: { stiffness: 900, damping: 45, mass: 1 },\n /** Tails retract in the first 150 ms of opening and return in the last 150 ms of collapsing. */\n tails: 150,\n /** Close button, body and indicator: delayed fade + 4 px on open, 70 ms fade on collapse. */\n chromeDelay: 100, chromeIn: 200, chromeOut: 70, chromeOffset: 4,\n /** Title and icon blur swap: outgoing 0→6 px and 1→0, incoming 6→0 px and 0→1. */\n headerOut: 200, headerIn: 260, blur: 6,\n /** Body crossfade: outgoing opacity, incoming opacity + translateY 4→0; a stream of updates (progress) crossfades once, then changes in place. */\n bodyOut: 120, bodyIn: 200, bodyOffset: 4, bodyQuiet: 600,\n /** Horizontal slide of the body between notifications (the heading blur-swaps in place); swipes release with it. */\n slide: { stiffness: 1200, damping: 60, mass: 1 },\n /** Badge presence (scale .6↔1, opacity), badge number and indicator text blur swap. */\n badge: { duration: 200, bounce: 0, scale: 0.6 }, countSwap: 160,\n /** Numeric progress value tween. */\n progress: 1000,\n /** Hover spreads the tails by 2 px per step. */\n hover: 200, hoverLift: 2,\n /** Reduced motion: every transition becomes an opacity change of this length; swipes are off. */\n reduced: 80,\n /**\n * Swipes: the axis is decided after `intent` px; the content follows the finger 1:1. A release\n * commits past `distance` of the swiped dimension, or as a flick: at least `flick` px of travel\n * with a release speed of `velocity` px/ms or more towards the commit (a flick back cancels).\n * The release speed is the travel over the last `window` ms of input, at most `maxVelocity`\n * px/ms, so events that arrive in a burst (a stall, batched trackpad deltas) are no flick, and a\n * pause before letting go is none either. Edges resist with the rubber-band coefficient over\n * `resist` px where the swipe has nowhere to go; a trackpad swipe ends after `wheelIdle` ms\n * without wheel events and commits as soon as its release would; for `wheelLock` ms after that\n * the same stream cannot commit again (one gesture keeps accelerating), later only a faster or\n * reversed delta starts a new swipe. Released offsets spring home with the `slide` spring and the\n * release velocity. Collapsing towards the screen edge has little room: it also commits after\n * `edge` px.\n */\n swipe: {\n intent: 8, distance: 0.4, flick: 60, velocity: 0.6, maxVelocity: 3, window: 100, resist: 24,\n edge: 32, rubberBand: 0.55, wheelIdle: 140, wheelLock: 400, suppressClick: 500,\n },\n} as const;\n\n/** The tunable part of MOTION: everything but the swipe thresholds. */\nconst tunable: CloudletMotionConstants = MOTION;\nconst positive = new Set(['stiffness', 'mass']);\n\n/**\n * Resolves `ToasterMotion.overrides` (a debugging channel) onto the starting\n * values. A field that is not a finite number in range (springs: stiffness and mass > 0,\n * everything else ≥ 0) keeps its default; unknown keys are ignored.\n */\nexport function resolveMotion(overrides: CloudletMotionOverrides | undefined): CloudletMotionConstants {\n if (!overrides || typeof overrides !== 'object') return tunable;\n const valid = (key: string, value: unknown): value is number =>\n typeof value === 'number' && Number.isFinite(value) && (positive.has(key) ? value > 0 : value >= 0);\n const result: Record<string, unknown> = {};\n for (const [key, base] of Object.entries(tunable) as [string, unknown][]) {\n if (key === 'swipe') continue;\n const override = (overrides as Record<string, unknown>)[key];\n if (typeof base === 'number') result[key] = valid(key, override) ? override : base;\n else {\n const fields = { ...(base as Record<string, number>) };\n if (override && typeof override === 'object') {\n for (const field of Object.keys(fields)) {\n const value = (override as Record<string, unknown>)[field];\n if (valid(field, value)) fields[field] = value;\n }\n }\n result[key] = fields;\n }\n }\n return result as unknown as CloudletMotionConstants;\n}\n\nconst channelKeys = [\n 'opacity', 'scale', 'y', 'width', 'height', 'radius',\n 'tail1', 'tail1Opacity', 'tail2', 'tail2Opacity', 'lift', 'badge',\n 'chrome', 'chromeOut', 'headerIn', 'headerOut', 'bodyIn', 'bodyOut',\n 'slide', 'slideIn', 'slideOut', 'badgeIn', 'badgeOut', 'pageIn', 'pageOut',\n 'progress', 'exitOpacity', 'exitScale', 'exitY', 'exitX', 'headX', 'headY', 'dragX', 'dragY',\n] as const;\nexport type Channel = typeof channelKeys[number];\n/** Spatial channels jump under reduced motion; every other channel fades for MOTION.reduced. */\nconst spatial = new Set<Channel>(['scale', 'y', 'width', 'height', 'radius', 'tail1', 'tail2', 'lift', 'slide', 'progress',\n 'exitScale', 'exitY', 'exitX', 'headX', 'headY', 'dragX', 'dragY']);\nconst initial: Partial<Record<Channel, number>> = { scale: 1, headerIn: 1, bodyIn: 1, slideIn: 1, badgeIn: 1, pageIn: 1, exitScale: 1 };\n\nexport type ShellFrame = Readonly<Record<Channel, number>> & {\n readonly reduced: boolean;\n /** +1 when the incoming slide arrives from the inline end, −1 from the start. */\n readonly slideDirection: number;\n readonly slideWidth: number;\n};\nexport type SwapLayer = 'header' | 'body' | 'badge' | 'page';\nexport type ShapeMode = 'open' | 'close' | 'instant';\nexport interface ShellGeometry { readonly width: number; readonly height: number; readonly radius: number }\n/** Channels a finger moves directly: the pill or Island (`dragX`, `dragY`) and the Island content (`slide`). */\nexport type DragChannel = 'dragX' | 'dragY' | 'slide';\n/** A swipe-dismissed pill keeps flying sideways from where the finger released it. */\nexport interface Fling { readonly direction: 1 | -1; readonly distance: number; readonly velocity: number }\n\ninterface ShellMotionOptions {\n readonly now: () => number;\n readonly requestFrame: (callback: (time: number) => void) => number;\n readonly cancelFrame: (frame: number) => void;\n /** The sole DOM writer: scoped CSSOM rules and SVG attributes, never a style attribute. */\n readonly write: (frame: ShellFrame) => void;\n readonly reducedMotion?: boolean;\n readonly timeScale?: number | undefined;\n /** Resolved constants (`resolveMotion`); MOTION when omitted. */\n readonly constants?: CloudletMotionConstants | undefined;\n}\n\ntype Spec =\n | { readonly stiffness: number; readonly damping: number; readonly mass: number }\n | { readonly duration: number; readonly bounce: number }\n | { readonly tween: number };\ninterface ChannelState {\n value: number;\n target: number;\n /** Real-time units per second, independent of timeScale. */\n velocity: number;\n animation: { generator: Generator; start: number; delay: number } | null;\n}\n\nconst swaps = (m: CloudletMotionConstants): Record<SwapLayer | 'chrome', readonly [Channel, Channel, number, number]> => ({\n header: ['headerIn', 'headerOut', m.headerIn, m.headerOut],\n body: ['bodyIn', 'bodyOut', m.bodyIn, m.bodyOut],\n badge: ['badgeIn', 'badgeOut', m.countSwap, m.countSwap],\n page: ['pageIn', 'pageOut', m.countSwap, m.countSwap],\n chrome: ['chrome', 'chromeOut', m.chromeIn, m.chromeOut],\n});\nconst validScale = (value: number | undefined) => typeof value === 'number' && Number.isFinite(value) && value > 0 ? value : 1;\n\n/**\n * One RAF sampler per host over the generators of generators.ts (the numeric part of\n * Motion 14.3.0, frame-exact by the reference test): next() takes milliseconds,\n * velocity() returns the analytical units/s derivative accepted by the next\n * physical spring, so every retarget starts from the current value and speed.\n * Time-defined springs (duration/bounce) intentionally ignore velocity there.\n * `timeScale` stretches generator time for every channel at once. Nothing is\n * scheduled while idle; completion callbacks run only for the latest request\n * of their group and never synchronously.\n */\nexport function createShellMotion(options: ShellMotionOptions) {\n const values = Object.fromEntries(channelKeys.map(key => {\n const value = initial[key] ?? 0;\n return [key, { value, target: value, velocity: 0, animation: null } satisfies ChannelState];\n })) as Record<Channel, ChannelState>;\n const groups = new Map<string, { keys: readonly Channel[]; done: () => void }>();\n let frame: number | null = null;\n let disposed = false;\n let measured = false;\n let reduced = options.reducedMotion ?? false;\n let timeScale = validScale(options.timeScale);\n // Read at the start of every transition: new values apply live, running ones finish as started.\n let m = options.constants ?? tunable;\n let slideDirection = 1;\n let slideWidth = 0;\n\n const active = (keys: readonly Channel[]) => keys.some(key => values[key].animation !== null);\n const output = (): ShellFrame => {\n const result = { reduced, slideDirection, slideWidth } as Record<string, number | boolean>;\n for (const key of channelKeys) result[key] = values[key].value;\n return result as unknown as ShellFrame;\n };\n const write = () => { if (measured && !disposed) options.write(output()); };\n function sample(time: number) {\n for (const key of channelKeys) {\n const state = values[key];\n const animation = state.animation;\n if (!animation) continue;\n const elapsed = Math.max(0, (time - animation.start) * timeScale - animation.delay);\n const next = animation.generator.next(elapsed);\n state.value = next.value;\n state.velocity = next.done ? 0 : (animation.generator.velocity?.(elapsed) ?? 0) * timeScale;\n if (next.done) { state.animation = null; state.value = state.target; }\n }\n }\n function schedule() {\n if (!disposed && frame === null) frame = options.requestFrame(tick);\n }\n function complete() {\n for (const [name, group] of [...groups]) {\n if (disposed) return;\n if (groups.get(name) !== group || active(group.keys)) continue;\n // Clear before invoking: completion can synchronously retarget or dispose.\n groups.delete(name);\n group.done();\n }\n }\n function tick(time: number) {\n frame = null;\n if (disposed) return;\n sample(time);\n write();\n complete();\n if (active(channelKeys)) schedule();\n }\n function jump(key: Channel, value: number) {\n const state = values[key];\n state.value = state.target = value;\n state.velocity = 0;\n state.animation = null;\n }\n function to(key: Channel, target: number, spec: Spec, time: number, delay = 0) {\n const state = values[key];\n if (reduced) {\n if (spatial.has(key)) return jump(key, target);\n spec = { tween: m.reduced };\n delay = 0;\n }\n state.target = target;\n if (state.value === target && !state.animation) return;\n const generator = 'tween' in spec\n ? tweenGenerator(state.value, target, spec.tween)\n : spring({ from: state.value, to: target, velocity: state.velocity / timeScale, ...spec });\n state.animation = { generator, start: time, delay };\n }\n function after(name: string, keys: readonly Channel[], done?: () => void) {\n if (done) groups.set(name, { keys, done }); else groups.delete(name);\n }\n /** Shared entry for every public request: sample now, mutate, write the first frame, schedule. */\n function request(change: (time: number) => void) {\n if (disposed) return;\n const time = options.now();\n sample(time);\n change(time);\n write();\n // Completions are always delivered from a frame, never synchronously.\n if (groups.size || active(channelKeys)) schedule();\n }\n const enterSpring = () => ({ duration: m.enter.duration, bounce: m.enter.bounce });\n const exitSpring = () => ({ duration: m.exit.duration, bounce: m.exit.bounce });\n const badgeSpring = () => ({ duration: m.badge.duration, bounce: m.badge.bounce });\n const tween = (duration: number) => ({ tween: duration });\n\n /** Visual settle time of a running channel in real milliseconds (bounded, includes a pending delay). */\n function remaining(key: Channel, time: number): number {\n const animation = values[key].animation;\n if (!animation) return 0;\n const target = values[key].target;\n const elapsed = (time - animation.start) * timeScale - animation.delay;\n let t = Math.max(0, elapsed);\n for (const end = t + 2000; t < end; t += 8) {\n const next = animation.generator.next(t);\n if (next.done || Math.abs(next.value - target) < 0.5) break;\n }\n // Generators keep mutable iterator state: resample the current time.\n animation.generator.next(Math.max(0, elapsed));\n return (t - elapsed) / timeScale;\n }\n function swap(layer: SwapLayer | 'chrome', time: number, done?: () => void, incomingOnly = false) {\n const [incoming, outgoing, inMs, outMs] = swaps(m)[layer];\n // The live layer was just cloned: the snapshot continues from its current look.\n jump(outgoing, incomingOnly ? 0 : values[incoming].value);\n jump(incoming, 0);\n to(outgoing, 0, tween(outMs), time);\n to(incoming, 1, tween(inMs), time, layer === 'chrome' ? m.chromeDelay : 0);\n after(layer, [incoming, outgoing], done);\n }\n function tails(depth: number, time: number, spec: Spec, delay: number, from?: (index: number) => { slot?: number; opacity?: number }) {\n for (const index of [1, 2] as const) {\n const slot = `tail${index}` as const;\n const opacity = `tail${index}Opacity` as const;\n const start = from?.(index);\n if (start?.slot !== undefined) jump(slot, start.slot);\n if (start?.opacity !== undefined) jump(opacity, start.opacity);\n if (index <= depth) {\n to(slot, index, spec, time, delay);\n to(opacity, 1, 'tween' in spec ? spec : tween(m.tails), time, delay);\n } else to(opacity, 0, tween(m.tails), time);\n }\n }\n const tailKeys: readonly Channel[] = ['tail1', 'tail1Opacity', 'tail2', 'tail2Opacity', 'badge'];\n\n return {\n /** Target geometry measured from HTML; the first measurement and `instant` never animate. */\n setShape(target: ShellGeometry, mode: ShapeMode) {\n request(time => {\n const spec = mode === 'open' ? m.shapeOpen : m.shapeClose;\n for (const key of ['width', 'height', 'radius'] as const) {\n if (!measured || mode === 'instant') jump(key, target[key]);\n else if (values[key].target !== target[key]) to(key, target[key], spec, time);\n }\n measured = true;\n });\n },\n /**\n * The title and icon are the same nodes in both states, so a morph moves them\n * (FLIP): the layout jump is cancelled and springs back with the shape. Text never scales.\n */\n shiftHeading(dx: number, dy: number, mode: ShapeMode) {\n request(time => {\n const spec = mode === 'open' ? m.shapeOpen : m.shapeClose;\n for (const [key, delta] of [['headX', dx], ['headY', dy]] as const) {\n if (!Number.isFinite(delta) || Math.abs(delta) < 0.5) continue;\n values[key].value += delta;\n to(key, 0, spec, time);\n }\n });\n },\n /** The first pill: opacity 0→1 (tween), scale and translateY from the edge on the enter spring. */\n enter(edge: -1 | 1, done?: () => void) {\n request(time => {\n jump('opacity', 0); jump('scale', m.enter.scale); jump('y', edge * m.enter.offset);\n // The shell becomes opaque within `fade`; only scale and y follow the spring.\n to('opacity', 1, tween(m.enter.fade), time);\n for (const key of ['scale', 'y'] as const) to(key, key === 'y' ? 0 : 1, enterSpring(), time);\n after('presence', ['opacity', 'scale', 'y'], done);\n });\n },\n /** The first tail moves up into the pill's place after the top pill was dismissed. */\n rise(offset: number, scale: number, done?: () => void) {\n request(time => {\n jump('y', offset); jump('scale', scale);\n to('y', 0, enterSpring(), time); to('scale', 1, enterSpring(), time); to('opacity', 1, enterSpring(), time);\n after('presence', ['opacity', 'scale', 'y'], done);\n });\n },\n /**\n * The exit layer leaves from the shell's current presence; the shell itself is free again.\n * With a fling (swipe dismiss) the snapshot continues sideways with the release velocity\n * (px/s) instead of falling back to the edge, and the live shell returns to the centre.\n */\n exit(edge: -1 | 1, done?: () => void, fling?: Fling) {\n request(time => {\n jump('exitOpacity', values.opacity.value); jump('exitScale', values.scale.value);\n jump('exitY', values.y.value + values.dragY.value); jump('exitX', fling ? values.dragX.value : 0);\n to('exitOpacity', 0, exitSpring(), time);\n if (fling) {\n values.exitX.velocity = fling.velocity;\n to('exitX', fling.direction * fling.distance, m.slide, time);\n } else {\n to('exitScale', m.enter.scale, exitSpring(), time);\n to('exitY', edge * m.enter.offset, exitSpring(), time);\n }\n jump('dragX', 0); jump('dragY', 0);\n after('exit', ['exitOpacity', 'exitScale', 'exitY', 'exitX'], done);\n });\n },\n /** Hides the live shell at once (its look moved to the exit layer). */\n hide() { request(() => jump('opacity', 0)); },\n /**\n * Collapsed stack depth (0–2 tails). `arrival`: tails shift back from the pill;\n * `rise`: they move up one step; `settle`: spring to their slots in place.\n */\n setTails(depth: number, change: 'arrival' | 'rise' | 'settle', previousDepth: number, done?: () => void) {\n request(time => {\n if (change === 'settle') tails(depth, time, enterSpring(), 0);\n else tails(depth, time, enterSpring(), 0, index => {\n if (index > depth) return { opacity: 0 };\n if (change === 'arrival') return { slot: index - 1, opacity: 1 };\n return { slot: index + 1, opacity: index + 1 <= previousDepth ? 1 : 0 };\n });\n after('tails', tailKeys, done);\n });\n },\n setBadge(visible: boolean) { request(time => to('badge', visible ? 1 : 0, badgeSpring(), time)); },\n /** True while the layer's incoming side is still fading in: a further update joins it instead of restarting. */\n swapping(layer: SwapLayer): boolean { return !!values[swaps(m)[layer][0]].animation; },\n /** The sampler's clock (real ms), so the host's update timing follows the same source. */\n now(): number { return options.now(); },\n /** Opening: tails and badge leave in 150 ms; close, body and indicator appear after 100 ms. */\n open(done?: () => void) {\n request(time => {\n for (const index of [1, 2] as const) { to(`tail${index}`, 0, tween(m.tails), time); to(`tail${index}Opacity`, 0, tween(m.tails), time); }\n to('badge', 0, tween(m.tails), time);\n jump('chromeOut', 0);\n jump('chrome', 0);\n to('chrome', 1, tween(m.chromeIn), time, m.chromeDelay);\n after('tails', tailKeys, done);\n });\n },\n /**\n * Collapsing: the chrome snapshot fades in 70 ms while the shape springs back;\n * tails and badge return during the last 150 ms of the shape spring.\n */\n collapse(depth: number, badge: boolean, done?: { chrome?: () => void; tails?: () => void }) {\n request(time => {\n jump('chrome', 0);\n jump('chromeOut', 1);\n to('chromeOut', 0, tween(m.chromeOut), time);\n after('chrome', ['chromeOut'], done?.chrome);\n const delay = Math.max(0, Math.max(remaining('width', time), remaining('height', time)) - m.tails) * timeScale;\n tails(depth, time, tween(m.tails), delay, () => ({ slot: 0, opacity: 0 }));\n to('badge', badge ? 1 : 0, tween(m.tails), time, delay);\n after('tails', tailKeys, done?.tails);\n });\n },\n /** One outgoing snapshot per layer: a new swap restarts from the live layer's current look. */\n swap(layer: SwapLayer, done?: () => void, incomingOnly = false) {\n request(time => swap(layer, time, done, incomingOnly));\n },\n /** Slide inside a fixed shell. The outgoing snapshot follows the incoming layer one width behind. */\n slide(direction: 1 | -1, width: number, done?: () => void) {\n request(time => {\n if (reduced) {\n jump('slide', 0);\n jump('slideOut', 1); jump('slideIn', 0);\n to('slideOut', 0, tween(m.reduced), time); to('slideIn', 1, tween(m.reduced), time);\n } else {\n jump('slideOut', 1); jump('slideIn', 1);\n // Keep the strip continuous and its velocity when a slide interrupts a slide.\n const state = values.slide;\n state.value += direction * width;\n to('slide', 0, m.slide, time);\n }\n slideDirection = direction;\n slideWidth = width;\n after('slide', ['slide', 'slideIn', 'slideOut'], done);\n });\n },\n /** The finger owns the channel: no spring, no velocity until `release`. */\n drag(channel: DragChannel, value: number) {\n request(() => { if (Number.isFinite(value)) jump(channel, value); });\n },\n /**\n * The finger lets go: the channel springs home (0) with the release velocity in px/s.\n * A committed navigation instead keeps the offset and velocity and calls `slide`.\n */\n release(channel: DragChannel, velocity: number, done?: () => void) {\n request(time => {\n values[channel].velocity = Number.isFinite(velocity) ? velocity : 0;\n to(channel, 0, m.slide, time);\n after(`release:${channel}`, [channel], done);\n });\n },\n /** Sets the speed a following `slide` starts with (a swipe released towards a neighbour). */\n fling(channel: DragChannel, velocity: number) {\n if (!disposed && !values[channel].animation) values[channel].velocity = Number.isFinite(velocity) ? velocity : 0;\n },\n setProgress(value: number | null, immediate: boolean) {\n request(time => { if (value === null || immediate) jump('progress', value ?? 0); else to('progress', value, tween(m.progress), time); });\n },\n setHover(active: boolean) { request(time => to('lift', active ? 1 : 0, tween(m.hover), time)); },\n setReducedMotion(next: boolean) {\n if (disposed || reduced === next) return;\n request(time => {\n reduced = next;\n if (!reduced) return;\n for (const key of channelKeys) {\n const state = values[key];\n if (!state.animation) continue;\n if (spatial.has(key)) jump(key, state.target);\n else { state.animation = null; state.velocity = 0; to(key, state.target, tween(m.reduced), time); }\n }\n });\n },\n setTimeScale(next: number | undefined) {\n const scale = validScale(next);\n if (disposed || scale === timeScale) return;\n const time = options.now();\n sample(time);\n // Rebase running animations so their generator time stays continuous.\n for (const key of channelKeys) {\n const animation = values[key].animation;\n if (animation) animation.start = time - (time - animation.start) * timeScale / scale;\n }\n timeScale = scale;\n },\n /** New constants apply to transitions started from now on; running ones keep their curves. */\n setConstants(next: CloudletMotionConstants) { m = next; },\n /** The constants in effect (the renderer reads offsets and blur from them). */\n get constants() { return m; },\n /** True while a frame is scheduled; an idle host never keeps a RAF loop. */\n get running() { return frame !== null; },\n dispose() {\n if (disposed) return;\n disposed = true;\n if (frame !== null) options.cancelFrame(frame);\n frame = null;\n groups.clear();\n for (const key of channelKeys) values[key].animation = null;\n },\n };\n}\n\nexport type ShellMotion = ReturnType<typeof createShellMotion>;\n"],"mappings":";;AAQA,IAAaE,IAAS;CAEpB,OAAO;EAAE,UAAU;EAAK,QAAQ;EAAM,OAAO;EAAM,QAAQ;EAAG,MAAM;CAAI;CAExE,MAAM;EAAE,UAAU;EAAK,QAAQ;CAAE;CAEjC,WAAW;EAAE,WAAW;EAAK,SAAS;EAAI,MAAM;CAAE;CAClD,YAAY;EAAE,WAAW;EAAK,SAAS;EAAI,MAAM;CAAE;CAEnD,OAAO;CAEP,aAAa;CAAK,UAAU;CAAK,WAAW;CAAI,cAAc;CAE9D,WAAW;CAAK,UAAU;CAAK,MAAM;CAErC,SAAS;CAAK,QAAQ;CAAK,YAAY;CAAG,WAAW;CAErD,OAAO;EAAE,WAAW;EAAM,SAAS;EAAI,MAAM;CAAE;CAE/C,OAAO;EAAE,UAAU;EAAK,QAAQ;EAAG,OAAO;CAAI;CAAG,WAAW;CAE5D,UAAU;CAEV,OAAO;CAAK,WAAW;CAEvB,SAAS;CAeT,OAAO;EACL,QAAQ;EAAG,UAAU;EAAK,OAAO;EAAI,UAAU;EAAK,aAAa;EAAG,QAAQ;EAAK,QAAQ;EACzF,MAAM;EAAI,YAAY;EAAM,WAAW;EAAK,WAAW;EAAK,eAAe;CAC7E;AACF,GAGMC,IAAmCD,GACnCE,oBAAW,IAAI,IAAI,CAAC,aAAa,MAAM,CAAC;AAO9C,SAAgBC,EAAc,GAAyE;CACrG,IAAI,CAACC,KAAa,OAAOA,KAAc,UAAU,OAAO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;EACA,SAAS,GAAiB;GAAE,GAAQ,MAAQQ,EAAG,QAAQ,MAAgB/C,EAAMkB,EAAE,KAAK,GAAGqB,CAAI,CAAC;EAAG;EAC/F,iBAAiB,GAAe;GAC9B,AAAIf,KAAYE,MAAYc,KAC5Bc,GAAQ,MAAQ;IAEd,IADA,IAAUd,GACLd,GACL,KAAK,IAAMlB,KAAOM,GAAa;KAC7B,IAAMsB,IAAQf,EAAOb;KACrB,AAAK4B,EAAM,cACPrB,EAAQ,IAAIP,CAAG,IAAGsC,EAAKtC,GAAK4B,EAAM,MAAM,KACrC,EAAM,YAAY,MAAM,EAAM,WAAW,GAAGW,EAAGvC,GAAK4B,EAAM,QAAQpC,EAAMkB,EAAE,OAAO,GAAGqB,CAAI;IACjG;GACF,CAAC;EACH;EACA,aAAa,GAA0B;GACrC,IAAM+C,IAAQnE,EAAWqB,CAAI;GAC7B,IAAIhB,KAAY8D,MAAU1D,GAAW;GACrC,IAAMW,IAAOZ,EAAQ,IAAI;GACzB,EAAOY,CAAI;GAEX,KAAK,IAAM/B,KAAOM,GAAa;IAC7B,IAAMuB,IAAYhB,EAAOb,EAAI,CAAC;IAC9B,AAAI6B,MAAW,EAAU,QAAQE,KAAQA,IAAOF,EAAU,SAAST,IAAY0D;GACjF;GACA,IAAYA;EACd;EAEA,aAAa,GAA+B;GAAE,IAAI9C;EAAM;EAExD,IAAI,YAAY;GAAE,OAAOtB;EAAG;EAE5B,IAAI,UAAU;GAAE,OAAOK,MAAU;EAAM;EACvC,UAAU;GACR,IAAI,IACJ;IAGA,AAHA,IAAW,IACPA,MAAU,QAAMI,EAAQ,YAAYJ,CAAK,GAC7C,IAAQ,MACRD,EAAO,MAAM;IACb,KAAK,IAAMd,KAAOM,GAAa,EAAON,EAAI,CAAC,YAAY;GAJ5C;EAKb;CACF;AACF"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Watches `attribute` on the ancestors of `root`, by presence: `present()` says whether one of them
3
+ * has it, `onChange` runs whenever it is set, changed or removed on any of them, `dispose` stops
4
+ * listening. The search starts at the parent, so the root's own attribute never counts, and only the
5
+ * ancestor chain is observed, for this one attribute.
6
+ */
7
+ export declare function watchAncestorAttribute(root: HTMLElement, attribute: string, onChange: () => void): {
8
+ present: () => boolean;
9
+ dispose(): void;
10
+ };
11
+ /**
12
+ * Reduced motion as the Toaster's host and the notification center's panel read it, live: the
13
+ * system's `prefers-reduced-motion: reduce`, the app's own `reducedMotion` prop, or
14
+ * `data-reduced-motion` on any ancestor of `root` (by presence, as the registry components read
15
+ * it). The app's setting can only add calm. The search starts at the parent, so the root's own
16
+ * output attribute never feeds back. `onChange` runs on every change after the first reading;
17
+ * `sync` re-reads after a render (the prop); `dispose` stops listening.
18
+ */
19
+ export declare function watchReducedMotion(root: HTMLElement, prop: () => boolean, onChange: (reduced: boolean) => void): {
20
+ readonly reduced: boolean;
21
+ sync: () => void;
22
+ dispose(): void;
23
+ };
24
+ //# sourceMappingURL=reduced.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reduced.d.ts","sourceRoot":"","sources":["../../src/react/reduced.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI;IAO7F,OAAO;IACP,OAAO;EAEV;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI;;;;EAyB9G"}
@@ -0,0 +1,35 @@
1
+ //#region src/react/reduced.ts
2
+ function e(e, t, n) {
3
+ let r = e.ownerDocument.defaultView, i = r?.MutationObserver ? new r.MutationObserver(n) : null;
4
+ for (let n = e.parentElement; n && i; n = n.parentElement) i.observe(n, {
5
+ attributes: !0,
6
+ attributeFilter: [t]
7
+ });
8
+ return {
9
+ present: () => !!e.parentElement?.closest(`[${t}]`),
10
+ dispose() {
11
+ i?.disconnect();
12
+ }
13
+ };
14
+ }
15
+ function t(t, n, r) {
16
+ let i = t.ownerDocument.defaultView?.matchMedia?.("(prefers-reduced-motion: reduce)"), a = e(t, "data-reduced-motion", () => {
17
+ o = a.present(), l();
18
+ }), o = a.present(), s = () => (i?.matches ?? !1) || n() || o, c = s(), l = () => {
19
+ let e = s();
20
+ e !== c && (c = e, r(c));
21
+ };
22
+ return i?.addEventListener("change", l), {
23
+ get reduced() {
24
+ return c;
25
+ },
26
+ sync: l,
27
+ dispose() {
28
+ i?.removeEventListener("change", l), a.dispose();
29
+ }
30
+ };
31
+ }
32
+ //#endregion
33
+ export { e as watchAncestorAttribute, t as watchReducedMotion };
34
+
35
+ //# sourceMappingURL=reduced.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reduced.js","names":["watchAncestorAttribute","view","root","observer","onChange","node","attribute","watchReducedMotion","media","ancestors","sync","fromAncestor","resolve","prop","reduced","next"],"sources":["../../src/react/reduced.ts"],"sourcesContent":["/**\n * Watches `attribute` on the ancestors of `root`, by presence: `present()` says whether one of them\n * has it, `onChange` runs whenever it is set, changed or removed on any of them, `dispose` stops\n * listening. The search starts at the parent, so the root's own attribute never counts, and only the\n * ancestor chain is observed, for this one attribute.\n */\nexport function watchAncestorAttribute(root: HTMLElement, attribute: string, onChange: () => void) {\n const view = root.ownerDocument.defaultView;\n const observer = view?.MutationObserver ? new view.MutationObserver(onChange) : null;\n for (let node = root.parentElement; node && observer; node = node.parentElement) {\n observer.observe(node, { attributes: true, attributeFilter: [attribute] });\n }\n return {\n present: () => !!root.parentElement?.closest(`[${attribute}]`),\n dispose() { observer?.disconnect(); },\n };\n}\n\n/**\n * Reduced motion as the Toaster's host and the notification center's panel read it, live: the\n * system's `prefers-reduced-motion: reduce`, the app's own `reducedMotion` prop, or\n * `data-reduced-motion` on any ancestor of `root` (by presence, as the registry components read\n * it). The app's setting can only add calm. The search starts at the parent, so the root's own\n * output attribute never feeds back. `onChange` runs on every change after the first reading;\n * `sync` re-reads after a render (the prop); `dispose` stops listening.\n */\nexport function watchReducedMotion(root: HTMLElement, prop: () => boolean, onChange: (reduced: boolean) => void) {\n const view = root.ownerDocument.defaultView;\n const media = view?.matchMedia?.('(prefers-reduced-motion: reduce)');\n const ancestors = watchAncestorAttribute(root, 'data-reduced-motion', () => {\n fromAncestor = ancestors.present();\n sync();\n });\n let fromAncestor = ancestors.present();\n const resolve = () => (media?.matches ?? false) || prop() || fromAncestor;\n let reduced = resolve();\n const sync = () => {\n const next = resolve();\n if (next === reduced) return;\n reduced = next;\n onChange(reduced);\n };\n media?.addEventListener('change', sync);\n return {\n get reduced() { return reduced; },\n sync,\n dispose() {\n media?.removeEventListener('change', sync);\n ancestors.dispose();\n },\n };\n}\n"],"mappings":";AAMA,SAAgBA,EAAuB,GAAmB,GAAmB,GAAsB;CACjG,IAAMC,IAAOC,EAAK,cAAc,aAC1BC,IAAWF,GAAM,mBAAmB,IAAIA,EAAK,iBAAiBG,CAAQ,IAAI;CAChF,KAAK,IAAIC,IAAOH,EAAK,eAAeG,KAAQF,GAAU,IAAOE,EAAK,eAChE,EAAS,QAAQA,GAAM;EAAE,YAAY;EAAM,iBAAiB,CAACC,CAAS;CAAE,CAAC;CAE3E,OAAO;EACL,eAAe,CAAC,CAACJ,EAAK,eAAe,QAAQ,IAAII,EAAU,EAAE;EAC7D,UAAU;GAAE,GAAU,WAAW;EAAG;CACtC;AACF;AAUA,SAAgBC,EAAmB,GAAmB,GAAqB,GAAsC;CAE/G,IAAMC,IADON,EAAK,cAAc,aACZ,aAAa,kCAAkC,GAC7DO,IAAYT,EAAuBE,GAAM,6BAA6B;EAE1E,AADA,IAAeO,EAAU,QAAQ,GACjCC,EAAK;CACP,CAAC,GACGC,IAAeF,EAAU,QAAQ,GAC/BG,WAAiBJ,GAAO,WAAW,OAAUK,EAAK,KAAKF,GACzDG,IAAUF,EAAQ,GAChBF,UAAa;EACjB,IAAMK,IAAOH,EAAQ;EACrB,AAAIG,MAASD,MACb,IAAUC,GACVX,EAASU,CAAO;CAClB;CAEA,OADAN,GAAO,iBAAiB,UAAUE,CAAI,GAC/B;EACL,IAAI,UAAU;GAAE,OAAOI;EAAS;EAChC;EACA,UAAU;GAER,AADAN,GAAO,oBAAoB,UAAUE,CAAI,GACzCD,EAAU,QAAQ;EACpB;CACF;AACF"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Viewport pixels per CSS pixel of `element`: the product of the CSS `zoom` of the element and its
3
+ * ancestors. `getBoundingClientRect`, pointer coordinates and wheel deltas are viewport pixels,
4
+ * while the lengths the host writes (`width`, `translate`) are CSS pixels inside the same zoom:
5
+ * divide by this before writing one into the other.
6
+ *
7
+ * `currentCSSZoom` answers directly. An engine without it falls back to the ratio of the element's
8
+ * rectangle to its own CSS size, which is right whether that engine's rectangle includes the zoom
9
+ * or not. 1 for an element without a box.
10
+ */
11
+ export declare function cssZoom(element: Element | null | undefined): number;
12
+ //# sourceMappingURL=zoom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zoom.d.ts","sourceRoot":"","sources":["../../src/react/zoom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAQnE"}
@@ -0,0 +1,21 @@
1
+ //#region src/react/zoom.ts
2
+ function e(e) {
3
+ if (!e) return 1;
4
+ let n = e.currentCSSZoom;
5
+ if (typeof n == "number") return n > 0 && Number.isFinite(n) ? n : 1;
6
+ let r = e.ownerDocument.defaultView, i = r ? t(r.getComputedStyle(e)) : NaN, a = e.getBoundingClientRect().width / i;
7
+ return a > 0 && Number.isFinite(a) ? a : 1;
8
+ }
9
+ function t(e) {
10
+ let t = parseFloat(e.width);
11
+ return e.boxSizing === "border-box" ? t : [
12
+ "paddingLeft",
13
+ "paddingRight",
14
+ "borderLeftWidth",
15
+ "borderRightWidth"
16
+ ].reduce((t, n) => t + (parseFloat(e[n]) || 0), t);
17
+ }
18
+ //#endregion
19
+ export { e as cssZoom };
20
+
21
+ //# sourceMappingURL=zoom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zoom.js","names":["cssZoom","element","current","view","width","borderBoxWidth","ratio","style","sum","side"],"sources":["../../src/react/zoom.ts"],"sourcesContent":["/**\n * Viewport pixels per CSS pixel of `element`: the product of the CSS `zoom` of the element and its\n * ancestors. `getBoundingClientRect`, pointer coordinates and wheel deltas are viewport pixels,\n * while the lengths the host writes (`width`, `translate`) are CSS pixels inside the same zoom:\n * divide by this before writing one into the other.\n *\n * `currentCSSZoom` answers directly. An engine without it falls back to the ratio of the element's\n * rectangle to its own CSS size, which is right whether that engine's rectangle includes the zoom\n * or not. 1 for an element without a box.\n */\nexport function cssZoom(element: Element | null | undefined): number {\n if (!element) return 1;\n const current = (element as Element & { readonly currentCSSZoom?: unknown }).currentCSSZoom;\n if (typeof current === 'number') return current > 0 && Number.isFinite(current) ? current : 1;\n const view = element.ownerDocument.defaultView;\n const width = view ? borderBoxWidth(view.getComputedStyle(element)) : NaN;\n const ratio = element.getBoundingClientRect().width / width;\n return ratio > 0 && Number.isFinite(ratio) ? ratio : 1;\n}\n\nfunction borderBoxWidth(style: CSSStyleDeclaration): number {\n const width = parseFloat(style.width);\n if (style.boxSizing === 'border-box') return width;\n return ['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth']\n .reduce((sum, side) => sum + (parseFloat(style[side as 'paddingLeft']) || 0), width);\n}\n"],"mappings":";AAUA,SAAgBA,EAAQ,GAA6C;CACnE,IAAI,CAACC,GAAS,OAAO;CACrB,IAAMC,IAAWD,EAA4D;CAC7E,IAAI,OAAOC,KAAY,UAAU,OAAOA,IAAU,KAAK,OAAO,SAASA,CAAO,IAAIA,IAAU;CAC5F,IAAMC,IAAOF,EAAQ,cAAc,aAC7BG,IAAQD,IAAOE,EAAeF,EAAK,iBAAiBF,CAAO,CAAC,IAAI,KAChEK,IAAQL,EAAQ,sBAAsB,CAAC,CAAC,QAAQG;CACtD,OAAOE,IAAQ,KAAK,OAAO,SAASA,CAAK,IAAIA,IAAQ;AACvD;AAEA,SAASD,EAAe,GAAoC;CAC1D,IAAMD,IAAQ,WAAWG,EAAM,KAAK;CAEpC,OADIA,EAAM,cAAc,eAAqBH,IACtC;EAAC;EAAe;EAAgB;EAAmB;CAAkB,CAAC,CAC1E,QAAQ,GAAK,MAASI,KAAO,WAAWD,EAAME,EAAsB,KAAK,IAAIL,CAAK;AACvF"}
package/dist/react.d.ts CHANGED
@@ -40,6 +40,10 @@ export interface CloudletLabels {
40
40
  readonly close: string;
41
41
  readonly retry: string;
42
42
  readonly cancel: string;
43
+ /**
44
+ * Not shown: a pending operation's cancel button leaves once cancellation is requested, and the
45
+ * title says so (`messages.cancellationRequested` of `createCloudlet`). Kept for compatibility.
46
+ */
43
47
  readonly cancellationRequested: string;
44
48
  readonly acknowledgeOverflow: string;
45
49
  /** The Island's clear button. */
@@ -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,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACxF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEzF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;AAChE,MAAM,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M,qBAAqB,CAAC"}
package/dist/styles.css CHANGED
@@ -1 +1 @@
1
- .cloudlet-host{--cloudlet-pill-height:44px;--cloudlet-pill-radius:9999px;--cloudlet-pill-max-width:22rem;--cloudlet-island-radius:24px;--cloudlet-island-max-width:26rem;--cloudlet-tail-offset:4px;--cloudlet-tail-scale:.9;--cloudlet-control-min-size:44px;--cloudlet-viewport-gutter:16px;--cloudlet-font-family:system-ui, sans-serif;--cloudlet-font-size:.875rem;--cloudlet-background:#fff;--cloudlet-foreground:#111113;--cloudlet-muted:#6e6e76;--cloudlet-border:color-mix(in oklab, var(--cloudlet-foreground) 10%, transparent);--cloudlet-action-background:color-mix(in oklab, var(--cloudlet-foreground) 8%, transparent);--cloudlet-shadow:0 10px 30px -12px #00000040, 0 1px 2px #00000014;--cloudlet-tail-background:var(--cloudlet-background);--cloudlet-tail-border:var(--cloudlet-border);--cloudlet-focus:#245cdb;--cloudlet-success:oklch(72.3% .219 142.136);--cloudlet-error:oklch(63.7% .237 25.331);--cloudlet-info:oklch(68.5% .169 237.323);--cloudlet-warning:oklch(79.5% .184 86.047);--cloudlet-loading:oklch(55.6% 0 0);--cloudlet-badge:#d70015;--cloudlet-badge-foreground:#fff;--cloudlet-field-background:var(--cloudlet-action-background);--cloudlet-field-border:transparent;--cloudlet-placeholder:color-mix(in oklab, var(--cloudlet-muted) 85%, var(--cloudlet-foreground));--cloudlet-z-index:1000;--cloudlet-safe-top:env(safe-area-inset-top,0px);--cloudlet-safe-right:env(safe-area-inset-right,0px);--cloudlet-safe-bottom:env(safe-area-inset-bottom,0px);--cloudlet-safe-left:env(safe-area-inset-left,0px);--cloudlet-top:calc(var(--cloudlet-safe-top) + var(--cloudlet-gutter-top,var(--cloudlet-viewport-gutter)) + var(--cloudlet-obstruction-top,0px));--cloudlet-bottom:calc(var(--cloudlet-safe-bottom) + var(--cloudlet-gutter-bottom,var(--cloudlet-viewport-gutter)) + var(--cloudlet-obstruction-bottom,0px));--cloudlet-left:calc(var(--cloudlet-safe-left) + var(--cloudlet-gutter-left,var(--cloudlet-viewport-gutter)) + var(--cloudlet-obstruction-left,0px));--cloudlet-right:calc(var(--cloudlet-safe-right) + var(--cloudlet-gutter-right,var(--cloudlet-viewport-gutter)) + var(--cloudlet-obstruction-right,0px));--cloudlet-host-height:max(0px, calc(var(--cloudlet-viewport-height,100dvh) - var(--cloudlet-top) - var(--cloudlet-bottom)));--cloudlet-available-height:max(0px, calc(var(--cloudlet-host-height) - var(--cloudlet-reserved-height,0px)));z-index:var(--cloudlet-z-index);left:calc(var(--cloudlet-viewport-left,0px) + var(--cloudlet-left));right:calc(var(--cloudlet-viewport-right,0px) + var(--cloudlet-right));bottom:calc(var(--cloudlet-viewport-bottom,0px) + var(--cloudlet-bottom));max-width:var(--cloudlet-island-max-width);max-height:var(--cloudlet-host-height);color:var(--cloudlet-foreground);--cloudlet-anchor:50%;font:400 var(--cloudlet-font-size)/1.43 var(--cloudlet-font-family);text-align:start;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;pointer-events:none;isolation:isolate;--cloudlet-status:var(--cloudlet-loading);flex-direction:column;margin-inline:auto;display:flex;position:fixed}.cloudlet-host,.cloudlet-host *,.cloudlet-host :before,.cloudlet-host :after{box-sizing:border-box}.cloudlet-host :where(h2,p,ol,li){margin:0;padding:0}.cloudlet-host :where(button,a){font:inherit;color:inherit;line-height:inherit;letter-spacing:inherit;text-transform:none;min-width:var(--cloudlet-control-min-size);min-height:var(--cloudlet-control-min-size);touch-action:manipulation}.cloudlet-host button{appearance:none;cursor:pointer;background:0 0;border:0;border-radius:24px;justify-content:center;align-items:center;margin:0;padding:10px;display:inline-flex}.cloudlet-host button[aria-disabled=true]{color:var(--cloudlet-muted);cursor:progress}.cloudlet-host a{border-radius:24px;align-items:center;padding:10px 16px;text-decoration:underline;display:inline-flex}.cloudlet-host :focus-visible{outline:2px solid var(--cloudlet-focus);outline-offset:2px}.cloudlet-host:focus-visible{outline:2px solid var(--cloudlet-focus);outline-offset:-2px}.cloudlet-host [hidden]{display:none!important}.cloudlet-host [data-kind=success]{--cloudlet-status:var(--cloudlet-success)}.cloudlet-host [data-kind=error]{--cloudlet-status:var(--cloudlet-error)}.cloudlet-host [data-kind=info]{--cloudlet-status:var(--cloudlet-info)}.cloudlet-host [data-kind=warning]{--cloudlet-status:var(--cloudlet-warning)}.cloudlet-host [data-kind=loading]{--cloudlet-status:var(--cloudlet-loading)}.cloudlet-host .cloudlet-stack{flex:none;align-self:center;width:fit-content;max-width:100%;position:relative}.cloudlet-host[data-state=island] .cloudlet-stack{width:100%}.cloudlet-host .cloudlet-shell{transform-origin:var(--cloudlet-anchor) 0;z-index:1;position:relative}.cloudlet-host[data-edge=bottom] .cloudlet-shell{transform-origin:var(--cloudlet-anchor) 100%}.cloudlet-host .cloudlet-bg{top:0;left:var(--cloudlet-anchor);transform:translateX(calc(-1 * var(--cloudlet-anchor)));pointer-events:none;box-shadow:var(--cloudlet-shadow);position:absolute;overflow:visible}.cloudlet-host .cloudlet-bg path{fill:var(--cloudlet-background);stroke:var(--cloudlet-border);stroke-width:1px}.cloudlet-host :is(.cloudlet-tail,.cloudlet-exit){top:0;left:var(--cloudlet-anchor);pointer-events:none;position:absolute}.cloudlet-host .cloudlet-tail{z-index:0;border-radius:var(--cloudlet-pill-radius);background:var(--cloudlet-tail-background);border:1px solid var(--cloudlet-tail-border);box-shadow:var(--cloudlet-shadow);transform-origin:var(--cloudlet-anchor) 100%;opacity:0}.cloudlet-host .cloudlet-tail[data-cloudlet-tail="2"]{z-index:-1;background:color-mix(in oklab, var(--cloudlet-tail-background) 60%, var(--cloudlet-background))}.cloudlet-host .cloudlet-exit{z-index:2;transform-origin:var(--cloudlet-anchor) 0}.cloudlet-host[data-edge=bottom] :is(.cloudlet-bg,.cloudlet-tail,.cloudlet-exit,.cloudlet-badge){top:auto;bottom:0}.cloudlet-host[data-edge=bottom] .cloudlet-tail{transform-origin:var(--cloudlet-anchor) 0}.cloudlet-host[data-edge=bottom] .cloudlet-exit{transform-origin:var(--cloudlet-anchor) 100%}.cloudlet-host .cloudlet-exit:empty{display:none}.cloudlet-host .cloudlet-clip{pointer-events:auto;color:var(--cloudlet-foreground);overflow-wrap:anywhere;width:fit-content;min-width:0;max-width:min(100%, var(--cloudlet-pill-max-width));min-height:var(--cloudlet-pill-height);border-radius:var(--cloudlet-pill-radius);flex-direction:column;display:flex;position:relative}.cloudlet-host .cloudlet-shell[data-state=island]>.cloudlet-clip{width:100%;max-width:100%;max-height:var(--cloudlet-available-height);border-radius:var(--cloudlet-island-radius)}.cloudlet-host :is(.cloudlet-slide-out,.cloudlet-chrome-out){pointer-events:none;position:absolute;top:0;left:0}.cloudlet-host :is(.cloudlet-slide-out,.cloudlet-chrome-out):empty{display:none}.cloudlet-host .cloudlet-chrome-out .cloudlet-clip{width:100%;max-width:none}.cloudlet-host .cloudlet-ghost{visibility:hidden}.cloudlet-host .cloudlet-slide{flex-direction:column;flex:0 auto;min-height:0;display:flex;position:relative}.cloudlet-host .cloudlet-header{flex:none;min-width:0;display:flex;position:relative}.cloudlet-host .cloudlet-heading{min-width:0;min-height:var(--cloudlet-pill-height);flex:1;align-items:center;gap:10px;padding-block:6px;padding-inline:10px 16px;display:flex}.cloudlet-host .cloudlet-shell[data-state=island] .cloudlet-heading{padding-block:10px 6px;padding-inline:14px 52px}.cloudlet-host .cloudlet-heading-out{pointer-events:none;display:flex;position:absolute;inset:0}.cloudlet-host .cloudlet-heading-out:empty{display:none}.cloudlet-host .cloudlet-title{font:inherit;text-transform:none;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-weight:500;overflow:hidden}.cloudlet-host .cloudlet-shell[data-state=island] .cloudlet-title{white-space:normal;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box}.cloudlet-host .cloudlet-title:focus{outline:none}.cloudlet-host .cloudlet-title:focus-visible{outline:2px solid var(--cloudlet-focus);outline-offset:2px;border-radius:4px}.cloudlet-host .cloudlet-pill{z-index:1;pointer-events:auto;border-radius:var(--cloudlet-pill-radius);width:100%;height:100%;padding:0;position:absolute;inset:0}.cloudlet-host .cloudlet-pill,.cloudlet-host .cloudlet-shell[data-state=island]>.cloudlet-clip,.cloudlet-host .cloudlet-shell[data-state=island] .cloudlet-body{touch-action:pan-y}.cloudlet-host .cloudlet-shell[data-state=island]>.cloudlet-clip>.cloudlet-slide>.cloudlet-header{touch-action:none}.cloudlet-host[data-dragging]{-webkit-user-select:none;user-select:none}.cloudlet-host .cloudlet-peek{pointer-events:none;position:absolute;top:0;left:0}.cloudlet-host .cloudlet-badge{z-index:2;background:var(--cloudlet-badge);min-width:20px;height:20px;color:var(--cloudlet-badge-foreground);box-shadow:0 0 0 2px var(--cloudlet-background);font:600 .6875rem/20px var(--cloudlet-font-family);font-variant-numeric:tabular-nums;text-align:center;pointer-events:none;opacity:0;border-radius:9999px;padding-inline:6px;display:grid;position:absolute;top:0;left:50%}.cloudlet-host .cloudlet-badge>*{grid-area:1/1}.cloudlet-host .cloudlet-icon{width:24px;height:24px;color:var(--cloudlet-status);background:color-mix(in oklab, var(--cloudlet-status) 18%, transparent);border-radius:50%;flex:none;place-items:center;display:grid;position:relative}.cloudlet-host .cloudlet-glyph{place-items:center;width:16px;height:16px;display:grid;overflow:hidden}.cloudlet-host .cloudlet-glyph>.cloudlet-slot{place-items:center;width:100%;height:100%;display:grid}.cloudlet-host .cloudlet-glyph :is(svg,img){max-width:100%;max-height:100%;display:block}.cloudlet-host :is(svg.cloudlet-glyph,button>svg){fill:none;stroke:currentColor;stroke-width:1.75px;stroke-linecap:round;stroke-linejoin:round;display:block}.cloudlet-host .cloudlet-ring{fill:none;stroke-width:2px;width:32px;height:32px;position:absolute;inset:-4px;overflow:visible}.cloudlet-host .cloudlet-ring-track{stroke:color-mix(in oklab, var(--cloudlet-status) 18%, transparent)}.cloudlet-host .cloudlet-progress-fill{stroke:color-mix(in oklab, var(--cloudlet-status) 75%, var(--cloudlet-foreground));stroke-linecap:round}.cloudlet-host .cloudlet-close{top:8px;z-index:1;width:32px;min-width:0;height:32px;min-height:0;color:var(--cloudlet-muted);background:var(--cloudlet-action-background);border-radius:50%;padding:0;position:absolute;inset-inline-end:8px}.cloudlet-host .cloudlet-close>svg{width:16px;height:16px}.cloudlet-host :is(.cloudlet-close,.cloudlet-action,.cloudlet-clear,.cloudlet-overflow button):before{content:"";inset-block:calc((var(--cloudlet-control-min-size) - 32px) / -2);position:absolute;inset-inline:0}.cloudlet-host button.cloudlet-close:before{inset-inline:calc((var(--cloudlet-control-min-size) - 32px) / -2);border-radius:50%}.cloudlet-host .cloudlet-body{overscroll-behavior:contain;min-height:0;max-height:min(calc(var(--cloudlet-available-height) * .6), 24rem);flex-direction:column;padding-block:0 10px;padding-inline:48px 16px;display:flex;position:relative;overflow:auto}.cloudlet-host .cloudlet-body:not(:has(>:not(.cloudlet-actions:empty))){padding-bottom:4px}.cloudlet-host .cloudlet-body-out{pointer-events:none;position:absolute;left:0;right:0}.cloudlet-host .cloudlet-body-out:empty{display:none}.cloudlet-host .cloudlet-description{color:var(--cloudlet-muted);padding-block:0 4px;font-size:.8125rem;line-height:1.45}.cloudlet-host .cloudlet-actions{flex-wrap:wrap;flex:none;gap:12px 8px;display:flex}.cloudlet-host .cloudlet-actions:empty{display:none}.cloudlet-host .cloudlet-actions:not(:empty){margin-block:8px 2px}.cloudlet-host :is(.cloudlet-action,.cloudlet-clear,.cloudlet-overflow button){overflow-wrap:anywhere;min-width:0;max-width:100%;min-height:32px;color:var(--cloudlet-foreground);background:var(--cloudlet-action-background);border-radius:9999px;padding:6px 14px;font-size:.8125rem;font-weight:500;line-height:1.5;text-decoration:none;position:relative}.cloudlet-host .cloudlet-action.cloudlet-primary{color:color-mix(in oklab, var(--cloudlet-status) 55%, var(--cloudlet-foreground));background:color-mix(in oklab, var(--cloudlet-status) 12%, transparent)}.cloudlet-host :is(.cloudlet-action,.cloudlet-overflow button)[aria-disabled=true]{color:var(--cloudlet-muted)}@media (hover:hover){.cloudlet-host :is(.cloudlet-close,.cloudlet-action,.cloudlet-clear,.cloudlet-overflow button):hover{background:color-mix(in oklab, var(--cloudlet-foreground) 13%, transparent)}.cloudlet-host .cloudlet-close:hover{color:var(--cloudlet-foreground)}.cloudlet-host .cloudlet-clear[data-armed=true]:hover{background:color-mix(in oklab, var(--cloudlet-error) 22%, transparent)}.cloudlet-host .cloudlet-action.cloudlet-primary:hover{background:color-mix(in oklab, var(--cloudlet-status) 20%, transparent)}.cloudlet-host .cloudlet-action.cloudlet-submit:hover{background:color-mix(in oklab, var(--cloudlet-status) 70%, #000)}}.cloudlet-host .cloudlet-action-error{color:var(--cloudlet-muted);padding-block:4px;font-size:.8125rem}.cloudlet-host .cloudlet-form{flex-direction:column;gap:8px;margin-block:4px 2px;display:flex}.cloudlet-host .cloudlet-form-row{grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:4px 8px;display:grid}.cloudlet-host .cloudlet-field{border:1px solid var(--cloudlet-field-border);width:100%;min-width:0;min-height:36px;color:var(--cloudlet-foreground);background:var(--cloudlet-field-background);font:inherit;resize:none;overflow-wrap:anywhere;border-radius:18px;grid-column:1;margin:0;padding:7px 13px;line-height:20px}.cloudlet-host .cloudlet-field::placeholder{color:var(--cloudlet-placeholder);opacity:1}.cloudlet-host .cloudlet-field:focus-visible{outline-offset:1px}.cloudlet-host .cloudlet-field[aria-invalid=true]{border-color:var(--cloudlet-error)}.cloudlet-host .cloudlet-field[aria-invalid=true]:focus-visible{outline-color:var(--cloudlet-error);border-color:#0000}.cloudlet-host .cloudlet-field[readonly]{color:var(--cloudlet-muted)}.cloudlet-host :is(.cloudlet-form>.cloudlet-action-error,.cloudlet-form~.cloudlet-action-error){padding-inline:14px}.cloudlet-host .cloudlet-field-error{color:color-mix(in oklab, var(--cloudlet-error) 70%, var(--cloudlet-foreground));grid-column:1/-1;padding-inline:14px;font-size:.8125rem}.cloudlet-host .cloudlet-action.cloudlet-submit{color:#fff;background:color-mix(in oklab, var(--cloudlet-status) 80%, #000);border-radius:50%;grid-column:2;place-items:center;width:36px;min-width:0;height:36px;min-height:0;padding:0;display:grid}.cloudlet-host .cloudlet-submit>svg{stroke-width:2px;width:16px;height:16px}.cloudlet-host button.cloudlet-submit:before{inset:calc((var(--cloudlet-control-min-size) - 36px) / -2);border-radius:50%}.cloudlet-host .cloudlet-indicator{color:var(--cloudlet-muted);flex:none;grid-template-columns:1fr auto 1fr;align-items:center;column-gap:8px;padding:0 16px 6px;font-size:.75rem;display:grid}.cloudlet-host .cloudlet-indicator>:is(.cloudlet-dots,.cloudlet-page){grid-column:2}.cloudlet-host .cloudlet-dots{display:flex}.cloudlet-host .cloudlet-indicator .cloudlet-dot-button{min-width:24px;min-height:24px;padding:8px}.cloudlet-host .cloudlet-dot{background:color-mix(in oklab, var(--cloudlet-foreground) 25%, transparent);border-radius:50%;width:6px;height:6px;display:block}.cloudlet-host .cloudlet-indicator [aria-current=true] .cloudlet-dot{background:var(--cloudlet-foreground)}.cloudlet-host .cloudlet-page{font-variant-numeric:tabular-nums;padding:8px;display:grid}.cloudlet-host .cloudlet-page>*{grid-area:1/1}.cloudlet-host button.cloudlet-clear{overflow-wrap:normal;grid-column:3;justify-self:end;font-size:.75rem;display:grid}.cloudlet-host .cloudlet-clear>*{grid-area:1/1;transition:opacity .2s,visibility .2s}.cloudlet-host .cloudlet-clear[data-armed=true]>:first-child,.cloudlet-host .cloudlet-clear[data-armed=false]>:last-child{opacity:0;visibility:hidden}.cloudlet-host .cloudlet-clear[data-armed=true]{color:color-mix(in oklab, var(--cloudlet-error) 70%, var(--cloudlet-foreground));background:color-mix(in oklab, var(--cloudlet-error) 14%, transparent)}.cloudlet-host .cloudlet-overflow{flex-wrap:wrap;grid-column:1/-1;justify-content:center;align-items:center;gap:4px 8px;min-width:0;display:flex}.cloudlet-host .cloudlet-overflow button{font-size:.75rem}.cloudlet-host .cloudlet-live{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.cloudlet-announcer{clip-path:inset(50%);white-space:nowrap;pointer-events:none;border:0;width:1px;height:1px;margin:-1px;padding:0;position:fixed;top:0;left:0;overflow:hidden}.cloudlet-host[data-position^=top-]{top:calc(var(--cloudlet-viewport-top,0px) + var(--cloudlet-top));bottom:auto}.cloudlet-host[data-align=left]{--cloudlet-anchor:0%;margin-left:0;margin-right:auto}.cloudlet-host[data-align=right]{--cloudlet-anchor:100%;margin-left:auto;margin-right:0}.cloudlet-host[data-align=left] .cloudlet-stack{margin-right:auto}.cloudlet-host[data-align=right] .cloudlet-stack{margin-left:auto}@media (width>=48rem){.cloudlet-host[data-position=auto]{top:calc(var(--cloudlet-viewport-top,0px) + var(--cloudlet-top));bottom:auto}}.cloudlet-host[data-theme=dark]{--cloudlet-background:#1c1c1e;--cloudlet-foreground:#f5f5f7;--cloudlet-muted:#a1a1aa;--cloudlet-focus:#93b4ff;--cloudlet-shadow:0 12px 32px -12px #0009;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--cloudlet-tail-background:color-mix(in oklab, var(--cloudlet-foreground) 14%, var(--cloudlet-background));--cloudlet-tail-border:color-mix(in oklab, var(--cloudlet-foreground) 18%, transparent)}@media (prefers-color-scheme:dark){.cloudlet-host[data-theme=system]{--cloudlet-background:#1c1c1e;--cloudlet-foreground:#f5f5f7;--cloudlet-muted:#a1a1aa;--cloudlet-focus:#93b4ff;--cloudlet-shadow:0 12px 32px -12px #0009;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--cloudlet-tail-background:color-mix(in oklab, var(--cloudlet-foreground) 14%, var(--cloudlet-background));--cloudlet-tail-border:color-mix(in oklab, var(--cloudlet-foreground) 18%, transparent)}}@keyframes cloudlet-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:no-preference){.cloudlet-host .cloudlet-spinner{animation:.8s linear infinite cloudlet-spin}.cloudlet-host .cloudlet-ring[data-progress=indeterminate]{animation:1s linear infinite cloudlet-spin}.cloudlet-host[data-reduced-motion=true] :is(.cloudlet-spinner,.cloudlet-ring){animation:none}.cloudlet-host:not([data-reduced-motion=true]) .cloudlet-clear>*{transition:opacity .2s,filter .2s,visibility .2s}.cloudlet-host:not([data-reduced-motion=true]) .cloudlet-clear[data-armed=true]>:first-child,.cloudlet-host:not([data-reduced-motion=true]) .cloudlet-clear[data-armed=false]>:last-child{filter:blur(2px)}}@media (forced-colors:active){.cloudlet-host[data-theme]{--cloudlet-background:Canvas;--cloudlet-foreground:CanvasText;--cloudlet-muted:CanvasText;--cloudlet-border:CanvasText;--cloudlet-focus:Highlight;--cloudlet-action-background:Canvas;--cloudlet-status:CanvasText;--cloudlet-success:CanvasText;--cloudlet-error:CanvasText;--cloudlet-info:CanvasText;--cloudlet-warning:CanvasText;--cloudlet-loading:CanvasText;--cloudlet-badge:Highlight;--cloudlet-badge-foreground:HighlightText}.cloudlet-host :is(.cloudlet-bg,.cloudlet-icon,.cloudlet-badge,.cloudlet-dot){forced-color-adjust:none}.cloudlet-host .cloudlet-icon{outline-offset:-1px;background:canvas;outline:1px solid canvastext}.cloudlet-host .cloudlet-ring-track{stroke:graytext}.cloudlet-host .cloudlet-dot{background:canvas;outline:1px solid canvastext}.cloudlet-host .cloudlet-indicator [aria-current=true] .cloudlet-dot{background:canvastext}.cloudlet-host :is(.cloudlet-close,.cloudlet-action,.cloudlet-clear,.cloudlet-overflow button){border:1px solid buttontext}.cloudlet-host .cloudlet-clear[data-armed=true]{border-width:2px}.cloudlet-host .cloudlet-field{color:fieldtext;background:field;border-color:canvastext}.cloudlet-host .cloudlet-field[aria-invalid=true]{border-width:2px}.cloudlet-host .cloudlet-action.cloudlet-submit{forced-color-adjust:none;color:highlighttext;background:highlight;border-color:highlight}}
1
+ .cloudlet-host{--cloudlet-pill-height:44px;--cloudlet-pill-radius:9999px;--cloudlet-pill-max-width:22rem;--cloudlet-island-radius:24px;--cloudlet-island-max-width:26rem;--cloudlet-tail-offset:4px;--cloudlet-tail-scale:.9;--cloudlet-control-min-size:44px;--cloudlet-viewport-gutter:16px;--cloudlet-center-width:392px;--cloudlet-center-backdrop-reach:160px;--cloudlet-center-blur:16px;--cloudlet-center-blur-tint:38%;--cloudlet-center-tint:70%;--cloudlet-font-family:system-ui, sans-serif;--cloudlet-font-size:.875rem;--cloudlet-background:#fff;--cloudlet-foreground:#111113;--cloudlet-muted:#6e6e76;--cloudlet-border:color-mix(in oklab, var(--cloudlet-foreground) 10%, transparent);--cloudlet-action-background:color-mix(in oklab, var(--cloudlet-foreground) 8%, transparent);--cloudlet-shadow:0 10px 30px -12px #00000040, 0 1px 2px #00000014;--cloudlet-tail-background:var(--cloudlet-background);--cloudlet-tail-border:var(--cloudlet-border);--cloudlet-focus:#245cdb;--cloudlet-success:oklch(72.3% .219 142.136);--cloudlet-error:oklch(63.7% .237 25.331);--cloudlet-info:oklch(68.5% .169 237.323);--cloudlet-warning:oklch(79.5% .184 86.047);--cloudlet-loading:oklch(55.6% 0 0);--cloudlet-badge:#d70015;--cloudlet-badge-foreground:#fff;--cloudlet-field-background:var(--cloudlet-action-background);--cloudlet-field-border:transparent;--cloudlet-placeholder:color-mix(in oklab, var(--cloudlet-muted) 85%, var(--cloudlet-foreground));--cloudlet-z-index:1000;--cloudlet-safe-top:env(safe-area-inset-top,0px);--cloudlet-safe-right:env(safe-area-inset-right,0px);--cloudlet-safe-bottom:env(safe-area-inset-bottom,0px);--cloudlet-safe-left:env(safe-area-inset-left,0px);--cloudlet-top:calc(var(--cloudlet-safe-top) + var(--cloudlet-gutter-top,var(--cloudlet-viewport-gutter)) + var(--cloudlet-obstruction-top,0px));--cloudlet-bottom:calc(var(--cloudlet-safe-bottom) + var(--cloudlet-gutter-bottom,var(--cloudlet-viewport-gutter)) + var(--cloudlet-obstruction-bottom,0px));--cloudlet-left:calc(var(--cloudlet-safe-left) + var(--cloudlet-gutter-left,var(--cloudlet-viewport-gutter)) + var(--cloudlet-obstruction-left,0px));--cloudlet-right:calc(var(--cloudlet-safe-right) + var(--cloudlet-gutter-right,var(--cloudlet-viewport-gutter)) + var(--cloudlet-obstruction-right,0px));--cloudlet-host-height:max(0px, calc(var(--cloudlet-viewport-height,100dvh) - var(--cloudlet-top) - var(--cloudlet-bottom)));--cloudlet-available-height:max(0px, calc(var(--cloudlet-host-height) - var(--cloudlet-reserved-height,0px)));z-index:var(--cloudlet-z-index);left:calc(var(--cloudlet-viewport-left,0px) + var(--cloudlet-left));right:calc(var(--cloudlet-viewport-right,0px) + var(--cloudlet-right));bottom:calc(var(--cloudlet-viewport-bottom,0px) + var(--cloudlet-bottom));max-width:var(--cloudlet-island-max-width);max-height:var(--cloudlet-host-height);color:var(--cloudlet-foreground);--cloudlet-anchor:50%;font:400 var(--cloudlet-font-size)/1.43 var(--cloudlet-font-family);text-align:start;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;pointer-events:none;isolation:isolate;--cloudlet-status:var(--cloudlet-loading);flex-direction:column;margin-inline:auto;display:flex;position:fixed}.cloudlet-host,.cloudlet-host *,.cloudlet-host :before,.cloudlet-host :after{box-sizing:border-box}.cloudlet-host :where(h2,p,ol,li){margin:0;padding:0}.cloudlet-host :where(button,a){font:inherit;color:inherit;line-height:inherit;letter-spacing:inherit;text-transform:none;min-width:var(--cloudlet-control-min-size);min-height:var(--cloudlet-control-min-size);touch-action:manipulation}.cloudlet-host button{appearance:none;cursor:pointer;background:0 0;border:0;border-radius:24px;justify-content:center;align-items:center;margin:0;padding:10px;display:inline-flex}.cloudlet-host button[aria-disabled=true]{color:var(--cloudlet-muted);cursor:progress}.cloudlet-host a{border-radius:24px;align-items:center;padding:10px 16px;text-decoration:underline;display:inline-flex}.cloudlet-host :focus-visible{outline:2px solid var(--cloudlet-focus);outline-offset:2px}.cloudlet-host:focus-visible{outline:2px solid var(--cloudlet-focus);outline-offset:-2px}.cloudlet-host [hidden]{display:none!important}.cloudlet-host [data-kind=success]{--cloudlet-status:var(--cloudlet-success)}.cloudlet-host [data-kind=error]{--cloudlet-status:var(--cloudlet-error)}.cloudlet-host [data-kind=info]{--cloudlet-status:var(--cloudlet-info)}.cloudlet-host [data-kind=warning]{--cloudlet-status:var(--cloudlet-warning)}.cloudlet-host [data-kind=loading]{--cloudlet-status:var(--cloudlet-loading)}.cloudlet-host .cloudlet-stack{flex:none;align-self:center;width:fit-content;max-width:100%;position:relative}.cloudlet-host[data-state=island] .cloudlet-stack{width:100%}.cloudlet-host .cloudlet-shell{transform-origin:var(--cloudlet-anchor) 0;z-index:1;position:relative}.cloudlet-host[data-edge=bottom] .cloudlet-shell{transform-origin:var(--cloudlet-anchor) 100%}.cloudlet-host .cloudlet-bg{top:0;left:var(--cloudlet-anchor);transform:translateX(calc(-1 * var(--cloudlet-anchor)));pointer-events:none;box-shadow:var(--cloudlet-shadow);position:absolute;overflow:visible}.cloudlet-host .cloudlet-bg path{fill:var(--cloudlet-background);stroke:var(--cloudlet-border);stroke-width:1px}.cloudlet-host :is(.cloudlet-tail,.cloudlet-exit){top:0;left:var(--cloudlet-anchor);pointer-events:none;position:absolute}.cloudlet-host .cloudlet-tail{z-index:0;border-radius:var(--cloudlet-pill-radius);background:var(--cloudlet-tail-background);border:1px solid var(--cloudlet-tail-border);box-shadow:var(--cloudlet-shadow);transform-origin:var(--cloudlet-anchor) 100%;opacity:0}.cloudlet-host .cloudlet-tail[data-cloudlet-tail="2"]{z-index:-1;background:color-mix(in oklab, var(--cloudlet-tail-background) 60%, var(--cloudlet-background))}.cloudlet-host .cloudlet-exit{z-index:2;transform-origin:var(--cloudlet-anchor) 0}.cloudlet-host[data-edge=bottom] :is(.cloudlet-bg,.cloudlet-tail,.cloudlet-exit,.cloudlet-badge){top:auto;bottom:0}.cloudlet-host[data-edge=bottom] .cloudlet-tail{transform-origin:var(--cloudlet-anchor) 0}.cloudlet-host[data-edge=bottom] .cloudlet-exit{transform-origin:var(--cloudlet-anchor) 100%}.cloudlet-host .cloudlet-exit:empty{display:none}.cloudlet-host .cloudlet-clip{pointer-events:auto;color:var(--cloudlet-foreground);overflow-wrap:anywhere;width:fit-content;min-width:0;max-width:min(100%, var(--cloudlet-pill-max-width));min-height:var(--cloudlet-pill-height);border-radius:var(--cloudlet-pill-radius);flex-direction:column;display:flex;position:relative}.cloudlet-host .cloudlet-shell[data-state=island]>.cloudlet-clip{width:100%;max-width:100%;max-height:var(--cloudlet-available-height);border-radius:var(--cloudlet-island-radius)}.cloudlet-host :is(.cloudlet-slide-out,.cloudlet-chrome-out){pointer-events:none;position:absolute;top:0;left:0}.cloudlet-host :is(.cloudlet-slide-out,.cloudlet-chrome-out):empty{display:none}.cloudlet-host .cloudlet-chrome-out .cloudlet-clip{width:100%;max-width:none}.cloudlet-host .cloudlet-ghost{visibility:hidden}.cloudlet-host .cloudlet-slide{flex-direction:column;flex:0 auto;min-height:0;display:flex;position:relative}.cloudlet-host .cloudlet-header{flex:none;min-width:0;display:flex;position:relative}.cloudlet-host .cloudlet-heading{min-width:0;min-height:var(--cloudlet-pill-height);flex:1;align-items:center;gap:10px;padding-block:6px;padding-inline:10px 16px;display:flex}.cloudlet-host .cloudlet-shell[data-state=island] .cloudlet-heading{padding-block:10px 6px;padding-inline:14px 52px}.cloudlet-host .cloudlet-heading-out{pointer-events:none;display:flex;position:absolute;inset:0}.cloudlet-host .cloudlet-heading-out:empty{display:none}.cloudlet-host .cloudlet-title{font:inherit;text-transform:none;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-weight:500;overflow:hidden}.cloudlet-host .cloudlet-shell[data-state=island] .cloudlet-title{white-space:normal;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box}.cloudlet-host .cloudlet-title:focus{outline:none}.cloudlet-host .cloudlet-title:focus-visible{outline:2px solid var(--cloudlet-focus);outline-offset:2px;border-radius:4px}.cloudlet-host .cloudlet-pill{z-index:1;pointer-events:auto;border-radius:var(--cloudlet-pill-radius);width:100%;height:100%;padding:0;position:absolute;inset:0}.cloudlet-host .cloudlet-pill,.cloudlet-host .cloudlet-shell[data-state=island]>.cloudlet-clip,.cloudlet-host .cloudlet-shell[data-state=island] .cloudlet-body{touch-action:pan-y}.cloudlet-host .cloudlet-shell[data-state=island]>.cloudlet-clip>.cloudlet-slide>.cloudlet-header{touch-action:none}.cloudlet-host[data-dragging]{-webkit-user-select:none;user-select:none}.cloudlet-host .cloudlet-peek{pointer-events:none;position:absolute;top:0;left:0}.cloudlet-host .cloudlet-badge{z-index:2;background:var(--cloudlet-badge);min-width:20px;height:20px;color:var(--cloudlet-badge-foreground);box-shadow:0 0 0 2px var(--cloudlet-background);font:600 .6875rem/20px var(--cloudlet-font-family);font-variant-numeric:tabular-nums;text-align:center;pointer-events:none;opacity:0;border-radius:9999px;padding-inline:6px;display:grid;position:absolute;top:0;left:50%}.cloudlet-host .cloudlet-badge>*{grid-area:1/1}.cloudlet-host .cloudlet-icon{width:24px;height:24px;color:var(--cloudlet-status);background:color-mix(in oklab, var(--cloudlet-status) 18%, transparent);border-radius:50%;flex:none;place-items:center;display:grid;position:relative}.cloudlet-host .cloudlet-glyph{place-items:center;width:16px;height:16px;display:grid;overflow:hidden}.cloudlet-host .cloudlet-glyph>.cloudlet-slot{place-items:center;width:100%;height:100%;display:grid}.cloudlet-host .cloudlet-glyph :is(svg,img){max-width:100%;max-height:100%;display:block}.cloudlet-host :is(svg.cloudlet-glyph,button>svg){fill:none;stroke:currentColor;stroke-width:1.75px;stroke-linecap:round;stroke-linejoin:round;display:block}.cloudlet-host .cloudlet-ring{fill:none;stroke-width:2px;width:32px;height:32px;position:absolute;inset:-4px;overflow:visible}.cloudlet-host .cloudlet-ring-track{stroke:color-mix(in oklab, var(--cloudlet-status) 18%, transparent)}.cloudlet-host .cloudlet-progress-fill{stroke:color-mix(in oklab, var(--cloudlet-status) 75%, var(--cloudlet-foreground));stroke-linecap:round}.cloudlet-host .cloudlet-close{top:8px;z-index:1;width:32px;min-width:0;height:32px;min-height:0;color:var(--cloudlet-muted);background:var(--cloudlet-action-background);border-radius:50%;padding:0;position:absolute;inset-inline-end:8px}.cloudlet-host .cloudlet-close>svg{width:16px;height:16px}.cloudlet-host :is(.cloudlet-close,.cloudlet-action,.cloudlet-clear,.cloudlet-overflow button):before{content:"";inset-block:calc((var(--cloudlet-control-min-size) - 32px) / -2);position:absolute;inset-inline:0}.cloudlet-host button.cloudlet-close:before{inset-inline:calc((var(--cloudlet-control-min-size) - 32px) / -2);border-radius:50%}.cloudlet-host .cloudlet-body{overscroll-behavior:contain;min-height:0;max-height:min(calc(var(--cloudlet-available-height) * .6), 24rem);flex-direction:column;padding-block:0 10px;padding-inline:48px 16px;display:flex;position:relative;overflow:auto}.cloudlet-host .cloudlet-body:not(:has(>:not(.cloudlet-actions:empty))){padding-bottom:4px}.cloudlet-host .cloudlet-body-out{pointer-events:none;position:absolute;left:0;right:0}.cloudlet-host .cloudlet-body-out:empty{display:none}.cloudlet-host .cloudlet-description{color:var(--cloudlet-muted);padding-block:0 4px;font-size:.8125rem;line-height:1.45}.cloudlet-host .cloudlet-actions{flex-wrap:wrap;flex:none;gap:12px 8px;display:flex}.cloudlet-host .cloudlet-actions:empty{display:none}.cloudlet-host .cloudlet-actions:not(:empty){margin-block:8px 2px}.cloudlet-host :is(.cloudlet-action,.cloudlet-clear,.cloudlet-overflow button){overflow-wrap:anywhere;min-width:0;max-width:100%;min-height:32px;color:var(--cloudlet-foreground);background:var(--cloudlet-action-background);border-radius:9999px;padding:6px 14px;font-size:.8125rem;font-weight:500;line-height:1.5;text-decoration:none;position:relative}.cloudlet-host .cloudlet-action.cloudlet-primary{color:color-mix(in oklab, var(--cloudlet-status) 55%, var(--cloudlet-foreground));background:color-mix(in oklab, var(--cloudlet-status) 12%, transparent)}.cloudlet-host :is(.cloudlet-action,.cloudlet-overflow button)[aria-disabled=true]{color:var(--cloudlet-muted)}@media (hover:hover){.cloudlet-host :is(.cloudlet-close,.cloudlet-action,.cloudlet-clear,.cloudlet-overflow button):hover{background:color-mix(in oklab, var(--cloudlet-foreground) 13%, transparent)}.cloudlet-host .cloudlet-close:hover{color:var(--cloudlet-foreground)}.cloudlet-host .cloudlet-clear[data-armed=true]:hover{background:color-mix(in oklab, var(--cloudlet-error) 22%, transparent)}.cloudlet-host .cloudlet-action.cloudlet-primary:hover{background:color-mix(in oklab, var(--cloudlet-status) 20%, transparent)}.cloudlet-host .cloudlet-action.cloudlet-submit:hover{background:color-mix(in oklab, var(--cloudlet-status) 70%, #000)}}.cloudlet-host .cloudlet-action-error{color:var(--cloudlet-muted);padding-block:4px;font-size:.8125rem}.cloudlet-host .cloudlet-form{flex-direction:column;gap:8px;margin-block:4px 2px;display:flex}.cloudlet-host .cloudlet-form-row{grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:4px 8px;display:grid}.cloudlet-host .cloudlet-field{border:1px solid var(--cloudlet-field-border);width:100%;min-width:0;min-height:36px;color:var(--cloudlet-foreground);background:var(--cloudlet-field-background);font:inherit;resize:none;overflow-wrap:anywhere;border-radius:18px;grid-column:1;margin:0;padding:7px 13px;line-height:20px}.cloudlet-host .cloudlet-field::placeholder{color:var(--cloudlet-placeholder);opacity:1}.cloudlet-host .cloudlet-field:focus-visible{outline-offset:1px}.cloudlet-host .cloudlet-field[aria-invalid=true]{border-color:var(--cloudlet-error)}.cloudlet-host .cloudlet-field[aria-invalid=true]:focus-visible{outline-color:var(--cloudlet-error);border-color:#0000}.cloudlet-host .cloudlet-field[readonly]{color:var(--cloudlet-muted)}.cloudlet-host :is(.cloudlet-form>.cloudlet-action-error,.cloudlet-form~.cloudlet-action-error){padding-inline:14px}.cloudlet-host .cloudlet-field-error{color:color-mix(in oklab, var(--cloudlet-error) 70%, var(--cloudlet-foreground));grid-column:1/-1;padding-inline:14px;font-size:.8125rem}.cloudlet-host .cloudlet-action.cloudlet-submit{color:#fff;background:color-mix(in oklab, var(--cloudlet-status) 80%, #000);border-radius:50%;grid-column:2;place-items:center;width:36px;min-width:0;height:36px;min-height:0;padding:0;display:grid}.cloudlet-host .cloudlet-submit>svg{stroke-width:2px;width:16px;height:16px}.cloudlet-host button.cloudlet-submit:before{inset:calc((var(--cloudlet-control-min-size) - 36px) / -2);border-radius:50%}.cloudlet-host .cloudlet-indicator{color:var(--cloudlet-muted);flex:none;grid-template-columns:1fr auto 1fr;align-items:center;column-gap:8px;padding:0 16px 6px;font-size:.75rem;display:grid}.cloudlet-host .cloudlet-indicator>:is(.cloudlet-dots,.cloudlet-page){grid-column:2}.cloudlet-host .cloudlet-dots{display:flex}.cloudlet-host .cloudlet-indicator .cloudlet-dot-button{min-width:24px;min-height:24px;padding:8px}.cloudlet-host .cloudlet-dot{background:color-mix(in oklab, var(--cloudlet-foreground) 25%, transparent);border-radius:50%;width:6px;height:6px;display:block}.cloudlet-host .cloudlet-indicator [aria-current=true] .cloudlet-dot{background:var(--cloudlet-foreground)}.cloudlet-host .cloudlet-page{font-variant-numeric:tabular-nums;padding:8px;display:grid}.cloudlet-host .cloudlet-page>*{grid-area:1/1}.cloudlet-host button.cloudlet-clear{overflow-wrap:normal;grid-column:3;justify-self:end;font-size:.75rem;display:grid}.cloudlet-host .cloudlet-clear>*{grid-area:1/1;transition:opacity .2s,visibility .2s}.cloudlet-host .cloudlet-clear[data-armed=true]>:first-child,.cloudlet-host .cloudlet-clear[data-armed=false]>:last-child{opacity:0;visibility:hidden}.cloudlet-host .cloudlet-clear[data-armed=true]{color:color-mix(in oklab, var(--cloudlet-error) 70%, var(--cloudlet-foreground));background:color-mix(in oklab, var(--cloudlet-error) 14%, transparent)}.cloudlet-host .cloudlet-overflow{flex-wrap:wrap;grid-column:1/-1;justify-content:center;align-items:center;gap:4px 8px;min-width:0;display:flex}.cloudlet-host .cloudlet-overflow button{font-size:.75rem}.cloudlet-host .cloudlet-live{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.cloudlet-announcer{clip-path:inset(50%);white-space:nowrap;pointer-events:none;border:0;width:1px;height:1px;margin:-1px;padding:0;position:fixed;top:0;left:0;overflow:hidden}.cloudlet-host[data-position^=top-]{top:calc(var(--cloudlet-viewport-top,0px) + var(--cloudlet-top));bottom:auto}.cloudlet-host[data-align=left]{--cloudlet-anchor:0%;margin-left:0;margin-right:auto}.cloudlet-host[data-align=right]{--cloudlet-anchor:100%;margin-left:auto;margin-right:0}.cloudlet-host[data-align=left] .cloudlet-stack{margin-right:auto}.cloudlet-host[data-align=right] .cloudlet-stack{margin-left:auto}@media (width>=48rem){.cloudlet-host[data-position=auto]{top:calc(var(--cloudlet-viewport-top,0px) + var(--cloudlet-top));bottom:auto}}.cloudlet-host.cloudlet-center{width:min(var(--cloudlet-center-width), 100vw - 12px);max-width:none;max-height:none;margin:0;inset:0 0 0 auto}.cloudlet-host.cloudlet-center[data-side=left]{left:0;right:auto}.cloudlet-center .cloudlet-center-backdrop{width:min(calc(100% + var(--cloudlet-center-backdrop-reach)), 100vw);pointer-events:none;--cloudlet-center-tone-to:left;--cloudlet-center-tone-share:var(--cloudlet-center-tint);position:absolute;top:0;bottom:0;right:0}.cloudlet-center[data-side=left] .cloudlet-center-backdrop{--cloudlet-center-tone-to:right;left:0;right:auto}.cloudlet-center .cloudlet-center-backdrop>*{position:absolute;inset:0}.cloudlet-center .cloudlet-center-tone{--cloudlet-center-column:min(var(--cloudlet-center-width), 100vw - 12px);background:linear-gradient(to var(--cloudlet-center-tone-to), color-mix(in oklab, var(--cloudlet-background) var(--cloudlet-center-tone-share), transparent) var(--cloudlet-center-column), transparent calc(var(--cloudlet-center-column) + var(--cloudlet-center-backdrop-reach)))}.cloudlet-center .cloudlet-center-blur{display:none}.cloudlet-center[data-backdrop-layers="1"]{--cloudlet-center-layers:1}.cloudlet-center[data-backdrop-layers="2"]{--cloudlet-center-layers:2}.cloudlet-center[data-backdrop-layers="3"]{--cloudlet-center-layers:3}.cloudlet-center[data-backdrop-layers="4"]{--cloudlet-center-layers:4}.cloudlet-center[data-backdrop-layers="5"]{--cloudlet-center-layers:5}.cloudlet-center[data-backdrop-layers="6"]{--cloudlet-center-layers:6}.cloudlet-center[data-backdrop-layers="7"]{--cloudlet-center-layers:7}.cloudlet-center[data-backdrop-layers="8"]{--cloudlet-center-layers:8}.cloudlet-center .cloudlet-center-blur[data-cloudlet-layer="0"]{--cloudlet-center-layer:0;--cloudlet-center-layer-blur:1}.cloudlet-center .cloudlet-center-blur[data-cloudlet-layer="1"]{--cloudlet-center-layer:1;--cloudlet-center-layer-blur:.5}.cloudlet-center .cloudlet-center-blur[data-cloudlet-layer="2"]{--cloudlet-center-layer:2;--cloudlet-center-layer-blur:.25}.cloudlet-center .cloudlet-center-blur[data-cloudlet-layer="3"]{--cloudlet-center-layer:3;--cloudlet-center-layer-blur:.125}.cloudlet-center .cloudlet-center-blur[data-cloudlet-layer="4"]{--cloudlet-center-layer:4;--cloudlet-center-layer-blur:.0625}.cloudlet-center .cloudlet-center-blur[data-cloudlet-layer="5"]{--cloudlet-center-layer:5;--cloudlet-center-layer-blur:.03125}.cloudlet-center .cloudlet-center-blur[data-cloudlet-layer="6"]{--cloudlet-center-layer:6;--cloudlet-center-layer-blur:.015625}.cloudlet-center .cloudlet-center-blur[data-cloudlet-layer="7"]{--cloudlet-center-layer:7;--cloudlet-center-layer-blur:.0078125}.cloudlet-center[data-backdrop-layers="1"] .cloudlet-center-blur{--cloudlet-center-layer-blur:.7}@supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){@media (width>=48rem){.cloudlet-center .cloudlet-center-blur{--cloudlet-center-step:calc((var(--cloudlet-center-backdrop-reach) + 90px) / var(--cloudlet-center-layers));--cloudlet-center-from:calc((var(--cloudlet-center-layers) - 1 - var(--cloudlet-center-layer)) * var(--cloudlet-center-step));left:var(--cloudlet-center-from);width:min(3 * var(--cloudlet-center-step), 100% - var(--cloudlet-center-from));contain:strict;pointer-events:none;-webkit-backdrop-filter:blur(calc(var(--cloudlet-center-blur) * var(--cloudlet-center-layer-blur)));backdrop-filter:blur(calc(var(--cloudlet-center-blur) * var(--cloudlet-center-layer-blur)));-webkit-mask-image:linear-gradient(to right, transparent, #000 var(--cloudlet-center-step), #000 calc(2 * var(--cloudlet-center-step)), transparent calc(3 * var(--cloudlet-center-step)));mask-image:linear-gradient(to right, transparent, #000 var(--cloudlet-center-step), #000 calc(2 * var(--cloudlet-center-step)), transparent calc(3 * var(--cloudlet-center-step)));display:block;right:auto}.cloudlet-center .cloudlet-center-blur[data-cloudlet-layer="0"]{width:auto;-webkit-mask-image:linear-gradient(to right, transparent, #000 var(--cloudlet-center-step));mask-image:linear-gradient(to right, transparent, #000 var(--cloudlet-center-step));right:0}.cloudlet-center[data-side=left] .cloudlet-center-blur{left:auto;right:var(--cloudlet-center-from);-webkit-mask-image:linear-gradient(to left, transparent, #000 var(--cloudlet-center-step), #000 calc(2 * var(--cloudlet-center-step)), transparent calc(3 * var(--cloudlet-center-step)));mask-image:linear-gradient(to left, transparent, #000 var(--cloudlet-center-step), #000 calc(2 * var(--cloudlet-center-step)), transparent calc(3 * var(--cloudlet-center-step)))}.cloudlet-center[data-side=left] .cloudlet-center-blur[data-cloudlet-layer="0"]{-webkit-mask-image:linear-gradient(to left, transparent, #000 var(--cloudlet-center-step));mask-image:linear-gradient(to left, transparent, #000 var(--cloudlet-center-step));left:0}.cloudlet-center[data-backdrop-layers] .cloudlet-center-backdrop{--cloudlet-center-tone-share:var(--cloudlet-center-blur-tint)}}}.cloudlet-center .cloudlet-center-column{pointer-events:auto;min-height:0;padding-top:var(--cloudlet-safe-top);touch-action:pan-y;flex-direction:column;display:flex;position:absolute;inset:0}.cloudlet-center[data-side=right] .cloudlet-center-column{padding-right:var(--cloudlet-safe-right)}.cloudlet-center[data-side=left] .cloudlet-center-column{padding-left:var(--cloudlet-safe-left)}.cloudlet-center .cloudlet-center-header{flex:none;align-items:center;gap:8px;padding-block:16px 8px;padding-inline:26px 18px;display:flex}.cloudlet-center .cloudlet-center-heading{letter-spacing:-.01em;flex:1;min-width:0;font-size:.9375rem;font-weight:600;line-height:1.3}.cloudlet-center .cloudlet-center-heading:focus{outline:none}.cloudlet-center .cloudlet-center-heading:focus-visible{outline:2px solid var(--cloudlet-focus);outline-offset:2px;border-radius:4px}.cloudlet-host.cloudlet-center .cloudlet-close{top:auto;flex:none;position:relative;inset-inline-end:auto}.cloudlet-center .cloudlet-center-scroll{overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:none;pointer-events:none;flex:1;min-height:0;overflow:clip auto}.cloudlet-center[data-side=right] .cloudlet-center-scroll{margin-left:calc(-1 * var(--cloudlet-center-width));padding-left:var(--cloudlet-center-width)}.cloudlet-center[data-side=left] .cloudlet-center-scroll{margin-right:calc(-1 * var(--cloudlet-center-width));padding-right:var(--cloudlet-center-width)}.cloudlet-center .cloudlet-center-stack{pointer-events:auto;padding-block:4px calc(12px + var(--cloudlet-safe-bottom));padding-inline:12px;position:relative}.cloudlet-center .cloudlet-center-list{flex-direction:column;gap:10px;margin:0;padding:0;list-style:none;display:flex}.cloudlet-center .cloudlet-center-exits{pointer-events:none;position:absolute;inset:0}.cloudlet-center .cloudlet-center-exits>.cloudlet-card{margin:0;position:absolute}.cloudlet-center .cloudlet-center-exits>[data-cloudlet-edge]{background:color-mix(in oklab, var(--cloudlet-foreground) 5%, var(--cloudlet-background));overflow:hidden;box-shadow:0 4px 12px -8px #0000004d}.cloudlet-center .cloudlet-center-exits>[data-cloudlet-edge]>*{opacity:0}.cloudlet-center .cloudlet-center-empty{text-align:center;color:var(--cloudlet-muted);padding:28px 16px}@keyframes cloudlet-center-reveal{0%{opacity:0;filter:blur(var(--cloudlet-center-stack-blur,4px))}}@keyframes cloudlet-center-unreveal{to{opacity:0;filter:blur(var(--cloudlet-center-stack-blur,4px))}}@keyframes cloudlet-center-appear{0%{opacity:0}}@keyframes cloudlet-center-disappear{to{opacity:0}}.cloudlet-center [data-cloudlet-reveal]{animation:cloudlet-center-reveal var(--cloudlet-center-stack-reveal,.16s) ease-out backwards}.cloudlet-center :is(.cloudlet-center-empty,.cloudlet-center-more)[data-cloudlet-reveal]{animation-delay:var(--cloudlet-center-stack-reveal,.16s)}.cloudlet-center .cloudlet-center-exits>[data-cloudlet-unreveal]{pointer-events:none;animation:cloudlet-center-unreveal var(--cloudlet-center-stack-reveal,.16s) ease-in forwards;margin:0;position:absolute}.cloudlet-center[data-reduced-motion=true] [data-cloudlet-reveal]{animation-name:cloudlet-center-appear;animation-duration:var(--cloudlet-center-reduced,80ms);animation-delay:0s}.cloudlet-center[data-reduced-motion=true] .cloudlet-center-exits>[data-cloudlet-unreveal]{animation-name:cloudlet-center-disappear;animation-duration:var(--cloudlet-center-reduced,80ms)}.cloudlet-center .cloudlet-card{overflow-wrap:anywhere;transform-origin:50% 0;border:1px solid var(--cloudlet-border);border-radius:var(--cloudlet-island-radius);background:var(--cloudlet-background);min-width:0;box-shadow:var(--cloudlet-shadow);flex-direction:column;display:flex;position:relative}.cloudlet-center .cloudlet-card-head{align-items:flex-start;min-width:0;display:flex}.cloudlet-center .cloudlet-card .cloudlet-heading{padding-block:10px 6px;padding-inline:14px 8px}.cloudlet-center .cloudlet-card .cloudlet-title{white-space:normal;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;margin:0;display:-webkit-box}.cloudlet-host.cloudlet-center .cloudlet-body{touch-action:pan-y;max-height:none;overflow:visible}.cloudlet-host.cloudlet-center .cloudlet-card[data-icon=none] .cloudlet-body{padding-inline-start:14px}.cloudlet-center .cloudlet-center-unread{top:19px;background:var(--cloudlet-info);pointer-events:none;border-radius:50%;width:6px;height:6px;position:absolute;inset-inline-start:4px}.cloudlet-center .cloudlet-when{flex:none;place-items:center;min-width:32px;height:32px;margin-block-start:8px;margin-inline-end:8px;display:grid;position:relative}.cloudlet-center .cloudlet-when>*{grid-area:1/1}.cloudlet-center .cloudlet-time{color:var(--cloudlet-muted);font-variant-numeric:tabular-nums;white-space:nowrap;font-size:.75rem}.cloudlet-center .cloudlet-card-clear{opacity:0;filter:blur(var(--cloudlet-center-swap-blur,4px))}.cloudlet-center .cloudlet-card:is(:focus-within,[data-cloudlet-swapped]) .cloudlet-card-clear{opacity:1;filter:none}.cloudlet-center .cloudlet-card:not([data-cloudlet-place=edge]):is(:focus-within,[data-cloudlet-swapped]) .cloudlet-time{opacity:0;filter:blur(var(--cloudlet-center-swap-blur,4px))}@media (hover:hover){.cloudlet-center .cloudlet-card:hover .cloudlet-card-clear{opacity:1;filter:none}.cloudlet-center .cloudlet-card:not([data-cloudlet-place=edge]):hover .cloudlet-time{opacity:0;filter:blur(var(--cloudlet-center-swap-blur,4px))}}.cloudlet-host.cloudlet-center button.cloudlet-center-stack-clear{border-radius:16px;grid-template-columns:0fr;justify-content:center;width:auto;min-width:32px;display:grid}.cloudlet-center .cloudlet-center-stack-clear>svg{margin:auto;position:absolute;inset:0}.cloudlet-center .cloudlet-center-stack-clear-label{opacity:0;filter:blur(2px);white-space:nowrap;min-width:0;overflow:hidden}.cloudlet-center .cloudlet-center-stack-clear-label>span{padding-inline:12px;font-size:.75rem;font-weight:500;line-height:32px;display:block}.cloudlet-host.cloudlet-center button.cloudlet-center-stack-clear[data-armed=true]{opacity:1;filter:none;color:color-mix(in oklab, var(--cloudlet-error) 70%, var(--cloudlet-foreground));background:color-mix(in oklab, var(--cloudlet-error) 14%, transparent);grid-template-columns:1fr}.cloudlet-center .cloudlet-center-stack-clear[data-armed=true]>svg{opacity:0;filter:blur(2px)}.cloudlet-center .cloudlet-center-stack-clear[data-armed=true]>.cloudlet-center-stack-clear-label{opacity:1;filter:none}.cloudlet-center .cloudlet-card:has(.cloudlet-center-stack-clear[data-armed=true]) .cloudlet-time{opacity:0;filter:blur(var(--cloudlet-center-swap-blur,4px))}@media (hover:hover){.cloudlet-host.cloudlet-center button.cloudlet-center-stack-clear[data-armed=true]:hover{background:color-mix(in oklab, var(--cloudlet-error) 22%, transparent)}}@media (prefers-reduced-motion:no-preference){.cloudlet-center:not([data-reduced-motion=true]) .cloudlet-card .cloudlet-center-stack-clear{transition:grid-template-columns .32s cubic-bezier(.32, .72, 0, 1), opacity var(--cloudlet-center-swap,.18s), filter var(--cloudlet-center-swap,.18s), background-color .15s, color .15s}.cloudlet-center:not([data-reduced-motion=true]) .cloudlet-center-stack-clear>*{transition:opacity .2s,filter .2s}}.cloudlet-center[data-reduced-motion=true] .cloudlet-center-stack-clear>*{filter:none;transition:opacity var(--cloudlet-center-reduced,80ms)}.cloudlet-center .cloudlet-center-clear-all,.cloudlet-center .cloudlet-center-group-clear{flex:none}@media (prefers-reduced-motion:no-preference){.cloudlet-center:not([data-reduced-motion=true]) :is(.cloudlet-time,.cloudlet-card-clear){transition:opacity var(--cloudlet-center-swap,.18s), filter var(--cloudlet-center-swap,.18s), background-color .15s}}.cloudlet-center[data-reduced-motion=true] .cloudlet-card :is(.cloudlet-time,.cloudlet-card-clear){filter:none;transition:opacity var(--cloudlet-center-reduced,80ms)}.cloudlet-center .cloudlet-center-exits :is(.cloudlet-time,.cloudlet-card-clear){transition:none}.cloudlet-center .cloudlet-center-group-box{flex-direction:column;min-width:0;display:flex}.cloudlet-center .cloudlet-center-group-list{isolation:isolate;flex-direction:column;gap:10px;margin:0;padding:0;list-style:none;display:flex;position:relative}.cloudlet-center .cloudlet-center-group[data-expanded=false] .cloudlet-center-group-list{gap:0}.cloudlet-center .cloudlet-center-group[data-peeks="1"] .cloudlet-center-group-list{padding-bottom:var(--cloudlet-center-stack-step,10px)}.cloudlet-center .cloudlet-center-group[data-peeks="2"] .cloudlet-center-group-list{padding-bottom:calc(2 * var(--cloudlet-center-stack-step,10px))}.cloudlet-center .cloudlet-center-group-list>.cloudlet-card:first-child{z-index:3}.cloudlet-center .cloudlet-center-group-list>.cloudlet-card:nth-child(2){z-index:2}.cloudlet-center .cloudlet-center-group-list>.cloudlet-card:nth-child(3){z-index:1}.cloudlet-center .cloudlet-card:is([data-cloudlet-place=edge],[data-cloudlet-place=hidden]){pointer-events:none;transform-origin:50% 100%;background:color-mix(in oklab, var(--cloudlet-foreground) 5%, var(--cloudlet-background));clip-path:inset(max(0px, calc(100% - var(--cloudlet-center-stack-top,100%))) -48px -48px);position:absolute;top:auto;left:0;right:0;overflow:hidden;box-shadow:0 4px 12px -8px #0000004d}.cloudlet-center .cloudlet-center-group[data-peeks="1"] .cloudlet-card[data-cloudlet-place=edge]{bottom:var(--cloudlet-center-stack-step,10px)}.cloudlet-center .cloudlet-center-group[data-peeks="2"] .cloudlet-card:is([data-cloudlet-place=edge],[data-cloudlet-place=hidden]){bottom:calc(2 * var(--cloudlet-center-stack-step,10px))}.cloudlet-center .cloudlet-card[data-cloudlet-place=edge]:nth-child(2){translate:0 var(--cloudlet-center-stack-step,10px);scale:calc(1 - var(--cloudlet-center-stack-shrink,.06))}.cloudlet-center .cloudlet-card:is([data-cloudlet-place=edge]:nth-child(3),[data-cloudlet-place=hidden]){translate:0 calc(2 * var(--cloudlet-center-stack-step,10px));scale:calc(1 - 2 * var(--cloudlet-center-stack-shrink,.06))}.cloudlet-center .cloudlet-card[data-cloudlet-place=hidden]{visibility:hidden}.cloudlet-center .cloudlet-card:is([data-cloudlet-place=edge],[data-cloudlet-place=hidden])>*{opacity:0;filter:blur(var(--cloudlet-center-stack-blur,4px))}@media (prefers-reduced-motion:no-preference){.cloudlet-center:not([data-reduced-motion=true]) .cloudlet-center-group-list>.cloudlet-card{transition:background-color var(--cloudlet-center-stack-reveal,.16s), box-shadow var(--cloudlet-center-stack-reveal,.16s)}.cloudlet-center:not([data-reduced-motion=true]) .cloudlet-center-group-list>.cloudlet-card>*{transition:opacity var(--cloudlet-center-stack-reveal,.16s), filter var(--cloudlet-center-stack-reveal,.16s)}}.cloudlet-center[data-reduced-motion=true] .cloudlet-center-group-list>.cloudlet-card>*{filter:none;transition:opacity var(--cloudlet-center-reduced,80ms)}.cloudlet-center .cloudlet-center-more{min-width:0;max-width:100%;min-height:24px;color:var(--cloudlet-muted);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;border-radius:12px;align-self:center;margin-top:4px;padding:2px 10px;font-size:.75rem;line-height:1.4;position:relative}.cloudlet-center .cloudlet-center-group-header{align-items:center;gap:8px;min-height:40px;margin-bottom:2px;padding-inline:6px 2px;display:flex}.cloudlet-center .cloudlet-center-group-heading{min-width:0;font-size:inherit;font-weight:inherit;flex:1;margin:0}.cloudlet-center .cloudlet-center-group-title{text-align:start;border-radius:10px;justify-content:flex-start;gap:6px;min-width:0;max-width:100%;min-height:32px;padding:4px 8px;font-size:.8125rem;font-weight:600;line-height:1.3;position:relative}.cloudlet-center .cloudlet-center-group-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.cloudlet-center .cloudlet-center-group-count{color:var(--cloudlet-muted);font-variant-numeric:tabular-nums;flex:none;font-weight:400}.cloudlet-host.cloudlet-center .cloudlet-center-show-less{flex:none;font-size:.75rem}.cloudlet-center :is(.cloudlet-center-group-title,.cloudlet-center-more):before{content:"";position:absolute;inset-block:-10px;inset-inline:0}.cloudlet-center:not([data-backdrop=none]) :is(.cloudlet-center-empty,.cloudlet-center-more,.cloudlet-center-group-count){color:var(--cloudlet-foreground)}.cloudlet-center:not([data-backdrop=none]) :is(.cloudlet-center-header,.cloudlet-center-group-header) :is(.cloudlet-close,.cloudlet-action,.cloudlet-clear){background:color-mix(in oklab, var(--cloudlet-foreground) 8%, var(--cloudlet-background))}.cloudlet-center:not([data-backdrop=none]) :is(.cloudlet-center-header,.cloudlet-center-group-header) .cloudlet-clear[data-armed=true]{background:color-mix(in oklab, var(--cloudlet-error) 14%, var(--cloudlet-background))}@media (hover:hover){.cloudlet-center :is(.cloudlet-center-group-title,.cloudlet-center-more):hover{background:var(--cloudlet-action-background)}.cloudlet-center:not([data-backdrop=none]) :is(.cloudlet-center-header,.cloudlet-center-group-header) :is(.cloudlet-close,.cloudlet-action,.cloudlet-clear):hover{background:color-mix(in oklab, var(--cloudlet-foreground) 13%, var(--cloudlet-background))}.cloudlet-center:not([data-backdrop=none]) :is(.cloudlet-center-header,.cloudlet-center-group-header) .cloudlet-clear[data-armed=true]:hover{background:color-mix(in oklab, var(--cloudlet-error) 22%, var(--cloudlet-background))}.cloudlet-center .cloudlet-center-more:hover{color:var(--cloudlet-foreground)}}@media (hover:none){.cloudlet-center .cloudlet-card:not(:focus-within) .cloudlet-card-clear{pointer-events:none}}@media (prefers-reduced-transparency:reduce){.cloudlet-center .cloudlet-center-backdrop>.cloudlet-center-blur{display:none}.cloudlet-center[data-backdrop-layers] .cloudlet-center-backdrop{--cloudlet-center-tone-share:var(--cloudlet-center-tint)}}.cloudlet-host[data-theme=dark]{--cloudlet-background:#1c1c1e;--cloudlet-foreground:#f5f5f7;--cloudlet-muted:#a1a1aa;--cloudlet-focus:#93b4ff;--cloudlet-shadow:0 12px 32px -12px #0009;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--cloudlet-tail-background:color-mix(in oklab, var(--cloudlet-foreground) 14%, var(--cloudlet-background));--cloudlet-tail-border:color-mix(in oklab, var(--cloudlet-foreground) 18%, transparent);--cloudlet-center-blur-tint:58%}@media (prefers-color-scheme:dark){.cloudlet-host[data-theme=system]{--cloudlet-background:#1c1c1e;--cloudlet-foreground:#f5f5f7;--cloudlet-muted:#a1a1aa;--cloudlet-focus:#93b4ff;--cloudlet-shadow:0 12px 32px -12px #0009;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--cloudlet-tail-background:color-mix(in oklab, var(--cloudlet-foreground) 14%, var(--cloudlet-background));--cloudlet-tail-border:color-mix(in oklab, var(--cloudlet-foreground) 18%, transparent);--cloudlet-center-blur-tint:58%}}@keyframes cloudlet-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:no-preference){.cloudlet-host .cloudlet-spinner{animation:.8s linear infinite cloudlet-spin}.cloudlet-host .cloudlet-ring[data-progress=indeterminate]{animation:1s linear infinite cloudlet-spin}.cloudlet-host[data-reduced-motion=true] :is(.cloudlet-spinner,.cloudlet-ring){animation:none}.cloudlet-host:not([data-reduced-motion=true]) .cloudlet-clear>*{transition:opacity .2s,filter .2s,visibility .2s}.cloudlet-host:not([data-reduced-motion=true]) .cloudlet-clear[data-armed=true]>:first-child,.cloudlet-host:not([data-reduced-motion=true]) .cloudlet-clear[data-armed=false]>:last-child{filter:blur(2px)}}@media (forced-colors:active){.cloudlet-host[data-theme]{--cloudlet-background:Canvas;--cloudlet-foreground:CanvasText;--cloudlet-muted:CanvasText;--cloudlet-border:CanvasText;--cloudlet-focus:Highlight;--cloudlet-action-background:Canvas;--cloudlet-status:CanvasText;--cloudlet-success:CanvasText;--cloudlet-error:CanvasText;--cloudlet-info:CanvasText;--cloudlet-warning:CanvasText;--cloudlet-loading:CanvasText;--cloudlet-badge:Highlight;--cloudlet-badge-foreground:HighlightText}.cloudlet-host :is(.cloudlet-bg,.cloudlet-icon,.cloudlet-badge,.cloudlet-dot){forced-color-adjust:none}.cloudlet-host .cloudlet-icon{outline-offset:-1px;background:canvas;outline:1px solid canvastext}.cloudlet-host .cloudlet-ring-track{stroke:graytext}.cloudlet-host .cloudlet-dot{background:canvas;outline:1px solid canvastext}.cloudlet-host .cloudlet-indicator [aria-current=true] .cloudlet-dot{background:canvastext}.cloudlet-host :is(.cloudlet-close,.cloudlet-action,.cloudlet-clear,.cloudlet-overflow button){border:1px solid buttontext}.cloudlet-host :is(.cloudlet-clear,.cloudlet-center-stack-clear)[data-armed=true]{border-width:2px}.cloudlet-host .cloudlet-field{color:fieldtext;background:field;border-color:canvastext}.cloudlet-host .cloudlet-field[aria-invalid=true]{border-width:2px}.cloudlet-host .cloudlet-action.cloudlet-submit{forced-color-adjust:none;color:highlighttext;background:highlight;border-color:highlight}.cloudlet-center .cloudlet-center-backdrop{display:none}.cloudlet-center:not([data-backdrop=none]) .cloudlet-center-column{background:canvas}.cloudlet-center .cloudlet-card{box-shadow:none;border-color:canvastext}.cloudlet-center .cloudlet-center-unread{forced-color-adjust:none;background:highlight}.cloudlet-center .cloudlet-card[data-cloudlet-place=edge]{background:canvas}}
package/package.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "name": "@cloudlet/toast",
3
- "version": "1.4.0-rc.1",
3
+ "version": "1.5.0",
4
4
  "description": "Cloudlet notifications and async operations with an SSR-safe React renderer",
5
5
  "license": "MIT",
6
6
  "homepage": "https://cloudlet.dev/toaster",
7
7
  "repository": { "type": "git", "url": "git+https://github.com/Meerzus/cloudlet.git", "directory": "packages/toast" },
8
8
  "bugs": "https://github.com/Meerzus/cloudlet/issues",
9
9
  "keywords": ["react", "notifications", "toast", "snackbar", "accessibility", "async", "operations", "ssr"],
10
- "publishConfig": { "access": "public", "tag": "next" },
10
+ "publishConfig": { "access": "public", "tag": "latest" },
11
11
  "type": "module",
12
12
  "types": "./dist/index.d.ts",
13
13
  "exports": {
14
14
  ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js", "default": "./dist/index.js" },
15
15
  "./agent": { "types": "./dist/agent.d.ts", "import": "./dist/agent.js", "default": "./dist/agent.js" },
16
+ "./center": { "types": "./dist/center.d.ts", "import": "./dist/center.js", "default": "./dist/center.js" },
16
17
  "./styles.css": "./dist/styles.css"
17
18
  },
18
19
  "files": ["dist", "src/**/*.ts", "src/**/*.tsx", "LICENSE", "THIRD_PARTY_NOTICES.md", "README.md", "CHANGELOG.md"],
package/src/agent.ts CHANGED
@@ -439,7 +439,9 @@ export function toasterAgent<Slot, Signal extends CancellationSignal>(
439
439
  let islandRef: string | null = null;
440
440
  // The revision `known` was read at; a commit up to it is already in there.
441
441
  let seeded = 0;
442
- const listeners = new Set<(changes?: readonly AgentChangeShape[]) => void>();
442
+ // Each subscriber with the revision it read on subscribing: a commit up to it brings it nothing.
443
+ type Listener = { readonly call: (changes?: readonly AgentChangeShape[]) => void; readonly from: number };
444
+ const listeners = new Set<Listener>();
443
445
  let stop: (() => void) | undefined;
444
446
  let source: ToasterReading<Slot> | undefined;
445
447
  let entries: readonly ToasterAgentEntry[] = EMPTY;
@@ -751,7 +753,7 @@ export function toasterAgent<Slot, Signal extends CancellationSignal>(
751
753
 
752
754
  const subscribe = (listener: (changes?: readonly AgentChangeShape[]) => void): (() => void) => {
753
755
  // The same function may subscribe twice; each subscription is removed on its own.
754
- const own = (changes?: readonly AgentChangeShape[]): void => { listener(changes); };
756
+ let own: Listener;
755
757
  if (!listeners.size) {
756
758
  // Refs of what is already there are issued as a snapshot does, top first.
757
759
  snapshot();
@@ -768,16 +770,19 @@ export function toasterAgent<Slot, Signal extends CancellationSignal>(
768
770
  }
769
771
  islandRef = state.island.current ? refOf(state.island.current) : null;
770
772
  seeded = state.revision;
773
+ own = { call: listener, from: seeded };
771
774
  stop = port.subscribe((commit) => {
772
775
  const changes = collect(commit);
773
- // Every listener hears the change; the first error goes on to the controller's diagnostics.
774
- let failure: { readonly error: unknown } | undefined;
776
+ const revision = commit.controller.revision;
777
+ // Every listener hears the change, and each error goes on to the controller's diagnostics.
775
778
  for (const each of [...listeners]) {
776
779
  if (!listeners.has(each)) continue;
777
- try { each(changes); } catch (error) { failure ??= { error }; }
780
+ // One that subscribed while this commit was queued read what it did on subscribing.
781
+ try { each.call(revision <= each.from ? EMPTY : changes); } catch (error) { port.report(error); }
778
782
  }
779
- if (failure) throw failure.error;
780
783
  });
784
+ } else {
785
+ own = { call: listener, from: port.read().controller.revision };
781
786
  }
782
787
  listeners.add(own);
783
788
  return () => {