transformDirection() — ui Function Reference
Architecture documentation for the transformDirection() function in transform-rtl.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 7f810649_4c06_02fa_4309_35dc67791e41["transformDirection()"] 800d6a7b_126c_42b5_bf8e_f313b0852251["transform-rtl.ts"] 7f810649_4c06_02fa_4309_35dc67791e41 -->|defined in| 800d6a7b_126c_42b5_bf8e_f313b0852251 1c2c6582_0b98_c637_71b3_268008d4d10c["applyRtlTransformToSourceFile()"] 7f810649_4c06_02fa_4309_35dc67791e41 -->|calls| 1c2c6582_0b98_c637_71b3_268008d4d10c style 7f810649_4c06_02fa_4309_35dc67791e41 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/shadcn/src/utils/transformers/transform-rtl.ts lines 109–126
export async function transformDirection(source: string, rtl: boolean) {
if (!rtl) {
return source
}
const project = new Project({
useInMemoryFileSystem: true,
})
const sourceFile = project.createSourceFile("component.tsx", source, {
scriptKind: ScriptKind.TSX,
overwrite: true,
})
applyRtlTransformToSourceFile(sourceFile)
return sourceFile.getText()
}
Domain
Subdomains
Source
Frequently Asked Questions
What does transformDirection() do?
transformDirection() is a function in the ui codebase, defined in packages/shadcn/src/utils/transformers/transform-rtl.ts.
Where is transformDirection() defined?
transformDirection() is defined in packages/shadcn/src/utils/transformers/transform-rtl.ts at line 109.
What does transformDirection() call?
transformDirection() calls 1 function(s): applyRtlTransformToSourceFile.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free