This pull request focuses on improving the theme management and color handling in the application. The most important changes include refactoring the theme generator, enhancing the DynamicThemeProvider component, and adding utility functions for color space conversions.
src/webviews/theme/themeGenerator.ts: Added functions to generate adaptive dark and light themes and a utility to extract brand tokens from a color palette.
Utility Functions for Color Space Conversions:
src/webviews/theme/utils/csswg.ts: Added various functions for color space conversions, including sRGB to LCH, LCH to sRGB, and chromatic adaptation between D65 and D50.
src/webviews/theme/utils/geometry.ts: Added utility functions for handling geometric operations on curves, such as getting points on a quadratic Bezier curve.
Minor Refactoring:
src/webviews/QueryEditor/QueryPanel/QueryMonaco.tsx and src/webviews/QueryEditor/ResultPanel/DataViewPanelJSON.tsx: Updated import paths for useVSCodeTheme to reflect the new location in themeGenerator. [1][2]
This pull request focuses on improving the theme management and color handling in the application. The most important changes include refactoring the theme generator, enhancing the
DynamicThemeProvider
component, and adding utility functions for color space conversions.Theme Management Enhancements:
src/webviews/theme/DynamicThemeProvider.tsx
: Refactored theDynamicThemeProvider
component to support adaptive themes and improved theme state management. [1] [2]src/webviews/theme/themeGenerator.ts
: Added functions to generate adaptive dark and light themes and a utility to extract brand tokens from a color palette.Utility Functions for Color Space Conversions:
src/webviews/theme/utils/csswg.ts
: Added various functions for color space conversions, including sRGB to LCH, LCH to sRGB, and chromatic adaptation between D65 and D50.src/webviews/theme/utils/geometry.ts
: Added utility functions for handling geometric operations on curves, such as getting points on a quadratic Bezier curve.Minor Refactoring:
src/webviews/QueryEditor/QueryPanel/QueryMonaco.tsx
andsrc/webviews/QueryEditor/ResultPanel/DataViewPanelJSON.tsx
: Updated import paths foruseVSCodeTheme
to reflect the new location inthemeGenerator
. [1] [2]src/webviews/index.tsx
: Enabled adaptive theme usage inDynamicThemeProvider
.