frontend/.pnpm-store/v3/files/92/61a177959d52968b829b5cce0104c3bcd52b010da316b601c668a20534f1d4dd2f3c95eac9af71a517980afdc61c927e4d70c05c081ebfba29987e81906851

39 lines
1.0 KiB
Plaintext

import defaultConfig from '../../stubs/defaultConfig.stub.js'
import { flagEnabled } from '../featureFlags'
export default function getAllConfigs(config) {
const configs = (config?.presets ?? [defaultConfig])
.slice()
.reverse()
.flatMap((preset) => getAllConfigs(preset instanceof Function ? preset() : preset))
const features = {
// Add experimental configs here...
respectDefaultRingColorOpacity: {
theme: {
ringColor: ({ theme }) => ({
DEFAULT: '#3b82f67f',
...theme('colors'),
}),
},
},
disableColorOpacityUtilitiesByDefault: {
corePlugins: {
backgroundOpacity: false,
borderOpacity: false,
divideOpacity: false,
placeholderOpacity: false,
ringOpacity: false,
textOpacity: false,
},
},
}
const experimentals = Object.keys(features)
.filter((feature) => flagEnabled(config, feature))
.map((feature) => features[feature])
return [config, ...experimentals, ...configs]
}