@nqlib/nqui 0.6.0 → 0.6.1

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.
Files changed (32) hide show
  1. package/dist/{command-palette-DhoWGyk_.js → command-palette-CHUiGh5m.js} +2 -2
  2. package/dist/{command-palette-D24rOeE6.cjs → command-palette-DsvP2QNP.cjs} +2 -2
  3. package/dist/command.cjs.js +1 -1
  4. package/dist/command.es.js +1 -1
  5. package/dist/components/custom/table-of-contents.d.ts +2 -2
  6. package/dist/components/custom/table-of-contents.d.ts.map +1 -1
  7. package/dist/components/ui/combobox.d.ts +5 -3
  8. package/dist/components/ui/combobox.d.ts.map +1 -1
  9. package/dist/{debug-panel-BjfW-YVo.js → debug-panel-BcYzsTp2.js} +1 -1
  10. package/dist/{debug-panel-CpqsKuxd.cjs → debug-panel-mwtujy5J.cjs} +1 -1
  11. package/dist/debug.cjs.js +1 -1
  12. package/dist/debug.es.js +1 -1
  13. package/dist/{input-shared-CDgy_NdJ.cjs → input-shared-C9Try5fg.cjs} +1 -1
  14. package/dist/{input-shared-NnOiyHpu.js → input-shared-DXf3Edqt.js} +1 -1
  15. package/dist/lib/floating-surface.d.ts +6 -2
  16. package/dist/lib/floating-surface.d.ts.map +1 -1
  17. package/dist/nqui.cjs.js +10 -10
  18. package/dist/nqui.es.js +17 -16
  19. package/dist/styles.css +9 -9
  20. package/docs/components/README.md +2 -0
  21. package/docs/components/nqui-combobox.md +15 -2
  22. package/docs/components/nqui-command-palette.md +7 -0
  23. package/docs/components/nqui-command.md +41 -0
  24. package/docs/nqui-skills/ELEVATION.md +33 -6
  25. package/docs/nqui-skills/RECIPES.md +85 -0
  26. package/docs/nqui-skills/_claude-commands/README.md +50 -0
  27. package/docs/nqui-skills/_claude-commands/design/SKILL.md +111 -0
  28. package/docs/nqui-skills/_claude-commands/edit/SKILL.md +97 -0
  29. package/docs/nqui-skills/nqui-components/SKILL.md +1 -0
  30. package/package.json +1 -1
  31. package/scripts/build-styles.js +4 -3
  32. package/scripts/install-claude-skills.js +46 -7
@@ -64,6 +64,7 @@ Before picking components, read **`../COMPOSITION.md`** (or `docs/nqui-skills/CO
64
64
  ## Key Conventions
65
65
 
66
66
  - React 18+ and 19 supported
67
+ - **cmdk list rows:** nqui ≥ 0.6.1 uses `aria-selected:bg-accent` in `floatingListItemInteractive`. Do not add custom `data-selected:bg-accent` on `CommandItem` (React 19 + `[data-selected]` highlights every row). See `docs/components/nqui-command-palette.md`.
67
68
  - Control sizes: sm=h-6, default=h-7, lg=h-8
68
69
  - Enhanced vs Core: default is enhanced; use Core* for plain
69
70
  - Z-index: CSS vars from elevation.css only
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nqlib/nqui",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "A React component library with enhanced UI components and developer tools",
5
5
  "type": "module",
6
6
  "main": "./dist/nqui.cjs.js",
@@ -103,7 +103,8 @@ function extractStandaloneCSS() {
103
103
  // These need to be preserved in the final output for zero-config setup
104
104
  // Match pattern: /* comment */ @source inline( ... ); (multiline)
105
105
  // Tailwind v4 requires: @source inline("class1 class2 class3");
106
- const sourceInlineRegex = /\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\/\s*@source\s+inline\([\s\S]*?\)\s*;/g;
106
+ // Match only real directives (not comments that mention "@source inline")
107
+ const sourceInlineRegex = /\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\/\s*@source\s+inline\("[^"]*"\)\s*;/g;
107
108
  const sourceInlineMatches = indexCss.match(sourceInlineRegex) || [];
108
109
 
109
110
  // Convert multiline format to single-line format required by Tailwind v4
@@ -145,10 +146,10 @@ function extractStandaloneCSS() {
145
146
  .replace(/\/\*\s*Import elevation system\s*\*\//g, '')
146
147
  .replace(/\/\*\s*Hit-area utilities \(expanded pointer targets\)\s*\*\/\s*\n/g, '')
147
148
  // Remove @source inline() directives (already extracted above) - must match multiline
148
- .replace(/\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\/\s*@source\s+inline\([\s\S]*?\)\s*;/g, '')
149
+ .replace(/\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\/\s*@source\s+inline\("[^"]*"\)\s*;/g, '')
149
150
  // Remove other @source directives (non-inline ones)
150
151
  .replace(/@source\s+(?!inline\()[^;]+;?\s*\n/g, '')
151
- .replace(/@custom-variant\s+[^;]+;?\s*\n/g, '');
152
+ .replace(/@custom-variant\s+[^\n]+;\s*\n/g, '');
152
153
 
153
154
  if (hitAreaCss) {
154
155
  indexCss = indexCss.replace(
@@ -19,6 +19,7 @@ const SKILLS_SOURCE = join(root, 'docs', 'nqui-skills');
19
19
  const COMPONENTS_SOURCE = join(root, 'docs', 'components');
20
20
  const CLAUDE_SKILLS = join(homedir(), '.claude', 'skills');
21
21
 
22
+ // Root docs that live in the nqui hub directory (~/.claude/skills/nqui/)
22
23
  const HUB_FILES = [
23
24
  'SKILL.md',
24
25
  'README.md',
@@ -26,8 +27,21 @@ const HUB_FILES = [
26
27
  'COMPOSITION.md',
27
28
  'COMPONENTS_INDEX.md',
28
29
  'READ_BUDGET.md',
30
+ // Apple-craft + production AI skills (v0.6+)
31
+ 'RECIPES.md',
32
+ 'STATES.md',
33
+ 'WRITING.md',
34
+ 'MOTION.md',
35
+ 'ELEVATION.md',
36
+ 'AGENT_PROMPT.md',
37
+ 'EVAL.md',
38
+ 'THEMING.md',
39
+ 'MIGRATION.md',
29
40
  ];
30
41
 
42
+ // Slash-command entry points (/design, /edit) — bundled in docs/_claude-commands/
43
+ const SLASH_COMMANDS = ['design', 'edit'];
44
+
31
45
  function ensureDir(dir) {
32
46
  if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
33
47
  }
@@ -86,20 +100,45 @@ export async function installClaudeSkills({ force = true } = {}) {
86
100
  console.log('✅', name, '→', dest);
87
101
  }
88
102
 
89
- const componentsDest = join(CLAUDE_SKILLS, 'nqui-components', 'components');
103
+ // Per-component docs go in the hub at nqui/components/ (where AGENT_PROMPT.md
104
+ // and READ_BUDGET.md route to). Also keep a copy at nqui-components/components/
105
+ // for backward compatibility with the previous routing.
90
106
  if (existsSync(COMPONENTS_SOURCE)) {
91
- if (existsSync(componentsDest) && !force) {
92
- console.log('⏭️ nqui-components/components — use --force to overwrite');
107
+ const hubComponentsDest = join(CLAUDE_SKILLS, 'nqui', 'components');
108
+ const legacyComponentsDest = join(CLAUDE_SKILLS, 'nqui-components', 'components');
109
+ if (existsSync(hubComponentsDest) && !force) {
110
+ console.log('⏭️ nqui/components — use --force to overwrite');
93
111
  } else {
94
- ensureDir(join(CLAUDE_SKILLS, 'nqui-components'));
95
- cpSync(COMPONENTS_SOURCE, componentsDest, { recursive: true, force: true });
96
- console.log('✅ Component docs →', componentsDest);
112
+ ensureDir(join(CLAUDE_SKILLS, 'nqui'));
113
+ cpSync(COMPONENTS_SOURCE, hubComponentsDest, { recursive: true, force: true });
114
+ console.log('✅ Component docs →', hubComponentsDest);
115
+ }
116
+ if (existsSync(join(CLAUDE_SKILLS, 'nqui-components'))) {
117
+ cpSync(COMPONENTS_SOURCE, legacyComponentsDest, { recursive: true, force: true });
118
+ }
119
+ }
120
+
121
+ // Slash command entry points — /design and /edit become Claude Code tools
122
+ const slashSrc = join(SKILLS_SOURCE, '_claude-commands');
123
+ if (existsSync(slashSrc)) {
124
+ for (const cmd of SLASH_COMMANDS) {
125
+ const cmdSrc = join(slashSrc, cmd);
126
+ const cmdDest = join(CLAUDE_SKILLS, cmd);
127
+ if (!existsSync(cmdSrc)) continue;
128
+ if (existsSync(cmdDest) && !force) {
129
+ console.log(`⏭️ /${cmd} — use --force to overwrite`);
130
+ continue;
131
+ }
132
+ cpSync(cmdSrc, cmdDest, { recursive: true, force: true });
133
+ console.log(`✅ /${cmd} →`, cmdDest);
97
134
  }
98
135
  }
99
136
 
100
137
  console.log('\n📚 Claude skills installed under ~/.claude/skills/');
101
138
  console.log(' Restart Claude Code or Claude Desktop to pick them up.');
102
- console.log(' Hub: /nqui · Components: /nqui-components · Design: /nqui-design-system');
139
+ console.log(' Try: /design [a login form] — build a new screen');
140
+ console.log(' /edit [the sprint page] — refine existing UI');
141
+ console.log(' Hub: /nqui · Components: /nqui-components · Tokens: /nqui-design-system');
103
142
  }
104
143
 
105
144
  const force = process.argv.includes('--force') || !process.argv.includes('--no-force');