@ethisyscore/plugin-ui 1.16.0 → 1.18.0

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.
Files changed (37) hide show
  1. package/dist/components/layout/index.cjs +130 -0
  2. package/dist/components/layout/index.cjs.map +1 -0
  3. package/dist/components/layout/index.d.cts +48 -0
  4. package/dist/components/layout/index.d.ts +48 -0
  5. package/dist/components/layout/index.js +127 -0
  6. package/dist/components/layout/index.js.map +1 -0
  7. package/dist/components/shared/index.cjs +222 -0
  8. package/dist/components/shared/index.cjs.map +1 -0
  9. package/dist/components/shared/index.d.cts +88 -0
  10. package/dist/components/shared/index.d.ts +88 -0
  11. package/dist/components/shared/index.js +215 -0
  12. package/dist/components/shared/index.js.map +1 -0
  13. package/dist/components/ui/index.cjs +229 -0
  14. package/dist/components/ui/index.cjs.map +1 -0
  15. package/dist/components/ui/index.d.cts +13 -0
  16. package/dist/components/ui/index.d.ts +13 -0
  17. package/dist/components/ui/index.js +12 -0
  18. package/dist/components/ui/index.js.map +1 -0
  19. package/dist/icons/index.cjs +43589 -0
  20. package/dist/icons/index.cjs.map +1 -0
  21. package/dist/icons/index.d.cts +1427 -0
  22. package/dist/icons/index.d.ts +1427 -0
  23. package/dist/icons/index.js +43115 -0
  24. package/dist/icons/index.js.map +1 -0
  25. package/dist/platform-react/index.cjs +246 -0
  26. package/dist/platform-react/index.cjs.map +1 -0
  27. package/dist/platform-react/index.d.cts +740 -0
  28. package/dist/platform-react/index.d.ts +740 -0
  29. package/dist/platform-react/index.js +229 -0
  30. package/dist/platform-react/index.js.map +1 -0
  31. package/dist/types/index.cjs +4 -0
  32. package/dist/types/index.cjs.map +1 -0
  33. package/dist/types/index.d.cts +53 -0
  34. package/dist/types/index.d.ts +53 -0
  35. package/dist/types/index.js +3 -0
  36. package/dist/types/index.js.map +1 -0
  37. package/package.json +45 -1
@@ -0,0 +1,229 @@
1
+ import { createContext, useEffect, createElement, useContext, useMemo } from 'react';
2
+ import { QueryClient, useQuery, useQueries, QueryClientProvider } from '@tanstack/react-query';
3
+ import { definePlatformReactPage, emitNavigation } from '@ethisyscore/components-react';
4
+ import { useMcpTool } from '@ethisyscore/extension-runtime/plugin';
5
+
6
+ // src/platform-react/definePlatformReactPluginPage.tsx
7
+ var TemplateContext = createContext(null);
8
+ function injectPluginStyles(id, css) {
9
+ if (typeof document === "undefined") return;
10
+ if (document.getElementById(id)) return;
11
+ const el = document.createElement("style");
12
+ el.id = id;
13
+ el.textContent = css;
14
+ document.head.appendChild(el);
15
+ }
16
+ function PluginStyleScope({ id, css }) {
17
+ useEffect(() => {
18
+ injectPluginStyles(id, css);
19
+ }, [id, css]);
20
+ return null;
21
+ }
22
+
23
+ // src/platform-react/definePlatformReactPluginPage.tsx
24
+ function makeDefaultQueryClient() {
25
+ return new QueryClient({
26
+ defaultOptions: {
27
+ queries: {
28
+ retry: 1,
29
+ refetchOnWindowFocus: false,
30
+ staleTime: 3e4
31
+ }
32
+ }
33
+ });
34
+ }
35
+ var defaultQueryClient = makeDefaultQueryClient();
36
+ function definePlatformReactPluginPage(Page, options) {
37
+ const {
38
+ manifest = {},
39
+ rootClassName,
40
+ styleId,
41
+ css,
42
+ queryClient = defaultQueryClient
43
+ } = options;
44
+ function PluginPage(props) {
45
+ return createElement(
46
+ QueryClientProvider,
47
+ { client: queryClient },
48
+ createElement(
49
+ TemplateContext.Provider,
50
+ { value: manifest },
51
+ createElement(PluginStyleScope, { id: styleId, css }),
52
+ createElement("div", { className: rootClassName }, createElement(Page, props))
53
+ )
54
+ );
55
+ }
56
+ return definePlatformReactPage(PluginPage);
57
+ }
58
+ function createPluginPageDefiner(config) {
59
+ const { module, ...rest } = config;
60
+ return function definePluginPage(Page, views = {}) {
61
+ return definePlatformReactPluginPage(Page, { ...rest, manifest: { [module]: views } });
62
+ };
63
+ }
64
+ var MissingViewFallback = () => createElement(
65
+ "div",
66
+ {
67
+ style: {
68
+ display: "flex",
69
+ alignItems: "center",
70
+ justifyContent: "center",
71
+ padding: "2rem"
72
+ }
73
+ },
74
+ createElement(
75
+ "div",
76
+ {
77
+ style: {
78
+ maxWidth: "28rem",
79
+ padding: "1.5rem",
80
+ border: "1px solid rgba(0,0,0,0.12)",
81
+ borderRadius: "0.5rem",
82
+ textAlign: "center"
83
+ }
84
+ },
85
+ createElement("p", { style: { margin: "0 0 0.5rem", fontWeight: 600 } }, "View not available"),
86
+ createElement(
87
+ "p",
88
+ { style: { margin: 0, opacity: 0.7, fontSize: "0.875rem" } },
89
+ "This view has not been implemented by the current template."
90
+ )
91
+ )
92
+ );
93
+
94
+ // src/platform-react/useView.ts
95
+ var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
96
+ function isComponent(value) {
97
+ if (typeof value === "function") return true;
98
+ if (typeof value === "object" && value !== null) {
99
+ return value.$$typeof === REACT_LAZY_TYPE;
100
+ }
101
+ return false;
102
+ }
103
+ function createUseView(fallback) {
104
+ return function useView2(module, viewName) {
105
+ const manifest = useContext(TemplateContext);
106
+ if (!manifest) {
107
+ return fallback;
108
+ }
109
+ const slice = manifest[module];
110
+ if (slice && typeof slice === "object" && viewName in slice) {
111
+ const component = slice[viewName];
112
+ if (isComponent(component)) {
113
+ return component;
114
+ }
115
+ }
116
+ return fallback;
117
+ };
118
+ }
119
+ var useView = createUseView(MissingViewFallback);
120
+ var BaseMcpService = class {
121
+ constructor(invoker) {
122
+ this.invoker = invoker;
123
+ }
124
+ invoker;
125
+ async tool(name, args = {}) {
126
+ return await this.invoker(name, args);
127
+ }
128
+ };
129
+ function notViaMcp(serviceName, method) {
130
+ throw new Error(`${serviceName}.${method} has no MCP tool \u2014 pending per-surface aggregation.`);
131
+ }
132
+ function useToolInvoker(toolName) {
133
+ return useMcpTool(toolName).invoke;
134
+ }
135
+ function useToolInvokerMap(tools) {
136
+ const invokers = {};
137
+ for (const name of tools) {
138
+ invokers[name] = useMcpTool(name).invoke;
139
+ }
140
+ return useMemo(
141
+ () => (name, args) => {
142
+ const fn = invokers[name];
143
+ if (!fn) {
144
+ throw new Error(`No MCP invoker registered for tool "${name}"`);
145
+ }
146
+ return fn(args);
147
+ },
148
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- per-tool invoke refs are stable; rebuild only if one changes.
149
+ tools.map((t) => invokers[t])
150
+ );
151
+ }
152
+ function useAuthenticatedQuery(options) {
153
+ const result = useQuery(options);
154
+ return {
155
+ ...result,
156
+ isLoading: result.isLoading,
157
+ isAuthLoading: false
158
+ };
159
+ }
160
+ function useAuthenticatedQueries(queries) {
161
+ return useQueries({ queries });
162
+ }
163
+ function createReactRouterShim(options = {}) {
164
+ const paramKeys = options.paramKeys ?? ["id"];
165
+ function useNavigate() {
166
+ return (to) => {
167
+ if (typeof to === "number") {
168
+ if (typeof window !== "undefined") window.history.go(to);
169
+ return;
170
+ }
171
+ emitNavigation(to);
172
+ };
173
+ }
174
+ function useParams() {
175
+ const path = typeof window !== "undefined" ? window.location.pathname : "";
176
+ const segments = path.split("/").filter(Boolean);
177
+ const last = segments[segments.length - 1];
178
+ const params = {};
179
+ if (last) {
180
+ for (const key of paramKeys) {
181
+ params[key] = last;
182
+ }
183
+ }
184
+ return params;
185
+ }
186
+ function useSearchParams() {
187
+ const search = typeof window !== "undefined" ? window.location.search : "";
188
+ const params = new URLSearchParams(search);
189
+ const setSearchParams = (next) => {
190
+ const usp = next instanceof URLSearchParams ? next : new URLSearchParams(next);
191
+ const qs = usp.toString();
192
+ if (typeof window !== "undefined") {
193
+ window.history.replaceState(
194
+ {},
195
+ "",
196
+ qs ? `${window.location.pathname}?${qs}` : window.location.pathname
197
+ );
198
+ }
199
+ };
200
+ return [params, setSearchParams];
201
+ }
202
+ function useMatch(_pattern) {
203
+ return null;
204
+ }
205
+ function useLocation() {
206
+ const path = typeof window !== "undefined" ? window.location.pathname : "/";
207
+ return { pathname: path, search: "", hash: "", state: null, key: "default" };
208
+ }
209
+ function Link({ to, children, onClick, ...rest }) {
210
+ return createElement(
211
+ "a",
212
+ {
213
+ href: to,
214
+ onClick: (e) => {
215
+ e.preventDefault();
216
+ onClick?.(e);
217
+ emitNavigation(to);
218
+ },
219
+ ...rest
220
+ },
221
+ children
222
+ );
223
+ }
224
+ return { useNavigate, useParams, useSearchParams, useMatch, useLocation, Link, NavLink: Link };
225
+ }
226
+
227
+ export { BaseMcpService, MissingViewFallback, PluginStyleScope, TemplateContext, createPluginPageDefiner, createReactRouterShim, createUseView, definePlatformReactPluginPage, injectPluginStyles, isComponent, notViaMcp, useAuthenticatedQueries, useAuthenticatedQuery, useToolInvoker, useToolInvokerMap, useView };
228
+ //# sourceMappingURL=index.js.map
229
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/platform-react/templateContext.ts","../../src/platform-react/injectStyles.ts","../../src/platform-react/definePlatformReactPluginPage.tsx","../../src/platform-react/MissingViewFallback.tsx","../../src/platform-react/useView.ts","../../src/platform-react/mcpService.ts","../../src/platform-react/useAuthenticatedQuery.ts","../../src/platform-react/reactRouterShim.tsx"],"names":["createElement","useView"],"mappings":";;;;;;AAeO,IAAM,eAAA,GAAkB,cAAuC,IAAI;ACJnE,SAAS,kBAAA,CAAmB,IAAY,GAAA,EAAmB;AAChE,EAAA,IAAI,OAAO,aAAa,WAAA,EAAa;AACrC,EAAA,IAAI,QAAA,CAAS,cAAA,CAAe,EAAE,CAAA,EAAG;AACjC,EAAA,MAAM,EAAA,GAAK,QAAA,CAAS,aAAA,CAAc,OAAO,CAAA;AACzC,EAAA,EAAA,CAAG,EAAA,GAAK,EAAA;AACR,EAAA,EAAA,CAAG,WAAA,GAAc,GAAA;AACjB,EAAA,QAAA,CAAS,IAAA,CAAK,YAAY,EAAE,CAAA;AAC9B;AAGO,SAAS,gBAAA,CAAiB,EAAE,EAAA,EAAI,GAAA,EAAI,EAAsC;AAC/E,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,kBAAA,CAAmB,IAAI,GAAG,CAAA;AAAA,EAC5B,CAAA,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QAAA,GAAW,GAAA;AACxE,IAAA,OAAO,EAAE,QAAA,EAAU,IAAA,EAAM,MAAA,EAAQ,EAAA,EAAI,MAAM,EAAA,EAAI,KAAA,EAAO,IAAA,EAAM,GAAA,EAAK,SAAA,EAAU;AAAA,EAC7E;AAEA,EAAA,SAAS,KAAK,EAAE,EAAA,EAAI,UAAU,OAAA,EAAS,GAAG,MAAK,EAAc;AAC3D,IAAA,OAAOD,aAAAA;AAAA,MACL,GAAA;AAAA,MACA;AAAA,QACE,IAAA,EAAM,EAAA;AAAA,QACN,OAAA,EAAS,CAAC,CAAA,KAAqC;AAC7C,UAAA,CAAA,CAAE,cAAA,EAAe;AACjB,UAAA,OAAA,GAAU,CAAC,CAAA;AACX,UAAA,cAAA,CAAe,EAAE,CAAA;AAAA,QACnB,CAAA;AAAA,QACA,GAAG;AAAA,OACL;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAEA,EAAA,OAAO,EAAE,aAAa,SAAA,EAAW,eAAA,EAAiB,UAAU,WAAA,EAAa,IAAA,EAAM,SAAS,IAAA,EAAK;AAC/F","file":"index.js","sourcesContent":["import { createContext, type ComponentType } from \"react\";\n\n/** A view component resolved from the template manifest. Props are open. */\nexport type ViewComponent = ComponentType<Record<string, unknown>>;\n\n/**\n * Static port of the monolith's gogo-ui adapter mechanism for PlatformReact.\n *\n * A monolith feature picks its adapter view at runtime via `import.meta.glob`;\n * a PlatformReact page is a single self-contained ESM bundle where that glob is\n * unavailable, so each page declares its view slice statically and provides it\n * through this context. The shape is `manifest[module][viewName] = Component`.\n */\nexport type TemplateManifest = Record<string, Partial<Record<string, ViewComponent>>>;\n\nexport const TemplateContext = createContext<TemplateManifest | null>(null);\n","import { useEffect } from \"react\";\n\n/**\n * Injects a plugin's compiled CSS into the host document once, keyed by a\n * stable element id (idempotent across pages and re-mounts).\n *\n * Each PlatformReact page is a separate ESM bundle with no companion CSS asset\n * the host would load, so the styles travel inside the bundle (typically via a\n * `*.css?inline` import) and are mounted at runtime. Scope the CSS to a plugin\n * root class (never `:root`) so it cannot override the host theme.\n */\nexport function injectPluginStyles(id: string, css: string): void {\n if (typeof document === \"undefined\") return;\n if (document.getElementById(id)) return;\n const el = document.createElement(\"style\");\n el.id = id;\n el.textContent = css;\n document.head.appendChild(el);\n}\n\n/** Component form of {@link injectPluginStyles}; renders nothing. */\nexport function PluginStyleScope({ id, css }: { id: string; css: string }): null {\n useEffect(() => {\n injectPluginStyles(id, css);\n }, [id, css]);\n return null;\n}\n","import { createElement, type ComponentType } from \"react\";\nimport { QueryClient, QueryClientProvider } from \"@tanstack/react-query\";\nimport {\n definePlatformReactPage,\n type PlatformReactPageProps,\n} from \"@ethisyscore/components-react\";\nimport { TemplateContext, type TemplateManifest, type ViewComponent } from \"./templateContext\";\nimport { PluginStyleScope } from \"./injectStyles\";\n\n/**\n * Default per-page `QueryClient`. Each PlatformReact page is an isolated ESM\n * bundle, so this module-level singleton is scoped to that page — exactly the\n * lifetime a page wants. Plugins needing different options pass their own.\n */\nfunction makeDefaultQueryClient(): QueryClient {\n return new QueryClient({\n defaultOptions: {\n queries: {\n retry: 1,\n refetchOnWindowFocus: false,\n staleTime: 30_000,\n },\n },\n });\n}\n\nconst defaultQueryClient = makeDefaultQueryClient();\n\nexport interface DefinePlatformReactPluginPageOptions {\n /** The page's static `useView` manifest slice (no `import.meta.glob` in a single-file bundle). */\n manifest?: TemplateManifest;\n /** Scoped style-root class wrapped around the page (e.g. `ethisys-<plugin>-root`). */\n rootClassName: string;\n /** Stable id for the injected `<style>` element (idempotent across pages). */\n styleId: string;\n /** The plugin's compiled CSS string (typically a `*.css?inline` import). */\n css: string;\n /** Override the per-page `QueryClient`. */\n queryClient?: QueryClient;\n}\n\n/**\n * Wraps a lifted page as a PlatformReact entry with the providers the monolith\n * took for granted: react-query, the static `useView` manifest, and the scoped\n * style root. The host already provides the MCP transport (it mounts pages\n * inside its own runtime provider), so this adds only the in-page providers.\n */\nexport function definePlatformReactPluginPage(\n Page: ComponentType<PlatformReactPageProps>,\n options: DefinePlatformReactPluginPageOptions,\n): ComponentType<PlatformReactPageProps> {\n const {\n manifest = {},\n rootClassName,\n styleId,\n css,\n queryClient = defaultQueryClient,\n } = options;\n\n function PluginPage(props: PlatformReactPageProps) {\n return createElement(\n QueryClientProvider,\n { client: queryClient },\n createElement(\n TemplateContext.Provider,\n { value: manifest },\n createElement(PluginStyleScope, { id: styleId, css }),\n createElement(\"div\", { className: rootClassName }, createElement(Page, props)),\n ),\n );\n }\n\n return definePlatformReactPage(PluginPage);\n}\n\nexport interface PluginPageDefinerConfig {\n /**\n * The plugin's `useView` module key (e.g. `\"timesheets\"`). Each page's `views`\n * are registered under it, so a page's `useView(module, name)` resolves them.\n */\n module: string;\n /** Scoped style-root class wrapped around every page (e.g. `ethisys-<plugin>-root`). */\n rootClassName: string;\n /** Stable id for the injected `<style>` element. */\n styleId: string;\n /** The plugin's compiled CSS string (typically a `*.css?inline` import). */\n css: string;\n /** Override the per-page `QueryClient`. */\n queryClient?: QueryClient;\n}\n\n/**\n * Builds a plugin-bound `definePluginPage(Page, views)` from one config, so a\n * plugin writes the four plugin-specific values (module key, root class, style\n * id, CSS) ONCE instead of in every page entry. Each surface entry then calls\n * `definePluginPage(Page, { ViewName })`; the flat `views` map is wrapped into\n * the `{ [module]: views }` manifest slice the page's `useView(module, name)`\n * reads. The generic provider/manifest/style wrapping stays in\n * {@link definePlatformReactPluginPage}.\n */\nexport function createPluginPageDefiner(config: PluginPageDefinerConfig) {\n const { module, ...rest } = config;\n return function definePluginPage(\n Page: ComponentType<PlatformReactPageProps>,\n views: Record<string, ViewComponent> = {},\n ): ComponentType<PlatformReactPageProps> {\n return definePlatformReactPluginPage(Page, { ...rest, manifest: { [module]: views } });\n };\n}\n","import { createElement, type ComponentType } from \"react\";\n\n/**\n * Dependency-light fallback rendered when a view is not present in the current\n * template manifest. Kept to plain elements + inline styles so the foundation\n * package carries no UI-library dependency; plugins that want a branded\n * fallback pass their own via {@link createUseView}.\n */\nexport const MissingViewFallback: ComponentType<Record<string, unknown>> = () =>\n createElement(\n \"div\",\n {\n style: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n padding: \"2rem\",\n },\n },\n createElement(\n \"div\",\n {\n style: {\n maxWidth: \"28rem\",\n padding: \"1.5rem\",\n border: \"1px solid rgba(0,0,0,0.12)\",\n borderRadius: \"0.5rem\",\n textAlign: \"center\",\n },\n },\n createElement(\"p\", { style: { margin: \"0 0 0.5rem\", fontWeight: 600 } }, \"View not available\"),\n createElement(\n \"p\",\n { style: { margin: 0, opacity: 0.7, fontSize: \"0.875rem\" } },\n \"This view has not been implemented by the current template.\",\n ),\n ),\n );\n","import { useContext, type ComponentType } from \"react\";\nimport { TemplateContext } from \"./templateContext\";\nimport { MissingViewFallback } from \"./MissingViewFallback\";\n\nconst REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\n\n/** Matches regular function components and `React.lazy` wrappers. */\nexport function isComponent(value: unknown): value is ComponentType {\n if (typeof value === \"function\") return true;\n if (typeof value === \"object\" && value !== null) {\n return (value as Record<string, unknown>).$$typeof === REACT_LAZY_TYPE;\n }\n return false;\n}\n\n/**\n * Builds a `useView` hook bound to a fallback component. The hook is a safe\n * view accessor that never throws: it returns `manifest[module][viewName]` when\n * present, or the supplied fallback when the manifest, module slice, or view is\n * missing or is not a component.\n */\nexport function createUseView(fallback: ComponentType<Record<string, unknown>>) {\n return function useView(\n module: string,\n viewName: string,\n ): ComponentType<Record<string, unknown>> {\n const manifest = useContext(TemplateContext);\n if (!manifest) {\n return fallback;\n }\n\n const slice = manifest[module];\n if (slice && typeof slice === \"object\" && viewName in (slice as Record<string, unknown>)) {\n const component = (slice as Record<string, unknown>)[viewName];\n if (isComponent(component)) {\n return component as ComponentType<Record<string, unknown>>;\n }\n }\n\n return fallback;\n };\n}\n\n/** Default `useView` bound to the built-in {@link MissingViewFallback}. */\nexport const useView = createUseView(MissingViewFallback);\n","import { useMemo } from \"react\";\nimport { useMcpTool } from \"@ethisyscore/extension-runtime/plugin\";\n\n/** Dispatches an MCP tool call by name. The seam a lifted REST service binds to. */\nexport type ToolInvoker = (toolName: string, args: unknown) => Promise<unknown>;\n\n/**\n * Base for service classes lifted from a monolith REST plane onto MCP.\n *\n * The monolith versions extend a REST base (`this.get`/`this.post` over axios).\n * The plugin runtime exposes no imperative MCP transport — only the\n * `useMcpTool` hook — so a `useXService()` hook composes per-tool invokers (see\n * {@link useToolInvokerMap}) into a single {@link ToolInvoker} and constructs\n * the class with it. Method bodies call `this.tool(\"<tool-name>\", args)`.\n */\nexport abstract class BaseMcpService {\n constructor(private readonly invoker: ToolInvoker) {}\n\n protected async tool<TRes>(name: string, args: unknown = {}): Promise<TRes> {\n return (await this.invoker(name, args)) as TRes;\n }\n}\n\n/**\n * Thrown by a lifted service method whose monolith REST route has no MCP tool\n * yet (typically because it needs client-side aggregation over a coarser tool).\n */\nexport function notViaMcp(serviceName: string, method: string): never {\n throw new Error(`${serviceName}.${method} has no MCP tool — pending per-surface aggregation.`);\n}\n\n/** Imperative invoker for a single MCP tool (the hook's `.invoke`, stable across renders). */\nexport function useToolInvoker<TReq, TRes>(toolName: string): (req: TReq) => Promise<TRes> {\n return useMcpTool<TReq, TRes>(toolName).invoke;\n}\n\n/**\n * Composes one {@link ToolInvoker} dispatching over every tool in `tools`, so a\n * service class can call tools by name.\n *\n * Rules of hooks: `tools` MUST be a frozen, constant-length list (e.g. a\n * module-level `as const` array) so the per-tool `useMcpTool` calls run in a\n * stable order on every render. Passing a list whose length varies between\n * renders is a violation and will break.\n */\nexport function useToolInvokerMap(tools: readonly string[]): ToolInvoker {\n const invokers: Record<string, (args: unknown) => Promise<unknown>> = {};\n for (const name of tools) {\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `tools` is required to be frozen; call order is stable.\n invokers[name] = useMcpTool(name).invoke;\n }\n return useMemo<ToolInvoker>(\n () => (name, args) => {\n const fn = invokers[name];\n if (!fn) {\n throw new Error(`No MCP invoker registered for tool \"${name}\"`);\n }\n return fn(args);\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps -- per-tool invoke refs are stable; rebuild only if one changes.\n tools.map((t) => invokers[t]),\n );\n}\n","import {\n useQueries,\n useQuery,\n type QueryKey,\n type UseQueryOptions,\n type UseQueryResult,\n} from \"@tanstack/react-query\";\n\n/**\n * Plugin shim for the monolith's `useAuthenticatedQuery`.\n *\n * In the host realm the MCP transport is already authenticated and scoped to\n * the active organisation, so there is no auth gate to apply. The hook keeps\n * the monolith's return shape (`isLoading` + `isAuthLoading`) so lifted data\n * hooks and pages consume it unchanged — `isAuthLoading` is always `false`.\n */\nexport interface AuthenticatedQueryResult<TData, TError>\n extends Omit<UseQueryResult<TData, TError>, \"isLoading\"> {\n isLoading: boolean;\n isAuthLoading: boolean;\n}\n\nexport function useAuthenticatedQuery<\n TQueryFnData = unknown,\n TError = Error,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n): AuthenticatedQueryResult<TData, TError> {\n const result = useQuery(options);\n return {\n ...result,\n isLoading: result.isLoading,\n isAuthLoading: false,\n };\n}\n\nexport function useAuthenticatedQueries<TQueryFnData = unknown, TError = Error>(\n queries: UseQueryOptions<TQueryFnData, TError>[],\n) {\n return useQueries({ queries });\n}\n","import { createElement, type AnchorHTMLAttributes, type MouseEvent, type ReactNode } from \"react\";\nimport { emitNavigation } from \"@ethisyscore/components-react\";\n\n/**\n * Minimal `react-router-dom` compatibility shim for lifted monolith code.\n *\n * A PlatformReact plugin has no client router — navigation is brokered to the\n * host via {@link emitNavigation}, and route params come from the surface URL's\n * trailing segment(s). {@link createReactRouterShim} returns a module-shaped\n * object of the hooks/components lifted code expects; alias `react-router-dom`\n * to a tiny file that re-exports this object's members so call sites resolve\n * unchanged.\n *\n * `paramKeys` names the keys the single trailing path segment is exposed under,\n * so a route like `/…/<page>/<value>` satisfies `useParams<{ id }>()` /\n * `useParams<{ date }>()` regardless of which key the lifted code destructures.\n */\nexport interface ReactRouterShimOptions {\n /** Keys the trailing path segment is exposed under (default: `[\"id\"]`). */\n paramKeys?: readonly string[];\n}\n\ntype LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {\n to: string;\n children?: ReactNode;\n};\n\nexport function createReactRouterShim(options: ReactRouterShimOptions = {}) {\n const paramKeys = options.paramKeys ?? [\"id\"];\n\n function useNavigate(): (to: string | number) => void {\n return (to) => {\n if (typeof to === \"number\") {\n if (typeof window !== \"undefined\") window.history.go(to);\n return;\n }\n emitNavigation(to);\n };\n }\n\n function useParams<\n T extends Record<string, string | undefined> = Record<string, string | undefined>,\n >(): T {\n const path = typeof window !== \"undefined\" ? window.location.pathname : \"\";\n const segments = path.split(\"/\").filter(Boolean);\n const last = segments[segments.length - 1];\n const params: Record<string, string | undefined> = {};\n if (last) {\n for (const key of paramKeys) {\n params[key] = last;\n }\n }\n return params as T;\n }\n\n function useSearchParams(): [\n URLSearchParams,\n (next: URLSearchParams | Record<string, string>) => void,\n ] {\n const search = typeof window !== \"undefined\" ? window.location.search : \"\";\n const params = new URLSearchParams(search);\n const setSearchParams = (next: URLSearchParams | Record<string, string>) => {\n const usp = next instanceof URLSearchParams ? next : new URLSearchParams(next);\n const qs = usp.toString();\n if (typeof window !== \"undefined\") {\n window.history.replaceState(\n {},\n \"\",\n qs ? `${window.location.pathname}?${qs}` : window.location.pathname,\n );\n }\n };\n return [params, setSearchParams];\n }\n\n function useMatch(\n _pattern: string,\n ): { params: Record<string, string | undefined>; pathname: string } | null {\n return null;\n }\n\n function useLocation() {\n const path = typeof window !== \"undefined\" ? window.location.pathname : \"/\";\n return { pathname: path, search: \"\", hash: \"\", state: null, key: \"default\" };\n }\n\n function Link({ to, children, onClick, ...rest }: LinkProps) {\n return createElement(\n \"a\",\n {\n href: to,\n onClick: (e: MouseEvent<HTMLAnchorElement>) => {\n e.preventDefault();\n onClick?.(e);\n emitNavigation(to);\n },\n ...rest,\n },\n children,\n );\n }\n\n return { useNavigate, useParams, useSearchParams, useMatch, useLocation, Link, NavLink: Link };\n}\n"]}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=index.cjs.map
4
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * `@ethisyscore/plugin-ui/types` — generic base DTO/query types a lifted monolith
3
+ * feature shares (audit stamps, optimistic-concurrency row version, branded GUID,
4
+ * paging). Pure types — zero runtime — so a plugin's lifted `types/core.ts` becomes a
5
+ * one-line `export type * from "@ethisyscore/plugin-ui/types"` with no imports to change.
6
+ */
7
+ /**
8
+ * A branded GUID string. The `__brand` doesn't exist at runtime; it forces TS to
9
+ * treat this as distinct from a plain string.
10
+ */
11
+ type Guid = string & {
12
+ readonly __brand: unique symbol;
13
+ };
14
+ /** Items that carry audit stamps (names + timestamps). */
15
+ interface Auditable {
16
+ /** Name of who created this item. */
17
+ createdByName?: string;
18
+ /** When the item was created. */
19
+ createdUtc?: string;
20
+ /** Name of who last updated this item. */
21
+ lastUpdatedByName?: string;
22
+ /** When the item was last updated. */
23
+ lastUpdatedUtc?: string;
24
+ }
25
+ /** {@link Auditable} plus the actor ids. */
26
+ interface AuditableDetailed extends Auditable {
27
+ /** Id of who created this item. */
28
+ createdBy?: Guid;
29
+ /** Id of who last updated this item. */
30
+ lastUpdatedBy?: Guid;
31
+ }
32
+ /**
33
+ * Detail DTOs that support optimistic concurrency. The backend DTO guarantees this,
34
+ * so it is non-optional; echo it in the `If-Match` header on updates.
35
+ */
36
+ interface HasRowVersion {
37
+ /** The version stamp for optimistic concurrency. */
38
+ rowVersion: string;
39
+ }
40
+ /** A 1-based pagination request. */
41
+ interface PagedQuery {
42
+ /** The current page number (1-based). */
43
+ page: number;
44
+ /** The number of items to return per page. */
45
+ pageSize: number;
46
+ }
47
+ /** {@link PagedQuery} plus a free-text search term. */
48
+ interface SearchQuery extends PagedQuery {
49
+ /** The search term. */
50
+ search?: string | null;
51
+ }
52
+
53
+ export type { Auditable, AuditableDetailed, Guid, HasRowVersion, PagedQuery, SearchQuery };
@@ -0,0 +1,53 @@
1
+ /**
2
+ * `@ethisyscore/plugin-ui/types` — generic base DTO/query types a lifted monolith
3
+ * feature shares (audit stamps, optimistic-concurrency row version, branded GUID,
4
+ * paging). Pure types — zero runtime — so a plugin's lifted `types/core.ts` becomes a
5
+ * one-line `export type * from "@ethisyscore/plugin-ui/types"` with no imports to change.
6
+ */
7
+ /**
8
+ * A branded GUID string. The `__brand` doesn't exist at runtime; it forces TS to
9
+ * treat this as distinct from a plain string.
10
+ */
11
+ type Guid = string & {
12
+ readonly __brand: unique symbol;
13
+ };
14
+ /** Items that carry audit stamps (names + timestamps). */
15
+ interface Auditable {
16
+ /** Name of who created this item. */
17
+ createdByName?: string;
18
+ /** When the item was created. */
19
+ createdUtc?: string;
20
+ /** Name of who last updated this item. */
21
+ lastUpdatedByName?: string;
22
+ /** When the item was last updated. */
23
+ lastUpdatedUtc?: string;
24
+ }
25
+ /** {@link Auditable} plus the actor ids. */
26
+ interface AuditableDetailed extends Auditable {
27
+ /** Id of who created this item. */
28
+ createdBy?: Guid;
29
+ /** Id of who last updated this item. */
30
+ lastUpdatedBy?: Guid;
31
+ }
32
+ /**
33
+ * Detail DTOs that support optimistic concurrency. The backend DTO guarantees this,
34
+ * so it is non-optional; echo it in the `If-Match` header on updates.
35
+ */
36
+ interface HasRowVersion {
37
+ /** The version stamp for optimistic concurrency. */
38
+ rowVersion: string;
39
+ }
40
+ /** A 1-based pagination request. */
41
+ interface PagedQuery {
42
+ /** The current page number (1-based). */
43
+ page: number;
44
+ /** The number of items to return per page. */
45
+ pageSize: number;
46
+ }
47
+ /** {@link PagedQuery} plus a free-text search term. */
48
+ interface SearchQuery extends PagedQuery {
49
+ /** The search term. */
50
+ search?: string | null;
51
+ }
52
+
53
+ export type { Auditable, AuditableDetailed, Guid, HasRowVersion, PagedQuery, SearchQuery };
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=index.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethisyscore/plugin-ui",
3
- "version": "1.16.0",
3
+ "version": "1.18.0",
4
4
  "description": "Plugin-UI umbrella SDK: client bridge + a11y/l10n primitives + brokered-MCP client (WI 4858).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -26,6 +26,36 @@
26
26
  "types": "./dist/token/index.d.ts",
27
27
  "import": "./dist/token/index.js",
28
28
  "require": "./dist/token/index.cjs"
29
+ },
30
+ "./platform-react": {
31
+ "types": "./dist/platform-react/index.d.ts",
32
+ "import": "./dist/platform-react/index.js",
33
+ "require": "./dist/platform-react/index.cjs"
34
+ },
35
+ "./icons": {
36
+ "types": "./dist/icons/index.d.ts",
37
+ "import": "./dist/icons/index.js",
38
+ "require": "./dist/icons/index.cjs"
39
+ },
40
+ "./types": {
41
+ "types": "./dist/types/index.d.ts",
42
+ "import": "./dist/types/index.js",
43
+ "require": "./dist/types/index.cjs"
44
+ },
45
+ "./components/ui": {
46
+ "types": "./dist/components/ui/index.d.ts",
47
+ "import": "./dist/components/ui/index.js",
48
+ "require": "./dist/components/ui/index.cjs"
49
+ },
50
+ "./components/layout": {
51
+ "types": "./dist/components/layout/index.d.ts",
52
+ "import": "./dist/components/layout/index.js",
53
+ "require": "./dist/components/layout/index.cjs"
54
+ },
55
+ "./components/shared": {
56
+ "types": "./dist/components/shared/index.d.ts",
57
+ "import": "./dist/components/shared/index.js",
58
+ "require": "./dist/components/shared/index.cjs"
29
59
  }
30
60
  },
31
61
  "files": [
@@ -44,9 +74,23 @@
44
74
  "@ethisyscore/extension-runtime": "^1.10.0"
45
75
  },
46
76
  "peerDependencies": {
77
+ "@mui/material": ">=5",
78
+ "@tanstack/react-query": ">=5",
47
79
  "react": ">=18"
48
80
  },
81
+ "peerDependenciesMeta": {
82
+ "@mui/material": {
83
+ "optional": true
84
+ },
85
+ "@tanstack/react-query": {
86
+ "optional": true
87
+ }
88
+ },
49
89
  "devDependencies": {
90
+ "@emotion/react": "^11.14.0",
91
+ "@emotion/styled": "^11.14.1",
92
+ "@mui/material": "^7.3.0",
93
+ "@tanstack/react-query": "^5.90.0",
50
94
  "@testing-library/jest-dom": "^6.6.0",
51
95
  "@testing-library/react": "^16.0.0",
52
96
  "@types/node": "^20.19.41",