@modern-js/plugin-tailwindcss 2.15.0 → 2.17.0

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,5 +1,30 @@
1
1
  # @modern-js/plugin-tailwindcss
2
2
 
3
+ ## 2.17.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [3810930]
8
+ - @modern-js/runtime@2.17.0
9
+ - @modern-js/utils@2.17.0
10
+
11
+ ## 2.16.0
12
+
13
+ ### Patch Changes
14
+
15
+ - acc0a00: fix: upgrade libuild version to support tailwind in watch mode
16
+ fix: 更新 libuild 版本以支持 tailwindcss 在 watch 模式下生效
17
+ - 4e876ab: chore: package.json include the monorepo-relative directory
18
+
19
+ chore: 在 package.json 中声明 monorepo 的子路径
20
+
21
+ - Updated dependencies [02e9c5d]
22
+ - Updated dependencies [5954330]
23
+ - Updated dependencies [7596520]
24
+ - Updated dependencies [4e876ab]
25
+ - @modern-js/runtime@2.16.0
26
+ - @modern-js/utils@2.16.0
27
+
3
28
  ## 2.15.0
4
29
 
5
30
  ### Patch Changes
package/dist/cjs/cli.js CHANGED
@@ -1,178 +1,150 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
8
6
  for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
- var cli_exports = {};
29
- __export(cli_exports, {
30
- default: () => cli_default,
31
- getRandomTwConfigFileName: () => getRandomTwConfigFileName
7
+ Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: all[name]
10
+ });
11
+ }
12
+ _export(exports, {
13
+ getRandomTwConfigFileName: () => getRandomTwConfigFileName,
14
+ default: () => _default
32
15
  });
33
- module.exports = __toCommonJS(cli_exports);
34
- var import_path = __toESM(require("path"));
35
- var import_utils = require("@modern-js/utils");
36
- var import_cli = __toESM(require("./design-token/cli"));
37
- var import_tailwind = require("./tailwind");
38
- var import_utils2 = require("./utils");
16
+ const _path = /* @__PURE__ */ _interop_require_default(require("path"));
17
+ const _utils = require("@modern-js/utils");
18
+ const _cli = /* @__PURE__ */ _interop_require_default(require("./design-token/cli"));
19
+ const _tailwind = require("./tailwind");
20
+ const _utils1 = require("./utils");
21
+ function _interop_require_default(obj) {
22
+ return obj && obj.__esModule ? obj : {
23
+ default: obj
24
+ };
25
+ }
39
26
  const supportCssInJsLibrary = "styled-components";
40
27
  const getRandomTwConfigFileName = (internalDirectory) => {
41
- return (0, import_utils.slash)(
42
- import_path.default.join(
43
- internalDirectory,
44
- `tailwind.config.${Date.now()}.${(0, import_utils.nanoid)()}.js`
45
- )
46
- );
28
+ return (0, _utils.slash)(_path.default.join(internalDirectory, `tailwind.config.${Date.now()}.${(0, _utils.nanoid)()}.js`));
47
29
  };
48
- var cli_default = ({ pluginName } = {
30
+ const _default = ({ pluginName } = {
49
31
  pluginName: "@modern-js/plugin-tailwindcss"
50
- }) => ({
51
- name: "@modern-js/plugin-tailwindcss",
52
- // support designSystem.supportStyledComponents
53
- usePlugins: [
54
- (0, import_cli.default)({
55
- pluginName
56
- })
57
- ],
58
- setup: async (api) => {
59
- const { appDirectory, internalDirectory } = api.useAppContext();
60
- let internalTwConfigPath = "";
61
- const haveTwinMacro = await (0, import_utils2.checkTwinMacroExist)(appDirectory);
62
- const tailwindPath = (0, import_utils2.getTailwindPath)(appDirectory);
63
- const tailwindVersion = (0, import_utils2.getTailwindVersion)(appDirectory);
64
- const defaultContent = [
65
- "./config/html/**/*.html",
66
- "./config/html/**/*.ejs",
67
- "./config/html/**/*.hbs",
68
- "./src/**/*.js",
69
- "./src/**/*.jsx",
70
- "./src/**/*.ts",
71
- "./src/**/*.tsx",
72
- // about storybook
73
- "./storybook/**/*"
74
- ];
75
- return {
76
- prepare() {
77
- if (haveTwinMacro) {
78
- const twinMajorVersion = (0, import_utils2.getTwinMacroMajorVersion)(appDirectory);
79
- const useConfigPath = twinMajorVersion && twinMajorVersion < 3;
80
- if (useConfigPath) {
81
- internalTwConfigPath = getRandomTwConfigFileName(internalDirectory);
82
- const globPattern = (0, import_utils.slash)(
83
- import_path.default.join(appDirectory, import_utils.CONFIG_CACHE_DIR, "*.cjs")
84
- );
85
- const files = import_utils.globby.sync(globPattern, {
86
- absolute: true
87
- });
88
- if (files.length > 0) {
89
- import_utils.fs.writeFileSync(
90
- internalTwConfigPath,
91
- (0, import_utils2.template)(files[files.length - 1]),
92
- "utf-8"
93
- );
32
+ }) => {
33
+ return {
34
+ name: "@modern-js/plugin-tailwindcss",
35
+ // support designSystem.supportStyledComponents
36
+ usePlugins: [
37
+ (0, _cli.default)({
38
+ pluginName
39
+ })
40
+ ],
41
+ setup: async (api) => {
42
+ const { appDirectory, internalDirectory } = api.useAppContext();
43
+ let internalTwConfigPath = "";
44
+ const haveTwinMacro = await (0, _utils1.checkTwinMacroExist)(appDirectory);
45
+ const tailwindPath = (0, _utils1.getTailwindPath)(appDirectory);
46
+ const tailwindVersion = (0, _utils1.getTailwindVersion)(appDirectory);
47
+ const defaultContent = [
48
+ "./config/html/**/*.html",
49
+ "./config/html/**/*.ejs",
50
+ "./config/html/**/*.hbs",
51
+ "./src/**/*.js",
52
+ "./src/**/*.jsx",
53
+ "./src/**/*.ts",
54
+ "./src/**/*.tsx",
55
+ // about storybook
56
+ "./storybook/**/*"
57
+ ];
58
+ return {
59
+ prepare() {
60
+ if (haveTwinMacro) {
61
+ const twinMajorVersion = (0, _utils1.getTwinMacroMajorVersion)(appDirectory);
62
+ const useConfigPath = twinMajorVersion && twinMajorVersion < 3;
63
+ if (useConfigPath) {
64
+ internalTwConfigPath = getRandomTwConfigFileName(internalDirectory);
65
+ const globPattern = (0, _utils.slash)(_path.default.join(appDirectory, _utils.CONFIG_CACHE_DIR, "*.cjs"));
66
+ const files = _utils.globby.sync(globPattern, {
67
+ absolute: true
68
+ });
69
+ if (files.length > 0) {
70
+ _utils.fs.writeFileSync(internalTwConfigPath, (0, _utils1.template)(files[files.length - 1]), "utf-8");
71
+ }
94
72
  }
95
73
  }
96
- }
97
- },
98
- validateSchema() {
99
- return import_utils.PLUGIN_SCHEMAS["@modern-js/plugin-tailwindcss"];
100
- },
101
- config() {
102
- let tailwindConfig;
103
- const initTailwindConfig = () => {
104
- var _a, _b;
105
- if (!tailwindConfig) {
106
- const modernConfig = api.useResolvedConfigContext();
107
- tailwindConfig = (0, import_tailwind.getTailwindConfig)(
108
- tailwindVersion,
109
- (_a = modernConfig == null ? void 0 : modernConfig.tools) == null ? void 0 : _a.tailwindcss,
110
- (_b = modernConfig == null ? void 0 : modernConfig.source) == null ? void 0 : _b.designSystem,
111
- {
74
+ },
75
+ validateSchema() {
76
+ return _utils.PLUGIN_SCHEMAS["@modern-js/plugin-tailwindcss"];
77
+ },
78
+ config() {
79
+ let tailwindConfig;
80
+ const initTailwindConfig = () => {
81
+ if (!tailwindConfig) {
82
+ var _modernConfig_tools, _modernConfig_source;
83
+ const modernConfig = api.useResolvedConfigContext();
84
+ tailwindConfig = (0, _tailwind.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, {
112
85
  pureConfig: {
113
86
  content: defaultContent
114
87
  }
115
- }
116
- );
117
- }
118
- };
119
- return {
120
- tools: {
121
- // TODO: Add interface about postcss config
122
- // TODO: In module project, also is called, but should not be called.
123
- postcss: (config) => {
124
- initTailwindConfig();
125
- const tailwindPlugin = require(tailwindPath)(tailwindConfig);
126
- if (Array.isArray(config.postcssOptions.plugins)) {
127
- config.postcssOptions.plugins.push(tailwindPlugin);
128
- } else {
129
- config.postcssOptions.plugins = [tailwindPlugin];
130
- }
131
- },
132
- babel(_, { addPlugins }) {
133
- if (haveTwinMacro) {
88
+ });
89
+ }
90
+ };
91
+ return {
92
+ tools: {
93
+ // TODO: Add interface about postcss config
94
+ // TODO: In module project, also is called, but should not be called.
95
+ postcss: (config) => {
134
96
  initTailwindConfig();
135
- addPlugins([
136
- [
137
- require.resolve("babel-plugin-macros"),
138
- {
139
- twin: {
140
- preset: supportCssInJsLibrary,
141
- config: internalTwConfigPath || tailwindConfig
97
+ const tailwindPlugin = require(tailwindPath)(tailwindConfig);
98
+ if (Array.isArray(config.postcssOptions.plugins)) {
99
+ config.postcssOptions.plugins.push(tailwindPlugin);
100
+ } else {
101
+ config.postcssOptions.plugins = [
102
+ tailwindPlugin
103
+ ];
104
+ }
105
+ },
106
+ babel(_, { addPlugins }) {
107
+ if (haveTwinMacro) {
108
+ initTailwindConfig();
109
+ addPlugins([
110
+ [
111
+ require.resolve("babel-plugin-macros"),
112
+ {
113
+ twin: {
114
+ preset: supportCssInJsLibrary,
115
+ config: internalTwConfigPath || tailwindConfig
116
+ }
142
117
  }
143
- }
144
- ]
145
- ]);
118
+ ]
119
+ ]);
120
+ }
146
121
  }
147
122
  }
148
- }
149
- };
150
- },
151
- beforeBuildTask(config) {
152
- const modernConfig = api.useResolvedConfigContext();
153
- const { designSystem } = modernConfig;
154
- const tailwindConfig = (0, import_tailwind.getTailwindConfig)(
155
- tailwindVersion,
156
- config.style.tailwindCss,
157
- designSystem,
158
- {
123
+ };
124
+ },
125
+ beforeBuildTask(config) {
126
+ const modernConfig = api.useResolvedConfigContext();
127
+ const { designSystem } = modernConfig;
128
+ const tailwindConfig = (0, _tailwind.getTailwindConfig)(tailwindVersion, config.style.tailwindCss, designSystem, {
159
129
  pureConfig: {
160
130
  content: defaultContent
161
131
  }
132
+ });
133
+ const tailwindPlugin = require(tailwindPath)(tailwindConfig);
134
+ if (Array.isArray(config.style.postcss.plugins)) {
135
+ config.style.postcss.plugins.push(tailwindPlugin);
136
+ } else {
137
+ config.style.postcss.plugins = [
138
+ tailwindPlugin
139
+ ];
162
140
  }
163
- );
164
- const tailwindPlugin = require(tailwindPath)(tailwindConfig);
165
- if (Array.isArray(config.style.postcss.plugins)) {
166
- config.style.postcss.plugins.push(tailwindPlugin);
167
- } else {
168
- config.style.postcss.plugins = [tailwindPlugin];
141
+ return config;
142
+ },
143
+ modifyLibuild(config, next) {
144
+ config.transformCache = false;
145
+ return next(config);
169
146
  }
170
- return config;
171
- }
172
- };
173
- }
174
- });
175
- // Annotate the CommonJS export names for ESM import in node:
176
- 0 && (module.exports = {
177
- getRandomTwConfigFileName
178
- });
147
+ };
148
+ }
149
+ };
150
+ };
@@ -1,116 +1,98 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var cli_exports = {};
19
- __export(cli_exports, {
20
- default: () => cli_default
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
21
4
  });
22
- module.exports = __toCommonJS(cli_exports);
23
- var import_utils = require("@modern-js/utils");
24
- var cli_default = ({ pluginName } = { pluginName: "@modern-js/plugin-tailwindcss" }) => ({
25
- name: "@modern-js/plugin-design-token",
26
- setup(api) {
27
- let pluginsExportsUtils;
28
- const resolveConfig = (0, import_utils.lazyImport)("tailwindcss/resolveConfig", require);
29
- const PLUGIN_IDENTIFIER = "designToken";
30
- const getDesignTokens = (designSystem) => {
31
- const tailwindcssConfig = {};
32
- tailwindcssConfig.theme = designSystem ? { ...designSystem } : {};
33
- if (!designSystem) {
34
- tailwindcssConfig.presets = [];
35
- }
36
- if (designSystem) {
37
- delete tailwindcssConfig.theme.supportStyledComponents;
38
- }
39
- return resolveConfig(tailwindcssConfig).theme || {};
40
- };
41
- return {
42
- config() {
43
- const appContext = api.useAppContext();
44
- pluginsExportsUtils = (0, import_utils.createRuntimeExportsUtils)(
45
- appContext.internalDirectory,
46
- "plugins"
47
- );
48
- return {
49
- source: {
50
- alias: {
51
- "@modern-js/runtime/plugins": pluginsExportsUtils.getPath()
52
- }
53
- },
54
- tools: {
55
- // TODO: support less、scss、css vars
56
- // less: https://github.com/web-infra-dev/modern.js/pull/398/files#diff-f77c749e403fbf1fb676d5687bef3d7138a230331c849298d8afaff9b6afbc3dR166
57
- // sass: https://github.com/web-infra-dev/modern.js/pull/398/files#diff-f77c749e403fbf1fb676d5687bef3d7138a230331c849298d8afaff9b6afbc3dR229
58
- // postcss: https://github.com/web-infra-dev/modern.js/pull/398/files#diff-f77c749e403fbf1fb676d5687bef3d7138a230331c849298d8afaff9b6afbc3dR281
59
- }
60
- };
61
- },
62
- modifyEntryImports({ entrypoint, imports }) {
63
- var _a, _b;
64
- const userConfig = api.useResolvedConfigContext();
65
- const designSystem = (_b = (_a = userConfig.source) == null ? void 0 : _a.designSystem) != null ? _b : {};
66
- if (typeof designSystem === "object" && designSystem.supportStyledComponents) {
67
- const designTokens = getDesignTokens(userConfig.source.designSystem);
68
- imports.push({
69
- value: "@modern-js/runtime/plugins",
70
- specifiers: [
71
- {
72
- imported: PLUGIN_IDENTIFIER
73
- }
74
- ],
75
- initialize: `
76
- const designTokens = ${JSON.stringify(designTokens)};
77
- `
78
- });
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: () => _default
8
+ });
9
+ const _utils = require("@modern-js/utils");
10
+ const _default = ({ pluginName } = {
11
+ pluginName: "@modern-js/plugin-tailwindcss"
12
+ }) => {
13
+ return {
14
+ name: "@modern-js/plugin-design-token",
15
+ setup(api) {
16
+ let pluginsExportsUtils;
17
+ const resolveConfig = (0, _utils.lazyImport)("tailwindcss/resolveConfig", require);
18
+ const PLUGIN_IDENTIFIER = "designToken";
19
+ const getDesignTokens = (designSystem) => {
20
+ const tailwindcssConfig = {};
21
+ tailwindcssConfig.theme = designSystem ? {
22
+ ...designSystem
23
+ } : {};
24
+ if (!designSystem) {
25
+ tailwindcssConfig.presets = [];
79
26
  }
80
- return {
81
- entrypoint,
82
- imports
83
- };
84
- },
85
- modifyEntryRuntimePlugins({ entrypoint, plugins }) {
86
- var _a, _b;
87
- const userConfig = api.useResolvedConfigContext();
88
- const designSystem = (_b = (_a = userConfig.source) == null ? void 0 : _a.designSystem) != null ? _b : {};
89
- let useSCThemeProvider = true;
90
27
  if (designSystem) {
91
- useSCThemeProvider = (designSystem == null ? void 0 : designSystem.supportStyledComponents) || false;
28
+ delete tailwindcssConfig.theme.supportStyledComponents;
92
29
  }
93
- if (typeof designSystem === "object" && designSystem.supportStyledComponents) {
94
- plugins.push({
95
- name: PLUGIN_IDENTIFIER,
96
- options: `{token: designTokens, useStyledComponentsThemeProvider: ${useSCThemeProvider ? "true" : "false"}, useDesignTokenContext: false}`
97
- });
30
+ return resolveConfig(tailwindcssConfig).theme || {};
31
+ };
32
+ return {
33
+ config() {
34
+ const appContext = api.useAppContext();
35
+ pluginsExportsUtils = (0, _utils.createRuntimeExportsUtils)(appContext.internalDirectory, "plugins");
36
+ return {
37
+ source: {
38
+ alias: {
39
+ "@modern-js/runtime/plugins": pluginsExportsUtils.getPath()
40
+ }
41
+ },
42
+ tools: {}
43
+ };
44
+ },
45
+ modifyEntryImports({ entrypoint, imports }) {
46
+ var _userConfig_source;
47
+ const userConfig = api.useResolvedConfigContext();
48
+ var _userConfig_source_designSystem;
49
+ const 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 : {};
50
+ if (typeof designSystem === "object" && designSystem.supportStyledComponents) {
51
+ const designTokens = getDesignTokens(userConfig.source.designSystem);
52
+ imports.push({
53
+ value: "@modern-js/runtime/plugins",
54
+ specifiers: [
55
+ {
56
+ imported: PLUGIN_IDENTIFIER
57
+ }
58
+ ],
59
+ initialize: `
60
+ const designTokens = ${JSON.stringify(designTokens)};
61
+ `
62
+ });
63
+ }
64
+ return {
65
+ entrypoint,
66
+ imports
67
+ };
68
+ },
69
+ modifyEntryRuntimePlugins({ entrypoint, plugins }) {
70
+ var _userConfig_source;
71
+ const userConfig = api.useResolvedConfigContext();
72
+ var _userConfig_source_designSystem;
73
+ const 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 : {};
74
+ let useSCThemeProvider = true;
75
+ if (designSystem) {
76
+ useSCThemeProvider = (designSystem === null || designSystem === void 0 ? void 0 : designSystem.supportStyledComponents) || false;
77
+ }
78
+ if (typeof designSystem === "object" && designSystem.supportStyledComponents) {
79
+ plugins.push({
80
+ name: PLUGIN_IDENTIFIER,
81
+ options: `{token: designTokens, useStyledComponentsThemeProvider: ${useSCThemeProvider ? "true" : "false"}, useDesignTokenContext: false}`
82
+ });
83
+ }
84
+ return {
85
+ entrypoint,
86
+ plugins
87
+ };
88
+ },
89
+ validateSchema() {
90
+ return _utils.PLUGIN_SCHEMAS["@modern-js/plugin-design-token"];
91
+ },
92
+ addRuntimeExports() {
93
+ pluginsExportsUtils.addExport(`export { default as designToken } from '${pluginName}/runtime-design-token'`);
98
94
  }
99
- return {
100
- entrypoint,
101
- plugins
102
- };
103
- },
104
- validateSchema() {
105
- return import_utils.PLUGIN_SCHEMAS["@modern-js/plugin-design-token"];
106
- },
107
- addRuntimeExports() {
108
- pluginsExportsUtils.addExport(
109
- `export { default as designToken } from '${pluginName}/runtime-design-token'`
110
- );
111
- }
112
- };
113
- }
114
- });
115
- // Annotate the CommonJS export names for ESM import in node:
116
- 0 && (module.exports = {});
95
+ };
96
+ }
97
+ };
98
+ };
@@ -1,37 +1,27 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var design_token_exports = {};
30
- __export(design_token_exports, {
31
- default: () => import_runtime.default
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
32
4
  });
33
- module.exports = __toCommonJS(design_token_exports);
34
- var import_runtime = __toESM(require("./runtime"));
35
- __reExport(design_token_exports, require("./runtime"), module.exports);
36
- // Annotate the CommonJS export names for ESM import in node:
37
- 0 && (module.exports = {});
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: () => _runtime.default
8
+ });
9
+ const _runtime = /* @__PURE__ */ _interop_require_default(_export_star(require("./runtime"), exports));
10
+ function _export_star(from, to) {
11
+ Object.keys(from).forEach(function(k) {
12
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
13
+ Object.defineProperty(to, k, {
14
+ enumerable: true,
15
+ get: function() {
16
+ return from[k];
17
+ }
18
+ });
19
+ }
20
+ });
21
+ return from;
22
+ }
23
+ function _interop_require_default(obj) {
24
+ return obj && obj.__esModule ? obj : {
25
+ default: obj
26
+ };
27
+ }
@@ -1,28 +1,12 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var postcss_plugin_exports = {};
19
- __export(postcss_plugin_exports, {
20
- default: () => postcss_plugin_default
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: () => _default
21
8
  });
22
- module.exports = __toCommonJS(postcss_plugin_exports);
23
- var postcss_plugin_default = ({
24
- cssVarsHash = {}
25
- } = {}) => ({
9
+ const _default = ({ cssVarsHash = {} } = {}) => ({
26
10
  postcssPlugin: "postcss-replace-css-vars",
27
11
  Declaration(decl) {
28
12
  if (decl.value && typeof decl.value === "string") {
@@ -35,5 +19,3 @@ var postcss_plugin_default = ({
35
19
  }
36
20
  }
37
21
  });
38
- // Annotate the CommonJS export names for ESM import in node:
39
- 0 && (module.exports = {});