@imfusion/web-ui 0.5.1-dev.5.gb4de52d7 → 0.5.1-dev.51.gad24cd6e
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 +156 -55
- package/bin/install.js +428 -0
- package/bin/install.test.ts +329 -0
- package/dist/build/vite-css-module-names/index.d.ts +20 -0
- package/dist/build/vite-css-module-names.js +17 -0
- package/dist/{code-qBbqAHK-.js → code-B83kAmnS.js} +21 -15
- package/dist/components/code/code.d.ts +10 -18
- package/dist/components/field/field.d.ts +104 -0
- package/dist/components/field/field.meta.d.ts +2 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/fieldset/fieldset.d.ts +29 -0
- package/dist/components/fieldset/fieldset.meta.d.ts +2 -0
- package/dist/components/fieldset/index.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4956 -4317
- package/dist/integrations/code-highlight/code-highlight.d.ts +8 -6
- package/dist/integrations/code-highlight/highlighter.d.ts +32 -3
- package/dist/integrations/code-highlight/language-patterns.d.ts +7 -0
- package/dist/integrations/code-highlight/languages/cmake.d.ts +1 -0
- package/dist/integrations/code-highlight/languages/cpp.d.ts +1 -0
- package/dist/integrations/code-highlight/languages/python.d.ts +1 -0
- package/dist/integrations/code-highlight.js +196 -58
- package/dist/integrations/image-display-options.js +1 -1
- package/dist/llms/gen-tokens.d.ts +7 -0
- package/dist/style.css +1 -1
- package/dist/{tabs-DqBFSqq6.js → tabs-CVp_SgBl.js} +1 -1
- package/package.json +39 -25
- package/src/docgen/doc.gen.json +341 -35
- package/src/llms/install-templates/AGENTS.md +34 -0
- package/src/llms/install-templates/codex-hooks.json +44 -0
- package/src/llms/install-templates/hooks/baseline-staleness.sh +17 -0
- package/src/llms/install-templates/hooks/session-start.sh +5 -0
- package/src/llms/install-templates/hooks/stop.sh +18 -0
- package/src/llms/install-templates/hooks/subagent-start.sh +5 -0
- package/src/llms/install-templates/hooks/user-prompt-submit.sh +5 -0
- package/src/llms/install-templates/settings.json +45 -0
- package/src/llms/llms.gen.txt +12 -0
- package/src/llms/skills/imf-web-ui/SKILL.md +13 -12
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +119 -0
- package/src/llms/skills/imf-web-ui-components/SKILL.md +2 -1
- package/src/llms/skills/imf-web-ui-conventions/SKILL.md +57 -0
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +141 -0
- package/src/llms/skills/imf-web-ui-conventions/templates/REPORT.md +45 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +82 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +27 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +65 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/class-names.md +50 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/components.md +101 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/data.md +221 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +40 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/git.md +34 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +33 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +26 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +53 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +44 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/react.md +109 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +88 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/testing.md +25 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +7 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +116 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +73 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/validation.md +62 -0
- package/src/llms/skills/imf-web-ui-setup/SKILL.md +67 -37
- package/src/llms/skills/imf-web-ui-update/SKILL.md +157 -0
- 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/src/llms/tokens.gen.json +887 -0
- package/bin/install-skill.js +0 -180
- package/src/llms/skills/imf-web-ui-frontend-patterns/SKILL.md +0 -93
- package/src/llms/skills/imf-web-ui-frontend-patterns/references/code-conventions.md +0 -133
- package/src/llms/skills/imf-web-ui-frontend-patterns/references/react-patterns.md +0 -94
- package/src/llms/skills/imf-web-ui-imfusion-frontend-setup/SKILL.md +0 -201
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,19 +38,63 @@ import "@imfusion/web-ui/styles.css";
|
|
|
33
38
|
import { WebUIProvider } from "@imfusion/web-ui";
|
|
34
39
|
```
|
|
35
40
|
|
|
36
|
-
|
|
37
|
-
[`/imf-web-ui-setup`](./src/llms/skills/imf-web-ui-setup/SKILL.md). **
|
|
41
|
+
### LLM integration
|
|
38
42
|
|
|
39
|
-
|
|
43
|
+
The `web-ui` package does offer first-class support for LLMs, but it's not wired up by default.
|
|
40
44
|
|
|
41
|
-
|
|
45
|
+
To install the skills, run this command after the package is installed:
|
|
42
46
|
|
|
43
47
|
```bash
|
|
44
|
-
|
|
45
|
-
npm run git:config # hooks path + rebase-only pull/merge
|
|
48
|
+
npx web-ui-install
|
|
46
49
|
```
|
|
47
50
|
|
|
48
|
-
|
|
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 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.
|
|
76
|
+
|
|
77
|
+
### Versions and updates
|
|
78
|
+
|
|
79
|
+
Every merge to master publishes a new build under the `dev` dist-tag. Which spec you install decides how you pick those up:
|
|
80
|
+
|
|
81
|
+
| Spec in `package.json` | Gets | Update with |
|
|
82
|
+
| ---------------------------------- | -------------------------- | ------------------------------ |
|
|
83
|
+
| `"@imfusion/web-ui": "^0.5.0"` | matching releases | `npm update @imfusion/web-ui` |
|
|
84
|
+
| `"@imfusion/web-ui": "latest"` | the newest release | `npm update @imfusion/web-ui` |
|
|
85
|
+
| `"@imfusion/web-ui": "dev"` | the newest build of master | `npm update @imfusion/web-ui` |
|
|
86
|
+
| `"@imfusion/web-ui": "file:….tgz"` | a packed tarball, frozen | re-pack and re-install by hand |
|
|
87
|
+
|
|
88
|
+
- **Two dist-tags.** `latest` moves when a release is tagged, `dev` on every build of master (and onto the release when one
|
|
89
|
+
is cut).
|
|
90
|
+
- **A range like `^0.5.0` is the usual choice.** It tracks releases and states which major you expect; bare `latest` follows
|
|
91
|
+
releases across majors, breaking changes included.
|
|
92
|
+
- **Dist-tag specs stay literal.** npm keeps `dev` or `latest` as-is in `package.json` and re-resolves on every `npm update`.
|
|
93
|
+
The concrete version lands in `package-lock.json`, so builds stay reproducible until you update.
|
|
94
|
+
- **Track `dev` while building against the library**, to get new components as they land. Use a release spec for anything you
|
|
95
|
+
cut a production release from, since `dev` moves whenever someone merges.
|
|
96
|
+
- **A `file:` tarball never updates.** npm copies the archive into `node_modules` and re-copies the same one on every
|
|
97
|
+
install. Switch to `dev` or a version range to get updates.
|
|
49
98
|
|
|
50
99
|
## Documentation
|
|
51
100
|
|
|
@@ -58,51 +107,103 @@ npm run dev # builds the library, then Storybook + a rebuild watcher
|
|
|
58
107
|
|
|
59
108
|
See the [Developer Docs](./docs/README.md).
|
|
60
109
|
|
|
61
|
-
##
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
| `/web-ui-dev-
|
|
80
|
-
| `/web-ui-dev-
|
|
81
|
-
| `/web-ui-dev-
|
|
82
|
-
| `/web-ui-dev-
|
|
83
|
-
| `/web-ui-dev-
|
|
84
|
-
| `/web-ui-dev-
|
|
85
|
-
| `/web-ui-dev-
|
|
86
|
-
| `/web-ui-dev-
|
|
87
|
-
| `/web-ui-dev-
|
|
88
|
-
| `/web-ui-dev-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
110
|
+
## Development
|
|
111
|
+
|
|
112
|
+
Install the deps and configure git:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npm install
|
|
116
|
+
npm run git:config # hooks path + rebase-only pull/merge
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Try out **`/web-ui-dev-getting-started`** for an ai assisted start.**
|
|
120
|
+
|
|
121
|
+
### LLM integration
|
|
122
|
+
|
|
123
|
+
These skills are shipped with a `/web-ui-dev-*` prefix, so to make their names identifiable and not pollute the skill
|
|
124
|
+
namespace.
|
|
125
|
+
|
|
126
|
+
| Skill | What it does |
|
|
127
|
+
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
128
|
+
| `/web-ui-dev-getting-started` | Interactive intro — gauges your experience, works out your goal, routes you. |
|
|
129
|
+
| `/web-ui-dev-start` | Starting ritual for any task: Jira context, `master` vs. a worktree, context summary. |
|
|
130
|
+
| `/web-ui-dev-new-component` | Scaffolds an architecture-compliant primitive (adapted or absorbed). |
|
|
131
|
+
| `/web-ui-dev-update-component` | Pointers to every file a prop, variant, or sub-component change touches. |
|
|
132
|
+
| `/web-ui-dev-design-component` | Brand design pass for a component that works but isn't styled yet. |
|
|
133
|
+
| `/web-ui-dev-story` | Author or update a Storybook story. |
|
|
134
|
+
| `/web-ui-dev-commit` | Commit workflow: changelog skill, staged docs audit, CI-parity checks, house commit format. |
|
|
135
|
+
| `/web-ui-dev-changelog` | Generate and validate the required one-line CHANGELOG.md entry for a web-ui change, including direct commits to master. |
|
|
136
|
+
| `/web-ui-dev-audit-docs` | Audit docs against staged or recent changes for staleness, gaps, and drift. |
|
|
137
|
+
| `/web-ui-dev-audit-pass-through-defaults` | Check `@default` annotations on pass-through props against Base UI upstream. |
|
|
138
|
+
| `/web-ui-dev-teardown-worktree` | Tear down a worktree, wherever it lives — merging its branch first or dropping it. |
|
|
139
|
+
| `/web-ui-dev-refresh-design-reference` | Refresh the committed brand snapshots in `design/` from the Figma styleguide. |
|
|
140
|
+
| `/web-ui-dev-mcp` | Set up or recover Storybook, DevTools, Atlassian, or Figma MCP access. |
|
|
141
|
+
|
|
142
|
+
## Releasing
|
|
143
|
+
|
|
144
|
+
Release-facing changes are recorded as one-line entries in [`CHANGELOG.md`](./CHANGELOG.md) under `## [Unreleased]`. The
|
|
145
|
+
commit workflow requires an entry for pull-request commits and direct commits to `master`, with only narrow mechanical
|
|
146
|
+
exceptions. Each entry ends with its author as ` — Name <email>`, taken from the committer's git config.
|
|
147
|
+
|
|
148
|
+
The published version is derived from git tags, not from `package.json`.
|
|
149
|
+
|
|
150
|
+
The `version` field stays at `0.0.0` in the repository and he CI computes the real number with
|
|
151
|
+
[`scripts/version.ts`](./scripts/version.ts) and writes it into `package.json` on the build agent just before publishing.
|
|
152
|
+
|
|
153
|
+
That working copy is thrown away, so nothing is committed back.
|
|
154
|
+
|
|
155
|
+
`scripts/version.ts` reads `git describe` and applies two rules:
|
|
156
|
+
|
|
157
|
+
Given the tag `web-ui/v0.5.0`:
|
|
158
|
+
|
|
159
|
+
| Where HEAD sits | Published version | dist-tag |
|
|
160
|
+
| -------------------------- | ----------------------- | -------- |
|
|
161
|
+
| Exactly on `web-ui/v0.5.0` | `0.5.0` | `latest` |
|
|
162
|
+
| 5 commits after that tag | `0.5.1-dev.5.gb4de52d7` | `dev` |
|
|
163
|
+
|
|
164
|
+
The off-tag string breaks down as:
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
0.5.1-dev.5.gb4de52d7
|
|
168
|
+
└─┬─┘ └┬┘ │ └───┬────┘
|
|
169
|
+
│ │ │ └── commit hash, abbreviated; the leading g means "git"
|
|
170
|
+
│ │ └──────── commits since the tag
|
|
171
|
+
│ └─────────── pre-release marker, which is what puts it on the dev tag
|
|
172
|
+
└──────────────── the tag's version, patch bumped
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Bumping the patch is what makes a dev build sort above the release it follows and below the next one.
|
|
176
|
+
|
|
177
|
+
Every build of `master` publishes a `dev` version automatically. To check what the current checkout would publish:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
npx tsx scripts/version.ts # prints, changes nothing
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Cutting a release
|
|
184
|
+
|
|
185
|
+
Tag the commit you want to ship and push the tag:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
git tag -a web-ui/v0.5.1 -m "web-ui 0.5.1"
|
|
189
|
+
git push origin web-ui/v0.5.1
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
The tag triggers a build that publishes `0.5.1` as `latest` and repoints the `dev` dist-tag at the same version.
|
|
193
|
+
|
|
194
|
+
**The tag must be annotated (`-a`).** `git describe` ignores lightweight tags, so a tag pushed without `-a` is invisible to
|
|
195
|
+
the version script — the build reads through it to the previous release tag and publishes another `dev` version instead of
|
|
196
|
+
the release.
|
|
197
|
+
|
|
198
|
+
The tag name must match `web-ui/vX.Y.Z` exactly. Both the version script's `--match` and the TeamCity branch filter in
|
|
199
|
+
[`.teamcity/settings.kts`](./.teamcity/settings.kts) key off that shape; a tag in any other form publishes nothing.
|
|
200
|
+
|
|
201
|
+
### Building locally with a real version
|
|
202
|
+
|
|
203
|
+
A local `npm run build` stamps `dist` with `0.0.0`. When you need the true version in a local artifact:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
npx tsx scripts/version.ts --write # writes it into package.json
|
|
207
|
+
npm run build
|
|
208
|
+
git checkout package.json # discard the write
|
|
209
|
+
```
|