@ubean/vue 0.3.2 → 0.3.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/dist/index.d.ts +8 -0
- package/dist/index.js +15 -7
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,14 @@ declare function useViewTransitionState(name: string): Record<string, string>;
|
|
|
16
16
|
/**
|
|
17
17
|
* Injection keys (exported for advanced use cases — e.g. testing utilities
|
|
18
18
|
* that need to provide the page/transition context outside the plugin).
|
|
19
|
+
*
|
|
20
|
+
* `Symbol.for` is REQUIRED: in the ubean dev server `@ubean/vue` can be
|
|
21
|
+
* loaded twice (once through Node's ESM cache for the SSR app factory, once
|
|
22
|
+
* through Vite's transformed module graph for auto-imported components).
|
|
23
|
+
* Per-realm `Symbol()` keys would then differ across copies and break
|
|
24
|
+
* provide/inject silently (e.g. `<Link>` losing its i18n localizer →
|
|
25
|
+
* hydration href mismatch). Registered keys are shared globally, so every
|
|
26
|
+
* copy resolves to the same Symbol.
|
|
19
27
|
*/
|
|
20
28
|
declare const PAGE_KEY: unique symbol;
|
|
21
29
|
declare const TRANSITION_KEY: unique symbol;
|
package/dist/index.js
CHANGED
|
@@ -533,12 +533,20 @@ function useViewTransitionState(name) {
|
|
|
533
533
|
/**
|
|
534
534
|
* Injection keys (exported for advanced use cases — e.g. testing utilities
|
|
535
535
|
* that need to provide the page/transition context outside the plugin).
|
|
536
|
+
*
|
|
537
|
+
* `Symbol.for` is REQUIRED: in the ubean dev server `@ubean/vue` can be
|
|
538
|
+
* loaded twice (once through Node's ESM cache for the SSR app factory, once
|
|
539
|
+
* through Vite's transformed module graph for auto-imported components).
|
|
540
|
+
* Per-realm `Symbol()` keys would then differ across copies and break
|
|
541
|
+
* provide/inject silently (e.g. `<Link>` losing its i18n localizer →
|
|
542
|
+
* hydration href mismatch). Registered keys are shared globally, so every
|
|
543
|
+
* copy resolves to the same Symbol.
|
|
536
544
|
*/
|
|
537
|
-
const PAGE_KEY = Symbol("ubean-page");
|
|
538
|
-
const TRANSITION_KEY = Symbol("ubean-transition");
|
|
539
|
-
const SSR_KEY = Symbol("ubean-ssr");
|
|
540
|
-
const LOADING_KEY = Symbol("ubean-loading");
|
|
541
|
-
const ERROR_KEY = Symbol("ubean-error");
|
|
545
|
+
const PAGE_KEY = Symbol.for("ubean-page");
|
|
546
|
+
const TRANSITION_KEY = Symbol.for("ubean-transition");
|
|
547
|
+
const SSR_KEY = Symbol.for("ubean-ssr");
|
|
548
|
+
const LOADING_KEY = Symbol.for("ubean-loading");
|
|
549
|
+
const ERROR_KEY = Symbol.for("ubean-error");
|
|
542
550
|
/**
|
|
543
551
|
* Module-level reload placeholder — a single comment vnode reused across
|
|
544
552
|
* renders while `_reloadBlank` is active (see the KeepAlive slot in
|
|
@@ -552,8 +560,8 @@ let _warnedOutIn = false;
|
|
|
552
560
|
* (`@ubean/client`) provides the reactive `localizePath`; when absent,
|
|
553
561
|
* `Link` renders paths verbatim — this package never imports i18n itself.
|
|
554
562
|
*/
|
|
555
|
-
const LOCALIZE_PATH_KEY = Symbol("ubean-localize-path");
|
|
556
|
-
const LAYOUT_CHAIN_KEY = Symbol("ubean-layout-chain");
|
|
563
|
+
const LOCALIZE_PATH_KEY = Symbol.for("ubean-localize-path");
|
|
564
|
+
const LAYOUT_CHAIN_KEY = Symbol.for("ubean-layout-chain");
|
|
557
565
|
/**
|
|
558
566
|
* LayoutChainRenderer — recursively renders a chain of nested layout
|
|
559
567
|
* components (framework factories build the chain; lean SPAs may use it
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ubean/vue",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
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"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "^26.4.0",
|
|
36
|
-
"@ubean/markdown": "0.3.
|
|
36
|
+
"@ubean/markdown": "0.3.4",
|
|
37
37
|
"@unhead/vue": "^3.4.0",
|
|
38
38
|
"@vue/server-renderer": "^3.5.42",
|
|
39
39
|
"happy-dom": "^20.12.0",
|