@burdenoff/fe-libs 2026.1119.7 → 2026.1119.9

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 (32) hide show
  1. package/dist/chrome/shell/ShellSidebar.js +159 -157
  2. package/dist/chrome/shell/SidebarProfileMenu.js +193 -190
  3. package/dist/chrome/shell/WorkspaceAccountCard.js +45 -40
  4. package/dist/chrome/shell/WorkspaceMenu.js +140 -136
  5. package/dist/chrome/shell/shellSidebarAppearance.d.ts +4 -0
  6. package/dist/chrome/shell/shellSidebarAppearance.js +7 -0
  7. package/dist/chrome/shell/sidebarPopupPlacement.d.ts +21 -0
  8. package/dist/chrome/shell/sidebarPopupPlacement.js +28 -0
  9. package/dist/connections/ConnectionDialogPanel.js +222 -203
  10. package/dist/connections/ConnectionFormTab.d.ts +6 -0
  11. package/dist/connections/ConnectionFormTab.js +2 -2
  12. package/dist/connections/api.d.ts +28 -0
  13. package/dist/connections/api.js +107 -71
  14. package/dist/connections/connectionFlow.d.ts +63 -1
  15. package/dist/connections/connectionFlow.js +139 -47
  16. package/dist/connections/index.d.ts +2 -2
  17. package/dist/connections/oauthPopup.d.ts +16 -1
  18. package/dist/connections/oauthPopup.js +45 -37
  19. package/dist/connections/useConnectionSubmit.d.ts +7 -2
  20. package/dist/connections/useConnectionSubmit.js +69 -55
  21. package/dist/connections.js +6 -6
  22. package/dist/ui/dropdown-menu.d.ts +12 -2
  23. package/dist/ui/dropdown-menu.js +53 -50
  24. package/dist/ui/glass-surface.d.ts +7 -0
  25. package/dist/ui/glass-surface.js +14 -0
  26. package/dist/ui/popover.d.ts +1 -1
  27. package/dist/ui/popover.js +17 -15
  28. package/dist/ui/select.js +69 -68
  29. package/dist/ui/tooltip.d.ts +6 -0
  30. package/dist/ui/tooltip.js +18 -14
  31. package/package.json +1 -1
  32. package/src/shared/tokens/display-settings.css +3 -0
@@ -21,25 +21,28 @@ function p(e) {
21
21
  let t = window.screenX + (window.innerWidth - d) / 2, n = window.screenY + (window.innerHeight - f) / 2;
22
22
  return window.open(e, "oauth_popup", `width=${d},height=${f},left=${t},top=${n},toolbar=no,menubar=no,scrollbars=yes,resizable=yes`);
23
23
  }
24
- function m({ api: e, callbackUrl: d, translate: f, onConnectionCreated: m, onError: h, onEvent: g, reconnectConnection: _ }) {
25
- let [v, y] = s(!1), [b, x] = s(!1), [S, C] = s(""), [w, T] = s(null), [E, D] = s(null), O = o(null), k = o(null), A = o(null);
26
- a(() => () => {
27
- O.current?.(), k.current && !k.current.closed && k.current.close();
24
+ function m({ api: e, callbackUrl: d, translate: f, onConnectionCreated: m, onError: h, onEvent: g, reconnectConnection: _, reconnectSettings: v }) {
25
+ let [y, b] = s(!1), [x, S] = s(!1), [C, w] = s(""), [T, E] = s(null), [D, O] = s(null), k = o(null), A = o(null), j = o(null), M = o(v ?? null);
26
+ a(() => {
27
+ M.current = v ?? null;
28
+ }, [v]), a(() => () => {
29
+ k.current?.(), A.current && !A.current.closed && A.current.close();
28
30
  }, []);
29
- let j = i((e) => {
30
- A.current = null, D(null), T(e), m?.(e);
31
- }, [m]), M = i((e) => {
32
- C(e), h?.(Error(e));
33
- }, [h]), N = i((t, n, i) => {
34
- k.current = n, D(null), x(!0), g?.({
31
+ let N = i((e) => {
32
+ j.current = null, O(null), E(e), m?.(e);
33
+ }, [m]), P = i((e) => {
34
+ w(e), h?.(Error(e));
35
+ }, [h]), F = i((t, n, i, a) => {
36
+ A.current = n, O(null), S(!0), g?.({
35
37
  type: "oauth-started",
36
38
  connectionId: t,
37
39
  providerKey: i.key
38
- }), O.current?.(), O.current = r({
40
+ }), k.current?.(), k.current = r({
39
41
  connectionId: t,
40
42
  popup: n,
41
43
  fetchConnection: () => e.getConnection(t),
42
- onSuccess: (e) => j({
44
+ baseline: a,
45
+ onSuccess: (e) => N({
43
46
  ...e,
44
47
  provider: i
45
48
  }),
@@ -49,94 +52,105 @@ function m({ api: e, callbackUrl: d, translate: f, onConnectionCreated: m, onErr
49
52
  connectionId: t,
50
53
  providerKey: i.key,
51
54
  error: e
52
- }), M(e);
55
+ }), P(e);
53
56
  },
54
57
  onSettled: () => {
55
- O.current = null, k.current = null, x(!1);
58
+ k.current = null, A.current = null, S(!1);
56
59
  }
57
60
  });
58
61
  }, [
59
62
  e,
60
63
  g,
61
- j,
62
- M
63
- ]), P = i(() => {
64
- if (!E) return;
65
- let e = p(E.redirectUrl);
66
- e && (C(""), N(E.connectionId, e, E.provider));
67
- }, [E, N]), F = i(() => {
68
- O.current?.(), O.current = null, k.current && !k.current.closed && k.current.close(), k.current = null, x(!1);
64
+ N,
65
+ P
66
+ ]), I = i(() => {
67
+ if (!D) return;
68
+ let e = p(D.redirectUrl);
69
+ e && (w(""), F(D.connectionId, e, D.provider, D.baseline));
70
+ }, [D, F]), L = i(() => {
71
+ k.current?.(), k.current = null, A.current && !A.current.closed && A.current.close(), A.current = null, S(!1);
69
72
  }, []);
70
73
  return {
71
74
  submit: i(async (r, i) => {
72
- if (v || b) return;
75
+ if (y || x) return;
73
76
  let a = n(r, f);
74
77
  if (a) {
75
- C(a);
78
+ w(a);
76
79
  return;
77
80
  }
78
81
  let { provider: o } = r;
79
- C(""), D(null), y(!0);
80
- let s = _ ? null : c(r), m = l(_, A.current, s);
82
+ w(""), O(null), b(!0);
83
+ let s = _ ? null : c(r), m = l(_, j.current, s);
81
84
  try {
82
- let n = await t(e, r, {
85
+ let n;
86
+ if (_) {
87
+ let e = M.current;
88
+ if (!e) throw Error(f("integrations.addConnection.reconnect.settingsUnavailable", "This connection's current settings could not be read. Close the dialog and try again."));
89
+ n = e;
90
+ }
91
+ let a = await t(e, r, {
83
92
  redirectUri: d,
84
93
  scopes: i,
85
94
  existing: m,
95
+ reconnectFrom: n,
96
+ onReconnectSaved: (e) => {
97
+ M.current = e;
98
+ },
86
99
  onCreated: (e) => {
87
- s !== null && (A.current = {
100
+ s !== null && (j.current = {
88
101
  inputKey: s,
89
102
  connection: e,
90
103
  announced: !1
91
104
  });
92
105
  }
93
106
  });
94
- if (u(n.connection.id, A.current, _) && (A.current?.connection.id === n.connection.id && (A.current.announced = !0), g?.({
107
+ if (u(a.connection.id, j.current, _) && (j.current?.connection.id === a.connection.id && (j.current.announced = !0), g?.({
95
108
  type: "connection-created",
96
- connectionId: n.connection.id,
109
+ connectionId: a.connection.id,
97
110
  providerKey: o.key
98
- })), n.kind === "done") {
99
- j({
100
- ...n.connection,
111
+ })), a.kind === "done") {
112
+ N({
113
+ ...a.connection,
101
114
  provider: o
102
115
  });
103
116
  return;
104
117
  }
105
- let a = p(n.redirectUrl);
106
- if (!a) {
107
- D({
108
- connectionId: n.connection.id,
109
- redirectUrl: n.redirectUrl,
110
- provider: o
111
- }), M(f("integrations.addConnection.authentication.popupBlocked", "Popup was blocked. Please allow popups for this site and try again.", { provider: o.name }));
118
+ let c = p(a.redirectUrl);
119
+ if (!c) {
120
+ O({
121
+ connectionId: a.connection.id,
122
+ redirectUrl: a.redirectUrl,
123
+ provider: o,
124
+ baseline: a.baseline
125
+ }), P(f("integrations.addConnection.authentication.popupBlocked", "Popup was blocked. Please allow popups for this site and try again.", { provider: o.name }));
112
126
  return;
113
127
  }
114
- N(n.connection.id, a, o);
128
+ F(a.connection.id, c, o, a.baseline);
115
129
  } catch (e) {
116
- M(e instanceof Error ? e.message : f("integrations.addConnection.errors.authFailed", "Authentication failed"));
130
+ P(e instanceof Error ? e.message : f("integrations.addConnection.errors.authFailed", "Authentication failed"));
117
131
  } finally {
118
- y(!1);
132
+ b(!1);
119
133
  }
120
134
  }, [
121
- v,
122
- b,
135
+ y,
136
+ x,
123
137
  f,
124
138
  e,
125
139
  d,
126
140
  g,
127
- j,
128
- M,
129
141
  N,
142
+ P,
143
+ F,
130
144
  _
131
145
  ]),
132
- busy: v || b,
133
- oauthWaiting: b,
134
- errorMessage: S,
135
- setErrorMessage: C,
136
- created: w,
137
- signInBlocked: E !== null,
138
- openBlockedSignIn: P,
139
- cancelSignIn: F
146
+ busy: y || x,
147
+ oauthWaiting: x,
148
+ errorMessage: C,
149
+ setErrorMessage: w,
150
+ created: T,
151
+ signInBlocked: D !== null,
152
+ openBlockedSignIn: I,
153
+ cancelSignIn: L
140
154
  };
141
155
  }
142
156
  export { c as createInputKey, l as reusableRecord, u as shouldAnnounce, m as useConnectionSubmit };
@@ -13,9 +13,9 @@ import { EMPTY_STORAGE as x, compatibleSecrets as S, defaultVault as C, withDefa
13
13
  import { POPULAR_PROVIDER_KEYS as T, groupByCategory as E, isPopularProvider as D, needsAdminSetup as O, pickableProviders as k, popularFirst as A } from "./connections/picker.js";
14
14
  import { ScopePicker as j } from "./connections/ScopePicker.js";
15
15
  import { createConnectionsApi as M, mapProvider as N, normalizeAuthType as P } from "./connections/api.js";
16
- import { buildCreateInput as F, collectsOwnClientId as I, flowForAuthType as L, resolveFlow as R, resolveMethod as z, resolveSchema as B, submitConnection as V, submittedValues as H, validateDraft as U } from "./connections/connectionFlow.js";
17
- import { isOAuthCallbackMessage as W, waitForOAuthCompletion as G } from "./connections/oauthPopup.js";
18
- import { getProviderAccent as K, getProviderIconName as q, getProviderImageSource as J, getProviderTextIcon as Y, normalizeProviderCategory as X } from "./connections/providerIdentity.js";
19
- import { isScopeChecked as Z, parseScopeOptions as Q, requestedScopes as $, toggleScope as ee } from "./connections/scopes.js";
20
- import { authTypeLabel as te, categoryLabel as ne } from "./connections/labels.js";
21
- export { t as CONNECTION_DIALOG_FRAME_CLASSES, y as CONNECT_MORE_OPTIONS_KEY, e as ConnectionDialog, v as CredentialStorageSelector, x as EMPTY_STORAGE, b as OneScreenConnectionForm, T as POPULAR_PROVIDER_KEYS, n as ProviderIcon, s as ResourceShareDialog, c as ResourceSharePanel, p as SHARE_PICKER_LIMIT, r as SHARE_TITLE_ID, j as ScopePicker, i as ShareConnectionDialog, f as VisibilityChoice, te as authTypeLabel, F as buildCreateInput, m as canManageSharing, ne as categoryLabel, I as collectsOwnClientId, S as compatibleSecrets, a as connectionShareCopy, o as connectionVisibilityCopy, h as createConnectionSharingApi, M as createConnectionsApi, g as createSharePrincipalLister, C as defaultVault, L as flowForAuthType, K as getProviderAccent, q as getProviderIconName, J as getProviderImageSource, Y as getProviderTextIcon, E as groupByCategory, W as isOAuthCallbackMessage, D as isPopularProvider, Z as isScopeChecked, _ as mapConnectionSharing, N as mapProvider, O as needsAdminSetup, P as normalizeAuthType, X as normalizeProviderCategory, Q as parseScopeOptions, k as pickableProviders, A as popularFirst, l as principalKey, $ as requestedScopes, R as resolveFlow, z as resolveMethod, B as resolveSchema, u as resourceShareInput, V as submitConnection, H as submittedValues, ee as toggleScope, d as useResourceSharingDraft, U as validateDraft, G as waitForOAuthCompletion, w as withDefaultVault };
16
+ import { applyReconnectUpdate as F, buildCreateInput as I, buildReconnectUpdate as L, collectsOwnClientId as R, flowForAuthType as z, isSecretField as B, reconnectEditsConfig as V, reconnectInitialValues as H, reconnectSchema as U, resolveFlow as W, resolveMethod as G, resolveSchema as K, submitConnection as q, submittedValues as J, validateDraft as Y } from "./connections/connectionFlow.js";
17
+ import { isOAuthCallbackMessage as X, waitForOAuthCompletion as Z } from "./connections/oauthPopup.js";
18
+ import { getProviderAccent as Q, getProviderIconName as $, getProviderImageSource as ee, getProviderTextIcon as te, normalizeProviderCategory as ne } from "./connections/providerIdentity.js";
19
+ import { isScopeChecked as re, parseScopeOptions as ie, requestedScopes as ae, toggleScope as oe } from "./connections/scopes.js";
20
+ import { authTypeLabel as se, categoryLabel as ce } from "./connections/labels.js";
21
+ export { t as CONNECTION_DIALOG_FRAME_CLASSES, y as CONNECT_MORE_OPTIONS_KEY, e as ConnectionDialog, v as CredentialStorageSelector, x as EMPTY_STORAGE, b as OneScreenConnectionForm, T as POPULAR_PROVIDER_KEYS, n as ProviderIcon, s as ResourceShareDialog, c as ResourceSharePanel, p as SHARE_PICKER_LIMIT, r as SHARE_TITLE_ID, j as ScopePicker, i as ShareConnectionDialog, f as VisibilityChoice, F as applyReconnectUpdate, se as authTypeLabel, I as buildCreateInput, L as buildReconnectUpdate, m as canManageSharing, ce as categoryLabel, R as collectsOwnClientId, S as compatibleSecrets, a as connectionShareCopy, o as connectionVisibilityCopy, h as createConnectionSharingApi, M as createConnectionsApi, g as createSharePrincipalLister, C as defaultVault, z as flowForAuthType, Q as getProviderAccent, $ as getProviderIconName, ee as getProviderImageSource, te as getProviderTextIcon, E as groupByCategory, X as isOAuthCallbackMessage, D as isPopularProvider, re as isScopeChecked, B as isSecretField, _ as mapConnectionSharing, N as mapProvider, O as needsAdminSetup, P as normalizeAuthType, ne as normalizeProviderCategory, ie as parseScopeOptions, k as pickableProviders, A as popularFirst, l as principalKey, V as reconnectEditsConfig, H as reconnectInitialValues, U as reconnectSchema, ae as requestedScopes, W as resolveFlow, G as resolveMethod, K as resolveSchema, u as resourceShareInput, q as submitConnection, J as submittedValues, oe as toggleScope, d as useResourceSharingDraft, Y as validateDraft, Z as waitForOAuthCompletion, w as withDefaultVault };
@@ -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 };