vike-lite 1.17.0 → 1.17.1
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/__internal/client.d.mts +1 -1
- package/dist/__internal/server.d.mts +1 -1
- package/dist/__internal/server.mjs +1 -1
- package/dist/__internal/shared.d.mts +1 -2
- package/dist/__internal/shared.mjs +2 -4
- package/dist/server.mjs +1 -1
- package/dist/shared-Dh8Fb_3P.mjs +6 -0
- package/dist/{store-BCs8gL_o.mjs → store-D-6PbvfY.mjs} +1 -1
- package/dist/{store-9UNcAe5D.d.mts → store-DRuFjsY3.d.mts} +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as VikeState } from "../store-
|
|
1
|
+
import { t as VikeState } from "../store-DRuFjsY3.mjs";
|
|
2
2
|
//#region src/__internal/client.d.ts
|
|
3
3
|
declare function createLinkClickHandler(onNavigate: (url: URL) => void): (e: MouseEvent) => void;
|
|
4
4
|
declare function createLinkPrefetchHandler(onPrefetch: (url: URL) => void): (e: Event) => void;
|
|
@@ -14,7 +14,6 @@ interface RenderContext {
|
|
|
14
14
|
};
|
|
15
15
|
nonce?: string;
|
|
16
16
|
}
|
|
17
|
-
declare function escapeRegex(str: string): string;
|
|
18
17
|
declare function matchRoute(urlPathname: string, routes: typeof import('virtual:vike-lite/routes').routes): {
|
|
19
18
|
route: any;
|
|
20
19
|
routeParams: Record<string, string>;
|
|
@@ -31,4 +30,4 @@ declare function stripBase(pathname: string): string;
|
|
|
31
30
|
*/
|
|
32
31
|
declare function prependBase(pathname: string): string;
|
|
33
32
|
//#endregion
|
|
34
|
-
export { BASE_URL, RenderContext,
|
|
33
|
+
export { BASE_URL, RenderContext, matchRoute, prependBase, stripBase };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
+
import { t as escapeRegex } from "../shared-Dh8Fb_3P.mjs";
|
|
1
2
|
//#region src/__internal/shared.ts
|
|
2
3
|
const regexCache = /* @__PURE__ */ new Map();
|
|
3
|
-
function escapeRegex(str) {
|
|
4
|
-
return str.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`);
|
|
5
|
-
}
|
|
6
4
|
function matchRoute(urlPathname, routes) {
|
|
7
5
|
for (const route of routes) {
|
|
8
6
|
if (!route.path.includes(":")) {
|
|
@@ -62,4 +60,4 @@ function prependBase(pathname) {
|
|
|
62
60
|
return BASE_URL + (pathname === "/" ? "" : pathname);
|
|
63
61
|
}
|
|
64
62
|
//#endregion
|
|
65
|
-
export { BASE_URL,
|
|
63
|
+
export { BASE_URL, matchRoute, prependBase, stripBase };
|
package/dist/server.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BASE_URL, matchRoute, stripBase } from "./__internal/shared.mjs";
|
|
2
2
|
import { AbortRedirect, AbortRender } from "./server/abort.mjs";
|
|
3
|
-
import { n as store } from "./store-
|
|
3
|
+
import { n as store } from "./store-D-6PbvfY.mjs";
|
|
4
4
|
//#region src/utils/serializeContext.ts
|
|
5
5
|
const ESCAPE_LOOKUP = {
|
|
6
6
|
"&": String.raw`\u0026`,
|
package/dist/vite.mjs
CHANGED