@burdenoff/fe-libs 2026.1119.6 → 2026.1119.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/chrome/PersonaSurfaceControls.js +82 -189
  2. package/dist/chrome/PersonaViewsList.d.ts +28 -0
  3. package/dist/chrome/PersonaViewsList.js +139 -0
  4. package/dist/chrome/personaViewOptions.d.ts +8 -0
  5. package/dist/chrome/personaViewOptions.js +14 -0
  6. package/dist/chrome/shell/NewMenu.d.ts +13 -1
  7. package/dist/chrome/shell/NewMenu.js +27 -14
  8. package/dist/chrome/shell/ShellSidebar.js +159 -157
  9. package/dist/chrome/shell/SidebarProfileMenu.d.ts +36 -4
  10. package/dist/chrome/shell/SidebarProfileMenu.js +408 -313
  11. package/dist/chrome/shell/WorkspaceAccountCard.d.ts +22 -0
  12. package/dist/chrome/shell/WorkspaceAccountCard.js +107 -0
  13. package/dist/chrome/shell/WorkspaceMenu.js +140 -136
  14. package/dist/chrome/shell/pageHost.d.ts +19 -0
  15. package/dist/chrome/shell/pageHost.js +21 -0
  16. package/dist/chrome/shell/pageWidth.d.ts +39 -0
  17. package/dist/chrome/shell/pageWidth.js +18 -0
  18. package/dist/chrome/shell/shellSidebarAppearance.d.ts +4 -0
  19. package/dist/chrome/shell/shellSidebarAppearance.js +7 -0
  20. package/dist/chrome/shell/sidebarPopupPlacement.d.ts +21 -0
  21. package/dist/chrome/shell/sidebarPopupPlacement.js +28 -0
  22. package/dist/shared/backgrounds/BackgroundSettingsSection.d.ts +11 -0
  23. package/dist/shared/backgrounds/BackgroundSettingsSection.js +67 -0
  24. package/dist/shared/backgrounds/backgroundSectionLabels.d.ts +14 -0
  25. package/dist/shared/backgrounds/backgroundSectionLabels.js +36 -0
  26. package/dist/shared/backgrounds/index.d.ts +3 -0
  27. package/dist/shared/backgrounds/useStartPageBackground.d.ts +12 -0
  28. package/dist/shared/backgrounds/useStartPageBackground.js +23 -0
  29. package/dist/shared-backgrounds.js +4 -1
  30. package/dist/ui/dropdown-menu.d.ts +12 -2
  31. package/dist/ui/dropdown-menu.js +53 -50
  32. package/dist/ui/glass-surface.d.ts +7 -0
  33. package/dist/ui/glass-surface.js +14 -0
  34. package/dist/ui/popover.d.ts +1 -1
  35. package/dist/ui/popover.js +17 -15
  36. package/dist/ui/select.js +69 -68
  37. package/dist/ui/tooltip.d.ts +6 -0
  38. package/dist/ui/tooltip.js +18 -14
  39. package/package.json +5 -1
  40. package/src/shared/styles/page-widths.css +38 -0
  41. package/src/shared/tokens/build/brands/healthybowl.css +25 -3
  42. package/src/shared/tokens/display-settings.css +3 -0
@@ -0,0 +1,21 @@
1
+ import { useLayoutEffect as e, useRef as t } from "react";
2
+ // src/chrome/shell/pageHost.ts
3
+ var n = "data-depth", r = "rich", i = "data-page-enter";
4
+ function a() {
5
+ e(() => {
6
+ let e = document.documentElement;
7
+ return e.setAttribute(n, r), () => {
8
+ e.removeAttribute(n);
9
+ };
10
+ }, []);
11
+ }
12
+ function o(e) {
13
+ e.removeAttribute(i), e.getBoundingClientRect(), e.setAttribute(i, "");
14
+ }
15
+ function s(n) {
16
+ let r = t(null), i = t(n);
17
+ return e(() => {
18
+ i.current !== n && (i.current = n, r.current && o(r.current));
19
+ }, [n]), r;
20
+ }
21
+ export { n as DEPTH_ATTRIBUTE, r as DEPTH_RICH, i as PAGE_ENTER_ATTRIBUTE, o as replayPageEnter, a as useDepthOptIn, s as usePageEnter };
@@ -0,0 +1,39 @@
1
+ /**
2
+ * How wide each page may grow on a big screen (BOFF-15549, ported from FluidGrids' BOFF-14993).
3
+ *
4
+ * Opt-in. The shell's page box (the routed page's wrapper under the sticky top bar) carries
5
+ * `data-shell-page` and `data-page-width="<tier>"`, and `shared/styles/page-widths.css` caps and
6
+ * centres that box per tier, from a 112.5rem viewport:
7
+ *
8
+ * - `form`: forms, settings, single messages and reading pages, 1,200 px;
9
+ * - `standard`: lists, dashboards and detail pages, 1,600 px (the default);
10
+ * - `catalog`: card galleries, 1,840 px;
11
+ * - `tool`: tools that need the whole width, never capped. There is no `full` tier.
12
+ *
13
+ * Each product passes its own route table to `resolvePageWidthTier`; the first matching rule
14
+ * wins and an address no rule names is `standard`. Only the address decides, lower-cased as the
15
+ * router matches it: the ?query and #hash are dropped, so a page's tabs and filters never change
16
+ * its width, and so is a trailing "/".
17
+ */
18
+ /** Every width tier, the values of the page box's `data-page-width`. `tool` is uncapped. */
19
+ export declare const PAGE_WIDTH_TIERS: readonly ["form", "standard", "catalog", "tool"];
20
+ /** A page's width tier; the value of the shell's `data-page-width`. */
21
+ export type PageWidthTier = (typeof PAGE_WIDTH_TIERS)[number];
22
+ /** One rule: an address pattern and the tier it gives. */
23
+ export type PageWidthRule = readonly [pattern: RegExp, tier: PageWidthTier];
24
+ /** A product's route table, in order (first match wins). */
25
+ export type PageWidthTable = ReadonlyArray<PageWidthRule>;
26
+ /** The tier of an address no rule names. */
27
+ export declare const DEFAULT_PAGE_WIDTH_TIER: PageWidthTier;
28
+ /**
29
+ * The address alone, lower-cased: no ?query or #hash, no trailing "/" (except on "/"). React
30
+ * Router matches paths case-insensitively, so /Workflows/New must get the same tier as
31
+ * /workflows/new.
32
+ */
33
+ export declare function normalisePagePath(pathname: string): string;
34
+ /**
35
+ * The width tier of the page at `pathname` in the product's `table`. A product that has
36
+ * shell-less routes (sign-in, public embeds) puts them in its table as `tool`, so the cap never
37
+ * touches them.
38
+ */
39
+ export declare function resolvePageWidthTier(pathname: string, table: PageWidthTable): PageWidthTier;
@@ -0,0 +1,18 @@
1
+ // src/chrome/shell/pageWidth.ts
2
+ var e = [
3
+ "form",
4
+ "standard",
5
+ "catalog",
6
+ "tool"
7
+ ], t = "standard";
8
+ function n(e) {
9
+ let t = (e.split(/[?#]/)[0] ?? "").toLowerCase(), n = t.length;
10
+ for (; n > 0 && t[n - 1] === "/";) --n;
11
+ return n > 0 ? t.slice(0, n) : "/";
12
+ }
13
+ function r(e, r) {
14
+ let i = n(e);
15
+ for (let [e, t] of r) if (e.test(i)) return t;
16
+ return t;
17
+ }
18
+ export { t as DEFAULT_PAGE_WIDTH_TIER, e as PAGE_WIDTH_TIERS, n as normalisePagePath, r as resolvePageWidthTier };
@@ -0,0 +1,4 @@
1
+ import { ShellSidebarAppearance } from './types';
2
+ export declare const ShellSidebarAppearanceContext: import('react').Context<ShellSidebarAppearance>;
3
+ /** The appearance of the sidebar the caller is rendered in; `default` outside one. */
4
+ export declare function useShellSidebarAppearance(): ShellSidebarAppearance;
@@ -0,0 +1,7 @@
1
+ import { createContext as e, useContext as t } from "react";
2
+ // src/chrome/shell/shellSidebarAppearance.ts
3
+ var n = e("default");
4
+ function r() {
5
+ return t(n);
6
+ }
7
+ export { n as ShellSidebarAppearanceContext, r as useShellSidebarAppearance };
@@ -0,0 +1,21 @@
1
+ import { RefObject } from 'react';
2
+ /** A popup's placement beside the floating sidebar, as Radix's content props. */
3
+ export interface SidebarPopupBeside {
4
+ side: 'left' | 'right';
5
+ align: 'start' | 'end';
6
+ sideOffset: number;
7
+ }
8
+ /**
9
+ * The placement beside the floating panel `trigger` sits in, or `null` (not in a floating
10
+ * panel, or the window is narrower than `lg`): the caller then keeps its own placement.
11
+ */
12
+ export declare function sidebarPopupBeside(trigger: HTMLElement | null, align: SidebarPopupBeside['align']): SidebarPopupBeside | null;
13
+ /**
14
+ * For a popup opened from `trigger`: `beside` is its placement while it opens beside a
15
+ * floating sidebar (else `null`: keep the placement of before). Pass `contentRef` as the
16
+ * popup content's `ref`; it measures each time the content mounts.
17
+ */
18
+ export declare function useSidebarPopupPlacement(trigger: RefObject<HTMLElement | null>, align: SidebarPopupBeside['align']): {
19
+ beside: SidebarPopupBeside | null;
20
+ contentRef: (content: HTMLElement | null) => void;
21
+ };
@@ -0,0 +1,28 @@
1
+ import { useShellSidebarAppearance as e } from "./shellSidebarAppearance.js";
2
+ import { useCallback as t, useState as n } from "react";
3
+ // src/chrome/shell/sidebarPopupPlacement.ts
4
+ var r = 8, i = "(min-width: 1024px)";
5
+ function a(e, t) {
6
+ let n = e?.closest("[data-shell-panel]");
7
+ if (!e || !n || typeof window.matchMedia != "function" || !window.matchMedia(i).matches) return null;
8
+ let a = getComputedStyle(e).direction === "rtl", o = e.getBoundingClientRect(), s = n.getBoundingClientRect(), c = a ? o.left - s.left : s.right - o.right;
9
+ return {
10
+ side: a ? "left" : "right",
11
+ align: t,
12
+ sideOffset: Math.max(0, Math.round(c)) + r
13
+ };
14
+ }
15
+ function o(r, i) {
16
+ let o = e() === "floating", [s, c] = n(null), l = t((e) => {
17
+ e && o && c(a(r.current, i));
18
+ }, [
19
+ o,
20
+ r,
21
+ i
22
+ ]);
23
+ return {
24
+ beside: o ? s : null,
25
+ contentRef: l
26
+ };
27
+ }
28
+ export { a as sidebarPopupBeside, o as useSidebarPopupPlacement };
@@ -0,0 +1,11 @@
1
+ import { BackgroundSectionLabels } from './backgroundSectionLabels';
2
+ import { BackgroundPreference } from './useBackgroundPreference';
3
+ export interface BackgroundSettingsSectionProps {
4
+ /** The keys' namespace; the same one `useStartPageBackground` reads. */
5
+ storageKey: string;
6
+ /** The product's own default (also what a reset returns to). Pass a module constant. */
7
+ defaults?: Partial<BackgroundPreference>;
8
+ /** Translated words; any missing group falls back to the English defaults. */
9
+ labels?: Partial<BackgroundSectionLabels>;
10
+ }
11
+ export declare function BackgroundSettingsSection({ storageKey, defaults, labels, }: BackgroundSettingsSectionProps): import('react').JSX.Element;
@@ -0,0 +1,67 @@
1
+ import { Card as e, CardContent as t, CardDescription as n, CardHeader as r, CardTitle as i } from "../../ui/card.js";
2
+ import { resolveSectionLabels as a } from "./backgroundSectionLabels.js";
3
+ import { BackgroundOptionGroup as o, BackgroundPicker as s } from "./BackgroundPicker.js";
4
+ import { useBackgroundPreference as c } from "./useBackgroundPreference.js";
5
+ import { Sparkles as l } from "lucide-react";
6
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
7
+ // src/shared/backgrounds/BackgroundSettingsSection.tsx
8
+ function f({ storageKey: f, defaults: p, labels: m }) {
9
+ let h = a(m), g = c({
10
+ storageKey: f,
11
+ defaults: p
12
+ }), _ = Object.keys(h.colors).map((e) => ({
13
+ value: e,
14
+ label: h.colors[e]
15
+ })), v = Object.keys(h.strengths).map((e) => ({
16
+ value: e,
17
+ label: h.strengths[e]
18
+ })), y = g.effect === "none";
19
+ return /* @__PURE__ */ d(e, {
20
+ "data-testid": "appearance-background",
21
+ children: [/* @__PURE__ */ d(r, { children: [/* @__PURE__ */ d(i, {
22
+ className: "flex items-center gap-2",
23
+ children: [/* @__PURE__ */ u(l, {
24
+ className: "size-4 text-text-secondary",
25
+ "aria-hidden": "true"
26
+ }), h.title]
27
+ }), /* @__PURE__ */ u(n, { children: h.description })] }), /* @__PURE__ */ d(t, {
28
+ className: "flex flex-col gap-6",
29
+ children: [/* @__PURE__ */ u(s, {
30
+ value: g.effect,
31
+ onChange: g.setEffect,
32
+ label: h.title,
33
+ labels: h.effects,
34
+ colors: g.colors,
35
+ strength: g.strength
36
+ }), /* @__PURE__ */ d("div", {
37
+ className: "flex flex-col gap-6 sm:flex-row sm:flex-wrap",
38
+ children: [/* @__PURE__ */ d("div", {
39
+ className: "flex flex-col gap-2",
40
+ children: [/* @__PURE__ */ u("span", {
41
+ className: "text-sm font-medium text-text-primary",
42
+ children: h.colorsLabel
43
+ }), /* @__PURE__ */ u(o, {
44
+ value: g.colors,
45
+ onChange: g.setColors,
46
+ label: h.colorsLabel,
47
+ options: _,
48
+ className: y ? "opacity-60" : void 0
49
+ })]
50
+ }), /* @__PURE__ */ d("div", {
51
+ className: "flex flex-col gap-2",
52
+ children: [/* @__PURE__ */ u("span", {
53
+ className: "text-sm font-medium text-text-primary",
54
+ children: h.strengthLabel
55
+ }), /* @__PURE__ */ u(o, {
56
+ value: g.strength,
57
+ onChange: g.setStrength,
58
+ label: h.strengthLabel,
59
+ options: v,
60
+ className: y ? "opacity-60" : void 0
61
+ })]
62
+ })]
63
+ })]
64
+ })]
65
+ });
66
+ }
67
+ export { f as BackgroundSettingsSection };
@@ -0,0 +1,14 @@
1
+ import { BackgroundColorMode, BackgroundEffectName, BackgroundStrength } from './backgroundTypes';
2
+ /** Every word the section shows. */
3
+ export interface BackgroundSectionLabels {
4
+ title: string;
5
+ description: string;
6
+ colorsLabel: string;
7
+ strengthLabel: string;
8
+ effects: Record<BackgroundEffectName, string>;
9
+ colors: Record<BackgroundColorMode, string>;
10
+ strengths: Record<BackgroundStrength, string>;
11
+ }
12
+ export declare const DEFAULT_BACKGROUND_SECTION_LABELS: Readonly<BackgroundSectionLabels>;
13
+ /** The labels with every missing field (and every explicit `undefined`) filled from the defaults. */
14
+ export declare function resolveSectionLabels(labels: Partial<BackgroundSectionLabels> | undefined): BackgroundSectionLabels;
@@ -0,0 +1,36 @@
1
+ // src/shared/backgrounds/backgroundSectionLabels.ts
2
+ var e = {
3
+ title: "Background",
4
+ description: "An animated background behind the Assistant start page. Kept on this device.",
5
+ colorsLabel: "Color",
6
+ strengthLabel: "Strength",
7
+ effects: {
8
+ none: "None",
9
+ "dotted-waves": "Dotted waves",
10
+ glimmer: "Glimmer",
11
+ "cursor-wave": "Cursor wave"
12
+ },
13
+ colors: {
14
+ accent: "Accent",
15
+ original: "Original",
16
+ mono: "Mono"
17
+ },
18
+ strengths: {
19
+ subtle: "Subtle",
20
+ medium: "Medium",
21
+ bold: "Bold"
22
+ }
23
+ };
24
+ function t(t) {
25
+ let n = e;
26
+ return {
27
+ title: t?.title ?? n.title,
28
+ description: t?.description ?? n.description,
29
+ colorsLabel: t?.colorsLabel ?? n.colorsLabel,
30
+ strengthLabel: t?.strengthLabel ?? n.strengthLabel,
31
+ effects: t?.effects ?? n.effects,
32
+ colors: t?.colors ?? n.colors,
33
+ strengths: t?.strengths ?? n.strengths
34
+ };
35
+ }
36
+ export { e as DEFAULT_BACKGROUND_SECTION_LABELS, t as resolveSectionLabels };
@@ -29,3 +29,6 @@ export { GLIMMER_DEFAULTS, type GlimmerDirection, type GlimmerParams } from './g
29
29
  export { CURSOR_WAVE_DEFAULTS, type CursorWaveColor, type CursorWaveParams, type CursorWaveShape, } from './cursorWaveRenderer';
30
30
  export { canvasScale, type CanvasFrame, type CanvasRenderer } from './canvasEffect';
31
31
  export type { Rgba } from './color';
32
+ export { BackgroundSettingsSection, type BackgroundSettingsSectionProps, } from './BackgroundSettingsSection';
33
+ export { DEFAULT_BACKGROUND_SECTION_LABELS, type BackgroundSectionLabels, } from './backgroundSectionLabels';
34
+ export { useStartPageBackground, type StartPageBackground } from './useStartPageBackground';
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ import { UseBackgroundPreferenceOptions } from './useBackgroundPreference';
3
+ export interface StartPageBackground {
4
+ /** The background, or `null` for None (the page keeps its shape either way). */
5
+ background: ReactNode;
6
+ /**
7
+ * The ground it comes with: the original colours' black in the dark theme and white in the
8
+ * light theme; `null` for the accent and greys, which draw over the product's own canvas.
9
+ */
10
+ backgroundGround: string | null;
11
+ }
12
+ export declare function useStartPageBackground({ storageKey, defaults, }?: UseBackgroundPreferenceOptions): StartPageBackground;
@@ -0,0 +1,23 @@
1
+ import { useBackgroundGround as e } from "./backgroundGround.js";
2
+ import { BackgroundEffect as t } from "./BackgroundEffect.js";
3
+ import { useBackgroundPreference as n } from "./useBackgroundPreference.js";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ // src/shared/backgrounds/useStartPageBackground.tsx
6
+ function i({ storageKey: i, defaults: a } = {}) {
7
+ let { effect: o, colors: s, strength: c } = n({
8
+ storageKey: i,
9
+ defaults: a
10
+ }), l = e(o, s);
11
+ return o === "none" ? {
12
+ background: null,
13
+ backgroundGround: null
14
+ } : {
15
+ background: /* @__PURE__ */ r(t, {
16
+ effect: o,
17
+ colors: s,
18
+ strength: c
19
+ }),
20
+ backgroundGround: l
21
+ };
22
+ }
23
+ export { i as useStartPageBackground };
@@ -13,4 +13,7 @@ import { DOTTED_WAVES_DEFAULTS as N } from "./shared/backgrounds/dottedWavesRend
13
13
  import { GLIMMER_DEFAULTS as P } from "./shared/backgrounds/glimmerRenderer.js";
14
14
  import { CURSOR_WAVE_DEFAULTS as F } from "./shared/backgrounds/cursorWaveRenderer.js";
15
15
  import { canvasScale as I } from "./shared/backgrounds/canvasEffect.js";
16
- export { e as BACKGROUND_COLOR_MODES, t as BACKGROUND_EFFECTS, n as BACKGROUND_MAX_PIXEL_RATIO, S as BACKGROUND_PREFERENCE_KEY, r as BACKGROUND_STRENGTHS, i as BACKGROUND_STRENGTH_OPACITY, u as BackgroundEffect, d as BackgroundOptionGroup, f as BackgroundPicker, E as CURSOR_WAVE_BACKGROUND, D as CURSOR_WAVE_COLORS, F as CURSOR_WAVE_DEFAULTS, c as CursorWave, C as DEFAULT_BACKGROUND_PREFERENCE, O as DOTTED_WAVES_BACKGROUND, k as DOTTED_WAVES_COLORS, N as DOTTED_WAVES_DEFAULTS, a as DOTTED_WAVES_STILL_TIME, o as DottedWaves, A as GLIMMER_BACKGROUND, j as GLIMMER_COLORS, P as GLIMMER_DEFAULTS, s as Glimmer, M as ORIGINAL_LIGHT_BACKGROUND, b as backgroundGround, m as backgroundPalette, I as canvasScale, l as explicitPool, w as readBackgroundPreference, h as readBackgroundTheme, g as subscribeBackgroundTheme, _ as turnHue, v as useBackgroundColors, x as useBackgroundGround, T as useBackgroundPreference, y as useBackgroundTheme, p as useRovingRadio };
16
+ import { BackgroundSettingsSection as L } from "./shared/backgrounds/BackgroundSettingsSection.js";
17
+ import { DEFAULT_BACKGROUND_SECTION_LABELS as R } from "./shared/backgrounds/backgroundSectionLabels.js";
18
+ import { useStartPageBackground as z } from "./shared/backgrounds/useStartPageBackground.js";
19
+ export { e as BACKGROUND_COLOR_MODES, t as BACKGROUND_EFFECTS, n as BACKGROUND_MAX_PIXEL_RATIO, S as BACKGROUND_PREFERENCE_KEY, r as BACKGROUND_STRENGTHS, i as BACKGROUND_STRENGTH_OPACITY, u as BackgroundEffect, d as BackgroundOptionGroup, f as BackgroundPicker, L as BackgroundSettingsSection, E as CURSOR_WAVE_BACKGROUND, D as CURSOR_WAVE_COLORS, F as CURSOR_WAVE_DEFAULTS, c as CursorWave, C as DEFAULT_BACKGROUND_PREFERENCE, R as DEFAULT_BACKGROUND_SECTION_LABELS, O as DOTTED_WAVES_BACKGROUND, k as DOTTED_WAVES_COLORS, N as DOTTED_WAVES_DEFAULTS, a as DOTTED_WAVES_STILL_TIME, o as DottedWaves, A as GLIMMER_BACKGROUND, j as GLIMMER_COLORS, P as GLIMMER_DEFAULTS, s as Glimmer, M as ORIGINAL_LIGHT_BACKGROUND, b as backgroundGround, m as backgroundPalette, I as canvasScale, l as explicitPool, w as readBackgroundPreference, h as readBackgroundTheme, g as subscribeBackgroundTheme, _ as turnHue, v as useBackgroundColors, x as useBackgroundGround, T as useBackgroundPreference, y as useBackgroundTheme, p as useRovingRadio, z as useStartPageBackground };
@@ -16,13 +16,23 @@ declare function DropdownMenuSubTrigger({ ref, className, inset, indicator, chil
16
16
  declare namespace DropdownMenuSubTrigger {
17
17
  var displayName: string | undefined;
18
18
  }
19
- declare function DropdownMenuSubContent({ ref, className, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent> & {
19
+ /**
20
+ * ★ BOFF-15567: portalled to <body>, like every menu's content. Rendered inside its menu, a
21
+ * sub-menu was cut away under Glass (the menu's backdrop-filter made the menu its containing
22
+ * block, and the menu's overflow clipped everything beside it; see `./glass-surface`). Radix
23
+ * keeps it working across the portal: ArrowRight opens it and focuses its first item,
24
+ * ArrowLeft closes it and focuses its row again, the pointer's path to it keeps it open, and
25
+ * Escape closes the whole menu. At the menu's own `z-50` it is the later body child, so it
26
+ * paints over its menu, and an open sheet or shell overlay lifts it with its menu
27
+ * (`sheetLayer.ts`, `chrome/shellOverlayLayer.ts`).
28
+ */
29
+ declare function DropdownMenuSubContent({ ref, className, children, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent> & {
20
30
  ref?: React.Ref<ElementRef<typeof DropdownMenuPrimitive.SubContent>>;
21
31
  }): import('react').JSX.Element;
22
32
  declare namespace DropdownMenuSubContent {
23
33
  var displayName: string | undefined;
24
34
  }
25
- declare function DropdownMenuContent({ ref, className, sideOffset, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {
35
+ declare function DropdownMenuContent({ ref, className, sideOffset, children, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {
26
36
  ref?: React.Ref<ElementRef<typeof DropdownMenuPrimitive.Content>>;
27
37
  }): import('react').JSX.Element;
28
38
  declare namespace DropdownMenuContent {
@@ -1,89 +1,92 @@
1
1
  import { cn as e } from "../shared-utils.js";
2
- import { Check as t, ChevronRight as n, Circle as r } from "lucide-react";
3
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
- import * as o from "@radix-ui/react-dropdown-menu";
2
+ import { GlassSurfaceScope as t } from "./glass-surface.js";
3
+ import { Check as n, ChevronRight as r, Circle as i } from "lucide-react";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
+ import * as s from "@radix-ui/react-dropdown-menu";
5
6
  // src/ui/dropdown-menu.tsx
6
- var s = o.Root, c = o.Trigger, l = o.Group, u = o.Portal, d = o.Sub, f = o.RadioGroup;
7
- function p({ ref: t, className: r, inset: s, indicator: c, children: l, ...u }) {
8
- return /* @__PURE__ */ a(o.SubTrigger, {
7
+ var c = s.Root, l = s.Trigger, u = s.Group, d = s.Portal, f = s.Sub, p = s.RadioGroup;
8
+ function m({ ref: t, className: n, inset: i, indicator: c, children: l, ...u }) {
9
+ return /* @__PURE__ */ o(s.SubTrigger, {
9
10
  ref: t,
10
- className: e("flex cursor-default select-none items-center rounded-button px-2 py-1.5 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] data-[state=open]:bg-[var(--color-accent-soft)]", s && "ps-8", r),
11
+ className: e("flex cursor-default select-none items-center rounded-button px-2 py-1.5 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] data-[state=open]:bg-[var(--color-accent-soft)]", i && "ps-8", n),
11
12
  ...u,
12
- children: [l, c ?? /* @__PURE__ */ i(n, { className: "ms-auto size-4 text-text-muted rtl:rotate-180" })]
13
+ children: [l, c ?? /* @__PURE__ */ a(r, { className: "ms-auto size-4 text-text-muted rtl:rotate-180" })]
13
14
  });
14
15
  }
15
- p.displayName = o.SubTrigger.displayName;
16
- function m({ ref: t, className: n, ...r }) {
17
- return /* @__PURE__ */ i(o.SubContent, {
18
- ref: t,
16
+ m.displayName = s.SubTrigger.displayName;
17
+ function h({ ref: n, className: r, children: i, ...o }) {
18
+ return /* @__PURE__ */ a(s.Portal, { children: /* @__PURE__ */ a(s.SubContent, {
19
+ ref: n,
19
20
  "data-glass-surface": "elevated",
20
- className: e("z-50 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated p-1 text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", n),
21
- ...r
22
- });
21
+ className: e("z-50 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated p-1 text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", r),
22
+ ...o,
23
+ children: o.asChild ? i : /* @__PURE__ */ a(t, { children: i })
24
+ }) });
23
25
  }
24
- m.displayName = o.SubContent.displayName;
25
- function h({ ref: t, className: n, sideOffset: r = 4, ...a }) {
26
- return /* @__PURE__ */ i(o.Portal, { children: /* @__PURE__ */ i(o.Content, {
27
- ref: t,
26
+ h.displayName = s.SubContent.displayName;
27
+ function g({ ref: n, className: r, sideOffset: i = 4, children: o, ...c }) {
28
+ return /* @__PURE__ */ a(s.Portal, { children: /* @__PURE__ */ a(s.Content, {
29
+ ref: n,
28
30
  "data-glass-surface": "elevated",
29
- sideOffset: r,
30
- className: e("z-50 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated p-1 text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", n),
31
- ...a
31
+ sideOffset: i,
32
+ className: e("z-50 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated p-1 text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", r),
33
+ ...c,
34
+ children: c.asChild ? o : /* @__PURE__ */ a(t, { children: o })
32
35
  }) });
33
36
  }
34
- h.displayName = o.Content.displayName;
35
- function g({ ref: t, className: n, inset: r, ...a }) {
36
- return /* @__PURE__ */ i(o.Item, {
37
+ g.displayName = s.Content.displayName;
38
+ function _({ ref: t, className: n, inset: r, ...i }) {
39
+ return /* @__PURE__ */ a(s.Item, {
37
40
  ref: t,
38
41
  className: e("relative flex cursor-default select-none items-center rounded-button px-2 py-1.5 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50", r && "ps-8", n),
39
- ...a
42
+ ...i
40
43
  });
41
44
  }
42
- g.displayName = o.Item.displayName;
43
- function _({ ref: n, className: r, children: s, checked: c, ...l }) {
44
- return /* @__PURE__ */ a(o.CheckboxItem, {
45
- ref: n,
45
+ _.displayName = s.Item.displayName;
46
+ function v({ ref: t, className: r, children: i, checked: c, ...l }) {
47
+ return /* @__PURE__ */ o(s.CheckboxItem, {
48
+ ref: t,
46
49
  className: e("relative flex cursor-default select-none items-center rounded-button py-1.5 ps-8 pe-2 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50", r),
47
50
  checked: c,
48
51
  ...l,
49
- children: [/* @__PURE__ */ i("span", {
52
+ children: [/* @__PURE__ */ a("span", {
50
53
  className: "absolute start-2 flex size-3.5 items-center justify-center",
51
- children: /* @__PURE__ */ i(o.ItemIndicator, { children: /* @__PURE__ */ i(t, { className: "size-4" }) })
52
- }), s]
54
+ children: /* @__PURE__ */ a(s.ItemIndicator, { children: /* @__PURE__ */ a(n, { className: "size-4" }) })
55
+ }), i]
53
56
  });
54
57
  }
55
- _.displayName = o.CheckboxItem.displayName;
56
- function v({ ref: t, className: n, children: s, indicator: c, ...l }) {
57
- return /* @__PURE__ */ a(o.RadioItem, {
58
+ v.displayName = s.CheckboxItem.displayName;
59
+ function y({ ref: t, className: n, children: r, indicator: c, ...l }) {
60
+ return /* @__PURE__ */ o(s.RadioItem, {
58
61
  ref: t,
59
62
  className: e("relative flex cursor-default select-none items-center rounded-button py-1.5 ps-8 pe-2 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50", n),
60
63
  ...l,
61
- children: [/* @__PURE__ */ i("span", {
64
+ children: [/* @__PURE__ */ a("span", {
62
65
  className: "absolute start-2 flex size-3.5 items-center justify-center",
63
- children: /* @__PURE__ */ i(o.ItemIndicator, { children: c ?? /* @__PURE__ */ i(r, { className: "size-2 fill-current" }) })
64
- }), s]
66
+ children: /* @__PURE__ */ a(s.ItemIndicator, { children: c ?? /* @__PURE__ */ a(i, { className: "size-2 fill-current" }) })
67
+ }), r]
65
68
  });
66
69
  }
67
- v.displayName = o.RadioItem.displayName;
68
- function y({ ref: t, className: n, inset: r, ...a }) {
69
- return /* @__PURE__ */ i(o.Label, {
70
+ y.displayName = s.RadioItem.displayName;
71
+ function b({ ref: t, className: n, inset: r, ...i }) {
72
+ return /* @__PURE__ */ a(s.Label, {
70
73
  ref: t,
71
74
  className: e("px-2 py-1.5 text-xs font-medium uppercase tracking-wide text-text-muted", r && "ps-8", n),
72
- ...a
75
+ ...i
73
76
  });
74
77
  }
75
- y.displayName = o.Label.displayName;
76
- function b({ ref: t, className: n, ...r }) {
77
- return /* @__PURE__ */ i(o.Separator, {
78
+ b.displayName = s.Label.displayName;
79
+ function x({ ref: t, className: n, ...r }) {
80
+ return /* @__PURE__ */ a(s.Separator, {
78
81
  ref: t,
79
82
  className: e("-mx-1 my-1 h-px bg-border-subtle", n),
80
83
  ...r
81
84
  });
82
85
  }
83
- b.displayName = o.Separator.displayName;
84
- var x = ({ className: t, ...n }) => /* @__PURE__ */ i("span", {
86
+ x.displayName = s.Separator.displayName;
87
+ var S = ({ className: t, ...n }) => /* @__PURE__ */ a("span", {
85
88
  className: e("ms-auto text-xs tracking-widest text-text-muted", t),
86
89
  ...n
87
90
  });
88
- x.displayName = "DropdownMenuShortcut";
89
- export { s as DropdownMenu, _ as DropdownMenuCheckboxItem, h as DropdownMenuContent, l as DropdownMenuGroup, g as DropdownMenuItem, y as DropdownMenuLabel, u as DropdownMenuPortal, f as DropdownMenuRadioGroup, v as DropdownMenuRadioItem, b as DropdownMenuSeparator, x as DropdownMenuShortcut, d as DropdownMenuSub, m as DropdownMenuSubContent, p as DropdownMenuSubTrigger, c as DropdownMenuTrigger };
91
+ S.displayName = "DropdownMenuShortcut";
92
+ export { c as DropdownMenu, v as DropdownMenuCheckboxItem, g as DropdownMenuContent, u as DropdownMenuGroup, _ as DropdownMenuItem, b as DropdownMenuLabel, d as DropdownMenuPortal, p as DropdownMenuRadioGroup, y as DropdownMenuRadioItem, x as DropdownMenuSeparator, S as DropdownMenuShortcut, f as DropdownMenuSub, h as DropdownMenuSubContent, m as DropdownMenuSubTrigger, l as DropdownMenuTrigger };
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ /** Marks `children` as rendered inside a glass surface. Renders no element of its own. */
3
+ export declare function GlassSurfaceScope({ children }: {
4
+ children?: ReactNode;
5
+ }): import('react').JSX.Element;
6
+ /** Whether the caller renders inside a glass surface (a `GlassSurfaceScope`). */
7
+ export declare function useInsideGlassSurface(): boolean;
@@ -0,0 +1,14 @@
1
+ import { createContext as e, useContext as t } from "react";
2
+ import { jsx as n } from "react/jsx-runtime";
3
+ // src/ui/glass-surface.tsx
4
+ var r = e(!1);
5
+ function i({ children: e }) {
6
+ return /* @__PURE__ */ n(r.Provider, {
7
+ value: !0,
8
+ children: e
9
+ });
10
+ }
11
+ function a() {
12
+ return t(r);
13
+ }
14
+ export { i as GlassSurfaceScope, a as useInsideGlassSurface };
@@ -2,6 +2,6 @@ import * as React from 'react';
2
2
  import * as PopoverPrimitive from '@radix-ui/react-popover';
3
3
  declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
4
4
  declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
5
- declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): React.JSX.Element;
5
+ declare function PopoverContent({ className, align, sideOffset, children, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): React.JSX.Element;
6
6
  declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element;
7
7
  export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -1,35 +1,37 @@
1
1
  "use client";
2
2
  import { cn as e } from "../lib/utils.js";
3
+ import { GlassSurfaceScope as t } from "./glass-surface.js";
3
4
  import "react";
4
- import { jsx as t } from "react/jsx-runtime";
5
- import * as n from "@radix-ui/react-popover";
5
+ import { jsx as n } from "react/jsx-runtime";
6
+ import * as r from "@radix-ui/react-popover";
6
7
  // src/ui/popover.tsx
7
- function r({ ...e }) {
8
- return /* @__PURE__ */ t(n.Root, {
8
+ function i({ ...e }) {
9
+ return /* @__PURE__ */ n(r.Root, {
9
10
  "data-slot": "popover",
10
11
  ...e
11
12
  });
12
13
  }
13
- function i({ ...e }) {
14
- return /* @__PURE__ */ t(n.Trigger, {
14
+ function a({ ...e }) {
15
+ return /* @__PURE__ */ n(r.Trigger, {
15
16
  "data-slot": "popover-trigger",
16
17
  ...e
17
18
  });
18
19
  }
19
- function a({ className: r, align: i = "center", sideOffset: a = 4, ...o }) {
20
- return /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(n.Content, {
20
+ function o({ className: i, align: a = "center", sideOffset: o = 4, children: s, ...c }) {
21
+ return /* @__PURE__ */ n(r.Portal, { children: /* @__PURE__ */ n(r.Content, {
21
22
  "data-slot": "popover-content",
22
23
  "data-glass-surface": "elevated",
23
- align: i,
24
- sideOffset: a,
25
- className: e("bg-bg-elevated text-text-primary border-border-subtle data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-card border p-4 shadow-elevation-3 outline-hidden", r),
26
- ...o
24
+ align: a,
25
+ sideOffset: o,
26
+ className: e("bg-bg-elevated text-text-primary border-border-subtle data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-card border p-4 shadow-elevation-3 outline-hidden", i),
27
+ ...c,
28
+ children: c.asChild ? s : /* @__PURE__ */ n(t, { children: s })
27
29
  }) });
28
30
  }
29
- function o({ ...e }) {
30
- return /* @__PURE__ */ t(n.Anchor, {
31
+ function s({ ...e }) {
32
+ return /* @__PURE__ */ n(r.Anchor, {
31
33
  "data-slot": "popover-anchor",
32
34
  ...e
33
35
  });
34
36
  }
35
- export { r as Popover, o as PopoverAnchor, a as PopoverContent, i as PopoverTrigger };
37
+ export { i as Popover, s as PopoverAnchor, o as PopoverContent, a as PopoverTrigger };