@modern-js/plugin-tailwindcss 0.0.0-next-20230206032306 → 0.0.0-next-20230206051444

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/CHANGELOG.md CHANGED
@@ -1,18 +1,18 @@
1
1
  # @modern-js/plugin-tailwindcss
2
2
 
3
- ## 0.0.0-next-20230206032306
3
+ ## 0.0.0-next-20230206051444
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - 98a2733acc: fix(tailwind): fix webpack cache not work when using twin.macro
7
+ - 98a2733ac: fix(tailwind): fix webpack cache not work when using twin.macro
8
8
 
9
9
  fix(tailwind): 修复使用 twin.macro 时 webpack 缓存不生效的问题
10
10
 
11
- - Updated dependencies [98a2733acc]
12
- - Updated dependencies [9e907ec3d5]
13
- - Updated dependencies [8c2db5f827]
14
- - @modern-js/utils@0.0.0-next-20230206032306
15
- - @modern-js/runtime@0.0.0-next-20230206032306
11
+ - Updated dependencies [98a2733ac]
12
+ - Updated dependencies [9e907ec3d]
13
+ - Updated dependencies [8c2db5f82]
14
+ - @modern-js/utils@0.0.0-next-20230206051444
15
+ - @modern-js/runtime@0.0.0-next-20230206051444
16
16
 
17
17
  ## 2.3.0
18
18
 
@@ -144,11 +144,11 @@ var cli_default = function() {
144
144
  ],
145
145
  setup: function() {
146
146
  var _ref = _asyncToGenerator(function(api) {
147
- var ref, appDirectory, internalDirectory, internalTwConfigPath, haveTwinMacro, tailwindPath, tailwindVersion, defaultContent;
147
+ var _api_useAppContext, appDirectory, internalDirectory, internalTwConfigPath, haveTwinMacro, tailwindPath, tailwindVersion, defaultContent;
148
148
  return __generator(this, function(_state) {
149
149
  switch(_state.label){
150
150
  case 0:
151
- ref = api.useAppContext(), appDirectory = ref.appDirectory, internalDirectory = ref.internalDirectory;
151
+ _api_useAppContext = api.useAppContext(), appDirectory = _api_useAppContext.appDirectory, internalDirectory = _api_useAppContext.internalDirectory;
152
152
  internalTwConfigPath = "";
153
153
  return [
154
154
  4,
@@ -194,9 +194,9 @@ var cli_default = function() {
194
194
  var tailwindConfig;
195
195
  var initTailwindConfig = function() {
196
196
  if (!tailwindConfig) {
197
- var ref, ref1;
197
+ var _modernConfig_tools, _modernConfig_source;
198
198
  var modernConfig = api.useResolvedConfigContext();
199
- tailwindConfig = getTailwindConfig(tailwindVersion, modernConfig === null || modernConfig === void 0 ? void 0 : (ref = modernConfig.tools) === null || ref === void 0 ? void 0 : ref.tailwindcss, modernConfig === null || modernConfig === void 0 ? void 0 : (ref1 = modernConfig.source) === null || ref1 === void 0 ? void 0 : ref1.designSystem, {
199
+ tailwindConfig = getTailwindConfig(tailwindVersion, modernConfig === null || modernConfig === void 0 ? void 0 : (_modernConfig_tools = modernConfig.tools) === null || _modernConfig_tools === void 0 ? void 0 : _modernConfig_tools.tailwindcss, modernConfig === null || modernConfig === void 0 ? void 0 : (_modernConfig_source = modernConfig.source) === null || _modernConfig_source === void 0 ? void 0 : _modernConfig_source.designSystem, {
200
200
  pureConfig: {
201
201
  content: defaultContent
202
202
  }
@@ -63,10 +63,10 @@ var cli_default = function() {
63
63
  },
64
64
  modifyEntryImports: function modifyEntryImports(param) {
65
65
  var entrypoint = param.entrypoint, imports = param.imports;
66
- var ref;
66
+ var _userConfig_source;
67
67
  var userConfig = api.useResolvedConfigContext();
68
- var ref1;
69
- var designSystem = (ref1 = (ref = userConfig.source) === null || ref === void 0 ? void 0 : ref.designSystem) !== null && ref1 !== void 0 ? ref1 : {};
68
+ var _userConfig_source_designSystem;
69
+ var designSystem = (_userConfig_source_designSystem = (_userConfig_source = userConfig.source) === null || _userConfig_source === void 0 ? void 0 : _userConfig_source.designSystem) !== null && _userConfig_source_designSystem !== void 0 ? _userConfig_source_designSystem : {};
70
70
  if (typeof designSystem === "object" && designSystem.supportStyledComponents) {
71
71
  var designTokens = getDesignTokens(userConfig.source.designSystem);
72
72
  imports.push({
@@ -86,10 +86,10 @@ var cli_default = function() {
86
86
  },
87
87
  modifyEntryRuntimePlugins: function modifyEntryRuntimePlugins(param) {
88
88
  var entrypoint = param.entrypoint, plugins = param.plugins;
89
- var ref;
89
+ var _userConfig_source;
90
90
  var userConfig = api.useResolvedConfigContext();
91
- var ref1;
92
- var designSystem = (ref1 = (ref = userConfig.source) === null || ref === void 0 ? void 0 : ref.designSystem) !== null && ref1 !== void 0 ? ref1 : {};
91
+ var _userConfig_source_designSystem;
92
+ var designSystem = (_userConfig_source_designSystem = (_userConfig_source = userConfig.source) === null || _userConfig_source === void 0 ? void 0 : _userConfig_source.designSystem) !== null && _userConfig_source_designSystem !== void 0 ? _userConfig_source_designSystem : {};
93
93
  var useSCThemeProvider = true;
94
94
  if (designSystem) {
95
95
  useSCThemeProvider = (designSystem === null || designSystem === void 0 ? void 0 : designSystem.supportStyledComponents) || false;
@@ -1,5 +1,5 @@
1
1
  var postcss_plugin_default = function() {
2
- var ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _cssVarsHash = ref.cssVarsHash, cssVarsHash = _cssVarsHash === void 0 ? {} : _cssVarsHash;
2
+ var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref_cssVarsHash = _ref.cssVarsHash, cssVarsHash = _ref_cssVarsHash === void 0 ? {} : _ref_cssVarsHash;
3
3
  return {
4
4
  postcssPlugin: "postcss-replace-css-vars",
5
5
  Declaration: function Declaration(decl) {
@@ -42,7 +42,7 @@ var plugin_default = function() {
42
42
  hoc: function hoc(param, next) {
43
43
  var App = param.App;
44
44
  var DesignTokenAppWrapper = function(props) {
45
- var _token = options.token, token = _token === void 0 ? {} : _token, _useStyledComponentsThemeProvider = options.useStyledComponentsThemeProvider, useStyledComponentsThemeProvider = _useStyledComponentsThemeProvider === void 0 ? false : _useStyledComponentsThemeProvider, _useDesignTokenContext = options.useDesignTokenContext, useDesignTokenContext = _useDesignTokenContext === void 0 ? false : _useDesignTokenContext;
45
+ 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;
46
46
  if (useStyledComponentsThemeProvider && useDesignTokenContext) {
47
47
  var ThemeProvider = require("@modern-js/runtime/styled").ThemeProvider;
48
48
  return /* @__PURE__ */ jsx(ThemeProvider, {
@@ -80,7 +80,7 @@ var getTailwindConfig = function(tailwindVersion, tailwindcss, designSystem) {
80
80
  };
81
81
  var tailwindConfig = applyOptionsChain(defaultTailwindConfig, tailwindcss || {});
82
82
  var designSystemConfig = getPureDesignSystemConfig(designSystem !== null && designSystem !== void 0 ? designSystem : {});
83
- var ref = _slicedToArray(checkIfExistNotAllowKeys(tailwindConfig), 2), exist = ref[0], key = ref[1];
83
+ var _checkIfExistNotAllowKeys = _slicedToArray(checkIfExistNotAllowKeys(tailwindConfig), 2), exist = _checkIfExistNotAllowKeys[0], key = _checkIfExistNotAllowKeys[1];
84
84
  if (exist) {
85
85
  logger.error("should not exist '".concat(key, "' on tools.tailwindcss, please remove it"));
86
86
  process.exit(0);
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "0.0.0-next-20230206032306",
14
+ "version": "0.0.0-next-20230206051444",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -46,7 +46,7 @@
46
46
  "@babel/runtime": "^7.18.0",
47
47
  "babel-plugin-macros": "3.1.0",
48
48
  "hoist-non-react-statics": "^3.3.2",
49
- "@modern-js/utils": "0.0.0-next-20230206032306"
49
+ "@modern-js/utils": "0.0.0-next-20230206051444"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/jest": "^27",
@@ -56,17 +56,17 @@
56
56
  "jest": "^27",
57
57
  "react": "^18",
58
58
  "postcss": "8.4.21",
59
- "@modern-js/core": "0.0.0-next-20230206032306",
60
- "@modern-js/module-tools": "0.0.0-next-20230206032306",
61
- "@modern-js/runtime": "0.0.0-next-20230206032306",
62
- "@modern-js/types": "0.0.0-next-20230206032306",
63
- "@scripts/build": "0.0.0-next-20230206032306",
64
- "@modern-js/app-tools": "0.0.0-next-20230206032306",
65
- "@scripts/jest-config": "0.0.0-next-20230206032306"
59
+ "@modern-js/core": "0.0.0-next-20230206051444",
60
+ "@modern-js/module-tools": "0.0.0-next-20230206051444",
61
+ "@modern-js/runtime": "0.0.0-next-20230206051444",
62
+ "@modern-js/types": "0.0.0-next-20230206051444",
63
+ "@scripts/build": "0.0.0-next-20230206051444",
64
+ "@modern-js/app-tools": "0.0.0-next-20230206051444",
65
+ "@scripts/jest-config": "0.0.0-next-20230206051444"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "tailwindcss": ">= 2.0.0 || >= 3.0.0",
69
- "@modern-js/runtime": "^0.0.0-next-20230206032306"
69
+ "@modern-js/runtime": "0.0.0-next-20230206051444"
70
70
  },
71
71
  "peerDependenciesMeta": {
72
72
  "@modern-js/runtime": {