@ubean/vue 0.6.0 → 0.6.1-beta.2

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/generator.js CHANGED
@@ -171,6 +171,7 @@ ${views}
171
171
  const reuseRoutes = scan.pages.filter((p) => p.isReuse);
172
172
  const reuseKeys = reuseRoutes.length > 0 ? reuseRoutes.map((p) => `"${p.name}"`).join(" | ") : "never";
173
173
  return `${header}
174
+ import type { RouteRecordInfo, ParamValue, ParamValueZeroOrOne } from 'vue-router';
174
175
 
175
176
  declare module '@ubean/scan' {
176
177
  /**
@@ -216,8 +217,6 @@ ${pathMapEntries}
216
217
  }
217
218
 
218
219
  declare module 'vue-router/auto-routes' {
219
- import type { RouteRecordInfo, ParamValue, ParamValueZeroOrOne } from 'vue-router';
220
-
221
220
  /**
222
221
  * Route named map — enables typed \`useRoute<Name>(name)\` via vue-router's
223
222
  * \`TypesConfig\` augmentation below.
package/dist/index.d.ts CHANGED
@@ -496,7 +496,6 @@ export declare function initCachedViewsFromRoutes(routes: Array<{
496
496
  * rendered inside the wrapper. When the original changes (HMR in dev), the
497
497
  * wrapper is rebuilt so the new component takes effect.
498
498
  *
499
- * @internal — used by `createLayoutWrapper` in `app.ts`.
500
499
  */
501
500
  export declare function getNamedPageWrapper(routeName: string, original: Component): Component;
502
501
  /**
package/dist/index.js CHANGED
@@ -138,7 +138,6 @@ const _pendingReincludes = /* @__PURE__ */ new Set();
138
138
  * Restore cache declarations for pages whose cache was reset via
139
139
  * `resetRouteCache` once they are no longer the active page.
140
140
  *
141
- * @internal — called from `createUbeanRouter`'s `afterEach` hook.
142
141
  */
143
142
  function _flushPendingReincludes(currentPageName) {
144
143
  if (_pendingReincludes.size === 0) return;
@@ -207,7 +206,6 @@ function initCachedViewsFromRoutes(routes) {
207
206
  * rendered inside the wrapper. When the original changes (HMR in dev), the
208
207
  * wrapper is rebuilt so the new component takes effect.
209
208
  *
210
- * @internal — used by `createLayoutWrapper` in `app.ts`.
211
209
  */
212
210
  function getNamedPageWrapper(routeName, original) {
213
211
  const cached = _wrapperRegistry.get(routeName);
@@ -328,7 +326,6 @@ function getPageTransitionName() {
328
326
  * leave path, but if a stray re-render does, 'default' mode produces no
329
327
  * hollow placeholders).
330
328
  *
331
- * @internal — consumed by `components.ts` (same package).
332
329
  */
333
330
  const _reloading = _g.__ubeanReloading ??= ref(false);
334
331
  /**
@@ -336,7 +333,6 @@ const _reloading = _g.__ubeanReloading ??= ref(false);
336
333
  * renders a comment vnode instead of the page. Drives the reload sequence
337
334
  * in `_remountWithFreshCache`.
338
335
  *
339
- * @internal — consumed by `components.ts` (same package).
340
336
  */
341
337
  const _reloadBlank = _g.__ubeanReloadBlank ??= ref(false);
342
338
  /**
@@ -345,7 +341,6 @@ const _reloadBlank = _g.__ubeanReloadBlank ??= ref(false);
345
341
  * unrelated page's reload. (A global counter in the key would invalidate
346
342
  * every page's cache on any reload.)
347
343
  *
348
- * @internal — consumed by `components.ts` (same package).
349
344
  */
350
345
  const _pageReloadCounts = _g.__ubeanPageReloadCounts ??= reactive(/* @__PURE__ */ new Map());
351
346
  /**
package/dist/vite.js CHANGED
@@ -1019,13 +1019,15 @@ function generateTypedRouter(input, _moduleId = "virtual:ubean-vue-routes") {
1019
1019
  return `// Generated by @ubean/vue — do not edit.
1020
1020
  /* eslint-disable */
1021
1021
 
1022
+ // import type 必须在顶层:declare module 块内部的 import 触发 TS2667
1023
+ // (Imports are not permitted in module augmentations)。
1024
+ import type { RouteRecordInfo, ParamValue, ParamValueZeroOrOne } from 'vue-router';
1025
+
1022
1026
  // 本文件为 module(顶层 export)—— declare module 块按「模块增强」语义合并。
1023
1027
  // 虚拟模块 'virtual:ubean-vue-routes' 的环境声明在伴生文件 ubean-vue-routes.d.ts。
1024
1028
  export {};
1025
1029
 
1026
1030
  declare module 'vue-router/auto-routes' {
1027
- import type { RouteRecordInfo, ParamValue, ParamValueZeroOrOne } from 'vue-router';
1028
-
1029
1031
  export interface RouteNamedMap {
1030
1032
  ${pages.length > 0 ? pages.map((p) => ` "${p.name}": ${renderRouteRecordInfo(p)};`).join("\n") : " // (no pages scanned)"}
1031
1033
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubean/vue",
3
- "version": "0.6.0",
3
+ "version": "0.6.1-beta.2",
4
4
  "description": "Lean Vue client kernel & page-routing owner for ubean — plugin-first page routing outlet, page cache (keep-alive), transitions, reload signal, definePage macro + file-routing Vite plugin (/vite: multi-dir scan, reuse routes, markdown & page-head opt-in). Runtime deps: vue + vue-router only.",
5
5
  "files": [
6
6
  "dist"
@@ -29,17 +29,17 @@
29
29
  "tinyglobby": "^0.2.17",
30
30
  "ufo": "^1.6.4",
31
31
  "vue": "^3.5.43",
32
- "vue-router": "^5.3.1"
32
+ "vue-router": "^5.4.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/node": "^26.6.4",
36
- "@ubean/markdown": "0.6.0",
36
+ "@ubean/markdown": "0.6.1-beta.2",
37
37
  "@unhead/vue": "^3.4.2",
38
38
  "@vue/server-renderer": "^3.5.43",
39
- "happy-dom": "^20.14.5",
39
+ "happy-dom": "^20.14.6",
40
40
  "typescript": "npm:typescript-native-bridge@latest",
41
- "vite": "npm:@voidzero-dev/vite-plus-core@1.0.0",
42
- "vite-plus": "1.0.0",
41
+ "vite": "npm:@voidzero-dev/vite-plus-core@1.1.0",
42
+ "vite-plus": "1.1.0",
43
43
  "vitest": "5.0.3"
44
44
  },
45
45
  "peerDependencies": {