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