Home / File/ ast.ts — tailwindcss Source File

ast.ts — tailwindcss Source File

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

File typescript NodeBridge Compiler 16 imports 35 dependents 14 functions

Entity Profile

Dependency Diagram

graph LR
  42640952_ea63_55f1_1ff1_00816e2980ae["ast.ts"]
  54851997_7544_bab2_96ab_548e5f5df205["css-parser.ts"]
  42640952_ea63_55f1_1ff1_00816e2980ae --> 54851997_7544_bab2_96ab_548e5f5df205
  2cd5e680_b143_2eca_cc9b_084ae471679f["parseAtRule"]
  42640952_ea63_55f1_1ff1_00816e2980ae --> 2cd5e680_b143_2eca_cc9b_084ae471679f
  7fd72d4c_e95c_d849_1002_1e1c9d8aca1a["design-system.ts"]
  42640952_ea63_55f1_1ff1_00816e2980ae --> 7fd72d4c_e95c_d849_1002_1e1c9d8aca1a
  224e6d20_656a_4689_b56d_bc18bf3b80d9["source.ts"]
  42640952_ea63_55f1_1ff1_00816e2980ae --> 224e6d20_656a_4689_b56d_bc18bf3b80d9
  80295787_127f_69e6_91b3_4bea3a484544["theme.ts"]
  42640952_ea63_55f1_1ff1_00816e2980ae --> 80295787_127f_69e6_91b3_4bea3a484544
  734cf7ec_fb2a_2532_7b20_b3a815c7e3e6["Theme"]
  42640952_ea63_55f1_1ff1_00816e2980ae --> 734cf7ec_fb2a_2532_7b20_b3a815c7e3e6
  e64872c9_9835_78a8_455b_ad5e699f9543["ThemeOptions"]
  42640952_ea63_55f1_1ff1_00816e2980ae --> e64872c9_9835_78a8_455b_ad5e699f9543
  c056448b_f7a2_9149_54e8_f0f8470fe3aa["default-map.ts"]
  42640952_ea63_55f1_1ff1_00816e2980ae --> c056448b_f7a2_9149_54e8_f0f8470fe3aa
  bf2992f6_4a37_8536_70f8_94b13631027d["DefaultMap"]
  42640952_ea63_55f1_1ff1_00816e2980ae --> bf2992f6_4a37_8536_70f8_94b13631027d
  edaa1d08_cd1b_f279_0758_2debcf255efc["variables.ts"]
  42640952_ea63_55f1_1ff1_00816e2980ae --> edaa1d08_cd1b_f279_0758_2debcf255efc
  c74af9b2_8c4e_9508_1d10_dd910b7bf65e["extractUsedVariables"]
  42640952_ea63_55f1_1ff1_00816e2980ae --> c74af9b2_8c4e_9508_1d10_dd910b7bf65e
  1d3f1613_f144_938f_08f7_49039a46ad49["value-parser.ts"]
  42640952_ea63_55f1_1ff1_00816e2980ae --> 1d3f1613_f144_938f_08f7_49039a46ad49
  d1b39b63_c9d5_6c28_0206_0ddc8b895876["walk.ts"]
  42640952_ea63_55f1_1ff1_00816e2980ae --> d1b39b63_c9d5_6c28_0206_0ddc8b895876
  ed78da58_8727_ad98_120c_61f35cea357a["walk"]
  42640952_ea63_55f1_1ff1_00816e2980ae --> ed78da58_8727_ad98_120c_61f35cea357a
  style 42640952_ea63_55f1_1ff1_00816e2980ae 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 NodeBridge domain, Compiler 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 16 module(s): ., DefaultMap, Theme, ThemeOptions, WalkAction, css-parser.ts, default-map.ts, design-system.ts, and 8 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: NodeBridge, subdomain: Compiler, directory: packages/tailwindcss/src).

Analyze Your Own Codebase

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

Try Supermodel Free