source-map.ts — tailwindcss Source File
Architecture documentation for source-map.ts, a typescript file in the tailwindcss codebase. 9 imports, 4 dependents.
Entity Profile
Dependency Diagram
graph LR 2638fb39_6a36_5dfe_4705_961a0b5ff737["source-map.ts"] b9cbffa4_c352_cf3c_268f_cbb174fb3a47["ast.ts"] 2638fb39_6a36_5dfe_4705_961a0b5ff737 --> b9cbffa4_c352_cf3c_268f_cbb174fb3a47 28a2f72d_350c_6647_bf9d_77c69e637045["default-map.ts"] 2638fb39_6a36_5dfe_4705_961a0b5ff737 --> 28a2f72d_350c_6647_bf9d_77c69e637045 cfb4af0e_7b2d_34a1_693a_90088443cfec["DefaultMap"] 2638fb39_6a36_5dfe_4705_961a0b5ff737 --> cfb4af0e_7b2d_34a1_693a_90088443cfec 1b8f1c54_b1e9_e18d_0719_b7ad92808185["walk.ts"] 2638fb39_6a36_5dfe_4705_961a0b5ff737 --> 1b8f1c54_b1e9_e18d_0719_b7ad92808185 4982d9ce_98d4_85d9_44af_7cc47b93c482["walk"] 2638fb39_6a36_5dfe_4705_961a0b5ff737 --> 4982d9ce_98d4_85d9_44af_7cc47b93c482 c078df4e_9ae3_a02e_4feb_6380507fddd9["line-table.ts"] 2638fb39_6a36_5dfe_4705_961a0b5ff737 --> c078df4e_9ae3_a02e_4feb_6380507fddd9 1c8e1044_08e4_f6ad_7550_c4fa3667fbf3["createLineTable"] 2638fb39_6a36_5dfe_4705_961a0b5ff737 --> 1c8e1044_08e4_f6ad_7550_c4fa3667fbf3 45262882_ddec_eb81_dedb_b4f286a3f721["source.ts"] 2638fb39_6a36_5dfe_4705_961a0b5ff737 --> 45262882_ddec_eb81_dedb_b4f286a3f721 c559b871_eb1d_407d_d482_821ec44dea54["Source"] 2638fb39_6a36_5dfe_4705_961a0b5ff737 --> c559b871_eb1d_407d_d482_821ec44dea54 6219568c_788d_e9f4_1518_104d7994cc7f["source-maps.ts"] 6219568c_788d_e9f4_1518_104d7994cc7f --> 2638fb39_6a36_5dfe_4705_961a0b5ff737 23bd4e2f_c62c_a942_7014_8486569053ee["index.ts"] 23bd4e2f_c62c_a942_7014_8486569053ee --> 2638fb39_6a36_5dfe_4705_961a0b5ff737 b481c171_0dab_e8e5_e9d7_4ad779fa96da["source-map.test.ts"] b481c171_0dab_e8e5_e9d7_4ad779fa96da --> 2638fb39_6a36_5dfe_4705_961a0b5ff737 d163c53b_f756_bcd7_0cfb_254471aee1d2["translation-map.test.ts"] d163c53b_f756_bcd7_0cfb_254471aee1d2 --> 2638fb39_6a36_5dfe_4705_961a0b5ff737 style 2638fb39_6a36_5dfe_4705_961a0b5ff737 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { type AstNode } from '../ast'
import { DefaultMap } from '../utils/default-map'
import { walk } from '../walk'
import { createLineTable, type LineTable, type Position } from './line-table'
import type { Source } from './source'
// https://tc39.es/ecma426/#sec-original-position-record-type
export interface OriginalPosition extends Position {
source: DecodedSource
}
/**
* A "decoded" sourcemap
*
* @see https://tc39.es/ecma426/#decoded-source-map-record
*/
export interface DecodedSourceMap {
file: string | null
sources: DecodedSource[]
mappings: DecodedMapping[]
}
/**
* A "decoded" source
*
* @see https://tc39.es/ecma426/#decoded-source-record
*/
export interface DecodedSource {
url: string | null
content: string | null
ignore: boolean
}
/**
* A "decoded" mapping
*
* @see https://tc39.es/ecma426/#decoded-mapping-record
*/
export interface DecodedMapping {
// https://tc39.es/ecma426/#sec-original-position-record-type
originalPosition: OriginalPosition | null
// https://tc39.es/ecma426/#sec-position-record-type
generatedPosition: Position
name: string | null
}
/**
* Build a source map from the given AST.
*
* Our AST is build from flat CSS strings but there are many because we handle
* `@import`. This means that different nodes can have a different source.
*
* Instead of taking an input source map, we take the input CSS string we were
* originally given, as well as the source text for any imported files, and
* use that to generate a source map.
*
* We then require the use of other tools that can translate one or more
* "input" source maps into a final output source map. For example,
// ... (139 more lines)
Domain
Subdomains
Functions
Imported By
Source
Frequently Asked Questions
What does source-map.ts do?
source-map.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the Oxide domain, Extractor subdomain.
What functions are defined in source-map.ts?
source-map.ts defines 2 function(s): createSourceMap, createTranslationMap.
What does source-map.ts depend on?
source-map.ts imports 9 module(s): DefaultMap, Source, ast.ts, createLineTable, default-map.ts, line-table.ts, source.ts, walk, and 1 more.
What files import source-map.ts?
source-map.ts is imported by 4 file(s): index.ts, source-map.test.ts, source-maps.ts, translation-map.test.ts.
Where is source-map.ts in the architecture?
source-map.ts is located at packages/tailwindcss/src/source-maps/source-map.ts (domain: Oxide, subdomain: Extractor, directory: packages/tailwindcss/src/source-maps).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free