@meetreeve/ui 0.30.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -2
- package/dist/console/index.d.mts +51 -3
- package/dist/console/index.d.ts +51 -3
- package/dist/console/index.js +64 -2
- package/dist/console/index.mjs +63 -2
- package/dist/index.d.mts +51 -13
- package/dist/index.d.ts +51 -13
- package/dist/index.js +357 -225
- package/dist/index.mjs +262 -130
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,6 +95,7 @@ An optional compact list above the pages, e.g. recent chats. Rows are buttons: s
|
|
|
95
95
|
moreHref: "/chats", // optional; "More" shows when items exceed `limit` or `hasMore`
|
|
96
96
|
hasMore,
|
|
97
97
|
// label: "Recent", limit: 6 (defaults)
|
|
98
|
+
// href: "/chats", // optional (DEV-19583): the heading becomes a link there
|
|
98
99
|
}}
|
|
99
100
|
/>
|
|
100
101
|
```
|
|
@@ -105,6 +106,33 @@ The list sits between `topItem` and the pages, outside the measured ladder nav.
|
|
|
105
106
|
|
|
106
107
|
A folded group's row opens a horizontal flyout on hover (desktop) or click (keyboard/touch parity): `aria-expanded` + menu roles, focus moves to the first child on open, Esc closes and returns focus to the trigger. If the active route's module is inside a folded group, the group's own row shows the active state and the flyout highlights the specific child. No open/close transition under `prefers-reduced-motion`.
|
|
107
108
|
|
|
109
|
+
A ladder group can carry its own page (`href`, DEV-19583; an app path starting with one `/`, zod-checked). The row then splits in two: the label is a link through `linkComponent` (click or Enter navigates, hover still opens the panel) and a chevron button beside it is the disclosure (Enter/Space/click, focus to the first child, Esc back to the chevron). The group is also active on its own href. On the collapsed icon rail the row stays one button and the panel's first row links to the group's page. Without `href` the row is the single button it always was.
|
|
110
|
+
|
|
111
|
+
## Settings list: SettingsSection / SettingsRow (DEV-19017)
|
|
112
|
+
|
|
113
|
+
Server-safe, on `@meetreeve/ui/console`, built on the console `Panel`:
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
import { SettingsSection, SettingsRow, SettingsStatus } from "@meetreeve/ui/console";
|
|
117
|
+
import { InfoTip, RowActions } from "@meetreeve/ui";
|
|
118
|
+
|
|
119
|
+
<SettingsSection title="Ad accounts" info={<InfoTip label="About ad accounts">Shared with everyone who can use Company data.</InfoTip>}>
|
|
120
|
+
<SettingsRow
|
|
121
|
+
logo={<img src="/integrations/meta.svg" alt="" />}
|
|
122
|
+
name="Meta Ads"
|
|
123
|
+
info={<InfoTip label="Meta Ads details">Account act_123 · checked 10:02</InfoTip>}
|
|
124
|
+
status={<SettingsStatus tone="ok" label="Connected" />}
|
|
125
|
+
action={<RowActions items={[{ id: "disconnect", label: "Disconnect", destructive: true, onSelect: disconnect }]} />}
|
|
126
|
+
/>
|
|
127
|
+
</SettingsSection>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
- One fact per row, one action (a quiet ⋯ may sit beside it). IDs, timestamps
|
|
131
|
+
and how-it-works go in the `info` InfoTip; errors, broken-connection alerts
|
|
132
|
+
and forms go in `children`, under the row, never in a hover.
|
|
133
|
+
- The section grid and the status word are container queries, so the host's
|
|
134
|
+
Tailwind must scan this package's dist (see ResponsiveHeader below).
|
|
135
|
+
|
|
108
136
|
## ResponsiveHeader
|
|
109
137
|
|
|
110
138
|
```tsx
|
|
@@ -280,11 +308,23 @@ clips gets no clip and no 404.
|
|
|
280
308
|
(`aspect-video`) with `object-contain`, so a clip of another shape
|
|
281
309
|
letterboxes instead of cropping. Border and background are the paired
|
|
282
310
|
`border-border bg-muted` tokens.
|
|
311
|
+
- While it can play, a corner toggle pauses and resumes it (DEV-19403).
|
|
283
312
|
- `prefers-reduced-motion` never starts playback, including on the first
|
|
284
313
|
client render after SSR, and turning it on mid-loop pauses the clip. The
|
|
285
|
-
poster and
|
|
314
|
+
poster shows and the toggle offers Play, so it plays only when asked
|
|
315
|
+
(DEV-19583).
|
|
286
316
|
- If the browser refuses autoplay (iOS Low Power Mode), native controls
|
|
287
|
-
|
|
317
|
+
replace the toggle until a later `play()` succeeds.
|
|
318
|
+
|
|
319
|
+
Card mode (DEV-19583), same files:
|
|
320
|
+
|
|
321
|
+
- `fit="cover"` crops to fill the 16:9 box (default `"contain"`).
|
|
322
|
+
- `playWhenVisible` attaches the sources only once a quarter of the clip is
|
|
323
|
+
on screen, so off-screen clips download nothing but the poster; it plays
|
|
324
|
+
only while visible and pauses when it leaves.
|
|
325
|
+
- `overlay` paints a node over the frame (e.g. a title on a dark fade); clicks
|
|
326
|
+
pass through it.
|
|
327
|
+
- `posterOnly` renders just the poster `<img>`, with no video or sources.
|
|
288
328
|
|
|
289
329
|
`usePrefersReducedMotion()` is the live OS setting it reads. It is exported
|
|
290
330
|
from the package root and, as before, from `@meetreeve/ui/charts`.
|
package/dist/console/index.d.mts
CHANGED
|
@@ -22,13 +22,61 @@ declare function PageHeader({ eyebrow, title, description, action, }: {
|
|
|
22
22
|
description?: string;
|
|
23
23
|
action?: ReactNode;
|
|
24
24
|
}): react.JSX.Element;
|
|
25
|
-
/** Hairline surface (no heavy card/shadow). Optional titled header row.
|
|
26
|
-
|
|
25
|
+
/** Hairline surface (no heavy card/shadow). Optional titled header row.
|
|
26
|
+
* `bodyClassName` merges over the body's `p-5` (SettingsSection passes
|
|
27
|
+
* `p-0 divide-y` so its rows run edge to edge). */
|
|
28
|
+
declare function Panel({ title, hint, children, className, bodyClassName, }: {
|
|
27
29
|
title?: string;
|
|
28
30
|
hint?: string;
|
|
29
31
|
children: ReactNode;
|
|
30
32
|
className?: string;
|
|
33
|
+
bodyClassName?: string;
|
|
31
34
|
}): react.JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* Shopify-Settings section (DEV-19017): title and at most one short line on
|
|
37
|
+
* the left, one Panel of divide-y rows on the right. The 240px | rest grid is
|
|
38
|
+
* a container query, so the section stacks wherever it is narrow (a phone, or
|
|
39
|
+
* one column of a card grid), not only on a narrow viewport.
|
|
40
|
+
*/
|
|
41
|
+
declare function SettingsSection({ title, description, info, children, className, id, }: {
|
|
42
|
+
title: string;
|
|
43
|
+
/** At most one short line. Caveats and how-it-works belong in `info`. */
|
|
44
|
+
description?: string;
|
|
45
|
+
/** An InfoTip (or any trigger) shown beside the title. A slot, not a
|
|
46
|
+
* built-in, so this entry stays server-safe. */
|
|
47
|
+
info?: ReactNode;
|
|
48
|
+
children: ReactNode;
|
|
49
|
+
className?: string;
|
|
50
|
+
id?: string;
|
|
51
|
+
}): react.JSX.Element;
|
|
52
|
+
type SettingsStatusTone = "ok" | "off" | "warn";
|
|
53
|
+
/**
|
|
54
|
+
* A row's status: an icon (check / X / alert) plus a word, never a pill. The
|
|
55
|
+
* word hides visually below a 24rem row (it stays the icon's accessible name),
|
|
56
|
+
* so a narrow row keeps its icon and its button on one line. role="status"
|
|
57
|
+
* makes a change (Not connected -> Connected) announce politely.
|
|
58
|
+
*/
|
|
59
|
+
declare function SettingsStatus({ tone, label }: {
|
|
60
|
+
tone: SettingsStatusTone;
|
|
61
|
+
label: string;
|
|
62
|
+
}): react.JSX.Element;
|
|
63
|
+
/**
|
|
64
|
+
* One settings row (DEV-19017): min-h-14 px-4 py-3 gap-3, a 24px logo, the
|
|
65
|
+
* name (one line, truncated) with an optional InfoTip, a status and one
|
|
66
|
+
* action. `children` render under the row, aligned with the name: errors,
|
|
67
|
+
* broken-connection alerts and inline forms, which never move into a hover.
|
|
68
|
+
*/
|
|
69
|
+
declare function SettingsRow({ logo, name, info, status, action, children, className, ...rest }: {
|
|
70
|
+
/** 24px: an <img>, a BrandGlyph, an icon. */
|
|
71
|
+
logo?: ReactNode;
|
|
72
|
+
name: ReactNode;
|
|
73
|
+
info?: ReactNode;
|
|
74
|
+
status?: ReactNode;
|
|
75
|
+
/** One button; a quiet RowActions ⋯ may sit beside it. */
|
|
76
|
+
action?: ReactNode;
|
|
77
|
+
children?: ReactNode;
|
|
78
|
+
className?: string;
|
|
79
|
+
} & Omit<ComponentProps<"div">, "children" | "className">): react.JSX.Element;
|
|
32
80
|
declare function EmptyState({ icon: Icon, title, description, action, }: {
|
|
33
81
|
icon?: LucideIcon;
|
|
34
82
|
title: string;
|
|
@@ -62,4 +110,4 @@ declare function CodeBlock({ data }: {
|
|
|
62
110
|
data: unknown;
|
|
63
111
|
}): react.JSX.Element | null;
|
|
64
112
|
|
|
65
|
-
export { Button, CodeBlock, EmptyState, ErrorNote, Field, MonoEyebrow, PageHeader, Panel, StatusNote, TextArea, TextInput, buttonVariants };
|
|
113
|
+
export { Button, CodeBlock, EmptyState, ErrorNote, Field, MonoEyebrow, PageHeader, Panel, SettingsRow, SettingsSection, SettingsStatus, type SettingsStatusTone, StatusNote, TextArea, TextInput, buttonVariants };
|
package/dist/console/index.d.ts
CHANGED
|
@@ -22,13 +22,61 @@ declare function PageHeader({ eyebrow, title, description, action, }: {
|
|
|
22
22
|
description?: string;
|
|
23
23
|
action?: ReactNode;
|
|
24
24
|
}): react.JSX.Element;
|
|
25
|
-
/** Hairline surface (no heavy card/shadow). Optional titled header row.
|
|
26
|
-
|
|
25
|
+
/** Hairline surface (no heavy card/shadow). Optional titled header row.
|
|
26
|
+
* `bodyClassName` merges over the body's `p-5` (SettingsSection passes
|
|
27
|
+
* `p-0 divide-y` so its rows run edge to edge). */
|
|
28
|
+
declare function Panel({ title, hint, children, className, bodyClassName, }: {
|
|
27
29
|
title?: string;
|
|
28
30
|
hint?: string;
|
|
29
31
|
children: ReactNode;
|
|
30
32
|
className?: string;
|
|
33
|
+
bodyClassName?: string;
|
|
31
34
|
}): react.JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* Shopify-Settings section (DEV-19017): title and at most one short line on
|
|
37
|
+
* the left, one Panel of divide-y rows on the right. The 240px | rest grid is
|
|
38
|
+
* a container query, so the section stacks wherever it is narrow (a phone, or
|
|
39
|
+
* one column of a card grid), not only on a narrow viewport.
|
|
40
|
+
*/
|
|
41
|
+
declare function SettingsSection({ title, description, info, children, className, id, }: {
|
|
42
|
+
title: string;
|
|
43
|
+
/** At most one short line. Caveats and how-it-works belong in `info`. */
|
|
44
|
+
description?: string;
|
|
45
|
+
/** An InfoTip (or any trigger) shown beside the title. A slot, not a
|
|
46
|
+
* built-in, so this entry stays server-safe. */
|
|
47
|
+
info?: ReactNode;
|
|
48
|
+
children: ReactNode;
|
|
49
|
+
className?: string;
|
|
50
|
+
id?: string;
|
|
51
|
+
}): react.JSX.Element;
|
|
52
|
+
type SettingsStatusTone = "ok" | "off" | "warn";
|
|
53
|
+
/**
|
|
54
|
+
* A row's status: an icon (check / X / alert) plus a word, never a pill. The
|
|
55
|
+
* word hides visually below a 24rem row (it stays the icon's accessible name),
|
|
56
|
+
* so a narrow row keeps its icon and its button on one line. role="status"
|
|
57
|
+
* makes a change (Not connected -> Connected) announce politely.
|
|
58
|
+
*/
|
|
59
|
+
declare function SettingsStatus({ tone, label }: {
|
|
60
|
+
tone: SettingsStatusTone;
|
|
61
|
+
label: string;
|
|
62
|
+
}): react.JSX.Element;
|
|
63
|
+
/**
|
|
64
|
+
* One settings row (DEV-19017): min-h-14 px-4 py-3 gap-3, a 24px logo, the
|
|
65
|
+
* name (one line, truncated) with an optional InfoTip, a status and one
|
|
66
|
+
* action. `children` render under the row, aligned with the name: errors,
|
|
67
|
+
* broken-connection alerts and inline forms, which never move into a hover.
|
|
68
|
+
*/
|
|
69
|
+
declare function SettingsRow({ logo, name, info, status, action, children, className, ...rest }: {
|
|
70
|
+
/** 24px: an <img>, a BrandGlyph, an icon. */
|
|
71
|
+
logo?: ReactNode;
|
|
72
|
+
name: ReactNode;
|
|
73
|
+
info?: ReactNode;
|
|
74
|
+
status?: ReactNode;
|
|
75
|
+
/** One button; a quiet RowActions ⋯ may sit beside it. */
|
|
76
|
+
action?: ReactNode;
|
|
77
|
+
children?: ReactNode;
|
|
78
|
+
className?: string;
|
|
79
|
+
} & Omit<ComponentProps<"div">, "children" | "className">): react.JSX.Element;
|
|
32
80
|
declare function EmptyState({ icon: Icon, title, description, action, }: {
|
|
33
81
|
icon?: LucideIcon;
|
|
34
82
|
title: string;
|
|
@@ -62,4 +110,4 @@ declare function CodeBlock({ data }: {
|
|
|
62
110
|
data: unknown;
|
|
63
111
|
}): react.JSX.Element | null;
|
|
64
112
|
|
|
65
|
-
export { Button, CodeBlock, EmptyState, ErrorNote, Field, MonoEyebrow, PageHeader, Panel, StatusNote, TextArea, TextInput, buttonVariants };
|
|
113
|
+
export { Button, CodeBlock, EmptyState, ErrorNote, Field, MonoEyebrow, PageHeader, Panel, SettingsRow, SettingsSection, SettingsStatus, type SettingsStatusTone, StatusNote, TextArea, TextInput, buttonVariants };
|
package/dist/console/index.js
CHANGED
|
@@ -28,12 +28,16 @@ __export(console_exports, {
|
|
|
28
28
|
MonoEyebrow: () => MonoEyebrow,
|
|
29
29
|
PageHeader: () => PageHeader,
|
|
30
30
|
Panel: () => Panel,
|
|
31
|
+
SettingsRow: () => SettingsRow,
|
|
32
|
+
SettingsSection: () => SettingsSection,
|
|
33
|
+
SettingsStatus: () => SettingsStatus,
|
|
31
34
|
StatusNote: () => StatusNote,
|
|
32
35
|
TextArea: () => TextArea,
|
|
33
36
|
TextInput: () => TextInput,
|
|
34
37
|
buttonVariants: () => buttonVariants
|
|
35
38
|
});
|
|
36
39
|
module.exports = __toCommonJS(console_exports);
|
|
40
|
+
var import_lucide_react = require("lucide-react");
|
|
37
41
|
|
|
38
42
|
// node_modules/clsx/dist/clsx.mjs
|
|
39
43
|
function r(e) {
|
|
@@ -3434,14 +3438,69 @@ function Panel({
|
|
|
3434
3438
|
title,
|
|
3435
3439
|
hint,
|
|
3436
3440
|
children,
|
|
3437
|
-
className
|
|
3441
|
+
className,
|
|
3442
|
+
bodyClassName
|
|
3438
3443
|
}) {
|
|
3439
3444
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: cn("rounded-xl border border-border bg-card/40", className), children: [
|
|
3440
3445
|
title ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center justify-between gap-4 border-b border-border px-5 py-3.5", children: [
|
|
3441
3446
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { className: "text-sm font-medium tracking-tight", children: title }),
|
|
3442
3447
|
hint ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MonoEyebrow, { children: hint }) : null
|
|
3443
3448
|
] }) : null,
|
|
3444
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "p-5", children })
|
|
3449
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cn("p-5", bodyClassName), children })
|
|
3450
|
+
] });
|
|
3451
|
+
}
|
|
3452
|
+
function SettingsSection({
|
|
3453
|
+
title,
|
|
3454
|
+
description,
|
|
3455
|
+
info,
|
|
3456
|
+
children,
|
|
3457
|
+
className,
|
|
3458
|
+
id
|
|
3459
|
+
}) {
|
|
3460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("section", { id, className: cn("@container border-t border-border py-6", className), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "grid gap-4 @3xl:grid-cols-[240px_minmax(0,1fr)] @3xl:gap-6", children: [
|
|
3461
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "min-w-0 space-y-1", children: [
|
|
3462
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("h2", { className: "flex items-center gap-1 text-sm font-medium tracking-tight", children: [
|
|
3463
|
+
title,
|
|
3464
|
+
info
|
|
3465
|
+
] }),
|
|
3466
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-xs text-muted-foreground", children: description }) : null
|
|
3467
|
+
] }),
|
|
3468
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Panel, { className: "min-w-0", bodyClassName: "divide-y divide-border p-0", children })
|
|
3469
|
+
] }) });
|
|
3470
|
+
}
|
|
3471
|
+
var STATUS_TONE = {
|
|
3472
|
+
ok: { Icon: import_lucide_react.CircleCheck, className: "text-success" },
|
|
3473
|
+
off: { Icon: import_lucide_react.CircleX, className: "text-destructive" },
|
|
3474
|
+
warn: { Icon: import_lucide_react.CircleAlert, className: "text-warning" }
|
|
3475
|
+
};
|
|
3476
|
+
function SettingsStatus({ tone, label }) {
|
|
3477
|
+
const { Icon, className } = STATUS_TONE[tone];
|
|
3478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { "data-slot": "settings-status", "data-tone": tone, role: "status", className: cn("inline-flex items-center gap-1 text-xs", className), children: [
|
|
3479
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { "aria-hidden": "true", className: "size-4 shrink-0" }),
|
|
3480
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "sr-only text-muted-foreground @sm:not-sr-only", children: label })
|
|
3481
|
+
] });
|
|
3482
|
+
}
|
|
3483
|
+
function SettingsRow({
|
|
3484
|
+
logo,
|
|
3485
|
+
name,
|
|
3486
|
+
info,
|
|
3487
|
+
status,
|
|
3488
|
+
action,
|
|
3489
|
+
children,
|
|
3490
|
+
className,
|
|
3491
|
+
...rest
|
|
3492
|
+
}) {
|
|
3493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { ...rest, className: cn("@container flex min-h-14 flex-col justify-center gap-2 px-4 py-3", className), children: [
|
|
3494
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
3495
|
+
logo ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-hidden": "true", className: "flex size-6 shrink-0 items-center justify-center overflow-hidden [&>img]:size-6 [&>img]:object-contain", children: logo }) : null,
|
|
3496
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-1", children: [
|
|
3497
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate text-sm font-medium", children: name }),
|
|
3498
|
+
info
|
|
3499
|
+
] }),
|
|
3500
|
+
status ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "shrink-0", children: status }) : null,
|
|
3501
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex shrink-0 items-center gap-1", children: action }) : null
|
|
3502
|
+
] }),
|
|
3503
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cn("min-w-0 space-y-2 text-xs empty:hidden", logo ? "pl-9" : null), children }) : null
|
|
3445
3504
|
] });
|
|
3446
3505
|
}
|
|
3447
3506
|
function EmptyState({
|
|
@@ -3521,6 +3580,9 @@ function CodeBlock({ data }) {
|
|
|
3521
3580
|
MonoEyebrow,
|
|
3522
3581
|
PageHeader,
|
|
3523
3582
|
Panel,
|
|
3583
|
+
SettingsRow,
|
|
3584
|
+
SettingsSection,
|
|
3585
|
+
SettingsStatus,
|
|
3524
3586
|
StatusNote,
|
|
3525
3587
|
TextArea,
|
|
3526
3588
|
TextInput,
|
package/dist/console/index.mjs
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/console/index.tsx
|
|
2
|
+
import { CircleAlert, CircleCheck, CircleX } from "lucide-react";
|
|
3
|
+
|
|
1
4
|
// node_modules/clsx/dist/clsx.mjs
|
|
2
5
|
function r(e) {
|
|
3
6
|
var t, f, n = "";
|
|
@@ -3397,14 +3400,69 @@ function Panel({
|
|
|
3397
3400
|
title,
|
|
3398
3401
|
hint,
|
|
3399
3402
|
children,
|
|
3400
|
-
className
|
|
3403
|
+
className,
|
|
3404
|
+
bodyClassName
|
|
3401
3405
|
}) {
|
|
3402
3406
|
return /* @__PURE__ */ jsxs("section", { className: cn("rounded-xl border border-border bg-card/40", className), children: [
|
|
3403
3407
|
title ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4 border-b border-border px-5 py-3.5", children: [
|
|
3404
3408
|
/* @__PURE__ */ jsx2("h2", { className: "text-sm font-medium tracking-tight", children: title }),
|
|
3405
3409
|
hint ? /* @__PURE__ */ jsx2(MonoEyebrow, { children: hint }) : null
|
|
3406
3410
|
] }) : null,
|
|
3407
|
-
/* @__PURE__ */ jsx2("div", { className: "p-5", children })
|
|
3411
|
+
/* @__PURE__ */ jsx2("div", { className: cn("p-5", bodyClassName), children })
|
|
3412
|
+
] });
|
|
3413
|
+
}
|
|
3414
|
+
function SettingsSection({
|
|
3415
|
+
title,
|
|
3416
|
+
description,
|
|
3417
|
+
info,
|
|
3418
|
+
children,
|
|
3419
|
+
className,
|
|
3420
|
+
id
|
|
3421
|
+
}) {
|
|
3422
|
+
return /* @__PURE__ */ jsx2("section", { id, className: cn("@container border-t border-border py-6", className), children: /* @__PURE__ */ jsxs("div", { className: "grid gap-4 @3xl:grid-cols-[240px_minmax(0,1fr)] @3xl:gap-6", children: [
|
|
3423
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-1", children: [
|
|
3424
|
+
/* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-1 text-sm font-medium tracking-tight", children: [
|
|
3425
|
+
title,
|
|
3426
|
+
info
|
|
3427
|
+
] }),
|
|
3428
|
+
description ? /* @__PURE__ */ jsx2("p", { className: "text-xs text-muted-foreground", children: description }) : null
|
|
3429
|
+
] }),
|
|
3430
|
+
/* @__PURE__ */ jsx2(Panel, { className: "min-w-0", bodyClassName: "divide-y divide-border p-0", children })
|
|
3431
|
+
] }) });
|
|
3432
|
+
}
|
|
3433
|
+
var STATUS_TONE = {
|
|
3434
|
+
ok: { Icon: CircleCheck, className: "text-success" },
|
|
3435
|
+
off: { Icon: CircleX, className: "text-destructive" },
|
|
3436
|
+
warn: { Icon: CircleAlert, className: "text-warning" }
|
|
3437
|
+
};
|
|
3438
|
+
function SettingsStatus({ tone, label }) {
|
|
3439
|
+
const { Icon, className } = STATUS_TONE[tone];
|
|
3440
|
+
return /* @__PURE__ */ jsxs("span", { "data-slot": "settings-status", "data-tone": tone, role: "status", className: cn("inline-flex items-center gap-1 text-xs", className), children: [
|
|
3441
|
+
/* @__PURE__ */ jsx2(Icon, { "aria-hidden": "true", className: "size-4 shrink-0" }),
|
|
3442
|
+
/* @__PURE__ */ jsx2("span", { className: "sr-only text-muted-foreground @sm:not-sr-only", children: label })
|
|
3443
|
+
] });
|
|
3444
|
+
}
|
|
3445
|
+
function SettingsRow({
|
|
3446
|
+
logo,
|
|
3447
|
+
name,
|
|
3448
|
+
info,
|
|
3449
|
+
status,
|
|
3450
|
+
action,
|
|
3451
|
+
children,
|
|
3452
|
+
className,
|
|
3453
|
+
...rest
|
|
3454
|
+
}) {
|
|
3455
|
+
return /* @__PURE__ */ jsxs("div", { ...rest, className: cn("@container flex min-h-14 flex-col justify-center gap-2 px-4 py-3", className), children: [
|
|
3456
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
3457
|
+
logo ? /* @__PURE__ */ jsx2("span", { "aria-hidden": "true", className: "flex size-6 shrink-0 items-center justify-center overflow-hidden [&>img]:size-6 [&>img]:object-contain", children: logo }) : null,
|
|
3458
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-1", children: [
|
|
3459
|
+
/* @__PURE__ */ jsx2("span", { className: "truncate text-sm font-medium", children: name }),
|
|
3460
|
+
info
|
|
3461
|
+
] }),
|
|
3462
|
+
status ? /* @__PURE__ */ jsx2("span", { className: "shrink-0", children: status }) : null,
|
|
3463
|
+
action ? /* @__PURE__ */ jsx2("div", { className: "flex shrink-0 items-center gap-1", children: action }) : null
|
|
3464
|
+
] }),
|
|
3465
|
+
children ? /* @__PURE__ */ jsx2("div", { className: cn("min-w-0 space-y-2 text-xs empty:hidden", logo ? "pl-9" : null), children }) : null
|
|
3408
3466
|
] });
|
|
3409
3467
|
}
|
|
3410
3468
|
function EmptyState({
|
|
@@ -3483,6 +3541,9 @@ export {
|
|
|
3483
3541
|
MonoEyebrow,
|
|
3484
3542
|
PageHeader,
|
|
3485
3543
|
Panel,
|
|
3544
|
+
SettingsRow,
|
|
3545
|
+
SettingsSection,
|
|
3546
|
+
SettingsStatus,
|
|
3486
3547
|
StatusNote,
|
|
3487
3548
|
TextArea,
|
|
3488
3549
|
TextInput,
|
package/dist/index.d.mts
CHANGED
|
@@ -212,17 +212,19 @@ declare function useResponsivePlaceholder(desktop: string, mobile?: string): str
|
|
|
212
212
|
* looping seconds of the other app's screen, shown where a step sends someone
|
|
213
213
|
* there. Generalised from the Docs share strip's ShareClip (DEV-18388).
|
|
214
214
|
*
|
|
215
|
-
* Muted and looping
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
215
|
+
* Muted and looping. A corner toggle pauses and resumes it (DEV-19403, WCAG
|
|
216
|
+
* 2.2.2). Reduced motion never starts it (and turning it on mid-loop pauses
|
|
217
|
+
* it): the poster shows and the toggle offers Play, so it plays only when the
|
|
218
|
+
* viewer asks (DEV-19583). A browser that refuses autoplay (iOS Low Power
|
|
219
|
+
* Mode) gets the native controls instead of the toggle, until a later play()
|
|
220
|
+
* succeeds, so there is never a second set. A browser whose play() returns no
|
|
221
|
+
* promise (or has no play()) is judged by whether the clip actually left the
|
|
222
|
+
* paused state. A pause made with the toggle outlasts a reduced-motion change
|
|
223
|
+
* and a scroll away, but not a new clip.
|
|
221
224
|
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
* change but not a new clip.
|
|
225
|
+
* Card mode (DEV-19583): `fit`, `overlay`, `playWhenVisible` (no download and
|
|
226
|
+
* no playback until the clip is on screen) and `posterOnly` (the poster image,
|
|
227
|
+
* no video at all).
|
|
226
228
|
*/
|
|
227
229
|
interface HowToClipProps {
|
|
228
230
|
/** File stem: `${clipBaseUrl}/${slug}.webm|.mp4` and `${clipBaseUrl}/${slug}-poster.jpg`. Must match /^[a-z0-9-]{1,64}$/ or nothing renders. */
|
|
@@ -231,9 +233,21 @@ interface HowToClipProps {
|
|
|
231
233
|
label: string;
|
|
232
234
|
/** Where the clip files are served from, e.g. "/how-to" or "https://cdn.example/how-to" (no query or hash). Omitted or blank → renders null. A trailing slash is dropped. */
|
|
233
235
|
clipBaseUrl?: string;
|
|
236
|
+
/** How the frame fills the 16:9 box: `"contain"` (default) letterboxes, `"cover"` crops to fill, for cards. */
|
|
237
|
+
fit?: "contain" | "cover";
|
|
238
|
+
/**
|
|
239
|
+
* Attach the sources only once a quarter of the clip is first on screen
|
|
240
|
+
* (an off-screen clip downloads nothing but its poster), then play only
|
|
241
|
+
* while it stays that visible and pause when it leaves.
|
|
242
|
+
*/
|
|
243
|
+
playWhenVisible?: boolean;
|
|
244
|
+
/** Painted over the frame, inside its rounded box (e.g. a title on a dark fade). Clicks pass through it. */
|
|
245
|
+
overlay?: ReactNode;
|
|
246
|
+
/** Only the poster, as an image named by `label`: no video, no sources, no toggle. */
|
|
247
|
+
posterOnly?: boolean;
|
|
234
248
|
className?: string;
|
|
235
249
|
}
|
|
236
|
-
declare function HowToClip({ slug, label, clipBaseUrl, className }: HowToClipProps): react.JSX.Element | null;
|
|
250
|
+
declare function HowToClip({ slug, label, clipBaseUrl, fit, playWhenVisible, overlay, posterOnly, className, }: HowToClipProps): react.JSX.Element | null;
|
|
237
251
|
|
|
238
252
|
interface SiteFooterLink {
|
|
239
253
|
href: string;
|
|
@@ -328,6 +342,11 @@ interface GroupRungItem {
|
|
|
328
342
|
icon: string;
|
|
329
343
|
/** moduleIds folded into this group. Non-empty (zod-enforced). */
|
|
330
344
|
children: string[];
|
|
345
|
+
/** DEV-19583: the group's own page — an app path ("/explore"), never another
|
|
346
|
+
* origin: zod rejects anything not starting with one "/", and any
|
|
347
|
+
* backslash, whitespace or control character (browsers fold those into "//").
|
|
348
|
+
* Set, the group's label links there and the row is active on it too. */
|
|
349
|
+
href?: string;
|
|
331
350
|
}
|
|
332
351
|
type RungItem = AppRungItem | GroupRungItem;
|
|
333
352
|
interface SidebarRung {
|
|
@@ -367,6 +386,7 @@ declare const zSidebarLadder: z.ZodObject<{
|
|
|
367
386
|
label: z.ZodString;
|
|
368
387
|
icon: z.ZodString;
|
|
369
388
|
children: z.ZodArray<z.ZodString>;
|
|
389
|
+
href: z.ZodOptional<z.ZodString>;
|
|
370
390
|
}, z.core.$strip>], "type">>;
|
|
371
391
|
}, z.core.$strip>>;
|
|
372
392
|
}, z.core.$strip>;
|
|
@@ -433,6 +453,9 @@ interface AppSidebarRecent {
|
|
|
433
453
|
onSelect: (id: string) => void;
|
|
434
454
|
/** Section heading. Default `"Recent"`. */
|
|
435
455
|
label?: string;
|
|
456
|
+
/** DEV-19583: where the heading goes (e.g. the full chats page). Set, the
|
|
457
|
+
* heading renders as a link through `linkComponent`, same text and id. */
|
|
458
|
+
href?: string;
|
|
436
459
|
/** Rows shown before "More". Default 6; floored to a whole number >= 1, and a non-finite value uses the default. */
|
|
437
460
|
limit?: number;
|
|
438
461
|
/** Where "More" goes (rendered through `linkComponent`). No href, no More. */
|
|
@@ -598,7 +621,22 @@ interface FlyoutProps {
|
|
|
598
621
|
active: boolean;
|
|
599
622
|
children: FlyoutChild[];
|
|
600
623
|
/**
|
|
601
|
-
*
|
|
624
|
+
* DEV-19583: the group's own page. Set, the label becomes a link to it
|
|
625
|
+
* (through `linkComponent`), so a click or Enter navigates while hover
|
|
626
|
+
* still opens the panel; a separate chevron button beside it is the
|
|
627
|
+
* disclosure (`aria-expanded`, Enter/Space/click toggle the panel, Esc
|
|
628
|
+
* closes it and returns focus to the chevron). Omitted, the row is the
|
|
629
|
+
* single disclosure button it always was, markup unchanged.
|
|
630
|
+
*
|
|
631
|
+
* On the `collapsed` rail there is no room for two controls, so the row
|
|
632
|
+
* stays the single icon button and the panel opens with a first row
|
|
633
|
+
* linking to `href`, named by `label`.
|
|
634
|
+
*/
|
|
635
|
+
href?: string;
|
|
636
|
+
/** DEV-19583: the current page is `href` itself (not a child), so its link carries `aria-current="page"`. */
|
|
637
|
+
hrefActive?: boolean;
|
|
638
|
+
/**
|
|
639
|
+
* Link renderer for the panel's child rows (and the `href` label). Defaults to a bare `"a"` so
|
|
602
640
|
* the package stays framework-agnostic; consumers pass their router's
|
|
603
641
|
* link (e.g. `next/link`) for client-side navigation. Flyout is
|
|
604
642
|
* independently exported (see src/index.ts), so it carries its own copy
|
|
@@ -672,7 +710,7 @@ interface FlyoutProps {
|
|
|
672
710
|
* than working around it. jsdom never computes real scrollable-overflow
|
|
673
711
|
* geometry, so no unit test caught this — only an actual browser render did.
|
|
674
712
|
*/
|
|
675
|
-
declare function Flyout({ label, icon, active, children, linkComponent, collapsed, onOpenChange, forceClosed, hoverOpenDelayMs, className, }: FlyoutProps): react.JSX.Element;
|
|
713
|
+
declare function Flyout({ label, icon, active, children, href, hrefActive, linkComponent, collapsed, onOpenChange, forceClosed, hoverOpenDelayMs, className, }: FlyoutProps): react.JSX.Element;
|
|
676
714
|
|
|
677
715
|
/**
|
|
678
716
|
* ContextSwitcher (DEV-4408) — promoted out of reeve-frontend's
|
package/dist/index.d.ts
CHANGED
|
@@ -212,17 +212,19 @@ declare function useResponsivePlaceholder(desktop: string, mobile?: string): str
|
|
|
212
212
|
* looping seconds of the other app's screen, shown where a step sends someone
|
|
213
213
|
* there. Generalised from the Docs share strip's ShareClip (DEV-18388).
|
|
214
214
|
*
|
|
215
|
-
* Muted and looping
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
215
|
+
* Muted and looping. A corner toggle pauses and resumes it (DEV-19403, WCAG
|
|
216
|
+
* 2.2.2). Reduced motion never starts it (and turning it on mid-loop pauses
|
|
217
|
+
* it): the poster shows and the toggle offers Play, so it plays only when the
|
|
218
|
+
* viewer asks (DEV-19583). A browser that refuses autoplay (iOS Low Power
|
|
219
|
+
* Mode) gets the native controls instead of the toggle, until a later play()
|
|
220
|
+
* succeeds, so there is never a second set. A browser whose play() returns no
|
|
221
|
+
* promise (or has no play()) is judged by whether the clip actually left the
|
|
222
|
+
* paused state. A pause made with the toggle outlasts a reduced-motion change
|
|
223
|
+
* and a scroll away, but not a new clip.
|
|
221
224
|
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
* change but not a new clip.
|
|
225
|
+
* Card mode (DEV-19583): `fit`, `overlay`, `playWhenVisible` (no download and
|
|
226
|
+
* no playback until the clip is on screen) and `posterOnly` (the poster image,
|
|
227
|
+
* no video at all).
|
|
226
228
|
*/
|
|
227
229
|
interface HowToClipProps {
|
|
228
230
|
/** File stem: `${clipBaseUrl}/${slug}.webm|.mp4` and `${clipBaseUrl}/${slug}-poster.jpg`. Must match /^[a-z0-9-]{1,64}$/ or nothing renders. */
|
|
@@ -231,9 +233,21 @@ interface HowToClipProps {
|
|
|
231
233
|
label: string;
|
|
232
234
|
/** Where the clip files are served from, e.g. "/how-to" or "https://cdn.example/how-to" (no query or hash). Omitted or blank → renders null. A trailing slash is dropped. */
|
|
233
235
|
clipBaseUrl?: string;
|
|
236
|
+
/** How the frame fills the 16:9 box: `"contain"` (default) letterboxes, `"cover"` crops to fill, for cards. */
|
|
237
|
+
fit?: "contain" | "cover";
|
|
238
|
+
/**
|
|
239
|
+
* Attach the sources only once a quarter of the clip is first on screen
|
|
240
|
+
* (an off-screen clip downloads nothing but its poster), then play only
|
|
241
|
+
* while it stays that visible and pause when it leaves.
|
|
242
|
+
*/
|
|
243
|
+
playWhenVisible?: boolean;
|
|
244
|
+
/** Painted over the frame, inside its rounded box (e.g. a title on a dark fade). Clicks pass through it. */
|
|
245
|
+
overlay?: ReactNode;
|
|
246
|
+
/** Only the poster, as an image named by `label`: no video, no sources, no toggle. */
|
|
247
|
+
posterOnly?: boolean;
|
|
234
248
|
className?: string;
|
|
235
249
|
}
|
|
236
|
-
declare function HowToClip({ slug, label, clipBaseUrl, className }: HowToClipProps): react.JSX.Element | null;
|
|
250
|
+
declare function HowToClip({ slug, label, clipBaseUrl, fit, playWhenVisible, overlay, posterOnly, className, }: HowToClipProps): react.JSX.Element | null;
|
|
237
251
|
|
|
238
252
|
interface SiteFooterLink {
|
|
239
253
|
href: string;
|
|
@@ -328,6 +342,11 @@ interface GroupRungItem {
|
|
|
328
342
|
icon: string;
|
|
329
343
|
/** moduleIds folded into this group. Non-empty (zod-enforced). */
|
|
330
344
|
children: string[];
|
|
345
|
+
/** DEV-19583: the group's own page — an app path ("/explore"), never another
|
|
346
|
+
* origin: zod rejects anything not starting with one "/", and any
|
|
347
|
+
* backslash, whitespace or control character (browsers fold those into "//").
|
|
348
|
+
* Set, the group's label links there and the row is active on it too. */
|
|
349
|
+
href?: string;
|
|
331
350
|
}
|
|
332
351
|
type RungItem = AppRungItem | GroupRungItem;
|
|
333
352
|
interface SidebarRung {
|
|
@@ -367,6 +386,7 @@ declare const zSidebarLadder: z.ZodObject<{
|
|
|
367
386
|
label: z.ZodString;
|
|
368
387
|
icon: z.ZodString;
|
|
369
388
|
children: z.ZodArray<z.ZodString>;
|
|
389
|
+
href: z.ZodOptional<z.ZodString>;
|
|
370
390
|
}, z.core.$strip>], "type">>;
|
|
371
391
|
}, z.core.$strip>>;
|
|
372
392
|
}, z.core.$strip>;
|
|
@@ -433,6 +453,9 @@ interface AppSidebarRecent {
|
|
|
433
453
|
onSelect: (id: string) => void;
|
|
434
454
|
/** Section heading. Default `"Recent"`. */
|
|
435
455
|
label?: string;
|
|
456
|
+
/** DEV-19583: where the heading goes (e.g. the full chats page). Set, the
|
|
457
|
+
* heading renders as a link through `linkComponent`, same text and id. */
|
|
458
|
+
href?: string;
|
|
436
459
|
/** Rows shown before "More". Default 6; floored to a whole number >= 1, and a non-finite value uses the default. */
|
|
437
460
|
limit?: number;
|
|
438
461
|
/** Where "More" goes (rendered through `linkComponent`). No href, no More. */
|
|
@@ -598,7 +621,22 @@ interface FlyoutProps {
|
|
|
598
621
|
active: boolean;
|
|
599
622
|
children: FlyoutChild[];
|
|
600
623
|
/**
|
|
601
|
-
*
|
|
624
|
+
* DEV-19583: the group's own page. Set, the label becomes a link to it
|
|
625
|
+
* (through `linkComponent`), so a click or Enter navigates while hover
|
|
626
|
+
* still opens the panel; a separate chevron button beside it is the
|
|
627
|
+
* disclosure (`aria-expanded`, Enter/Space/click toggle the panel, Esc
|
|
628
|
+
* closes it and returns focus to the chevron). Omitted, the row is the
|
|
629
|
+
* single disclosure button it always was, markup unchanged.
|
|
630
|
+
*
|
|
631
|
+
* On the `collapsed` rail there is no room for two controls, so the row
|
|
632
|
+
* stays the single icon button and the panel opens with a first row
|
|
633
|
+
* linking to `href`, named by `label`.
|
|
634
|
+
*/
|
|
635
|
+
href?: string;
|
|
636
|
+
/** DEV-19583: the current page is `href` itself (not a child), so its link carries `aria-current="page"`. */
|
|
637
|
+
hrefActive?: boolean;
|
|
638
|
+
/**
|
|
639
|
+
* Link renderer for the panel's child rows (and the `href` label). Defaults to a bare `"a"` so
|
|
602
640
|
* the package stays framework-agnostic; consumers pass their router's
|
|
603
641
|
* link (e.g. `next/link`) for client-side navigation. Flyout is
|
|
604
642
|
* independently exported (see src/index.ts), so it carries its own copy
|
|
@@ -672,7 +710,7 @@ interface FlyoutProps {
|
|
|
672
710
|
* than working around it. jsdom never computes real scrollable-overflow
|
|
673
711
|
* geometry, so no unit test caught this — only an actual browser render did.
|
|
674
712
|
*/
|
|
675
|
-
declare function Flyout({ label, icon, active, children, linkComponent, collapsed, onOpenChange, forceClosed, hoverOpenDelayMs, className, }: FlyoutProps): react.JSX.Element;
|
|
713
|
+
declare function Flyout({ label, icon, active, children, href, hrefActive, linkComponent, collapsed, onOpenChange, forceClosed, hoverOpenDelayMs, className, }: FlyoutProps): react.JSX.Element;
|
|
676
714
|
|
|
677
715
|
/**
|
|
678
716
|
* ContextSwitcher (DEV-4408) — promoted out of reeve-frontend's
|