apply-keyframes-to-theme.ts — tailwindcss Source File
Architecture documentation for apply-keyframes-to-theme.ts, a typescript file in the tailwindcss codebase. 8 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR c366ff81_32f3_ab43_fb66_6ea38913c09a["apply-keyframes-to-theme.ts"] b9cbffa4_c352_cf3c_268f_cbb174fb3a47["ast.ts"] c366ff81_32f3_ab43_fb66_6ea38913c09a --> b9cbffa4_c352_cf3c_268f_cbb174fb3a47 2f6881be_62d9_4b96_7331_a962ced095f7["atRule"] c366ff81_32f3_ab43_fb66_6ea38913c09a --> 2f6881be_62d9_4b96_7331_a962ced095f7 bdedd2f6_da4b_69dc_e990_0814b59fbe6e["design-system.ts"] c366ff81_32f3_ab43_fb66_6ea38913c09a --> bdedd2f6_da4b_69dc_e990_0814b59fbe6e 665aa4ed_d86e_30e5_80d5_cd56b8ca8b62["DesignSystem"] c366ff81_32f3_ab43_fb66_6ea38913c09a --> 665aa4ed_d86e_30e5_80d5_cd56b8ca8b62 479eaf18_f640_94ff_bd07_456688f9ac14["types.ts"] c366ff81_32f3_ab43_fb66_6ea38913c09a --> 479eaf18_f640_94ff_bd07_456688f9ac14 da7f1255_7a1d_1af3_bf27_bd71a9a7671e["ResolvedConfig"] c366ff81_32f3_ab43_fb66_6ea38913c09a --> da7f1255_7a1d_1af3_bf27_bd71a9a7671e da5d1116_ab2a_437a_6b13_c1429fd546fa["plugin-api.ts"] c366ff81_32f3_ab43_fb66_6ea38913c09a --> da5d1116_ab2a_437a_6b13_c1429fd546fa 2e310eb5_4501_1335_aeaa_0b16be3953d3["objectToAst"] c366ff81_32f3_ab43_fb66_6ea38913c09a --> 2e310eb5_4501_1335_aeaa_0b16be3953d3 ffe9c87e_35ad_f431_9625_80fc875792a7["migrate-js-config.ts"] ffe9c87e_35ad_f431_9625_80fc875792a7 --> c366ff81_32f3_ab43_fb66_6ea38913c09a 2745c5e0_8ea4_a1c7_4f84_369746e3eb63["apply-compat-hooks.ts"] 2745c5e0_8ea4_a1c7_4f84_369746e3eb63 --> c366ff81_32f3_ab43_fb66_6ea38913c09a 941f96f9_7e58_b2b3_cebb_9e3b8be15d61["apply-keyframes-to-theme.test.ts"] 941f96f9_7e58_b2b3_cebb_9e3b8be15d61 --> c366ff81_32f3_ab43_fb66_6ea38913c09a style c366ff81_32f3_ab43_fb66_6ea38913c09a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { atRule, type AtRule } from '../ast'
import type { DesignSystem } from '../design-system'
import type { ResolvedConfig } from './config/types'
import { objectToAst } from './plugin-api'
export function applyKeyframesToTheme(
designSystem: DesignSystem,
resolvedConfig: Pick<ResolvedConfig, 'theme'>,
) {
for (let rule of keyframesToRules(resolvedConfig)) {
designSystem.theme.addKeyframes(rule)
}
}
export function keyframesToRules(resolvedConfig: Pick<ResolvedConfig, 'theme'>): AtRule[] {
let rules: AtRule[] = []
if ('keyframes' in resolvedConfig.theme) {
for (let [name, keyframe] of Object.entries(resolvedConfig.theme.keyframes)) {
rules.push(atRule('@keyframes', name, objectToAst(keyframe as any)))
}
}
return rules
}
Domain
Subdomains
Imported By
Source
Frequently Asked Questions
What does apply-keyframes-to-theme.ts do?
apply-keyframes-to-theme.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 apply-keyframes-to-theme.ts?
apply-keyframes-to-theme.ts defines 2 function(s): applyKeyframesToTheme, keyframesToRules.
What does apply-keyframes-to-theme.ts depend on?
apply-keyframes-to-theme.ts imports 8 module(s): DesignSystem, ResolvedConfig, ast.ts, atRule, design-system.ts, objectToAst, plugin-api.ts, types.ts.
What files import apply-keyframes-to-theme.ts?
apply-keyframes-to-theme.ts is imported by 3 file(s): apply-compat-hooks.ts, apply-keyframes-to-theme.test.ts, migrate-js-config.ts.
Where is apply-keyframes-to-theme.ts in the architecture?
apply-keyframes-to-theme.ts is located at packages/tailwindcss/src/compat/apply-keyframes-to-theme.ts (domain: Oxide, subdomain: Extractor, directory: packages/tailwindcss/src/compat).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free