Home / Class/ DevToolbarWindow Class — astro Architecture

DevToolbarWindow Class — astro Architecture

Architecture documentation for the DevToolbarWindow class in window.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  070fa425_a66f_4317_5d41_ecd0751196f7["DevToolbarWindow"]
  a7527b18_8ed0_4943_e431_144ebf0343c5["window.ts"]
  070fa425_a66f_4317_5d41_ecd0751196f7 -->|defined in| a7527b18_8ed0_4943_e431_144ebf0343c5
  5fadb331_0cc5_1829_3ede_a00204036fa7["placement()"]
  070fa425_a66f_4317_5d41_ecd0751196f7 -->|method| 5fadb331_0cc5_1829_3ede_a00204036fa7
  ee4b1ab7_c746_a79f_f136_e879a1d41c55["constructor()"]
  070fa425_a66f_4317_5d41_ecd0751196f7 -->|method| ee4b1ab7_c746_a79f_f136_e879a1d41c55
  7ddf2870_34df_71d6_ac5d_b88c66c2e7db["connectedCallback()"]
  070fa425_a66f_4317_5d41_ecd0751196f7 -->|method| 7ddf2870_34df_71d6_ac5d_b88c66c2e7db
  a75a9620_3b53_9177_dc81_b1fa89069735["attributeChangedCallback()"]
  070fa425_a66f_4317_5d41_ecd0751196f7 -->|method| a75a9620_3b53_9177_dc81_b1fa89069735
  2e15ff54_fbc1_3739_6921_6e7f1562d9ec["updateStyle()"]
  070fa425_a66f_4317_5d41_ecd0751196f7 -->|method| 2e15ff54_fbc1_3739_6921_6e7f1562d9ec

Relationship Graph

Source Code

packages/astro/src/runtime/client/dev-toolbar/ui-library/window.ts lines 11–140

export class DevToolbarWindow extends HTMLElement {
	shadowRoot: ShadowRoot;
	_placement: Placement = defaultSettings.placement;

	get placement() {
		return this._placement;
	}
	set placement(value) {
		if (!isValidPlacement(value)) {
			settings.logger.error(
				`Invalid placement: ${value}, expected one of ${placements.join(', ')}, got ${value}.`,
			);
			return;
		}
		this._placement = value;
		this.updateStyle();
	}

	static observedAttributes = ['placement'];

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

	async connectedCallback() {
		this.shadowRoot.innerHTML = `
			<style>
				:host {
					box-sizing: border-box;
					display: flex;
					flex-direction: column;
					background: linear-gradient(0deg, #13151A, #13151A), linear-gradient(0deg, #343841, #343841);
					border: 1px solid rgba(52, 56, 65, 1);
					width: min(640px, 100%);
					max-height: 480px;
					border-radius: 12px;
					padding: 24px;
					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";
					color: rgba(191, 193, 201, 1);
					position: fixed;
					z-index: 999999999;
					bottom: 72px;
					box-shadow: 0px 0px 0px 0px rgba(19, 21, 26, 0.30), 0px 1px 2px 0px rgba(19, 21, 26, 0.29), 0px 4px 4px 0px rgba(19, 21, 26, 0.26), 0px 10px 6px 0px rgba(19, 21, 26, 0.15), 0px 17px 7px 0px rgba(19, 21, 26, 0.04), 0px 26px 7px 0px rgba(19, 21, 26, 0.01);
				}

				@media (forced-colors: active) {
					:host {
						background: white;
					}
				}

				@media (max-width: 640px) {
					:host {
						border-radius: 0;
					}
				}

				::slotted(h1), ::slotted(h2), ::slotted(h3), ::slotted(h4), ::slotted(h5) {
					font-weight: 600;
					color: #fff;
				}

				::slotted(h1) {
					font-size: 22px;
				}

				::slotted(h2) {
					font-size: 20px;
				}

				::slotted(h3) {
					font-size: 18px;
				}

				::slotted(h4) {
					font-size: 16px;
				}

				::slotted(h5) {
					font-size: 14px;

Domain

Frequently Asked Questions

What is the DevToolbarWindow class?
DevToolbarWindow is a class in the astro codebase, defined in packages/astro/src/runtime/client/dev-toolbar/ui-library/window.ts.
Where is DevToolbarWindow defined?
DevToolbarWindow is defined in packages/astro/src/runtime/client/dev-toolbar/ui-library/window.ts at line 11.

Analyze Your Own Codebase

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

Try Supermodel Free