Home / File/ html-data.ts — astro Source File

html-data.ts — astro Source File

Architecture documentation for html-data.ts, a typescript file in the astro codebase. 1 imports, 0 dependents.

File typescript CoreAstro RenderingEngine 1 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  cf16c6e9_d961_358e_5bf5_eb4314a70713["html-data.ts"]
  4e2ee814_ff7b_a348_0e3a_6e6d7b34afb6["vscode-html-languageservice"]
  cf16c6e9_d961_358e_5bf5_eb4314a70713 --> 4e2ee814_ff7b_a348_0e3a_6e6d7b34afb6
  style cf16c6e9_d961_358e_5bf5_eb4314a70713 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { getDefaultHTMLDataProvider, newHTMLDataProvider } from 'vscode-html-languageservice';

const defaultProvider = getDefaultHTMLDataProvider();
const slotAttr = defaultProvider.provideAttributes('div').find((attr) => attr.name === 'slot')!;

export const classListAttribute = newHTMLDataProvider('class-list', {
	version: 1,
	globalAttributes: [
		{
			name: 'class:list',
			description:
				'Utility to provide a list of classes of the element. Takes an array of class values and converts them into a class string.',
			references: [
				{
					name: 'Astro reference',
					url: 'https://docs.astro.build/en/reference/directives-reference/#classlist',
				},
			],
		},
	],
});

export const astroElements = newHTMLDataProvider('astro-elements', {
	version: 1,
	tags: [
		{
			name: 'slot',
			description:
				'The slot element is a placeholder for external HTML content, allowing you to inject (or “slot”) child elements from other files into your component template.',
			references: [
				{
					name: 'Astro reference',
					url: 'https://docs.astro.build/en/basics/astro-components/#slots',
				},
			],
			attributes: [
				{
					name: 'name',
					description:
						'The name attribute allows you to pass only HTML elements with the corresponding slot name into a slot’s location.',
					references: [
						{
							name: 'Astro reference',
							url: 'https://docs.astro.build/en/basics/astro-components/#named-slots',
						},
					],
				},
			],
		},
		{
			name: 'script',
			attributes: [
				{
					// The VS Code tag definitions does not provide a description for the deprecated `charset` attribute on script tags
					// Which mean that since we get no hover info for this, we instead get JSX hover info. So we'll just specify a description ourselves for this specific case
					name: 'charset',
					description:
						"**Deprecated**\n\nIt's unnecessary to specify the charset attribute, because documents must use UTF-8, and the script element inherits its character encoding from the document.",
				},
				{
// ... (237 more lines)

Domain

Subdomains

Functions

Dependencies

  • vscode-html-languageservice

Frequently Asked Questions

What does html-data.ts do?
html-data.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, RenderingEngine subdomain.
What functions are defined in html-data.ts?
html-data.ts defines 1 function(s): slotAttr.
What does html-data.ts depend on?
html-data.ts imports 1 module(s): vscode-html-languageservice.
Where is html-data.ts in the architecture?
html-data.ts is located at packages/language-tools/language-server/src/plugins/html-data.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/language-tools/language-server/src/plugins).

Analyze Your Own Codebase

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

Try Supermodel Free