@imfusion/web-ui 0.5.1-dev.56.gcf89961f → 0.5.1-dev.6.g9d275fa8
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/README.md +27 -73
- package/bin/install-skill.js +180 -0
- package/dist/code-qBbqAHK-.js +190 -0
- package/dist/components/callout/callout.d.ts +1 -1
- package/dist/components/chip-link/chip-link.d.ts +1 -1
- package/dist/components/code/code.d.ts +18 -10
- package/dist/components/input/input.d.ts +1 -3
- package/dist/components/typo/typo.d.ts +2 -2
- package/dist/hooks/index.d.ts +0 -1
- package/dist/index.d.ts +1 -4
- package/dist/index.js +12206 -1789
- package/dist/integrations/code-highlight/code-highlight.d.ts +6 -8
- package/dist/integrations/code-highlight/highlighter.d.ts +3 -32
- package/dist/integrations/code-highlight.js +59 -198
- package/dist/integrations/image-display-options.js +69 -70
- package/dist/meta-B8C51eyL.js +74 -0
- package/dist/provider/web-ui-provider.d.ts +1 -4
- package/dist/style.css +1 -1
- package/dist/tabs-DqBFSqq6.js +3789 -0
- package/package.json +26 -48
- package/src/docgen/doc.gen.json +38 -381
- package/src/llms/llms.gen.txt +0 -17
- package/src/llms/skills/imf-web-ui/SKILL.md +12 -13
- package/src/llms/skills/imf-web-ui-components/SKILL.md +3 -56
- package/src/llms/skills/imf-web-ui-frontend-patterns/SKILL.md +93 -0
- package/src/llms/skills/imf-web-ui-frontend-patterns/references/code-conventions.md +133 -0
- package/src/llms/skills/imf-web-ui-frontend-patterns/references/react-patterns.md +94 -0
- package/src/llms/skills/imf-web-ui-imfusion-frontend-setup/SKILL.md +201 -0
- package/src/llms/skills/imf-web-ui-setup/SKILL.md +37 -67
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +4 -4
- package/src/llms/skills/imf-web-ui-ux/references/forms.md +2 -2
- package/bin/install.js +0 -428
- package/bin/install.test.ts +0 -329
- package/dist/build/vite-css-module-names/index.d.ts +0 -20
- package/dist/build/vite-css-module-names.js +0 -17
- package/dist/chunk-DmhlhrBa.js +0 -11
- package/dist/code-Blo48PGr.js +0 -136
- package/dist/codegen/gen-icons.d.ts +0 -24
- package/dist/components/field/field.d.ts +0 -104
- package/dist/components/field/field.meta.d.ts +0 -2
- package/dist/components/field/index.d.ts +0 -2
- package/dist/components/fieldset/fieldset.d.ts +0 -29
- package/dist/components/fieldset/fieldset.meta.d.ts +0 -2
- package/dist/components/fieldset/index.d.ts +0 -2
- package/dist/components/icon/icon.d.ts +0 -16
- package/dist/components/icon/icon.meta.d.ts +0 -2
- package/dist/components/icon/index.d.ts +0 -4
- package/dist/components/icon/types.d.ts +0 -2
- package/dist/docgen/component-sources.d.ts +0 -7
- package/dist/hooks/use-resize-observer.d.ts +0 -2
- package/dist/icons/catalog.gen.d.ts +0 -8357
- package/dist/icons/icon-config-provider.d.ts +0 -8
- package/dist/icons/icon-context.d.ts +0 -4
- package/dist/icons/icons.gen.d.ts +0 -1672
- package/dist/icons/index.d.ts +0 -3
- package/dist/icons-wBmF0U2x.js +0 -78
- package/dist/icons.js +0 -2
- package/dist/integrations/code-highlight/language-patterns.d.ts +0 -7
- package/dist/integrations/code-highlight/languages/cmake.d.ts +0 -1
- package/dist/integrations/code-highlight/languages/cpp.d.ts +0 -1
- package/dist/integrations/code-highlight/languages/python.d.ts +0 -1
- package/dist/llms/gen-tokens.d.ts +0 -7
- package/dist/meta-CySnRuVp.js +0 -21
- package/dist/tabs-CMKvMF4E.js +0 -369
- package/src/llms/icon-catalog.gen.json +0 -11203
- package/src/llms/install-templates/AGENTS.md +0 -34
- package/src/llms/install-templates/codex-hooks.json +0 -44
- package/src/llms/install-templates/hooks/baseline-staleness.sh +0 -17
- package/src/llms/install-templates/hooks/session-start.sh +0 -5
- package/src/llms/install-templates/hooks/stop.sh +0 -18
- package/src/llms/install-templates/hooks/subagent-start.sh +0 -5
- package/src/llms/install-templates/hooks/user-prompt-submit.sh +0 -5
- package/src/llms/install-templates/settings.json +0 -45
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +0 -119
- package/src/llms/skills/imf-web-ui-conventions/SKILL.md +0 -57
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +0 -141
- package/src/llms/skills/imf-web-ui-conventions/templates/REPORT.md +0 -45
- package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +0 -82
- package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +0 -27
- package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +0 -65
- package/src/llms/skills/imf-web-ui-conventions/topics/class-names.md +0 -50
- package/src/llms/skills/imf-web-ui-conventions/topics/components.md +0 -101
- package/src/llms/skills/imf-web-ui-conventions/topics/data.md +0 -221
- package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +0 -40
- package/src/llms/skills/imf-web-ui-conventions/topics/git.md +0 -34
- package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +0 -35
- package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +0 -26
- package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +0 -53
- package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +0 -44
- package/src/llms/skills/imf-web-ui-conventions/topics/react.md +0 -109
- package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +0 -88
- package/src/llms/skills/imf-web-ui-conventions/topics/testing.md +0 -25
- package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +0 -7
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +0 -116
- package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +0 -73
- package/src/llms/skills/imf-web-ui-conventions/topics/validation.md +0 -62
- package/src/llms/skills/imf-web-ui-update/SKILL.md +0 -157
- package/src/llms/tokens.gen.json +0 -887
package/README.md
CHANGED
|
@@ -38,41 +38,8 @@ import "@imfusion/web-ui/styles.css";
|
|
|
38
38
|
import { WebUIProvider } from "@imfusion/web-ui";
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
The `web-ui` package does offer first-class support for LLMs, but it's not wired up by default.
|
|
44
|
-
|
|
45
|
-
To install the skills, run this command after the package is installed:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
npx web-ui-install
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
The binary asks which LLM client you use and installs everything it needs. Run it again after a version bump and it refreshes
|
|
52
|
-
the directories it already installed into, without asking again — `--reconfigure` re-opens that choice.
|
|
53
|
-
|
|
54
|
-
The optional `--hooks` flag also installs the agent lifecycle hooks and registers them for both hosts, in
|
|
55
|
-
`.claude/settings.json` (Claude Code) and `.codex/hooks.json` (Codex). Three hooks inject one fixed line each: `SessionStart`
|
|
56
|
-
and `SubagentStart` point the agent at the `imf-web-ui` skills router, and `UserPromptSubmit` names the companion skills to
|
|
57
|
-
consult per task. A fourth, the `Stop` gate, blocks a turn that edited source files once, until the agent has addressed the
|
|
58
|
-
project's verification. Re-running the installer refreshes the scripts and prunes retired ones along with their
|
|
59
|
-
registrations. Without `--hooks`, the skills are still available but no lifecycle hook runs. The full flow is documented in
|
|
60
|
-
the shipped [`agent-tooling` topic](./src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md) of the conventions
|
|
61
|
-
skill.
|
|
62
|
-
|
|
63
|
-
**Available consumer skills - `/imf-web-ui-*`**
|
|
64
|
-
|
|
65
|
-
| Skill | What it does |
|
|
66
|
-
| ------------------------- | ------------------------------------------------------------------------------ |
|
|
67
|
-
| `/imf-web-ui` | The router: decides whether guidance is needed, then which companion to open. |
|
|
68
|
-
| `/imf-web-ui-setup` | Plan and, after approval, bootstrap a consumer project by topic. |
|
|
69
|
-
| `/imf-web-ui-components` | Component and icon reference — what exists and how it's meant to be used. |
|
|
70
|
-
| `/imf-web-ui-ux` | UX guidance for building interfaces with the library. |
|
|
71
|
-
| `/imf-web-ui-conventions` | The frontend conventions baseline, including the sanctioned styling seams. |
|
|
72
|
-
| `/imf-web-ui-audit` | Read-only health check for a consumer project, ending in a plan you approve. |
|
|
73
|
-
| `/imf-web-ui-update` | Update the library, skills, and optional hooks, then verify before committing. |
|
|
74
|
-
|
|
75
|
-
Start at `/imf-web-ui` — it routes to the rest. Storybook's **User Guide → AI Agents** page covers the whole family.
|
|
41
|
+
**There is also an AI skill to help you set up the Web UI library in your project:
|
|
42
|
+
[`/imf-web-ui-setup`](./src/llms/skills/imf-web-ui-setup/SKILL.md).**
|
|
76
43
|
|
|
77
44
|
### Versions and updates
|
|
78
45
|
|
|
@@ -118,35 +85,27 @@ npm run git:config # hooks path + rebase-only pull/merge
|
|
|
118
85
|
|
|
119
86
|
**Try out **`/web-ui-dev-getting-started`** for an ai assisted start.**
|
|
120
87
|
|
|
121
|
-
###
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
|
127
|
-
|
|
|
128
|
-
| `/
|
|
129
|
-
| `/web-ui-dev-
|
|
130
|
-
| `/web-ui-dev-
|
|
131
|
-
| `/web-ui-dev-
|
|
132
|
-
| `/web-ui-dev-
|
|
133
|
-
| `/web-ui-dev-
|
|
134
|
-
| `/web-ui-dev-
|
|
135
|
-
| `/web-ui-dev-
|
|
136
|
-
| `/web-ui-dev-
|
|
137
|
-
| `/web-ui-dev-
|
|
138
|
-
| `/web-ui-dev-
|
|
139
|
-
| `/web-ui-dev-audit-pass-through-defaults` | Check `@default` annotations on pass-through props against Base UI upstream. |
|
|
140
|
-
| `/web-ui-dev-teardown-worktree` | Tear down a worktree, wherever it lives — merging its branch first or dropping it. |
|
|
141
|
-
| `/web-ui-dev-refresh-design-reference` | Refresh the committed brand snapshots in `design/` from the Figma styleguide. |
|
|
142
|
-
| `/web-ui-dev-mcp` | Set up or recover Storybook, DevTools, Atlassian, or Figma MCP access. |
|
|
88
|
+
### Development skills — `web-ui-dev-*`
|
|
89
|
+
|
|
90
|
+
These skills are shipped with a `web-ui-dev` prefix, so to make their names identifiable and not pollute the skill namespace.
|
|
91
|
+
|
|
92
|
+
| Skill | What it does |
|
|
93
|
+
| ----------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
94
|
+
| `/web-ui-dev-getting-started` | Interactive intro — gauges your experience, works out your goal, routes you. |
|
|
95
|
+
| `/web-ui-dev-start` | Starting ritual for any task: Jira context, `master` vs. a worktree, context summary. |
|
|
96
|
+
| `/web-ui-dev-new-component` | Scaffolds an architecture-compliant primitive (adapted or absorbed). |
|
|
97
|
+
| `/web-ui-dev-update-component` | Pointers to every file a prop, variant, or sub-component change touches. |
|
|
98
|
+
| `/web-ui-dev-design-component` | Brand design pass for a component that works but isn't styled yet. |
|
|
99
|
+
| `/web-ui-dev-story` | Author or update a Storybook story. |
|
|
100
|
+
| `/web-ui-dev-commit` | Commit workflow: staged docs audit, CI-parity checks, house commit format. |
|
|
101
|
+
| `/web-ui-dev-audit-docs` | Audit docs against staged or recent changes for staleness, gaps, and drift. |
|
|
102
|
+
| `/web-ui-dev-audit-pass-through-defaults` | Check `@default` annotations on pass-through props against Base UI upstream. |
|
|
103
|
+
| `/web-ui-dev-manage-worktrees` | Create, close, or discard a worktree in `.workspaces/`. |
|
|
104
|
+
| `/web-ui-dev-refresh-design-reference` | Refresh the committed brand snapshots in `design/` from the Figma styleguide. |
|
|
105
|
+
| `/web-ui-dev-mcp` | Set up or recover Storybook, DevTools, Atlassian, or Figma MCP access. |
|
|
143
106
|
|
|
144
107
|
## Releasing
|
|
145
108
|
|
|
146
|
-
Release-facing changes are recorded as one-line entries in [`CHANGELOG.md`](./CHANGELOG.md) under `## [Unreleased]`. The
|
|
147
|
-
commit workflow requires an entry for pull-request commits and direct commits to `master`, with only narrow mechanical
|
|
148
|
-
exceptions. Each entry ends with its author as ` — Name <email>`, taken from the committer's git config.
|
|
149
|
-
|
|
150
109
|
The published version is derived from git tags, not from `package.json`.
|
|
151
110
|
|
|
152
111
|
The `version` field stays at `0.0.0` in the repository and he CI computes the real number with
|
|
@@ -184,23 +143,18 @@ npx tsx scripts/version.ts # prints, changes nothing
|
|
|
184
143
|
|
|
185
144
|
### Cutting a release
|
|
186
145
|
|
|
187
|
-
|
|
188
|
-
at the top for people deciding whether to update. Start each with the outcome; include a small usage example or link when it
|
|
189
|
-
helps someone explore the feature. Then prepare the dated release section:
|
|
146
|
+
Tag the commit you want to ship and push the tag:
|
|
190
147
|
|
|
191
148
|
```bash
|
|
192
|
-
|
|
149
|
+
git tag -a web-ui/v0.5.1 -m "web-ui 0.5.1"
|
|
150
|
+
git push origin web-ui/v0.5.1
|
|
193
151
|
```
|
|
194
152
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
```bash
|
|
198
|
-
npm run release:tag -- --version 0.5.1
|
|
199
|
-
```
|
|
153
|
+
The tag triggers a build that publishes `0.5.1` as `latest` and repoints the `dev` dist-tag at the same version.
|
|
200
154
|
|
|
201
|
-
The tag
|
|
202
|
-
|
|
203
|
-
|
|
155
|
+
**The tag must be annotated (`-a`).** `git describe` ignores lightweight tags, so a tag pushed without `-a` is invisible to
|
|
156
|
+
the version script — the build reads through it to the previous release tag and publishes another `dev` version instead of
|
|
157
|
+
the release.
|
|
204
158
|
|
|
205
159
|
The tag name must match `web-ui/vX.Y.Z` exactly. Both the version script's `--match` and the TeamCity branch filter in
|
|
206
160
|
[`.teamcity/settings.kts`](./.teamcity/settings.kts) key off that shape; a tag in any other form publishes nothing.
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Installs the consumer skill family (../src/llms/skills/imf-web-ui*/)
|
|
4
|
+
// into the consumer project's agent skill directories. Runs in the
|
|
5
|
+
// CONSUMER's environment, so it may only use this package's real runtime
|
|
6
|
+
// dependencies (@clack/prompts). Never wire this into a postinstall hook:
|
|
7
|
+
// ambient script execution on `npm install` is a live supply-chain attack
|
|
8
|
+
// vector — install stays an explicit, user-run command.
|
|
9
|
+
//
|
|
10
|
+
// The skills cross-reference each other, so they install as one bundle.
|
|
11
|
+
// When both targets are selected, .agents/skills/ holds the real copy and
|
|
12
|
+
// .claude/skills/ symlinks it (this repo's own convention) so the two
|
|
13
|
+
// can't drift apart.
|
|
14
|
+
|
|
15
|
+
import {
|
|
16
|
+
cpSync,
|
|
17
|
+
existsSync,
|
|
18
|
+
lstatSync,
|
|
19
|
+
mkdirSync,
|
|
20
|
+
readdirSync,
|
|
21
|
+
readFileSync,
|
|
22
|
+
rmSync,
|
|
23
|
+
symlinkSync,
|
|
24
|
+
writeFileSync
|
|
25
|
+
} from "node:fs";
|
|
26
|
+
import { dirname, relative, resolve } from "node:path";
|
|
27
|
+
import { fileURLToPath } from "node:url";
|
|
28
|
+
import * as p from "@clack/prompts";
|
|
29
|
+
|
|
30
|
+
const SKILL_PREFIX = "imf-web-ui";
|
|
31
|
+
const VERSION_MARKER = ".imf-web-ui-skill-version.json";
|
|
32
|
+
|
|
33
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
34
|
+
// Source is relative to THIS SCRIPT's location (inside node_modules), not
|
|
35
|
+
// the consumer's cwd — the script is invoked from the consumer's project
|
|
36
|
+
// root, but the skills it copies ship alongside this file in the package.
|
|
37
|
+
const skillsRoot = resolve(here, "..", "src", "llms", "skills");
|
|
38
|
+
const packageJson = JSON.parse(readFileSync(resolve(here, "..", "package.json"), "utf-8"));
|
|
39
|
+
const currentVersion = packageJson.version;
|
|
40
|
+
|
|
41
|
+
// Destination is relative to the consumer's project root (cwd), since
|
|
42
|
+
// that's where their `.claude/` or `.agents/` directory lives.
|
|
43
|
+
const projectRoot = process.cwd();
|
|
44
|
+
|
|
45
|
+
const TARGETS = {
|
|
46
|
+
claude: { label: "Claude Code", root: resolve(projectRoot, ".claude", "skills") },
|
|
47
|
+
agents: { label: "Vendor-neutral (.agents/)", root: resolve(projectRoot, ".agents", "skills") }
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
function discoverSkills() {
|
|
51
|
+
if (!existsSync(skillsRoot)) return [];
|
|
52
|
+
return readdirSync(skillsRoot, { withFileTypes: true })
|
|
53
|
+
.filter(entry => entry.isDirectory() && entry.name.startsWith(SKILL_PREFIX))
|
|
54
|
+
.map(entry => entry.name)
|
|
55
|
+
.sort();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function displayPath(absPath) {
|
|
59
|
+
return `./${relative(projectRoot, absPath)}`;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function readInstalledVersion(dir) {
|
|
63
|
+
const markerPath = resolve(dir, VERSION_MARKER);
|
|
64
|
+
if (!existsSync(markerPath)) return null;
|
|
65
|
+
try {
|
|
66
|
+
return JSON.parse(readFileSync(markerPath, "utf-8")).version ?? null;
|
|
67
|
+
} catch {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function writeRealCopy(sourceDir, destDir) {
|
|
73
|
+
mkdirSync(dirname(destDir), { recursive: true });
|
|
74
|
+
// force: true makes re-running after a version bump overwrite cleanly.
|
|
75
|
+
cpSync(sourceDir, destDir, { recursive: true, force: true });
|
|
76
|
+
writeFileSync(resolve(destDir, VERSION_MARKER), JSON.stringify({ version: currentVersion }, null, 2) + "\n");
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function writeSymlink(linkPath, targetPath) {
|
|
80
|
+
mkdirSync(dirname(linkPath), { recursive: true });
|
|
81
|
+
// lstat (not existsSync, which follows symlinks) catches a broken/stale
|
|
82
|
+
// symlink left over from a prior run, not just a real file or directory.
|
|
83
|
+
if (lstatSync(linkPath, { throwIfNoEntry: false })) {
|
|
84
|
+
rmSync(linkPath, { recursive: true, force: true });
|
|
85
|
+
}
|
|
86
|
+
symlinkSync(relative(dirname(linkPath), targetPath), linkPath);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// --target claude|agents (repeatable) selects targets without the
|
|
90
|
+
// interactive prompt — for CI and scripted installs.
|
|
91
|
+
function parseTargetFlags(argv) {
|
|
92
|
+
const targets = [];
|
|
93
|
+
for (let i = 0; i < argv.length; i++) {
|
|
94
|
+
if (argv[i] !== "--target") continue;
|
|
95
|
+
const value = argv[i + 1];
|
|
96
|
+
if (!value || !(value in TARGETS)) {
|
|
97
|
+
console.error(`--target expects one of: ${Object.keys(TARGETS).join(", ")}`);
|
|
98
|
+
process.exit(1);
|
|
99
|
+
}
|
|
100
|
+
targets.push(value);
|
|
101
|
+
i++;
|
|
102
|
+
}
|
|
103
|
+
return targets;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async function main() {
|
|
107
|
+
const skills = discoverSkills();
|
|
108
|
+
const flagTargets = parseTargetFlags(process.argv.slice(2));
|
|
109
|
+
|
|
110
|
+
p.intro(`@imfusion/web-ui — install the ${SKILL_PREFIX} skills (${skills.length})`);
|
|
111
|
+
|
|
112
|
+
if (skills.length === 0) {
|
|
113
|
+
p.log.error(`No skills found at ${skillsRoot}. Reinstall @imfusion/web-ui and try again.`);
|
|
114
|
+
p.outro("Nothing installed.");
|
|
115
|
+
process.exitCode = 1;
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const existingVersions = Object.values(TARGETS)
|
|
120
|
+
.flatMap(({ root }) => skills.map(name => readInstalledVersion(resolve(root, name))))
|
|
121
|
+
.filter(Boolean);
|
|
122
|
+
if (existingVersions.length > 0 && existingVersions.every(v => v === currentVersion)) {
|
|
123
|
+
p.log.info(`Already up to date (v${currentVersion}). Re-running will overwrite with the same content.`);
|
|
124
|
+
} else if (existingVersions.some(v => v !== currentVersion)) {
|
|
125
|
+
const from = existingVersions.find(v => v !== currentVersion);
|
|
126
|
+
p.log.info(`Updating installed skills from v${from} to v${currentVersion}.`);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
p.log.message(`Skills in this bundle:\n${skills.map(name => ` - ${name}`).join("\n")}`);
|
|
130
|
+
|
|
131
|
+
let selected;
|
|
132
|
+
if (flagTargets.length > 0) {
|
|
133
|
+
selected = flagTargets;
|
|
134
|
+
p.log.info(`Targets from --target flags: ${selected.join(", ")}`);
|
|
135
|
+
} else {
|
|
136
|
+
selected = await p.multiselect({
|
|
137
|
+
message: "Install into which skill directory (or directories)?",
|
|
138
|
+
options: Object.entries(TARGETS).map(([key, { label, root }]) => ({
|
|
139
|
+
value: key,
|
|
140
|
+
label,
|
|
141
|
+
hint: displayPath(root)
|
|
142
|
+
})),
|
|
143
|
+
required: true
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
if (p.isCancel(selected)) {
|
|
147
|
+
p.cancel("Cancelled — nothing installed.");
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const both = selected.includes("claude") && selected.includes("agents");
|
|
153
|
+
|
|
154
|
+
for (const name of skills) {
|
|
155
|
+
const sourceDir = resolve(skillsRoot, name);
|
|
156
|
+
if (both) {
|
|
157
|
+
// .agents/ is the canonical real copy; .claude/ aliases it via symlink.
|
|
158
|
+
const realDir = resolve(TARGETS.agents.root, name);
|
|
159
|
+
writeRealCopy(sourceDir, realDir);
|
|
160
|
+
writeSymlink(resolve(TARGETS.claude.root, name), realDir);
|
|
161
|
+
} else {
|
|
162
|
+
for (const key of selected) {
|
|
163
|
+
writeRealCopy(sourceDir, resolve(TARGETS[key].root, name));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (both) {
|
|
169
|
+
p.log.success(`Vendor-neutral (.agents/) -> ${displayPath(TARGETS.agents.root)}/${SKILL_PREFIX}*`);
|
|
170
|
+
p.log.success(`Claude Code -> ${displayPath(TARGETS.claude.root)}/${SKILL_PREFIX}* (symlinks -> .agents/)`);
|
|
171
|
+
} else {
|
|
172
|
+
for (const key of selected) {
|
|
173
|
+
p.log.success(`${TARGETS[key].label} -> ${displayPath(TARGETS[key].root)}/${SKILL_PREFIX}*`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
p.outro(`Done — ${skills.length} skills installed.`);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
await main();
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { a as e, r as t, t as n } from "./meta-B8C51eyL.js";
|
|
2
|
+
import { createContext as r, createElement as i, forwardRef as a, useCallback as o, useContext as s, useEffect as c, useRef as l, useState as u } from "react";
|
|
3
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
4
|
+
//#region node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
|
|
5
|
+
var p = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), m = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), h = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), g = (e) => {
|
|
6
|
+
let t = h(e);
|
|
7
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
8
|
+
}, _ = {
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
width: 24,
|
|
11
|
+
height: 24,
|
|
12
|
+
viewBox: "0 0 24 24",
|
|
13
|
+
fill: "none",
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
strokeWidth: 2,
|
|
16
|
+
strokeLinecap: "round",
|
|
17
|
+
strokeLinejoin: "round"
|
|
18
|
+
}, v = (e) => {
|
|
19
|
+
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
20
|
+
return !1;
|
|
21
|
+
}, y = r({}), b = () => s(y), x = a(({ color: e, size: t, strokeWidth: n, absoluteStrokeWidth: r, className: a = "", children: o, iconNode: s, ...c }, l) => {
|
|
22
|
+
let { size: u = 24, strokeWidth: d = 2, absoluteStrokeWidth: f = !1, color: m = "currentColor", className: h = "" } = b() ?? {}, g = r ?? f ? Number(n ?? d) * 24 / Number(t ?? u) : n ?? d;
|
|
23
|
+
return i("svg", {
|
|
24
|
+
ref: l,
|
|
25
|
+
..._,
|
|
26
|
+
width: t ?? u ?? _.width,
|
|
27
|
+
height: t ?? u ?? _.height,
|
|
28
|
+
stroke: e ?? m,
|
|
29
|
+
strokeWidth: g,
|
|
30
|
+
className: p("lucide", h, a),
|
|
31
|
+
...!o && !v(c) && { "aria-hidden": "true" },
|
|
32
|
+
...c
|
|
33
|
+
}, [...s.map(([e, t]) => i(e, t)), ...Array.isArray(o) ? o : [o]]);
|
|
34
|
+
}), S = (e, t) => {
|
|
35
|
+
let n = a(({ className: n, ...r }, a) => i(x, {
|
|
36
|
+
ref: a,
|
|
37
|
+
iconNode: t,
|
|
38
|
+
className: p(`lucide-${m(g(e))}`, `lucide-${e}`, n),
|
|
39
|
+
...r
|
|
40
|
+
}));
|
|
41
|
+
return n.displayName = g(e), n;
|
|
42
|
+
}, C = S("arrow-right", [["path", {
|
|
43
|
+
d: "M5 12h14",
|
|
44
|
+
key: "1ays0h"
|
|
45
|
+
}], ["path", {
|
|
46
|
+
d: "m12 5 7 7-7 7",
|
|
47
|
+
key: "xquz4c"
|
|
48
|
+
}]]), w = S("arrow-up-right", [["path", {
|
|
49
|
+
d: "M7 7h10v10",
|
|
50
|
+
key: "1tivn9"
|
|
51
|
+
}], ["path", {
|
|
52
|
+
d: "M7 17 17 7",
|
|
53
|
+
key: "1vkiza"
|
|
54
|
+
}]]), T = S("check", [["path", {
|
|
55
|
+
d: "M20 6 9 17l-5-5",
|
|
56
|
+
key: "1gmf2c"
|
|
57
|
+
}]]), E = S("copy", [["rect", {
|
|
58
|
+
width: "14",
|
|
59
|
+
height: "14",
|
|
60
|
+
x: "8",
|
|
61
|
+
y: "8",
|
|
62
|
+
rx: "2",
|
|
63
|
+
ry: "2",
|
|
64
|
+
key: "17jyea"
|
|
65
|
+
}], ["path", {
|
|
66
|
+
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
67
|
+
key: "zix9uf"
|
|
68
|
+
}]]);
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/hooks/use-clipboard.ts
|
|
71
|
+
function D({ timeout: e = 1500 } = {}) {
|
|
72
|
+
let [t, n] = u(!1), r = l(void 0);
|
|
73
|
+
return c(() => () => clearTimeout(r.current), []), {
|
|
74
|
+
copied: t,
|
|
75
|
+
copy: o((t) => {
|
|
76
|
+
navigator.clipboard.writeText(t).then(() => {
|
|
77
|
+
n(!0), clearTimeout(r.current), r.current = setTimeout(() => n(!1), e);
|
|
78
|
+
});
|
|
79
|
+
}, [e])
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
var O = {
|
|
83
|
+
block: "imf-ui-code-module-block",
|
|
84
|
+
copy: "imf-ui-code-module-copy",
|
|
85
|
+
icon: "imf-ui-code-module-icon",
|
|
86
|
+
inline: "imf-ui-code-module-inline",
|
|
87
|
+
inlineCopy: "imf-ui-code-module-inlineCopy",
|
|
88
|
+
inlineLink: "imf-ui-code-module-inlineLink",
|
|
89
|
+
language: "imf-ui-code-module-language",
|
|
90
|
+
pre: "imf-ui-code-module-pre",
|
|
91
|
+
separator: "imf-ui-code-module-separator"
|
|
92
|
+
}, k = /* @__PURE__ */ e({
|
|
93
|
+
Block: () => M,
|
|
94
|
+
Inline: () => A,
|
|
95
|
+
InlineLink: () => j
|
|
96
|
+
});
|
|
97
|
+
function A({ className: e, copyable: n = !1, highlighted: r, children: i, ...a }) {
|
|
98
|
+
let { copied: o, copy: s } = D(), c = o ? T : E;
|
|
99
|
+
return /* @__PURE__ */ f("code", {
|
|
100
|
+
...a,
|
|
101
|
+
"data-imf-ui-component": "Code.Inline",
|
|
102
|
+
className: t(O.inline, e),
|
|
103
|
+
children: [
|
|
104
|
+
r ?? i,
|
|
105
|
+
n && /* @__PURE__ */ d("span", { className: O.separator }),
|
|
106
|
+
n && /* @__PURE__ */ d("button", {
|
|
107
|
+
type: "button",
|
|
108
|
+
className: O.inlineCopy,
|
|
109
|
+
"data-copied": o || void 0,
|
|
110
|
+
"aria-label": o ? "Copied" : "Copy",
|
|
111
|
+
onClick: () => s(i),
|
|
112
|
+
children: /* @__PURE__ */ d(c, {
|
|
113
|
+
size: 12,
|
|
114
|
+
strokeWidth: 2,
|
|
115
|
+
"aria-hidden": !0
|
|
116
|
+
})
|
|
117
|
+
})
|
|
118
|
+
]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
A.displayName = "Code.Inline";
|
|
122
|
+
function j({ className: e, kind: n = "external", children: r, ...i }) {
|
|
123
|
+
let a = n === "external" ? w : C;
|
|
124
|
+
return /* @__PURE__ */ f("a", {
|
|
125
|
+
...n === "external" ? {
|
|
126
|
+
target: "_blank",
|
|
127
|
+
rel: "noreferrer"
|
|
128
|
+
} : {},
|
|
129
|
+
...i,
|
|
130
|
+
"data-imf-ui-component": "Code.InlineLink",
|
|
131
|
+
"data-kind": n,
|
|
132
|
+
className: t(O.inline, O.inlineLink, e),
|
|
133
|
+
children: [
|
|
134
|
+
r,
|
|
135
|
+
/* @__PURE__ */ d("span", { className: O.separator }),
|
|
136
|
+
/* @__PURE__ */ d("span", {
|
|
137
|
+
className: O.icon,
|
|
138
|
+
"aria-hidden": !0,
|
|
139
|
+
children: /* @__PURE__ */ d(a, {
|
|
140
|
+
size: 12,
|
|
141
|
+
strokeWidth: 2
|
|
142
|
+
})
|
|
143
|
+
})
|
|
144
|
+
]
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
j.displayName = "Code.InlineLink";
|
|
148
|
+
function M({ className: e, language: n, hideCopy: r = !1, highlighted: i, children: a, ...o }) {
|
|
149
|
+
let { copied: s, copy: c } = D(), l = s ? T : E;
|
|
150
|
+
return /* @__PURE__ */ f("div", {
|
|
151
|
+
"data-imf-ui-component": "Code.Block",
|
|
152
|
+
className: t(O.block, e),
|
|
153
|
+
children: [
|
|
154
|
+
n != null && /* @__PURE__ */ d("span", {
|
|
155
|
+
className: O.language,
|
|
156
|
+
children: n
|
|
157
|
+
}),
|
|
158
|
+
!r && /* @__PURE__ */ d("button", {
|
|
159
|
+
type: "button",
|
|
160
|
+
className: O.copy,
|
|
161
|
+
"data-copied": s || void 0,
|
|
162
|
+
"aria-label": s ? "Copied" : "Copy",
|
|
163
|
+
onClick: () => c(a),
|
|
164
|
+
children: /* @__PURE__ */ d(l, {
|
|
165
|
+
size: 12,
|
|
166
|
+
strokeWidth: 2,
|
|
167
|
+
"aria-hidden": !0
|
|
168
|
+
})
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ d("pre", {
|
|
171
|
+
...o,
|
|
172
|
+
className: O.pre,
|
|
173
|
+
children: /* @__PURE__ */ d("code", { children: i ?? a })
|
|
174
|
+
})
|
|
175
|
+
]
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
M.displayName = "Code.Block";
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/components/code/code.meta.ts
|
|
181
|
+
var N = {
|
|
182
|
+
name: "Code",
|
|
183
|
+
category: n.display,
|
|
184
|
+
status: "stable",
|
|
185
|
+
namespace: !0,
|
|
186
|
+
description: "Displays source code — Code.Inline for a fragment in running text, Code.Block for a fenced block with an optional language label and copy button. Also called a code snippet or code block.",
|
|
187
|
+
origin: "native"
|
|
188
|
+
};
|
|
189
|
+
//#endregion
|
|
190
|
+
export { k as a, T as c, S as d, j as i, w as l, M as n, D as o, A as r, E as s, N as t, C as u };
|
|
@@ -19,7 +19,7 @@ declare namespace Root {
|
|
|
19
19
|
type IconProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
20
20
|
/**
|
|
21
21
|
* Callout.Icon — the leading status glyph. With no children it renders the
|
|
22
|
-
* variant's default
|
|
22
|
+
* variant's default lucide icon; pass a custom icon as children to override.
|
|
23
23
|
* `aria-hidden` (the variant is conveyed by copy, not the glyph) and inherits
|
|
24
24
|
* the status colour via `currentColor`.
|
|
25
25
|
*/
|
|
@@ -11,7 +11,7 @@ type Props = React.AnchorHTMLAttributes<HTMLAnchorElement> & VariantProps<typeof
|
|
|
11
11
|
/**
|
|
12
12
|
* ChipLink — anchor styled as a Chip. Reuses Chip's shared variants so the
|
|
13
13
|
* variant and appearance axes stay aligned, and auto-appends a directional icon
|
|
14
|
-
* (
|
|
14
|
+
* (Lucide `ArrowUpRight` for external, `ArrowRight` for internal).
|
|
15
15
|
*/
|
|
16
16
|
export declare function ChipLink({ variant, appearance, inline, kind, className, children, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
type InlineProps = Omit<React.HTMLAttributes<HTMLElement>, "children"> & {
|
|
2
|
-
/**
|
|
3
|
-
children:
|
|
2
|
+
/** The inline code, as a raw string — also the value copied when `copyable`. */
|
|
3
|
+
children: string;
|
|
4
4
|
/** Show a small copy button on the right, behind a hairline separator. @default false */
|
|
5
5
|
copyable?: boolean;
|
|
6
|
+
/** Pre-rendered display content (e.g. syntax-highlighted tokens) shown in place of `children`, which stays the copied value. The code-highlight integration fills this slot. */
|
|
7
|
+
highlighted?: React.ReactNode;
|
|
6
8
|
};
|
|
7
9
|
/**
|
|
8
10
|
* Code.Inline — an inline code fragment (a `<code>` chip) for use inside running
|
|
9
|
-
* text.
|
|
10
|
-
*
|
|
11
|
+
* text. Dumb: styling only — syntax coloring arrives pre-rendered through the
|
|
12
|
+
* `highlighted` slot (the code-highlight integration supplies it). `Typo.InlineCode`
|
|
13
|
+
* renders this under the hood so inline-code chrome is defined in one place.
|
|
14
|
+
* Children must be a string so an opted-in copy button has clean text to copy.
|
|
11
15
|
*/
|
|
12
|
-
export declare function Inline({ className, copyable, children, ...props }: InlineProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function Inline({ className, copyable, highlighted, children, ...props }: InlineProps): import("react/jsx-runtime").JSX.Element;
|
|
13
17
|
export declare namespace Inline {
|
|
14
18
|
var displayName: string;
|
|
15
19
|
}
|
|
@@ -32,20 +36,24 @@ export declare namespace InlineLink {
|
|
|
32
36
|
var displayName: string;
|
|
33
37
|
}
|
|
34
38
|
type BlockProps = Omit<React.HTMLAttributes<HTMLPreElement>, "children"> & {
|
|
35
|
-
/**
|
|
36
|
-
children:
|
|
39
|
+
/** The code to display, as a raw string — also the value copied by the copy button. */
|
|
40
|
+
children: string;
|
|
37
41
|
/** Language label shown in the corner notch. Omit to hide the notch. */
|
|
38
42
|
language?: string;
|
|
39
43
|
/** Hide the copy button. @default false */
|
|
40
44
|
hideCopy?: boolean;
|
|
45
|
+
/** Pre-rendered display content (e.g. syntax-highlighted tokens) shown in place of `children`, which stays the copied value. The code-highlight integration fills this slot. */
|
|
46
|
+
highlighted?: React.ReactNode;
|
|
41
47
|
};
|
|
42
48
|
/**
|
|
43
49
|
* Code.Block — a fenced code block on a flat brand surface, with an optional
|
|
44
50
|
* chamfered language notch (top-left) and a copy button (top-right). The
|
|
45
|
-
* surface follows the global corner-radius token when a preset opts in.
|
|
46
|
-
*
|
|
51
|
+
* surface follows the global corner-radius token when a preset opts in.
|
|
52
|
+
* Dumb: styling only — syntax coloring arrives pre-rendered through the
|
|
53
|
+
* `highlighted` slot (the code-highlight integration supplies it). Children
|
|
54
|
+
* must be a string so the copy button has clean text to copy.
|
|
47
55
|
*/
|
|
48
|
-
export declare function Block({ className, language, hideCopy, children, ...props }: BlockProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export declare function Block({ className, language, hideCopy, highlighted, children, ...props }: BlockProps): import("react/jsx-runtime").JSX.Element;
|
|
49
57
|
export declare namespace Block {
|
|
50
58
|
var displayName: string;
|
|
51
59
|
}
|
|
@@ -9,8 +9,6 @@ type Props = Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "st
|
|
|
9
9
|
value?: UpstreamInput["value"];
|
|
10
10
|
defaultValue?: UpstreamInput["defaultValue"];
|
|
11
11
|
onValueChange?: UpstreamInput["onValueChange"];
|
|
12
|
-
/** Called when the search input's clear button is pressed. */
|
|
13
|
-
onClear?: () => void;
|
|
14
12
|
className?: UpstreamInput["className"];
|
|
15
13
|
style?: UpstreamInput["style"];
|
|
16
14
|
render?: UpstreamInput["render"];
|
|
@@ -23,5 +21,5 @@ type Props = Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "st
|
|
|
23
21
|
* @see https://base-ui.com/react/components/input
|
|
24
22
|
* @llm https://base-ui.com/react/components/input.md
|
|
25
23
|
*/
|
|
26
|
-
export declare function Input({ variant, size,
|
|
24
|
+
export declare function Input({ variant, size, className, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
27
25
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { Code } from '../code';
|
|
3
3
|
declare const typo: (props?: ({
|
|
4
|
-
variant?: "primary" | "positive" | "negative" | "main" | "support" | "minor" | "brand" | "warning" | "info" | "
|
|
4
|
+
variant?: "primary" | "positive" | "negative" | "main" | "support" | "minor" | "brand" | "warning" | "info" | "accent-1" | "accent-2" | "accent-3" | "oncolor" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
declare const spacingVariants: (props?: ({
|
|
7
7
|
spacing?: "none" | "default" | null | undefined;
|
|
@@ -82,7 +82,7 @@ export declare function Highlight({ variant, className, ...props }: InlineProps)
|
|
|
82
82
|
export declare namespace Highlight {
|
|
83
83
|
var displayName: string;
|
|
84
84
|
}
|
|
85
|
-
/** Typo.Link — inline anchor. Auto-appends a
|
|
85
|
+
/** Typo.Link — inline anchor. Auto-appends a directional icon (Lucide `ArrowUpRight` for external, `ArrowRight` for internal), mirroring ChipLink's affordance for prose links. */
|
|
86
86
|
export declare function Link({ variant, kind, className, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
|
|
87
87
|
export declare namespace Link {
|
|
88
88
|
var displayName: string;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -3,4 +3,3 @@ export type { UseClipboardOptions } from './use-clipboard';
|
|
|
3
3
|
export { useColorScheme } from './use-color-scheme';
|
|
4
4
|
export { useMediaQuery } from './use-media-query';
|
|
5
5
|
export type { UseMediaQueryOptions } from './use-media-query';
|
|
6
|
-
export { useResizeObserver } from './use-resize-observer';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,6 @@ export { Button, buttonMeta } from './components/button';
|
|
|
2
2
|
export { ChipLink, chipLinkMeta } from './components/chip-link';
|
|
3
3
|
export { CopyButton, copyButtonMeta } from './components/copy-button';
|
|
4
4
|
export { Checkbox, checkboxMeta } from './components/checkbox';
|
|
5
|
-
export { Field, fieldMeta } from './components/field';
|
|
6
|
-
export { Fieldset, fieldsetMeta } from './components/fieldset';
|
|
7
5
|
export { Input, inputMeta } from './components/input';
|
|
8
6
|
export { Select, selectMeta } from './components/select';
|
|
9
7
|
export { Slider, sliderMeta } from './components/slider';
|
|
@@ -21,7 +19,6 @@ export { Callout, calloutMeta } from './components/callout';
|
|
|
21
19
|
export { Chip, chipMeta } from './components/chip';
|
|
22
20
|
export { Code, codeMeta } from './components/code';
|
|
23
21
|
export { Collapsible, collapsibleMeta } from './components/collapsible';
|
|
24
|
-
export { Icon, iconMeta } from './components/icon';
|
|
25
22
|
export { Logo, logoMeta } from './components/logo';
|
|
26
23
|
export { NavigationMenu, navigationMenuMeta } from './components/navigation-menu';
|
|
27
24
|
export { Spinner, spinnerMeta } from './components/spinner';
|
|
@@ -33,7 +30,7 @@ export { ImFusionLogo } from './components/logo';
|
|
|
33
30
|
export { WebUIProvider } from './provider';
|
|
34
31
|
export { useClipboard, useColorScheme, useMediaQuery } from './hooks';
|
|
35
32
|
export type { UseClipboardOptions, UseMediaQueryOptions } from './hooks';
|
|
36
|
-
export {
|
|
33
|
+
export { cx } from 'class-variance-authority';
|
|
37
34
|
export { config } from './config';
|
|
38
35
|
export type { ColorScheme, ColorSchemePreference } from './types/theme';
|
|
39
36
|
export type { ComponentMeta, ComponentCategory, ComponentCategoryId, ComponentStatus } from './types/meta';
|