@ethisyscore/host-ui-externals 1.34.0 → 1.36.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/README.md +39 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# @ethisyscore/host-ui-externals
|
|
2
|
+
|
|
3
|
+
Type contracts and mock implementations for the host-supplied gogo-ui externals
|
|
4
|
+
used by high-trust plugin UI tiers. A plugin depends on this package as a
|
|
5
|
+
**dev-dependency only**: at build time it provides the TypeScript types (and, via
|
|
6
|
+
`./mock`, runnable stand-ins for local/CI/Storybook), while production bundles
|
|
7
|
+
externalise the specifier so the plugin binds to the host's own runtime instance
|
|
8
|
+
rather than shipping a second copy.
|
|
9
|
+
|
|
10
|
+
> This keeps a plugin's UI type-safe against the host's gogo-ui surface without
|
|
11
|
+
> bundling — the same externalisation model PlatformReact uses for `react`,
|
|
12
|
+
> `@mui/material`, etc.
|
|
13
|
+
|
|
14
|
+
## Export surface
|
|
15
|
+
|
|
16
|
+
| Subpath | Key exports | Purpose |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| `.` | `GogoTheme`, `GogoMode`, `GogoThemeProviderProps`, `GogoChildren`, `GogoMenuItem`, `ComponentType`, `ReactNode`, `GOGO_EXTERNALS_SPECIFIER_MAP` | Type contracts for the host gogo-ui components (theme presets, mode, provider props, menu-item shape) plus the specifier map the host registry resolves against |
|
|
19
|
+
| `./mock` | `GogoThemeProvider`, `useGogoTheme`, and re-exported types | Mock implementations for local/CI/Storybook development — render semantic HTML with `data-testid` attributes so plugin UI can run and be tested without the real host |
|
|
20
|
+
|
|
21
|
+
## Typical usage
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
// Types compile against the host surface; production externalises the import.
|
|
25
|
+
import type { GogoTheme, GogoThemeProviderProps } from "@ethisyscore/host-ui-externals";
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
// Local dev / tests substitute the mock provider.
|
|
30
|
+
import { GogoThemeProvider } from "@ethisyscore/host-ui-externals/mock";
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Build and test
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm ci && npm run build && npm test
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
> Last Updated: 2026-07-10
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethisyscore/host-ui-externals",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.0",
|
|
4
4
|
"description": "Type contracts and mock build for Tier T host-supplied Gogo UI externals. Plugin builds depend on this as a dev-dep; production bundles externalise the specifier so the host's registered module instance is used at runtime.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|