effcss 3.0.1 → 3.0.2

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/README.md CHANGED
@@ -38,6 +38,8 @@ EffCSS is a self-confident CSS-in-JS library based only on the browser APIs. Use
38
38
  - [React SSR](https://stackblitz.com/edit/effcss-3-react-ssr-vitejs?file=index.html)
39
39
  - [Svelte](https://stackblitz.com/edit/effcss-3-svelte-vitejs?file=index.html)
40
40
  - [Svelte SSR](https://stackblitz.com/edit/effcss-3-svelte-ssr-vitejs?file=index.html)
41
+ - [Vue](https://stackblitz.com/edit/effcss-3-vue-vitejs?file=index.html)
42
+ - [Vue SSR](https://stackblitz.com/edit/effcss-3-vue-ssr-vitejs?file=index.html)
41
43
 
42
44
  ## V2 examples
43
45
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * EffCSS v3.0.1
2
+ * EffCSS v3.0.2
3
3
  * {@link https://gitverse.ru/msabitov/effcss}
4
4
  * Copyright (c) Marat Sabitov
5
5
  * @license Apache 2.0
package/dist/consumer.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * EffCSS v3.0.1
2
+ * EffCSS v3.0.2
3
3
  * {@link https://gitverse.ru/msabitov/effcss}
4
4
  * Copyright (c) Marat Sabitov
5
5
  * @license Apache 2.0
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * EffCSS v3.0.1
2
+ * EffCSS v3.0.2
3
3
  * {@link https://gitverse.ru/msabitov/effcss}
4
4
  * Copyright (c) Marat Sabitov
5
5
  * @license Apache 2.0
@@ -5,7 +5,7 @@ export declare const getBaseHandlers: () => {
5
5
  comma: TJoinArr;
6
6
  space: TJoinArr;
7
7
  range: (size: number, handler: (k: number) => object) => object;
8
- each: <V extends Record<string | number, any>>(rules: V, handler: (k: V extends ArrayLike<any> ? string : keyof V, v: V extends ArrayLike<any> ? NoInfer<V[number]> : NoInfer<V[keyof V]>) => object) => object;
8
+ each: <V extends Record<TStrOrNum, any>>(rules: V, handler: (k: V extends ArrayLike<any> ? string : keyof V, v: V extends ArrayLike<any> ? NoInfer<V[number]> : NoInfer<V[keyof V]>) => object) => object;
9
9
  merge: (target: Record<string, any>, ...sources: Record<string, any>[]) => Record<string, any>;
10
10
  when: (condition: boolean | undefined, rules: object, otherwise?: object) => object;
11
11
  };
@@ -61,6 +61,7 @@ type TStringBEM<T> = TBlocks<T> | TMods<T> | TElems<T>;
61
61
  type TBEM<T> = TDeepPartial<T> | TStringBEM<T> | TStringBEM<T>[];
62
62
  type TResolveSelector = <T extends object>(params: TBEM<T>) => string;
63
63
  type TResolveAttr = <T extends object>(params: TBEM<T>) => TStrDict;
64
+ type TParts = (string | number)[];
64
65
  type TScope = {
65
66
  /**
66
67
  * BEM selector resolver
@@ -73,15 +74,15 @@ type TScope = {
73
74
  /**
74
75
  * Name resolver
75
76
  */
76
- name: (...parts: (string | number)[] | string[]) => string;
77
+ name: (...parts: TParts) => string;
77
78
  /**
78
79
  * Var name
79
80
  */
80
- varName: (...parts: (string | number)[] | string[]) => string;
81
+ varName: (...parts: TParts) => string;
81
82
  /**
82
83
  * Var expression
83
84
  */
84
- varExp: (...parts: (string | number)[]) => string;
85
+ varExp: (...parts: TParts) => string;
85
86
  };
86
87
  /**
87
88
  * Style scope resolver
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "effcss",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "Self-confident CSS-in-JS",
5
5
  "type": "module",
6
6
  "scripts": {