diff --git a/packages/tailwindcss/src/compat/merge-into-theme.test.ts b/packages/tailwindcss/src/compat/apply-config-to-theme.test.ts similarity index 91% rename from packages/tailwindcss/src/compat/merge-into-theme.test.ts rename to packages/tailwindcss/src/compat/apply-config-to-theme.test.ts index d3d2ff96d..6627fd868 100644 --- a/packages/tailwindcss/src/compat/merge-into-theme.test.ts +++ b/packages/tailwindcss/src/compat/apply-config-to-theme.test.ts @@ -1,13 +1,13 @@ import { test } from 'vitest' import { buildDesignSystem } from '../design-system' import { Theme } from '../theme' -import { mergeIntoTheme } from './merge-into-theme' +import { applyConfigToTheme } from './apply-config-to-theme' test('Config values can be merged into the theme', ({ expect }) => { let theme = new Theme() let design = buildDesignSystem(theme) - mergeIntoTheme(design, [ + applyConfigToTheme(design, [ { config: { theme: { diff --git a/packages/tailwindcss/src/compat/merge-into-theme.ts b/packages/tailwindcss/src/compat/apply-config-to-theme.ts similarity index 97% rename from packages/tailwindcss/src/compat/merge-into-theme.ts rename to packages/tailwindcss/src/compat/apply-config-to-theme.ts index 479ff2d05..e62b2b741 100644 --- a/packages/tailwindcss/src/compat/merge-into-theme.ts +++ b/packages/tailwindcss/src/compat/apply-config-to-theme.ts @@ -2,7 +2,7 @@ import type { DesignSystem } from '../design-system' import { resolveConfig, type ConfigFile } from './config/resolve-config' import type { ResolvedConfig } from './config/types' -export function mergeIntoTheme(designSystem: DesignSystem, configs: ConfigFile[]) { +export function applyConfigToTheme(designSystem: DesignSystem, configs: ConfigFile[]) { let theme = resolveConfig(designSystem, configs).theme for (let [path, value] of themeableValues(theme)) { diff --git a/packages/tailwindcss/src/plugin-api.ts b/packages/tailwindcss/src/plugin-api.ts index 4b74811e0..6f86f30b0 100644 --- a/packages/tailwindcss/src/plugin-api.ts +++ b/packages/tailwindcss/src/plugin-api.ts @@ -1,11 +1,11 @@ import { substituteAtApply } from './apply' import { decl, rule, type AstNode } from './ast' import type { Candidate, NamedUtilityValue } from './candidate' +import { applyConfigToTheme } from './compat/apply-config-to-theme' import { createCompatConfig } from './compat/config/create-compat-config' import { resolveConfig, type ConfigFile } from './compat/config/resolve-config' import type { ResolvedConfig, UserConfig } from './compat/config/types' import { darkModePlugin } from './compat/dark-mode' -import { mergeIntoTheme } from './compat/merge-into-theme' import type { DesignSystem } from './design-system' import { createThemeFn } from './theme-fn' import { withAlpha, withNegative } from './utilities' @@ -369,7 +369,7 @@ export function registerPlugins( // Merge the user-configured theme keys into the design system. The compat // config would otherwise expand into namespaces like `background-color` which // core utilities already read from. - mergeIntoTheme(designSystem, userConfig) + applyConfigToTheme(designSystem, userConfig) return { pluginApi,