Home / File/ ast.ts — tailwindcss Source File

ast.ts — tailwindcss Source File

Architecture documentation for ast.ts, a typescript file in the tailwindcss codebase. 19 imports, 35 dependents.

File typescript PostCSSPlugin AST 19 imports 35 dependents 14 functions

Entity Profile

Dependency Diagram

graph LR
  b9cbffa4_c352_cf3c_268f_cbb174fb3a47["ast.ts"]
  8be42ab2_7e92_957a_da93_ffe4c7d161fe["css-parser.ts"]
  b9cbffa4_c352_cf3c_268f_cbb174fb3a47 --> 8be42ab2_7e92_957a_da93_ffe4c7d161fe
  5a24e873_f8af_b5d4_26ce_8f5de8d9fe83["parseAtRule"]
  b9cbffa4_c352_cf3c_268f_cbb174fb3a47 --> 5a24e873_f8af_b5d4_26ce_8f5de8d9fe83
  bdedd2f6_da4b_69dc_e990_0814b59fbe6e["design-system.ts"]
  b9cbffa4_c352_cf3c_268f_cbb174fb3a47 --> bdedd2f6_da4b_69dc_e990_0814b59fbe6e
  665aa4ed_d86e_30e5_80d5_cd56b8ca8b62["DesignSystem"]
  b9cbffa4_c352_cf3c_268f_cbb174fb3a47 --> 665aa4ed_d86e_30e5_80d5_cd56b8ca8b62
  45262882_ddec_eb81_dedb_b4f286a3f721["source.ts"]
  b9cbffa4_c352_cf3c_268f_cbb174fb3a47 --> 45262882_ddec_eb81_dedb_b4f286a3f721
  c559b871_eb1d_407d_d482_821ec44dea54["Source"]
  b9cbffa4_c352_cf3c_268f_cbb174fb3a47 --> c559b871_eb1d_407d_d482_821ec44dea54
  0befe1e4_cbdb_e481_9c0a_5c5c6d3e2a01["SourceLocation"]
  b9cbffa4_c352_cf3c_268f_cbb174fb3a47 --> 0befe1e4_cbdb_e481_9c0a_5c5c6d3e2a01
  e28cd4a7_4e1a_e79b_76f1_86c479c6640d["theme.ts"]
  b9cbffa4_c352_cf3c_268f_cbb174fb3a47 --> e28cd4a7_4e1a_e79b_76f1_86c479c6640d
  e7a2e966_188e_28f5_d9d6_e54e27e0d0f2["Theme"]
  b9cbffa4_c352_cf3c_268f_cbb174fb3a47 --> e7a2e966_188e_28f5_d9d6_e54e27e0d0f2
  f504aa6c_d026_cb8e_0a17_653514de8526["ThemeOptions"]
  b9cbffa4_c352_cf3c_268f_cbb174fb3a47 --> f504aa6c_d026_cb8e_0a17_653514de8526
  28a2f72d_350c_6647_bf9d_77c69e637045["default-map.ts"]
  b9cbffa4_c352_cf3c_268f_cbb174fb3a47 --> 28a2f72d_350c_6647_bf9d_77c69e637045
  cfb4af0e_7b2d_34a1_693a_90088443cfec["DefaultMap"]
  b9cbffa4_c352_cf3c_268f_cbb174fb3a47 --> cfb4af0e_7b2d_34a1_693a_90088443cfec
  1bf56ca1_f8c2_89ae_a95d_926dfbb81670["variables.ts"]
  b9cbffa4_c352_cf3c_268f_cbb174fb3a47 --> 1bf56ca1_f8c2_89ae_a95d_926dfbb81670
  44fc256b_22c1_3ae2_924e_7d583f63c030["extractUsedVariables"]
  b9cbffa4_c352_cf3c_268f_cbb174fb3a47 --> 44fc256b_22c1_3ae2_924e_7d583f63c030
  style b9cbffa4_c352_cf3c_268f_cbb174fb3a47 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { Polyfills } from '.'
import { parseAtRule } from './css-parser'
import type { DesignSystem } from './design-system'
import type { Source, SourceLocation } from './source-maps/source'
import { Theme, ThemeOptions } from './theme'
import { DefaultMap } from './utils/default-map'
import { extractUsedVariables } from './utils/variables'
import * as ValueParser from './value-parser'
import { walk, WalkAction, type VisitContext } from './walk'

const AT_SIGN = 0x40

export type StyleRule = {
  kind: 'rule'
  selector: string
  nodes: AstNode[]

  src?: SourceLocation
  dst?: SourceLocation
}

export type AtRule = {
  kind: 'at-rule'
  name: string
  params: string
  nodes: AstNode[]

  src?: SourceLocation
  dst?: SourceLocation
}

export type Declaration = {
  kind: 'declaration'
  property: string
  value: string | undefined
  important: boolean

  src?: SourceLocation
  dst?: SourceLocation
}

export type Comment = {
  kind: 'comment'
  value: string

  src?: SourceLocation
  dst?: SourceLocation
}

export type Context = {
  kind: 'context'
  context: Record<string, string | boolean>
  nodes: AstNode[]

  src?: undefined
  dst?: undefined
}

export type AtRoot = {
  kind: 'at-root'
// ... (874 more lines)

Domain

Subdomains

Imported By

Frequently Asked Questions

What does ast.ts do?
ast.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the PostCSSPlugin domain, AST subdomain.
What functions are defined in ast.ts?
ast.ts defines 14 function(s): atRoot, atRule, cloneAstNode, comment, context, cssContext, decl, extractKeyframeNames, findNode, isVariableUsed, and 4 more.
What does ast.ts depend on?
ast.ts imports 19 module(s): ., DefaultMap, DesignSystem, Source, SourceLocation, Theme, ThemeOptions, WalkAction, and 11 more.
What files import ast.ts?
ast.ts is imported by 35 file(s): apply-compat-hooks.ts, apply-keyframes-to-theme.test.ts, apply-keyframes-to-theme.ts, apply.ts, ast.bench.ts, ast.test.ts, ast.test.ts, ast.ts, and 27 more.
Where is ast.ts in the architecture?
ast.ts is located at packages/tailwindcss/src/ast.ts (domain: PostCSSPlugin, subdomain: AST, directory: packages/tailwindcss/src).

Analyze Your Own Codebase

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

Try Supermodel Free