@elevasis/ui 2.25.4 → 2.25.6
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/app/index.css +2 -6
- package/dist/app/index.d.ts +63 -56
- package/dist/app/index.js +3 -2
- package/dist/charts/index.js +1 -1
- package/dist/chunk-5RLYII6P.js +314 -0
- package/dist/chunk-6U7AIIHF.js +880 -0
- package/dist/{chunk-5O5VC4HB.js → chunk-7F3IQMLI.js} +1 -1
- package/dist/{chunk-ZBRRVDYJ.js → chunk-ARJPZ66V.js} +42 -760
- package/dist/{chunk-IS53MXE4.js → chunk-BDKM56TP.js} +1 -1
- package/dist/{chunk-FVXM2MN6.js → chunk-C7IBFI5B.js} +1 -1
- package/dist/{chunk-DUUH3CHC.js → chunk-CPAJXBTL.js} +10 -6
- package/dist/{chunk-3FBCFSDF.js → chunk-ECNNI3NT.js} +2 -1
- package/dist/chunk-HAEJ4M54.js +94 -0
- package/dist/{chunk-7RPH2VXV.js → chunk-JXSBOG2R.js} +1 -1
- package/dist/{chunk-E7WTCAVX.js → chunk-KNISO652.js} +2 -2
- package/dist/{chunk-5PLAJ6IS.js → chunk-L7D6KNHV.js} +457 -335
- package/dist/{chunk-JMI7L7Y7.js → chunk-LPM7O6XM.js} +2 -233
- package/dist/{chunk-2XWXFT2Z.js → chunk-QARSVM7Q.js} +1 -1
- package/dist/{chunk-FYT6LYJP.js → chunk-SBQ4MYQV.js} +3 -2
- package/dist/{chunk-MU4VPAMR.js → chunk-YRKQNPK2.js} +1 -1
- package/dist/components/index.css +2 -6
- package/dist/components/index.d.ts +11 -2
- package/dist/components/index.js +25 -23
- package/dist/components/navigation/index.css +2 -6
- package/dist/features/auth/index.css +2 -6
- package/dist/features/crm/index.css +2 -6
- package/dist/features/crm/index.js +9 -8
- package/dist/features/dashboard/index.css +2 -6
- package/dist/features/dashboard/index.js +9 -8
- package/dist/features/delivery/index.css +2 -6
- package/dist/features/delivery/index.js +10 -9
- package/dist/features/knowledge/index.d.ts +33 -0
- package/dist/features/knowledge/index.js +406 -0
- package/dist/features/lead-gen/index.css +2 -6
- package/dist/features/lead-gen/index.d.ts +158 -151
- package/dist/features/lead-gen/index.js +10 -9
- package/dist/features/monitoring/index.css +2 -6
- package/dist/features/monitoring/index.js +10 -9
- package/dist/features/monitoring/requests/index.css +2 -6
- package/dist/features/monitoring/requests/index.js +8 -7
- package/dist/features/operations/index.css +2 -6
- package/dist/features/operations/index.js +15 -13
- package/dist/features/settings/index.css +2 -6
- package/dist/features/settings/index.js +9 -8
- package/dist/hooks/delivery/index.css +2 -6
- package/dist/hooks/index.css +2 -6
- package/dist/hooks/index.d.ts +14 -3
- package/dist/hooks/index.js +8 -7
- package/dist/hooks/published.css +2 -6
- package/dist/hooks/published.d.ts +14 -3
- package/dist/hooks/published.js +8 -7
- package/dist/index.css +2 -6
- package/dist/index.d.ts +611 -593
- package/dist/index.js +8 -7
- package/dist/knowledge/index.d.ts +643 -0
- package/dist/knowledge/index.js +496 -0
- package/dist/organization/index.css +2 -6
- package/dist/provider/index.css +2 -6
- package/dist/provider/index.d.ts +346 -339
- package/dist/provider/index.js +6 -5
- package/dist/provider/published.css +2 -6
- package/dist/provider/published.d.ts +346 -339
- package/dist/provider/published.js +5 -4
- package/dist/vite-plugin-knowledge/index.d.ts +37 -0
- package/dist/vite-plugin-knowledge/index.js +67 -0
- package/package.json +45 -33
- package/src/knowledge/README.md +31 -0
- package/dist/{chunk-U2KJXTTV.js → chunk-TAIX4NO3.js} +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export { FeatureShell } from '../chunk-
|
|
2
|
-
export { ElevasisCoreProvider, NotificationProvider, useNotificationAdapter } from '../chunk-JMI7L7Y7.js';
|
|
3
|
-
export { ElevasisFeaturesProvider, useElevasisFeatures, useOptionalElevasisFeatures } from '../chunk-V3HUIZJX.js';
|
|
1
|
+
export { FeatureShell } from '../chunk-TAIX4NO3.js';
|
|
4
2
|
import '../chunk-TKAYX2SP.js';
|
|
5
3
|
import '../chunk-U36X6NZM.js';
|
|
4
|
+
import '../chunk-NYBEU5TE.js';
|
|
5
|
+
export { ElevasisCoreProvider, NotificationProvider, useNotificationAdapter } from '../chunk-LPM7O6XM.js';
|
|
6
6
|
import '../chunk-SZHARWKU.js';
|
|
7
|
+
export { ElevasisFeaturesProvider, useElevasisFeatures, useOptionalElevasisFeatures } from '../chunk-V3HUIZJX.js';
|
|
7
8
|
import '../chunk-3KMDHCAR.js';
|
|
8
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-5RLYII6P.js';
|
|
9
10
|
import '../chunk-T6INEVX6.js';
|
|
10
11
|
import '../chunk-2IFYDILW.js';
|
|
11
12
|
import '../chunk-Q7DJKLEN.js';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Plugin } from 'vite';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @elevasis/ui Vite plugin for knowledge bodies codegen.
|
|
5
|
+
*
|
|
6
|
+
* Runs the knowledge-bodies codegen at the following trigger points:
|
|
7
|
+
* - buildStart: cold start (covers both `vite dev` and `vite build`)
|
|
8
|
+
* - handleHotUpdate: file changes under packages/core/src/organization-model/
|
|
9
|
+
*
|
|
10
|
+
* Usage in vite.config.ts:
|
|
11
|
+
*
|
|
12
|
+
* import { knowledgePlugin } from '@repo/ui/vite-plugin-knowledge'
|
|
13
|
+
* // or (after publish):
|
|
14
|
+
* import { knowledgePlugin } from '@elevasis/ui/vite-plugin-knowledge'
|
|
15
|
+
*
|
|
16
|
+
* export default defineConfig({
|
|
17
|
+
* plugins: [knowledgePlugin()],
|
|
18
|
+
* })
|
|
19
|
+
*
|
|
20
|
+
* Wave 5a wires this into apps/command-center/vite.config.ts.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
interface KnowledgePluginOptions {
|
|
24
|
+
/**
|
|
25
|
+
* Absolute path to the monorepo root.
|
|
26
|
+
* Defaults to auto-detected from this file's location (packages/ui/src/vite-plugin-knowledge/).
|
|
27
|
+
* Override when the plugin is used from a project where the monorepo root differs.
|
|
28
|
+
*/
|
|
29
|
+
monorepoRoot?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Vite plugin: knowledge bodies codegen + HMR.
|
|
33
|
+
*/
|
|
34
|
+
declare function knowledgePlugin(options?: KnowledgePluginOptions): Plugin;
|
|
35
|
+
|
|
36
|
+
export { knowledgePlugin };
|
|
37
|
+
export type { KnowledgePluginOptions };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import '../chunk-I2KLQ2HA.js';
|
|
2
|
+
import { spawnSync } from 'child_process';
|
|
3
|
+
import { resolve } from 'path';
|
|
4
|
+
|
|
5
|
+
function defaultMonorepoRoot() {
|
|
6
|
+
return resolve(import.meta.dirname, "..", "..", "..", "..");
|
|
7
|
+
}
|
|
8
|
+
function generatedBodiesPath(monorepoRoot) {
|
|
9
|
+
return resolve(monorepoRoot, "packages", "ui", "src", "knowledge", "_generated", "knowledge-bodies.tsx");
|
|
10
|
+
}
|
|
11
|
+
function runCodegen(monorepoRoot, logger) {
|
|
12
|
+
const scriptPath = resolve(monorepoRoot, "packages", "ui", "scripts", "generate-knowledge-bodies.ts");
|
|
13
|
+
logger.info("[knowledge-plugin] Regenerating knowledge bodies...");
|
|
14
|
+
const result = spawnSync("pnpm", ["--filter", "@repo/ui", "exec", "tsx", scriptPath], {
|
|
15
|
+
stdio: "inherit",
|
|
16
|
+
cwd: monorepoRoot,
|
|
17
|
+
shell: process.platform === "win32"
|
|
18
|
+
});
|
|
19
|
+
if (result.error) {
|
|
20
|
+
logger.error(`[knowledge-plugin] Codegen spawn failed: ${result.error.message}`);
|
|
21
|
+
throw result.error;
|
|
22
|
+
}
|
|
23
|
+
if (result.status !== 0) {
|
|
24
|
+
throw new Error(`[knowledge-plugin] Codegen exited with status ${result.status}`);
|
|
25
|
+
}
|
|
26
|
+
logger.info("[knowledge-plugin] Knowledge bodies regenerated.");
|
|
27
|
+
}
|
|
28
|
+
function knowledgePlugin(options = {}) {
|
|
29
|
+
const monorepoRoot = options.monorepoRoot ?? defaultMonorepoRoot();
|
|
30
|
+
let resolvedConfig;
|
|
31
|
+
let watchRoot;
|
|
32
|
+
return {
|
|
33
|
+
name: "elevasis:knowledge-bodies",
|
|
34
|
+
configResolved(config) {
|
|
35
|
+
resolvedConfig = config;
|
|
36
|
+
watchRoot = resolve(monorepoRoot, "packages", "core", "src", "organization-model");
|
|
37
|
+
},
|
|
38
|
+
buildStart() {
|
|
39
|
+
const logger = resolvedConfig?.logger ?? {
|
|
40
|
+
info: (msg) => console.log(msg),
|
|
41
|
+
error: (msg) => console.error(msg)
|
|
42
|
+
};
|
|
43
|
+
runCodegen(monorepoRoot, logger);
|
|
44
|
+
if (resolvedConfig?.command === "serve") {
|
|
45
|
+
this.addWatchFile(watchRoot);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
handleHotUpdate({ file, server }) {
|
|
49
|
+
const isOrgModelChange = file.startsWith(watchRoot);
|
|
50
|
+
if (!isOrgModelChange) return;
|
|
51
|
+
const logger = server.config.logger;
|
|
52
|
+
try {
|
|
53
|
+
runCodegen(monorepoRoot, logger);
|
|
54
|
+
} catch (err) {
|
|
55
|
+
server.config.logger.error(`[knowledge-plugin] Codegen failed: ${String(err)}`);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const bodiesModule = server.moduleGraph.getModuleById(generatedBodiesPath(monorepoRoot));
|
|
59
|
+
if (bodiesModule) {
|
|
60
|
+
server.moduleGraph.invalidateModule(bodiesModule);
|
|
61
|
+
server.hot.send({ type: "full-reload" });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { knowledgePlugin };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/ui",
|
|
3
|
-
"version": "2.25.
|
|
3
|
+
"version": "2.25.6",
|
|
4
4
|
"description": "UI components and platform-aware hooks for building custom frontends on the Elevasis platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,38 +11,6 @@
|
|
|
11
11
|
"dist",
|
|
12
12
|
"src/**/README.md"
|
|
13
13
|
],
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"@mantine/charts": "8.2.7",
|
|
16
|
-
"@mantine/notifications": "8.2.7",
|
|
17
|
-
"@mantine/tiptap": "8.2.7",
|
|
18
|
-
"@tiptap/extension-link": "^2.11.7",
|
|
19
|
-
"@tiptap/extension-placeholder": "^2.11.7",
|
|
20
|
-
"@tiptap/react": "^2.11.7",
|
|
21
|
-
"@tiptap/starter-kit": "^2.11.7",
|
|
22
|
-
"@mdx-js/mdx": "^3.1.1",
|
|
23
|
-
"@types/react": "^19.2.2",
|
|
24
|
-
"@types/react-dom": "^19.1.9",
|
|
25
|
-
"cytoscape": "^3.33.1",
|
|
26
|
-
"globals": "^16.3.0",
|
|
27
|
-
"recharts": "^3.2.1",
|
|
28
|
-
"rollup": "^4.59.0",
|
|
29
|
-
"rollup-plugin-dts": "^6.3.0",
|
|
30
|
-
"tsup": "^8.0.0",
|
|
31
|
-
"typescript": "5.9.2",
|
|
32
|
-
"vite": "^7.0.0",
|
|
33
|
-
"@testing-library/react": "^16.3.0",
|
|
34
|
-
"@testing-library/jest-dom": "^6.9.1",
|
|
35
|
-
"msw": "^2.11.0",
|
|
36
|
-
"vitest": "^3.2.4",
|
|
37
|
-
"@repo/core": "0.15.1",
|
|
38
|
-
"@repo/eslint-config": "0.0.0",
|
|
39
|
-
"@repo/typescript-config": "0.0.0"
|
|
40
|
-
},
|
|
41
|
-
"dependencies": {
|
|
42
|
-
"@dagrejs/dagre": "^1.1.4",
|
|
43
|
-
"@microsoft/fetch-event-source": "^2.0.1",
|
|
44
|
-
"react-json-pretty": "^2.2.0"
|
|
45
|
-
},
|
|
46
14
|
"exports": {
|
|
47
15
|
"./provider": {
|
|
48
16
|
"types": "./dist/provider/published.d.ts",
|
|
@@ -84,6 +52,10 @@
|
|
|
84
52
|
"types": "./dist/features/crm/index.d.ts",
|
|
85
53
|
"import": "./dist/features/crm/index.js"
|
|
86
54
|
},
|
|
55
|
+
"./features/knowledge": {
|
|
56
|
+
"types": "./dist/features/knowledge/index.d.ts",
|
|
57
|
+
"import": "./dist/features/knowledge/index.js"
|
|
58
|
+
},
|
|
87
59
|
"./features/dashboard": {
|
|
88
60
|
"types": "./dist/features/dashboard/index.d.ts",
|
|
89
61
|
"import": "./dist/features/dashboard/index.js"
|
|
@@ -152,6 +124,14 @@
|
|
|
152
124
|
"types": "./dist/execution/index.d.ts",
|
|
153
125
|
"import": "./dist/execution/index.js"
|
|
154
126
|
},
|
|
127
|
+
"./knowledge": {
|
|
128
|
+
"types": "./dist/knowledge/index.d.ts",
|
|
129
|
+
"import": "./dist/knowledge/index.js"
|
|
130
|
+
},
|
|
131
|
+
"./vite-plugin-knowledge": {
|
|
132
|
+
"types": "./dist/vite-plugin-knowledge/index.d.ts",
|
|
133
|
+
"import": "./dist/vite-plugin-knowledge/index.js"
|
|
134
|
+
},
|
|
155
135
|
"./router": {
|
|
156
136
|
"types": "./dist/router/index.d.ts",
|
|
157
137
|
"import": "./dist/router/index.js"
|
|
@@ -234,6 +214,38 @@
|
|
|
234
214
|
"@testing-library/jest-dom": "^6.9.1",
|
|
235
215
|
"msw": "^2.11.0"
|
|
236
216
|
},
|
|
217
|
+
"devDependencies": {
|
|
218
|
+
"@mantine/charts": "8.2.7",
|
|
219
|
+
"@mantine/notifications": "8.2.7",
|
|
220
|
+
"@mantine/tiptap": "8.2.7",
|
|
221
|
+
"@tiptap/extension-link": "^2.11.7",
|
|
222
|
+
"@tiptap/extension-placeholder": "^2.11.7",
|
|
223
|
+
"@tiptap/react": "^2.11.7",
|
|
224
|
+
"@tiptap/starter-kit": "^2.11.7",
|
|
225
|
+
"@mdx-js/mdx": "^3.1.1",
|
|
226
|
+
"@types/react": "^19.2.2",
|
|
227
|
+
"@types/react-dom": "^19.1.9",
|
|
228
|
+
"cytoscape": "^3.33.1",
|
|
229
|
+
"globals": "^16.3.0",
|
|
230
|
+
"recharts": "^3.2.1",
|
|
231
|
+
"rollup": "^4.59.0",
|
|
232
|
+
"rollup-plugin-dts": "^6.3.0",
|
|
233
|
+
"tsup": "^8.0.0",
|
|
234
|
+
"typescript": "5.9.2",
|
|
235
|
+
"vite": "^7.0.0",
|
|
236
|
+
"@testing-library/react": "^16.3.0",
|
|
237
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
238
|
+
"msw": "^2.11.0",
|
|
239
|
+
"vitest": "^3.2.4",
|
|
240
|
+
"@repo/core": "0.15.1",
|
|
241
|
+
"@repo/typescript-config": "0.0.0",
|
|
242
|
+
"@repo/eslint-config": "0.0.0"
|
|
243
|
+
},
|
|
244
|
+
"dependencies": {
|
|
245
|
+
"@dagrejs/dagre": "^1.1.4",
|
|
246
|
+
"@microsoft/fetch-event-source": "^2.0.1",
|
|
247
|
+
"react-json-pretty": "^2.2.0"
|
|
248
|
+
},
|
|
237
249
|
"peerDependenciesMeta": {
|
|
238
250
|
"@mantine/core": {
|
|
239
251
|
"optional": true
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @elevasis/ui/knowledge
|
|
2
|
+
|
|
3
|
+
Read-only browser primitives for the Organization Model knowledge graph.
|
|
4
|
+
|
|
5
|
+
## Surface
|
|
6
|
+
|
|
7
|
+
| Export | Purpose |
|
|
8
|
+
| ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
9
|
+
| `KnowledgeBrowser` | Composed default surface: tree + list+detail + search. |
|
|
10
|
+
| `KnowledgeTree` | By-feature primary tree. |
|
|
11
|
+
| `KnowledgeNodeList` | Flat list of node summary cards. |
|
|
12
|
+
| `KnowledgeNodeView` | Single-node detail view: title, kind badge, summary, MDX body, edge sidecar. |
|
|
13
|
+
| `KnowledgeSearchBar` | Client-side search over `_generated/knowledge-search-index.json`. |
|
|
14
|
+
| `KnowledgeSidebarMiddle` | Sidebar middle section. Mirrors `CrmSidebarMiddle`. |
|
|
15
|
+
| `KNOWLEDGE_ITEMS` | Default sidebar nav items. |
|
|
16
|
+
| `KnowledgeMDXProvider`, `useKnowledgeAllowlist`, `KNOWLEDGE_ALLOWLIST` | MDX runtime allowlist (`Card`, `Cards`, `Step`, `Steps`, `Callout`, `Tab`, `Tabs`). |
|
|
17
|
+
| `KNOWLEDGE_BODIES` | Build-time-compiled MDX components keyed by node id. |
|
|
18
|
+
|
|
19
|
+
## Customization tiers
|
|
20
|
+
|
|
21
|
+
1. **Default** — mount `knowledgeManifest` from `@elevasis/ui/features/knowledge`.
|
|
22
|
+
2. **Extend** — pass `extraComponents` to `KnowledgeMDXProvider` or compose around `KnowledgeSidebarMiddle` + `KNOWLEDGE_ITEMS`.
|
|
23
|
+
3. **Replace** — call `@elevasis/core/knowledge` queries directly from project-owned routes.
|
|
24
|
+
|
|
25
|
+
## Codegen
|
|
26
|
+
|
|
27
|
+
`KNOWLEDGE_BODIES` and the search index are regenerated by `pnpm scaffold:sync` (or `pnpm knowledge:generate` to run only the knowledge step). Source: `DEFAULT_ORGANIZATION_MODEL.knowledge.nodes` from `@repo/core`.
|
|
28
|
+
|
|
29
|
+
The Vite plugin at `@elevasis/ui/vite-plugin-knowledge` re-runs codegen on `buildStart` and watches the OM source dir for HMR.
|
|
30
|
+
|
|
31
|
+
Phase 1 is read-only. Phase 2 will move bodies into Supabase and ship via `mdx-bundler`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useElevasisFeatures } from './chunk-V3HUIZJX.js';
|
|
2
1
|
import { SubshellContainer, SubshellSidebar, SubshellRightSideContainer } from './chunk-TKAYX2SP.js';
|
|
3
2
|
import { FeatureUnavailableState } from './chunk-U36X6NZM.js';
|
|
3
|
+
import { useElevasisFeatures } from './chunk-V3HUIZJX.js';
|
|
4
4
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
5
5
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
|