@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
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import './chunk-XCYKC6OZ.js';
2
2
  export { useAvailablePresets } from './chunk-VNUOQQNY.js';
3
3
  export { AGENT_CONSTANTS, CONTAINER_CONSTANTS, SHARED_VIZ_CONSTANTS, STATUS_COLORS, TIMELINE_CONSTANTS, WORKFLOW_CONSTANTS, calculateBarPosition, formatDuration, getEdgeColor, getEdgeOpacity, getResourceStatusColor, getStatusColors, getStatusIcon, shouldAnimateEdge, useAgentIterationData, useExecutionPath, useMergedExecution, useReactFlowAgent, useTimelineData, useUnifiedWorkflowLayout, useWorkflowStepsLayout } from './chunk-XA34RETF.js';
4
- export { ApiKeyService, CredentialService, DeploymentService, OrganizationMembershipService, WebhookEndpointService, filterByDomainFilters, milestoneKeys, noteKeys, projectKeys, taskKeys, useActivateDeployment, useActivityFilters, useCommandViewDomainFilters, useCreateApiKey, useCreateCredential, useCreateProject as useCreateDeliveryProject, useCreateMilestone, useCreateNote, useCreateWebhookEndpoint, useCredentials, useDeactivateDeployment, useDeactivateMembership, useDeleteApiKey, useDeleteCredential, useDeleteProject as useDeleteDeliveryProject, useDeleteTask as useDeleteDeliveryTask, useDeleteDeployment, useDeleteMilestone, useDeleteWebhookEndpoint, useExecutionLogsFilters, useListApiKeys, useListDeployments, useListWebhookEndpoints, useMilestones, useOrganizationMembers, useProject, useProjectNotes, useProjects, useReactivateMembership, useResourceSearch, useResourcesDomainFilters, useStatusFilter, useTasks, useTimeRangeDates, useUpdateApiKey, useUpdateCredential, useUpdateProject as useUpdateDeliveryProject, useUpdateMemberConfig, useUpdateMilestone, useUpdateWebhookEndpoint, useUserMemberships, useVisibleResources } from './chunk-DQJM7T2N.js';
5
- export { OperationsService, acquisitionListKeys, calibrationKeys, companyKeys, contactKeys, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, isSessionCapable, operationsKeys, scheduleKeys, sessionsKeys, sortData, useActivities, useActivityTrend, useAllCalibrationProjects, useArchiveSession, useArchivedLogs, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCalibrationProject, useCalibrationProjects, useCalibrationRun, useCalibrationRunFull, useCalibrationRuns, useCalibrationSSE, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useCompanies, useCompany, useCompleteDealTask, useContact, useContacts, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateCompany, useCreateContact, useCreateDealNote, useCreateDealTask, useCreateList, useCreateProject, useCreateRun, useCreateSchedule, useCreateSession, useDashboardMetrics, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDeleteCompanies, useDeleteContacts, useDeleteDeal, useDeleteExecution, useDeleteList, useDeleteProject, useDeleteRun, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeploymentDocs, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useExecuteAsync, useExecuteRun, useExecuteWorkflow, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionPanelState, useExecutions, useGetExecutionHistory, useGetSchedule, useGradeRun, useGraphStats, useList, useListExecutions, useListProgress, useListSchedules, useLists, useListsTelemetry, useMarkAllAsRead, useMarkAsRead, useNotificationCount as useNotificationCountSSE, useNotifications, usePaginationState, usePatchTask, usePauseSchedule, useRecentExecutionsByResource, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResources, useResourcesHealth, useResumeSchedule, useRetryExecution, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useSubmitAction, useSuccessNotification, useSyncDealStage, useTableSelection, useTableSort, useTestNotification, useTopFailingResources, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateCompany, useUpdateContact, useUpdateList, useUpdateListConfig, useUpdateProject, useUpdateSchedule, useWarningNotification } from './chunk-POFDRPDI.js';
4
+ import './chunk-7M2VOCYN.js';
5
+ export { ApiKeyService, CredentialService, DeploymentService, OperationsService, OrganizationMembershipService, WebhookEndpointService, acquisitionListKeys, calibrationKeys, companyKeys, contactKeys, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, filterByDomainFilters, isSessionCapable, milestoneKeys, noteKeys, operationsKeys, projectKeys, scheduleKeys, sessionsKeys, sortData, taskKeys, useActivateDeployment, useActivities, useActivityFilters, useActivityTrend, useAllCalibrationProjects, useArchiveSession, useArchivedLogs, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCalibrationProject, useCalibrationProjects, useCalibrationRun, useCalibrationRunFull, useCalibrationRuns, useCalibrationSSE, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewDomainFilters, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useCompanies, useCompany, useCompleteDealTask, useContact, useContacts, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateApiKey, useCreateCompany, useCreateContact, useCreateCredential, useCreateDealNote, useCreateDealTask, useCreateProject2 as useCreateDeliveryProject, useCreateList, useCreateMilestone, useCreateNote, useCreateProject, useCreateRun, useCreateSchedule, useCreateSession, useCreateWebhookEndpoint, useCredentials, useDashboardMetrics, useDeactivateDeployment, useDeactivateMembership, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDeleteApiKey, useDeleteCompanies, useDeleteContacts, useDeleteCredential, useDeleteDeal, useDeleteProject2 as useDeleteDeliveryProject, useDeleteTask2 as useDeleteDeliveryTask, useDeleteDeployment, useDeleteExecution, useDeleteList, useDeleteMilestone, useDeleteProject, useDeleteRun, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeleteWebhookEndpoint, useDeploymentDocs, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useExecuteAsync, useExecuteRun, useExecuteWorkflow, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionLogsFilters, useExecutionPanelState, useExecutions, useGetExecutionHistory, useGetSchedule, useGradeRun, useGraphStats, useList, useListApiKeys, useListDeployments, useListExecutions, useListProgress, useListSchedules, useListWebhookEndpoints, useLists, useListsTelemetry, useMarkAllAsRead, useMarkAsRead, useMilestones, useNotificationCount as useNotificationCountSSE, useNotifications, useOrganizationMembers, usePaginationState, usePatchTask, usePauseSchedule, useProject, useProjectNotes, useProjects, useReactivateMembership, useRecentExecutionsByResource, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResourceSearch, useResources, useResourcesDomainFilters, useResourcesHealth, useResumeSchedule, useRetryExecution, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useStatusFilter, useSubmitAction, useSuccessNotification, useSyncDealStage, useTableSelection, useTableSort, useTasks, useTestNotification, useTimeRangeDates, useTopFailingResources, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateApiKey, useUpdateCompany, useUpdateContact, useUpdateCredential, useUpdateProject2 as useUpdateDeliveryProject, useUpdateList, useUpdateListConfig, useUpdateMemberConfig, useUpdateMilestone, useUpdateProject, useUpdateSchedule, useUpdateWebhookEndpoint, useUserMemberships, useVisibleResources, useWarningNotification } from './chunk-4PHPENKX.js';
6
6
  export { observabilityKeys, useErrorTrends } from './chunk-LXHZYSMQ.js';
7
7
  export { GRAPH_CONSTANTS, calculateGraphHeight, useConnectionHighlight, useDirectedChainHighlighting, useFitViewTrigger, useGraphHighlighting, useNodeSelection } from './chunk-22UVE3RA.js';
8
- export { ElevasisUIProvider } from './chunk-4GZ6VZWO.js';
8
+ export { ElevasisUIProvider, createTestFeaturesProvider } from './chunk-YCHZ4U5V.js';
9
9
  export { PresetsProvider, TOKEN_VAR_MAP, componentThemes, createCssVariablesResolver, generateShades, getPreset, mantineThemeOverride, PRESETS as presets, usePresetsContext } from './chunk-47YILFON.js';
10
10
  import './chunk-CYXZHBP4.js';
11
- export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, createUseFeatureAccess, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures } from './chunk-O4PMRC6J.js';
11
+ export { ElevasisCoreProvider, ElevasisFeaturesProvider, FEATURE_KEY_ALIASES, FeatureShell, NotificationProvider, createFeatureAccessHook, createUseFeatureAccess, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures } from './chunk-OPT74SGF.js';
12
12
  import './chunk-RX4UWZZR.js';
13
13
  import './chunk-Y3D3WFJG.js';
14
14
  import './chunk-3KMDHCAR.js';
@@ -2619,13 +2619,14 @@ type SupabaseUserProfile = Tables<'users'>;
2619
2619
  /**
2620
2620
  * Per-user-per-org config (stored in org_memberships.config)
2621
2621
  * Controls which features a specific member can access within their org
2622
- * Valid feature keys: operations, monitoring, acquisition, calibration, seo
2622
+ * Valid feature keys: operations, monitoring, acquisition, delivery, calibration, seo
2623
2623
  */
2624
2624
  interface MembershipFeatureConfig {
2625
2625
  features?: {
2626
2626
  operations?: boolean;
2627
2627
  monitoring?: boolean;
2628
2628
  acquisition?: boolean;
2629
+ delivery?: boolean;
2629
2630
  calibration?: boolean;
2630
2631
  seo?: boolean;
2631
2632
  };
@@ -426,6 +426,64 @@ interface SubshellNavItemProps {
426
426
  }
427
427
  declare const SubshellNavItem: React$1.FC<SubshellNavItemProps>;
428
428
 
429
+ /**
430
+ * Shared nav-item shape used by feature sidebar middle components.
431
+ *
432
+ * Matches the subset of {@link SubshellNavItemProps} that the existing
433
+ * hardcoded item arrays use. Consumers import this type alongside the
434
+ * exported item arrays (e.g. `CRM_ITEMS`) to type their custom arrays.
435
+ *
436
+ * @example
437
+ * import { NavItem, CRM_ITEMS } from '@elevasis/ui/features/crm'
438
+ *
439
+ * const customItems: NavItem[] = [
440
+ * ...CRM_ITEMS,
441
+ * { label: 'Reports', to: '/crm/reports', icon: IconFileText, exact: false },
442
+ * ]
443
+ */
444
+ interface NavItem {
445
+ /** Display label for the nav entry. */
446
+ label: string;
447
+ /** Route path the item links to. */
448
+ to: string;
449
+ /** Tabler icon component (or any component accepting `size` + `style`). */
450
+ icon: ComponentType<{
451
+ size?: number;
452
+ style?: React.CSSProperties;
453
+ }>;
454
+ /**
455
+ * When `true`, the item is only active when the path matches exactly.
456
+ * When `false`, it is active for any path that starts with `to`.
457
+ */
458
+ exact: boolean;
459
+ }
460
+
461
+ interface SubshellNavListProps {
462
+ /** Array of nav items to render. */
463
+ items: NavItem[];
464
+ }
465
+ /**
466
+ * Renders a list of {@link NavItem} entries as {@link SubshellNavItem} components,
467
+ * deriving active state from the current router path via {@link useRouterContext}.
468
+ *
469
+ * Use this when composing a custom sidebar middle that needs to render one of the
470
+ * exported item arrays (e.g. `CRM_ITEMS`, `DELIVERY_PROJECT_ITEMS`) inside a
471
+ * custom layout.
472
+ *
473
+ * @example
474
+ * import { SubshellNavList, SubshellSidebarSection } from '@elevasis/ui/layout'
475
+ * import { CRM_ITEMS } from '@elevasis/ui/features/crm'
476
+ *
477
+ * const MyCrmMiddle = () => (
478
+ * <Stack gap={0} style={{ flex: 1, overflowY: 'auto' }}>
479
+ * <Stack gap={0} p="sm">
480
+ * <SubshellNavList items={CRM_ITEMS} />
481
+ * </Stack>
482
+ * </Stack>
483
+ * )
484
+ */
485
+ declare const SubshellNavList: React$1.FC<SubshellNavListProps>;
486
+
429
487
  interface SubshellSidebarSectionProps {
430
488
  /** Icon component to display on the left */
431
489
  icon: ComponentType<{
@@ -475,5 +533,5 @@ declare const TopbarContainer: ({ children }: {
475
533
  children: React.ReactNode;
476
534
  }) => react_jsx_runtime.JSX.Element;
477
535
 
478
- export { AmbientBloomGrid, AppBackground, AppShellCenteredContainer, AppShellContainer, AppShellContentContainer, AppShellError, AppShellLoader, AppShellRightSideContainer, AppShellRightSideOuterContainer, AppTopbarAdjusterWrapper, CollapsibleSidebarGroup, CyberBackground, CyberParticles, FilmGrain, FloatingMotes, FloatingOrbs, LinksGroup, PageContainer, PerspectiveGrid, RadiantGlow, Sidebar, SidebarContext, SidebarProvider, SubshellContainer, SubshellContentContainer, SubshellLoader, SubshellNavItem, SubshellRightSideContainer, SubshellSidebar, SubshellSidebarSection, Topbar, TopbarContainer, Vignette, WaveBackground, sidebarBottomSectionCollapsedHeight, sidebarBottomSectionHeight, sidebarCollapsedWidth, sidebarGroupChevronSize, sidebarHoverDelay, sidebarIconInnerSize, sidebarIconSize, sidebarIconStroke, sidebarItemGap, sidebarItemHeight, sidebarItemPadding, sidebarSectionPadding, sidebarSubLinkIndent, sidebarSubLinkPaddingX, sidebarSubLinkPaddingY, sidebarToggleIconSize, sidebarTransitionDuration, sidebarWidth, subshellNavItemIconSize, subsidebarWidth, topbarHeight, useSidebar, useSidebarCollapse };
479
- export type { CollapsibleSidebarGroupProps, CyberVariant, LinkItem, LinksGroupProps, SidebarNestedProps, SubshellContainerProps, SubshellContentContainerProps, SubshellNavItemProps, SubshellRightSideContainerProps, SubshellSidebarContainerProps, SubshellSidebarProps, SubshellSidebarSectionProps, TopbarProps, WaveVariant };
536
+ export { AmbientBloomGrid, AppBackground, AppShellCenteredContainer, AppShellContainer, AppShellContentContainer, AppShellError, AppShellLoader, AppShellRightSideContainer, AppShellRightSideOuterContainer, AppTopbarAdjusterWrapper, CollapsibleSidebarGroup, CyberBackground, CyberParticles, FilmGrain, FloatingMotes, FloatingOrbs, LinksGroup, PageContainer, PerspectiveGrid, RadiantGlow, Sidebar, SidebarContext, SidebarProvider, SubshellContainer, SubshellContentContainer, SubshellLoader, SubshellNavItem, SubshellNavList, SubshellRightSideContainer, SubshellSidebar, SubshellSidebarSection, Topbar, TopbarContainer, Vignette, WaveBackground, sidebarBottomSectionCollapsedHeight, sidebarBottomSectionHeight, sidebarCollapsedWidth, sidebarGroupChevronSize, sidebarHoverDelay, sidebarIconInnerSize, sidebarIconSize, sidebarIconStroke, sidebarItemGap, sidebarItemHeight, sidebarItemPadding, sidebarSectionPadding, sidebarSubLinkIndent, sidebarSubLinkPaddingX, sidebarSubLinkPaddingY, sidebarToggleIconSize, sidebarTransitionDuration, sidebarWidth, subshellNavItemIconSize, subsidebarWidth, topbarHeight, useSidebar, useSidebarCollapse };
537
+ export type { CollapsibleSidebarGroupProps, CyberVariant, LinkItem, LinksGroupProps, NavItem, SidebarNestedProps, SubshellContainerProps, SubshellContentContainerProps, SubshellNavItemProps, SubshellNavListProps, SubshellRightSideContainerProps, SubshellSidebarContainerProps, SubshellSidebarProps, SubshellSidebarSectionProps, TopbarProps, WaveVariant };
@@ -1,4 +1,4 @@
1
- export { AppShellContainer, AppShellContentContainer, AppShellRightSideContainer, AppShellRightSideOuterContainer, AppTopbarAdjusterWrapper, CyberParticles, LinksGroup, Sidebar, SidebarContext, SidebarProvider, Topbar, TopbarContainer, Vignette, subsidebarWidth, useSidebar, useSidebarCollapse } from '../chunk-SMJLS23U.js';
1
+ export { AppShellContainer, AppShellContentContainer, AppShellRightSideContainer, AppShellRightSideOuterContainer, AppTopbarAdjusterWrapper, CyberParticles, LinksGroup, Sidebar, SidebarContext, SidebarProvider, SubshellNavList, Topbar, TopbarContainer, Vignette, subsidebarWidth, useSidebar, useSidebarCollapse } from '../chunk-NYMKWGKN.js';
2
2
  export { CollapsibleSidebarGroup, SubshellLoader } from '../chunk-IDACMRGQ.js';
3
3
  export { PageContainer } from '../chunk-BZZCNLT6.js';
4
4
  export { SubshellNavItem, SubshellSidebarSection } from '../chunk-27COZ5AH.js';
@@ -14,13 +14,14 @@ import { UseBoundStore, StoreApi } from 'zustand';
14
14
  /**
15
15
  * Per-user-per-org config (stored in org_memberships.config)
16
16
  * Controls which features a specific member can access within their org
17
- * Valid feature keys: operations, monitoring, acquisition, calibration, seo
17
+ * Valid feature keys: operations, monitoring, acquisition, delivery, calibration, seo
18
18
  */
19
19
  interface MembershipFeatureConfig {
20
20
  features?: {
21
21
  operations?: boolean;
22
22
  monitoring?: boolean;
23
23
  acquisition?: boolean;
24
+ delivery?: boolean;
24
25
  calibration?: boolean;
25
26
  seo?: boolean;
26
27
  };
@@ -311,16 +311,179 @@ declare const SurfaceDefinitionSchema = z.object({
311
311
  parentId: ModelIdSchema.optional()
312
312
  })
313
313
 
314
- declare const OrganizationModelSchema = z.object({
315
- version: z.literal(1).default(1),
316
- domains: z.array(SemanticDomainSchema).default([]),
317
- branding: OrganizationModelBrandingSchema,
318
- features: OrganizationModelFeaturesSchema,
319
- navigation: OrganizationModelNavigationSchema,
320
- crm: OrganizationModelCrmSchema,
321
- leadGen: OrganizationModelLeadGenSchema,
322
- delivery: OrganizationModelDeliverySchema,
323
- resourceMappings: z.array(ResourceMappingSchema).default([])
314
+ declare const OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ctx) => {
315
+ const domainsById = collectIds(model.domains, ctx, ['domains'], 'Domain')
316
+ const surfacesById = collectIds(model.navigation.surfaces, ctx, ['navigation', 'surfaces'], 'Surface')
317
+ collectIds(model.navigation.groups, ctx, ['navigation', 'groups'], 'Navigation group')
318
+ collectIds(model.resourceMappings, ctx, ['resourceMappings'], 'Resource mapping')
319
+
320
+ const resourceMappingsByResourceId = new Map<string, (typeof model.resourceMappings)[number]>()
321
+ model.resourceMappings.forEach((resourceMapping, index) => {
322
+ if (resourceMappingsByResourceId.has(resourceMapping.resourceId)) {
323
+ addIssue(
324
+ ctx,
325
+ ['resourceMappings', index, 'resourceId'],
326
+ `Resource mapping resourceId "${resourceMapping.resourceId}" must be unique`
327
+ )
328
+ return
329
+ }
330
+
331
+ resourceMappingsByResourceId.set(resourceMapping.resourceId, resourceMapping)
332
+ })
333
+
334
+ if (model.navigation.defaultSurfaceId && !surfacesById.has(model.navigation.defaultSurfaceId)) {
335
+ addIssue(
336
+ ctx,
337
+ ['navigation', 'defaultSurfaceId'],
338
+ `Default surface "${model.navigation.defaultSurfaceId}" must reference a declared navigation surface`
339
+ )
340
+ }
341
+
342
+ model.navigation.groups.forEach((group, groupIndex) => {
343
+ group.surfaceIds.forEach((surfaceId, surfaceIndex) => {
344
+ if (!surfacesById.has(surfaceId)) {
345
+ addIssue(
346
+ ctx,
347
+ ['navigation', 'groups', groupIndex, 'surfaceIds', surfaceIndex],
348
+ `Navigation group "${group.id}" references unknown surface "${surfaceId}"`
349
+ )
350
+ }
351
+ })
352
+ })
353
+
354
+ model.domains.forEach((domain, domainIndex) => {
355
+ domain.surfaceIds.forEach((surfaceId, surfaceIndex) => {
356
+ const surface = surfacesById.get(surfaceId)
357
+ if (!surface) {
358
+ addIssue(
359
+ ctx,
360
+ ['domains', domainIndex, 'surfaceIds', surfaceIndex],
361
+ `Domain "${domain.id}" references unknown surface "${surfaceId}"`
362
+ )
363
+ return
364
+ }
365
+
366
+ if (!surface.domainIds.includes(domain.id)) {
367
+ addIssue(
368
+ ctx,
369
+ ['domains', domainIndex, 'surfaceIds', surfaceIndex],
370
+ `Domain "${domain.id}" references surface "${surfaceId}" but that surface does not include domain "${domain.id}"`
371
+ )
372
+ }
373
+ })
374
+
375
+ domain.resourceIds.forEach((resourceId, resourceIndex) => {
376
+ const resourceMapping = resourceMappingsByResourceId.get(resourceId)
377
+ if (!resourceMapping) {
378
+ addIssue(
379
+ ctx,
380
+ ['domains', domainIndex, 'resourceIds', resourceIndex],
381
+ `Domain "${domain.id}" references unknown resource "${resourceId}"`
382
+ )
383
+ return
384
+ }
385
+
386
+ if (!resourceMapping.domainIds.includes(domain.id)) {
387
+ addIssue(
388
+ ctx,
389
+ ['domains', domainIndex, 'resourceIds', resourceIndex],
390
+ `Domain "${domain.id}" references resource "${resourceId}" but that resource mapping does not include domain "${domain.id}"`
391
+ )
392
+ }
393
+ })
394
+ })
395
+
396
+ model.navigation.surfaces.forEach((surface, surfaceIndex) => {
397
+ if (surface.parentId && !surfacesById.has(surface.parentId)) {
398
+ addIssue(
399
+ ctx,
400
+ ['navigation', 'surfaces', surfaceIndex, 'parentId'],
401
+ `Surface "${surface.id}" references unknown parent surface "${surface.parentId}"`
402
+ )
403
+ }
404
+
405
+ surface.domainIds.forEach((domainId, domainIndex) => {
406
+ const domain = domainsById.get(domainId)
407
+ if (!domain) {
408
+ addIssue(
409
+ ctx,
410
+ ['navigation', 'surfaces', surfaceIndex, 'domainIds', domainIndex],
411
+ `Surface "${surface.id}" references unknown domain "${domainId}"`
412
+ )
413
+ return
414
+ }
415
+
416
+ if (!domain.surfaceIds.includes(surface.id)) {
417
+ addIssue(
418
+ ctx,
419
+ ['navigation', 'surfaces', surfaceIndex, 'domainIds', domainIndex],
420
+ `Surface "${surface.id}" references domain "${domainId}" but that domain does not include surface "${surface.id}"`
421
+ )
422
+ }
423
+ })
424
+
425
+ surface.resourceIds.forEach((resourceId, resourceIndex) => {
426
+ const resourceMapping = resourceMappingsByResourceId.get(resourceId)
427
+ if (!resourceMapping) {
428
+ addIssue(
429
+ ctx,
430
+ ['navigation', 'surfaces', surfaceIndex, 'resourceIds', resourceIndex],
431
+ `Surface "${surface.id}" references unknown resource "${resourceId}"`
432
+ )
433
+ return
434
+ }
435
+
436
+ if (!resourceMapping.surfaceIds.includes(surface.id)) {
437
+ addIssue(
438
+ ctx,
439
+ ['navigation', 'surfaces', surfaceIndex, 'resourceIds', resourceIndex],
440
+ `Surface "${surface.id}" references resource "${resourceId}" but that resource mapping does not include surface "${surface.id}"`
441
+ )
442
+ }
443
+ })
444
+ })
445
+
446
+ model.resourceMappings.forEach((resourceMapping, resourceIndex) => {
447
+ resourceMapping.domainIds.forEach((domainId, domainIndex) => {
448
+ const domain = domainsById.get(domainId)
449
+ if (!domain) {
450
+ addIssue(
451
+ ctx,
452
+ ['resourceMappings', resourceIndex, 'domainIds', domainIndex],
453
+ `Resource mapping "${resourceMapping.id}" references unknown domain "${domainId}"`
454
+ )
455
+ return
456
+ }
457
+
458
+ if (!domain.resourceIds.includes(resourceMapping.resourceId)) {
459
+ addIssue(
460
+ ctx,
461
+ ['resourceMappings', resourceIndex, 'domainIds', domainIndex],
462
+ `Resource mapping "${resourceMapping.id}" references domain "${domainId}" but that domain does not include resource "${resourceMapping.resourceId}"`
463
+ )
464
+ }
465
+ })
466
+
467
+ resourceMapping.surfaceIds.forEach((surfaceId, surfaceIndex) => {
468
+ const surface = surfacesById.get(surfaceId)
469
+ if (!surface) {
470
+ addIssue(
471
+ ctx,
472
+ ['resourceMappings', resourceIndex, 'surfaceIds', surfaceIndex],
473
+ `Resource mapping "${resourceMapping.id}" references unknown surface "${surfaceId}"`
474
+ )
475
+ return
476
+ }
477
+
478
+ if (!surface.resourceIds.includes(resourceMapping.resourceId)) {
479
+ addIssue(
480
+ ctx,
481
+ ['resourceMappings', resourceIndex, 'surfaceIds', surfaceIndex],
482
+ `Resource mapping "${resourceMapping.id}" references surface "${surfaceId}" but that surface does not include resource "${resourceMapping.resourceId}"`
483
+ )
484
+ }
485
+ })
486
+ })
324
487
  })
325
488
 
326
489
  type OrganizationModel = z.infer<typeof OrganizationModelSchema>
@@ -375,20 +538,37 @@ interface FeatureNavEntry {
375
538
  }
376
539
  type FeatureSidebarComponent = ComponentType;
377
540
  interface FeatureModule {
541
+ /** Unique stable identifier for this feature (e.g. `'crm'`, `'delivery'`). */
378
542
  key: string;
379
- label?: string;
543
+ /** Feature key used for access-flag gating in the organization model. */
380
544
  accessFeatureKey: OrganizationModelFeatureKey;
545
+ /**
546
+ * Semantic domain identifiers contributed by this feature.
547
+ * Merged with surface-derived domain IDs during resolution.
548
+ */
381
549
  domainIds?: OrganizationModelSemanticDomain['id'][];
550
+ /**
551
+ * Capability identifiers contributed by this feature.
552
+ * Merged into `ResolvedFeatureSemantics.capabilityIds` at resolution time.
553
+ * Not queried at runtime — kept for semantic graph completeness so that
554
+ * capability membership is fully represented in the resolved model even when
555
+ * a surface does not declare it directly.
556
+ */
382
557
  capabilityIds?: string[];
558
+ /** Top-level navigation entry rendered in the app shell when this feature is enabled. */
383
559
  navEntry?: FeatureNavEntry;
560
+ /** Sidebar component rendered when a matching subshell route is active. */
384
561
  sidebar?: FeatureSidebarComponent;
562
+ /** Route path prefixes that activate this feature's sidebar and subshell context. */
385
563
  subshellRoutes?: string[];
564
+ /**
565
+ * Operations-only bridge surface connecting this feature to the organization graph.
566
+ * Ignored by all other features. Only one manifest in the registry should set this.
567
+ */
386
568
  organizationGraph?: OrganizationGraphFeatureBridge;
387
569
  }
388
- type ShellModuleDefinition = FeatureModule;
389
570
  interface ResolvedFeatureAccess {
390
571
  featureKey: string;
391
- label?: string;
392
572
  enabled: boolean;
393
573
  }
394
574
  interface ResolvedFeatureSemantics {
@@ -406,7 +586,6 @@ type ShellNavSource = 'app' | 'feature';
406
586
  interface ResolvedShellNavItem extends FeatureNavEntry {
407
587
  placement: ShellNavPlacement;
408
588
  source: ShellNavSource;
409
- shellModuleKey?: string;
410
589
  accessFeatureKey?: string;
411
590
  }
412
591
  interface ResolvedShellModel {
@@ -425,7 +604,6 @@ interface ResolvedShellRouteMatch {
425
604
  navLink?: FeatureNavLink;
426
605
  }
427
606
  interface ShellRuntime {
428
- shellModel: ResolvedShellModel;
429
607
  resolveRoute: (path: string) => ResolvedShellRouteMatch;
430
608
  }
431
609
  interface OrganizationGraphFeatureBridge {
@@ -438,9 +616,6 @@ interface OrganizationGraphContextValue {
438
616
  surfaceType?: OrganizationModelSurface['surfaceType'];
439
617
  featureKey?: OrganizationModelFeatureKey;
440
618
  }
441
- interface FeatureRegistry {
442
- features: FeatureModule[];
443
- }
444
619
  interface ElevasisFeaturesProviderProps {
445
620
  features: FeatureModule[];
446
621
  organizationModel?: OrganizationModel;
@@ -536,5 +711,13 @@ interface ElevasisUIProviderProps extends Omit<ElevasisCoreProviderProps, 'theme
536
711
  }
537
712
  declare function ElevasisUIProvider({ theme, children, ...coreProps }: ElevasisUIProviderProps): react_jsx_runtime.JSX.Element;
538
713
 
539
- export { AppearanceProvider, ElevasisCoreProvider, ElevasisFeaturesProvider, ElevasisServiceProvider, ElevasisUIProvider, FeatureShell, NotificationProvider, useAppearance, useElevasisFeatures, useElevasisServices, useNotificationAdapter, useOptionalElevasisFeatures };
540
- export type { ApiKeyConfig, AppShellOverrides, AppearanceConfig, AuthConfig, AuthKitConfig, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisFeaturesContextValue, ElevasisFeaturesProviderProps, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisThemeConfig, ElevasisTokenOverrides, FeatureModule, FeatureNavEntry, FeatureNavLink, FeatureRegistry, FeatureSidebarComponent, NotificationAdapter, OrganizationGraphContextValue, OrganizationGraphFeatureBridge, PresetName, ResolvedFeatureAccess, ResolvedFeatureModule, ResolvedFeatureSemantics, ResolvedShellModel, ResolvedShellNavItem, ResolvedShellRouteMatch, ShellModuleDefinition, ShellNavPlacement, ShellNavSource, ShellRouteMatchStatus, ShellRuntime, WithSchemes };
714
+ interface CreateTestFeaturesProviderOptions {
715
+ organizationModel?: OrganizationModel;
716
+ features?: FeatureModule[];
717
+ }
718
+ declare function createTestFeaturesProvider({ organizationModel, features }?: CreateTestFeaturesProviderOptions): ({ children }: {
719
+ children: ReactNode;
720
+ }) => react_jsx_runtime.JSX.Element;
721
+
722
+ export { AppearanceProvider, ElevasisCoreProvider, ElevasisFeaturesProvider, ElevasisServiceProvider, ElevasisUIProvider, FeatureShell, NotificationProvider, createTestFeaturesProvider, useAppearance, useElevasisFeatures, useElevasisServices, useNotificationAdapter, useOptionalElevasisFeatures };
723
+ export type { ApiKeyConfig, AppShellOverrides, AppearanceConfig, AuthConfig, AuthKitConfig, CreateTestFeaturesProviderOptions, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisFeaturesContextValue, ElevasisFeaturesProviderProps, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisThemeConfig, ElevasisTokenOverrides, FeatureModule, FeatureNavEntry, FeatureNavLink, FeatureSidebarComponent, NotificationAdapter, OrganizationGraphContextValue, OrganizationGraphFeatureBridge, PresetName, ResolvedFeatureAccess, ResolvedFeatureModule, ResolvedFeatureSemantics, ResolvedShellModel, ResolvedShellNavItem, ResolvedShellRouteMatch, ShellNavPlacement, ShellNavSource, ShellRouteMatchStatus, ShellRuntime, WithSchemes };
@@ -1,7 +1,7 @@
1
- export { ElevasisUIProvider } from '../chunk-4GZ6VZWO.js';
1
+ export { ElevasisUIProvider, createTestFeaturesProvider } from '../chunk-YCHZ4U5V.js';
2
2
  import '../chunk-47YILFON.js';
3
3
  import '../chunk-CYXZHBP4.js';
4
- export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures } from '../chunk-O4PMRC6J.js';
4
+ export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures } from '../chunk-OPT74SGF.js';
5
5
  import '../chunk-RX4UWZZR.js';
6
6
  import '../chunk-Y3D3WFJG.js';
7
7
  import '../chunk-3KMDHCAR.js';