styleframe 3.5.1 → 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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,67 @@
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
+
37
+ ## 3.6.0
38
+
39
+ ### Minor Changes
40
+
41
+ - [#204](https://github.com/styleframe-dev/styleframe/pull/204) [`1d57ffa`](https://github.com/styleframe-dev/styleframe/commit/1d57ffaa2861fd05a03f370cf3948d772d6be237) Thanks [@alexgrozav](https://github.com/alexgrozav)! - Add `Media` recipe — a layout-only multi-part recipe modeled on the Bootstrap/Inkline media object pattern for image-plus-content layouts (comments, posts, list items)
42
+ - New recipes: `useMediaRecipe`, `useMediaFigureRecipe`, `useMediaBodyRecipe`, `useMediaTitleRecipe`
43
+ - Root recipe exposes `orientation` (`horizontal`/`vertical`), `align` (`start`/`center`/`end`), and `size` (`sm`/`md`/`lg`) axes — no color or surface styling, so it composes inside Card, Callout, etc.
44
+ - `useMediaBodyRecipe` sets `min-width: 0` to safely wrap long titles inside flex containers
45
+ - Designed for nesting (parent Media → child Media inside `MediaBody`) for comment threads and reply chains
46
+
47
+ - [#208](https://github.com/styleframe-dev/styleframe/pull/208) [`787cf14`](https://github.com/styleframe-dev/styleframe/commit/787cf143c925ac9caacb3df1c72c3aeb2d626419) Thanks [@alexgrozav](https://github.com/alexgrozav)! - Add `PageHero` recipe — a multi-part composable for full-width hero sections with color, size, orientation, alignment, and reverse axes
48
+ - New recipes: `usePageHeroRecipe`, `usePageHeroBodyRecipe`, `usePageHeroHeadlineRecipe`, `usePageHeroTitleRecipe`, `usePageHeroDescriptionRecipe`, `usePageHeroActionsRecipe`, `usePageHeroLinksRecipe`, `usePageHeroImageRecipe`
49
+ - Container exposes `color` (`light`/`dark`/`neutral` with adaptive dark mode), `size` (`sm`/`md`/`lg`), `orientation` (`vertical`/`horizontal`), `alignment` (`start`/`center`/`end`), and `reverse` axes
50
+ - Sub-recipes mirror the `size` and `alignment` axes and override alignment to `start` in horizontal orientation for correct two-column layout
51
+ - Adds a generic `useFilterUtility` and registers it in `useUtilitiesPreset`
52
+
53
+ - [#209](https://github.com/styleframe-dev/styleframe/pull/209) [`3559b70`](https://github.com/styleframe-dev/styleframe/commit/3559b70dedcc13ad191c78869cd86407b8470604) Thanks [@alexgrozav](https://github.com/alexgrozav)! - Add pagination recipe with `usePaginationRecipe`, `usePaginationItemRecipe`, and `usePaginationEllipsisRecipe`. Supports 3 color modes (light, dark, neutral), 6 style variants (solid, outline, soft, subtle, ghost, link), 3 sizes (sm, md, lg), and active/disabled item states.
54
+
55
+ - [#203](https://github.com/styleframe-dev/styleframe/pull/203) [`c314dbc`](https://github.com/styleframe-dev/styleframe/commit/c314dbc78872df38efe72d7931faf86afce5ffcc) Thanks [@alexgrozav](https://github.com/alexgrozav)! - Track variable references in `root._usage.variables` for future transpiler optimizations
56
+ - Add `_usage: { variables: Set<string> }` to `Root` type and initialize in `createRoot()`
57
+ - Record variable names whenever `ref()` is called or `@`-prefixed syntax is resolved
58
+
59
+ ### Patch Changes
60
+
61
+ - Updated dependencies [[`8826eda`](https://github.com/styleframe-dev/styleframe/commit/8826edad3fcb2e969024a586a20c2059229d958f), [`8826eda`](https://github.com/styleframe-dev/styleframe/commit/8826edad3fcb2e969024a586a20c2059229d958f), [`8826eda`](https://github.com/styleframe-dev/styleframe/commit/8826edad3fcb2e969024a586a20c2059229d958f), [`8826eda`](https://github.com/styleframe-dev/styleframe/commit/8826edad3fcb2e969024a586a20c2059229d958f), [`8826eda`](https://github.com/styleframe-dev/styleframe/commit/8826edad3fcb2e969024a586a20c2059229d958f), [`24eebba`](https://github.com/styleframe-dev/styleframe/commit/24eebba87c8fa6fc6822e18d67f4c0412192e793), [`c314dbc`](https://github.com/styleframe-dev/styleframe/commit/c314dbc78872df38efe72d7931faf86afce5ffcc)]:
62
+ - @styleframe/cli@4.0.0
63
+ - @styleframe/core@3.4.0
64
+
3
65
  ## 3.5.1
4
66
 
5
67
  ### Patch Changes
package/dist/cli.cjs CHANGED
File without changes
package/dist/cli.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "styleframe",
3
- "version": "3.5.1",
3
+ "version": "3.7.0",
4
4
  "bin": {
5
- "styleframe": "./dist/cli.cjs"
5
+ "styleframe": "./dist/cli.js"
6
6
  },
7
7
  "description": "From simple UI styles to full Design Systems, write code using Styleframe’s powerful TypeScript CSS API — AI-ready by design.",
8
8
  "type": "module",
@@ -84,22 +84,22 @@
84
84
  "access": "public"
85
85
  },
86
86
  "dependencies": {
87
- "@styleframe/cli": "^3.0.0",
87
+ "@styleframe/cli": "^4.0.0",
88
88
  "@styleframe/license": "^2.0.2"
89
89
  },
90
90
  "peerDependencies": {
91
- "@styleframe/plugin": "^3.2.0",
92
- "@styleframe/core": "^3.3.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
- "@styleframe/cli": "^3.0.0",
99
- "@styleframe/plugin": "^3.2.0",
100
- "@styleframe/core": "^3.3.0",
98
+ "@styleframe/cli": "^4.0.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",