@ethisyscore/plugin-ui 1.100.1 → 1.100.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/{activeNavHref-BkBjanre.d.cts → activeNavHref-BfoAQCGU.d.cts} +10 -2
- package/dist/{activeNavHref-cA3_ywRa.d.ts → activeNavHref-BrYVWRiO.d.ts} +10 -2
- package/dist/index.cjs +11 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/platform-react/index.cjs +11 -4
- package/dist/platform-react/index.cjs.map +1 -1
- package/dist/platform-react/index.d.cts +2 -2
- package/dist/platform-react/index.d.ts +2 -2
- package/dist/platform-react/index.js +11 -4
- package/dist/platform-react/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,8 +7,8 @@ import { T as ToolInvoker } from '../mcpService-4h3sKDpW.cjs';
|
|
|
7
7
|
export { B as BaseMcpService, n as notViaMcp, u as useToolInvoker, a as useToolInvokerMap } from '../mcpService-4h3sKDpW.cjs';
|
|
8
8
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
9
9
|
import { McpTransport, UploadDocumentResult } from '@ethisyscore/extension-runtime/plugin';
|
|
10
|
-
import { l as HostSidebarInput, p as HostSidebarHookInput } from '../activeNavHref-
|
|
11
|
-
export { H as HOST_CHROME_CONTRACT_VERSION, a as HostChromeDiagnostic, b as HostSidebarAction, c as HostSidebarActionDescriptor, d as HostSidebarActionSlot, e as HostSidebarActionVariant, f as HostSidebarActionsApi, g as HostSidebarActionsCapabilities, h as HostSidebarActionsContext, i as HostSidebarActionsPageProps, j as HostSidebarActiveNav, k as HostSidebarContribution, q as HostSidebarDerivedInput, m as HostSidebarNavItem, R as ResolveActiveNavHrefOptions, S as SIDEBAR_MODE, n as isHostChromeCompatible, r as reportHostChromeDiagnostic, o as resolveActiveNavHref, s as setHostChromeDiagnosticSink, u as useHostSidebarActions, w as withActiveNavHref } from '../activeNavHref-
|
|
10
|
+
import { l as HostSidebarInput, p as HostSidebarHookInput } from '../activeNavHref-BfoAQCGU.cjs';
|
|
11
|
+
export { H as HOST_CHROME_CONTRACT_VERSION, a as HostChromeDiagnostic, b as HostSidebarAction, c as HostSidebarActionDescriptor, d as HostSidebarActionSlot, e as HostSidebarActionVariant, f as HostSidebarActionsApi, g as HostSidebarActionsCapabilities, h as HostSidebarActionsContext, i as HostSidebarActionsPageProps, j as HostSidebarActiveNav, k as HostSidebarContribution, q as HostSidebarDerivedInput, m as HostSidebarNavItem, R as ResolveActiveNavHrefOptions, S as SIDEBAR_MODE, n as isHostChromeCompatible, r as reportHostChromeDiagnostic, o as resolveActiveNavHref, s as setHostChromeDiagnosticSink, u as useHostSidebarActions, w as withActiveNavHref } from '../activeNavHref-BfoAQCGU.cjs';
|
|
12
12
|
import { g as PluginDetailContext, H as HeaderMenuItem } from '../pageHeaderTypes-PWZpiwp6.cjs';
|
|
13
13
|
|
|
14
14
|
/** A view component resolved from the template manifest. Props are open. */
|
|
@@ -7,8 +7,8 @@ import { T as ToolInvoker } from '../mcpService-4h3sKDpW.js';
|
|
|
7
7
|
export { B as BaseMcpService, n as notViaMcp, u as useToolInvoker, a as useToolInvokerMap } from '../mcpService-4h3sKDpW.js';
|
|
8
8
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
9
9
|
import { McpTransport, UploadDocumentResult } from '@ethisyscore/extension-runtime/plugin';
|
|
10
|
-
import { l as HostSidebarInput, p as HostSidebarHookInput } from '../activeNavHref-
|
|
11
|
-
export { H as HOST_CHROME_CONTRACT_VERSION, a as HostChromeDiagnostic, b as HostSidebarAction, c as HostSidebarActionDescriptor, d as HostSidebarActionSlot, e as HostSidebarActionVariant, f as HostSidebarActionsApi, g as HostSidebarActionsCapabilities, h as HostSidebarActionsContext, i as HostSidebarActionsPageProps, j as HostSidebarActiveNav, k as HostSidebarContribution, q as HostSidebarDerivedInput, m as HostSidebarNavItem, R as ResolveActiveNavHrefOptions, S as SIDEBAR_MODE, n as isHostChromeCompatible, r as reportHostChromeDiagnostic, o as resolveActiveNavHref, s as setHostChromeDiagnosticSink, u as useHostSidebarActions, w as withActiveNavHref } from '../activeNavHref-
|
|
10
|
+
import { l as HostSidebarInput, p as HostSidebarHookInput } from '../activeNavHref-BrYVWRiO.js';
|
|
11
|
+
export { H as HOST_CHROME_CONTRACT_VERSION, a as HostChromeDiagnostic, b as HostSidebarAction, c as HostSidebarActionDescriptor, d as HostSidebarActionSlot, e as HostSidebarActionVariant, f as HostSidebarActionsApi, g as HostSidebarActionsCapabilities, h as HostSidebarActionsContext, i as HostSidebarActionsPageProps, j as HostSidebarActiveNav, k as HostSidebarContribution, q as HostSidebarDerivedInput, m as HostSidebarNavItem, R as ResolveActiveNavHrefOptions, S as SIDEBAR_MODE, n as isHostChromeCompatible, r as reportHostChromeDiagnostic, o as resolveActiveNavHref, s as setHostChromeDiagnosticSink, u as useHostSidebarActions, w as withActiveNavHref } from '../activeNavHref-BrYVWRiO.js';
|
|
12
12
|
import { g as PluginDetailContext, H as HeaderMenuItem } from '../pageHeaderTypes-PWZpiwp6.js';
|
|
13
13
|
|
|
14
14
|
/** A view component resolved from the template manifest. Props are open. */
|
|
@@ -867,10 +867,10 @@ function toContribution(input) {
|
|
|
867
867
|
...activeNav
|
|
868
868
|
};
|
|
869
869
|
}
|
|
870
|
-
function contributionKey(input) {
|
|
870
|
+
function contributionKey(input, hostToken) {
|
|
871
871
|
const activeNav = input.activeNavHref ?? "";
|
|
872
872
|
if (input.mode === SIDEBAR_MODE.none) {
|
|
873
|
-
return JSON.stringify([SIDEBAR_MODE.none, activeNav]);
|
|
873
|
+
return JSON.stringify(activeNav ? [SIDEBAR_MODE.none, activeNav, hostToken] : [SIDEBAR_MODE.none, activeNav]);
|
|
874
874
|
}
|
|
875
875
|
const actionTuple = (a) => [
|
|
876
876
|
a.id,
|
|
@@ -948,7 +948,13 @@ function useHostSidebarActions(input) {
|
|
|
948
948
|
unsub();
|
|
949
949
|
};
|
|
950
950
|
}, [compatible, pageId]);
|
|
951
|
-
const key = contributionKey(
|
|
951
|
+
const key = contributionKey(
|
|
952
|
+
resolved,
|
|
953
|
+
deriveHostEntityToken(
|
|
954
|
+
typeof window !== "undefined" ? window.location.pathname : "",
|
|
955
|
+
surfaceBase?.basePath
|
|
956
|
+
)
|
|
957
|
+
);
|
|
952
958
|
useEffect(() => {
|
|
953
959
|
if (!compatible) return;
|
|
954
960
|
compatible.publish(toContribution(resolved));
|
|
@@ -1123,11 +1129,12 @@ function matchRoute(pathname, sorted) {
|
|
|
1123
1129
|
}
|
|
1124
1130
|
|
|
1125
1131
|
// src/platform-react/activeNavHref.ts
|
|
1132
|
+
var MOUNT_BASE_PATTERN = /^(?:\/super-admin)?\/extensions\/[^/]+/;
|
|
1126
1133
|
function isConcrete(pattern) {
|
|
1127
1134
|
return !pattern.split("/").some((seg) => seg.startsWith(":"));
|
|
1128
1135
|
}
|
|
1129
1136
|
function resolveActiveNavHref(pathname, routeMeta, opts = {}) {
|
|
1130
|
-
const base = opts.basePath ??
|
|
1137
|
+
const base = opts.basePath ?? MOUNT_BASE_PATTERN.exec(pathname)?.[0];
|
|
1131
1138
|
if (!base) return void 0;
|
|
1132
1139
|
const mountBase = base.endsWith("/") ? base.slice(0, -1) : base;
|
|
1133
1140
|
const match = matchRoute(pathname, sortBySpecificity(routeMeta));
|