@imfusion/web-ui 0.6.1-dev.33.g665111df → 0.6.1-dev.6.g4adc5c3e
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 +169 -102
- package/bin/install.js +10 -28
- package/bin/install.test.ts +0 -19
- package/dist/code-Blo48PGr.js +136 -0
- package/dist/components/code/code.d.ts +4 -5
- package/dist/components/stack/stack.d.ts +1 -1
- package/dist/components/typo/typo.d.ts +22 -23
- package/dist/icons/icon-config-provider.d.ts +8 -0
- package/dist/icons/icon-context.d.ts +4 -0
- package/dist/{icons-Cy1HAosO.js → icons-wBmF0U2x.js} +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1069 -1278
- package/dist/integrations/code-highlight/highlighter.d.ts +0 -24
- package/dist/integrations/code-highlight.js +47 -80
- package/dist/integrations/image-display-options.js +2 -2
- package/dist/provider/web-ui-provider.d.ts +3 -3
- package/dist/style.css +1 -1
- package/dist/{tabs-DIe1Utiy.js → tabs-CMKvMF4E.js} +0 -2
- package/package.json +5 -5
- package/src/docgen/doc.gen.json +1 -515
- package/src/llms/install-templates/AGENTS.md +18 -15
- package/src/llms/llms.gen.txt +33 -39
- package/src/llms/skills/imf-web-ui/SKILL.md +39 -30
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +102 -50
- package/src/llms/skills/imf-web-ui-components/SKILL.md +104 -47
- package/src/llms/skills/imf-web-ui-conventions/SKILL.md +52 -44
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +0 -1
- package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +62 -40
- package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +12 -11
- package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +46 -31
- package/src/llms/skills/imf-web-ui-conventions/topics/class-names.md +23 -18
- package/src/llms/skills/imf-web-ui-conventions/topics/components.md +69 -20
- package/src/llms/skills/imf-web-ui-conventions/topics/data.md +146 -50
- package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +23 -17
- package/src/llms/skills/imf-web-ui-conventions/topics/git.md +20 -15
- package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +19 -28
- package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +16 -20
- package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +42 -28
- package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +30 -28
- package/src/llms/skills/imf-web-ui-conventions/topics/react.md +74 -28
- package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +62 -65
- package/src/llms/skills/imf-web-ui-conventions/topics/testing.md +14 -12
- package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +4 -9
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +68 -40
- package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +50 -26
- package/src/llms/skills/imf-web-ui-conventions/topics/validation.md +25 -19
- package/src/llms/skills/imf-web-ui-setup/SKILL.md +64 -45
- package/src/llms/skills/imf-web-ui-update/SKILL.md +114 -48
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +92 -64
- package/src/llms/skills/imf-web-ui-ux/references/forms.md +36 -16
- package/src/llms/skills/imf-web-ui-ux/references/usability-heuristics.md +27 -14
- package/src/llms/skills/imf-web-ui-ux/references/visual-design.md +38 -22
- package/src/llms/tokens.gen.json +5 -5
- package/dist/code-BFMQnmu9.js +0 -147
- package/dist/codegen/gen-code-highlight-theme.d.ts +0 -1
- package/dist/components/toast/index.d.ts +0 -2
- package/dist/components/toast/toast.d.ts +0 -200
- package/dist/components/toast/toast.meta.d.ts +0 -2
- package/dist/icons/icon-config.d.ts +0 -12
package/README.md
CHANGED
|
@@ -1,160 +1,227 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Web UI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
surface. Base UI supplies behavior for the primitives that need it; consumers do not depend on Base UI directly.
|
|
3
|
+
`@imfusion/web-ui` — the official shared Web UI library for ImFusion web apps, built on Base UI.
|
|
5
4
|
|
|
6
|
-
- [
|
|
7
|
-
- [
|
|
8
|
-
- [
|
|
9
|
-
- [
|
|
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
|
|
10
9
|
|
|
11
|
-
##
|
|
10
|
+
## Usage
|
|
12
11
|
|
|
13
|
-
The
|
|
14
|
-
[Test Licenses page](https://imfusion.atlassian.net/wiki/spaces/DEV/pages/255590402/Test+Licenses), then save it in your
|
|
15
|
-
user-level npm config:
|
|
12
|
+
The packages are private on npmjs.com.
|
|
16
13
|
|
|
17
|
-
|
|
14
|
+
To install them, get the Web SDK npm token from the
|
|
15
|
+
[Test Licenses](https://imfusion.atlassian.net/wiki/spaces/DEV/pages/255590402/Test+Licenses) page on Confluence and add it
|
|
16
|
+
to your user-level `.npmrc`:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
18
19
|
npm config set //registry.npmjs.org/:_authToken=<token> --location=user
|
|
19
20
|
```
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
Then:
|
|
22
23
|
|
|
23
|
-
```
|
|
24
|
+
```bash
|
|
24
25
|
npm install @imfusion/web-ui
|
|
25
26
|
```
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
Or if you want to install the latest CI build from master:
|
|
28
29
|
|
|
29
|
-
```
|
|
30
|
+
```bash
|
|
30
31
|
npm install @imfusion/web-ui@dev
|
|
31
32
|
```
|
|
32
33
|
|
|
33
|
-
Import the stylesheet and
|
|
34
|
+
Import the stylesheet and wrap your app root once:
|
|
34
35
|
|
|
35
36
|
```tsx
|
|
36
37
|
import "@imfusion/web-ui/styles.css";
|
|
37
38
|
import { WebUIProvider } from "@imfusion/web-ui";
|
|
38
|
-
|
|
39
|
-
export function App() {
|
|
40
|
-
return <WebUIProvider>{/* app */}</WebUIProvider>;
|
|
41
|
-
}
|
|
42
39
|
```
|
|
43
40
|
|
|
44
|
-
###
|
|
41
|
+
### LLM integration
|
|
42
|
+
|
|
43
|
+
The `web-ui` package does offer first-class support for LLMs, but it's not wired up by default.
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
To install the skills, run this command after the package is installed:
|
|
47
46
|
|
|
48
|
-
```
|
|
47
|
+
```bash
|
|
49
48
|
npx web-ui-install
|
|
50
49
|
```
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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.
|
|
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.
|
|
98
|
+
|
|
99
|
+
## Documentation
|
|
100
|
+
|
|
101
|
+
**[Storybook](https://storybook.js.org/)** is the documentation platform — the component catalog, every prop, and the setup
|
|
102
|
+
guides. It isn't hosted yet, so run it locally:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npm run dev # builds the library, then Storybook + a rebuild watcher
|
|
106
|
+
```
|
|
57
107
|
|
|
58
|
-
|
|
59
|
-
| ------------------------- | ------------------------------------------------------------ |
|
|
60
|
-
| `/imf-web-ui` | Route UI work to the right companion. |
|
|
61
|
-
| `/imf-web-ui-setup` | Plan library wiring, project setup, or tooling changes. |
|
|
62
|
-
| `/imf-web-ui-components` | Look up component and icon APIs. |
|
|
63
|
-
| `/imf-web-ui-ux` | Choose components and shape screens and flows. |
|
|
64
|
-
| `/imf-web-ui-conventions` | Follow the frontend conventions and token seams. |
|
|
65
|
-
| `/imf-web-ui-audit` | Inspect an existing frontend without changing it. |
|
|
66
|
-
| `/imf-web-ui-update` | Update the package, skills, and hooks in a consumer project. |
|
|
108
|
+
See the [Developer Docs](./docs/README.md).
|
|
67
109
|
|
|
68
|
-
|
|
69
|
-
installation and Codex trust step.
|
|
110
|
+
## Development
|
|
70
111
|
|
|
71
|
-
|
|
112
|
+
Install the deps and configure git:
|
|
72
113
|
|
|
73
|
-
|
|
114
|
+
```bash
|
|
115
|
+
npm install
|
|
116
|
+
npm run git:config # hooks path + rebase-only pull/merge
|
|
117
|
+
```
|
|
74
118
|
|
|
75
|
-
|
|
76
|
-
| --------------- | -------------------------------- | ----------------------------- |
|
|
77
|
-
| `^0.6.0` | compatible releases | `npm update @imfusion/web-ui` |
|
|
78
|
-
| `latest` | newest release | `npm update @imfusion/web-ui` |
|
|
79
|
-
| `dev` | newest build of `master` | `npm update @imfusion/web-ui` |
|
|
80
|
-
| `file:…tgz` | the packed archive you installed | pack and install again |
|
|
119
|
+
**Try out **`/web-ui-dev-getting-started`** for an ai assisted start.**
|
|
81
120
|
|
|
82
|
-
|
|
83
|
-
until you update it. A bare `latest` can cross major versions, while a range keeps the expected major. A file tarball is a
|
|
84
|
-
copy, so it never updates by itself.
|
|
121
|
+
### LLM integration
|
|
85
122
|
|
|
86
|
-
|
|
123
|
+
Web UI development skills use a `/web-ui-dev-*` prefix. `documentation-writer` comes from `npx skills`; it is not a native
|
|
124
|
+
Web UI skill.
|
|
87
125
|
|
|
88
|
-
|
|
89
|
-
|
|
126
|
+
| Skill | What it does |
|
|
127
|
+
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
128
|
+
| `/documentation-writer` | External `npx skills` workflow for Diátaxis documentation. |
|
|
129
|
+
| `/web-ui-dev-getting-started` | Interactive intro — gauges your experience, works out your goal, routes you. |
|
|
130
|
+
| `/web-ui-dev-start` | Starting ritual for any task: Jira context, `master` vs. a worktree, context summary. |
|
|
131
|
+
| `/web-ui-dev-new-component` | Scaffolds an architecture-compliant primitive (adapted or absorbed). |
|
|
132
|
+
| `/web-ui-dev-update-component` | Pointers to every file a prop, variant, or sub-component change touches. |
|
|
133
|
+
| `/web-ui-dev-design-component` | Brand design pass for a component that works but isn't styled yet. |
|
|
134
|
+
| `/web-ui-dev-story` | Author or update a Storybook story. |
|
|
135
|
+
| `/web-ui-dev-commit` | Commit workflow: changelog skill, staged docs audit, CI-parity checks, house commit format. |
|
|
136
|
+
| `/web-ui-dev-release` | Prepare release notes, commit them, and ship the approved release. |
|
|
137
|
+
| `/web-ui-dev-changelog` | Generate and validate the required one-line CHANGELOG.md entry for a web-ui change, including direct commits to master. |
|
|
138
|
+
| `/web-ui-dev-audit-docs` | Audit docs against staged or recent changes for staleness, gaps, and drift. |
|
|
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. |
|
|
90
143
|
|
|
91
|
-
|
|
92
|
-
npm run dev
|
|
93
|
-
```
|
|
144
|
+
## Releasing
|
|
94
145
|
|
|
95
|
-
|
|
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.
|
|
96
149
|
|
|
97
|
-
|
|
150
|
+
The published version is derived from git tags, not from `package.json`.
|
|
98
151
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
npm run git:config
|
|
102
|
-
```
|
|
152
|
+
The `version` field stays at `0.0.0` in the repository and he CI computes the real number with
|
|
153
|
+
[`scripts/version.ts`](./scripts/version.ts) and writes it into `package.json` on the build agent just before publishing.
|
|
103
154
|
|
|
104
|
-
|
|
105
|
-
[`web-ui-dev-getting-started`](./.agents/skills/web-ui-dev-getting-started/SKILL.md) skill can route a first task.
|
|
155
|
+
That working copy is thrown away, so nothing is committed back.
|
|
106
156
|
|
|
107
|
-
|
|
157
|
+
`scripts/version.ts` reads `git describe` and applies two rules:
|
|
108
158
|
|
|
109
|
-
|
|
110
|
-
| ----------------------------------------- | ------------------------------------------------ |
|
|
111
|
-
| `/web-ui-dev-getting-started` | Route a first task based on experience and goal. |
|
|
112
|
-
| `/web-ui-dev-start` | Establish task context and working location. |
|
|
113
|
-
| `/web-ui-dev-new-component` | Add a primitive. |
|
|
114
|
-
| `/web-ui-dev-update-component` | Change an existing primitive. |
|
|
115
|
-
| `/web-ui-dev-design-component` | Apply the ImFusion brand to a component. |
|
|
116
|
-
| `/web-ui-dev-story` | Author a Storybook story. |
|
|
117
|
-
| `/web-ui-dev-commit` | Verify and commit a change. |
|
|
118
|
-
| `/web-ui-dev-release` | Prepare and ship a release. |
|
|
119
|
-
| `/web-ui-dev-audit-docs` | Check docs for drift before a commit. |
|
|
120
|
-
| `/web-ui-dev-audit-pass-through-defaults` | Check adapted prop defaults against Base UI. |
|
|
121
|
-
| `/web-ui-dev-refresh-design-reference` | Refresh the committed brand snapshots. |
|
|
122
|
-
| `/web-ui-dev-teardown-worktree` | Remove a finished worktree. |
|
|
123
|
-
| `/web-ui-dev-mcp` | Recover one optional MCP capability. |
|
|
159
|
+
Given the tag `web-ui/v0.5.0`:
|
|
124
160
|
|
|
125
|
-
|
|
161
|
+
| Where HEAD sits | Published version | dist-tag |
|
|
162
|
+
| -------------------------- | ----------------------- | -------- |
|
|
163
|
+
| Exactly on `web-ui/v0.5.0` | `0.5.0` | `latest` |
|
|
164
|
+
| 5 commits after that tag | `0.5.1-dev.5.gb4de52d7` | `dev` |
|
|
126
165
|
|
|
127
|
-
The
|
|
128
|
-
the build copy.
|
|
166
|
+
The off-tag string breaks down as:
|
|
129
167
|
|
|
130
|
-
|
|
168
|
+
```
|
|
169
|
+
0.5.1-dev.5.gb4de52d7
|
|
170
|
+
└─┬─┘ └┬┘ │ └───┬────┘
|
|
171
|
+
│ │ │ └── commit hash, abbreviated; the leading g means "git"
|
|
172
|
+
│ │ └──────── commits since the tag
|
|
173
|
+
│ └─────────── pre-release marker, which is what puts it on the dev tag
|
|
174
|
+
└──────────────── the tag's version, patch bumped
|
|
175
|
+
```
|
|
131
176
|
|
|
132
|
-
|
|
133
|
-
| --------------------- | --------------------- | -------- |
|
|
134
|
-
| `web-ui/v0.6.0` | `0.6.0` | `latest` |
|
|
135
|
-
| five commits after it | `0.6.1-dev.5.g<hash>` | `dev` |
|
|
177
|
+
Bumping the patch is what makes a dev build sort above the release it follows and below the next one.
|
|
136
178
|
|
|
137
|
-
|
|
179
|
+
Every build of `master` publishes a `dev` version automatically. To check what the current checkout would publish:
|
|
138
180
|
|
|
139
|
-
```
|
|
140
|
-
npx tsx scripts/version.ts
|
|
181
|
+
```bash
|
|
182
|
+
npx tsx scripts/version.ts # prints, changes nothing
|
|
141
183
|
```
|
|
142
184
|
|
|
143
|
-
|
|
185
|
+
### Cutting a release
|
|
186
|
+
|
|
187
|
+
The release skill prepares the dated release section from detailed Unreleased entries and commits it through the normal
|
|
188
|
+
approval gate. Then ship that prepared commit:
|
|
144
189
|
|
|
145
|
-
```
|
|
190
|
+
```bash
|
|
146
191
|
npm run release
|
|
147
192
|
```
|
|
148
193
|
|
|
149
|
-
|
|
150
|
-
|
|
194
|
+
The command reads the prepared version from `CHANGELOG.md`, requires a clean working tree, runs full verification, creates a
|
|
195
|
+
version (e.g. `web-ui/v0.5.1`), and pushes the tag. TeamCity builds that tag, publishes the version as `latest`, and points
|
|
196
|
+
`dev` at the same version. The release skill uses the optional `teamcity` CLI when it is installed and authenticated to check
|
|
197
|
+
the tagged build and publish log; otherwise it directs you to the same checks in TeamCity.
|
|
151
198
|
|
|
152
|
-
|
|
199
|
+
The tag name must match `web-ui/vX.Y.Z` exactly. Both the version script's `--match` and the TeamCity branch filter in
|
|
200
|
+
[`.teamcity/settings.kts`](./.teamcity/settings.kts) key off that shape; a tag in any other form publishes nothing.
|
|
153
201
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
npm
|
|
157
|
-
|
|
202
|
+
### Optional TeamCity CLI
|
|
203
|
+
|
|
204
|
+
The release skill can verify the tagged build and npm publish with the
|
|
205
|
+
[official TeamCity CLI](https://www.jetbrains.com/help/teamcity/2026.1/teamcity-cli.html#installing). It is optional:
|
|
206
|
+
TeamCity still builds and publishes releases when the CLI is absent.
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
brew install jetbrains/utils/teamcity
|
|
210
|
+
# or: npm install -g @jetbrains/teamcity-cli
|
|
211
|
+
|
|
212
|
+
teamcity auth login --server https://ci.imfusion.com
|
|
213
|
+
teamcity auth status
|
|
158
214
|
```
|
|
159
215
|
|
|
160
|
-
|
|
216
|
+
`teamcity auth login` opens the browser for TeamCity's PKCE authorization flow and stores the resulting token in the system
|
|
217
|
+
keyring. Use `teamcity auth login --no-browser` when browser login is unavailable.
|
|
218
|
+
|
|
219
|
+
### Building locally with a real version
|
|
220
|
+
|
|
221
|
+
A local `npm run build` stamps `dist` with `0.0.0`. When you need the true version in a local artifact:
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
npx tsx scripts/version.ts --write # writes it into package.json
|
|
225
|
+
npm run build
|
|
226
|
+
git checkout package.json # discard the write
|
|
227
|
+
```
|
package/bin/install.js
CHANGED
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
// .claude/skills/ symlinks it (this repo's own convention) so the two
|
|
14
14
|
// can't drift apart.
|
|
15
15
|
//
|
|
16
|
-
// Flags: bare =
|
|
17
|
-
// checks the repo's existing hooks and still installs the skills.
|
|
18
|
-
// --target claude|agents
|
|
16
|
+
// Flags: bare = skills only; --hooks adds the agent lifecycle hooks after the
|
|
17
|
+
// consumer checks the repo's existing hooks and still installs the skills.
|
|
18
|
+
// --target claude|agents
|
|
19
|
+
// (repeatable) selects scripted install targets,
|
|
19
20
|
// --reconfigure to re-open the target prompt on an existing install.
|
|
20
21
|
|
|
21
22
|
import {
|
|
@@ -284,45 +285,26 @@ function upsertAgentsBlock() {
|
|
|
284
285
|
return existing ? "updated" : "added";
|
|
285
286
|
}
|
|
286
287
|
|
|
287
|
-
// --target claude|agents
|
|
288
|
+
// --target claude|agents (repeatable) selects targets without the
|
|
288
289
|
// interactive prompt — for CI and scripted installs.
|
|
289
290
|
function parseTargetFlags(argv) {
|
|
290
291
|
const targets = [];
|
|
291
292
|
for (let i = 0; i < argv.length; i++) {
|
|
292
293
|
if (argv[i] !== "--target") continue;
|
|
293
294
|
const value = argv[i + 1];
|
|
294
|
-
if (!value ||
|
|
295
|
-
console.error(`--target expects one of: ${Object.keys(TARGETS).join(", ")}
|
|
295
|
+
if (!value || !(value in TARGETS)) {
|
|
296
|
+
console.error(`--target expects one of: ${Object.keys(TARGETS).join(", ")}`);
|
|
296
297
|
process.exit(1);
|
|
297
298
|
}
|
|
298
|
-
targets.push(
|
|
299
|
+
targets.push(value);
|
|
299
300
|
i++;
|
|
300
301
|
}
|
|
301
|
-
return
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
function printHelp() {
|
|
305
|
-
console.log(`Usage: web-ui-install [options]
|
|
306
|
-
|
|
307
|
-
Install @imfusion/web-ui agent skills into a consumer project.
|
|
308
|
-
|
|
309
|
-
Options:
|
|
310
|
-
--target agents|claude|all Install into selected skill target(s).
|
|
311
|
-
Repeat --target to select multiple targets.
|
|
312
|
-
--hooks Install agent lifecycle hooks.
|
|
313
|
-
--reconfigure Re-open target selection prompt.
|
|
314
|
-
-h, --help Show this help.
|
|
315
|
-
`);
|
|
302
|
+
return targets;
|
|
316
303
|
}
|
|
317
304
|
|
|
318
305
|
async function main() {
|
|
319
|
-
const argv = process.argv.slice(2);
|
|
320
|
-
if (argv.length === 0 || argv.includes("-h") || argv.includes("--help")) {
|
|
321
|
-
printHelp();
|
|
322
|
-
return;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
306
|
const skills = discoverSkills();
|
|
307
|
+
const argv = process.argv.slice(2);
|
|
326
308
|
const flagTargets = parseTargetFlags(argv);
|
|
327
309
|
const reconfigure = argv.includes("--reconfigure");
|
|
328
310
|
// Every install includes the skill bundle. Hooks are opt-in via --hooks —
|
package/bin/install.test.ts
CHANGED
|
@@ -41,25 +41,6 @@ beforeEach(() => {
|
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
describe("web-ui-install", () => {
|
|
44
|
-
it("prints help and makes no changes without arguments", () => {
|
|
45
|
-
const result = spawnSync("node", [installer], { cwd: consumer, encoding: "utf-8" });
|
|
46
|
-
|
|
47
|
-
expect(result.status).toBe(0);
|
|
48
|
-
expect(result.stdout).toContain("Usage: web-ui-install [options]");
|
|
49
|
-
expect(existsSync(join(consumer, ".agents"))).toBe(false);
|
|
50
|
-
expect(existsSync(join(consumer, ".claude"))).toBe(false);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
it("uses all as an alias for both installation targets", () => {
|
|
54
|
-
runInstall(consumer, "--target", "all");
|
|
55
|
-
|
|
56
|
-
const installed = readdirSync(join(consumer, ".agents", "skills"));
|
|
57
|
-
expect(installed).toHaveLength(7);
|
|
58
|
-
for (const name of installed) {
|
|
59
|
-
expect(lstatSync(join(consumer, ".claude", "skills", name)).isSymbolicLink()).toBe(true);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
|
|
63
44
|
it("installs skills into both targets with version markers", () => {
|
|
64
45
|
runInstall(consumer, "--skills", "--target", "agents", "--target", "claude");
|
|
65
46
|
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { t as e } from "./chunk-DmhlhrBa.js";
|
|
2
|
+
import { t } from "./meta-CySnRuVp.js";
|
|
3
|
+
import { Ma as n, Qt as r, Xo as i, hn as a, r as o } from "./icons-wBmF0U2x.js";
|
|
4
|
+
import { cx as s } from "class-variance-authority";
|
|
5
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
import { useCallback as u, useEffect as d, useRef as f, useState as p } from "react";
|
|
7
|
+
//#region src/hooks/use-clipboard.ts
|
|
8
|
+
function m({ timeout: e = 1500 } = {}) {
|
|
9
|
+
let [t, n] = p(!1), r = f(void 0);
|
|
10
|
+
return d(() => () => clearTimeout(r.current), []), {
|
|
11
|
+
copied: t,
|
|
12
|
+
copy: u((t) => {
|
|
13
|
+
navigator.clipboard.writeText(t).then(() => {
|
|
14
|
+
n(!0), clearTimeout(r.current), r.current = setTimeout(() => n(!1), e);
|
|
15
|
+
});
|
|
16
|
+
}, [e])
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
var h = {
|
|
20
|
+
block: "imf-ui-code-module-block",
|
|
21
|
+
copy: "imf-ui-code-module-copy",
|
|
22
|
+
icon: "imf-ui-code-module-icon",
|
|
23
|
+
inline: "imf-ui-code-module-inline",
|
|
24
|
+
inlineCopy: "imf-ui-code-module-inlineCopy",
|
|
25
|
+
inlineLink: "imf-ui-code-module-inlineLink",
|
|
26
|
+
language: "imf-ui-code-module-language",
|
|
27
|
+
pre: "imf-ui-code-module-pre",
|
|
28
|
+
separator: "imf-ui-code-module-separator"
|
|
29
|
+
}, g = /* @__PURE__ */ e({
|
|
30
|
+
Block: () => y,
|
|
31
|
+
Inline: () => _,
|
|
32
|
+
InlineLink: () => v
|
|
33
|
+
});
|
|
34
|
+
function _({ className: e, copyable: t = !1, children: r, ...a }) {
|
|
35
|
+
let { copied: u, copy: d } = m(), p = f(null), g = u ? n : i;
|
|
36
|
+
return /* @__PURE__ */ l("code", {
|
|
37
|
+
...a,
|
|
38
|
+
"data-imf-ui-component": "Code.Inline",
|
|
39
|
+
className: s(h.inline, e),
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ c("span", {
|
|
42
|
+
ref: p,
|
|
43
|
+
children: r
|
|
44
|
+
}),
|
|
45
|
+
t && /* @__PURE__ */ c("span", { className: h.separator }),
|
|
46
|
+
t && /* @__PURE__ */ c("button", {
|
|
47
|
+
type: "button",
|
|
48
|
+
className: h.inlineCopy,
|
|
49
|
+
"data-copied": u || void 0,
|
|
50
|
+
"aria-label": u ? "Copied" : "Copy",
|
|
51
|
+
onClick: () => d(p.current?.textContent ?? ""),
|
|
52
|
+
children: /* @__PURE__ */ c(o, {
|
|
53
|
+
glyph: g,
|
|
54
|
+
size: 12,
|
|
55
|
+
strokeWidth: 2,
|
|
56
|
+
"aria-hidden": !0
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
_.displayName = "Code.Inline";
|
|
63
|
+
function v({ className: e, kind: t = "external", children: n, ...i }) {
|
|
64
|
+
let u = t === "external" ? a : r;
|
|
65
|
+
return /* @__PURE__ */ l("a", {
|
|
66
|
+
...t === "external" ? {
|
|
67
|
+
target: "_blank",
|
|
68
|
+
rel: "noreferrer"
|
|
69
|
+
} : {},
|
|
70
|
+
...i,
|
|
71
|
+
"data-imf-ui-component": "Code.InlineLink",
|
|
72
|
+
"data-kind": t,
|
|
73
|
+
className: s(h.inline, h.inlineLink, e),
|
|
74
|
+
children: [
|
|
75
|
+
n,
|
|
76
|
+
/* @__PURE__ */ c("span", { className: h.separator }),
|
|
77
|
+
/* @__PURE__ */ c("span", {
|
|
78
|
+
className: h.icon,
|
|
79
|
+
"aria-hidden": !0,
|
|
80
|
+
children: /* @__PURE__ */ c(o, {
|
|
81
|
+
glyph: u,
|
|
82
|
+
size: 12,
|
|
83
|
+
strokeWidth: 2
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
v.displayName = "Code.InlineLink";
|
|
90
|
+
function y({ className: e, language: t, hideCopy: r = !1, children: a, ...u }) {
|
|
91
|
+
let { copied: d, copy: p } = m(), g = f(null), _ = d ? n : i;
|
|
92
|
+
return /* @__PURE__ */ l("div", {
|
|
93
|
+
"data-imf-ui-component": "Code.Block",
|
|
94
|
+
className: s(h.block, e),
|
|
95
|
+
children: [
|
|
96
|
+
t != null && /* @__PURE__ */ c("span", {
|
|
97
|
+
className: h.language,
|
|
98
|
+
children: t
|
|
99
|
+
}),
|
|
100
|
+
!r && /* @__PURE__ */ c("button", {
|
|
101
|
+
type: "button",
|
|
102
|
+
className: h.copy,
|
|
103
|
+
"data-copied": d || void 0,
|
|
104
|
+
"aria-label": d ? "Copied" : "Copy",
|
|
105
|
+
onClick: () => p(g.current?.textContent ?? ""),
|
|
106
|
+
children: /* @__PURE__ */ c(o, {
|
|
107
|
+
glyph: _,
|
|
108
|
+
size: 12,
|
|
109
|
+
strokeWidth: 2,
|
|
110
|
+
"aria-hidden": !0
|
|
111
|
+
})
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ c("pre", {
|
|
114
|
+
...u,
|
|
115
|
+
className: h.pre,
|
|
116
|
+
children: /* @__PURE__ */ c("code", {
|
|
117
|
+
ref: g,
|
|
118
|
+
children: a
|
|
119
|
+
})
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
y.displayName = "Code.Block";
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/components/code/code.meta.ts
|
|
127
|
+
var b = {
|
|
128
|
+
name: "Code",
|
|
129
|
+
category: t.display,
|
|
130
|
+
status: "stable",
|
|
131
|
+
namespace: !0,
|
|
132
|
+
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.",
|
|
133
|
+
origin: "native"
|
|
134
|
+
};
|
|
135
|
+
//#endregion
|
|
136
|
+
export { g as a, v as i, y as n, m as o, _ as r, b as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
type InlineProps = Omit<useRender.ComponentProps<"code">, "children"> & {
|
|
1
|
+
type InlineProps = Omit<React.HTMLAttributes<HTMLElement>, "children"> & {
|
|
3
2
|
/** Code content shown in the chip. The copy button copies its rendered text. */
|
|
4
3
|
children: React.ReactNode;
|
|
5
4
|
/** Show a small copy button on the right, behind a hairline separator. @default false */
|
|
@@ -10,12 +9,12 @@ type InlineProps = Omit<useRender.ComponentProps<"code">, "children"> & {
|
|
|
10
9
|
* text. `Typo.InlineCode` renders this under the hood so inline-code chrome is
|
|
11
10
|
* defined in one place. The copy button copies the rendered text.
|
|
12
11
|
*/
|
|
13
|
-
export declare function Inline({ className, copyable, children,
|
|
12
|
+
export declare function Inline({ className, copyable, children, ...props }: InlineProps): import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export declare namespace Inline {
|
|
15
14
|
var displayName: string;
|
|
16
15
|
}
|
|
17
16
|
export type CodeInlineLinkKind = "external" | "internal";
|
|
18
|
-
type InlineLinkProps = Omit<
|
|
17
|
+
type InlineLinkProps = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "children"> & {
|
|
19
18
|
/** The link text, as a raw string, rendered as a code fragment. */
|
|
20
19
|
children: string;
|
|
21
20
|
/** Link target scope. `"external"` (default) opens in a new tab with a diagonal `ArrowUpRight` icon; `"internal"` stays in the current tab with a horizontal `ArrowRight` icon. */
|
|
@@ -28,7 +27,7 @@ type InlineLinkProps = Omit<useRender.ComponentProps<"a">, "children"> & {
|
|
|
28
27
|
* copy button and a link on the same chip. Mirrors `ChipLink`'s shape (anchor
|
|
29
28
|
* is the chip root, trailing icon nudges on hover, `data-kind` picks the icon).
|
|
30
29
|
*/
|
|
31
|
-
export declare function InlineLink({ className, kind, children,
|
|
30
|
+
export declare function InlineLink({ className, kind, children, ...props }: InlineLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
32
31
|
export declare namespace InlineLink {
|
|
33
32
|
var displayName: string;
|
|
34
33
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
declare const stack: (props?: ({
|
|
3
|
-
gap?: "
|
|
3
|
+
gap?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | null | undefined;
|
|
4
4
|
align?: "center" | "end" | "start" | "stretch" | null | undefined;
|
|
5
5
|
justify?: "center" | "end" | "start" | "between" | "around" | "evenly" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|