tailwindcss 0.0.0-insiders.b17b60e → 0.0.0-insiders.b1966b4

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.
Files changed (84) hide show
  1. package/lib/cli/build/index.js +7 -3
  2. package/lib/cli/build/plugin.js +28 -19
  3. package/lib/cli/build/watching.js +4 -2
  4. package/lib/cli/index.js +12 -21
  5. package/lib/cli/init/index.js +21 -6
  6. package/lib/corePluginList.js +4 -0
  7. package/lib/corePlugins.js +112 -25
  8. package/lib/css/preflight.css +2 -0
  9. package/lib/featureFlags.js +8 -1
  10. package/lib/lib/expandApplyAtRules.js +2 -1
  11. package/lib/lib/expandTailwindAtRules.js +1 -2
  12. package/lib/lib/generateRules.js +20 -16
  13. package/lib/lib/getModuleDependencies.js +79 -33
  14. package/lib/lib/load-config.js +40 -0
  15. package/lib/lib/setupContextUtils.js +10 -2
  16. package/lib/lib/setupTrackingContext.js +4 -4
  17. package/lib/oxide/cli/build/index.js +7 -3
  18. package/lib/oxide/cli/build/plugin.js +27 -18
  19. package/lib/oxide/cli/build/watching.js +1 -1
  20. package/lib/oxide/cli/index.js +10 -16
  21. package/lib/oxide/cli/init/index.js +19 -4
  22. package/lib/public/colors.js +44 -22
  23. package/lib/public/default-config.js +2 -2
  24. package/lib/public/default-theme.js +2 -2
  25. package/lib/public/load-config.js +10 -0
  26. package/lib/util/applyImportantSelector.js +22 -0
  27. package/lib/util/formatVariantSelector.js +2 -12
  28. package/lib/util/getAllConfigs.js +2 -2
  29. package/lib/util/normalizeConfig.js +16 -3
  30. package/lib/util/pluginUtils.js +5 -24
  31. package/lib/util/resolveConfigPath.js +19 -7
  32. package/lib/util/splitAtTopLevelOnly.js +7 -1
  33. package/loadConfig.d.ts +4 -0
  34. package/loadConfig.js +2 -0
  35. package/package.json +5 -6
  36. package/src/cli/build/index.js +7 -7
  37. package/src/cli/build/plugin.js +28 -23
  38. package/src/cli/build/watching.js +4 -2
  39. package/src/cli/index.js +8 -26
  40. package/src/cli/init/index.js +37 -8
  41. package/src/corePluginList.js +1 -1
  42. package/src/corePlugins.js +109 -26
  43. package/src/css/preflight.css +2 -0
  44. package/src/featureFlags.js +7 -0
  45. package/src/lib/expandApplyAtRules.js +2 -1
  46. package/src/lib/expandTailwindAtRules.js +1 -3
  47. package/src/lib/generateRules.js +35 -15
  48. package/src/lib/getModuleDependencies.js +70 -30
  49. package/src/lib/load-config.ts +31 -0
  50. package/src/lib/setupContextUtils.js +9 -2
  51. package/src/lib/setupTrackingContext.js +4 -4
  52. package/src/oxide/cli/build/index.ts +7 -7
  53. package/src/oxide/cli/build/plugin.ts +28 -22
  54. package/src/oxide/cli/build/watching.ts +1 -1
  55. package/src/oxide/cli/index.ts +7 -15
  56. package/src/oxide/cli/init/index.ts +34 -7
  57. package/src/public/colors.js +22 -0
  58. package/src/public/default-config.js +1 -1
  59. package/src/public/default-theme.js +2 -2
  60. package/src/public/load-config.js +2 -0
  61. package/src/util/applyImportantSelector.js +19 -0
  62. package/src/util/formatVariantSelector.js +1 -1
  63. package/src/util/getAllConfigs.js +2 -2
  64. package/src/util/normalizeConfig.js +19 -1
  65. package/src/util/pluginUtils.js +10 -29
  66. package/src/util/resolveConfigPath.js +12 -1
  67. package/src/util/splitAtTopLevelOnly.js +8 -1
  68. package/stubs/.gitignore +1 -0
  69. package/stubs/.prettierrc.json +6 -0
  70. package/stubs/{defaultConfig.stub.js → config.full.js} +36 -3
  71. package/stubs/{simpleConfig.stub.js → config.simple.js} +0 -1
  72. package/stubs/postcss.config.js +6 -0
  73. package/stubs/tailwind.config.cjs +2 -0
  74. package/stubs/tailwind.config.js +2 -0
  75. package/stubs/tailwind.config.ts +3 -0
  76. package/types/config.d.ts +7 -1
  77. package/types/generated/colors.d.ts +22 -0
  78. package/types/generated/corePluginList.d.ts +1 -1
  79. package/types/generated/default-theme.d.ts +26 -0
  80. package/lib/constants.js +0 -44
  81. package/oxide-node-api-shim/index.js +0 -21
  82. package/oxide-node-api-shim/package.json +0 -5
  83. package/src/constants.js +0 -17
  84. /package/stubs/{defaultPostCssConfig.stub.js → postcss.config.cjs} +0 -0
@@ -9,13 +9,14 @@ Object.defineProperty(exports, "build", {
9
9
  });
10
10
  const _fs = /*#__PURE__*/ _interopRequireDefault(require("fs"));
11
11
  const _path = /*#__PURE__*/ _interopRequireDefault(require("path"));
12
+ const _resolveConfigPathJs = require("../../util/resolveConfigPath.js");
12
13
  const _pluginJs = require("./plugin.js");
13
14
  function _interopRequireDefault(obj) {
14
15
  return obj && obj.__esModule ? obj : {
15
16
  default: obj
16
17
  };
17
18
  }
18
- async function build(args, configs) {
19
+ async function build(args) {
19
20
  let input = args["--input"];
20
21
  let shouldWatch = args["--watch"];
21
22
  // TODO: Deprecate this in future versions
@@ -32,7 +33,7 @@ async function build(args, configs) {
32
33
  process.exit(9);
33
34
  }
34
35
  // TODO: Reference the @config path here if exists
35
- let configPath = args["--config"] ? args["--config"] : ((defaultPath)=>_fs.default.existsSync(defaultPath) ? defaultPath : null)(_path.default.resolve(`./${configs.tailwind}`));
36
+ let configPath = args["--config"] ? args["--config"] : (0, _resolveConfigPathJs.resolveDefaultConfigPath)();
36
37
  let processor = await (0, _pluginJs.createProcessor)(args, configPath);
37
38
  if (shouldWatch) {
38
39
  // Abort the watcher if stdin is closed to avoid zombie processes
@@ -43,6 +44,9 @@ async function build(args, configs) {
43
44
  process.stdin.resume();
44
45
  await processor.watch();
45
46
  } else {
46
- await processor.build();
47
+ await processor.build().catch((e)=>{
48
+ console.error(e);
49
+ process.exit(1);
50
+ });
47
51
  }
48
52
  }
@@ -20,12 +20,13 @@ const _deps = require("./deps");
20
20
  const _utils = require("./utils");
21
21
  const _sharedState = require("../../lib/sharedState");
22
22
  const _resolveConfigJs = /*#__PURE__*/ _interopRequireDefault(require("../../../resolveConfig.js"));
23
- const _getModuleDependenciesJs = /*#__PURE__*/ _interopRequireDefault(require("../../lib/getModuleDependencies.js"));
24
23
  const _contentJs = require("../../lib/content.js");
25
24
  const _watchingJs = require("./watching.js");
26
25
  const _fastGlob = /*#__PURE__*/ _interopRequireDefault(require("fast-glob"));
27
26
  const _findAtConfigPathJs = require("../../lib/findAtConfigPath.js");
28
27
  const _log = /*#__PURE__*/ _interopRequireDefault(require("../../util/log"));
28
+ const _loadConfig = require("../../lib/load-config");
29
+ const _getModuleDependencies = /*#__PURE__*/ _interopRequireDefault(require("../../lib/getModuleDependencies"));
29
30
  function _interopRequireDefault(obj) {
30
31
  return obj && obj.__esModule ? obj : {
31
32
  default: obj
@@ -109,7 +110,7 @@ let state = {
109
110
  /** @type {any} */ context: null,
110
111
  /** @type {ReturnType<typeof createWatcher> | null} */ watcher: null,
111
112
  /** @type {{content: string, extension: string}[]} */ changedContent: [],
112
- configDependencies: new Set(),
113
+ /** @type {ReturnType<typeof load> | null} */ configBag: null,
113
114
  contextDependencies: new Set(),
114
115
  /** @type {import('../../lib/content.js').ContentPath[]} */ contentPaths: [],
115
116
  refreshContentPaths () {
@@ -127,32 +128,35 @@ let state = {
127
128
  },
128
129
  loadConfig (configPath, content) {
129
130
  if (this.watcher && configPath) {
130
- this.refreshConfigDependencies(configPath);
131
+ this.refreshConfigDependencies();
131
132
  }
132
- let config = configPath ? require(configPath) : {};
133
+ let config = (0, _loadConfig.loadConfig)(configPath);
134
+ let dependencies = (0, _getModuleDependencies.default)(configPath);
135
+ this.configBag = {
136
+ config,
137
+ dependencies,
138
+ dispose () {
139
+ for (let file of dependencies){
140
+ delete require.cache[require.resolve(file)];
141
+ }
142
+ }
143
+ };
133
144
  // @ts-ignore
134
- config = (0, _resolveConfigJs.default)(config, {
145
+ this.configBag.config = (0, _resolveConfigJs.default)(this.configBag.config, {
135
146
  content: {
136
147
  files: []
137
148
  }
138
149
  });
139
150
  // Override content files if `--content` has been passed explicitly
140
151
  if ((content === null || content === void 0 ? void 0 : content.length) > 0) {
141
- config.content.files = content;
152
+ this.configBag.config.content.files = content;
142
153
  }
143
- return config;
154
+ return this.configBag.config;
144
155
  },
145
- refreshConfigDependencies (configPath) {
156
+ refreshConfigDependencies () {
157
+ var _this_configBag;
146
158
  _sharedState.env.DEBUG && console.time("Module dependencies");
147
- for (let file of this.configDependencies){
148
- delete require.cache[require.resolve(file)];
149
- }
150
- if (configPath) {
151
- let deps = (0, _getModuleDependenciesJs.default)(configPath).map(({ file })=>file);
152
- for (let dependency of deps){
153
- this.configDependencies.add(dependency);
154
- }
155
- }
159
+ (_this_configBag = this.configBag) === null || _this_configBag === void 0 ? void 0 : _this_configBag.dispose();
156
160
  _sharedState.env.DEBUG && console.timeEnd("Module dependencies");
157
161
  },
158
162
  readContentPaths () {
@@ -326,7 +330,11 @@ async function createProcessor(args, cliConfigPath) {
326
330
  // If you fix it and then save the main CSS file so there's no error
327
331
  // The watcher will start watching the imported CSS files and will be
328
332
  // resilient to future errors.
329
- console.error(err);
333
+ if (state.watcher) {
334
+ console.error(err);
335
+ } else {
336
+ return Promise.reject(err);
337
+ }
330
338
  });
331
339
  }
332
340
  /**
@@ -349,7 +357,8 @@ async function createProcessor(args, cliConfigPath) {
349
357
  * @param {{file: string, content(): Promise<string>, extension: string}[]} changes
350
358
  */ async rebuild (changes) {
351
359
  let needsNewContext = changes.some((change)=>{
352
- return state.configDependencies.has(change.file) || state.contextDependencies.has(change.file);
360
+ var _state_configBag;
361
+ return ((_state_configBag = state.configBag) === null || _state_configBag === void 0 ? void 0 : _state_configBag.dependencies.has(change.file)) || state.contextDependencies.has(change.file);
353
362
  });
354
363
  if (needsNewContext) {
355
364
  state.context = null;
@@ -64,7 +64,9 @@ function createWatcher(args, { state , rebuild }) {
64
64
  // Clear all pending rebuilds for the about-to-be-built files
65
65
  changes.forEach((change)=>pendingRebuilds.delete(change.file));
66
66
  // Resolve the promise even when the rebuild fails
67
- return rebuild(changes).then(()=>{}, ()=>{});
67
+ return rebuild(changes).then(()=>{}, (e)=>{
68
+ console.error(e.toString());
69
+ });
68
70
  }
69
71
  /**
70
72
  *
@@ -171,7 +173,7 @@ function createWatcher(args, { state , rebuild }) {
171
173
  fswatcher: watcher,
172
174
  refreshWatchedFiles () {
173
175
  watcher.add(Array.from(state.contextDependencies));
174
- watcher.add(Array.from(state.configDependencies));
176
+ watcher.add(Array.from(state.configBag.dependencies));
175
177
  watcher.add(state.contentPatterns.all);
176
178
  }
177
179
  };
package/lib/cli/index.js CHANGED
@@ -14,23 +14,6 @@ function _interopRequireDefault(obj) {
14
14
  default: obj
15
15
  };
16
16
  }
17
- function isESM() {
18
- const pkgPath = _path.default.resolve("./package.json");
19
- try {
20
- let pkg = JSON.parse(_fs.default.readFileSync(pkgPath, "utf8"));
21
- return pkg.type && pkg.type === "module";
22
- } catch (err) {
23
- return false;
24
- }
25
- }
26
- let configs = isESM() ? {
27
- tailwind: "tailwind.config.cjs",
28
- postcss: "postcss.config.cjs"
29
- } : {
30
- tailwind: "tailwind.config.js",
31
- postcss: "postcss.config.js"
32
- };
33
- // ---
34
17
  function oneOf(...options) {
35
18
  return Object.assign((value = true)=>{
36
19
  for (let option of options){
@@ -48,13 +31,21 @@ let commands = {
48
31
  init: {
49
32
  run: _init.init,
50
33
  args: {
51
- "--full": {
34
+ "--esm": {
52
35
  type: Boolean,
53
- description: `Initialize a full \`${configs.tailwind}\` file`
36
+ description: `Initialize configuration file as ESM`
37
+ },
38
+ "--ts": {
39
+ type: Boolean,
40
+ description: `Initialize configuration file as TypeScript`
54
41
  },
55
42
  "--postcss": {
56
43
  type: Boolean,
57
- description: `Initialize a \`${configs.postcss}\` file`
44
+ description: `Initialize a \`postcss.config.js\` file`
45
+ },
46
+ "--full": {
47
+ type: Boolean,
48
+ description: `Include the default values for all options in the generated configuration file`
58
49
  },
59
50
  "-f": "--full",
60
51
  "-p": "--postcss"
@@ -236,4 +227,4 @@ if (args["--help"]) {
236
227
  });
237
228
  process.exit(0);
238
229
  }
239
- run(args, configs);
230
+ run(args);
@@ -14,25 +14,40 @@ function _interopRequireDefault(obj) {
14
14
  default: obj
15
15
  };
16
16
  }
17
- function init(args, configs) {
17
+ function isESM() {
18
+ const pkgPath = _path.default.resolve("./package.json");
19
+ try {
20
+ let pkg = JSON.parse(_fs.default.readFileSync(pkgPath, "utf8"));
21
+ return pkg.type && pkg.type === "module";
22
+ } catch (err) {
23
+ return false;
24
+ }
25
+ }
26
+ function init(args) {
18
27
  let messages = [];
28
+ let isProjectESM = args["--ts"] || args["--esm"] || isESM();
29
+ let syntax = args["--ts"] ? "ts" : isProjectESM ? "js" : "cjs";
30
+ let extension = args["--ts"] ? "ts" : "js";
19
31
  var _args___;
20
- let tailwindConfigLocation = _path.default.resolve((_args___ = args["_"][1]) !== null && _args___ !== void 0 ? _args___ : `./${configs.tailwind}`);
32
+ let tailwindConfigLocation = _path.default.resolve((_args___ = args["_"][1]) !== null && _args___ !== void 0 ? _args___ : `./tailwind.config.${extension}`);
21
33
  if (_fs.default.existsSync(tailwindConfigLocation)) {
22
34
  messages.push(`${_path.default.basename(tailwindConfigLocation)} already exists.`);
23
35
  } else {
24
- let stubFile = _fs.default.readFileSync(args["--full"] ? _path.default.resolve(__dirname, "../../../stubs/defaultConfig.stub.js") : _path.default.resolve(__dirname, "../../../stubs/simpleConfig.stub.js"), "utf8");
36
+ let stubContentsFile = _fs.default.readFileSync(args["--full"] ? _path.default.resolve(__dirname, "../../../stubs/config.full.js") : _path.default.resolve(__dirname, "../../../stubs/config.simple.js"), "utf8");
37
+ let stubFile = _fs.default.readFileSync(_path.default.resolve(__dirname, `../../../stubs/tailwind.config.${syntax}`), "utf8");
25
38
  // Change colors import
26
- stubFile = stubFile.replace("../colors", "tailwindcss/colors");
39
+ stubContentsFile = stubContentsFile.replace("../colors", "tailwindcss/colors");
40
+ // Replace contents of {ts,js,cjs} file with the stub {simple,full}.
41
+ stubFile = stubFile.replace("__CONFIG__", stubContentsFile.replace("module.exports =", "").trim()).trim() + "\n\n";
27
42
  _fs.default.writeFileSync(tailwindConfigLocation, stubFile, "utf8");
28
43
  messages.push(`Created Tailwind CSS config file: ${_path.default.basename(tailwindConfigLocation)}`);
29
44
  }
30
45
  if (args["--postcss"]) {
31
- let postcssConfigLocation = _path.default.resolve(`./${configs.postcss}`);
46
+ let postcssConfigLocation = _path.default.resolve("./postcss.config.js");
32
47
  if (_fs.default.existsSync(postcssConfigLocation)) {
33
48
  messages.push(`${_path.default.basename(postcssConfigLocation)} already exists.`);
34
49
  } else {
35
- let stubFile1 = _fs.default.readFileSync(_path.default.resolve(__dirname, "../../../stubs/defaultPostCssConfig.stub.js"), "utf8");
50
+ let stubFile1 = _fs.default.readFileSync(isProjectESM ? _path.default.resolve(__dirname, "../../../stubs/postcss.config.js") : _path.default.resolve(__dirname, "../../../stubs/postcss.config.cjs"), "utf8");
36
51
  _fs.default.writeFileSync(postcssConfigLocation, stubFile1, "utf8");
37
52
  messages.push(`Created PostCSS config file: ${_path.default.basename(postcssConfigLocation)}`);
38
53
  }
@@ -27,6 +27,7 @@ const _default = [
27
27
  "clear",
28
28
  "margin",
29
29
  "boxSizing",
30
+ "lineClamp",
30
31
  "display",
31
32
  "aspectRatio",
32
33
  "height",
@@ -40,6 +41,7 @@ const _default = [
40
41
  "flexGrow",
41
42
  "flexBasis",
42
43
  "tableLayout",
44
+ "captionSide",
43
45
  "borderCollapse",
44
46
  "borderSpacing",
45
47
  "transformOrigin",
@@ -60,6 +62,7 @@ const _default = [
60
62
  "scrollPadding",
61
63
  "listStylePosition",
62
64
  "listStyleType",
65
+ "listStyleImage",
63
66
  "appearance",
64
67
  "columns",
65
68
  "breakBefore",
@@ -91,6 +94,7 @@ const _default = [
91
94
  "overscrollBehavior",
92
95
  "scrollBehavior",
93
96
  "textOverflow",
97
+ "hyphens",
94
98
  "whitespace",
95
99
  "wordBreak",
96
100
  "borderRadius",
@@ -257,20 +257,8 @@ let variantPlugins = {
257
257
  }
258
258
  },
259
259
  directionVariants: ({ addVariant })=>{
260
- addVariant("ltr", ()=>{
261
- _log.default.warn("rtl-experimental", [
262
- "The RTL features in Tailwind CSS are currently in preview.",
263
- "Preview features are not covered by semver, and may be improved in breaking ways at any time."
264
- ]);
265
- return '[dir="ltr"] &';
266
- });
267
- addVariant("rtl", ()=>{
268
- _log.default.warn("rtl-experimental", [
269
- "The RTL features in Tailwind CSS are currently in preview.",
270
- "Preview features are not covered by semver, and may be improved in breaking ways at any time."
271
- ]);
272
- return '[dir="rtl"] &';
273
- });
260
+ addVariant("ltr", ':is([dir="ltr"] &)');
261
+ addVariant("rtl", ':is([dir="rtl"] &)');
274
262
  },
275
263
  reducedMotionVariants: ({ addVariant })=>{
276
264
  addVariant("motion-safe", "@media (prefers-reduced-motion: no-preference)");
@@ -287,7 +275,7 @@ let variantPlugins = {
287
275
  ]);
288
276
  }
289
277
  if (mode === "class") {
290
- addVariant("dark", `${className} &`);
278
+ addVariant("dark", `:is(${className} &)`);
291
279
  } else if (mode === "media") {
292
280
  addVariant("dark", "@media (prefers-color-scheme: dark)");
293
281
  }
@@ -646,10 +634,7 @@ let corePlugins = {
646
634
  [
647
635
  "inset",
648
636
  [
649
- "top",
650
- "right",
651
- "bottom",
652
- "left"
637
+ "inset"
653
638
  ]
654
639
  ],
655
640
  [
@@ -883,6 +868,26 @@ let corePlugins = {
883
868
  }
884
869
  });
885
870
  },
871
+ lineClamp: ({ matchUtilities , addUtilities , theme })=>{
872
+ matchUtilities({
873
+ "line-clamp": (value)=>({
874
+ overflow: "hidden",
875
+ display: "-webkit-box",
876
+ "-webkit-box-orient": "vertical",
877
+ "-webkit-line-clamp": `${value}`
878
+ })
879
+ }, {
880
+ values: theme("lineClamp")
881
+ });
882
+ addUtilities({
883
+ ".line-clamp-none": {
884
+ overflow: "visible",
885
+ display: "block",
886
+ "-webkit-box-orient": "horizontal",
887
+ "-webkit-line-clamp": "none"
888
+ }
889
+ });
890
+ },
886
891
  display: ({ addUtilities })=>{
887
892
  addUtilities({
888
893
  ".block": {
@@ -1053,6 +1058,16 @@ let corePlugins = {
1053
1058
  }
1054
1059
  });
1055
1060
  },
1061
+ captionSide: ({ addUtilities })=>{
1062
+ addUtilities({
1063
+ ".caption-top": {
1064
+ "caption-side": "top"
1065
+ },
1066
+ ".caption-bottom": {
1067
+ "caption-side": "bottom"
1068
+ }
1069
+ });
1070
+ },
1056
1071
  borderCollapse: ({ addUtilities })=>{
1057
1072
  addUtilities({
1058
1073
  ".border-collapse": {
@@ -1579,6 +1594,14 @@ let corePlugins = {
1579
1594
  ]
1580
1595
  ]
1581
1596
  ]),
1597
+ listStyleImage: (0, _createUtilityPlugin.default)("listStyleImage", [
1598
+ [
1599
+ "list-image",
1600
+ [
1601
+ "listStyleImage"
1602
+ ]
1603
+ ]
1604
+ ]),
1582
1605
  appearance: ({ addUtilities })=>{
1583
1606
  addUtilities({
1584
1607
  ".appearance-none": {
@@ -1795,6 +1818,9 @@ let corePlugins = {
1795
1818
  },
1796
1819
  alignContent: ({ addUtilities })=>{
1797
1820
  addUtilities({
1821
+ ".content-normal": {
1822
+ "align-content": "normal"
1823
+ },
1798
1824
  ".content-center": {
1799
1825
  "align-content": "center"
1800
1826
  },
@@ -1815,6 +1841,9 @@ let corePlugins = {
1815
1841
  },
1816
1842
  ".content-baseline": {
1817
1843
  "align-content": "baseline"
1844
+ },
1845
+ ".content-stretch": {
1846
+ "align-content": "stretch"
1818
1847
  }
1819
1848
  });
1820
1849
  },
@@ -1839,6 +1868,9 @@ let corePlugins = {
1839
1868
  },
1840
1869
  justifyContent: ({ addUtilities })=>{
1841
1870
  addUtilities({
1871
+ ".justify-normal": {
1872
+ "justify-content": "normal"
1873
+ },
1842
1874
  ".justify-start": {
1843
1875
  "justify-content": "flex-start"
1844
1876
  },
@@ -1856,6 +1888,9 @@ let corePlugins = {
1856
1888
  },
1857
1889
  ".justify-evenly": {
1858
1890
  "justify-content": "space-evenly"
1891
+ },
1892
+ ".justify-stretch": {
1893
+ "justify-content": "stretch"
1859
1894
  }
1860
1895
  });
1861
1896
  },
@@ -2220,6 +2255,19 @@ let corePlugins = {
2220
2255
  }
2221
2256
  });
2222
2257
  },
2258
+ hyphens: ({ addUtilities })=>{
2259
+ addUtilities({
2260
+ ".hyphens-none": {
2261
+ hyphens: "none"
2262
+ },
2263
+ ".hyphens-manual": {
2264
+ hyphens: "manual"
2265
+ },
2266
+ ".hyphens-auto": {
2267
+ hyphens: "auto"
2268
+ }
2269
+ });
2270
+ },
2223
2271
  whitespace: ({ addUtilities })=>{
2224
2272
  addUtilities({
2225
2273
  ".whitespace-normal": {
@@ -2236,6 +2284,9 @@ let corePlugins = {
2236
2284
  },
2237
2285
  ".whitespace-pre-wrap": {
2238
2286
  "white-space": "pre-wrap"
2287
+ },
2288
+ ".whitespace-break-spaces": {
2289
+ "white-space": "break-spaces"
2239
2290
  }
2240
2291
  });
2241
2292
  },
@@ -2689,30 +2740,63 @@ let corePlugins = {
2689
2740
  "any"
2690
2741
  ]
2691
2742
  };
2743
+ let positionOptions = {
2744
+ values: theme("gradientColorStopPositions"),
2745
+ type: [
2746
+ "length",
2747
+ "percentage"
2748
+ ]
2749
+ };
2692
2750
  matchUtilities({
2693
2751
  from: (value)=>{
2694
2752
  let transparentToValue = transparentTo(value);
2695
2753
  return {
2696
- "--tw-gradient-from": (0, _toColorValue.default)(value, "from"),
2697
- "--tw-gradient-to": transparentToValue,
2754
+ "--tw-gradient-from": `${(0, _toColorValue.default)(value, "from")} var(--tw-gradient-from-position)`,
2755
+ "--tw-gradient-from-position": " ",
2756
+ "--tw-gradient-to": `${transparentToValue} var(--tw-gradient-from-position)`,
2757
+ "--tw-gradient-to-position": " ",
2698
2758
  "--tw-gradient-stops": `var(--tw-gradient-from), var(--tw-gradient-to)`
2699
2759
  };
2700
2760
  }
2701
2761
  }, options);
2762
+ matchUtilities({
2763
+ from: (value)=>{
2764
+ return {
2765
+ "--tw-gradient-from-position": value
2766
+ };
2767
+ }
2768
+ }, positionOptions);
2702
2769
  matchUtilities({
2703
2770
  via: (value)=>{
2704
2771
  let transparentToValue = transparentTo(value);
2705
2772
  return {
2706
- "--tw-gradient-to": transparentToValue,
2707
- "--tw-gradient-stops": `var(--tw-gradient-from), ${(0, _toColorValue.default)(value, "via")}, var(--tw-gradient-to)`
2773
+ "--tw-gradient-via-position": " ",
2774
+ "--tw-gradient-to": `${transparentToValue} var(--tw-gradient-to-position)`,
2775
+ "--tw-gradient-to-position": " ",
2776
+ "--tw-gradient-stops": `var(--tw-gradient-from), ${(0, _toColorValue.default)(value, "via")} var(--tw-gradient-via-position), var(--tw-gradient-to)`
2708
2777
  };
2709
2778
  }
2710
2779
  }, options);
2780
+ matchUtilities({
2781
+ via: (value)=>{
2782
+ return {
2783
+ "--tw-gradient-via-position": value
2784
+ };
2785
+ }
2786
+ }, positionOptions);
2711
2787
  matchUtilities({
2712
2788
  to: (value)=>({
2713
- "--tw-gradient-to": (0, _toColorValue.default)(value, "to")
2789
+ "--tw-gradient-to": `${(0, _toColorValue.default)(value, "to")} var(--tw-gradient-to-position)`,
2790
+ "--tw-gradient-to-position": " "
2714
2791
  })
2715
2792
  }, options);
2793
+ matchUtilities({
2794
+ to: (value)=>{
2795
+ return {
2796
+ "--tw-gradient-to-position": value
2797
+ };
2798
+ }
2799
+ }, positionOptions);
2716
2800
  };
2717
2801
  })(),
2718
2802
  boxDecorationBreak: ({ addUtilities })=>{
@@ -3033,11 +3117,14 @@ let corePlugins = {
3033
3117
  let [families, options = {}] = Array.isArray(value) && (0, _isPlainObject.default)(value[1]) ? value : [
3034
3118
  value
3035
3119
  ];
3036
- let { fontFeatureSettings } = options;
3120
+ let { fontFeatureSettings , fontVariationSettings } = options;
3037
3121
  return {
3038
3122
  "font-family": Array.isArray(families) ? families.join(", ") : families,
3039
3123
  ...fontFeatureSettings === undefined ? {} : {
3040
3124
  "font-feature-settings": fontFeatureSettings
3125
+ },
3126
+ ...fontVariationSettings === undefined ? {} : {
3127
+ "font-variation-settings": fontVariationSettings
3041
3128
  }
3042
3129
  };
3043
3130
  }
@@ -23,6 +23,7 @@
23
23
  3. Use a more readable tab size.
24
24
  4. Use the user's configured `sans` font-family by default.
25
25
  5. Use the user's configured `sans` font-feature-settings by default.
26
+ 6. Use the user's configured `sans` font-variation-settings by default.
26
27
  */
27
28
 
28
29
  html {
@@ -32,6 +33,7 @@ html {
32
33
  tab-size: 4; /* 3 */
33
34
  font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */
34
35
  font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings', normal); /* 5 */
36
+ font-variation-settings: theme('fontFamily.sans[1].fontVariationSettings', normal); /* 6 */
35
37
  }
36
38
 
37
39
  /*
@@ -15,6 +15,7 @@ _export(exports, {
15
15
  });
16
16
  const _picocolors = /*#__PURE__*/ _interopRequireDefault(require("picocolors"));
17
17
  const _log = /*#__PURE__*/ _interopRequireDefault(require("./util/log"));
18
+ const _sharedState = require("./lib/sharedState");
18
19
  function _interopRequireDefault(obj) {
19
20
  return obj && obj.__esModule ? obj : {
20
21
  default: obj
@@ -22,7 +23,13 @@ function _interopRequireDefault(obj) {
22
23
  }
23
24
  let defaults = {
24
25
  optimizeUniversalDefaults: false,
25
- generalizedModifiers: true
26
+ generalizedModifiers: true,
27
+ get disableColorOpacityUtilitiesByDefault () {
28
+ return _sharedState.env.OXIDE;
29
+ },
30
+ get relativeContentPathsByDefault () {
31
+ return _sharedState.env.OXIDE;
32
+ }
26
33
  };
27
34
  let featureFlags = {
28
35
  future: [
@@ -10,6 +10,7 @@ const _postcss = /*#__PURE__*/ _interopRequireDefault(require("postcss"));
10
10
  const _postcssSelectorParser = /*#__PURE__*/ _interopRequireDefault(require("postcss-selector-parser"));
11
11
  const _generateRules = require("./generateRules");
12
12
  const _escapeClassName = /*#__PURE__*/ _interopRequireDefault(require("../util/escapeClassName"));
13
+ const _applyImportantSelector = require("../util/applyImportantSelector");
13
14
  function _interopRequireDefault(obj) {
14
15
  return obj && obj.__esModule ? obj : {
15
16
  default: obj
@@ -481,7 +482,7 @@ function processApply(root, context, localCache) {
481
482
  rule.selector = replaceSelector(parentSelector, rule.selector, applyCandidate1);
482
483
  // And then re-add it if it was removed
483
484
  if (importantSelector && parentSelector !== parent.selector) {
484
- rule.selector = `${importantSelector} ${rule.selector}`;
485
+ rule.selector = (0, _applyImportantSelector.applyImportantSelector)(rule.selector, importantSelector);
485
486
  }
486
487
  rule.walkDecls((d)=>{
487
488
  d.important = meta.important || important1;
@@ -13,7 +13,6 @@ const _generateRules = require("./generateRules");
13
13
  const _log = /*#__PURE__*/ _interopRequireDefault(require("../util/log"));
14
14
  const _cloneNodes = /*#__PURE__*/ _interopRequireDefault(require("../util/cloneNodes"));
15
15
  const _defaultExtractor = require("./defaultExtractor");
16
- const _oxide = /*#__PURE__*/ _interopRequireDefault(require("@tailwindcss/oxide"));
17
16
  function _interopRequireDefault(obj) {
18
17
  return obj && obj.__esModule ? obj : {
19
18
  default: obj
@@ -155,7 +154,7 @@ function expandTailwindAtRules(context) {
155
154
  env.DEBUG && console.time("Reading changed files");
156
155
  if (env.OXIDE) {
157
156
  // TODO: Pass through or implement `extractor`
158
- for (let candidate of _oxide.default.parseCandidateStringsFromFiles(context.changedContent)){
157
+ for (let candidate of require("@tailwindcss/oxide").parseCandidateStringsFromFiles(context.changedContent)){
159
158
  candidates.add(candidate);
160
159
  }
161
160
  // for (let { file, content, extension } of context.changedContent) {