@weser/styling 0.0.10 → 0.0.11
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.
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createHooks as baseCreateHooks } from '@css-hooks/react';
|
|
2
|
-
import { WithHooks } from '@css-hooks/core';
|
|
2
|
+
import { WithHooks as BaseWithHooks } from '@css-hooks/core';
|
|
3
3
|
import { assignStyle } from 'css-in-js-utils';
|
|
4
4
|
import { T_Fallback, T_RawStyle } from '../types.js';
|
|
5
|
+
type WithHooks<Hooks, T> = BaseWithHooks<Hooks, T>;
|
|
5
6
|
type Plugin<T> = (style: T) => T;
|
|
6
7
|
type HookOptions<Hooks extends string> = Parameters<typeof baseCreateHooks<Hooks>>[0];
|
|
7
8
|
type Config<T, Hooks extends string> = {
|
|
@@ -10,8 +11,8 @@ type Config<T, Hooks extends string> = {
|
|
|
10
11
|
plugins?: Array<Plugin<T>>;
|
|
11
12
|
mergeStyle?: typeof assignStyle;
|
|
12
13
|
};
|
|
13
|
-
type Properties<T, Hooks> = Array<Properties<T, Hooks>> | WithHooks<Hooks, T> | undefined;
|
|
14
|
-
type CSSFunction<T, Hooks> = (...style: Array<Properties<T, Hooks>>) => T_RawStyle;
|
|
14
|
+
export type Properties<T, Hooks> = Array<Properties<T, Hooks>> | WithHooks<Hooks, T> | undefined;
|
|
15
|
+
export type CSSFunction<T, Hooks> = (...style: Array<Properties<T, Hooks>>) => T_RawStyle;
|
|
15
16
|
export default function createRenderer<Hooks extends Record<string, string>, T extends Record<string, any> = T_RawStyle>({ hooks, fallbacks, plugins, mergeStyle, }: Config<T, keyof Hooks & string>): [
|
|
16
17
|
string,
|
|
17
18
|
CSSFunction<T, keyof Hooks & string>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weser/styling",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "Utils for styling with CSS hooks",
|
|
5
5
|
"author": "Robin Weser <robin@weser.io>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"styles-debugger": "^1.0.0",
|
|
58
58
|
"typescript": "^5.9.2"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "e2935b6b1b52be5a254d6b249ac61d62a012a3b5"
|
|
61
61
|
}
|