mikuru 1.0.13 → 1.0.15
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/CHANGELOG.md +15 -1
- package/README.md +8 -0
- package/dist/router/index.d.ts +101 -0
- package/dist/router/index.js +654 -0
- package/dist/router/index.js.map +1 -0
- package/package.json +16 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 1.0.15 - 2026-05-07
|
|
4
|
+
|
|
5
|
+
- Added named route navigation, nested routes, and RouterLink default slot support.
|
|
6
|
+
- Added router route redirects and aliases.
|
|
7
|
+
- Added router navigation failure results for duplicated, aborted, and cancelled navigations.
|
|
8
|
+
- Added dynamic router route management with `addRoute`, `removeRoute`, and `hasRoute`.
|
|
9
|
+
- Added parent-to-child route meta merging for nested routes and guard usage.
|
|
10
|
+
- Added router context helpers with `provideRouter`, `useRouter`, and `useRoute`, making `RouterView` and `RouterLink` router props optional.
|
|
11
|
+
- Added router `scrollBehavior` support with default browser hash and top scrolling.
|
|
12
|
+
|
|
13
|
+
## 1.0.14 - 2026-05-06
|
|
14
|
+
|
|
15
|
+
- Added `mikuru/router` with route matching, hash/history/memory histories, guards, `RouterView`, and `RouterLink`.
|
|
16
|
+
- Added a router example app with E2E coverage.
|
|
17
|
+
- Added generated DOM router integration coverage plus `RouterLink` `replace`, `activeClass`, and `exactActiveClass` props.
|
|
4
18
|
|
|
5
19
|
## 1.0.13 - 2026-05-06
|
|
6
20
|
|
package/README.md
CHANGED
|
@@ -136,6 +136,7 @@ declare const Greeting: MikuruComponent<GreetingProps>;
|
|
|
136
136
|
- `v-model` for common form controls and child components
|
|
137
137
|
- Component props, events, `defineProps`, `defineEmits`, default slots, named slots, and slot props
|
|
138
138
|
- Runtime helpers including `ref`, `computed`, `effect`, `watch` with `immediate` and cleanup callbacks, `nextTick`, lifecycle callbacks, `provide`, and `inject`
|
|
139
|
+
- Routing through `mikuru/router` with route matching, history/hash/memory histories, guards, router context helpers, `RouterView`, and `RouterLink`
|
|
139
140
|
- Style injection and basic `<style scoped>` selector rewriting
|
|
140
141
|
- Compile errors with filenames, line/column information, and code frames
|
|
141
142
|
|
|
@@ -153,6 +154,12 @@ The Vite plugin is available from `mikuru/vite`:
|
|
|
153
154
|
import { mikuru } from "mikuru/vite";
|
|
154
155
|
```
|
|
155
156
|
|
|
157
|
+
The router is available from `mikuru/router`:
|
|
158
|
+
|
|
159
|
+
```ts
|
|
160
|
+
import { createRouter, createWebHashHistory, provideRouter, RouterLink, RouterView, useRoute, useRouter } from "mikuru/router";
|
|
161
|
+
```
|
|
162
|
+
|
|
156
163
|
The `.mikuru` TypeScript declaration is available from `mikuru/env`:
|
|
157
164
|
|
|
158
165
|
```ts
|
|
@@ -216,4 +223,5 @@ npm run dev:mikuru-vue-like
|
|
|
216
223
|
- `CHANGELOG.md` lists published package changes.
|
|
217
224
|
- `docs/npm-usage.md` shows a manual Vite setup for package consumers.
|
|
218
225
|
- `docs/app-architecture.md` describes how to keep larger Mikuru apps split across components, API modules, stores, forms, auth, and tests.
|
|
226
|
+
- `docs/router.md` documents the runtime router.
|
|
219
227
|
- `docs/v1-api-contract.md` describes the v1 compatibility boundary used by this repository.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { Ref } from "../runtime/index.js";
|
|
2
|
+
export type RouteParams = Record<string, string>;
|
|
3
|
+
export type RouteParamsRaw = Record<string, string | number | boolean>;
|
|
4
|
+
export type RouteQuery = Record<string, string | string[] | undefined>;
|
|
5
|
+
export type RouteComponent = {
|
|
6
|
+
mount(target: Element | DocumentFragment, props?: Record<string, unknown>): {
|
|
7
|
+
element: Element | Comment;
|
|
8
|
+
unmount(): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export type RouteRecord = {
|
|
12
|
+
path: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
component?: RouteComponent;
|
|
15
|
+
redirect?: RouteLocationRaw | ((to: RouteLocation) => RouteLocationRaw);
|
|
16
|
+
alias?: string | string[];
|
|
17
|
+
meta?: Record<string, unknown>;
|
|
18
|
+
children?: RouteRecord[];
|
|
19
|
+
};
|
|
20
|
+
export type RouteLocation = {
|
|
21
|
+
path: string;
|
|
22
|
+
fullPath: string;
|
|
23
|
+
query: RouteQuery;
|
|
24
|
+
hash: string;
|
|
25
|
+
params: RouteParams;
|
|
26
|
+
matched?: RouteRecord;
|
|
27
|
+
matchedRecords: RouteRecord[];
|
|
28
|
+
name?: string;
|
|
29
|
+
meta: Record<string, unknown>;
|
|
30
|
+
};
|
|
31
|
+
export type RouteLocationRaw = string | {
|
|
32
|
+
path: string;
|
|
33
|
+
query?: RouteQuery;
|
|
34
|
+
hash?: string;
|
|
35
|
+
} | {
|
|
36
|
+
name: string;
|
|
37
|
+
params?: RouteParamsRaw;
|
|
38
|
+
query?: RouteQuery;
|
|
39
|
+
hash?: string;
|
|
40
|
+
};
|
|
41
|
+
export type NavigationGuardResult = void | boolean | string | RouteLocationRaw;
|
|
42
|
+
export type NavigationGuard = (to: RouteLocation, from: RouteLocation) => NavigationGuardResult | Promise<NavigationGuardResult>;
|
|
43
|
+
export declare const NavigationFailureType: {
|
|
44
|
+
readonly aborted: "aborted";
|
|
45
|
+
readonly cancelled: "cancelled";
|
|
46
|
+
readonly duplicated: "duplicated";
|
|
47
|
+
};
|
|
48
|
+
export type NavigationFailureType = (typeof NavigationFailureType)[keyof typeof NavigationFailureType];
|
|
49
|
+
export type NavigationFailure = {
|
|
50
|
+
type: NavigationFailureType;
|
|
51
|
+
to: RouteLocation;
|
|
52
|
+
from: RouteLocation;
|
|
53
|
+
message: string;
|
|
54
|
+
};
|
|
55
|
+
export type NavigationResult = RouteLocation | NavigationFailure;
|
|
56
|
+
export type AfterNavigationHook = (to: RouteLocation, from: RouteLocation, failure?: NavigationFailure) => void;
|
|
57
|
+
export type ScrollPosition = ScrollToOptions;
|
|
58
|
+
export type ScrollBehavior = (to: RouteLocation, from: RouteLocation) => ScrollPosition | false | void | Promise<ScrollPosition | false | void>;
|
|
59
|
+
export type RouterHistory = {
|
|
60
|
+
mode: "hash" | "history" | "memory";
|
|
61
|
+
location(): string;
|
|
62
|
+
push(path: string): void;
|
|
63
|
+
replace(path: string): void;
|
|
64
|
+
listen(fn: () => void): () => void;
|
|
65
|
+
createHref(path: string): string;
|
|
66
|
+
back(): void;
|
|
67
|
+
forward(): void;
|
|
68
|
+
};
|
|
69
|
+
export type RouterOptions = {
|
|
70
|
+
history?: RouterHistory;
|
|
71
|
+
routes: RouteRecord[];
|
|
72
|
+
notFound?: RouteComponent;
|
|
73
|
+
scrollBehavior?: ScrollBehavior;
|
|
74
|
+
};
|
|
75
|
+
export type Router = {
|
|
76
|
+
currentRoute: Ref<RouteLocation>;
|
|
77
|
+
routes: RouteRecord[];
|
|
78
|
+
push(to: RouteLocationRaw): Promise<NavigationResult>;
|
|
79
|
+
replace(to: RouteLocationRaw): Promise<NavigationResult>;
|
|
80
|
+
back(): void;
|
|
81
|
+
forward(): void;
|
|
82
|
+
resolve(to: RouteLocationRaw): RouteLocation;
|
|
83
|
+
beforeEach(guard: NavigationGuard): () => void;
|
|
84
|
+
afterEach(hook: AfterNavigationHook): () => void;
|
|
85
|
+
addRoute(record: RouteRecord): () => void;
|
|
86
|
+
addRoute(parentName: string, record: RouteRecord): () => void;
|
|
87
|
+
removeRoute(name: string): boolean;
|
|
88
|
+
hasRoute(name: string): boolean;
|
|
89
|
+
listen(): () => void;
|
|
90
|
+
createHref(to: RouteLocationRaw): string;
|
|
91
|
+
};
|
|
92
|
+
export declare function provideRouter(router: Router): void;
|
|
93
|
+
export declare function useRouter(): Router;
|
|
94
|
+
export declare function useRoute(): RouteLocation;
|
|
95
|
+
export declare function isNavigationFailure(value: unknown, type?: NavigationFailureType): value is NavigationFailure;
|
|
96
|
+
export declare function createRouter(options: RouterOptions): Router;
|
|
97
|
+
export declare function createWebHistory(base?: string): RouterHistory;
|
|
98
|
+
export declare function createWebHashHistory(base?: string): RouterHistory;
|
|
99
|
+
export declare function createMemoryHistory(initial?: string): RouterHistory;
|
|
100
|
+
export declare const RouterView: RouteComponent;
|
|
101
|
+
export declare const RouterLink: RouteComponent;
|
|
@@ -0,0 +1,654 @@
|
|
|
1
|
+
import { effect, inject, provide, ref, unwrap } from "../runtime/index.js";
|
|
2
|
+
export const NavigationFailureType = {
|
|
3
|
+
aborted: "aborted",
|
|
4
|
+
cancelled: "cancelled",
|
|
5
|
+
duplicated: "duplicated"
|
|
6
|
+
};
|
|
7
|
+
const notFoundRoute = { path: "/:pathMatch(.*)*", name: "not-found" };
|
|
8
|
+
const routerKey = Symbol.for("mikuru.router");
|
|
9
|
+
export function provideRouter(router) {
|
|
10
|
+
provide(routerKey, router);
|
|
11
|
+
}
|
|
12
|
+
export function useRouter() {
|
|
13
|
+
const router = inject(routerKey);
|
|
14
|
+
if (!router) {
|
|
15
|
+
throw new Error("No router was provided. Call provideRouter(router) in an ancestor component.");
|
|
16
|
+
}
|
|
17
|
+
return router;
|
|
18
|
+
}
|
|
19
|
+
export function useRoute() {
|
|
20
|
+
const router = useRouter();
|
|
21
|
+
return new Proxy({}, {
|
|
22
|
+
get(_target, key) {
|
|
23
|
+
return router.currentRoute.value[key];
|
|
24
|
+
},
|
|
25
|
+
has(_target, key) {
|
|
26
|
+
return key in router.currentRoute.value;
|
|
27
|
+
},
|
|
28
|
+
ownKeys() {
|
|
29
|
+
return Reflect.ownKeys(router.currentRoute.value);
|
|
30
|
+
},
|
|
31
|
+
getOwnPropertyDescriptor(_target, key) {
|
|
32
|
+
return Object.getOwnPropertyDescriptor(router.currentRoute.value, key);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export function isNavigationFailure(value, type) {
|
|
37
|
+
const failure = value;
|
|
38
|
+
const isFailure = !!failure &&
|
|
39
|
+
typeof failure === "object" &&
|
|
40
|
+
typeof failure.type === "string" &&
|
|
41
|
+
typeof failure.message === "string" &&
|
|
42
|
+
!!failure.to &&
|
|
43
|
+
!!failure.from;
|
|
44
|
+
return isFailure && (!type || failure.type === type);
|
|
45
|
+
}
|
|
46
|
+
export function createRouter(options) {
|
|
47
|
+
const history = options.history ?? createWebHashHistory();
|
|
48
|
+
const routes = options.routes.slice();
|
|
49
|
+
const fallbackRoute = options.notFound ? { ...notFoundRoute, component: options.notFound } : undefined;
|
|
50
|
+
let matcher = createMatcher(readMatcherRoutes());
|
|
51
|
+
const beforeGuards = [];
|
|
52
|
+
const afterHooks = [];
|
|
53
|
+
const initial = resolveRouteTarget(history.location());
|
|
54
|
+
const currentRoute = ref(initial);
|
|
55
|
+
let listeningStop;
|
|
56
|
+
let navigationId = 0;
|
|
57
|
+
async function navigate(to, replace) {
|
|
58
|
+
let target = resolveRouteTarget(to);
|
|
59
|
+
const from = currentRoute.value;
|
|
60
|
+
const id = ++navigationId;
|
|
61
|
+
if (target.fullPath === from.fullPath) {
|
|
62
|
+
return createNavigationFailure(NavigationFailureType.duplicated, target, from);
|
|
63
|
+
}
|
|
64
|
+
for (const guard of beforeGuards) {
|
|
65
|
+
const result = await guard(target, from);
|
|
66
|
+
if (id !== navigationId)
|
|
67
|
+
return createNavigationFailure(NavigationFailureType.cancelled, target, from);
|
|
68
|
+
if (result === false) {
|
|
69
|
+
const failure = createNavigationFailure(NavigationFailureType.aborted, target, from);
|
|
70
|
+
for (const hook of afterHooks)
|
|
71
|
+
hook(target, from, failure);
|
|
72
|
+
return failure;
|
|
73
|
+
}
|
|
74
|
+
if (typeof result === "string" || (result && typeof result === "object")) {
|
|
75
|
+
return navigate(result, true);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (replace)
|
|
79
|
+
history.replace(target.fullPath);
|
|
80
|
+
else
|
|
81
|
+
history.push(target.fullPath);
|
|
82
|
+
currentRoute.value = target;
|
|
83
|
+
for (const hook of afterHooks) {
|
|
84
|
+
hook(target, from);
|
|
85
|
+
}
|
|
86
|
+
await handleScroll(target, from);
|
|
87
|
+
return target;
|
|
88
|
+
}
|
|
89
|
+
function syncFromHistory() {
|
|
90
|
+
currentRoute.value = resolveRouteTarget(history.location());
|
|
91
|
+
}
|
|
92
|
+
function syncCurrentRoute() {
|
|
93
|
+
currentRoute.value = resolveRouteTarget(currentRoute.value.fullPath);
|
|
94
|
+
}
|
|
95
|
+
function readMatcherRoutes() {
|
|
96
|
+
return fallbackRoute ? [...routes, fallbackRoute] : routes;
|
|
97
|
+
}
|
|
98
|
+
function resolveRouteTarget(to) {
|
|
99
|
+
let target = resolveLocation(stringifyLocation(to, matcher), matcher);
|
|
100
|
+
for (let redirects = 0; redirects < 10; redirects += 1) {
|
|
101
|
+
const redirect = target.matched?.redirect;
|
|
102
|
+
if (!redirect)
|
|
103
|
+
return target;
|
|
104
|
+
const next = typeof redirect === "function" ? redirect(target) : redirect;
|
|
105
|
+
target = resolveLocation(stringifyLocation(next, matcher), matcher);
|
|
106
|
+
}
|
|
107
|
+
throw new Error("Too many route redirects.");
|
|
108
|
+
}
|
|
109
|
+
function replaceMatcher(nextRoutes = routes) {
|
|
110
|
+
matcher = createMatcher(fallbackRoute ? [...nextRoutes, fallbackRoute] : nextRoutes);
|
|
111
|
+
}
|
|
112
|
+
function addRoute(parentOrRecord, record) {
|
|
113
|
+
if (typeof parentOrRecord !== "string") {
|
|
114
|
+
const nextRoutes = [...routes, parentOrRecord];
|
|
115
|
+
replaceMatcher(nextRoutes);
|
|
116
|
+
routes.push(parentOrRecord);
|
|
117
|
+
syncCurrentRoute();
|
|
118
|
+
return () => {
|
|
119
|
+
if (parentOrRecord.name)
|
|
120
|
+
removeRoute(parentOrRecord.name);
|
|
121
|
+
else if (removeRouteRecord(routes, parentOrRecord)) {
|
|
122
|
+
replaceMatcher();
|
|
123
|
+
syncCurrentRoute();
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
if (!record) {
|
|
128
|
+
throw new Error("router.addRoute(parentName, record) requires a route record.");
|
|
129
|
+
}
|
|
130
|
+
const parent = matcher.byName.get(parentOrRecord)?.record;
|
|
131
|
+
if (!parent) {
|
|
132
|
+
throw new Error(`Unknown route name: ${parentOrRecord}`);
|
|
133
|
+
}
|
|
134
|
+
const nextChildren = [...(parent.children ?? []), record];
|
|
135
|
+
const previousChildren = parent.children;
|
|
136
|
+
parent.children = nextChildren;
|
|
137
|
+
try {
|
|
138
|
+
replaceMatcher();
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
parent.children = previousChildren;
|
|
142
|
+
replaceMatcher();
|
|
143
|
+
throw error;
|
|
144
|
+
}
|
|
145
|
+
syncCurrentRoute();
|
|
146
|
+
return () => {
|
|
147
|
+
if (record.name)
|
|
148
|
+
removeRoute(record.name);
|
|
149
|
+
else if (parent.children && removeRouteRecord(parent.children, record))
|
|
150
|
+
syncCurrentRoute();
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
function removeRoute(name) {
|
|
154
|
+
if (!matcher.byName.has(name))
|
|
155
|
+
return false;
|
|
156
|
+
const removed = removeRouteByName(routes, name);
|
|
157
|
+
if (!removed)
|
|
158
|
+
return false;
|
|
159
|
+
replaceMatcher();
|
|
160
|
+
syncCurrentRoute();
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
async function handleScroll(to, from) {
|
|
164
|
+
if (history.mode === "memory")
|
|
165
|
+
return;
|
|
166
|
+
if (options.scrollBehavior) {
|
|
167
|
+
const position = await options.scrollBehavior(to, from);
|
|
168
|
+
if (!position)
|
|
169
|
+
return;
|
|
170
|
+
scrollToPosition(position);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
scrollToDefaultPosition(to);
|
|
174
|
+
}
|
|
175
|
+
return {
|
|
176
|
+
currentRoute,
|
|
177
|
+
routes,
|
|
178
|
+
push(to) {
|
|
179
|
+
return navigate(to, false);
|
|
180
|
+
},
|
|
181
|
+
replace(to) {
|
|
182
|
+
return navigate(to, true);
|
|
183
|
+
},
|
|
184
|
+
back() {
|
|
185
|
+
history.back();
|
|
186
|
+
},
|
|
187
|
+
forward() {
|
|
188
|
+
history.forward();
|
|
189
|
+
},
|
|
190
|
+
resolve(to) {
|
|
191
|
+
return resolveRouteTarget(to);
|
|
192
|
+
},
|
|
193
|
+
beforeEach(guard) {
|
|
194
|
+
beforeGuards.push(guard);
|
|
195
|
+
return () => removeItem(beforeGuards, guard);
|
|
196
|
+
},
|
|
197
|
+
afterEach(hook) {
|
|
198
|
+
afterHooks.push(hook);
|
|
199
|
+
return () => removeItem(afterHooks, hook);
|
|
200
|
+
},
|
|
201
|
+
addRoute,
|
|
202
|
+
removeRoute,
|
|
203
|
+
hasRoute(name) {
|
|
204
|
+
return matcher.byName.has(name);
|
|
205
|
+
},
|
|
206
|
+
listen() {
|
|
207
|
+
if (listeningStop)
|
|
208
|
+
return listeningStop;
|
|
209
|
+
listeningStop = history.listen(syncFromHistory);
|
|
210
|
+
syncFromHistory();
|
|
211
|
+
return () => {
|
|
212
|
+
listeningStop?.();
|
|
213
|
+
listeningStop = undefined;
|
|
214
|
+
};
|
|
215
|
+
},
|
|
216
|
+
createHref(to) {
|
|
217
|
+
return history.createHref(stringifyLocation(to, matcher));
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
export function createWebHistory(base = "") {
|
|
222
|
+
const normalizedBase = normalizeBase(base);
|
|
223
|
+
return {
|
|
224
|
+
mode: "history",
|
|
225
|
+
location() {
|
|
226
|
+
const path = stripBase(globalThis.location?.pathname ?? "/", normalizedBase);
|
|
227
|
+
return `${path || "/"}${globalThis.location?.search ?? ""}${globalThis.location?.hash ?? ""}`;
|
|
228
|
+
},
|
|
229
|
+
push(path) {
|
|
230
|
+
globalThis.history?.pushState({}, "", `${normalizedBase}${path.replace(/^\//, "")}`);
|
|
231
|
+
},
|
|
232
|
+
replace(path) {
|
|
233
|
+
globalThis.history?.replaceState({}, "", `${normalizedBase}${path.replace(/^\//, "")}`);
|
|
234
|
+
},
|
|
235
|
+
listen(fn) {
|
|
236
|
+
globalThis.addEventListener?.("popstate", fn);
|
|
237
|
+
return () => globalThis.removeEventListener?.("popstate", fn);
|
|
238
|
+
},
|
|
239
|
+
createHref(path) {
|
|
240
|
+
return `${normalizedBase}${path.replace(/^\//, "")}`;
|
|
241
|
+
},
|
|
242
|
+
back() {
|
|
243
|
+
globalThis.history?.back();
|
|
244
|
+
},
|
|
245
|
+
forward() {
|
|
246
|
+
globalThis.history?.forward();
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
export function createWebHashHistory(base = "") {
|
|
251
|
+
const normalizedBase = normalizeBase(base);
|
|
252
|
+
return {
|
|
253
|
+
mode: "hash",
|
|
254
|
+
location() {
|
|
255
|
+
const hash = globalThis.location?.hash ?? "";
|
|
256
|
+
return normalizePath(hash.startsWith("#") ? hash.slice(1) : hash);
|
|
257
|
+
},
|
|
258
|
+
push(path) {
|
|
259
|
+
globalThis.location.hash = `${normalizedBase.replace(/\/$/, "")}#${normalizePath(path)}`;
|
|
260
|
+
},
|
|
261
|
+
replace(path) {
|
|
262
|
+
const url = `${globalThis.location?.pathname ?? ""}${globalThis.location?.search ?? ""}${normalizedBase.replace(/\/$/, "")}#${normalizePath(path)}`;
|
|
263
|
+
globalThis.location?.replace?.(url);
|
|
264
|
+
},
|
|
265
|
+
listen(fn) {
|
|
266
|
+
globalThis.addEventListener?.("hashchange", fn);
|
|
267
|
+
return () => globalThis.removeEventListener?.("hashchange", fn);
|
|
268
|
+
},
|
|
269
|
+
createHref(path) {
|
|
270
|
+
return `${normalizedBase.replace(/\/$/, "")}#${normalizePath(path)}`;
|
|
271
|
+
},
|
|
272
|
+
back() {
|
|
273
|
+
globalThis.history?.back();
|
|
274
|
+
},
|
|
275
|
+
forward() {
|
|
276
|
+
globalThis.history?.forward();
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
export function createMemoryHistory(initial = "/") {
|
|
281
|
+
const stack = [normalizePath(initial)];
|
|
282
|
+
const listeners = new Set();
|
|
283
|
+
let index = 0;
|
|
284
|
+
function notify() {
|
|
285
|
+
for (const listener of listeners)
|
|
286
|
+
listener();
|
|
287
|
+
}
|
|
288
|
+
return {
|
|
289
|
+
mode: "memory",
|
|
290
|
+
location() {
|
|
291
|
+
return stack[index] ?? "/";
|
|
292
|
+
},
|
|
293
|
+
push(path) {
|
|
294
|
+
stack.splice(index + 1);
|
|
295
|
+
stack.push(normalizePath(path));
|
|
296
|
+
index = stack.length - 1;
|
|
297
|
+
notify();
|
|
298
|
+
},
|
|
299
|
+
replace(path) {
|
|
300
|
+
stack[index] = normalizePath(path);
|
|
301
|
+
notify();
|
|
302
|
+
},
|
|
303
|
+
listen(fn) {
|
|
304
|
+
listeners.add(fn);
|
|
305
|
+
return () => listeners.delete(fn);
|
|
306
|
+
},
|
|
307
|
+
createHref(path) {
|
|
308
|
+
return normalizePath(path);
|
|
309
|
+
},
|
|
310
|
+
back() {
|
|
311
|
+
if (index > 0) {
|
|
312
|
+
index -= 1;
|
|
313
|
+
notify();
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
forward() {
|
|
317
|
+
if (index < stack.length - 1) {
|
|
318
|
+
index += 1;
|
|
319
|
+
notify();
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
export const RouterView = {
|
|
325
|
+
mount(target, props = {}) {
|
|
326
|
+
const anchor = document.createComment("mikuru-router-view");
|
|
327
|
+
const cleanup = [];
|
|
328
|
+
let child;
|
|
329
|
+
target.appendChild(anchor);
|
|
330
|
+
const stop = effect(() => {
|
|
331
|
+
const router = getRouterProp(props);
|
|
332
|
+
const route = router.currentRoute.value;
|
|
333
|
+
const depth = Number(unwrap(props.depth) ?? 0);
|
|
334
|
+
const component = route.matchedRecords[depth]?.component;
|
|
335
|
+
child?.unmount();
|
|
336
|
+
child = undefined;
|
|
337
|
+
if (!component)
|
|
338
|
+
return;
|
|
339
|
+
const fragment = document.createDocumentFragment();
|
|
340
|
+
child = component.mount(fragment, { route, router, __mikuru_context: props.__mikuru_context });
|
|
341
|
+
anchor.parentNode?.insertBefore(fragment, anchor);
|
|
342
|
+
});
|
|
343
|
+
cleanup.push(stop, () => child?.unmount(), () => anchor.remove());
|
|
344
|
+
return {
|
|
345
|
+
element: anchor,
|
|
346
|
+
unmount() {
|
|
347
|
+
for (const fn of cleanup.splice(0).reverse())
|
|
348
|
+
fn();
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
export const RouterLink = {
|
|
354
|
+
mount(target, props = {}) {
|
|
355
|
+
const anchor = document.createElement("a");
|
|
356
|
+
const cleanup = [];
|
|
357
|
+
const hasChildren = typeof props.children === "function";
|
|
358
|
+
const text = () => {
|
|
359
|
+
const label = unwrap(props.label) ?? unwrap(props.childrenText);
|
|
360
|
+
if (label !== undefined)
|
|
361
|
+
return String(label);
|
|
362
|
+
const to = readToProp(props);
|
|
363
|
+
if (typeof to === "string")
|
|
364
|
+
return to;
|
|
365
|
+
if ("name" in to)
|
|
366
|
+
return to.name;
|
|
367
|
+
return to.path;
|
|
368
|
+
};
|
|
369
|
+
const navigate = (event) => {
|
|
370
|
+
const router = getRouterProp(props);
|
|
371
|
+
event.preventDefault();
|
|
372
|
+
void (unwrap(props.replace) ? router.replace(readToProp(props)) : router.push(readToProp(props)));
|
|
373
|
+
};
|
|
374
|
+
anchor.addEventListener("click", navigate);
|
|
375
|
+
cleanup.push(() => anchor.removeEventListener("click", navigate));
|
|
376
|
+
if (hasChildren) {
|
|
377
|
+
const cleanupResult = props.children(anchor, {});
|
|
378
|
+
if (cleanupResult)
|
|
379
|
+
cleanup.push(cleanupResult);
|
|
380
|
+
}
|
|
381
|
+
const stop = effect(() => {
|
|
382
|
+
const router = getRouterProp(props);
|
|
383
|
+
const to = readToProp(props);
|
|
384
|
+
const targetRoute = router.resolve(to);
|
|
385
|
+
const activeClass = String(unwrap(props.activeClass) ?? "router-link-active");
|
|
386
|
+
const exactActiveClass = String(unwrap(props.exactActiveClass) ?? "router-link-exact-active");
|
|
387
|
+
const isExactActive = router.currentRoute.value.fullPath === targetRoute.fullPath;
|
|
388
|
+
const isActive = isExactActive || isPathActive(router.currentRoute.value.path, targetRoute.path);
|
|
389
|
+
anchor.href = router.createHref(to);
|
|
390
|
+
if (!hasChildren)
|
|
391
|
+
anchor.textContent = text();
|
|
392
|
+
anchor.classList.toggle(activeClass, isActive);
|
|
393
|
+
anchor.classList.toggle(exactActiveClass, isExactActive);
|
|
394
|
+
if (isExactActive) {
|
|
395
|
+
anchor.setAttribute("aria-current", "page");
|
|
396
|
+
}
|
|
397
|
+
else {
|
|
398
|
+
anchor.removeAttribute("aria-current");
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
cleanup.push(stop, () => anchor.remove());
|
|
402
|
+
target.appendChild(anchor);
|
|
403
|
+
return {
|
|
404
|
+
element: anchor,
|
|
405
|
+
unmount() {
|
|
406
|
+
for (const fn of cleanup.splice(0).reverse())
|
|
407
|
+
fn();
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
function getRouterProp(props) {
|
|
413
|
+
const router = unwrap(props.router);
|
|
414
|
+
if (!router || typeof router !== "object" || !("currentRoute" in router)) {
|
|
415
|
+
const contextRouter = injectRouterFromContext(props.__mikuru_context);
|
|
416
|
+
if (contextRouter)
|
|
417
|
+
return contextRouter;
|
|
418
|
+
throw new Error("RouterView and RouterLink require a router prop or provided router context.");
|
|
419
|
+
}
|
|
420
|
+
return router;
|
|
421
|
+
}
|
|
422
|
+
function injectRouterFromContext(context) {
|
|
423
|
+
for (let current = context; current; current = current.parent) {
|
|
424
|
+
const router = current.provides?.get(routerKey);
|
|
425
|
+
if (router && typeof router === "object" && "currentRoute" in router) {
|
|
426
|
+
return router;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
return undefined;
|
|
430
|
+
}
|
|
431
|
+
function createMatcher(routes) {
|
|
432
|
+
const compiled = [];
|
|
433
|
+
const byName = new Map();
|
|
434
|
+
function addCompiledRoute(record, path, parents, registerName) {
|
|
435
|
+
const keys = [];
|
|
436
|
+
const source = path
|
|
437
|
+
.replace(/\/:([^/(]+)\(\.\*\)\*/g, (_match, key) => {
|
|
438
|
+
keys.push(key);
|
|
439
|
+
return "/(.*)";
|
|
440
|
+
})
|
|
441
|
+
.replace(/:([^/]+)/g, (_match, key) => {
|
|
442
|
+
keys.push(key);
|
|
443
|
+
return "([^/]+)";
|
|
444
|
+
});
|
|
445
|
+
const route = {
|
|
446
|
+
record,
|
|
447
|
+
records: [...parents, record],
|
|
448
|
+
path,
|
|
449
|
+
keys,
|
|
450
|
+
pattern: new RegExp(`^${source.replace(/\//g, "\\/")}$`)
|
|
451
|
+
};
|
|
452
|
+
compiled.push(route);
|
|
453
|
+
if (registerName && record.name) {
|
|
454
|
+
if (byName.has(record.name)) {
|
|
455
|
+
throw new Error(`Duplicate route name: ${record.name}`);
|
|
456
|
+
}
|
|
457
|
+
byName.set(record.name, route);
|
|
458
|
+
}
|
|
459
|
+
return route;
|
|
460
|
+
}
|
|
461
|
+
function addRoute(record, parentPath, parents, registerNames = true) {
|
|
462
|
+
const path = joinRoutePath(parentPath, record.path);
|
|
463
|
+
const paths = [path, ...readAliases(record).map((alias) => joinRoutePath(parentPath, alias))];
|
|
464
|
+
paths.forEach((routePath, index) => {
|
|
465
|
+
addCompiledRoute(record, routePath, parents, registerNames && index === 0);
|
|
466
|
+
});
|
|
467
|
+
paths.forEach((routePath, index) => {
|
|
468
|
+
for (const child of record.children ?? []) {
|
|
469
|
+
addRoute(child, routePath, [...parents, record], registerNames && index === 0);
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
for (const route of routes) {
|
|
474
|
+
addRoute(route, "", []);
|
|
475
|
+
}
|
|
476
|
+
return { routes: compiled, byName };
|
|
477
|
+
}
|
|
478
|
+
function resolveLocation(raw, matcher) {
|
|
479
|
+
const fullPath = normalizePath(raw);
|
|
480
|
+
const parsed = parsePath(fullPath);
|
|
481
|
+
const matched = matcher.routes.find((route) => route.pattern.test(parsed.path));
|
|
482
|
+
const params = {};
|
|
483
|
+
if (matched) {
|
|
484
|
+
const match = matched.pattern.exec(parsed.path);
|
|
485
|
+
matched.keys.forEach((key, index) => {
|
|
486
|
+
params[key] = decodeURIComponent(match?.[index + 1] ?? "");
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
return {
|
|
490
|
+
path: parsed.path,
|
|
491
|
+
fullPath,
|
|
492
|
+
query: parsed.query,
|
|
493
|
+
hash: parsed.hash,
|
|
494
|
+
params,
|
|
495
|
+
matched: matched?.record,
|
|
496
|
+
matchedRecords: matched?.records ?? [],
|
|
497
|
+
name: matched?.record.name,
|
|
498
|
+
meta: mergeMeta(matched?.records ?? [])
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
function parsePath(fullPath) {
|
|
502
|
+
const [pathAndQuery, rawHash = ""] = fullPath.split("#", 2);
|
|
503
|
+
const [path = "/", rawQuery = ""] = pathAndQuery.split("?", 2);
|
|
504
|
+
return {
|
|
505
|
+
path: normalizePath(path),
|
|
506
|
+
query: parseQuery(rawQuery),
|
|
507
|
+
hash: rawHash ? `#${rawHash}` : ""
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
function stringifyLocation(to, matcher) {
|
|
511
|
+
if (typeof to === "string")
|
|
512
|
+
return normalizePath(to);
|
|
513
|
+
const path = "name" in to ? stringifyNamedLocation(to, matcher) : normalizePath(to.path);
|
|
514
|
+
const query = stringifyQuery(to.query ?? {});
|
|
515
|
+
const hash = to.hash ? (to.hash.startsWith("#") ? to.hash : `#${to.hash}`) : "";
|
|
516
|
+
return `${path}${query}${hash}`;
|
|
517
|
+
}
|
|
518
|
+
function stringifyNamedLocation(to, matcher) {
|
|
519
|
+
const route = matcher?.byName.get(to.name);
|
|
520
|
+
if (!route) {
|
|
521
|
+
throw new Error(`Unknown route name: ${to.name}`);
|
|
522
|
+
}
|
|
523
|
+
return route.path.replace(/:([^/]+)/g, (_match, key) => {
|
|
524
|
+
const value = to.params?.[key];
|
|
525
|
+
if (value === undefined) {
|
|
526
|
+
throw new Error(`Missing route param: ${key}`);
|
|
527
|
+
}
|
|
528
|
+
return encodeURIComponent(String(value));
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
function parseQuery(raw) {
|
|
532
|
+
const query = {};
|
|
533
|
+
const search = new URLSearchParams(raw);
|
|
534
|
+
for (const [key, value] of search) {
|
|
535
|
+
const current = query[key];
|
|
536
|
+
if (Array.isArray(current))
|
|
537
|
+
current.push(value);
|
|
538
|
+
else if (current !== undefined)
|
|
539
|
+
query[key] = [current, value];
|
|
540
|
+
else
|
|
541
|
+
query[key] = value;
|
|
542
|
+
}
|
|
543
|
+
return query;
|
|
544
|
+
}
|
|
545
|
+
function stringifyQuery(query) {
|
|
546
|
+
const search = new URLSearchParams();
|
|
547
|
+
for (const [key, value] of Object.entries(query)) {
|
|
548
|
+
if (Array.isArray(value)) {
|
|
549
|
+
for (const item of value)
|
|
550
|
+
search.append(key, item);
|
|
551
|
+
}
|
|
552
|
+
else if (value !== undefined) {
|
|
553
|
+
search.set(key, value);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
const result = search.toString();
|
|
557
|
+
return result ? `?${result}` : "";
|
|
558
|
+
}
|
|
559
|
+
function normalizePath(path) {
|
|
560
|
+
const normalized = path.trim() || "/";
|
|
561
|
+
return normalized.startsWith("/") ? normalized : `/${normalized}`;
|
|
562
|
+
}
|
|
563
|
+
function normalizeBase(base) {
|
|
564
|
+
if (!base)
|
|
565
|
+
return "/";
|
|
566
|
+
return base.endsWith("/") ? base : `${base}/`;
|
|
567
|
+
}
|
|
568
|
+
function joinRoutePath(parentPath, path) {
|
|
569
|
+
if (path.startsWith("/"))
|
|
570
|
+
return normalizePath(path);
|
|
571
|
+
if (!parentPath)
|
|
572
|
+
return normalizePath(path);
|
|
573
|
+
if (!path)
|
|
574
|
+
return parentPath;
|
|
575
|
+
return normalizePath(`${parentPath.replace(/\/$/, "")}/${path}`);
|
|
576
|
+
}
|
|
577
|
+
function readToProp(props) {
|
|
578
|
+
return unwrap(props.to) ?? "/";
|
|
579
|
+
}
|
|
580
|
+
function readAliases(record) {
|
|
581
|
+
if (!record.alias)
|
|
582
|
+
return [];
|
|
583
|
+
return Array.isArray(record.alias) ? record.alias : [record.alias];
|
|
584
|
+
}
|
|
585
|
+
function mergeMeta(records) {
|
|
586
|
+
return records.reduce((meta, record) => ({ ...meta, ...(record.meta ?? {}) }), {});
|
|
587
|
+
}
|
|
588
|
+
function removeRouteByName(routes, name) {
|
|
589
|
+
for (let index = 0; index < routes.length; index += 1) {
|
|
590
|
+
const route = routes[index];
|
|
591
|
+
if (!route)
|
|
592
|
+
continue;
|
|
593
|
+
if (route.name === name) {
|
|
594
|
+
routes.splice(index, 1);
|
|
595
|
+
return true;
|
|
596
|
+
}
|
|
597
|
+
if (route.children && removeRouteByName(route.children, name)) {
|
|
598
|
+
return true;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
return false;
|
|
602
|
+
}
|
|
603
|
+
function removeRouteRecord(routes, record) {
|
|
604
|
+
const index = routes.indexOf(record);
|
|
605
|
+
if (index >= 0) {
|
|
606
|
+
routes.splice(index, 1);
|
|
607
|
+
return true;
|
|
608
|
+
}
|
|
609
|
+
for (const route of routes) {
|
|
610
|
+
if (route.children && removeRouteRecord(route.children, record)) {
|
|
611
|
+
return true;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
return false;
|
|
615
|
+
}
|
|
616
|
+
function createNavigationFailure(type, to, from) {
|
|
617
|
+
return {
|
|
618
|
+
type,
|
|
619
|
+
to,
|
|
620
|
+
from,
|
|
621
|
+
message: `Navigation ${type} from ${from.fullPath} to ${to.fullPath}.`
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
function scrollToDefaultPosition(to) {
|
|
625
|
+
if (to.hash) {
|
|
626
|
+
const id = decodeURIComponent(to.hash.slice(1));
|
|
627
|
+
const element = globalThis.document?.getElementById?.(id);
|
|
628
|
+
if (element) {
|
|
629
|
+
element.scrollIntoView();
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
scrollToPosition({ left: 0, top: 0 });
|
|
634
|
+
}
|
|
635
|
+
function scrollToPosition(position) {
|
|
636
|
+
const scrollTo = globalThis.scrollTo ?? globalThis.window?.scrollTo;
|
|
637
|
+
scrollTo?.call(globalThis.window ?? globalThis, position);
|
|
638
|
+
}
|
|
639
|
+
function stripBase(path, base) {
|
|
640
|
+
if (base === "/")
|
|
641
|
+
return path;
|
|
642
|
+
return path.startsWith(base) ? path.slice(base.length - 1) : path;
|
|
643
|
+
}
|
|
644
|
+
function isPathActive(currentPath, targetPath) {
|
|
645
|
+
if (targetPath === "/")
|
|
646
|
+
return currentPath === "/";
|
|
647
|
+
return currentPath === targetPath || currentPath.startsWith(`${targetPath}/`);
|
|
648
|
+
}
|
|
649
|
+
function removeItem(items, item) {
|
|
650
|
+
const index = items.indexOf(item);
|
|
651
|
+
if (index >= 0)
|
|
652
|
+
items.splice(index, 1);
|
|
653
|
+
}
|
|
654
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/router/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAsC3E,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;CAChB,CAAC;AA8DX,MAAM,aAAa,GAAgB,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,WAAW,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,CAAC,WAAmB,EAAE,UAAkB;IAC3D,IAAI,UAAU,KAAK,GAAG;QAAE,OAAO,WAAW,KAAK,GAAG,CAAC;IACnD,OAAO,WAAW,KAAK,UAAU,IAAI,WAAW,CAAC,UAAU,CAAC,GAAG,UAAU,GAAG,CAAC,CAAC;AAChF,CAAC;AAED,SAAS,UAAU,CAAI,KAAU,EAAE,IAAO;IACxC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,KAAK,IAAI,CAAC;QAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AACzC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mikuru",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A compile-first JavaScript framework with Vue-like authoring and Svelte-like generated DOM updates.",
|
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
"types": "./dist/runtime/index.d.ts",
|
|
26
26
|
"default": "./dist/runtime/index.js"
|
|
27
27
|
},
|
|
28
|
+
"./router": {
|
|
29
|
+
"types": "./dist/router/index.d.ts",
|
|
30
|
+
"default": "./dist/router/index.js"
|
|
31
|
+
},
|
|
28
32
|
"./env": {
|
|
29
33
|
"types": "./types/env.d.ts",
|
|
30
34
|
"default": "./dist/env.js"
|
|
@@ -52,18 +56,21 @@
|
|
|
52
56
|
"build:basic": "vite build --config examples/basic/vite.config.ts",
|
|
53
57
|
"build:dogfood": "vite build --config examples/dogfood/vite.config.ts",
|
|
54
58
|
"build:realworld": "vite build --config examples/realworld/vite.config.ts",
|
|
59
|
+
"build:router": "vite build --config examples/router/vite.config.ts",
|
|
55
60
|
"build:mikuru-sample": "vite build --config examples/mikuru-sample/vite.config.ts",
|
|
56
61
|
"build:mikuru-vue-like": "vite build --config examples/mikuru-vue-like/vite.config.ts",
|
|
57
|
-
"ci": "npm run typecheck && npm test && npm run test:templates && npm run test:docs && npm run build && npm run test:create && npm run build:basic && npm run build:realworld && npm run build:dogfood && npm run test:package && npm run test:pack && npm run test:e2e && npm run test:e2e:basic && npm run test:e2e:dogfood",
|
|
62
|
+
"ci": "npm run typecheck && npm test && npm run test:templates && npm run test:docs && npm run build && npm run test:create && npm run build:basic && npm run build:realworld && npm run build:dogfood && npm run build:router && npm run test:package && npm run test:pack && npm run test:e2e && npm run test:e2e:basic && npm run test:e2e:dogfood && npm run test:e2e:router",
|
|
58
63
|
"dev:basic": "vite --config examples/basic/vite.config.ts",
|
|
59
64
|
"dev:dogfood": "vite --config examples/dogfood/vite.config.ts",
|
|
60
65
|
"dev:realworld": "vite --config examples/realworld/vite.config.ts",
|
|
66
|
+
"dev:router": "vite --config examples/router/vite.config.ts",
|
|
61
67
|
"dev:mikuru-sample": "vite --config examples/mikuru-sample/vite.config.ts",
|
|
62
68
|
"dev:mikuru-vue-like": "vite --config examples/mikuru-vue-like/vite.config.ts",
|
|
63
69
|
"test": "vitest run",
|
|
64
|
-
"test:e2e": "playwright test",
|
|
65
|
-
"test:e2e:basic": "playwright test --config playwright.basic.config.ts",
|
|
70
|
+
"test:e2e": "playwright test",
|
|
71
|
+
"test:e2e:basic": "playwright test --config playwright.basic.config.ts",
|
|
66
72
|
"test:e2e:dogfood": "playwright test --config playwright.dogfood.config.ts",
|
|
73
|
+
"test:e2e:router": "playwright test --config playwright.router.config.ts",
|
|
67
74
|
"test:create": "node tests/create-cli-smoke.mjs",
|
|
68
75
|
"test:docs": "node tests/docs-smoke.mjs",
|
|
69
76
|
"test:pack": "node tests/npm-pack-smoke.mjs",
|
|
@@ -86,8 +93,8 @@
|
|
|
86
93
|
"typescript": "^6.0.3",
|
|
87
94
|
"vite": "^8.0.10",
|
|
88
95
|
"vitest": "^4.1.5"
|
|
89
|
-
},
|
|
90
|
-
"dependencies": {
|
|
91
|
-
"acorn": "^8.16.0"
|
|
92
|
-
}
|
|
93
|
-
}
|
|
96
|
+
},
|
|
97
|
+
"dependencies": {
|
|
98
|
+
"acorn": "^8.16.0"
|
|
99
|
+
}
|
|
100
|
+
}
|