@styleframe/theme 2.2.0 → 2.4.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,206 @@
1
1
  # @styleframe/theme
2
2
 
3
+ ## 2.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#93](https://github.com/styleframe-dev/styleframe/pull/93) [`4ebc385`](https://github.com/styleframe-dev/styleframe/commit/4ebc3856ad4468e6caea5f72e595e781e2651b09) Thanks [@alexgrozav](https://github.com/alexgrozav)! - Add `useDesignTokensPreset` composable for quick design token system setup
8
+ - Introduces a comprehensive preset function that bootstraps complete design token systems with sensible defaults in a single function call
9
+ - Full TypeScript type inference for all configuration options
10
+ - Flexible domain configuration: use defaults, disable domains with `false`, or provide custom values
11
+ - Automatic color variation generation (lightness, shades, tints) with configurable levels
12
+ - Exports default values from variable composables (`defaultSpacingValues`, `defaultColorValues`, etc.)
13
+ - Adds `useFontStyle` variable composable
14
+ - Includes 54 comprehensive tests and detailed documentation
15
+
16
+ - [#95](https://github.com/styleframe-dev/styleframe/pull/95) [`75fd781`](https://github.com/styleframe-dev/styleframe/commit/75fd78196d61498db066de6e355eabcebbd39071) Thanks [@alexgrozav](https://github.com/alexgrozav)! - Rename `useUtilities` to `useUtilitiesPreset` for consistency with design tokens preset naming
17
+ - **BREAKING**: Renamed `useUtilities()` to `useUtilitiesPreset()` to align with `useDesignTokensPreset()` naming convention
18
+ - Added comprehensive presets documentation page with complete API reference for 200+ utility creators
19
+ - Updated all documentation examples and storybook files to use the new function name
20
+ - Clarified CHANGELOG entries to indicate this is a rename from the previous function
21
+
22
+ - [#97](https://github.com/styleframe-dev/styleframe/pull/97) [`fe021c6`](https://github.com/styleframe-dev/styleframe/commit/fe021c6b90c83593e5a297e4e66ef516d643252f) Thanks [@alexgrozav](https://github.com/alexgrozav)! - Centralize theme variable defaults to dedicated values folder
23
+
24
+ **BREAKING**: Default value exports have been renamed and `useUtilitiesPreset` has moved.
25
+
26
+ ### Renamed Exports
27
+
28
+ All default value exports have been renamed from `defaultXxxValues` to `xxxValues`:
29
+ - `defaultSpacingValues` → `spacingValues`
30
+ - `defaultColorValues` → `colorValues`
31
+ - `defaultBorderWidthValues` → `borderWidthValues`
32
+ - `defaultBorderRadiusValues` → `borderRadiusValues`
33
+ - `defaultBorderStyleValues` → `borderStyleValues`
34
+ - `defaultBoxShadowValues` → `boxShadowValues`
35
+ - `defaultBreakpointValues` → `breakpointValues`
36
+ - `defaultEasingValues` → `easingValues`
37
+ - `defaultFontFamilyValues` → `fontFamilyValues`
38
+ - `defaultFontSizeValues` → `fontSizeValues`
39
+ - `defaultFontStyleValues` → `fontStyleValues`
40
+ - `defaultFontWeightValues` → `fontWeightValues`
41
+ - `defaultLineHeightValues` → `lineHeightValues`
42
+ - `defaultLetterSpacingValues` → `letterSpacingValues`
43
+ - `defaultScaleValues` → `scaleValues`
44
+ - `defaultScalePowerValues` → `scalePowerValues`
45
+ - `defaultColorLightnessValues` → `colorLightnessValues`
46
+ - `defaultColorShadeValues` → `colorShadeValues`
47
+ - `defaultColorTintValues` → `colorTintValues`
48
+
49
+ ### Moved `useUtilitiesPreset`
50
+
51
+ The `useUtilitiesPreset` function has moved from `utilities/` to `presets/`:
52
+
53
+ ```ts
54
+ // Before
55
+ import { useUtilitiesPreset } from "@styleframe/theme/utilities";
56
+
57
+ // After
58
+ import { useUtilitiesPreset } from "@styleframe/theme/presets";
59
+ // Or from the main export
60
+ import { useUtilitiesPreset } from "@styleframe/theme";
61
+ ```
62
+
63
+ ### Enhanced `useUtilitiesPreset`
64
+
65
+ The `useUtilitiesPreset` now supports configuration options:
66
+ - Customize utility default values
67
+ - Disable specific utilities with `false`
68
+ - Merge custom values with defaults using `meta.merge: true`
69
+
70
+ ```ts
71
+ const utilities = useUtilitiesPreset(s, {
72
+ meta: { merge: true },
73
+ display: { flex: "flex", block: "block" },
74
+ position: false, // Disable position utilities
75
+ });
76
+ ```
77
+
78
+ Migration: Update imports to use the new export names and import path.
79
+
80
+ - [#95](https://github.com/styleframe-dev/styleframe/pull/95) [`75fd781`](https://github.com/styleframe-dev/styleframe/commit/75fd78196d61498db066de6e355eabcebbd39071) Thanks [@alexgrozav](https://github.com/alexgrozav)! - Standardize utility class names to match CSS property syntax
81
+
82
+ **BREAKING**: All utility class names now use CSS-standard property names instead of abbreviated Tailwind-style names. This affects the generated CSS class names.
83
+
84
+ ### Border Color Utilities
85
+ - `border-t-color` → `border-top-color`
86
+ - `border-r-color` → `border-right-color`
87
+ - `border-b-color` → `border-bottom-color`
88
+ - `border-l-color` → `border-left-color`
89
+ - `border-s-color` → `border-inline-start-color`
90
+ - `border-e-color` → `border-inline-end-color`
91
+
92
+ ### Scroll Utilities
93
+ - `scroll-m` → `scroll-margin`
94
+ - `scroll-mt` → `scroll-margin-top`
95
+ - `scroll-mr` → `scroll-margin-right`
96
+ - `scroll-mb` → `scroll-margin-bottom`
97
+ - `scroll-ml` → `scroll-margin-left`
98
+ - `scroll-mx` → `scroll-margin-x`
99
+ - `scroll-my` → `scroll-margin-y`
100
+ - `scroll-ms` → `scroll-margin-inline-start`
101
+ - `scroll-me` → `scroll-margin-inline-end`
102
+ - `scroll-p` → `scroll-padding`
103
+ - `scroll-pt` → `scroll-padding-top`
104
+ - `scroll-pr` → `scroll-padding-right`
105
+ - `scroll-pb` → `scroll-padding-bottom`
106
+ - `scroll-pl` → `scroll-padding-left`
107
+ - `scroll-px` → `scroll-padding-x`
108
+ - `scroll-py` → `scroll-padding-y`
109
+ - `scroll-ps` → `scroll-padding-inline-start`
110
+ - `scroll-pe` → `scroll-padding-inline-end`
111
+
112
+ ### Grid Utilities
113
+ - `grid-cols` → `grid-template-columns`
114
+ - `grid-rows` → `grid-template-rows`
115
+ - `col` → `grid-column`
116
+ - `col-span` → `grid-column-span`
117
+ - `col-start` → `grid-column-start`
118
+ - `col-end` → `grid-column-end`
119
+ - `row` → `grid-row`
120
+ - `row-span` → `grid-row-span`
121
+ - `row-start` → `grid-row-start`
122
+ - `row-end` → `grid-row-end`
123
+ - `auto-cols` → `grid-auto-columns`
124
+ - `auto-rows` → `grid-auto-rows`
125
+ - `grid-flow` → `grid-auto-flow`
126
+
127
+ ### Flex Utilities
128
+ - `grow` → `flex-grow`
129
+ - `shrink` → `flex-shrink`
130
+ - `basis` → `flex-basis`
131
+
132
+ ### Align Utilities
133
+ - `content` → `align-content`
134
+ - `items` → `align-items`
135
+ - `self` → `align-self`
136
+
137
+ ### Justify Utilities
138
+ - `justify` → `justify-content`
139
+
140
+ ### Transition Utilities
141
+ - `transition` → `transition-property`
142
+ - `duration` → `transition-duration`
143
+ - `ease` → `transition-timing-function`
144
+ - `delay` → `transition-delay`
145
+
146
+ ### Transform Utilities
147
+ - `backface` → `backface-visibility`
148
+ - `origin` → `transform-origin`
149
+
150
+ ### Inset Utilities
151
+ - `start` → `inset-inline-start`
152
+ - `end` → `inset-inline-end`
153
+
154
+ ### Typography Utilities
155
+ - `underline-offset` → `text-underline-offset`
156
+ - `text-decoration` → `text-decoration-line`
157
+
158
+ ### Box Utilities
159
+ - `box-decoration` → `box-decoration-break`
160
+
161
+ ### Outline Utilities
162
+ - `outline` → `outline-width`
163
+
164
+ Migration: Update any CSS class references in your templates from the old abbreviated names to the new CSS-standard names.
165
+
166
+ ### Patch Changes
167
+
168
+ - Updated dependencies [[`8460f16`](https://github.com/styleframe-dev/styleframe/commit/8460f169cec1199810e9203b357dac9f2f128c56)]:
169
+ - @styleframe/core@2.6.0
170
+
171
+ ## 2.3.0
172
+
173
+ ### Minor Changes
174
+
175
+ - [#74](https://github.com/styleframe-dev/styleframe/pull/74) [`2a1bbbe`](https://github.com/styleframe-dev/styleframe/commit/2a1bbbe67afb454c16abf9be64c4d5cea51575e4) Thanks [@alexgrozav](https://github.com/alexgrozav)! - feat: add useEasing composable for animation timing functions
176
+
177
+ Introduces `useEasing()` with comprehensive defaults including CSS keywords, 24 cubic-bezier curves from easings.net, and linear() functions for spring and bounce effects.
178
+
179
+ - [#78](https://github.com/styleframe-dev/styleframe/pull/78) [`7c4f098`](https://github.com/styleframe-dev/styleframe/commit/7c4f0988f3767f358f231571e6a3734426d1050c) Thanks [@alexgrozav](https://github.com/alexgrozav)! - feat: Add padding-x, padding-y, margin-x, and margin-y utilities
180
+
181
+ Add Tailwind-style shorthand utilities for horizontal and vertical spacing:
182
+ - `usePaddingXUtility` - sets padding-left and padding-right
183
+ - `usePaddingYUtility` - sets padding-top and padding-bottom
184
+ - `useMarginXUtility` - sets margin-left and margin-right
185
+ - `useMarginYUtility` - sets margin-top and margin-bottom
186
+
187
+ These complement the existing CSS logical property variants (`-inline`, `-block`).
188
+
189
+ - [#75](https://github.com/styleframe-dev/styleframe/pull/75) [`72bb1f6`](https://github.com/styleframe-dev/styleframe/commit/72bb1f64aae1531496c5e7398c4bd3c11f5433f9) Thanks [@alexgrozav](https://github.com/alexgrozav)! - feat: add Tailwind-style utility functions
190
+
191
+ Add `createUseUtility` factory function and 15 utility categories (accessibility, backgrounds, borders, effects, filters, flexbox-grid, interactivity, layout, sizing, spacing, svg, tables, transforms, transitions-animation, typography) for generating composable CSS utility classes.
192
+
193
+ ### Patch Changes
194
+
195
+ - [#76](https://github.com/styleframe-dev/styleframe/pull/76) [`06afe2a`](https://github.com/styleframe-dev/styleframe/commit/06afe2af66c3ecd8c6a516336e594c1e8cb56de1) Thanks [@alexgrozav](https://github.com/alexgrozav)! - **BREAKING**: rename `useUtilities` to `useUtilitiesPreset` for consistency with design tokens preset naming
196
+
197
+ Renamed `useUtilities()` to `useUtilitiesPreset()` to align with the naming convention established by `useDesignTokensPreset()`. The function registers all ~180 utility composables with a Styleframe instance and returns their creator functions, enabling automatic utility class generation for recipe declarations.
198
+
199
+ Updated recipe documentation examples to use `useUtilitiesPreset()` with destructured functions and demonstrate both `ref()` and `@variable.name` syntax for referencing design tokens.
200
+
201
+ - Updated dependencies [[`d98b650`](https://github.com/styleframe-dev/styleframe/commit/d98b65030170582ceacfabde3ba9ff7d92105389)]:
202
+ - @styleframe/core@2.5.0
203
+
3
204
  ## 2.2.0
4
205
 
5
206
  ### Minor Changes