@imfusion/web-ui 0.10.1-dev.34.gb01a818e → 0.10.1-dev.41.g467e0e1a
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/CHANGELOG.md +28 -2
- package/README.md +19 -16
- package/dist/components/app-shell/app-shell.d.ts +35 -23
- package/dist/components/select/select.d.ts +7 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/use-disclosure.d.ts +17 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1849 -1746
- package/dist/paths-CZtwNknt.js +132 -0
- package/dist/style.css +1 -1
- package/dist/vite/local-web-ui-link.d.ts +7 -3
- package/dist/vite.js +38 -22
- package/dist/web-ui-cli.js +154 -122
- package/package.json +2 -2
- package/src/docgen/doc.gen.json +25 -66
- package/src/llms/skills/imf-web-ui/SKILL.md +15 -13
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +2 -1
- package/src/llms/skills/imf-web-ui-conventions/SKILL.md +24 -23
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +1 -1
- package/src/llms/skills/imf-web-ui-conventions/topics/data.md +4 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +32 -4
- package/src/llms/skills/imf-web-ui-setup/SKILL.md +8 -1
- package/dist/paths-B5Ht3ETc.js +0 -26
package/src/docgen/doc.gen.json
CHANGED
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"app-shell": {
|
|
119
119
|
"root": {
|
|
120
120
|
"name": "AppShell.Root",
|
|
121
|
-
"description": "",
|
|
121
|
+
"description": "AppShell — application layout shell.\n\nThe classic dashboard frame: collapsible navbar/aside sidebars, a page\nheader, an optional footer, and a scrolling main content area. Also called\nan app layout, application frame, dashboard shell, or sidebar layout.\n\nComposed of eight sub-components used with dot-notation: `AppShell.Root` wraps\n`AppShell.Header`, `AppShell.Navbar`, `AppShell.Aside`, `AppShell.Footer`,\n`AppShell.Main`, and (inside a sidebar) `AppShell.Section` and `AppShell.NavItem`.\n\nSizing is CSS-driven — override the `--imf-ui-appshell-*` custom properties\nrather than passing dimension props. Below the responsive breakpoints the\nnavbar (`md`) and aside (`lg`) open as drawers, and the shell renders the\nnavbar's toggle itself.\n\nCopied and adapted from Mantine's AppShell; no upstream runtime dependency.\nMIT licensed (see Mantine repo).",
|
|
122
122
|
"props": [
|
|
123
123
|
{
|
|
124
124
|
"name": "ref",
|
|
@@ -141,6 +141,13 @@
|
|
|
141
141
|
"defaultValue": "Close panel",
|
|
142
142
|
"description": "Accessible name of the close button shown while the aside is a drawer."
|
|
143
143
|
},
|
|
144
|
+
{
|
|
145
|
+
"name": "defaultOpen",
|
|
146
|
+
"required": false,
|
|
147
|
+
"type": "boolean",
|
|
148
|
+
"defaultValue": null,
|
|
149
|
+
"description": "Whether the drawer starts open when `open` is omitted."
|
|
150
|
+
},
|
|
144
151
|
{
|
|
145
152
|
"name": "onOpenChange",
|
|
146
153
|
"required": false,
|
|
@@ -185,68 +192,6 @@
|
|
|
185
192
|
}
|
|
186
193
|
]
|
|
187
194
|
},
|
|
188
|
-
{
|
|
189
|
-
"name": "AppShell.Burger",
|
|
190
|
-
"description": "AppShell.Burger — the menu toggle: three sheared bands that cross while the navbar drawer is open. With no props it\nopens and closes that drawer. Takes its color from the surface and hides from `md` up, where the navbar is docked, and\nsteps back while the drawer is open, so the drawer's own close is the only one shown.",
|
|
191
|
-
"props": [
|
|
192
|
-
{
|
|
193
|
-
"name": "className",
|
|
194
|
-
"required": false,
|
|
195
|
-
"type": "string | ((state: ButtonState) => string)",
|
|
196
|
-
"defaultValue": null,
|
|
197
|
-
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"name": "focusableWhenDisabled",
|
|
201
|
-
"required": false,
|
|
202
|
-
"type": "boolean",
|
|
203
|
-
"defaultValue": "false",
|
|
204
|
-
"description": "Whether the button should be focusable when disabled."
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
"name": "label",
|
|
208
|
-
"required": false,
|
|
209
|
-
"type": "string",
|
|
210
|
-
"defaultValue": null,
|
|
211
|
-
"description": "Accessible name. Defaults to \"Open navigation\" or \"Close navigation\" from `opened`."
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"name": "nativeButton",
|
|
215
|
-
"required": false,
|
|
216
|
-
"type": "boolean",
|
|
217
|
-
"defaultValue": "true",
|
|
218
|
-
"description": "Whether the component renders a native `<button>` element when replacing it\nvia the `render` prop.\nSet to `false` if the rendered element is not a button (for example, `<div>`)."
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
"name": "opened",
|
|
222
|
-
"required": false,
|
|
223
|
-
"type": "boolean",
|
|
224
|
-
"defaultValue": null,
|
|
225
|
-
"description": "Draws the cross and sets `aria-expanded`. Defaults to whether the navbar drawer is open."
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"name": "ref",
|
|
229
|
-
"required": false,
|
|
230
|
-
"type": "Ref<HTMLDivElement>",
|
|
231
|
-
"defaultValue": null,
|
|
232
|
-
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
"name": "render",
|
|
236
|
-
"required": false,
|
|
237
|
-
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, ButtonState>",
|
|
238
|
-
"defaultValue": null,
|
|
239
|
-
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
"name": "style",
|
|
243
|
-
"required": false,
|
|
244
|
-
"type": "| CSSProperties\n| ((state: ButtonState) => CSSProperties)",
|
|
245
|
-
"defaultValue": null,
|
|
246
|
-
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
247
|
-
}
|
|
248
|
-
]
|
|
249
|
-
},
|
|
250
195
|
{
|
|
251
196
|
"name": "AppShell.Footer",
|
|
252
197
|
"description": "",
|
|
@@ -262,7 +207,7 @@
|
|
|
262
207
|
},
|
|
263
208
|
{
|
|
264
209
|
"name": "AppShell.Header",
|
|
265
|
-
"description": "",
|
|
210
|
+
"description": "AppShell.Header — the page row: a title and actions at every width. Below `md` it sits under the shell's bar, and from\n`md` it sits beside the rail.",
|
|
266
211
|
"props": [
|
|
267
212
|
{
|
|
268
213
|
"name": "ref",
|
|
@@ -297,11 +242,18 @@
|
|
|
297
242
|
"defaultValue": null,
|
|
298
243
|
"description": "The signed-in account at the foot of the rail, usually an `AccountCard`. Without it the foot is omitted."
|
|
299
244
|
},
|
|
245
|
+
{
|
|
246
|
+
"name": "defaultOpen",
|
|
247
|
+
"required": false,
|
|
248
|
+
"type": "boolean",
|
|
249
|
+
"defaultValue": null,
|
|
250
|
+
"description": "Whether the drawer starts open when `open` is omitted."
|
|
251
|
+
},
|
|
300
252
|
{
|
|
301
253
|
"name": "logo",
|
|
302
254
|
"required": false,
|
|
303
255
|
"type": "ReactNode",
|
|
304
|
-
"defaultValue": "
|
|
256
|
+
"defaultValue": "variant === \"branded\" ? oncolorLogo : brandLogo",
|
|
305
257
|
"description": "The brand at the top of the rail. Defaults to the ImFusion logo; `null` leaves the row empty."
|
|
306
258
|
},
|
|
307
259
|
{
|
|
@@ -336,7 +288,7 @@
|
|
|
336
288
|
},
|
|
337
289
|
{
|
|
338
290
|
"name": "AppShell.NavItem",
|
|
339
|
-
"description": "AppShell.NavItem — a navbar link: icon, mono label, and an optional description. Takes its color from the navbar;\n`aria-current=\"page\"` underlines the label. Pass a router link through `render`.",
|
|
291
|
+
"description": "AppShell.NavItem — a navbar link: icon, mono label, and an optional description. Takes its color from the navbar;\n`aria-current=\"page\"` underlines the label. Pass a router link through `render`. Followed inside the navbar drawer,\nit closes the drawer.",
|
|
340
292
|
"props": [
|
|
341
293
|
{
|
|
342
294
|
"name": "description",
|
|
@@ -6715,6 +6667,13 @@
|
|
|
6715
6667
|
"type": "SelectValueType<Value, Multiple> | null",
|
|
6716
6668
|
"defaultValue": null,
|
|
6717
6669
|
"description": "The value of the select. Use when controlled."
|
|
6670
|
+
},
|
|
6671
|
+
{
|
|
6672
|
+
"name": "width",
|
|
6673
|
+
"required": false,
|
|
6674
|
+
"type": "\"auto\" | \"wide\" | \"full\" | null",
|
|
6675
|
+
"defaultValue": "auto",
|
|
6676
|
+
"description": "Trigger width: `auto` keeps the compact minimum; `wide` raises it; `full` fills the parent."
|
|
6718
6677
|
}
|
|
6719
6678
|
]
|
|
6720
6679
|
},
|
|
@@ -3,7 +3,8 @@ name: imf-web-ui
|
|
|
3
3
|
description:
|
|
4
4
|
"Route UI work and library questions in a project that uses @imfusion/web-ui. Use this skill whenever a user adds, edits,
|
|
5
5
|
styles, or reviews UI, or asks about library setup, brand assets, favicons, theming, or usage in a consumer project, even
|
|
6
|
-
if they do not mention the library.
|
|
6
|
+
if they do not mention the library. Also use it to link, unlink, or use a live local Web UI checkout. Open only the
|
|
7
|
+
matching packaged guide or companion skill."
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# Route Web UI work
|
|
@@ -23,18 +24,19 @@ may not already have. Open a companion by invoking its skill; reading one of its
|
|
|
23
24
|
|
|
24
25
|
## 2. Route the task
|
|
25
26
|
|
|
26
|
-
| Task | Open
|
|
27
|
-
| -------------------------------------------------------------------- |
|
|
28
|
-
| Understand library setup, brand assets, theming, or usage | Packaged user guides below
|
|
29
|
-
| Look up a component, part, prop, default, or icon | `imf-web-ui-components`
|
|
30
|
-
| Choose components or shape a screen, form, or flow | `imf-web-ui-ux`
|
|
31
|
-
| Write or update documentation | `imf-web-ui-conventions`
|
|
32
|
-
| Write a wrapper, custom UI, CSS, data layer, validation, or tests | `imf-web-ui-conventions`
|
|
33
|
-
| Choose a routing, data, form, or validation library for the project | `imf-web-ui-conventions`
|
|
34
|
-
| Install the library or bootstrap project tooling | `imf-web-ui-setup`
|
|
35
|
-
| Diagnose a broken install: unstyled output, missing tokens, no theme | `imf-web-ui-setup`
|
|
36
|
-
| Inspect an existing project without changing it | `imf-web-ui-audit`
|
|
37
|
-
| Update the package, skills, or hooks | `imf-web-ui-update`
|
|
27
|
+
| Task | Open |
|
|
28
|
+
| -------------------------------------------------------------------- | ---------------------------------------- |
|
|
29
|
+
| Understand library setup, brand assets, theming, or usage | Packaged user guides below |
|
|
30
|
+
| Look up a component, part, prop, default, or icon | `imf-web-ui-components` |
|
|
31
|
+
| Choose components or shape a screen, form, or flow | `imf-web-ui-ux` |
|
|
32
|
+
| Write or update documentation | `imf-web-ui-conventions` |
|
|
33
|
+
| Write a wrapper, custom UI, CSS, data layer, validation, or tests | `imf-web-ui-conventions` |
|
|
34
|
+
| Choose a routing, data, form, or validation library for the project | `imf-web-ui-conventions` |
|
|
35
|
+
| Install the library or bootstrap project tooling | `imf-web-ui-setup` |
|
|
36
|
+
| Diagnose a broken install: unstyled output, missing tokens, no theme | `imf-web-ui-setup` |
|
|
37
|
+
| Inspect an existing project without changing it | `imf-web-ui-audit` |
|
|
38
|
+
| Update the package, skills, or hooks | `imf-web-ui-update` |
|
|
39
|
+
| Link, unlink, or use a live local Web UI checkout | `imf-web-ui-conventions` `tooling` topic |
|
|
38
40
|
|
|
39
41
|
A new form opens `imf-web-ui-ux`, even when its fields and action are already specified. A screen often needs both
|
|
40
42
|
`imf-web-ui-ux` and `imf-web-ui-components`, in that order. Setup and audit are for project-wide questions, not every
|
|
@@ -60,7 +60,8 @@ Classify every result as one of these:
|
|
|
60
60
|
|
|
61
61
|
Use the report contract's severity, `path:line` evidence, concrete impact, and smallest next action. Unverified entries use
|
|
62
62
|
that same structure: unavailable runtime evidence, the impact of the unknown, and the check that resolves it. Do not promote
|
|
63
|
-
an optional tool or a working alternative to a missing finding.
|
|
63
|
+
an optional tool or a working alternative to a missing finding. A `vite.config.ts` without `localWebUILink()` registered from
|
|
64
|
+
`@imfusion/web-ui/vite` is Missing. Its next action is the one-line add from the `tooling` topic.
|
|
64
65
|
|
|
65
66
|
## Topics
|
|
66
67
|
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
name: imf-web-ui-conventions
|
|
3
3
|
description:
|
|
4
4
|
"Apply the ImFusion frontend conventions to consumer code. Use this whenever a task writes a wrapper or custom UI, CSS,
|
|
5
|
-
TypeScript, data fetching, validation, tests, project files, configuration, documentation, dependencies,
|
|
6
|
-
in a project that uses @imfusion/web-ui. Read only the topic references that match the
|
|
5
|
+
TypeScript, data fetching, validation, tests, project files, configuration, documentation, dependencies, linking a local
|
|
6
|
+
Web UI checkout, or agent tooling in a project that uses @imfusion/web-ui. Read only the topic references that match the
|
|
7
|
+
task."
|
|
7
8
|
user-invocable: false
|
|
8
9
|
---
|
|
9
10
|
|
|
@@ -14,27 +15,27 @@ a gap or to make a deliberate deviation visible; do not refactor a project just
|
|
|
14
15
|
|
|
15
16
|
## Choose a topic
|
|
16
17
|
|
|
17
|
-
| Topic | Read when
|
|
18
|
-
| ------------------------------------------------ |
|
|
19
|
-
| [library-setup](topics/library-setup.md) | Installing or repairing stylesheet and provider wiring.
|
|
20
|
-
| [library-boundary](topics/library-boundary.md) | Rendering, locking, or wrapping components, or choosing a peer.
|
|
21
|
-
| [authentication](topics/authentication.md) | Protecting routes or defining login and logout.
|
|
22
|
-
| [react](topics/react.md) | Designing component roles, state ownership, or effects.
|
|
23
|
-
| [components](topics/components.md) | Adding files or deciding component anatomy.
|
|
24
|
-
| [typescript](topics/typescript.md) | Writing TypeScript or naming values.
|
|
25
|
-
| [styling](topics/styling.md) | Writing CSS or customizing Web UI.
|
|
26
|
-
| [tokens](topics/tokens.md) | Choosing an exact token name.
|
|
27
|
-
| [class-names](topics/class-names.md) | Mapping variants and `className` to CSS.
|
|
28
|
-
| [validation](topics/validation.md) | Accepting data from outside the frontend.
|
|
29
|
-
| [data](topics/data.md) | Adding API queries, mutations, or invalidation.
|
|
30
|
-
| [project-structure](topics/project-structure.md) | Adding files or routes.
|
|
31
|
-
| [testing](topics/testing.md) | Deciding what to test.
|
|
32
|
-
| [tooling](topics/tooling.md) | Adding a dependency or
|
|
33
|
-
| [npm-project](topics/npm-project.md) | Changing `package.json`, scripts, pins, or Node.
|
|
34
|
-
| [git](topics/git.md) | Configuring hooks or choosing verification scope.
|
|
35
|
-
| [agent-tooling](topics/agent-tooling.md) | Installing skills or lifecycle hooks.
|
|
36
|
-
| [assets](topics/assets.md) | Adding images, icons, or other static files.
|
|
37
|
-
| [docs-structure](topics/docs-structure.md) | Writing or reorganizing repository docs.
|
|
18
|
+
| Topic | Read when |
|
|
19
|
+
| ------------------------------------------------ | --------------------------------------------------------------------- |
|
|
20
|
+
| [library-setup](topics/library-setup.md) | Installing or repairing stylesheet and provider wiring. |
|
|
21
|
+
| [library-boundary](topics/library-boundary.md) | Rendering, locking, or wrapping components, or choosing a peer. |
|
|
22
|
+
| [authentication](topics/authentication.md) | Protecting routes or defining login and logout. |
|
|
23
|
+
| [react](topics/react.md) | Designing component roles, state ownership, or effects. |
|
|
24
|
+
| [components](topics/components.md) | Adding files or deciding component anatomy. |
|
|
25
|
+
| [typescript](topics/typescript.md) | Writing TypeScript or naming values. |
|
|
26
|
+
| [styling](topics/styling.md) | Writing CSS or customizing Web UI. |
|
|
27
|
+
| [tokens](topics/tokens.md) | Choosing an exact token name. |
|
|
28
|
+
| [class-names](topics/class-names.md) | Mapping variants and `className` to CSS. |
|
|
29
|
+
| [validation](topics/validation.md) | Accepting data from outside the frontend. |
|
|
30
|
+
| [data](topics/data.md) | Adding API queries, mutations, or invalidation. |
|
|
31
|
+
| [project-structure](topics/project-structure.md) | Adding files or routes. |
|
|
32
|
+
| [testing](topics/testing.md) | Deciding what to test. |
|
|
33
|
+
| [tooling](topics/tooling.md) | Adding a dependency, configuring a tool, or linking a local checkout. |
|
|
34
|
+
| [npm-project](topics/npm-project.md) | Changing `package.json`, scripts, pins, or Node. |
|
|
35
|
+
| [git](topics/git.md) | Configuring hooks or choosing verification scope. |
|
|
36
|
+
| [agent-tooling](topics/agent-tooling.md) | Installing skills or lifecycle hooks. |
|
|
37
|
+
| [assets](topics/assets.md) | Adding images, icons, or other static files. |
|
|
38
|
+
| [docs-structure](topics/docs-structure.md) | Writing or reorganizing repository docs. |
|
|
38
39
|
|
|
39
40
|
## How to use the topics
|
|
40
41
|
|
|
@@ -109,7 +109,7 @@ sections one to one — change a topic's sections and this file follows in the s
|
|
|
109
109
|
- [ ] Oxfmt
|
|
110
110
|
- [ ] Oxlint and TypeScript
|
|
111
111
|
- [ ] Pre-commit checks
|
|
112
|
-
- [ ] Vite plugins
|
|
112
|
+
- [ ] Vite plugins, including `localWebUILink()`
|
|
113
113
|
|
|
114
114
|
## npm project — `npm-project`
|
|
115
115
|
|
|
@@ -70,8 +70,10 @@ Cross-topic invalidation can then use `keys.topic` instead of rebuilding a prefi
|
|
|
70
70
|
|
|
71
71
|
## Options factories and naming
|
|
72
72
|
|
|
73
|
-
Queries use `get*` names such as `getAll`, `getById`, and `getDetails`. Mutations use
|
|
74
|
-
|
|
73
|
+
Queries use `get*` names such as `getAll`, `getById`, and `getDetails`. Mutations use verbs such as `update` or `delete`. A
|
|
74
|
+
name never repeats its topic or adds an `Options` suffix; `context.api.user.getDetails()` already supplies the context. When
|
|
75
|
+
a topic has more than one mutation target, add the sub-resource to the verb: `api.projects.removeMember(projectId)` and
|
|
76
|
+
`api.projects.setMemberPermissions(projectId)`, where a bare `remove` would read as deleting the project.
|
|
75
77
|
|
|
76
78
|
A query factory owns its key and parsing:
|
|
77
79
|
|
|
@@ -119,10 +119,10 @@ Register Web UI's Vite plugins in the application configuration:
|
|
|
119
119
|
```ts
|
|
120
120
|
import { defineConfig } from "vite-plus";
|
|
121
121
|
import react from "@vitejs/plugin-react";
|
|
122
|
-
import { imfusionBrandAssets, readableCssModuleNames } from "@imfusion/web-ui/vite";
|
|
122
|
+
import { imfusionBrandAssets, localWebUILink, readableCssModuleNames } from "@imfusion/web-ui/vite";
|
|
123
123
|
|
|
124
124
|
export default defineConfig({
|
|
125
|
-
plugins: [react(), imfusionBrandAssets(), readableCssModuleNames({ prefix: "app" })]
|
|
125
|
+
plugins: [react(), imfusionBrandAssets(), readableCssModuleNames({ prefix: "app" }), localWebUILink()]
|
|
126
126
|
});
|
|
127
127
|
```
|
|
128
128
|
|
|
@@ -130,5 +130,33 @@ export default defineConfig({
|
|
|
130
130
|
Register `readableCssModuleNames` in every compiler that processes the app's CSS, including development, Storybook, and
|
|
131
131
|
production. A compiler left out produces different class names and styles that appear to work only in some environments.
|
|
132
132
|
|
|
133
|
-
`localWebUILink`
|
|
134
|
-
|
|
133
|
+
`localWebUILink` keeps a local Web UI checkout linked for good. With no link it does nothing. After
|
|
134
|
+
`npx web-ui link <checkout>` it serves the linked build without pre-bundling it and reloads the page on each sync;
|
|
135
|
+
`npx web-ui unlink` restores the published package. Restart the dev server after either command, since the plugin reads the
|
|
136
|
+
link when Vite starts. The plugin does not cover server rendering.
|
|
137
|
+
|
|
138
|
+
## Enable or disable the live Web UI link
|
|
139
|
+
|
|
140
|
+
Use this when a consumer must run against unreleased Web UI changes. The link copies the checkout's `dist/` into the
|
|
141
|
+
consumer's installed package and syncs it after each rebuild, so uncommitted edits in the checkout reach the consumer too.
|
|
142
|
+
|
|
143
|
+
To enable:
|
|
144
|
+
|
|
145
|
+
1. Confirm `localWebUILink()` is registered in the consumer's `vite.config.ts`. If it is missing, ask before adding it.
|
|
146
|
+
2. Find the checkout path: use `WEB_UI_CHECKOUT` when it is set, and ask otherwise.
|
|
147
|
+
3. Start `npm run dev:lib` in the checkout as a background process. `web-ui link` refuses a checkout without `dist/`.
|
|
148
|
+
4. Start `npx web-ui link <checkout>` in the consumer as a background process. It keeps running and syncs on each rebuild.
|
|
149
|
+
5. Restart the consumer's dev server.
|
|
150
|
+
6. Verify the rebuild arrives: after a rebuild, `diff -rq <checkout>/dist node_modules/@imfusion/web-ui/dist` prints nothing.
|
|
151
|
+
|
|
152
|
+
To disable:
|
|
153
|
+
|
|
154
|
+
1. Stop the background `web-ui link` and `npm run dev:lib` processes.
|
|
155
|
+
2. Run `npx web-ui unlink` in the consumer.
|
|
156
|
+
3. Restart the consumer's dev server.
|
|
157
|
+
|
|
158
|
+
`npm install` and `npm ci` replace the linked package with the published one. After either, run `npx web-ui link <checkout>`
|
|
159
|
+
again and restart the dev server.
|
|
160
|
+
|
|
161
|
+
Do not commit while linked when the consumer's checks depend on unreleased Web UI API. They pass against the checkout and
|
|
162
|
+
fail against the published package.
|
|
@@ -45,10 +45,17 @@ Include these pieces unless the existing project already has them or the user re
|
|
|
45
45
|
- one server-backed current-user query at the route boundary;
|
|
46
46
|
- a minimal `AppShell` in `_app/`, unless the user says the product has no persistent authenticated navigation;
|
|
47
47
|
- an API topic folder for data shown by the first screen;
|
|
48
|
-
- the root provider and library wiring
|
|
48
|
+
- the root provider and library wiring;
|
|
49
|
+
- the Vite plugins below.
|
|
49
50
|
|
|
50
51
|
The plan describes the exact starter files. It does not copy a generic starter project.
|
|
51
52
|
|
|
53
|
+
## Vite plugins
|
|
54
|
+
|
|
55
|
+
Propose a `vite.config.ts` that registers `imfusionBrandAssets()`, `readableCssModuleNames()`, and `localWebUILink()` from
|
|
56
|
+
`@imfusion/web-ui/vite`, next to the plugins the project already has. Register `localWebUILink()` in every project: with no
|
|
57
|
+
link it does nothing. The `tooling` topic has the exact config and the workflow for enabling a live link.
|
|
58
|
+
|
|
52
59
|
## Installer steps
|
|
53
60
|
|
|
54
61
|
For `agent-tooling`, list the `npx web-ui install` commands as steps for the human. Read existing registrations first and do
|
package/dist/paths-B5Ht3ETc.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { existsSync as e } from "node:fs";
|
|
2
|
-
import { dirname as t, resolve as n } from "node:path";
|
|
3
|
-
import { fileURLToPath as r } from "node:url";
|
|
4
|
-
import { spawnSync as i } from "node:child_process";
|
|
5
|
-
//#region src/cli/paths.ts
|
|
6
|
-
function a(r) {
|
|
7
|
-
let i = r;
|
|
8
|
-
for (; !e(n(i, "package.json"));) {
|
|
9
|
-
let e = t(i);
|
|
10
|
-
if (e === i) throw Error(`Could not find package.json above ${r}`);
|
|
11
|
-
i = e;
|
|
12
|
-
}
|
|
13
|
-
return i;
|
|
14
|
-
}
|
|
15
|
-
var o = a(t(r(import.meta.url))), s = process.cwd();
|
|
16
|
-
function c(r) {
|
|
17
|
-
let a = s;
|
|
18
|
-
for (; a !== t(a) && !e(n(a, "node_modules", ".bin"));) a = t(a);
|
|
19
|
-
let o = n(a, "node_modules", ".bin"), c = n(o, "vp"), [l, u] = e(c) ? [c, ["fmt", ...r]] : [n(o, "prettier"), ["--write", ...r]];
|
|
20
|
-
e(l) && i(l, u, {
|
|
21
|
-
cwd: s,
|
|
22
|
-
stdio: "ignore"
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
export { o as n, s as r, c as t };
|