@gridui/overlay 2.0.0 → 2.2.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @gridui/overlay
2
2
 
3
- Core family. Public API: `interactionLayerProps`, `useInteractionOutline`, `InteractionOutlineOptions`, `useScrollbars`, `ScrollbarsOptions`, `scrollbarInteractionRef`, `OverlayOpen`, `RetainedLayer`, `RetainedLayerProps`, `useOverlayState`, `overlaySurfaceStyles`, `overlayListStyles`, `overlayListItemStyles`, `overlayListLabelStyles`, `overlayListIndicatorStyles`, `overlayBackdropStyles`.
3
+ Core family. Public API: `ExitSnapshot`, `ExitSnapshotProps`, `interactionLayerProps`, `useInteractionOutline`, `InteractionOutlineOptions`, `useScrollbars`, `ScrollbarsOptions`, `scrollbarInteractionRef`, `OverlayOpen`, `RetainedLayer`, `RetainedLayerProps`, `useOverlayState`, `overlaySurfaceStyles`, `overlayListStyles`, `overlayListItemStyles`, `overlayListLabelStyles`, `overlayListIndicatorStyles`, `overlayBackdropStyles`.
4
4
 
5
5
  Import components from `@gridui/overlay` and load `@gridui/overlay/styles.css` after Theme.
6
6
  Load styles for any composed dependency used by this family. Applications own routes, labels, state persistence, and branding.
@@ -17,8 +17,11 @@ or `deliberate` pace. Load this stylesheet before the consuming family.
17
17
  `overlayListStyles()` adds the shared popup-list stacking level, data typography,
18
18
  and zero surface padding to the popup surface. Dropdown menus and selection
19
19
  popups use it while retaining their own width, scrolling, and positioning rules.
20
- `overlayListItemStyles()` owns row spacing, text wrapping, selected fill, and
21
- visual disabled states. `overlayListLabelStyles()` supplies group-label spacing
20
+ `overlayListItemStyles({ selectionAppearance })` owns row spacing, text wrapping,
21
+ selected fill, and visual disabled states. Its CVA `selectionAppearance` variant
22
+ is `"filled"` by default, applying the brand tint to `data-state="checked"`,
23
+ `aria-selected="true"`, and `aria-current="page"`. Use `"indicator"` to omit the
24
+ selected fill; callers continue to render their own selection indicators. `overlayListLabelStyles()` supplies group-label spacing
22
25
  and typography. `overlayListIndicatorStyles()` reserves a 16px selection slot;
23
26
  place it after a flexible label so it stays at the trailing edge in LTR and RTL.
24
27
  These helpers contain presentation only. Callers provide semantic elements,
@@ -60,7 +63,7 @@ allowing the outline's full outward extent. The layer never receives input.
60
63
 
61
64
  ## Scrollbars
62
65
 
63
- `useScrollbars({ ref })` returns a composed React ref for one native scrolling
66
+ `useScrollbars({ ref, containerRef? })` returns a composed React ref for one native scrolling
64
67
  viewport. Bind each owned viewport explicitly, including independently scrolling
65
68
  dialog sections. `useInteractionOutline` remains independent; compose its ref
66
69
  with this hook when a viewport needs both behaviors. Theme owns the paint, so
@@ -73,7 +76,15 @@ Track clicks, wheel input, and captured pointer dragging update the real viewpor
73
76
  keyboard focus remains on the real content. RTL horizontal scrolling and reversed
74
77
  vertical flex layouts retain their native coordinate behavior.
75
78
 
76
- The layer lives inside the viewport and follows its native scrolling, clipping,
79
+ For an owned scroll layout, pass `containerRef` for a local, non-scrolling ancestor
80
+ with positioning and clipping owned by the composition. The viewport and indicator
81
+ layer are separate descendants, so the track never moves with scrolling content.
82
+ FollowScroll uses this structure. Resize notifications and native scroll events
83
+ refresh indicator geometry synchronously; React commits refresh before paint.
84
+
85
+ A ref-only native viewport retains an internal adapter for controls that cannot
86
+ supply a separate host without changing their DOM or popup event ownership.
87
+ That layer lives inside the viewport and follows its native scrolling, clipping,
77
88
  palette, transforms, and stacking context. It remains part of hover-opened panels.
78
89
  There is no document-level scrollbar portal, ancestor z-index reconstruction,
79
90
  descendant discovery, or permanent document input listener. Resize observation
@@ -95,3 +106,19 @@ React 19 callback ref with cleanup, also usable as an imperative binding that
95
106
  returns a disposer. Native viewports and Sidebar's Radix scrollbar share this
96
107
  binding. Ref composition uses Radix's cleanup-aware implementation. Both layout
97
108
  hooks ignore mutations inside their decorative layers and observe real content.
109
+
110
+ [Component reference](docs/reference/README.md) contains focused API pages for each public component.
111
+
112
+ ## Exit content
113
+
114
+ `ExitSnapshot` accepts `open` and `children`. Mount it inside a presence-managed
115
+ popup or dialog content boundary. While open, it follows parent-provided content;
116
+ while closing, it retains the last open content until that boundary unmounts.
117
+ Reopening during exit immediately resumes current content. It adds no DOM, timer,
118
+ focus management, or animation listener, and works with reduced-motion unmounts.
119
+
120
+ This separates immediate value/query updates from exit presentation. Select's
121
+ search popups and CommandPalette use it so a query reset cannot replace the
122
+ visible results halfway through dismissal. It retains React elements, not pixels:
123
+ descendant-owned state and context updates still run. It does not replace presence
124
+ or make interactive content inert; the owning surface keeps those responsibilities.
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @package Overlay
4
+ * @namespace ExitSnapshot
5
+ * @description Exit Snapshot
6
+ */
7
+ import { type FC, type ReactNode } from "react";
8
+ export type ExitSnapshotProps = {
9
+ /** Whether the owning surface is open. False retains its last open content. */
10
+ readonly open: boolean;
11
+ /** Parent-provided content, retained only until the presence boundary unmounts. */
12
+ readonly children: ReactNode;
13
+ };
14
+ export declare const ExitSnapshot: FC<ExitSnapshotProps>;
package/dist/index.d.ts CHANGED
@@ -4,6 +4,8 @@
4
4
  * @namespace Root
5
5
  * @description Index
6
6
  */
7
+ export type { ExitSnapshotProps } from "./exit-snapshot/exit-snapshot";
8
+ export { ExitSnapshot } from "./exit-snapshot/exit-snapshot";
7
9
  export { interactionLayerProps } from "./interaction-outline/interaction-layer";
8
10
  export type { InteractionOutlineOptions } from "./interaction-outline/use-interaction-outline";
9
11
  export { useInteractionOutline } from "./interaction-outline/use-interaction-outline";
package/dist/index.js CHANGED
@@ -1,3 +1,17 @@
1
+ // src/exit-snapshot/exit-snapshot.tsx
2
+ import { useState } from "react";
3
+ var ExitSnapshot = (props) => {
4
+ const { open, children } = props;
5
+ const [
6
+ snapshot,
7
+ setSnapshot
8
+ ] = useState(children);
9
+ if (open && children !== snapshot) {
10
+ setSnapshot(children);
11
+ }
12
+ return open ? children : snapshot;
13
+ };
14
+
1
15
  // src/interaction-outline/interaction-layer.ts
2
16
  var interactionLayerProps = { "data-gridui-interaction-layer": "" };
3
17
  var selector = "[data-gridui-interaction-layer]";
@@ -91,13 +105,13 @@ var hasContentMutation = (records) => {
91
105
 
92
106
  // src/interaction-outline/use-interaction-outline.ts
93
107
  import { useComposedRefs } from "@radix-ui/react-compose-refs";
94
- import { useLayoutEffect, useState } from "react";
108
+ import { useLayoutEffect, useState as useState2 } from "react";
95
109
  var useInteractionOutline = (options) => {
96
110
  const { ref, selector: selector2 = 'a[href], button, input, select, textarea, summary, [tabindex], [role="button"], [role="link"], [role="checkbox"], [role="radio"], [role="switch"], [role="tab"], [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"], [role="slider"]' } = options;
97
111
  const [
98
112
  viewport,
99
113
  setViewport
100
- ] = useState(null);
114
+ ] = useState2(null);
101
115
  useLayoutEffect(() => {
102
116
  if (!viewport) {
103
117
  return;
@@ -361,9 +375,18 @@ var overlayListStyles = cva2([
361
375
  var overlayListItemStyles = cva2([
362
376
  "gridui-overlay-list-item",
363
377
  "gridui-u-overlay--flex gridui-u-overlay--min-h-10 gridui-u-overlay--min-w-0 gridui-u-overlay--items-center gridui-u-overlay--gap-gridui-8 gridui-u-overlay--px-gridui-8 gridui-u-overlay--py-gridui-8 gridui-u-overlay--rounded-control gridui-u-overlay--whitespace-normal gridui-u-overlay--wrap-anywhere gridui-u-overlay--text-inherit gridui-u-overlay--no-underline gridui-u-overlay--cursor-pointer",
364
- "gridui-u-overlay--data-[state=checked]:bg-brand-tint gridui-u-overlay--aria-selected:bg-brand-tint",
365
378
  "gridui-u-overlay--data-disabled:opacity-50 gridui-u-overlay--data-disabled:pointer-events-none"
366
- ]);
379
+ ], {
380
+ variants: {
381
+ selectionAppearance: {
382
+ filled: "gridui-u-overlay--data-[state=checked]:bg-brand-tint gridui-u-overlay--aria-selected:bg-brand-tint gridui-u-overlay--aria-[current=page]:bg-brand-tint",
383
+ indicator: ""
384
+ }
385
+ },
386
+ defaultVariants: {
387
+ selectionAppearance: "filled"
388
+ }
389
+ });
367
390
  var overlayListLabelStyles = cva2([
368
391
  "gridui-overlay-list-label",
369
392
  "gridui-u-overlay--p-gridui-8 gridui-u-overlay--text-muted gridui-u-overlay--type-caption"
@@ -429,11 +452,11 @@ var scrollbarInteractionRef = (element) => {
429
452
  };
430
453
  };
431
454
 
432
- // src/scrollbar/textarea-scrollbar.ts
455
+ // src/scrollbar/sibling-scrollbar.ts
433
456
  var isTextarea = (element) => {
434
457
  return element.tagName === "TEXTAREA";
435
458
  };
436
- var syncTextareaScrollbar = (viewport, layer, style) => {
459
+ var syncSiblingScrollbar = (viewport, layer, style) => {
437
460
  const window = viewport.ownerDocument.defaultView;
438
461
  layer.style.position = style.position === "fixed" ? "fixed" : "absolute";
439
462
  const parent = layer.offsetParent;
@@ -457,7 +480,7 @@ var syncTextareaScrollbar = (viewport, layer, style) => {
457
480
  colorScheme: style.colorScheme
458
481
  });
459
482
  layer.inert = viewport.inert;
460
- const inherited = window.getComputedStyle(viewport.parentElement);
483
+ const inherited = window.getComputedStyle(layer.parentElement);
461
484
  for (const [
462
485
  token,
463
486
  fallback
@@ -487,14 +510,14 @@ var syncTextareaScrollbar = (viewport, layer, style) => {
487
510
 
488
511
  // src/scrollbar/use-scrollbars.ts
489
512
  import { useComposedRefs as useComposedRefs2 } from "@radix-ui/react-compose-refs";
490
- import { useId, useLayoutEffect as useLayoutEffect2, useRef, useState as useState2 } from "react";
513
+ import { useId, useLayoutEffect as useLayoutEffect2, useRef, useState as useState3 } from "react";
491
514
  var useScrollbars = (options = {}) => {
492
- const { ref } = options;
515
+ const { ref, containerRef } = options;
493
516
  const owner = useId();
494
517
  const [
495
518
  viewport,
496
519
  setViewport
497
- ] = useState2(null);
520
+ ] = useState3(null);
498
521
  const refresh = useRef(void 0);
499
522
  useLayoutEffect2(() => {
500
523
  if (!viewport) {
@@ -503,8 +526,9 @@ var useScrollbars = (options = {}) => {
503
526
  const document = viewport.ownerDocument;
504
527
  const window = document.defaultView;
505
528
  const textarea = isTextarea(viewport) ? viewport : null;
506
- const host = textarea ? viewport.parentElement : viewport;
507
- const layer = document.createElement(viewport.matches("ol, ul") ? "li" : "span");
529
+ const host = containerRef?.current ?? (textarea ? viewport.parentElement : viewport);
530
+ const sibling = host !== viewport;
531
+ const layer = document.createElement(host.matches("ol, ul") ? "li" : "span");
508
532
  layer.className = "gridui-scrollbar-layer";
509
533
  layer.setAttribute("aria-hidden", "true");
510
534
  host.append(layer);
@@ -632,8 +656,8 @@ var useScrollbars = (options = {}) => {
632
656
  const visible = viewport.clientWidth > 0 && viewport.clientHeight > 0;
633
657
  const vertical = visible && /^(auto|scroll)$/.test(style.overflowY) && extent(true) > 1;
634
658
  const horizontal = visible && /^(auto|scroll)$/.test(style.overflowX) && extent(false) > 1;
635
- if (textarea) {
636
- syncTextareaScrollbar(textarea, layer, style);
659
+ if (sibling) {
660
+ syncSiblingScrollbar(viewport, layer, style);
637
661
  } else {
638
662
  layer.style.transform = `translate(${viewport.scrollLeft}px, ${viewport.scrollTop}px)`;
639
663
  }
@@ -675,9 +699,12 @@ var useScrollbars = (options = {}) => {
675
699
  });
676
700
  }
677
701
  };
678
- const resize = new ResizeObserver(schedule);
702
+ const resize = new ResizeObserver(sync);
679
703
  const observeContents = () => {
680
- const current = new Set(Array.from(host.children).filter((element) => {
704
+ const current = new Set([
705
+ ...Array.from(host.children),
706
+ ...Array.from(viewport.children)
707
+ ].filter((element) => {
681
708
  return !element.classList.contains("gridui-scrollbar-layer");
682
709
  }));
683
710
  for (const content of contents) {
@@ -714,7 +741,7 @@ var useScrollbars = (options = {}) => {
714
741
  "data-state"
715
742
  ]
716
743
  });
717
- viewport.addEventListener("scroll", schedule, { passive: true });
744
+ viewport.addEventListener("scroll", sync, { passive: true });
718
745
  viewport.addEventListener("input", schedule);
719
746
  viewport.addEventListener("load", schedule, true);
720
747
  resize.observe(viewport);
@@ -723,12 +750,14 @@ var useScrollbars = (options = {}) => {
723
750
  schedule();
724
751
  }
725
752
  };
726
- if (textarea) {
753
+ if (sibling) {
727
754
  resize.observe(host);
755
+ }
756
+ if (textarea) {
728
757
  document.addEventListener("reset", reset, true);
729
758
  }
730
759
  observeContents();
731
- refresh.current = schedule;
760
+ refresh.current = sync;
732
761
  sync();
733
762
  return () => {
734
763
  disposed = true;
@@ -739,7 +768,7 @@ var useScrollbars = (options = {}) => {
739
768
  }
740
769
  resize.disconnect();
741
770
  mutation.disconnect();
742
- viewport.removeEventListener("scroll", schedule);
771
+ viewport.removeEventListener("scroll", sync);
743
772
  viewport.removeEventListener("input", schedule);
744
773
  viewport.removeEventListener("load", schedule, true);
745
774
  viewport.removeAttribute("data-gridui-scrollbar-owner");
@@ -751,7 +780,8 @@ var useScrollbars = (options = {}) => {
751
780
  };
752
781
  }, [
753
782
  viewport,
754
- owner
783
+ owner,
784
+ containerRef
755
785
  ]);
756
786
  useLayoutEffect2(() => {
757
787
  refresh.current?.();
@@ -760,12 +790,12 @@ var useScrollbars = (options = {}) => {
760
790
  };
761
791
 
762
792
  // src/use-overlay-state.ts
763
- import { useState as useState3 } from "react";
793
+ import { useState as useState4 } from "react";
764
794
  var useOverlayState = (options) => {
765
795
  const [
766
796
  localOpen,
767
797
  setLocalOpen
768
- ] = useState3(options.defaultOpen ?? false);
798
+ ] = useState4(options.defaultOpen ?? false);
769
799
  return {
770
800
  open: options.open ?? localOpen,
771
801
  onOpenChange: (open) => {
@@ -777,6 +807,7 @@ var useOverlayState = (options) => {
777
807
  };
778
808
  };
779
809
  export {
810
+ ExitSnapshot,
780
811
  OverlayOpen,
781
812
  RetainedLayer,
782
813
  interactionLayerProps,
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/interaction-outline/interaction-layer.ts", "../src/shared/content-mutation.ts", "../src/interaction-outline/use-interaction-outline.ts", "../src/surface/style.ts", "../src/list/style.ts", "../src/retained-layer/retained-layer.tsx", "../src/scrollbar/scrollbar-interaction-ref.ts", "../src/scrollbar/textarea-scrollbar.ts", "../src/scrollbar/use-scrollbars.ts", "../src/use-overlay-state.ts"],
4
- "sourcesContent": ["/**\n * @author WMXPY\n * @package Overlay\n * @namespace InteractionOutline\n * @description Interaction Layer\n */\n\n/** Marks a popup or dialog surface as an independent interaction paint boundary. */\nexport const interactionLayerProps = { \"data-gridui-interaction-layer\": \"\" } as const;\n\nconst selector = \"[data-gridui-interaction-layer]\";\nconst planes = new WeakMap<HTMLElement, OutlinePlane>();\nconst planeElements = new WeakMap<Element, OutlinePlane>();\n\ntype OutlinePlane = {\n readonly owner: HTMLElement;\n readonly element: HTMLDivElement;\n readonly parent: OutlinePlane | undefined;\n references: number;\n};\n\nexport const interactionLayerOwner = (viewport: HTMLElement): HTMLElement => {\n return viewport.closest<HTMLElement>(selector) ?? viewport.ownerDocument.body;\n};\n\nexport const refreshOutlinePlane = (plane: OutlinePlane): void => {\n const { owner, element, parent } = plane;\n const document = owner.ownerDocument;\n const style = document.defaultView!.getComputedStyle(owner);\n element.style.zIndex = owner === document.body || style.zIndex === \"auto\"\n ? style.getPropertyValue(\"--gridui-z-interaction\") || \"3\"\n : style.zIndex;\n if (parent) {\n refreshOutlinePlane(parent);\n const next = Array.from(parent.element.children).find(child => {\n const sibling = planeElements.get(child);\n return sibling && sibling !== plane && Boolean(owner.compareDocumentPosition(sibling.owner) & Node.DOCUMENT_POSITION_FOLLOWING);\n });\n parent.element.insertBefore(element, next ?? null);\n } else if (owner === document.body) {\n if (!element.isConnected) {\n document.body.append(element);\n }\n } else {\n // Follow the source surface in paint order, including multiple surfaces in one portal container.\n let anchor = owner;\n while (anchor.parentElement && anchor.parentElement !== document.body) {\n anchor = anchor.parentElement;\n }\n let next = anchor.nextElementSibling;\n while (next) {\n const sibling = planeElements.get(next);\n if (!sibling || sibling === plane || !(sibling.owner.compareDocumentPosition(owner) & Node.DOCUMENT_POSITION_FOLLOWING)) {\n break;\n }\n next = next.nextElementSibling;\n }\n document.body.insertBefore(element, next);\n }\n};\n\nexport const acquireOutlinePlane = (owner: HTMLElement): OutlinePlane => {\n const existing = planes.get(owner);\n if (existing) {\n existing.references++;\n return existing;\n }\n const parentOwner = owner.parentElement?.closest<HTMLElement>(selector);\n const parent = parentOwner ? acquireOutlinePlane(parentOwner) : undefined;\n const element = owner.ownerDocument.createElement(\"div\");\n element.className = \"gridui-interaction-outline-layer\";\n element.setAttribute(\"aria-hidden\", \"true\");\n const plane: OutlinePlane = {\n owner,\n element,\n parent,\n references: 1,\n };\n planes.set(owner, plane);\n planeElements.set(element, plane);\n refreshOutlinePlane(plane);\n return plane;\n};\n\nexport const releaseOutlinePlane = (plane: OutlinePlane): void => {\n if (--plane.references) {\n return;\n }\n plane.element.remove();\n planes.delete(plane.owner);\n planeElements.delete(plane.element);\n if (plane.parent) {\n releaseOutlinePlane(plane.parent);\n }\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Shared\n * @description Content Mutation\n */\n\nconst decorativeSelector = \".gridui-scrollbar-layer, .gridui-interaction-outline-layer\";\n\nconst isDecorative = (node: Node): boolean => {\n const element = node.nodeType === 1 ? node as Element : node.parentElement;\n return !!element?.closest(decorativeSelector);\n};\n\n/** Ignore owned indicator paint while retaining mutations of the real content. */\nexport const hasContentMutation = (records: readonly MutationRecord[]): boolean => {\n return records.some(record => {\n return !isDecorative(record.target) && (record.type !== \"childList\"\n || [\n ...record.addedNodes,\n ...record.removedNodes,\n ].some(node => {\n return !isDecorative(node);\n }));\n });\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace InteractionOutline\n * @description Use Interaction Outline\n */\n\nimport { hasContentMutation } from \"../shared/content-mutation\";\nimport { acquireOutlinePlane, interactionLayerOwner, refreshOutlinePlane, releaseOutlinePlane } from \"./interaction-layer\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { type Ref, type RefCallback, useLayoutEffect, useState } from \"react\";\n\nexport type InteractionOutlineOptions<T extends HTMLElement> = {\n readonly ref?: Ref<T> | undefined;\n readonly selector?: string;\n};\n\n/** Mirror Theme's resolved outline outside a scrolling viewport's clipping ancestors. */\nexport const useInteractionOutline = <T extends HTMLElement>(options: InteractionOutlineOptions<T>): RefCallback<T> => {\n const { ref, selector = 'a[href], button, input, select, textarea, summary, [tabindex], [role=\"button\"], [role=\"link\"], [role=\"checkbox\"], [role=\"radio\"], [role=\"switch\"], [role=\"tab\"], [role=\"menuitem\"], [role=\"menuitemcheckbox\"], [role=\"menuitemradio\"], [role=\"option\"], [role=\"slider\"]' } = options;\n const [\n viewport,\n setViewport,\n ] = useState<T | null>(null);\n useLayoutEffect(() => {\n if (!viewport) {\n return;\n }\n const document = viewport.ownerDocument;\n const window = document.defaultView!;\n let plane: ReturnType<typeof acquireOutlinePlane> | undefined;\n viewport.setAttribute(\"data-gridui-outline-viewport\", \"\");\n const rings = new Map<HTMLElement, HTMLDivElement>();\n let frame = 0;\n let disposed = false;\n const schedule = () => {\n if (!disposed && !frame) {\n frame = window.requestAnimationFrame(sync);\n }\n };\n const resize = new ResizeObserver(schedule);\n const sync = () => {\n frame = 0;\n for (const element of rings.keys()) {\n element.removeAttribute(\"data-gridui-outline-rendered\");\n }\n const owner = interactionLayerOwner(viewport);\n if (plane && plane.owner !== owner) {\n const previous = plane;\n plane = acquireOutlinePlane(owner);\n plane.element.append(...rings.values());\n releaseOutlinePlane(previous);\n }\n if (plane) {\n refreshOutlinePlane(plane);\n }\n const inactive = viewport.closest('[inert], [aria-hidden=\"true\"]');\n viewport.toggleAttribute(\"data-gridui-outline-inactive\", !!inactive);\n const candidates = inactive ? [] : Array.from(viewport.querySelectorAll<HTMLElement>(`${selector}, [data-gridui-outline-target]`)).filter(element => {\n return element.parentElement?.closest(\"[data-gridui-outline-viewport]\") === viewport\n && !element.closest('[inert], [aria-hidden=\"true\"]')\n && element.matches(\":hover, :active, :focus-visible, [data-highlighted], [data-gridui-outline-target]:has(:focus-visible)\");\n });\n const current = new Set<HTMLElement>();\n let moving = false;\n for (const element of candidates) {\n const box = element.getBoundingClientRect();\n const style = window.getComputedStyle(element);\n if (!element.getClientRects().length || style.visibility !== \"visible\"\n || style.outlineStyle === \"none\" || parseFloat(style.outlineWidth) <= 0) {\n continue;\n }\n let left = 0;\n let top = 0;\n let right = document.documentElement.clientWidth;\n let bottom = document.documentElement.clientHeight;\n let opacity = Number(style.opacity);\n let clipped = false;\n for (let ancestor = element.parentElement; ancestor; ancestor = ancestor.parentElement) {\n const appearance = window.getComputedStyle(ancestor);\n const bounds = ancestor.getBoundingClientRect();\n opacity *= Number(appearance.opacity);\n moving ||= ancestor.getAnimations().some(animation => {\n return animation.playState === \"running\";\n });\n if (appearance.overflowX !== \"visible\") {\n clipped = true;\n left = Math.max(left, bounds.left + ancestor.clientLeft);\n right = Math.min(right, bounds.left + ancestor.clientLeft + ancestor.clientWidth);\n }\n if (appearance.overflowY !== \"visible\") {\n clipped = true;\n top = Math.max(top, bounds.top + ancestor.clientTop);\n bottom = Math.min(bottom, bounds.top + ancestor.clientTop + ancestor.clientHeight);\n }\n }\n if (!clipped || opacity === 0 || box.right <= left || box.left >= right || box.bottom <= top || box.top >= bottom) {\n continue;\n }\n current.add(element);\n let ring = rings.get(element);\n if (!ring) {\n ring = document.createElement(\"div\");\n ring.className = \"gridui-interaction-outline\";\n plane ??= acquireOutlinePlane(owner);\n plane.element.append(ring);\n rings.set(element, ring);\n resize.observe(element);\n }\n const extent = Math.max(0, parseFloat(style.outlineWidth) + parseFloat(style.outlineOffset));\n Object.assign(ring.style, {\n left: `${box.left}px`,\n top: `${box.top}px`,\n width: `${box.width}px`,\n height: `${box.height}px`,\n outline: style.outline,\n outlineOffset: style.outlineOffset,\n borderRadius: style.borderRadius,\n opacity: String(opacity),\n zIndex: element.matches(\":focus-visible, [data-gridui-outline-target]:has(:focus-visible)\") ? \"3\" : \"2\",\n clipPath: `inset(${Math.max(0, top - box.top) - extent}px ${Math.max(0, box.right - right) - extent}px ${Math.max(0, box.bottom - bottom) - extent}px ${Math.max(0, left - box.left) - extent}px)`,\n });\n element.setAttribute(\"data-gridui-outline-rendered\", \"\");\n }\n for (const [\n element,\n ring,\n ] of rings) {\n if (!current.has(element)) {\n element.removeAttribute(\"data-gridui-outline-rendered\");\n ring.remove();\n rings.delete(element);\n resize.unobserve(element);\n }\n }\n if (!rings.size && plane) {\n releaseOutlinePlane(plane);\n plane = undefined;\n }\n if (moving) {\n schedule();\n }\n };\n const mutation = new MutationObserver(records => {\n if (hasContentMutation(records)) {\n schedule();\n }\n });\n mutation.observe(viewport, {\n subtree: true,\n childList: true,\n characterData: true,\n attributes: true,\n attributeFilter: [\n \"class\",\n \"style\",\n \"hidden\",\n \"disabled\",\n \"aria-disabled\",\n \"aria-readonly\",\n \"readonly\",\n \"data-disabled\",\n \"data-readonly\",\n \"data-state\",\n \"data-highlighted\",\n \"aria-selected\",\n \"aria-hidden\",\n \"inert\",\n \"data-gridui-outline-target\",\n ],\n });\n const ancestors = new MutationObserver(schedule);\n for (let ancestor: HTMLElement | null = viewport; ancestor; ancestor = ancestor.parentElement) {\n ancestors.observe(ancestor, {\n attributes: true,\n attributeFilter: [\n \"class\",\n \"style\",\n \"hidden\",\n \"dir\",\n \"data-theme\",\n \"data-state\",\n \"data-gridui-interaction-layer\",\n \"aria-hidden\",\n \"inert\",\n ],\n });\n }\n const onEvent = (event: Event) => {\n const target = event.target as Node | null;\n const inside = !!target && viewport.contains(target);\n const ancestor = !!target && target.contains(viewport);\n // Scrolling an ancestor moves the viewport, but sibling scrolls do not.\n if (event.type === \"scroll\") {\n if (inside || ancestor) {\n schedule();\n }\n return;\n }\n const related = \"relatedTarget\" in event ? event.relatedTarget as Node | null : null;\n const enters = !!related && related instanceof window.Node && viewport.contains(related);\n // Existing rings must also observe global input-modality changes and dismissal.\n if (inside || enters || rings.size > 0\n || (ancestor && (event.type === \"animationstart\" || event.type === \"transitionrun\"))) {\n schedule();\n }\n };\n const events = [\n \"scroll\",\n \"pointerover\",\n \"pointerout\",\n \"pointerdown\",\n \"pointerup\",\n \"pointercancel\",\n \"focusin\",\n \"focusout\",\n \"keydown\",\n \"keyup\",\n \"animationstart\",\n \"transitionrun\",\n ];\n for (const event of events) {\n document.addEventListener(event, onEvent, {\n capture: true,\n passive: true,\n });\n }\n const scheme = window.matchMedia(\"(prefers-color-scheme: dark)\");\n scheme.addEventListener(\"change\", schedule);\n window.addEventListener(\"resize\", schedule);\n resize.observe(viewport);\n sync();\n return () => {\n disposed = true;\n window.cancelAnimationFrame(frame);\n resize.disconnect();\n mutation.disconnect();\n ancestors.disconnect();\n for (const event of events) {\n document.removeEventListener(event, onEvent, true);\n }\n scheme.removeEventListener(\"change\", schedule);\n window.removeEventListener(\"resize\", schedule);\n viewport.removeAttribute(\"data-gridui-outline-viewport\");\n viewport.removeAttribute(\"data-gridui-outline-inactive\");\n for (const element of rings.keys()) {\n element.removeAttribute(\"data-gridui-outline-rendered\");\n }\n for (const ring of rings.values()) {\n ring.remove();\n }\n if (plane) {\n releaseOutlinePlane(plane);\n }\n };\n }, [\n viewport,\n selector,\n ]);\n return useComposedRefs(setViewport, ref);\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Surface\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const overlaySurfaceStyles = cva(\"gridui-overlay-surface gridui-u-overlay--border gridui-u-overlay--border-solid gridui-u-overlay--border-border gridui-u-overlay--bg-background gridui-u-overlay--text-foreground\", {\n variants: {\n kind: {\n popup: \"gridui-overlay-floating gridui-u-overlay--rounded-control\",\n tooltip: \"gridui-overlay-tooltip gridui-u-overlay--rounded-control\",\n dialog: \"gridui-overlay-dialog\",\n },\n },\n defaultVariants: { kind: \"popup\" },\n});\n\nexport const overlayBackdropStyles = cva(\"gridui-overlay-backdrop\", {\n variants: {\n pace: {\n normal: null,\n deliberate: \"gridui-overlay-backdrop-deliberate\",\n },\n },\n defaultVariants: { pace: \"normal\" },\n});\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace List\n * @description Style\n */\n\nimport { overlaySurfaceStyles } from \"../surface/style\";\nimport { cva } from \"class-variance-authority\";\n\n/** Shared popup-list presentation; callers own geometry and interaction semantics. */\nexport const overlayListStyles = cva([\n overlaySurfaceStyles(),\n \"gridui-u-overlay--z-(--gridui-z-popover) gridui-u-overlay--p-0 gridui-u-overlay--type-data\",\n]);\n\nexport const overlayListItemStyles = cva([\n \"gridui-overlay-list-item\",\n \"gridui-u-overlay--flex gridui-u-overlay--min-h-10 gridui-u-overlay--min-w-0 gridui-u-overlay--items-center gridui-u-overlay--gap-gridui-8 gridui-u-overlay--px-gridui-8 gridui-u-overlay--py-gridui-8 gridui-u-overlay--rounded-control gridui-u-overlay--whitespace-normal gridui-u-overlay--wrap-anywhere gridui-u-overlay--text-inherit gridui-u-overlay--no-underline gridui-u-overlay--cursor-pointer\",\n \"gridui-u-overlay--data-[state=checked]:bg-brand-tint gridui-u-overlay--aria-selected:bg-brand-tint\",\n \"gridui-u-overlay--data-disabled:opacity-50 gridui-u-overlay--data-disabled:pointer-events-none\",\n]);\n\nexport const overlayListLabelStyles = cva([\n \"gridui-overlay-list-label\",\n \"gridui-u-overlay--p-gridui-8 gridui-u-overlay--text-muted gridui-u-overlay--type-caption\",\n]);\n\nexport const overlayListIndicatorStyles = cva([\n \"gridui-overlay-list-indicator\",\n \"gridui-u-overlay--inline-flex gridui-u-overlay--size-gridui-16 gridui-u-overlay--shrink-0 gridui-u-overlay--items-center gridui-u-overlay--justify-center gridui-u-overlay--text-foreground\",\n]);\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace RetainedLayer\n * @description Retained Layer\n */\n\nimport { Activity, createContext, type FC, type ReactNode, useContext } from \"react\";\n\nexport const OverlayOpen = createContext(false);\n\nexport type RetainedLayerProps = {\n readonly children: ReactNode;\n};\n\nexport const RetainedLayer: FC<RetainedLayerProps> = (props: RetainedLayerProps) => {\n const { children } = props;\n const open = useContext(OverlayOpen);\n return (<Activity\n mode={!open ? \"hidden\" : \"visible\"}\n >\n {children}\n </Activity>);\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Scrollbar\n * @description Scrollbar Interaction Ref\n */\n\n/** Share pointer paint with native scrollbars and Radix without owning scrolling. */\nexport const scrollbarInteractionRef = (element: HTMLElement | null): (() => void) | undefined => {\n if (!element) {\n return;\n }\n const hover = (event: PointerEvent) => {\n const box = element.getBoundingClientRect();\n element.toggleAttribute(\"data-gridui-hovered\", event.clientX >= box.left && event.clientX < box.right\n && event.clientY >= box.top && event.clientY < box.bottom);\n };\n const leave = () => {\n element.removeAttribute(\"data-gridui-hovered\");\n };\n const down = (event: PointerEvent) => {\n if (event.button === 0) {\n element.setAttribute(\"data-gridui-dragging\", \"\");\n }\n };\n const finish = () => {\n element.removeAttribute(\"data-gridui-dragging\");\n };\n element.addEventListener(\"pointerenter\", hover);\n element.addEventListener(\"pointermove\", hover);\n element.addEventListener(\"pointerleave\", leave);\n element.addEventListener(\"pointerdown\", down);\n element.addEventListener(\"pointerup\", finish);\n element.addEventListener(\"pointercancel\", finish);\n element.addEventListener(\"lostpointercapture\", finish);\n return () => {\n element.removeEventListener(\"pointerenter\", hover);\n element.removeEventListener(\"pointermove\", hover);\n element.removeEventListener(\"pointerleave\", leave);\n element.removeEventListener(\"pointerdown\", down);\n element.removeEventListener(\"pointerup\", finish);\n element.removeEventListener(\"pointercancel\", finish);\n element.removeEventListener(\"lostpointercapture\", finish);\n leave();\n finish();\n };\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Scrollbar\n * @description Textarea Scrollbar\n */\n\nexport const isTextarea = (element: HTMLElement): element is HTMLTextAreaElement => {\n return element.tagName === \"TEXTAREA\";\n};\n\n/** Position a sibling indicator in its actual containing block without changing it. */\nexport const syncTextareaScrollbar = (viewport: HTMLTextAreaElement, layer: HTMLElement, style: CSSStyleDeclaration): void => {\n const window = viewport.ownerDocument.defaultView!;\n layer.style.position = style.position === \"fixed\" ? \"fixed\" : \"absolute\";\n const parent = layer.offsetParent as HTMLElement | null;\n const parentBox = parent?.getBoundingClientRect();\n const parentScaleX = parent?.offsetWidth ? parentBox!.width / parent.offsetWidth : 1;\n const parentScaleY = parent?.offsetHeight ? parentBox!.height / parent.offsetHeight : 1;\n const box = viewport.getBoundingClientRect();\n const controlScaleX = viewport.offsetWidth ? box.width / viewport.offsetWidth : 1;\n const controlScaleY = viewport.offsetHeight ? box.height / viewport.offsetHeight : 1;\n const current = layer.getBoundingClientRect();\n const left = (parseFloat(layer.style.left) || 0)\n + (box.left + viewport.clientLeft * controlScaleX - current.left) / parentScaleX;\n const top = (parseFloat(layer.style.top) || 0)\n + (box.top + viewport.clientTop * controlScaleY - current.top) / parentScaleY;\n Object.assign(layer.style, {\n left: `${left}px`,\n top: `${top}px`,\n transform: `scale(${controlScaleX / parentScaleX}, ${controlScaleY / parentScaleY})`,\n transformOrigin: \"0 0\",\n zIndex: style.zIndex === \"auto\" ? \"var(--gridui-z-interaction)\" : style.zIndex,\n opacity: style.opacity,\n visibility: style.visibility,\n colorScheme: style.colorScheme,\n });\n layer.inert = viewport.inert;\n const inherited = window.getComputedStyle(viewport.parentElement!);\n for (const [\n token,\n fallback,\n ] of [\n [\n \"--gridui-scrollbar-thumb\",\n \"--gridui-muted\",\n ],\n [\n \"--gridui-scrollbar-thumb-active\",\n \"--gridui-foreground\",\n ],\n [\n \"--gridui-scrollbar-track\",\n \"--gridui-scrollbar-track\",\n ],\n ] as const) {\n const value = style.getPropertyValue(token) || style.getPropertyValue(fallback);\n const parentValue = inherited.getPropertyValue(token) || inherited.getPropertyValue(fallback);\n if (value && value !== parentValue) {\n layer.style.setProperty(token, value);\n } else {\n layer.style.removeProperty(token);\n }\n }\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Scrollbar\n * @description Use Scrollbars\n */\n\nimport { hasContentMutation } from \"../shared/content-mutation\";\nimport { scrollbarInteractionRef } from \"./scrollbar-interaction-ref\";\nimport { isTextarea, syncTextareaScrollbar } from \"./textarea-scrollbar\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { type Ref, type RefCallback, useId, useLayoutEffect, useRef, useState } from \"react\";\n\nexport type ScrollbarsOptions<T extends HTMLElement> = {\n readonly ref?: Ref<T> | undefined;\n};\n\ntype Scrollbar = {\n readonly track: HTMLElement;\n readonly thumb: HTMLElement;\n readonly dispose: () => void;\n};\n\n/** Attach square scrollbars to one native viewport, within its local DOM owner. */\nexport const useScrollbars = <T extends HTMLElement>(options: ScrollbarsOptions<T> = {}): RefCallback<T> => {\n const { ref } = options;\n const owner = useId();\n const [\n viewport,\n setViewport,\n ] = useState<T | null>(null);\n const refresh = useRef<(() => void) | undefined>(undefined);\n useLayoutEffect(() => {\n if (!viewport) {\n return;\n }\n const document = viewport.ownerDocument;\n const window = document.defaultView!;\n // Textarea cannot render descendants. Its indicator is a local sibling.\n const textarea = isTextarea(viewport) ? viewport : null;\n const host = textarea ? viewport.parentElement! : viewport;\n const layer = document.createElement(viewport.matches(\"ol, ul\") ? \"li\" : \"span\");\n layer.className = \"gridui-scrollbar-layer\";\n layer.setAttribute(\"aria-hidden\", \"true\");\n host.append(layer);\n viewport.setAttribute(\"data-gridui-scrollbar-owner\", owner);\n viewport.setAttribute(\"data-gridui-scrollbar-id\", owner);\n const bars = new Map<boolean, Scrollbar>();\n const contents = new Set<Element>();\n let frame = 0;\n let disposed = false;\n let rtl = false;\n let reverse = false;\n const schedule = () => {\n if (!disposed && !frame) {\n frame = window.requestAnimationFrame(sync);\n }\n };\n const extent = (vertical: boolean): number => {\n return vertical ? viewport.scrollHeight - viewport.clientHeight : viewport.scrollWidth - viewport.clientWidth;\n };\n const position = (vertical: boolean): number => {\n const value = vertical ? viewport.scrollTop : viewport.scrollLeft;\n return (vertical ? reverse : rtl) ? extent(vertical) + value : value;\n };\n const write = (vertical: boolean, value: number) => {\n if (viewport.inert) {\n return;\n }\n const next = Math.max(0, Math.min(extent(vertical), value));\n const native = (vertical ? reverse : rtl) ? next - extent(vertical) : next;\n if (vertical) {\n viewport.scrollTop = native;\n } else {\n viewport.scrollLeft = native;\n }\n sync();\n };\n const create = (vertical: boolean): Scrollbar => {\n const track = document.createElement(\"span\");\n const thumb = document.createElement(\"span\");\n track.className = \"gridui-scrollbar\";\n thumb.className = \"gridui-scrollbar-thumb\";\n track.dataset.orientation = vertical ? \"vertical\" : \"horizontal\";\n track.setAttribute(\"data-gridui-scrollbar-for\", owner);\n track.append(thumb);\n layer.append(track);\n const unbind = scrollbarInteractionRef(track)!;\n const length = () => {\n return vertical ? track.clientHeight : track.clientWidth;\n };\n const thumbLength = () => {\n return vertical ? thumb.clientHeight : thumb.clientWidth;\n };\n const coordinate = (event: PointerEvent) => {\n const box = track.getBoundingClientRect();\n const scale = (vertical ? box.height : box.width) / length();\n return (vertical ? event.clientY - box.top : event.clientX - box.left) / scale;\n };\n let drag: {\n readonly pointerId: number;\n readonly grab: number;\n } | undefined;\n const finish = () => {\n drag = undefined;\n };\n track.addEventListener(\"pointerdown\", event => {\n if (event.button !== 0) {\n return;\n }\n event.preventDefault();\n const max = extent(vertical);\n const offset = max ? position(vertical) / max * (length() - thumbLength()) : 0;\n const cursor = coordinate(event);\n drag = {\n pointerId: event.pointerId,\n grab: event.target === thumb ? cursor - offset : thumbLength() / 2,\n };\n track.setPointerCapture(event.pointerId);\n write(vertical, (cursor - drag.grab) / Math.max(1, length() - thumbLength()) * max);\n });\n track.addEventListener(\"pointermove\", event => {\n if (drag?.pointerId === event.pointerId) {\n write(vertical, (coordinate(event) - drag.grab) / Math.max(1, length() - thumbLength()) * extent(vertical));\n }\n });\n track.addEventListener(\"pointerup\", finish);\n track.addEventListener(\"pointercancel\", finish);\n track.addEventListener(\"lostpointercapture\", finish);\n track.addEventListener(\"click\", event => {\n event.preventDefault();\n event.stopPropagation();\n });\n track.addEventListener(\"wheel\", event => {\n if (event.ctrlKey) {\n return;\n }\n const style = window.getComputedStyle(viewport);\n let unit = 1;\n if (event.deltaMode === 1) {\n unit = parseFloat(style.lineHeight) || 16;\n } else if (event.deltaMode === 2) {\n unit = vertical ? viewport.clientHeight : viewport.clientWidth;\n }\n const next = Math.max(0, Math.min(extent(vertical), position(vertical) + (vertical ? event.deltaY : event.deltaX || event.deltaY) * unit));\n if (next !== position(vertical)) {\n event.preventDefault();\n write(vertical, next);\n }\n }, { passive: false });\n return {\n track,\n thumb,\n dispose() {\n finish();\n unbind();\n track.remove();\n },\n };\n };\n const sync = () => {\n if (disposed) {\n return;\n }\n window.cancelAnimationFrame(frame);\n frame = 0;\n const style = window.getComputedStyle(viewport);\n rtl = style.direction === \"rtl\";\n reverse = style.flexDirection === \"column-reverse\";\n const visible = viewport.clientWidth > 0 && viewport.clientHeight > 0;\n const vertical = visible && /^(auto|scroll)$/.test(style.overflowY) && extent(true) > 1;\n const horizontal = visible && /^(auto|scroll)$/.test(style.overflowX) && extent(false) > 1;\n if (textarea) {\n syncTextareaScrollbar(textarea, layer, style);\n } else {\n // Compensate native content scrolling inside the viewport's own clip and layer.\n layer.style.transform = `translate(${viewport.scrollLeft}px, ${viewport.scrollTop}px)`;\n }\n for (const axis of [\n true,\n false,\n ]) {\n if (!(axis ? vertical : horizontal)) {\n const bar = bars.get(axis);\n if (bar) {\n bar.dispose();\n bars.delete(axis);\n }\n continue;\n }\n let bar = bars.get(axis);\n if (!bar) {\n bar = create(axis);\n bars.set(axis, bar);\n }\n const size = 10;\n const width = axis ? size : viewport.clientWidth - (vertical ? size : 0);\n const height = axis ? viewport.clientHeight - (horizontal ? size : 0) : size;\n const length = axis ? height : width;\n const view = axis ? viewport.clientHeight : viewport.clientWidth;\n const thumb = Math.min(length, Math.max(24, length * view / (extent(axis) + view)));\n Object.assign(bar.track.style, {\n left: `${axis ? viewport.clientWidth - size : 0}px`,\n top: `${axis ? 0 : viewport.clientHeight - size}px`,\n width: `${width}px`,\n height: `${height}px`,\n });\n Object.assign(bar.thumb.style, axis\n ? {\n height: `${thumb}px`,\n transform: `translateY(${position(axis) / extent(axis) * (length - thumb)}px)`,\n }\n : {\n width: `${thumb}px`,\n transform: `translateX(${position(axis) / extent(axis) * (length - thumb)}px)`,\n });\n }\n };\n const resize = new ResizeObserver(schedule);\n const observeContents = () => {\n const current = new Set(Array.from(host.children).filter(element => {\n return !element.classList.contains(\"gridui-scrollbar-layer\");\n }));\n for (const content of contents) {\n if (!current.has(content)) {\n resize.unobserve(content);\n contents.delete(content);\n }\n }\n for (const content of current) {\n if (!contents.has(content)) {\n resize.observe(content);\n contents.add(content);\n }\n }\n };\n const mutation = new MutationObserver(records => {\n if (hasContentMutation(records)) {\n observeContents();\n schedule();\n }\n });\n mutation.observe(host, {\n subtree: true,\n childList: true,\n characterData: true,\n attributes: true,\n attributeFilter: [\n \"class\",\n \"style\",\n \"hidden\",\n \"inert\",\n \"aria-hidden\",\n \"dir\",\n \"data-state\",\n ],\n });\n viewport.addEventListener(\"scroll\", schedule, { passive: true });\n viewport.addEventListener(\"input\", schedule);\n viewport.addEventListener(\"load\", schedule, true);\n resize.observe(viewport);\n const reset = (event: Event) => {\n if (event.target === textarea?.form) {\n schedule();\n }\n };\n if (textarea) {\n resize.observe(host);\n document.addEventListener(\"reset\", reset, true);\n }\n observeContents();\n refresh.current = schedule;\n sync();\n return () => {\n disposed = true;\n refresh.current = undefined;\n window.cancelAnimationFrame(frame);\n for (const bar of bars.values()) { bar.dispose(); }\n resize.disconnect();\n mutation.disconnect();\n viewport.removeEventListener(\"scroll\", schedule);\n viewport.removeEventListener(\"input\", schedule);\n viewport.removeEventListener(\"load\", schedule, true);\n viewport.removeAttribute(\"data-gridui-scrollbar-owner\");\n viewport.removeAttribute(\"data-gridui-scrollbar-id\");\n if (textarea) {\n document.removeEventListener(\"reset\", reset, true);\n }\n layer.remove();\n };\n }, [\n viewport,\n owner,\n ]);\n useLayoutEffect(() => {\n refresh.current?.();\n });\n return useComposedRefs(setViewport, ref);\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Root\n * @description Use Overlay State\n */\n\nimport { useState } from \"react\";\n\ntype OverlayStateOptions = {\n readonly open?: boolean | undefined;\n readonly defaultOpen?: boolean | undefined;\n readonly onOpenChange?: ((open: boolean) => void) | undefined;\n};\n\nexport const useOverlayState = (options: OverlayStateOptions) => {\n const [\n localOpen,\n setLocalOpen,\n ] = useState(options.defaultOpen ?? false);\n return {\n open: options.open ?? localOpen,\n onOpenChange: (open: boolean): void => {\n if (options.open === undefined) {\n setLocalOpen(open);\n }\n options.onOpenChange?.(open);\n },\n };\n};\n"],
5
- "mappings": ";AAQO,IAAM,wBAAwB,EAAE,iCAAiC,GAAG;AAE3E,IAAM,WAAW;AACjB,IAAM,SAAS,oBAAI,QAAmC;AACtD,IAAM,gBAAgB,oBAAI,QAA+B;AASlD,IAAM,wBAAwB,CAAC,aAAuC;AACzE,SAAO,SAAS,QAAqB,QAAQ,KAAK,SAAS,cAAc;AAC7E;AAEO,IAAM,sBAAsB,CAAC,UAA8B;AAC9D,QAAM,EAAE,OAAO,SAAS,OAAO,IAAI;AACnC,QAAM,WAAW,MAAM;AACvB,QAAM,QAAQ,SAAS,YAAa,iBAAiB,KAAK;AAC1D,UAAQ,MAAM,SAAS,UAAU,SAAS,QAAQ,MAAM,WAAW,SAC7D,MAAM,iBAAiB,wBAAwB,KAAK,MACpD,MAAM;AACZ,MAAI,QAAQ;AACR,wBAAoB,MAAM;AAC1B,UAAM,OAAO,MAAM,KAAK,OAAO,QAAQ,QAAQ,EAAE,KAAK,WAAS;AAC3D,YAAM,UAAU,cAAc,IAAI,KAAK;AACvC,aAAO,WAAW,YAAY,SAAS,QAAQ,MAAM,wBAAwB,QAAQ,KAAK,IAAI,KAAK,2BAA2B;AAAA,IAClI,CAAC;AACD,WAAO,QAAQ,aAAa,SAAS,QAAQ,IAAI;AAAA,EACrD,WAAW,UAAU,SAAS,MAAM;AAChC,QAAI,CAAC,QAAQ,aAAa;AACtB,eAAS,KAAK,OAAO,OAAO;AAAA,IAChC;AAAA,EACJ,OAAO;AAEH,QAAI,SAAS;AACb,WAAO,OA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G;AAAA,IACC;AAAA,IACA;AAAA,EACJ,CAAC;AACD,EAAAF,iBAAgB,MAAM;AAClB,YAAQ,UAAU;AAAA,EACtB,CAAC;AACD,SAAOD,iBAAgB,aAAa,GAAG;AAC3C;;;ACnSA,SAAS,YAAAI,iBAAgB;AAQlB,IAAM,kBAAkB,CAAC,YAAiC;AAC7D,QAAM;AAAA,IACF;AAAA,IACA;AAAA,EACJ,IAAIA,UAAS,QAAQ,eAAe,KAAK;AACzC,SAAO;AAAA,IACH,MAAM,QAAQ,QAAQ;AAAA,IACtB,cAAc,CAAC,SAAwB;AACnC,UAAI,QAAQ,SAAS,QAAW;AAC5B,qBAAa,IAAI;AAAA,MACrB;AACA,cAAQ,eAAe,IAAI;AAAA,IAC/B;AAAA,EACJ;AACJ;",
6
- "names": ["selector", "cva", "useComposedRefs", "useLayoutEffect", "useState", "bar", "useState"]
3
+ "sources": ["../src/exit-snapshot/exit-snapshot.tsx", "../src/interaction-outline/interaction-layer.ts", "../src/shared/content-mutation.ts", "../src/interaction-outline/use-interaction-outline.ts", "../src/surface/style.ts", "../src/list/style.ts", "../src/retained-layer/retained-layer.tsx", "../src/scrollbar/scrollbar-interaction-ref.ts", "../src/scrollbar/sibling-scrollbar.ts", "../src/scrollbar/use-scrollbars.ts", "../src/use-overlay-state.ts"],
4
+ "sourcesContent": ["/**\n * @author WMXPY\n * @package Overlay\n * @namespace ExitSnapshot\n * @description Exit Snapshot\n */\n\nimport { type FC, type ReactNode, useState } from \"react\";\n\nexport type ExitSnapshotProps = {\n /** Whether the owning surface is open. False retains its last open content. */\n readonly open: boolean;\n /** Parent-provided content, retained only until the presence boundary unmounts. */\n readonly children: ReactNode;\n};\n\nexport const ExitSnapshot: FC<ExitSnapshotProps> = (props: ExitSnapshotProps) => {\n const { open, children } = props;\n const [\n snapshot,\n setSnapshot,\n ] = useState(children);\n // Track parent content before committing, so a close never paints reset data.\n // Mount inside the presence boundary; its unmount releases the snapshot.\n if (open && children !== snapshot) {\n setSnapshot(children);\n }\n return open ? children : snapshot;\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace InteractionOutline\n * @description Interaction Layer\n */\n\n/** Marks a popup or dialog surface as an independent interaction paint boundary. */\nexport const interactionLayerProps = { \"data-gridui-interaction-layer\": \"\" } as const;\n\nconst selector = \"[data-gridui-interaction-layer]\";\nconst planes = new WeakMap<HTMLElement, OutlinePlane>();\nconst planeElements = new WeakMap<Element, OutlinePlane>();\n\ntype OutlinePlane = {\n readonly owner: HTMLElement;\n readonly element: HTMLDivElement;\n readonly parent: OutlinePlane | undefined;\n references: number;\n};\n\nexport const interactionLayerOwner = (viewport: HTMLElement): HTMLElement => {\n return viewport.closest<HTMLElement>(selector) ?? viewport.ownerDocument.body;\n};\n\nexport const refreshOutlinePlane = (plane: OutlinePlane): void => {\n const { owner, element, parent } = plane;\n const document = owner.ownerDocument;\n const style = document.defaultView!.getComputedStyle(owner);\n element.style.zIndex = owner === document.body || style.zIndex === \"auto\"\n ? style.getPropertyValue(\"--gridui-z-interaction\") || \"3\"\n : style.zIndex;\n if (parent) {\n refreshOutlinePlane(parent);\n const next = Array.from(parent.element.children).find(child => {\n const sibling = planeElements.get(child);\n return sibling && sibling !== plane && Boolean(owner.compareDocumentPosition(sibling.owner) & Node.DOCUMENT_POSITION_FOLLOWING);\n });\n parent.element.insertBefore(element, next ?? null);\n } else if (owner === document.body) {\n if (!element.isConnected) {\n document.body.append(element);\n }\n } else {\n // Follow the source surface in paint order, including multiple surfaces in one portal container.\n let anchor = owner;\n while (anchor.parentElement && anchor.parentElement !== document.body) {\n anchor = anchor.parentElement;\n }\n let next = anchor.nextElementSibling;\n while (next) {\n const sibling = planeElements.get(next);\n if (!sibling || sibling === plane || !(sibling.owner.compareDocumentPosition(owner) & Node.DOCUMENT_POSITION_FOLLOWING)) {\n break;\n }\n next = next.nextElementSibling;\n }\n document.body.insertBefore(element, next);\n }\n};\n\nexport const acquireOutlinePlane = (owner: HTMLElement): OutlinePlane => {\n const existing = planes.get(owner);\n if (existing) {\n existing.references++;\n return existing;\n }\n const parentOwner = owner.parentElement?.closest<HTMLElement>(selector);\n const parent = parentOwner ? acquireOutlinePlane(parentOwner) : undefined;\n const element = owner.ownerDocument.createElement(\"div\");\n element.className = \"gridui-interaction-outline-layer\";\n element.setAttribute(\"aria-hidden\", \"true\");\n const plane: OutlinePlane = {\n owner,\n element,\n parent,\n references: 1,\n };\n planes.set(owner, plane);\n planeElements.set(element, plane);\n refreshOutlinePlane(plane);\n return plane;\n};\n\nexport const releaseOutlinePlane = (plane: OutlinePlane): void => {\n if (--plane.references) {\n return;\n }\n plane.element.remove();\n planes.delete(plane.owner);\n planeElements.delete(plane.element);\n if (plane.parent) {\n releaseOutlinePlane(plane.parent);\n }\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Shared\n * @description Content Mutation\n */\n\nconst decorativeSelector = \".gridui-scrollbar-layer, .gridui-interaction-outline-layer\";\n\nconst isDecorative = (node: Node): boolean => {\n const element = node.nodeType === 1 ? node as Element : node.parentElement;\n return !!element?.closest(decorativeSelector);\n};\n\n/** Ignore owned indicator paint while retaining mutations of the real content. */\nexport const hasContentMutation = (records: readonly MutationRecord[]): boolean => {\n return records.some(record => {\n return !isDecorative(record.target) && (record.type !== \"childList\"\n || [\n ...record.addedNodes,\n ...record.removedNodes,\n ].some(node => {\n return !isDecorative(node);\n }));\n });\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace InteractionOutline\n * @description Use Interaction Outline\n */\n\nimport { hasContentMutation } from \"../shared/content-mutation\";\nimport { acquireOutlinePlane, interactionLayerOwner, refreshOutlinePlane, releaseOutlinePlane } from \"./interaction-layer\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { type Ref, type RefCallback, useLayoutEffect, useState } from \"react\";\n\nexport type InteractionOutlineOptions<T extends HTMLElement> = {\n readonly ref?: Ref<T> | undefined;\n readonly selector?: string;\n};\n\n/** Mirror Theme's resolved outline outside a scrolling viewport's clipping ancestors. */\nexport const useInteractionOutline = <T extends HTMLElement>(options: InteractionOutlineOptions<T>): RefCallback<T> => {\n const { ref, selector = 'a[href], button, input, select, textarea, summary, [tabindex], [role=\"button\"], [role=\"link\"], [role=\"checkbox\"], [role=\"radio\"], [role=\"switch\"], [role=\"tab\"], [role=\"menuitem\"], [role=\"menuitemcheckbox\"], [role=\"menuitemradio\"], [role=\"option\"], [role=\"slider\"]' } = options;\n const [\n viewport,\n setViewport,\n ] = useState<T | null>(null);\n useLayoutEffect(() => {\n if (!viewport) {\n return;\n }\n const document = viewport.ownerDocument;\n const window = document.defaultView!;\n let plane: ReturnType<typeof acquireOutlinePlane> | undefined;\n viewport.setAttribute(\"data-gridui-outline-viewport\", \"\");\n const rings = new Map<HTMLElement, HTMLDivElement>();\n let frame = 0;\n let disposed = false;\n const schedule = () => {\n if (!disposed && !frame) {\n frame = window.requestAnimationFrame(sync);\n }\n };\n const resize = new ResizeObserver(schedule);\n const sync = () => {\n frame = 0;\n for (const element of rings.keys()) {\n element.removeAttribute(\"data-gridui-outline-rendered\");\n }\n const owner = interactionLayerOwner(viewport);\n if (plane && plane.owner !== owner) {\n const previous = plane;\n plane = acquireOutlinePlane(owner);\n plane.element.append(...rings.values());\n releaseOutlinePlane(previous);\n }\n if (plane) {\n refreshOutlinePlane(plane);\n }\n const inactive = viewport.closest('[inert], [aria-hidden=\"true\"]');\n viewport.toggleAttribute(\"data-gridui-outline-inactive\", !!inactive);\n const candidates = inactive ? [] : Array.from(viewport.querySelectorAll<HTMLElement>(`${selector}, [data-gridui-outline-target]`)).filter(element => {\n return element.parentElement?.closest(\"[data-gridui-outline-viewport]\") === viewport\n && !element.closest('[inert], [aria-hidden=\"true\"]')\n && element.matches(\":hover, :active, :focus-visible, [data-highlighted], [data-gridui-outline-target]:has(:focus-visible)\");\n });\n const current = new Set<HTMLElement>();\n let moving = false;\n for (const element of candidates) {\n const box = element.getBoundingClientRect();\n const style = window.getComputedStyle(element);\n if (!element.getClientRects().length || style.visibility !== \"visible\"\n || style.outlineStyle === \"none\" || parseFloat(style.outlineWidth) <= 0) {\n continue;\n }\n let left = 0;\n let top = 0;\n let right = document.documentElement.clientWidth;\n let bottom = document.documentElement.clientHeight;\n let opacity = Number(style.opacity);\n let clipped = false;\n for (let ancestor = element.parentElement; ancestor; ancestor = ancestor.parentElement) {\n const appearance = window.getComputedStyle(ancestor);\n const bounds = ancestor.getBoundingClientRect();\n opacity *= Number(appearance.opacity);\n moving ||= ancestor.getAnimations().some(animation => {\n return animation.playState === \"running\";\n });\n if (appearance.overflowX !== \"visible\") {\n clipped = true;\n left = Math.max(left, bounds.left + ancestor.clientLeft);\n right = Math.min(right, bounds.left + ancestor.clientLeft + ancestor.clientWidth);\n }\n if (appearance.overflowY !== \"visible\") {\n clipped = true;\n top = Math.max(top, bounds.top + ancestor.clientTop);\n bottom = Math.min(bottom, bounds.top + ancestor.clientTop + ancestor.clientHeight);\n }\n }\n if (!clipped || opacity === 0 || box.right <= left || box.left >= right || box.bottom <= top || box.top >= bottom) {\n continue;\n }\n current.add(element);\n let ring = rings.get(element);\n if (!ring) {\n ring = document.createElement(\"div\");\n ring.className = \"gridui-interaction-outline\";\n plane ??= acquireOutlinePlane(owner);\n plane.element.append(ring);\n rings.set(element, ring);\n resize.observe(element);\n }\n const extent = Math.max(0, parseFloat(style.outlineWidth) + parseFloat(style.outlineOffset));\n Object.assign(ring.style, {\n left: `${box.left}px`,\n top: `${box.top}px`,\n width: `${box.width}px`,\n height: `${box.height}px`,\n outline: style.outline,\n outlineOffset: style.outlineOffset,\n borderRadius: style.borderRadius,\n opacity: String(opacity),\n zIndex: element.matches(\":focus-visible, [data-gridui-outline-target]:has(:focus-visible)\") ? \"3\" : \"2\",\n clipPath: `inset(${Math.max(0, top - box.top) - extent}px ${Math.max(0, box.right - right) - extent}px ${Math.max(0, box.bottom - bottom) - extent}px ${Math.max(0, left - box.left) - extent}px)`,\n });\n element.setAttribute(\"data-gridui-outline-rendered\", \"\");\n }\n for (const [\n element,\n ring,\n ] of rings) {\n if (!current.has(element)) {\n element.removeAttribute(\"data-gridui-outline-rendered\");\n ring.remove();\n rings.delete(element);\n resize.unobserve(element);\n }\n }\n if (!rings.size && plane) {\n releaseOutlinePlane(plane);\n plane = undefined;\n }\n if (moving) {\n schedule();\n }\n };\n const mutation = new MutationObserver(records => {\n if (hasContentMutation(records)) {\n schedule();\n }\n });\n mutation.observe(viewport, {\n subtree: true,\n childList: true,\n characterData: true,\n attributes: true,\n attributeFilter: [\n \"class\",\n \"style\",\n \"hidden\",\n \"disabled\",\n \"aria-disabled\",\n \"aria-readonly\",\n \"readonly\",\n \"data-disabled\",\n \"data-readonly\",\n \"data-state\",\n \"data-highlighted\",\n \"aria-selected\",\n \"aria-hidden\",\n \"inert\",\n \"data-gridui-outline-target\",\n ],\n });\n const ancestors = new MutationObserver(schedule);\n for (let ancestor: HTMLElement | null = viewport; ancestor; ancestor = ancestor.parentElement) {\n ancestors.observe(ancestor, {\n attributes: true,\n attributeFilter: [\n \"class\",\n \"style\",\n \"hidden\",\n \"dir\",\n \"data-theme\",\n \"data-state\",\n \"data-gridui-interaction-layer\",\n \"aria-hidden\",\n \"inert\",\n ],\n });\n }\n const onEvent = (event: Event) => {\n const target = event.target as Node | null;\n const inside = !!target && viewport.contains(target);\n const ancestor = !!target && target.contains(viewport);\n // Scrolling an ancestor moves the viewport, but sibling scrolls do not.\n if (event.type === \"scroll\") {\n if (inside || ancestor) {\n schedule();\n }\n return;\n }\n const related = \"relatedTarget\" in event ? event.relatedTarget as Node | null : null;\n const enters = !!related && related instanceof window.Node && viewport.contains(related);\n // Existing rings must also observe global input-modality changes and dismissal.\n if (inside || enters || rings.size > 0\n || (ancestor && (event.type === \"animationstart\" || event.type === \"transitionrun\"))) {\n schedule();\n }\n };\n const events = [\n \"scroll\",\n \"pointerover\",\n \"pointerout\",\n \"pointerdown\",\n \"pointerup\",\n \"pointercancel\",\n \"focusin\",\n \"focusout\",\n \"keydown\",\n \"keyup\",\n \"animationstart\",\n \"transitionrun\",\n ];\n for (const event of events) {\n document.addEventListener(event, onEvent, {\n capture: true,\n passive: true,\n });\n }\n const scheme = window.matchMedia(\"(prefers-color-scheme: dark)\");\n scheme.addEventListener(\"change\", schedule);\n window.addEventListener(\"resize\", schedule);\n resize.observe(viewport);\n sync();\n return () => {\n disposed = true;\n window.cancelAnimationFrame(frame);\n resize.disconnect();\n mutation.disconnect();\n ancestors.disconnect();\n for (const event of events) {\n document.removeEventListener(event, onEvent, true);\n }\n scheme.removeEventListener(\"change\", schedule);\n window.removeEventListener(\"resize\", schedule);\n viewport.removeAttribute(\"data-gridui-outline-viewport\");\n viewport.removeAttribute(\"data-gridui-outline-inactive\");\n for (const element of rings.keys()) {\n element.removeAttribute(\"data-gridui-outline-rendered\");\n }\n for (const ring of rings.values()) {\n ring.remove();\n }\n if (plane) {\n releaseOutlinePlane(plane);\n }\n };\n }, [\n viewport,\n selector,\n ]);\n return useComposedRefs(setViewport, ref);\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Surface\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const overlaySurfaceStyles = cva(\"gridui-overlay-surface gridui-u-overlay--border gridui-u-overlay--border-solid gridui-u-overlay--border-border gridui-u-overlay--bg-background gridui-u-overlay--text-foreground\", {\n variants: {\n kind: {\n popup: \"gridui-overlay-floating gridui-u-overlay--rounded-control\",\n tooltip: \"gridui-overlay-tooltip gridui-u-overlay--rounded-control\",\n dialog: \"gridui-overlay-dialog\",\n },\n },\n defaultVariants: { kind: \"popup\" },\n});\n\nexport const overlayBackdropStyles = cva(\"gridui-overlay-backdrop\", {\n variants: {\n pace: {\n normal: null,\n deliberate: \"gridui-overlay-backdrop-deliberate\",\n },\n },\n defaultVariants: { pace: \"normal\" },\n});\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace List\n * @description Style\n */\n\nimport { overlaySurfaceStyles } from \"../surface/style\";\nimport { cva } from \"class-variance-authority\";\n\n/** Shared popup-list presentation; callers own geometry and interaction semantics. */\nexport const overlayListStyles = cva([\n overlaySurfaceStyles(),\n \"gridui-u-overlay--z-(--gridui-z-popover) gridui-u-overlay--p-0 gridui-u-overlay--type-data\",\n]);\n\nexport const overlayListItemStyles = cva([\n \"gridui-overlay-list-item\",\n \"gridui-u-overlay--flex gridui-u-overlay--min-h-10 gridui-u-overlay--min-w-0 gridui-u-overlay--items-center gridui-u-overlay--gap-gridui-8 gridui-u-overlay--px-gridui-8 gridui-u-overlay--py-gridui-8 gridui-u-overlay--rounded-control gridui-u-overlay--whitespace-normal gridui-u-overlay--wrap-anywhere gridui-u-overlay--text-inherit gridui-u-overlay--no-underline gridui-u-overlay--cursor-pointer\",\n \"gridui-u-overlay--data-disabled:opacity-50 gridui-u-overlay--data-disabled:pointer-events-none\",\n], {\n variants: {\n selectionAppearance: {\n filled: \"gridui-u-overlay--data-[state=checked]:bg-brand-tint gridui-u-overlay--aria-selected:bg-brand-tint gridui-u-overlay--aria-[current=page]:bg-brand-tint\",\n indicator: \"\",\n },\n },\n defaultVariants: {\n selectionAppearance: \"filled\",\n },\n});\n\nexport const overlayListLabelStyles = cva([\n \"gridui-overlay-list-label\",\n \"gridui-u-overlay--p-gridui-8 gridui-u-overlay--text-muted gridui-u-overlay--type-caption\",\n]);\n\nexport const overlayListIndicatorStyles = cva([\n \"gridui-overlay-list-indicator\",\n \"gridui-u-overlay--inline-flex gridui-u-overlay--size-gridui-16 gridui-u-overlay--shrink-0 gridui-u-overlay--items-center gridui-u-overlay--justify-center gridui-u-overlay--text-foreground\",\n]);\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace RetainedLayer\n * @description Retained Layer\n */\n\nimport { Activity, createContext, type FC, type ReactNode, useContext } from \"react\";\n\nexport const OverlayOpen = createContext(false);\n\nexport type RetainedLayerProps = {\n readonly children: ReactNode;\n};\n\nexport const RetainedLayer: FC<RetainedLayerProps> = (props: RetainedLayerProps) => {\n const { children } = props;\n const open = useContext(OverlayOpen);\n return (<Activity\n mode={!open ? \"hidden\" : \"visible\"}\n >\n {children}\n </Activity>);\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Scrollbar\n * @description Scrollbar Interaction Ref\n */\n\n/** Share pointer paint with native scrollbars and Radix without owning scrolling. */\nexport const scrollbarInteractionRef = (element: HTMLElement | null): (() => void) | undefined => {\n if (!element) {\n return;\n }\n const hover = (event: PointerEvent) => {\n const box = element.getBoundingClientRect();\n element.toggleAttribute(\"data-gridui-hovered\", event.clientX >= box.left && event.clientX < box.right\n && event.clientY >= box.top && event.clientY < box.bottom);\n };\n const leave = () => {\n element.removeAttribute(\"data-gridui-hovered\");\n };\n const down = (event: PointerEvent) => {\n if (event.button === 0) {\n element.setAttribute(\"data-gridui-dragging\", \"\");\n }\n };\n const finish = () => {\n element.removeAttribute(\"data-gridui-dragging\");\n };\n element.addEventListener(\"pointerenter\", hover);\n element.addEventListener(\"pointermove\", hover);\n element.addEventListener(\"pointerleave\", leave);\n element.addEventListener(\"pointerdown\", down);\n element.addEventListener(\"pointerup\", finish);\n element.addEventListener(\"pointercancel\", finish);\n element.addEventListener(\"lostpointercapture\", finish);\n return () => {\n element.removeEventListener(\"pointerenter\", hover);\n element.removeEventListener(\"pointermove\", hover);\n element.removeEventListener(\"pointerleave\", leave);\n element.removeEventListener(\"pointerdown\", down);\n element.removeEventListener(\"pointerup\", finish);\n element.removeEventListener(\"pointercancel\", finish);\n element.removeEventListener(\"lostpointercapture\", finish);\n leave();\n finish();\n };\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Scrollbar\n * @description Sibling Scrollbar\n */\n\nexport const isTextarea = (element: HTMLElement): element is HTMLTextAreaElement => {\n return element.tagName === \"TEXTAREA\";\n};\n\n/** Position a sibling indicator in its actual containing block without changing it. */\nexport const syncSiblingScrollbar = (viewport: HTMLElement, layer: HTMLElement, style: CSSStyleDeclaration): void => {\n const window = viewport.ownerDocument.defaultView!;\n layer.style.position = style.position === \"fixed\" ? \"fixed\" : \"absolute\";\n const parent = layer.offsetParent as HTMLElement | null;\n const parentBox = parent?.getBoundingClientRect();\n const parentScaleX = parent?.offsetWidth ? parentBox!.width / parent.offsetWidth : 1;\n const parentScaleY = parent?.offsetHeight ? parentBox!.height / parent.offsetHeight : 1;\n const box = viewport.getBoundingClientRect();\n const controlScaleX = viewport.offsetWidth ? box.width / viewport.offsetWidth : 1;\n const controlScaleY = viewport.offsetHeight ? box.height / viewport.offsetHeight : 1;\n const current = layer.getBoundingClientRect();\n const left = (parseFloat(layer.style.left) || 0)\n + (box.left + viewport.clientLeft * controlScaleX - current.left) / parentScaleX;\n const top = (parseFloat(layer.style.top) || 0)\n + (box.top + viewport.clientTop * controlScaleY - current.top) / parentScaleY;\n Object.assign(layer.style, {\n left: `${left}px`,\n top: `${top}px`,\n transform: `scale(${controlScaleX / parentScaleX}, ${controlScaleY / parentScaleY})`,\n transformOrigin: \"0 0\",\n zIndex: style.zIndex === \"auto\" ? \"var(--gridui-z-interaction)\" : style.zIndex,\n opacity: style.opacity,\n visibility: style.visibility,\n colorScheme: style.colorScheme,\n });\n layer.inert = viewport.inert;\n const inherited = window.getComputedStyle(layer.parentElement!);\n for (const [\n token,\n fallback,\n ] of [\n [\n \"--gridui-scrollbar-thumb\",\n \"--gridui-muted\",\n ],\n [\n \"--gridui-scrollbar-thumb-active\",\n \"--gridui-foreground\",\n ],\n [\n \"--gridui-scrollbar-track\",\n \"--gridui-scrollbar-track\",\n ],\n ] as const) {\n const value = style.getPropertyValue(token) || style.getPropertyValue(fallback);\n const parentValue = inherited.getPropertyValue(token) || inherited.getPropertyValue(fallback);\n if (value && value !== parentValue) {\n layer.style.setProperty(token, value);\n } else {\n layer.style.removeProperty(token);\n }\n }\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Scrollbar\n * @description Use Scrollbars\n */\n\nimport { hasContentMutation } from \"../shared/content-mutation\";\nimport { scrollbarInteractionRef } from \"./scrollbar-interaction-ref\";\nimport { isTextarea, syncSiblingScrollbar } from \"./sibling-scrollbar\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { type Ref, type RefCallback, type RefObject, useId, useLayoutEffect, useRef, useState } from \"react\";\n\nexport type ScrollbarsOptions<T extends HTMLElement> = {\n readonly ref?: Ref<T> | undefined;\n /** A local, non-scrolling ancestor that owns the viewport and its indicators. */\n readonly containerRef?: RefObject<HTMLElement | null>;\n\n};\n\ntype Scrollbar = {\n readonly track: HTMLElement;\n readonly thumb: HTMLElement;\n readonly dispose: () => void;\n};\n\n/** Attach square scrollbars to one native viewport, within its local DOM owner. */\nexport const useScrollbars = <T extends HTMLElement>(options: ScrollbarsOptions<T> = {}): RefCallback<T> => {\n const { ref, containerRef } = options;\n const owner = useId();\n const [\n viewport,\n setViewport,\n ] = useState<T | null>(null);\n const refresh = useRef<(() => void) | undefined>(undefined);\n useLayoutEffect(() => {\n if (!viewport) {\n return;\n }\n const document = viewport.ownerDocument;\n const window = document.defaultView!;\n // Textarea cannot render descendants. Its indicator is a local sibling.\n const textarea = isTextarea(viewport) ? viewport : null;\n const host = containerRef?.current ?? (textarea ? viewport.parentElement! : viewport);\n const sibling = host !== viewport;\n const layer = document.createElement(host.matches(\"ol, ul\") ? \"li\" : \"span\");\n layer.className = \"gridui-scrollbar-layer\";\n layer.setAttribute(\"aria-hidden\", \"true\");\n host.append(layer);\n viewport.setAttribute(\"data-gridui-scrollbar-owner\", owner);\n viewport.setAttribute(\"data-gridui-scrollbar-id\", owner);\n const bars = new Map<boolean, Scrollbar>();\n const contents = new Set<Element>();\n let frame = 0;\n let disposed = false;\n let rtl = false;\n let reverse = false;\n const schedule = () => {\n if (!disposed && !frame) {\n frame = window.requestAnimationFrame(sync);\n }\n };\n const extent = (vertical: boolean): number => {\n return vertical ? viewport.scrollHeight - viewport.clientHeight : viewport.scrollWidth - viewport.clientWidth;\n };\n const position = (vertical: boolean): number => {\n const value = vertical ? viewport.scrollTop : viewport.scrollLeft;\n return (vertical ? reverse : rtl) ? extent(vertical) + value : value;\n };\n const write = (vertical: boolean, value: number) => {\n if (viewport.inert) {\n return;\n }\n const next = Math.max(0, Math.min(extent(vertical), value));\n const native = (vertical ? reverse : rtl) ? next - extent(vertical) : next;\n if (vertical) {\n viewport.scrollTop = native;\n } else {\n viewport.scrollLeft = native;\n }\n sync();\n };\n const create = (vertical: boolean): Scrollbar => {\n const track = document.createElement(\"span\");\n const thumb = document.createElement(\"span\");\n track.className = \"gridui-scrollbar\";\n thumb.className = \"gridui-scrollbar-thumb\";\n track.dataset.orientation = vertical ? \"vertical\" : \"horizontal\";\n track.setAttribute(\"data-gridui-scrollbar-for\", owner);\n track.append(thumb);\n layer.append(track);\n const unbind = scrollbarInteractionRef(track)!;\n const length = () => {\n return vertical ? track.clientHeight : track.clientWidth;\n };\n const thumbLength = () => {\n return vertical ? thumb.clientHeight : thumb.clientWidth;\n };\n const coordinate = (event: PointerEvent) => {\n const box = track.getBoundingClientRect();\n const scale = (vertical ? box.height : box.width) / length();\n return (vertical ? event.clientY - box.top : event.clientX - box.left) / scale;\n };\n let drag: {\n readonly pointerId: number;\n readonly grab: number;\n } | undefined;\n const finish = () => {\n drag = undefined;\n };\n track.addEventListener(\"pointerdown\", event => {\n if (event.button !== 0) {\n return;\n }\n event.preventDefault();\n const max = extent(vertical);\n const offset = max ? position(vertical) / max * (length() - thumbLength()) : 0;\n const cursor = coordinate(event);\n drag = {\n pointerId: event.pointerId,\n grab: event.target === thumb ? cursor - offset : thumbLength() / 2,\n };\n track.setPointerCapture(event.pointerId);\n write(vertical, (cursor - drag.grab) / Math.max(1, length() - thumbLength()) * max);\n });\n track.addEventListener(\"pointermove\", event => {\n if (drag?.pointerId === event.pointerId) {\n write(vertical, (coordinate(event) - drag.grab) / Math.max(1, length() - thumbLength()) * extent(vertical));\n }\n });\n track.addEventListener(\"pointerup\", finish);\n track.addEventListener(\"pointercancel\", finish);\n track.addEventListener(\"lostpointercapture\", finish);\n track.addEventListener(\"click\", event => {\n event.preventDefault();\n event.stopPropagation();\n });\n track.addEventListener(\"wheel\", event => {\n if (event.ctrlKey) {\n return;\n }\n const style = window.getComputedStyle(viewport);\n let unit = 1;\n if (event.deltaMode === 1) {\n unit = parseFloat(style.lineHeight) || 16;\n } else if (event.deltaMode === 2) {\n unit = vertical ? viewport.clientHeight : viewport.clientWidth;\n }\n const next = Math.max(0, Math.min(extent(vertical), position(vertical) + (vertical ? event.deltaY : event.deltaX || event.deltaY) * unit));\n if (next !== position(vertical)) {\n event.preventDefault();\n write(vertical, next);\n }\n }, { passive: false });\n return {\n track,\n thumb,\n dispose() {\n finish();\n unbind();\n track.remove();\n },\n };\n };\n const sync = () => {\n if (disposed) {\n return;\n }\n window.cancelAnimationFrame(frame);\n frame = 0;\n const style = window.getComputedStyle(viewport);\n rtl = style.direction === \"rtl\";\n reverse = style.flexDirection === \"column-reverse\";\n const visible = viewport.clientWidth > 0 && viewport.clientHeight > 0;\n const vertical = visible && /^(auto|scroll)$/.test(style.overflowY) && extent(true) > 1;\n const horizontal = visible && /^(auto|scroll)$/.test(style.overflowX) && extent(false) > 1;\n if (sibling) {\n syncSiblingScrollbar(viewport, layer, style);\n } else {\n // Compensate native content scrolling inside the viewport's own clip and layer.\n layer.style.transform = `translate(${viewport.scrollLeft}px, ${viewport.scrollTop}px)`;\n }\n for (const axis of [\n true,\n false,\n ]) {\n if (!(axis ? vertical : horizontal)) {\n const bar = bars.get(axis);\n if (bar) {\n bar.dispose();\n bars.delete(axis);\n }\n continue;\n }\n let bar = bars.get(axis);\n if (!bar) {\n bar = create(axis);\n bars.set(axis, bar);\n }\n const size = 10;\n const width = axis ? size : viewport.clientWidth - (vertical ? size : 0);\n const height = axis ? viewport.clientHeight - (horizontal ? size : 0) : size;\n const length = axis ? height : width;\n const view = axis ? viewport.clientHeight : viewport.clientWidth;\n const thumb = Math.min(length, Math.max(24, length * view / (extent(axis) + view)));\n Object.assign(bar.track.style, {\n left: `${axis ? viewport.clientWidth - size : 0}px`,\n top: `${axis ? 0 : viewport.clientHeight - size}px`,\n width: `${width}px`,\n height: `${height}px`,\n });\n Object.assign(bar.thumb.style, axis\n ? {\n height: `${thumb}px`,\n transform: `translateY(${position(axis) / extent(axis) * (length - thumb)}px)`,\n }\n : {\n width: `${thumb}px`,\n transform: `translateX(${position(axis) / extent(axis) * (length - thumb)}px)`,\n });\n }\n };\n const resize = new ResizeObserver(sync);\n const observeContents = () => {\n const current = new Set([\n ...Array.from(host.children),\n ...Array.from(viewport.children),\n ].filter(element => {\n return !element.classList.contains(\"gridui-scrollbar-layer\");\n }));\n for (const content of contents) {\n if (!current.has(content)) {\n resize.unobserve(content);\n contents.delete(content);\n }\n }\n for (const content of current) {\n if (!contents.has(content)) {\n resize.observe(content);\n contents.add(content);\n }\n }\n };\n const mutation = new MutationObserver(records => {\n if (hasContentMutation(records)) {\n observeContents();\n schedule();\n }\n });\n mutation.observe(host, {\n subtree: true,\n childList: true,\n characterData: true,\n attributes: true,\n attributeFilter: [\n \"class\",\n \"style\",\n \"hidden\",\n \"inert\",\n \"aria-hidden\",\n \"dir\",\n \"data-state\",\n ],\n });\n viewport.addEventListener(\"scroll\", sync, { passive: true });\n viewport.addEventListener(\"input\", schedule);\n viewport.addEventListener(\"load\", schedule, true);\n resize.observe(viewport);\n const reset = (event: Event) => {\n if (event.target === textarea?.form) {\n schedule();\n }\n };\n if (sibling) {\n resize.observe(host);\n }\n if (textarea) {\n document.addEventListener(\"reset\", reset, true);\n }\n observeContents();\n refresh.current = sync;\n sync();\n return () => {\n disposed = true;\n refresh.current = undefined;\n window.cancelAnimationFrame(frame);\n for (const bar of bars.values()) { bar.dispose(); }\n resize.disconnect();\n mutation.disconnect();\n viewport.removeEventListener(\"scroll\", sync);\n viewport.removeEventListener(\"input\", schedule);\n viewport.removeEventListener(\"load\", schedule, true);\n viewport.removeAttribute(\"data-gridui-scrollbar-owner\");\n viewport.removeAttribute(\"data-gridui-scrollbar-id\");\n if (textarea) {\n document.removeEventListener(\"reset\", reset, true);\n }\n layer.remove();\n };\n }, [\n viewport,\n owner,\n containerRef,\n ]);\n useLayoutEffect(() => {\n refresh.current?.();\n });\n return useComposedRefs(setViewport, ref);\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Root\n * @description Use Overlay State\n */\n\nimport { useState } from \"react\";\n\ntype OverlayStateOptions = {\n readonly open?: boolean | undefined;\n readonly defaultOpen?: boolean | undefined;\n readonly onOpenChange?: ((open: boolean) => void) | undefined;\n};\n\nexport const useOverlayState = (options: OverlayStateOptions) => {\n const [\n localOpen,\n setLocalOpen,\n ] = useState(options.defaultOpen ?? false);\n return {\n open: options.open ?? localOpen,\n onOpenChange: (open: boolean): void => {\n if (options.open === undefined) {\n setLocalOpen(open);\n }\n options.onOpenChange?.(open);\n },\n };\n};\n"],
5
+ "mappings": ";AAOA,SAAkC,gBAAgB;AAS3C,IAAM,eAAsC,CAAC,UAA6B;AAC7E,QAAM,EAAE,MAAM,SAAS,IAAI;AAC3B,QAAM;AAAA,IACF;AAAA,IACA;AAAA,EACJ,IAAI,SAAS,QAAQ;AAGrB,MAAI,QAAQ,aAAa,UAAU;AAC/B,gBAAY,QAAQ;AAAA,EACxB;AACA,SAAO,OAAO,WAAW;AAC7B;;;ACpBO,IAAM,wBAAwB,EAAE,iCAAiC,GAAG;AAE3E,IAAM,WAAW;AACjB,IAAM,SAAS,oBAAI,QAAmC;AACtD,IAAM,gBAAgB,oBAAI,QAA+B;AASlD,IAAM,wBAAwB,CAAC,aAAuC;AACzE,SAAO,SAAS,QAAqB,QAAQ,KAAK,SAAS,cAAc;AAC7E;AAEO,IAAM,sBAAsB,CAAC,UAA8B;AAC9D,QAAM,EAAE,OAAO,SAAS,OAAO,IAAI;AACnC,QAAM,WAAW,MAAM;AACvB,QAAM,QAAQ,SAAS,YAAa,iBAAiB,KAAK;AAC1D,UAAQ,MAAM,SAAS,UAAU,SAAS,QAAQ,MAAM,WAAW,SAC7D,MAAM,iBAAiB,wBAAwB,KAAK,MACpD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/B;AAAA,EACJ;AACJ;",
6
+ "names": ["useState", "selector", "cva", "useComposedRefs", "useLayoutEffect", "useState", "bar", "useState"]
7
7
  }
@@ -6,6 +6,8 @@
6
6
  */
7
7
  /** Shared popup-list presentation; callers own geometry and interaction semantics. */
8
8
  export declare const overlayListStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
9
- export declare const overlayListItemStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
9
+ export declare const overlayListItemStyles: (props?: ({
10
+ selectionAppearance?: "filled" | "indicator" | null | undefined;
11
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
12
  export declare const overlayListLabelStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
11
13
  export declare const overlayListIndicatorStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
@@ -2,8 +2,8 @@
2
2
  * @author WMXPY
3
3
  * @package Overlay
4
4
  * @namespace Scrollbar
5
- * @description Textarea Scrollbar
5
+ * @description Sibling Scrollbar
6
6
  */
7
7
  export declare const isTextarea: (element: HTMLElement) => element is HTMLTextAreaElement;
8
8
  /** Position a sibling indicator in its actual containing block without changing it. */
9
- export declare const syncTextareaScrollbar: (viewport: HTMLTextAreaElement, layer: HTMLElement, style: CSSStyleDeclaration) => void;
9
+ export declare const syncSiblingScrollbar: (viewport: HTMLElement, layer: HTMLElement, style: CSSStyleDeclaration) => void;
@@ -4,9 +4,11 @@
4
4
  * @namespace Scrollbar
5
5
  * @description Use Scrollbars
6
6
  */
7
- import { type Ref, type RefCallback } from "react";
7
+ import { type Ref, type RefCallback, type RefObject } from "react";
8
8
  export type ScrollbarsOptions<T extends HTMLElement> = {
9
9
  readonly ref?: Ref<T> | undefined;
10
+ /** A local, non-scrolling ancestor that owns the viewport and its indicators. */
11
+ readonly containerRef?: RefObject<HTMLElement | null>;
10
12
  };
11
13
  /** Attach square scrollbars to one native viewport, within its local DOM owner. */
12
14
  export declare const useScrollbars: <T extends HTMLElement>(options?: ScrollbarsOptions<T>) => RefCallback<T>;
package/dist/styles.css CHANGED
@@ -100,6 +100,9 @@
100
100
  .gridui-u-overlay--aria-selected\:bg-brand-tint[aria-selected="true"] {
101
101
  background-color: var(--gridui-brand-tint);
102
102
  }
103
+ .gridui-u-overlay--aria-\[current\=page\]\:bg-brand-tint[aria-current="page"] {
104
+ background-color: var(--gridui-brand-tint);
105
+ }
103
106
  .gridui-u-overlay--data-disabled\:pointer-events-none[data-disabled] {
104
107
  pointer-events: none;
105
108
  }
package/docs/catalog.json CHANGED
@@ -1,14 +1,27 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "@gridui/overlay",
4
- "version": "2.0.0",
4
+ "version": "2.2.0",
5
5
  "category": "core",
6
6
  "description": "GridUI React overlay",
7
7
  "usage": "`overlaySurfaceStyles({ kind })` shares the surface border, colors, motion, and reduced-motion behavior. `kind` is `popup` (default), `tooltip`, or `dialog`. `overlayBackdropStyles({ pace })` shares backdrop fades at `normal` (default) or `deliberate` pace. Load this stylesheet before the consuming family.",
8
8
  "documentation": [
9
- "README.md"
9
+ "README.md",
10
+ "docs/reference/README.md",
11
+ "docs/reference/exit-snapshot.md",
12
+ "docs/reference/retained-layer.md"
10
13
  ],
11
14
  "exports": [
15
+ {
16
+ "name": "ExitSnapshot",
17
+ "kind": "component",
18
+ "importPath": "@gridui/overlay"
19
+ },
20
+ {
21
+ "name": "ExitSnapshotProps",
22
+ "kind": "type",
23
+ "importPath": "@gridui/overlay"
24
+ },
12
25
  {
13
26
  "name": "interactionLayerProps",
14
27
  "kind": "value",
@@ -94,5 +107,9 @@
94
107
  "@gridui/theme/styles.css",
95
108
  "@gridui/overlay/styles.css"
96
109
  ],
97
- "examples": []
110
+ "examples": [
111
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/overlay/stories/custom-surfaces.mdx",
112
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/overlay/stories/getting-started.mdx",
113
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/overlay/stories/retention-scroll.mdx"
114
+ ]
98
115
  }
@@ -0,0 +1,5 @@
1
+ <!-- Generated by pnpm docs:storybook. -->
2
+ # Component reference
3
+
4
+ - [ExitSnapshot](exit-snapshot.md)
5
+ - [RetainedLayer](retained-layer.md)
@@ -0,0 +1,31 @@
1
+ <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
+ # ExitSnapshot
3
+
4
+ Public ExitSnapshot component from @gridui/overlay. See the package guide for its composition contract.
5
+
6
+ Import from ``@gridui/overlay`` and load Theme before this family's stylesheet.
7
+
8
+ ```tsx
9
+ import { ExitSnapshot } from "@gridui/overlay";
10
+ import "@gridui/theme/styles.css";
11
+ import "@gridui/overlay/styles.css";
12
+ ```
13
+
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/overlay/README.md) for shared behavior and stylesheet dependencies.
15
+
16
+ ## API
17
+
18
+ The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
19
+
20
+ ### open
21
+
22
+ ``boolean`` · Required
23
+
24
+ Whether the owning surface is open. False retains its last open content.
25
+
26
+ ### children
27
+
28
+ ``ReactNode`` · Required
29
+
30
+ Parent-provided content, retained only until the presence boundary unmounts.
31
+
@@ -0,0 +1,25 @@
1
+ <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
+ # RetainedLayer
3
+
4
+ Public RetainedLayer component from @gridui/overlay. See the package guide for its composition contract.
5
+
6
+ Import from ``@gridui/overlay`` and load Theme before this family's stylesheet.
7
+
8
+ ```tsx
9
+ import { RetainedLayer } from "@gridui/overlay";
10
+ import "@gridui/theme/styles.css";
11
+ import "@gridui/overlay/styles.css";
12
+ ```
13
+
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/overlay/README.md) for shared behavior and stylesheet dependencies.
15
+
16
+ ## API
17
+
18
+ The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
19
+
20
+ ### children
21
+
22
+ ``ReactNode`` · Required
23
+
24
+ Content rendered inside the component.
25
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridui/overlay",
3
- "version": "2.0.0",
3
+ "version": "2.2.0",
4
4
  "description": "GridUI React overlay",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  "react-dom": "^19.2.0"
28
28
  },
29
29
  "dependencies": {
30
- "@gridui/theme": "^2.5.3",
30
+ "@gridui/theme": "^2.6.0",
31
31
  "@radix-ui/react-compose-refs": "1.1.5",
32
32
  "class-variance-authority": "0.7.1"
33
33
  },