tailwindcss 0.0.0-insiders.bbafc8e → 0.0.0-insiders.bbc2f3f

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 (198) hide show
  1. package/README.md +16 -13
  2. package/dist/chunk-5C7JPVMO.mjs +10 -0
  3. package/dist/chunk-AZANAYY2.mjs +1 -0
  4. package/dist/chunk-V2K3XTS4.mjs +1 -0
  5. package/dist/colors-b_6i0Oi7.d.ts +295 -0
  6. package/dist/colors.d.mts +295 -0
  7. package/dist/colors.d.ts +5 -0
  8. package/dist/colors.js +1 -0
  9. package/dist/colors.mjs +1 -0
  10. package/dist/default-theme.d.mts +1147 -0
  11. package/dist/default-theme.d.ts +1147 -0
  12. package/dist/default-theme.js +1 -0
  13. package/dist/default-theme.mjs +1 -0
  14. package/dist/flatten-color-palette.d.mts +6 -0
  15. package/dist/flatten-color-palette.d.ts +6 -0
  16. package/dist/flatten-color-palette.js +1 -0
  17. package/dist/flatten-color-palette.mjs +1 -0
  18. package/dist/lib.d.mts +260 -0
  19. package/dist/lib.d.ts +3 -0
  20. package/dist/lib.js +33 -0
  21. package/dist/lib.mjs +24 -0
  22. package/dist/plugin.d.mts +11 -0
  23. package/dist/plugin.d.ts +104 -0
  24. package/dist/plugin.js +1 -0
  25. package/dist/plugin.mjs +1 -0
  26. package/dist/resolve-config-BIFUA2FY.d.ts +29 -0
  27. package/dist/resolve-config-QUZ9b-Gn.d.mts +190 -0
  28. package/dist/types-B254mqw1.d.mts +98 -0
  29. package/index.css +865 -0
  30. package/package.json +73 -95
  31. package/preflight.css +383 -0
  32. package/theme.css +453 -0
  33. package/CHANGELOG.md +0 -2084
  34. package/base.css +0 -1
  35. package/colors.js +0 -2
  36. package/components.css +0 -1
  37. package/defaultConfig.js +0 -2
  38. package/defaultTheme.js +0 -2
  39. package/lib/cli-peer-dependencies.js +0 -15
  40. package/lib/cli.js +0 -741
  41. package/lib/constants.js +0 -37
  42. package/lib/corePluginList.js +0 -178
  43. package/lib/corePlugins.js +0 -3587
  44. package/lib/css/LICENSE +0 -25
  45. package/lib/css/preflight.css +0 -367
  46. package/lib/featureFlags.js +0 -59
  47. package/lib/index.js +0 -41
  48. package/lib/lib/cacheInvalidation.js +0 -69
  49. package/lib/lib/collapseAdjacentRules.js +0 -54
  50. package/lib/lib/collapseDuplicateDeclarations.js +0 -80
  51. package/lib/lib/defaultExtractor.js +0 -44
  52. package/lib/lib/detectNesting.js +0 -34
  53. package/lib/lib/evaluateTailwindFunctions.js +0 -171
  54. package/lib/lib/expandApplyAtRules.js +0 -433
  55. package/lib/lib/expandTailwindAtRules.js +0 -262
  56. package/lib/lib/generateRules.js +0 -631
  57. package/lib/lib/getModuleDependencies.js +0 -48
  58. package/lib/lib/normalizeTailwindDirectives.js +0 -84
  59. package/lib/lib/partitionApplyAtRules.js +0 -53
  60. package/lib/lib/resolveDefaultsAtRules.js +0 -143
  61. package/lib/lib/setupContextUtils.js +0 -859
  62. package/lib/lib/setupTrackingContext.js +0 -171
  63. package/lib/lib/sharedState.js +0 -52
  64. package/lib/lib/substituteScreenAtRules.js +0 -27
  65. package/lib/postcss-plugins/nesting/README.md +0 -42
  66. package/lib/postcss-plugins/nesting/index.js +0 -17
  67. package/lib/postcss-plugins/nesting/plugin.js +0 -85
  68. package/lib/processTailwindFeatures.js +0 -59
  69. package/lib/public/colors.js +0 -329
  70. package/lib/public/create-plugin.js +0 -13
  71. package/lib/public/default-config.js +0 -14
  72. package/lib/public/default-theme.js +0 -14
  73. package/lib/public/resolve-config.js +0 -19
  74. package/lib/util/bigSign.js +0 -8
  75. package/lib/util/buildMediaQuery.js +0 -20
  76. package/lib/util/cloneDeep.js +0 -19
  77. package/lib/util/cloneNodes.js +0 -25
  78. package/lib/util/color.js +0 -99
  79. package/lib/util/configurePlugins.js +0 -18
  80. package/lib/util/createPlugin.js +0 -29
  81. package/lib/util/createUtilityPlugin.js +0 -49
  82. package/lib/util/dataTypes.js +0 -233
  83. package/lib/util/defaults.js +0 -22
  84. package/lib/util/escapeClassName.js +0 -19
  85. package/lib/util/escapeCommas.js +0 -8
  86. package/lib/util/flattenColorPalette.js +0 -17
  87. package/lib/util/formatVariantSelector.js +0 -186
  88. package/lib/util/getAllConfigs.js +0 -29
  89. package/lib/util/hashConfig.js +0 -16
  90. package/lib/util/isKeyframeRule.js +0 -8
  91. package/lib/util/isPlainObject.js +0 -12
  92. package/lib/util/isValidArbitraryValue.js +0 -64
  93. package/lib/util/log.js +0 -51
  94. package/lib/util/nameClass.js +0 -32
  95. package/lib/util/negateValue.js +0 -19
  96. package/lib/util/normalizeConfig.js +0 -240
  97. package/lib/util/normalizeScreens.js +0 -59
  98. package/lib/util/parseAnimationValue.js +0 -89
  99. package/lib/util/parseBoxShadowValue.js +0 -117
  100. package/lib/util/parseDependency.js +0 -63
  101. package/lib/util/parseObjectStyles.js +0 -31
  102. package/lib/util/pluginUtils.js +0 -179
  103. package/lib/util/prefixSelector.js +0 -20
  104. package/lib/util/resolveConfig.js +0 -255
  105. package/lib/util/resolveConfigPath.js +0 -51
  106. package/lib/util/responsive.js +0 -19
  107. package/lib/util/tap.js +0 -9
  108. package/lib/util/toColorValue.js +0 -8
  109. package/lib/util/toPath.js +0 -14
  110. package/lib/util/transformThemeValue.js +0 -59
  111. package/lib/util/withAlphaVariable.js +0 -67
  112. package/nesting/index.js +0 -2
  113. package/peers/index.js +0 -75077
  114. package/plugin.js +0 -2
  115. package/prettier.config.js +0 -19
  116. package/resolveConfig.js +0 -2
  117. package/screens.css +0 -1
  118. package/scripts/create-plugin-list.js +0 -10
  119. package/scripts/install-integrations.js +0 -27
  120. package/scripts/rebuildFixtures.js +0 -68
  121. package/src/cli-peer-dependencies.js +0 -9
  122. package/src/cli.js +0 -815
  123. package/src/constants.js +0 -17
  124. package/src/corePluginList.js +0 -1
  125. package/src/corePlugins.js +0 -2365
  126. package/src/css/LICENSE +0 -25
  127. package/src/css/preflight.css +0 -367
  128. package/src/featureFlags.js +0 -54
  129. package/src/index.js +0 -42
  130. package/src/lib/cacheInvalidation.js +0 -52
  131. package/src/lib/collapseAdjacentRules.js +0 -54
  132. package/src/lib/collapseDuplicateDeclarations.js +0 -93
  133. package/src/lib/defaultExtractor.js +0 -50
  134. package/src/lib/detectNesting.js +0 -39
  135. package/src/lib/evaluateTailwindFunctions.js +0 -198
  136. package/src/lib/expandApplyAtRules.js +0 -480
  137. package/src/lib/expandTailwindAtRules.js +0 -292
  138. package/src/lib/generateRules.js +0 -623
  139. package/src/lib/getModuleDependencies.js +0 -39
  140. package/src/lib/normalizeTailwindDirectives.js +0 -84
  141. package/src/lib/partitionApplyAtRules.js +0 -52
  142. package/src/lib/resolveDefaultsAtRules.js +0 -146
  143. package/src/lib/setupContextUtils.js +0 -883
  144. package/src/lib/setupTrackingContext.js +0 -183
  145. package/src/lib/sharedState.js +0 -48
  146. package/src/lib/substituteScreenAtRules.js +0 -19
  147. package/src/postcss-plugins/nesting/README.md +0 -42
  148. package/src/postcss-plugins/nesting/index.js +0 -13
  149. package/src/postcss-plugins/nesting/plugin.js +0 -80
  150. package/src/processTailwindFeatures.js +0 -58
  151. package/src/public/colors.js +0 -300
  152. package/src/public/create-plugin.js +0 -2
  153. package/src/public/default-config.js +0 -4
  154. package/src/public/default-theme.js +0 -4
  155. package/src/public/resolve-config.js +0 -7
  156. package/src/util/bigSign.js +0 -3
  157. package/src/util/buildMediaQuery.js +0 -20
  158. package/src/util/cloneDeep.js +0 -11
  159. package/src/util/cloneNodes.js +0 -24
  160. package/src/util/color.js +0 -69
  161. package/src/util/configurePlugins.js +0 -23
  162. package/src/util/createPlugin.js +0 -27
  163. package/src/util/createUtilityPlugin.js +0 -37
  164. package/src/util/dataTypes.js +0 -248
  165. package/src/util/defaults.js +0 -17
  166. package/src/util/escapeClassName.js +0 -8
  167. package/src/util/escapeCommas.js +0 -3
  168. package/src/util/flattenColorPalette.js +0 -13
  169. package/src/util/formatVariantSelector.js +0 -196
  170. package/src/util/getAllConfigs.js +0 -19
  171. package/src/util/hashConfig.js +0 -5
  172. package/src/util/isKeyframeRule.js +0 -3
  173. package/src/util/isPlainObject.js +0 -8
  174. package/src/util/isValidArbitraryValue.js +0 -61
  175. package/src/util/log.js +0 -29
  176. package/src/util/nameClass.js +0 -26
  177. package/src/util/negateValue.js +0 -16
  178. package/src/util/normalizeConfig.js +0 -270
  179. package/src/util/normalizeScreens.js +0 -45
  180. package/src/util/parseAnimationValue.js +0 -68
  181. package/src/util/parseBoxShadowValue.js +0 -119
  182. package/src/util/parseDependency.js +0 -49
  183. package/src/util/parseObjectStyles.js +0 -19
  184. package/src/util/pluginUtils.js +0 -192
  185. package/src/util/prefixSelector.js +0 -14
  186. package/src/util/resolveConfig.js +0 -269
  187. package/src/util/resolveConfigPath.js +0 -55
  188. package/src/util/responsive.js +0 -10
  189. package/src/util/tap.js +0 -4
  190. package/src/util/toColorValue.js +0 -3
  191. package/src/util/toPath.js +0 -26
  192. package/src/util/transformThemeValue.js +0 -52
  193. package/src/util/withAlphaVariable.js +0 -49
  194. package/stubs/defaultConfig.stub.js +0 -950
  195. package/stubs/defaultPostCssConfig.stub.js +0 -6
  196. package/stubs/simpleConfig.stub.js +0 -7
  197. package/tailwind.css +0 -5
  198. package/variants.css +0 -1
@@ -1,329 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- exports.default = void 0;
6
- var _log = _interopRequireDefault(require("../util/log"));
7
- function _interopRequireDefault(obj) {
8
- return obj && obj.__esModule ? obj : {
9
- default: obj
10
- };
11
- }
12
- function warn({ version , from , to }) {
13
- _log.default.warn(`${from}-color-renamed`, [
14
- `As of Tailwind CSS ${version}, \`${from}\` has been renamed to \`${to}\`.`,
15
- 'Update your configuration file to silence this warning.',
16
- ]);
17
- }
18
- var _default = {
19
- inherit: 'inherit',
20
- current: 'currentColor',
21
- transparent: 'transparent',
22
- black: '#000',
23
- white: '#fff',
24
- slate: {
25
- 50: '#f8fafc',
26
- 100: '#f1f5f9',
27
- 200: '#e2e8f0',
28
- 300: '#cbd5e1',
29
- 400: '#94a3b8',
30
- 500: '#64748b',
31
- 600: '#475569',
32
- 700: '#334155',
33
- 800: '#1e293b',
34
- 900: '#0f172a'
35
- },
36
- gray: {
37
- 50: '#f9fafb',
38
- 100: '#f3f4f6',
39
- 200: '#e5e7eb',
40
- 300: '#d1d5db',
41
- 400: '#9ca3af',
42
- 500: '#6b7280',
43
- 600: '#4b5563',
44
- 700: '#374151',
45
- 800: '#1f2937',
46
- 900: '#111827'
47
- },
48
- zinc: {
49
- 50: '#fafafa',
50
- 100: '#f4f4f5',
51
- 200: '#e4e4e7',
52
- 300: '#d4d4d8',
53
- 400: '#a1a1aa',
54
- 500: '#71717a',
55
- 600: '#52525b',
56
- 700: '#3f3f46',
57
- 800: '#27272a',
58
- 900: '#18181b'
59
- },
60
- neutral: {
61
- 50: '#fafafa',
62
- 100: '#f5f5f5',
63
- 200: '#e5e5e5',
64
- 300: '#d4d4d4',
65
- 400: '#a3a3a3',
66
- 500: '#737373',
67
- 600: '#525252',
68
- 700: '#404040',
69
- 800: '#262626',
70
- 900: '#171717'
71
- },
72
- stone: {
73
- 50: '#fafaf9',
74
- 100: '#f5f5f4',
75
- 200: '#e7e5e4',
76
- 300: '#d6d3d1',
77
- 400: '#a8a29e',
78
- 500: '#78716c',
79
- 600: '#57534e',
80
- 700: '#44403c',
81
- 800: '#292524',
82
- 900: '#1c1917'
83
- },
84
- red: {
85
- 50: '#fef2f2',
86
- 100: '#fee2e2',
87
- 200: '#fecaca',
88
- 300: '#fca5a5',
89
- 400: '#f87171',
90
- 500: '#ef4444',
91
- 600: '#dc2626',
92
- 700: '#b91c1c',
93
- 800: '#991b1b',
94
- 900: '#7f1d1d'
95
- },
96
- orange: {
97
- 50: '#fff7ed',
98
- 100: '#ffedd5',
99
- 200: '#fed7aa',
100
- 300: '#fdba74',
101
- 400: '#fb923c',
102
- 500: '#f97316',
103
- 600: '#ea580c',
104
- 700: '#c2410c',
105
- 800: '#9a3412',
106
- 900: '#7c2d12'
107
- },
108
- amber: {
109
- 50: '#fffbeb',
110
- 100: '#fef3c7',
111
- 200: '#fde68a',
112
- 300: '#fcd34d',
113
- 400: '#fbbf24',
114
- 500: '#f59e0b',
115
- 600: '#d97706',
116
- 700: '#b45309',
117
- 800: '#92400e',
118
- 900: '#78350f'
119
- },
120
- yellow: {
121
- 50: '#fefce8',
122
- 100: '#fef9c3',
123
- 200: '#fef08a',
124
- 300: '#fde047',
125
- 400: '#facc15',
126
- 500: '#eab308',
127
- 600: '#ca8a04',
128
- 700: '#a16207',
129
- 800: '#854d0e',
130
- 900: '#713f12'
131
- },
132
- lime: {
133
- 50: '#f7fee7',
134
- 100: '#ecfccb',
135
- 200: '#d9f99d',
136
- 300: '#bef264',
137
- 400: '#a3e635',
138
- 500: '#84cc16',
139
- 600: '#65a30d',
140
- 700: '#4d7c0f',
141
- 800: '#3f6212',
142
- 900: '#365314'
143
- },
144
- green: {
145
- 50: '#f0fdf4',
146
- 100: '#dcfce7',
147
- 200: '#bbf7d0',
148
- 300: '#86efac',
149
- 400: '#4ade80',
150
- 500: '#22c55e',
151
- 600: '#16a34a',
152
- 700: '#15803d',
153
- 800: '#166534',
154
- 900: '#14532d'
155
- },
156
- emerald: {
157
- 50: '#ecfdf5',
158
- 100: '#d1fae5',
159
- 200: '#a7f3d0',
160
- 300: '#6ee7b7',
161
- 400: '#34d399',
162
- 500: '#10b981',
163
- 600: '#059669',
164
- 700: '#047857',
165
- 800: '#065f46',
166
- 900: '#064e3b'
167
- },
168
- teal: {
169
- 50: '#f0fdfa',
170
- 100: '#ccfbf1',
171
- 200: '#99f6e4',
172
- 300: '#5eead4',
173
- 400: '#2dd4bf',
174
- 500: '#14b8a6',
175
- 600: '#0d9488',
176
- 700: '#0f766e',
177
- 800: '#115e59',
178
- 900: '#134e4a'
179
- },
180
- cyan: {
181
- 50: '#ecfeff',
182
- 100: '#cffafe',
183
- 200: '#a5f3fc',
184
- 300: '#67e8f9',
185
- 400: '#22d3ee',
186
- 500: '#06b6d4',
187
- 600: '#0891b2',
188
- 700: '#0e7490',
189
- 800: '#155e75',
190
- 900: '#164e63'
191
- },
192
- sky: {
193
- 50: '#f0f9ff',
194
- 100: '#e0f2fe',
195
- 200: '#bae6fd',
196
- 300: '#7dd3fc',
197
- 400: '#38bdf8',
198
- 500: '#0ea5e9',
199
- 600: '#0284c7',
200
- 700: '#0369a1',
201
- 800: '#075985',
202
- 900: '#0c4a6e'
203
- },
204
- blue: {
205
- 50: '#eff6ff',
206
- 100: '#dbeafe',
207
- 200: '#bfdbfe',
208
- 300: '#93c5fd',
209
- 400: '#60a5fa',
210
- 500: '#3b82f6',
211
- 600: '#2563eb',
212
- 700: '#1d4ed8',
213
- 800: '#1e40af',
214
- 900: '#1e3a8a'
215
- },
216
- indigo: {
217
- 50: '#eef2ff',
218
- 100: '#e0e7ff',
219
- 200: '#c7d2fe',
220
- 300: '#a5b4fc',
221
- 400: '#818cf8',
222
- 500: '#6366f1',
223
- 600: '#4f46e5',
224
- 700: '#4338ca',
225
- 800: '#3730a3',
226
- 900: '#312e81'
227
- },
228
- violet: {
229
- 50: '#f5f3ff',
230
- 100: '#ede9fe',
231
- 200: '#ddd6fe',
232
- 300: '#c4b5fd',
233
- 400: '#a78bfa',
234
- 500: '#8b5cf6',
235
- 600: '#7c3aed',
236
- 700: '#6d28d9',
237
- 800: '#5b21b6',
238
- 900: '#4c1d95'
239
- },
240
- purple: {
241
- 50: '#faf5ff',
242
- 100: '#f3e8ff',
243
- 200: '#e9d5ff',
244
- 300: '#d8b4fe',
245
- 400: '#c084fc',
246
- 500: '#a855f7',
247
- 600: '#9333ea',
248
- 700: '#7e22ce',
249
- 800: '#6b21a8',
250
- 900: '#581c87'
251
- },
252
- fuchsia: {
253
- 50: '#fdf4ff',
254
- 100: '#fae8ff',
255
- 200: '#f5d0fe',
256
- 300: '#f0abfc',
257
- 400: '#e879f9',
258
- 500: '#d946ef',
259
- 600: '#c026d3',
260
- 700: '#a21caf',
261
- 800: '#86198f',
262
- 900: '#701a75'
263
- },
264
- pink: {
265
- 50: '#fdf2f8',
266
- 100: '#fce7f3',
267
- 200: '#fbcfe8',
268
- 300: '#f9a8d4',
269
- 400: '#f472b6',
270
- 500: '#ec4899',
271
- 600: '#db2777',
272
- 700: '#be185d',
273
- 800: '#9d174d',
274
- 900: '#831843'
275
- },
276
- rose: {
277
- 50: '#fff1f2',
278
- 100: '#ffe4e6',
279
- 200: '#fecdd3',
280
- 300: '#fda4af',
281
- 400: '#fb7185',
282
- 500: '#f43f5e',
283
- 600: '#e11d48',
284
- 700: '#be123c',
285
- 800: '#9f1239',
286
- 900: '#881337'
287
- },
288
- get lightBlue () {
289
- warn({
290
- version: 'v2.2',
291
- from: 'lightBlue',
292
- to: 'sky'
293
- });
294
- return this.sky;
295
- },
296
- get warmGray () {
297
- warn({
298
- version: 'v3.0',
299
- from: 'warmGray',
300
- to: 'stone'
301
- });
302
- return this.stone;
303
- },
304
- get trueGray () {
305
- warn({
306
- version: 'v3.0',
307
- from: 'trueGray',
308
- to: 'neutral'
309
- });
310
- return this.neutral;
311
- },
312
- get coolGray () {
313
- warn({
314
- version: 'v3.0',
315
- from: 'coolGray',
316
- to: 'gray'
317
- });
318
- return this.gray;
319
- },
320
- get blueGray () {
321
- warn({
322
- version: 'v3.0',
323
- from: 'blueGray',
324
- to: 'slate'
325
- });
326
- return this.slate;
327
- }
328
- };
329
- exports.default = _default;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- exports.default = void 0;
6
- var _createPlugin = _interopRequireDefault(require("../util/createPlugin"));
7
- function _interopRequireDefault(obj) {
8
- return obj && obj.__esModule ? obj : {
9
- default: obj
10
- };
11
- }
12
- var _default = _createPlugin.default;
13
- exports.default = _default;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- exports.default = void 0;
6
- var _cloneDeep = require("../util/cloneDeep");
7
- var _defaultConfigStub = _interopRequireDefault(require("../../stubs/defaultConfig.stub"));
8
- function _interopRequireDefault(obj) {
9
- return obj && obj.__esModule ? obj : {
10
- default: obj
11
- };
12
- }
13
- var _default = (0, _cloneDeep).cloneDeep(_defaultConfigStub.default);
14
- exports.default = _default;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- exports.default = void 0;
6
- var _cloneDeep = require("../util/cloneDeep");
7
- var _defaultConfigStub = _interopRequireDefault(require("../../stubs/defaultConfig.stub"));
8
- function _interopRequireDefault(obj) {
9
- return obj && obj.__esModule ? obj : {
10
- default: obj
11
- };
12
- }
13
- var _default = (0, _cloneDeep).cloneDeep(_defaultConfigStub.default.theme);
14
- exports.default = _default;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- exports.default = resolveConfig;
6
- var _resolveConfig = _interopRequireDefault(require("../util/resolveConfig"));
7
- var _getAllConfigs = _interopRequireDefault(require("../util/getAllConfigs"));
8
- function _interopRequireDefault(obj) {
9
- return obj && obj.__esModule ? obj : {
10
- default: obj
11
- };
12
- }
13
- function resolveConfig(...configs) {
14
- let [, ...defaultConfigs] = (0, _getAllConfigs).default(configs[0]);
15
- return (0, _resolveConfig).default([
16
- ...configs,
17
- ...defaultConfigs
18
- ]);
19
- }
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- exports.default = bigSign;
6
- function bigSign(bigIntValue) {
7
- return (bigIntValue > 0n) - (bigIntValue < 0n);
8
- }
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- exports.default = buildMediaQuery;
6
- function buildMediaQuery(screens) {
7
- screens = Array.isArray(screens) ? screens : [
8
- screens
9
- ];
10
- return screens.map((screen1)=>screen1.values.map((screen)=>{
11
- if (screen.raw !== undefined) {
12
- return screen.raw;
13
- }
14
- return [
15
- screen.min && `(min-width: ${screen.min})`,
16
- screen.max && `(max-width: ${screen.max})`,
17
- ].filter(Boolean).join(' and ');
18
- })
19
- ).join(', ');
20
- }
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- exports.cloneDeep = cloneDeep;
6
- function cloneDeep(value) {
7
- if (Array.isArray(value)) {
8
- return value.map((child)=>cloneDeep(child)
9
- );
10
- }
11
- if (typeof value === 'object' && value !== null) {
12
- return Object.fromEntries(Object.entries(value).map(([k, v])=>[
13
- k,
14
- cloneDeep(v)
15
- ]
16
- ));
17
- }
18
- return value;
19
- }
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- exports.default = cloneNodes;
6
- function cloneNodes(nodes, source = undefined, raws = undefined) {
7
- return nodes.map((node)=>{
8
- let cloned = node.clone();
9
- if (source !== undefined) {
10
- cloned.source = source;
11
- if ('walk' in cloned) {
12
- cloned.walk((child)=>{
13
- child.source = source;
14
- });
15
- }
16
- }
17
- if (raws !== undefined) {
18
- cloned.raws.tailwind = {
19
- ...cloned.raws.tailwind,
20
- ...raws
21
- };
22
- }
23
- return cloned;
24
- });
25
- }
package/lib/util/color.js DELETED
@@ -1,99 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- exports.parseColor = parseColor;
6
- exports.formatColor = formatColor;
7
- var _colorName = _interopRequireDefault(require("color-name"));
8
- function _interopRequireDefault(obj) {
9
- return obj && obj.__esModule ? obj : {
10
- default: obj
11
- };
12
- }
13
- let HEX = /^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;
14
- let SHORT_HEX = /^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;
15
- let VALUE = `(?:\\d+|\\d*\\.\\d+)%?`;
16
- let SEP = `(?:\\s*,\\s*|\\s+)`;
17
- let ALPHA_SEP = `\\s*[,/]\\s*`;
18
- let RGB = new RegExp(`^rgba?\\(\\s*(${VALUE})${SEP}(${VALUE})${SEP}(${VALUE})(?:${ALPHA_SEP}(${VALUE}))?\\s*\\)$`);
19
- let HSL = new RegExp(`^hsla?\\(\\s*((?:${VALUE})(?:deg|rad|grad|turn)?)${SEP}(${VALUE})${SEP}(${VALUE})(?:${ALPHA_SEP}(${VALUE}))?\\s*\\)$`);
20
- function parseColor(value) {
21
- if (typeof value !== 'string') {
22
- return null;
23
- }
24
- value = value.trim();
25
- if (value === 'transparent') {
26
- return {
27
- mode: 'rgb',
28
- color: [
29
- '0',
30
- '0',
31
- '0'
32
- ],
33
- alpha: '0'
34
- };
35
- }
36
- if (value in _colorName.default) {
37
- return {
38
- mode: 'rgb',
39
- color: _colorName.default[value].map((v)=>v.toString()
40
- )
41
- };
42
- }
43
- let hex = value.replace(SHORT_HEX, (_, r, g, b, a)=>[
44
- '#',
45
- r,
46
- r,
47
- g,
48
- g,
49
- b,
50
- b,
51
- a ? a + a : ''
52
- ].join('')
53
- ).match(HEX);
54
- if (hex !== null) {
55
- return {
56
- mode: 'rgb',
57
- color: [
58
- parseInt(hex[1], 16),
59
- parseInt(hex[2], 16),
60
- parseInt(hex[3], 16)
61
- ].map((v)=>v.toString()
62
- ),
63
- alpha: hex[4] ? (parseInt(hex[4], 16) / 255).toString() : undefined
64
- };
65
- }
66
- let rgbMatch = value.match(RGB);
67
- if (rgbMatch !== null) {
68
- var ref, ref1;
69
- return {
70
- mode: 'rgb',
71
- color: [
72
- rgbMatch[1],
73
- rgbMatch[2],
74
- rgbMatch[3]
75
- ].map((v)=>v.toString()
76
- ),
77
- alpha: (ref = rgbMatch[4]) === null || ref === void 0 ? void 0 : (ref1 = ref.toString) === null || ref1 === void 0 ? void 0 : ref1.call(ref)
78
- };
79
- }
80
- let hslMatch = value.match(HSL);
81
- if (hslMatch !== null) {
82
- var ref2, ref3;
83
- return {
84
- mode: 'hsl',
85
- color: [
86
- hslMatch[1],
87
- hslMatch[2],
88
- hslMatch[3]
89
- ].map((v)=>v.toString()
90
- ),
91
- alpha: (ref2 = hslMatch[4]) === null || ref2 === void 0 ? void 0 : (ref3 = ref2.toString) === null || ref3 === void 0 ? void 0 : ref3.call(ref2)
92
- };
93
- }
94
- return null;
95
- }
96
- function formatColor({ mode , color , alpha }) {
97
- let hasAlpha = alpha !== undefined;
98
- return `${mode}(${color.join(' ')}${hasAlpha ? ` / ${alpha}` : ''})`;
99
- }
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- exports.default = _default;
6
- function _default(pluginConfig, plugins) {
7
- if (pluginConfig === undefined) {
8
- return plugins;
9
- }
10
- const pluginNames = Array.isArray(pluginConfig) ? pluginConfig : [
11
- ...new Set(plugins.filter((pluginName)=>{
12
- return pluginConfig !== false && pluginConfig[pluginName] !== false;
13
- }).concat(Object.keys(pluginConfig).filter((pluginName)=>{
14
- return pluginConfig[pluginName] !== false;
15
- }))),
16
- ];
17
- return pluginNames;
18
- }
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- exports.default = void 0;
6
- function createPlugin(plugin, config) {
7
- return {
8
- handler: plugin,
9
- config
10
- };
11
- }
12
- createPlugin.withOptions = function(pluginFunction, configFunction = ()=>({})
13
- ) {
14
- const optionsFunction = function(options) {
15
- return {
16
- __options: options,
17
- handler: pluginFunction(options),
18
- config: configFunction(options)
19
- };
20
- };
21
- optionsFunction.__isOptionsFunction = true;
22
- // Expose plugin dependencies so that `object-hash` returns a different
23
- // value if anything here changes, to ensure a rebuild is triggered.
24
- optionsFunction.__pluginFunction = pluginFunction;
25
- optionsFunction.__configFunction = configFunction;
26
- return optionsFunction;
27
- };
28
- var _default = createPlugin;
29
- exports.default = _default;
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- exports.default = createUtilityPlugin;
6
- var _transformThemeValue = _interopRequireDefault(require("./transformThemeValue"));
7
- function _interopRequireDefault(obj) {
8
- return obj && obj.__esModule ? obj : {
9
- default: obj
10
- };
11
- }
12
- function createUtilityPlugin(themeKey, utilityVariations = [
13
- [
14
- themeKey,
15
- [
16
- themeKey
17
- ]
18
- ]
19
- ], { filterDefault =false , ...options } = {}) {
20
- let transformValue = (0, _transformThemeValue).default(themeKey);
21
- return function({ matchUtilities , theme }) {
22
- for (let utilityVariation of utilityVariations){
23
- let group = Array.isArray(utilityVariation[0]) ? utilityVariation : [
24
- utilityVariation
25
- ];
26
- var ref;
27
- matchUtilities(group.reduce((obj1, [classPrefix, properties])=>{
28
- return Object.assign(obj1, {
29
- [classPrefix]: (value)=>{
30
- return properties.reduce((obj, name)=>{
31
- if (Array.isArray(name)) {
32
- return Object.assign(obj, {
33
- [name[0]]: name[1]
34
- });
35
- }
36
- return Object.assign(obj, {
37
- [name]: transformValue(value)
38
- });
39
- }, {});
40
- }
41
- });
42
- }, {}), {
43
- ...options,
44
- values: filterDefault ? Object.fromEntries(Object.entries((ref = theme(themeKey)) !== null && ref !== void 0 ? ref : {}).filter(([modifier])=>modifier !== 'DEFAULT'
45
- )) : theme(themeKey)
46
- });
47
- }
48
- };
49
- }