astro 3.5.4 → 3.5.5
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.
- package/dist/core/app/index.js +2 -1
- package/dist/core/build/generate.js +2 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/messages.js +2 -2
- package/dist/core/pipeline.d.ts +6 -0
- package/dist/core/pipeline.js +13 -0
- package/dist/i18n/middleware.d.ts +5 -0
- package/dist/i18n/middleware.js +13 -2
- package/dist/runtime/client/dev-overlay/entrypoint.js +147 -6
- package/dist/runtime/client/dev-overlay/overlay.d.ts +4 -0
- package/dist/runtime/client/dev-overlay/overlay.js +20 -8
- package/dist/runtime/client/dev-overlay/plugins/settings.js +2 -2
- package/dist/runtime/client/dev-overlay/settings.d.ts +2 -2
- package/dist/runtime/client/dev-overlay/settings.js +1 -1
- package/dist/runtime/client/dev-overlay/ui-library/icons.d.ts +1 -0
- package/dist/runtime/client/dev-overlay/ui-library/icons.js +2 -1
- package/dist/runtime/client/dev-overlay/ui-library/toggle.d.ts +2 -0
- package/dist/runtime/client/dev-overlay/ui-library/toggle.js +6 -0
- package/dist/vite-plugin-astro-server/route.js +2 -1
- package/package.json +1 -1
package/dist/core/app/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createI18nMiddleware } from "../../i18n/middleware.js";
|
|
1
|
+
import { createI18nMiddleware, i18nPipelineHook } from "../../i18n/middleware.js";
|
|
2
2
|
import { getSetCookiesFromResponse } from "../cookies/index.js";
|
|
3
3
|
import { consoleLogDestination } from "../logger/console.js";
|
|
4
4
|
import { AstroIntegrationLogger, Logger } from "../logger/core.js";
|
|
@@ -143,6 +143,7 @@ class App {
|
|
|
143
143
|
} else {
|
|
144
144
|
this.#pipeline.setMiddlewareFunction(i18nMiddleware);
|
|
145
145
|
}
|
|
146
|
+
this.#pipeline.onBeforeRenderRoute(i18nPipelineHook);
|
|
146
147
|
} else {
|
|
147
148
|
if (mod.onRequest) {
|
|
148
149
|
this.#pipeline.setMiddlewareFunction(mod.onRequest);
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
removeLeadingForwardSlash,
|
|
18
18
|
removeTrailingForwardSlash
|
|
19
19
|
} from "../../core/path.js";
|
|
20
|
-
import { createI18nMiddleware } from "../../i18n/middleware.js";
|
|
20
|
+
import { createI18nMiddleware, i18nPipelineHook } from "../../i18n/middleware.js";
|
|
21
21
|
import { runHookBuildGenerated } from "../../integrations/index.js";
|
|
22
22
|
import { getOutputDirectory, isServerLikeOutput } from "../../prerender/utils.js";
|
|
23
23
|
import { PAGE_SCRIPT_ID } from "../../vite-plugin-scripts/index.js";
|
|
@@ -216,6 +216,7 @@ async function generatePage(pageData, ssrEntry, builtPaths, pipeline) {
|
|
|
216
216
|
} else {
|
|
217
217
|
pipeline.setMiddlewareFunction(i18nMiddleware);
|
|
218
218
|
}
|
|
219
|
+
pipeline.onBeforeRenderRoute(i18nPipelineHook);
|
|
219
220
|
} else if (onRequest) {
|
|
220
221
|
pipeline.setMiddlewareFunction(onRequest);
|
|
221
222
|
}
|
package/dist/core/constants.js
CHANGED
package/dist/core/dev/dev.js
CHANGED
|
@@ -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.
|
|
23
|
+
const currentVersion = "3.5.5";
|
|
24
24
|
if (currentVersion.includes("-")) {
|
|
25
25
|
logger.warn(null, msg.prerelease({ currentVersion }));
|
|
26
26
|
}
|
package/dist/core/messages.js
CHANGED
|
@@ -50,7 +50,7 @@ function serverStart({
|
|
|
50
50
|
base,
|
|
51
51
|
isRestart = false
|
|
52
52
|
}) {
|
|
53
|
-
const version = "3.5.
|
|
53
|
+
const version = "3.5.5";
|
|
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.
|
|
238
|
+
`v${"3.5.5"}`
|
|
239
239
|
)} ${headline}`
|
|
240
240
|
);
|
|
241
241
|
}
|
package/dist/core/pipeline.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ComponentInstance, MiddlewareEndpointHandler } from '../@types/astro.js';
|
|
2
2
|
import { type Environment, type RenderContext } from './render/index.js';
|
|
3
3
|
type EndpointResultHandler = (originalRequest: Request, result: Response) => Promise<Response> | Response;
|
|
4
|
+
export type PipelineHookFunction = (ctx: RenderContext, mod: ComponentInstance | undefined) => void;
|
|
4
5
|
/**
|
|
5
6
|
* This is the basic class of a pipeline.
|
|
6
7
|
*
|
|
@@ -37,5 +38,10 @@ export declare class Pipeline {
|
|
|
37
38
|
* The main function of the pipeline. Use this function to render any route known to Astro;
|
|
38
39
|
*/
|
|
39
40
|
renderRoute(renderContext: RenderContext, componentInstance: ComponentInstance | undefined): Promise<Response>;
|
|
41
|
+
/**
|
|
42
|
+
* Store a function that will be called before starting the rendering phase.
|
|
43
|
+
* @param fn
|
|
44
|
+
*/
|
|
45
|
+
onBeforeRenderRoute(fn: PipelineHookFunction): void;
|
|
40
46
|
}
|
|
41
47
|
export {};
|
package/dist/core/pipeline.js
CHANGED
|
@@ -5,6 +5,9 @@ import {} from "./render/index.js";
|
|
|
5
5
|
class Pipeline {
|
|
6
6
|
env;
|
|
7
7
|
#onRequest;
|
|
8
|
+
#hooks = {
|
|
9
|
+
before: []
|
|
10
|
+
};
|
|
8
11
|
/**
|
|
9
12
|
* The handler accepts the *original* `Request` and result returned by the endpoint.
|
|
10
13
|
* It must return a `Response`.
|
|
@@ -49,6 +52,9 @@ class Pipeline {
|
|
|
49
52
|
* The main function of the pipeline. Use this function to render any route known to Astro;
|
|
50
53
|
*/
|
|
51
54
|
async renderRoute(renderContext, componentInstance) {
|
|
55
|
+
for (const hook of this.#hooks.before) {
|
|
56
|
+
hook(renderContext, componentInstance);
|
|
57
|
+
}
|
|
52
58
|
const result = await this.#tryRenderRoute(
|
|
53
59
|
renderContext,
|
|
54
60
|
this.env,
|
|
@@ -125,6 +131,13 @@ class Pipeline {
|
|
|
125
131
|
throw new Error(`Couldn't find route of type [${renderContext.route.type}]`);
|
|
126
132
|
}
|
|
127
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* Store a function that will be called before starting the rendering phase.
|
|
136
|
+
* @param fn
|
|
137
|
+
*/
|
|
138
|
+
onBeforeRenderRoute(fn) {
|
|
139
|
+
this.#hooks.before.push(fn);
|
|
140
|
+
}
|
|
128
141
|
}
|
|
129
142
|
export {
|
|
130
143
|
Pipeline
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import type { MiddlewareEndpointHandler, SSRManifest } from '../@types/astro.js';
|
|
2
|
+
import type { PipelineHookFunction } from '../core/pipeline.js';
|
|
2
3
|
export declare function createI18nMiddleware(i18n: SSRManifest['i18n'], base: SSRManifest['base'], trailingSlash: SSRManifest['trailingSlash']): MiddlewareEndpointHandler | undefined;
|
|
4
|
+
/**
|
|
5
|
+
* This pipeline hook attaches a `RouteData` object to the `Request`
|
|
6
|
+
*/
|
|
7
|
+
export declare const i18nPipelineHook: PipelineHookFunction;
|
package/dist/i18n/middleware.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { appendForwardSlash, joinPaths } from "@astrojs/internal-helpers/path";
|
|
2
|
+
const routeDataSymbol = Symbol.for("astro.routeData");
|
|
2
3
|
function checkIsLocaleFree(pathname, locales) {
|
|
3
4
|
for (const locale of locales) {
|
|
4
5
|
if (pathname.includes(`/${locale}`)) {
|
|
@@ -15,8 +16,14 @@ function createI18nMiddleware(i18n, base, trailingSlash) {
|
|
|
15
16
|
if (!i18n) {
|
|
16
17
|
return await next();
|
|
17
18
|
}
|
|
18
|
-
const
|
|
19
|
+
const routeData = Reflect.get(context.request, routeDataSymbol);
|
|
20
|
+
if (routeData) {
|
|
21
|
+
if (routeData.type !== "page" && routeData.type !== "fallback") {
|
|
22
|
+
return await next();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
19
25
|
const url = context.url;
|
|
26
|
+
const { locales, defaultLocale, fallback } = i18n;
|
|
20
27
|
const response = await next();
|
|
21
28
|
if (response instanceof Response) {
|
|
22
29
|
const separators = url.pathname.split("/");
|
|
@@ -61,6 +68,10 @@ function createI18nMiddleware(i18n, base, trailingSlash) {
|
|
|
61
68
|
return response;
|
|
62
69
|
};
|
|
63
70
|
}
|
|
71
|
+
const i18nPipelineHook = (ctx) => {
|
|
72
|
+
Reflect.set(ctx.request, routeDataSymbol, ctx.route);
|
|
73
|
+
};
|
|
64
74
|
export {
|
|
65
|
-
createI18nMiddleware
|
|
75
|
+
createI18nMiddleware,
|
|
76
|
+
i18nPipelineHook
|
|
66
77
|
};
|
|
@@ -13,7 +13,8 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
13
13
|
{ DevOverlayHighlight },
|
|
14
14
|
{ DevOverlayTooltip },
|
|
15
15
|
{ DevOverlayWindow },
|
|
16
|
-
{ DevOverlayToggle }
|
|
16
|
+
{ DevOverlayToggle },
|
|
17
|
+
{ getIconElement, isDefinedIcon }
|
|
17
18
|
] = await Promise.all([
|
|
18
19
|
// @ts-expect-error
|
|
19
20
|
import("astro:dev-overlay"),
|
|
@@ -26,7 +27,8 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
26
27
|
import("./ui-library/highlight.js"),
|
|
27
28
|
import("./ui-library/tooltip.js"),
|
|
28
29
|
import("./ui-library/window.js"),
|
|
29
|
-
import("./ui-library/toggle.js")
|
|
30
|
+
import("./ui-library/toggle.js"),
|
|
31
|
+
import("./ui-library/icons.js")
|
|
30
32
|
]);
|
|
31
33
|
customElements.define("astro-dev-overlay", AstroDevOverlay);
|
|
32
34
|
customElements.define("astro-dev-overlay-window", DevOverlayWindow);
|
|
@@ -43,6 +45,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
43
45
|
builtIn,
|
|
44
46
|
active: false,
|
|
45
47
|
status: "loading",
|
|
48
|
+
notification: { state: false },
|
|
46
49
|
eventTarget
|
|
47
50
|
};
|
|
48
51
|
eventTarget.addEventListener("toggle-notification", (evt) => {
|
|
@@ -53,7 +56,8 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
53
56
|
if (evt instanceof CustomEvent) {
|
|
54
57
|
newState = evt.detail.state ?? true;
|
|
55
58
|
}
|
|
56
|
-
|
|
59
|
+
plugin.notification.state = newState;
|
|
60
|
+
if (settings.config.disablePluginNotification === false) {
|
|
57
61
|
target.querySelector(".notification")?.toggleAttribute("data-active", newState);
|
|
58
62
|
}
|
|
59
63
|
});
|
|
@@ -66,11 +70,148 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
66
70
|
});
|
|
67
71
|
return plugin;
|
|
68
72
|
};
|
|
73
|
+
const astromorePlugin = {
|
|
74
|
+
id: "astro:more",
|
|
75
|
+
name: "More",
|
|
76
|
+
icon: "dots-three",
|
|
77
|
+
init(canvas, eventTarget) {
|
|
78
|
+
const hiddenPlugins = plugins.filter((p) => !p.builtIn).slice(overlay.customPluginsToShow);
|
|
79
|
+
createDropdown();
|
|
80
|
+
document.addEventListener("astro:after-swap", createDropdown);
|
|
81
|
+
function createDropdown() {
|
|
82
|
+
const style = document.createElement("style");
|
|
83
|
+
style.innerHTML = `
|
|
84
|
+
#dropdown {
|
|
85
|
+
background: rgba(19, 21, 26, 1);
|
|
86
|
+
border: 1px solid rgba(52, 56, 65, 1);
|
|
87
|
+
border-radius: 12px;
|
|
88
|
+
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);
|
|
89
|
+
width: 180px;
|
|
90
|
+
padding: 8px;
|
|
91
|
+
z-index: 9999999999;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.notification {
|
|
95
|
+
display: none;
|
|
96
|
+
position: absolute;
|
|
97
|
+
top: -4px;
|
|
98
|
+
right: -6px;
|
|
99
|
+
width: 8px;
|
|
100
|
+
height: 8px;
|
|
101
|
+
border-radius: 9999px;
|
|
102
|
+
border: 1px solid rgba(19, 21, 26, 1);
|
|
103
|
+
background: #B33E66;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.notification[data-active] {
|
|
107
|
+
display: block;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
#dropdown button {
|
|
111
|
+
border: 0;
|
|
112
|
+
background: transparent;
|
|
113
|
+
color: white;
|
|
114
|
+
font-family: system-ui, sans-serif;
|
|
115
|
+
font-size: 16px;
|
|
116
|
+
line-height: 1.2;
|
|
117
|
+
white-space: nowrap;
|
|
118
|
+
text-decoration: none;
|
|
119
|
+
margin: 0;
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
width: 100%;
|
|
123
|
+
padding: 8px;
|
|
124
|
+
border-radius: 8px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
#dropdown button:hover, #dropdown button:focus-visible {
|
|
128
|
+
background: rgba(27, 30, 36, 1);
|
|
129
|
+
cursor: pointer;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
#dropdown button.active {
|
|
133
|
+
background: rgba(71, 78, 94, 1);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
#dropdown .icon {
|
|
137
|
+
position: relative;
|
|
138
|
+
height: 24px;
|
|
139
|
+
width: 24px;
|
|
140
|
+
margin-right: 0.5em;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
#dropdown .icon svg {
|
|
144
|
+
max-height: 100%;
|
|
145
|
+
max-width: 100%;
|
|
146
|
+
}
|
|
147
|
+
`;
|
|
148
|
+
canvas.append(style);
|
|
149
|
+
const dropdown = document.createElement("div");
|
|
150
|
+
dropdown.id = "dropdown";
|
|
151
|
+
for (const plugin of hiddenPlugins) {
|
|
152
|
+
const buttonContainer = document.createElement("div");
|
|
153
|
+
buttonContainer.classList.add("item");
|
|
154
|
+
const button = document.createElement("button");
|
|
155
|
+
button.setAttribute("data-plugin-id", plugin.id);
|
|
156
|
+
const iconContainer = document.createElement("div");
|
|
157
|
+
const iconElement = getPluginIcon(plugin.icon);
|
|
158
|
+
iconContainer.append(iconElement);
|
|
159
|
+
const notification = document.createElement("div");
|
|
160
|
+
notification.classList.add("notification");
|
|
161
|
+
iconContainer.append(notification);
|
|
162
|
+
iconContainer.classList.add("icon");
|
|
163
|
+
button.append(iconContainer);
|
|
164
|
+
button.append(document.createTextNode(plugin.name));
|
|
165
|
+
button.addEventListener("click", () => {
|
|
166
|
+
overlay.togglePluginStatus(plugin);
|
|
167
|
+
});
|
|
168
|
+
buttonContainer.append(button);
|
|
169
|
+
dropdown.append(buttonContainer);
|
|
170
|
+
eventTarget.addEventListener("plugin-toggled", positionDropdown);
|
|
171
|
+
window.addEventListener("resize", positionDropdown);
|
|
172
|
+
plugin.eventTarget.addEventListener("toggle-notification", (evt) => {
|
|
173
|
+
if (!(evt instanceof CustomEvent))
|
|
174
|
+
return;
|
|
175
|
+
if (settings.config.disablePluginNotification === false) {
|
|
176
|
+
notification.toggleAttribute("data-active", evt.detail.state ?? true);
|
|
177
|
+
}
|
|
178
|
+
eventTarget.dispatchEvent(
|
|
179
|
+
new CustomEvent("toggle-notification", {
|
|
180
|
+
detail: {
|
|
181
|
+
state: hiddenPlugins.some((p) => p.notification.state === true)
|
|
182
|
+
}
|
|
183
|
+
})
|
|
184
|
+
);
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
canvas.append(dropdown);
|
|
188
|
+
function getPluginIcon(icon) {
|
|
189
|
+
if (isDefinedIcon(icon)) {
|
|
190
|
+
return getIconElement(icon);
|
|
191
|
+
}
|
|
192
|
+
return icon;
|
|
193
|
+
}
|
|
194
|
+
function positionDropdown() {
|
|
195
|
+
const moreButtonRect = overlay.shadowRoot.querySelector('[data-plugin-id="astro:more"]')?.getBoundingClientRect();
|
|
196
|
+
const dropdownRect = dropdown.getBoundingClientRect();
|
|
197
|
+
if (moreButtonRect && dropdownRect) {
|
|
198
|
+
dropdown.style.position = "absolute";
|
|
199
|
+
dropdown.style.top = `${moreButtonRect.top - dropdownRect.height - 12}px`;
|
|
200
|
+
dropdown.style.left = `${moreButtonRect.left + moreButtonRect.width - dropdownRect.width}px`;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
};
|
|
69
206
|
const customPluginsDefinitions = await loadDevOverlayPlugins();
|
|
70
207
|
const plugins = [
|
|
71
|
-
...[
|
|
72
|
-
|
|
73
|
-
|
|
208
|
+
...[
|
|
209
|
+
astroDevToolPlugin,
|
|
210
|
+
astroXrayPlugin,
|
|
211
|
+
astroAuditPlugin,
|
|
212
|
+
astroSettingsPlugin,
|
|
213
|
+
astromorePlugin
|
|
214
|
+
].map((pluginDef) => preparePlugin(pluginDef, true)),
|
|
74
215
|
...customPluginsDefinitions.map((pluginDef) => preparePlugin(pluginDef, false))
|
|
75
216
|
];
|
|
76
217
|
overlay.plugins = plugins;
|
|
@@ -4,6 +4,9 @@ export type DevOverlayPlugin = DevOverlayPluginDefinition & {
|
|
|
4
4
|
builtIn: boolean;
|
|
5
5
|
active: boolean;
|
|
6
6
|
status: 'ready' | 'loading' | 'error';
|
|
7
|
+
notification: {
|
|
8
|
+
state: boolean;
|
|
9
|
+
};
|
|
7
10
|
eventTarget: EventTarget;
|
|
8
11
|
};
|
|
9
12
|
export declare class AstroDevOverlay extends HTMLElement {
|
|
@@ -14,6 +17,7 @@ export declare class AstroDevOverlay extends HTMLElement {
|
|
|
14
17
|
plugins: DevOverlayPlugin[];
|
|
15
18
|
HOVER_DELAY: number;
|
|
16
19
|
hasBeenInitialized: boolean;
|
|
20
|
+
customPluginsToShow: number;
|
|
17
21
|
constructor();
|
|
18
22
|
connectedCallback(): Promise<void>;
|
|
19
23
|
attachEvents(): void;
|
|
@@ -9,6 +9,7 @@ class AstroDevOverlay extends HTMLElement {
|
|
|
9
9
|
plugins = [];
|
|
10
10
|
HOVER_DELAY = 750;
|
|
11
11
|
hasBeenInitialized = false;
|
|
12
|
+
customPluginsToShow = 3;
|
|
12
13
|
constructor() {
|
|
13
14
|
super();
|
|
14
15
|
this.shadowRoot = this.attachShadow({ mode: "open" });
|
|
@@ -151,8 +152,8 @@ class AstroDevOverlay extends HTMLElement {
|
|
|
151
152
|
#dev-bar .item .notification {
|
|
152
153
|
display: none;
|
|
153
154
|
position: absolute;
|
|
154
|
-
top: -
|
|
155
|
-
right:
|
|
155
|
+
top: -4px;
|
|
156
|
+
right: -6px;
|
|
156
157
|
width: 8px;
|
|
157
158
|
height: 8px;
|
|
158
159
|
border-radius: 9999px;
|
|
@@ -222,8 +223,13 @@ class AstroDevOverlay extends HTMLElement {
|
|
|
222
223
|
<div id="dev-overlay">
|
|
223
224
|
<div id="dev-bar">
|
|
224
225
|
<div id="bar-container">
|
|
225
|
-
${this.plugins.filter(
|
|
226
|
-
|
|
226
|
+
${this.plugins.filter(
|
|
227
|
+
(plugin) => plugin.builtIn && !["astro:settings", "astro:more"].includes(plugin.id)
|
|
228
|
+
).map((plugin) => this.getPluginTemplate(plugin)).join("")}
|
|
229
|
+
${this.plugins.filter((plugin) => !plugin.builtIn).length > 0 ? `<div class="separator"></div>${this.plugins.filter((plugin) => !plugin.builtIn).slice(0, this.customPluginsToShow).map((plugin) => this.getPluginTemplate(plugin)).join("")}` : ""}
|
|
230
|
+
${this.plugins.filter((plugin) => !plugin.builtIn).length > this.customPluginsToShow ? this.getPluginTemplate(
|
|
231
|
+
this.plugins.find((plugin) => plugin.builtIn && plugin.id === "astro:more")
|
|
232
|
+
) : ""}
|
|
227
233
|
<div class="separator"></div>
|
|
228
234
|
${this.getPluginTemplate(
|
|
229
235
|
this.plugins.find((plugin) => plugin.builtIn && plugin.id === "astro:settings")
|
|
@@ -380,10 +386,16 @@ class AstroDevOverlay extends HTMLElement {
|
|
|
380
386
|
return;
|
|
381
387
|
}
|
|
382
388
|
plugin.active = newStatus ?? !plugin.active;
|
|
383
|
-
const
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
389
|
+
const mainBarButton = this.shadowRoot.querySelector(`[data-plugin-id="${plugin.id}"]`);
|
|
390
|
+
const moreBarButton = this.getPluginCanvasById("astro:more")?.shadowRoot?.querySelector(
|
|
391
|
+
`[data-plugin-id="${plugin.id}"]`
|
|
392
|
+
);
|
|
393
|
+
if (mainBarButton) {
|
|
394
|
+
mainBarButton.classList.toggle("active", plugin.active);
|
|
395
|
+
}
|
|
396
|
+
if (moreBarButton) {
|
|
397
|
+
moreBarButton.classList.toggle("active", plugin.active);
|
|
398
|
+
}
|
|
387
399
|
pluginCanvas.style.display = plugin.active ? "block" : "none";
|
|
388
400
|
window.requestAnimationFrame(() => {
|
|
389
401
|
pluginCanvas.toggleAttribute("data-active", plugin.active);
|
|
@@ -5,10 +5,10 @@ const settingsRows = [
|
|
|
5
5
|
name: "Disable notifications",
|
|
6
6
|
description: "Notification bubbles will not be shown when this is enabled.",
|
|
7
7
|
input: "checkbox",
|
|
8
|
-
settingKey: "
|
|
8
|
+
settingKey: "disablePluginNotification",
|
|
9
9
|
changeEvent: (evt) => {
|
|
10
10
|
if (evt.currentTarget instanceof HTMLInputElement) {
|
|
11
|
-
settings.updateSetting("
|
|
11
|
+
settings.updateSetting("disablePluginNotification", evt.currentTarget.checked);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export interface Settings {
|
|
2
|
-
|
|
2
|
+
disablePluginNotification: boolean;
|
|
3
3
|
verbose: boolean;
|
|
4
4
|
}
|
|
5
5
|
export declare const defaultSettings: {
|
|
6
|
-
|
|
6
|
+
disablePluginNotification: false;
|
|
7
7
|
verbose: false;
|
|
8
8
|
};
|
|
9
9
|
export declare const settings: {
|
|
@@ -10,5 +10,6 @@ declare const icons: {
|
|
|
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
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>";
|
|
13
|
+
readonly 'dots-three': "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 4\"><path fill=\"#fff\" d=\"M9.5 2c0 .29667-.08797.58668-.2528.83336-.16482.24667-.39908.43893-.67317.55246-.27409.11353-.57569.14324-.86666.08536-.29098-.05788-.55825-.20074-.76803-.41052-.20978-.20978-.35264-.47705-.41052-.76802-.05788-.29098-.02817-.59258.08536-.86666.11353-.27409.30579-.508362.55247-.673184C7.41332.587974 7.70333.5 8 .5c.39783 0 .77936.158036 1.06066.43934C9.34196 1.22064 9.5 1.60218 9.5 2ZM1.625.5c-.29667 0-.58668.087974-.833354.252796-.246674.164822-.438933.399094-.552465.673184-.113531.27408-.1432361.57568-.085358.86666.057878.29097.200739.55824.410518.76802.209778.20978.477049.35264.768029.41052.29097.05788.59257.02817.86666-.08536.27408-.11353.50835-.30579.67318-.55246C3.03703 2.58668 3.125 2.29667 3.125 2c0-.39782-.15803-.77936-.43934-1.06066C2.40436.658036 2.02283.5 1.625.5Zm12.75 0c-.2967 0-.5867.087974-.8334.252796-.2466.164822-.4389.399094-.5524.673184-.1135.27408-.1433.57568-.0854.86666.0579.29097.2008.55824.4105.76802.2098.20978.4771.35264.7681.41052.2909.05788.5925.02817.8666-.08536s.5084-.30579.6732-.55246c.1648-.24668.2528-.53669.2528-.83336 0-.39782-.158-.77936-.4393-1.06066C15.1544.658036 14.7728.5 14.375.5Z\"/></svg>";
|
|
13
14
|
};
|
|
14
15
|
export {};
|
|
@@ -17,7 +17,8 @@ const icons = {
|
|
|
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
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
|
+
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>',
|
|
21
|
+
"dots-three": '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 4"><path fill="#fff" d="M9.5 2c0 .29667-.08797.58668-.2528.83336-.16482.24667-.39908.43893-.67317.55246-.27409.11353-.57569.14324-.86666.08536-.29098-.05788-.55825-.20074-.76803-.41052-.20978-.20978-.35264-.47705-.41052-.76802-.05788-.29098-.02817-.59258.08536-.86666.11353-.27409.30579-.508362.55247-.673184C7.41332.587974 7.70333.5 8 .5c.39783 0 .77936.158036 1.06066.43934C9.34196 1.22064 9.5 1.60218 9.5 2ZM1.625.5c-.29667 0-.58668.087974-.833354.252796-.246674.164822-.438933.399094-.552465.673184-.113531.27408-.1432361.57568-.085358.86666.057878.29097.200739.55824.410518.76802.209778.20978.477049.35264.768029.41052.29097.05788.59257.02817.86666-.08536.27408-.11353.50835-.30579.67318-.55246C3.03703 2.58668 3.125 2.29667 3.125 2c0-.39782-.15803-.77936-.43934-1.06066C2.40436.658036 2.02283.5 1.625.5Zm12.75 0c-.2967 0-.5867.087974-.8334.252796-.2466.164822-.4389.399094-.5524.673184-.1135.27408-.1433.57568-.0854.86666.0579.29097.2008.55824.4105.76802.2098.20978.4771.35264.7681.41052.2909.05788.5925.02817.8666-.08536s.5084-.30579.6732-.55246c.1648-.24668.2528-.53669.2528-.83336 0-.39782-.158-.77936-.4393-1.06066C15.1544.658036 14.7728.5 14.375.5Z"/></svg>'
|
|
21
22
|
};
|
|
22
23
|
export {
|
|
23
24
|
getIconElement,
|
|
@@ -45,6 +45,12 @@ class DevOverlayToggle extends HTMLElement {
|
|
|
45
45
|
this.input.type = "checkbox";
|
|
46
46
|
this.shadowRoot.append(this.input);
|
|
47
47
|
}
|
|
48
|
+
get value() {
|
|
49
|
+
return this.input.value;
|
|
50
|
+
}
|
|
51
|
+
set value(val) {
|
|
52
|
+
this.input.value = val;
|
|
53
|
+
}
|
|
48
54
|
}
|
|
49
55
|
export {
|
|
50
56
|
DevOverlayToggle
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { createRequest } from "../core/request.js";
|
|
10
10
|
import { matchAllRoutes } from "../core/routing/index.js";
|
|
11
11
|
import { isPage, resolveIdToUrl } from "../core/util.js";
|
|
12
|
-
import { createI18nMiddleware } from "../i18n/middleware.js";
|
|
12
|
+
import { createI18nMiddleware, i18nPipelineHook } from "../i18n/middleware.js";
|
|
13
13
|
import { getSortedPreloadedMatches } from "../prerender/routing.js";
|
|
14
14
|
import { isServerLikeOutput } from "../prerender/utils.js";
|
|
15
15
|
import { PAGE_SCRIPT_ID } from "../vite-plugin-scripts/index.js";
|
|
@@ -213,6 +213,7 @@ async function handleRoute({
|
|
|
213
213
|
} else {
|
|
214
214
|
pipeline.setMiddlewareFunction(i18Middleware);
|
|
215
215
|
}
|
|
216
|
+
pipeline.onBeforeRenderRoute(i18nPipelineHook);
|
|
216
217
|
} else if (onRequest) {
|
|
217
218
|
pipeline.setMiddlewareFunction(onRequest);
|
|
218
219
|
}
|