@imfusion/web-ui 0.5.1-dev.18.g81350f83 → 0.5.1-dev.2.g0a349a2a
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 +43 -122
- package/bin/install-skill.js +180 -0
- package/dist/components/logo/logo.d.ts +1 -1
- package/dist/index.js +2 -4
- package/dist/style.css +1 -1
- package/package.json +24 -34
- package/src/docgen/doc.gen.json +1 -1
- package/src/llms/skills/imf-web-ui/SKILL.md +11 -15
- package/src/llms/skills/imf-web-ui-components/SKILL.md +1 -1
- 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-conventions/references/react.md → imf-web-ui-frontend-patterns/references/react-patterns.md} +12 -26
- package/src/llms/skills/imf-web-ui-imfusion-frontend-setup/SKILL.md +201 -0
- package/src/llms/skills/imf-web-ui-setup/SKILL.md +57 -0
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +4 -4
- package/src/llms/skills/imf-web-ui-ux/references/forms.md +1 -1
- package/bin/install.js +0 -319
- package/bin/install.test.ts +0 -139
- package/dist/build/vite-css-module-names/index.d.ts +0 -20
- package/dist/build/vite-css-module-names.js +0 -17
- package/src/llms/skills/imf-web-ui-agent-setup/SKILL.md +0 -71
- package/src/llms/skills/imf-web-ui-agent-setup/templates/hooks/baseline-staleness.sh +0 -17
- package/src/llms/skills/imf-web-ui-agent-setup/templates/hooks/post-tool-use.sh +0 -21
- package/src/llms/skills/imf-web-ui-agent-setup/templates/hooks/session-start.sh +0 -4
- package/src/llms/skills/imf-web-ui-agent-setup/templates/hooks/user-prompt-submit.sh +0 -4
- package/src/llms/skills/imf-web-ui-agent-setup/templates/settings.json +0 -37
- package/src/llms/skills/imf-web-ui-frontend-conventions/SKILL.md +0 -45
- package/src/llms/skills/imf-web-ui-frontend-conventions/references/assets.md +0 -23
- package/src/llms/skills/imf-web-ui-frontend-conventions/references/class-names.md +0 -42
- package/src/llms/skills/imf-web-ui-frontend-conventions/references/components.md +0 -63
- package/src/llms/skills/imf-web-ui-frontend-conventions/references/data.md +0 -130
- package/src/llms/skills/imf-web-ui-frontend-conventions/references/docs-structure.md +0 -44
- package/src/llms/skills/imf-web-ui-frontend-conventions/references/git.md +0 -33
- package/src/llms/skills/imf-web-ui-frontend-conventions/references/library-boundary.md +0 -37
- package/src/llms/skills/imf-web-ui-frontend-conventions/references/npm-project.md +0 -57
- package/src/llms/skills/imf-web-ui-frontend-conventions/references/project-structure.md +0 -21
- package/src/llms/skills/imf-web-ui-frontend-conventions/references/stack.md +0 -39
- package/src/llms/skills/imf-web-ui-frontend-conventions/references/styling.md +0 -91
- package/src/llms/skills/imf-web-ui-frontend-conventions/references/testing.md +0 -16
- package/src/llms/skills/imf-web-ui-frontend-conventions/references/tooling.md +0 -76
- package/src/llms/skills/imf-web-ui-frontend-conventions/references/typescript.md +0 -45
- package/src/llms/skills/imf-web-ui-frontend-setup/SKILL.md +0 -89
- package/src/llms/skills/imf-web-ui-frontend-setup/templates/AGENTS.md +0 -34
- package/src/llms/skills/imf-web-ui-frontend-setup/templates/README.md +0 -27
- package/src/llms/skills/imf-web-ui-library-setup/SKILL.md +0 -36
package/README.md
CHANGED
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
`@imfusion/web-ui` — the official shared Web UI library for ImFusion web apps, built on Base UI.
|
|
4
4
|
|
|
5
|
-
- [Usage](#usage) — install, wire up, and keep the version current
|
|
6
|
-
- [Documentation](#documentation) — Storybook and the developer docs
|
|
7
|
-
- [Development](#development) — working on the library itself, including the Agent Skills
|
|
8
|
-
- [Releasing](#releasing) — how versions are derived and how to cut one
|
|
9
|
-
|
|
10
5
|
## Usage
|
|
11
6
|
|
|
12
7
|
The packages are private on npmjs.com.
|
|
@@ -38,54 +33,23 @@ import "@imfusion/web-ui/styles.css";
|
|
|
38
33
|
import { WebUIProvider } from "@imfusion/web-ui";
|
|
39
34
|
```
|
|
40
35
|
|
|
41
|
-
|
|
36
|
+
> [!NOTE] There is also an AI skill to help you set up the Web UI library in your project:
|
|
37
|
+
> [`/imf-web-ui-setup`](./src/llms/skills/imf-web-ui-setup/SKILL.md).
|
|
42
38
|
|
|
43
|
-
|
|
39
|
+
## Development
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
Install the deps and configure git:
|
|
46
42
|
|
|
47
43
|
```bash
|
|
48
|
-
|
|
44
|
+
npm install
|
|
45
|
+
npm run git:config # hooks path + rebase-only pull/merge
|
|
49
46
|
```
|
|
50
47
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
| Skill | What it does |
|
|
57
|
-
| ---------------------------------- | ----------------------------------------------------------------------------- |
|
|
58
|
-
| `/imf-web-ui` | The router: decides whether guidance is needed, then which companion to open. |
|
|
59
|
-
| `/imf-web-ui-library-setup` | One-time wiring in a consumer project — the styles import and the provider. |
|
|
60
|
-
| `/imf-web-ui-components` | Component reference — what exists and how it's meant to be used. |
|
|
61
|
-
| `/imf-web-ui-ux` | UX guidance for building interfaces with the library. |
|
|
62
|
-
| `/imf-web-ui-frontend-conventions` | The frontend conventions baseline, including the sanctioned styling seams. |
|
|
63
|
-
| `/imf-web-ui-frontend-setup` | Set up or audit an ImFusion frontend's tooling against the house baseline. |
|
|
64
|
-
| `/imf-web-ui-agent-setup` | Install or update the vendored skills, agent hooks, and TanStack Intent. |
|
|
65
|
-
|
|
66
|
-
Start at `/imf-web-ui` — it routes to the rest. Storybook's **User Guide → AI Agents** page covers the whole family.
|
|
67
|
-
|
|
68
|
-
### Versions and updates
|
|
69
|
-
|
|
70
|
-
Every merge to master publishes a new build under the `dev` dist-tag. Which spec you install decides how you pick those up:
|
|
71
|
-
|
|
72
|
-
| Spec in `package.json` | Gets | Update with |
|
|
73
|
-
| ---------------------------------- | -------------------------- | ------------------------------ |
|
|
74
|
-
| `"@imfusion/web-ui": "^0.5.0"` | matching releases | `npm update @imfusion/web-ui` |
|
|
75
|
-
| `"@imfusion/web-ui": "latest"` | the newest release | `npm update @imfusion/web-ui` |
|
|
76
|
-
| `"@imfusion/web-ui": "dev"` | the newest build of master | `npm update @imfusion/web-ui` |
|
|
77
|
-
| `"@imfusion/web-ui": "file:….tgz"` | a packed tarball, frozen | re-pack and re-install by hand |
|
|
78
|
-
|
|
79
|
-
- **Two dist-tags.** `latest` moves when a release is tagged, `dev` on every build of master (and onto the release when one
|
|
80
|
-
is cut).
|
|
81
|
-
- **A range like `^0.5.0` is the usual choice.** It tracks releases and states which major you expect; bare `latest` follows
|
|
82
|
-
releases across majors, breaking changes included.
|
|
83
|
-
- **Dist-tag specs stay literal.** npm keeps `dev` or `latest` as-is in `package.json` and re-resolves on every `npm update`.
|
|
84
|
-
The concrete version lands in `package-lock.json`, so builds stay reproducible until you update.
|
|
85
|
-
- **Track `dev` while building against the library**, to get new components as they land. Use a release spec for anything you
|
|
86
|
-
cut a production release from, since `dev` moves whenever someone merges.
|
|
87
|
-
- **A `file:` tarball never updates.** npm copies the archive into `node_modules` and re-copies the same one on every
|
|
88
|
-
install. Switch to `dev` or a version range to get updates.
|
|
48
|
+
- Try out **`/web-ui-dev-getting-started`** for an ai assisted start.
|
|
49
|
+
|
|
50
|
+
> [!IMPORTANT] `npm run git:config` is a separate, explicit step. `.npmrc` sets `ignore-scripts=true` to blunt supply-chain
|
|
51
|
+
> attacks, and that disables this package's own lifecycle scripts too — so nothing configures git for you. It sets
|
|
52
|
+
> `.githooks` as the hooks path and pins `pull.rebase true` / `merge.ff only`.
|
|
89
53
|
|
|
90
54
|
## Documentation
|
|
91
55
|
|
|
@@ -98,21 +62,41 @@ npm run dev # builds the library, then Storybook + a rebuild watcher
|
|
|
98
62
|
|
|
99
63
|
See the [Developer Docs](./docs/README.md).
|
|
100
64
|
|
|
101
|
-
##
|
|
65
|
+
## AI agents
|
|
102
66
|
|
|
103
|
-
|
|
67
|
+
Two families of Agent Skills, told apart by their prefix:
|
|
104
68
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
69
|
+
| Prefix | For | Lives in | How to get it |
|
|
70
|
+
| -------------- | ----------------------------- | -------------------------- | --------------------------- |
|
|
71
|
+
| `imf-web-ui-*` | Apps consuming the library | shipped in the npm package | `npx web-ui-install-skills` |
|
|
72
|
+
| `web-ui-dev-*` | Developing the library itself | `.agents/skills/` | already there after cloning |
|
|
109
73
|
|
|
110
|
-
|
|
74
|
+
See the [skills/ folder](.agents/skills/) for the full list.
|
|
111
75
|
|
|
112
|
-
|
|
76
|
+
**`imf-web-ui-*`** travels with the package, so an agent in a consumer app gets library guidance without reading this
|
|
77
|
+
library's source. ` imf-web-ui` — the bare name, no suffix — is the router: it costs little to load and decides which
|
|
78
|
+
companion applies, or that none does.
|
|
113
79
|
|
|
114
|
-
|
|
115
|
-
|
|
80
|
+
The companions cover library wiring (`-setup`), the component reference (`-components`), UX guidance (`-ux`), frontend
|
|
81
|
+
patterns (`-frontend-patterns`), and ImFusion project tooling (`-imfusion-frontend-setup`).
|
|
82
|
+
|
|
83
|
+
**`web-ui-dev-*`** never ships; it's the workflow for working on this repo — scaffolding a component, authoring a story,
|
|
84
|
+
committing. Start with `/web-ui-dev-getting-started`, which routes you the same way.
|
|
85
|
+
|
|
86
|
+
The split is the audience, and the prefix is how you tell at a glance which side of the package boundary a skill sits on.
|
|
87
|
+
|
|
88
|
+
### Consumer skills — `imf-web-ui-*`
|
|
89
|
+
|
|
90
|
+
| Skill | What it does |
|
|
91
|
+
| ------------------------------------- | ------------------------------------------------------------------------------------ |
|
|
92
|
+
| `/imf-web-ui` | The router: decides whether guidance is needed, then which companion to open. |
|
|
93
|
+
| `/imf-web-ui-setup` | One-time wiring in a consumer project — the styles import and the provider. |
|
|
94
|
+
| `/imf-web-ui-components` | Component reference — what exists and how it's meant to be used. |
|
|
95
|
+
| `/imf-web-ui-ux` | UX guidance for building interfaces with the library. |
|
|
96
|
+
| `/imf-web-ui-frontend-patterns` | Frontend patterns, including the sanctioned styling seams (tokens, data attributes). |
|
|
97
|
+
| `/imf-web-ui-imfusion-frontend-setup` | Set up or audit an ImFusion frontend's tooling against the house baseline. |
|
|
98
|
+
|
|
99
|
+
### Development skills — `web-ui-dev-*`
|
|
116
100
|
|
|
117
101
|
| Skill | What it does |
|
|
118
102
|
| ----------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
@@ -125,71 +109,8 @@ namespace.
|
|
|
125
109
|
| `/web-ui-dev-commit` | Commit workflow: staged docs audit, CI-parity checks, house commit format. |
|
|
126
110
|
| `/web-ui-dev-audit-docs` | Audit docs against staged or recent changes for staleness, gaps, and drift. |
|
|
127
111
|
| `/web-ui-dev-audit-pass-through-defaults` | Check `@default` annotations on pass-through props against Base UI upstream. |
|
|
128
|
-
| `/web-ui-dev-
|
|
112
|
+
| `/web-ui-dev-manage-worktrees` | Create, close, or discard a worktree in `.workspaces/`. |
|
|
129
113
|
| `/web-ui-dev-refresh-design-reference` | Refresh the committed brand snapshots in `design/` from the Figma styleguide. |
|
|
130
114
|
| `/web-ui-dev-mcp` | Set up or recover Storybook, DevTools, Atlassian, or Figma MCP access. |
|
|
131
115
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
The published version is derived from git tags, not from `package.json`.
|
|
135
|
-
|
|
136
|
-
The `version` field stays at `0.0.0` in the repository and he CI computes the real number with
|
|
137
|
-
[`scripts/version.ts`](./scripts/version.ts) and writes it into `package.json` on the build agent just before publishing.
|
|
138
|
-
|
|
139
|
-
That working copy is thrown away, so nothing is committed back.
|
|
140
|
-
|
|
141
|
-
`scripts/version.ts` reads `git describe` and applies two rules:
|
|
142
|
-
|
|
143
|
-
Given the tag `web-ui/v0.5.0`:
|
|
144
|
-
|
|
145
|
-
| Where HEAD sits | Published version | dist-tag |
|
|
146
|
-
| -------------------------- | ----------------------- | -------- |
|
|
147
|
-
| Exactly on `web-ui/v0.5.0` | `0.5.0` | `latest` |
|
|
148
|
-
| 5 commits after that tag | `0.5.1-dev.5.gb4de52d7` | `dev` |
|
|
149
|
-
|
|
150
|
-
The off-tag string breaks down as:
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
0.5.1-dev.5.gb4de52d7
|
|
154
|
-
└─┬─┘ └┬┘ │ └───┬────┘
|
|
155
|
-
│ │ │ └── commit hash, abbreviated; the leading g means "git"
|
|
156
|
-
│ │ └──────── commits since the tag
|
|
157
|
-
│ └─────────── pre-release marker, which is what puts it on the dev tag
|
|
158
|
-
└──────────────── the tag's version, patch bumped
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Bumping the patch is what makes a dev build sort above the release it follows and below the next one.
|
|
162
|
-
|
|
163
|
-
Every build of `master` publishes a `dev` version automatically. To check what the current checkout would publish:
|
|
164
|
-
|
|
165
|
-
```bash
|
|
166
|
-
npx tsx scripts/version.ts # prints, changes nothing
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### Cutting a release
|
|
170
|
-
|
|
171
|
-
Tag the commit you want to ship and push the tag:
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
git tag -a web-ui/v0.5.1 -m "web-ui 0.5.1"
|
|
175
|
-
git push origin web-ui/v0.5.1
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
The tag triggers a build that publishes `0.5.1` as `latest` and repoints the `dev` dist-tag at the same version.
|
|
179
|
-
|
|
180
|
-
**The tag must be annotated (`-a`).** `git describe` ignores lightweight tags, so a tag pushed without `-a` is invisible to
|
|
181
|
-
the version script — the build reads through it to the previous release tag and publishes another `dev` version instead of
|
|
182
|
-
the release.
|
|
183
|
-
|
|
184
|
-
The tag name must match `web-ui/vX.Y.Z` exactly. Both the version script's `--match` and the TeamCity branch filter in
|
|
185
|
-
[`.teamcity/settings.kts`](./.teamcity/settings.kts) key off that shape; a tag in any other form publishes nothing.
|
|
186
|
-
|
|
187
|
-
### Building locally with a real version
|
|
188
|
-
|
|
189
|
-
A local `npm run build` stamps `dist` with `0.0.0`. When you need the true version in a local artifact:
|
|
190
|
-
|
|
191
|
-
```bash
|
|
192
|
-
npx tsx scripts/version.ts --write # writes it into package.json
|
|
193
|
-
npm run build
|
|
194
|
-
git checkout package.json # discard the write
|
|
195
|
-
```
|
|
116
|
+
Keep these tables current when a skill is added, renamed, or removed — `/web-ui-dev-audit-docs` checks them.
|
|
@@ -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();
|
|
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const logo: (props?: ({
|
|
4
4
|
size?: "sm" | "md" | "lg" | "hero" | "xs" | "xl" | "fit" | null | undefined;
|
|
5
|
-
variant?: "main" | "inherit" | "support" | "minor" | "brand" |
|
|
5
|
+
variant?: "main" | "inherit" | "support" | "minor" | "brand" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
type Props = Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> & VariantProps<typeof logo> & {
|
|
8
8
|
/** Logo source — an image URL or an inline SVG node. Required; this primitive carries no brand default (see `ImFusionLogo` for our own mark). */
|
package/dist/index.js
CHANGED
|
@@ -301,7 +301,7 @@ function Jn({ value: e, label: t = "Copy", copiedLabel: n = "Copied", variant: i
|
|
|
301
301
|
"data-copied": c || void 0,
|
|
302
302
|
"aria-label": c ? n : t,
|
|
303
303
|
onClick: () => l(e),
|
|
304
|
-
className:
|
|
304
|
+
className: r(Kn.root, typeof o == "string" ? o : void 0),
|
|
305
305
|
children: /* @__PURE__ */ X(u, {
|
|
306
306
|
size: 15,
|
|
307
307
|
strokeWidth: 2,
|
|
@@ -10593,7 +10593,6 @@ var Xh = {
|
|
|
10593
10593
|
variantInherit: "imf-ui-logo-module-variantInherit",
|
|
10594
10594
|
variantMain: "imf-ui-logo-module-variantMain",
|
|
10595
10595
|
variantMinor: "imf-ui-logo-module-variantMinor",
|
|
10596
|
-
variantOncolor: "imf-ui-logo-module-variantOncolor",
|
|
10597
10596
|
variantSupport: "imf-ui-logo-module-variantSupport"
|
|
10598
10597
|
}, Qh = n(Zh.root, { variants: {
|
|
10599
10598
|
size: {
|
|
@@ -10610,8 +10609,7 @@ var Xh = {
|
|
|
10610
10609
|
main: Zh.variantMain,
|
|
10611
10610
|
support: Zh.variantSupport,
|
|
10612
10611
|
minor: Zh.variantMinor,
|
|
10613
|
-
brand: Zh.variantBrand
|
|
10614
|
-
oncolor: Zh.variantOncolor
|
|
10612
|
+
brand: Zh.variantBrand
|
|
10615
10613
|
}
|
|
10616
10614
|
} });
|
|
10617
10615
|
function $h({ src: e, alt: t, size: n = "md", variant: r = "brand", height: i, className: a, style: o, ...s }) {
|