@zhin.js/console-contract 1.1.0 → 1.1.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/lib/page.js +1 -1
- package/package.json +2 -3
- package/src/page.ts +1 -1
package/lib/page.js
CHANGED
|
@@ -45,7 +45,7 @@ export function pageRoute(owner, root, localName) {
|
|
|
45
45
|
throw new Error(`Page owner ${owner} is outside Root ${root}`);
|
|
46
46
|
}
|
|
47
47
|
const relative = owner === root ? '' : owner.slice(root.length + 1);
|
|
48
|
-
// `pages/index.tsx` maps to the plugin path itself (e.g. sandbox → `/sandbox`),
|
|
48
|
+
// `pages/index/index.tsx` maps to the plugin path itself (e.g. sandbox → `/sandbox`),
|
|
49
49
|
// so demos can open the chat UI without the `/p-` leaf segment.
|
|
50
50
|
if (localName === 'index') {
|
|
51
51
|
return relative ? `/${relative}` : '/';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/console-contract",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Zero-dependency Page, Layout, route and navigation contracts for Zhin.js plugins",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./lib/index.d.ts",
|
|
11
|
-
"development": "./src/index.ts",
|
|
12
11
|
"import": "./lib/index.js"
|
|
13
12
|
}
|
|
14
13
|
},
|
|
@@ -30,7 +29,7 @@
|
|
|
30
29
|
"registry": "https://registry.npmjs.org"
|
|
31
30
|
},
|
|
32
31
|
"engines": {
|
|
33
|
-
"node": "
|
|
32
|
+
"node": ">=22.19.0"
|
|
34
33
|
},
|
|
35
34
|
"license": "MIT",
|
|
36
35
|
"scripts": {
|
package/src/page.ts
CHANGED
|
@@ -87,7 +87,7 @@ export function pageRoute(owner: string, root: string, localName: string): strin
|
|
|
87
87
|
throw new Error(`Page owner ${owner} is outside Root ${root}`);
|
|
88
88
|
}
|
|
89
89
|
const relative = owner === root ? '' : owner.slice(root.length + 1);
|
|
90
|
-
// `pages/index.tsx` maps to the plugin path itself (e.g. sandbox → `/sandbox`),
|
|
90
|
+
// `pages/index/index.tsx` maps to the plugin path itself (e.g. sandbox → `/sandbox`),
|
|
91
91
|
// so demos can open the chat UI without the `/p-` leaf segment.
|
|
92
92
|
if (localName === 'index') {
|
|
93
93
|
return relative ? `/${relative}` : '/';
|