import { settings } from "./settings.js"; import { getIconElement, isDefinedIcon } from "./ui-library/icons.js"; const WS_EVENT_NAME = "astro-dev-toolbar"; const WS_EVENT_NAME_DEPRECATED = "astro-dev-overlay"; const HOVER_DELAY = 2 * 1e3; const DEVBAR_HITBOX_ABOVE = 42; class AstroDevToolbar extends HTMLElement { shadowRoot; delayedHideTimeout; devToolbarContainer; apps = []; hasBeenInitialized = false; // TODO: This should be dynamic based on the screen size or at least configurable, erika - 2023-11-29 customAppsToShow = 3; constructor() { super(); this.shadowRoot = this.attachShadow({ mode: "open" }); } /** * All one-time DOM setup runs through here. Only ever call this once, * in connectedCallback(), and protect it from being called again. */ init() { this.shadowRoot.innerHTML = `