@ethisyscore/components-react 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.
- package/dist/index.cjs +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -1
- package/dist/index.d.ts +32 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -15,6 +15,14 @@ function emitNavigation(to) {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
// src/toast.ts
|
|
19
|
+
function showToast(toast) {
|
|
20
|
+
if (typeof window === "undefined") {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
window.dispatchEvent(new CustomEvent("ethisys:toast", { detail: toast }));
|
|
24
|
+
}
|
|
25
|
+
|
|
18
26
|
// src/index.ts
|
|
19
27
|
function definePlatformReactPage(component) {
|
|
20
28
|
return component;
|
|
@@ -22,5 +30,6 @@ function definePlatformReactPage(component) {
|
|
|
22
30
|
|
|
23
31
|
exports.definePlatformReactPage = definePlatformReactPage;
|
|
24
32
|
exports.emitNavigation = emitNavigation;
|
|
33
|
+
exports.showToast = showToast;
|
|
25
34
|
//# sourceMappingURL=index.cjs.map
|
|
26
35
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/navigation.ts","../src/index.ts"],"names":[],"mappings":";;;AAmBO,SAAS,eAAe,EAAA,EAAkB;AAC/C,EAAA,IAAI,OAAO,WAAW,WAAA,EAAa;AACjC,IAAA;AAAA,EACF;AACA,EAAA,MAAM,KAAA,GAAQ,IAAI,WAAA,CAAY,kBAAA,EAAoB;AAAA,IAChD,MAAA,EAAQ,EAAE,EAAA,EAAG;AAAA,IACb,UAAA,EAAY;AAAA,GACb,CAAA;AACD,EAAA,MAAA,CAAO,cAAc,KAAK,CAAA;AAG1B,EAAA,IAAI,CAAC,MAAM,gBAAA,EAAkB;AAC3B,IAAA,MAAA,CAAO,QAAA,CAAS,OAAO,EAAE,CAAA;AAAA,EAC3B;AACF;;;
|
|
1
|
+
{"version":3,"sources":["../src/navigation.ts","../src/toast.ts","../src/index.ts"],"names":[],"mappings":";;;AAmBO,SAAS,eAAe,EAAA,EAAkB;AAC/C,EAAA,IAAI,OAAO,WAAW,WAAA,EAAa;AACjC,IAAA;AAAA,EACF;AACA,EAAA,MAAM,KAAA,GAAQ,IAAI,WAAA,CAAY,kBAAA,EAAoB;AAAA,IAChD,MAAA,EAAQ,EAAE,EAAA,EAAG;AAAA,IACb,UAAA,EAAY;AAAA,GACb,CAAA;AACD,EAAA,MAAA,CAAO,cAAc,KAAK,CAAA;AAG1B,EAAA,IAAI,CAAC,MAAM,gBAAA,EAAkB;AAC3B,IAAA,MAAA,CAAO,QAAA,CAAS,OAAO,EAAE,CAAA;AAAA,EAC3B;AACF;;;ACFO,SAAS,UAAU,KAAA,EAA2B;AACnD,EAAA,IAAI,OAAO,WAAW,WAAA,EAAa;AACjC,IAAA;AAAA,EACF;AACA,EAAA,MAAA,CAAO,aAAA,CAAc,IAAI,WAAA,CAA0B,eAAA,EAAiB,EAAE,MAAA,EAAQ,KAAA,EAAO,CAAC,CAAA;AACxF;;;ACgCO,SAAS,wBACd,SAAA,EACkB;AAClB,EAAA,OAAO,SAAA;AACT","file":"index.cjs","sourcesContent":["/**\n * Host navigation bridge for PlatformReact pages (RFC 0003).\n *\n * PlatformReact pages run inside the host's React tree but cannot import the\n * host's `useNavigate` directly — that would couple the plugin's bundle to\n * the host's router internals and break the realm boundary the contract\n * preserves. Instead, plugins dispatch a `CustomEvent(\"ethisys:navigate\")`\n * on `window`; the host's `useExtensionNavigation` listener intercepts the\n * event and translates it into a React Router push.\n *\n * `cancelable: true` is load-bearing — without it the host's\n * `event.preventDefault()` is a no-op (CustomEvent defaults to\n * non-cancelable), so `defaultPrevented` stays `false`, the\n * `window.location.assign` fallback fires AFTER the SPA navigation has\n * already run, and the user sees an unwanted full-page reload. The flag is\n * the entire contract between plugin and host on this seam, which is why\n * the helper exists — getting it right per-plugin is exactly the kind of\n * detail that should be baked into the SDK rather than the README.\n */\nexport function emitNavigation(to: string): void {\n if (typeof window === \"undefined\") {\n return;\n }\n const event = new CustomEvent(\"ethisys:navigate\", {\n detail: { to },\n cancelable: true,\n });\n window.dispatchEvent(event);\n // Fallback for hosts that haven't wired the listener yet — full-document\n // navigation isn't ideal but keeps the page functional.\n if (!event.defaultPrevented) {\n window.location.assign(to);\n }\n}\n","/**\n * Host toast bridge for PlatformReact pages (RFC 0003).\n *\n * Symmetric with {@link emitNavigation}: a PlatformReact page runs\n * inside the host realm but cannot import the host's toast system directly — the\n * host renders toasts with a single app-global toaster (a module singleton) that\n * is not in the host module registry, so a plugin can neither import it nor\n * safely bundle its own (a second instance would dispatch to a different store\n * and nothing would show). Instead the plugin dispatches a typed\n * `CustomEvent<ToastRequest>` named `ethisys:toast` on `window`; the host\n * subscribes once at the authenticated shell (`useExtensionToast`) and forwards\n * each event to its toaster.\n *\n * Unlike navigation there is no fallback: a dropped toast (no host listener —\n * e.g. a Storybook/dev mount) is non-fatal UX, so the helper stays fire-and-forget.\n */\nexport type ToastVariant = \"default\" | \"success\" | \"error\" | \"warning\";\n\n/** The payload carried on the `ethisys:toast` event. */\nexport interface ToastRequest {\n /** Primary line. Required — an empty title is ignored by the host listener. */\n title: string;\n /** Optional secondary line. */\n description?: string;\n /** Visual style; the host maps it to its toaster's success/error/warning/default. */\n variant?: ToastVariant;\n}\n\n/**\n * Raise a host toast from a PlatformReact page. No-ops outside a browser (SSR).\n */\nexport function showToast(toast: ToastRequest): void {\n if (typeof window === \"undefined\") {\n return;\n }\n window.dispatchEvent(new CustomEvent<ToastRequest>(\"ethisys:toast\", { detail: toast }));\n}\n","import type { ComponentType } from \"react\";\n\n// ── Public contract ────────────────────────────────────────────────\n\n/**\n * The injected props every PlatformReact page component receives from the\n * host at surface mount time (RFC 0003).\n *\n * The host's surface mount (`PlatformReactSurfaceMount.tsx` in\n * `coreconnect-web`) reads each declared page's `exportName` from the loaded\n * module and renders it with these props. Plugin authors typing their page\n * components against this interface get strict type-checking for everything\n * the host actually supplies — no `any` at the seam.\n *\n * The shape is intentionally minimal. Additional context the host wires up\n * (theme, navigation, telemetry) reaches plugins via cross-cutting providers\n * the host wraps around the mounted component, not through this props\n * object — so growing the host's contextual surface does not change this\n * interface.\n */\nexport interface PlatformReactPageProps {\n /**\n * The extension's GUID as declared on the manifest's `id` field. Stable\n * across enable/disable lifecycle transitions within a tenant.\n */\n extensionId: string;\n /**\n * The active organisation. Plugins MUST scope every data read and write to\n * this id — the host enforces tenant isolation downstream, but propagating\n * the id keeps the dependency direction explicit and testable.\n */\n organisationId: string;\n /**\n * Optional tenant id. Present for tenant-bound deployments; absent for\n * platform-wide pages. Pages that branch on this MUST handle `undefined`.\n */\n tenantId?: string;\n /**\n * The host-side surface key for this page. Matches the `id` declared on\n * the manifest's `ui.platformReactPages[]` entry. Useful for telemetry tags\n * and for pages that share a component implementation across multiple\n * surfaces.\n */\n pageId: string;\n}\n\n/**\n * Type-safe declaration helper for a PlatformReact page component.\n *\n * The plugin author exports the result of this call from the module path\n * referenced by the manifest's `moduleSpecifier`:\n *\n * @example\n * ```tsx\n * import { definePlatformReactPage, type PlatformReactPageProps } from \"@ethisyscore/components-react\";\n *\n * const Dashboard = ({ extensionId, organisationId }: PlatformReactPageProps) => (\n * <div>Dashboard for {extensionId} / {organisationId}</div>\n * );\n *\n * export default definePlatformReactPage(Dashboard);\n * ```\n *\n * The helper currently returns the input component unchanged — it exists as\n * a stable indirection point so future host integrations (boundary-injection,\n * suspense fallbacks, error contracts) can land transparently without every\n * plugin author updating their export.\n */\nexport function definePlatformReactPage<P extends PlatformReactPageProps>(\n component: ComponentType<P>,\n): ComponentType<P> {\n return component;\n}\n\nexport { emitNavigation } from \"./navigation\";\nexport { showToast } from \"./toast\";\nexport type { ToastRequest, ToastVariant } from \"./toast\";\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -21,6 +21,37 @@ import { ComponentType } from 'react';
|
|
|
21
21
|
*/
|
|
22
22
|
declare function emitNavigation(to: string): void;
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Host toast bridge for PlatformReact pages (RFC 0003).
|
|
26
|
+
*
|
|
27
|
+
* Symmetric with {@link emitNavigation}: a PlatformReact page runs
|
|
28
|
+
* inside the host realm but cannot import the host's toast system directly — the
|
|
29
|
+
* host renders toasts with a single app-global toaster (a module singleton) that
|
|
30
|
+
* is not in the host module registry, so a plugin can neither import it nor
|
|
31
|
+
* safely bundle its own (a second instance would dispatch to a different store
|
|
32
|
+
* and nothing would show). Instead the plugin dispatches a typed
|
|
33
|
+
* `CustomEvent<ToastRequest>` named `ethisys:toast` on `window`; the host
|
|
34
|
+
* subscribes once at the authenticated shell (`useExtensionToast`) and forwards
|
|
35
|
+
* each event to its toaster.
|
|
36
|
+
*
|
|
37
|
+
* Unlike navigation there is no fallback: a dropped toast (no host listener —
|
|
38
|
+
* e.g. a Storybook/dev mount) is non-fatal UX, so the helper stays fire-and-forget.
|
|
39
|
+
*/
|
|
40
|
+
type ToastVariant = "default" | "success" | "error" | "warning";
|
|
41
|
+
/** The payload carried on the `ethisys:toast` event. */
|
|
42
|
+
interface ToastRequest {
|
|
43
|
+
/** Primary line. Required — an empty title is ignored by the host listener. */
|
|
44
|
+
title: string;
|
|
45
|
+
/** Optional secondary line. */
|
|
46
|
+
description?: string;
|
|
47
|
+
/** Visual style; the host maps it to its toaster's success/error/warning/default. */
|
|
48
|
+
variant?: ToastVariant;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Raise a host toast from a PlatformReact page. No-ops outside a browser (SSR).
|
|
52
|
+
*/
|
|
53
|
+
declare function showToast(toast: ToastRequest): void;
|
|
54
|
+
|
|
24
55
|
/**
|
|
25
56
|
* The injected props every PlatformReact page component receives from the
|
|
26
57
|
* host at surface mount time (RFC 0003).
|
|
@@ -86,4 +117,4 @@ interface PlatformReactPageProps {
|
|
|
86
117
|
*/
|
|
87
118
|
declare function definePlatformReactPage<P extends PlatformReactPageProps>(component: ComponentType<P>): ComponentType<P>;
|
|
88
119
|
|
|
89
|
-
export { type PlatformReactPageProps, definePlatformReactPage, emitNavigation };
|
|
120
|
+
export { type PlatformReactPageProps, type ToastRequest, type ToastVariant, definePlatformReactPage, emitNavigation, showToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,37 @@ import { ComponentType } from 'react';
|
|
|
21
21
|
*/
|
|
22
22
|
declare function emitNavigation(to: string): void;
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Host toast bridge for PlatformReact pages (RFC 0003).
|
|
26
|
+
*
|
|
27
|
+
* Symmetric with {@link emitNavigation}: a PlatformReact page runs
|
|
28
|
+
* inside the host realm but cannot import the host's toast system directly — the
|
|
29
|
+
* host renders toasts with a single app-global toaster (a module singleton) that
|
|
30
|
+
* is not in the host module registry, so a plugin can neither import it nor
|
|
31
|
+
* safely bundle its own (a second instance would dispatch to a different store
|
|
32
|
+
* and nothing would show). Instead the plugin dispatches a typed
|
|
33
|
+
* `CustomEvent<ToastRequest>` named `ethisys:toast` on `window`; the host
|
|
34
|
+
* subscribes once at the authenticated shell (`useExtensionToast`) and forwards
|
|
35
|
+
* each event to its toaster.
|
|
36
|
+
*
|
|
37
|
+
* Unlike navigation there is no fallback: a dropped toast (no host listener —
|
|
38
|
+
* e.g. a Storybook/dev mount) is non-fatal UX, so the helper stays fire-and-forget.
|
|
39
|
+
*/
|
|
40
|
+
type ToastVariant = "default" | "success" | "error" | "warning";
|
|
41
|
+
/** The payload carried on the `ethisys:toast` event. */
|
|
42
|
+
interface ToastRequest {
|
|
43
|
+
/** Primary line. Required — an empty title is ignored by the host listener. */
|
|
44
|
+
title: string;
|
|
45
|
+
/** Optional secondary line. */
|
|
46
|
+
description?: string;
|
|
47
|
+
/** Visual style; the host maps it to its toaster's success/error/warning/default. */
|
|
48
|
+
variant?: ToastVariant;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Raise a host toast from a PlatformReact page. No-ops outside a browser (SSR).
|
|
52
|
+
*/
|
|
53
|
+
declare function showToast(toast: ToastRequest): void;
|
|
54
|
+
|
|
24
55
|
/**
|
|
25
56
|
* The injected props every PlatformReact page component receives from the
|
|
26
57
|
* host at surface mount time (RFC 0003).
|
|
@@ -86,4 +117,4 @@ interface PlatformReactPageProps {
|
|
|
86
117
|
*/
|
|
87
118
|
declare function definePlatformReactPage<P extends PlatformReactPageProps>(component: ComponentType<P>): ComponentType<P>;
|
|
88
119
|
|
|
89
|
-
export { type PlatformReactPageProps, definePlatformReactPage, emitNavigation };
|
|
120
|
+
export { type PlatformReactPageProps, type ToastRequest, type ToastVariant, definePlatformReactPage, emitNavigation, showToast };
|
package/dist/index.js
CHANGED
|
@@ -13,11 +13,19 @@ function emitNavigation(to) {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
// src/toast.ts
|
|
17
|
+
function showToast(toast) {
|
|
18
|
+
if (typeof window === "undefined") {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
window.dispatchEvent(new CustomEvent("ethisys:toast", { detail: toast }));
|
|
22
|
+
}
|
|
23
|
+
|
|
16
24
|
// src/index.ts
|
|
17
25
|
function definePlatformReactPage(component) {
|
|
18
26
|
return component;
|
|
19
27
|
}
|
|
20
28
|
|
|
21
|
-
export { definePlatformReactPage, emitNavigation };
|
|
29
|
+
export { definePlatformReactPage, emitNavigation, showToast };
|
|
22
30
|
//# sourceMappingURL=index.js.map
|
|
23
31
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/navigation.ts","../src/index.ts"],"names":[],"mappings":";AAmBO,SAAS,eAAe,EAAA,EAAkB;AAC/C,EAAA,IAAI,OAAO,WAAW,WAAA,EAAa;AACjC,IAAA;AAAA,EACF;AACA,EAAA,MAAM,KAAA,GAAQ,IAAI,WAAA,CAAY,kBAAA,EAAoB;AAAA,IAChD,MAAA,EAAQ,EAAE,EAAA,EAAG;AAAA,IACb,UAAA,EAAY;AAAA,GACb,CAAA;AACD,EAAA,MAAA,CAAO,cAAc,KAAK,CAAA;AAG1B,EAAA,IAAI,CAAC,MAAM,gBAAA,EAAkB;AAC3B,IAAA,MAAA,CAAO,QAAA,CAAS,OAAO,EAAE,CAAA;AAAA,EAC3B;AACF;;;
|
|
1
|
+
{"version":3,"sources":["../src/navigation.ts","../src/toast.ts","../src/index.ts"],"names":[],"mappings":";AAmBO,SAAS,eAAe,EAAA,EAAkB;AAC/C,EAAA,IAAI,OAAO,WAAW,WAAA,EAAa;AACjC,IAAA;AAAA,EACF;AACA,EAAA,MAAM,KAAA,GAAQ,IAAI,WAAA,CAAY,kBAAA,EAAoB;AAAA,IAChD,MAAA,EAAQ,EAAE,EAAA,EAAG;AAAA,IACb,UAAA,EAAY;AAAA,GACb,CAAA;AACD,EAAA,MAAA,CAAO,cAAc,KAAK,CAAA;AAG1B,EAAA,IAAI,CAAC,MAAM,gBAAA,EAAkB;AAC3B,IAAA,MAAA,CAAO,QAAA,CAAS,OAAO,EAAE,CAAA;AAAA,EAC3B;AACF;;;ACFO,SAAS,UAAU,KAAA,EAA2B;AACnD,EAAA,IAAI,OAAO,WAAW,WAAA,EAAa;AACjC,IAAA;AAAA,EACF;AACA,EAAA,MAAA,CAAO,aAAA,CAAc,IAAI,WAAA,CAA0B,eAAA,EAAiB,EAAE,MAAA,EAAQ,KAAA,EAAO,CAAC,CAAA;AACxF;;;ACgCO,SAAS,wBACd,SAAA,EACkB;AAClB,EAAA,OAAO,SAAA;AACT","file":"index.js","sourcesContent":["/**\n * Host navigation bridge for PlatformReact pages (RFC 0003).\n *\n * PlatformReact pages run inside the host's React tree but cannot import the\n * host's `useNavigate` directly — that would couple the plugin's bundle to\n * the host's router internals and break the realm boundary the contract\n * preserves. Instead, plugins dispatch a `CustomEvent(\"ethisys:navigate\")`\n * on `window`; the host's `useExtensionNavigation` listener intercepts the\n * event and translates it into a React Router push.\n *\n * `cancelable: true` is load-bearing — without it the host's\n * `event.preventDefault()` is a no-op (CustomEvent defaults to\n * non-cancelable), so `defaultPrevented` stays `false`, the\n * `window.location.assign` fallback fires AFTER the SPA navigation has\n * already run, and the user sees an unwanted full-page reload. The flag is\n * the entire contract between plugin and host on this seam, which is why\n * the helper exists — getting it right per-plugin is exactly the kind of\n * detail that should be baked into the SDK rather than the README.\n */\nexport function emitNavigation(to: string): void {\n if (typeof window === \"undefined\") {\n return;\n }\n const event = new CustomEvent(\"ethisys:navigate\", {\n detail: { to },\n cancelable: true,\n });\n window.dispatchEvent(event);\n // Fallback for hosts that haven't wired the listener yet — full-document\n // navigation isn't ideal but keeps the page functional.\n if (!event.defaultPrevented) {\n window.location.assign(to);\n }\n}\n","/**\n * Host toast bridge for PlatformReact pages (RFC 0003).\n *\n * Symmetric with {@link emitNavigation}: a PlatformReact page runs\n * inside the host realm but cannot import the host's toast system directly — the\n * host renders toasts with a single app-global toaster (a module singleton) that\n * is not in the host module registry, so a plugin can neither import it nor\n * safely bundle its own (a second instance would dispatch to a different store\n * and nothing would show). Instead the plugin dispatches a typed\n * `CustomEvent<ToastRequest>` named `ethisys:toast` on `window`; the host\n * subscribes once at the authenticated shell (`useExtensionToast`) and forwards\n * each event to its toaster.\n *\n * Unlike navigation there is no fallback: a dropped toast (no host listener —\n * e.g. a Storybook/dev mount) is non-fatal UX, so the helper stays fire-and-forget.\n */\nexport type ToastVariant = \"default\" | \"success\" | \"error\" | \"warning\";\n\n/** The payload carried on the `ethisys:toast` event. */\nexport interface ToastRequest {\n /** Primary line. Required — an empty title is ignored by the host listener. */\n title: string;\n /** Optional secondary line. */\n description?: string;\n /** Visual style; the host maps it to its toaster's success/error/warning/default. */\n variant?: ToastVariant;\n}\n\n/**\n * Raise a host toast from a PlatformReact page. No-ops outside a browser (SSR).\n */\nexport function showToast(toast: ToastRequest): void {\n if (typeof window === \"undefined\") {\n return;\n }\n window.dispatchEvent(new CustomEvent<ToastRequest>(\"ethisys:toast\", { detail: toast }));\n}\n","import type { ComponentType } from \"react\";\n\n// ── Public contract ────────────────────────────────────────────────\n\n/**\n * The injected props every PlatformReact page component receives from the\n * host at surface mount time (RFC 0003).\n *\n * The host's surface mount (`PlatformReactSurfaceMount.tsx` in\n * `coreconnect-web`) reads each declared page's `exportName` from the loaded\n * module and renders it with these props. Plugin authors typing their page\n * components against this interface get strict type-checking for everything\n * the host actually supplies — no `any` at the seam.\n *\n * The shape is intentionally minimal. Additional context the host wires up\n * (theme, navigation, telemetry) reaches plugins via cross-cutting providers\n * the host wraps around the mounted component, not through this props\n * object — so growing the host's contextual surface does not change this\n * interface.\n */\nexport interface PlatformReactPageProps {\n /**\n * The extension's GUID as declared on the manifest's `id` field. Stable\n * across enable/disable lifecycle transitions within a tenant.\n */\n extensionId: string;\n /**\n * The active organisation. Plugins MUST scope every data read and write to\n * this id — the host enforces tenant isolation downstream, but propagating\n * the id keeps the dependency direction explicit and testable.\n */\n organisationId: string;\n /**\n * Optional tenant id. Present for tenant-bound deployments; absent for\n * platform-wide pages. Pages that branch on this MUST handle `undefined`.\n */\n tenantId?: string;\n /**\n * The host-side surface key for this page. Matches the `id` declared on\n * the manifest's `ui.platformReactPages[]` entry. Useful for telemetry tags\n * and for pages that share a component implementation across multiple\n * surfaces.\n */\n pageId: string;\n}\n\n/**\n * Type-safe declaration helper for a PlatformReact page component.\n *\n * The plugin author exports the result of this call from the module path\n * referenced by the manifest's `moduleSpecifier`:\n *\n * @example\n * ```tsx\n * import { definePlatformReactPage, type PlatformReactPageProps } from \"@ethisyscore/components-react\";\n *\n * const Dashboard = ({ extensionId, organisationId }: PlatformReactPageProps) => (\n * <div>Dashboard for {extensionId} / {organisationId}</div>\n * );\n *\n * export default definePlatformReactPage(Dashboard);\n * ```\n *\n * The helper currently returns the input component unchanged — it exists as\n * a stable indirection point so future host integrations (boundary-injection,\n * suspense fallbacks, error contracts) can land transparently without every\n * plugin author updating their export.\n */\nexport function definePlatformReactPage<P extends PlatformReactPageProps>(\n component: ComponentType<P>,\n): ComponentType<P> {\n return component;\n}\n\nexport { emitNavigation } from \"./navigation\";\nexport { showToast } from \"./toast\";\nexport type { ToastRequest, ToastVariant } from \"./toast\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethisyscore/components-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "Host-bound React contract for EthisysCore PlatformReact pages (RFC 0003). Provides the typed page-props contract and `definePlatformReactPage` helper so plugin authors get type-safe access to the host realm — extensionId, organisationId, mcp transport — without depending on the host app's internal modules.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|