astro 3.5.2 → 3.5.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 (42) hide show
  1. package/components/Code.astro +6 -54
  2. package/components/ViewTransitions.astro +5 -2
  3. package/config.d.ts +2 -1
  4. package/dist/@types/astro.d.ts +70 -63
  5. package/dist/assets/services/noop.js +1 -0
  6. package/dist/content/vite-plugin-content-assets.js +1 -1
  7. package/dist/content/vite-plugin-content-virtual-mod.js +1 -1
  8. package/dist/core/app/index.js +5 -1
  9. package/dist/core/app/types.d.ts +1 -0
  10. package/dist/core/build/generate.js +3 -1
  11. package/dist/core/build/plugins/plugin-css.js +8 -2
  12. package/dist/core/build/plugins/plugin-manifest.js +1 -0
  13. package/dist/core/build/plugins/plugin-prerender.js +4 -1
  14. package/dist/core/constants.js +1 -1
  15. package/dist/core/dev/dev.js +1 -1
  16. package/dist/core/errors/dev/vite.js +1 -1
  17. package/dist/core/logger/core.d.ts +1 -1
  18. package/dist/core/logger/core.js +3 -3
  19. package/dist/core/messages.js +2 -2
  20. package/dist/core/preview/vite-plugin-astro-preview.js +2 -1
  21. package/dist/core/shiki.d.ts +2 -8
  22. package/dist/core/shiki.js +5 -24
  23. package/dist/i18n/middleware.d.ts +1 -1
  24. package/dist/i18n/middleware.js +8 -4
  25. package/dist/runtime/client/dev-overlay/entrypoint.js +12 -4
  26. package/dist/runtime/client/dev-overlay/overlay.js +11 -5
  27. package/dist/runtime/client/dev-overlay/plugins/astro.js +9 -36
  28. package/dist/runtime/client/dev-overlay/plugins/settings.d.ts +8 -0
  29. package/dist/runtime/client/dev-overlay/plugins/settings.js +93 -0
  30. package/dist/runtime/client/dev-overlay/plugins/utils/window.d.ts +3 -0
  31. package/dist/runtime/client/dev-overlay/plugins/utils/window.js +45 -0
  32. package/dist/runtime/client/dev-overlay/settings.d.ts +12 -0
  33. package/dist/runtime/client/dev-overlay/settings.js +26 -0
  34. package/dist/runtime/client/dev-overlay/ui-library/icons.d.ts +1 -0
  35. package/dist/runtime/client/dev-overlay/ui-library/icons.js +2 -1
  36. package/dist/runtime/client/dev-overlay/ui-library/toggle.d.ts +6 -0
  37. package/dist/runtime/client/dev-overlay/ui-library/toggle.js +51 -0
  38. package/dist/runtime/client/dev-overlay/ui-library/window.js +36 -7
  39. package/dist/transitions/router.js +1 -1
  40. package/dist/vite-plugin-astro-server/plugin.js +1 -0
  41. package/dist/vite-plugin-astro-server/route.js +5 -1
  42. package/package.json +3 -3
@@ -10,8 +10,7 @@ import type {
10
10
  ThemeRegistration,
11
11
  ThemeRegistrationRaw,
12
12
  } from 'shikiji';
13
- import { visit } from 'unist-util-visit';
14
- import { getCachedHighlighter, replaceCssVariables } from '../dist/core/shiki.js';
13
+ import { getCachedHighlighter } from '../dist/core/shiki.js';
15
14
 
16
15
  interface Props {
17
16
  /** The code to highlight. Required. */
@@ -94,60 +93,13 @@ if (typeof lang === 'object') {
94
93
 
95
94
  const highlighter = await getCachedHighlighter({
96
95
  langs: [lang],
97
- themes: Object.values(experimentalThemes).length ? Object.values(experimentalThemes) : [theme],
96
+ theme,
97
+ experimentalThemes,
98
+ wrap,
98
99
  });
99
100
 
100
- const themeOptions = Object.values(experimentalThemes).length
101
- ? { themes: experimentalThemes }
102
- : { theme };
103
- const html = highlighter.codeToHtml(code, {
104
- lang: typeof lang === 'string' ? lang : lang.name,
105
- ...themeOptions,
106
- transforms: {
107
- pre(node) {
108
- // Swap to `code` tag if inline
109
- if (inline) {
110
- node.tagName = 'code';
111
- }
112
-
113
- // Cast to string as shikiji will always pass them as strings instead of any other types
114
- const classValue = (node.properties.class as string) ?? '';
115
- const styleValue = (node.properties.style as string) ?? '';
116
-
117
- // Replace "shiki" class naming with "astro-code"
118
- node.properties.class = classValue.replace(/shiki/g, 'astro-code');
119
-
120
- // Handle code wrapping
121
- // if wrap=null, do nothing.
122
- if (wrap === false) {
123
- node.properties.style = styleValue + '; overflow-x: auto;';
124
- } else if (wrap === true) {
125
- node.properties.style =
126
- styleValue + '; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;';
127
- }
128
- },
129
- code(node) {
130
- if (inline) {
131
- return node.children[0] as typeof node;
132
- }
133
- },
134
- root(node) {
135
- if (Object.values(experimentalThemes).length) {
136
- return;
137
- }
138
-
139
- // theme.id for shiki -> shikiji compat
140
- const themeName = typeof theme === 'string' ? theme : theme.name;
141
- if (themeName === 'css-variables') {
142
- // Replace special color tokens to CSS variables
143
- visit(node as any, 'element', (child) => {
144
- if (child.properties?.style) {
145
- child.properties.style = replaceCssVariables(child.properties.style);
146
- }
147
- });
148
- }
149
- },
150
- },
101
+ const html = highlighter.highlight(code, typeof lang === 'string' ? lang : lang.name, {
102
+ inline,
151
103
  });
152
104
  ---
153
105
 
@@ -88,11 +88,14 @@ const { fallback = 'animate', handleForms } = Astro.props;
88
88
  }
89
89
 
90
90
  const form = el as HTMLFormElement;
91
+ const submitter = ev.submitter;
91
92
  const formData = new FormData(form);
92
93
  // Use the form action, if defined, otherwise fallback to current path.
93
- let action = form.action ?? location.pathname;
94
+ let action = submitter?.getAttribute('formaction') ?? form.action ?? location.pathname;
95
+ const method = submitter?.getAttribute('formmethod') ?? form.method;
96
+
94
97
  const options: Options = {};
95
- if (form.method === 'get') {
98
+ if (method === 'get') {
96
99
  const params = new URLSearchParams(formData as any);
97
100
  const url = new URL(action);
98
101
  url.search = params.toString();
package/config.d.ts CHANGED
@@ -16,12 +16,12 @@ export function getViteConfig(config: ViteUserConfig): ViteUserConfigFn;
16
16
 
17
17
  /**
18
18
  * Return the configuration needed to use the Sharp-based image service
19
- * See: https://docs.astro.build/en/guides/assets/#using-sharp
20
19
  */
21
20
  export function sharpImageService(): ImageServiceConfig;
22
21
 
23
22
  /**
24
23
  * Return the configuration needed to use the Squoosh-based image service
24
+ * See: https://docs.astro.build/en/guides/images/#configure-squoosh
25
25
  */
26
26
  export function squooshImageService(): ImageServiceConfig;
27
27
 
@@ -29,5 +29,6 @@ export function squooshImageService(): ImageServiceConfig;
29
29
  * Return the configuration needed to use the passthrough image service. This image services does not perform
30
30
  * any image transformations, and is mainly useful when your platform does not support other image services, or you are
31
31
  * not using Astro's built-in image processing.
32
+ * See: https://docs.astro.build/en/guides/images/#configure-no-op-passthrough-service
32
33
  */
33
34
  export function passthroughImageService(): ImageServiceConfig;
@@ -19,6 +19,7 @@ import type { AstroIntegrationLogger, Logger, LoggerLevel } from '../core/logger
19
19
  import type { AstroDevOverlay, DevOverlayCanvas } from '../runtime/client/dev-overlay/overlay.js';
20
20
  import type { DevOverlayHighlight } from '../runtime/client/dev-overlay/ui-library/highlight.js';
21
21
  import type { Icon } from '../runtime/client/dev-overlay/ui-library/icons.js';
22
+ import type { DevOverlayToggle } from '../runtime/client/dev-overlay/ui-library/toggle.js';
22
23
  import type { DevOverlayTooltip } from '../runtime/client/dev-overlay/ui-library/tooltip.js';
23
24
  import type { DevOverlayWindow } from '../runtime/client/dev-overlay/ui-library/window.js';
24
25
  import type { AstroComponentFactory, AstroComponentInstance } from '../runtime/server/index.js';
@@ -464,67 +465,6 @@ export interface AstroUserConfig {
464
465
  * ```
465
466
  */
466
467
  redirects?: Record<string, RedirectConfig>;
467
- /**
468
- * @docs
469
- * @name prefetch
470
- * @type {boolean | object}
471
- * @description
472
- * Enable prefetching for links on your site to provide faster page transitions.
473
- * (Enabled by default on pages using the `<ViewTransitions />` router. Set `prefetch: false` to opt out of this behaviour.)
474
- *
475
- * This configuration automatically adds a prefetch script to every page in the project
476
- * giving you access to the `data-astro-prefetch` attribute.
477
- * Add this attribute to any `<a />` link on your page to enable prefetching for that page.
478
- *
479
- * ```html
480
- * <a href="/about" data-astro-prefetch>About</a>
481
- * ```
482
- * Further customize the default prefetching behavior using the [`prefetch.defaultStrategy`](#prefetchdefaultstrategy) and [`prefetch.prefetchAll`](#prefetchprefetchall) options.
483
- *
484
- * See the [Prefetch guide](https://docs.astro.build/en/guides/prefetch/) for more information.
485
- */
486
- prefetch?: boolean | {
487
- /**
488
- * @docs
489
- * @name prefetch.prefetchAll
490
- * @type {boolean}
491
- * @description
492
- * Enable prefetching for all links, including those without the `data-astro-prefetch` attribute.
493
- * This value defaults to `true` when using the `<ViewTransitions />` router. Otherwise, the default value is `false`.
494
- *
495
- * ```js
496
- * prefetch: {
497
- * prefetchAll: true
498
- * }
499
- * ```
500
- *
501
- * When set to `true`, you can disable prefetching individually by setting `data-astro-prefetch="false"` on any individual links.
502
- *
503
- * ```html
504
- * <a href="/about" data-astro-prefetch="false">About</a>
505
- *```
506
- */
507
- prefetchAll?: boolean;
508
- /**
509
- * @docs
510
- * @name prefetch.defaultStrategy
511
- * @type {'tap' | 'hover' | 'viewport'}
512
- * @default `'hover'`
513
- * @description
514
- * The default prefetch strategy to use when the `data-astro-prefetch` attribute is set on a link with no value.
515
- *
516
- * - `'tap'`: Prefetch just before you click on the link.
517
- * - `'hover'`: Prefetch when you hover over or focus on the link. (default)
518
- * - `'viewport'`: Prefetch as the links enter the viewport.
519
- *
520
- * You can override this default value and select a different strategy for any individual link by setting a value on the attribute.
521
- *
522
- * ```html
523
- * <a href="/about" data-astro-prefetch="viewport">About</a>
524
- * ```
525
- */
526
- defaultStrategy?: 'tap' | 'hover' | 'viewport';
527
- };
528
468
  /**
529
469
  * @docs
530
470
  * @name site
@@ -893,6 +833,68 @@ export interface AstroUserConfig {
893
833
  */
894
834
  excludeMiddleware?: boolean;
895
835
  };
836
+ /**
837
+ * @docs
838
+ * @kind heading
839
+ * @name Prefetch Options
840
+ * @type {boolean | object}
841
+ * @description
842
+ * Enable prefetching for links on your site to provide faster page transitions.
843
+ * (Enabled by default on pages using the `<ViewTransitions />` router. Set `prefetch: false` to opt out of this behaviour.)
844
+ *
845
+ * This configuration automatically adds a prefetch script to every page in the project
846
+ * giving you access to the `data-astro-prefetch` attribute.
847
+ * Add this attribute to any `<a />` link on your page to enable prefetching for that page.
848
+ *
849
+ * ```html
850
+ * <a href="/about" data-astro-prefetch>About</a>
851
+ * ```
852
+ * Further customize the default prefetching behavior using the [`prefetch.defaultStrategy`](#prefetchdefaultstrategy) and [`prefetch.prefetchAll`](#prefetchprefetchall) options.
853
+ *
854
+ * See the [Prefetch guide](https://docs.astro.build/en/guides/prefetch/) for more information.
855
+ */
856
+ prefetch?: boolean | {
857
+ /**
858
+ * @docs
859
+ * @name prefetch.prefetchAll
860
+ * @type {boolean}
861
+ * @description
862
+ * Enable prefetching for all links, including those without the `data-astro-prefetch` attribute.
863
+ * This value defaults to `true` when using the `<ViewTransitions />` router. Otherwise, the default value is `false`.
864
+ *
865
+ * ```js
866
+ * prefetch: {
867
+ * prefetchAll: true
868
+ * }
869
+ * ```
870
+ *
871
+ * When set to `true`, you can disable prefetching individually by setting `data-astro-prefetch="false"` on any individual links.
872
+ *
873
+ * ```html
874
+ * <a href="/about" data-astro-prefetch="false">About</a>
875
+ *```
876
+ */
877
+ prefetchAll?: boolean;
878
+ /**
879
+ * @docs
880
+ * @name prefetch.defaultStrategy
881
+ * @type {'tap' | 'hover' | 'viewport'}
882
+ * @default `'hover'`
883
+ * @description
884
+ * The default prefetch strategy to use when the `data-astro-prefetch` attribute is set on a link with no value.
885
+ *
886
+ * - `'tap'`: Prefetch just before you click on the link.
887
+ * - `'hover'`: Prefetch when you hover over or focus on the link. (default)
888
+ * - `'viewport'`: Prefetch as the links enter the viewport.
889
+ *
890
+ * You can override this default value and select a different strategy for any individual link by setting a value on the attribute.
891
+ *
892
+ * ```html
893
+ * <a href="/about" data-astro-prefetch="viewport">About</a>
894
+ * ```
895
+ */
896
+ defaultStrategy?: 'tap' | 'hover' | 'viewport';
897
+ };
896
898
  /**
897
899
  * @docs
898
900
  * @kind heading
@@ -1351,6 +1353,7 @@ export interface AstroUserConfig {
1351
1353
  i18n?: {
1352
1354
  /**
1353
1355
  * @docs
1356
+ * @kind h4
1354
1357
  * @name experimental.i18n.defaultLocale
1355
1358
  * @type {string}
1356
1359
  * @version 3.5.0
@@ -1363,6 +1366,7 @@ export interface AstroUserConfig {
1363
1366
  defaultLocale: string;
1364
1367
  /**
1365
1368
  * @docs
1369
+ * @kind h4
1366
1370
  * @name experimental.i18n.locales
1367
1371
  * @type {string[]}
1368
1372
  * @version 3.5.0
@@ -1375,6 +1379,7 @@ export interface AstroUserConfig {
1375
1379
  locales: string[];
1376
1380
  /**
1377
1381
  * @docs
1382
+ * @kind h4
1378
1383
  * @name experimental.i18n.fallback
1379
1384
  * @type {Record<string, string>}
1380
1385
  * @version 3.5.0
@@ -1384,12 +1389,12 @@ export interface AstroUserConfig {
1384
1389
  *
1385
1390
  * Use this object to declare a fallback `locale` route for each language you support. If no fallback is specified, then unavailable pages will return a 404.
1386
1391
  *
1387
- * #### Example
1392
+ * ##### Example
1388
1393
  *
1389
1394
  * The following example configures your content fallback strategy to redirect unavailable pages in `/pt-br/` to their `es` version, and unavailable pages in `/fr/` to their `en` version. Unavailable `/es/` pages will return a 404.
1390
1395
  *
1391
1396
  * ```js
1392
- * export defualt defineConfig({
1397
+ * export default defineConfig({
1393
1398
  * experimental: {
1394
1399
  * i18n: {
1395
1400
  * defaultLocale: "en",
@@ -1406,6 +1411,7 @@ export interface AstroUserConfig {
1406
1411
  fallback?: Record<string, string>;
1407
1412
  /**
1408
1413
  * @docs
1414
+ * @kind h4
1409
1415
  * @name experimental.i18n.routingStrategy
1410
1416
  * @type {'prefix-always' | 'prefix-other-locales'}
1411
1417
  * @default 'prefix-other-locales'
@@ -2294,5 +2300,6 @@ declare global {
2294
2300
  'astro-dev-overlay-plugin-canvas': DevOverlayCanvas;
2295
2301
  'astro-dev-overlay-tooltip': DevOverlayTooltip;
2296
2302
  'astro-dev-overlay-highlight': DevOverlayHighlight;
2303
+ 'astro-dev-overlay-toggle': DevOverlayToggle;
2297
2304
  }
2298
2305
  }
@@ -1,5 +1,6 @@
1
1
  import { baseService } from "./service.js";
2
2
  const noopService = {
3
+ propertiesToHash: ["src"],
3
4
  validateOptions: baseService.validateOptions,
4
5
  getURL: baseService.getURL,
5
6
  parseURL: baseService.parseURL,
@@ -139,7 +139,7 @@ function astroConfigBuildPlugin(options, internals) {
139
139
  const pageData = getPageDataByViteID(internals, pageViteID);
140
140
  if (!pageData)
141
141
  continue;
142
- const _entryCss = internals.propagatedStylesMap?.get(id);
142
+ const _entryCss = pageData.propagatedStyles?.get(id);
143
143
  const _entryScripts = pageData.propagatedScripts?.get(id);
144
144
  if (_entryCss) {
145
145
  for (const value of _entryCss) {
@@ -65,7 +65,7 @@ function astroContentVirtualModPlugin({
65
65
  hydratedComponents: [],
66
66
  clientOnlyComponents: [],
67
67
  scripts: [],
68
- containsHead: true,
68
+ containsHead: false,
69
69
  propagation: "in-tree",
70
70
  pageOptions: {}
71
71
  }
@@ -130,7 +130,11 @@ class App {
130
130
  );
131
131
  let response;
132
132
  try {
133
- let i18nMiddleware = createI18nMiddleware(this.#manifest.i18n, this.#manifest.base);
133
+ let i18nMiddleware = createI18nMiddleware(
134
+ this.#manifest.i18n,
135
+ this.#manifest.base,
136
+ this.#manifest.trailingSlash
137
+ );
134
138
  if (i18nMiddleware) {
135
139
  if (mod.onRequest) {
136
140
  this.#pipeline.setMiddlewareFunction(
@@ -30,6 +30,7 @@ export type SSRManifest = {
30
30
  routes: RouteInfo[];
31
31
  site?: string;
32
32
  base: string;
33
+ trailingSlash: 'always' | 'never' | 'ignore';
33
34
  compressHTML: boolean;
34
35
  assetsPrefix?: string;
35
36
  renderers: SSRLoadedRenderer[];
@@ -205,7 +205,8 @@ async function generatePage(pageData, ssrEntry, builtPaths, pipeline) {
205
205
  const onRequest = ssrEntry.onRequest;
206
206
  const i18nMiddleware = createI18nMiddleware(
207
207
  pipeline.getManifest().i18n,
208
- pipeline.getManifest().base
208
+ pipeline.getManifest().base,
209
+ pipeline.getManifest().trailingSlash
209
210
  );
210
211
  if (config.experimental.i18n && i18nMiddleware) {
211
212
  if (onRequest) {
@@ -468,6 +469,7 @@ function createBuildManifest(settings, internals, renderers) {
468
469
  };
469
470
  }
470
471
  return {
472
+ trailingSlash: settings.config.trailingSlash,
471
473
  assets: /* @__PURE__ */ new Set(),
472
474
  entryModules: Object.fromEntries(internals.entrySpecifierToBundleMap.entries()),
473
475
  routes: [],
@@ -34,6 +34,7 @@ function rollupPluginAstroBuildCSS(options) {
34
34
  let resolvedConfig;
35
35
  const pagesToCss = {};
36
36
  const pagesToPropagatedCss = {};
37
+ const isContentCollectionCache = options.buildOptions.settings.config.output === "static" && options.buildOptions.settings.config.experimental.contentCollectionCache;
37
38
  const cssBuildPlugin = {
38
39
  name: "astro:rollup-plugin-build-css",
39
40
  outputOptions(outputOptions) {
@@ -52,7 +53,7 @@ function rollupPluginAstroBuildCSS(options) {
52
53
  if (new URL(pageInfo.id, "file://").searchParams.has(PROPAGATED_ASSET_FLAG)) {
53
54
  const chunkId2 = assetName.createNameHash(id, [id]);
54
55
  internals.cssModuleToChunkIdMap.set(id, chunkId2);
55
- if (options.buildOptions.settings.config.output === "static" && options.buildOptions.settings.config.experimental.contentCollectionCache) {
56
+ if (isContentCollectionCache) {
56
57
  const propagatedStyles = internals.propagatedStylesMap.get(pageInfo.id) ?? /* @__PURE__ */ new Set();
57
58
  propagatedStyles.add({ type: "external", src: chunkId2 });
58
59
  internals.propagatedStylesMap.set(pageInfo.id, propagatedStyles);
@@ -174,7 +175,12 @@ function rollupPluginAstroBuildCSS(options) {
174
175
  return;
175
176
  if (pageData.styles.some((s) => s.sheet === sheet))
176
177
  return;
177
- const propagatedStyles = internals.propagatedStylesMap.get(pageInfoId) ?? internals.propagatedStylesMap.set(pageInfoId, /* @__PURE__ */ new Set()).get(pageInfoId);
178
+ let propagatedStyles;
179
+ if (isContentCollectionCache) {
180
+ propagatedStyles = internals.propagatedStylesMap.get(pageInfoId) ?? internals.propagatedStylesMap.set(pageInfoId, /* @__PURE__ */ new Set()).get(pageInfoId);
181
+ } else {
182
+ propagatedStyles = pageData.propagatedStyles.get(pageInfoId) ?? pageData.propagatedStyles.set(pageInfoId, /* @__PURE__ */ new Set()).get(pageInfoId);
183
+ }
178
184
  propagatedStyles.add(sheet);
179
185
  sheetAddedToPage = true;
180
186
  });
@@ -196,6 +196,7 @@ function buildManifest(opts, internals, staticFiles) {
196
196
  routes,
197
197
  site: settings.config.site,
198
198
  base: settings.config.base,
199
+ trailingSlash: settings.config.trailingSlash,
199
200
  compressHTML: settings.config.compressHTML,
200
201
  assetsPrefix: settings.config.build.assetsPrefix,
201
202
  componentMetadata: Array.from(internals.componentMetadata),
@@ -6,7 +6,10 @@ function vitePluginPrerender(opts, internals) {
6
6
  name: "astro:rollup-plugin-prerender",
7
7
  outputOptions(outputOptions) {
8
8
  extendManualChunks(outputOptions, {
9
- before(id, meta) {
9
+ after(id, meta) {
10
+ if (id.includes("astro/dist/runtime")) {
11
+ return "astro";
12
+ }
10
13
  const pageInfo = internals.pagesByViteID.get(id);
11
14
  if (pageInfo) {
12
15
  if (getPrerenderMetadata(meta.getModuleInfo(id))) {
@@ -1,4 +1,4 @@
1
- const ASTRO_VERSION = "3.5.2";
1
+ const ASTRO_VERSION = "3.5.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.5.2";
23
+ const currentVersion = "3.5.4";
24
24
  if (currentVersion.includes("-")) {
25
25
  logger.warn(null, msg.prerelease({ currentVersion }));
26
26
  }
@@ -1,7 +1,7 @@
1
+ import { replaceCssVariables } from "@astrojs/markdown-remark";
1
2
  import * as fs from "node:fs";
2
3
  import { fileURLToPath } from "node:url";
3
4
  import { codeToHtml } from "shikiji";
4
- import { replaceCssVariables } from "../../shiki.js";
5
5
  import { FailedToLoadModuleSSR, InvalidGlob, MdxIntegrationMissingError } from "../errors-data.js";
6
6
  import { AstroError } from "../errors.js";
7
7
  import { createSafeError } from "../utils.js";
@@ -33,7 +33,7 @@ export declare class Logger {
33
33
  info(label: string | null, message: string): void;
34
34
  warn(label: string | null, message: string): void;
35
35
  error(label: string | null, message: string): void;
36
- debug(label: string | null, message: string, ...args: any[]): void;
36
+ debug(label: string | null, ...messages: any[]): void;
37
37
  level(): LoggerLevel;
38
38
  forkIntegrationLogger(label: string): AstroIntegrationLogger;
39
39
  }
@@ -89,8 +89,8 @@ class Logger {
89
89
  error(label, message) {
90
90
  error(this.options, label, message);
91
91
  }
92
- debug(label, message, ...args) {
93
- debug(this.options, label, message, args);
92
+ debug(label, ...messages) {
93
+ debug(label, ...messages);
94
94
  }
95
95
  level() {
96
96
  return this.options.level;
@@ -122,7 +122,7 @@ class AstroIntegrationLogger {
122
122
  error(this.options, this.label, message);
123
123
  }
124
124
  debug(message) {
125
- debug(this.options, this.label, message);
125
+ debug(this.label, message);
126
126
  }
127
127
  }
128
128
  export {
@@ -50,7 +50,7 @@ function serverStart({
50
50
  base,
51
51
  isRestart = false
52
52
  }) {
53
- const version = "3.5.2";
53
+ const version = "3.5.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.5.2"}`
238
+ `v${"3.5.4"}`
239
239
  )} ${headline}`
240
240
  );
241
241
  }
@@ -17,7 +17,8 @@ function vitePluginAstroPreview(settings) {
17
17
  res.end(subpathNotUsedTemplate(base, req.url));
18
18
  return;
19
19
  }
20
- const pathname = stripBase(req.url, base);
20
+ const strippedPathname = stripBase(req.url, base);
21
+ const pathname = new URL(strippedPathname, "https://a.b").pathname;
21
22
  const isRoot = pathname === "/";
22
23
  if (!isRoot) {
23
24
  const hasTrailingSlash = pathname.endsWith("/");
@@ -1,8 +1,2 @@
1
- import { getHighlighter, type Highlighter } from 'shikiji';
2
- type HighlighterOptions = NonNullable<Parameters<typeof getHighlighter>[0]>;
3
- /**
4
- * shiki -> shikiji compat as we need to manually replace it
5
- */
6
- export declare function replaceCssVariables(str: string): string;
7
- export declare function getCachedHighlighter(opts: HighlighterOptions): Promise<Highlighter>;
8
- export {};
1
+ import { type ShikiConfig, type ShikiHighlighter } from '@astrojs/markdown-remark';
2
+ export declare function getCachedHighlighter(opts: ShikiConfig): Promise<ShikiHighlighter>;
@@ -1,35 +1,16 @@
1
- import { getHighlighter } from "shikiji";
2
- const ASTRO_COLOR_REPLACEMENTS = {
3
- "#000001": "var(--astro-code-color-text)",
4
- "#000002": "var(--astro-code-color-background)",
5
- "#000004": "var(--astro-code-token-constant)",
6
- "#000005": "var(--astro-code-token-string)",
7
- "#000006": "var(--astro-code-token-comment)",
8
- "#000007": "var(--astro-code-token-keyword)",
9
- "#000008": "var(--astro-code-token-parameter)",
10
- "#000009": "var(--astro-code-token-function)",
11
- "#000010": "var(--astro-code-token-string-expression)",
12
- "#000011": "var(--astro-code-token-punctuation)",
13
- "#000012": "var(--astro-code-token-link)"
14
- };
15
- const COLOR_REPLACEMENT_REGEX = new RegExp(
16
- `(${Object.keys(ASTRO_COLOR_REPLACEMENTS).join("|")})`,
17
- "g"
18
- );
1
+ import {
2
+ createShikiHighlighter
3
+ } from "@astrojs/markdown-remark";
19
4
  const cachedHighlighters = /* @__PURE__ */ new Map();
20
- function replaceCssVariables(str) {
21
- return str.replace(COLOR_REPLACEMENT_REGEX, (match) => ASTRO_COLOR_REPLACEMENTS[match] || match);
22
- }
23
5
  function getCachedHighlighter(opts) {
24
6
  const key = JSON.stringify(opts, Object.keys(opts).sort());
25
7
  if (cachedHighlighters.has(key)) {
26
8
  return cachedHighlighters.get(key);
27
9
  }
28
- const highlighter = getHighlighter(opts);
10
+ const highlighter = createShikiHighlighter(opts);
29
11
  cachedHighlighters.set(key, highlighter);
30
12
  return highlighter;
31
13
  }
32
14
  export {
33
- getCachedHighlighter,
34
- replaceCssVariables
15
+ getCachedHighlighter
35
16
  };
@@ -1,2 +1,2 @@
1
1
  import type { MiddlewareEndpointHandler, SSRManifest } from '../@types/astro.js';
2
- export declare function createI18nMiddleware(i18n: SSRManifest['i18n'], base: SSRManifest['base']): MiddlewareEndpointHandler | undefined;
2
+ export declare function createI18nMiddleware(i18n: SSRManifest['i18n'], base: SSRManifest['base'], trailingSlash: SSRManifest['trailingSlash']): MiddlewareEndpointHandler | undefined;
@@ -1,4 +1,4 @@
1
- import { joinPaths } from "@astrojs/internal-helpers/path";
1
+ import { appendForwardSlash, joinPaths } from "@astrojs/internal-helpers/path";
2
2
  function checkIsLocaleFree(pathname, locales) {
3
3
  for (const locale of locales) {
4
4
  if (pathname.includes(`/${locale}`)) {
@@ -7,7 +7,7 @@ function checkIsLocaleFree(pathname, locales) {
7
7
  }
8
8
  return true;
9
9
  }
10
- function createI18nMiddleware(i18n, base) {
10
+ function createI18nMiddleware(i18n, base, trailingSlash) {
11
11
  if (!i18n) {
12
12
  return void 0;
13
13
  }
@@ -30,8 +30,12 @@ function createI18nMiddleware(i18n, base) {
30
30
  headers: response.headers
31
31
  });
32
32
  } else if (i18n.routingStrategy === "prefix-always") {
33
- if (url.pathname === base || url.pathname === base + "/") {
34
- return context.redirect(`${joinPaths(base, i18n.defaultLocale)}`);
33
+ if (url.pathname === base + "/" || url.pathname === base) {
34
+ if (trailingSlash === "always") {
35
+ return context.redirect(`${appendForwardSlash(joinPaths(base, i18n.defaultLocale))}`);
36
+ } else {
37
+ return context.redirect(`${joinPaths(base, i18n.defaultLocale)}`);
38
+ }
35
39
  } else if (isLocaleFree) {
36
40
  return new Response(null, {
37
41
  status: 404,
@@ -1,4 +1,5 @@
1
1
  import {} from "./overlay.js";
2
+ import { settings } from "./settings.js";
2
3
  let overlay;
3
4
  document.addEventListener("DOMContentLoaded", async () => {
4
5
  const [
@@ -6,22 +7,26 @@ document.addEventListener("DOMContentLoaded", async () => {
6
7
  { default: astroDevToolPlugin },
7
8
  { default: astroAuditPlugin },
8
9
  { default: astroXrayPlugin },
10
+ { default: astroSettingsPlugin },
9
11
  { AstroDevOverlay, DevOverlayCanvas },
10
12
  { DevOverlayCard },
11
13
  { DevOverlayHighlight },
12
14
  { DevOverlayTooltip },
13
- { DevOverlayWindow }
15
+ { DevOverlayWindow },
16
+ { DevOverlayToggle }
14
17
  ] = await Promise.all([
15
18
  // @ts-expect-error
16
19
  import("astro:dev-overlay"),
17
20
  import("./plugins/astro.js"),
18
21
  import("./plugins/audit.js"),
19
22
  import("./plugins/xray.js"),
23
+ import("./plugins/settings.js"),
20
24
  import("./overlay.js"),
21
25
  import("./ui-library/card.js"),
22
26
  import("./ui-library/highlight.js"),
23
27
  import("./ui-library/tooltip.js"),
24
- import("./ui-library/window.js")
28
+ import("./ui-library/window.js"),
29
+ import("./ui-library/toggle.js")
25
30
  ]);
26
31
  customElements.define("astro-dev-overlay", AstroDevOverlay);
27
32
  customElements.define("astro-dev-overlay-window", DevOverlayWindow);
@@ -29,6 +34,7 @@ document.addEventListener("DOMContentLoaded", async () => {
29
34
  customElements.define("astro-dev-overlay-tooltip", DevOverlayTooltip);
30
35
  customElements.define("astro-dev-overlay-highlight", DevOverlayHighlight);
31
36
  customElements.define("astro-dev-overlay-card", DevOverlayCard);
37
+ customElements.define("astro-dev-overlay-toggle", DevOverlayToggle);
32
38
  overlay = document.createElement("astro-dev-overlay");
33
39
  const preparePlugin = (pluginDefinition, builtIn) => {
34
40
  const eventTarget = new EventTarget();
@@ -47,7 +53,9 @@ document.addEventListener("DOMContentLoaded", async () => {
47
53
  if (evt instanceof CustomEvent) {
48
54
  newState = evt.detail.state ?? true;
49
55
  }
50
- target.querySelector(".notification")?.toggleAttribute("data-active", newState);
56
+ if (settings.config.showPluginNotifications === false) {
57
+ target.querySelector(".notification")?.toggleAttribute("data-active", newState);
58
+ }
51
59
  });
52
60
  eventTarget.addEventListener("toggle-plugin", async (evt) => {
53
61
  let newState = void 0;
@@ -60,7 +68,7 @@ document.addEventListener("DOMContentLoaded", async () => {
60
68
  };
61
69
  const customPluginsDefinitions = await loadDevOverlayPlugins();
62
70
  const plugins = [
63
- ...[astroDevToolPlugin, astroXrayPlugin, astroAuditPlugin].map(
71
+ ...[astroDevToolPlugin, astroXrayPlugin, astroAuditPlugin, astroSettingsPlugin].map(
64
72
  (pluginDef) => preparePlugin(pluginDef, true)
65
73
  ),
66
74
  ...customPluginsDefinitions.map((pluginDef) => preparePlugin(pluginDef, false))
@@ -1,3 +1,4 @@
1
+ import { settings } from "./settings.js";
1
2
  import { getIconElement, isDefinedIcon } from "./ui-library/icons.js";
2
3
  const WS_EVENT_NAME = "astro-dev-overlay";
3
4
  class AstroDevOverlay extends HTMLElement {
@@ -221,9 +222,12 @@ class AstroDevOverlay extends HTMLElement {
221
222
  <div id="dev-overlay">
222
223
  <div id="dev-bar">
223
224
  <div id="bar-container">
224
- ${this.plugins.filter((plugin) => plugin.builtIn).map((plugin) => this.getPluginTemplate(plugin)).join("")}
225
+ ${this.plugins.filter((plugin) => plugin.builtIn && plugin.id !== "astro:settings").map((plugin) => this.getPluginTemplate(plugin)).join("")}
226
+ ${this.plugins.filter((plugin) => !plugin.builtIn).length > 0 ? `<div class="separator"></div>${this.plugins.filter((plugin) => !plugin.builtIn).map((plugin) => this.getPluginTemplate(plugin)).join("")}` : ""}
225
227
  <div class="separator"></div>
226
- ${this.plugins.filter((plugin) => !plugin.builtIn).map((plugin) => this.getPluginTemplate(plugin)).join("")}
228
+ ${this.getPluginTemplate(
229
+ this.plugins.find((plugin) => plugin.builtIn && plugin.id === "astro:settings")
230
+ )}
227
231
  </div>
228
232
  </div>
229
233
  <button id="minimize-button">${getIconElement("arrow-down")?.outerHTML}</button>
@@ -233,7 +237,8 @@ class AstroDevOverlay extends HTMLElement {
233
237
  }
234
238
  this.plugins.forEach(async (plugin) => {
235
239
  if (!this.hasBeenInitialized) {
236
- console.log(`Creating plugin canvas for ${plugin.id}`);
240
+ if (settings.config.verbose)
241
+ console.log(`Creating plugin canvas for ${plugin.id}`);
237
242
  const pluginCanvas = document.createElement("astro-dev-overlay-plugin-canvas");
238
243
  pluginCanvas.dataset.pluginId = plugin.id;
239
244
  this.shadowRoot?.append(pluginCanvas);
@@ -287,7 +292,7 @@ class AstroDevOverlay extends HTMLElement {
287
292
  if (this.isHidden()) {
288
293
  this.hoverTimeout = window.setTimeout(() => {
289
294
  this.toggleOverlay(true);
290
- }, this.HOVER_DELAY);
295
+ }, this.HOVER_DELAY + 200);
291
296
  } else {
292
297
  this.hoverTimeout = window.setTimeout(() => {
293
298
  this.toggleMinimizeButton(true);
@@ -329,7 +334,8 @@ class AstroDevOverlay extends HTMLElement {
329
334
  return;
330
335
  const shadowRoot = this.getPluginCanvasById(plugin.id).shadowRoot;
331
336
  try {
332
- console.info(`Initializing plugin ${plugin.id}`);
337
+ if (settings.config.verbose)
338
+ console.info(`Initializing plugin ${plugin.id}`);
333
339
  await plugin.init?.(shadowRoot, plugin.eventTarget);
334
340
  plugin.status = "ready";
335
341
  if (import.meta.hot) {
@@ -1,3 +1,4 @@
1
+ import { createWindowWithTransition, waitForTransition } from "./utils/window.js";
1
2
  var astro_default = {
2
3
  id: "astro",
3
4
  name: "Astro",
@@ -6,35 +7,10 @@ var astro_default = {
6
7
  createWindow();
7
8
  document.addEventListener("astro:after-swap", createWindow);
8
9
  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 = `
37
- <style>
10
+ const window = createWindowWithTransition(
11
+ "Astro",
12
+ "astro:logo",
13
+ `<style>
38
14
  #buttons-container {
39
15
  display: flex;
40
16
  gap: 16px;
@@ -84,16 +60,13 @@ var astro_default = {
84
60
  <a href="https://astro.build" target="_blank">Visit the Astro website</a>
85
61
  </footer>
86
62
  </div>
87
- `;
88
- canvas.append(astroWindow);
63
+ `
64
+ );
65
+ canvas.append(window);
89
66
  }
90
67
  },
91
68
  async beforeTogglingOff(canvas) {
92
- canvas.host?.removeAttribute("data-active");
93
- await new Promise((resolve) => {
94
- canvas.host.addEventListener("transitionend", resolve);
95
- });
96
- return true;
69
+ return await waitForTransition(canvas);
97
70
  }
98
71
  };
99
72
  export {
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ id: string;
3
+ name: string;
4
+ icon: "gear";
5
+ init(canvas: ShadowRoot): void;
6
+ beforeTogglingOff(canvas: ShadowRoot): Promise<boolean>;
7
+ };
8
+ export default _default;
@@ -0,0 +1,93 @@
1
+ import { settings } from "../settings.js";
2
+ import { createWindowWithTransition, waitForTransition } from "./utils/window.js";
3
+ const settingsRows = [
4
+ {
5
+ name: "Disable notifications",
6
+ description: "Notification bubbles will not be shown when this is enabled.",
7
+ input: "checkbox",
8
+ settingKey: "showPluginNotifications",
9
+ changeEvent: (evt) => {
10
+ if (evt.currentTarget instanceof HTMLInputElement) {
11
+ settings.updateSetting("showPluginNotifications", evt.currentTarget.checked);
12
+ }
13
+ }
14
+ },
15
+ {
16
+ name: "Verbose logging",
17
+ description: "Log additional information to the console.",
18
+ input: "checkbox",
19
+ settingKey: "verbose",
20
+ changeEvent: (evt) => {
21
+ if (evt.currentTarget instanceof HTMLInputElement) {
22
+ settings.updateSetting("verbose", evt.currentTarget.checked);
23
+ }
24
+ }
25
+ }
26
+ ];
27
+ var settings_default = {
28
+ id: "astro:settings",
29
+ name: "Overlay settings",
30
+ icon: "gear",
31
+ init(canvas) {
32
+ createSettingsWindow();
33
+ document.addEventListener("astro:after-swap", createSettingsWindow);
34
+ function createSettingsWindow() {
35
+ const window = createWindowWithTransition(
36
+ "Settings",
37
+ "gear",
38
+ `<style>
39
+ h2, h3 {
40
+ margin-top: 0;
41
+ }
42
+
43
+ .setting-row {
44
+ display: flex;
45
+ justify-content: space-between;
46
+ align-items: center;
47
+ }
48
+
49
+ h3 {
50
+ font-size: 16px;
51
+ font-weight: 400;
52
+ color: white;
53
+ margin-bottom: 0;
54
+ }
55
+
56
+ label {
57
+ font-size: 15px;
58
+ line-height: 1.5rem;
59
+ }
60
+ </style>
61
+ <h2>General</h2>
62
+ `,
63
+ settingsRows.flatMap((setting) => [
64
+ getElementForSettingAsString(setting),
65
+ document.createElement("hr")
66
+ ])
67
+ );
68
+ canvas.append(window);
69
+ function getElementForSettingAsString(setting) {
70
+ const label = document.createElement("label");
71
+ label.classList.add("setting-row");
72
+ const section = document.createElement("section");
73
+ section.innerHTML = `<h3>${setting.name}</h3>${setting.description}`;
74
+ label.append(section);
75
+ switch (setting.input) {
76
+ case "checkbox": {
77
+ const astroToggle = document.createElement("astro-dev-overlay-toggle");
78
+ astroToggle.input.addEventListener("change", setting.changeEvent);
79
+ astroToggle.input.checked = settings.config[setting.settingKey];
80
+ label.append(astroToggle);
81
+ }
82
+ }
83
+ return label;
84
+ }
85
+ }
86
+ },
87
+ async beforeTogglingOff(canvas) {
88
+ return await waitForTransition(canvas);
89
+ }
90
+ };
91
+ export {
92
+ settings_default as default
93
+ };
@@ -0,0 +1,3 @@
1
+ import type { Icon } from '../../ui-library/icons.js';
2
+ export declare function createWindowWithTransition(title: string, icon: Icon, windowContent: string, addedNodes?: Node[]): DocumentFragment;
3
+ export declare function waitForTransition(canvas: ShadowRoot): Promise<boolean>;
@@ -0,0 +1,45 @@
1
+ function createWindowWithTransition(title, icon, windowContent, addedNodes = []) {
2
+ const fragment = document.createDocumentFragment();
3
+ const style = document.createElement("style");
4
+ style.textContent = `
5
+ :host {
6
+ opacity: 0;
7
+ transition: opacity 0.15s ease-in-out;
8
+ }
9
+
10
+ :host([data-active]) {
11
+ opacity: 1;
12
+ }
13
+
14
+ @media screen and (prefers-reduced-motion: no-preference) {
15
+ :host astro-dev-overlay-window {
16
+ transform: translateY(55px) translate(-50%, -50%);
17
+ transition: transform 0.15s ease-in-out;
18
+ transform-origin: center bottom;
19
+ }
20
+
21
+ :host([data-active]) astro-dev-overlay-window {
22
+ transform: translateY(0) translate(-50%, -50%);
23
+ }
24
+ }
25
+ `;
26
+ fragment.append(style);
27
+ const window = document.createElement("astro-dev-overlay-window");
28
+ window.windowTitle = title;
29
+ window.windowIcon = icon;
30
+ window.innerHTML = windowContent;
31
+ window.append(...addedNodes);
32
+ fragment.append(window);
33
+ return fragment;
34
+ }
35
+ async function waitForTransition(canvas) {
36
+ canvas.host?.removeAttribute("data-active");
37
+ await new Promise((resolve) => {
38
+ canvas.host.addEventListener("transitionend", resolve);
39
+ });
40
+ return true;
41
+ }
42
+ export {
43
+ createWindowWithTransition,
44
+ waitForTransition
45
+ };
@@ -0,0 +1,12 @@
1
+ export interface Settings {
2
+ showPluginNotifications: boolean;
3
+ verbose: boolean;
4
+ }
5
+ export declare const defaultSettings: {
6
+ showPluginNotifications: true;
7
+ verbose: false;
8
+ };
9
+ export declare const settings: {
10
+ readonly config: Settings;
11
+ updateSetting: (key: keyof Settings, value: boolean) => void;
12
+ };
@@ -0,0 +1,26 @@
1
+ const defaultSettings = {
2
+ showPluginNotifications: true,
3
+ verbose: false
4
+ };
5
+ const settings = getSettings();
6
+ function getSettings() {
7
+ let _settings = { ...defaultSettings };
8
+ const overlaySettings = localStorage.getItem("astro:dev-overlay:settings");
9
+ if (overlaySettings) {
10
+ _settings = { ..._settings, ...JSON.parse(overlaySettings) };
11
+ }
12
+ function updateSetting(key, value) {
13
+ _settings[key] = value;
14
+ localStorage.setItem("astro:dev-overlay:settings", JSON.stringify(_settings));
15
+ }
16
+ return {
17
+ get config() {
18
+ return _settings;
19
+ },
20
+ updateSetting
21
+ };
22
+ }
23
+ export {
24
+ defaultSettings,
25
+ settings
26
+ };
@@ -9,5 +9,6 @@ declare const icons: {
9
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
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
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>";
12
+ readonly gear: "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 22 22\"><path fill=\"#fff\" d=\"M11 6.12507c-.9642 0-1.90671.28592-2.7084.82159-.80169.53567-1.42653 1.29704-1.79551 2.18783-.36898.89081-.46552 1.87101-.27742 2.81661.18811.9457.6524 1.8143 1.33419 2.4961.68178.6818 1.55042 1.1461 2.49604 1.3342.9457.1881 1.9259.0916 2.8167-.2774s1.6521-.9938 2.1878-1.7955c.5357-.8017.8216-1.7442.8216-2.7084-.0015-1.2925-.5156-2.53161-1.4295-3.44553-.9139-.91392-2.153-1.42801-3.4455-1.4295Zm0 7.50003c-.5192 0-1.02669-.154-1.45837-.4424-.43168-.2885-.76813-.6984-.96681-1.1781-.19868-.4796-.25067-1.0074-.14938-1.5166.10129-.50924.35129-.97697.71841-1.34408.36711-.36712.83484-.61712 1.34405-.71841.5092-.10129 1.037-.0493 1.5166.14938.4797.19868.8897.53513 1.1781.96681.2884.43168.4424.9392.4424 1.4584 0 .6962-.2766 1.3638-.7688 1.8561-.4923.4923-1.16.7689-1.8562.7689Zm8.625-2.551v-.1481l1.3125-1.64155c.1102-.13755.1865-.29905.2228-.4715s.0316-.35102-.0137-.52131c-.2369-.89334-.5909-1.75142-1.0528-2.55188-.089-.15264-.2127-.28218-.3611-.37811-.1484-.09594-.3173-.15557-.493-.17408l-2.0888-.23437-.104-.10406-.2344-2.08969c-.0186-.17556-.0783-.34426-.1743-.49247-.0959-.1482-.2254-.27175-.3779-.36066-.8005-.46341-1.6589-.81869-2.5528-1.056559-.1704-.044683-.349-.048704-.5213-.01174-.1723.036965-.3335.113881-.4706.224549l-1.6415 1.3125h-.1482l-1.64152-1.3125C9.14683.9524 8.98532.87608 8.81288.839767c-.17245-.036314-.35102-.031606-.52132.013744-.89357.238319-1.75165.593909-2.55187 1.057499-.15205.08854-.28121.2115-.37712.35901-.0959.14752-.15586.31547-.17507.49037l-.23437 2.08875-.10407.10406-2.08968.23437c-.17556.01865-.34426.07835-.49247.17428-.14821.09593-.27176.22539-.36066.37791-.46211.80072-.81613 1.65912-1.052812 2.55281-.045195.17016-.049823.34855-.013512.52082.03631.17227.112546.33362.222574.47106L2.375 10.926v.1481l-1.3125 1.6416c-.110173.1375-.186492.299-.222806.4715-.036313.1724-.031605.351.013744.5213.238622.8936.594522 1.7517 1.058442 2.5519.08844.1519.21126.281.3586.3769.14734.0959.3151.1559.48983.1753l2.08875.2325.10407.104.23437 2.0916c.01865.1756.07835.3443.17428.4925.09592.1482.22538.2717.37791.3606.80052.4634 1.65893.8187 2.55281 1.0566.17045.0447.349.0487.52129.0117.17228-.0369.33347-.1139.47059-.2245l1.64152-1.3125h.1482l1.6415 1.3125c.1376.1101.2991.1865.4715.2228.1725.0363.351.0316.5213-.0138.8934-.2368 1.7514-.5908 2.5519-1.0528.1524-.0883.2819-.2112.3782-.3587.0962-.1475.1565-.3156.1759-.4907l.2325-2.0887.104-.1041 2.0897-.239c.1751-.0194.3432-.0797.4907-.1759.1475-.0963.2704-.2258.3587-.3782.4634-.8005.8187-1.6589 1.0566-2.5528.0448-.1699.0493-.3479.013-.5198-.0363-.172-.1124-.333-.2221-.4702l-1.3125-1.6416Zm-2.2612-.4584c.015.256.015.5127 0 .7687-.0168.2784.0704.553.2446.7707l1.2038 1.5047c-.1136.3363-.2492.6648-.406.9834l-1.9153.2128c-.2773.0317-.5329.1654-.7171.375-.1704.1919-.3519.3735-.5438.5438-.2096.1842-.3433.4398-.375.7171l-.2119 1.9144c-.3185.1574-.647.2936-.9834.4078l-1.5047-1.2047c-.1997-.1593-.4477-.2459-.7031-.2456h-.0675c-.2561.015-.5127.015-.7688 0-.2781-.0165-.5525.0703-.7706.2438l-1.50469 1.2047c-.33634-.1137-.66486-.2493-.98343-.406l-.21282-1.9153c-.0317-.2773-.16536-.5329-.375-.7172-.19187-.1703-.37344-.3519-.54375-.5437-.18426-.2097-.43988-.3433-.71718-.375l-1.91438-.2119c-.15734-.3185-.29357-.647-.40781-.9834l1.20375-1.5047c.17424-.2177.26144-.4923.24469-.7707-.01501-.256-.01501-.5127 0-.7687.01675-.2783-.07045-.553-.24469-.77063L3.18781 8.34038c.11364-.33634.24924-.66486.40594-.98343l1.91531-.21281c.27731-.03171.53292-.16537.71719-.375.17031-.19188.35188-.37345.54375-.54375.20964-.18427.3433-.43989.375-.71719l.21188-1.91438c.31852-.15734.64704-.29357.98343-.40781L9.845 4.3907c.2181.17343.4925.26023.7706.24375.2561-.015.5127-.015.7688 0 .2782.01701.5528-.06985.7706-.24375l1.5047-1.20469c.3364.11424.6649.25047.9834.40781l.2128 1.91532c.0317.2773.1654.53292.375.71718.1919.17031.3735.35188.5438.54375.1843.20964.4399.3433.7172.375l1.9143.21188c.1574.31852.2936.64704.4079.98343l-1.2038 1.50469c-.1749.21743-.2628.49203-.2465.77063Z\"/></svg>";
12
13
  };
13
14
  export {};
@@ -16,7 +16,8 @@ const icons = {
16
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
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
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>'
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>',
20
+ gear: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 22 22"><path fill="#fff" d="M11 6.12507c-.9642 0-1.90671.28592-2.7084.82159-.80169.53567-1.42653 1.29704-1.79551 2.18783-.36898.89081-.46552 1.87101-.27742 2.81661.18811.9457.6524 1.8143 1.33419 2.4961.68178.6818 1.55042 1.1461 2.49604 1.3342.9457.1881 1.9259.0916 2.8167-.2774s1.6521-.9938 2.1878-1.7955c.5357-.8017.8216-1.7442.8216-2.7084-.0015-1.2925-.5156-2.53161-1.4295-3.44553-.9139-.91392-2.153-1.42801-3.4455-1.4295Zm0 7.50003c-.5192 0-1.02669-.154-1.45837-.4424-.43168-.2885-.76813-.6984-.96681-1.1781-.19868-.4796-.25067-1.0074-.14938-1.5166.10129-.50924.35129-.97697.71841-1.34408.36711-.36712.83484-.61712 1.34405-.71841.5092-.10129 1.037-.0493 1.5166.14938.4797.19868.8897.53513 1.1781.96681.2884.43168.4424.9392.4424 1.4584 0 .6962-.2766 1.3638-.7688 1.8561-.4923.4923-1.16.7689-1.8562.7689Zm8.625-2.551v-.1481l1.3125-1.64155c.1102-.13755.1865-.29905.2228-.4715s.0316-.35102-.0137-.52131c-.2369-.89334-.5909-1.75142-1.0528-2.55188-.089-.15264-.2127-.28218-.3611-.37811-.1484-.09594-.3173-.15557-.493-.17408l-2.0888-.23437-.104-.10406-.2344-2.08969c-.0186-.17556-.0783-.34426-.1743-.49247-.0959-.1482-.2254-.27175-.3779-.36066-.8005-.46341-1.6589-.81869-2.5528-1.056559-.1704-.044683-.349-.048704-.5213-.01174-.1723.036965-.3335.113881-.4706.224549l-1.6415 1.3125h-.1482l-1.64152-1.3125C9.14683.9524 8.98532.87608 8.81288.839767c-.17245-.036314-.35102-.031606-.52132.013744-.89357.238319-1.75165.593909-2.55187 1.057499-.15205.08854-.28121.2115-.37712.35901-.0959.14752-.15586.31547-.17507.49037l-.23437 2.08875-.10407.10406-2.08968.23437c-.17556.01865-.34426.07835-.49247.17428-.14821.09593-.27176.22539-.36066.37791-.46211.80072-.81613 1.65912-1.052812 2.55281-.045195.17016-.049823.34855-.013512.52082.03631.17227.112546.33362.222574.47106L2.375 10.926v.1481l-1.3125 1.6416c-.110173.1375-.186492.299-.222806.4715-.036313.1724-.031605.351.013744.5213.238622.8936.594522 1.7517 1.058442 2.5519.08844.1519.21126.281.3586.3769.14734.0959.3151.1559.48983.1753l2.08875.2325.10407.104.23437 2.0916c.01865.1756.07835.3443.17428.4925.09592.1482.22538.2717.37791.3606.80052.4634 1.65893.8187 2.55281 1.0566.17045.0447.349.0487.52129.0117.17228-.0369.33347-.1139.47059-.2245l1.64152-1.3125h.1482l1.6415 1.3125c.1376.1101.2991.1865.4715.2228.1725.0363.351.0316.5213-.0138.8934-.2368 1.7514-.5908 2.5519-1.0528.1524-.0883.2819-.2112.3782-.3587.0962-.1475.1565-.3156.1759-.4907l.2325-2.0887.104-.1041 2.0897-.239c.1751-.0194.3432-.0797.4907-.1759.1475-.0963.2704-.2258.3587-.3782.4634-.8005.8187-1.6589 1.0566-2.5528.0448-.1699.0493-.3479.013-.5198-.0363-.172-.1124-.333-.2221-.4702l-1.3125-1.6416Zm-2.2612-.4584c.015.256.015.5127 0 .7687-.0168.2784.0704.553.2446.7707l1.2038 1.5047c-.1136.3363-.2492.6648-.406.9834l-1.9153.2128c-.2773.0317-.5329.1654-.7171.375-.1704.1919-.3519.3735-.5438.5438-.2096.1842-.3433.4398-.375.7171l-.2119 1.9144c-.3185.1574-.647.2936-.9834.4078l-1.5047-1.2047c-.1997-.1593-.4477-.2459-.7031-.2456h-.0675c-.2561.015-.5127.015-.7688 0-.2781-.0165-.5525.0703-.7706.2438l-1.50469 1.2047c-.33634-.1137-.66486-.2493-.98343-.406l-.21282-1.9153c-.0317-.2773-.16536-.5329-.375-.7172-.19187-.1703-.37344-.3519-.54375-.5437-.18426-.2097-.43988-.3433-.71718-.375l-1.91438-.2119c-.15734-.3185-.29357-.647-.40781-.9834l1.20375-1.5047c.17424-.2177.26144-.4923.24469-.7707-.01501-.256-.01501-.5127 0-.7687.01675-.2783-.07045-.553-.24469-.77063L3.18781 8.34038c.11364-.33634.24924-.66486.40594-.98343l1.91531-.21281c.27731-.03171.53292-.16537.71719-.375.17031-.19188.35188-.37345.54375-.54375.20964-.18427.3433-.43989.375-.71719l.21188-1.91438c.31852-.15734.64704-.29357.98343-.40781L9.845 4.3907c.2181.17343.4925.26023.7706.24375.2561-.015.5127-.015.7688 0 .2782.01701.5528-.06985.7706-.24375l1.5047-1.20469c.3364.11424.6649.25047.9834.40781l.2128 1.91532c.0317.2773.1654.53292.375.71718.1919.17031.3735.35188.5438.54375.1843.20964.4399.3433.7172.375l1.9143.21188c.1574.31852.2936.64704.4079.98343l-1.2038 1.50469c-.1749.21743-.2628.49203-.2465.77063Z"/></svg>'
20
21
  };
21
22
  export {
22
23
  getIconElement,
@@ -0,0 +1,6 @@
1
+ export declare class DevOverlayToggle extends HTMLElement {
2
+ shadowRoot: ShadowRoot;
3
+ input: HTMLInputElement;
4
+ constructor();
5
+ connectedCallback(): void;
6
+ }
@@ -0,0 +1,51 @@
1
+ class DevOverlayToggle extends HTMLElement {
2
+ shadowRoot;
3
+ input;
4
+ constructor() {
5
+ super();
6
+ this.shadowRoot = this.attachShadow({ mode: "open" });
7
+ this.shadowRoot.innerHTML = `
8
+ <style>
9
+ input {
10
+ appearance: none;
11
+ width: 32px;
12
+ height: 20px;
13
+ border: 1px solid rgba(145, 152, 173, 1);
14
+ transition: background-color 0.2s ease, border-color 0.2s ease;
15
+ border-radius: 9999px;
16
+ }
17
+
18
+ input::after {
19
+ content: '';
20
+ width: 16px;
21
+ display: inline-block;
22
+ height: 16px;
23
+ background-color: rgba(145, 152, 173, 1);
24
+ border-radius: 9999px;
25
+ transition: transform 0.2s ease, background-color 0.2s ease;
26
+ top: 1px;
27
+ left: 1px;
28
+ position: relative;
29
+ }
30
+
31
+ input:checked {
32
+ border: 1px solid rgba(213, 249, 196, 1);
33
+ background-color: rgba(61, 125, 31, 1);
34
+ }
35
+
36
+ input:checked::after {
37
+ transform: translateX(12px);
38
+ background: rgba(213, 249, 196, 1);
39
+ }
40
+ </style>
41
+ `;
42
+ this.input = document.createElement("input");
43
+ }
44
+ connectedCallback() {
45
+ this.input.type = "checkbox";
46
+ this.shadowRoot.append(this.input);
47
+ }
48
+ }
49
+ export {
50
+ DevOverlayToggle
51
+ };
@@ -13,11 +13,12 @@ class DevOverlayWindow extends HTMLElement {
13
13
  this.shadowRoot.innerHTML = `
14
14
  <style>
15
15
  :host {
16
+ box-sizing: border-box;
16
17
  display: flex;
17
18
  flex-direction: column;
18
19
  background: linear-gradient(0deg, #13151A, #13151A), linear-gradient(0deg, #343841, #343841);
19
20
  border: 1px solid rgba(52, 56, 65, 1);
20
- width: 640px;
21
+ width: min(640px, 100%);
21
22
  height: 480px;
22
23
  border-radius: 12px;
23
24
  padding: 24px;
@@ -31,24 +32,52 @@ class DevOverlayWindow extends HTMLElement {
31
32
  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);
32
33
  }
33
34
 
34
- h1 {
35
- margin: 0;
35
+ ::slotted(h1), ::slotted(h2), ::slotted(h3), ::slotted(h4), ::slotted(h5) {
36
36
  font-weight: 600;
37
37
  color: #fff;
38
38
  }
39
39
 
40
- h1 svg {
41
- vertical-align: text-bottom;
40
+ #window-title {
41
+ display: flex;
42
+ align-items: center;
43
+ font-weight: 600;
44
+ color: #fff;
45
+ margin: 0;
46
+ font-size: 22px;
47
+ }
48
+
49
+ ::slotted(h1) {
50
+ font-size: 22px;
51
+ }
52
+
53
+ ::slotted(h2) {
54
+ font-size: 20px;
55
+ }
56
+
57
+ ::slotted(h3) {
58
+ font-size: 18px;
59
+ }
60
+
61
+ ::slotted(h4) {
62
+ font-size: 16px;
63
+ }
64
+
65
+ ::slotted(h5) {
66
+ font-size: 14px;
67
+ }
68
+
69
+ #window-title svg {
42
70
  margin-right: 8px;
71
+ height: 1em;
43
72
  }
44
73
 
45
- hr {
74
+ hr, ::slotted(hr) {
46
75
  border: 1px solid rgba(27, 30, 36, 1);
47
76
  margin: 1em 0;
48
77
  }
49
78
  </style>
50
79
 
51
- <h1>${this.windowIcon ? this.getElementForIcon(this.windowIcon) : ""}${this.windowTitle ?? ""}</h1>
80
+ <h1 id="window-title">${this.windowIcon ? this.getElementForIcon(this.windowIcon) : ""}${this.windowTitle ?? ""}</h1>
52
81
  <hr />
53
82
  <slot />
54
83
  `;
@@ -299,7 +299,7 @@ function navigate(href, options) {
299
299
  if (inBrowser === false) {
300
300
  if (!navigateOnServerWarned) {
301
301
  const warning = new Error(
302
- "The view transtions client API was called during a server side render. This may be unintentional as the navigate() function is expected to be called in response to user interactions. Please make sure that your usage is correct."
302
+ "The view transitions client API was called during a server side render. This may be unintentional as the navigate() function is expected to be called in response to user interactions. Please make sure that your usage is correct."
303
303
  );
304
304
  warning.name = "Warning";
305
305
  console.warn(warning);
@@ -69,6 +69,7 @@ function createDevelopmentManifest(settings) {
69
69
  };
70
70
  }
71
71
  return {
72
+ trailingSlash: settings.config.trailingSlash,
72
73
  compressHTML: settings.config.compressHTML,
73
74
  assets: /* @__PURE__ */ new Set(),
74
75
  entryModules: {},
@@ -202,7 +202,11 @@ async function handleRoute({
202
202
  }
203
203
  const onRequest = middleware?.onRequest;
204
204
  if (config.experimental.i18n) {
205
- const i18Middleware = createI18nMiddleware(config.experimental.i18n, config.base);
205
+ const i18Middleware = createI18nMiddleware(
206
+ config.experimental.i18n,
207
+ config.base,
208
+ config.trailingSlash
209
+ );
206
210
  if (i18Middleware) {
207
211
  if (onRequest) {
208
212
  pipeline.setMiddlewareFunction(sequence(i18Middleware, onRequest));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro",
3
- "version": "3.5.2",
3
+ "version": "3.5.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",
@@ -165,7 +165,7 @@
165
165
  "yargs-parser": "^21.1.1",
166
166
  "zod": "^3.22.4",
167
167
  "@astrojs/internal-helpers": "0.2.1",
168
- "@astrojs/markdown-remark": "3.4.0",
168
+ "@astrojs/markdown-remark": "3.5.0",
169
169
  "@astrojs/telemetry": "3.0.4"
170
170
  },
171
171
  "optionalDependencies": {
@@ -173,7 +173,7 @@
173
173
  },
174
174
  "devDependencies": {
175
175
  "@astrojs/check": "^0.1.0",
176
- "@playwright/test": "^1.37.1",
176
+ "@playwright/test": "1.40.0-alpha-nov-13-2023",
177
177
  "@types/babel__generator": "^7.6.4",
178
178
  "@types/babel__traverse": "^7.20.1",
179
179
  "@types/chai": "^4.3.5",