@nqlib/nqui 0.5.5 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/theme-appearance-menu.d.ts +9 -0
- package/dist/components/theme-appearance-menu.d.ts.map +1 -0
- package/dist/components/theme-toggle.d.ts +2 -0
- package/dist/components/theme-toggle.d.ts.map +1 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/elevation-debate.html +286 -0
- package/dist/nqui.cjs.js +15 -13
- package/dist/nqui.es.js +2743 -2638
- package/dist/styles.css +169 -270
- package/docs/components/README.md +2 -1
- package/docs/components/nqui-scroll-area.md +69 -0
- package/docs/nqui-skills/AGENT_PROMPT.md +190 -0
- package/docs/nqui-skills/COMPONENTS_INDEX.md +51 -1
- package/docs/nqui-skills/COMPOSITION.md +321 -0
- package/docs/nqui-skills/ELEVATION.md +154 -0
- package/docs/nqui-skills/EVAL.md +148 -0
- package/docs/nqui-skills/HUMAN_GUIDE.md +18 -0
- package/docs/nqui-skills/MIGRATION.md +133 -0
- package/docs/nqui-skills/MOTION.md +189 -0
- package/docs/nqui-skills/README.md +2 -0
- package/docs/nqui-skills/READ_BUDGET.md +60 -0
- package/docs/nqui-skills/RECIPES.md +735 -0
- package/docs/nqui-skills/SKILL.md +58 -1
- package/docs/nqui-skills/STATES.md +154 -0
- package/docs/nqui-skills/THEMING.md +203 -0
- package/docs/nqui-skills/WRITING.md +205 -0
- package/docs/nqui-skills/adapt/SKILL.md +5 -2
- package/docs/nqui-skills/animate/SKILL.md +5 -2
- package/docs/nqui-skills/audit/SKILL.md +5 -2
- package/docs/nqui-skills/bolder/SKILL.md +5 -2
- package/docs/nqui-skills/clarify/SKILL.md +5 -2
- package/docs/nqui-skills/colorize/SKILL.md +5 -2
- package/docs/nqui-skills/delight/SKILL.md +5 -4
- package/docs/nqui-skills/distill/SKILL.md +5 -2
- package/docs/nqui-skills/impeccable/SKILL.md +0 -16
- package/docs/nqui-skills/impeccable/reference/INDEX.md +26 -0
- package/docs/nqui-skills/layout/SKILL.md +5 -2
- package/docs/nqui-skills/nqui-components/SKILL.md +32 -9
- package/docs/nqui-skills/nqui-composition/SKILL.md +148 -0
- package/docs/nqui-skills/nqui-data-tables/SKILL.md +127 -0
- package/docs/nqui-skills/nqui-design-system/SKILL.md +22 -1
- package/docs/nqui-skills/nqui-install/SKILL.md +1 -0
- package/docs/nqui-skills/overdrive/SKILL.md +5 -2
- package/docs/nqui-skills/polish/SKILL.md +5 -4
- package/docs/nqui-skills/quieter/SKILL.md +5 -2
- package/docs/nqui-skills/shape/SKILL.md +5 -2
- package/docs/nqui-skills/typeset/SKILL.md +5 -2
- package/package.json +2 -1
- package/scripts/cli.js +2 -0
- package/scripts/install-claude-skills.js +109 -0
|
@@ -6,9 +6,12 @@ user-invocable: true
|
|
|
6
6
|
argument-hint: "[feature to shape]"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Context check (lightweight)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Before proceeding, ensure design context is loaded:
|
|
12
|
+
- If `.impeccable.md` exists in project root, the project context is set — DO NOT re-invoke /impeccable.
|
|
13
|
+
- If `.impeccable.md` is missing, run `/impeccable teach` ONCE to create it.
|
|
14
|
+
- For depth on one topic only, see `impeccable/reference/INDEX.md` and load ONE file.
|
|
12
15
|
|
|
13
16
|
---
|
|
14
17
|
|
|
@@ -8,9 +8,12 @@ argument-hint: "[target]"
|
|
|
8
8
|
|
|
9
9
|
Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Context check (lightweight)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Before proceeding, ensure design context is loaded:
|
|
14
|
+
- If `.impeccable.md` exists in project root, the project context is set — DO NOT re-invoke /impeccable.
|
|
15
|
+
- If `.impeccable.md` is missing, run `/impeccable teach` ONCE to create it.
|
|
16
|
+
- For depth on one topic only, see `impeccable/reference/INDEX.md` and load ONE file.
|
|
14
17
|
|
|
15
18
|
---
|
|
16
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nqlib/nqui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
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",
|
|
@@ -118,6 +118,7 @@
|
|
|
118
118
|
"nqui-init-css": "scripts/init-css.js",
|
|
119
119
|
"nqui-init-cursor": "scripts/init-cursor.js",
|
|
120
120
|
"nqui-init-skills": "scripts/download-skills.js",
|
|
121
|
+
"nqui-init-claude-skills": "scripts/install-claude-skills.js",
|
|
121
122
|
"nqui-install-peers": "scripts/install-peers.js",
|
|
122
123
|
"nqui-init-debug": "scripts/init-debug-css.js",
|
|
123
124
|
"nqui-setup": "scripts/post-install.js"
|
package/scripts/cli.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Usage:
|
|
7
7
|
* npx @nqlib/nqui init-css [output.css]
|
|
8
8
|
* npx @nqlib/nqui init-cursor
|
|
9
|
+
* npx @nqlib/nqui init-claude-skills
|
|
9
10
|
* npx @nqlib/nqui install-peers
|
|
10
11
|
* npx @nqlib/nqui init-debug
|
|
11
12
|
* npx @nqlib/nqui setup
|
|
@@ -21,6 +22,7 @@ const subcommand = process.argv[2];
|
|
|
21
22
|
const routes = {
|
|
22
23
|
'init-cursor': './init-cursor.js',
|
|
23
24
|
'init-skills': './download-skills.js',
|
|
25
|
+
'init-claude-skills': './install-claude-skills.js',
|
|
24
26
|
'install-peers': './install-peers.js',
|
|
25
27
|
'init-debug': './init-debug-css.js',
|
|
26
28
|
'init-debug-css': './init-debug-css.js',
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Install nqui skills for Claude Code / Claude Desktop.
|
|
4
|
+
*
|
|
5
|
+
* Usage: npx @nqlib/nqui init-claude-skills [--force]
|
|
6
|
+
*
|
|
7
|
+
* Copies packages/nqui/docs/nqui-skills/* → ~/.claude/skills/<skill-name>/
|
|
8
|
+
* Hub markdown → ~/.claude/skills/nqui/
|
|
9
|
+
* Component docs → ~/.claude/skills/nqui-components/components/
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from 'fs';
|
|
13
|
+
import { homedir } from 'os';
|
|
14
|
+
import { join } from 'path';
|
|
15
|
+
import { getPackageRoot } from './getPackageRoot.js';
|
|
16
|
+
|
|
17
|
+
const root = getPackageRoot();
|
|
18
|
+
const SKILLS_SOURCE = join(root, 'docs', 'nqui-skills');
|
|
19
|
+
const COMPONENTS_SOURCE = join(root, 'docs', 'components');
|
|
20
|
+
const CLAUDE_SKILLS = join(homedir(), '.claude', 'skills');
|
|
21
|
+
|
|
22
|
+
const HUB_FILES = [
|
|
23
|
+
'SKILL.md',
|
|
24
|
+
'README.md',
|
|
25
|
+
'HUMAN_GUIDE.md',
|
|
26
|
+
'COMPOSITION.md',
|
|
27
|
+
'COMPONENTS_INDEX.md',
|
|
28
|
+
'READ_BUDGET.md',
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
function ensureDir(dir) {
|
|
32
|
+
if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function isSkillDir(name) {
|
|
36
|
+
const path = join(SKILLS_SOURCE, name);
|
|
37
|
+
return statSync(path).isDirectory() && existsSync(join(path, 'SKILL.md'));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function patchHubSkill(destSkillPath) {
|
|
41
|
+
let content = readFileSync(destSkillPath, 'utf8');
|
|
42
|
+
content = content.replace(
|
|
43
|
+
/Installed into `\.cursor\/nqui-skills\/` via `npx @nqlib\/nqui init-skills`\./,
|
|
44
|
+
'Installed into `~/.claude/skills/` via `npx @nqlib/nqui init-claude-skills`.',
|
|
45
|
+
);
|
|
46
|
+
content = content.replace(
|
|
47
|
+
/- `\.cursor\/nqui-skills\/components\/nqui-<name>\.md` \(after init-skills\)/,
|
|
48
|
+
'- `~/.claude/skills/nqui-components/components/nqui-<name>.md`',
|
|
49
|
+
);
|
|
50
|
+
content = content.replace(
|
|
51
|
+
/SSOT: `packages\/nqui\/docs\/nqui-skills\/`/,
|
|
52
|
+
'SSOT: `packages/nqui/docs/nqui-skills/` (repo) · installed: `~/.claude/skills/`',
|
|
53
|
+
);
|
|
54
|
+
writeFileSync(destSkillPath, content);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export async function installClaudeSkills({ force = true } = {}) {
|
|
58
|
+
if (!existsSync(SKILLS_SOURCE)) {
|
|
59
|
+
console.error('Source skills not found:', SKILLS_SOURCE);
|
|
60
|
+
process.exit(1);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
ensureDir(CLAUDE_SKILLS);
|
|
64
|
+
|
|
65
|
+
const hubDest = join(CLAUDE_SKILLS, 'nqui');
|
|
66
|
+
if (existsSync(hubDest) && !force) {
|
|
67
|
+
console.log('⏭️ ~/.claude/skills/nqui exists. Use --force to overwrite.');
|
|
68
|
+
} else {
|
|
69
|
+
ensureDir(hubDest);
|
|
70
|
+
for (const file of HUB_FILES) {
|
|
71
|
+
const src = join(SKILLS_SOURCE, file);
|
|
72
|
+
if (existsSync(src)) cpSync(src, join(hubDest, file), { force: true });
|
|
73
|
+
}
|
|
74
|
+
patchHubSkill(join(hubDest, 'SKILL.md'));
|
|
75
|
+
console.log('✅ Hub →', hubDest);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
for (const name of readdirSync(SKILLS_SOURCE)) {
|
|
79
|
+
if (!isSkillDir(name)) continue;
|
|
80
|
+
const dest = join(CLAUDE_SKILLS, name);
|
|
81
|
+
if (existsSync(dest) && !force) {
|
|
82
|
+
console.log(`⏭️ ${name} — use --force to overwrite`);
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
cpSync(join(SKILLS_SOURCE, name), dest, { recursive: true, force: true });
|
|
86
|
+
console.log('✅', name, '→', dest);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const componentsDest = join(CLAUDE_SKILLS, 'nqui-components', 'components');
|
|
90
|
+
if (existsSync(COMPONENTS_SOURCE)) {
|
|
91
|
+
if (existsSync(componentsDest) && !force) {
|
|
92
|
+
console.log('⏭️ nqui-components/components — use --force to overwrite');
|
|
93
|
+
} else {
|
|
94
|
+
ensureDir(join(CLAUDE_SKILLS, 'nqui-components'));
|
|
95
|
+
cpSync(COMPONENTS_SOURCE, componentsDest, { recursive: true, force: true });
|
|
96
|
+
console.log('✅ Component docs →', componentsDest);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
console.log('\n📚 Claude skills installed under ~/.claude/skills/');
|
|
101
|
+
console.log(' Restart Claude Code or Claude Desktop to pick them up.');
|
|
102
|
+
console.log(' Hub: /nqui · Components: /nqui-components · Design: /nqui-design-system');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const force = process.argv.includes('--force') || !process.argv.includes('--no-force');
|
|
106
|
+
installClaudeSkills({ force }).catch((err) => {
|
|
107
|
+
console.error(err);
|
|
108
|
+
process.exit(1);
|
|
109
|
+
});
|