@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
@@ -0,0 +1,633 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { z } from 'zod';
3
+ import { ComponentType, ReactNode } from 'react';
4
+
5
+ /**
6
+ * Command View Types
7
+ *
8
+ * Unified type definitions for the Command View graph visualization.
9
+ * These types are used by both backend serialization and frontend rendering.
10
+ *
11
+ * Command View shows the resource graph: agents, workflows, triggers, integrations,
12
+ * external resources, and human checkpoints with their relationships.
13
+ */
14
+
15
+ /**
16
+ * Relationship types between resources
17
+ *
18
+ * - triggers: Resource initiates/starts another resource (orange)
19
+ * - uses: Resource uses an integration (teal)
20
+ * - approval: Resource requires human approval (yellow)
21
+ */
22
+ type RelationshipType = 'triggers' | 'uses' | 'approval';
23
+
24
+ declare const OrgKnowledgeNodeSchema: z.ZodObject<{
25
+ id: z.ZodString;
26
+ kind: z.ZodEnum<{
27
+ playbook: "playbook";
28
+ strategy: "strategy";
29
+ reference: "reference";
30
+ }>;
31
+ title: z.ZodString;
32
+ summary: z.ZodString;
33
+ body: z.ZodString;
34
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
35
+ nodeId: z.ZodString;
36
+ }, z.core.$strip>>>;
37
+ ownerIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
38
+ updatedAt: z.ZodString;
39
+ }, z.core.$strip>;
40
+
41
+ declare const OrganizationModelSchema: z.ZodObject<{
42
+ version: z.ZodDefault<z.ZodLiteral<1>>;
43
+ features: z.ZodDefault<z.ZodArray<z.ZodObject<{
44
+ id: z.ZodString;
45
+ label: z.ZodString;
46
+ description: z.ZodOptional<z.ZodString>;
47
+ enabled: z.ZodDefault<z.ZodBoolean>;
48
+ path: z.ZodOptional<z.ZodString>;
49
+ icon: z.ZodOptional<z.ZodString>;
50
+ color: z.ZodOptional<z.ZodString>;
51
+ uiPosition: z.ZodOptional<z.ZodEnum<{
52
+ "sidebar-primary": "sidebar-primary";
53
+ "sidebar-bottom": "sidebar-bottom";
54
+ }>>;
55
+ requiresAdmin: z.ZodOptional<z.ZodBoolean>;
56
+ devOnly: z.ZodOptional<z.ZodBoolean>;
57
+ }, z.core.$strip>>>;
58
+ branding: z.ZodObject<{
59
+ organizationName: z.ZodString;
60
+ productName: z.ZodString;
61
+ shortName: z.ZodString;
62
+ description: z.ZodOptional<z.ZodString>;
63
+ logos: z.ZodDefault<z.ZodObject<{
64
+ light: z.ZodOptional<z.ZodString>;
65
+ dark: z.ZodOptional<z.ZodString>;
66
+ }, z.core.$strip>>;
67
+ }, z.core.$strip>;
68
+ navigation: z.ZodDefault<z.ZodObject<{
69
+ defaultSurfaceId: z.ZodOptional<z.ZodString>;
70
+ surfaces: z.ZodDefault<z.ZodArray<z.ZodObject<{
71
+ id: z.ZodString;
72
+ label: z.ZodString;
73
+ path: z.ZodString;
74
+ surfaceType: z.ZodEnum<{
75
+ settings: "settings";
76
+ page: "page";
77
+ dashboard: "dashboard";
78
+ graph: "graph";
79
+ detail: "detail";
80
+ list: "list";
81
+ }>;
82
+ description: z.ZodOptional<z.ZodString>;
83
+ enabled: z.ZodDefault<z.ZodBoolean>;
84
+ devOnly: z.ZodOptional<z.ZodBoolean>;
85
+ icon: z.ZodOptional<z.ZodString>;
86
+ featureId: z.ZodOptional<z.ZodString>;
87
+ featureIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
88
+ entityIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
89
+ resourceIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
90
+ capabilityIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
91
+ parentId: z.ZodOptional<z.ZodString>;
92
+ }, z.core.$strip>>>;
93
+ groups: z.ZodDefault<z.ZodArray<z.ZodObject<{
94
+ id: z.ZodString;
95
+ label: z.ZodString;
96
+ placement: z.ZodString;
97
+ surfaceIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
98
+ }, z.core.$strip>>>;
99
+ }, z.core.$strip>>;
100
+ sales: z.ZodObject<{
101
+ entityId: z.ZodString;
102
+ defaultPipelineId: z.ZodString;
103
+ pipelines: z.ZodArray<z.ZodObject<{
104
+ id: z.ZodString;
105
+ label: z.ZodString;
106
+ description: z.ZodOptional<z.ZodString>;
107
+ entityId: z.ZodString;
108
+ stages: z.ZodArray<z.ZodObject<{
109
+ label: z.ZodString;
110
+ description: z.ZodOptional<z.ZodString>;
111
+ color: z.ZodOptional<z.ZodString>;
112
+ icon: z.ZodOptional<z.ZodString>;
113
+ id: z.ZodString;
114
+ order: z.ZodNumber;
115
+ semanticClass: z.ZodEnum<{
116
+ open: "open";
117
+ active: "active";
118
+ nurturing: "nurturing";
119
+ closed_won: "closed_won";
120
+ closed_lost: "closed_lost";
121
+ }>;
122
+ surfaceIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
123
+ resourceIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
124
+ }, z.core.$strip>>;
125
+ }, z.core.$strip>>;
126
+ }, z.core.$strip>;
127
+ prospecting: z.ZodObject<{
128
+ listEntityId: z.ZodString;
129
+ companyEntityId: z.ZodString;
130
+ contactEntityId: z.ZodString;
131
+ description: z.ZodOptional<z.ZodString>;
132
+ companyStages: z.ZodArray<z.ZodObject<{
133
+ label: z.ZodString;
134
+ description: z.ZodOptional<z.ZodString>;
135
+ color: z.ZodOptional<z.ZodString>;
136
+ icon: z.ZodOptional<z.ZodString>;
137
+ id: z.ZodString;
138
+ order: z.ZodNumber;
139
+ }, z.core.$strip>>;
140
+ contactStages: z.ZodArray<z.ZodObject<{
141
+ label: z.ZodString;
142
+ description: z.ZodOptional<z.ZodString>;
143
+ color: z.ZodOptional<z.ZodString>;
144
+ icon: z.ZodOptional<z.ZodString>;
145
+ id: z.ZodString;
146
+ order: z.ZodNumber;
147
+ }, z.core.$strip>>;
148
+ defaultBuildTemplateId: z.ZodString;
149
+ buildTemplates: z.ZodArray<z.ZodObject<{
150
+ label: z.ZodString;
151
+ description: z.ZodOptional<z.ZodString>;
152
+ color: z.ZodOptional<z.ZodString>;
153
+ icon: z.ZodOptional<z.ZodString>;
154
+ id: z.ZodString;
155
+ steps: z.ZodArray<z.ZodObject<{
156
+ label: z.ZodString;
157
+ description: z.ZodOptional<z.ZodString>;
158
+ color: z.ZodOptional<z.ZodString>;
159
+ icon: z.ZodOptional<z.ZodString>;
160
+ id: z.ZodString;
161
+ primaryEntity: z.ZodEnum<{
162
+ company: "company";
163
+ contact: "contact";
164
+ }>;
165
+ outputs: z.ZodArray<z.ZodEnum<{
166
+ company: "company";
167
+ contact: "contact";
168
+ export: "export";
169
+ }>>;
170
+ stageKey: z.ZodString;
171
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
172
+ dependencyMode: z.ZodLiteral<"per-record-eligibility">;
173
+ capabilityKey: z.ZodString;
174
+ defaultBatchSize: z.ZodNumber;
175
+ maxBatchSize: z.ZodNumber;
176
+ }, z.core.$strip>>;
177
+ }, z.core.$strip>>;
178
+ }, z.core.$strip>;
179
+ projects: z.ZodObject<{
180
+ projectEntityId: z.ZodString;
181
+ milestoneEntityId: z.ZodString;
182
+ taskEntityId: z.ZodString;
183
+ projectStatuses: z.ZodArray<z.ZodObject<{
184
+ label: z.ZodString;
185
+ description: z.ZodOptional<z.ZodString>;
186
+ color: z.ZodOptional<z.ZodString>;
187
+ icon: z.ZodOptional<z.ZodString>;
188
+ id: z.ZodString;
189
+ order: z.ZodNumber;
190
+ }, z.core.$strip>>;
191
+ milestoneStatuses: z.ZodArray<z.ZodObject<{
192
+ label: z.ZodString;
193
+ description: z.ZodOptional<z.ZodString>;
194
+ color: z.ZodOptional<z.ZodString>;
195
+ icon: z.ZodOptional<z.ZodString>;
196
+ id: z.ZodString;
197
+ order: z.ZodNumber;
198
+ }, z.core.$strip>>;
199
+ taskStatuses: z.ZodArray<z.ZodObject<{
200
+ label: z.ZodString;
201
+ description: z.ZodOptional<z.ZodString>;
202
+ color: z.ZodOptional<z.ZodString>;
203
+ icon: z.ZodOptional<z.ZodString>;
204
+ id: z.ZodString;
205
+ order: z.ZodNumber;
206
+ }, z.core.$strip>>;
207
+ }, z.core.$strip>;
208
+ identity: z.ZodDefault<z.ZodObject<{
209
+ mission: z.ZodDefault<z.ZodString>;
210
+ vision: z.ZodDefault<z.ZodString>;
211
+ legalName: z.ZodDefault<z.ZodString>;
212
+ entityType: z.ZodDefault<z.ZodString>;
213
+ jurisdiction: z.ZodDefault<z.ZodString>;
214
+ industryCategory: z.ZodDefault<z.ZodString>;
215
+ geographicFocus: z.ZodDefault<z.ZodString>;
216
+ timeZone: z.ZodDefault<z.ZodString>;
217
+ businessHours: z.ZodDefault<z.ZodObject<{
218
+ monday: z.ZodOptional<z.ZodObject<{
219
+ open: z.ZodString;
220
+ close: z.ZodString;
221
+ }, z.core.$strip>>;
222
+ tuesday: z.ZodOptional<z.ZodObject<{
223
+ open: z.ZodString;
224
+ close: z.ZodString;
225
+ }, z.core.$strip>>;
226
+ wednesday: z.ZodOptional<z.ZodObject<{
227
+ open: z.ZodString;
228
+ close: z.ZodString;
229
+ }, z.core.$strip>>;
230
+ thursday: z.ZodOptional<z.ZodObject<{
231
+ open: z.ZodString;
232
+ close: z.ZodString;
233
+ }, z.core.$strip>>;
234
+ friday: z.ZodOptional<z.ZodObject<{
235
+ open: z.ZodString;
236
+ close: z.ZodString;
237
+ }, z.core.$strip>>;
238
+ saturday: z.ZodOptional<z.ZodObject<{
239
+ open: z.ZodString;
240
+ close: z.ZodString;
241
+ }, z.core.$strip>>;
242
+ sunday: z.ZodOptional<z.ZodObject<{
243
+ open: z.ZodString;
244
+ close: z.ZodString;
245
+ }, z.core.$strip>>;
246
+ }, z.core.$strip>>;
247
+ clientBrief: z.ZodDefault<z.ZodString>;
248
+ }, z.core.$strip>>;
249
+ customers: z.ZodDefault<z.ZodObject<{
250
+ segments: z.ZodDefault<z.ZodArray<z.ZodObject<{
251
+ id: z.ZodString;
252
+ name: z.ZodDefault<z.ZodString>;
253
+ description: z.ZodDefault<z.ZodString>;
254
+ jobsToBeDone: z.ZodDefault<z.ZodString>;
255
+ pains: z.ZodDefault<z.ZodArray<z.ZodString>>;
256
+ gains: z.ZodDefault<z.ZodArray<z.ZodString>>;
257
+ firmographics: z.ZodDefault<z.ZodObject<{
258
+ industry: z.ZodOptional<z.ZodString>;
259
+ companySize: z.ZodOptional<z.ZodString>;
260
+ region: z.ZodOptional<z.ZodString>;
261
+ }, z.core.$strip>>;
262
+ valueProp: z.ZodDefault<z.ZodString>;
263
+ }, z.core.$strip>>>;
264
+ }, z.core.$strip>>;
265
+ offerings: z.ZodDefault<z.ZodObject<{
266
+ products: z.ZodDefault<z.ZodArray<z.ZodObject<{
267
+ id: z.ZodString;
268
+ name: z.ZodDefault<z.ZodString>;
269
+ description: z.ZodDefault<z.ZodString>;
270
+ pricingModel: z.ZodDefault<z.ZodEnum<{
271
+ custom: "custom";
272
+ "one-time": "one-time";
273
+ subscription: "subscription";
274
+ "usage-based": "usage-based";
275
+ }>>;
276
+ price: z.ZodDefault<z.ZodNumber>;
277
+ currency: z.ZodDefault<z.ZodString>;
278
+ targetSegmentIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
279
+ deliveryFeatureId: z.ZodOptional<z.ZodString>;
280
+ }, z.core.$strip>>>;
281
+ }, z.core.$strip>>;
282
+ roles: z.ZodDefault<z.ZodObject<{
283
+ roles: z.ZodDefault<z.ZodArray<z.ZodObject<{
284
+ id: z.ZodString;
285
+ title: z.ZodString;
286
+ responsibilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
287
+ reportsToId: z.ZodOptional<z.ZodString>;
288
+ heldBy: z.ZodOptional<z.ZodString>;
289
+ }, z.core.$strip>>>;
290
+ }, z.core.$strip>>;
291
+ goals: z.ZodDefault<z.ZodObject<{
292
+ objectives: z.ZodDefault<z.ZodArray<z.ZodObject<{
293
+ id: z.ZodString;
294
+ description: z.ZodString;
295
+ periodStart: z.ZodString;
296
+ periodEnd: z.ZodString;
297
+ keyResults: z.ZodDefault<z.ZodArray<z.ZodObject<{
298
+ id: z.ZodString;
299
+ description: z.ZodString;
300
+ targetMetric: z.ZodString;
301
+ currentValue: z.ZodDefault<z.ZodNumber>;
302
+ targetValue: z.ZodOptional<z.ZodNumber>;
303
+ }, z.core.$strip>>>;
304
+ }, z.core.$strip>>>;
305
+ }, z.core.$strip>>;
306
+ statuses: z.ZodDefault<z.ZodObject<{
307
+ entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
308
+ id: z.ZodString;
309
+ label: z.ZodString;
310
+ semanticClass: z.ZodEnum<{
311
+ "delivery.project": "delivery.project";
312
+ "delivery.milestone": "delivery.milestone";
313
+ "delivery.task": "delivery.task";
314
+ queue: "queue";
315
+ execution: "execution";
316
+ schedule: "schedule";
317
+ "schedule.run": "schedule.run";
318
+ request: "request";
319
+ }>;
320
+ category: z.ZodOptional<z.ZodString>;
321
+ }, z.core.$strip>>>;
322
+ }, z.core.$strip>>;
323
+ operations: z.ZodDefault<z.ZodObject<{
324
+ entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
325
+ id: z.ZodString;
326
+ label: z.ZodString;
327
+ semanticClass: z.ZodEnum<{
328
+ queue: "queue";
329
+ executions: "executions";
330
+ sessions: "sessions";
331
+ notifications: "notifications";
332
+ schedules: "schedules";
333
+ }>;
334
+ featureId: z.ZodOptional<z.ZodString>;
335
+ supportedStatusSemanticClass: z.ZodOptional<z.ZodArray<z.ZodString>>;
336
+ }, z.core.$strip>>>;
337
+ }, z.core.$strip>>;
338
+ knowledge: z.ZodDefault<z.ZodObject<{
339
+ nodes: z.ZodDefault<z.ZodArray<z.ZodObject<{
340
+ id: z.ZodString;
341
+ kind: z.ZodEnum<{
342
+ playbook: "playbook";
343
+ strategy: "strategy";
344
+ reference: "reference";
345
+ }>;
346
+ title: z.ZodString;
347
+ summary: z.ZodString;
348
+ body: z.ZodString;
349
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
350
+ nodeId: z.ZodString;
351
+ }, z.core.$strip>>>;
352
+ ownerIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
353
+ updatedAt: z.ZodString;
354
+ }, z.core.$strip>>>;
355
+ }, z.core.$strip>>;
356
+ }, z.core.$strip>;
357
+
358
+ type OrganizationModel = z.infer<typeof OrganizationModelSchema>;
359
+ type OrgKnowledgeNode = z.infer<typeof OrgKnowledgeNodeSchema>;
360
+
361
+ type OrganizationGraphNodeKind = 'organization' | 'feature' | 'surface' | 'entity' | 'capability' | 'resource' | 'knowledge';
362
+ type OrganizationGraphEdgeKind = 'contains' | 'references' | 'exposes' | 'maps_to' | 'operates-on' | 'uses' | 'governs';
363
+
364
+ interface OrganizationGraphNode {
365
+ id: string;
366
+ kind: OrganizationGraphNodeKind;
367
+ label: string;
368
+ sourceId?: string;
369
+ description?: string;
370
+ enabled?: boolean;
371
+ featureId?: string;
372
+ resourceType?: 'workflow' | 'agent' | 'trigger' | 'integration' | 'external' | 'human_checkpoint';
373
+ }
374
+ interface OrganizationGraphEdge {
375
+ id: string;
376
+ kind: OrganizationGraphEdgeKind;
377
+ sourceId: string;
378
+ targetId: string;
379
+ label?: string;
380
+ relationshipType?: RelationshipType;
381
+ }
382
+ interface OrganizationGraph {
383
+ version: 1;
384
+ organizationModelVersion: OrganizationModel['version'];
385
+ nodes: OrganizationGraphNode[];
386
+ edges: OrganizationGraphEdge[];
387
+ }
388
+
389
+ interface KnowledgeBrowserProps {
390
+ /** Built organization graph. */
391
+ graph: OrganizationGraph;
392
+ /** All knowledge nodes (OM authoring shape). */
393
+ knowledgeNodes: OrgKnowledgeNode[];
394
+ /** Optional id of the node to render in the right pane on first mount. */
395
+ initialNodeId?: string;
396
+ /** Optional callback invoked when a graph edge chip is clicked in the node view. */
397
+ onNavigateToNode?: (graphNodeId: string) => void;
398
+ }
399
+ /**
400
+ * Composed default browser for the knowledge map.
401
+ *
402
+ * Layout: search bar at top; left pane is a by-feature tree; right pane shows
403
+ * either the search-results list (when a search is active) or the selected
404
+ * node detail. Read-only; mutation is out of scope for Phase 1.
405
+ */
406
+ declare function KnowledgeBrowser({ graph, knowledgeNodes, initialNodeId, onNavigateToNode }: KnowledgeBrowserProps): react_jsx_runtime.JSX.Element;
407
+
408
+ interface KnowledgeTreeProps {
409
+ /** Built organization graph — used to enumerate features and resolve `governs` edges. */
410
+ graph: OrganizationGraph;
411
+ /** All knowledge nodes (the OM authoring shape; queries need this for body/links). */
412
+ knowledgeNodes: OrgKnowledgeNode[];
413
+ /** Called when a knowledge node is selected. */
414
+ onSelectNode: (node: OrgKnowledgeNode) => void;
415
+ /** Currently selected node id (highlights the active row). */
416
+ selectedNodeId?: string;
417
+ }
418
+ /**
419
+ * By-feature primary tree. Renders each feature in the graph with its governing
420
+ * knowledge nodes nested underneath. Features with no governing nodes are
421
+ * omitted to keep the tree focused.
422
+ */
423
+ declare function KnowledgeTree({ graph, knowledgeNodes, onSelectNode, selectedNodeId }: KnowledgeTreeProps): react_jsx_runtime.JSX.Element;
424
+
425
+ interface KnowledgeNodeListProps {
426
+ /** Nodes to render. Usually the result of a query (byFeature, byKind, search). */
427
+ nodes: OrgKnowledgeNode[];
428
+ /** Called when the user selects a node. */
429
+ onSelect: (node: OrgKnowledgeNode) => void;
430
+ /** Id of the currently selected node (highlights the active card). */
431
+ selectedNodeId?: string;
432
+ /** Optional label shown above the list (e.g. "Playbooks" or "3 results"). */
433
+ label?: string;
434
+ }
435
+ /**
436
+ * Flat list of knowledge node cards.
437
+ *
438
+ * Each card shows title, kind badge, and summary. Clicking a card calls
439
+ * `onSelect`. The active card (matching `selectedNodeId`) is highlighted
440
+ * using the `--active-background` token.
441
+ */
442
+ declare function KnowledgeNodeList({ nodes, onSelect, selectedNodeId, label }: KnowledgeNodeListProps): react_jsx_runtime.JSX.Element;
443
+
444
+ interface KnowledgeNodeViewProps {
445
+ /** The knowledge node to display. */
446
+ node: OrgKnowledgeNode;
447
+ /** The organization graph — used to resolve edge relationships. */
448
+ graph: OrganizationGraph;
449
+ /**
450
+ * Optional callback when the user clicks a graph edge chip (e.g. to navigate
451
+ * to the related node or feature). The raw graph node id is passed.
452
+ */
453
+ onNavigateToNode?: (graphNodeId: string) => void;
454
+ /**
455
+ * Optional extra components to merge into the MDX allowlist for this view.
456
+ * Passed directly to the internal `KnowledgeMDXProvider` wrapper.
457
+ */
458
+ extraComponents?: Record<string, React.ComponentType<any>>;
459
+ }
460
+ /**
461
+ * Full single-node view: title, kind badge, summary, compiled MDX body, and
462
+ * an edge sidecar listing outgoing `governs` and incoming `governedBy` links.
463
+ *
464
+ * Internally wraps the MDX body in a `KnowledgeMDXProvider` so `KNOWLEDGE_BODIES`
465
+ * components receive the standard allowlist. Pass `extraComponents` to extend
466
+ * or override allowlist entries for this view only.
467
+ *
468
+ * @example
469
+ * ```tsx
470
+ * <KnowledgeNodeView
471
+ * node={selectedNode}
472
+ * graph={graph}
473
+ * onNavigateToNode={(id) => navigate(`/knowledge/${id}`)}
474
+ * />
475
+ * ```
476
+ */
477
+ declare function KnowledgeNodeView({ node, graph, onNavigateToNode, extraComponents }: KnowledgeNodeViewProps): react_jsx_runtime.JSX.Element;
478
+
479
+ interface KnowledgeSearchBarProps {
480
+ /** All available knowledge nodes — used to resolve hit ids to nodes. */
481
+ knowledgeNodes: OrgKnowledgeNode[];
482
+ /**
483
+ * Called with the ranked subset of nodes matching the current query.
484
+ * Called with `null` when the search bar is cleared (parent restores default view).
485
+ */
486
+ onResults: (nodes: OrgKnowledgeNode[] | null) => void;
487
+ /** Placeholder text. Defaults to "Search knowledge…". */
488
+ placeholder?: string;
489
+ }
490
+ /**
491
+ * Client-side full-text search bar over the knowledge index.
492
+ *
493
+ * On mount, builds an in-memory index from `_generated/knowledge-search-index.json`
494
+ * (title, summary, bodyText). As the user types, calls `onResults` with ranked
495
+ * `OrgKnowledgeNode[]`. Clearing the input calls `onResults(null)` so the parent
496
+ * can restore its default tree/list view.
497
+ *
498
+ * The index is intentionally scoped to the generated snapshot — it does not
499
+ * re-index on `knowledgeNodes` changes at runtime (Phase 1 is read-only).
500
+ */
501
+ declare function KnowledgeSearchBar({ knowledgeNodes, onResults, placeholder }: KnowledgeSearchBarProps): react_jsx_runtime.JSX.Element;
502
+
503
+ /**
504
+ * Shared nav-item shape used by feature sidebar middle components.
505
+ *
506
+ * Matches the subset of {@link SubshellNavItemProps} that the existing
507
+ * hardcoded item arrays use. Consumers import this type alongside the
508
+ * exported item arrays (e.g. `CRM_ITEMS`) to type their custom arrays.
509
+ *
510
+ * @example
511
+ * import { NavItem, CRM_ITEMS } from '@elevasis/ui/features/crm'
512
+ *
513
+ * const customItems: NavItem[] = [
514
+ * ...CRM_ITEMS,
515
+ * { label: 'Reports', to: '/crm/reports', icon: IconFileText, exact: false },
516
+ * ]
517
+ */
518
+ interface NavItem {
519
+ /** Display label for the nav entry. */
520
+ label: string;
521
+ /** Route path the item links to. */
522
+ to: string;
523
+ /** Tabler icon component (or any component accepting `size` + `style`). */
524
+ icon: ComponentType<{
525
+ size?: number;
526
+ style?: React.CSSProperties;
527
+ }>;
528
+ /**
529
+ * When `true`, the item is only active when the path matches exactly.
530
+ * When `false`, it is active for any path that starts with `to`.
531
+ */
532
+ exact: boolean;
533
+ }
534
+
535
+ interface KnowledgeSidebarMiddleProps {
536
+ /** Override the default nav items. Defaults to {@link KNOWLEDGE_ITEMS}. */
537
+ items?: NavItem[];
538
+ }
539
+ /**
540
+ * Sidebar middle section for the Knowledge feature.
541
+ *
542
+ * Mirrors the `CrmSidebarMiddle` pattern. Pass `items` to extend or replace
543
+ * the default nav entries (e.g. add owner-scoped sections for a specific org).
544
+ *
545
+ * @example
546
+ * ```tsx
547
+ * <KnowledgeSidebarMiddle items={[...KNOWLEDGE_ITEMS, { label: 'Runbooks', ... }]} />
548
+ * ```
549
+ */
550
+ declare const KnowledgeSidebarMiddle: ({ items }?: KnowledgeSidebarMiddleProps) => react_jsx_runtime.JSX.Element;
551
+
552
+ /**
553
+ * Default sidebar nav items for the Knowledge feature.
554
+ *
555
+ * Mirrors the `CRM_ITEMS` shape so it can be used directly with
556
+ * `KnowledgeSidebarMiddle` or spread into a custom items array.
557
+ *
558
+ * @example
559
+ * ```ts
560
+ * import { KNOWLEDGE_ITEMS } from '@elevasis/ui/knowledge'
561
+ * const customItems: NavItem[] = [
562
+ * ...KNOWLEDGE_ITEMS,
563
+ * { label: 'Internal Runbooks', to: '/knowledge/by-owner/internal', icon: IconBook, exact: false },
564
+ * ]
565
+ * ```
566
+ */
567
+ declare const KNOWLEDGE_ITEMS: NavItem[];
568
+
569
+ /**
570
+ * Default v1 component allowlist for knowledge MDX bodies.
571
+ *
572
+ * Knowledge authors may use these components inside `body` strings.
573
+ * Code blocks (`pre` / `code`) are handled by the MDX runtime's default
574
+ * element mapping and do not need an explicit entry here; they receive
575
+ * standard Mantine `Code` / `pre` wrappers via the provider's MDX config.
576
+ *
577
+ * Consumers may extend this map via `KnowledgeMDXProvider`'s
578
+ * `extraComponents` prop. Extra entries override matching default keys.
579
+ */
580
+ declare const KNOWLEDGE_ALLOWLIST: Record<string, ComponentType<any>>;
581
+
582
+ /**
583
+ * The shape of the merged component map available to knowledge MDX renderers.
584
+ * Keys are MDX component names (e.g. "Card", "Callout"); values are React component types.
585
+ */
586
+ type KnowledgeAllowlistMap = Record<string, ComponentType<any>>;
587
+ interface KnowledgeMDXProviderProps {
588
+ /**
589
+ * Additional components to merge into the default allowlist.
590
+ * Extra entries take precedence over the defaults, enabling consumers
591
+ * to replace (e.g.) the default `Card` with a project-specific variant.
592
+ */
593
+ extraComponents?: Record<string, ComponentType<any>>;
594
+ children: ReactNode;
595
+ }
596
+ /**
597
+ * Provides the knowledge MDX component allowlist to its subtree via React context.
598
+ *
599
+ * Wrap any `KnowledgeNodeView` (or custom renderer that renders compiled MDX bodies)
600
+ * with this provider. The merged allowlist is available via `useKnowledgeAllowlist()`.
601
+ *
602
+ * Merge order: `KNOWLEDGE_ALLOWLIST` defaults, then `extraComponents` override.
603
+ *
604
+ * @example
605
+ * ```tsx
606
+ * <KnowledgeMDXProvider extraComponents={{ Card: MyCustomCard }}>
607
+ * <KnowledgeNodeView node={node} />
608
+ * </KnowledgeMDXProvider>
609
+ * ```
610
+ */
611
+ declare function KnowledgeMDXProvider({ extraComponents, children }: KnowledgeMDXProviderProps): react_jsx_runtime.JSX.Element;
612
+ /**
613
+ * Returns the merged knowledge MDX component allowlist from the nearest
614
+ * `KnowledgeMDXProvider` in the tree.
615
+ *
616
+ * Throws if called outside a `KnowledgeMDXProvider`.
617
+ *
618
+ * @example
619
+ * ```tsx
620
+ * const components = useKnowledgeAllowlist()
621
+ * const Body = KNOWLEDGE_BODIES[node.id]
622
+ * return <Body components={components} />
623
+ * ```
624
+ */
625
+ declare function useKnowledgeAllowlist(): KnowledgeAllowlistMap;
626
+
627
+ type KnowledgeBodyProps = {
628
+ components?: Record<string, ComponentType>;
629
+ };
630
+ declare const KNOWLEDGE_BODIES: Record<string, ComponentType<KnowledgeBodyProps>>;
631
+
632
+ export { KNOWLEDGE_ALLOWLIST, KNOWLEDGE_BODIES, KNOWLEDGE_ITEMS, KnowledgeBrowser, KnowledgeMDXProvider, KnowledgeNodeList, KnowledgeNodeView, KnowledgeSearchBar, KnowledgeSidebarMiddle, KnowledgeTree, useKnowledgeAllowlist };
633
+ export type { KnowledgeBrowserProps, KnowledgeNodeListProps, KnowledgeNodeViewProps, KnowledgeSearchBarProps, KnowledgeSidebarMiddleProps, KnowledgeTreeProps };