@elevasis/ui 2.25.3 → 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.
Files changed (60) hide show
  1. package/dist/app/index.css +19 -2
  2. package/dist/charts/index.js +1 -1
  3. package/dist/{chunk-IX7LWINC.js → chunk-3KY2GNPE.js} +2 -2
  4. package/dist/{chunk-RSG2O3HF.js → chunk-5BJXMZN4.js} +2 -2
  5. package/dist/{chunk-442LZPIR.js → chunk-ECNNI3NT.js} +2 -1
  6. package/dist/{chunk-JDQSCEEF.js → chunk-F7JDHS2I.js} +2 -2
  7. package/dist/{chunk-3AHEHVJ6.js → chunk-FVKLHLF4.js} +1 -1
  8. package/dist/{chunk-L4RT57WU.js → chunk-KINQW4JT.js} +1 -1
  9. package/dist/{chunk-UV5BY6DD.js → chunk-N2AP4I5N.js} +7 -7
  10. package/dist/{chunk-7LJUTTXU.js → chunk-NHHCUECV.js} +1 -1
  11. package/dist/{chunk-VOVZLL23.js → chunk-QNCVK3ZF.js} +1 -1
  12. package/dist/{chunk-26HQMR7S.js → chunk-S66IQSSR.js} +1 -1
  13. package/dist/{chunk-IYIZYMIE.js → chunk-TAIX4NO3.js} +1 -1
  14. package/dist/{chunk-4ZFBVND2.js → chunk-V3HUIZJX.js} +19 -7
  15. package/dist/{chunk-QB2CC4VH.js → chunk-VMAWXEVG.js} +2 -47
  16. package/dist/{chunk-PNLJIPV5.js → chunk-VMJVQAFZ.js} +1 -1
  17. package/dist/components/index.css +19 -2
  18. package/dist/components/index.js +22 -22
  19. package/dist/components/navigation/index.css +19 -2
  20. package/dist/components/navigation/index.js +2 -2
  21. package/dist/features/auth/index.css +19 -2
  22. package/dist/features/crm/index.css +19 -2
  23. package/dist/features/crm/index.js +8 -8
  24. package/dist/features/dashboard/index.css +19 -2
  25. package/dist/features/dashboard/index.js +8 -8
  26. package/dist/features/delivery/index.css +19 -2
  27. package/dist/features/delivery/index.js +9 -9
  28. package/dist/features/knowledge/index.d.ts +33 -0
  29. package/dist/features/knowledge/index.js +10 -0
  30. package/dist/features/lead-gen/index.css +19 -2
  31. package/dist/features/lead-gen/index.js +8 -8
  32. package/dist/features/monitoring/index.css +19 -2
  33. package/dist/features/monitoring/index.js +9 -9
  34. package/dist/features/monitoring/requests/index.css +19 -2
  35. package/dist/features/monitoring/requests/index.js +7 -7
  36. package/dist/features/operations/index.css +19 -2
  37. package/dist/features/operations/index.js +12 -12
  38. package/dist/features/settings/index.css +19 -2
  39. package/dist/features/settings/index.js +8 -8
  40. package/dist/hooks/delivery/index.css +19 -2
  41. package/dist/hooks/index.css +19 -2
  42. package/dist/hooks/index.js +7 -7
  43. package/dist/hooks/published.css +19 -2
  44. package/dist/hooks/published.js +7 -7
  45. package/dist/index.css +19 -2
  46. package/dist/index.d.ts +4 -1
  47. package/dist/index.js +7 -7
  48. package/dist/knowledge/index.d.ts +633 -0
  49. package/dist/knowledge/index.js +595 -0
  50. package/dist/organization/index.css +19 -2
  51. package/dist/provider/index.css +19 -2
  52. package/dist/provider/index.d.ts +4 -1
  53. package/dist/provider/index.js +5 -5
  54. package/dist/provider/published.css +19 -2
  55. package/dist/provider/published.d.ts +4 -1
  56. package/dist/provider/published.js +4 -4
  57. package/dist/vite-plugin-knowledge/index.d.ts +37 -0
  58. package/dist/vite-plugin-knowledge/index.js +67 -0
  59. package/package.json +15 -3
  60. package/src/knowledge/README.md +31 -0
@@ -3707,6 +3707,9 @@ interface SSEConnectionManagerLike {
3707
3707
  }>;
3708
3708
  }
3709
3709
 
3710
+ type ElevasisOrganizationModel = Omit<OrganizationModel, 'knowledge'> & {
3711
+ knowledge?: OrganizationModel['knowledge'];
3712
+ };
3710
3713
  type FeatureSidebarComponent = ComponentType;
3711
3714
  type FeatureIconComponent = ComponentType<{
3712
3715
  size?: number;
@@ -3777,7 +3780,7 @@ interface OrganizationGraphContextValue {
3777
3780
  }
3778
3781
  interface ElevasisFeaturesProviderProps {
3779
3782
  features: FeatureModule[];
3780
- organizationModel?: OrganizationModel;
3783
+ organizationModel?: ElevasisOrganizationModel;
3781
3784
  timeRange?: TimeRange;
3782
3785
  operationsApiUrl?: string;
3783
3786
  operationsSSEManager?: SSEConnectionManagerLike;
@@ -1,15 +1,15 @@
1
- export { createTestFeaturesProvider } from '../chunk-PNLJIPV5.js';
1
+ 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-IYIZYMIE.js';
6
- export { CrmActionsProvider, ElevasisCoreProvider, ListActionsProvider, NotificationProvider, useCrmActions, useListActions, useNotificationAdapter } from '../chunk-JMI7L7Y7.js';
7
- export { ElevasisFeaturesProvider, useElevasisFeatures, useOptionalElevasisFeatures } from '../chunk-4ZFBVND2.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=dark] .mantine-Tabs-root {
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: color-mix(in srgb, var(--color-surface-hover) 70%, transparent);
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);
@@ -3670,6 +3670,9 @@ interface SSEConnectionManagerLike {
3670
3670
  }>;
3671
3671
  }
3672
3672
 
3673
+ type ElevasisOrganizationModel = Omit<OrganizationModel, 'knowledge'> & {
3674
+ knowledge?: OrganizationModel['knowledge'];
3675
+ };
3673
3676
  type FeatureSidebarComponent = ComponentType;
3674
3677
  type FeatureIconComponent = ComponentType<{
3675
3678
  size?: number;
@@ -3740,7 +3743,7 @@ interface OrganizationGraphContextValue {
3740
3743
  }
3741
3744
  interface ElevasisFeaturesProviderProps {
3742
3745
  features: FeatureModule[];
3743
- organizationModel?: OrganizationModel;
3746
+ organizationModel?: ElevasisOrganizationModel;
3744
3747
  timeRange?: TimeRange;
3745
3748
  operationsApiUrl?: string;
3746
3749
  operationsSSEManager?: SSEConnectionManagerLike;
@@ -1,11 +1,11 @@
1
- export { FeatureShell } from '../chunk-IYIZYMIE.js';
2
- export { ElevasisCoreProvider, NotificationProvider, useNotificationAdapter } from '../chunk-JMI7L7Y7.js';
3
- export { ElevasisFeaturesProvider, useElevasisFeatures, useOptionalElevasisFeatures } from '../chunk-4ZFBVND2.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",
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/eslint-config": "0.0.0",
39
- "@repo/typescript-config": "0.0.0"
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`.