@elevasis/ui 2.36.0 → 2.38.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 (95) hide show
  1. package/dist/api/index.js +4 -3
  2. package/dist/app/index.css +0 -384
  3. package/dist/app/index.d.ts +75 -2
  4. package/dist/app/index.js +22 -21
  5. package/dist/auth/index.d.ts +91 -28
  6. package/dist/auth/index.js +5 -1
  7. package/dist/charts/index.js +9 -3
  8. package/dist/chunk-4O3VAALW.js +349 -0
  9. package/dist/{chunk-O2Q4VMRN.js → chunk-566XWGPP.js} +76 -109
  10. package/dist/chunk-5EYJ2GIN.js +122 -0
  11. package/dist/chunk-6D4LCJ52.js +10 -0
  12. package/dist/chunk-6ROXVZ3L.js +9 -0
  13. package/dist/{chunk-YYX7OPZQ.js → chunk-73EWE2EW.js} +1 -1
  14. package/dist/{chunk-SIQ3P4OR.js → chunk-7GQFIWP4.js} +8 -756
  15. package/dist/{chunk-VKIZUUPM.js → chunk-7YXZFS56.js} +31 -14
  16. package/dist/{chunk-AKW7KISS.js → chunk-7ZWXTH5J.js} +2 -44
  17. package/dist/chunk-A7IG36LB.js +215 -0
  18. package/dist/chunk-B2DZLPDL.js +39 -0
  19. package/dist/chunk-C6BDBZRO.js +422 -0
  20. package/dist/chunk-CLDCYJQT.js +1 -0
  21. package/dist/{chunk-LUYVRATI.js → chunk-DA6I5VEY.js} +5 -213
  22. package/dist/chunk-H2MEFUQD.js +337 -0
  23. package/dist/chunk-I53EX4VU.js +734 -0
  24. package/dist/chunk-IIMU5YAJ.js +53 -0
  25. package/dist/chunk-JXVNHVK7.js +79 -0
  26. package/dist/chunk-M7Q4UBRY.js +85 -0
  27. package/dist/{chunk-K4UZU3TU.js → chunk-P34FFSOX.js} +1 -1
  28. package/dist/chunk-PGWANFNE.js +112 -0
  29. package/dist/{chunk-F6EFC2MJ.js → chunk-Q64E2TZY.js} +440 -2075
  30. package/dist/chunk-S3XR4II4.js +30 -0
  31. package/dist/chunk-SHZT7ULK.js +425 -0
  32. package/dist/{chunk-GX6XBRRF.js → chunk-TYRUKGGD.js} +2 -1
  33. package/dist/{chunk-R3VCBZDC.js → chunk-X4WBGKJQ.js} +3 -50
  34. package/dist/{chunk-GEFWMU26.js → chunk-X66MVMZT.js} +1 -9
  35. package/dist/{chunk-57OZ3AEG.js → chunk-Y3JQBSKQ.js} +1 -1
  36. package/dist/components/index.d.ts +74 -42
  37. package/dist/components/index.js +34 -19
  38. package/dist/components/navigation/index.js +3 -31
  39. package/dist/features/auth/index.d.ts +97 -99
  40. package/dist/features/auth/index.js +37 -99
  41. package/dist/features/clients/index.js +34 -19
  42. package/dist/features/crm/index.d.ts +65 -0
  43. package/dist/features/crm/index.js +34 -19
  44. package/dist/features/dashboard/index.js +34 -19
  45. package/dist/features/delivery/index.d.ts +65 -0
  46. package/dist/features/delivery/index.js +34 -19
  47. package/dist/features/knowledge/index.js +6 -30
  48. package/dist/features/lead-gen/index.d.ts +1096 -1
  49. package/dist/features/lead-gen/index.js +34 -19
  50. package/dist/features/monitoring/index.js +34 -19
  51. package/dist/features/monitoring/requests/index.js +34 -19
  52. package/dist/features/notes/index.d.ts +72 -0
  53. package/dist/features/notes/index.js +621 -0
  54. package/dist/features/operations/index.d.ts +10 -2
  55. package/dist/features/operations/index.js +34 -19
  56. package/dist/features/right-panel-host/index.d.ts +214 -0
  57. package/dist/features/right-panel-host/index.js +639 -0
  58. package/dist/features/seo/index.js +3 -2
  59. package/dist/features/settings/index.d.ts +68 -35
  60. package/dist/features/settings/index.js +34 -19
  61. package/dist/hooks/access/index.d.ts +90 -0
  62. package/dist/hooks/access/index.js +10 -0
  63. package/dist/hooks/delivery/index.d.ts +65 -0
  64. package/dist/hooks/delivery/index.js +34 -19
  65. package/dist/hooks/index.d.ts +1644 -1651
  66. package/dist/hooks/index.js +34 -19
  67. package/dist/hooks/published.d.ts +1644 -1651
  68. package/dist/hooks/published.js +34 -19
  69. package/dist/hooks/user-notes/index.d.ts +57 -0
  70. package/dist/hooks/user-notes/index.js +3 -0
  71. package/dist/index.d.ts +294 -277
  72. package/dist/index.js +35 -20
  73. package/dist/initialization/index.d.ts +65 -19
  74. package/dist/knowledge/index.d.ts +10 -2
  75. package/dist/knowledge/index.js +173 -28
  76. package/dist/layout/index.js +5 -3
  77. package/dist/organization/index.d.ts +0 -19
  78. package/dist/organization/index.js +34 -19
  79. package/dist/profile/index.d.ts +65 -0
  80. package/dist/provider/index.css +0 -384
  81. package/dist/provider/index.d.ts +75 -2
  82. package/dist/provider/index.js +16 -21
  83. package/dist/provider/published.css +0 -523
  84. package/dist/provider/published.d.ts +75 -2
  85. package/dist/provider/published.js +11 -21
  86. package/dist/supabase/index.d.ts +127 -0
  87. package/dist/test-utils/index.d.ts +2 -21
  88. package/dist/test-utils/index.js +5 -18
  89. package/dist/theme/index.js +3 -1
  90. package/dist/types/index.d.ts +115 -59
  91. package/dist/utils/index.js +2 -1
  92. package/package.json +21 -5
  93. package/src/auth/README.md +6 -6
  94. package/dist/components/navigation/index.css +0 -649
  95. package/dist/features/knowledge/index.css +0 -649
package/dist/api/index.js CHANGED
@@ -1,6 +1,7 @@
1
- export { createElevasisQueryClient } from '../chunk-YYX7OPZQ.js';
2
- export { ApiClientProvider, useApiClient, useApiClientContext } from '../chunk-57OZ3AEG.js';
3
- import '../chunk-GEFWMU26.js';
1
+ export { createElevasisQueryClient } from '../chunk-73EWE2EW.js';
2
+ export { ApiClientProvider, useApiClient, useApiClientContext } from '../chunk-Y3JQBSKQ.js';
3
+ import '../chunk-X66MVMZT.js';
4
4
  import '../chunk-KRWALB24.js';
5
5
  import '../chunk-DD3CCMCZ.js';
6
+ import '../chunk-6ROXVZ3L.js';
6
7
  import '../chunk-I2KLQ2HA.js';
@@ -263,387 +263,3 @@
263
263
  letter-spacing: 0.12em;
264
264
  color: var(--color-text-dimmed);
265
265
  }
266
-
267
- /* src/graph/Graph.globals.css */
268
- .elevasis-graph-root .react-flow__node.selected,
269
- .elevasis-graph-root .react-flow__node:focus,
270
- .elevasis-graph-root .react-flow__node:focus-visible {
271
- outline: none !important;
272
- }
273
- .elevasis-graph-root .react-flow__node.selected > * {
274
- box-shadow: none;
275
- }
276
-
277
- /* src/graph/Graph.module.css */
278
- @keyframes edgeFlow {
279
- 0% {
280
- stroke-dashoffset: 24;
281
- }
282
- 100% {
283
- stroke-dashoffset: 0;
284
- }
285
- }
286
- @keyframes edgeFlowReverse {
287
- 0% {
288
- stroke-dashoffset: 0;
289
- }
290
- 100% {
291
- stroke-dashoffset: 24;
292
- }
293
- }
294
- @keyframes pulse {
295
- 0%, 100% {
296
- opacity: 0.6;
297
- }
298
- 50% {
299
- opacity: 1;
300
- }
301
- }
302
- @keyframes livePulse {
303
- 0%, 100% {
304
- opacity: 1;
305
- }
306
- 50% {
307
- opacity: 0.6;
308
- }
309
- }
310
- .livePulse {
311
- animation: livePulse 2s ease-in-out infinite;
312
- }
313
- @keyframes glowPulse {
314
- 0%, 100% {
315
- box-shadow: 0 0 5px var(--glow-color, color-mix(in srgb, var(--color-primary) 30%, transparent)), 0 0 15px var(--glow-color, color-mix(in srgb, var(--color-primary) 10%, transparent));
316
- }
317
- 50% {
318
- box-shadow: 0 0 10px var(--glow-color, color-mix(in srgb, var(--color-primary) 50%, transparent)), 0 0 20px var(--glow-color, color-mix(in srgb, var(--color-primary) 20%, transparent));
319
- }
320
- }
321
- @keyframes nodeEnter {
322
- 0% {
323
- opacity: 0;
324
- transform: scale(0.8) translateY(10px);
325
- }
326
- 100% {
327
- opacity: 1;
328
- transform: scale(1) translateY(0);
329
- }
330
- }
331
- @keyframes handlePulse {
332
- 0%, 100% {
333
- transform: scale(1);
334
- box-shadow: 0 0 0 0 var(--handle-color, color-mix(in srgb, var(--color-primary) 40%, transparent));
335
- }
336
- 50% {
337
- transform: scale(1.2);
338
- box-shadow: 0 0 0 4px var(--handle-color, color-mix(in srgb, var(--color-primary) 0%, transparent));
339
- }
340
- }
341
- @keyframes gridMove {
342
- 0% {
343
- background-position: 0 0;
344
- }
345
- 100% {
346
- background-position: 40px 40px;
347
- }
348
- }
349
- @keyframes labelFadeIn {
350
- 0% {
351
- opacity: 0;
352
- transform: translate(-50%, -50%) translate(var(--label-x), var(--label-y)) scale(0.8);
353
- }
354
- 100% {
355
- opacity: 1;
356
- transform: translate(-50%, -50%) translate(var(--label-x), var(--label-y)) scale(1);
357
- }
358
- }
359
- @keyframes scanLine {
360
- 0% {
361
- transform: translateY(-100%);
362
- opacity: 0;
363
- }
364
- 50% {
365
- opacity: 0.5;
366
- }
367
- 100% {
368
- transform: translateY(100%);
369
- opacity: 0;
370
- }
371
- }
372
- .graphContainer {
373
- position: relative;
374
- background-image:
375
- linear-gradient(color-mix(in srgb, var(--color-primary) 5%, transparent) 1px, transparent 1px),
376
- linear-gradient(
377
- 90deg,
378
- color-mix(in srgb, var(--color-primary) 5%, transparent) 1px,
379
- transparent 1px),
380
- radial-gradient(
381
- ellipse at 50% 50%,
382
- color-mix(in srgb, var(--color-primary) 1.25%, transparent) 0%,
383
- transparent 70%);
384
- background-color: color-mix(in srgb, var(--color-background) 50%, var(--glass-background));
385
- backdrop-filter: var(--glass-blur);
386
- background-size:
387
- 40px 40px,
388
- 40px 40px,
389
- 100% 100%;
390
- animation: gridMove 20s linear infinite;
391
- }
392
- [data-mantine-color-scheme=dark] .graphContainer {
393
- background-image:
394
- linear-gradient(color-mix(in srgb, var(--color-primary) 9%, transparent) 1px, transparent 1px),
395
- linear-gradient(
396
- 90deg,
397
- color-mix(in srgb, var(--color-primary) 9%, transparent) 1px,
398
- transparent 1px),
399
- radial-gradient(
400
- ellipse at 50% 50%,
401
- color-mix(in srgb, var(--color-primary) 2.25%, transparent) 0%,
402
- transparent 70%);
403
- background-size:
404
- 40px 40px,
405
- 40px 40px,
406
- 100% 100%;
407
- }
408
- .node {
409
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
410
- position: relative;
411
- }
412
- .node:nth-child(1) {
413
- animation-delay: 0.05s;
414
- }
415
- .node:nth-child(2) {
416
- animation-delay: 0.1s;
417
- }
418
- .node:nth-child(3) {
419
- animation-delay: 0.15s;
420
- }
421
- .node:nth-child(4) {
422
- animation-delay: 0.2s;
423
- }
424
- .node:nth-child(5) {
425
- animation-delay: 0.25s;
426
- }
427
- .node:nth-child(6) {
428
- animation-delay: 0.3s;
429
- }
430
- .node:nth-child(7) {
431
- animation-delay: 0.35s;
432
- }
433
- .node:nth-child(8) {
434
- animation-delay: 0.4s;
435
- }
436
- .node:nth-child(9) {
437
- animation-delay: 0.45s;
438
- }
439
- .node:nth-child(10) {
440
- animation-delay: 0.5s;
441
- }
442
- .node:nth-child(11) {
443
- animation-delay: 0.55s;
444
- }
445
- .node:nth-child(12) {
446
- animation-delay: 0.6s;
447
- }
448
- .nodeCard {
449
- position: relative;
450
- border-radius: var(--mantine-radius-md);
451
- overflow: hidden;
452
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
453
- }
454
- .nodeCard::before {
455
- content: "";
456
- position: absolute;
457
- inset: 0;
458
- background:
459
- linear-gradient(
460
- 135deg,
461
- var(--node-color-light, color-mix(in srgb, var(--color-primary) 10%, transparent)) 0%,
462
- transparent 50%,
463
- var(--node-color-light, color-mix(in srgb, var(--color-primary) 5%, transparent)) 100%);
464
- pointer-events: none;
465
- opacity: 0;
466
- transition: opacity 0.3s ease;
467
- }
468
- .nodeCard::after {
469
- content: "";
470
- position: absolute;
471
- left: 0;
472
- right: 0;
473
- height: 30%;
474
- background:
475
- linear-gradient(
476
- 180deg,
477
- transparent 0%,
478
- var(--node-color-glow, color-mix(in srgb, var(--color-primary) 10%, transparent)) 50%,
479
- transparent 100%);
480
- pointer-events: none;
481
- opacity: 0;
482
- }
483
- .nodeCard:hover::before,
484
- .nodeCardSelected::before {
485
- opacity: 1;
486
- }
487
- .nodeCard:hover::after,
488
- .nodeCardSelected::after {
489
- animation: scanLine 3s ease-in-out infinite;
490
- }
491
- .nodeCard:hover {
492
- transform: translateY(-2px) scale(1.02);
493
- }
494
- .nodeCardSelected {
495
- transform: translateY(-2px) scale(1.02);
496
- animation: glowPulse 2s ease-in-out infinite;
497
- }
498
- .nodeAgent {
499
- --glow-color: rgba(139, 92, 246, 0.4);
500
- --node-color-light: rgba(139, 92, 246, 0.1);
501
- --node-color-glow: rgba(139, 92, 246, 0.15);
502
- --handle-color: rgba(139, 92, 246, 0.5);
503
- --gradient-start: rgba(139, 92, 246, 0.15);
504
- --gradient-end: rgba(139, 92, 246, 0.05);
505
- }
506
- .nodeWorkflow {
507
- --glow-color: rgba(59, 130, 246, 0.4);
508
- --node-color-light: rgba(59, 130, 246, 0.1);
509
- --node-color-glow: rgba(59, 130, 246, 0.15);
510
- --handle-color: rgba(59, 130, 246, 0.5);
511
- --gradient-start: rgba(59, 130, 246, 0.15);
512
- --gradient-end: rgba(59, 130, 246, 0.05);
513
- }
514
- .nodeTrigger {
515
- --glow-color: rgba(249, 115, 22, 0.4);
516
- --node-color-light: rgba(249, 115, 22, 0.1);
517
- --node-color-glow: rgba(249, 115, 22, 0.15);
518
- --handle-color: rgba(249, 115, 22, 0.5);
519
- --gradient-start: rgba(249, 115, 22, 0.15);
520
- --gradient-end: rgba(249, 115, 22, 0.05);
521
- }
522
- .nodeIntegration {
523
- --glow-color: rgba(20, 184, 166, 0.4);
524
- --node-color-light: rgba(20, 184, 166, 0.1);
525
- --node-color-glow: rgba(20, 184, 166, 0.15);
526
- --handle-color: rgba(20, 184, 166, 0.5);
527
- --gradient-start: rgba(20, 184, 166, 0.15);
528
- --gradient-end: rgba(20, 184, 166, 0.05);
529
- }
530
- .nodeExternal {
531
- --glow-color: rgba(107, 114, 128, 0.4);
532
- --node-color-light: rgba(107, 114, 128, 0.1);
533
- --node-color-glow: rgba(107, 114, 128, 0.15);
534
- --handle-color: rgba(107, 114, 128, 0.5);
535
- --gradient-start: rgba(107, 114, 128, 0.15);
536
- --gradient-end: rgba(107, 114, 128, 0.05);
537
- }
538
- .nodeHuman {
539
- --glow-color: rgba(245, 158, 11, 0.4);
540
- --node-color-light: rgba(245, 158, 11, 0.1);
541
- --node-color-glow: rgba(245, 158, 11, 0.15);
542
- --handle-color: rgba(245, 158, 11, 0.5);
543
- --gradient-start: rgba(245, 158, 11, 0.15);
544
- --gradient-end: rgba(245, 158, 11, 0.05);
545
- }
546
- .nodePrimary {
547
- --glow-color: rgba(37, 99, 235, 0.4);
548
- --node-color-light: rgba(37, 99, 235, 0.1);
549
- --node-color-glow: rgba(37, 99, 235, 0.15);
550
- --handle-color: rgba(37, 99, 235, 0.5);
551
- --gradient-start: rgba(37, 99, 235, 0.15);
552
- --gradient-end: rgba(37, 99, 235, 0.05);
553
- }
554
- .handle {
555
- transition: all 0.2s ease;
556
- }
557
- .handle:hover {
558
- animation: handlePulse 1s ease-in-out infinite;
559
- }
560
- .nodeIcon {
561
- transition: all 0.3s ease;
562
- }
563
- .badge {
564
- transition: all 0.2s ease;
565
- backdrop-filter: blur(4px);
566
- }
567
- .nodeCard:hover .badge {
568
- transform: scale(1.05);
569
- }
570
- .badgeProd {
571
- box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
572
- }
573
- .edge {
574
- transition: all 0.3s ease;
575
- }
576
- .edgeAnimated {
577
- stroke-dasharray: 8 4;
578
- animation: edgeFlow 1s linear infinite;
579
- }
580
- .edgeGlow {
581
- filter: drop-shadow(0 0 3px var(--edge-color, color-mix(in srgb, var(--color-primary) 50%, transparent)));
582
- }
583
- .edgeHighlighted {
584
- stroke-width: 3px;
585
- }
586
- .edgeLabel {
587
- backdrop-filter: blur(8px);
588
- border: 1px solid rgba(255, 255, 255, 0.1);
589
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 20px var(--label-glow, color-mix(in srgb, var(--color-primary) 20%, transparent));
590
- transition: box-shadow 0.2s ease;
591
- }
592
- .edgeLabel:hover {
593
- box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 0 30px var(--label-glow, color-mix(in srgb, var(--color-primary) 30%, transparent));
594
- }
595
- .legend {
596
- backdrop-filter: var(--glass-blur);
597
- background: var(--glass-background);
598
- border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
599
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 40px color-mix(in srgb, var(--color-primary) 10%, transparent);
600
- }
601
- [data-mantine-color-scheme=dark] .legend {
602
- border-color: color-mix(in srgb, var(--color-primary) 30%, transparent);
603
- }
604
- .legendDot {
605
- transition: all 0.2s ease;
606
- box-shadow: 0 0 8px currentColor;
607
- }
608
- .legendDot:hover {
609
- transform: scale(1.3);
610
- box-shadow: 0 0 12px currentColor;
611
- }
612
- .nodeHighlighted .nodeCard {
613
- transform: translateY(-2px) scale(1.02);
614
- }
615
- .nodeHighlighted .nodeCard::before {
616
- opacity: 1;
617
- }
618
- .nodeHighlighted .nodeCard::after {
619
- animation: scanLine 3s ease-in-out infinite;
620
- }
621
- .nodeDimmed {
622
- opacity: 0.3;
623
- filter: grayscale(0.5);
624
- transition: all 0.3s ease;
625
- }
626
- .edgeHighlighted {
627
- stroke-width: 4px !important;
628
- }
629
- .edgeDimmed {
630
- opacity: 0.15;
631
- transition: all 0.3s ease;
632
- }
633
- .edgeLabelDimmed {
634
- opacity: 0.15;
635
- transition: opacity 0.3s ease;
636
- }
637
- @media (prefers-reduced-motion: reduce) {
638
- .node,
639
- .nodeCard::after,
640
- .edgeAnimated,
641
- .nodeIcon,
642
- .handle:hover,
643
- .graphContainer {
644
- animation: none;
645
- }
646
- .nodeCard:hover {
647
- transform: none;
648
- }
649
- }
@@ -1468,6 +1468,51 @@ type Database = {
1468
1468
  }
1469
1469
  ];
1470
1470
  };
1471
+ deployment_organization_models: {
1472
+ Row: {
1473
+ created_at: string;
1474
+ deployment_id: string;
1475
+ model_hash: string | null;
1476
+ organization_id: string;
1477
+ organization_model: Json;
1478
+ schema_version: string;
1479
+ updated_at: string;
1480
+ };
1481
+ Insert: {
1482
+ created_at?: string;
1483
+ deployment_id: string;
1484
+ model_hash?: string | null;
1485
+ organization_id: string;
1486
+ organization_model: Json;
1487
+ schema_version?: string;
1488
+ updated_at?: string;
1489
+ };
1490
+ Update: {
1491
+ created_at?: string;
1492
+ deployment_id?: string;
1493
+ model_hash?: string | null;
1494
+ organization_id?: string;
1495
+ organization_model?: Json;
1496
+ schema_version?: string;
1497
+ updated_at?: string;
1498
+ };
1499
+ Relationships: [
1500
+ {
1501
+ foreignKeyName: "deployment_organization_models_deployment_id_fkey";
1502
+ columns: ["deployment_id"];
1503
+ isOneToOne: true;
1504
+ referencedRelation: "deployments";
1505
+ referencedColumns: ["id"];
1506
+ },
1507
+ {
1508
+ foreignKeyName: "deployment_organization_models_organization_id_fkey";
1509
+ columns: ["organization_id"];
1510
+ isOneToOne: false;
1511
+ referencedRelation: "organizations";
1512
+ referencedColumns: ["id"];
1513
+ }
1514
+ ];
1515
+ };
1471
1516
  deployments: {
1472
1517
  Row: {
1473
1518
  created_at: string;
@@ -2989,6 +3034,12 @@ type Database = {
2989
3034
  Args: never;
2990
3035
  Returns: boolean;
2991
3036
  };
3037
+ current_user_shares_org_with: {
3038
+ Args: {
3039
+ other_user_id: string;
3040
+ };
3041
+ Returns: boolean;
3042
+ };
2992
3043
  current_user_supabase_id: {
2993
3044
  Args: never;
2994
3045
  Returns: string;
@@ -3028,6 +3079,20 @@ type Database = {
3028
3079
  Args: never;
3029
3080
  Returns: string;
3030
3081
  };
3082
+ has_org_access: {
3083
+ Args: {
3084
+ action?: string;
3085
+ org_id: string;
3086
+ system_path: string;
3087
+ };
3088
+ Returns: boolean;
3089
+ } | {
3090
+ Args: {
3091
+ action?: string;
3092
+ system_path: string;
3093
+ };
3094
+ Returns: boolean;
3095
+ };
3031
3096
  has_org_permission: {
3032
3097
  Args: {
3033
3098
  org_id: string;
@@ -3608,7 +3673,11 @@ declare const OrganizationModelSchema: z$1.ZodObject<{
3608
3673
  light: z$1.ZodOptional<z$1.ZodString>;
3609
3674
  dark: z$1.ZodOptional<z$1.ZodString>;
3610
3675
  }, z$1.core.$strip>>;
3611
- }, z$1.core.$strip>>;
3676
+ voice: z$1.ZodOptional<z$1.ZodString>;
3677
+ tagline: z$1.ZodOptional<z$1.ZodString>;
3678
+ values: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
3679
+ themePresetId: z$1.ZodOptional<z$1.ZodString>;
3680
+ }, z$1.core.$loose>>;
3612
3681
  navigation: z$1.ZodDefault<z$1.ZodObject<{
3613
3682
  sidebar: z$1.ZodDefault<z$1.ZodObject<{
3614
3683
  primary: z$1.ZodDefault<z$1.ZodRecord<z$1.ZodString, z$1.ZodType<SidebarNode, unknown, z$1.core.$ZodTypeInternals<SidebarNode, unknown>>>>;
@@ -3655,7 +3724,11 @@ declare const OrganizationModelSchema: z$1.ZodObject<{
3655
3724
  }, z$1.core.$strip>>;
3656
3725
  }, z$1.core.$strip>>;
3657
3726
  clientBrief: z$1.ZodDefault<z$1.ZodString>;
3658
- }, z$1.core.$strip>>;
3727
+ organizationName: z$1.ZodOptional<z$1.ZodString>;
3728
+ productName: z$1.ZodOptional<z$1.ZodString>;
3729
+ shortName: z$1.ZodOptional<z$1.ZodString>;
3730
+ description: z$1.ZodOptional<z$1.ZodString>;
3731
+ }, z$1.core.$loose>>;
3659
3732
  customers: z$1.ZodDefault<z$1.ZodDefault<z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
3660
3733
  id: z$1.ZodString;
3661
3734
  order: z$1.ZodNumber;
package/dist/app/index.js CHANGED
@@ -1,33 +1,34 @@
1
- import { AppErrorBoundary, ElevasisSystemsProvider, useElevasisSystems, SystemShell, ElevasisUIProvider } from '../chunk-F6EFC2MJ.js';
2
- import '../chunk-CXY7FMUM.js';
3
- import '../chunk-SIQ3P4OR.js';
4
- import '../chunk-3KMDHCAR.js';
5
- import '../chunk-AKW7KISS.js';
1
+ import { AppErrorBoundary } from '../chunk-SHZT7ULK.js';
2
+ import '../chunk-JBWJ6WHZ.js';
3
+ import { SidebarProvider, AppShellContainer, Sidebar, AppShellRightSideContainer, AppShellRightSideOuterContainer } from '../chunk-DA6I5VEY.js';
4
+ import '../chunk-X4WBGKJQ.js';
5
+ import '../chunk-IIMU5YAJ.js';
6
+ import '../chunk-RNP5R5I3.js';
7
+ import { ElevasisUIProvider } from '../chunk-PGWANFNE.js';
8
+ import '../chunk-7ZWXTH5J.js';
9
+ import '../chunk-6D4LCJ52.js';
6
10
  import '../chunk-WF7CONXF.js';
7
- import '../chunk-ZTWA5H77.js';
8
- import '../chunk-AUDNF2Q7.js';
9
- import '../chunk-6M6OLGQY.js';
10
- import '../chunk-BRXELOHC.js';
11
- import { listAllSystems } from '../chunk-O2Q4VMRN.js';
12
- import { SidebarProvider, AppShellContainer, Sidebar, AppShellRightSideContainer, AppShellRightSideOuterContainer } from '../chunk-LUYVRATI.js';
13
- import '../chunk-NYBEU5TE.js';
14
11
  import '../chunk-WLOQ4IBG.js';
15
- import '../chunk-57OZ3AEG.js';
16
- import '../chunk-JBWJ6WHZ.js';
17
- import '../chunk-GX6XBRRF.js';
18
- import '../chunk-R3VCBZDC.js';
12
+ import { SystemShell } from '../chunk-H2MEFUQD.js';
13
+ import '../chunk-I53EX4VU.js';
14
+ import '../chunk-3KMDHCAR.js';
15
+ import '../chunk-S3XR4II4.js';
16
+ import '../chunk-A7IG36LB.js';
17
+ import '../chunk-NYBEU5TE.js';
18
+ import '../chunk-Y3JQBSKQ.js';
19
19
  import '../chunk-DT3QYZVU.js';
20
20
  import { TanStackRouterBridge, ScrollToTop } from '../chunk-2IFYDILW.js';
21
21
  import '../chunk-Q7DJKLEN.js';
22
- import '../chunk-HENXLGVD.js';
23
- import '../chunk-7FPLLSHN.js';
24
- import '../chunk-RNP5R5I3.js';
25
- import '../chunk-GEFWMU26.js';
22
+ import '../chunk-X66MVMZT.js';
26
23
  import '../chunk-KRWALB24.js';
27
- import { useSessionCheck } from '../chunk-VKIZUUPM.js';
24
+ import { useSessionCheck } from '../chunk-7YXZFS56.js';
25
+ import '../chunk-4O3VAALW.js';
26
+ import { ElevasisSystemsProvider, useElevasisSystems } from '../chunk-C6BDBZRO.js';
28
27
  import { useInitialization } from '../chunk-533DUEQY.js';
28
+ import { listAllSystems } from '../chunk-566XWGPP.js';
29
29
  import '../chunk-DD3CCMCZ.js';
30
30
  import '../chunk-2Q2JQSQO.js';
31
+ import '../chunk-6ROXVZ3L.js';
31
32
  import '../chunk-KJ3QUBNU.js';
32
33
  import '../chunk-BRJ3QZ4E.js';
33
34
  import '../chunk-I2KLQ2HA.js';
@@ -1,6 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import { z } from 'zod';
4
5
 
5
6
  interface AuthContextValue {
6
7
  user: {
@@ -77,6 +78,81 @@ declare function useStableAccessToken(): () => Promise<string>;
77
78
  */
78
79
  declare function useSessionCheck(): void;
79
80
 
81
+ declare const AccessKeyInputSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
82
+ systemPath: z.ZodString;
83
+ action: z.ZodDefault<z.ZodEnum<{
84
+ view: "view";
85
+ manage: "manage";
86
+ }>>;
87
+ }, z.core.$strict>]>;
88
+ type AccessKeyInput = z.input<typeof AccessKeyInputSchema>;
89
+ declare const AccessKeys: {
90
+ readonly platformAdmin: {
91
+ readonly systemPath: "platform.admin";
92
+ readonly action: "view";
93
+ };
94
+ readonly organizationManage: {
95
+ readonly systemPath: "permission.org";
96
+ readonly action: "manage";
97
+ };
98
+ readonly membersManage: {
99
+ readonly systemPath: "permission.members";
100
+ readonly action: "manage";
101
+ };
102
+ readonly rolesManage: {
103
+ readonly systemPath: "permission.roles";
104
+ readonly action: "manage";
105
+ };
106
+ readonly secretsManage: {
107
+ readonly systemPath: "permission.secrets";
108
+ readonly action: "manage";
109
+ };
110
+ readonly operationsRead: {
111
+ readonly systemPath: "permission.operations";
112
+ readonly action: "view";
113
+ };
114
+ readonly operationsManage: {
115
+ readonly systemPath: "permission.operations";
116
+ readonly action: "manage";
117
+ };
118
+ readonly acquisitionManage: {
119
+ readonly systemPath: "permission.acquisition";
120
+ readonly action: "manage";
121
+ };
122
+ readonly projectsManage: {
123
+ readonly systemPath: "permission.projects";
124
+ readonly action: "manage";
125
+ };
126
+ readonly clientsManage: {
127
+ readonly systemPath: "permission.clients";
128
+ readonly action: "manage";
129
+ };
130
+ readonly operationsOverview: {
131
+ readonly systemPath: "diagnostic.operations.overview";
132
+ readonly action: "view";
133
+ };
134
+ readonly operationsRecentExecutions: {
135
+ readonly systemPath: "diagnostic.operations.recent-executions";
136
+ readonly action: "view";
137
+ };
138
+ readonly monitoringExecutionLogs: {
139
+ readonly systemPath: "diagnostic.monitoring.execution-logs";
140
+ readonly action: "view";
141
+ };
142
+ readonly monitoringNotifications: {
143
+ readonly systemPath: "diagnostic.monitoring.notifications";
144
+ readonly action: "view";
145
+ };
146
+ };
147
+
148
+ type AccessRestrictedBy = 'catalog' | 'membership' | 'system-lifecycle' | 'role-permission' | 'diagnostic-allowlist' | null;
149
+ type AccessReason = 'allowed' | 'platform-admin-bypass' | 'invalid-access-key' | 'unknown-access-key' | 'organization-mismatch' | 'missing-membership' | 'system-not-active' | 'role-permission-denied' | 'diagnostic-key-not-allowed';
150
+ interface AccessAnswer {
151
+ allowed: boolean;
152
+ restrictedBy: AccessRestrictedBy;
153
+ reason: AccessReason;
154
+ }
155
+
80
156
  interface InitializationError {
81
157
  layer: 'auth' | 'profile' | 'organization';
82
158
  message: string;
@@ -141,36 +217,23 @@ interface ProtectedRouteProps {
141
217
  */
142
218
  declare function ProtectedRoute({ children, redirectTo, fallback, errorFallback, waitForOrganization }: ProtectedRouteProps): react_jsx_runtime.JSX.Element | null;
143
219
 
144
- interface AdminGuardProps {
220
+ interface UseAccessResult extends AccessAnswer {
221
+ isReady: boolean;
222
+ isPlatformAdmin: boolean;
223
+ permissions: readonly string[];
224
+ }
225
+
226
+ interface AccessGuardProps {
227
+ accessKey: AccessKeyInput;
145
228
  children: ReactNode;
146
- /**
147
- * Path to redirect non-admin users to.
148
- * @default '/'
149
- */
150
- redirectTo?: string;
151
- /**
152
- * Rendered while user readiness is being determined.
153
- * When not provided, nothing is rendered during initialization.
154
- */
155
- fallback?: ReactNode;
229
+ fallback?: ReactNode | ((answer: UseAccessResult) => ReactNode);
230
+ loadingFallback?: ReactNode;
231
+ redirectTo?: string | null;
156
232
  }
157
233
  /**
158
- * Headless route guard for platform admin pages.
159
- *
160
- * Reads `profile.is_platform_admin` from the nearest InitializationProvider.
161
- * Non-admin users are redirected to `redirectTo` (default: '/').
162
- *
163
- * Must be nested inside a ProtectedRoute (or equivalent) so that
164
- * `userReady` is guaranteed to be true when this guard runs.
165
- *
166
- * @example
167
- * <ProtectedRoute>
168
- * <AdminGuard fallback={<AppShellLoader />}>
169
- * <AdminDashboard />
170
- * </AdminGuard>
171
- * </ProtectedRoute>
234
+ * Unified route/UI guard for the shared Access Model.
172
235
  */
173
- declare function AdminGuard({ children, redirectTo, fallback }: AdminGuardProps): react_jsx_runtime.JSX.Element | null;
236
+ declare function AccessGuard({ accessKey, children, fallback, loadingFallback, redirectTo }: AccessGuardProps): react_jsx_runtime.JSX.Element;
174
237
 
175
- export { AdminGuard, AuthProvider, ProtectedRoute, useAuthContext, useSessionCheck as useRefocusSessionCheck, useSessionCheck, useStableAccessToken };
176
- export type { AdminGuardProps, AuthContextValue, ProtectedRouteProps };
238
+ export { AccessGuard, AccessKeys, AuthProvider, ProtectedRoute, useAuthContext, useSessionCheck as useRefocusSessionCheck, useSessionCheck, useStableAccessToken };
239
+ export type { AccessGuardProps, AccessKeyInput, AuthContextValue, ProtectedRouteProps };