|
1 | 1 | # Change Log |
2 | 2 |
|
3 | | -## 2.0.0-preview.2 |
4 | | - |
5 | | -### Minor Changes |
6 | | - |
7 | | -- 0a1bf8d: Enhanced theme system with support for extending `FusionTheme` with custom properties, improved nested theme composition, and comprehensive documentation. |
8 | | - |
9 | | - ### Added |
10 | | - - **Theme Extension Support**: `FusionTheme` now supports extending with custom properties using generics: |
11 | | - ```typescript |
12 | | - type MyTheme = FusionTheme<{ colors: { primary: ColorStyleProperty } }>; |
13 | | - ``` |
14 | | - - **Custom Base Theme Merging**: `createTheme` now accepts an optional `baseTheme` parameter for merging with custom base themes: |
15 | | - ```typescript |
16 | | - const extendedTheme = createTheme( |
17 | | - { colors: { ui: { background__danger: newColor } } }, |
18 | | - outerTheme, |
19 | | - ); |
20 | | - ``` |
21 | | - - **Deep Merging Improvements**: Enhanced `deepMerge` function properly handles nested theme properties, `Record` types, and `StyleProperty` instances |
22 | | - - **Type Exports**: Explicitly exported `ThemeProviderProps`, `StylesProviderProps`, `FusionTheme`, `StyleDefinition`, and `createTheme` for better TypeScript support |
23 | | - - **Complete TSDoc Documentation**: All exported functions, types, and interfaces now have comprehensive TSDoc comments with examples, parameter descriptions, and usage patterns |
24 | | - - **Theme Extension Storybook Story**: New `ThemeExtension` story demonstrating how to extend themes with custom properties, including step-by-step examples for type definition, theme creation, and usage with `useTheme` and `makeStyles` |
25 | | - |
26 | | - ### Changed |
27 | | - - `createTheme` signature now accepts optional `baseTheme` parameter (backward compatible) |
28 | | - - Improved type inference for extended themes in `ThemeProvider`, `useTheme`, and `makeStyles` |
29 | | - - Better handling of nested theme composition when using theme functions in nested `ThemeProvider` components |
30 | | - - **Storybook Stories Updated**: All stories now use theme CSS values (`theme.colors.*.css`, `theme.spacing.*.css`, `theme.typography.*.style.*`) instead of hardcoded custom CSS, ensuring proper integration with Fusion design system tokens |
31 | | - |
32 | | - ### Technical Details |
33 | | - - Deep merging now correctly handles `StyleProperty` instances (replaces instead of merging) |
34 | | - - Theme composition works correctly with nested `ThemeProvider` components |
35 | | - - All types are properly exported and documented with complete TSDoc comments |
36 | | - - Typography properties accessed via `.style.fontSize`, `.style.fontWeight`, etc. for proper CSS value extraction |
37 | | - - Color and spacing properties accessed via `.css` property for CSS variable or value string |
38 | | - |
39 | | -## 2.0.0-preview.1 |
40 | | - |
41 | | -### Major Changes |
42 | | - |
43 | | -- 07a06d2: Remove `@material-ui/styles` dependency and replace with custom JSS-based implementation for React 19 compatibility. |
44 | | - |
45 | | - ref: https://github.com/equinor/fusion-framework/issues/3698 |
46 | | - |
47 | | - ### Breaking Changes |
48 | | - - Removed `@material-ui/styles` dependency - replaced with direct JSS integration |
49 | | - - All Material-UI v4 styling APIs are now implemented internally |
50 | | - - No API changes - existing code should work without modifications |
51 | | - |
52 | | - ### Added |
53 | | - - Custom `makeStyles` implementation using JSS directly |
54 | | - - Custom `StylesProvider` with enhanced scope isolation via seed prefixes |
55 | | - - Custom `ThemeProvider` with React 19 compatibility |
56 | | - - Comprehensive test suite with Vitest (52 tests, 100% statement coverage) |
57 | | - - Utility modules in `src/utils/`: |
58 | | - - `jss-setup.ts` - JSS instance configuration |
59 | | - - `class-name-generator.ts` - Class name generation logic |
60 | | - - `sheet-manager.ts` - Stylesheet caching and management |
61 | | - - `contexts.ts` - React context definitions |
62 | | - - TSDoc documentation for all exported APIs |
63 | | - - Updated README with comprehensive documentation |
64 | | - |
65 | | - ### Changed |
66 | | - - Package now uses JSS directly instead of Material-UI wrapper |
67 | | - - Improved TypeScript types with better inference |
68 | | - - Enhanced class name isolation for micro-frontend scenarios |
69 | | - |
70 | | - ### Technical Details |
71 | | - - React 19 compatible (tested with React ^18 || ^19) |
72 | | - - Uses JSS v10 with all necessary plugins |
73 | | - - Maintains backward compatibility with existing API surface |
74 | | - - Full test coverage with Vitest and React Testing Library |
75 | | - |
76 | | -### Minor Changes |
77 | | - |
78 | | -- 0a1bf8d: Enhanced theme system with support for extending `FusionTheme` with custom properties, improved nested theme composition, and comprehensive documentation. |
79 | | - |
80 | | - ### Added |
81 | | - - **Theme Extension Support**: `FusionTheme` now supports extending with custom properties using generics: |
82 | | - ```typescript |
83 | | - type MyTheme = FusionTheme<{ colors: { primary: ColorStyleProperty } }>; |
84 | | - ``` |
85 | | - - **Custom Base Theme Merging**: `createTheme` now accepts an optional `baseTheme` parameter for merging with custom base themes: |
86 | | - ```typescript |
87 | | - const extendedTheme = createTheme( |
88 | | - { colors: { ui: { background__danger: newColor } } }, |
89 | | - outerTheme, |
90 | | - ); |
91 | | - ``` |
92 | | - - **Deep Merging Improvements**: Enhanced `deepMerge` function properly handles nested theme properties, `Record` types, and `StyleProperty` instances |
93 | | - - **Type Exports**: Explicitly exported `ThemeProviderProps`, `StylesProviderProps`, `FusionTheme`, `StyleDefinition`, and `createTheme` for better TypeScript support |
94 | | - - **Complete TSDoc Documentation**: All exported functions, types, and interfaces now have comprehensive TSDoc comments with examples, parameter descriptions, and usage patterns |
95 | | - - **Theme Extension Storybook Story**: New `ThemeExtension` story demonstrating how to extend themes with custom properties, including step-by-step examples for type definition, theme creation, and usage with `useTheme` and `makeStyles` |
96 | | - |
97 | | - ### Changed |
98 | | - - `createTheme` signature now accepts optional `baseTheme` parameter (backward compatible) |
99 | | - - Improved type inference for extended themes in `ThemeProvider`, `useTheme`, and `makeStyles` |
100 | | - - Better handling of nested theme composition when using theme functions in nested `ThemeProvider` components |
101 | | - - **Storybook Stories Updated**: All stories now use theme CSS values (`theme.colors.*.css`, `theme.spacing.*.css`, `theme.typography.*.style.*`) instead of hardcoded custom CSS, ensuring proper integration with Fusion design system tokens |
102 | | - |
103 | | - ### Technical Details |
104 | | - - Deep merging now correctly handles `StyleProperty` instances (replaces instead of merging) |
105 | | - - Theme composition works correctly with nested `ThemeProvider` components |
106 | | - - All types are properly exported and documented with complete TSDoc comments |
107 | | - - Typography properties accessed via `.style.fontSize`, `.style.fontWeight`, etc. for proper CSS value extraction |
108 | | - - Color and spacing properties accessed via `.css` property for CSS variable or value string |
109 | | - |
110 | | -## 2.0.0-preview.0 |
111 | | - |
112 | | -### Major Changes |
113 | | - |
114 | | -- 07a06d2: Remove `@material-ui/styles` dependency and replace with custom JSS-based implementation for React 19 compatibility. |
115 | | - |
116 | | - ref: https://github.com/equinor/fusion-framework/issues/3698 |
117 | | - |
118 | | - ### Breaking Changes |
119 | | - - Removed `@material-ui/styles` dependency - replaced with direct JSS integration |
120 | | - - All Material-UI v4 styling APIs are now implemented internally |
121 | | - - No API changes - existing code should work without modifications |
122 | | - |
123 | | - ### Added |
124 | | - - Custom `makeStyles` implementation using JSS directly |
125 | | - - Custom `StylesProvider` with enhanced scope isolation via seed prefixes |
126 | | - - Custom `ThemeProvider` with React 19 compatibility |
127 | | - - Comprehensive test suite with Vitest (52 tests, 100% statement coverage) |
128 | | - - Utility modules in `src/utils/`: |
129 | | - - `jss-setup.ts` - JSS instance configuration |
130 | | - - `class-name-generator.ts` - Class name generation logic |
131 | | - - `sheet-manager.ts` - Stylesheet caching and management |
132 | | - - `contexts.ts` - React context definitions |
133 | | - - TSDoc documentation for all exported APIs |
134 | | - - Updated README with comprehensive documentation |
135 | | - |
136 | | - ### Changed |
137 | | - - Package now uses JSS directly instead of Material-UI wrapper |
138 | | - - Improved TypeScript types with better inference |
139 | | - - Enhanced class name isolation for micro-frontend scenarios |
140 | | - |
141 | | - ### Technical Details |
142 | | - - React 19 compatible (tested with React ^18 || ^19) |
143 | | - - Uses JSS v10 with all necessary plugins |
144 | | - - Maintains backward compatibility with existing API surface |
145 | | - - Full test coverage with Vitest and React Testing Library |
146 | | - |
147 | 3 | ## 1.0.0 |
148 | 4 |
|
149 | 5 | ### Major Changes |
|
0 commit comments