@spark-ui/theme-utils 2.3.1 → 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
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.4.0](https://github.com/adevinta/spark/compare/@spark-ui/theme-utils@2.3.2...@spark-ui/theme-utils@2.4.0) (2023-02-24)
7
+
8
+ ### Features
9
+
10
+ - **cli-utils:** flattened cli args for theme config ([ccb13de](https://github.com/adevinta/spark/commit/ccb13de785f2d6d2f8893bdff83b032af6416a38))
11
+
12
+ ## [2.3.2](https://github.com/adevinta/spark/compare/@spark-ui/theme-utils@2.3.1...@spark-ui/theme-utils@2.3.2) (2023-02-24)
13
+
14
+ **Note:** Version bump only for package @spark-ui/theme-utils
15
+
6
16
  ## [2.3.1](https://github.com/adevinta/spark/compare/@spark-ui/theme-utils@2.3.0...@spark-ui/theme-utils@2.3.1) (2023-02-24)
7
17
 
8
18
  **Note:** Version bump only for package @spark-ui/theme-utils
@@ -1,9 +1,9 @@
1
1
  import { type Theme } from './types';
2
2
  /**
3
- * Create a custom theme by merging the default theme with a partial custom theme passed as an argument.
3
+ * Creates a custom theme by merging the default theme with a partial custom theme passed as an argument.
4
4
  *
5
- * @param theme - A partial theme object of type Partial<Theme> which holds the theme values that need to be customized or overridden
6
- * @param fromTheme - Use this argument if you want to derivate your theme from another theme (instead of Spark's default theme)
5
+ * @param {Partial<Theme>} theme - A partial theme object which holds the theme values that need to be customized or overridden. When a category is included in the `theme` parameter, all of the category's tokens must be overridden.
6
+ * @param {Theme} [fromTheme=defaultTheme] - (Optional) A theme object from which to derive the new custom theme (instead of Spark's `defaultTheme`)
7
7
  *
8
8
  * @example
9
9
  *
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { createTheme } from './createTheme';
2
2
  export { defaultTheme } from './defaultTheme';
3
3
  export { defaultThemeDark } from './defaultThemeDark';
4
- export type { Theme } from './types';
4
+ export type { Theme, ThemeConfig } from './types';
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { RequireAtLeastOne } from 'type-fest';
1
2
  export interface Theme {
2
3
  screens: {
3
4
  sm: string;
@@ -181,3 +182,8 @@ export interface Theme {
181
182
  tooltip: number;
182
183
  };
183
184
  }
185
+ export interface ThemeConfig {
186
+ tailwindThemeConfigPath: string;
187
+ tailwindCSSPath: string;
188
+ themes: RequireAtLeastOne<Record<string, Theme>, 'default'>;
189
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-ui/theme-utils",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "package for managing Spark theme configuration",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -20,5 +20,5 @@
20
20
  "url": "git@github.com:adevinta/spark.git",
21
21
  "directory": "packages/utils/theme"
22
22
  },
23
- "gitHead": "ef9e9e64bcaf2c2527725d995c9329c5672ac82b"
23
+ "gitHead": "f21e13f33295a0f0c73726c2f46732993bdf9d72"
24
24
  }