@zmzai/theme 0.9.8 → 0.9.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zmzai/theme",
3
- "version": "0.9.8",
3
+ "version": "0.9.10",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "zmzai 全品牌设计系统 — Radix UI + framer-motion + Tailwind v4 + MiSans",
@@ -60,13 +60,6 @@
60
60
  "README.md",
61
61
  "LICENSE"
62
62
  ],
63
- "scripts": {
64
- "build": "tsc -p tsconfig.json --noEmit",
65
- "typecheck": "tsc --noEmit",
66
- "playground": "vite playground --port 5174",
67
- "prepublishOnly": "pnpm typecheck && pnpm run guard:colors",
68
- "guard:colors": "node scripts/check-color-literals.mjs"
69
- },
70
63
  "peerDependencies": {
71
64
  "react": "^19.0.0",
72
65
  "react-dom": "^19.0.0",
@@ -106,5 +99,10 @@
106
99
  "remark-gfm": "^4.0.1",
107
100
  "tailwind-merge": "^2.5.0"
108
101
  },
109
- "packageManager": "pnpm@10.34.5+sha512.a4ee05f2f73658255bd6a89859c065a45c28a57daefae2c893a168ee2b73168c37b91e83e57ea67654ad03f03031746430e8bce38e362e042605fb8abc80192e"
110
- }
102
+ "scripts": {
103
+ "build": "tsc -p tsconfig.json --noEmit",
104
+ "typecheck": "tsc --noEmit",
105
+ "playground": "vite playground --port 5174",
106
+ "guard:colors": "node scripts/check-color-literals.mjs"
107
+ }
108
+ }
@@ -60,7 +60,7 @@ function SidebarSections({
60
60
  onClick={onNavigate}
61
61
  aria-current={active ? "page" : undefined}
62
62
  className={`flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] transition-colors ${
63
- active ? "bg-surface font-medium text-accent-readable" : "text-muted hover:bg-surface hover:text-accent"
63
+ active ? "bg-surface-3 font-medium text-ink" : "text-ink-2 hover:bg-surface-2 hover:text-ink"
64
64
  }`}
65
65
  >
66
66
  <Icon name={item.icon} size={13} />
@@ -171,7 +171,7 @@ export function AppShell({
171
171
  type="button"
172
172
  aria-label="打开导航"
173
173
  onClick={() => setDrawerOpen(true)}
174
- className="rounded-md p-1 text-muted hover:bg-surface hover:text-accent lg:hidden"
174
+ className="rounded-md p-1 text-ink-2 hover:bg-surface hover:text-accent lg:hidden"
175
175
  >
176
176
  <Icon name="menu" size={16} />
177
177
  </button>
@@ -182,7 +182,7 @@ export function AppShell({
182
182
  <button
183
183
  type="button"
184
184
  onClick={() => setPaletteOpen(true)}
185
- className="flex items-center gap-2 rounded-md border border-line px-2.5 py-1 font-mono text-[11px] text-muted transition-colors hover:border-accent hover:text-accent"
185
+ className="flex items-center gap-2 rounded-md border border-line px-2.5 py-1 font-mono text-[11px] text-ink-2 transition-colors hover:border-accent hover:text-accent"
186
186
  aria-label="打开命令面板"
187
187
  >
188
188
  <Icon name="search" size={12} />
@@ -88,7 +88,7 @@ export function CommandPalette({ open, onClose, items, placeholder = "搜索页
88
88
  aria-label="命令面板"
89
89
  >
90
90
  <div className="flex items-center gap-2 border-b border-line px-4 py-3">
91
- <Icon name="search" size={14} className="text-muted" />
91
+ <Icon name="search" size={14} className="text-ink-2" />
92
92
  <input
93
93
  ref={inputRef}
94
94
  value={query}
@@ -110,10 +110,10 @@ export function CommandPalette({ open, onClose, items, placeholder = "搜索页
110
110
  onClick={() => execute(index)}
111
111
  onMouseEnter={() => setCursor(index)}
112
112
  className={`flex w-full items-center gap-2.5 px-4 py-2 text-left text-sm transition-colors ${
113
- index === cursor ? "bg-surface text-accent-readable" : "text-ink-2"
113
+ index === cursor ? "bg-surface-3 text-ink" : "text-ink-2"
114
114
  }`}
115
115
  >
116
- {item.icon ? <Icon name={item.icon} size={13} className="shrink-0 text-muted" /> : null}
116
+ {item.icon ? <Icon name={item.icon} size={13} className="shrink-0 text-ink-2" /> : null}
117
117
  <span className="min-w-0 flex-1 truncate">{item.label}</span>
118
118
  {item.hint ? <span className="shrink-0 font-mono text-[11px] text-ink-3">{item.hint}</span> : null}
119
119
  </button>
@@ -120,7 +120,7 @@ export function StepList({ steps, active, onSelect, className }: StepListProps)
120
120
  <div>
121
121
  <div className="font-semibold">{s.title}</div>
122
122
  {s.desc && (
123
- <div className={cn("text-xs mt-0.5", i === active ? "text-paper/70" : "text-muted")}>
123
+ <div className={cn("text-xs mt-0.5", i === active ? "text-bg/70" : "text-ink-2")}>
124
124
  {s.desc}
125
125
  </div>
126
126
  )}
@@ -224,7 +224,7 @@ export interface CheckListProps {
224
224
 
225
225
  export function CheckList({ items, boxed = true, className }: CheckListProps) {
226
226
  return (
227
- <div className={cn(boxed && "border border-line bg-paper p-8", className)}>
227
+ <div className={cn(boxed && "border border-line bg-bg p-8", className)}>
228
228
  {items.map((item, i) => (
229
229
  <div key={i} className="check-row">
230
230
  <span className="check-mark">✓</span>
@@ -314,7 +314,7 @@ export function StatusBadge({ status, label, className }: StatusBadgeProps) {
314
314
  return (
315
315
  <span
316
316
  className={cn(
317
- "inline-flex items-center gap-1.5 font-mono text-[10px] tracking-widest uppercase text-muted",
317
+ "inline-flex items-center gap-1.5 font-mono text-[10px] tracking-widest uppercase text-ink-2",
318
318
  className,
319
319
  )}
320
320
  >
@@ -82,7 +82,7 @@ export function Navbar({ sublabel, brand, children, actions, badge, brandHref, m
82
82
  return (
83
83
  <header
84
84
  className={cn(
85
- "sticky top-0 z-40 flex h-14 items-center justify-between gap-4 border-b border-line bg-paper/80 px-5 backdrop-blur-md",
85
+ "sticky top-0 z-40 flex h-14 items-center justify-between gap-4 border-b border-line bg-bg/80 px-5 backdrop-blur-md",
86
86
  className
87
87
  )}
88
88
  >
@@ -119,7 +119,7 @@ export function Navbar({ sublabel, brand, children, actions, badge, brandHref, m
119
119
  {open ? (
120
120
  <div
121
121
  onClick={() => setOpen(false)}
122
- className="absolute right-0 top-full mt-2 flex w-60 flex-col gap-1 rounded-xl border border-line bg-paper p-2 shadow-lg"
122
+ className="absolute right-0 top-full mt-2 flex w-60 flex-col gap-1 rounded-xl border border-line bg-bg p-2 shadow-lg"
123
123
  >
124
124
  {children ? (
125
125
  <nav
@@ -54,6 +54,8 @@ export function formatToolSummary(tool: string, input: unknown): string | null {
54
54
  const pattern = str("pattern") ?? str("query") ?? str("q");
55
55
  const url = str("url");
56
56
  const desc = str("description") ?? str("prompt") ?? str("task");
57
+ // grep 的范围字段是 pathPattern(framework builtins),与通用 path 分开取
58
+ const scope = str("pathPattern") ?? str("scope");
57
59
  const cap = (s: string): string => (s.length > 80 ? `${s.slice(0, 80)}…` : s);
58
60
  const verb = tool.charAt(0).toUpperCase() + tool.slice(1);
59
61
  switch (tool) {
@@ -62,7 +64,7 @@ export function formatToolSummary(tool: string, input: unknown): string | null {
62
64
  case "glob":
63
65
  return pattern ? `Glob ${cap(pattern)}${path ? ` in ${cap(path)}` : ""}` : path ? `Glob ${cap(path)}` : null;
64
66
  case "grep":
65
- return pattern ? `Grep ${cap(pattern)}${path ? ` in ${cap(path)}` : ""}` : path ? `Grep ${cap(path)}` : null;
67
+ return pattern ? `Grep ${cap(pattern)}${scope ? ` in ${cap(scope)}` : path ? ` in ${cap(path)}` : ""}` : path ? `Grep ${cap(path)}` : null;
66
68
  case "edit":
67
69
  case "write":
68
70
  return path ? `${tool === "edit" ? "Edit" : "Write"} ${cap(path)}` : null;