constants.ts — astro Source File
Architecture documentation for constants.ts, a typescript file in the astro codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 1460cf90_8995_bbf3_2ecf_d2335778edd2["constants.ts"] ea387312_d0a2_bb52_dafc_3872f7307f95["../../src/assets/fonts/types.js"] 1460cf90_8995_bbf3_2ecf_d2335778edd2 --> ea387312_d0a2_bb52_dafc_3872f7307f95 style 1460cf90_8995_bbf3_2ecf_d2335778edd2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { Defaults, FontType } from './types.js';
export const DEFAULTS: Defaults = {
weights: ['400'],
styles: ['normal', 'italic'],
subsets: ['latin'],
// Technically serif is the browser default but most websites these days use sans-serif
fallbacks: ['sans-serif'],
optimizedFallbacks: true,
formats: ['woff2'],
};
export const VIRTUAL_MODULE_ID = 'virtual:astro:assets/fonts/internal';
export const RESOLVED_VIRTUAL_MODULE_ID = '\0' + VIRTUAL_MODULE_ID;
export const RUNTIME_VIRTUAL_MODULE_ID = 'virtual:astro:assets/fonts/runtime';
export const RESOLVED_RUNTIME_VIRTUAL_MODULE_ID = '\0' + RUNTIME_VIRTUAL_MODULE_ID;
export const ASSETS_DIR = 'fonts';
export const CACHE_DIR = './fonts/';
export const FONT_TYPES = ['woff2', 'woff', 'otf', 'ttf', 'eot'] as const;
export const FONT_FORMATS: Array<{ type: FontType; format: string }> = [
{ type: 'woff2', format: 'woff2' },
{ type: 'woff', format: 'woff' },
{ type: 'otf', format: 'opentype' },
{ type: 'ttf', format: 'truetype' },
{ type: 'eot', format: 'embedded-opentype' },
];
export const GENERIC_FALLBACK_NAMES = [
'serif',
'sans-serif',
'monospace',
'cursive',
'fantasy',
'system-ui',
'ui-serif',
'ui-sans-serif',
'ui-monospace',
'ui-rounded',
'emoji',
'math',
'fangsong',
] as const;
export const FONTS_TYPES_FILE = 'fonts.d.ts';
Domain
Dependencies
- ../../src/assets/fonts/types.js
Source
Frequently Asked Questions
What does constants.ts do?
constants.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain.
What does constants.ts depend on?
constants.ts imports 1 module(s): ../../src/assets/fonts/types.js.
Where is constants.ts in the architecture?
constants.ts is located at packages/astro/src/assets/fonts/constants.ts (domain: CoreAstro, directory: packages/astro/src/assets/fonts).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free