Home / File/ tooltip.ts — astro Source File

tooltip.ts — astro Source File

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

File typescript DevToolbar ToolbarClient 1 imports 1 functions 1 classes

Entity Profile

Dependency Diagram

graph LR
  f62d44ee_b253_4dc0_0fea_9beec3518b24["tooltip.ts"]
  af6796b7_df62_9b1f_c5fc_dbdce9fa2c50["../../runtime/client/dev-toolbar/ui-library/icons.js"]
  f62d44ee_b253_4dc0_0fea_9beec3518b24 --> af6796b7_df62_9b1f_c5fc_dbdce9fa2c50
  style f62d44ee_b253_4dc0_0fea_9beec3518b24 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { getIconElement, type Icon, isDefinedIcon } from './icons.js';

export interface DevToolbarTooltipSection {
	title?: string;
	inlineTitle?: string;
	icon?: Icon;
	content?: string;
	clickAction?: () => void | Promise<void>;
	clickDescription?: string;
}

export class DevToolbarTooltip extends HTMLElement {
	sections: DevToolbarTooltipSection[] = [];
	shadowRoot: ShadowRoot;

	constructor() {
		super();
		this.shadowRoot = this.attachShadow({ mode: 'open' });
	}

	connectedCallback() {
		this.shadowRoot.innerHTML = `
			<style>
			:host {
				position: absolute;
				display: none;
				color: white;
				background: linear-gradient(0deg, #310A65, #310A65), linear-gradient(0deg, #7118E2, #7118E2);
				border: 1px solid rgba(113, 24, 226, 1);
				border-radius: 4px;
				padding: 0;
				font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
				font-size: 14px;
				margin: 0;
				z-index: 2000000001;
				max-width: 45ch;
				width: fit-content;
				min-width: 30ch;
				box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.30), 0px 1px 2px 0px rgba(0, 0, 0, 0.29), 0px 4px 4px 0px rgba(0, 0, 0, 0.26), 0px 10px 6px 0px rgba(0, 0, 0, 0.15), 0px 17px 7px 0px rgba(0, 0, 0, 0.04), 0px 26px 7px 0px rgba(0, 0, 0, 0.01);
			}

			:host([data-show="true"]) {
				display: block;
			}

			svg {
				vertical-align: bottom;
				margin-inline-end: 4px;
			}

			hr {
				border: 1px solid rgba(136, 58, 234, 0.33);
				padding: 0;
				margin: 0;
			}

			section {
				padding: 8px;
			}

// ... (113 more lines)

Domain

Subdomains

Functions

Dependencies

  • ../../runtime/client/dev-toolbar/ui-library/icons.js

Frequently Asked Questions

What does tooltip.ts do?
tooltip.ts is a source file in the astro codebase, written in typescript. It belongs to the DevToolbar domain, ToolbarClient subdomain.
What functions are defined in tooltip.ts?
tooltip.ts defines 1 function(s): Promise.
What does tooltip.ts depend on?
tooltip.ts imports 1 module(s): ../../runtime/client/dev-toolbar/ui-library/icons.js.
Where is tooltip.ts in the architecture?
tooltip.ts is located at packages/astro/src/runtime/client/dev-toolbar/ui-library/tooltip.ts (domain: DevToolbar, subdomain: ToolbarClient, directory: packages/astro/src/runtime/client/dev-toolbar/ui-library).

Analyze Your Own Codebase

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

Try Supermodel Free