full site update
This commit is contained in:
32
node_modules/astro/dist/runtime/client/dev-toolbar/toolbar.js
generated
vendored
32
node_modules/astro/dist/runtime/client/dev-toolbar/toolbar.js
generated
vendored
@@ -2,7 +2,6 @@ import { serverHelpers } from "./helpers.js";
|
||||
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 {
|
||||
@@ -344,7 +343,6 @@ class AstroDevToolbar extends HTMLElement {
|
||||
app.status = "ready";
|
||||
if (import.meta.hot) {
|
||||
import.meta.hot.send(`${WS_EVENT_NAME}:${app.id}:initialized`);
|
||||
import.meta.hot.send(`${WS_EVENT_NAME_DEPRECATED}:${app.id}:initialized`);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(`Failed to init app ${app.id}, error: ${e}`);
|
||||
@@ -421,27 +419,15 @@ class AstroDevToolbar extends HTMLElement {
|
||||
appCanvas.style.display = "none";
|
||||
appCanvas.removeAttribute("data-active");
|
||||
}
|
||||
[
|
||||
"app-toggled",
|
||||
// Deprecated
|
||||
// TODO: Remove in Astro 5.0
|
||||
"plugin-toggled"
|
||||
].forEach((eventName) => {
|
||||
app.eventTarget.dispatchEvent(
|
||||
new CustomEvent(eventName, {
|
||||
detail: {
|
||||
state: app.active,
|
||||
app
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
if (import.meta.hot) {
|
||||
import.meta.hot.send(`${WS_EVENT_NAME}:${app.id}:toggled`, { state: app.active });
|
||||
import.meta.hot.send(`${WS_EVENT_NAME_DEPRECATED}:${app.id}:toggled`, {
|
||||
state: app.active
|
||||
});
|
||||
}
|
||||
app.eventTarget.dispatchEvent(
|
||||
new CustomEvent("app-toggled", {
|
||||
detail: {
|
||||
state: app.active,
|
||||
app
|
||||
}
|
||||
})
|
||||
);
|
||||
import.meta.hot?.send(`${WS_EVENT_NAME}:${app.id}:toggled`, { state: app.active });
|
||||
return true;
|
||||
}
|
||||
isHidden() {
|
||||
|
Reference in New Issue
Block a user