astro 3.4.3 → 3.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/components/Code.astro +22 -2
  2. package/components/Image.astro +2 -2
  3. package/components/Picture.astro +17 -4
  4. package/dist/@types/astro.d.ts +1 -0
  5. package/dist/assets/internal.js +2 -0
  6. package/dist/assets/services/service.d.ts +2 -7
  7. package/dist/assets/types.d.ts +10 -4
  8. package/dist/core/config/schema.js +17 -2
  9. package/dist/core/constants.js +1 -1
  10. package/dist/core/dev/dev.js +1 -1
  11. package/dist/core/messages.js +2 -2
  12. package/dist/core/preview/static-preview-server.js +3 -1
  13. package/dist/core/preview/vite-plugin-astro-preview.js +13 -2
  14. package/dist/runtime/client/dev-overlay/entrypoint.js +2 -2
  15. package/dist/runtime/client/dev-overlay/overlay.d.ts +10 -2
  16. package/dist/runtime/client/dev-overlay/overlay.js +47 -28
  17. package/dist/runtime/client/dev-overlay/plugins/astro.d.ts +1 -0
  18. package/dist/runtime/client/dev-overlay/plugins/astro.js +44 -9
  19. package/dist/runtime/client/dev-overlay/plugins/audit.d.ts +2 -1
  20. package/dist/runtime/client/dev-overlay/plugins/audit.js +84 -15
  21. package/dist/runtime/client/dev-overlay/plugins/xray.d.ts +1 -0
  22. package/dist/runtime/client/dev-overlay/plugins/xray.js +22 -0
  23. package/dist/runtime/client/dev-overlay/ui-library/card.js +2 -0
  24. package/dist/runtime/client/dev-overlay/ui-library/icons.d.ts +3 -0
  25. package/dist/runtime/client/dev-overlay/ui-library/icons.js +4 -1
  26. package/dist/runtime/client/dev-overlay/ui-library/tooltip.js +1 -0
  27. package/dist/runtime/client/dev-overlay/ui-library/window.js +1 -0
  28. package/dist/transitions/router.js +1 -1
  29. package/dist/vite-plugin-scripts/index.js +2 -1
  30. package/package.json +1 -1
@@ -1,4 +1,7 @@
1
1
  ---
2
+ import path from 'node:path';
3
+ import fs from 'node:fs';
4
+ import { fileURLToPath } from 'node:url';
2
5
  import type {
3
6
  BuiltinLanguage,
4
7
  BuiltinTheme,
@@ -56,8 +59,25 @@ const {
56
59
 
57
60
  // shiki -> shikiji compat
58
61
  if (typeof lang === 'object') {
59
- // `id` renamed to `name
60
- if ((lang as any).id && !lang.name) {
62
+ // shikiji does not support `path`
63
+ // https://github.com/shikijs/shiki/blob/facb6ff37996129626f8066a5dccb4608e45f649/packages/shiki/src/loader.ts#L98
64
+ const langPath = (lang as any).path;
65
+ if (langPath) {
66
+ // shiki resolves path from within its package directory :shrug:
67
+ const astroRoot = fileURLToPath(new URL('../', import.meta.url));
68
+ const normalizedPath = path.isAbsolute(langPath) ? langPath : path.resolve(astroRoot, langPath);
69
+ try {
70
+ const content = fs.readFileSync(normalizedPath, 'utf-8');
71
+ const parsed = JSON.parse(content);
72
+ Object.assign(lang, parsed);
73
+ } catch (e) {
74
+ throw new Error(`Unable to find language file at ${normalizedPath}`, {
75
+ cause: e,
76
+ });
77
+ }
78
+ }
79
+ // `id` renamed to `name` (always override)
80
+ if ((lang as any).id) {
61
81
  lang.name = (lang as any).id;
62
82
  }
63
83
  // `grammar` flattened to lang itself
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  import { getImage, type LocalImageProps, type RemoteImageProps } from 'astro:assets';
3
3
  import { AstroError, AstroErrorData } from '../dist/core/errors/index.js';
4
+ import type { HTMLAttributes } from '../types';
4
5
 
5
6
  // The TypeScript diagnostic for JSX props uses the last member of the union to suggest props, so it would be better for
6
7
  // LocalImageProps to be last. Unfortunately, when we do this the error messages that remote images get are complete nonsense
@@ -24,8 +25,7 @@ if (typeof props.height === 'string') {
24
25
 
25
26
  const image = await getImage(props);
26
27
 
27
- const additionalAttributes: Record<string, any> = {};
28
-
28
+ const additionalAttributes: HTMLAttributes<'img'> = {};
29
29
  if (image.srcSet.values.length > 0) {
30
30
  additionalAttributes.srcset = image.srcSet.attribute;
31
31
  }
@@ -49,9 +49,16 @@ const fallbackImage = await getImage({
49
49
  densities: props.densities,
50
50
  });
51
51
 
52
- const additionalAttributes: Record<string, any> = {};
52
+ const imgAdditionalAttributes: HTMLAttributes<'img'> = {};
53
+ const sourceAdditionaAttributes: HTMLAttributes<'source'> = {};
54
+
55
+ // Propagate the `sizes` attribute to the `source` elements
56
+ if (props.sizes) {
57
+ sourceAdditionaAttributes.sizes = props.sizes;
58
+ }
59
+
53
60
  if (fallbackImage.srcSet.values.length > 0) {
54
- additionalAttributes.srcset = fallbackImage.srcSet.attribute;
61
+ imgAdditionalAttributes.srcset = fallbackImage.srcSet.attribute;
55
62
  }
56
63
  ---
57
64
 
@@ -62,8 +69,14 @@ if (fallbackImage.srcSet.values.length > 0) {
62
69
  props.densities || (!props.densities && !props.widths)
63
70
  ? `${image.src}${image.srcSet.values.length > 0 ? ', ' + image.srcSet.attribute : ''}`
64
71
  : image.srcSet.attribute;
65
- return <source srcset={srcsetAttribute} type={'image/' + image.options.format} />;
72
+ return (
73
+ <source
74
+ srcset={srcsetAttribute}
75
+ type={'image/' + image.options.format}
76
+ {...sourceAdditionaAttributes}
77
+ />
78
+ );
66
79
  })
67
80
  }
68
- <img src={fallbackImage.src} {...additionalAttributes} {...fallbackImage.attributes} />
81
+ <img src={fallbackImage.src} {...imgAdditionalAttributes} {...fallbackImage.attributes} />
69
82
  </picture>
@@ -2058,6 +2058,7 @@ export interface DevOverlayPlugin {
2058
2058
  name: string;
2059
2059
  icon: Icon;
2060
2060
  init?(canvas: ShadowRoot, eventTarget: EventTarget): void | Promise<void>;
2061
+ beforeTogglingOff?(canvas: ShadowRoot): boolean | Promise<boolean>;
2061
2062
  }
2062
2063
  export type DevOverlayMetadata = Window & typeof globalThis & {
2063
2064
  __astro_dev_overlay__: {
@@ -60,6 +60,7 @@ async function getImage(options, imageConfig) {
60
60
  let imageURL = await service.getURL(validatedOptions, imageConfig);
61
61
  let srcSets = await Promise.all(
62
62
  srcSetTransforms.map(async (srcSet) => ({
63
+ transform: srcSet.transform,
63
64
  url: await service.getURL(srcSet.transform, imageConfig),
64
65
  descriptor: srcSet.descriptor,
65
66
  attributes: srcSet.attributes
@@ -68,6 +69,7 @@ async function getImage(options, imageConfig) {
68
69
  if (isLocalService(service) && globalThis.astroAsset.addStaticImage && !(isRemoteImage(validatedOptions.src) && imageURL === validatedOptions.src)) {
69
70
  imageURL = globalThis.astroAsset.addStaticImage(validatedOptions);
70
71
  srcSets = srcSetTransforms.map((srcSet) => ({
72
+ transform: srcSet.transform,
71
73
  url: globalThis.astroAsset.addStaticImage(srcSet.transform),
72
74
  descriptor: srcSet.descriptor,
73
75
  attributes: srcSet.attributes
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  import type { AstroConfig } from '../../@types/astro.js';
3
- import type { ImageOutputFormat, ImageTransform } from '../types.js';
3
+ import type { ImageOutputFormat, ImageTransform, UnresolvedSrcSetValue } from '../types.js';
4
4
  export type ImageService = LocalImageService | ExternalImageService;
5
5
  export declare function isLocalService(service: ImageService | undefined): service is LocalImageService;
6
6
  export declare function parseQuality(quality: string): string | number;
@@ -10,11 +10,6 @@ type ImageConfig<T> = Omit<AstroConfig['image'], 'service'> & {
10
10
  config: T;
11
11
  };
12
12
  };
13
- type SrcSetValue = {
14
- transform: ImageTransform;
15
- descriptor?: string;
16
- attributes?: Record<string, any>;
17
- };
18
13
  interface SharedServiceProps<T extends Record<string, any> = Record<string, any>> {
19
14
  /**
20
15
  * Return the URL to the endpoint or URL your images are generated from.
@@ -31,7 +26,7 @@ interface SharedServiceProps<T extends Record<string, any> = Record<string, any>
31
26
  * While in most cases this is exclusively used for `srcset`, it can also be used in a more generic way to generate
32
27
  * multiple variants of the same image. For instance, you can use this to generate multiple aspect ratios or multiple formats.
33
28
  */
34
- getSrcSet?: (options: ImageTransform, imageConfig: ImageConfig<T>) => SrcSetValue[] | Promise<SrcSetValue[]>;
29
+ getSrcSet?: (options: ImageTransform, imageConfig: ImageConfig<T>) => UnresolvedSrcSetValue[] | Promise<UnresolvedSrcSetValue[]>;
35
30
  /**
36
31
  * Return any additional HTML attributes separate from `src` that your service requires to show the image properly.
37
32
  *
@@ -26,11 +26,17 @@ export interface ImageMetadata {
26
26
  format: ImageInputFormat;
27
27
  orientation?: number;
28
28
  }
29
- export interface SrcSetValue {
30
- url: string;
29
+ /**
30
+ * A yet to be completed with an url `SrcSetValue`. Other hooks will only see a resolved value, where the URL of the image has been added.
31
+ */
32
+ export type UnresolvedSrcSetValue = {
33
+ transform: ImageTransform;
31
34
  descriptor?: string;
32
- attributes?: Record<string, string>;
33
- }
35
+ attributes?: Record<string, any>;
36
+ };
37
+ export type SrcSetValue = UnresolvedSrcSetValue & {
38
+ url: string;
39
+ };
34
40
  /**
35
41
  * A yet to be resolved image transform. Used by `getImage`
36
42
  */
@@ -1,7 +1,8 @@
1
1
  import { markdownConfigDefaults } from "@astrojs/markdown-remark";
2
2
  import { bundledThemes } from "shikiji";
3
+ import fs from "node:fs";
3
4
  import path from "node:path";
4
- import { pathToFileURL } from "node:url";
5
+ import { fileURLToPath, pathToFileURL } from "node:url";
5
6
  import { z } from "zod";
6
7
  import { appendForwardSlash, prependForwardSlash, removeTrailingForwardSlash } from "../path.js";
7
8
  import "mdast-util-to-hast";
@@ -150,7 +151,21 @@ const AstroConfigSchema = z.object({
150
151
  langs: z.custom().array().transform((langs) => {
151
152
  for (const lang of langs) {
152
153
  if (typeof lang === "object") {
153
- if (lang.id && !lang.name) {
154
+ const langPath = lang.path;
155
+ if (langPath) {
156
+ const astroRoot = fileURLToPath(new URL("../../../", import.meta.url));
157
+ const normalizedPath = path.isAbsolute(langPath) ? langPath : path.resolve(astroRoot, langPath);
158
+ try {
159
+ const content = fs.readFileSync(normalizedPath, "utf-8");
160
+ const parsed = JSON.parse(content);
161
+ Object.assign(lang, parsed);
162
+ } catch (e) {
163
+ throw new Error(`Unable to find language file at ${normalizedPath}`, {
164
+ cause: e
165
+ });
166
+ }
167
+ }
168
+ if (lang.id) {
154
169
  lang.name = lang.id;
155
170
  }
156
171
  if (lang.grammar) {
@@ -1,4 +1,4 @@
1
- const ASTRO_VERSION = "3.4.3";
1
+ const ASTRO_VERSION = "3.4.4";
2
2
  const SUPPORTED_MARKDOWN_FILE_EXTENSIONS = [
3
3
  ".markdown",
4
4
  ".mdown",
@@ -20,7 +20,7 @@ async function dev(inlineConfig) {
20
20
  base: restart.container.settings.config.base
21
21
  })
22
22
  );
23
- const currentVersion = "3.4.3";
23
+ const currentVersion = "3.4.4";
24
24
  if (currentVersion.includes("-")) {
25
25
  logger.warn(null, msg.prerelease({ currentVersion }));
26
26
  }
@@ -50,7 +50,7 @@ function serverStart({
50
50
  base,
51
51
  isRestart = false
52
52
  }) {
53
- const version = "3.4.3";
53
+ const version = "3.4.4";
54
54
  const localPrefix = `${dim("\u2503")} Local `;
55
55
  const networkPrefix = `${dim("\u2503")} Network `;
56
56
  const emptyPrefix = " ".repeat(11);
@@ -235,7 +235,7 @@ function printHelp({
235
235
  message.push(
236
236
  linebreak(),
237
237
  ` ${bgGreen(black(` ${commandName} `))} ${green(
238
- `v${"3.4.3"}`
238
+ `v${"3.4.4"}`
239
239
  )} ${headline}`
240
240
  );
241
241
  }
@@ -35,7 +35,7 @@ async function createStaticPreviewServer(settings, logger) {
35
35
  null,
36
36
  msg.serverStart({
37
37
  startupTime: performance.now() - startServerTime,
38
- resolvedUrls: previewServer.resolvedUrls,
38
+ resolvedUrls: previewServer.resolvedUrls ?? { local: [], network: [] },
39
39
  host: settings.config.server.host,
40
40
  base: settings.config.base
41
41
  })
@@ -50,6 +50,8 @@ async function createStaticPreviewServer(settings, logger) {
50
50
  host: getResolvedHostForHttpServer(settings.config.server.host),
51
51
  port: settings.config.server.port,
52
52
  closed,
53
+ // In Vite 5, `httpServer` may be a `Http2SecureServer`, but we know we are only starting a HTTP server
54
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
53
55
  server: previewServer.httpServer,
54
56
  stop: async () => {
55
57
  await new Promise((resolve, reject) => {
@@ -1,8 +1,10 @@
1
1
  import fs from "node:fs";
2
2
  import { fileURLToPath } from "node:url";
3
+ import { version } from "vite";
3
4
  import { notFoundTemplate, subpathNotUsedTemplate } from "../../template/4xx.js";
4
5
  import { stripBase } from "./util.js";
5
6
  const HAS_FILE_EXTENSION_REGEXP = /^.*\.[^\\]+$/;
7
+ const IS_VITE_5 = version.startsWith("5.");
6
8
  function vitePluginAstroPreview(settings) {
7
9
  const { base, outDir, trailingSlash } = settings.config;
8
10
  return {
@@ -33,7 +35,7 @@ function vitePluginAstroPreview(settings) {
33
35
  next();
34
36
  });
35
37
  return () => {
36
- server.middlewares.use((req, res) => {
38
+ const fourOhFourMiddleware = (req, res) => {
37
39
  const errorPagePath = fileURLToPath(outDir + "/404.html");
38
40
  if (fs.existsSync(errorPagePath)) {
39
41
  res.statusCode = 404;
@@ -44,7 +46,16 @@ function vitePluginAstroPreview(settings) {
44
46
  res.statusCode = 404;
45
47
  res.end(notFoundTemplate(pathname, "Not Found"));
46
48
  }
47
- });
49
+ };
50
+ if (IS_VITE_5) {
51
+ for (const middleware of server.middlewares.stack) {
52
+ if (middleware.handle.name === "vite404Middleware") {
53
+ middleware.handle = fourOhFourMiddleware;
54
+ }
55
+ }
56
+ } else {
57
+ server.middlewares.use(fourOhFourMiddleware);
58
+ }
48
59
  };
49
60
  }
50
61
  };
@@ -49,12 +49,12 @@ document.addEventListener("DOMContentLoaded", async () => {
49
49
  }
50
50
  target.querySelector(".notification")?.toggleAttribute("data-active", newState);
51
51
  });
52
- eventTarget.addEventListener("toggle-plugin", (evt) => {
52
+ eventTarget.addEventListener("toggle-plugin", async (evt) => {
53
53
  let newState = void 0;
54
54
  if (evt instanceof CustomEvent) {
55
55
  newState = evt.detail.state ?? true;
56
56
  }
57
- overlay.togglePluginStatus(plugin, newState);
57
+ await overlay.togglePluginStatus(plugin, newState);
58
58
  });
59
59
  return plugin;
60
60
  };
@@ -22,12 +22,20 @@ export declare class AstroDevOverlay extends HTMLElement {
22
22
  getPluginTemplate(plugin: DevOverlayPlugin): string;
23
23
  getPluginIcon(icon: Icon): string | undefined;
24
24
  getPluginById(id: string): DevOverlayPlugin | undefined;
25
- getPluginCanvasById(id: string): Element | null;
26
- togglePluginStatus(plugin: DevOverlayPlugin, status?: boolean): void;
25
+ getPluginCanvasById(id: string): HTMLElement | null;
26
+ /**
27
+ * @param plugin The plugin to toggle the status of
28
+ * @param newStatus Optionally, force the plugin into a specific state
29
+ */
30
+ togglePluginStatus(plugin: DevOverlayPlugin, newStatus?: boolean): Promise<void>;
31
+ /**
32
+ * @param newStatus Optionally, force the minimize button into a specific state
33
+ */
27
34
  toggleMinimizeButton(newStatus?: boolean): void;
28
35
  toggleOverlay(newStatus?: boolean): void;
29
36
  }
30
37
  export declare class DevOverlayCanvas extends HTMLElement {
31
38
  shadowRoot: ShadowRoot;
32
39
  constructor();
40
+ connectedCallback(): void;
33
41
  }
@@ -38,7 +38,7 @@ class AstroDevOverlay extends HTMLElement {
38
38
  display: flex;
39
39
  gap: 8px;
40
40
  align-items: center;
41
- transition: bottom 0.2s ease-in-out;
41
+ transition: bottom 0.35s cubic-bezier(0.485, -0.050, 0.285, 1.505);
42
42
  pointer-events: none;
43
43
  }
44
44
 
@@ -59,11 +59,10 @@ class AstroDevOverlay extends HTMLElement {
59
59
  height: 56px;
60
60
  overflow: hidden;
61
61
  pointer-events: auto;
62
-
63
62
  background: linear-gradient(180deg, #13151A 0%, rgba(19, 21, 26, 0.88) 100%);
64
- box-shadow: 0px 0px 0px 0px #13151A4D;
65
63
  border: 1px solid #343841;
66
64
  border-radius: 9999px;
65
+ 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);
67
66
  }
68
67
 
69
68
  #dev-bar .item {
@@ -174,16 +173,6 @@ class AstroDevOverlay extends HTMLElement {
174
173
  width: 1px;
175
174
  }
176
175
 
177
- astro-dev-overlay-plugin-canvas {
178
- position: absolute;
179
- top: 0;
180
- left: 0;
181
- }
182
-
183
- astro-dev-overlay-plugin-canvas:not([data-active]) {
184
- display: none;
185
- }
186
-
187
176
  #minimize-button {
188
177
  width: 32px;
189
178
  height: 32px;
@@ -242,14 +231,14 @@ class AstroDevOverlay extends HTMLElement {
242
231
  this.devOverlay = this.shadowRoot.querySelector("#dev-overlay");
243
232
  this.attachEvents();
244
233
  }
245
- this.plugins.forEach((plugin) => {
234
+ this.plugins.forEach(async (plugin) => {
246
235
  if (!this.hasBeenInitialized) {
247
236
  console.log(`Creating plugin canvas for ${plugin.id}`);
248
237
  const pluginCanvas = document.createElement("astro-dev-overlay-plugin-canvas");
249
238
  pluginCanvas.dataset.pluginId = plugin.id;
250
239
  this.shadowRoot?.append(pluginCanvas);
251
240
  }
252
- this.togglePluginStatus(plugin, plugin.active);
241
+ await this.togglePluginStatus(plugin, plugin.active);
253
242
  });
254
243
  if ("requestIdleCallback" in window) {
255
244
  window.requestIdleCallback(async () => {
@@ -278,7 +267,7 @@ class AstroDevOverlay extends HTMLElement {
278
267
  if (plugin.status === "loading") {
279
268
  await this.initPlugin(plugin);
280
269
  }
281
- this.togglePluginStatus(plugin);
270
+ await this.togglePluginStatus(plugin);
282
271
  });
283
272
  });
284
273
  const minimizeButton = this.shadowRoot.querySelector("#minimize-button");
@@ -367,27 +356,47 @@ class AstroDevOverlay extends HTMLElement {
367
356
  return this.plugins.find((plugin) => plugin.id === id);
368
357
  }
369
358
  getPluginCanvasById(id) {
370
- return this.shadowRoot.querySelector(`astro-dev-overlay-plugin-canvas[data-plugin-id="${id}"]`);
359
+ return this.shadowRoot.querySelector(
360
+ `astro-dev-overlay-plugin-canvas[data-plugin-id="${id}"]`
361
+ );
371
362
  }
372
- togglePluginStatus(plugin, status) {
373
- plugin.active = status ?? !plugin.active;
363
+ /**
364
+ * @param plugin The plugin to toggle the status of
365
+ * @param newStatus Optionally, force the plugin into a specific state
366
+ */
367
+ async togglePluginStatus(plugin, newStatus) {
368
+ const pluginCanvas = this.getPluginCanvasById(plugin.id);
369
+ if (!pluginCanvas)
370
+ return;
371
+ if (plugin.active && !newStatus && plugin.beforeTogglingOff) {
372
+ const shouldToggleOff = await plugin.beforeTogglingOff(pluginCanvas.shadowRoot);
373
+ if (!shouldToggleOff)
374
+ return;
375
+ }
376
+ plugin.active = newStatus ?? !plugin.active;
374
377
  const target = this.shadowRoot.querySelector(`[data-plugin-id="${plugin.id}"]`);
375
378
  if (!target)
376
379
  return;
377
380
  target.classList.toggle("active", plugin.active);
378
- this.getPluginCanvasById(plugin.id)?.toggleAttribute("data-active", plugin.active);
379
- plugin.eventTarget.dispatchEvent(
380
- new CustomEvent("plugin-toggled", {
381
- detail: {
382
- state: plugin.active,
383
- plugin
384
- }
385
- })
386
- );
381
+ pluginCanvas.style.display = plugin.active ? "block" : "none";
382
+ window.requestAnimationFrame(() => {
383
+ pluginCanvas.toggleAttribute("data-active", plugin.active);
384
+ plugin.eventTarget.dispatchEvent(
385
+ new CustomEvent("plugin-toggled", {
386
+ detail: {
387
+ state: plugin.active,
388
+ plugin
389
+ }
390
+ })
391
+ );
392
+ });
387
393
  if (import.meta.hot) {
388
394
  import.meta.hot.send(`${WS_EVENT_NAME}:${plugin.id}:toggled`, { state: plugin.active });
389
395
  }
390
396
  }
397
+ /**
398
+ * @param newStatus Optionally, force the minimize button into a specific state
399
+ */
391
400
  toggleMinimizeButton(newStatus) {
392
401
  const minimizeButton = this.shadowRoot.querySelector("#minimize-button");
393
402
  if (!minimizeButton)
@@ -435,6 +444,16 @@ class DevOverlayCanvas extends HTMLElement {
435
444
  super();
436
445
  this.shadowRoot = this.attachShadow({ mode: "open" });
437
446
  }
447
+ connectedCallback() {
448
+ this.shadowRoot.innerHTML = `
449
+ <style>
450
+ :host {
451
+ position: absolute;
452
+ top: 0;
453
+ left: 0;
454
+ }
455
+ </style>`;
456
+ }
438
457
  }
439
458
  export {
440
459
  AstroDevOverlay,
@@ -3,5 +3,6 @@ declare const _default: {
3
3
  name: string;
4
4
  icon: "astro:logo";
5
5
  init(canvas: ShadowRoot): void;
6
+ beforeTogglingOff(canvas: ShadowRoot): Promise<boolean>;
6
7
  };
7
8
  export default _default;
@@ -3,10 +3,37 @@ var astro_default = {
3
3
  name: "Astro",
4
4
  icon: "astro:logo",
5
5
  init(canvas) {
6
- const astroWindow = document.createElement("astro-dev-overlay-window");
7
- astroWindow.windowTitle = "Astro";
8
- astroWindow.windowIcon = "astro:logo";
9
- astroWindow.innerHTML = `
6
+ createWindow();
7
+ document.addEventListener("astro:after-swap", createWindow);
8
+ function createWindow() {
9
+ const style = document.createElement("style");
10
+ style.textContent = `
11
+ :host {
12
+ opacity: 0;
13
+ transition: opacity 0.15s ease-in-out;
14
+ }
15
+
16
+ :host([data-active]) {
17
+ opacity: 1;
18
+ }
19
+
20
+ @media screen and (prefers-reduced-motion: no-preference) {
21
+ :host astro-dev-overlay-window {
22
+ transform: translateY(55px) translate(-50%, -50%);
23
+ transition: transform 0.15s ease-in-out;
24
+ transform-origin: center bottom;
25
+ }
26
+
27
+ :host([data-active]) astro-dev-overlay-window {
28
+ transform: translateY(0) translate(-50%, -50%);
29
+ }
30
+ }
31
+ `;
32
+ canvas.append(style);
33
+ const astroWindow = document.createElement("astro-dev-overlay-window");
34
+ astroWindow.windowTitle = "Astro";
35
+ astroWindow.windowIcon = "astro:logo";
36
+ astroWindow.innerHTML = `
10
37
  <style>
11
38
  #buttons-container {
12
39
  display: flex;
@@ -48,17 +75,25 @@ var astro_default = {
48
75
  <div>
49
76
  <p>Welcome to Astro!</p>
50
77
  <div id="buttons-container">
51
- <astro-dev-overlay-card icon="astro:logo" link="https://github.com/withastro/astro/issues/new/choose">Report an issue</astro-dev-overlay-card>
52
- <astro-dev-overlay-card icon="astro:logo" link="https://docs.astro.build/en/getting-started/">View Astro Docs</astro-dev-overlay-card>
78
+ <astro-dev-overlay-card icon="bug" link="https://github.com/withastro/astro/issues/new/choose">Report an issue</astro-dev-overlay-card>
79
+ <astro-dev-overlay-card icon="file-search" link="https://docs.astro.build/en/getting-started/">View Astro Docs</astro-dev-overlay-card>
53
80
  </div>
54
81
  </div>
55
82
  <footer>
56
- <a href="https://discord.gg/astro" target="_blank">Join the Astro Discord</a>
57
- <a href="https://astro.build" target="_blank">Visit Astro.build</a>
83
+ <a href="https://astro.build/chat" target="_blank">Join us on Discord</a>
84
+ <a href="https://astro.build" target="_blank">Visit the Astro website</a>
58
85
  </footer>
59
86
  </div>
60
87
  `;
61
- canvas.append(astroWindow);
88
+ canvas.append(astroWindow);
89
+ }
90
+ },
91
+ async beforeTogglingOff(canvas) {
92
+ canvas.host?.removeAttribute("data-active");
93
+ await new Promise((resolve) => {
94
+ canvas.host.addEventListener("transitionend", resolve);
95
+ });
96
+ return true;
62
97
  }
63
98
  };
64
99
  export {
@@ -2,6 +2,7 @@ declare const _default: {
2
2
  id: string;
3
3
  name: string;
4
4
  icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 16\"><path fill=\"#fff\" d=\"M.6 2A1.1 1.1 0 0 1 1.7.9h16.6a1.1 1.1 0 1 1 0 2.2H1.6A1.1 1.1 0 0 1 .8 2Zm1.1 7.1h6a1.1 1.1 0 0 0 0-2.2h-6a1.1 1.1 0 0 0 0 2.2ZM9.3 13H1.8a1.1 1.1 0 1 0 0 2.2h7.5a1.1 1.1 0 1 0 0-2.2Zm11.3 1.9a1.1 1.1 0 0 1-1.5 0l-1.7-1.7a4.1 4.1 0 1 1 1.6-1.6l1.6 1.7a1.1 1.1 0 0 1 0 1.6Zm-5.3-3.4a1.9 1.9 0 1 0 0-3.8 1.9 1.9 0 0 0 0 3.8Z\"/></svg>";
5
- init(canvas: ShadowRoot, eventTarget: EventTarget): void;
5
+ init(canvas: ShadowRoot, eventTarget: EventTarget): Promise<void>;
6
+ beforeTogglingOff(canvas: ShadowRoot): Promise<boolean>;
6
7
  };
7
8
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { getIconElement } from "../ui-library/icons.js";
1
2
  import { attachTooltipToHighlight, createHighlight, positionHighlight } from "./utils/highlight.js";
2
3
  const icon = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 16"><path fill="#fff" d="M.6 2A1.1 1.1 0 0 1 1.7.9h16.6a1.1 1.1 0 1 1 0 2.2H1.6A1.1 1.1 0 0 1 .8 2Zm1.1 7.1h6a1.1 1.1 0 0 0 0-2.2h-6a1.1 1.1 0 0 0 0 2.2ZM9.3 13H1.8a1.1 1.1 0 1 0 0 2.2h7.5a1.1 1.1 0 1 0 0-2.2Zm11.3 1.9a1.1 1.1 0 0 1-1.5 0l-1.7-1.7a4.1 4.1 0 1 1 1.6-1.6l1.6 1.7a1.1 1.1 0 0 1 0 1.6Zm-5.3-3.4a1.9 1.9 0 1 0 0-3.8 1.9 1.9 0 0 0 0 3.8Z"/></svg>';
3
4
  const selectorBasedRules = [
@@ -11,52 +12,82 @@ var audit_default = {
11
12
  id: "astro:audit",
12
13
  name: "Audit",
13
14
  icon,
14
- init(canvas, eventTarget) {
15
+ async init(canvas, eventTarget) {
15
16
  let audits = [];
16
- lint();
17
- document.addEventListener("astro:after-swap", lint);
18
- document.addEventListener("astro:page-load", refreshLintPositions);
19
- function lint() {
17
+ await lint();
18
+ document.addEventListener("astro:after-swap", async () => lint());
19
+ document.addEventListener("astro:page-load", async () => refreshLintPositions);
20
+ async function lint() {
21
+ initStyle();
20
22
  audits.forEach(({ highlightElement }) => {
21
23
  highlightElement.remove();
22
24
  });
23
25
  audits = [];
24
- selectorBasedRules.forEach((rule) => {
25
- document.querySelectorAll(rule.selector).forEach((el) => {
26
- createAuditProblem(rule, el);
27
- });
28
- });
26
+ canvas.getElementById("no-audit")?.remove();
27
+ for (const rule of selectorBasedRules) {
28
+ const elements = document.querySelectorAll(rule.selector);
29
+ for (const element of elements) {
30
+ await createAuditProblem(rule, element);
31
+ }
32
+ }
29
33
  if (audits.length > 0) {
30
34
  eventTarget.dispatchEvent(
31
- new CustomEvent("plugin-notification", {
35
+ new CustomEvent("toggle-notification", {
32
36
  detail: {
33
37
  state: true
34
38
  }
35
39
  })
36
40
  );
41
+ } else {
42
+ eventTarget.dispatchEvent(
43
+ new CustomEvent("toggle-notification", {
44
+ detail: {
45
+ state: false
46
+ }
47
+ })
48
+ );
49
+ const noAuditBlock = document.createElement("div");
50
+ noAuditBlock.id = "no-audit";
51
+ const noAuditIcon = getIconElement("check-circle");
52
+ const text = document.createElement("div");
53
+ text.textContent = "No issues found!";
54
+ if (noAuditIcon) {
55
+ noAuditIcon.style.width = "24px";
56
+ noAuditBlock.append(noAuditIcon);
57
+ }
58
+ noAuditBlock.append(text);
59
+ canvas.append(noAuditBlock);
37
60
  }
61
+ ["scroll", "resize"].forEach((event) => {
62
+ window.addEventListener(event, refreshLintPositions);
63
+ });
38
64
  }
39
65
  function refreshLintPositions() {
66
+ const noAuditBlock = canvas.getElementById("no-audit");
67
+ if (noAuditBlock) {
68
+ const devOverlayRect = document.querySelector("astro-dev-overlay")?.shadowRoot.querySelector("#dev-overlay")?.getBoundingClientRect();
69
+ noAuditBlock.style.top = `${(devOverlayRect?.top ?? 0) - (devOverlayRect?.height ?? 0) - 16}px`;
70
+ }
40
71
  audits.forEach(({ highlightElement, auditedElement }) => {
41
72
  const rect = auditedElement.getBoundingClientRect();
42
73
  positionHighlight(highlightElement, rect);
43
74
  });
44
75
  }
45
- function createAuditProblem(rule, originalElement) {
76
+ async function createAuditProblem(rule, originalElement) {
46
77
  const computedStyle = window.getComputedStyle(originalElement);
47
78
  const targetedElement = originalElement.children[0] || originalElement;
48
79
  if (targetedElement.offsetParent === null || computedStyle.display === "none") {
49
80
  return;
50
81
  }
82
+ if (originalElement.nodeName === "IMG" && !originalElement.complete) {
83
+ await originalElement.decode();
84
+ }
51
85
  const rect = originalElement.getBoundingClientRect();
52
86
  const highlight = createHighlight(rect, "warning");
53
87
  const tooltip = buildAuditTooltip(rule);
54
88
  attachTooltipToHighlight(highlight, tooltip, originalElement);
55
89
  canvas.append(highlight);
56
90
  audits.push({ highlightElement: highlight, auditedElement: originalElement });
57
- ["scroll", "resize"].forEach((event) => {
58
- window.addEventListener(event, refreshLintPositions);
59
- });
60
91
  }
61
92
  function buildAuditTooltip(rule) {
62
93
  const tooltip = document.createElement("astro-dev-overlay-tooltip");
@@ -78,6 +109,44 @@ var audit_default = {
78
109
  ];
79
110
  return tooltip;
80
111
  }
112
+ function initStyle() {
113
+ const devOverlayRect = document.querySelector("astro-dev-overlay")?.shadowRoot.querySelector("#dev-overlay")?.getBoundingClientRect();
114
+ const style = document.createElement("style");
115
+ style.textContent = `
116
+ :host {
117
+ opacity: 0;
118
+ transition: opacity 0.1s ease-in-out;
119
+ }
120
+
121
+ :host([data-active]) {
122
+ opacity: 1;
123
+ }
124
+
125
+ #no-audit {
126
+ border: 1px solid rgba(113, 24, 226, 1);
127
+ background-color: #310A65;
128
+ 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);
129
+ color: white;
130
+ text-align: center;
131
+ border-radius: 4px;
132
+ padding: 8px;
133
+ 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";
134
+ position: fixed;
135
+ transform: translate(-50%, 0);
136
+ top: ${(devOverlayRect?.top ?? 0) - (devOverlayRect?.height ?? 0) - 16}px;
137
+ left: calc(50% + 12px);
138
+ width: 200px;
139
+ }
140
+ `;
141
+ canvas.append(style);
142
+ }
143
+ },
144
+ async beforeTogglingOff(canvas) {
145
+ canvas.host?.removeAttribute("data-active");
146
+ await new Promise((resolve) => {
147
+ canvas.host.addEventListener("transitionend", resolve);
148
+ });
149
+ return true;
81
150
  }
82
151
  };
83
152
  export {
@@ -3,5 +3,6 @@ declare const _default: {
3
3
  name: string;
4
4
  icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\"><path fill=\"#fff\" d=\"M7.9 1.5v-.4a1.1 1.1 0 0 1 2.2 0v.4a1.1 1.1 0 1 1-2.2 0Zm-6.4 8.6a1.1 1.1 0 1 0 0-2.2h-.4a1.1 1.1 0 0 0 0 2.2h.4ZM12 3.7a1.1 1.1 0 0 0 1.4-.7l.4-1.1a1.1 1.1 0 0 0-2.1-.8l-.4 1.2a1.1 1.1 0 0 0 .7 1.4Zm-9.7 7.6-1.2.4a1.1 1.1 0 1 0 .8 2.1l1-.4a1.1 1.1 0 1 0-.6-2ZM20.8 17a1.9 1.9 0 0 1 0 2.6l-1.2 1.2a1.9 1.9 0 0 1-2.6 0l-4.3-4.2-1.6 3.6a1.9 1.9 0 0 1-1.7 1.2A1.9 1.9 0 0 1 7.5 20L2.7 5a1.9 1.9 0 0 1 2.4-2.4l15 5a1.9 1.9 0 0 1 .2 3.4l-3.7 1.6 4.2 4.3ZM19 18.3 14.6 14a1.9 1.9 0 0 1 .6-3l3.2-1.5L5.1 5.1l4.3 13.3 1.5-3.2a1.9 1.9 0 0 1 3-.6l4.4 4.4.7-.7Z\"/></svg>";
5
5
  init(canvas: ShadowRoot): void;
6
+ beforeTogglingOff(canvas: ShadowRoot): Promise<boolean>;
6
7
  };
7
8
  export default _default;
@@ -10,6 +10,7 @@ var xray_default = {
10
10
  document.addEventListener("astro:after-swap", addIslandsOverlay);
11
11
  document.addEventListener("astro:page-load", refreshIslandsOverlayPositions);
12
12
  function addIslandsOverlay() {
13
+ initStyle();
13
14
  islandsOverlays.forEach(({ highlightElement }) => {
14
15
  highlightElement.remove();
15
16
  });
@@ -75,6 +76,27 @@ var xray_default = {
75
76
  const [_, value] = prop;
76
77
  return JSON.stringify(value, null, 2);
77
78
  }
79
+ function initStyle() {
80
+ const style = document.createElement("style");
81
+ style.textContent = `
82
+ :host {
83
+ opacity: 0;
84
+ transition: opacity 0.1s ease-in-out;
85
+ }
86
+
87
+ :host([data-active]) {
88
+ opacity: 1;
89
+ }
90
+ `;
91
+ canvas.append(style);
92
+ }
93
+ },
94
+ async beforeTogglingOff(canvas) {
95
+ canvas.host?.removeAttribute("data-active");
96
+ await new Promise((resolve) => {
97
+ canvas.host.addEventListener("transitionend", resolve);
98
+ });
99
+ return true;
78
100
  }
79
101
  };
80
102
  export {
@@ -23,6 +23,8 @@ class DevOverlayCard extends HTMLElement {
23
23
  font-weight: 600;
24
24
  line-height: 19px;
25
25
  text-decoration: none;
26
+ background-color: #13151A;
27
+ box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.10), 0px 1px 2px 0px rgba(0, 0, 0, 0.10), 0px 4px 4px 0px rgba(0, 0, 0, 0.09), 0px 10px 6px 0px rgba(0, 0, 0, 0.05), 0px 17px 7px 0px rgba(0, 0, 0, 0.01), 0px 26px 7px 0px rgba(0, 0, 0, 0.00);
26
28
  }
27
29
 
28
30
  a:hover, button:hover {
@@ -6,5 +6,8 @@ declare const icons: {
6
6
  readonly 'astro:logo': "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 85 107\"><path fill=\"#fff\" d=\"M27.6 91.1c-4.8-4.4-6.3-13.7-4.2-20.4 3.5 4.2 8.3 5.6 13.3 6.3 7.7 1.2 15.3.8 22.5-2.8l2.5-1.4c.7 2 .9 3.9.6 5.9-.6 4.9-3 8.7-6.9 11.5-1.5 1.2-3.2 2.2-4.8 3.3-4.9 3.3-6.2 7.2-4.4 12.9l.2.6a13 13 0 0 1-5.7-5 13.8 13.8 0 0 1-2.2-7.4c0-1.3 0-2.7-.2-4-.5-3.1-2-4.6-4.8-4.7a5.5 5.5 0 0 0-5.7 4.6l-.2.6Z\"/><path fill=\"url(#a)\" d=\"M27.6 91.1c-4.8-4.4-6.3-13.7-4.2-20.4 3.5 4.2 8.3 5.6 13.3 6.3 7.7 1.2 15.3.8 22.5-2.8l2.5-1.4c.7 2 .9 3.9.6 5.9-.6 4.9-3 8.7-6.9 11.5-1.5 1.2-3.2 2.2-4.8 3.3-4.9 3.3-6.2 7.2-4.4 12.9l.2.6a13 13 0 0 1-5.7-5 13.8 13.8 0 0 1-2.2-7.4c0-1.3 0-2.7-.2-4-.5-3.1-2-4.6-4.8-4.7a5.5 5.5 0 0 0-5.7 4.6l-.2.6Z\"/><path fill=\"#fff\" d=\"M0 69.6s14.3-7 28.7-7l10.8-33.5c.4-1.6 1.6-2.7 3-2.7 1.2 0 2.4 1.1 2.8 2.7l10.9 33.5c17 0 28.6 7 28.6 7L60.5 3.2c-.7-2-2-3.2-3.5-3.2H27.8c-1.6 0-2.7 1.3-3.4 3.2L0 69.6Z\"/><defs><linearGradient id=\"a\" x1=\"22.5\" x2=\"69.1\" y1=\"107\" y2=\"84.9\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#D83333\"/><stop offset=\"1\" stop-color=\"#F041FF\"/></linearGradient></defs></svg>";
7
7
  readonly warning: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"#fff\" d=\"M8 .40625c-1.5019 0-2.97007.445366-4.21886 1.27978C2.53236 2.52044 1.55905 3.70642.984293 5.094.40954 6.48157.259159 8.00842.552165 9.48147.845172 10.9545 1.56841 12.3076 2.63041 13.3696c1.06201 1.062 2.41508 1.7852 3.88813 2.0782 1.47304.293 2.99989.1427 4.38746-.4321 1.3876-.5747 2.5736-1.5481 3.408-2.7968.8344-1.2488 1.2798-2.717 1.2798-4.2189-.0023-2.0133-.8031-3.9435-2.2267-5.36713C11.9435 1.20925 10.0133.408483 8 .40625ZM8 13.9062c-1.16814 0-2.31006-.3463-3.28133-.9953-.97128-.649-1.7283-1.5715-2.17533-2.6507-.44703-1.0792-.56399-2.26675-.3361-3.41245.22789-1.1457.79041-2.1981 1.61641-3.0241.82601-.826 1.8784-1.38852 3.0241-1.61641 1.1457-.2279 2.33325-.11093 3.41245.3361 1.0793.44703 2.0017 1.20405 2.6507 2.17532.649.97128.9954 2.11319.9954 3.28134-.0017 1.56592-.6245 3.0672-1.7318 4.1745S9.56592 13.9046 8 13.9062Zm-.84375-5.62495V4.625c0-.22378.0889-.43839.24713-.59662.15824-.15824.37285-.24713.59662-.24713.22378 0 .43839.08889.59662.24713.15824.15823.24713.37284.24713.59662v3.65625c0 .22378-.08889.43839-.24713.59662C8.43839 9.03611 8.22378 9.125 8 9.125c-.22377 0-.43838-.08889-.59662-.24713-.15823-.15823-.24713-.37284-.24713-.59662ZM9.125 11.0938c0 .2225-.06598.44-.18959.625-.12362.185-.29932.3292-.50489.4143-.20556.0852-.43176.1074-.64999.064-.21823-.0434-.41869-.1505-.57602-.3079-.15734-.1573-.26448-.3577-.30789-.576-.04341-.2182-.02113-.4444.06402-.65.08515-.2055.22934-.3812.41435-.5049.185-.1236.40251-.18955.62501-.18955.29837 0 .58452.11855.7955.32955.21098.2109.3295.4971.3295.7955Z\"/></svg>";
8
8
  readonly 'arrow-down': "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 12 14\"><path fill=\"#13151A\" d=\"m11.0306 8.53063-4.5 4.49997c-.06968.0699-.15247.1254-.24364.1633-.09116.0378-.1889.0573-.28761.0573-.09871 0-.19645-.0195-.28762-.0573-.09116-.0379-.17395-.0934-.24363-.1633L.968098 8.53063c-.140896-.1409-.220051-.332-.220051-.53125 0-.19926.079155-.39036.220051-.53125.140892-.1409.331992-.22006.531252-.22006.19926 0 .39035.07916.53125.22006l3.21937 3.21937V1.5c0-.19891.07902-.38968.21967-.53033C5.61029.829018 5.80106.75 5.99997.75c.19891 0 .38968.079018.53033.21967.14065.14065.21967.33142.21967.53033v9.1875l3.21938-3.22c.14085-.1409.33195-.22005.53125-.22005.1993 0 .3904.07915.5312.22005.1409.1409.2201.33199.2201.53125s-.0792.39035-.2201.53125l-.0012.00063Z\"/></svg>";
9
+ readonly bug: "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 25 24\"><path fill=\"#CCCED8\" d=\"M13.7916 8.25006c0-.29667.088-.58668.2528-.83335.1648-.24668.3991-.43893.6732-.55247.2741-.11353.5757-.14323.8667-.08536.2909.05788.5582.20074.768.41052s.3526.47706.4105.76803c.0579.29097.0282.59257-.0854.86666-.1135.27409-.3057.50836-.5524.67318-.2467.16482-.5367.25279-.8334.25279-.3978 0-.7793-.15803-1.0606-.43934-.2813-.2813-.4394-.66283-.4394-1.06066Zm-3.75-1.5c-.29665 0-.58666.08798-.83333.2528-.24667.16482-.43893.39909-.55246.67318-.11354.27409-.14324.57569-.08536.86666.05788.29097.20074.55824.41052.76802.20977.20978.47705.35264.76802.41052.29101.05788.59261.02817.86671-.08536.274-.11353.5083-.30579.6731-.55246.1649-.24668.2528-.53668.2528-.83336 0-.39782-.158-.77935-.4393-1.06066-.2813-.2813-.6628-.43934-1.0607-.43934Zm11.25 6.75004c.0003.6512-.0733 1.3003-.2193 1.935l1.7953.7837c.1354.0592.2578.1445.3603.2511.1024.1065.1829.2322.2368.3698.0539.1377.0801.2846.0772.4323-.0028.1478-.0348.2936-.094.429-.0592.1354-.1446.2579-.2511.3603-.1065.1025-.2322.1829-.3698.2368-.1377.0539-.2846.0802-.4323.0773-.1478-.0029-.2936-.0349-.429-.0941l-1.6875-.7359c-.7348 1.3818-1.8317 2.5377-3.1732 3.3437s-2.8771 1.2319-4.4421 1.2319c-1.5651 0-3.10061-.4259-4.44213-1.2319-1.34151-.806-2.43843-1.9619-3.17321-3.3437l-1.6875.7359c-.13542.0592-.28119.0912-.42896.0941-.14778.0029-.29468-.0234-.43232-.0773-.13763-.0539-.2633-.1343-.36984-.2368-.10653-.1024-.19185-.2249-.25106-.3603-.05922-.1354-.09119-.2812-.09407-.429-.00289-.1477.02336-.2946.07725-.4323.05389-.1376.13436-.2633.23681-.3698.10246-.1066.22489-.1919.36032-.2511l1.79531-.7837c-.14354-.635-.21462-1.2841-.21187-1.935v-.375h-1.875c-.29837 0-.58452-.1186-.7955-.3295-.21098-.211-.3295-.4972-.3295-.7955 0-.2984.11852-.5846.3295-.7955.21098-.211.49713-.3295.7955-.3295h1.875v-.375c-.00029-.65126.0733-1.30041.21937-1.93504l-1.79531-.78375c-.27351-.11959-.4883-.34294-.59713-.6209-.10883-.27797-.10278-.58778.01682-.86128.11959-.27351.34294-.4883.6209-.59713.27797-.10883.58778-.10278.86128.01681l1.6875.73594c.73478-1.38183 1.8317-2.53769 3.17321-3.34373 1.34152-.80604 2.87703-1.23187 4.44213-1.23187 1.565 0 3.1006.42583 4.4421 1.23187 1.3415.80604 2.4384 1.9619 3.1732 3.34373l1.6875-.73594c.1354-.05921.2812-.09118.429-.09406.1477-.00289.2946.02336.4323.07725.1376.05389.2633.13435.3698.23681.1065.10245.1919.22489.2511.36032.0592.13542.0912.28118.094.42896.0029.14778-.0233.29468-.0772.43232-.0539.13763-.1344.2633-.2368.36984-.1025.10653-.2249.19185-.3603.25106l-1.7953.78375c.1435.63492.2146 1.28407.2118 1.93504v.375h1.875c.2984 0 .5845.1185.7955.3295.211.2109.3295.4971.3295.7955 0 .2983-.1185.5845-.3295.7955-.211.2109-.4971.3295-.7955.3295h-1.875v.375Zm-14.99997-2.625H19.0416v-.375c0-1.69079-.6716-3.3123-1.8672-4.50784-1.1955-1.19555-2.817-1.8672-4.5078-1.8672-1.6907 0-3.31224.67165-4.50778 1.8672C6.96328 7.1878 6.29163 8.80931 6.29163 10.5001v.375Zm5.24997 8.8987v-6.6487H6.29163v.375c.00211 1.4949.52876 2.9417 1.48816 4.0882.95939 1.1464 2.29071 1.9199 3.76181 2.1855Zm7.5-6.2737v-.375h-5.25v6.6487c1.4712-.2656 2.8025-1.0391 3.7619-2.1855.9594-1.1465 1.486-2.5933 1.4881-4.0882Z\"/></svg>";
10
+ readonly 'file-search': "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 25 24\"><path fill=\"#CCCED8\" d=\"m20.6293 7.455-5.25-5.25c-.1045-.10461-.2285-.1876-.3651-.24422-.1366-.05662-.283-.08577-.4308-.08578H5.58337c-.49728 0-.97419.19754-1.32582.54917-.35163.35164-.54918.82855-.54918 1.32583v16.5c0 .4973.19755.9742.54918 1.3258.35163.3517.82854.5492 1.32582.5492H19.0834c.4973 0 .9742-.1975 1.3258-.5492.3516-.3516.5492-.8285.5492-1.3258v-12c0-.29813-.1184-.58407-.3291-.795Zm-3.1397.045h-2.1562V5.34375L17.4896 7.5ZM5.95837 19.875V4.125h7.12503v4.5c0 .29837.1185.58452.3295.7955.211.21097.4971.3295.7955.3295h4.5v10.125H5.95837Zm9.04503-4.5459c.3426-.7185.4202-1.5349.2192-2.3051-.2011-.7702-.6679-1.4445-1.3179-1.9038-.65-.4594-1.4415-.6742-2.2346-.6066-.7931.0677-1.5368.4135-2.0996.9763-.56283.5629-.90863 1.3065-.9763 2.0996-.06766.7931.14716 1.5846.60651 2.2346.45936.6501 1.13369 1.1169 1.90389 1.3179.7701.201 1.5866.1234 2.305-.2192l1.125 1.125c.2114.2114.498.3301.7969.3301.2989 0 .5855-.1187.7969-.3301.2113-.2113.3301-.498.3301-.7969 0-.2988-.1188-.5855-.3301-.7968l-1.125-1.125Zm-4.17-1.4541c0-.2225.066-.44.1896-.625.1236-.185.2993-.3292.5049-.4144.2055-.0851.4317-.1074.65-.064.2182.0434.4186.1506.576.3079.1573.1573.2644.3578.3079.576.0434.2183.0211.4445-.0641.65-.0851.2056-.2293.3813-.4143.5049-.185.1236-.4025.1896-.625.1896-.2984 0-.5845-.1185-.7955-.3295-.211-.211-.3295-.4971-.3295-.7955Z\"/></svg>";
11
+ readonly 'check-circle': "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 14 14\"><path fill=\"#fff\" d=\"M10.0306 4.96938c.0699.06967.1254.15247.1633.24363.0378.09116.0573.1889.0573.28762 0 .09871-.0195.19645-.0573.28761-.0379.09116-.0934.17396-.1633.24364L6.53063 9.53187c-.06968.06992-.15247.1254-.24364.16326-.09116.03785-.1889.05734-.28761.05734-.09871 0-.19645-.01949-.28762-.05734-.09116-.03786-.17395-.09334-.24363-.16326l-1.5-1.5c-.06977-.06976-.12511-.15258-.16286-.24373-.03776-.09116-.05719-.18885-.05719-.28752 0-.09866.01943-.19635.05719-.28751.03775-.09115.09309-.17397.16286-.24373.06976-.06977.15259-.12511.24374-.16287.09115-.03775.18885-.05719.28751-.05719s.19636.01944.28751.05719c.09115.03776.17397.0931.24374.16287L6 7.9375l2.96938-2.97c.06978-.06961.15259-.12478.24371-.16237.09111-.03758.18874-.05683.2873-.05666.09856.00018.19612.01978.28711.05768.09098.0379.1736.09337.2431.16323ZM13.75 7c0 1.33502-.3959 2.64007-1.1376 3.7501-.7417 1.11-1.7959 1.9752-3.02928 2.4861-1.23341.5109-2.5906.6446-3.89998.3841-1.30937-.2605-2.5121-.9033-3.45611-1.8473-.944-.944-1.586877-2.14677-1.847328-3.45614-.26045-1.30937-.126777-2.66657.384114-3.89997C1.27471 3.18349 2.13987 2.12928 3.2499 1.38758 4.35994.645881 5.66498.25 7 .25c1.78961.001985 3.5053.713781 4.7708 1.97922C13.0362 3.49466 13.748 5.2104 13.75 7Zm-1.5 0c0-1.03835-.3079-2.05339-.8848-2.91674-.5769-.86336-1.3968-1.53627-2.35611-1.93363-.95931-.39736-2.01491-.50133-3.03331-.29875-1.0184.20257-1.95386.70258-2.68809 1.43681-.73422.73422-1.23424 1.66969-1.43681 2.68809-.20257 1.0184-.0986 2.074.29876 3.03331.39736.95931 1.07026 1.77921 1.93362 2.35611.86336.5769 1.87839.8848 2.91674.8848 1.39193-.0015 2.72643-.5551 3.7107-1.5393C11.6949 9.72642 12.2485 8.39193 12.25 7Z\"/></svg>";
9
12
  };
10
13
  export {};
@@ -13,7 +13,10 @@ function getIconElement(name) {
13
13
  const icons = {
14
14
  "astro:logo": `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 85 107"><path fill="#fff" d="M27.6 91.1c-4.8-4.4-6.3-13.7-4.2-20.4 3.5 4.2 8.3 5.6 13.3 6.3 7.7 1.2 15.3.8 22.5-2.8l2.5-1.4c.7 2 .9 3.9.6 5.9-.6 4.9-3 8.7-6.9 11.5-1.5 1.2-3.2 2.2-4.8 3.3-4.9 3.3-6.2 7.2-4.4 12.9l.2.6a13 13 0 0 1-5.7-5 13.8 13.8 0 0 1-2.2-7.4c0-1.3 0-2.7-.2-4-.5-3.1-2-4.6-4.8-4.7a5.5 5.5 0 0 0-5.7 4.6l-.2.6Z"/><path fill="url(#a)" d="M27.6 91.1c-4.8-4.4-6.3-13.7-4.2-20.4 3.5 4.2 8.3 5.6 13.3 6.3 7.7 1.2 15.3.8 22.5-2.8l2.5-1.4c.7 2 .9 3.9.6 5.9-.6 4.9-3 8.7-6.9 11.5-1.5 1.2-3.2 2.2-4.8 3.3-4.9 3.3-6.2 7.2-4.4 12.9l.2.6a13 13 0 0 1-5.7-5 13.8 13.8 0 0 1-2.2-7.4c0-1.3 0-2.7-.2-4-.5-3.1-2-4.6-4.8-4.7a5.5 5.5 0 0 0-5.7 4.6l-.2.6Z"/><path fill="#fff" d="M0 69.6s14.3-7 28.7-7l10.8-33.5c.4-1.6 1.6-2.7 3-2.7 1.2 0 2.4 1.1 2.8 2.7l10.9 33.5c17 0 28.6 7 28.6 7L60.5 3.2c-.7-2-2-3.2-3.5-3.2H27.8c-1.6 0-2.7 1.3-3.4 3.2L0 69.6Z"/><defs><linearGradient id="a" x1="22.5" x2="69.1" y1="107" y2="84.9" gradientUnits="userSpaceOnUse"><stop stop-color="#D83333"/><stop offset="1" stop-color="#F041FF"/></linearGradient></defs></svg>`,
15
15
  warning: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#fff" d="M8 .40625c-1.5019 0-2.97007.445366-4.21886 1.27978C2.53236 2.52044 1.55905 3.70642.984293 5.094.40954 6.48157.259159 8.00842.552165 9.48147.845172 10.9545 1.56841 12.3076 2.63041 13.3696c1.06201 1.062 2.41508 1.7852 3.88813 2.0782 1.47304.293 2.99989.1427 4.38746-.4321 1.3876-.5747 2.5736-1.5481 3.408-2.7968.8344-1.2488 1.2798-2.717 1.2798-4.2189-.0023-2.0133-.8031-3.9435-2.2267-5.36713C11.9435 1.20925 10.0133.408483 8 .40625ZM8 13.9062c-1.16814 0-2.31006-.3463-3.28133-.9953-.97128-.649-1.7283-1.5715-2.17533-2.6507-.44703-1.0792-.56399-2.26675-.3361-3.41245.22789-1.1457.79041-2.1981 1.61641-3.0241.82601-.826 1.8784-1.38852 3.0241-1.61641 1.1457-.2279 2.33325-.11093 3.41245.3361 1.0793.44703 2.0017 1.20405 2.6507 2.17532.649.97128.9954 2.11319.9954 3.28134-.0017 1.56592-.6245 3.0672-1.7318 4.1745S9.56592 13.9046 8 13.9062Zm-.84375-5.62495V4.625c0-.22378.0889-.43839.24713-.59662.15824-.15824.37285-.24713.59662-.24713.22378 0 .43839.08889.59662.24713.15824.15823.24713.37284.24713.59662v3.65625c0 .22378-.08889.43839-.24713.59662C8.43839 9.03611 8.22378 9.125 8 9.125c-.22377 0-.43838-.08889-.59662-.24713-.15823-.15823-.24713-.37284-.24713-.59662ZM9.125 11.0938c0 .2225-.06598.44-.18959.625-.12362.185-.29932.3292-.50489.4143-.20556.0852-.43176.1074-.64999.064-.21823-.0434-.41869-.1505-.57602-.3079-.15734-.1573-.26448-.3577-.30789-.576-.04341-.2182-.02113-.4444.06402-.65.08515-.2055.22934-.3812.41435-.5049.185-.1236.40251-.18955.62501-.18955.29837 0 .58452.11855.7955.32955.21098.2109.3295.4971.3295.7955Z"/></svg>`,
16
- "arrow-down": '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 12 14"><path fill="#13151A" d="m11.0306 8.53063-4.5 4.49997c-.06968.0699-.15247.1254-.24364.1633-.09116.0378-.1889.0573-.28761.0573-.09871 0-.19645-.0195-.28762-.0573-.09116-.0379-.17395-.0934-.24363-.1633L.968098 8.53063c-.140896-.1409-.220051-.332-.220051-.53125 0-.19926.079155-.39036.220051-.53125.140892-.1409.331992-.22006.531252-.22006.19926 0 .39035.07916.53125.22006l3.21937 3.21937V1.5c0-.19891.07902-.38968.21967-.53033C5.61029.829018 5.80106.75 5.99997.75c.19891 0 .38968.079018.53033.21967.14065.14065.21967.33142.21967.53033v9.1875l3.21938-3.22c.14085-.1409.33195-.22005.53125-.22005.1993 0 .3904.07915.5312.22005.1409.1409.2201.33199.2201.53125s-.0792.39035-.2201.53125l-.0012.00063Z"/></svg>'
16
+ "arrow-down": '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 12 14"><path fill="#13151A" d="m11.0306 8.53063-4.5 4.49997c-.06968.0699-.15247.1254-.24364.1633-.09116.0378-.1889.0573-.28761.0573-.09871 0-.19645-.0195-.28762-.0573-.09116-.0379-.17395-.0934-.24363-.1633L.968098 8.53063c-.140896-.1409-.220051-.332-.220051-.53125 0-.19926.079155-.39036.220051-.53125.140892-.1409.331992-.22006.531252-.22006.19926 0 .39035.07916.53125.22006l3.21937 3.21937V1.5c0-.19891.07902-.38968.21967-.53033C5.61029.829018 5.80106.75 5.99997.75c.19891 0 .38968.079018.53033.21967.14065.14065.21967.33142.21967.53033v9.1875l3.21938-3.22c.14085-.1409.33195-.22005.53125-.22005.1993 0 .3904.07915.5312.22005.1409.1409.2201.33199.2201.53125s-.0792.39035-.2201.53125l-.0012.00063Z"/></svg>',
17
+ bug: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 25 24"><path fill="#CCCED8" d="M13.7916 8.25006c0-.29667.088-.58668.2528-.83335.1648-.24668.3991-.43893.6732-.55247.2741-.11353.5757-.14323.8667-.08536.2909.05788.5582.20074.768.41052s.3526.47706.4105.76803c.0579.29097.0282.59257-.0854.86666-.1135.27409-.3057.50836-.5524.67318-.2467.16482-.5367.25279-.8334.25279-.3978 0-.7793-.15803-1.0606-.43934-.2813-.2813-.4394-.66283-.4394-1.06066Zm-3.75-1.5c-.29665 0-.58666.08798-.83333.2528-.24667.16482-.43893.39909-.55246.67318-.11354.27409-.14324.57569-.08536.86666.05788.29097.20074.55824.41052.76802.20977.20978.47705.35264.76802.41052.29101.05788.59261.02817.86671-.08536.274-.11353.5083-.30579.6731-.55246.1649-.24668.2528-.53668.2528-.83336 0-.39782-.158-.77935-.4393-1.06066-.2813-.2813-.6628-.43934-1.0607-.43934Zm11.25 6.75004c.0003.6512-.0733 1.3003-.2193 1.935l1.7953.7837c.1354.0592.2578.1445.3603.2511.1024.1065.1829.2322.2368.3698.0539.1377.0801.2846.0772.4323-.0028.1478-.0348.2936-.094.429-.0592.1354-.1446.2579-.2511.3603-.1065.1025-.2322.1829-.3698.2368-.1377.0539-.2846.0802-.4323.0773-.1478-.0029-.2936-.0349-.429-.0941l-1.6875-.7359c-.7348 1.3818-1.8317 2.5377-3.1732 3.3437s-2.8771 1.2319-4.4421 1.2319c-1.5651 0-3.10061-.4259-4.44213-1.2319-1.34151-.806-2.43843-1.9619-3.17321-3.3437l-1.6875.7359c-.13542.0592-.28119.0912-.42896.0941-.14778.0029-.29468-.0234-.43232-.0773-.13763-.0539-.2633-.1343-.36984-.2368-.10653-.1024-.19185-.2249-.25106-.3603-.05922-.1354-.09119-.2812-.09407-.429-.00289-.1477.02336-.2946.07725-.4323.05389-.1376.13436-.2633.23681-.3698.10246-.1066.22489-.1919.36032-.2511l1.79531-.7837c-.14354-.635-.21462-1.2841-.21187-1.935v-.375h-1.875c-.29837 0-.58452-.1186-.7955-.3295-.21098-.211-.3295-.4972-.3295-.7955 0-.2984.11852-.5846.3295-.7955.21098-.211.49713-.3295.7955-.3295h1.875v-.375c-.00029-.65126.0733-1.30041.21937-1.93504l-1.79531-.78375c-.27351-.11959-.4883-.34294-.59713-.6209-.10883-.27797-.10278-.58778.01682-.86128.11959-.27351.34294-.4883.6209-.59713.27797-.10883.58778-.10278.86128.01681l1.6875.73594c.73478-1.38183 1.8317-2.53769 3.17321-3.34373 1.34152-.80604 2.87703-1.23187 4.44213-1.23187 1.565 0 3.1006.42583 4.4421 1.23187 1.3415.80604 2.4384 1.9619 3.1732 3.34373l1.6875-.73594c.1354-.05921.2812-.09118.429-.09406.1477-.00289.2946.02336.4323.07725.1376.05389.2633.13435.3698.23681.1065.10245.1919.22489.2511.36032.0592.13542.0912.28118.094.42896.0029.14778-.0233.29468-.0772.43232-.0539.13763-.1344.2633-.2368.36984-.1025.10653-.2249.19185-.3603.25106l-1.7953.78375c.1435.63492.2146 1.28407.2118 1.93504v.375h1.875c.2984 0 .5845.1185.7955.3295.211.2109.3295.4971.3295.7955 0 .2983-.1185.5845-.3295.7955-.211.2109-.4971.3295-.7955.3295h-1.875v.375Zm-14.99997-2.625H19.0416v-.375c0-1.69079-.6716-3.3123-1.8672-4.50784-1.1955-1.19555-2.817-1.8672-4.5078-1.8672-1.6907 0-3.31224.67165-4.50778 1.8672C6.96328 7.1878 6.29163 8.80931 6.29163 10.5001v.375Zm5.24997 8.8987v-6.6487H6.29163v.375c.00211 1.4949.52876 2.9417 1.48816 4.0882.95939 1.1464 2.29071 1.9199 3.76181 2.1855Zm7.5-6.2737v-.375h-5.25v6.6487c1.4712-.2656 2.8025-1.0391 3.7619-2.1855.9594-1.1465 1.486-2.5933 1.4881-4.0882Z"/></svg>',
18
+ "file-search": '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 25 24"><path fill="#CCCED8" d="m20.6293 7.455-5.25-5.25c-.1045-.10461-.2285-.1876-.3651-.24422-.1366-.05662-.283-.08577-.4308-.08578H5.58337c-.49728 0-.97419.19754-1.32582.54917-.35163.35164-.54918.82855-.54918 1.32583v16.5c0 .4973.19755.9742.54918 1.3258.35163.3517.82854.5492 1.32582.5492H19.0834c.4973 0 .9742-.1975 1.3258-.5492.3516-.3516.5492-.8285.5492-1.3258v-12c0-.29813-.1184-.58407-.3291-.795Zm-3.1397.045h-2.1562V5.34375L17.4896 7.5ZM5.95837 19.875V4.125h7.12503v4.5c0 .29837.1185.58452.3295.7955.211.21097.4971.3295.7955.3295h4.5v10.125H5.95837Zm9.04503-4.5459c.3426-.7185.4202-1.5349.2192-2.3051-.2011-.7702-.6679-1.4445-1.3179-1.9038-.65-.4594-1.4415-.6742-2.2346-.6066-.7931.0677-1.5368.4135-2.0996.9763-.56283.5629-.90863 1.3065-.9763 2.0996-.06766.7931.14716 1.5846.60651 2.2346.45936.6501 1.13369 1.1169 1.90389 1.3179.7701.201 1.5866.1234 2.305-.2192l1.125 1.125c.2114.2114.498.3301.7969.3301.2989 0 .5855-.1187.7969-.3301.2113-.2113.3301-.498.3301-.7969 0-.2988-.1188-.5855-.3301-.7968l-1.125-1.125Zm-4.17-1.4541c0-.2225.066-.44.1896-.625.1236-.185.2993-.3292.5049-.4144.2055-.0851.4317-.1074.65-.064.2182.0434.4186.1506.576.3079.1573.1573.2644.3578.3079.576.0434.2183.0211.4445-.0641.65-.0851.2056-.2293.3813-.4143.5049-.185.1236-.4025.1896-.625.1896-.2984 0-.5845-.1185-.7955-.3295-.211-.211-.3295-.4971-.3295-.7955Z"/></svg>',
19
+ "check-circle": '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14"><path fill="#fff" d="M10.0306 4.96938c.0699.06967.1254.15247.1633.24363.0378.09116.0573.1889.0573.28762 0 .09871-.0195.19645-.0573.28761-.0379.09116-.0934.17396-.1633.24364L6.53063 9.53187c-.06968.06992-.15247.1254-.24364.16326-.09116.03785-.1889.05734-.28761.05734-.09871 0-.19645-.01949-.28762-.05734-.09116-.03786-.17395-.09334-.24363-.16326l-1.5-1.5c-.06977-.06976-.12511-.15258-.16286-.24373-.03776-.09116-.05719-.18885-.05719-.28752 0-.09866.01943-.19635.05719-.28751.03775-.09115.09309-.17397.16286-.24373.06976-.06977.15259-.12511.24374-.16287.09115-.03775.18885-.05719.28751-.05719s.19636.01944.28751.05719c.09115.03776.17397.0931.24374.16287L6 7.9375l2.96938-2.97c.06978-.06961.15259-.12478.24371-.16237.09111-.03758.18874-.05683.2873-.05666.09856.00018.19612.01978.28711.05768.09098.0379.1736.09337.2431.16323ZM13.75 7c0 1.33502-.3959 2.64007-1.1376 3.7501-.7417 1.11-1.7959 1.9752-3.02928 2.4861-1.23341.5109-2.5906.6446-3.89998.3841-1.30937-.2605-2.5121-.9033-3.45611-1.8473-.944-.944-1.586877-2.14677-1.847328-3.45614-.26045-1.30937-.126777-2.66657.384114-3.89997C1.27471 3.18349 2.13987 2.12928 3.2499 1.38758 4.35994.645881 5.66498.25 7 .25c1.78961.001985 3.5053.713781 4.7708 1.97922C13.0362 3.49466 13.748 5.2104 13.75 7Zm-1.5 0c0-1.03835-.3079-2.05339-.8848-2.91674-.5769-.86336-1.3968-1.53627-2.35611-1.93363-.95931-.39736-2.01491-.50133-3.03331-.29875-1.0184.20257-1.95386.70258-2.68809 1.43681-.73422.73422-1.23424 1.66969-1.43681 2.68809-.20257 1.0184-.0986 2.074.29876 3.03331.39736.95931 1.07026 1.77921 1.93362 2.35611.86336.5769 1.87839.8848 2.91674.8848 1.39193-.0015 2.72643-.5551 3.7107-1.5393C11.6949 9.72642 12.2485 8.39193 12.25 7Z"/></svg>'
17
20
  };
18
21
  export {
19
22
  getIconElement,
@@ -24,6 +24,7 @@ class DevOverlayTooltip extends HTMLElement {
24
24
  max-width: 45ch;
25
25
  width: fit-content;
26
26
  min-width: 27ch;
27
+ 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);
27
28
  }
28
29
 
29
30
  :host([data-show="true"]) {
@@ -28,6 +28,7 @@ class DevOverlayWindow extends HTMLElement {
28
28
  top: 55%;
29
29
  left: 50%;
30
30
  transform: translate(-50%, -50%);
31
+ 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);
31
32
  }
32
33
 
33
34
  h1 {
@@ -359,7 +359,7 @@ if (inBrowser) {
359
359
  async function prepareForClientOnlyComponents(newDocument, toLocation) {
360
360
  if (newDocument.body.querySelector(`astro-island[client='only']`)) {
361
361
  const nextPage = document.createElement("iframe");
362
- nextPage.srcdoc = (newDocument.doctype ? "<!DOCTYPE html>" : "") + newDocument.documentElement.outerHTML;
362
+ nextPage.src = toLocation.href;
363
363
  nextPage.style.display = "none";
364
364
  document.body.append(nextPage);
365
365
  nextPage.contentWindow.console = Object.keys(console).reduce((acc, key) => {
@@ -29,7 +29,8 @@ function astroScriptsPlugin({ settings }) {
29
29
  },
30
30
  buildStart() {
31
31
  const hasHydrationScripts = settings.scripts.some((s) => s.stage === "before-hydration");
32
- if (hasHydrationScripts && env?.command === "build" && !env?.ssrBuild) {
32
+ const isSsrBuild = env?.ssrBuild || env?.isSsrBuild;
33
+ if (hasHydrationScripts && env?.command === "build" && !isSsrBuild) {
33
34
  this.emitFile({
34
35
  type: "chunk",
35
36
  id: BEFORE_HYDRATION_SCRIPT_ID,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro",
3
- "version": "3.4.3",
3
+ "version": "3.4.4",
4
4
  "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
5
5
  "type": "module",
6
6
  "author": "withastro",