@trackunit/css-tailwind-custom-properties-plugin 0.0.71-alpha-2936c016d71.0 → 0.0.72
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/index.cjs.js +2 -8
- package/index.esm.js +1 -1
- package/package.json +5 -4
- package/src/plugin.d.ts +1 -1
package/index.cjs.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var plugin = require('tailwindcss/plugin');
|
|
6
4
|
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var plugin__default = /*#__PURE__*/_interopDefaultLegacy(plugin);
|
|
10
|
-
|
|
11
5
|
/**
|
|
12
6
|
* Converts an array of keys to a valid CSS custom property name.
|
|
13
7
|
*
|
|
@@ -34,7 +28,7 @@ const flattenVariablesDeclerationValues = (values, output = {}, keys = []) => {
|
|
|
34
28
|
else {
|
|
35
29
|
flattend[keysToCssVariableName([...keys, key])] = value;
|
|
36
30
|
}
|
|
37
|
-
output =
|
|
31
|
+
output = { ...flattend, ...output };
|
|
38
32
|
}
|
|
39
33
|
return output;
|
|
40
34
|
};
|
|
@@ -54,7 +48,7 @@ const variablesToCSSRules = (variablesDecleration) => {
|
|
|
54
48
|
return cssRules;
|
|
55
49
|
};
|
|
56
50
|
|
|
57
|
-
const CssTailwindCustomPropertiesPlugin =
|
|
51
|
+
const CssTailwindCustomPropertiesPlugin = plugin(({ addBase, addVariant, theme }) => {
|
|
58
52
|
const variablesDeclerationFromThemeConfig = theme("variables", {});
|
|
59
53
|
const cssRules = variablesToCSSRules(variablesDeclerationFromThemeConfig);
|
|
60
54
|
addBase(cssRules);
|
package/index.esm.js
CHANGED
|
@@ -26,7 +26,7 @@ const flattenVariablesDeclerationValues = (values, output = {}, keys = []) => {
|
|
|
26
26
|
else {
|
|
27
27
|
flattend[keysToCssVariableName([...keys, key])] = value;
|
|
28
28
|
}
|
|
29
|
-
output =
|
|
29
|
+
output = { ...flattend, ...output };
|
|
30
30
|
}
|
|
31
31
|
return output;
|
|
32
32
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/css-tailwind-custom-properties-plugin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.72",
|
|
4
4
|
"main": "./index.cjs.js",
|
|
5
5
|
"repository": "https://github.com/Trackunit/manager",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"jest-fetch-mock": "^3.0.3",
|
|
12
|
-
"tailwindcss": "3.4.
|
|
12
|
+
"tailwindcss": "3.4.3"
|
|
13
13
|
},
|
|
14
|
-
"module": "./index.esm.js"
|
|
15
|
-
|
|
14
|
+
"module": "./index.esm.js",
|
|
15
|
+
"types": "./index.esm.d.ts"
|
|
16
|
+
}
|
package/src/plugin.d.ts
CHANGED