@hezhijie0327/zjdesign 0.1.2 → 0.1.4-2fbbe6d

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/AGENTS.md CHANGED
@@ -150,7 +150,7 @@ pnpm test # vitest run (jsdom)
150
150
  pnpm dev # vite playground (visual verification, :5199 in docs)
151
151
  ```
152
152
 
153
- Release: bump version in `package.json`, commit, tag `v<version>`, push — `.github/workflows/release.yml` gates on lint + typecheck + tests + build and publishes with npm provenance (`NPM_TOKEN` secret required in the GitHub repo; tag must match package.json). Manual local publish: `npm publish --access public --provenance` (publishConfig pins the official registry). npm package names are lowercase — the scope is `@hezhijie0327`, package `zjdesign`.
153
+ Release (OIDC trusted publishing — no NPM_TOKEN secret): every push to main that touches the package stamps `X.Y.Z-<sha7>` and publishes; `latest` lands on the newest commit (consumers depend on `latest`). The semver baseline moves via `scripts/bump_version.sh` (Windows: `scripts/bump_version.ps1`), which also prints the release commands. The workflow (release.yml) gates on lint + typecheck + tests + build; the one-time "Trusted Publisher" binding on npmjs.com is repo `hezhijie0327/ZJDesign` + workflow `release.yml` (npm CLI ≥ 11.5.1 via Node 24; provenance automatic). Playground changes do NOT trigger a publish (paths filter).
154
154
 
155
155
  ## Conventions
156
156
 
package/DESIGN.md CHANGED
@@ -90,7 +90,30 @@ Class strategy: `html.dark` (+ `html.black` OLED tier). `data-theme-mode` drives
90
90
  - Unmount windows are plain timers sized to the animation (`useExitPresence`), doubling as the timeout fallback (animation contract).
91
91
  - Global reduced-motion gate collapses everything to 0.01ms.
92
92
 
93
- ## 7. Governance
93
+ ## 7. Component roadmap
94
+
95
+ Phase 1 — components the family already uses (extract next):
96
+
97
+ | Component family | Entry | Source provenance | Notes |
98
+ | ----------------- | ------------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
99
+ | Markdown renderer | `zjdesign/markdown` | ZJBlog markdown.tsx + ZJSearch prose + ZJStudio markdown | unified react-markdown preset: GFM, callouts, katex, mermaid, the code-card; streaming-friendly `content` prop (Streamdown API shape) |
100
+ | Layout | `zjdesign/layout` | ZJBlog Shell / ZJStudio AppShell / ZJKVM Navigation | NavBar (glass blur + Wordmark + icon buttons + ThemeToggle), AppShell (ProgressBar + NavBar + main + Footer + BackToTop), page sections |
101
+ | ThemeToggle | main entry | ZJBlog/ZJKVM/ZJSearch | the tri/tetra-state icon button over the package theme hooks |
102
+ | Table | main entry | ZJStudio JobsPage | the family table fragment set (hairline rows, LIST_ROW rhythm) |
103
+ | Camera / media | `zjdesign/media` | ZJKVM media/camera + ZJBlog Lightbox | CameraPreview (getUserMedia + permission flow), Lightbox (dialog + scrim) |
104
+
105
+ Phase 2 — lobe-ecosystem counterparts, adopted when a family app needs them:
106
+
107
+ | lobe package | ZJ counterpart | Trigger |
108
+ | --------------------- | --------------------------------------------------------------------------------------- | ---------------------------- |
109
+ | `@lobehub/streamdown` | streaming Markdown over the Phase-1 renderer | ZJSearch AI-answer streaming |
110
+ | `@lobehub/charts` | lightweight SVG charts (Sparkline, BarList first) | first dashboard need |
111
+ | `@lobehub/editor` | CodeMirror wrapper | first code-editing need |
112
+ | `@lobehub/icons` | `FamilyMark` brand glyphs (blog/kvm/search/studio), lucide-react stays the UI icon peer | brand icon consolidation |
113
+
114
+ Governance per addition: playground demo + three-tier visual check + one consumer migrated before the fragment/component is declared stable.
115
+
116
+ ## 8. Governance
94
117
 
95
118
  1. Spec change → DESIGN.md (family) → tokens.css → release.
96
119
  2. New fragment → fragments.ts + this doc §3 → release.
@@ -1,4 +1,4 @@
1
- import { V as cn, n as BRAND_DOT } from "../styles-DhIa1Tm9.mjs";
1
+ import { V as cn, n as BRAND_DOT } from "../styles-DsVothIU.mjs";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
 
4
4
  //#region src/brand/Wordmark.tsx
@@ -1,2 +1,2 @@
1
- import { _ as watchSystemTheme, a as THEME_BOOTSTRAP, c as THEME_COLOR_LIGHT, d as applyThemeStyle, f as cookieThemeStorage, g as setThemeStyle, h as readThemeStyle, i as useExitPresence, l as ThemeStorage, m as localStorageThemeStorage, n as UseThemeResult, o as THEME_COLOR_BLACK, p as createThemeController, r as useTheme, s as THEME_COLOR_DARK, t as UseThemeOptions, u as ThemeStyle, v as watchThemeDark, y as reducedMotion } from "../index-B-bZqvO6.mjs";
2
- export { THEME_BOOTSTRAP, THEME_COLOR_BLACK, THEME_COLOR_DARK, THEME_COLOR_LIGHT, ThemeStorage, ThemeStyle, UseThemeOptions, UseThemeResult, applyThemeStyle, cookieThemeStorage, createThemeController, localStorageThemeStorage, readThemeStyle, reducedMotion, setThemeStyle, useExitPresence, useTheme, watchSystemTheme, watchThemeDark };
1
+ import { _ as setThemeStyle, a as THEME_BOOTSTRAP, b as reducedMotion, c as THEME_COLOR_LIGHT, d as applyThemeStyle, f as cookieThemeStorage, g as readThemeStyle, h as nextThemeStyle, i as useExitPresence, l as ThemeStorage, m as localStorageThemeStorage, n as UseThemeResult, o as THEME_COLOR_BLACK, p as createThemeController, r as useTheme, s as THEME_COLOR_DARK, t as UseThemeOptions, u as ThemeStyle, v as watchSystemTheme, y as watchThemeDark } from "../index-BVN0e41g.mjs";
2
+ export { THEME_BOOTSTRAP, THEME_COLOR_BLACK, THEME_COLOR_DARK, THEME_COLOR_LIGHT, ThemeStorage, ThemeStyle, UseThemeOptions, UseThemeResult, applyThemeStyle, cookieThemeStorage, createThemeController, localStorageThemeStorage, nextThemeStyle, readThemeStyle, reducedMotion, setThemeStyle, useExitPresence, useTheme, watchSystemTheme, watchThemeDark };
@@ -1,3 +1,3 @@
1
- import { a as THEME_COLOR_DARK, c as cookieThemeStorage, d as readThemeStyle, f as setThemeStyle, h as reducedMotion, i as THEME_COLOR_BLACK, l as createThemeController, m as watchThemeDark, n as useExitPresence, o as THEME_COLOR_LIGHT, p as watchSystemTheme, r as THEME_BOOTSTRAP, s as applyThemeStyle, t as useTheme, u as localStorageThemeStorage } from "../hooks-_Gk75q-U.mjs";
1
+ import { a as THEME_COLOR_DARK, c as cookieThemeStorage, d as nextThemeStyle, f as readThemeStyle, g as reducedMotion, h as watchThemeDark, i as THEME_COLOR_BLACK, l as createThemeController, m as watchSystemTheme, n as useExitPresence, o as THEME_COLOR_LIGHT, p as setThemeStyle, r as THEME_BOOTSTRAP, s as applyThemeStyle, t as useTheme, u as localStorageThemeStorage } from "../hooks-vpLVB3bc.mjs";
2
2
 
3
- export { THEME_BOOTSTRAP, THEME_COLOR_BLACK, THEME_COLOR_DARK, THEME_COLOR_LIGHT, applyThemeStyle, cookieThemeStorage, createThemeController, localStorageThemeStorage, readThemeStyle, reducedMotion, setThemeStyle, useExitPresence, useTheme, watchSystemTheme, watchThemeDark };
3
+ export { THEME_BOOTSTRAP, THEME_COLOR_BLACK, THEME_COLOR_DARK, THEME_COLOR_LIGHT, applyThemeStyle, cookieThemeStorage, createThemeController, localStorageThemeStorage, nextThemeStyle, readThemeStyle, reducedMotion, setThemeStyle, useExitPresence, useTheme, watchSystemTheme, watchThemeDark };
@@ -97,12 +97,26 @@ const defaultController = /* @__PURE__ */ createThemeController();
97
97
  const readThemeStyle = defaultController.readThemeStyle;
98
98
  const applyThemeStyle = defaultController.applyThemeStyle;
99
99
  const setThemeStyle = defaultController.setThemeStyle;
100
- /** In auto mode, follow the system light/dark switch in real time. */
100
+ /** Advance a preference along a cycle order (default: the four-state loop
101
+ * including the OLED tier; pass a three-step order for black-less UIs). */
102
+ function nextThemeStyle(style, order = [
103
+ "auto",
104
+ "light",
105
+ "dark",
106
+ "black"
107
+ ]) {
108
+ return order[(order.indexOf(style) + 1) % order.length] ?? "auto";
109
+ }
110
+ /** In auto mode, follow the system light/dark switch in real time.
111
+ * Returns an unsubscribe function (call it on teardown). */
101
112
  function watchSystemTheme(storage = localStorageThemeStorage()) {
102
- window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
113
+ const mq = window.matchMedia("(prefers-color-scheme: dark)");
114
+ const onChange = () => {
103
115
  const controller = createThemeController(storage);
104
116
  if (controller.readThemeStyle() === "auto") controller.applyThemeStyle("auto");
105
- });
117
+ };
118
+ mq.addEventListener("change", onChange);
119
+ return () => mq.removeEventListener("change", onChange);
106
120
  }
107
121
  /** Subscribe to the dark state (html.dark is the single source of truth; both in-site
108
122
  * toggles and system-follow flip it). Returns an unsubscribe function. Heavy theme
@@ -217,4 +231,4 @@ function useTheme({ storage = localStorageThemeStorage(), order = [
217
231
  }
218
232
 
219
233
  //#endregion
220
- export { THEME_COLOR_DARK as a, cookieThemeStorage as c, readThemeStyle as d, setThemeStyle as f, reducedMotion as h, THEME_COLOR_BLACK as i, createThemeController as l, watchThemeDark as m, useExitPresence as n, THEME_COLOR_LIGHT as o, watchSystemTheme as p, THEME_BOOTSTRAP as r, applyThemeStyle as s, useTheme as t, localStorageThemeStorage as u };
234
+ export { THEME_COLOR_DARK as a, cookieThemeStorage as c, nextThemeStyle as d, readThemeStyle as f, reducedMotion as g, watchThemeDark as h, THEME_COLOR_BLACK as i, createThemeController as l, watchSystemTheme as m, useExitPresence as n, THEME_COLOR_LIGHT as o, setThemeStyle as p, THEME_BOOTSTRAP as r, applyThemeStyle as s, useTheme as t, localStorageThemeStorage as u };
@@ -40,8 +40,12 @@ declare function createThemeController(storage?: ThemeStorage): {
40
40
  declare const readThemeStyle: () => ThemeStyle;
41
41
  declare const applyThemeStyle: (style: ThemeStyle) => void;
42
42
  declare const setThemeStyle: (style: ThemeStyle) => void;
43
- /** In auto mode, follow the system light/dark switch in real time. */
44
- declare function watchSystemTheme(storage?: ThemeStorage): void;
43
+ /** Advance a preference along a cycle order (default: the four-state loop
44
+ * including the OLED tier; pass a three-step order for black-less UIs). */
45
+ declare function nextThemeStyle(style: ThemeStyle, order?: ThemeStyle[]): ThemeStyle;
46
+ /** In auto mode, follow the system light/dark switch in real time.
47
+ * Returns an unsubscribe function (call it on teardown). */
48
+ declare function watchSystemTheme(storage?: ThemeStorage): () => void;
45
49
  /** Subscribe to the dark state (html.dark is the single source of truth; both in-site
46
50
  * toggles and system-follow flip it). Returns an unsubscribe function. Heavy theme
47
51
  * dependencies (giscus iframe / mermaid re-render) hook in here — do not attach your own
@@ -98,4 +102,4 @@ declare function useTheme({
98
102
  order
99
103
  }?: UseThemeOptions): UseThemeResult;
100
104
  //#endregion
101
- export { watchSystemTheme as _, THEME_BOOTSTRAP as a, THEME_COLOR_LIGHT as c, applyThemeStyle as d, cookieThemeStorage as f, setThemeStyle as g, readThemeStyle as h, useExitPresence as i, ThemeStorage as l, localStorageThemeStorage as m, UseThemeResult as n, THEME_COLOR_BLACK as o, createThemeController as p, useTheme as r, THEME_COLOR_DARK as s, UseThemeOptions as t, ThemeStyle as u, watchThemeDark as v, reducedMotion as y };
105
+ export { setThemeStyle as _, THEME_BOOTSTRAP as a, reducedMotion as b, THEME_COLOR_LIGHT as c, applyThemeStyle as d, cookieThemeStorage as f, readThemeStyle as g, nextThemeStyle as h, useExitPresence as i, ThemeStorage as l, localStorageThemeStorage as m, UseThemeResult as n, THEME_COLOR_BLACK as o, createThemeController as p, useTheme as r, THEME_COLOR_DARK as s, UseThemeOptions as t, ThemeStyle as u, watchSystemTheme as v, watchThemeDark as y };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as watchSystemTheme, a as THEME_BOOTSTRAP, c as THEME_COLOR_LIGHT, d as applyThemeStyle, f as cookieThemeStorage, g as setThemeStyle, h as readThemeStyle, i as useExitPresence, l as ThemeStorage, m as localStorageThemeStorage, n as UseThemeResult, o as THEME_COLOR_BLACK, p as createThemeController, r as useTheme, s as THEME_COLOR_DARK, t as UseThemeOptions, u as ThemeStyle, v as watchThemeDark, y as reducedMotion } from "./index-B-bZqvO6.mjs";
2
- import * as react3 from "react";
1
+ import { _ as setThemeStyle, a as THEME_BOOTSTRAP, b as reducedMotion, c as THEME_COLOR_LIGHT, d as applyThemeStyle, f as cookieThemeStorage, g as readThemeStyle, h as nextThemeStyle, i as useExitPresence, l as ThemeStorage, m as localStorageThemeStorage, n as UseThemeResult, o as THEME_COLOR_BLACK, p as createThemeController, r as useTheme, s as THEME_COLOR_DARK, t as UseThemeOptions, u as ThemeStyle, v as watchSystemTheme, y as watchThemeDark } from "./index-BVN0e41g.mjs";
2
+ import * as react7 from "react";
3
3
  import { ButtonHTMLAttributes, ReactNode, RefObject } from "react";
4
4
 
5
5
  //#region src/components/Button/Button.d.ts
@@ -9,7 +9,7 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
9
9
  }
10
10
  /** Pill button in the family language (BTN_PRIMARY / BTN_OUTLINE / BTN_GHOST
11
11
  * fragments + the danger state). */
12
- declare const Button: react3.ForwardRefExoticComponent<ButtonProps & react3.RefAttributes<HTMLButtonElement>>;
12
+ declare const Button: react7.ForwardRefExoticComponent<ButtonProps & react7.RefAttributes<HTMLButtonElement>>;
13
13
  //#endregion
14
14
  //#region src/components/Collapse/Collapse.d.ts
15
15
  /**
@@ -42,16 +42,18 @@ declare function Collapse({
42
42
  className?: string;
43
43
  id?: string;
44
44
  children: ReactNode;
45
- }): react3.JSX.Element | null;
45
+ }): react7.JSX.Element | null;
46
46
  //#endregion
47
47
  //#region src/components/IconButton/IconButton.d.ts
48
48
  interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
49
49
  /** accessibility label (aria-label + title) */
50
50
  label: string;
51
51
  active?: boolean;
52
+ /** aria-expanded passthrough for triggers (popovers / drawers) */
53
+ expanded?: boolean;
52
54
  }
53
55
  /** Round icon button (ICON_BTN fragment); `active` lights the accent. */
54
- declare const IconButton: react3.ForwardRefExoticComponent<IconButtonProps & react3.RefAttributes<HTMLButtonElement>>;
56
+ declare const IconButton: react7.ForwardRefExoticComponent<IconButtonProps & react7.RefAttributes<HTMLButtonElement>>;
55
57
  //#endregion
56
58
  //#region src/components/CopyButton/CopyButton.d.ts
57
59
  interface CopyButtonProps extends Omit<IconButtonProps, "label" | "children" | "onClick"> {
@@ -69,7 +71,7 @@ declare function CopyButton({
69
71
  label,
70
72
  feedbackMs,
71
73
  ...props
72
- }: CopyButtonProps): react3.JSX.Element;
74
+ }: CopyButtonProps): react7.JSX.Element;
73
75
  //#endregion
74
76
  //#region src/components/Dropdown/Dropdown.d.ts
75
77
  interface DropdownOption {
@@ -90,7 +92,9 @@ interface DropdownProps {
90
92
  }
91
93
  /** Custom select wearing the family skin: hairline trigger button + CARD
92
94
  * popover list (LIST_ROW rows, accent check on the selected option).
93
- * Replaces every native <select> — the OS dropdown sheet breaks the style. */
95
+ * Replaces every native <select> — the OS dropdown sheet breaks the style.
96
+ * Keyboard: ArrowDown/Up opens and moves through options, Home/End jump,
97
+ * Enter picks, Esc closes back to the trigger (APG listbox pattern). */
94
98
  declare function Dropdown({
95
99
  label,
96
100
  value,
@@ -101,7 +105,7 @@ declare function Dropdown({
101
105
  menuClassName,
102
106
  disabled,
103
107
  id
104
- }: DropdownProps): react3.JSX.Element;
108
+ }: DropdownProps): react7.JSX.Element;
105
109
  //#endregion
106
110
  //#region src/components/Kbd/Kbd.d.ts
107
111
  /** Mono chip for keys / states (MONO_CHIP fragment with tighter padding). */
@@ -111,7 +115,7 @@ declare function Kbd({
111
115
  }: {
112
116
  children: ReactNode;
113
117
  className?: string;
114
- }): react3.JSX.Element;
118
+ }): react7.JSX.Element;
115
119
  /** Single-line panel row label (text-sm) — the standard row label inside
116
120
  * toolbar panels. Never wraps: narrow rows scale via column layout instead. */
117
121
  declare const ROW_LABEL = "shrink-0 whitespace-nowrap text-sm text-ink";
@@ -136,7 +140,7 @@ declare function Modal({
136
140
  label,
137
141
  className,
138
142
  children
139
- }: ModalProps): react3.ReactPortal | null;
143
+ }: ModalProps): react7.ReactPortal | null;
140
144
  //#endregion
141
145
  //#region src/components/Popover/Popover.d.ts
142
146
  interface PopoverProps {
@@ -160,7 +164,7 @@ declare function Popover({
160
164
  className,
161
165
  children,
162
166
  anchorRef
163
- }: PopoverProps): react3.JSX.Element | null;
167
+ }: PopoverProps): react7.JSX.Element | null;
164
168
  //#endregion
165
169
  //#region src/components/ProgressBar/ProgressBar.d.ts
166
170
  /** Top-of-page loading bar: 2px accent strip riding the `progress` keyframes
@@ -170,7 +174,7 @@ declare function ProgressBar({
170
174
  className
171
175
  }: {
172
176
  className?: string;
173
- }): react3.JSX.Element;
177
+ }): react7.JSX.Element;
174
178
  //#endregion
175
179
  //#region src/components/Segmented/Segmented.d.ts
176
180
  interface SegmentedProps<T extends string | number> {
@@ -190,7 +194,7 @@ declare function Segmented<T extends string | number>({
190
194
  onChange,
191
195
  label,
192
196
  className
193
- }: SegmentedProps<T>): react3.JSX.Element;
197
+ }: SegmentedProps<T>): react7.JSX.Element;
194
198
  //#endregion
195
199
  //#region src/components/Slider/Slider.d.ts
196
200
  interface SliderProps {
@@ -215,7 +219,7 @@ declare function Slider({
215
219
  label,
216
220
  display,
217
221
  className
218
- }: SliderProps): react3.JSX.Element;
222
+ }: SliderProps): react7.JSX.Element;
219
223
  //#endregion
220
224
  //#region src/components/Switch/Switch.d.ts
221
225
  interface SwitchProps {
@@ -232,12 +236,122 @@ declare function Switch({
232
236
  label,
233
237
  className,
234
238
  disabled
235
- }: SwitchProps): react3.JSX.Element;
239
+ }: SwitchProps): react7.JSX.Element;
240
+ //#endregion
241
+ //#region src/components/Table/Table.d.ts
242
+ interface TableColumn<R> {
243
+ key: string;
244
+ /** Column header label */
245
+ label: ReactNode;
246
+ /** Cell renderer; defaults to the raw field value */
247
+ render?: (row: R) => ReactNode;
248
+ /** Cell class (width/alignment); the row rhythm comes from the shell */
249
+ className?: string;
250
+ }
251
+ interface TableProps<R> {
252
+ columns: TableColumn<R>[];
253
+ rows: R[];
254
+ /** Stable row key */
255
+ rowKey: (row: R) => string;
256
+ /** Accessible caption describing the table */
257
+ caption: string;
258
+ /** Row click handler (hover/selected affordances follow) */
259
+ onRowClick?: (row: R) => void;
260
+ className?: string;
261
+ }
262
+ /** The family table: hairline shell, mono header on the muted tier, rows in
263
+ * the LIST_ROW rhythm. A semantic <table> — sort/filter state stays with
264
+ * the caller. */
265
+ declare function Table<R>({
266
+ columns,
267
+ rows,
268
+ rowKey,
269
+ caption,
270
+ onRowClick,
271
+ className
272
+ }: TableProps<R>): react7.JSX.Element;
273
+ //#endregion
274
+ //#region src/components/Text/Text.d.ts
275
+ /** The family type scale for component text (12px meta floor per §4). */
276
+ type TextSize = "xs" | "sm" | "base" | "lg" | "xl";
277
+ /** Semantic colors from the token set (never raw colors). */
278
+ type TextTone = "ink" | "ink-2" | "ink-3" | "accent" | "accent-hover" | "danger" | "warning" | "ok";
279
+ interface TextProps {
280
+ children: ReactNode;
281
+ /** Type scale (family §4: xs = the 12px meta floor) */
282
+ size?: TextSize;
283
+ /** Token-driven tone */
284
+ tone?: TextTone;
285
+ /** Font track: sans (UI) / serif (editorial) / mono (meta & code) */
286
+ font?: "sans" | "serif" | "mono";
287
+ as?: "p" | "span" | "div";
288
+ className?: string;
289
+ }
290
+ /** Family text primitive: the size/tone/font triad over token classes. */
291
+ declare function Typography({
292
+ children,
293
+ size,
294
+ tone,
295
+ font,
296
+ as,
297
+ className
298
+ }: TextProps): react7.JSX.Element;
299
+ /** The family icon size ladder (lucide size-4 default): 12/14/16/18/20. */
300
+ type IconSize = 3 | 3.5 | 4 | 4.5 | 5;
301
+ /** Wraps a lucide icon element with the family size ladder — pass any
302
+ * lucide component as `children` (it inherits currentColor). */
303
+ declare function Icon({
304
+ children,
305
+ size,
306
+ className,
307
+ label
308
+ }: {
309
+ children: ReactNode;
310
+ size?: IconSize;
311
+ className?: string;
312
+ /** Accessible label; omit for decorative icons (aria-hidden is applied) */
313
+ label?: string;
314
+ }): react7.JSX.Element;
315
+ //#endregion
316
+ //#region src/components/ThemeToggle/ThemeToggle.d.ts
317
+ interface ThemeToggleProps {
318
+ /** Accessible labels per preference (order: auto / light / dark / black) */
319
+ labels: Partial<Record<ThemeStyle, string>> & {
320
+ auto: string;
321
+ };
322
+ /** Cycle order; default follows the useTheme hook (auto → light → dark) */
323
+ order?: ThemeStyle[];
324
+ /** Icon set: "tri" shows auto/light/dark glyphs swapped by CSS
325
+ * (behaviors.css, correct from pre-paint); "dynamic" renders the active
326
+ * glyph from state (supports the black tier with the monitor glyph). */
327
+ variant?: "tri" | "dynamic";
328
+ className?: string;
329
+ }
330
+ /** The family theme toggle (ZJBlog design): an ICON_BTN cycling the theme
331
+ * preference. The tri variant relies on behaviors.css's
332
+ * [data-theme-mode] .theme-icon rules; the dynamic variant reads state. */
333
+ declare function ThemeToggle({
334
+ labels,
335
+ order,
336
+ variant,
337
+ className
338
+ }: ThemeToggleProps): react7.JSX.Element;
339
+ /** The family language toggle (ZJBlog design): one Languages icon cycling
340
+ * system → en → zh (or any pref order); the label announces the target. */
341
+ declare function LanguageToggle({
342
+ label,
343
+ onClick,
344
+ className
345
+ }: {
346
+ label: string;
347
+ onClick: () => void;
348
+ className?: string;
349
+ }): react7.JSX.Element;
236
350
  //#endregion
237
351
  //#region src/components/Toast/Toaster.d.ts
238
352
  /** Toast stack: bottom-center paper cards, fade-up in, auto-removed after 3 s.
239
353
  * Mount once near the app root. */
240
- declare function Toaster(): react3.JSX.Element | null;
354
+ declare function Toaster(): react7.JSX.Element | null;
241
355
  //#endregion
242
356
  //#region src/components/Toast/types.d.ts
243
357
  interface ToastItem {
@@ -248,9 +362,105 @@ interface ToastItem {
248
362
  //#endregion
249
363
  //#region src/components/Toast/toast.d.ts
250
364
  type Listener = (toasts: ToastItem[]) => void;
251
- /** Push a toast; `tone` picks the border/text treatment ("ok" default). */
252
365
  declare function toast(text: string, tone?: ToastItem["tone"]): void;
253
366
  declare function subscribeToasts(listener: Listener): () => void;
254
367
  declare function getToasts(): ToastItem[];
255
368
  //#endregion
256
- export { Button, type ButtonProps, Collapse, CopyButton, type CopyButtonProps, Dropdown, type DropdownOption, type DropdownProps, IconButton, type IconButtonProps, Kbd, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, ROW_LABEL, Segmented, type SegmentedProps, Slider, type SliderProps, Switch, type SwitchProps, THEME_BOOTSTRAP, THEME_COLOR_BLACK, THEME_COLOR_DARK, THEME_COLOR_LIGHT, ThemeStorage, ThemeStyle, type ToastItem, Toaster, UseThemeOptions, UseThemeResult, applyThemeStyle, cookieThemeStorage, createThemeController, getToasts, localStorageThemeStorage, readThemeStyle, reducedMotion, setThemeStyle, subscribeToasts, toast, useExitPresence, useTheme, watchSystemTheme, watchThemeDark };
369
+ //#region src/layout/AppShell.d.ts
370
+ interface AppShellProps {
371
+ /** NavBar brand zone (wordmark) */
372
+ brand?: ReactNode;
373
+ /** NavBar right action area */
374
+ actions?: ReactNode;
375
+ /** Page content */
376
+ children: ReactNode;
377
+ /** Optional single-line footer (copyright etc.) */
378
+ footer?: ReactNode;
379
+ className?: string;
380
+ }
381
+ /** The family app shell: glass NavBar, a scrollable main region, and an
382
+ * optional one-line footer. Content pages keep the document flow; the
383
+ * viewport-fixed app layout (ZJStudio/ZJKVM style) composes NavBar with its
384
+ * own overflow region instead. */
385
+ declare function AppShell({
386
+ brand,
387
+ actions,
388
+ children,
389
+ footer,
390
+ className
391
+ }: AppShellProps): react7.JSX.Element;
392
+ //#endregion
393
+ //#region src/layout/BackToTop.d.ts
394
+ /** Back-to-top: a floating icon button that appears after scrolling past the
395
+ * fold (the ZJBlog threshold is 400px), with the reduced-motion guard
396
+ * collapsing the transition. */
397
+ declare function BackToTop({
398
+ label,
399
+ threshold
400
+ }: {
401
+ label?: string;
402
+ threshold?: number;
403
+ }): react7.JSX.Element;
404
+ //#endregion
405
+ //#region src/layout/NavBar.d.ts
406
+ interface NavBarProps {
407
+ /** Left zone: the wordmark / brand (rendered before the actions) */
408
+ children?: ReactNode;
409
+ /** Right action area: icon buttons, toggles, menus */
410
+ actions?: ReactNode;
411
+ /** Center zone (optional; absolutely centered on md+ like the family bar) */
412
+ center?: ReactNode;
413
+ className?: string;
414
+ }
415
+ /** The family top bar: sticky glass (safe-area aware via .app-bar from
416
+ * base.css), hairline bottom edge, serif wordmark zone on the left and the
417
+ * icon-button action area on the right. */
418
+ declare function NavBar({
419
+ children,
420
+ actions,
421
+ center,
422
+ className
423
+ }: NavBarProps): react7.JSX.Element;
424
+ //#endregion
425
+ //#region src/media/CameraPreview.d.ts
426
+ interface CameraPreviewProps {
427
+ /** getUserMedia video constraints; defaults to the user-facing camera */
428
+ constraints?: MediaStreamConstraints;
429
+ /** Called when the stream is ready (the preview never owns the stream —
430
+ * pass it on if the caller needs frames) */
431
+ onStream?: (stream: MediaStream) => void;
432
+ /** Called when access fails (denied / no device / insecure context) */
433
+ onError?: (error: unknown) => void;
434
+ className?: string;
435
+ }
436
+ /** Family camera preview: mounts a muted, playsInline <video> fed by
437
+ * getUserMedia; tracks are released on unmount. Permission handling and
438
+ * device enumeration stay with the caller (see onError + onStream). */
439
+ declare function CameraPreview({
440
+ constraints,
441
+ onStream,
442
+ onError,
443
+ className
444
+ }: CameraPreviewProps): react7.JSX.Element;
445
+ //#endregion
446
+ //#region src/media/Lightbox.d.ts
447
+ interface LightboxProps {
448
+ open: boolean;
449
+ onClose: () => void;
450
+ /** Accessible label for the dialog */
451
+ label: string;
452
+ children: ReactNode;
453
+ className?: string;
454
+ }
455
+ /** The family lightbox: a native <dialog> over the --scrim backdrop (the
456
+ * .lightbox[open] enter animation lives in behaviors.css). Esc and backdrop
457
+ * clicks close it; content is free-form (an <img>, a video, a gallery). */
458
+ declare function Lightbox({
459
+ open,
460
+ onClose,
461
+ label,
462
+ children,
463
+ className
464
+ }: LightboxProps): react7.JSX.Element;
465
+ //#endregion
466
+ export { AppShell, type AppShellProps, BackToTop, Button, type ButtonProps, CameraPreview, type CameraPreviewProps, Collapse, CopyButton, type CopyButtonProps, Dropdown, type DropdownOption, type DropdownProps, Icon, IconButton, type IconButtonProps, type IconSize, Kbd, LanguageToggle, Lightbox, type LightboxProps, Modal, type ModalProps, NavBar, type NavBarProps, Popover, type PopoverProps, ProgressBar, ROW_LABEL, Segmented, type SegmentedProps, Slider, type SliderProps, Switch, type SwitchProps, THEME_BOOTSTRAP, THEME_COLOR_BLACK, THEME_COLOR_DARK, THEME_COLOR_LIGHT, Table, type TableColumn, type TableProps, type TextProps, type TextSize, type TextTone, ThemeStorage, ThemeStyle, ThemeToggle, type ToastItem, Toaster, Typography, UseThemeOptions, UseThemeResult, applyThemeStyle, cookieThemeStorage, createThemeController, getToasts, localStorageThemeStorage, nextThemeStyle, readThemeStyle, reducedMotion, setThemeStyle, subscribeToasts, toast, useExitPresence, useTheme, watchSystemTheme, watchThemeDark };