@elevasis/ui 2.6.0 → 2.8.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.
Files changed (50) hide show
  1. package/dist/{chunk-POFDRPDI.js → chunk-4PHPENKX.js} +3044 -1753
  2. package/dist/chunk-7M2VOCYN.js +1 -0
  3. package/dist/{chunk-PEDPD3PU.js → chunk-7PDDPNQS.js} +1 -1
  4. package/dist/{chunk-YIWLA2B6.js → chunk-C2OFFC7J.js} +0 -1
  5. package/dist/{chunk-ZB5PKIX5.js → chunk-CTWYIRKW.js} +1 -2
  6. package/dist/{chunk-FH5QGCXL.js → chunk-F5QSLYUB.js} +180 -7
  7. package/dist/{chunk-CC4WGHGG.js → chunk-KGEYEUR5.js} +1 -3
  8. package/dist/{chunk-MU5EZV3L.js → chunk-MGEC63TE.js} +5 -6
  9. package/dist/{chunk-SMJLS23U.js → chunk-NYMKWGKN.js} +18 -1
  10. package/dist/{chunk-X4BLH3JL.js → chunk-OFT2QK6B.js} +6 -7
  11. package/dist/{chunk-O4PMRC6J.js → chunk-OPT74SGF.js} +118 -111
  12. package/dist/{chunk-6RGNVHG3.js → chunk-UX3Q4YYN.js} +21 -13
  13. package/dist/{chunk-4GZ6VZWO.js → chunk-YCHZ4U5V.js} +10 -2
  14. package/dist/{chunk-PHRDZFJT.js → chunk-ZZ35VSNF.js} +1 -3
  15. package/dist/components/index.d.ts +134 -68
  16. package/dist/components/index.js +34 -25
  17. package/dist/features/auth/index.d.ts +3 -3
  18. package/dist/features/auth/index.js +9 -2
  19. package/dist/features/crm/index.d.ts +61 -5
  20. package/dist/features/crm/index.js +5 -5
  21. package/dist/features/dashboard/index.js +5 -5
  22. package/dist/features/delivery/index.d.ts +64 -4
  23. package/dist/features/delivery/index.js +5 -5
  24. package/dist/features/lead-gen/index.d.ts +61 -5
  25. package/dist/features/lead-gen/index.js +8 -8
  26. package/dist/features/monitoring/index.d.ts +20 -1
  27. package/dist/features/monitoring/index.js +6 -6
  28. package/dist/features/operations/index.d.ts +20 -1
  29. package/dist/features/operations/index.js +7 -7
  30. package/dist/features/seo/index.d.ts +20 -1
  31. package/dist/features/seo/index.js +1 -1
  32. package/dist/features/settings/index.d.ts +22 -2
  33. package/dist/features/settings/index.js +5 -5
  34. package/dist/hooks/index.d.ts +7735 -7719
  35. package/dist/hooks/index.js +4 -4
  36. package/dist/hooks/published.d.ts +3495 -48
  37. package/dist/hooks/published.js +3 -3
  38. package/dist/index.d.ts +1188 -989
  39. package/dist/index.js +4 -4
  40. package/dist/initialization/index.d.ts +2 -1
  41. package/dist/layout/index.d.ts +60 -2
  42. package/dist/layout/index.js +1 -1
  43. package/dist/organization/index.d.ts +2 -1
  44. package/dist/provider/index.d.ts +203 -20
  45. package/dist/provider/index.js +2 -2
  46. package/dist/provider/published.d.ts +194 -19
  47. package/dist/provider/published.js +1 -1
  48. package/dist/types/index.d.ts +2 -1
  49. package/package.json +58 -86
  50. package/dist/chunk-DQJM7T2N.js +0 -1303
@@ -3831,13 +3831,14 @@ type ListConfigInput = z.infer<typeof ListConfigSchema>;
3831
3831
  /**
3832
3832
  * Per-user-per-org config (stored in org_memberships.config)
3833
3833
  * Controls which features a specific member can access within their org
3834
- * Valid feature keys: operations, monitoring, acquisition, calibration, seo
3834
+ * Valid feature keys: operations, monitoring, acquisition, delivery, calibration, seo
3835
3835
  */
3836
3836
  interface MembershipFeatureConfig {
3837
3837
  features?: {
3838
3838
  operations?: boolean;
3839
3839
  monitoring?: boolean;
3840
3840
  acquisition?: boolean;
3841
+ delivery?: boolean;
3841
3842
  calibration?: boolean;
3842
3843
  seo?: boolean;
3843
3844
  };
@@ -6983,68 +6984,6 @@ interface SortState {
6983
6984
  direction: SortDirection;
6984
6985
  }
6985
6986
 
6986
- interface ActivityFilters$1 {
6987
- activityType?: ActivityType | 'all';
6988
- status?: ActivityStatus | 'all';
6989
- search?: string;
6990
- }
6991
-
6992
- interface ExecutionLogsFilters$1 {
6993
- resourceId: string | undefined;
6994
- status: 'all' | ExecutionStatus;
6995
- resourceStatus: 'all' | 'dev' | 'prod';
6996
- }
6997
-
6998
- interface CreateApiKeyResponse {
6999
- id: string;
7000
- key: string;
7001
- message: string;
7002
- }
7003
-
7004
- /**
7005
- * GET /api/credentials - List credentials
7006
- */
7007
- declare const ListCredentialsResponseSchema = z.object({
7008
- credentials: z.array(
7009
- z.object({
7010
- id: UuidSchema,
7011
- name: z.string(),
7012
- type: z.string(),
7013
- provider: z.string().nullable(), // OAuth provider or null for non-OAuth
7014
- createdAt: z.string().datetime()
7015
- })
7016
- )
7017
- })
7018
-
7019
- /** API response type for a single credential list item */
7020
- type CredentialListItem = z.infer<typeof ListCredentialsResponseSchema>['credentials'][number]
7021
-
7022
- interface CreateCredentialResponse {
7023
- id: string;
7024
- name: string;
7025
- type: string;
7026
- }
7027
-
7028
- /**
7029
- * Response shape for a single webhook endpoint.
7030
- * NOT strict — response schemas allow extra fields for forward compatibility.
7031
- */
7032
- declare const WebhookEndpointResponseSchema = z.object({
7033
- id: UuidSchema,
7034
- organizationId: UuidSchema,
7035
- key: z.string(),
7036
- name: z.string(),
7037
- description: z.string().nullable(),
7038
- resourceId: z.string().nullable(),
7039
- status: WebhookEndpointStatusSchema,
7040
- lastTriggeredAt: z.string().datetime().nullable(),
7041
- requestCount: z.number().int().min(0),
7042
- createdAt: z.string().datetime(),
7043
- updatedAt: z.string().datetime()
7044
- })
7045
-
7046
- type WebhookEndpointResponse = z.infer<typeof WebhookEndpointResponseSchema>
7047
-
7048
6987
  interface DocFile {
7049
6988
  path: string;
7050
6989
  frontmatter: {
@@ -7167,6 +7106,68 @@ interface CommandViewGraph$1 {
7167
7106
  edges: CommandViewEdge$1[];
7168
7107
  }
7169
7108
 
7109
+ interface CreateApiKeyResponse {
7110
+ id: string;
7111
+ key: string;
7112
+ message: string;
7113
+ }
7114
+
7115
+ /**
7116
+ * GET /api/credentials - List credentials
7117
+ */
7118
+ declare const ListCredentialsResponseSchema = z.object({
7119
+ credentials: z.array(
7120
+ z.object({
7121
+ id: UuidSchema,
7122
+ name: z.string(),
7123
+ type: z.string(),
7124
+ provider: z.string().nullable(), // OAuth provider or null for non-OAuth
7125
+ createdAt: z.string().datetime()
7126
+ })
7127
+ )
7128
+ })
7129
+
7130
+ /** API response type for a single credential list item */
7131
+ type CredentialListItem = z.infer<typeof ListCredentialsResponseSchema>['credentials'][number]
7132
+
7133
+ interface CreateCredentialResponse {
7134
+ id: string;
7135
+ name: string;
7136
+ type: string;
7137
+ }
7138
+
7139
+ /**
7140
+ * Response shape for a single webhook endpoint.
7141
+ * NOT strict — response schemas allow extra fields for forward compatibility.
7142
+ */
7143
+ declare const WebhookEndpointResponseSchema = z.object({
7144
+ id: UuidSchema,
7145
+ organizationId: UuidSchema,
7146
+ key: z.string(),
7147
+ name: z.string(),
7148
+ description: z.string().nullable(),
7149
+ resourceId: z.string().nullable(),
7150
+ status: WebhookEndpointStatusSchema,
7151
+ lastTriggeredAt: z.string().datetime().nullable(),
7152
+ requestCount: z.number().int().min(0),
7153
+ createdAt: z.string().datetime(),
7154
+ updatedAt: z.string().datetime()
7155
+ })
7156
+
7157
+ type WebhookEndpointResponse = z.infer<typeof WebhookEndpointResponseSchema>
7158
+
7159
+ interface ActivityFilters$1 {
7160
+ activityType?: ActivityType | 'all';
7161
+ status?: ActivityStatus | 'all';
7162
+ search?: string;
7163
+ }
7164
+
7165
+ interface ExecutionLogsFilters$1 {
7166
+ resourceId: string | undefined;
7167
+ status: 'all' | ExecutionStatus;
7168
+ resourceStatus: 'all' | 'dev' | 'prod';
7169
+ }
7170
+
7170
7171
  interface SortableHeaderProps {
7171
7172
  column: string;
7172
7173
  children: React.ReactNode;
@@ -8640,7 +8641,43 @@ declare const CrmSidebar: () => react_jsx_runtime.JSX.Element;
8640
8641
 
8641
8642
  declare const CrmSidebarTop: () => react_jsx_runtime.JSX.Element;
8642
8643
 
8643
- declare const CrmSidebarMiddle: () => react_jsx_runtime.JSX.Element;
8644
+ /**
8645
+ * Shared nav-item shape used by feature sidebar middle components.
8646
+ *
8647
+ * Matches the subset of {@link SubshellNavItemProps} that the existing
8648
+ * hardcoded item arrays use. Consumers import this type alongside the
8649
+ * exported item arrays (e.g. `CRM_ITEMS`) to type their custom arrays.
8650
+ *
8651
+ * @example
8652
+ * import { NavItem, CRM_ITEMS } from '@elevasis/ui/features/crm'
8653
+ *
8654
+ * const customItems: NavItem[] = [
8655
+ * ...CRM_ITEMS,
8656
+ * { label: 'Reports', to: '/crm/reports', icon: IconFileText, exact: false },
8657
+ * ]
8658
+ */
8659
+ interface NavItem {
8660
+ /** Display label for the nav entry. */
8661
+ label: string;
8662
+ /** Route path the item links to. */
8663
+ to: string;
8664
+ /** Tabler icon component (or any component accepting `size` + `style`). */
8665
+ icon: ComponentType<{
8666
+ size?: number;
8667
+ style?: React.CSSProperties;
8668
+ }>;
8669
+ /**
8670
+ * When `true`, the item is only active when the path matches exactly.
8671
+ * When `false`, it is active for any path that starts with `to`.
8672
+ */
8673
+ exact: boolean;
8674
+ }
8675
+
8676
+ interface CrmSidebarMiddleProps {
8677
+ /** Override the default nav items. Defaults to {@link CRM_ITEMS}. */
8678
+ items?: NavItem[];
8679
+ }
8680
+ declare const CrmSidebarMiddle: ({ items }?: CrmSidebarMiddleProps) => react_jsx_runtime.JSX.Element;
8644
8681
 
8645
8682
  interface PipelineStageSummary {
8646
8683
  stage: DealStage;
@@ -8776,14 +8813,33 @@ interface FeatureNavEntry {
8776
8813
  }
8777
8814
  type FeatureSidebarComponent = ComponentType;
8778
8815
  interface FeatureModule {
8816
+ /** Unique stable identifier for this feature (e.g. `'crm'`, `'delivery'`). */
8779
8817
  key: string;
8780
- label?: string;
8818
+ /** Feature key used for access-flag gating in the organization model. */
8781
8819
  accessFeatureKey: OrganizationModelFeatureKey;
8820
+ /**
8821
+ * Semantic domain identifiers contributed by this feature.
8822
+ * Merged with surface-derived domain IDs during resolution.
8823
+ */
8782
8824
  domainIds?: OrganizationModelSemanticDomain['id'][];
8825
+ /**
8826
+ * Capability identifiers contributed by this feature.
8827
+ * Merged into `ResolvedFeatureSemantics.capabilityIds` at resolution time.
8828
+ * Not queried at runtime — kept for semantic graph completeness so that
8829
+ * capability membership is fully represented in the resolved model even when
8830
+ * a surface does not declare it directly.
8831
+ */
8783
8832
  capabilityIds?: string[];
8833
+ /** Top-level navigation entry rendered in the app shell when this feature is enabled. */
8784
8834
  navEntry?: FeatureNavEntry;
8835
+ /** Sidebar component rendered when a matching subshell route is active. */
8785
8836
  sidebar?: FeatureSidebarComponent;
8837
+ /** Route path prefixes that activate this feature's sidebar and subshell context. */
8786
8838
  subshellRoutes?: string[];
8839
+ /**
8840
+ * Operations-only bridge surface connecting this feature to the organization graph.
8841
+ * Ignored by all other features. Only one manifest in the registry should set this.
8842
+ */
8787
8843
  organizationGraph?: OrganizationGraphFeatureBridge;
8788
8844
  }
8789
8845
  interface OrganizationGraphFeatureBridge {
@@ -8805,7 +8861,11 @@ declare const LeadGenSidebar: () => react_jsx_runtime.JSX.Element;
8805
8861
 
8806
8862
  declare const LeadGenSidebarTop: () => react_jsx_runtime.JSX.Element;
8807
8863
 
8808
- declare const LeadGenSidebarMiddle: () => react_jsx_runtime.JSX.Element;
8864
+ interface LeadGenSidebarMiddleProps {
8865
+ /** Override the default nav items. Defaults to {@link LEAD_GEN_ITEMS}. */
8866
+ items?: NavItem[];
8867
+ }
8868
+ declare const LeadGenSidebarMiddle: ({ items }?: LeadGenSidebarMiddleProps) => react_jsx_runtime.JSX.Element;
8809
8869
 
8810
8870
  declare const leadGenManifest: FeatureModule;
8811
8871
 
@@ -8894,8 +8954,14 @@ declare const ProjectsSidebarTop: () => react_jsx_runtime.JSX.Element;
8894
8954
  interface ProjectsSidebarMiddleProps {
8895
8955
  currentPath?: string;
8896
8956
  onNavigate?: (to: string) => void;
8897
- }
8898
- declare const ProjectsSidebarMiddle: ({ currentPath, onNavigate }?: ProjectsSidebarMiddleProps) => react_jsx_runtime.JSX.Element;
8957
+ /** Override the project section items. Defaults to {@link DELIVERY_PROJECT_ITEMS}. */
8958
+ projectItems?: NavItem[];
8959
+ /** Override the work section items. Defaults to {@link DELIVERY_WORK_ITEMS}. */
8960
+ workItems?: NavItem[];
8961
+ /** Override the communication section items. Defaults to {@link DELIVERY_COMMUNICATION_ITEMS}. */
8962
+ communicationItems?: NavItem[];
8963
+ }
8964
+ declare const ProjectsSidebarMiddle: ({ currentPath, onNavigate, projectItems, workItems, communicationItems }?: ProjectsSidebarMiddleProps) => react_jsx_runtime.JSX.Element;
8899
8965
 
8900
8966
  declare const deliveryManifest: FeatureModule;
8901
8967
 
@@ -1,16 +1,16 @@
1
- import '../chunk-SMJLS23U.js';
1
+ import '../chunk-NYMKWGKN.js';
2
2
  import { useBreadcrumbs } from '../chunk-MG3NF7QL.js';
3
- export { AllTasksPage, HealthStatusCard, MilestoneTimeline, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, TaskCard, UpcomingMilestonesPage, calculateProgress, deliveryManifest, formatStatusLabel, milestoneStatusColors, noteTypeColors, projectStatusColors, taskStatusColors, taskTypeColors } from '../chunk-6RGNVHG3.js';
4
- export { LEAD_GEN_ROUTE_LINKS, LIST_TEMPLATE_OPTIONS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenDeliverabilityPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarMiddle, LeadGenSidebarTop, buildListConfig, getEnrichmentColor, getStatusColor, leadGenManifest, useDeleteLists } from '../chunk-X4BLH3JL.js';
5
- export { ActionModal, AgentDefinitionDisplay, AgentExecutionLogs, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, CheckpointGroup, CollapsibleJsonSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, CommandQueueTaskRow, ConfigCard, ContentSections, ContextUsageBadge, ContractDisplay, ExecutionErrorSection, FormFieldRenderer, LogEntry, LogGroup, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, ResourceDefinitionSection, ResourceErrorState, ResourceFilter, ResourceHeader, ResourceNotFoundState, SessionMemory, ToolsListDisplay, WorkflowDefinitionDisplay, WorkflowExecutionLogs, getExecutionStatusConfig, getIcon, getLogLevelConfig, iconMap, operationsManifest, useNewKnowledgeMapLayout } from '../chunk-FH5QGCXL.js';
3
+ export { AllTasksPage, HealthStatusCard, MilestoneTimeline, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, TaskCard, UpcomingMilestonesPage, calculateProgress, deliveryManifest, formatStatusLabel, milestoneStatusColors, noteTypeColors, projectStatusColors, taskStatusColors, taskTypeColors } from '../chunk-UX3Q4YYN.js';
4
+ export { LEAD_GEN_ROUTE_LINKS, LIST_TEMPLATE_OPTIONS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenDeliverabilityPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarMiddle, LeadGenSidebarTop, buildListConfig, getEnrichmentColor, getStatusColor, leadGenManifest, useDeleteLists } from '../chunk-OFT2QK6B.js';
5
+ export { ActionModal, AgentDefinitionDisplay, AgentExecutionLogs, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, CheckpointGroup, CollapsibleJsonSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, CommandQueueTaskRow, ConfigCard, ContentSections, ContextUsageBadge, ContractDisplay, ExecutionErrorSection, FormFieldRenderer, LogEntry, LogGroup, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, ResourceDefinitionSection, ResourceErrorState, ResourceFilter, ResourceHeader, ResourceNotFoundState, SessionMemory, ToolsListDisplay, WorkflowDefinitionDisplay, WorkflowExecutionLogs, getExecutionStatusConfig, getIcon, getLogLevelConfig, iconMap, operationsManifest, useNewKnowledgeMapLayout } from '../chunk-F5QSLYUB.js';
6
6
  import '../chunk-ROSMICXG.js';
7
7
  import { SubshellLoader, CollapsibleSidebarGroup } from '../chunk-IDACMRGQ.js';
8
- import { NotificationList } from '../chunk-PHRDZFJT.js';
9
- export { ActivityCard, ActivityFilters as ActivityFiltersBar, ActivityTable, BusinessImpactCard, CostBreakdownCard, CostByModelTable, CostMetricsCard, ErrorAnalysisCard, ErrorBreakdownTable, ExecutionBreakdownTable, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, NotificationItem, NotificationList, monitoringManifest } from '../chunk-PHRDZFJT.js';
10
- export { ResourceHealthPanel } from '../chunk-PEDPD3PU.js';
11
- export { SEOSidebar, SEOSidebarMiddle, SEOSidebarTop, seoManifest } from '../chunk-YIWLA2B6.js';
12
- export { CreateCredentialModal, CredentialList, CredentialSettings, MembershipFeaturePanel, MembershipStatusBadge, OAuthConnectModal, OrganizationMembershipsList, WebhookUrlDisplayModal, settingsManifest } from '../chunk-CC4WGHGG.js';
13
- export { ActivityFeedWidget, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, DealDetailPage, DealsListPage, MetricsStrip, MyTasksPanel, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, QuickCreateActions, SAVED_VIEW_PRESETS, SavedViewsPanel, TasksDueWidget, crmManifest, useCrmPipelineSummary, useCrmQuickMetrics, useRecentCrmActivity } from '../chunk-MU5EZV3L.js';
8
+ import { NotificationList } from '../chunk-ZZ35VSNF.js';
9
+ export { ActivityCard, ActivityFilters as ActivityFiltersBar, ActivityTable, BusinessImpactCard, CostBreakdownCard, CostByModelTable, CostMetricsCard, ErrorAnalysisCard, ErrorBreakdownTable, ExecutionBreakdownTable, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, NotificationItem, NotificationList, monitoringManifest } from '../chunk-ZZ35VSNF.js';
10
+ export { ResourceHealthPanel } from '../chunk-7PDDPNQS.js';
11
+ export { SEOSidebar, SEOSidebarMiddle, SEOSidebarTop, seoManifest } from '../chunk-C2OFFC7J.js';
12
+ export { CreateCredentialModal, CredentialList, CredentialSettings, MembershipFeaturePanel, MembershipStatusBadge, OAuthConnectModal, OrganizationMembershipsList, WebhookUrlDisplayModal, settingsManifest } from '../chunk-KGEYEUR5.js';
13
+ export { ActivityFeedWidget, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, DealDetailPage, DealsListPage, MetricsStrip, MyTasksPanel, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, QuickCreateActions, SAVED_VIEW_PRESETS, SavedViewsPanel, TasksDueWidget, crmManifest, useCrmPipelineSummary, useCrmQuickMetrics, useRecentCrmActivity } from '../chunk-MGEC63TE.js';
14
14
  export { SortableHeader, TableSelectionToolbar } from '../chunk-TUMSNGTX.js';
15
15
  import { PageContainer } from '../chunk-BZZCNLT6.js';
16
16
  import { SubshellNavItem } from '../chunk-27COZ5AH.js';
@@ -18,23 +18,23 @@ import { FilterBar } from '../chunk-PDHTXPSF.js';
18
18
  export { FilterBar } from '../chunk-PDHTXPSF.js';
19
19
  import { CustomModal } from '../chunk-GBMNCNHX.js';
20
20
  export { ConfirmationInputModal, ConfirmationModal, CustomModal } from '../chunk-GBMNCNHX.js';
21
- import { BaseNode, useGraphTheme, BaseEdge, GraphBackground, GraphLegend, GraphFitViewButton } from '../chunk-ZB5PKIX5.js';
22
- export { AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, BaseEdge, BaseNode, EmptyVisualizer, ExecutionStats, ExecutionStatusBadge, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, VisualizerContainer, WorkflowExecutionTimeline, getGraphBackgroundStyles, useGraphBackgroundStyles, useGraphTheme } from '../chunk-ZB5PKIX5.js';
21
+ import { BaseNode, useGraphTheme, BaseEdge, GraphBackground, GraphLegend, GraphFitViewButton } from '../chunk-CTWYIRKW.js';
22
+ export { AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, BaseEdge, BaseNode, EmptyVisualizer, ExecutionStats, ExecutionStatusBadge, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, VisualizerContainer, WorkflowExecutionTimeline, getGraphBackgroundStyles, useGraphBackgroundStyles, useGraphTheme } from '../chunk-CTWYIRKW.js';
23
23
  export { ResourceHealthChart, getHealthColor } from '../chunk-LGKLC5MG.js';
24
24
  import '../chunk-KFICYU6S.js';
25
25
  import { AppShellLoader } from '../chunk-YEX4MQSY.js';
26
26
  import '../chunk-VNUOQQNY.js';
27
27
  export { CONTAINER_CONSTANTS, SHARED_VIZ_CONSTANTS } from '../chunk-XA34RETF.js';
28
- import { useUpdateApiKey, useDeleteApiKey, useCreateApiKey, useListApiKeys, useActivateDeployment, useDeactivateDeployment, useDeleteDeployment, useListDeployments } from '../chunk-DQJM7T2N.js';
29
- import { useCommandViewLayout, usePaginationState, useDeploymentDocs, useResources, useCreateSchedule, useListSchedules, usePauseSchedule, useResumeSchedule, useCancelSchedule, useDeleteSchedule, useDealNotes, useCreateDealNote, useDeals, useSyncDealStage, dealKeys, useMarkAllAsRead, useNotifications, showErrorNotification, showSuccessNotification, showApiErrorNotification } from '../chunk-POFDRPDI.js';
30
- export { showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification } from '../chunk-POFDRPDI.js';
28
+ import '../chunk-7M2VOCYN.js';
29
+ import { useCommandViewLayout, useUpdateApiKey, useDeleteApiKey, useCreateApiKey, useListApiKeys, usePaginationState, useActivateDeployment, useDeactivateDeployment, useDeleteDeployment, useListDeployments, useDeploymentDocs, useResources, useCreateSchedule, useListSchedules, usePauseSchedule, useResumeSchedule, useCancelSchedule, useDeleteSchedule, useDealNotes, useCreateDealNote, useDeals, useSyncDealStage, dealKeys, useMarkAllAsRead, useNotifications, showErrorNotification, showSuccessNotification, showApiErrorNotification } from '../chunk-4PHPENKX.js';
30
+ export { showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification } from '../chunk-4PHPENKX.js';
31
31
  import '../chunk-LXHZYSMQ.js';
32
32
  import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, GRAPH_CONSTANTS } from '../chunk-22UVE3RA.js';
33
33
  export { Graph_module_css_default as graphStyles } from '../chunk-22UVE3RA.js';
34
- import '../chunk-4GZ6VZWO.js';
34
+ import '../chunk-YCHZ4U5V.js';
35
35
  import '../chunk-47YILFON.js';
36
36
  import '../chunk-CYXZHBP4.js';
37
- import '../chunk-O4PMRC6J.js';
37
+ import '../chunk-OPT74SGF.js';
38
38
  import { SubshellContainer, SubshellSidebar, SubshellRightSideContainer, SubshellContentContainer } from '../chunk-RX4UWZZR.js';
39
39
  import { ListSkeleton, EmptyState, PageTitleCaption, StatCard, CenteredErrorState, CardHeader, ActivityTimeline } from '../chunk-Y3D3WFJG.js';
40
40
  export { APIErrorAlert, ActivityTimeline, CardHeader, CenteredErrorState, CollapsibleSection, ContextViewer, CustomSelector, DetailCardSkeleton, ElevasisLoader, EmptyState, FeatureUnavailableState, GlowDot, JsonViewer, ListSkeleton, PageNotFound, PageTitleCaption, ResourceCard, StatCard, StatCardSkeleton, StatsCardSkeleton, StatusBadge, TabCountBadge, TimeRangeSelector, TrendIndicator, catalogItemToResourceDefinition } from '../chunk-Y3D3WFJG.js';
@@ -893,19 +893,28 @@ function DocTreeNav({ files, selectedPath, onSelect }) {
893
893
  }
894
894
  );
895
895
  }
896
+
897
+ // src/components/operations/knowledge-base/preferredDocPath.ts
898
+ var PREFERRED_INDEX_PATHS = ["index.mdx", "index.md", "docs/index.mdx", "docs/index.md"];
899
+ function getPreferredDocPath(files, selectedPath) {
900
+ if (selectedPath && files.some((file) => file.path === selectedPath)) {
901
+ return selectedPath;
902
+ }
903
+ if (files.length === 0) {
904
+ return null;
905
+ }
906
+ const preferredIndexFile = files.find(
907
+ (file) => PREFERRED_INDEX_PATHS.includes(file.path)
908
+ );
909
+ return preferredIndexFile?.path ?? files[0].path;
910
+ }
896
911
  function KnowledgeBasePage({ mdxRenderer: MdxRenderer2 }) {
897
912
  const { organizationReady } = useInitialization();
898
913
  const [selectedDeploymentId, setSelectedDeploymentId] = useState(void 0);
899
914
  const [selectedPath, setSelectedPath] = useState(null);
900
915
  const { files, isLoading, error, activeDeployment, activeDeployments } = useDeploymentDocs(selectedDeploymentId);
901
916
  const effectivePath = useMemo(() => {
902
- if (selectedPath && files.some((f) => f.path === selectedPath)) {
903
- return selectedPath;
904
- }
905
- if (files.length === 0) return null;
906
- const indexFile = files.find((f) => f.path === "index.mdx" || f.path === "docs/index.mdx");
907
- if (indexFile) return indexFile.path;
908
- return files[0].path;
917
+ return getPreferredDocPath(files, selectedPath);
909
918
  }, [selectedPath, files]);
910
919
  const selectedFile = useMemo(() => {
911
920
  if (!effectivePath) return null;
@@ -1017,7 +1026,7 @@ function KnowledgeBasePage({ mdxRenderer: MdxRenderer2 }) {
1017
1026
  showNoDocs && /* @__PURE__ */ jsx(Center, { style: { flex: 1 }, children: /* @__PURE__ */ jsxs(Stack, { align: "center", gap: "sm", children: [
1018
1027
  /* @__PURE__ */ jsx(IconFileOff, { size: 48, color: "var(--color-text-subtle)" }),
1019
1028
  /* @__PURE__ */ jsx(Text, { c: "dimmed", size: "lg", children: "No documentation found" }),
1020
- /* @__PURE__ */ jsx(Text, { c: "dimmed", size: "sm", children: "Add MDX files to your project's docs directory and redeploy." })
1029
+ /* @__PURE__ */ jsx(Text, { c: "dimmed", size: "sm", children: "Add Markdown files (`.md` or `.mdx`) to your project's docs directory and redeploy." })
1021
1030
  ] }) }),
1022
1031
  showContent && selectedFile && /* @__PURE__ */ jsxs(Box, { style: { display: "flex", gap: "1rem", alignItems: "flex-start" }, children: [
1023
1032
  /* @__PURE__ */ jsx(Box, { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsx(Card, { withBorder: true, children: /* @__PURE__ */ jsx("div", { ref: contentRef, children: MdxRenderer2 ? /* @__PURE__ */ jsx(MdxRenderer2, { compiledSource: selectedFile.compiledSource }) : /* @__PURE__ */ jsx(Text, { c: "dimmed", children: "No MDX renderer provided" }) }) }) }),
@@ -2708,7 +2708,7 @@ interface FeatureGuardProps {
2708
2708
  deniedMessage?: string;
2709
2709
  /**
2710
2710
  * The `useFeatureAccess` hook instance to use for feature flag resolution.
2711
- * Must be created via `createUseFeatureAccess` from `@repo/ui/hooks`.
2711
+ * Must be created via `createFeatureAccessHook` from `@repo/ui/hooks`.
2712
2712
  */
2713
2713
  useFeatureAccess: UseFeatureAccessHook;
2714
2714
  }
@@ -2716,7 +2716,7 @@ interface FeatureGuardProps {
2716
2716
  * Route guard that restricts access to a named feature.
2717
2717
  *
2718
2718
  * Reads feature flags from the provided `useFeatureAccess` hook instance
2719
- * (created via `createUseFeatureAccess` from `@repo/ui/hooks`). When the
2719
+ * (created via `createFeatureAccessHook` from `@repo/ui/hooks`). When the
2720
2720
  * feature is not allowed, shows a Mantine notification and redirects to '/'.
2721
2721
  *
2722
2722
  * The `restrictedBy === 'membership'` branch surfaces a personal access
@@ -2725,7 +2725,7 @@ interface FeatureGuardProps {
2725
2725
  * @example
2726
2726
  * ```tsx
2727
2727
  * // In your app, create the hook once:
2728
- * export const useFeatureAccess = createUseFeatureAccess({ useInitialization, useOrganization })
2728
+ * export const useFeatureAccess = createFeatureAccessHook({ useInitialization, useOrganization })
2729
2729
  *
2730
2730
  * // Then use the guard:
2731
2731
  * function MonitoringLayout() {
@@ -87,11 +87,18 @@ function AdminGuard2({ children, redirectTo, fallback = /* @__PURE__ */ jsx(AppS
87
87
  return /* @__PURE__ */ jsx(AdminGuard, { redirectTo, fallback, children });
88
88
  }
89
89
  var FEATURE_LABELS = {
90
+ crm: "CRM",
91
+ "lead-gen": "Lead Gen",
92
+ projects: "Projects",
90
93
  operations: "Operations",
91
94
  monitoring: "Monitoring",
92
- acquisition: "Acquisition",
95
+ settings: "Settings",
96
+ calibration: "Calibration",
93
97
  seo: "SEO"
94
98
  };
99
+ function getFeatureLabel(featureKey) {
100
+ return FEATURE_LABELS[featureKey] ?? featureKey;
101
+ }
95
102
  function FeatureGuard({ featureKey, children, deniedMessage, useFeatureAccess }) {
96
103
  const { checkFeature, isReady } = useFeatureAccess();
97
104
  const navigate = useNavigate();
@@ -100,7 +107,7 @@ function FeatureGuard({ featureKey, children, deniedMessage, useFeatureAccess })
100
107
  useEffect(() => {
101
108
  if (isReady && !allowed && !hasRedirected.current) {
102
109
  hasRedirected.current = true;
103
- const featureLabel = FEATURE_LABELS[featureKey] || featureKey;
110
+ const featureLabel = getFeatureLabel(featureKey);
104
111
  const message = deniedMessage ?? (restrictedBy === "membership" ? `You do not have access to ${featureLabel}.` : `${featureLabel} is not available for your organization.`);
105
112
  notifications.show({
106
113
  title: "Access Restricted",
@@ -1,12 +1,49 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ComponentType, ReactNode } from 'react';
2
3
  import { z } from 'zod';
3
- import { ReactNode, ComponentType } from 'react';
4
4
 
5
5
  declare const CrmSidebar: () => react_jsx_runtime.JSX.Element;
6
6
 
7
7
  declare const CrmSidebarTop: () => react_jsx_runtime.JSX.Element;
8
8
 
9
- declare const CrmSidebarMiddle: () => react_jsx_runtime.JSX.Element;
9
+ /**
10
+ * Shared nav-item shape used by feature sidebar middle components.
11
+ *
12
+ * Matches the subset of {@link SubshellNavItemProps} that the existing
13
+ * hardcoded item arrays use. Consumers import this type alongside the
14
+ * exported item arrays (e.g. `CRM_ITEMS`) to type their custom arrays.
15
+ *
16
+ * @example
17
+ * import { NavItem, CRM_ITEMS } from '@elevasis/ui/features/crm'
18
+ *
19
+ * const customItems: NavItem[] = [
20
+ * ...CRM_ITEMS,
21
+ * { label: 'Reports', to: '/crm/reports', icon: IconFileText, exact: false },
22
+ * ]
23
+ */
24
+ interface NavItem {
25
+ /** Display label for the nav entry. */
26
+ label: string;
27
+ /** Route path the item links to. */
28
+ to: string;
29
+ /** Tabler icon component (or any component accepting `size` + `style`). */
30
+ icon: ComponentType<{
31
+ size?: number;
32
+ style?: React.CSSProperties;
33
+ }>;
34
+ /**
35
+ * When `true`, the item is only active when the path matches exactly.
36
+ * When `false`, it is active for any path that starts with `to`.
37
+ */
38
+ exact: boolean;
39
+ }
40
+
41
+ declare const CRM_ITEMS: NavItem[];
42
+ interface CrmSidebarMiddleProps {
43
+ /** Override the default nav items. Defaults to {@link CRM_ITEMS}. */
44
+ items?: NavItem[];
45
+ }
46
+ declare const CrmSidebarMiddle: ({ items }?: CrmSidebarMiddleProps) => react_jsx_runtime.JSX.Element;
10
47
 
11
48
  type Json = string | number | boolean | null | {
12
49
  [key: string]: Json | undefined;
@@ -2821,14 +2858,33 @@ interface FeatureNavEntry {
2821
2858
  }
2822
2859
  type FeatureSidebarComponent = ComponentType;
2823
2860
  interface FeatureModule {
2861
+ /** Unique stable identifier for this feature (e.g. `'crm'`, `'delivery'`). */
2824
2862
  key: string;
2825
- label?: string;
2863
+ /** Feature key used for access-flag gating in the organization model. */
2826
2864
  accessFeatureKey: OrganizationModelFeatureKey;
2865
+ /**
2866
+ * Semantic domain identifiers contributed by this feature.
2867
+ * Merged with surface-derived domain IDs during resolution.
2868
+ */
2827
2869
  domainIds?: OrganizationModelSemanticDomain['id'][];
2870
+ /**
2871
+ * Capability identifiers contributed by this feature.
2872
+ * Merged into `ResolvedFeatureSemantics.capabilityIds` at resolution time.
2873
+ * Not queried at runtime — kept for semantic graph completeness so that
2874
+ * capability membership is fully represented in the resolved model even when
2875
+ * a surface does not declare it directly.
2876
+ */
2828
2877
  capabilityIds?: string[];
2878
+ /** Top-level navigation entry rendered in the app shell when this feature is enabled. */
2829
2879
  navEntry?: FeatureNavEntry;
2880
+ /** Sidebar component rendered when a matching subshell route is active. */
2830
2881
  sidebar?: FeatureSidebarComponent;
2882
+ /** Route path prefixes that activate this feature's sidebar and subshell context. */
2831
2883
  subshellRoutes?: string[];
2884
+ /**
2885
+ * Operations-only bridge surface connecting this feature to the organization graph.
2886
+ * Ignored by all other features. Only one manifest in the registry should set this.
2887
+ */
2832
2888
  organizationGraph?: OrganizationGraphFeatureBridge;
2833
2889
  }
2834
2890
  interface OrganizationGraphFeatureBridge {
@@ -2853,5 +2909,5 @@ interface DealDetailPageProps {
2853
2909
  }
2854
2910
  declare function DealDetailPage({ dealId, renderActions, onDealLoaded }: DealDetailPageProps): react_jsx_runtime.JSX.Element;
2855
2911
 
2856
- export { ActivityFeedWidget, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, DEAL_STAGE_COLORS, DEAL_STAGE_OPTIONS, DealDetailPage, DealsListPage, MetricsStrip, MyTasksPanel, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, QuickCreateActions, SAVED_VIEW_PRESETS, SavedViewsPanel, TasksDueWidget, crmManifest, formatDealStageLabel, useCrmPipelineSummary, useCrmQuickMetrics, useRecentCrmActivity };
2857
- export type { ActivityFeedWidgetProps, RecentActivityEntry as CrmActivityEntry, CrmActivityKind, CrmOverviewProps, CrmQuickMetrics, MyTasksPanelProps, PipelineFunnelWidgetProps, PipelineStageSummary, QuickCreateActionsProps, SavedViewPreset, SavedViewsPanelProps, TasksDueWidgetProps };
2912
+ export { ActivityFeedWidget, CRM_ITEMS, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, DEAL_STAGE_COLORS, DEAL_STAGE_OPTIONS, DealDetailPage, DealsListPage, MetricsStrip, MyTasksPanel, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, QuickCreateActions, SAVED_VIEW_PRESETS, SavedViewsPanel, TasksDueWidget, crmManifest, formatDealStageLabel, useCrmPipelineSummary, useCrmQuickMetrics, useRecentCrmActivity };
2913
+ export type { ActivityFeedWidgetProps, RecentActivityEntry as CrmActivityEntry, CrmActivityKind, CrmOverviewProps, CrmQuickMetrics, CrmSidebarMiddleProps, MyTasksPanelProps, PipelineFunnelWidgetProps, PipelineStageSummary, QuickCreateActionsProps, SavedViewPreset, SavedViewsPanelProps, TasksDueWidgetProps };
@@ -1,17 +1,17 @@
1
- export { ActivityFeedWidget, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, DEAL_STAGE_COLORS, DEAL_STAGE_OPTIONS, DealDetailPage, DealsListPage, MetricsStrip, MyTasksPanel, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, QuickCreateActions, SAVED_VIEW_PRESETS, SavedViewsPanel, TasksDueWidget, crmManifest, formatDealStageLabel, useCrmPipelineSummary, useCrmQuickMetrics, useRecentCrmActivity } from '../../chunk-MU5EZV3L.js';
1
+ export { ActivityFeedWidget, CRM_ITEMS, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, DEAL_STAGE_COLORS, DEAL_STAGE_OPTIONS, DealDetailPage, DealsListPage, MetricsStrip, MyTasksPanel, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, QuickCreateActions, SAVED_VIEW_PRESETS, SavedViewsPanel, TasksDueWidget, crmManifest, formatDealStageLabel, useCrmPipelineSummary, useCrmQuickMetrics, useRecentCrmActivity } from '../../chunk-MGEC63TE.js';
2
2
  import '../../chunk-TUMSNGTX.js';
3
3
  import '../../chunk-BZZCNLT6.js';
4
4
  import '../../chunk-27COZ5AH.js';
5
5
  import '../../chunk-PDHTXPSF.js';
6
6
  import '../../chunk-GBMNCNHX.js';
7
- import '../../chunk-DQJM7T2N.js';
8
- import '../../chunk-POFDRPDI.js';
7
+ import '../../chunk-7M2VOCYN.js';
8
+ import '../../chunk-4PHPENKX.js';
9
9
  import '../../chunk-LXHZYSMQ.js';
10
10
  import '../../chunk-22UVE3RA.js';
11
- import '../../chunk-4GZ6VZWO.js';
11
+ import '../../chunk-YCHZ4U5V.js';
12
12
  import '../../chunk-47YILFON.js';
13
13
  import '../../chunk-CYXZHBP4.js';
14
- import '../../chunk-O4PMRC6J.js';
14
+ import '../../chunk-OPT74SGF.js';
15
15
  import '../../chunk-RX4UWZZR.js';
16
16
  import '../../chunk-Y3D3WFJG.js';
17
17
  import '../../chunk-3KMDHCAR.js';
@@ -1,16 +1,16 @@
1
- export { Dashboard, OperationsOverview, RecentExecutionsByResource, ResourceOverview, UnresolvedErrorsTeaser } from '../../chunk-ZB5PKIX5.js';
1
+ export { Dashboard, OperationsOverview, RecentExecutionsByResource, ResourceOverview, UnresolvedErrorsTeaser } from '../../chunk-CTWYIRKW.js';
2
2
  import '../../chunk-LGKLC5MG.js';
3
3
  import '../../chunk-KFICYU6S.js';
4
4
  import '../../chunk-YEX4MQSY.js';
5
5
  import '../../chunk-XA34RETF.js';
6
- import '../../chunk-DQJM7T2N.js';
7
- import '../../chunk-POFDRPDI.js';
6
+ import '../../chunk-7M2VOCYN.js';
7
+ import '../../chunk-4PHPENKX.js';
8
8
  import '../../chunk-LXHZYSMQ.js';
9
9
  import '../../chunk-22UVE3RA.js';
10
- import '../../chunk-4GZ6VZWO.js';
10
+ import '../../chunk-YCHZ4U5V.js';
11
11
  import '../../chunk-47YILFON.js';
12
12
  import '../../chunk-CYXZHBP4.js';
13
- import '../../chunk-O4PMRC6J.js';
13
+ import '../../chunk-OPT74SGF.js';
14
14
  import '../../chunk-RX4UWZZR.js';
15
15
  import '../../chunk-Y3D3WFJG.js';
16
16
  import '../../chunk-3KMDHCAR.js';