@imfusion/web-ui 0.5.1-dev.6.gece7a7b5 → 0.5.1-dev.7.ga571658e
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 +45 -20
- package/bin/install-skill.js +24 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
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
|
+
|
|
5
10
|
## Usage
|
|
6
11
|
|
|
7
12
|
The packages are private on npmjs.com.
|
|
@@ -33,8 +38,31 @@ import "@imfusion/web-ui/styles.css";
|
|
|
33
38
|
import { WebUIProvider } from "@imfusion/web-ui";
|
|
34
39
|
```
|
|
35
40
|
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
### LLM integration
|
|
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-skills
|
|
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
|
+
**Available consumer skills - `/imf-web-ui-*`**
|
|
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-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-patterns` | Frontend patterns, including the sanctioned styling seams (tokens, data attributes). |
|
|
63
|
+
| `/imf-web-ui-imfusion-frontend-setup` | Set up or audit an ImFusion frontend's tooling against the house baseline. |
|
|
64
|
+
|
|
65
|
+
Start at `/imf-web-ui` — it routes to the rest. Storybook's **User Guide → AI Agents** page covers the whole family.
|
|
38
66
|
|
|
39
67
|
### Versions and updates
|
|
40
68
|
|
|
@@ -58,20 +86,6 @@ Every merge to master publishes a new build under the `dev` dist-tag. Which spec
|
|
|
58
86
|
- **A `file:` tarball never updates.** npm copies the archive into `node_modules` and re-copies the same one on every
|
|
59
87
|
install. Switch to `dev` or a version range to get updates.
|
|
60
88
|
|
|
61
|
-
### Consumer skills — `imf-web-ui-*`
|
|
62
|
-
|
|
63
|
-
These skills are shipped with a `imf-web-ui` prefix, so to make their names identifiable and not pollute the skill namespace
|
|
64
|
-
of the user.
|
|
65
|
-
|
|
66
|
-
| Skill | What it does |
|
|
67
|
-
| ------------------------------------- | ------------------------------------------------------------------------------------ |
|
|
68
|
-
| `/imf-web-ui` | The router: decides whether guidance is needed, then which companion to open. |
|
|
69
|
-
| `/imf-web-ui-setup` | One-time wiring in a consumer project — the styles import and the provider. |
|
|
70
|
-
| `/imf-web-ui-components` | Component reference — what exists and how it's meant to be used. |
|
|
71
|
-
| `/imf-web-ui-ux` | UX guidance for building interfaces with the library. |
|
|
72
|
-
| `/imf-web-ui-frontend-patterns` | Frontend patterns, including the sanctioned styling seams (tokens, data attributes). |
|
|
73
|
-
| `/imf-web-ui-imfusion-frontend-setup` | Set up or audit an ImFusion frontend's tooling against the house baseline. |
|
|
74
|
-
|
|
75
89
|
## Documentation
|
|
76
90
|
|
|
77
91
|
**[Storybook](https://storybook.js.org/)** is the documentation platform — the component catalog, every prop, and the setup
|
|
@@ -94,9 +108,10 @@ npm run git:config # hooks path + rebase-only pull/merge
|
|
|
94
108
|
|
|
95
109
|
**Try out **`/web-ui-dev-getting-started`** for an ai assisted start.**
|
|
96
110
|
|
|
97
|
-
###
|
|
111
|
+
### LLM integration
|
|
98
112
|
|
|
99
|
-
These skills are shipped with a
|
|
113
|
+
These skills are shipped with a `/web-ui-dev-*` prefix, so to make their names identifiable and not pollute the skill
|
|
114
|
+
namespace.
|
|
100
115
|
|
|
101
116
|
| Skill | What it does |
|
|
102
117
|
| ----------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
@@ -131,8 +146,18 @@ Given the tag `web-ui/v0.5.0`:
|
|
|
131
146
|
| Exactly on `web-ui/v0.5.0` | `0.5.0` | `latest` |
|
|
132
147
|
| 5 commits after that tag | `0.5.1-dev.5.gb4de52d7` | `dev` |
|
|
133
148
|
|
|
134
|
-
|
|
135
|
-
|
|
149
|
+
The off-tag string breaks down as:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
0.5.1-dev.5.gb4de52d7
|
|
153
|
+
└─┬─┘ └┬┘ │ └───┬────┘
|
|
154
|
+
│ │ │ └── commit hash, abbreviated; the leading g means "git"
|
|
155
|
+
│ │ └──────── commits since the tag
|
|
156
|
+
│ └─────────── pre-release marker, which is what puts it on the dev tag
|
|
157
|
+
└──────────────── the tag's version, patch bumped
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Bumping the patch is what makes a dev build sort above the release it follows and below the next one.
|
|
136
161
|
|
|
137
162
|
Every build of `master` publishes a `dev` version automatically. To check what the current checkout would publish:
|
|
138
163
|
|
package/bin/install-skill.js
CHANGED
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
// When both targets are selected, .agents/skills/ holds the real copy and
|
|
12
12
|
// .claude/skills/ symlinks it (this repo's own convention) so the two
|
|
13
13
|
// can't drift apart.
|
|
14
|
+
//
|
|
15
|
+
// Flags: --target claude|agents (repeatable) for scripted installs,
|
|
16
|
+
// --reconfigure to re-open the target prompt on an existing install.
|
|
14
17
|
|
|
15
18
|
import {
|
|
16
19
|
cpSync,
|
|
@@ -86,6 +89,16 @@ function writeSymlink(linkPath, targetPath) {
|
|
|
86
89
|
symlinkSync(relative(dirname(linkPath), targetPath), linkPath);
|
|
87
90
|
}
|
|
88
91
|
|
|
92
|
+
// A prior install is recoverable from the filesystem, so a re-run doesn't
|
|
93
|
+
// re-ask: a target counts as chosen when any bundled skill is present under
|
|
94
|
+
// it. Symlinks count — they're how the both-targets layout represents
|
|
95
|
+
// .claude/, and lstat avoids following them into the real copy.
|
|
96
|
+
function detectInstalledTargets(skills) {
|
|
97
|
+
return Object.keys(TARGETS).filter(key =>
|
|
98
|
+
skills.some(name => lstatSync(resolve(TARGETS[key].root, name), { throwIfNoEntry: false }))
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
89
102
|
// --target claude|agents (repeatable) selects targets without the
|
|
90
103
|
// interactive prompt — for CI and scripted installs.
|
|
91
104
|
function parseTargetFlags(argv) {
|
|
@@ -105,7 +118,9 @@ function parseTargetFlags(argv) {
|
|
|
105
118
|
|
|
106
119
|
async function main() {
|
|
107
120
|
const skills = discoverSkills();
|
|
108
|
-
const
|
|
121
|
+
const argv = process.argv.slice(2);
|
|
122
|
+
const flagTargets = parseTargetFlags(argv);
|
|
123
|
+
const reconfigure = argv.includes("--reconfigure");
|
|
109
124
|
|
|
110
125
|
p.intro(`@imfusion/web-ui — install the ${SKILL_PREFIX} skills (${skills.length})`);
|
|
111
126
|
|
|
@@ -116,6 +131,8 @@ async function main() {
|
|
|
116
131
|
return;
|
|
117
132
|
}
|
|
118
133
|
|
|
134
|
+
const installedTargets = detectInstalledTargets(skills);
|
|
135
|
+
|
|
119
136
|
const existingVersions = Object.values(TARGETS)
|
|
120
137
|
.flatMap(({ root }) => skills.map(name => readInstalledVersion(resolve(root, name))))
|
|
121
138
|
.filter(Boolean);
|
|
@@ -132,6 +149,12 @@ async function main() {
|
|
|
132
149
|
if (flagTargets.length > 0) {
|
|
133
150
|
selected = flagTargets;
|
|
134
151
|
p.log.info(`Targets from --target flags: ${selected.join(", ")}`);
|
|
152
|
+
} else if (installedTargets.length > 0 && !reconfigure) {
|
|
153
|
+
selected = installedTargets;
|
|
154
|
+
p.log.info(
|
|
155
|
+
`Refreshing the existing install: ${selected.map(key => displayPath(TARGETS[key].root)).join(", ")}` +
|
|
156
|
+
` — pass --reconfigure to choose different targets.`
|
|
157
|
+
);
|
|
135
158
|
} else {
|
|
136
159
|
selected = await p.multiselect({
|
|
137
160
|
message: "Install into which skill directory (or directories)?",
|
package/package.json
CHANGED