migrate-max-width-screen.ts — tailwindcss Source File
Architecture documentation for migrate-max-width-screen.ts, a typescript file in the tailwindcss codebase. 2 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR 0d83b47a_e74a_3b55_ee7e_a502119edad8["migrate-max-width-screen.ts"] af1a6ece_0432_a556_fd63_8cb4a91f12ad["plugin-api.ts"] 0d83b47a_e74a_3b55_ee7e_a502119edad8 --> af1a6ece_0432_a556_fd63_8cb4a91f12ad 7fd72d4c_e95c_d849_1002_1e1c9d8aca1a["design-system.ts"] 0d83b47a_e74a_3b55_ee7e_a502119edad8 --> 7fd72d4c_e95c_d849_1002_1e1c9d8aca1a 8b540529_8fc5_4551_e488_9c97dc8c4661["migrate-max-width-screen.test.ts"] 8b540529_8fc5_4551_e488_9c97dc8c4661 --> 0d83b47a_e74a_3b55_ee7e_a502119edad8 75ba60a9_2614_1c57_ad40_3663d4315f3b["migrate.ts"] 75ba60a9_2614_1c57_ad40_3663d4315f3b --> 0d83b47a_e74a_3b55_ee7e_a502119edad8 style 0d83b47a_e74a_3b55_ee7e_a502119edad8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { Config } from '../../../../tailwindcss/src/compat/plugin-api'
import type { DesignSystem } from '../../../../tailwindcss/src/design-system'
export function migrateMaxWidthScreen(
designSystem: DesignSystem,
_userConfig: Config | null,
rawCandidate: string,
): string {
for (let candidate of designSystem.parseCandidate(rawCandidate)) {
if (
candidate.kind === 'functional' &&
candidate.root === 'max-w' &&
candidate.value?.value.startsWith('screen-')
) {
return designSystem.printCandidate({
...candidate,
value: {
...candidate.value,
value: `[theme(screens.${candidate.value.value.slice(7)})]`,
},
})
}
}
return rawCandidate
}
Domain
Subdomains
Functions
Dependencies
Imported By
Source
Frequently Asked Questions
What does migrate-max-width-screen.ts do?
migrate-max-width-screen.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the UpgradeToolkit domain, Codemods subdomain.
What functions are defined in migrate-max-width-screen.ts?
migrate-max-width-screen.ts defines 1 function(s): migrateMaxWidthScreen.
What does migrate-max-width-screen.ts depend on?
migrate-max-width-screen.ts imports 2 module(s): design-system.ts, plugin-api.ts.
What files import migrate-max-width-screen.ts?
migrate-max-width-screen.ts is imported by 2 file(s): migrate-max-width-screen.test.ts, migrate.ts.
Where is migrate-max-width-screen.ts in the architecture?
migrate-max-width-screen.ts is located at packages/@tailwindcss-upgrade/src/codemods/template/migrate-max-width-screen.ts (domain: UpgradeToolkit, subdomain: Codemods, directory: packages/@tailwindcss-upgrade/src/codemods/template).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free