@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.
@@ -1,5 +1,5 @@
1
- import { t as e } from "./chunk-DmhlhrBa.js";
2
- import { l as t, u as n } from "./slider-gyIYWSy3.js";
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-CUyf9wjm.js";
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 (!(typeof a == "boolean" || r === !1) && !a?.pattern && !(typeof r == "object" && r.generateScopedName)) return i === "postcss" ? { css: { modules: { generateScopedName: t } } } : { css: {
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
  } };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as e, r as t, t as n } from "./paths-CUyf9wjm.js";
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.31.g7b15b0d3",
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\" \"vite build --watch\"",
66
- "build": "npm run codegen && rm -rf dist && vite build && chmod +x dist/web-ui-cli.js && npm run codegen:docgen && npm run codegen:llms && npm run codegen:tokens",
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": "prettier --check . --ignore-path .gitignore --ignore-path .prettierignore --ignore-path $(git rev-parse --path-format=absolute --git-path info/exclude)",
78
- "verify:lint": "eslint . --cache --max-warnings=0",
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": "vitest run",
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:staged": "tsx scripts/verify/staged.ts",
85
+ "verify:generated": "tsx scripts/verify/generated.ts",
86
86
  "verify:full": "tsx scripts/verify/full.ts",
87
- "format": "prettier --write .",
88
- "lint": "eslint . --cache --fix",
89
- "lint:inspect": "npx @eslint/config-inspector@latest",
90
- "test:unit": "vitest run --project unit",
91
- "test:stories": "vitest run --project storybook",
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.0",
131
- "@storybook/addon-docs": "10.6.0",
132
- "@storybook/addon-mcp": "10.6.0",
133
- "@storybook/addon-vitest": "10.6.0",
134
- "@storybook/react-vite": "10.6.0",
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": "4.1.6",
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.0",
150
+ "storybook": "10.6.2",
162
151
  "tsx": "4.21.0",
163
152
  "typescript": "6.0.3",
164
- "typescript-eslint": "8.59.3",
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
- "vitest": "4.1.6"
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
- - [ ] Prettier
107
- - [ ] ESLint and TypeScript
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**: `verify:staged`, run by pre-commit. It checks whole-repository lint and formatting, then runs project checks
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` | Check Prettier. |
21
- | `verify:lint` | Check ESLint. |
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 tests once. |
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
- | Build | Vite |
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 | Prettier |
18
- | Lint | ESLint flat config |
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 | Whole-repository lint and format 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
- ## Prettier
39
+ ## Vite+
40
40
 
41
- Use a config file. The repo's values are:
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
- import type { Config } from "prettier";
45
-
46
- const config: Config = {
47
- printWidth: 125,
48
- tabWidth: 2,
49
- useTabs: false,
50
- trailingComma: "none",
51
- arrowParens: "avoid",
52
- semi: true,
53
- singleQuote: false,
54
- proseWrap: "always"
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
- ## ESLint and TypeScript
71
+ ## Oxlint and TypeScript
61
72
 
62
- Use flat ESLint config with type-aware rules and the repo's ignore file. The baseline bans `as` and non-null `!` outside
63
- tests, requires the `#/` alias instead of parent-relative imports, and uses project-service type information.
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
- The pre-commit hook checks the whole repository with ESLint and Prettier, then runs project checks for staged inputs that can
71
- affect generated files, types, dependencies, or TeamCity configuration. It does not rewrite files during a commit; use
72
- `npm run format` to apply Prettier changes explicitly.
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