@burdenoff/fe-libs 2026.1116.2 → 2026.1116.4

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.
@@ -0,0 +1,39 @@
1
+ import { ReactNode } from 'react';
2
+ import { ShellHelpMenu } from './types';
3
+ /** How long a copy button shows its check. */
4
+ export declare const PROFILE_HELP_COPIED_MS = 2000;
5
+ export declare const HELP_SUB_SURFACE = "w-[340px] max-w-[calc(100vw-1rem)] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto overscroll-contain data-[state=open]:animate-none data-[state=closed]:animate-none motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out";
6
+ /** The menu's words and copy state. */
7
+ export interface ProfileHelpState {
8
+ /** The copy button showing its check (`about-<row id>`), if any. */
9
+ copiedId: string | null;
10
+ copy(id: string, value: string): void;
11
+ copyLabel(label: string, value: string): string;
12
+ copied: string;
13
+ newTab: string;
14
+ }
15
+ /**
16
+ * The words (a dictionary's translation, else the bundled six locales) and the
17
+ * copy state: a copied button shows its check for `PROFILE_HELP_COPIED_MS`; a
18
+ * copy that fails shows nothing.
19
+ */
20
+ export declare function useProfileHelp(): ProfileHelpState;
21
+ /**
22
+ * Only absolute http(s) addresses become links. Returns the parsed URL's
23
+ * normalised `href` (lower-case scheme and host, no surrounding spaces), so
24
+ * `nativeOpenUrl`'s case-sensitive `https:` check accepts what this accepts.
25
+ */
26
+ export declare function safeHelpHref(href: string | undefined): string | undefined;
27
+ /** Whether a host's `help` has anything to show. */
28
+ export declare function hasProfileHelpContent(help: ShellHelpMenu): boolean;
29
+ export interface ProfileHelpBodyOptions {
30
+ help: ShellHelpMenu;
31
+ variant: 'popover' | 'sheet';
32
+ state: ProfileHelpState;
33
+ /** Closes the popup or the sheet. */
34
+ close(): void;
35
+ /** A `useId()` value; group labels get ids from it. */
36
+ idBase: string;
37
+ }
38
+ /** The grouped Help & support content, for the popover's sub-menu or the phone sheet. */
39
+ export declare function profileHelpBody({ help, variant, state, close, idBase, }: ProfileHelpBodyOptions): ReactNode;
@@ -0,0 +1,250 @@
1
+ import { getNativeBridge as e } from "../../shared/native/bridge.js";
2
+ import { nativeCopyText as t, nativeOpenUrl as n } from "../../shared/native/consumers.js";
3
+ import { useOptionalI18n as r } from "../../shared/providers/shell/I18nProvider.js";
4
+ import { useShellLabel as i } from "../../shared/providers/shell/useShellLabel.js";
5
+ import { DropdownMenuGroup as a, DropdownMenuItem as o } from "../../ui/dropdown-menu.js";
6
+ import { profileHelpWordsFor as s } from "./profileHelpWords.js";
7
+ import { MENU_ROW as c, SECTION_LABEL as l, SHEET_ROW as u } from "./profileMenuClasses.js";
8
+ import { useCallback as d, useEffect as f, useRef as p, useState as m } from "react";
9
+ import { Check as h, Copy as g, ExternalLink as _ } from "lucide-react";
10
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
11
+ // src/chrome/shell/profileHelpMenu.tsx
12
+ var x = 2e3, S = "w-[340px] max-w-[calc(100vw-1rem)] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto overscroll-contain data-[state=open]:animate-none data-[state=closed]:animate-none motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out", C = "size-3.5 flex-shrink-0 text-text-muted rtl:-scale-x-100", w = "outline-none focus-visible:ring-2 focus-visible:ring-focus-ring", T = "h-7 rounded-button px-2.5 focus:bg-bg-sunken", E = `flex h-9 items-center rounded-button px-3 text-body-sm text-text-primary transition-colors hover:bg-bg-sunken ${w}`, D = "flex flex-wrap items-center gap-1 px-1.5", O = "flex min-h-7 items-center gap-2 ps-2.5 pe-1", k = "w-20 flex-shrink-0 truncate text-xs text-text-muted", A = "min-w-0 flex-1 truncate font-mono text-xs text-text-primary", j = "size-7 flex-shrink-0 justify-center rounded-button p-0 text-text-muted focus:bg-bg-sunken", M = `flex size-9 flex-shrink-0 items-center justify-center rounded-button text-text-muted hover:bg-bg-sunken hover:text-text-primary ${w}`, N = "size-1.5 flex-shrink-0 rounded-full bg-status-success-bg", P = "rounded-pill bg-bg-sunken px-1.5 py-0.5 text-caption text-text-secondary", F = "h-7 gap-1.5 rounded-button px-2 focus:bg-bg-sunken", I = "inline-flex h-7 items-center gap-1.5 px-2 text-text-secondary", L = `inline-flex h-9 items-center gap-1.5 rounded-button px-2 text-text-primary hover:bg-bg-sunken ${w}`, R = "px-2.5 pb-1 pt-2 text-caption text-text-muted";
13
+ function z() {
14
+ let e = i(), n = s(r()?.locale), [a, o] = m(null), c = p(null), l = p(!1);
15
+ return f(() => (l.current = !0, () => {
16
+ l.current = !1, c.current && clearTimeout(c.current), c.current = null;
17
+ }), []), {
18
+ copiedId: a,
19
+ copy: d((e, n) => {
20
+ t(n).then((t) => {
21
+ t && l.current && (c.current && clearTimeout(c.current), o(e), c.current = setTimeout(() => {
22
+ c.current = null, o(null);
23
+ }, x));
24
+ }, () => void 0);
25
+ }, []),
26
+ copyLabel: (t, r) => e("shell.profile.help.copy", n.copy, {
27
+ label: t,
28
+ value: r
29
+ }),
30
+ copied: e("shell.profile.help.copied", n.copied),
31
+ newTab: e("shell.profile.help.newTab", n.newTab)
32
+ };
33
+ }
34
+ function B(e) {
35
+ if (e) try {
36
+ let t = new URL(e.trim());
37
+ return t.protocol === "https:" || t.protocol === "http:" ? t.href : void 0;
38
+ } catch {
39
+ return;
40
+ }
41
+ }
42
+ function V(e) {
43
+ return e.sections.length > 0 || !!e.about || !!e.note;
44
+ }
45
+ function H(t, r) {
46
+ return e() ? (t.preventDefault(), n(r), !0) : !1;
47
+ }
48
+ function U({ help: e, variant: t, state: n, close: r, idBase: i }) {
49
+ let s = t === "sheet", d = /* @__PURE__ */ y("span", {
50
+ className: "sr-only",
51
+ children: ` ${n.newTab}`
52
+ }), f = (e, t, n, r, i) => {
53
+ let o = {
54
+ "aria-labelledby": n,
55
+ "aria-busy": r || void 0,
56
+ "data-testid": t,
57
+ className: "py-0.5"
58
+ };
59
+ return s ? /* @__PURE__ */ y("div", {
60
+ role: "group",
61
+ ...o,
62
+ children: i
63
+ }, e) : /* @__PURE__ */ y(a, {
64
+ ...o,
65
+ children: i
66
+ }, e);
67
+ }, p = (e, t) => /* @__PURE__ */ y("div", {
68
+ id: e,
69
+ role: "presentation",
70
+ className: l,
71
+ children: t
72
+ }), m = (e, t, n) => {
73
+ let i = `sidebar-profile-help-${e.id}-${t.id}`, a = B(t.href), l = t.onSelect;
74
+ if (!a && !l) return null;
75
+ let f = n ? void 0 : t.icon, p = /* @__PURE__ */ b(v, { children: [
76
+ f && /* @__PURE__ */ y(f, { className: "size-4 flex-shrink-0 text-text-secondary" }),
77
+ /* @__PURE__ */ y("span", {
78
+ className: n ? "text-xs" : "min-w-0 flex-1 truncate",
79
+ children: t.label
80
+ }),
81
+ a && !n && /* @__PURE__ */ y(_, {
82
+ className: C,
83
+ "aria-hidden": "true"
84
+ }),
85
+ a && d
86
+ ] });
87
+ if (s) {
88
+ let e = n ? E : u;
89
+ return a ? /* @__PURE__ */ y("a", {
90
+ href: a,
91
+ target: "_blank",
92
+ rel: "noopener noreferrer",
93
+ className: e,
94
+ "data-testid": i,
95
+ onClick: (e) => {
96
+ H(e, a), r(), l?.();
97
+ },
98
+ children: p
99
+ }, t.id) : /* @__PURE__ */ y("button", {
100
+ type: "button",
101
+ className: e,
102
+ "data-testid": i,
103
+ onClick: () => {
104
+ r(), l?.();
105
+ },
106
+ children: p
107
+ }, t.id);
108
+ }
109
+ let m = n ? T : c;
110
+ return a ? /* @__PURE__ */ y(o, {
111
+ asChild: !0,
112
+ className: m,
113
+ "data-testid": i,
114
+ onSelect: () => l?.(),
115
+ children: /* @__PURE__ */ y("a", {
116
+ href: a,
117
+ target: "_blank",
118
+ rel: "noopener noreferrer",
119
+ onClick: (e) => {
120
+ H(e, a) && (l?.(), r());
121
+ },
122
+ children: p
123
+ })
124
+ }, t.id) : /* @__PURE__ */ y(o, {
125
+ className: m,
126
+ "data-testid": i,
127
+ onSelect: () => l?.(),
128
+ children: p
129
+ }, t.id);
130
+ }, x = (e, t) => {
131
+ let n = e.label ? `${i}-help-${t}` : void 0, r = e.layout === "chips", a = e.pending === !0, o = a ? [] : e.items.map((t) => m(e, t, r));
132
+ return f(`section-${e.id}`, `sidebar-profile-help-group-${e.id}`, n, a, /* @__PURE__ */ b(v, { children: [n && e.label && p(n, e.label), a ? /* @__PURE__ */ y("div", {
133
+ "aria-hidden": "true",
134
+ className: s ? "h-9" : "h-7",
135
+ "data-testid": `sidebar-profile-help-group-${e.id}-pending`
136
+ }) : r ? /* @__PURE__ */ y("div", {
137
+ role: "none",
138
+ className: D,
139
+ children: o
140
+ }) : o] }));
141
+ }, S = (e) => {
142
+ let t = `about-${e.id}`, r = n.copyLabel(e.label, e.value), i = `sidebar-profile-help-about-${e.id}-copy`, a = n.copiedId === t ? /* @__PURE__ */ y(h, {
143
+ className: "size-3.5 text-status-success-text",
144
+ "aria-hidden": "true"
145
+ }) : /* @__PURE__ */ y(g, {
146
+ className: "size-3.5",
147
+ "aria-hidden": "true"
148
+ });
149
+ return s ? /* @__PURE__ */ y("button", {
150
+ type: "button",
151
+ "aria-label": r,
152
+ className: M,
153
+ "data-testid": i,
154
+ onClick: () => n.copy(t, e.value),
155
+ children: a
156
+ }) : /* @__PURE__ */ y(o, {
157
+ "aria-label": r,
158
+ className: j,
159
+ "data-testid": i,
160
+ onSelect: (r) => {
161
+ r.preventDefault(), n.copy(t, e.value);
162
+ },
163
+ children: a
164
+ });
165
+ }, w = (e) => {
166
+ let t = `sidebar-profile-help-status-${e.id}`, n = /* @__PURE__ */ b(v, { children: [
167
+ /* @__PURE__ */ y("span", {
168
+ "aria-hidden": "true",
169
+ className: N
170
+ }),
171
+ /* @__PURE__ */ y("span", {
172
+ className: "truncate text-xs",
173
+ children: e.label
174
+ }),
175
+ e.badge && /* @__PURE__ */ y("span", {
176
+ className: P,
177
+ children: e.badge
178
+ })
179
+ ] }), i = e.onSelect;
180
+ return i ? s ? /* @__PURE__ */ y("button", {
181
+ type: "button",
182
+ className: L,
183
+ "data-testid": t,
184
+ onClick: () => {
185
+ r(), i();
186
+ },
187
+ children: n
188
+ }, e.id) : /* @__PURE__ */ y(o, {
189
+ className: F,
190
+ "data-testid": t,
191
+ onSelect: () => i(),
192
+ children: n
193
+ }, e.id) : /* @__PURE__ */ y("span", {
194
+ className: I,
195
+ "data-testid": t,
196
+ children: n
197
+ }, e.id);
198
+ }, z = e.about, V = z?.statuses ?? [], U = `${i}-help-about`;
199
+ return /* @__PURE__ */ b(v, { children: [
200
+ /* @__PURE__ */ y("span", {
201
+ role: "status",
202
+ "aria-live": "polite",
203
+ className: "sr-only",
204
+ "data-testid": "sidebar-profile-help-announcer",
205
+ children: n.copiedId ? n.copied : ""
206
+ }),
207
+ e.sections.map(x),
208
+ z && f("about", "sidebar-profile-help-about", U, !1, /* @__PURE__ */ b(v, { children: [
209
+ p(U, z.label),
210
+ z.rows.map((e) => /* @__PURE__ */ b("div", {
211
+ role: "none",
212
+ className: O,
213
+ "data-testid": `sidebar-profile-help-about-${e.id}`,
214
+ children: [
215
+ /* @__PURE__ */ y("span", {
216
+ className: k,
217
+ children: e.label
218
+ }),
219
+ /* @__PURE__ */ y("code", {
220
+ dir: "ltr",
221
+ title: e.value,
222
+ className: A,
223
+ children: e.value
224
+ }),
225
+ e.copyable && S(e)
226
+ ]
227
+ }, e.id)),
228
+ V.length > 0 && /* @__PURE__ */ b("div", {
229
+ role: "none",
230
+ className: O,
231
+ "data-testid": "sidebar-profile-help-statuses",
232
+ children: [z.statusLabel && /* @__PURE__ */ y("span", {
233
+ className: k,
234
+ children: z.statusLabel
235
+ }), /* @__PURE__ */ y("div", {
236
+ role: "none",
237
+ className: "flex min-w-0 flex-1 flex-wrap items-center gap-1",
238
+ children: V.map(w)
239
+ })]
240
+ })
241
+ ] })),
242
+ e.note && /* @__PURE__ */ y("p", {
243
+ role: "presentation",
244
+ className: R,
245
+ "data-testid": "sidebar-profile-help-note",
246
+ children: e.note
247
+ })
248
+ ] });
249
+ }
250
+ export { S as HELP_SUB_SURFACE, x as PROFILE_HELP_COPIED_MS, V as hasProfileHelpContent, U as profileHelpBody, B as safeHelpHref, z as useProfileHelp };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The words the grouped Help & support menu adds (`SidebarProfileMenu` `help`,
3
+ * BOFF-15027): the copy button's name, the "Copied" announcement and the
4
+ * hidden "(opens in a new tab)" after each external link.
5
+ *
6
+ * The keys are in `SHELL_LABEL_MANIFEST` (English) and
7
+ * `SHELL_LABELS_ADDED_BOFF_15027`, like every shell label. A dictionary's
8
+ * translation wins; until a product seeds them, the six values here are what
9
+ * the menu shows, so a Tamil or Arabic screen never hears English for them.
10
+ * Pure data, no imports: loadable by any seed or extractor script.
11
+ */
12
+ export interface ProfileHelpWords {
13
+ /** The copy button's accessible name; `{{label}}` and `{{value}}` are filled in. */
14
+ copy: string;
15
+ /** Announced (aria-live, polite) after a value is copied. */
16
+ copied: string;
17
+ /** Visually hidden after every link that opens a new tab. */
18
+ newTab: string;
19
+ }
20
+ /**
21
+ * By primary language subtag. English is the manifest's English (a test pins
22
+ * it); the other five: AI-written, 2026-11-16 (BOFF-15027); native review
23
+ * pending. No seed/apply performed.
24
+ */
25
+ export declare const PROFILE_HELP_WORDS: Readonly<Record<string, ProfileHelpWords>>;
26
+ /** The bundled words for a locale tag (by its primary language); English for any other. */
27
+ export declare function profileHelpWordsFor(locale: string | undefined): ProfileHelpWords;
@@ -0,0 +1,38 @@
1
+ // src/chrome/shell/profileHelpWords.ts
2
+ var e = Object.freeze({
3
+ copy: "Copy {{label}}: {{value}}",
4
+ copied: "Copied",
5
+ newTab: "(opens in a new tab)"
6
+ }), t = Object.freeze({
7
+ en: e,
8
+ es: {
9
+ copy: "Copiar {{label}}: {{value}}",
10
+ copied: "Copiado",
11
+ newTab: "(se abre en una pestaña nueva)"
12
+ },
13
+ hi: {
14
+ copy: "{{label}} कॉपी करें: {{value}}",
15
+ copied: "कॉपी हो गया",
16
+ newTab: "(नए टैब में खुलता है)"
17
+ },
18
+ ta: {
19
+ copy: "{{label}} நகலெடு: {{value}}",
20
+ copied: "நகலெடுக்கப்பட்டது",
21
+ newTab: "(புதிய தாவலில் திறக்கும்)"
22
+ },
23
+ ar: {
24
+ copy: "نسخ {{label}}: {{value}}",
25
+ copied: "تم النسخ",
26
+ newTab: "(يُفتح في علامة تبويب جديدة)"
27
+ },
28
+ zh: {
29
+ copy: "复制{{label}}:{{value}}",
30
+ copied: "已复制",
31
+ newTab: "(在新标签页中打开)"
32
+ }
33
+ });
34
+ function n(n) {
35
+ let r = (n ?? "").toLowerCase().split("-")[0] ?? "";
36
+ return Object.hasOwn(t, r) && t[r] || e;
37
+ }
38
+ export { t as PROFILE_HELP_WORDS, n as profileHelpWordsFor };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Class lists the profile popup (`SidebarProfileMenu`) and its grouped Help &
3
+ * support content (`profileHelpMenu.tsx`) share, so both read alike.
4
+ */
5
+ /** Popover/menu surface role (plan §"Semantic-token foundation"). */
6
+ export declare const MENU_SURFACE = "rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay";
7
+ export declare const SUB_SURFACE: string;
8
+ export declare const MENU_ROW = "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken";
9
+ export declare const SECTION_LABEL = "px-2.5 pb-1 pt-2 text-caption font-semibold uppercase tracking-wider text-text-muted";
10
+ export declare const VALUE = "ms-auto max-w-32 truncate text-xs text-text-muted";
11
+ export declare const ICON = "size-4 flex-shrink-0 text-text-secondary";
12
+ export declare const SHEET_ROW = "flex h-control-sm w-full items-center gap-3 rounded-button px-2.5 text-start text-body-sm text-text-primary transition-colors hover:bg-bg-sunken outline-none focus-visible:ring-2 focus-visible:ring-focus-ring";
@@ -0,0 +1,3 @@
1
+ // src/chrome/shell/profileMenuClasses.ts
2
+ var e = "rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay", t = "max-h-80 overflow-y-auto rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay", n = "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken", r = "px-2.5 pb-1 pt-2 text-caption font-semibold uppercase tracking-wider text-text-muted", i = "ms-auto max-w-32 truncate text-xs text-text-muted", a = "size-4 flex-shrink-0 text-text-secondary", o = "flex h-control-sm w-full items-center gap-3 rounded-button px-2.5 text-start text-body-sm text-text-primary transition-colors hover:bg-bg-sunken outline-none focus-visible:ring-2 focus-visible:ring-focus-ring";
3
+ export { a as ICON, n as MENU_ROW, e as MENU_SURFACE, r as SECTION_LABEL, o as SHEET_ROW, t as SUB_SURFACE, i as VALUE };
@@ -70,6 +70,69 @@ export interface ShellMenuItem {
70
70
  onSelect: () => void;
71
71
  disabled?: boolean;
72
72
  }
73
+ /**
74
+ * One row of the grouped Help & support menu (`SidebarProfileMenu` `help`): an
75
+ * external page (`href`) or an in-app action (`onSelect`).
76
+ */
77
+ export interface ShellHelpLink {
78
+ id: string;
79
+ label: string;
80
+ icon?: ShellIcon;
81
+ /**
82
+ * An absolute http(s) address. The row is a real link that opens a new tab
83
+ * (the system browser in an installed app). Any other address is not drawn
84
+ * as a link.
85
+ */
86
+ href?: string;
87
+ /** In-app action; with `href` it runs as the link opens. */
88
+ onSelect?: () => void;
89
+ }
90
+ /** A labelled group of Help & support rows. */
91
+ export interface ShellHelpSection {
92
+ id: string;
93
+ label?: string;
94
+ items: readonly ShellHelpLink[];
95
+ /** `chips`: one wrapping row of short links (e.g. Follow us). Default `list`. */
96
+ layout?: 'list' | 'chips';
97
+ /**
98
+ * Its items are still being read: the group keeps its label and one chip
99
+ * row's height, with no items, so nothing below it moves when they arrive.
100
+ */
101
+ pending?: boolean;
102
+ }
103
+ /** An About row: a label and its value, optionally with a copy button. */
104
+ export interface ShellHelpAboutRow {
105
+ id: string;
106
+ label: string;
107
+ value: string;
108
+ copyable?: boolean;
109
+ }
110
+ /** A status a host shows under About: a button when it has an action, else text with a dot. */
111
+ export interface ShellHelpStatus {
112
+ id: string;
113
+ label: string;
114
+ badge?: string;
115
+ onSelect?: () => void;
116
+ }
117
+ /** The About group of Help & support: build facts and statuses. */
118
+ export interface ShellHelpAbout {
119
+ label: string;
120
+ rows: readonly ShellHelpAboutRow[];
121
+ /** The Status row's label. */
122
+ statusLabel?: string;
123
+ /** The Status row is hidden while this is empty or absent. */
124
+ statuses?: readonly ShellHelpStatus[];
125
+ }
126
+ /**
127
+ * The grouped Help & support menu a host can give `SidebarProfileMenu` (and
128
+ * its phone sheet) instead of the flat `helpItems`.
129
+ */
130
+ export interface ShellHelpMenu {
131
+ sections: readonly ShellHelpSection[];
132
+ about?: ShellHelpAbout;
133
+ /** A muted caption shown last (e.g. the copyright line). */
134
+ note?: string;
135
+ }
73
136
  export interface ShellDoor {
74
137
  id: string;
75
138
  title: string;
@@ -46,3 +46,11 @@ export declare const SHELL_LABELS_ADDED_BOFF_13461: readonly string[];
46
46
  * then each renders its English.
47
47
  */
48
48
  export declare const SHELL_LABELS_ADDED_BOFF_11842: readonly string[];
49
+ /**
50
+ * The keys the profile menu's opt-in grouped Help & support (`help`) added
51
+ * (BOFF-15027). Not in any dictionary yet: seed them into `workspaces` (and a
52
+ * product's curated words, where it keeps its own). Until then each renders
53
+ * its bundled translation for the six shipped locales (`PROFILE_HELP_WORDS`
54
+ * in `shell/profileHelpWords.ts`), and English for any other.
55
+ */
56
+ export declare const SHELL_LABELS_ADDED_BOFF_15027: readonly string[];
@@ -9,6 +9,7 @@ var r = {
9
9
  function i({ intensity: i = "normal", image: a, className: o, ...s }) {
10
10
  return /* @__PURE__ */ n("div", {
11
11
  "aria-hidden": "true",
12
+ "data-slot": "aurora-background",
12
13
  className: e("pointer-events-none absolute inset-0 -z-10 overflow-hidden", o),
13
14
  ...s,
14
15
  children: [a && /* @__PURE__ */ t("img", {
@@ -5,5 +5,10 @@ declare const badgeVariants: (props?: ({
5
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
6
  export interface BadgeProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
7
  }
8
+ /**
9
+ * `data-slot="badge"` and `data-badge-variant` are hooks for opt-in layers (BOFF-14994). Not
10
+ * `data-variant`: the UI agent tools treat anything inside `[data-variant="destructive"]` as a
11
+ * destructive Button that needs the person's confirmation (agent-tools/ui/uiTools.ts).
12
+ */
8
13
  declare function Badge({ className, variant, ...props }: BadgeProps): import('react').JSX.Element;
9
14
  export { Badge, badgeVariants };
package/dist/ui/badge.js CHANGED
@@ -16,6 +16,8 @@ var r = n("inline-flex items-center gap-1 rounded-full border px-2.5 py-0.5 text
16
16
  });
17
17
  function i({ className: n, variant: i, ...a }) {
18
18
  return /* @__PURE__ */ t("div", {
19
+ "data-slot": "badge",
20
+ "data-badge-variant": i ?? "default",
19
21
  className: e(r({ variant: i }), n),
20
22
  ...a
21
23
  });
package/dist/ui/card.d.ts CHANGED
@@ -1,4 +1,10 @@
1
1
  import { HTMLAttributes } from 'react';
2
+ /**
3
+ * Card and its parts carry the shadcn v4 `data-slot` names (`card`, `card-header`, …).
4
+ * A card the user can click (an `onClick`, or the role of a button or link) also carries
5
+ * `data-interactive`, so an opt-in layer such as the FluidGrids depth layer
6
+ * (shared/tokens/depth.css, BOFF-14994) can tell it apart. The hooks change no style.
7
+ */
2
8
  declare function Card({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
3
9
  ref?: React.Ref<HTMLDivElement>;
4
10
  }): import('react').JSX.Element;
package/dist/ui/card.js CHANGED
@@ -2,8 +2,11 @@ import { cn as e } from "../shared-utils.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  // src/ui/card.tsx
4
4
  function n({ ref: n, className: r, ...i }) {
5
+ let a = i.onClick !== void 0 || i.role === "button" || i.role === "link";
5
6
  return /* @__PURE__ */ t("div", {
6
7
  ref: n,
8
+ "data-slot": "card",
9
+ "data-interactive": a ? "" : void 0,
7
10
  className: e("rounded-card border border-border-subtle bg-bg-surface text-text-primary shadow-elevation-1 transition-all duration-200 ease-[var(--motion-easing-out)] hover:border-border-strong hover:shadow-elevation-2", r),
8
11
  ...i
9
12
  });
@@ -11,6 +14,7 @@ function n({ ref: n, className: r, ...i }) {
11
14
  function r({ ref: n, className: r, ...i }) {
12
15
  return /* @__PURE__ */ t("div", {
13
16
  ref: n,
17
+ "data-slot": "card-header",
14
18
  className: e("flex flex-col space-y-1.5 p-6", r),
15
19
  ...i
16
20
  });
@@ -18,6 +22,7 @@ function r({ ref: n, className: r, ...i }) {
18
22
  function i({ ref: n, className: r, ...i }) {
19
23
  return /* @__PURE__ */ t("h3", {
20
24
  ref: n,
25
+ "data-slot": "card-title",
21
26
  className: e("text-lg font-semibold leading-tight tracking-tight text-text-primary", r),
22
27
  ...i
23
28
  });
@@ -25,6 +30,7 @@ function i({ ref: n, className: r, ...i }) {
25
30
  function a({ ref: n, className: r, ...i }) {
26
31
  return /* @__PURE__ */ t("p", {
27
32
  ref: n,
33
+ "data-slot": "card-description",
28
34
  className: e("text-sm text-text-secondary", r),
29
35
  ...i
30
36
  });
@@ -32,6 +38,7 @@ function a({ ref: n, className: r, ...i }) {
32
38
  function o({ ref: n, className: r, ...i }) {
33
39
  return /* @__PURE__ */ t("div", {
34
40
  ref: n,
41
+ "data-slot": "card-content",
35
42
  className: e("p-6 pt-0", r),
36
43
  ...i
37
44
  });
@@ -39,6 +46,7 @@ function o({ ref: n, className: r, ...i }) {
39
46
  function s({ ref: n, className: r, ...i }) {
40
47
  return /* @__PURE__ */ t("div", {
41
48
  ref: n,
49
+ "data-slot": "card-footer",
42
50
  className: e("flex items-center p-6 pt-0", r),
43
51
  ...i
44
52
  });
@@ -4,6 +4,7 @@ import { jsx as t } from "react/jsx-runtime";
4
4
  function n({ ref: n, className: r, children: i, ...a }) {
5
5
  return /* @__PURE__ */ t("div", {
6
6
  ref: n,
7
+ "data-slot": "emphasis-panel",
7
8
  className: e("rounded-card border border-border-seam bg-accent-wash p-6 text-text-primary", r),
8
9
  ...a,
9
10
  children: i
@@ -12,18 +12,22 @@ function i({ icon: i = /* @__PURE__ */ n(t, {
12
12
  className: e("flex flex-col items-center justify-center text-center", l ? "py-6 px-4" : "py-12 px-4", u),
13
13
  children: [
14
14
  i === null ? null : /* @__PURE__ */ n("div", {
15
+ "data-slot": "empty-state-icon",
15
16
  className: e("flex items-center justify-center rounded-full bg-[var(--color-accent-soft)]", l ? "size-12 mb-3" : "size-14 mb-4"),
16
17
  children: i
17
18
  }),
18
19
  /* @__PURE__ */ n("h3", {
20
+ "data-slot": "empty-state-title",
19
21
  className: "text-base font-semibold text-text-primary mb-1",
20
22
  children: a
21
23
  }),
22
24
  o ? /* @__PURE__ */ n("p", {
25
+ "data-slot": "empty-state-description",
23
26
  className: "text-sm text-text-secondary max-w-md mb-4",
24
27
  children: o
25
28
  }) : null,
26
29
  s || c ? /* @__PURE__ */ r("div", {
30
+ "data-slot": "empty-state-actions",
27
31
  className: "mt-1 flex flex-col-reverse gap-2 sm:flex-row sm:items-center sm:justify-center",
28
32
  children: [c, s]
29
33
  }) : null
@@ -9,6 +9,15 @@ import { VariantProps } from 'class-variance-authority';
9
9
  * intensifies the shadow/border (a calm highlight) — it never translates,
10
10
  * scales, or removes the resting shadow. Reduced-motion / high-contrast
11
11
  * collapse the glass + glow via the underlying tokens.
12
+ *
13
+ * One opt-in exception (BOFF-14994): under the FluidGrids depth layer
14
+ * (`<html data-depth="rich">`, shared/tokens/depth.css) a clickable card
15
+ * (`data-interactive`, or the role of a button or link) lifts 2 px under the
16
+ * pointer. Reduced motion (the OS setting or `data-reduce-motion`) keeps it still,
17
+ * and every other product renders exactly as described above.
18
+ *
19
+ * Hooks for that layer, which change no style on their own: `data-slot="glass-card"`,
20
+ * `data-treatment`, `data-glow` and `data-interactive`.
12
21
  */
13
22
  declare const glassCardVariants: (props?: ({
14
23
  treatment?: "metric" | "glass" | "plain" | "insight" | null | undefined;
@@ -12,8 +12,13 @@ var r = n("relative rounded-card text-text-primary transition-[box-shadow,border
12
12
  defaultVariants: { treatment: "plain" }
13
13
  });
14
14
  function i({ ref: n, className: i, treatment: a = "plain", glow: o = !1, children: s, ...c }) {
15
+ let l = c.onClick !== void 0 || c.role === "button" || c.role === "link";
15
16
  return /* @__PURE__ */ t("div", {
16
17
  ref: n,
18
+ "data-slot": "glass-card",
19
+ "data-treatment": a ?? void 0,
20
+ "data-glow": o ? "" : void 0,
21
+ "data-interactive": l ? "" : void 0,
17
22
  className: e(r({ treatment: a }), o && "border-[color-mix(in_oklab,var(--color-action-primary-bg)_34%,transparent)] shadow-[var(--shadow-glow)]", i),
18
23
  ...c,
19
24
  children: /* @__PURE__ */ t("div", {
@@ -0,0 +1,19 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { HTMLAttributes } from 'react';
3
+ /**
4
+ * IconTile — a small rounded tile that holds one icon on the accent's soft tint: the mark of a
5
+ * workspace, a stat or a feature. Pass the icon as the only child.
6
+ *
7
+ * `data-slot="icon-tile"` is the hook an opt-in layer styles: the FluidGrids depth layer
8
+ * (shared/tokens/depth.css, BOFF-14994) paints the tile with the accent glow and the icon in
9
+ * `--boff-on-glow`. On its own the hook changes nothing, so a hand-drawn tile in module code
10
+ * can move to IconTile without a visual change.
11
+ */
12
+ declare const iconTileVariants: (props?: ({
13
+ size?: "sm" | "lg" | "md" | null | undefined;
14
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
15
+ export interface IconTileProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof iconTileVariants> {
16
+ ref?: React.Ref<HTMLSpanElement>;
17
+ }
18
+ declare function IconTile({ ref, className, size, ...props }: IconTileProps): import('react').JSX.Element;
19
+ export { IconTile };
@@ -0,0 +1,21 @@
1
+ import { cn as e } from "../shared-utils.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { cva as n } from "class-variance-authority";
4
+ // src/ui/icon-tile.tsx
5
+ var r = n("inline-flex shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-[var(--color-accent-primary)]", {
6
+ variants: { size: {
7
+ sm: "size-8 [&>svg]:size-4",
8
+ md: "size-10 [&>svg]:size-5",
9
+ lg: "size-12 [&>svg]:size-6"
10
+ } },
11
+ defaultVariants: { size: "md" }
12
+ });
13
+ function i({ ref: n, className: i, size: a, ...o }) {
14
+ return /* @__PURE__ */ t("span", {
15
+ ref: n,
16
+ "data-slot": "icon-tile",
17
+ className: e(r({ size: a }), i),
18
+ ...o
19
+ });
20
+ }
21
+ export { i as IconTile };