styleframe 3.6.0 → 3.7.0

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # styleframe
2
2
 
3
+ ## 3.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#221](https://github.com/styleframe-dev/styleframe/pull/221) [`6d406c2`](https://github.com/styleframe-dev/styleframe/commit/6d406c289b39c666a3fb7468aa3ec08f5a6d316b) Thanks [@alexgrozav](https://github.com/alexgrozav)! - Add `treeshake` option to remove unused variables from CSS output.
8
+
9
+ `root._usage` now tracks both `variables` and `utilities` referenced during config execution and scanner registration. The transpiler's new `treeshake: true` option filters `root.variables` and theme variables down to only those present in `_usage.variables`. The plugin enables treeshaking by default when generating global CSS.
10
+
11
+ - [#215](https://github.com/styleframe-dev/styleframe/pull/215) [`43f8f4f`](https://github.com/styleframe-dev/styleframe/commit/43f8f4f322d120def777262277aa40c5d84736a8) Thanks [@alexgrozav](https://github.com/alexgrozav)! - Unify fluid and fixed font sizes under `useFontSizeDesignTokens`. Tuple `[min, max]` and object `{ min, max }` values are now treated as **absolute pixel ranges** and routed through `useFluidClamp`; plain `TokenValue` values stay static. The same call accepts mixed fluid + fixed entries.
12
+
13
+ ```ts
14
+ useFontSizeDesignTokens(s, {
15
+ default: "@font-size.md",
16
+ md: [16, 18], // fluid
17
+ sm: "0.8rem", // fixed
18
+ lg: { min: 18, max: 24 }, // fluid (object form)
19
+ });
20
+ ```
21
+
22
+ Breaking changes:
23
+ - `useFluidFontSizeDesignTokens` is removed. Pass ranges directly to `useFontSizeDesignTokens` instead.
24
+ - `useDesignTokensPreset`'s `fluidFontSize.values` config now expects the unified `FontSizeValue` (`TokenValue | RangeInput<TokenValue>`) per key. Existing `[min, max]` / `{ min, max }` shapes still work but are interpreted as **absolute pixels**, not multipliers of a base.
25
+ - When `fluidFontSize` is enabled and the user passes their own `fontSize` config, those values now win over the fluid defaults instead of being silently dropped.
26
+ - `fontSizeValues` is renamed to `fontSizeStaticValues`. The pixel base used by the default fluid scale is emitted as configurable CSS variables (`--font-size--min: 16;` / `--font-size--max: 18;`); each fluid `font-size.*` `calc()` references them via `var()`, so the base can be retargeted by overriding those custom properties.
27
+
28
+ Internal: `createUseVariable` gains a `fluid?: boolean` opt-in flag plus a `breakpoint` options-bag arg on the returned composable, so any composable can adopt range-aware values with a single line.
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies [[`6d406c2`](https://github.com/styleframe-dev/styleframe/commit/6d406c289b39c666a3fb7468aa3ec08f5a6d316b)]:
33
+ - @styleframe/core@3.5.0
34
+ - @styleframe/transpiler@3.3.0
35
+ - @styleframe/plugin@3.3.0
36
+
3
37
  ## 3.6.0
4
38
 
5
39
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "styleframe",
3
- "version": "3.6.0",
3
+ "version": "3.7.0",
4
4
  "bin": {
5
5
  "styleframe": "./dist/cli.js"
6
6
  },
@@ -88,18 +88,18 @@
88
88
  "@styleframe/license": "^2.0.2"
89
89
  },
90
90
  "peerDependencies": {
91
- "@styleframe/plugin": "^3.2.0",
92
- "@styleframe/core": "^3.4.0",
91
+ "@styleframe/plugin": "^3.3.0",
92
+ "@styleframe/core": "^3.5.0",
93
93
  "@styleframe/loader": "^3.0.1",
94
- "@styleframe/transpiler": "^3.2.0"
94
+ "@styleframe/transpiler": "^3.3.0"
95
95
  },
96
96
  "devDependencies": {
97
97
  "@styleframe/config-typescript": "^3.0.0",
98
98
  "@styleframe/cli": "^4.0.0",
99
- "@styleframe/plugin": "^3.2.0",
100
- "@styleframe/core": "^3.4.0",
99
+ "@styleframe/plugin": "^3.3.0",
100
+ "@styleframe/core": "^3.5.0",
101
101
  "@styleframe/loader": "^3.0.1",
102
- "@styleframe/transpiler": "^3.2.0",
102
+ "@styleframe/transpiler": "^3.3.0",
103
103
  "@types/node": "^22.15.17",
104
104
  "@vitest/coverage-v8": "^3.2.4",
105
105
  "bumpp": "^10.1.0",