@imfusion/web-ui 0.10.1-dev.11.g9f5bc06e → 0.10.1-dev.12.g5d8209de

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 CHANGED
@@ -34,6 +34,11 @@
34
34
  `defaultOptions`, where it blocked invalidation refetches.
35
35
  - `imf-web-ui-conventions` puts a route's own views, forms, hooks, and tests in a `-<file-name>/` folder beside the route
36
36
  file, and reserves `partials/` for parts that more than one route uses.
37
+ - `imf-web-ui-conventions` lifts a value into a custom property on the component's root only when it repeats within that
38
+ stylesheet or a state or variant changes several descendants. A value that only recurs across files stays a literal in
39
+ each, and a shared component owns it when those files show one design element.
40
+ - `imf-web-ui-conventions` exempts TanStack options factories (`queryOptions`, `mutationOptions`) from the explicit return
41
+ type on exported functions, since spelling it out loses the typed query key.
37
42
  - Components ([WEBSDK-247](https://imfusion.atlassian.net/browse/WEBSDK-247)) — Nikolaus Brunner <brunner@imfusion.com>
38
43
  - The AppShell navbar drawer, `Code`, and `ImageDisplayOptions` scroll in a `ScrollArea`, with its overlay thumb and edge
39
44
  fades.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imfusion/web-ui",
3
- "version": "0.10.1-dev.11.g9f5bc06e",
3
+ "version": "0.10.1-dev.12.g5d8209de",
4
4
  "description": "The official Web UI component library for ImFusion web apps",
5
5
  "author": "ImFusion GmbH",
6
6
  "homepage": "https://imfusion.com",
@@ -9,7 +9,9 @@ Use native CSS and Web UI's public seams. The library's CSS Modules and token na
9
9
  - Nest states, pseudo-elements, and child selectors under the root.
10
10
  - Write declarations before nested rules; browsers before Chrome 130, Firefox 132, and Safari 18 move later ones above them.
11
11
  - Do not nest under a selector list whose selectors differ in specificity. The nested rule takes the highest one.
12
- - Lift repeated values into custom properties, especially when a state or variant changes several descendants.
12
+ - Lift a value into a custom property on the component's root when it repeats within that stylesheet, or when a state or
13
+ variant changes several descendants. A value that only recurs across files stays a literal in each; when those files show
14
+ one design element, a shared component owns it. Never define component values on `:root`.
13
15
  - Keep structurally different rules explicit; not every repeated value needs an abstraction.
14
16
 
15
17
  ```css
@@ -6,6 +6,8 @@ Prefer pure functions, immutable values, and side effects at the edges.
6
6
 
7
7
  - Do not use `any`. Accept `unknown` at an untrusted boundary and narrow it.
8
8
  - Infer local values; give exported functions explicit return types.
9
+ - TanStack options factories (`queryOptions`, `mutationOptions`, and similar) return their helper's inferred type. Spelling
10
+ it out loses the typed query key (`DataTag`) or repeats the helper's own generics.
9
11
  - Model states directly instead of filling a nullable value later.
10
12
  - Derive types from their source. Use `z.infer` for schemas and `React.ComponentProps` for Web UI components.
11
13
  - Avoid `as`. Keep an assertion only at an untyped third-party boundary where it is the honest boundary.