tailwindcss 0.0.0-insiders.ca1dfd6 → 0.0.0-insiders.ca7b10e

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