@gridui/overlay 1.2.0 → 2.0.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`, `overlayBackdropStyles`.
3
+ Core family. Public API: `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.
@@ -14,6 +14,18 @@ reduced-motion behavior. `kind` is `popup` (default), `tooltip`, or `dialog`.
14
14
  `overlayBackdropStyles({ pace })` shares backdrop fades at `normal` (default)
15
15
  or `deliberate` pace. Load this stylesheet before the consuming family.
16
16
 
17
+ `overlayListStyles()` adds the shared popup-list stacking level, data typography,
18
+ and zero surface padding to the popup surface. Dropdown menus and selection
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
22
+ and typography. `overlayListIndicatorStyles()` reserves a 16px selection slot;
23
+ place it after a flexible label so it stays at the trailing edge in LTR and RTL.
24
+ These helpers contain presentation only. Callers provide semantic elements,
25
+ selection attributes, keyboard behavior, and focus management. DropdownMenu,
26
+ Select, and CommandPalette consume them directly; load Overlay's stylesheet
27
+ before the consuming family's stylesheet.
28
+
17
29
  Each family maps its own positioning origin to `--gridui-overlay-origin`.
18
30
  Popup motion follows `data-side`; `data-side="none"` disables surface motion for
19
31
  item-aligned Select. Open/closed and Tooltip's instant/delayed open states are
@@ -24,8 +36,12 @@ shared backdrop. Theme continues to own motion tokens and keyframes.
24
36
  ## Interaction outlines
25
37
 
26
38
  `useInteractionOutline({ ref, selector })` returns a composed React ref for a
27
- scrolling viewport. Forward the caller's optional ref and select the native
28
- interactive descendants owned by that viewport. Theme styles own the indicator
39
+ scrolling viewport. Forward the caller's optional ref. The optional `selector`
40
+ defaults to native controls, links, focusable elements, and interactive ARIA roles.
41
+ Use a selector to restrict a specialized viewport to its owned items. Mark a
42
+ composite field's outline container with `data-gridui-outline-target`; these
43
+ containers are included with either selector and inherit focus priority from
44
+ focused descendants. Theme styles own the indicator
29
45
  paint; the hook does not require an additional stylesheet.
30
46
  The hook mirrors each active Theme outline into an aria-hidden, input-transparent
31
47
  document plane using its resolved color, width, offset, and radius.
package/dist/index.d.ts CHANGED
@@ -4,14 +4,15 @@
4
4
  * @namespace Root
5
5
  * @description Index
6
6
  */
7
+ export { interactionLayerProps } from "./interaction-outline/interaction-layer";
8
+ export type { InteractionOutlineOptions } from "./interaction-outline/use-interaction-outline";
9
+ export { useInteractionOutline } from "./interaction-outline/use-interaction-outline";
10
+ export { overlayListIndicatorStyles, overlayListItemStyles, overlayListLabelStyles, overlayListStyles } from "./list/style";
7
11
  export type { RetainedLayerProps } from "./retained-layer/retained-layer";
8
12
  export { OverlayOpen } from "./retained-layer/retained-layer";
9
13
  export { RetainedLayer } from "./retained-layer/retained-layer";
10
- export { interactionLayerProps } from "./shared/interaction-layer";
11
- export { scrollbarInteractionRef } from "./shared/scrollbar-interaction-ref";
12
- export { overlayBackdropStyles, overlaySurfaceStyles } from "./shared/style";
13
- export type { InteractionOutlineOptions } from "./shared/use-interaction-outline";
14
- export { useInteractionOutline } from "./shared/use-interaction-outline";
15
- export { useOverlayState } from "./shared/use-overlay-state";
16
- export type { ScrollbarsOptions } from "./shared/use-scrollbars";
17
- export { useScrollbars } from "./shared/use-scrollbars";
14
+ export { scrollbarInteractionRef } from "./scrollbar/scrollbar-interaction-ref";
15
+ export type { ScrollbarsOptions } from "./scrollbar/use-scrollbars";
16
+ export { useScrollbars } from "./scrollbar/use-scrollbars";
17
+ export { overlayBackdropStyles, overlaySurfaceStyles } from "./surface/style";
18
+ export { useOverlayState } from "./use-overlay-state";
package/dist/index.js CHANGED
@@ -1,20 +1,4 @@
1
- // src/retained-layer/retained-layer.tsx
2
- import { Activity, createContext, useContext } from "react";
3
- import { jsx } from "react/jsx-runtime";
4
- var OverlayOpen = createContext(false);
5
- var RetainedLayer = (props) => {
6
- const { children } = props;
7
- const open = useContext(OverlayOpen);
8
- return /* @__PURE__ */ jsx(
9
- Activity,
10
- {
11
- mode: !open ? "hidden" : "visible",
12
- children
13
- }
14
- );
15
- };
16
-
17
- // src/shared/interaction-layer.ts
1
+ // src/interaction-outline/interaction-layer.ts
18
2
  var interactionLayerProps = { "data-gridui-interaction-layer": "" };
19
3
  var selector = "[data-gridui-interaction-layer]";
20
4
  var planes = /* @__PURE__ */ new WeakMap();
@@ -88,68 +72,6 @@ var releaseOutlinePlane = (plane) => {
88
72
  }
89
73
  };
90
74
 
91
- // src/shared/scrollbar-interaction-ref.ts
92
- var scrollbarInteractionRef = (element) => {
93
- if (!element) {
94
- return;
95
- }
96
- const hover = (event) => {
97
- const box = element.getBoundingClientRect();
98
- element.toggleAttribute("data-gridui-hovered", event.clientX >= box.left && event.clientX < box.right && event.clientY >= box.top && event.clientY < box.bottom);
99
- };
100
- const leave = () => {
101
- element.removeAttribute("data-gridui-hovered");
102
- };
103
- const down = (event) => {
104
- if (event.button === 0) {
105
- element.setAttribute("data-gridui-dragging", "");
106
- }
107
- };
108
- const finish = () => {
109
- element.removeAttribute("data-gridui-dragging");
110
- };
111
- element.addEventListener("pointerenter", hover);
112
- element.addEventListener("pointermove", hover);
113
- element.addEventListener("pointerleave", leave);
114
- element.addEventListener("pointerdown", down);
115
- element.addEventListener("pointerup", finish);
116
- element.addEventListener("pointercancel", finish);
117
- element.addEventListener("lostpointercapture", finish);
118
- return () => {
119
- element.removeEventListener("pointerenter", hover);
120
- element.removeEventListener("pointermove", hover);
121
- element.removeEventListener("pointerleave", leave);
122
- element.removeEventListener("pointerdown", down);
123
- element.removeEventListener("pointerup", finish);
124
- element.removeEventListener("pointercancel", finish);
125
- element.removeEventListener("lostpointercapture", finish);
126
- leave();
127
- finish();
128
- };
129
- };
130
-
131
- // src/shared/style.ts
132
- import { cva } from "class-variance-authority";
133
- var overlaySurfaceStyles = cva("gridui-overlay-surface gridui-u-border gridui-u-border-solid gridui-u-border-border gridui-u-bg-background gridui-u-text-foreground", {
134
- variants: {
135
- kind: {
136
- popup: "gridui-overlay-floating gridui-u-rounded-control",
137
- tooltip: "gridui-overlay-tooltip gridui-u-rounded-control",
138
- dialog: "gridui-overlay-dialog"
139
- }
140
- },
141
- defaultVariants: { kind: "popup" }
142
- });
143
- var overlayBackdropStyles = cva("gridui-overlay-backdrop", {
144
- variants: {
145
- pace: {
146
- normal: null,
147
- deliberate: "gridui-overlay-backdrop-deliberate"
148
- }
149
- },
150
- defaultVariants: { pace: "normal" }
151
- });
152
-
153
75
  // src/shared/content-mutation.ts
154
76
  var decorativeSelector = ".gridui-scrollbar-layer, .gridui-interaction-outline-layer";
155
77
  var isDecorative = (node) => {
@@ -167,11 +89,11 @@ var hasContentMutation = (records) => {
167
89
  });
168
90
  };
169
91
 
170
- // src/shared/use-interaction-outline.ts
92
+ // src/interaction-outline/use-interaction-outline.ts
171
93
  import { useComposedRefs } from "@radix-ui/react-compose-refs";
172
94
  import { useLayoutEffect, useState } from "react";
173
95
  var useInteractionOutline = (options) => {
174
- const { ref, selector: selector2 } = options;
96
+ 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;
175
97
  const [
176
98
  viewport,
177
99
  setViewport
@@ -210,8 +132,8 @@ var useInteractionOutline = (options) => {
210
132
  }
211
133
  const inactive = viewport.closest('[inert], [aria-hidden="true"]');
212
134
  viewport.toggleAttribute("data-gridui-outline-inactive", !!inactive);
213
- const candidates = inactive ? [] : Array.from(viewport.querySelectorAll(selector2)).filter((element) => {
214
- return element.closest("[data-gridui-outline-viewport]") === viewport && element.matches(":hover, :active, :focus-visible, [data-highlighted]");
135
+ const candidates = inactive ? [] : Array.from(viewport.querySelectorAll(`${selector2}, [data-gridui-outline-target]`)).filter((element) => {
136
+ return element.parentElement?.closest("[data-gridui-outline-viewport]") === viewport && !element.closest('[inert], [aria-hidden="true"]') && element.matches(":hover, :active, :focus-visible, [data-highlighted], [data-gridui-outline-target]:has(:focus-visible)");
215
137
  });
216
138
  const current = /* @__PURE__ */ new Set();
217
139
  let moving = false;
@@ -268,7 +190,7 @@ var useInteractionOutline = (options) => {
268
190
  outlineOffset: style.outlineOffset,
269
191
  borderRadius: style.borderRadius,
270
192
  opacity: String(opacity),
271
- zIndex: element.matches(":focus-visible") ? "3" : "2",
193
+ zIndex: element.matches(":focus-visible, [data-gridui-outline-target]:has(:focus-visible)") ? "3" : "2",
272
194
  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)`
273
195
  });
274
196
  element.setAttribute("data-gridui-outline-rendered", "");
@@ -314,7 +236,10 @@ var useInteractionOutline = (options) => {
314
236
  "data-readonly",
315
237
  "data-state",
316
238
  "data-highlighted",
317
- "aria-selected"
239
+ "aria-selected",
240
+ "aria-hidden",
241
+ "inert",
242
+ "data-gridui-outline-target"
318
243
  ]
319
244
  });
320
245
  const ancestors = new MutationObserver(schedule);
@@ -334,6 +259,22 @@ var useInteractionOutline = (options) => {
334
259
  ]
335
260
  });
336
261
  }
262
+ const onEvent = (event) => {
263
+ const target = event.target;
264
+ const inside = !!target && viewport.contains(target);
265
+ const ancestor = !!target && target.contains(viewport);
266
+ if (event.type === "scroll") {
267
+ if (inside || ancestor) {
268
+ schedule();
269
+ }
270
+ return;
271
+ }
272
+ const related = "relatedTarget" in event ? event.relatedTarget : null;
273
+ const enters = !!related && related instanceof window.Node && viewport.contains(related);
274
+ if (inside || enters || rings.size > 0 || ancestor && (event.type === "animationstart" || event.type === "transitionrun")) {
275
+ schedule();
276
+ }
277
+ };
337
278
  const events = [
338
279
  "scroll",
339
280
  "pointerover",
@@ -349,7 +290,7 @@ var useInteractionOutline = (options) => {
349
290
  "transitionrun"
350
291
  ];
351
292
  for (const event of events) {
352
- document.addEventListener(event, schedule, {
293
+ document.addEventListener(event, onEvent, {
353
294
  capture: true,
354
295
  passive: true
355
296
  });
@@ -366,7 +307,7 @@ var useInteractionOutline = (options) => {
366
307
  mutation.disconnect();
367
308
  ancestors.disconnect();
368
309
  for (const event of events) {
369
- document.removeEventListener(event, schedule, true);
310
+ document.removeEventListener(event, onEvent, true);
370
311
  }
371
312
  scheme.removeEventListener("change", schedule);
372
313
  window.removeEventListener("resize", schedule);
@@ -389,25 +330,106 @@ var useInteractionOutline = (options) => {
389
330
  return useComposedRefs(setViewport, ref);
390
331
  };
391
332
 
392
- // src/shared/use-overlay-state.ts
393
- import { useState as useState2 } from "react";
394
- var useOverlayState = (options) => {
395
- const [
396
- localOpen,
397
- setLocalOpen
398
- ] = useState2(options.defaultOpen ?? false);
399
- return {
400
- open: options.open ?? localOpen,
401
- onOpenChange: (open) => {
402
- if (options.open === void 0) {
403
- setLocalOpen(open);
404
- }
405
- options.onOpenChange?.(open);
333
+ // src/surface/style.ts
334
+ import { cva } from "class-variance-authority";
335
+ var 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", {
336
+ variants: {
337
+ kind: {
338
+ popup: "gridui-overlay-floating gridui-u-overlay--rounded-control",
339
+ tooltip: "gridui-overlay-tooltip gridui-u-overlay--rounded-control",
340
+ dialog: "gridui-overlay-dialog"
341
+ }
342
+ },
343
+ defaultVariants: { kind: "popup" }
344
+ });
345
+ var overlayBackdropStyles = cva("gridui-overlay-backdrop", {
346
+ variants: {
347
+ pace: {
348
+ normal: null,
349
+ deliberate: "gridui-overlay-backdrop-deliberate"
350
+ }
351
+ },
352
+ defaultVariants: { pace: "normal" }
353
+ });
354
+
355
+ // src/list/style.ts
356
+ import { cva as cva2 } from "class-variance-authority";
357
+ var overlayListStyles = cva2([
358
+ overlaySurfaceStyles(),
359
+ "gridui-u-overlay--z-(--gridui-z-popover) gridui-u-overlay--p-0 gridui-u-overlay--type-data"
360
+ ]);
361
+ var overlayListItemStyles = cva2([
362
+ "gridui-overlay-list-item",
363
+ "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
+ "gridui-u-overlay--data-disabled:opacity-50 gridui-u-overlay--data-disabled:pointer-events-none"
366
+ ]);
367
+ var overlayListLabelStyles = cva2([
368
+ "gridui-overlay-list-label",
369
+ "gridui-u-overlay--p-gridui-8 gridui-u-overlay--text-muted gridui-u-overlay--type-caption"
370
+ ]);
371
+ var overlayListIndicatorStyles = cva2([
372
+ "gridui-overlay-list-indicator",
373
+ "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"
374
+ ]);
375
+
376
+ // src/retained-layer/retained-layer.tsx
377
+ import { Activity, createContext, useContext } from "react";
378
+ import { jsx } from "react/jsx-runtime";
379
+ var OverlayOpen = createContext(false);
380
+ var RetainedLayer = (props) => {
381
+ const { children } = props;
382
+ const open = useContext(OverlayOpen);
383
+ return /* @__PURE__ */ jsx(
384
+ Activity,
385
+ {
386
+ mode: !open ? "hidden" : "visible",
387
+ children
388
+ }
389
+ );
390
+ };
391
+
392
+ // src/scrollbar/scrollbar-interaction-ref.ts
393
+ var scrollbarInteractionRef = (element) => {
394
+ if (!element) {
395
+ return;
396
+ }
397
+ const hover = (event) => {
398
+ const box = element.getBoundingClientRect();
399
+ element.toggleAttribute("data-gridui-hovered", event.clientX >= box.left && event.clientX < box.right && event.clientY >= box.top && event.clientY < box.bottom);
400
+ };
401
+ const leave = () => {
402
+ element.removeAttribute("data-gridui-hovered");
403
+ };
404
+ const down = (event) => {
405
+ if (event.button === 0) {
406
+ element.setAttribute("data-gridui-dragging", "");
406
407
  }
407
408
  };
409
+ const finish = () => {
410
+ element.removeAttribute("data-gridui-dragging");
411
+ };
412
+ element.addEventListener("pointerenter", hover);
413
+ element.addEventListener("pointermove", hover);
414
+ element.addEventListener("pointerleave", leave);
415
+ element.addEventListener("pointerdown", down);
416
+ element.addEventListener("pointerup", finish);
417
+ element.addEventListener("pointercancel", finish);
418
+ element.addEventListener("lostpointercapture", finish);
419
+ return () => {
420
+ element.removeEventListener("pointerenter", hover);
421
+ element.removeEventListener("pointermove", hover);
422
+ element.removeEventListener("pointerleave", leave);
423
+ element.removeEventListener("pointerdown", down);
424
+ element.removeEventListener("pointerup", finish);
425
+ element.removeEventListener("pointercancel", finish);
426
+ element.removeEventListener("lostpointercapture", finish);
427
+ leave();
428
+ finish();
429
+ };
408
430
  };
409
431
 
410
- // src/shared/textarea-scrollbar.ts
432
+ // src/scrollbar/textarea-scrollbar.ts
411
433
  var isTextarea = (element) => {
412
434
  return element.tagName === "TEXTAREA";
413
435
  };
@@ -463,16 +485,16 @@ var syncTextareaScrollbar = (viewport, layer, style) => {
463
485
  }
464
486
  };
465
487
 
466
- // src/shared/use-scrollbars.ts
488
+ // src/scrollbar/use-scrollbars.ts
467
489
  import { useComposedRefs as useComposedRefs2 } from "@radix-ui/react-compose-refs";
468
- import { useId, useLayoutEffect as useLayoutEffect2, useRef, useState as useState3 } from "react";
490
+ import { useId, useLayoutEffect as useLayoutEffect2, useRef, useState as useState2 } from "react";
469
491
  var useScrollbars = (options = {}) => {
470
492
  const { ref } = options;
471
493
  const owner = useId();
472
494
  const [
473
495
  viewport,
474
496
  setViewport
475
- ] = useState3(null);
497
+ ] = useState2(null);
476
498
  const refresh = useRef(void 0);
477
499
  useLayoutEffect2(() => {
478
500
  if (!viewport) {
@@ -736,11 +758,33 @@ var useScrollbars = (options = {}) => {
736
758
  });
737
759
  return useComposedRefs2(setViewport, ref);
738
760
  };
761
+
762
+ // src/use-overlay-state.ts
763
+ import { useState as useState3 } from "react";
764
+ var useOverlayState = (options) => {
765
+ const [
766
+ localOpen,
767
+ setLocalOpen
768
+ ] = useState3(options.defaultOpen ?? false);
769
+ return {
770
+ open: options.open ?? localOpen,
771
+ onOpenChange: (open) => {
772
+ if (options.open === void 0) {
773
+ setLocalOpen(open);
774
+ }
775
+ options.onOpenChange?.(open);
776
+ }
777
+ };
778
+ };
739
779
  export {
740
780
  OverlayOpen,
741
781
  RetainedLayer,
742
782
  interactionLayerProps,
743
783
  overlayBackdropStyles,
784
+ overlayListIndicatorStyles,
785
+ overlayListItemStyles,
786
+ overlayListLabelStyles,
787
+ overlayListStyles,
744
788
  overlaySurfaceStyles,
745
789
  scrollbarInteractionRef,
746
790
  useInteractionOutline,
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/retained-layer/retained-layer.tsx", "../src/shared/interaction-layer.ts", "../src/shared/scrollbar-interaction-ref.ts", "../src/shared/style.ts", "../src/shared/content-mutation.ts", "../src/shared/use-interaction-outline.ts", "../src/shared/use-overlay-state.ts", "../src/shared/textarea-scrollbar.ts", "../src/shared/use-scrollbars.ts"],
4
- "sourcesContent": ["/**\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 Shared\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 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 Shared\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const overlaySurfaceStyles = cva(\"gridui-overlay-surface gridui-u-border gridui-u-border-solid gridui-u-border-border gridui-u-bg-background gridui-u-text-foreground\", {\n variants: {\n kind: {\n popup: \"gridui-overlay-floating gridui-u-rounded-control\",\n tooltip: \"gridui-overlay-tooltip gridui-u-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 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 Shared\n * @description Use Interaction Outline\n */\n\nimport { hasContentMutation } from \"./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 } = 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)).filter(element => {\n return element.closest(\"[data-gridui-outline-viewport]\") === viewport\n && element.matches(\":hover, :active, :focus-visible, [data-highlighted]\");\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\") ? \"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 ],\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 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, schedule, {\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, schedule, 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 Shared\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", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Shared\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 Shared\n * @description Use Scrollbars\n */\n\nimport { hasContentMutation } from \"./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"],
5
- "mappings": ";AAOA,SAAS,UAAU,eAAwC,kBAAkB;AAWjE;AATL,IAAM,cAAc,cAAc,KAAK;AAMvC,IAAM,gBAAwC,CAAC,UAA8B;AAChF,QAAM,EAAE,SAAS,IAAI;AACrB,QAAM,OAA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AoB,QAAQ,UAAU,IAAI;AACnD,eAAS,gBAAgB,6BAA6B;AACtD,eAAS,gBAAgB,0BAA0B;AACnD,UAAI,UAAU;AACV,iBAAS,oBAAoB,SAAS,OAAO,IAAI;AAAA,MACrD;AACA,YAAM,OAAO;AAAA,IACjB;AAAA,EACJ,GAAG;AAAA,IACC;AAAA,IACA;AAAA,EACJ,CAAC;AACD,EAAAF,iBAAgB,MAAM;AAClB,YAAQ,UAAU;AAAA,EACtB,CAAC;AACD,SAAOD,iBAAgB,aAAa,GAAG;AAC3C;",
6
- "names": ["selector", "useState", "useComposedRefs", "useLayoutEffect", "useState", "bar"]
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;AAC1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ACnB,eAAS,iBAAiB,SAAS,OAAO,IAAI;AAAA,IAClD;AACA,oBAAgB;AAChB,YAAQ,UAAU;AAClB,SAAK;AACL,WAAO,MAAM;AACT,iBAAW;AACX,cAAQ,UAAU;AAClB,aAAO,qBAAqB,KAAK;AACjC,iBAAW,OAAO,KAAK,OAAO,GAAG;AAAE,YAAI,QAAQ;AAAA,MAAG;AAClD,aAAO,WAAW;AAClB,eAAS,WAAW;AACpB,eAAS,oBAAoB,UAAU,QAAQ;AAC/C,eAAS,oBAAoB,SAAS,QAAQ;AAC9C,eAAS,oBAAoB,QAAQ,UAAU,IAAI;AACnD,eAAS,gBAAgB,6BAA6B;AACtD,eAAS,gBAAgB,0BAA0B;AACnD,UAAI,UAAU;AACV,iBAAS,oBAAoB,SAAS,OAAO,IAAI;AAAA,MACrD;AACA,YAAM,OAAO;AAAA,IACjB;AAAA,EACJ,GAAG;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"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @author WMXPY
3
3
  * @package Overlay
4
- * @namespace Shared
4
+ * @namespace InteractionOutline
5
5
  * @description Interaction Layer
6
6
  */
7
7
  /** Marks a popup or dialog surface as an independent interaction paint boundary. */
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @author WMXPY
3
3
  * @package Overlay
4
- * @namespace Shared
4
+ * @namespace InteractionOutline
5
5
  * @description Use Interaction Outline
6
6
  */
7
7
  import { type Ref, type RefCallback } from "react";
8
8
  export type InteractionOutlineOptions<T extends HTMLElement> = {
9
9
  readonly ref?: Ref<T> | undefined;
10
- readonly selector: string;
10
+ readonly selector?: string;
11
11
  };
12
12
  /** Mirror Theme's resolved outline outside a scrolling viewport's clipping ancestors. */
13
13
  export declare const useInteractionOutline: <T extends HTMLElement>(options: InteractionOutlineOptions<T>) => RefCallback<T>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @package Overlay
4
+ * @namespace List
5
+ * @description Style
6
+ */
7
+ /** Shared popup-list presentation; callers own geometry and interaction semantics. */
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;
10
+ export declare const overlayListLabelStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
11
+ export declare const overlayListIndicatorStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @author WMXPY
3
3
  * @package Overlay
4
- * @namespace Shared
4
+ * @namespace Scrollbar
5
5
  * @description Scrollbar Interaction Ref
6
6
  */
7
7
  /** Share pointer paint with native scrollbars and Radix without owning scrolling. */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @author WMXPY
3
3
  * @package Overlay
4
- * @namespace Shared
4
+ * @namespace Scrollbar
5
5
  * @description Textarea Scrollbar
6
6
  */
7
7
  export declare const isTextarea: (element: HTMLElement) => element is HTMLTextAreaElement;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @author WMXPY
3
3
  * @package Overlay
4
- * @namespace Shared
4
+ * @namespace Scrollbar
5
5
  * @description Use Scrollbars
6
6
  */
7
7
  import { type Ref, type RefCallback } from "react";
package/dist/styles.css CHANGED
@@ -1,27 +1,114 @@
1
- /*! tailwindcss v4.3.4 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
2
2
  @layer properties;
3
3
  @layer theme, base, components, utilities;
4
+ @layer theme {
5
+ :root, :host {
6
+ --spacing: 0.25rem;
7
+ }
8
+ }
4
9
  @layer utilities {
5
- .gridui-u-rounded-control {
10
+ .gridui-u-overlay--z-\(--gridui-z-popover\) {
11
+ z-index: var(--gridui-z-popover);
12
+ }
13
+ .gridui-u-overlay--flex {
14
+ display: flex;
15
+ }
16
+ .gridui-u-overlay--inline-flex {
17
+ display: inline-flex;
18
+ }
19
+ .gridui-u-overlay--size-gridui-16 {
20
+ width: var(--gridui-space-16);
21
+ height: var(--gridui-space-16);
22
+ }
23
+ .gridui-u-overlay--min-h-10 {
24
+ min-height: calc(var(--spacing) * 10);
25
+ }
26
+ .gridui-u-overlay--min-w-0 {
27
+ min-width: 0px;
28
+ }
29
+ .gridui-u-overlay--shrink-0 {
30
+ flex-shrink: 0;
31
+ }
32
+ .gridui-u-overlay--cursor-pointer {
33
+ cursor: pointer;
34
+ }
35
+ .gridui-u-overlay--items-center {
36
+ align-items: center;
37
+ }
38
+ .gridui-u-overlay--justify-center {
39
+ justify-content: center;
40
+ }
41
+ .gridui-u-overlay--gap-gridui-8 {
42
+ gap: var(--gridui-space-8);
43
+ }
44
+ .gridui-u-overlay--rounded-control {
6
45
  border-radius: var(--gridui-control-radius);
7
46
  }
8
- .gridui-u-border {
47
+ .gridui-u-overlay--border {
9
48
  border-style: var(--tw-border-style);
10
49
  border-width: 1px;
11
50
  }
12
- .gridui-u-border-solid {
51
+ .gridui-u-overlay--border-solid {
13
52
  --tw-border-style: solid;
14
53
  border-style: solid;
15
54
  }
16
- .gridui-u-border-border {
55
+ .gridui-u-overlay--border-border {
17
56
  border-color: var(--gridui-border);
18
57
  }
19
- .gridui-u-bg-background {
58
+ .gridui-u-overlay--bg-background {
20
59
  background-color: var(--gridui-background);
21
60
  }
22
- .gridui-u-text-foreground {
61
+ .gridui-u-overlay--p-0 {
62
+ padding: 0px;
63
+ }
64
+ .gridui-u-overlay--p-gridui-8 {
65
+ padding: var(--gridui-space-8);
66
+ }
67
+ .gridui-u-overlay--px-gridui-8 {
68
+ padding-inline: var(--gridui-space-8);
69
+ }
70
+ .gridui-u-overlay--py-gridui-8 {
71
+ padding-block: var(--gridui-space-8);
72
+ }
73
+ .gridui-u-overlay--type-data {
74
+ font: var(--gridui-type-data);
75
+ letter-spacing: normal;
76
+ font-variant-numeric: tabular-nums;
77
+ }
78
+ .gridui-u-overlay--type-caption {
79
+ font: var(--gridui-type-caption);
80
+ letter-spacing: normal;
81
+ }
82
+ .gridui-u-overlay--wrap-anywhere {
83
+ overflow-wrap: anywhere;
84
+ }
85
+ .gridui-u-overlay--whitespace-normal {
86
+ white-space: normal;
87
+ }
88
+ .gridui-u-overlay--text-foreground {
23
89
  color: var(--gridui-foreground);
24
90
  }
91
+ .gridui-u-overlay--text-inherit {
92
+ color: inherit;
93
+ }
94
+ .gridui-u-overlay--text-muted {
95
+ color: var(--gridui-muted);
96
+ }
97
+ .gridui-u-overlay--no-underline {
98
+ text-decoration-line: none;
99
+ }
100
+ .gridui-u-overlay--aria-selected\:bg-brand-tint[aria-selected="true"] {
101
+ background-color: var(--gridui-brand-tint);
102
+ }
103
+ .gridui-u-overlay--data-disabled\:pointer-events-none[data-disabled] {
104
+ pointer-events: none;
105
+ }
106
+ .gridui-u-overlay--data-disabled\:opacity-50[data-disabled] {
107
+ opacity: 50%;
108
+ }
109
+ .gridui-u-overlay--data-\[state\=checked\]\:bg-brand-tint[data-state="checked"] {
110
+ background-color: var(--gridui-brand-tint);
111
+ }
25
112
  }
26
113
  @layer components {
27
114
  .gridui-overlay-surface {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @author WMXPY
3
3
  * @package Overlay
4
- * @namespace Shared
4
+ * @namespace Surface
5
5
  * @description Style
6
6
  */
7
7
  export declare const overlaySurfaceStyles: (props?: ({
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @author WMXPY
3
3
  * @package Overlay
4
- * @namespace Shared
4
+ * @namespace Root
5
5
  * @description Use Overlay State
6
6
  */
7
7
  type OverlayStateOptions = {
@@ -0,0 +1,98 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "name": "@gridui/overlay",
4
+ "version": "2.0.0",
5
+ "category": "core",
6
+ "description": "GridUI React overlay",
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
+ "documentation": [
9
+ "README.md"
10
+ ],
11
+ "exports": [
12
+ {
13
+ "name": "interactionLayerProps",
14
+ "kind": "value",
15
+ "importPath": "@gridui/overlay"
16
+ },
17
+ {
18
+ "name": "InteractionOutlineOptions",
19
+ "kind": "type",
20
+ "importPath": "@gridui/overlay"
21
+ },
22
+ {
23
+ "name": "overlayBackdropStyles",
24
+ "kind": "value",
25
+ "importPath": "@gridui/overlay"
26
+ },
27
+ {
28
+ "name": "overlayListIndicatorStyles",
29
+ "kind": "value",
30
+ "importPath": "@gridui/overlay"
31
+ },
32
+ {
33
+ "name": "overlayListItemStyles",
34
+ "kind": "value",
35
+ "importPath": "@gridui/overlay"
36
+ },
37
+ {
38
+ "name": "overlayListLabelStyles",
39
+ "kind": "value",
40
+ "importPath": "@gridui/overlay"
41
+ },
42
+ {
43
+ "name": "overlayListStyles",
44
+ "kind": "value",
45
+ "importPath": "@gridui/overlay"
46
+ },
47
+ {
48
+ "name": "OverlayOpen",
49
+ "kind": "value",
50
+ "importPath": "@gridui/overlay"
51
+ },
52
+ {
53
+ "name": "overlaySurfaceStyles",
54
+ "kind": "value",
55
+ "importPath": "@gridui/overlay"
56
+ },
57
+ {
58
+ "name": "RetainedLayer",
59
+ "kind": "component",
60
+ "importPath": "@gridui/overlay"
61
+ },
62
+ {
63
+ "name": "RetainedLayerProps",
64
+ "kind": "type",
65
+ "importPath": "@gridui/overlay"
66
+ },
67
+ {
68
+ "name": "scrollbarInteractionRef",
69
+ "kind": "function",
70
+ "importPath": "@gridui/overlay"
71
+ },
72
+ {
73
+ "name": "ScrollbarsOptions",
74
+ "kind": "type",
75
+ "importPath": "@gridui/overlay"
76
+ },
77
+ {
78
+ "name": "useInteractionOutline",
79
+ "kind": "function",
80
+ "importPath": "@gridui/overlay"
81
+ },
82
+ {
83
+ "name": "useOverlayState",
84
+ "kind": "function",
85
+ "importPath": "@gridui/overlay"
86
+ },
87
+ {
88
+ "name": "useScrollbars",
89
+ "kind": "function",
90
+ "importPath": "@gridui/overlay"
91
+ }
92
+ ],
93
+ "styles": [
94
+ "@gridui/theme/styles.css",
95
+ "@gridui/overlay/styles.css"
96
+ ],
97
+ "examples": []
98
+ }
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@gridui/overlay",
3
- "version": "1.2.0",
3
+ "version": "2.0.0",
4
4
  "description": "GridUI React overlay",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist",
9
- "README.md"
9
+ "README.md",
10
+ "docs"
10
11
  ],
11
12
  "sideEffects": [
12
13
  "**/*.css"
@@ -26,7 +27,7 @@
26
27
  "react-dom": "^19.2.0"
27
28
  },
28
29
  "dependencies": {
29
- "@gridui/theme": "^2.5.1",
30
+ "@gridui/theme": "^2.5.3",
30
31
  "@radix-ui/react-compose-refs": "1.1.5",
31
32
  "class-variance-authority": "0.7.1"
32
33
  },