Home / Function/ applyTransform() — ui Function Reference

applyTransform() — ui Function Reference

Architecture documentation for the applyTransform() function in transform-style-map.test.ts from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  7187d3fd_4c21_15b6_f2d3_d87a94dd4465["applyTransform()"]
  b6929276_0c11_78e4_0d6e_5cbe870a5cec["transform-style-map.test.ts"]
  7187d3fd_4c21_15b6_f2d3_d87a94dd4465 -->|defined in| b6929276_0c11_78e4_0d6e_5cbe870a5cec
  69e29c3a_597d_3ecf_b7be_50b09c93f556["transformStyleMap()"]
  7187d3fd_4c21_15b6_f2d3_d87a94dd4465 -->|calls| 69e29c3a_597d_3ecf_b7be_50b09c93f556
  style 7187d3fd_4c21_15b6_f2d3_d87a94dd4465 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/shadcn/src/styles/transform-style-map.test.ts lines 11–24

async function applyTransform(source: string, styleMap: StyleMap) {
  const project = new Project({
    useInMemoryFileSystem: true,
  })

  const sourceFile = project.createSourceFile("component.tsx", source, {
    scriptKind: ScriptKind.TSX,
    overwrite: true,
  })

  await transformStyleMap({ sourceFile, styleMap })

  return sourceFile.getText()
}

Subdomains

Frequently Asked Questions

What does applyTransform() do?
applyTransform() is a function in the ui codebase, defined in packages/shadcn/src/styles/transform-style-map.test.ts.
Where is applyTransform() defined?
applyTransform() is defined in packages/shadcn/src/styles/transform-style-map.test.ts at line 11.
What does applyTransform() call?
applyTransform() calls 1 function(s): transformStyleMap.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free