@elevasis/ui 2.25.4 → 2.25.5
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 +19 -2
- package/dist/charts/index.js +1 -1
- package/dist/{chunk-E7WTCAVX.js → chunk-3KY2GNPE.js} +2 -2
- package/dist/{chunk-3FBCFSDF.js → chunk-ECNNI3NT.js} +2 -1
- package/dist/{chunk-FYT6LYJP.js → chunk-F7JDHS2I.js} +2 -2
- package/dist/{chunk-2XWXFT2Z.js → chunk-FVKLHLF4.js} +1 -1
- package/dist/{chunk-FVXM2MN6.js → chunk-KINQW4JT.js} +1 -1
- package/dist/{chunk-ZBRRVDYJ.js → chunk-N2AP4I5N.js} +7 -7
- package/dist/{chunk-5O5VC4HB.js → chunk-NHHCUECV.js} +1 -1
- package/dist/{chunk-7RPH2VXV.js → chunk-QNCVK3ZF.js} +1 -1
- package/dist/{chunk-5PLAJ6IS.js → chunk-VMAWXEVG.js} +2 -47
- package/dist/components/index.css +19 -2
- package/dist/components/index.js +21 -21
- package/dist/components/navigation/index.css +19 -2
- package/dist/features/auth/index.css +19 -2
- package/dist/features/crm/index.css +19 -2
- package/dist/features/crm/index.js +7 -7
- package/dist/features/dashboard/index.css +19 -2
- package/dist/features/dashboard/index.js +7 -7
- package/dist/features/delivery/index.css +19 -2
- package/dist/features/delivery/index.js +8 -8
- package/dist/features/knowledge/index.d.ts +33 -0
- package/dist/features/knowledge/index.js +10 -0
- package/dist/features/lead-gen/index.css +19 -2
- package/dist/features/lead-gen/index.js +7 -7
- package/dist/features/monitoring/index.css +19 -2
- package/dist/features/monitoring/index.js +8 -8
- package/dist/features/monitoring/requests/index.css +19 -2
- package/dist/features/monitoring/requests/index.js +6 -6
- package/dist/features/operations/index.css +19 -2
- package/dist/features/operations/index.js +11 -11
- package/dist/features/settings/index.css +19 -2
- package/dist/features/settings/index.js +7 -7
- package/dist/hooks/delivery/index.css +19 -2
- package/dist/hooks/index.css +19 -2
- package/dist/hooks/index.js +6 -6
- package/dist/hooks/published.css +19 -2
- package/dist/hooks/published.js +6 -6
- package/dist/index.css +19 -2
- package/dist/index.js +6 -6
- package/dist/knowledge/index.d.ts +633 -0
- package/dist/knowledge/index.js +595 -0
- package/dist/organization/index.css +19 -2
- package/dist/provider/index.css +19 -2
- package/dist/provider/index.js +4 -4
- package/dist/provider/published.css +19 -2
- package/dist/provider/published.js +4 -4
- package/dist/vite-plugin-knowledge/index.d.ts +37 -0
- package/dist/vite-plugin-knowledge/index.js +67 -0
- package/package.json +15 -3
- package/src/knowledge/README.md +31 -0
- package/dist/{chunk-DUUH3CHC.js → chunk-5BJXMZN4.js} +1 -1
- package/dist/{chunk-U2KJXTTV.js → chunk-TAIX4NO3.js} +1 -1
package/dist/provider/index.js
CHANGED
|
@@ -2,14 +2,14 @@ export { createTestFeaturesProvider } from '../chunk-VMJVQAFZ.js';
|
|
|
2
2
|
export { ElevasisUIProvider } from '../chunk-MU4VPAMR.js';
|
|
3
3
|
import '../chunk-QIW6OCEI.js';
|
|
4
4
|
import '../chunk-WLOQ4IBG.js';
|
|
5
|
-
export { FeatureShell } from '../chunk-
|
|
6
|
-
export { CrmActionsProvider, ElevasisCoreProvider, ListActionsProvider, NotificationProvider, useCrmActions, useListActions, useNotificationAdapter } from '../chunk-JMI7L7Y7.js';
|
|
7
|
-
export { ElevasisFeaturesProvider, useElevasisFeatures, useOptionalElevasisFeatures } from '../chunk-V3HUIZJX.js';
|
|
5
|
+
export { FeatureShell } from '../chunk-TAIX4NO3.js';
|
|
8
6
|
import '../chunk-TKAYX2SP.js';
|
|
9
7
|
import '../chunk-U36X6NZM.js';
|
|
8
|
+
import '../chunk-NYBEU5TE.js';
|
|
9
|
+
export { CrmActionsProvider, ElevasisCoreProvider, ListActionsProvider, NotificationProvider, useCrmActions, useListActions, useNotificationAdapter } from '../chunk-JMI7L7Y7.js';
|
|
10
10
|
import '../chunk-SZHARWKU.js';
|
|
11
|
+
export { ElevasisFeaturesProvider, useElevasisFeatures, useOptionalElevasisFeatures } from '../chunk-V3HUIZJX.js';
|
|
11
12
|
import '../chunk-3KMDHCAR.js';
|
|
12
|
-
import '../chunk-NYBEU5TE.js';
|
|
13
13
|
import '../chunk-T6INEVX6.js';
|
|
14
14
|
import '../chunk-2IFYDILW.js';
|
|
15
15
|
import '../chunk-Q7DJKLEN.js';
|
|
@@ -156,15 +156,32 @@
|
|
|
156
156
|
.mantine-Select-option:hover {
|
|
157
157
|
background-color: var(--color-surface-hover) !important;
|
|
158
158
|
}
|
|
159
|
-
[data-mantine-color-scheme
|
|
159
|
+
[data-mantine-color-scheme] .mantine-Tabs-root {
|
|
160
|
+
--tabs-color: var(--color-primary);
|
|
160
161
|
--tab-border-color: var(--color-border);
|
|
162
|
+
--tab-hover-color: color-mix(in srgb, var(--color-surface-hover) 70%, transparent);
|
|
163
|
+
}
|
|
164
|
+
[data-mantine-color-scheme] .mantine-Tabs-list::before {
|
|
165
|
+
border-color: var(--color-border);
|
|
166
|
+
}
|
|
167
|
+
[data-mantine-color-scheme] .mantine-Tabs-tab {
|
|
168
|
+
color: var(--color-text);
|
|
169
|
+
border-color: transparent;
|
|
170
|
+
background-color: transparent;
|
|
171
|
+
transition:
|
|
172
|
+
background-color var(--duration-fast) var(--easing),
|
|
173
|
+
border-color var(--duration-fast) var(--easing),
|
|
174
|
+
color var(--duration-fast) var(--easing);
|
|
161
175
|
}
|
|
162
176
|
[data-mantine-color-scheme] .mantine-Tabs-tab:not([data-active]):hover {
|
|
163
|
-
background-color:
|
|
177
|
+
background-color: var(--tab-hover-color);
|
|
178
|
+
border-color: var(--color-border);
|
|
164
179
|
}
|
|
165
180
|
[data-mantine-color-scheme] .mantine-Tabs-tab[data-active],
|
|
166
181
|
[data-mantine-color-scheme] .mantine-Tabs-tab[data-active]:hover {
|
|
182
|
+
color: var(--color-text);
|
|
167
183
|
background-color: transparent;
|
|
184
|
+
border-color: var(--color-primary);
|
|
168
185
|
}
|
|
169
186
|
.mantine-Pagination-control:not([data-active]) {
|
|
170
187
|
background: var(--color-surface);
|
|
@@ -1,11 +1,11 @@
|
|
|
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-JMI7L7Y7.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-NYBEU5TE.js';
|
|
9
9
|
import '../chunk-T6INEVX6.js';
|
|
10
10
|
import '../chunk-2IFYDILW.js';
|
|
11
11
|
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.5",
|
|
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",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"msw": "^2.11.0",
|
|
36
36
|
"vitest": "^3.2.4",
|
|
37
37
|
"@repo/core": "0.15.1",
|
|
38
|
-
"@repo/
|
|
39
|
-
"@repo/
|
|
38
|
+
"@repo/typescript-config": "0.0.0",
|
|
39
|
+
"@repo/eslint-config": "0.0.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@dagrejs/dagre": "^1.1.4",
|
|
@@ -84,6 +84,10 @@
|
|
|
84
84
|
"types": "./dist/features/crm/index.d.ts",
|
|
85
85
|
"import": "./dist/features/crm/index.js"
|
|
86
86
|
},
|
|
87
|
+
"./features/knowledge": {
|
|
88
|
+
"types": "./dist/features/knowledge/index.d.ts",
|
|
89
|
+
"import": "./dist/features/knowledge/index.js"
|
|
90
|
+
},
|
|
87
91
|
"./features/dashboard": {
|
|
88
92
|
"types": "./dist/features/dashboard/index.d.ts",
|
|
89
93
|
"import": "./dist/features/dashboard/index.js"
|
|
@@ -152,6 +156,14 @@
|
|
|
152
156
|
"types": "./dist/execution/index.d.ts",
|
|
153
157
|
"import": "./dist/execution/index.js"
|
|
154
158
|
},
|
|
159
|
+
"./knowledge": {
|
|
160
|
+
"types": "./dist/knowledge/index.d.ts",
|
|
161
|
+
"import": "./dist/knowledge/index.js"
|
|
162
|
+
},
|
|
163
|
+
"./vite-plugin-knowledge": {
|
|
164
|
+
"types": "./dist/vite-plugin-knowledge/index.d.ts",
|
|
165
|
+
"import": "./dist/vite-plugin-knowledge/index.js"
|
|
166
|
+
},
|
|
155
167
|
"./router": {
|
|
156
168
|
"types": "./dist/router/index.d.ts",
|
|
157
169
|
"import": "./dist/router/index.js"
|
|
@@ -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 { useSupabase } from './chunk-BRXELOHC.js';
|
|
2
1
|
import { observabilityKeys } from './chunk-VKMNWHTL.js';
|
|
3
2
|
import { showApiErrorNotification, showSuccessNotification, projectKeys, noteKeys, taskKeys, milestoneKeys } from './chunk-HKBEURCV.js';
|
|
3
|
+
import { useSupabase } from './chunk-BRXELOHC.js';
|
|
4
4
|
import { GRAPH_CONSTANTS } from './chunk-22UVE3RA.js';
|
|
5
5
|
import { useNotificationAdapter, deriveActions } from './chunk-JMI7L7Y7.js';
|
|
6
6
|
import { useOptionalElevasisFeatures } from './chunk-V3HUIZJX.js';
|
|
@@ -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
|
|