@weser/styling 0.0.15 → 0.0.16

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,7 @@
1
1
  import { createHooks as baseCreateHooks } from '@css-hooks/react';
2
2
  import { WithHooks as BaseWithHooks } from '@css-hooks/core';
3
3
  import { assignStyle } from 'css-in-js-utils';
4
- import { T_Fallback, T_RawStyle } from '../types.js';
4
+ import { T_Fallback, T_RawStyle, T_Style } from '../types.js';
5
5
  type WithHooks<Hooks, T> = BaseWithHooks<Hooks, T>;
6
6
  type Plugin<T> = (style: T) => T;
7
7
  type HookOptions<Hooks extends string> = Parameters<typeof baseCreateHooks<Hooks>>[0];
@@ -13,7 +13,7 @@ type Config<T, Hooks extends string> = {
13
13
  };
14
14
  export type Properties<T, Hooks> = Array<Properties<T, Hooks>> | WithHooks<Hooks, T> | undefined;
15
15
  export type CSSFunction<T, Hooks> = (...style: Array<Properties<T, Hooks>>) => T_RawStyle;
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
+ export default function createRenderer<Hooks extends Record<string, string>, T extends Record<string, any> = T_Style>({ hooks, fallbacks, plugins, mergeStyle, }: Config<T, keyof Hooks & string>): [
17
17
  string,
18
18
  CSSFunction<T, keyof Hooks & string>
19
19
  ];
package/dist/index.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  export { default as createRenderer } from './core/createRenderer.js';
2
2
  export { default as fallbackValue } from './core/fallbackValue.js';
3
- export { default as responsiveValuePlugin, T_ResponsiveStyle, } from './plugins/responsiveValue.js';
3
+ export { default as responsiveValuePlugin, T_ResponsiveStyle, T_ResponsiveValue, } from './plugins/responsiveValue.js';
4
4
  export { default as prefixerPlugin, fallbacks as prefixerFallbacks, } from './plugins/prefixer.js';
5
5
  export { default as debugPlugin } from './plugins/debug.js';
6
6
  export { default as enforceLonghandPlugin } from './plugins/enforceLonghand.js';
7
7
  export { default as sortPropertyPlugin } from './plugins/sortProperty.js';
8
8
  export { default as unitPlugin } from './plugins/unit.js';
9
- export { default as extendPlugin, T_ExtendStyle } from './plugins/extend.js';
10
9
  export { default as useCSSVariable } from './helpers/useCSSVariable.js';
11
10
  export { T_Fallback, T_Style } from './types.js';
package/dist/index.js CHANGED
@@ -6,5 +6,4 @@ export { default as debugPlugin } from './plugins/debug.js';
6
6
  export { default as enforceLonghandPlugin } from './plugins/enforceLonghand.js';
7
7
  export { default as sortPropertyPlugin } from './plugins/sortProperty.js';
8
8
  export { default as unitPlugin } from './plugins/unit.js';
9
- export { default as extendPlugin } from './plugins/extend.js';
10
9
  export { default as useCSSVariable } from './helpers/useCSSVariable.js';
@@ -1,7 +1,6 @@
1
1
  import { T_Style } from '../types.js';
2
- type T_Responsive<T> = T | (T | undefined)[];
2
+ export type T_ResponsiveValue<T> = T | (T | undefined)[];
3
3
  export type T_ResponsiveStyle<T = T_Style> = {
4
- [P in keyof T]: T_Responsive<T[P]>;
4
+ [P in keyof T]: T_ResponsiveValue<T[P]>;
5
5
  };
6
6
  export default function responsiveValuePlugin<T = T_Style>(mediaQueries: Array<string>): (style: T) => T;
7
- export {};
@@ -1 +1 @@
1
- {"root":["../src/index.ts","../src/types.ts","../src/core/createrenderer.ts","../src/core/fallbackvalue.ts","../src/core/fallbackvalueplugin.ts","../src/core/getfallbackcss.ts","../src/core/getfallbackvariable.ts","../src/helpers/usecssvariable.ts","../src/modules/css-in-js-utils.d.ts","../src/modules/styles-debugger.d.ts","../src/plugins/debug.ts","../src/plugins/enforcelonghand.ts","../src/plugins/extend.ts","../src/plugins/prefixer.ts","../src/plugins/responsivevalue.ts","../src/plugins/sortproperty.ts","../src/plugins/unit.ts"],"version":"5.9.2"}
1
+ {"root":["../src/index.ts","../src/types.ts","../src/core/createrenderer.ts","../src/core/fallbackvalue.ts","../src/core/fallbackvalueplugin.ts","../src/core/getfallbackcss.ts","../src/core/getfallbackvariable.ts","../src/helpers/usecssvariable.ts","../src/modules/css-in-js-utils.d.ts","../src/modules/styles-debugger.d.ts","../src/plugins/debug.ts","../src/plugins/enforcelonghand.ts","../src/plugins/prefixer.ts","../src/plugins/responsivevalue.ts","../src/plugins/sortproperty.ts","../src/plugins/unit.ts"],"version":"5.9.2"}
package/dist/types.d.ts CHANGED
@@ -5,7 +5,7 @@ export type T_Fallback = {
5
5
  match?: string;
6
6
  };
7
7
  type T_VariableStyle = {
8
- [key: `--${string}`]: string | number;
8
+ [key: `--${string}`]: any;
9
9
  };
10
10
  export type T_RawStyle = CSSProperties;
11
11
  export type T_Style = T_RawStyle & T_VariableStyle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weser/styling",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
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": "09f1d19b11a34e519fd35cf91cede2b75f38356c"
60
+ "gitHead": "7b2bc4fa318330eb2031b0d1835554a8a9f0f6bd"
61
61
  }