@hezhijie0327/zjdesign 0.1.0 → 0.1.2

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 ADDED
@@ -0,0 +1,168 @@
1
+ # AGENTS.md
2
+
3
+ ZJ Design (`@hezhijie0327/zjdesign`) — the shared design system of the ZJ product family (ZJBlog / ZJKVM / ZJSearch / ZJStudio): warm paper, ink text, amber gold. It packages the family's design tokens (CSS), Tailwind class fragments, theme hooks and React components so the four apps consume one versioned source instead of repo-local copies. Design language reference: [DESIGN.md](DESIGN.md); human-facing docs: [README.md](README.md).
4
+
5
+ ## HANDOVER.md
6
+
7
+ When a multi-step task is interrupted, write progress to `HANDOVER.md` so the next session can pick up where you left off. Include: what was done, what remains, key decisions made, and the next concrete step. Delete the file when the task is complete.
8
+
9
+ ## Behavioral Guidelines
10
+
11
+ **Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment.
12
+
13
+ ### 1. Think Before Coding
14
+
15
+ **Don't assume. Don't hide confusion. Surface tradeoffs.**
16
+
17
+ Before implementing:
18
+
19
+ - State your assumptions explicitly. If uncertain, ask.
20
+ - If multiple interpretations exist, present them — don't pick silently.
21
+ - If a simpler approach exists, say so. Push back when warranted.
22
+ - If something is unclear, stop. Name what's confusing. Ask.
23
+
24
+ ### 2. Simplicity First
25
+
26
+ **Minimum code that solves the problem. Nothing speculative.**
27
+
28
+ - No features beyond what was asked.
29
+ - No abstractions for single-use code.
30
+ - No "flexibility" or "configurability" that wasn't requested.
31
+ - No error handling for impossible scenarios.
32
+ - If you write 200 lines and it could be 50, rewrite it.
33
+
34
+ Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
35
+
36
+ ### 3. Surgical Changes
37
+
38
+ **Touch only what you must. Clean up only your own mess.**
39
+
40
+ When editing existing code:
41
+
42
+ - Don't "improve" adjacent code, comments, or formatting.
43
+ - Don't refactor things that aren't broken.
44
+ - Match existing style, even if you'd do it differently.
45
+ - If you notice unrelated dead code, mention it — don't delete it.
46
+
47
+ When your changes create orphans:
48
+
49
+ - Remove imports/variables/functions that YOUR changes made unused.
50
+ - Don't remove pre-existing dead code unless asked.
51
+
52
+ The test: Every changed line should trace directly to the user's request.
53
+
54
+ ### 4. Goal-Driven Execution
55
+
56
+ **Define success criteria. Loop until verified.**
57
+
58
+ Transform tasks into verifiable goals:
59
+
60
+ - "Add validation" → "Write tests for invalid inputs, then make them pass"
61
+ - "Fix the bug" → "Write a test that reproduces it, then make it pass"
62
+ - "Refactor X" → "Ensure tests pass before and after"
63
+
64
+ For multi-step tasks, state a brief plan:
65
+
66
+ ```
67
+ 1. [Step] → verify: [check]
68
+ 2. [Step] → verify: [check]
69
+ 3. [Step] → verify: [check]
70
+ ```
71
+
72
+ Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
73
+
74
+ **These guidelines are working if:** fewer unnecessary changes in diffs, fewer rewrites due to overcomplication, and clarifying questions come before implementation rather than after mistakes.
75
+
76
+ **Additional rules:**
77
+
78
+ - Be concise in output but thorough in reasoning.
79
+ - Do not re-read files you have already read.
80
+ - User instructions always override this file.
81
+ - Don't wrestle with indentation in the Edit tool — focus on logic, let the project's formatter fix formatting. Use `sed` or `python3` freely when the Edit tool struggles with whitespace.
82
+
83
+ ## Git commit convention
84
+
85
+ Every commit subject starts with a type prefix — `feat` / `fix` / `chore` / `docs` / `revert` / `refactor` / `perf` / `test` / `build` — optionally scoped: `fix(toolbar): ...`. Subject: imperative, lowercase start, no trailing period, aim ≤ 72 chars; detail goes in the body after a blank line (why, not what); breaking changes take `!` before the colon or a `BREAKING CHANGE:` body footer. Never rewrite pushed history.
86
+
87
+ - Commit incrementally — one logical change per commit, after lint and tests pass. Present changes for review before committing.
88
+ - PRs: link the issue, summarize the change and verification (tests/benchmarks), and include config/log/pprof evidence for bug fixes.
89
+
90
+ ### Co-Author Format
91
+
92
+ - Always add co-author information. If closing an issue in commit text, verify against `main` first: `gh issue view <issue-id>`.
93
+ - Only ONE co-author line is allowed. If multiple agents contributed, aggregate into ONE entry.
94
+
95
+ Format: `Co-authored-by: <AgentName> <Email>`
96
+
97
+ Valid examples (choose EXACTLY ONE):
98
+
99
+ ```
100
+ Co-authored-by: ZCode <noreply@z.ai>
101
+ ```
102
+
103
+ ## Documentation format
104
+
105
+ Family-wide Markdown rules, shared verbatim across all ZJ projects:
106
+
107
+ - **Language**: AGENTS.md, AUDIT.md, DESIGN.md and other agent-facing docs are English; README.md is Chinese (human-facing). Keep literal UI strings and code identifiers verbatim.
108
+ - **AGENTS.md skeleton** — generic sections first, then project; omit sections that don't apply, keep the order:
109
+ `# AGENTS.md` → 1–2 sentence intro (what the project is + key doc links) → Behavioral Guidelines → Git commit convention → Documentation format → Project → Commands → Architecture → Conventions (Gotchas as a subsection) → project-specific sections → Key Docs.
110
+ - **README.md skeleton**: `# <project>` → badge block → one-line positioning + stack + key links → 特性 → 快速开始 → 配置 / 用法 → 文档 → License (omit as needed).
111
+ - **README badges** (shields.io, after the title, in order): Version (only where a real version exists, linked to the repo's GitHub releases), License (Apache 2.0 with Commons Clause — every project), primary-language badge (Go / TypeScript / Bash / Python / Docker), Biome for TypeScript projects; pure data/config repos get License only. Version links use the real GitHub repo name.
112
+ - **Formatting**: ATX headings (`#`), never skip a level; code fences always carry a language tag (`bash`, `go`, `json`, `text` for trees); tables for structured reference; no decorative emoji in headings or bullets; bold for key terms only.
113
+
114
+ ## Project
115
+
116
+ **Architecture: single package, multi-entry** (lobe-ui style). One npm package `@hezhijie0327/zjdesign`, five JS subpaths plus a CSS subpath:
117
+
118
+ | Subpath | Contents |
119
+ | ---------- | ------------------------------------------------------------------- |
120
+ | `.` | React components + hooks (re-exports `components/` and `hooks/`) |
121
+ | `./styles` | `cn()` + class fragments (`fragments.ts`) |
122
+ | `./hooks` | theme controller / `useTheme` / `useExitPresence` / `reducedMotion` |
123
+ | `./paper` | `Tape` + `tapePhysics` (seed physics) |
124
+ | `./brand` | `Wordmark` |
125
+ | `./tokens` | CSS entry (also `./tokens/*.css` per file) |
126
+
127
+ Layering (strict, top depends on bottom only):
128
+
129
+ ```
130
+ tokens (CSS) ← styles (fragments + cn) ← hooks ← components / paper / brand
131
+ ```
132
+
133
+ **Key constraints:**
134
+
135
+ 1. **Tokens are the family contract.** `src/tokens/tokens.css` values must stay byte-identical to the family contract (ZJBlog DESIGN.md §3). Changing a value is a spec change: update DESIGN.md first, then sync, then release a minor bump. Never add raw colors anywhere else.
136
+ 2. **Fragments before classes.** Recurring Tailwind combinations must be added to `src/styles/fragments.ts` and consumed via `className={FRAGMENT}` + `cn()` overrides — never hand-write long class strings inside components.
137
+ 3. **Styling = Tailwind utilities only** inside components. CSS files under `src/tokens/` carry only what utilities cannot reach (@property registrations, pseudo-elements, clip-path paper language, document behaviors). If a widget skin is needed (e.g. `.zj-range` for range pseudo-elements), it lives there and must be token-driven.
138
+ 4. **Peer deps only.** `react`, `react-dom`, `lucide-react`, `tailwindcss` are peer dependencies; runtime deps are limited to `clsx` + `tailwind-merge`. Do not add state libraries (jotai etc.) — the Toast bus is deliberately dependency-free.
139
+ 5. **Consumers scan the dist.** Fragment classes live in shipped JS; consumer Tailwind setup must `@source` the package (see README). Never rely on utilities that only exist in an app's own source.
140
+
141
+ ## Commands
142
+
143
+ ```bash
144
+ pnpm install # install
145
+ pnpm build # tsdown build → dist/ (JS + dts + copied CSS)
146
+ pnpm check # tsc --noEmit
147
+ pnpm lint # biome check .
148
+ pnpm lint:fix # biome check --write .
149
+ pnpm test # vitest run (jsdom)
150
+ pnpm dev # vite playground (visual verification, :5199 in docs)
151
+ ```
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`.
154
+
155
+ ## Conventions
156
+
157
+ - **Named export only**, no default exports; explicit `.ts` / `.tsx` import extensions (bundler resolution + `allowImportingTsExtensions`).
158
+ - **Biome 2.6**: 2-space indent, 120 cols, double quotes, semicolons, trailing commas.
159
+ - TypeScript strict + `noUncheckedIndexedAccess` + `verbatimModuleSyntax`.
160
+ - Every component directory: `Widget.tsx` + `index.ts` (lobe-ui layout). Tests live in `/tests` (flat, family repo style).
161
+ - Gotcha: `tapePhysics` shifts MUST use logical `>>>` (arithmetic `>>` sign-extends int32 and breaks the spec range — see DESIGN.md §7). Do not change its constants; the visual spec lives in DESIGN.md and is two-way synced with the family repos.
162
+ - Gotcha: jsdom lacks `matchMedia` — `tests/setup.ts` stubs it globally; add new matchMedia-dependent setup there.
163
+
164
+ ## Key Docs
165
+
166
+ - [DESIGN.md](DESIGN.md) — design language spec (tokens, fragments, paper physics, motion)
167
+ - [README.md](README.md) — Chinese user docs: install, consumer setup, component list
168
+ - Family repos: `C:\Users\zhijie.he\Lab\{blog,ZJKVM,searxng,ZJStudio}` (consumer apps during migration)
package/DESIGN.md ADDED
@@ -0,0 +1,98 @@
1
+ # DESIGN.md
2
+
3
+ The ZJ family design language, packaged. This file is the packaging repo's view of the family contract; the authoritative narrative lives in ZJBlog's DESIGN.md (§1–18). Values below are normative for this package — token values must stay byte-identical across the family.
4
+
5
+ ## 1. Design principles
6
+
7
+ - **Warm paper × ink × amber gold**: page ground is warm paper (`--bg`), text is ink (`--ink`), the single accent family is amber gold (`--accent*`).
8
+ - **Paper physics**: decorations imitate physical paper (torn edges, tape, postmarks) and follow deterministic physics — never random, so SSR and hydration agree.
9
+ - **Editorial typography**: serif for headings and long-form (`--font-serif`), sans for UI chrome, mono for meta and code. Zero webfonts — system stacks only.
10
+ - **Restraint**: three surface tiers (`--bg` → `--surface` → `--surface-2`), two elevations (`--shadow-card` → `--shadow-pop`), three palette tiers (light / dark / black-OLED).
11
+ - **Motion contract**: every interactive surface has enter/exit animations with timeout fallbacks; global `prefers-reduced-motion` gate.
12
+
13
+ ## 2. Tokens (`src/tokens/tokens.css`)
14
+
15
+ All color tokens are registered as `<color>` `@property` (initial-value = light tier). When `html.dark` flips, the variables interpolate on `<html>` — one transition (behaviors.css) drives the whole-page cross-fade. `.black` (OLED, declared after `.dark`) overrides surface/line/ink neutrals only; gold stays.
16
+
17
+ | Token | Light | Dark | Black | Role |
18
+ | ------------------------- | ----------------------------- | --------------------- | ------------ | ------------------------------------------------------------------------------------------ |
19
+ | `--bg` | `#faf9f6` | `#1b1a18` | `#000000` | page ground |
20
+ | `--surface` | `#ffffff` | `#232120` | `#0b0b0c` | cards / panels |
21
+ | `--surface-2` | `#f1efe8` | `#2c2a27` | `#161617` | hover ground / secondary surface |
22
+ | `--line` | `#e6e2d7` | `#38342f` | `#242426` | hairlines / strokes |
23
+ | `--ink` | `#201d17` | `#eceae4` | `#ececec` | primary text |
24
+ | `--ink-2` | `#6b675c` | `#a8a399` | `#9a9a9a` | secondary text |
25
+ | `--ink-3` | `#716c61` | `#9b958a` | `#828282` | meta text (≥4.5:1) |
26
+ | `--accent` | `#8c6800` | `#fec843` | dark | **text** accent (links / chips) |
27
+ | `--accent-hover` | `#7a5c00` | `#ffd76b` | dark | text accent hover |
28
+ | `--accent-strong` | `#f5c84c` | `#fec843` | dark | **fill** accent (primary buttons / selected pills); text on it must be `--accent-contrast` |
29
+ | `--accent-strong-hover` | `#eebd35` | `#ffd76b` | dark | fill accent hover |
30
+ | `--accent-soft` | `#faf0cf` | `#3a3320` | `#292413` | soft accent ground (tape / icon tiles) |
31
+ | `--accent-contrast` | `#241d0e` | `#241d0e` | dark | text on gold fills (mandatory) |
32
+ | `--highlight-bg` | `#fde68a` | `#4a4020` | `#3d3617` | highlights / selection |
33
+ | `--danger` | `#dc2626` | `#f87171` | dark | destructive / errors |
34
+ | `--warning` | `#b45309` | `#fbbf24` | dark | connecting / pending |
35
+ | `--ok` | `#15803d` | `#4ade80` | dark | success / connected |
36
+ | `--code-bg` / `--code-fg` | `#fbfaf6` / `#24211a` | `#0d0b08` / `#e0d9c8` | dark | code blocks |
37
+ | `--shadow-card` | warm 5% | black 35/30% | black 60/50% | static cards |
38
+ | `--shadow-pop` | warm 7/16% | black 45/55% | — | overlays / hover lift |
39
+ | `--scrim` | `rgb(0 0 0 / 0.6)` both tiers | | | lightbox backdrops (physical black, never flips) |
40
+
41
+ Iron rules: no raw hex / `text-gray-*` outside tokens.css; `--accent` is text-only, `--accent-strong` is fill-only; new tokens are registered in tokens.css first, documented here, then consumed.
42
+
43
+ Fonts (`@theme inline` mappings, zero webfonts):
44
+
45
+ - `--font-sans`: `ui-sans-serif, system-ui, …` — UI
46
+ - `--font-serif`: `"Noto Serif SC", "Source Han Serif SC", …` — headings + long-form
47
+ - `--font-mono`: `ui-monospace, "SF Mono", …` — meta / code / readouts
48
+
49
+ Informational text floor: 12px. Interactive controls: 13px (`text-[13px]`) or 14px. Brand wordmark: `font-serif text-2xl font-semibold tracking-tight` + gold dot (`BRAND_DOT`, 0.25em circle).
50
+
51
+ ## 3. Fragments (`src/styles/fragments.ts`)
52
+
53
+ The single source for recurring Tailwind combinations; components consume `className={FRAGMENT}` and override via `cn(FRAGMENT, "...")`. Family sections (byte-identical across the four repos before packaging) and app-panel additions both live here. Canonical list: `ICON_BTN`, `CARD`, `CARD_HOVER`, `DIVIDE_LIST`, `LIST_ROW`, `BTN_PRIMARY`, `BTN_OUTLINE`, `BTN_GHOST`, `PAPER_STRIP`(+`STRIP_PRIMARY`/`STRIP_PAPER`), `ALERT_DANGER`, `MEDIA_FAILED`, `CHIP`, `MONO_CHIP`, `META`, `EYEBROW`, `BRAND_DOT`, `INPUT`, `PANEL`, `TAPE`, `GHOST_DATE`, `GHOST_TEXT`, `SECTION`, `SECTION_DETAIL`, `PANEL_ROW`, `PANEL_COL`, `SEGMENT`(+`SEGMENT_ITEM_ON/OFF`), `PANEL_STATE_CHIP`, `TOOLBAR`(+`TOOLBAR_DIVIDER`), `STATUS_CHIP`, `MODAL_SCRIM`/`MODAL_PANEL`, `SHEET`.
54
+
55
+ z-index ladder: 20 stage info → 30 sheets → 40 floating chrome → 50 nav/progress → 90 popovers → 100 modals → 110 toasts.
56
+
57
+ ## 4. Paper language (`src/tokens/paper.css`)
58
+
59
+ Utilities cannot express clip-path / pseudo-element paper; these classes are token-driven:
60
+
61
+ - `.paper-note` / `.paper-note--blank` — torn-edge note ground (ruled / blank); clip-path on the element itself, so tape must be a SIBLING node.
62
+ - `.paper-strip` — torn-edge strip on `::before` (keeps focus ring intact); paper color via `[--strip:…]` (see `PAPER_STRIP` + `STRIP_PRIMARY`/`STRIP_PAPER`).
63
+ - `.marker-strip` — torn highlight strip behind headline keywords (position inside `relative inline-block`, text in a following `relative` span).
64
+ - `.hollow-text` — stroked watermark (`--hollow-stroke` override); decorative only, `aria-hidden` mandatory.
65
+ - `.paper-chapter` — hand-drawn divider between sibling sections.
66
+ - `.film-number` — film-sprocket numeral (storyboard strips).
67
+ - `.paper-postmark` — dashed outer + solid inner ring (carries information; NOT aria-hidden).
68
+ - `.zj-range` (base.css) — token-driven range skin (warm line track, gold thumb).
69
+
70
+ Decor physics: whitespace only, `aria-hidden` + `pointer-events-none`, deterministic micro-tilts.
71
+
72
+ ### Tape seed physics (authoritative)
73
+
74
+ `tapePhysics(seed, corner?)` in `src/paper/Tape.tsx` — djb2 (`h = ((h << 5) + h + c) >>> 0`, start 5381), all shifts use logical `>>>` (arithmetic `>>` sign-extends int32 and breaks the range — regression from 2026-10 visual debugging, do not revert):
75
+
76
+ - `top = -(6 + h % 4)` → −6..−9px
77
+ - `rotate = (h % 2 ? −1 : +1) × (4 + (h >>> 4) % 4)` → ±4..7°
78
+ - side composition: `inset = 24 + (h >>> 2) % 5 × 4` px, side = seed parity unless `corner` given
79
+ - center composition: `drift = (h >>> 6) % 5 × 6 − 12` px, `translateX(-50%)` then rotate
80
+
81
+ The component is the family's single implementation; the algorithm must stay verbatim-compatible with the apps' copies until each app migrates.
82
+
83
+ ## 5. Theme (`src/hooks/theme.ts`)
84
+
85
+ Class strategy: `html.dark` (+ `html.black` OLED tier). `data-theme-mode` drives icon visibility (behaviors.css). Storage contract: localStorage `zj-theme` (default) or cookie `simple_style` (server-rendered apps). `THEME_BOOTSTRAP` is the pre-paint inline script (anti-FOUC). Palette transition + `.zjs-palette-anim` stand-down window (350 ms) live in behaviors.css; the JS module only flips classes. `applyThemeStyle` is pure (no persistence); `setThemeStyle` persists + applies.
86
+
87
+ ## 6. Motion
88
+
89
+ - Enter/exit pairs: `fade-up` 0.35s `cubic-bezier(0.22,1,0.36,1)` / `fade-out` 0.16s; overlays `slide-in-right` / `slide-out-right` (ZJSearch).
90
+ - Unmount windows are plain timers sized to the animation (`useExitPresence`), doubling as the timeout fallback (animation contract).
91
+ - Global reduced-motion gate collapses everything to 0.01ms.
92
+
93
+ ## 7. Governance
94
+
95
+ 1. Spec change → DESIGN.md (family) → tokens.css → release.
96
+ 2. New fragment → fragments.ts + this doc §3 → release.
97
+ 3. New component → playground demo + visual check on all three tiers + test if behavior-bearing.
98
+ 4. A release without a green `lint + check + test + build` is forbidden.
@@ -1,4 +1,4 @@
1
- import { n as BRAND_DOT, z as cn } from "../styles-CZ-LL-aM.mjs";
1
+ import { V as cn, n as BRAND_DOT } from "../styles-DhIa1Tm9.mjs";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
 
4
4
  //#region src/brand/Wordmark.tsx
@@ -9,7 +9,7 @@ function Wordmark({ children, className, dotClassName }) {
9
9
  className: cn("font-serif text-2xl font-semibold tracking-tight", className),
10
10
  children: [children, /* @__PURE__ */ jsx("span", {
11
11
  "aria-hidden": "true",
12
- className: cn(BRAND_DOT, "ms-0.5", dotClassName)
12
+ className: cn(BRAND_DOT, dotClassName)
13
13
  })]
14
14
  });
15
15
  }
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
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 react1 from "react";
2
+ import * as react3 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: react1.ForwardRefExoticComponent<ButtonProps & react1.RefAttributes<HTMLButtonElement>>;
12
+ declare const Button: react3.ForwardRefExoticComponent<ButtonProps & react3.RefAttributes<HTMLButtonElement>>;
13
13
  //#endregion
14
14
  //#region src/components/Collapse/Collapse.d.ts
15
15
  /**
@@ -42,7 +42,7 @@ declare function Collapse({
42
42
  className?: string;
43
43
  id?: string;
44
44
  children: ReactNode;
45
- }): react1.JSX.Element | null;
45
+ }): react3.JSX.Element | null;
46
46
  //#endregion
47
47
  //#region src/components/IconButton/IconButton.d.ts
48
48
  interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
@@ -51,7 +51,7 @@ interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
51
51
  active?: boolean;
52
52
  }
53
53
  /** Round icon button (ICON_BTN fragment); `active` lights the accent. */
54
- declare const IconButton: react1.ForwardRefExoticComponent<IconButtonProps & react1.RefAttributes<HTMLButtonElement>>;
54
+ declare const IconButton: react3.ForwardRefExoticComponent<IconButtonProps & react3.RefAttributes<HTMLButtonElement>>;
55
55
  //#endregion
56
56
  //#region src/components/CopyButton/CopyButton.d.ts
57
57
  interface CopyButtonProps extends Omit<IconButtonProps, "label" | "children" | "onClick"> {
@@ -69,7 +69,7 @@ declare function CopyButton({
69
69
  label,
70
70
  feedbackMs,
71
71
  ...props
72
- }: CopyButtonProps): react1.JSX.Element;
72
+ }: CopyButtonProps): react3.JSX.Element;
73
73
  //#endregion
74
74
  //#region src/components/Dropdown/Dropdown.d.ts
75
75
  interface DropdownOption {
@@ -101,7 +101,7 @@ declare function Dropdown({
101
101
  menuClassName,
102
102
  disabled,
103
103
  id
104
- }: DropdownProps): react1.JSX.Element;
104
+ }: DropdownProps): react3.JSX.Element;
105
105
  //#endregion
106
106
  //#region src/components/Kbd/Kbd.d.ts
107
107
  /** Mono chip for keys / states (MONO_CHIP fragment with tighter padding). */
@@ -111,7 +111,7 @@ declare function Kbd({
111
111
  }: {
112
112
  children: ReactNode;
113
113
  className?: string;
114
- }): react1.JSX.Element;
114
+ }): react3.JSX.Element;
115
115
  /** Single-line panel row label (text-sm) — the standard row label inside
116
116
  * toolbar panels. Never wraps: narrow rows scale via column layout instead. */
117
117
  declare const ROW_LABEL = "shrink-0 whitespace-nowrap text-sm text-ink";
@@ -136,7 +136,7 @@ declare function Modal({
136
136
  label,
137
137
  className,
138
138
  children
139
- }: ModalProps): react1.ReactPortal | null;
139
+ }: ModalProps): react3.ReactPortal | null;
140
140
  //#endregion
141
141
  //#region src/components/Popover/Popover.d.ts
142
142
  interface PopoverProps {
@@ -160,7 +160,7 @@ declare function Popover({
160
160
  className,
161
161
  children,
162
162
  anchorRef
163
- }: PopoverProps): react1.JSX.Element | null;
163
+ }: PopoverProps): react3.JSX.Element | null;
164
164
  //#endregion
165
165
  //#region src/components/ProgressBar/ProgressBar.d.ts
166
166
  /** Top-of-page loading bar: 2px accent strip riding the `progress` keyframes
@@ -170,7 +170,7 @@ declare function ProgressBar({
170
170
  className
171
171
  }: {
172
172
  className?: string;
173
- }): react1.JSX.Element;
173
+ }): react3.JSX.Element;
174
174
  //#endregion
175
175
  //#region src/components/Segmented/Segmented.d.ts
176
176
  interface SegmentedProps<T extends string | number> {
@@ -190,7 +190,7 @@ declare function Segmented<T extends string | number>({
190
190
  onChange,
191
191
  label,
192
192
  className
193
- }: SegmentedProps<T>): react1.JSX.Element;
193
+ }: SegmentedProps<T>): react3.JSX.Element;
194
194
  //#endregion
195
195
  //#region src/components/Slider/Slider.d.ts
196
196
  interface SliderProps {
@@ -215,7 +215,7 @@ declare function Slider({
215
215
  label,
216
216
  display,
217
217
  className
218
- }: SliderProps): react1.JSX.Element;
218
+ }: SliderProps): react3.JSX.Element;
219
219
  //#endregion
220
220
  //#region src/components/Switch/Switch.d.ts
221
221
  interface SwitchProps {
@@ -232,12 +232,12 @@ declare function Switch({
232
232
  label,
233
233
  className,
234
234
  disabled
235
- }: SwitchProps): react1.JSX.Element;
235
+ }: SwitchProps): react3.JSX.Element;
236
236
  //#endregion
237
237
  //#region src/components/Toast/Toaster.d.ts
238
238
  /** Toast stack: bottom-center paper cards, fade-up in, auto-removed after 3 s.
239
239
  * Mount once near the app root. */
240
- declare function Toaster(): react1.JSX.Element | null;
240
+ declare function Toaster(): react3.JSX.Element | null;
241
241
  //#endregion
242
242
  //#region src/components/Toast/types.d.ts
243
243
  interface ToastItem {
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as SEGMENT_ITEM_OFF, O as SEGMENT, _ as META, a as BTN_PRIMARY, b as MONO_CHIP, h as LIST_ROW, i as BTN_OUTLINE, j as SEGMENT_ITEM_ON, o as CARD, p as ICON_BTN, r as BTN_GHOST, y as MODAL_SCRIM, z as cn } from "./styles-CZ-LL-aM.mjs";
1
+ import { A as SEGMENT, M as SEGMENT_ITEM_OFF, N as SEGMENT_ITEM_ON, V as cn, _ as META, a as BTN_PRIMARY, b as MODAL_SCRIM, h as LIST_ROW, i as BTN_OUTLINE, o as CARD, p as ICON_BTN, r as BTN_GHOST, x as MONO_CHIP } from "./styles-DhIa1Tm9.mjs";
2
2
  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";
3
3
  import { forwardRef, useEffect, useRef, useState, useSyncExternalStore } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { I as TAPE, z as cn } from "../styles-CZ-LL-aM.mjs";
1
+ import { R as TAPE, V as cn } from "../styles-DhIa1Tm9.mjs";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
 
4
4
  //#region src/paper/Tape.tsx
@@ -29,11 +29,11 @@ declare const DIVIDE_LIST = "divide-y divide-line/70";
29
29
  /** Compact list row (callers compose CARD + DIVIDE_LIST for a card shell) */
30
30
  declare const LIST_ROW = "group flex items-center justify-between gap-4 px-5 py-4 transition-colors hover:bg-surface-2 sm:gap-6 sm:px-6";
31
31
  /** Primary action button (gold pill) */
32
- declare const BTN_PRIMARY = "inline-flex h-10 items-center gap-2 rounded-full bg-accent-strong px-5 text-sm font-semibold text-accent-contrast shadow-card transition-all hover:bg-accent-strong-hover hover:shadow-pop";
32
+ declare const BTN_PRIMARY = "inline-flex h-10 items-center gap-2 rounded-full bg-accent-strong px-5 text-sm font-semibold text-accent-contrast shadow-card transition-all hover:bg-accent-strong-hover hover:shadow-pop disabled:pointer-events-none disabled:opacity-50";
33
33
  /** Secondary action button (outlined pill) */
34
- declare const BTN_OUTLINE = "inline-flex h-10 items-center gap-2 rounded-full border border-line bg-surface px-5 text-sm font-medium text-ink transition-colors hover:bg-surface-2";
34
+ declare const BTN_OUTLINE = "inline-flex h-10 items-center gap-2 rounded-full border border-line bg-surface px-5 text-sm font-medium text-ink transition-colors hover:bg-surface-2 disabled:pointer-events-none disabled:opacity-50";
35
35
  /** Tertiary action button (ghost pill: text only, hover lights the surface) */
36
- declare const BTN_GHOST = "inline-flex h-10 items-center gap-2 rounded-full px-5 text-sm font-medium text-ink-2 transition-colors hover:bg-surface-2 hover:text-ink";
36
+ declare const BTN_GHOST = "inline-flex h-10 items-center gap-2 rounded-full px-5 text-sm font-medium text-ink-2 transition-colors hover:bg-surface-2 hover:text-ink disabled:pointer-events-none disabled:opacity-50";
37
37
  /** Torn-edge paper strip button (pairs with the global .paper-strip background):
38
38
  * the paper color is injected via [--strip:…], slightly tilted, lifted straight
39
39
  * on hover. */
@@ -61,8 +61,8 @@ declare const META = "font-mono text-xs text-ink-3";
61
61
  * floor: eyebrows are decorative but also carry section names. */
62
62
  declare const EYEBROW = "font-mono text-xs uppercase tracking-[0.2em] text-ink-3";
63
63
  /** Brand wordmark dot: the gold full stop after the serif wordmark (em-relative,
64
- * scales with the wordmark font size) */
65
- declare const BRAND_DOT = "inline-block size-[0.25em] rounded-full bg-accent-strong";
64
+ * scales with the wordmark font size; the 0.14em lead is part of the signature) */
65
+ declare const BRAND_DOT = "ms-[0.14em] inline-block size-[0.25em] rounded-full bg-accent-strong";
66
66
  /** Input base: rounded field on the surface ground with an accent focus ring */
67
67
  declare const INPUT = "rounded-lg border border-line bg-surface px-3 text-sm transition-colors focus:ring-accent/30";
68
68
  /** Floating panel (canvas chrome / overlay panels): tighter radius + pop shadow */
@@ -114,5 +114,11 @@ declare const SHEET = "fixed inset-x-0 bottom-0 z-90 rounded-t-2xl border-t bord
114
114
  /** Ghost watermark: hollow outlined large mono text (family GHOST_DATE
115
115
  * language, content-agnostic) — decorative, keep aria-hidden on consumers */
116
116
  declare const GHOST_TEXT = "hollow-text pointer-events-none absolute select-none whitespace-nowrap font-mono font-bold leading-none";
117
+ /** Timeline fold toggle row (ZJSearch/ZJStudio family: think/step headers) */
118
+ declare const META_TOGGLE = "inline-flex min-h-6 items-center gap-1 transition-colors hover:text-ink";
119
+ /** The machine-voice pane (AI reading panes, args debug panes): the boxed
120
+ * ground that says "produced by the pipeline, not the answer" — ZJSearch
121
+ * family fragment, same name same value. */
122
+ declare const READ_PANE = "rounded-lg bg-surface-2/50 py-2 ps-3 pe-10 text-xs leading-relaxed whitespace-pre-wrap break-words text-ink-2";
117
123
  //#endregion
118
- export { ALERT_DANGER, BRAND_DOT, BTN_GHOST, BTN_OUTLINE, BTN_PRIMARY, CARD, CARD_HOVER, CHIP, DIVIDE_LIST, EYEBROW, GHOST_DATE, GHOST_TEXT, ICON_BTN, INPUT, LIST_ROW, MEDIA_FAILED, META, MODAL_PANEL, MODAL_SCRIM, MONO_CHIP, PANEL, PANEL_COL, PANEL_ROW, PANEL_STATE_CHIP, PAPER_STRIP, SECTION, SECTION_DETAIL, SEGMENT, SEGMENT_ITEM, SEGMENT_ITEM_OFF, SEGMENT_ITEM_ON, SHEET, STATUS_CHIP, STRIP_PAPER, STRIP_PRIMARY, TAPE, TOOLBAR, TOOLBAR_DIVIDER, cn };
124
+ export { ALERT_DANGER, BRAND_DOT, BTN_GHOST, BTN_OUTLINE, BTN_PRIMARY, CARD, CARD_HOVER, CHIP, DIVIDE_LIST, EYEBROW, GHOST_DATE, GHOST_TEXT, ICON_BTN, INPUT, LIST_ROW, MEDIA_FAILED, META, META_TOGGLE, MODAL_PANEL, MODAL_SCRIM, MONO_CHIP, PANEL, PANEL_COL, PANEL_ROW, PANEL_STATE_CHIP, PAPER_STRIP, READ_PANE, SECTION, SECTION_DETAIL, SEGMENT, SEGMENT_ITEM, SEGMENT_ITEM_OFF, SEGMENT_ITEM_ON, SHEET, STATUS_CHIP, STRIP_PAPER, STRIP_PRIMARY, TAPE, TOOLBAR, TOOLBAR_DIVIDER, cn };
@@ -1,3 +1,3 @@
1
- import { A as SEGMENT_ITEM_OFF, C as PANEL_ROW, D as SECTION_DETAIL, E as SECTION, F as STRIP_PRIMARY, I as TAPE, L as TOOLBAR, M as SHEET, N as STATUS_CHIP, O as SEGMENT, P as STRIP_PAPER, R as TOOLBAR_DIVIDER, S as PANEL_COL, T as PAPER_STRIP, _ as META, a as BTN_PRIMARY, b as MONO_CHIP, c as CHIP, d as GHOST_DATE, f as GHOST_TEXT, g as MEDIA_FAILED, h as LIST_ROW, i as BTN_OUTLINE, j as SEGMENT_ITEM_ON, k as SEGMENT_ITEM, l as DIVIDE_LIST, m as INPUT, n as BRAND_DOT, o as CARD, p as ICON_BTN, r as BTN_GHOST, s as CARD_HOVER, t as ALERT_DANGER, u as EYEBROW, v as MODAL_PANEL, w as PANEL_STATE_CHIP, x as PANEL, y as MODAL_SCRIM, z as cn } from "../styles-CZ-LL-aM.mjs";
1
+ import { A as SEGMENT, B as TOOLBAR_DIVIDER, C as PANEL_COL, D as READ_PANE, E as PAPER_STRIP, F as STATUS_CHIP, I as STRIP_PAPER, L as STRIP_PRIMARY, M as SEGMENT_ITEM_OFF, N as SEGMENT_ITEM_ON, O as SECTION, P as SHEET, R as TAPE, S as PANEL, T as PANEL_STATE_CHIP, V as cn, _ as META, a as BTN_PRIMARY, b as MODAL_SCRIM, c as CHIP, d as GHOST_DATE, f as GHOST_TEXT, g as MEDIA_FAILED, h as LIST_ROW, i as BTN_OUTLINE, j as SEGMENT_ITEM, k as SECTION_DETAIL, l as DIVIDE_LIST, m as INPUT, n as BRAND_DOT, o as CARD, p as ICON_BTN, r as BTN_GHOST, s as CARD_HOVER, t as ALERT_DANGER, u as EYEBROW, v as META_TOGGLE, w as PANEL_ROW, x as MONO_CHIP, y as MODAL_PANEL, z as TOOLBAR } from "../styles-DhIa1Tm9.mjs";
2
2
 
3
- export { ALERT_DANGER, BRAND_DOT, BTN_GHOST, BTN_OUTLINE, BTN_PRIMARY, CARD, CARD_HOVER, CHIP, DIVIDE_LIST, EYEBROW, GHOST_DATE, GHOST_TEXT, ICON_BTN, INPUT, LIST_ROW, MEDIA_FAILED, META, MODAL_PANEL, MODAL_SCRIM, MONO_CHIP, PANEL, PANEL_COL, PANEL_ROW, PANEL_STATE_CHIP, PAPER_STRIP, SECTION, SECTION_DETAIL, SEGMENT, SEGMENT_ITEM, SEGMENT_ITEM_OFF, SEGMENT_ITEM_ON, SHEET, STATUS_CHIP, STRIP_PAPER, STRIP_PRIMARY, TAPE, TOOLBAR, TOOLBAR_DIVIDER, cn };
3
+ export { ALERT_DANGER, BRAND_DOT, BTN_GHOST, BTN_OUTLINE, BTN_PRIMARY, CARD, CARD_HOVER, CHIP, DIVIDE_LIST, EYEBROW, GHOST_DATE, GHOST_TEXT, ICON_BTN, INPUT, LIST_ROW, MEDIA_FAILED, META, META_TOGGLE, MODAL_PANEL, MODAL_SCRIM, MONO_CHIP, PANEL, PANEL_COL, PANEL_ROW, PANEL_STATE_CHIP, PAPER_STRIP, READ_PANE, SECTION, SECTION_DETAIL, SEGMENT, SEGMENT_ITEM, SEGMENT_ITEM_OFF, SEGMENT_ITEM_ON, SHEET, STATUS_CHIP, STRIP_PAPER, STRIP_PRIMARY, TAPE, TOOLBAR, TOOLBAR_DIVIDER, cn };
@@ -33,11 +33,11 @@ const DIVIDE_LIST = "divide-y divide-line/70";
33
33
  /** Compact list row (callers compose CARD + DIVIDE_LIST for a card shell) */
34
34
  const LIST_ROW = "group flex items-center justify-between gap-4 px-5 py-4 transition-colors hover:bg-surface-2 sm:gap-6 sm:px-6";
35
35
  /** Primary action button (gold pill) */
36
- const BTN_PRIMARY = "inline-flex h-10 items-center gap-2 rounded-full bg-accent-strong px-5 text-sm font-semibold text-accent-contrast shadow-card transition-all hover:bg-accent-strong-hover hover:shadow-pop";
36
+ const BTN_PRIMARY = "inline-flex h-10 items-center gap-2 rounded-full bg-accent-strong px-5 text-sm font-semibold text-accent-contrast shadow-card transition-all hover:bg-accent-strong-hover hover:shadow-pop disabled:pointer-events-none disabled:opacity-50";
37
37
  /** Secondary action button (outlined pill) */
38
- const BTN_OUTLINE = "inline-flex h-10 items-center gap-2 rounded-full border border-line bg-surface px-5 text-sm font-medium text-ink transition-colors hover:bg-surface-2";
38
+ const BTN_OUTLINE = "inline-flex h-10 items-center gap-2 rounded-full border border-line bg-surface px-5 text-sm font-medium text-ink transition-colors hover:bg-surface-2 disabled:pointer-events-none disabled:opacity-50";
39
39
  /** Tertiary action button (ghost pill: text only, hover lights the surface) */
40
- const BTN_GHOST = "inline-flex h-10 items-center gap-2 rounded-full px-5 text-sm font-medium text-ink-2 transition-colors hover:bg-surface-2 hover:text-ink";
40
+ const BTN_GHOST = "inline-flex h-10 items-center gap-2 rounded-full px-5 text-sm font-medium text-ink-2 transition-colors hover:bg-surface-2 hover:text-ink disabled:pointer-events-none disabled:opacity-50";
41
41
  /** Torn-edge paper strip button (pairs with the global .paper-strip background):
42
42
  * the paper color is injected via [--strip:…], slightly tilted, lifted straight
43
43
  * on hover. */
@@ -65,8 +65,8 @@ const META = "font-mono text-xs text-ink-3";
65
65
  * floor: eyebrows are decorative but also carry section names. */
66
66
  const EYEBROW = "font-mono text-xs uppercase tracking-[0.2em] text-ink-3";
67
67
  /** Brand wordmark dot: the gold full stop after the serif wordmark (em-relative,
68
- * scales with the wordmark font size) */
69
- const BRAND_DOT = "inline-block size-[0.25em] rounded-full bg-accent-strong";
68
+ * scales with the wordmark font size; the 0.14em lead is part of the signature) */
69
+ const BRAND_DOT = "ms-[0.14em] inline-block size-[0.25em] rounded-full bg-accent-strong";
70
70
  /** Input base: rounded field on the surface ground with an accent focus ring */
71
71
  const INPUT = "rounded-lg border border-line bg-surface px-3 text-sm transition-colors focus:ring-accent/30";
72
72
  /** Floating panel (canvas chrome / overlay panels): tighter radius + pop shadow */
@@ -118,6 +118,12 @@ const SHEET = "fixed inset-x-0 bottom-0 z-90 rounded-t-2xl border-t border-line
118
118
  /** Ghost watermark: hollow outlined large mono text (family GHOST_DATE
119
119
  * language, content-agnostic) — decorative, keep aria-hidden on consumers */
120
120
  const GHOST_TEXT = "hollow-text pointer-events-none absolute select-none whitespace-nowrap font-mono font-bold leading-none";
121
+ /** Timeline fold toggle row (ZJSearch/ZJStudio family: think/step headers) */
122
+ const META_TOGGLE = "inline-flex min-h-6 items-center gap-1 transition-colors hover:text-ink";
123
+ /** The machine-voice pane (AI reading panes, args debug panes): the boxed
124
+ * ground that says "produced by the pipeline, not the answer" — ZJSearch
125
+ * family fragment, same name same value. */
126
+ const READ_PANE = "rounded-lg bg-surface-2/50 py-2 ps-3 pe-10 text-xs leading-relaxed whitespace-pre-wrap break-words text-ink-2";
121
127
 
122
128
  //#endregion
123
- export { SEGMENT_ITEM_OFF as A, PANEL_ROW as C, SECTION_DETAIL as D, SECTION as E, STRIP_PRIMARY as F, TAPE as I, TOOLBAR as L, SHEET as M, STATUS_CHIP as N, SEGMENT as O, STRIP_PAPER as P, TOOLBAR_DIVIDER as R, PANEL_COL as S, PAPER_STRIP as T, META as _, BTN_PRIMARY as a, MONO_CHIP as b, CHIP as c, GHOST_DATE as d, GHOST_TEXT as f, MEDIA_FAILED as g, LIST_ROW as h, BTN_OUTLINE as i, SEGMENT_ITEM_ON as j, SEGMENT_ITEM as k, DIVIDE_LIST as l, INPUT as m, BRAND_DOT as n, CARD as o, ICON_BTN as p, BTN_GHOST as r, CARD_HOVER as s, ALERT_DANGER as t, EYEBROW as u, MODAL_PANEL as v, PANEL_STATE_CHIP as w, PANEL as x, MODAL_SCRIM as y, cn as z };
129
+ export { SEGMENT as A, TOOLBAR_DIVIDER as B, PANEL_COL as C, READ_PANE as D, PAPER_STRIP as E, STATUS_CHIP as F, STRIP_PAPER as I, STRIP_PRIMARY as L, SEGMENT_ITEM_OFF as M, SEGMENT_ITEM_ON as N, SECTION as O, SHEET as P, TAPE as R, PANEL as S, PANEL_STATE_CHIP as T, cn as V, META as _, BTN_PRIMARY as a, MODAL_SCRIM as b, CHIP as c, GHOST_DATE as d, GHOST_TEXT as f, MEDIA_FAILED as g, LIST_ROW as h, BTN_OUTLINE as i, SEGMENT_ITEM as j, SECTION_DETAIL as k, DIVIDE_LIST as l, INPUT as m, BRAND_DOT as n, CARD as o, ICON_BTN as p, BTN_GHOST as r, CARD_HOVER as s, ALERT_DANGER as t, EYEBROW as u, META_TOGGLE as v, PANEL_ROW as w, MONO_CHIP as x, MODAL_PANEL as y, TOOLBAR as z };
@@ -1,72 +1,77 @@
1
1
  /* The family paper language (DESIGN.md §7): torn-edge note paper, strip
2
- buttons, marker highlights, hollow watermarks, postmarks, chapter rules
3
- and film-sprocket numerals. Pure CSS — a jagged clip-path polygon on a
2
+ buttons, marker highlights, hollow watermarks, chapter rules and
3
+ film-sprocket numerals. Pure CSS — a jagged clip-path polygon on a
4
4
  background layer, drop-shadow instead of box-shadow (clip-path cuts the
5
5
  box). Decorations follow the §7 physics: whitespace only, aria-hidden +
6
6
  pointer-events-none, deterministic micro-tilts (never random — SSR and
7
- hydration must agree; the Tape component carries the seed algorithm). */
7
+ hydration must agree; the Tape component carries the seed algorithm).
8
8
 
9
- @layer components {
10
- /* Torn-edge note paper: ruled-line texture over --surface. The clip-path
11
- is on the element itself, so tape and other overlap decorations must be
12
- SIBLING nodes positioned over it, never children (they would be cut). */
13
- .paper-note {
14
- background:
15
- repeating-linear-gradient(transparent 0 30px, color-mix(in oklab, var(--line) 60%, transparent) 30px 31px),
16
- var(--surface);
17
- clip-path: polygon(
18
- 1% 2%,
19
- 7% 0.5%,
20
- 16% 1.8%,
21
- 29% 0%,
22
- 42% 1.8%,
23
- 56% 0.4%,
24
- 69% 1.8%,
25
- 83% 0%,
26
- 94% 1.6%,
27
- 99.2% 3%,
28
- 100% 13%,
29
- 99.4% 28%,
30
- 100% 44%,
31
- 99% 61%,
32
- 100% 77%,
33
- 99.3% 91%,
34
- 97.2% 100%,
35
- 86% 99%,
36
- 71% 100%,
37
- 56% 98.6%,
38
- 41% 100%,
39
- 27% 99.2%,
40
- 13% 100%,
41
- 3.2% 98.6%,
42
- 0% 91%,
43
- 1.4% 75%,
44
- 0% 59%,
45
- 1.8% 43%,
46
- 0.4% 27%,
47
- 1% 13%
48
- );
49
- filter: drop-shadow(0 10px 18px color-mix(in oklab, var(--ink) 14%, transparent));
50
- }
9
+ Written as Tailwind v4 @utility declarations (imported CSS is processed by
10
+ the consumer's Tailwind pipeline), so variants like hover:paper-strip work
11
+ and app-level @utility overrides of the same name win cleanly. */
12
+
13
+ /* Torn-edge note paper: ruled-line texture over --surface. The clip-path
14
+ is on the element itself, so tape and other overlap decorations must be
15
+ SIBLING nodes positioned over it, never children (they would be cut). */
16
+ @utility paper-note {
17
+ background:
18
+ repeating-linear-gradient(transparent 0 30px, color-mix(in oklab, var(--line) 60%, transparent) 30px 31px),
19
+ var(--surface);
20
+ clip-path: polygon(
21
+ 1% 2%,
22
+ 7% 0.5%,
23
+ 16% 1.8%,
24
+ 29% 0%,
25
+ 42% 1.8%,
26
+ 56% 0.4%,
27
+ 69% 1.8%,
28
+ 83% 0%,
29
+ 94% 1.6%,
30
+ 99.2% 3%,
31
+ 100% 13%,
32
+ 99.4% 28%,
33
+ 100% 44%,
34
+ 99% 61%,
35
+ 100% 77%,
36
+ 99.3% 91%,
37
+ 97.2% 100%,
38
+ 86% 99%,
39
+ 71% 100%,
40
+ 56% 98.6%,
41
+ 41% 100%,
42
+ 27% 99.2%,
43
+ 13% 100%,
44
+ 3.2% 98.6%,
45
+ 0% 91%,
46
+ 1.4% 75%,
47
+ 0% 59%,
48
+ 1.8% 43%,
49
+ 0.4% 27%,
50
+ 1% 13%
51
+ );
52
+ filter: drop-shadow(0 10px 18px color-mix(in oklab, var(--ink) 14%, transparent));
53
+ }
51
54
 
52
- /* Blank variant of the note ground: the same torn edge and drop-shadow,
53
- NO ruled lines. The ruled ground only works for STATIC lists — an
54
- interactive note whose middle scrolls would drift text across fixed
55
- lines, so it pins on the blank slip instead. */
55
+ /* Blank variant of the note ground: the same torn edge and drop-shadow,
56
+ NO ruled lines. The ruled ground only works for STATIC lists — an
57
+ interactive note whose middle scrolls would drift text across fixed
58
+ lines, so it pins on the blank slip instead. (Plain class: the `--`
59
+ suffix is not valid @utility syntax.) */
60
+ @layer components {
56
61
  .paper-note--blank {
57
62
  background: var(--surface);
58
63
  }
64
+ }
59
65
 
60
- /* Torn-edge strip button: the paper is a ::before layer so the element's
61
- own focus ring stays intact; the shadow rides a filter to follow the
62
- torn outline. Paper colour comes in via --strip (fallback --surface). */
63
- .paper-strip {
64
- position: relative;
65
- isolation: isolate;
66
- filter: drop-shadow(1px 2px 0 color-mix(in oklab, var(--ink) 10%, transparent));
67
- }
66
+ /* Torn-edge strip button: the paper is a ::before layer so the element's
67
+ own focus ring stays intact; the shadow rides a filter to follow the
68
+ torn outline. Paper colour comes in via --strip (fallback --surface). */
69
+ @utility paper-strip {
70
+ position: relative;
71
+ isolation: isolate;
72
+ filter: drop-shadow(1px 2px 0 color-mix(in oklab, var(--ink) 10%, transparent));
68
73
 
69
- .paper-strip::before {
74
+ &::before {
70
75
  content: "";
71
76
  position: absolute;
72
77
  inset: 0;
@@ -100,57 +105,57 @@
100
105
  );
101
106
  }
102
107
 
103
- .paper-strip:hover {
108
+ &:hover {
104
109
  filter: drop-shadow(2px 4px 0 color-mix(in oklab, var(--ink) 14%, transparent));
105
110
  }
111
+ }
106
112
 
107
- /* Marker-pen highlight behind a headline keyword: a torn gold strip sweeping
108
- the lower half of the text. In the physical world a hand-pressed tape
109
- never sits parallel to the baseline, hence the -0.5° tilt. Position it
110
- as the first child of a `relative inline-block` span; the text itself
111
- goes in a following `relative` span. */
112
- .marker-strip {
113
- clip-path: polygon(
114
- 0 14%,
115
- 6% 4%,
116
- 15% 10%,
117
- 28% 2%,
118
- 42% 11%,
119
- 57% 5%,
120
- 72% 11%,
121
- 88% 3%,
122
- 100% 9%,
123
- 97% 36%,
124
- 100% 61%,
125
- 98% 83%,
126
- 93% 100%,
127
- 79% 92%,
128
- 63% 100%,
129
- 46% 93%,
130
- 30% 100%,
131
- 14% 93%,
132
- 2% 100%,
133
- 0 70%,
134
- 3% 40%
135
- );
136
- transform: rotate(-0.5deg);
137
- }
113
+ /* Marker-pen highlight behind a headline keyword: a torn gold strip sweeping
114
+ the lower half of the text. In the physical world a hand-pressed tape
115
+ never sits parallel to the baseline, hence the -0.5° tilt. Position it
116
+ as the first child of a `relative inline-block` span; the text itself
117
+ goes in a following `relative` span. */
118
+ @utility marker-strip {
119
+ clip-path: polygon(
120
+ 0 14%,
121
+ 6% 4%,
122
+ 15% 10%,
123
+ 28% 2%,
124
+ 42% 11%,
125
+ 57% 5%,
126
+ 72% 11%,
127
+ 88% 3%,
128
+ 100% 9%,
129
+ 97% 36%,
130
+ 100% 61%,
131
+ 98% 83%,
132
+ 93% 100%,
133
+ 79% 92%,
134
+ 63% 100%,
135
+ 46% 93%,
136
+ 30% 100%,
137
+ 14% 93%,
138
+ 2% 100%,
139
+ 0 70%,
140
+ 3% 40%
141
+ );
142
+ transform: rotate(-0.5deg);
143
+ }
138
144
 
139
- /* Hollow stroked watermark text: transparent fill, stroke only; the stroke
140
- color defaults to soft gold and can be overridden via --hollow-stroke.
141
- Pure decoration — consumers must aria-hidden it. */
142
- .hollow-text {
143
- color: transparent;
144
- -webkit-text-stroke: 1px var(--hollow-stroke, var(--accent-soft));
145
- }
145
+ /* Hollow stroked watermark text: transparent fill, stroke only; the stroke
146
+ color defaults to soft gold and can be overridden via --hollow-stroke.
147
+ Pure decoration — consumers must aria-hidden it. */
148
+ @utility hollow-text {
149
+ color: transparent;
150
+ -webkit-text-stroke: 1px var(--hollow-stroke, var(--accent-soft));
151
+ }
146
152
 
147
- /* Hand-drawn section dividers: a hairline slightly rotated between sibling
148
- sections, mimicking the journal divider between paper pages. */
149
- .paper-chapter {
150
- position: relative;
151
- }
153
+ /* Hand-drawn section dividers: a hairline slightly rotated between sibling
154
+ sections, mimicking the journal divider between paper pages. */
155
+ @utility paper-chapter {
156
+ position: relative;
152
157
 
153
- .paper-chapter + .paper-chapter::before {
158
+ & + &::before {
154
159
  content: "";
155
160
  position: absolute;
156
161
  inset-inline: 1rem;
@@ -160,29 +165,31 @@
160
165
  transform: rotate(-0.4deg);
161
166
  opacity: 0.7;
162
167
  }
168
+ }
163
169
 
164
- /* Film sprocket number (storyboard numerals): film edges left/right +
165
- perforation rows top/bottom; the color follows currentColor, and
166
- consumers toggle the active state with text color classes. */
167
- .film-number {
168
- display: inline-grid;
169
- place-items: center;
170
- min-width: 1.65rem;
171
- height: 1.7rem;
172
- padding-inline: 0.2rem;
173
- border-inline: 1px solid currentColor;
174
- background:
175
- repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 6px) left top / 100% 2px repeat-x,
176
- repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 6px) left bottom / 100% 2px repeat-x;
177
- }
170
+ /* Film sprocket number (storyboard numerals): film edges left/right +
171
+ perforation rows top/bottom; the color follows currentColor, and
172
+ consumers toggle the active state with text color classes. */
173
+ @utility film-number {
174
+ display: inline-grid;
175
+ place-items: center;
176
+ min-width: 1.65rem;
177
+ height: 1.7rem;
178
+ padding-inline: 0.2rem;
179
+ border-inline: 1px solid currentColor;
180
+ background:
181
+ repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 6px) left top / 100% 2px repeat-x,
182
+ repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 6px) left bottom / 100% 2px repeat-x;
183
+ }
178
184
 
179
- /* Round postmark (the SEALED stamp on a sealed letter): a dashed outer ring
180
- + a solid inner ring via ::before, sandwiching the real metadata text at
181
- the center (date/label) — unlike the decorative pieces above, the postmark
182
- carries information and is not aria-hidden. Size and the deterministic
183
- rotation come from the consumer. Ships its own display, so it must live
184
- in the components layer for utilities (hidden / sm:grid) to be able to
185
- override it. */
185
+ /* Round postmark (the SEALED stamp on a sealed letter): a dashed outer ring
186
+ + a solid inner ring via ::before, sandwiching the real metadata text at
187
+ the center (date/label) — unlike the decorative pieces above, the postmark
188
+ carries information and is not aria-hidden. Size and the deterministic
189
+ rotation come from the consumer. Ships its own display, so it must live
190
+ in the components layer for utilities (hidden / sm:grid) to be able to
191
+ override it. */
192
+ @layer components {
186
193
  .paper-postmark {
187
194
  position: relative;
188
195
  display: grid;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hezhijie0327/zjdesign",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "ZJ Design — the shared design system of the ZJ product family (warm paper / ink / amber-gold). Tokens, Tailwind fragments, hooks and React components.",
5
5
  "keywords": [
6
6
  "design-system",
@@ -52,7 +52,11 @@
52
52
  "main": "./dist/index.mjs",
53
53
  "types": "./dist/index.d.mts",
54
54
  "files": [
55
- "dist"
55
+ "dist",
56
+ "README.md",
57
+ "LICENSE",
58
+ "DESIGN.md",
59
+ "AGENTS.md"
56
60
  ],
57
61
  "scripts": {
58
62
  "build": "tsdown",