@vitus-labs/rocketstyle 2.0.0-alpha.23 → 2.0.0-alpha.24
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/lib/index.d.ts +4 -3
- package/package.json +6 -6
package/lib/index.d.ts
CHANGED
|
@@ -82,7 +82,7 @@ type ExtractProps<TComponentOrTProps> = TComponentOrTProps extends ComponentType
|
|
|
82
82
|
//#endregion
|
|
83
83
|
//#region src/types/styles.d.ts
|
|
84
84
|
interface StylesDefault {}
|
|
85
|
-
type Styles<S
|
|
85
|
+
type Styles<S = unknown> = StylesDefault;
|
|
86
86
|
type Css = typeof config.css;
|
|
87
87
|
/**
|
|
88
88
|
* Props available inside `.styles()` interpolation functions.
|
|
@@ -134,7 +134,8 @@ type DimensionValueObj = {
|
|
|
134
134
|
type DimensionValue = DimensionValuePrimitive | DimensionValueObj;
|
|
135
135
|
type Dimensions = Record<string, DimensionValue>;
|
|
136
136
|
type MultiKeys<T extends Dimensions = Dimensions> = Partial<Record<ExtractDimensionKey<T[keyof T]>, true>>;
|
|
137
|
-
type
|
|
137
|
+
type DeepPartial<T> = { [K in keyof T]?: T[K] extends ((...args: any[]) => any) ? T[K] : NonNullable<T[K]> extends Record<string, any> ? DeepPartial<NonNullable<T[K]>> : T[K] };
|
|
138
|
+
type DimensionResult<CT> = Record<string, boolean | null | DeepPartial<CT>>;
|
|
138
139
|
type DimensionObj<CT> = DimensionResult<CT>;
|
|
139
140
|
type DimensionCb<T, CT> = (theme: T, mode: ThemeModeCallback, css: Css) => DimensionResult<CT>;
|
|
140
141
|
type DimensionCallbackParam<T, CT> = DimensionObj<CT> | DimensionCb<T, CT>;
|
|
@@ -365,7 +366,7 @@ interface IRocketStyleComponent<OA extends TObj = {}, EA extends TObj = {}, T ex
|
|
|
365
366
|
* }))
|
|
366
367
|
* ```
|
|
367
368
|
*/
|
|
368
|
-
theme: <P extends TObj = {}>(param: Partial<P> | ThemeCb<P, Theme<T>>) => RocketStyleComponent<OA, EA, T, MergeTypes<[CSS, P]>, S, HOC, D, UB, DKP>;
|
|
369
|
+
theme: <P extends TObj = {}>(param: Partial<P> | Partial<Styles<CSS>> | ThemeCb<P, Theme<T>>) => RocketStyleComponent<OA, EA, T, MergeTypes<[CSS, P]>, S, HOC, D, UB, DKP>;
|
|
369
370
|
/**
|
|
370
371
|
* A chaining method to define default rendered styles
|
|
371
372
|
* @param param Callback of styled-components `css` function
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitus-labs/rocketstyle",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.24",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Vit Bokisch <vit@bokisch.cz>",
|
|
6
6
|
"maintainers": [
|
|
@@ -64,16 +64,16 @@
|
|
|
64
64
|
"version": "node ../../scripts/sync-peer-deps.mjs"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@vitus-labs/core": "2.0.0-alpha.
|
|
67
|
+
"@vitus-labs/core": "2.0.0-alpha.23",
|
|
68
68
|
"react": ">= 19"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@vitus-labs/core": "2.0.0-alpha.
|
|
72
|
-
"@vitus-labs/elements": "2.0.0-alpha.
|
|
71
|
+
"@vitus-labs/core": "2.0.0-alpha.24",
|
|
72
|
+
"@vitus-labs/elements": "2.0.0-alpha.24",
|
|
73
73
|
"@vitus-labs/tools-rolldown": "^1.7.0",
|
|
74
74
|
"@vitus-labs/tools-storybook": "^1.7.0",
|
|
75
75
|
"@vitus-labs/tools-typescript": "^1.7.0",
|
|
76
|
-
"@vitus-labs/unistyle": "2.0.0-alpha.
|
|
76
|
+
"@vitus-labs/unistyle": "2.0.0-alpha.24"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "9e6d813549d56c3d17d1a3d65bfa8153efcb0688"
|
|
79
79
|
}
|