@elevasis/ui 2.2.1 → 2.3.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 (43) hide show
  1. package/dist/{chunk-J5TBNCMD.js → chunk-2XWEOJSX.js} +3 -3
  2. package/dist/{chunk-3WMJWXZY.js → chunk-47YILFON.js} +96 -68
  3. package/dist/{chunk-MZPVNRPL.js → chunk-ISHNN42L.js} +134 -10
  4. package/dist/{chunk-PFONCU6C.js → chunk-IWFIKQR5.js} +1 -1
  5. package/dist/{chunk-LH7RCX4Y.js → chunk-JT7WDIZI.js} +2 -2
  6. package/dist/{chunk-YOZEGIZA.js → chunk-NKV5MEWQ.js} +3877 -1543
  7. package/dist/{chunk-5KBVISVJ.js → chunk-PEATQEEP.js} +3 -3
  8. package/dist/{chunk-JT3FN6TE.js → chunk-Q3FTQP2M.js} +2 -2
  9. package/dist/{chunk-O6KZ46EJ.js → chunk-SWIAK47F.js} +3 -3
  10. package/dist/{chunk-M66JAN7R.js → chunk-VNUOQQNY.js} +1 -1
  11. package/dist/{chunk-2JTCPVZX.js → chunk-ZY4MWZW2.js} +2 -2
  12. package/dist/components/index.css +7 -0
  13. package/dist/components/index.d.ts +12 -1
  14. package/dist/components/index.js +851 -42
  15. package/dist/features/auth/index.css +7 -0
  16. package/dist/features/dashboard/index.css +7 -0
  17. package/dist/features/dashboard/index.d.ts +4 -0
  18. package/dist/features/dashboard/index.js +6 -6
  19. package/dist/features/monitoring/index.css +7 -0
  20. package/dist/features/monitoring/index.d.ts +4 -0
  21. package/dist/features/monitoring/index.js +7 -7
  22. package/dist/features/operations/index.css +7 -0
  23. package/dist/features/operations/index.d.ts +26 -14
  24. package/dist/features/operations/index.js +8 -8
  25. package/dist/features/settings/index.css +7 -0
  26. package/dist/features/settings/index.d.ts +4 -0
  27. package/dist/features/settings/index.js +7 -7
  28. package/dist/hooks/index.css +7 -0
  29. package/dist/hooks/index.d.ts +4 -1
  30. package/dist/hooks/index.js +5 -5
  31. package/dist/hooks/published.css +7 -0
  32. package/dist/hooks/published.d.ts +4 -1
  33. package/dist/hooks/published.js +4 -4
  34. package/dist/index.css +7 -0
  35. package/dist/index.d.ts +307 -249
  36. package/dist/index.js +6 -6
  37. package/dist/provider/index.css +7 -0
  38. package/dist/provider/index.d.ts +58 -2
  39. package/dist/provider/index.js +3 -3
  40. package/dist/provider/published.d.ts +58 -2
  41. package/dist/provider/published.js +1 -1
  42. package/dist/theme/index.js +2 -2
  43. package/package.json +9 -3
@@ -1,6 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode, ComponentType } from 'react';
3
3
  import { QueryClient } from '@tanstack/react-query';
4
+ import { z } from 'zod';
4
5
  import { MantineThemeOverride } from '@mantine/core';
5
6
 
6
7
  /** Framework-agnostic theme overrides bundled with a preset (fonts, radius, component styles). */
@@ -277,6 +278,47 @@ declare function ElevasisCoreProvider({ auth, queryClient, apiUrl, onError, noti
277
278
  */
278
279
  type TimeRange = '1h' | '24h' | '7d' | '30d';
279
280
 
281
+ declare const FeatureKeySchema = z.enum([
282
+ 'acquisition',
283
+ 'delivery',
284
+ 'operations',
285
+ 'monitoring',
286
+ 'settings',
287
+ 'seo',
288
+ 'calibration'
289
+ ])
290
+
291
+ declare const SurfaceDefinitionSchema = z.object({
292
+ id: ModelIdSchema,
293
+ label: LabelSchema,
294
+ path: PathSchema,
295
+ surfaceType: SurfaceTypeSchema,
296
+ description: DescriptionSchema.optional(),
297
+ icon: IconNameSchema.optional(),
298
+ featureKey: FeatureKeySchema.optional(),
299
+ domainIds: ReferenceIdsSchema,
300
+ entityIds: ReferenceIdsSchema,
301
+ resourceIds: ReferenceIdsSchema,
302
+ capabilityIds: ReferenceIdsSchema,
303
+ parentId: ModelIdSchema.optional()
304
+ })
305
+
306
+ declare const OrganizationModelSchema = z.object({
307
+ version: z.literal(1).default(1),
308
+ domains: z.array(SemanticDomainSchema).default([]),
309
+ branding: OrganizationModelBrandingSchema,
310
+ features: OrganizationModelFeaturesSchema,
311
+ navigation: OrganizationModelNavigationSchema,
312
+ crm: OrganizationModelCrmSchema,
313
+ leadGen: OrganizationModelLeadGenSchema,
314
+ delivery: OrganizationModelDeliverySchema,
315
+ resourceMappings: z.array(ResourceMappingSchema).default([])
316
+ })
317
+
318
+ type OrganizationModel = z.infer<typeof OrganizationModelSchema>
319
+ type OrganizationModelFeatureKey = z.infer<typeof FeatureKeySchema>
320
+ type OrganizationModelSurface = z.infer<typeof SurfaceDefinitionSchema>
321
+
280
322
  interface EventSourceMessage {
281
323
  id: string;
282
324
  event: string;
@@ -329,6 +371,17 @@ interface FeatureModule {
329
371
  navEntry?: FeatureNavEntry;
330
372
  sidebar?: FeatureSidebarComponent;
331
373
  subshellRoutes?: string[];
374
+ organizationGraph?: OrganizationGraphFeatureBridge;
375
+ }
376
+ interface OrganizationGraphFeatureBridge {
377
+ surfaceId: string;
378
+ }
379
+ interface OrganizationGraphContextValue {
380
+ available: boolean;
381
+ surfaceId?: string;
382
+ surfacePath?: string;
383
+ surfaceType?: OrganizationModelSurface['surfaceType'];
384
+ featureKey?: OrganizationModelFeatureKey;
332
385
  }
333
386
  type FeatureRouteState = 'enabled' | 'disabled' | 'missing';
334
387
  interface FeatureRouteResolution {
@@ -343,6 +396,7 @@ interface FeatureRegistry {
343
396
  }
344
397
  interface ElevasisFeaturesProviderProps {
345
398
  features: FeatureModule[];
399
+ organizationModel?: OrganizationModel;
346
400
  timeRange?: TimeRange;
347
401
  operationsApiUrl?: string;
348
402
  operationsSSEManager?: SSEConnectionManagerLike;
@@ -353,6 +407,8 @@ interface ElevasisFeaturesContextValue {
353
407
  navItems: FeatureNavEntry[];
354
408
  enabledFeatures: FeatureModule[];
355
409
  allFeatures: FeatureModule[];
410
+ organizationGraph: OrganizationGraphContextValue;
411
+ organizationModel?: OrganizationModel;
356
412
  timeRange?: TimeRange;
357
413
  operationsApiUrl?: string;
358
414
  operationsSSEManager?: SSEConnectionManagerLike;
@@ -364,7 +420,7 @@ interface ElevasisFeaturesContextValue {
364
420
 
365
421
  declare function useElevasisFeatures(): ElevasisFeaturesContextValue;
366
422
  declare function useOptionalElevasisFeatures(): ElevasisFeaturesContextValue | null;
367
- declare function ElevasisFeaturesProvider({ features, timeRange, operationsApiUrl, operationsSSEManager, disabledSubsectionPaths, children }: ElevasisFeaturesProviderProps): react_jsx_runtime.JSX.Element;
423
+ declare function ElevasisFeaturesProvider({ features, organizationModel, timeRange, operationsApiUrl, operationsSSEManager, disabledSubsectionPaths, children }: ElevasisFeaturesProviderProps): react_jsx_runtime.JSX.Element;
368
424
 
369
425
  declare function FeatureShell({ children }: {
370
426
  children: ReactNode;
@@ -433,4 +489,4 @@ interface ElevasisUIProviderProps extends Omit<ElevasisCoreProviderProps, 'theme
433
489
  declare function ElevasisUIProvider({ theme, children, ...coreProps }: ElevasisUIProviderProps): react_jsx_runtime.JSX.Element;
434
490
 
435
491
  export { AppearanceProvider, ElevasisCoreProvider, ElevasisFeaturesProvider, ElevasisServiceProvider, ElevasisUIProvider, FeatureShell, NotificationProvider, useAppearance, useElevasisFeatures, useElevasisServices, useNotificationAdapter, useOptionalElevasisFeatures };
436
- export type { ApiKeyConfig, AppearanceConfig, AuthConfig, AuthKitConfig, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisFeaturesContextValue, ElevasisFeaturesProviderProps, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisThemeConfig, ElevasisTokenOverrides, FeatureModule, FeatureNavEntry, FeatureNavLink, FeatureRegistry, FeatureRouteResolution, FeatureRouteState, FeatureSidebarComponent, NotificationAdapter, PresetName, WithSchemes };
492
+ export type { ApiKeyConfig, AppearanceConfig, AuthConfig, AuthKitConfig, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisFeaturesContextValue, ElevasisFeaturesProviderProps, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisThemeConfig, ElevasisTokenOverrides, FeatureModule, FeatureNavEntry, FeatureNavLink, FeatureRegistry, FeatureRouteResolution, FeatureRouteState, FeatureSidebarComponent, NotificationAdapter, OrganizationGraphContextValue, OrganizationGraphFeatureBridge, PresetName, WithSchemes };
@@ -1,7 +1,7 @@
1
- export { ElevasisUIProvider } from '../chunk-LH7RCX4Y.js';
2
- import '../chunk-3WMJWXZY.js';
1
+ export { ElevasisUIProvider } from '../chunk-JT7WDIZI.js';
2
+ import '../chunk-47YILFON.js';
3
3
  import '../chunk-CYXZHBP4.js';
4
- export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures } from '../chunk-MZPVNRPL.js';
4
+ export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures } from '../chunk-ISHNN42L.js';
5
5
  import '../chunk-RX4UWZZR.js';
6
6
  import '../chunk-Y3D3WFJG.js';
7
7
  import '../chunk-3KMDHCAR.js';
@@ -1,6 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode, ComponentType } from 'react';
3
3
  import { QueryClient } from '@tanstack/react-query';
4
+ import { z } from 'zod';
4
5
 
5
6
  /** Framework-agnostic theme overrides bundled with a preset (fonts, radius, component styles). */
6
7
  interface FrameworkThemeOverrides {
@@ -276,6 +277,47 @@ declare function ElevasisCoreProvider({ auth, queryClient, apiUrl, onError, noti
276
277
  */
277
278
  type TimeRange = '1h' | '24h' | '7d' | '30d';
278
279
 
280
+ declare const FeatureKeySchema = z.enum([
281
+ 'acquisition',
282
+ 'delivery',
283
+ 'operations',
284
+ 'monitoring',
285
+ 'settings',
286
+ 'seo',
287
+ 'calibration'
288
+ ])
289
+
290
+ declare const SurfaceDefinitionSchema = z.object({
291
+ id: ModelIdSchema,
292
+ label: LabelSchema,
293
+ path: PathSchema,
294
+ surfaceType: SurfaceTypeSchema,
295
+ description: DescriptionSchema.optional(),
296
+ icon: IconNameSchema.optional(),
297
+ featureKey: FeatureKeySchema.optional(),
298
+ domainIds: ReferenceIdsSchema,
299
+ entityIds: ReferenceIdsSchema,
300
+ resourceIds: ReferenceIdsSchema,
301
+ capabilityIds: ReferenceIdsSchema,
302
+ parentId: ModelIdSchema.optional()
303
+ })
304
+
305
+ declare const OrganizationModelSchema = z.object({
306
+ version: z.literal(1).default(1),
307
+ domains: z.array(SemanticDomainSchema).default([]),
308
+ branding: OrganizationModelBrandingSchema,
309
+ features: OrganizationModelFeaturesSchema,
310
+ navigation: OrganizationModelNavigationSchema,
311
+ crm: OrganizationModelCrmSchema,
312
+ leadGen: OrganizationModelLeadGenSchema,
313
+ delivery: OrganizationModelDeliverySchema,
314
+ resourceMappings: z.array(ResourceMappingSchema).default([])
315
+ })
316
+
317
+ type OrganizationModel = z.infer<typeof OrganizationModelSchema>
318
+ type OrganizationModelFeatureKey = z.infer<typeof FeatureKeySchema>
319
+ type OrganizationModelSurface = z.infer<typeof SurfaceDefinitionSchema>
320
+
279
321
  interface EventSourceMessage {
280
322
  id: string;
281
323
  event: string;
@@ -328,6 +370,17 @@ interface FeatureModule {
328
370
  navEntry?: FeatureNavEntry;
329
371
  sidebar?: FeatureSidebarComponent;
330
372
  subshellRoutes?: string[];
373
+ organizationGraph?: OrganizationGraphFeatureBridge;
374
+ }
375
+ interface OrganizationGraphFeatureBridge {
376
+ surfaceId: string;
377
+ }
378
+ interface OrganizationGraphContextValue {
379
+ available: boolean;
380
+ surfaceId?: string;
381
+ surfacePath?: string;
382
+ surfaceType?: OrganizationModelSurface['surfaceType'];
383
+ featureKey?: OrganizationModelFeatureKey;
331
384
  }
332
385
  type FeatureRouteState = 'enabled' | 'disabled' | 'missing';
333
386
  interface FeatureRouteResolution {
@@ -342,6 +395,7 @@ interface FeatureRegistry {
342
395
  }
343
396
  interface ElevasisFeaturesProviderProps {
344
397
  features: FeatureModule[];
398
+ organizationModel?: OrganizationModel;
345
399
  timeRange?: TimeRange;
346
400
  operationsApiUrl?: string;
347
401
  operationsSSEManager?: SSEConnectionManagerLike;
@@ -352,6 +406,8 @@ interface ElevasisFeaturesContextValue {
352
406
  navItems: FeatureNavEntry[];
353
407
  enabledFeatures: FeatureModule[];
354
408
  allFeatures: FeatureModule[];
409
+ organizationGraph: OrganizationGraphContextValue;
410
+ organizationModel?: OrganizationModel;
355
411
  timeRange?: TimeRange;
356
412
  operationsApiUrl?: string;
357
413
  operationsSSEManager?: SSEConnectionManagerLike;
@@ -363,7 +419,7 @@ interface ElevasisFeaturesContextValue {
363
419
 
364
420
  declare function useElevasisFeatures(): ElevasisFeaturesContextValue;
365
421
  declare function useOptionalElevasisFeatures(): ElevasisFeaturesContextValue | null;
366
- declare function ElevasisFeaturesProvider({ features, timeRange, operationsApiUrl, operationsSSEManager, disabledSubsectionPaths, children }: ElevasisFeaturesProviderProps): react_jsx_runtime.JSX.Element;
422
+ declare function ElevasisFeaturesProvider({ features, organizationModel, timeRange, operationsApiUrl, operationsSSEManager, disabledSubsectionPaths, children }: ElevasisFeaturesProviderProps): react_jsx_runtime.JSX.Element;
367
423
 
368
424
  declare function FeatureShell({ children }: {
369
425
  children: ReactNode;
@@ -411,4 +467,4 @@ declare function useElevasisServices(): ElevasisServiceContextValue;
411
467
  declare function ElevasisServiceProvider({ apiRequest, organizationId, isReady, children }: ElevasisServiceProviderProps): react_jsx_runtime.JSX.Element;
412
468
 
413
469
  export { AppearanceProvider, ElevasisCoreProvider, ElevasisFeaturesProvider, ElevasisServiceProvider, FeatureShell, NotificationProvider, useAppearance, useElevasisFeatures, useElevasisServices, useNotificationAdapter, useOptionalElevasisFeatures };
414
- export type { ApiKeyConfig, AppearanceConfig, AuthConfig, AuthKitConfig, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisFeaturesContextValue, ElevasisFeaturesProviderProps, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisTokenOverrides, FeatureModule, FeatureNavEntry, FeatureNavLink, FeatureRegistry, FeatureRouteResolution, FeatureRouteState, FeatureSidebarComponent, NotificationAdapter, WithSchemes };
470
+ export type { ApiKeyConfig, AppearanceConfig, AuthConfig, AuthKitConfig, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisFeaturesContextValue, ElevasisFeaturesProviderProps, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisTokenOverrides, FeatureModule, FeatureNavEntry, FeatureNavLink, FeatureRegistry, FeatureRouteResolution, FeatureRouteState, FeatureSidebarComponent, NotificationAdapter, OrganizationGraphContextValue, OrganizationGraphFeatureBridge, WithSchemes };
@@ -1,4 +1,4 @@
1
- export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures } from '../chunk-MZPVNRPL.js';
1
+ export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures } from '../chunk-ISHNN42L.js';
2
2
  import '../chunk-RX4UWZZR.js';
3
3
  import '../chunk-Y3D3WFJG.js';
4
4
  import '../chunk-3KMDHCAR.js';
@@ -1,3 +1,3 @@
1
- export { useAvailablePresets } from '../chunk-M66JAN7R.js';
2
- export { PresetsProvider, TOKEN_VAR_MAP, componentThemes, createCssVariablesResolver, generateShades, getPreset, mantineThemeOverride, PRESETS as presets, usePresetsContext } from '../chunk-3WMJWXZY.js';
1
+ export { useAvailablePresets } from '../chunk-VNUOQQNY.js';
2
+ export { PresetsProvider, TOKEN_VAR_MAP, componentThemes, createCssVariablesResolver, generateShades, getPreset, mantineThemeOverride, PRESETS as presets, usePresetsContext } from '../chunk-47YILFON.js';
3
3
  import '../chunk-CYXZHBP4.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/ui",
3
- "version": "2.2.1",
3
+ "version": "2.3.0",
4
4
  "description": "UI components and platform-aware hooks for building custom frontends on the Elevasis platform",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -136,6 +136,7 @@
136
136
  "@tanstack/react-router": "^1.131.28",
137
137
  "zod": "^4.1.0",
138
138
  "zustand": "^5.0.5",
139
+ "cytoscape": "^3.33.1",
139
140
  "@mantine/core": "8.2.7",
140
141
  "@mantine/hooks": "8.2.7",
141
142
  "@mantine/charts": "8.2.7",
@@ -173,6 +174,9 @@
173
174
  "@xyflow/react": {
174
175
  "optional": true
175
176
  },
177
+ "cytoscape": {
178
+ "optional": true
179
+ },
176
180
  "recharts": {
177
181
  "optional": true
178
182
  },
@@ -213,6 +217,7 @@
213
217
  "@tanstack/react-router": "^1.131.28",
214
218
  "@workos-inc/authkit-react": "^0.11.0",
215
219
  "@xyflow/react": "^12.8.5",
220
+ "cytoscape": "^3.33.1",
216
221
  "date-fns": "^4.1.0",
217
222
  "react": "^19.2.0",
218
223
  "react-dom": "^19.2.0",
@@ -231,6 +236,7 @@
231
236
  "@mdx-js/mdx": "^3.1.1",
232
237
  "@types/react": "^19.2.2",
233
238
  "@types/react-dom": "^19.1.9",
239
+ "cytoscape": "^3.33.1",
234
240
  "globals": "^16.3.0",
235
241
  "recharts": "^3.2.1",
236
242
  "rollup": "^4.59.0",
@@ -239,8 +245,8 @@
239
245
  "typescript": "5.9.2",
240
246
  "vite": "^7.0.0",
241
247
  "@repo/core": "0.0.0",
242
- "@repo/typescript-config": "0.0.0",
243
- "@repo/eslint-config": "0.0.0"
248
+ "@repo/eslint-config": "0.0.0",
249
+ "@repo/typescript-config": "0.0.0"
244
250
  },
245
251
  "dependencies": {
246
252
  "@dagrejs/dagre": "^1.1.4",