@imfusion/web-ui 0.8.1-dev.31.g7b15b0d3 → 0.8.1-dev.36.g641eac85
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 +18 -0
- package/README.md +7 -1
- package/dist/{code-D2lwxHgd.js → code-DBIxhqGE.js} +3 -3
- package/dist/{icons-CaGCCwG-.js → icons-CM68Ql5d.js} +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.js +14 -12
- package/dist/integrations/code-highlight.js +6 -4
- package/dist/integrations/frame-selection.js +3 -3
- package/dist/integrations/image-display-options.js +3 -3
- package/dist/llms/gen-tokens.d.ts +1 -1
- package/dist/{paths-CUyf9wjm.js → paths-B5Ht3ETc.js} +2 -2
- package/dist/{slider-gyIYWSy3.js → slider-Cqpreglu.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{tabs-9d4oaDwZ.js → tabs-Dsfp8Ogj.js} +2 -2
- package/dist/vite.js +2 -2
- package/dist/web-ui-cli.js +1 -1
- package/package.json +30 -33
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +3 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/git.md +2 -3
- package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +3 -4
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +66 -28
- /package/dist/{meta-j-7HGrWv.js → meta-V_KyLeGn.js} +0 -0
- /package/dist/{chunk-DmhlhrBa.js → rolldown-runtime-Dy4uBu1J.js} +0 -0
- /package/dist/{separator-BAxxttef.js → separator-lzz4A3x_.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./
|
|
2
|
-
import { l as t, u as n } from "./slider-
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { l as t, u as n } from "./slider-Cqpreglu.js";
|
|
3
3
|
import { cva as r } from "class-variance-authority";
|
|
4
4
|
import { jsx as i } from "react/jsx-runtime";
|
|
5
5
|
import { Children as a, useCallback as o } from "react";
|
package/dist/vite.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "./paths-
|
|
1
|
+
import { n as e } from "./paths-B5Ht3ETc.js";
|
|
2
2
|
import { readFileSync as t, readdirSync as n, realpathSync as r } from "node:fs";
|
|
3
3
|
import { dirname as i, join as a, resolve as o, sep as s } from "node:path";
|
|
4
4
|
import { fileURLToPath as c } from "node:url";
|
|
@@ -54,7 +54,7 @@ function h() {
|
|
|
54
54
|
//#region src/vite/readable-css-module-names.ts
|
|
55
55
|
function g(e, t) {
|
|
56
56
|
let { lightningcss: n, modules: r, transformer: i } = e.css ?? {}, a = n?.cssModules;
|
|
57
|
-
if (
|
|
57
|
+
if (typeof a != "boolean" && r !== !1 && !a?.pattern && !(typeof r == "object" && r.generateScopedName)) return i === "postcss" ? { css: { modules: { generateScopedName: t } } } : { css: {
|
|
58
58
|
transformer: "lightningcss",
|
|
59
59
|
lightningcss: { cssModules: { pattern: t } }
|
|
60
60
|
} };
|
package/dist/web-ui-cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as e, r as t, t as n } from "./paths-
|
|
2
|
+
import { n as e, r as t, t as n } from "./paths-B5Ht3ETc.js";
|
|
3
3
|
import { chmodSync as r, cpSync as i, existsSync as a, lstatSync as o, mkdirSync as s, readFileSync as c, readdirSync as l, readlinkSync as u, realpathSync as d, rmSync as f, symlinkSync as p, writeFileSync as m } from "node:fs";
|
|
4
4
|
import { dirname as h, relative as g, resolve as _ } from "node:path";
|
|
5
5
|
import { Command as ee, Option as te } from "commander";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imfusion/web-ui",
|
|
3
|
-
"version": "0.8.1-dev.
|
|
3
|
+
"version": "0.8.1-dev.36.g641eac85",
|
|
4
4
|
"description": "The official Web UI component library for ImFusion web apps",
|
|
5
5
|
"author": "ImFusion GmbH",
|
|
6
6
|
"homepage": "https://imfusion.com",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"scripts": {
|
|
63
63
|
"dev": "tsx scripts/dev.ts",
|
|
64
64
|
"dev:host": "tsx scripts/dev.ts --host",
|
|
65
|
-
"dev:lib": "concurrently -n codegen,lib -c yellow,blue \"npm run codegen:watch\" \"
|
|
66
|
-
"build": "npm run codegen && rm -rf dist &&
|
|
65
|
+
"dev:lib": "concurrently -n codegen,lib -c yellow,blue \"npm run codegen:watch\" \"vp build --watch\"",
|
|
66
|
+
"build": "npm run codegen && rm -rf dist && vp build && chmod +x dist/web-ui-cli.js && npm run codegen:docgen && npm run codegen:llms && npm run codegen:tokens",
|
|
67
67
|
"build:storybook": "npm run codegen:storybook && storybook build",
|
|
68
68
|
"ci:status": "teamcity run list --job WebSDK_WebUI_BuildTest --limit 3 --json=id,number,status,state,branchName,buildType.name,triggered.type,triggered.user.name,startDate,finishDate,webUrl | tsx scripts/ci-status.ts",
|
|
69
69
|
"storybook": "npm run codegen:storybook && storybook dev -p 6006 --no-open --ci",
|
|
@@ -74,22 +74,21 @@
|
|
|
74
74
|
"codegen:docgen": "tsx src/docgen/gen-docgen.ts",
|
|
75
75
|
"codegen:llms": "tsx src/llms/gen-llms.ts",
|
|
76
76
|
"codegen:tokens": "tsx src/llms/gen-tokens.ts",
|
|
77
|
-
"verify:format": "
|
|
78
|
-
"verify:lint": "
|
|
77
|
+
"verify:format": "vp fmt --check . --ignore-path .gitignore --ignore-path $(git rev-parse --path-format=absolute --git-path info/exclude)",
|
|
78
|
+
"verify:lint": "vp lint . --max-warnings=0",
|
|
79
79
|
"verify:typecheck": "npm run codegen && tsc -p tsconfig.json --noEmit && tsc -p tsconfig.lib.json --noEmit && tsc -p .storybook/tsconfig.json --noEmit",
|
|
80
|
-
"verify:tests": "
|
|
80
|
+
"verify:tests": "vp test run",
|
|
81
81
|
"verify:knip": "knip",
|
|
82
82
|
"verify:deps": "tsx scripts/check-pinned-dependencies.ts",
|
|
83
83
|
"verify:icons": "tsx scripts/verify/icons-public-api.ts",
|
|
84
84
|
"verify:changelog": "tsx scripts/verify/changelog.ts",
|
|
85
|
-
"verify:
|
|
85
|
+
"verify:generated": "tsx scripts/verify/generated.ts",
|
|
86
86
|
"verify:full": "tsx scripts/verify/full.ts",
|
|
87
|
-
"format": "
|
|
88
|
-
"lint": "
|
|
89
|
-
"
|
|
90
|
-
"test:
|
|
91
|
-
"test:
|
|
92
|
-
"test:watch": "vitest",
|
|
87
|
+
"format": "vp fmt .",
|
|
88
|
+
"lint": "vp lint . --fix",
|
|
89
|
+
"test:unit": "vp test run --project unit",
|
|
90
|
+
"test:stories": "vp test run --project storybook",
|
|
91
|
+
"test:watch": "vp test",
|
|
93
92
|
"skills:eval": "tsx src/llms/evals/runner/run.ts",
|
|
94
93
|
"skills:eval:dev": "WEB_UI_SKILL_EVAL_SCENARIOS_DIR=.agents/evals/scenarios WEB_UI_SKILL_EVAL_SKILLS_DIR=.agents/skills WEB_UI_SKILL_EVAL_ROOT=/private/tmp/web-ui-dev-skill-evals WEB_UI_SKILL_EVAL_RESULTS_DIR=.agents/evals/results WEB_UI_SKILL_EVAL_REPORT_PATH=.agents/evals/REPORT.md WEB_UI_SKILL_EVAL_SKILL_FAMILY=web-ui-dev WEB_UI_SKILL_EVAL_WORKSPACE_LABEL='development repository' tsx src/llms/evals/runner/run.ts --scenarios-dir .agents/evals/scenarios --setup .agents/evals/setup-env.sh",
|
|
95
94
|
"skills:eval:compare": "tsx src/llms/evals/runner/compare.ts",
|
|
@@ -123,15 +122,13 @@
|
|
|
123
122
|
"iconoir-react": "7.12.1"
|
|
124
123
|
},
|
|
125
124
|
"devDependencies": {
|
|
126
|
-
"@eslint/compat": "1.4.1",
|
|
127
|
-
"@eslint/js": "9.39.4",
|
|
128
125
|
"@imfusion/sdk": "1.0.0",
|
|
129
126
|
"@imfusion/sdk-react": "1.0.0",
|
|
130
|
-
"@storybook/addon-a11y": "10.6.
|
|
131
|
-
"@storybook/addon-docs": "10.6.
|
|
132
|
-
"@storybook/addon-mcp": "10.6.
|
|
133
|
-
"@storybook/addon-vitest": "10.6.
|
|
134
|
-
"@storybook/react-vite": "10.6.
|
|
127
|
+
"@storybook/addon-a11y": "10.6.2",
|
|
128
|
+
"@storybook/addon-docs": "10.6.2",
|
|
129
|
+
"@storybook/addon-mcp": "10.6.2",
|
|
130
|
+
"@storybook/addon-vitest": "10.6.2",
|
|
131
|
+
"@storybook/react-vite": "10.6.2",
|
|
135
132
|
"@tanstack/highlight": "0.1.0",
|
|
136
133
|
"@tanstack/react-pacer": "0.22.1",
|
|
137
134
|
"@types/culori": "4.0.1",
|
|
@@ -140,17 +137,9 @@
|
|
|
140
137
|
"@types/react": "19.2.14",
|
|
141
138
|
"@types/react-dom": "19.2.3",
|
|
142
139
|
"@vitejs/plugin-react": "6.0.1",
|
|
143
|
-
"@vitest/browser-playwright": "
|
|
140
|
+
"@vitest/browser-playwright": "5.0.3",
|
|
144
141
|
"concurrently": "9.2.1",
|
|
145
142
|
"culori": "4.0.2",
|
|
146
|
-
"eslint": "9.39.4",
|
|
147
|
-
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
148
|
-
"eslint-plugin-mdx": "3.7.0",
|
|
149
|
-
"eslint-plugin-react": "7.37.5",
|
|
150
|
-
"eslint-plugin-react-hooks": "5.2.0",
|
|
151
|
-
"eslint-plugin-react-refresh": "0.4.26",
|
|
152
|
-
"globals": "15.15.0",
|
|
153
|
-
"jiti": "2.7.0",
|
|
154
143
|
"knip": "6.14.2",
|
|
155
144
|
"lightningcss": "1.32.0",
|
|
156
145
|
"mermaid": "12.0.0",
|
|
@@ -158,12 +147,20 @@
|
|
|
158
147
|
"prettier": "3.8.3",
|
|
159
148
|
"react-docgen-typescript": "2.4.0",
|
|
160
149
|
"remark-gfm": "4.0.1",
|
|
161
|
-
"storybook": "10.6.
|
|
150
|
+
"storybook": "10.6.2",
|
|
162
151
|
"tsx": "4.21.0",
|
|
163
152
|
"typescript": "6.0.3",
|
|
164
|
-
"
|
|
165
|
-
"vite": "8.0.10",
|
|
153
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.1.0",
|
|
166
154
|
"vite-plugin-dts": "5.0.0",
|
|
167
|
-
"
|
|
155
|
+
"vite-plus": "1.1.0",
|
|
156
|
+
"vitest": "5.0.3"
|
|
157
|
+
},
|
|
158
|
+
"overrides": {
|
|
159
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.1.0",
|
|
160
|
+
"vitest": "5.0.3",
|
|
161
|
+
"storybook": {
|
|
162
|
+
".": "$storybook",
|
|
163
|
+
"vite-plus": "$vite-plus"
|
|
164
|
+
}
|
|
168
165
|
}
|
|
169
166
|
}
|
|
@@ -103,8 +103,9 @@ sections one to one — change a topic's sections and this file follows in the s
|
|
|
103
103
|
- [ ] When a library owns a layer
|
|
104
104
|
- [ ] Devtools
|
|
105
105
|
- [ ] Docs over memory
|
|
106
|
-
- [ ]
|
|
107
|
-
- [ ]
|
|
106
|
+
- [ ] Vite+
|
|
107
|
+
- [ ] Oxfmt
|
|
108
|
+
- [ ] Oxlint and TypeScript
|
|
108
109
|
- [ ] Pre-commit checks
|
|
109
110
|
- [ ] Vite plugins
|
|
110
111
|
|
|
@@ -18,11 +18,10 @@ The hooks are tracked in `.githooks/`. Check both the Git setting and the direct
|
|
|
18
18
|
|
|
19
19
|
There are two scopes:
|
|
20
20
|
|
|
21
|
-
- **commit**:
|
|
22
|
-
for staged inputs.
|
|
21
|
+
- **commit**: the pre-commit hook, which runs `vp staged` as `tooling.md` describes under Pre-commit checks.
|
|
23
22
|
- **full**: `verify:full`, the build and complete verification used by CI.
|
|
24
23
|
|
|
25
|
-
The scripts under `scripts/verify/` own the step lists. Hooks and npm scripts only launch them.
|
|
24
|
+
The `staged` block and the scripts under `scripts/verify/` own the step lists. Hooks and npm scripts only launch them.
|
|
26
25
|
|
|
27
26
|
## Staleness at commit time
|
|
28
27
|
|
|
@@ -17,12 +17,11 @@ Use the same names for the same checks where the project supports them:
|
|
|
17
17
|
| ------------------ | --------------------------------------- |
|
|
18
18
|
| `dev` | Start local development. |
|
|
19
19
|
| `build` | Create a production build. |
|
|
20
|
-
| `verify:format` |
|
|
21
|
-
| `verify:lint` |
|
|
20
|
+
| `verify:format` | Run `vp fmt --check`. |
|
|
21
|
+
| `verify:lint` | Run `vp lint`. |
|
|
22
22
|
| `verify:typecheck` | Run TypeScript without emitting. |
|
|
23
|
-
| `verify:tests` | Run
|
|
23
|
+
| `verify:tests` | Run `vp test run`. |
|
|
24
24
|
| `verify:knip` | Check dead code and unused exports. |
|
|
25
|
-
| `verify:staged` | Run the pre-commit scope. |
|
|
26
25
|
| `verify:full` | Run the CI scope. |
|
|
27
26
|
| `format` | Rewrite formatting. |
|
|
28
27
|
| `lint` | Rewrite fixable lint issues. |
|
|
@@ -6,18 +6,18 @@ Use the tool's current documentation rather than memory.
|
|
|
6
6
|
|
|
7
7
|
| Need | Default |
|
|
8
8
|
| --------------------- | -------------------------------------------- |
|
|
9
|
-
|
|
|
9
|
+
| Toolchain | Vite+ (`vite-plus`), driven through `vp` |
|
|
10
10
|
| Routing and URL state | TanStack Router |
|
|
11
11
|
| Server state | TanStack Query |
|
|
12
12
|
| Forms | TanStack Form |
|
|
13
13
|
| Data grids | TanStack Table plus Web UI `Table` parts |
|
|
14
14
|
| App-wide client state | TanStack Store, after URL/server/local state |
|
|
15
15
|
| Schema validation | Zod at the boundary |
|
|
16
|
-
| Tests | Vitest
|
|
17
|
-
| Format |
|
|
18
|
-
| Lint |
|
|
16
|
+
| Tests | Vitest through `vp test` |
|
|
17
|
+
| Format | Oxfmt through `vp fmt` |
|
|
18
|
+
| Lint | Oxlint through `vp lint`, type-aware |
|
|
19
19
|
| Types | `tsc --noEmit` |
|
|
20
|
-
| Pre-commit checks |
|
|
20
|
+
| Pre-commit checks | `vp staged` against the staged state |
|
|
21
21
|
| Dead code | Knip via `verify:knip` |
|
|
22
22
|
|
|
23
23
|
## When a library owns a layer
|
|
@@ -36,47 +36,85 @@ devtools package whenever a new TanStack dependency is added.
|
|
|
36
36
|
Use `npx @tanstack/cli` for TanStack documentation. If TanStack Intent is configured, use it for the Agent Skills the
|
|
37
37
|
TanStack package provides.
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## Vite+
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Vite+ runs development, build, tests, format, lint, and staged checks through one `vp` binary configured in `vite.config.ts`.
|
|
42
|
+
Pin `vite-plus` exactly, alias `vite` to `npm:@voidzero-dev/vite-plus-core@<vite-plus version>`, pin `vitest` to the version
|
|
43
|
+
`vp toolchain vitest` reports, and repeat both pins under `overrides`. Import `defineConfig` from `vite-plus` and Vitest APIs
|
|
44
|
+
from `vite-plus/test`. It needs Node `^22.22.1 || ^24.11 || >=26` and Git 2.32 or later.
|
|
45
|
+
|
|
46
|
+
`vp <command>` is a built-in; `vp run <script>` runs a package script.
|
|
47
|
+
|
|
48
|
+
Move an existing Vite, Vitest, ESLint, or Prettier project with `vp migrate --no-hooks` (`vp help migrate` lists its
|
|
49
|
+
options), then check the result against this topic. The hook lives in `.githooks/`, as `git.md` describes.
|
|
50
|
+
|
|
51
|
+
## Oxfmt
|
|
52
|
+
|
|
53
|
+
Configure formatting in the `fmt` block of `vite.config.ts`. The repo's values:
|
|
42
54
|
|
|
43
55
|
```ts
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export default config;
|
|
56
|
+
export default defineConfig({
|
|
57
|
+
fmt: {
|
|
58
|
+
printWidth: 125,
|
|
59
|
+
tabWidth: 2,
|
|
60
|
+
useTabs: false,
|
|
61
|
+
trailingComma: "none",
|
|
62
|
+
arrowParens: "avoid",
|
|
63
|
+
semi: true,
|
|
64
|
+
singleQuote: false,
|
|
65
|
+
proseWrap: "always",
|
|
66
|
+
sortPackageJson: false
|
|
67
|
+
}
|
|
68
|
+
});
|
|
58
69
|
```
|
|
59
70
|
|
|
60
|
-
##
|
|
71
|
+
## Oxlint and TypeScript
|
|
61
72
|
|
|
62
|
-
|
|
63
|
-
|
|
73
|
+
Configure linting in the `lint` block with type-aware rules on. The baseline bans `as` and non-null `!` outside tests and
|
|
74
|
+
requires the `#/` alias instead of parent-relative imports:
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
export default defineConfig({
|
|
78
|
+
lint: {
|
|
79
|
+
options: { typeAware: true },
|
|
80
|
+
overrides: [
|
|
81
|
+
{
|
|
82
|
+
files: ["src/**/*.{ts,tsx}"],
|
|
83
|
+
rules: {
|
|
84
|
+
"typescript/consistent-type-assertions": ["error", { assertionStyle: "never" }],
|
|
85
|
+
"typescript/no-non-null-assertion": "error",
|
|
86
|
+
"no-restricted-imports": [
|
|
87
|
+
"error",
|
|
88
|
+
{ patterns: [{ group: ["../*"], message: "Use the #/ alias for anything outside the current folder." }] }
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
files: ["**/*.test.{ts,tsx}"],
|
|
94
|
+
rules: { "typescript/consistent-type-assertions": "off", "typescript/no-non-null-assertion": "off" }
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
```
|
|
64
100
|
|
|
65
101
|
Use strict TypeScript with bundler module resolution, `verbatimModuleSyntax`, unused-value checks, and `#/` paths. Keep
|
|
66
102
|
`import type` for type-only imports.
|
|
67
103
|
|
|
68
104
|
## Pre-commit checks
|
|
69
105
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
106
|
+
`.githooks/pre-commit` runs `vp staged --hide-unstaged --fail-on-changes --revert --diff-filter=ACMRD` with `set -e`. Those
|
|
107
|
+
flags make the checks see only the staged state, include deletion-only commits, fail the commit when a check would change a
|
|
108
|
+
file, and restore the tree afterwards, so the hook never rewrites or stages files. The `staged` block in `vite.config.ts` is
|
|
109
|
+
a function returning path-free commands such as `npm run --silent verify:lint`, so each project-wide check runs once. Use
|
|
110
|
+
`npm run format` to apply formatting explicitly.
|
|
73
111
|
|
|
74
112
|
## Vite plugins
|
|
75
113
|
|
|
76
114
|
Register Web UI's Vite plugins in the application configuration:
|
|
77
115
|
|
|
78
116
|
```ts
|
|
79
|
-
import { defineConfig } from "vite";
|
|
117
|
+
import { defineConfig } from "vite-plus";
|
|
80
118
|
import react from "@vitejs/plugin-react";
|
|
81
119
|
import { imfusionBrandAssets, readableCssModuleNames } from "@imfusion/web-ui/vite";
|
|
82
120
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|