@imfusion/web-ui 0.10.1-dev.53.gea04219d → 0.10.1-dev.56.ge0de2dc9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imfusion/web-ui",
3
- "version": "0.10.1-dev.53.gea04219d",
3
+ "version": "0.10.1-dev.56.ge0de2dc9",
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,10 @@ Use the report contract's severity, `path:line` evidence, concrete impact, and s
62
62
  that same structure: unavailable runtime evidence, the impact of the unknown, and the check that resolves it. Do not promote
63
63
  an optional tool or a working alternative to a missing finding. A `vite.config.ts` without `localWebUILink()` registered from
64
64
  `@imfusion/web-ui/vite` is Missing. A `tsconfig.json` without the `paths` block from the `tooling` topic is Missing too. Each
65
- next action is the add from that topic. A major or minor mismatch between the project and Web UI on a package listed under
66
- Aligned runtime packages in the `tooling` topic is a Deviation. Report both versions, with
65
+ next action is the add from that topic. A Vite config that reads tsconfig `paths` (`resolve.tsconfigPaths` or
66
+ `vite-tsconfig-paths`) is Broken: it loads the React types package as React once Web UI comes from the registry. The fix is
67
+ to drop it and give the `#/` alias through `imports` in `package.json`. A major or minor mismatch between the project and Web
68
+ UI on a package listed under Aligned runtime packages in the `tooling` topic is a Deviation. Report both versions, with
67
69
  `npm install <package>@<Web UI's version>` as the fix.
68
70
 
69
71
  ## Topics
@@ -101,8 +101,15 @@ export default defineConfig({
101
101
  });
102
102
  ```
103
103
 
104
- Use strict TypeScript with bundler module resolution, `verbatimModuleSyntax`, unused-value checks, and `#/` paths. Keep
105
- `import type` for type-only imports.
104
+ Use strict TypeScript with bundler module resolution, `verbatimModuleSyntax`, unused-value checks, and `import type` for
105
+ type-only imports. The `#/` alias is a subpath import in `package.json`, which Vite and TypeScript both read without a
106
+ plugin:
107
+
108
+ ```json
109
+ "imports": {
110
+ "#/*": "./src/*"
111
+ }
112
+ ```
106
113
 
107
114
  ## Pre-commit checks
108
115
 
@@ -150,7 +157,7 @@ Aligned versions are the primary fix. The plugin and the `paths` block below cat
150
157
  checkout, it keeps one React in dev, build, and Vitest.
151
158
 
152
159
  Add this to `compilerOptions` in `tsconfig.json`, merged by hand into an existing `paths`. For a symlinked checkout it keeps
153
- one set of React and Vite types for `tsc`, and it does nothing for an installed package:
160
+ one set of React and Vite types for `tsc`:
154
161
 
155
162
  ```json
156
163
  "paths": {
@@ -159,3 +166,8 @@ one set of React and Vite types for `tsc`, and it does nothing for an installed
159
166
  "vite": ["./node_modules/vite"]
160
167
  }
161
168
  ```
169
+
170
+ Only TypeScript reads these `paths`. Never let Vite read them: leave `resolve.tsconfigPaths` off and do not add
171
+ `vite-tsconfig-paths`. Either one applies the `react` mapping at runtime, loads the types package as React, and breaks the
172
+ build and tests once `@imfusion/web-ui` is installed from the registry. A symlinked checkout hides the break, because
173
+ `localWebUILink()` dedupes React first.
@@ -55,7 +55,8 @@ The plan describes the exact starter files. It does not copy a generic starter p
55
55
  Propose a `vite.config.ts` that registers `imfusionBrandAssets()`, `readableCssModuleNames()`, and `localWebUILink()` from
56
56
  `@imfusion/web-ui/vite`, next to the plugins the project already has. Register `localWebUILink()` in every project: without a
57
57
  symlinked checkout it does nothing. Also propose the `tsconfig.json` `paths` block. Both keep one React and one set of types
58
- when the package is a symlinked checkout. The `tooling` topic has the exact config.
58
+ when the package is a symlinked checkout. Vite must not read those `paths`: never propose `resolve.tsconfigPaths` or
59
+ `vite-tsconfig-paths`, and give the `#/` alias through `imports` in `package.json`. The `tooling` topic has the exact config.
59
60
 
60
61
  ## Installer steps
61
62
 
@@ -689,7 +689,7 @@
689
689
  },
690
690
  {
691
691
  "name": "--imf-ui-font-weight-strong",
692
- "value": "600"
692
+ "value": "500"
693
693
  }
694
694
  ],
695
695
  "inner-*": [