@trackunit/css-tailwind-custom-properties-plugin 0.0.32 → 0.0.33
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 +4 -54
- package/index.esm.js +1 -55
- package/package.json +5 -1
package/index.cjs.js
CHANGED
|
@@ -2,61 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var plugin = require('tailwindcss/plugin');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports, "__esModule", {
|
|
11
|
-
value: true
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "default", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: ()=>_default
|
|
16
|
-
});
|
|
17
|
-
function createPlugin(plugin, config) {
|
|
18
|
-
return {
|
|
19
|
-
handler: plugin,
|
|
20
|
-
config
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
createPlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {
|
|
24
|
-
const optionsFunction = function(options) {
|
|
25
|
-
return {
|
|
26
|
-
__options: options,
|
|
27
|
-
handler: pluginFunction(options),
|
|
28
|
-
config: configFunction(options)
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
optionsFunction.__isOptionsFunction = true;
|
|
32
|
-
// Expose plugin dependencies so that `object-hash` returns a different
|
|
33
|
-
// value if anything here changes, to ensure a rebuild is triggered.
|
|
34
|
-
optionsFunction.__pluginFunction = pluginFunction;
|
|
35
|
-
optionsFunction.__configFunction = configFunction;
|
|
36
|
-
return optionsFunction;
|
|
37
|
-
};
|
|
38
|
-
const _default = createPlugin;
|
|
39
|
-
}(createPlugin$1));
|
|
40
|
-
|
|
41
|
-
(function (exports) {
|
|
42
|
-
Object.defineProperty(exports, "__esModule", {
|
|
43
|
-
value: true
|
|
44
|
-
});
|
|
45
|
-
Object.defineProperty(exports, "default", {
|
|
46
|
-
enumerable: true,
|
|
47
|
-
get: ()=>_default
|
|
48
|
-
});
|
|
49
|
-
const _createPlugin = /*#__PURE__*/ _interopRequireDefault(createPlugin$1);
|
|
50
|
-
function _interopRequireDefault(obj) {
|
|
51
|
-
return obj && obj.__esModule ? obj : {
|
|
52
|
-
default: obj
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
const _default = _createPlugin.default;
|
|
56
|
-
}(createPlugin$2));
|
|
57
|
-
|
|
58
|
-
let createPlugin = createPlugin$2;
|
|
59
|
-
var plugin = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
|
|
9
|
+
var plugin__default = /*#__PURE__*/_interopDefaultLegacy(plugin);
|
|
60
10
|
|
|
61
11
|
/**
|
|
62
12
|
* Converts an array of keys to a valid CSS custom property name.
|
|
@@ -104,7 +54,7 @@ const variablesToCSSRules = (variablesDecleration) => {
|
|
|
104
54
|
return cssRules;
|
|
105
55
|
};
|
|
106
56
|
|
|
107
|
-
const CssTailwindCustomPropertiesPlugin =
|
|
57
|
+
const CssTailwindCustomPropertiesPlugin = plugin__default["default"](({ addBase, theme }) => {
|
|
108
58
|
const variablesDeclerationFromThemeConfig = theme("variables", {});
|
|
109
59
|
const cssRules = variablesToCSSRules(variablesDeclerationFromThemeConfig);
|
|
110
60
|
addBase(cssRules);
|
package/index.esm.js
CHANGED
|
@@ -1,58 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var createPlugin$1 = {};
|
|
4
|
-
|
|
5
|
-
(function (exports) {
|
|
6
|
-
Object.defineProperty(exports, "__esModule", {
|
|
7
|
-
value: true
|
|
8
|
-
});
|
|
9
|
-
Object.defineProperty(exports, "default", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: ()=>_default
|
|
12
|
-
});
|
|
13
|
-
function createPlugin(plugin, config) {
|
|
14
|
-
return {
|
|
15
|
-
handler: plugin,
|
|
16
|
-
config
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
createPlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {
|
|
20
|
-
const optionsFunction = function(options) {
|
|
21
|
-
return {
|
|
22
|
-
__options: options,
|
|
23
|
-
handler: pluginFunction(options),
|
|
24
|
-
config: configFunction(options)
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
optionsFunction.__isOptionsFunction = true;
|
|
28
|
-
// Expose plugin dependencies so that `object-hash` returns a different
|
|
29
|
-
// value if anything here changes, to ensure a rebuild is triggered.
|
|
30
|
-
optionsFunction.__pluginFunction = pluginFunction;
|
|
31
|
-
optionsFunction.__configFunction = configFunction;
|
|
32
|
-
return optionsFunction;
|
|
33
|
-
};
|
|
34
|
-
const _default = createPlugin;
|
|
35
|
-
}(createPlugin$1));
|
|
36
|
-
|
|
37
|
-
(function (exports) {
|
|
38
|
-
Object.defineProperty(exports, "__esModule", {
|
|
39
|
-
value: true
|
|
40
|
-
});
|
|
41
|
-
Object.defineProperty(exports, "default", {
|
|
42
|
-
enumerable: true,
|
|
43
|
-
get: ()=>_default
|
|
44
|
-
});
|
|
45
|
-
const _createPlugin = /*#__PURE__*/ _interopRequireDefault(createPlugin$1);
|
|
46
|
-
function _interopRequireDefault(obj) {
|
|
47
|
-
return obj && obj.__esModule ? obj : {
|
|
48
|
-
default: obj
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
const _default = _createPlugin.default;
|
|
52
|
-
}(createPlugin$2));
|
|
53
|
-
|
|
54
|
-
let createPlugin = createPlugin$2;
|
|
55
|
-
var plugin = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
|
|
1
|
+
import plugin from 'tailwindcss/plugin';
|
|
56
2
|
|
|
57
3
|
/**
|
|
58
4
|
* Converts an array of keys to a valid CSS custom property name.
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/css-tailwind-custom-properties-plugin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"main": "./index.cjs.js",
|
|
5
5
|
"repository": "https://github.com/Trackunit/manager",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=18.x"
|
|
9
9
|
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"jest-fetch-mock": "^3.0.3",
|
|
12
|
+
"tailwindcss": "3.2.4"
|
|
13
|
+
},
|
|
10
14
|
"module": "./index.esm.js"
|
|
11
15
|
}
|