@moku-labs/web 2.4.2 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/browser.d.mts +6 -1
- package/dist/browser.mjs +13 -9
- package/dist/index.cjs +13 -9
- package/dist/index.d.cts +6 -1
- package/dist/index.d.mts +6 -1
- package/dist/index.mjs +13 -9
- package/dist/testing.d.mts +5 -0
- package/package.json +23 -21
package/README.md
CHANGED
|
@@ -140,7 +140,7 @@ route("/board/{id}/issue/{issueId}")
|
|
|
140
140
|
|
|
141
141
|
- **`viewTransitions`** accepts `boolean` (`true` → `"crossfade"`, `false` → `"none"`) **or** a named `TransitionMode` (`"none" | "crossfade" | "slide" | "morph"`). A named transition tags the swap so your CSS can target it two ways — `:root[data-view-transition~="slide"]` (every View-Transitions engine) and the standards-track `:active-view-transition-type(slide)` — and a shared `view-transition-name` left across the swap morphs one element into another. Reduced-motion and unsupported browsers fall back to an instant swap.
|
|
142
142
|
- **`scrollRestoration`** is `"top"` (reset, the default) or `"preserve"` (keep the current scroll — e.g. opening an overlay route over content that must stay still). Back/forward always restores its saved position.
|
|
143
|
-
- **`ctx.navigate(path, options?)`** — every island can navigate programmatically with no `app` handle (an always-present context member, like `ctx.set`/`ctx.url`). `app.spa.navigate` takes the same optional `{ scroll }
|
|
143
|
+
- **`ctx.navigate(path, options?)`** — every island can navigate programmatically with no `app` handle (an always-present context member, like `ctx.set`/`ctx.url`). `app.spa.navigate` takes the same optional `{ scroll, replace }`: `replace: true` swaps the current history entry instead of adding one, so Back skips the page navigated from (e.g. the same page in another language).
|
|
144
144
|
- **`navigate(path, options?)` / `hardNavigate(url)`** — importable from `@moku-labs/web/browser` for module-scope callers (shared chrome/nav helpers with no `app` or island `ctx`); they bind to the single booted app and no-op before `app.start()`. `hardNavigate` (also `app.spa.hardNavigate`) does a REAL full-page load for crossing a boundary the SPA can't swap — a different layout or an auth split — by detaching the SPA's own interceptor first, so `location.assign` isn't caught and converted to a region swap.
|
|
145
145
|
|
|
146
146
|
```ts
|
package/dist/browser.d.mts
CHANGED
|
@@ -920,6 +920,11 @@ declare namespace types_d_exports$5 {
|
|
|
920
920
|
interface NavigateOptions {
|
|
921
921
|
/** Override the scroll behaviour for this single navigation (else the route/app default). */
|
|
922
922
|
scroll?: ScrollMode;
|
|
923
|
+
/**
|
|
924
|
+
* Replace the current history entry instead of adding one (`history.replaceState`), so Back
|
|
925
|
+
* skips the page navigated from; e.g. the same page in another language.
|
|
926
|
+
*/
|
|
927
|
+
replace?: boolean;
|
|
923
928
|
}
|
|
924
929
|
/** Payload map for the events `spa` emits, used to type the kernel's `emit` closure. */
|
|
925
930
|
type SpaEvents = {
|
|
@@ -2797,7 +2802,7 @@ declare const createApp: <const ExtraPlugins extends readonly import("@moku-labs
|
|
|
2797
2802
|
name: string;
|
|
2798
2803
|
el: Element;
|
|
2799
2804
|
};
|
|
2800
|
-
}> & Record<never, never>) | ExtraPlugins[number], [...ExtraPlugins], import("@moku-labs/core").CoreApisFromTuple<[import("@moku-labs/core").CorePluginInstance<"log", import("@moku-labs/common").LogConfig, import("@moku-labs/common").LogState, import("@moku-labs/common").LogApi>, import("@moku-labs/core").CorePluginInstance<"env", import("@moku-labs/common").EnvConfig, import("@moku-labs/common").EnvState, import("@moku-labs/common").EnvApi>]>> | undefined) => import("@moku-labs/core").App<Config$5, Events, (import("@moku-labs/core").PluginInstance<"site", Config$4, Record<string, never>, Api$4, {}> & Record<never, never>) | (import("@moku-labs/core").PluginInstance<"i18n", Config$3, Record<string, never>, Api$3, {}> & Record<never, never>) | (import("@moku-labs/core").PluginInstance<"router", RouterConfig, RouterState, RouterApi, {}> & {
|
|
2805
|
+
}> & Record<never, never>) | ExtraPlugins[number], [...ExtraPlugins], import("@moku-labs/core").CoreApisFromTuple<[import("@moku-labs/core").CorePluginInstance<"log", import("@moku-labs/common").LogConfig, import("@moku-labs/common").LogState, import("@moku-labs/common").LogApi>, import("@moku-labs/core").CorePluginInstance<"env", import("@moku-labs/common").EnvConfig, import("@moku-labs/common").EnvState, import("@moku-labs/common").EnvApi>]>, import("@moku-labs/core").CorePluginInstance<"log", import("@moku-labs/common").LogConfig, import("@moku-labs/common").LogState, import("@moku-labs/common").LogApi> | import("@moku-labs/core").CorePluginInstance<"env", import("@moku-labs/common").EnvConfig, import("@moku-labs/common").EnvState, import("@moku-labs/common").EnvApi>> | undefined) => import("@moku-labs/core").App<Config$5, Events, (import("@moku-labs/core").PluginInstance<"site", Config$4, Record<string, never>, Api$4, {}> & Record<never, never>) | (import("@moku-labs/core").PluginInstance<"i18n", Config$3, Record<string, never>, Api$3, {}> & Record<never, never>) | (import("@moku-labs/core").PluginInstance<"router", RouterConfig, RouterState, RouterApi, {}> & {
|
|
2801
2806
|
route: typeof route;
|
|
2802
2807
|
defineRoutes: typeof defineRoutes;
|
|
2803
2808
|
createUrls: typeof createUrls;
|
package/dist/browser.mjs
CHANGED
|
@@ -4195,18 +4195,22 @@ function createSpaKernel(state, config, emit, deps) {
|
|
|
4195
4195
|
* navigation a second time. The current scroll is saved first so a later back restores it. It
|
|
4196
4196
|
* carries its own abort signal: any later navigation aborts it before it can swap.
|
|
4197
4197
|
*
|
|
4198
|
+
* `options.replace` swaps the current history entry (`replaceState`) instead of adding one.
|
|
4199
|
+
*
|
|
4198
4200
|
* @param path - The destination path (pathname + optional search).
|
|
4199
|
-
* @param
|
|
4201
|
+
* @param options - Optional per-call overrides: `scroll`, `replace`.
|
|
4200
4202
|
* @example
|
|
4201
|
-
* navigateProgrammatic("/board/abc/issue/1", "preserve");
|
|
4203
|
+
* navigateProgrammatic("/board/abc/issue/1", { scroll: "preserve" });
|
|
4202
4204
|
*/
|
|
4203
|
-
const navigateProgrammatic = (path,
|
|
4205
|
+
const navigateProgrammatic = (path, options = {}) => {
|
|
4204
4206
|
if (typeof document === "undefined") return;
|
|
4207
|
+
const { scroll, replace = false } = options;
|
|
4205
4208
|
if (path !== currentLocationUrl()) {
|
|
4206
4209
|
saveScrollPosition(currentLocationUrl());
|
|
4207
4210
|
pushingOwnUrl = true;
|
|
4208
4211
|
try {
|
|
4209
|
-
history.
|
|
4212
|
+
if (replace) history.replaceState({}, "", path);
|
|
4213
|
+
else history.pushState({}, "", path);
|
|
4210
4214
|
} finally {
|
|
4211
4215
|
pushingOwnUrl = false;
|
|
4212
4216
|
}
|
|
@@ -4229,7 +4233,7 @@ function createSpaKernel(state, config, emit, deps) {
|
|
|
4229
4233
|
for (const island of resolved.islands) registerIsland(state, island);
|
|
4230
4234
|
state.currentUrl = currentLocationUrl();
|
|
4231
4235
|
state.navigate = (path, options) => {
|
|
4232
|
-
navigateProgrammatic(path, options
|
|
4236
|
+
navigateProgrammatic(path, options);
|
|
4233
4237
|
};
|
|
4234
4238
|
},
|
|
4235
4239
|
/**
|
|
@@ -4264,16 +4268,16 @@ function createSpaKernel(state, config, emit, deps) {
|
|
|
4264
4268
|
registerIsland(state, island);
|
|
4265
4269
|
},
|
|
4266
4270
|
/**
|
|
4267
|
-
* Process a navigation to `path` (fetch then swap; full reload on error).
|
|
4268
|
-
*
|
|
4271
|
+
* Process a navigation to `path` (fetch then swap; full reload on error). Optional per-call
|
|
4272
|
+
* overrides: `scroll` for the swap's scroll intent, `replace` to replace the history entry.
|
|
4269
4273
|
*
|
|
4270
4274
|
* @param path - The target path to navigate to.
|
|
4271
|
-
* @param options - Optional per-navigation overrides (e.g. `{ scroll: "preserve" }`).
|
|
4275
|
+
* @param options - Optional per-navigation overrides (e.g. `{ scroll: "preserve", replace: true }`).
|
|
4272
4276
|
* @example
|
|
4273
4277
|
* kernel.processNav("/about");
|
|
4274
4278
|
*/
|
|
4275
4279
|
processNav(path, options) {
|
|
4276
|
-
navigateProgrammatic(path, options
|
|
4280
|
+
navigateProgrammatic(path, options);
|
|
4277
4281
|
},
|
|
4278
4282
|
/**
|
|
4279
4283
|
* Cross a boundary the SPA cannot swap (a different layout, the auth split) with a REAL
|
package/dist/index.cjs
CHANGED
|
@@ -11289,18 +11289,22 @@ function createSpaKernel(state, config, emit, deps) {
|
|
|
11289
11289
|
* navigation a second time. The current scroll is saved first so a later back restores it. It
|
|
11290
11290
|
* carries its own abort signal: any later navigation aborts it before it can swap.
|
|
11291
11291
|
*
|
|
11292
|
+
* `options.replace` swaps the current history entry (`replaceState`) instead of adding one.
|
|
11293
|
+
*
|
|
11292
11294
|
* @param path - The destination path (pathname + optional search).
|
|
11293
|
-
* @param
|
|
11295
|
+
* @param options - Optional per-call overrides: `scroll`, `replace`.
|
|
11294
11296
|
* @example
|
|
11295
|
-
* navigateProgrammatic("/board/abc/issue/1", "preserve");
|
|
11297
|
+
* navigateProgrammatic("/board/abc/issue/1", { scroll: "preserve" });
|
|
11296
11298
|
*/
|
|
11297
|
-
const navigateProgrammatic = (path,
|
|
11299
|
+
const navigateProgrammatic = (path, options = {}) => {
|
|
11298
11300
|
if (typeof document === "undefined") return;
|
|
11301
|
+
const { scroll, replace = false } = options;
|
|
11299
11302
|
if (path !== currentLocationUrl()) {
|
|
11300
11303
|
saveScrollPosition(currentLocationUrl());
|
|
11301
11304
|
pushingOwnUrl = true;
|
|
11302
11305
|
try {
|
|
11303
|
-
history.
|
|
11306
|
+
if (replace) history.replaceState({}, "", path);
|
|
11307
|
+
else history.pushState({}, "", path);
|
|
11304
11308
|
} finally {
|
|
11305
11309
|
pushingOwnUrl = false;
|
|
11306
11310
|
}
|
|
@@ -11323,7 +11327,7 @@ function createSpaKernel(state, config, emit, deps) {
|
|
|
11323
11327
|
for (const island of resolved.islands) registerIsland(state, island);
|
|
11324
11328
|
state.currentUrl = currentLocationUrl();
|
|
11325
11329
|
state.navigate = (path, options) => {
|
|
11326
|
-
navigateProgrammatic(path, options
|
|
11330
|
+
navigateProgrammatic(path, options);
|
|
11327
11331
|
};
|
|
11328
11332
|
},
|
|
11329
11333
|
/**
|
|
@@ -11358,16 +11362,16 @@ function createSpaKernel(state, config, emit, deps) {
|
|
|
11358
11362
|
registerIsland(state, island);
|
|
11359
11363
|
},
|
|
11360
11364
|
/**
|
|
11361
|
-
* Process a navigation to `path` (fetch then swap; full reload on error).
|
|
11362
|
-
*
|
|
11365
|
+
* Process a navigation to `path` (fetch then swap; full reload on error). Optional per-call
|
|
11366
|
+
* overrides: `scroll` for the swap's scroll intent, `replace` to replace the history entry.
|
|
11363
11367
|
*
|
|
11364
11368
|
* @param path - The target path to navigate to.
|
|
11365
|
-
* @param options - Optional per-navigation overrides (e.g. `{ scroll: "preserve" }`).
|
|
11369
|
+
* @param options - Optional per-navigation overrides (e.g. `{ scroll: "preserve", replace: true }`).
|
|
11366
11370
|
* @example
|
|
11367
11371
|
* kernel.processNav("/about");
|
|
11368
11372
|
*/
|
|
11369
11373
|
processNav(path, options) {
|
|
11370
|
-
navigateProgrammatic(path, options
|
|
11374
|
+
navigateProgrammatic(path, options);
|
|
11371
11375
|
},
|
|
11372
11376
|
/**
|
|
11373
11377
|
* Cross a boundary the SPA cannot swap (a different layout, the auth split) with a REAL
|
package/dist/index.d.cts
CHANGED
|
@@ -921,6 +921,11 @@ declare namespace types_d_exports$8 {
|
|
|
921
921
|
interface NavigateOptions {
|
|
922
922
|
/** Override the scroll behaviour for this single navigation (else the route/app default). */
|
|
923
923
|
scroll?: ScrollMode;
|
|
924
|
+
/**
|
|
925
|
+
* Replace the current history entry instead of adding one (`history.replaceState`), so Back
|
|
926
|
+
* skips the page navigated from; e.g. the same page in another language.
|
|
927
|
+
*/
|
|
928
|
+
replace?: boolean;
|
|
924
929
|
}
|
|
925
930
|
/** Payload map for the events `spa` emits, used to type the kernel's `emit` closure. */
|
|
926
931
|
type SpaEvents = {
|
|
@@ -4155,7 +4160,7 @@ declare const createApp: <const ExtraPlugins extends readonly import("@moku-labs
|
|
|
4155
4160
|
name: string;
|
|
4156
4161
|
el: Element;
|
|
4157
4162
|
};
|
|
4158
|
-
}> & Record<never, never>) | ExtraPlugins[number], [...ExtraPlugins], import("@moku-labs/core").CoreApisFromTuple<[import("@moku-labs/core").CorePluginInstance<"log", import("@moku-labs/common").LogConfig, import("@moku-labs/common").LogState, import("@moku-labs/common").LogApi>, import("@moku-labs/core").CorePluginInstance<"env", import("@moku-labs/common").EnvConfig, import("@moku-labs/common").EnvState, import("@moku-labs/common").EnvApi>]>> | undefined) => import("@moku-labs/core").App<Config$8, Events, (import("@moku-labs/core").PluginInstance<"site", Config$7, Record<string, never>, Api$7, {}> & Record<never, never>) | (import("@moku-labs/core").PluginInstance<"i18n", Config$6, Record<string, never>, Api$6, {}> & Record<never, never>) | (import("@moku-labs/core").PluginInstance<"router", RouterConfig, RouterState, RouterApi, {}> & {
|
|
4163
|
+
}> & Record<never, never>) | ExtraPlugins[number], [...ExtraPlugins], import("@moku-labs/core").CoreApisFromTuple<[import("@moku-labs/core").CorePluginInstance<"log", import("@moku-labs/common").LogConfig, import("@moku-labs/common").LogState, import("@moku-labs/common").LogApi>, import("@moku-labs/core").CorePluginInstance<"env", import("@moku-labs/common").EnvConfig, import("@moku-labs/common").EnvState, import("@moku-labs/common").EnvApi>]>, import("@moku-labs/core").CorePluginInstance<"log", import("@moku-labs/common").LogConfig, import("@moku-labs/common").LogState, import("@moku-labs/common").LogApi> | import("@moku-labs/core").CorePluginInstance<"env", import("@moku-labs/common").EnvConfig, import("@moku-labs/common").EnvState, import("@moku-labs/common").EnvApi>> | undefined) => import("@moku-labs/core").App<Config$8, Events, (import("@moku-labs/core").PluginInstance<"site", Config$7, Record<string, never>, Api$7, {}> & Record<never, never>) | (import("@moku-labs/core").PluginInstance<"i18n", Config$6, Record<string, never>, Api$6, {}> & Record<never, never>) | (import("@moku-labs/core").PluginInstance<"router", RouterConfig, RouterState, RouterApi, {}> & {
|
|
4159
4164
|
route: typeof route;
|
|
4160
4165
|
defineRoutes: typeof defineRoutes;
|
|
4161
4166
|
createUrls: typeof createUrls;
|
package/dist/index.d.mts
CHANGED
|
@@ -919,6 +919,11 @@ declare namespace types_d_exports$8 {
|
|
|
919
919
|
interface NavigateOptions {
|
|
920
920
|
/** Override the scroll behaviour for this single navigation (else the route/app default). */
|
|
921
921
|
scroll?: ScrollMode;
|
|
922
|
+
/**
|
|
923
|
+
* Replace the current history entry instead of adding one (`history.replaceState`), so Back
|
|
924
|
+
* skips the page navigated from; e.g. the same page in another language.
|
|
925
|
+
*/
|
|
926
|
+
replace?: boolean;
|
|
922
927
|
}
|
|
923
928
|
/** Payload map for the events `spa` emits, used to type the kernel's `emit` closure. */
|
|
924
929
|
type SpaEvents = {
|
|
@@ -4153,7 +4158,7 @@ declare const createApp: <const ExtraPlugins extends readonly import("@moku-labs
|
|
|
4153
4158
|
name: string;
|
|
4154
4159
|
el: Element;
|
|
4155
4160
|
};
|
|
4156
|
-
}> & Record<never, never>) | ExtraPlugins[number], [...ExtraPlugins], import("@moku-labs/core").CoreApisFromTuple<[import("@moku-labs/core").CorePluginInstance<"log", import("@moku-labs/common").LogConfig, import("@moku-labs/common").LogState, import("@moku-labs/common").LogApi>, import("@moku-labs/core").CorePluginInstance<"env", import("@moku-labs/common").EnvConfig, import("@moku-labs/common").EnvState, import("@moku-labs/common").EnvApi>]>> | undefined) => import("@moku-labs/core").App<Config$8, Events, (import("@moku-labs/core").PluginInstance<"site", Config$7, Record<string, never>, Api$7, {}> & Record<never, never>) | (import("@moku-labs/core").PluginInstance<"i18n", Config$6, Record<string, never>, Api$6, {}> & Record<never, never>) | (import("@moku-labs/core").PluginInstance<"router", RouterConfig, RouterState, RouterApi, {}> & {
|
|
4161
|
+
}> & Record<never, never>) | ExtraPlugins[number], [...ExtraPlugins], import("@moku-labs/core").CoreApisFromTuple<[import("@moku-labs/core").CorePluginInstance<"log", import("@moku-labs/common").LogConfig, import("@moku-labs/common").LogState, import("@moku-labs/common").LogApi>, import("@moku-labs/core").CorePluginInstance<"env", import("@moku-labs/common").EnvConfig, import("@moku-labs/common").EnvState, import("@moku-labs/common").EnvApi>]>, import("@moku-labs/core").CorePluginInstance<"log", import("@moku-labs/common").LogConfig, import("@moku-labs/common").LogState, import("@moku-labs/common").LogApi> | import("@moku-labs/core").CorePluginInstance<"env", import("@moku-labs/common").EnvConfig, import("@moku-labs/common").EnvState, import("@moku-labs/common").EnvApi>> | undefined) => import("@moku-labs/core").App<Config$8, Events, (import("@moku-labs/core").PluginInstance<"site", Config$7, Record<string, never>, Api$7, {}> & Record<never, never>) | (import("@moku-labs/core").PluginInstance<"i18n", Config$6, Record<string, never>, Api$6, {}> & Record<never, never>) | (import("@moku-labs/core").PluginInstance<"router", RouterConfig, RouterState, RouterApi, {}> & {
|
|
4157
4162
|
route: typeof route;
|
|
4158
4163
|
defineRoutes: typeof defineRoutes;
|
|
4159
4164
|
createUrls: typeof createUrls;
|
package/dist/index.mjs
CHANGED
|
@@ -11245,18 +11245,22 @@ function createSpaKernel(state, config, emit, deps) {
|
|
|
11245
11245
|
* navigation a second time. The current scroll is saved first so a later back restores it. It
|
|
11246
11246
|
* carries its own abort signal: any later navigation aborts it before it can swap.
|
|
11247
11247
|
*
|
|
11248
|
+
* `options.replace` swaps the current history entry (`replaceState`) instead of adding one.
|
|
11249
|
+
*
|
|
11248
11250
|
* @param path - The destination path (pathname + optional search).
|
|
11249
|
-
* @param
|
|
11251
|
+
* @param options - Optional per-call overrides: `scroll`, `replace`.
|
|
11250
11252
|
* @example
|
|
11251
|
-
* navigateProgrammatic("/board/abc/issue/1", "preserve");
|
|
11253
|
+
* navigateProgrammatic("/board/abc/issue/1", { scroll: "preserve" });
|
|
11252
11254
|
*/
|
|
11253
|
-
const navigateProgrammatic = (path,
|
|
11255
|
+
const navigateProgrammatic = (path, options = {}) => {
|
|
11254
11256
|
if (typeof document === "undefined") return;
|
|
11257
|
+
const { scroll, replace = false } = options;
|
|
11255
11258
|
if (path !== currentLocationUrl()) {
|
|
11256
11259
|
saveScrollPosition(currentLocationUrl());
|
|
11257
11260
|
pushingOwnUrl = true;
|
|
11258
11261
|
try {
|
|
11259
|
-
history.
|
|
11262
|
+
if (replace) history.replaceState({}, "", path);
|
|
11263
|
+
else history.pushState({}, "", path);
|
|
11260
11264
|
} finally {
|
|
11261
11265
|
pushingOwnUrl = false;
|
|
11262
11266
|
}
|
|
@@ -11279,7 +11283,7 @@ function createSpaKernel(state, config, emit, deps) {
|
|
|
11279
11283
|
for (const island of resolved.islands) registerIsland(state, island);
|
|
11280
11284
|
state.currentUrl = currentLocationUrl();
|
|
11281
11285
|
state.navigate = (path, options) => {
|
|
11282
|
-
navigateProgrammatic(path, options
|
|
11286
|
+
navigateProgrammatic(path, options);
|
|
11283
11287
|
};
|
|
11284
11288
|
},
|
|
11285
11289
|
/**
|
|
@@ -11314,16 +11318,16 @@ function createSpaKernel(state, config, emit, deps) {
|
|
|
11314
11318
|
registerIsland(state, island);
|
|
11315
11319
|
},
|
|
11316
11320
|
/**
|
|
11317
|
-
* Process a navigation to `path` (fetch then swap; full reload on error).
|
|
11318
|
-
*
|
|
11321
|
+
* Process a navigation to `path` (fetch then swap; full reload on error). Optional per-call
|
|
11322
|
+
* overrides: `scroll` for the swap's scroll intent, `replace` to replace the history entry.
|
|
11319
11323
|
*
|
|
11320
11324
|
* @param path - The target path to navigate to.
|
|
11321
|
-
* @param options - Optional per-navigation overrides (e.g. `{ scroll: "preserve" }`).
|
|
11325
|
+
* @param options - Optional per-navigation overrides (e.g. `{ scroll: "preserve", replace: true }`).
|
|
11322
11326
|
* @example
|
|
11323
11327
|
* kernel.processNav("/about");
|
|
11324
11328
|
*/
|
|
11325
11329
|
processNav(path, options) {
|
|
11326
|
-
navigateProgrammatic(path, options
|
|
11330
|
+
navigateProgrammatic(path, options);
|
|
11327
11331
|
},
|
|
11328
11332
|
/**
|
|
11329
11333
|
* Cross a boundary the SPA cannot swap (a different layout, the auth split) with a REAL
|
package/dist/testing.d.mts
CHANGED
|
@@ -13,6 +13,11 @@ type ScrollMode = "top" | "preserve";
|
|
|
13
13
|
interface NavigateOptions {
|
|
14
14
|
/** Override the scroll behaviour for this single navigation (else the route/app default). */
|
|
15
15
|
scroll?: ScrollMode;
|
|
16
|
+
/**
|
|
17
|
+
* Replace the current history entry instead of adding one (`history.replaceState`), so Back
|
|
18
|
+
* skips the page navigated from; e.g. the same page in another language.
|
|
19
|
+
*/
|
|
20
|
+
replace?: boolean;
|
|
16
21
|
}
|
|
17
22
|
/**
|
|
18
23
|
* What a island's `render` may return:
|
package/package.json
CHANGED
|
@@ -64,8 +64,6 @@
|
|
|
64
64
|
"bun": ">=1.3.14"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@moku-labs/common": "0.3.2",
|
|
68
|
-
"@moku-labs/core": "1.6.0",
|
|
69
67
|
"@resvg/resvg-js": "2.6.2",
|
|
70
68
|
"@shikijs/rehype": "3.22.0",
|
|
71
69
|
"feed": "5.2.0",
|
|
@@ -87,10 +85,30 @@
|
|
|
87
85
|
"unist-util-visit": "5.1.0"
|
|
88
86
|
},
|
|
89
87
|
"peerDependencies": {
|
|
88
|
+
"@moku-labs/common": "^0.3.4",
|
|
89
|
+
"@moku-labs/core": "^1.7.1",
|
|
90
90
|
"mermaid-isomorphic": "^3.0.0",
|
|
91
91
|
"preact": "^10.29.2",
|
|
92
92
|
"preact-render-to-string": "^6.6.0"
|
|
93
93
|
},
|
|
94
|
+
"scripts": {
|
|
95
|
+
"build": "tsdown",
|
|
96
|
+
"validate": "publint",
|
|
97
|
+
"check:bundle": "bun scripts/verify-browser-bundle.ts",
|
|
98
|
+
"lint": "biome check . && eslint .",
|
|
99
|
+
"lint:fix": "biome check --write . && eslint --fix .",
|
|
100
|
+
"format": "biome format --write .",
|
|
101
|
+
"test": "vitest run",
|
|
102
|
+
"test:unit": "vitest run --project unit",
|
|
103
|
+
"test:integration": "vitest run --project integration",
|
|
104
|
+
"test:cli-e2e": "bun test --timeout 30000 src/plugins/cli/__tests__/e2e/",
|
|
105
|
+
"test:build-e2e": "bun test src/plugins/build/__tests__/e2e/",
|
|
106
|
+
"test:coverage": "vitest run --project unit --project integration --coverage",
|
|
107
|
+
"typecheck": "tsc --noEmit",
|
|
108
|
+
"release:setup": "moku-release setup",
|
|
109
|
+
"release:doctor": "moku-release doctor",
|
|
110
|
+
"release": "moku-release"
|
|
111
|
+
},
|
|
94
112
|
"peerDependenciesMeta": {
|
|
95
113
|
"mermaid-isomorphic": {
|
|
96
114
|
"optional": true
|
|
@@ -99,6 +117,8 @@
|
|
|
99
117
|
"devDependencies": {
|
|
100
118
|
"@biomejs/biome": "2.4.16",
|
|
101
119
|
"@moku-labs/ci": "1.2.6",
|
|
120
|
+
"@moku-labs/common": "0.3.4",
|
|
121
|
+
"@moku-labs/core": "1.7.1",
|
|
102
122
|
"@types/bun": "1.3.14",
|
|
103
123
|
"@vitest/coverage-istanbul": "4.0.18",
|
|
104
124
|
"eslint": "9.39.3",
|
|
@@ -119,23 +139,5 @@
|
|
|
119
139
|
"typescript-eslint": "8.58.0",
|
|
120
140
|
"vitest": "4.0.18"
|
|
121
141
|
},
|
|
122
|
-
"
|
|
123
|
-
"build": "tsdown",
|
|
124
|
-
"validate": "publint",
|
|
125
|
-
"check:bundle": "bun scripts/verify-browser-bundle.ts",
|
|
126
|
-
"lint": "biome check . && eslint .",
|
|
127
|
-
"lint:fix": "biome check --write . && eslint --fix .",
|
|
128
|
-
"format": "biome format --write .",
|
|
129
|
-
"test": "vitest run",
|
|
130
|
-
"test:unit": "vitest run --project unit",
|
|
131
|
-
"test:integration": "vitest run --project integration",
|
|
132
|
-
"test:cli-e2e": "bun test --timeout 30000 src/plugins/cli/__tests__/e2e/",
|
|
133
|
-
"test:build-e2e": "bun test src/plugins/build/__tests__/e2e/",
|
|
134
|
-
"test:coverage": "vitest run --project unit --project integration --coverage",
|
|
135
|
-
"typecheck": "tsc --noEmit",
|
|
136
|
-
"release:setup": "moku-release setup",
|
|
137
|
-
"release:doctor": "moku-release doctor",
|
|
138
|
-
"release": "moku-release"
|
|
139
|
-
},
|
|
140
|
-
"version": "2.4.2"
|
|
142
|
+
"version": "2.4.4"
|
|
141
143
|
}
|