Home / File/ toolbar.ts — astro Source File

toolbar.ts — astro Source File

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

File typescript CoreAstro 4 imports 1 classes

Entity Profile

Dependency Diagram

graph LR
  ed2c3b72_5559_e363_d0e3_d0f262fd3936["toolbar.ts"]
  ec98291d_da42_0350_bc9f_3b52b09b5112["../../runtime/client/dev-toolbar/helpers.js"]
  ed2c3b72_5559_e363_d0e3_d0f262fd3936 --> ec98291d_da42_0350_bc9f_3b52b09b5112
  25ffd80a_e468_33f1_329e_5eb709b28b2a["../../runtime/client/dev-toolbar/toolbar.js"]
  ed2c3b72_5559_e363_d0e3_d0f262fd3936 --> 25ffd80a_e468_33f1_329e_5eb709b28b2a
  af6796b7_df62_9b1f_c5fc_dbdce9fa2c50["../../runtime/client/dev-toolbar/ui-library/icons.js"]
  ed2c3b72_5559_e363_d0e3_d0f262fd3936 --> af6796b7_df62_9b1f_c5fc_dbdce9fa2c50
  25062361_ebdb_dfa9_1003_deec7cea778d["../../runtime/client/dev-toolbar/ui-library/index.js"]
  ed2c3b72_5559_e363_d0e3_d0f262fd3936 --> 25062361_ebdb_dfa9_1003_deec7cea778d
  style ed2c3b72_5559_e363_d0e3_d0f262fd3936 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type {
	ToolbarAppEventTarget,
	ToolbarServerHelpers,
} from '../../runtime/client/dev-toolbar/helpers.js';
import type {
	AstroDevToolbar,
	DevToolbarCanvas,
} from '../../runtime/client/dev-toolbar/toolbar.js';
import type { Icon } from '../../runtime/client/dev-toolbar/ui-library/icons.js';
import type {
	DevToolbarBadge,
	DevToolbarButton,
	DevToolbarCard,
	DevToolbarHighlight,
	DevToolbarIcon,
	DevToolbarRadioCheckbox,
	DevToolbarSelect,
	DevToolbarToggle,
	DevToolbarTooltip,
	DevToolbarWindow,
} from '../../runtime/client/dev-toolbar/ui-library/index.js';

declare global {
	interface HTMLElementTagNameMap {
		'astro-dev-toolbar': AstroDevToolbar;
		'astro-dev-toolbar-window': DevToolbarWindow;
		'astro-dev-toolbar-app-canvas': DevToolbarCanvas;
		'astro-dev-toolbar-tooltip': DevToolbarTooltip;
		'astro-dev-toolbar-highlight': DevToolbarHighlight;
		'astro-dev-toolbar-toggle': DevToolbarToggle;
		'astro-dev-toolbar-badge': DevToolbarBadge;
		'astro-dev-toolbar-button': DevToolbarButton;
		'astro-dev-toolbar-icon': DevToolbarIcon;
		'astro-dev-toolbar-card': DevToolbarCard;
		'astro-dev-toolbar-select': DevToolbarSelect;
		'astro-dev-toolbar-radio-checkbox': DevToolbarRadioCheckbox;
	}
}

type DevToolbarAppMeta = {
	id: string;
	name: string;
	icon?: Icon;
};

// The param passed to `addDevToolbarApp` in the integration
export type DevToolbarAppEntry = DevToolbarAppMeta & {
	entrypoint: string | URL;
};

// Public API for the dev toolbar
export type DevToolbarApp = {
	init?(
		canvas: ShadowRoot,
		app: ToolbarAppEventTarget,
		server: ToolbarServerHelpers,
	): void | Promise<void>;
	beforeTogglingOff?(canvas: ShadowRoot): boolean | Promise<boolean>;
};

// An app that has been loaded and as such contain all of its properties
export type ResolvedDevToolbarApp = DevToolbarAppMeta & DevToolbarApp;

export type DevToolbarPlacement = 'bottom-left' | 'bottom-center' | 'bottom-right';

export type DevToolbarMetadata = Window &
	typeof globalThis & {
		__astro_dev_toolbar__: {
			root: string;
			version: string;
			latestAstroVersion: string | undefined;
			debugInfo: string;
			placement: DevToolbarPlacement | undefined;
		};
	};

Domain

Dependencies

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

Frequently Asked Questions

What does toolbar.ts do?
toolbar.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain.
What does toolbar.ts depend on?
toolbar.ts imports 4 module(s): ../../runtime/client/dev-toolbar/helpers.js, ../../runtime/client/dev-toolbar/toolbar.js, ../../runtime/client/dev-toolbar/ui-library/icons.js, ../../runtime/client/dev-toolbar/ui-library/index.js.
Where is toolbar.ts in the architecture?
toolbar.ts is located at packages/astro/src/types/public/toolbar.ts (domain: CoreAstro, directory: packages/astro/src/types/public).

Analyze Your Own Codebase

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

Try Supermodel Free