@modern-js/plugin-tailwindcss 2.53.0 → 2.54.1
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.
@@ -41,7 +41,7 @@ const useDesignTokens = () => (0, import_react.useContext)(DesignTokenContext);
|
|
41
41
|
var plugin_default = (options = {}) => ({
|
42
42
|
name: "@modern-js/plugin-design-token",
|
43
43
|
setup: () => ({
|
44
|
-
hoc({ App }, next) {
|
44
|
+
hoc({ App, config }, next) {
|
45
45
|
const DesignTokenAppWrapper = (props) => {
|
46
46
|
const { token = {}, useStyledComponentsThemeProvider = false, useDesignTokenContext = false } = options;
|
47
47
|
if (useStyledComponentsThemeProvider && useDesignTokenContext) {
|
@@ -77,7 +77,8 @@ var plugin_default = (options = {}) => ({
|
|
77
77
|
}
|
78
78
|
};
|
79
79
|
return next({
|
80
|
-
App: (0, import_hoist_non_react_statics.default)(DesignTokenAppWrapper, App)
|
80
|
+
App: (0, import_hoist_non_react_statics.default)(DesignTokenAppWrapper, App),
|
81
|
+
config
|
81
82
|
});
|
82
83
|
}
|
83
84
|
})
|
@@ -13,7 +13,7 @@ function plugin_default() {
|
|
13
13
|
setup: function() {
|
14
14
|
return {
|
15
15
|
hoc: function hoc(param, next) {
|
16
|
-
var App = param.App;
|
16
|
+
var App = param.App, config = param.config;
|
17
17
|
var DesignTokenAppWrapper = function(props) {
|
18
18
|
var _options_token = options.token, token = _options_token === void 0 ? {} : _options_token, _options_useStyledComponentsThemeProvider = options.useStyledComponentsThemeProvider, useStyledComponentsThemeProvider = _options_useStyledComponentsThemeProvider === void 0 ? false : _options_useStyledComponentsThemeProvider, _options_useDesignTokenContext = options.useDesignTokenContext, useDesignTokenContext = _options_useDesignTokenContext === void 0 ? false : _options_useDesignTokenContext;
|
19
19
|
if (useStyledComponentsThemeProvider && useDesignTokenContext) {
|
@@ -41,7 +41,8 @@ function plugin_default() {
|
|
41
41
|
}
|
42
42
|
};
|
43
43
|
return next({
|
44
|
-
App: hoistNonReactStatics(DesignTokenAppWrapper, App)
|
44
|
+
App: hoistNonReactStatics(DesignTokenAppWrapper, App),
|
45
|
+
config
|
45
46
|
});
|
46
47
|
}
|
47
48
|
};
|
@@ -6,7 +6,7 @@ const useDesignTokens = () => useContext(DesignTokenContext);
|
|
6
6
|
var plugin_default = (options = {}) => ({
|
7
7
|
name: "@modern-js/plugin-design-token",
|
8
8
|
setup: () => ({
|
9
|
-
hoc({ App }, next) {
|
9
|
+
hoc({ App, config }, next) {
|
10
10
|
const DesignTokenAppWrapper = (props) => {
|
11
11
|
const { token = {}, useStyledComponentsThemeProvider = false, useDesignTokenContext = false } = options;
|
12
12
|
if (useStyledComponentsThemeProvider && useDesignTokenContext) {
|
@@ -42,7 +42,8 @@ var plugin_default = (options = {}) => ({
|
|
42
42
|
}
|
43
43
|
};
|
44
44
|
return next({
|
45
|
-
App: hoistNonReactStatics(DesignTokenAppWrapper, App)
|
45
|
+
App: hoistNonReactStatics(DesignTokenAppWrapper, App),
|
46
|
+
config
|
46
47
|
});
|
47
48
|
}
|
48
49
|
})
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.
|
18
|
+
"version": "2.54.1",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/index.d.ts",
|
21
21
|
"main": "./dist/cjs/index.js",
|
@@ -49,8 +49,8 @@
|
|
49
49
|
"babel-plugin-macros": "3.1.0",
|
50
50
|
"hoist-non-react-statics": "^3.3.2",
|
51
51
|
"@swc/helpers": "0.5.3",
|
52
|
-
"@modern-js/utils": "2.
|
53
|
-
"@modern-js/node-bundle-require": "2.
|
52
|
+
"@modern-js/utils": "2.54.1",
|
53
|
+
"@modern-js/node-bundle-require": "2.54.1"
|
54
54
|
},
|
55
55
|
"devDependencies": {
|
56
56
|
"@types/jest": "^29",
|
@@ -60,17 +60,17 @@
|
|
60
60
|
"jest": "^29",
|
61
61
|
"react": "^18",
|
62
62
|
"postcss": "^8.4.35",
|
63
|
-
"@modern-js/core": "2.
|
64
|
-
"@modern-js/
|
65
|
-
"@modern-js/module-tools": "2.
|
66
|
-
"@
|
67
|
-
"@
|
68
|
-
"@modern-js/app-tools": "2.
|
69
|
-
"@scripts/jest-config": "2.
|
63
|
+
"@modern-js/core": "2.54.1",
|
64
|
+
"@modern-js/runtime": "2.54.1",
|
65
|
+
"@modern-js/module-tools": "2.54.1",
|
66
|
+
"@modern-js/types": "2.54.1",
|
67
|
+
"@scripts/build": "2.54.1",
|
68
|
+
"@modern-js/app-tools": "2.54.1",
|
69
|
+
"@scripts/jest-config": "2.54.1"
|
70
70
|
},
|
71
71
|
"peerDependencies": {
|
72
72
|
"tailwindcss": ">= 2.0.0 || >= 3.0.0",
|
73
|
-
"@modern-js/runtime": "^2.
|
73
|
+
"@modern-js/runtime": "^2.54.1"
|
74
74
|
},
|
75
75
|
"peerDependenciesMeta": {
|
76
76
|
"@modern-js/runtime": {
|