@elevasis/ui 2.9.1 → 2.10.1

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 (74) hide show
  1. package/dist/app/index.css +137 -0
  2. package/dist/app/index.d.ts +223 -0
  3. package/dist/app/index.js +95 -0
  4. package/dist/charts/index.js +3 -2
  5. package/dist/{chunk-NYMKWGKN.js → chunk-4BF74JVD.js} +110 -7
  6. package/dist/{chunk-47YILFON.js → chunk-6PNHW4X2.js} +159 -144
  7. package/dist/chunk-ADSSLKKP.js +10 -0
  8. package/dist/chunk-AEBKE4IX.js +13 -0
  9. package/dist/{chunk-C2OFFC7J.js → chunk-AL23U6C3.js} +3 -2
  10. package/dist/{chunk-27COZ5AH.js → chunk-CEWTOKE7.js} +3 -50
  11. package/dist/{chunk-AQQYVAFK.js → chunk-CLXMNMIS.js} +8 -7
  12. package/dist/{chunk-4PHPENKX.js → chunk-E3IFHX6A.js} +27 -377
  13. package/dist/{chunk-CYXZHBP4.js → chunk-F4TPY6YL.js} +14 -3
  14. package/dist/chunk-G2TDX3W6.js +5 -0
  15. package/dist/{chunk-CTWYIRKW.js → chunk-GJVGV7QZ.js} +24 -34
  16. package/dist/chunk-IIMU5YAJ.js +53 -0
  17. package/dist/{chunk-VNUOQQNY.js → chunk-KYOF6NYW.js} +2 -2
  18. package/dist/{chunk-W4VYXIN7.js → chunk-L4XXM55J.js} +3 -142
  19. package/dist/{chunk-YCHZ4U5V.js → chunk-LPSBID5V.js} +5 -13
  20. package/dist/{chunk-F5QSLYUB.js → chunk-LW5NKRI7.js} +1189 -1300
  21. package/dist/{chunk-KGEYEUR5.js → chunk-M6ZZ2FW5.js} +7 -6
  22. package/dist/{chunk-OPT74SGF.js → chunk-N5CLIRBS.js} +31 -176
  23. package/dist/chunk-R7WLWGPO.js +126 -0
  24. package/dist/{chunk-Y3D3WFJG.js → chunk-SQQGLGHW.js} +2 -11
  25. package/dist/{chunk-KFICYU6S.js → chunk-STZJ7SY5.js} +1 -1
  26. package/dist/chunk-SZHARWKU.js +15 -0
  27. package/dist/{chunk-7PDDPNQS.js → chunk-TSX4I3NW.js} +3 -3
  28. package/dist/chunk-V7XHGJQZ.js +145 -0
  29. package/dist/{chunk-UE5QQDCR.js → chunk-WHQXDETX.js} +5 -5
  30. package/dist/{chunk-4JPW5U5I.js → chunk-XB4NWSI3.js} +53 -54
  31. package/dist/{chunk-ZZ35VSNF.js → chunk-YQLE5HR5.js} +4 -4
  32. package/dist/components/index.d.ts +6 -253
  33. package/dist/components/index.js +31 -25
  34. package/dist/features/auth/index.d.ts +0 -107
  35. package/dist/features/auth/index.js +0 -1
  36. package/dist/features/crm/index.d.ts +3 -136
  37. package/dist/features/crm/index.js +14 -9
  38. package/dist/features/dashboard/index.js +13 -9
  39. package/dist/features/delivery/index.d.ts +3 -137
  40. package/dist/features/delivery/index.js +15 -9
  41. package/dist/features/lead-gen/index.d.ts +3 -29
  42. package/dist/features/lead-gen/index.js +20 -14
  43. package/dist/features/monitoring/index.d.ts +3 -30
  44. package/dist/features/monitoring/index.js +14 -10
  45. package/dist/features/operations/index.d.ts +18 -1324
  46. package/dist/features/operations/index.js +18 -13
  47. package/dist/features/seo/index.d.ts +3 -30
  48. package/dist/features/seo/index.js +3 -2
  49. package/dist/features/settings/index.d.ts +6 -146
  50. package/dist/features/settings/index.js +13 -9
  51. package/dist/hooks/index.d.ts +10 -1403
  52. package/dist/hooks/index.js +11 -7
  53. package/dist/hooks/published.d.ts +10 -1403
  54. package/dist/hooks/published.js +11 -7
  55. package/dist/index.d.ts +97 -1510
  56. package/dist/index.js +12 -8
  57. package/dist/initialization/index.d.ts +3 -117
  58. package/dist/layout/index.d.ts +12 -2
  59. package/dist/layout/index.js +5 -4
  60. package/dist/organization/index.d.ts +3 -10
  61. package/dist/organization/index.js +2 -1
  62. package/dist/profile/index.d.ts +0 -107
  63. package/dist/provider/index.d.ts +45 -65
  64. package/dist/provider/index.js +10 -6
  65. package/dist/provider/published.d.ts +45 -65
  66. package/dist/provider/published.js +6 -3
  67. package/dist/supabase/index.d.ts +0 -209
  68. package/dist/theme/index.d.ts +1 -1
  69. package/dist/theme/index.js +3 -3
  70. package/dist/typeform/index.js +10 -10
  71. package/dist/types/index.d.ts +68 -1738
  72. package/package.json +20 -4
  73. package/src/app/README.md +24 -0
  74. package/dist/chunk-IDACMRGQ.js +0 -115
@@ -1,12 +1,12 @@
1
1
  import { ResourceHealthChart } from './chunk-LGKLC5MG.js';
2
- import { useCyberColors, HeroStatsRow } from './chunk-KFICYU6S.js';
2
+ import { useCyberColors, HeroStatsRow } from './chunk-STZJ7SY5.js';
3
3
  import { AppShellCenteredContainer, AppShellLoader } from './chunk-YEX4MQSY.js';
4
4
  import { STATUS_COLORS, getStatusIcon, formatDuration, getStatusColors, AGENT_CONSTANTS, shouldAnimateEdge, TIMELINE_CONSTANTS, calculateBarPosition, CONTAINER_CONSTANTS, useExecutionPath, useUnifiedWorkflowLayout, WORKFLOW_CONSTANTS, useReactFlowAgent } from './chunk-XA34RETF.js';
5
- import { useDashboardMetrics, useResources, useTimeRangeDates, useUnresolvedErrors, useRecentExecutionsByResource, useCommandQueue, useScheduledTasks, useResourcesHealth } from './chunk-4PHPENKX.js';
5
+ import { useDashboardMetrics, useResources, useTimeRangeDates, useUnresolvedErrors, useRecentExecutionsByResource, useCommandQueue, useScheduledTasks, useResourcesHealth } from './chunk-E3IFHX6A.js';
6
6
  import { getTimeRangeDates } from './chunk-LXHZYSMQ.js';
7
7
  import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, useFitViewTrigger } from './chunk-22UVE3RA.js';
8
- import { glassBase } from './chunk-47YILFON.js';
9
- import { GlowDot, CardHeader, EmptyState, PageTitleCaption, TabCountBadge } from './chunk-Y3D3WFJG.js';
8
+ import { glassBase } from './chunk-6PNHW4X2.js';
9
+ import { GlowDot, CardHeader, EmptyState, PageTitleCaption, TabCountBadge } from './chunk-SQQGLGHW.js';
10
10
  import { ResourceStatusColors } from './chunk-ELJIFLCB.js';
11
11
  import { formatTimeAgo, formatRelativeTime } from './chunk-IOKL7BKE.js';
12
12
  import { useInitialization } from './chunk-TUXTSEAF.js';
@@ -131,35 +131,25 @@ function GraphLegend({ title = "Legend", items, position = "bottom-right" }) {
131
131
  marginRight: position.includes("right") ? 60 : 12,
132
132
  marginLeft: position.includes("left") ? 12 : void 0
133
133
  };
134
- return /* @__PURE__ */ jsx(Panel, { position, style: margins, children: /* @__PURE__ */ jsx(
135
- Card,
136
- {
137
- p: "xs",
138
- className: Graph_module_css_default.legend,
139
- style: {
140
- backgroundColor: "var(--glass-background)"
141
- },
142
- children: /* @__PURE__ */ jsxs(Group, { children: [
143
- /* @__PURE__ */ jsx(
144
- Text,
145
- {
146
- size: "xs",
147
- fw: 600,
148
- style: {
149
- letterSpacing: "0.5px",
150
- textTransform: "uppercase",
151
- fontFamily: "var(--mantine-font-family-headings)"
152
- },
153
- children: title
154
- }
155
- ),
156
- items.map((item) => /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
157
- item.type === "line" ? /* @__PURE__ */ jsx(LegendLine, { color: item.color }) : /* @__PURE__ */ jsx(LegendDot, { color: item.color }),
158
- /* @__PURE__ */ jsx(Text, { size: "xs", children: item.label })
159
- ] }, item.label))
160
- ] })
161
- }
162
- ) });
134
+ return /* @__PURE__ */ jsx(Panel, { position, style: margins, children: /* @__PURE__ */ jsx(Card, { p: "xs", className: Graph_module_css_default.legend, children: /* @__PURE__ */ jsxs(Group, { children: [
135
+ /* @__PURE__ */ jsx(
136
+ Text,
137
+ {
138
+ size: "xs",
139
+ fw: 600,
140
+ style: {
141
+ letterSpacing: "0.5px",
142
+ textTransform: "uppercase",
143
+ fontFamily: "var(--mantine-font-family-headings)"
144
+ },
145
+ children: title
146
+ }
147
+ ),
148
+ items.map((item) => /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
149
+ item.type === "line" ? /* @__PURE__ */ jsx(LegendLine, { color: item.color }) : /* @__PURE__ */ jsx(LegendDot, { color: item.color }),
150
+ /* @__PURE__ */ jsx(Text, { size: "xs", children: item.label })
151
+ ] }, item.label))
152
+ ] }) }) });
163
153
  }
164
154
  function GraphFitViewButton({ padding = 0.2, variant = "reactflow", duration = 300 }) {
165
155
  const { fitView } = useReactFlow();
@@ -249,7 +239,7 @@ var BaseNode = memo(function BaseNode2({
249
239
  width,
250
240
  ...glassBase,
251
241
  border: `1px solid ${selected ? `var(--mantine-color-${color}-5)` : "var(--color-border)"}`,
252
- backgroundColor: "var(--glass-background)",
242
+ backgroundColor: "var(--color-surface)",
253
243
  cursor: "pointer",
254
244
  boxShadow: selected ? `0 0 15px var(--mantine-color-${color}-5), var(--standard-box-shadow)` : "var(--standard-box-shadow)"
255
245
  },
@@ -0,0 +1,53 @@
1
+ import { sidebarIconSize, sidebarIconStroke, sidebarIconInnerSize } from './chunk-DT3QYZVU.js';
2
+ import { Box, Group, ThemeIcon } from '@mantine/core';
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
+
5
+ var SubshellSidebarSection = ({
6
+ icon: Icon,
7
+ label,
8
+ rightSection,
9
+ withTopBorder = false
10
+ }) => {
11
+ return /* @__PURE__ */ jsx(
12
+ Box,
13
+ {
14
+ p: "sm",
15
+ style: {
16
+ borderTop: withTopBorder ? "1px solid var(--color-border)" : void 0,
17
+ borderBottom: "1px solid var(--color-border)"
18
+ },
19
+ children: /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
20
+ /* @__PURE__ */ jsx(
21
+ ThemeIcon,
22
+ {
23
+ variant: "light",
24
+ size: sidebarIconSize,
25
+ style: {
26
+ backgroundColor: "var(--color-surface)",
27
+ color: "var(--color-primary)",
28
+ flexShrink: 0
29
+ },
30
+ children: /* @__PURE__ */ jsx(Icon, { size: sidebarIconInnerSize, stroke: sidebarIconStroke })
31
+ }
32
+ ),
33
+ /* @__PURE__ */ jsx(
34
+ Box,
35
+ {
36
+ c: "var(--color-text)",
37
+ style: {
38
+ fontFamily: "var(--elevasis-font-family-subtitle)",
39
+ flex: 1,
40
+ fontSize: "var(--mantine-font-size-md)",
41
+ fontWeight: 500,
42
+ lineHeight: 1.2
43
+ },
44
+ children: label
45
+ }
46
+ ),
47
+ rightSection
48
+ ] })
49
+ }
50
+ );
51
+ };
52
+
53
+ export { SubshellSidebarSection };
@@ -1,4 +1,4 @@
1
- import { usePresetsContext } from './chunk-47YILFON.js';
1
+ import { usePresetsContext } from './chunk-6PNHW4X2.js';
2
2
  import { useMemo } from 'react';
3
3
 
4
4
  var BUILT_IN_NAMES = /* @__PURE__ */ new Set([
@@ -9,7 +9,7 @@ var BUILT_IN_NAMES = /* @__PURE__ */ new Set([
9
9
  "aurora",
10
10
  "rose-gold",
11
11
  "midnight",
12
- "ember",
12
+ "titanium",
13
13
  "obsidian",
14
14
  "honey",
15
15
  "abyss",
@@ -1,149 +1,10 @@
1
- import { OrganizationContext } from './chunk-DD3CCMCZ.js';
2
- import { useProfile, useUserProfile } from './chunk-QEPXAWE2.js';
1
+ import { useUserProfile } from './chunk-QEPXAWE2.js';
3
2
  import { useAuthContext } from './chunk-BRJ3QZ4E.js';
4
- import { useState, useRef, useEffect, useCallback, createElement } from 'react';
5
- import { useQueryClient } from '@tanstack/react-query';
3
+ import { useState, useRef, useEffect, useCallback } from 'react';
6
4
  import { Button, Loader, Menu, Text, Badge } from '@mantine/core';
7
5
  import { IconChevronDown, IconBuilding, IconCheck } from '@tabler/icons-react';
8
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
7
 
10
- function OrganizationProvider({ apiRequest, children }) {
11
- const { user, organizationId: workosOrgId } = useAuthContext();
12
- const { profile } = useProfile();
13
- const queryClient = useQueryClient();
14
- const [memberships, setMemberships] = useState([]);
15
- const [currentWorkOSOrganizationId, setCurrentWorkOSOrganizationId] = useState(null);
16
- const [currentSupabaseOrganizationId, setCurrentSupabaseOrganizationId] = useState(null);
17
- const [currentMembership, setCurrentMembership] = useState(null);
18
- const [isInitializing, setIsInitializing] = useState(true);
19
- const [isOrgRefreshing, setIsOrgRefreshing] = useState(false);
20
- const [error, setError] = useState(null);
21
- const hasInitializedRef = useRef(false);
22
- const [profileLoaded, setProfileLoaded] = useState(false);
23
- useEffect(() => {
24
- if (profile !== void 0 && profile !== null) {
25
- setProfileLoaded(true);
26
- }
27
- }, [profile]);
28
- useEffect(() => {
29
- if (!user) {
30
- setMemberships([]);
31
- setCurrentWorkOSOrganizationId(null);
32
- setCurrentSupabaseOrganizationId(null);
33
- setCurrentMembership(null);
34
- setIsInitializing(false);
35
- setIsOrgRefreshing(false);
36
- setError(null);
37
- hasInitializedRef.current = false;
38
- setProfileLoaded(false);
39
- }
40
- }, [user]);
41
- const applyMembership = useCallback((membership) => {
42
- setCurrentMembership(membership);
43
- setCurrentSupabaseOrganizationId(membership?.organization?.id ?? null);
44
- setCurrentWorkOSOrganizationId(membership?.organization?.workos_org_id ?? null);
45
- }, []);
46
- const selectOrganization = useCallback(
47
- (data) => {
48
- let selected = null;
49
- if (profile?.last_visited_org) {
50
- selected = data.find((m) => m.organizationId === profile.last_visited_org) ?? null;
51
- }
52
- if (!selected && workosOrgId) {
53
- selected = data.find((m) => m.organization?.workos_org_id === workosOrgId) ?? null;
54
- }
55
- if (!selected && data.length > 0) {
56
- selected = data[0];
57
- }
58
- if (selected) {
59
- applyMembership(selected);
60
- }
61
- },
62
- [profile?.last_visited_org, workosOrgId, applyMembership]
63
- );
64
- const fetchAndInitialize = useCallback(async () => {
65
- if (!user?.id || !profileLoaded) return;
66
- setError(null);
67
- if (memberships.length === 0) {
68
- setIsInitializing(true);
69
- } else {
70
- setIsOrgRefreshing(true);
71
- }
72
- try {
73
- const data = await apiRequest("/memberships/my-memberships");
74
- if (!Array.isArray(data)) {
75
- throw new Error("Invalid memberships response");
76
- }
77
- setMemberships(data);
78
- if (data.length === 0) {
79
- hasInitializedRef.current = true;
80
- return;
81
- }
82
- if (!currentWorkOSOrganizationId) {
83
- selectOrganization(data);
84
- } else {
85
- const stillPresent = data.find((m) => m.organization?.workos_org_id === currentWorkOSOrganizationId);
86
- if (!stillPresent) {
87
- applyMembership(data[0] ?? null);
88
- } else if (stillPresent.id !== currentMembership?.id) {
89
- applyMembership(stillPresent);
90
- }
91
- }
92
- hasInitializedRef.current = true;
93
- } catch (err) {
94
- setError(err instanceof Error ? err.message : "Failed to load organizations");
95
- } finally {
96
- setIsInitializing(false);
97
- setIsOrgRefreshing(false);
98
- }
99
- }, [
100
- user?.id,
101
- profileLoaded,
102
- memberships.length,
103
- apiRequest,
104
- currentWorkOSOrganizationId,
105
- currentMembership?.id,
106
- selectOrganization,
107
- applyMembership
108
- ]);
109
- useEffect(() => {
110
- if (!user?.id || !profileLoaded || hasInitializedRef.current) return;
111
- fetchAndInitialize();
112
- }, [user?.id, profileLoaded, fetchAndInitialize]);
113
- const switchOrganization = useCallback(
114
- (workosOrgId2) => {
115
- const target = memberships.find((m) => m.organization?.workos_org_id === workosOrgId2);
116
- if (!target) return;
117
- applyMembership(target);
118
- void queryClient.invalidateQueries();
119
- void apiRequest("/users/me", {
120
- method: "PATCH",
121
- headers: { "Content-Type": "application/json" },
122
- body: JSON.stringify({ last_visited_org: target.organizationId })
123
- }).catch((err) => {
124
- console.warn("Failed to persist last_visited_org preference:", err);
125
- });
126
- },
127
- [memberships, applyMembership, queryClient, apiRequest]
128
- );
129
- const retry = useCallback(async () => {
130
- hasInitializedRef.current = false;
131
- setError(null);
132
- await fetchAndInitialize();
133
- }, [fetchAndInitialize]);
134
- const value = {
135
- currentWorkOSOrganizationId,
136
- currentSupabaseOrganizationId,
137
- currentMembership,
138
- memberships,
139
- isInitializing,
140
- isOrgRefreshing,
141
- error,
142
- switchOrganization,
143
- retry
144
- };
145
- return createElement(OrganizationContext.Provider, { value }, children);
146
- }
147
8
  function OrganizationSwitcher({
148
9
  currentOrganization,
149
10
  memberships,
@@ -485,4 +346,4 @@ function createUseOrgInitialization(useOrganizations, useApiClient) {
485
346
  };
486
347
  }
487
348
 
488
- export { OrganizationProvider, OrganizationSwitcher, createOrganizationsSlice, createUseOrgInitialization, createUseOrganizations };
349
+ export { OrganizationSwitcher, createOrganizationsSlice, createUseOrgInitialization, createUseOrganizations };
@@ -1,7 +1,7 @@
1
- import { PRESETS, getPreset, generateShades, mantineThemeOverride, createCssVariablesResolver, PresetsProvider } from './chunk-47YILFON.js';
2
- import { AppBackground } from './chunk-CYXZHBP4.js';
3
- import { ElevasisCoreProvider, ElevasisFeaturesProvider } from './chunk-OPT74SGF.js';
4
- import { ElevasisLoader } from './chunk-Y3D3WFJG.js';
1
+ import { PRESETS, getPreset, generateShades, mantineThemeOverride, createCssVariablesResolver, PresetsProvider } from './chunk-6PNHW4X2.js';
2
+ import { AppBackground } from './chunk-F4TPY6YL.js';
3
+ import { ElevasisCoreProvider } from './chunk-R7WLWGPO.js';
4
+ import { ElevasisLoader } from './chunk-SZHARWKU.js';
5
5
  import { AppearanceProvider } from './chunk-QJ2KCHKX.js';
6
6
  import { getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-IOKL7BKE.js';
7
7
  import { useMemo, useEffect } from 'react';
@@ -91,13 +91,5 @@ function ElevasisUIProvider({ theme, children, ...coreProps }) {
91
91
  }
92
92
  );
93
93
  }
94
- function createTestFeaturesProvider({
95
- organizationModel,
96
- features = []
97
- } = {}) {
98
- return function TestFeaturesProvider({ children }) {
99
- return /* @__PURE__ */ jsx(ElevasisFeaturesProvider, { features, organizationModel, children });
100
- };
101
- }
102
94
 
103
- export { ElevasisUIProvider, createTestFeaturesProvider };
95
+ export { ElevasisUIProvider };