@elevasis/ui 1.26.1 → 1.28.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 (57) hide show
  1. package/dist/charts/index.js +2 -2
  2. package/dist/{chunk-MHW43EOH.js → chunk-2IFYDILW.js} +2 -1
  3. package/dist/{chunk-AWT255UH.js → chunk-2IJCM3VQ.js} +37 -37
  4. package/dist/{chunk-4INR75ZS.js → chunk-37NT4BNV.js} +589 -65
  5. package/dist/chunk-5COLSYBE.js +199 -0
  6. package/dist/{chunk-YNGQ7U5H.js → chunk-7CJ5QBN2.js} +2 -2
  7. package/dist/{chunk-L3GVDMCA.js → chunk-C27LLJM6.js} +3 -195
  8. package/dist/chunk-C4WOXS2C.js +6646 -0
  9. package/dist/{chunk-RMPXGBNI.js → chunk-D25AE46Q.js} +2 -2
  10. package/dist/{chunk-ZVJKIJFG.js → chunk-EBCIUZVV.js} +13 -42
  11. package/dist/{chunk-O4UB5DQQ.js → chunk-F2J7675J.js} +1 -1
  12. package/dist/chunk-KLG4H5NM.js +247 -0
  13. package/dist/{chunk-BS4J2LAW.js → chunk-QTD5HPKD.js} +1 -1
  14. package/dist/chunk-S4S6K4MV.js +635 -0
  15. package/dist/{chunk-FEZZ3IDU.js → chunk-TXPUIHX2.js} +10 -10
  16. package/dist/{chunk-L4XXM55J.js → chunk-W4VYXIN7.js} +142 -3
  17. package/dist/{chunk-4WKWLFBZ.js → chunk-ZUJ7WMGV.js} +1 -1
  18. package/dist/chunk-ZXBD5SBV.js +2115 -0
  19. package/dist/components/index.d.ts +339 -73
  20. package/dist/components/index.js +840 -688
  21. package/dist/features/auth/index.d.ts +125 -0
  22. package/dist/features/auth/index.js +2 -2
  23. package/dist/features/dashboard/index.d.ts +28 -2
  24. package/dist/features/dashboard/index.js +21 -635
  25. package/dist/features/monitoring/index.d.ts +28 -1
  26. package/dist/features/monitoring/index.js +19 -529
  27. package/dist/features/operations/index.d.ts +57 -8
  28. package/dist/features/operations/index.js +25 -3760
  29. package/dist/features/settings/index.d.ts +153 -1
  30. package/dist/features/settings/index.js +19 -1438
  31. package/dist/hooks/index.d.ts +262 -25
  32. package/dist/hooks/index.js +12 -8
  33. package/dist/hooks/published.d.ts +137 -25
  34. package/dist/hooks/published.js +11 -7
  35. package/dist/index.d.ts +388 -99
  36. package/dist/index.js +12 -11
  37. package/dist/initialization/index.d.ts +125 -0
  38. package/dist/layout/index.d.ts +2 -0
  39. package/dist/layout/index.js +6 -5
  40. package/dist/organization/index.js +1 -2
  41. package/dist/profile/index.d.ts +125 -0
  42. package/dist/provider/index.d.ts +130 -3
  43. package/dist/provider/index.js +10 -4
  44. package/dist/provider/published.d.ts +130 -3
  45. package/dist/provider/published.js +8 -2
  46. package/dist/router/context.d.ts +1 -0
  47. package/dist/router/index.d.ts +1 -0
  48. package/dist/router/index.js +1 -1
  49. package/dist/supabase/index.d.ts +242 -0
  50. package/dist/theme/index.js +2 -2
  51. package/dist/types/index.d.ts +126 -1
  52. package/package.json +1 -1
  53. package/dist/chunk-LR4WVA7W.js +0 -682
  54. package/dist/chunk-R7WLWGPO.js +0 -126
  55. package/dist/chunk-TCKIAHDC.js +0 -2626
  56. package/dist/chunk-V7XHGJQZ.js +0 -145
  57. package/dist/{chunk-WWEMNIHW.js → chunk-YYBM5LNJ.js} +1 -1
@@ -1,126 +0,0 @@
1
- import { ApiClientProvider, useApiClient } from './chunk-NVOCKXUQ.js';
2
- import { OrganizationProvider } from './chunk-V7XHGJQZ.js';
3
- import { getErrorInfo, getErrorTitle, formatErrorMessage } from './chunk-IOKL7BKE.js';
4
- import { InitializationProvider } from './chunk-TUXTSEAF.js';
5
- import { useOrganization } from './chunk-DD3CCMCZ.js';
6
- import { ProfileProvider, ElevasisServiceProvider } from './chunk-QEPXAWE2.js';
7
- import { useAuthContext } from './chunk-BRJ3QZ4E.js';
8
- import { createContext, lazy, useContext, Suspense, useRef } from 'react';
9
- import { jsx } from 'react/jsx-runtime';
10
- import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
11
-
12
- var consoleAdapter = {
13
- success(title, message) {
14
- console.log(`[Notification][Success] ${title}: ${message}`);
15
- },
16
- error(title, message) {
17
- console.warn(`[Notification][Error] ${title}: ${message}`);
18
- },
19
- info(title, message) {
20
- console.log(`[Notification][Info] ${title}: ${message}`);
21
- },
22
- warning(title, message) {
23
- console.warn(`[Notification][Warning] ${title}: ${message}`);
24
- },
25
- apiError(error) {
26
- const { message, code, requestId, fields, retryAfter } = getErrorInfo(error);
27
- const title = getErrorTitle(code);
28
- const formatted = formatErrorMessage(message, requestId, fields, retryAfter);
29
- console.warn(`[Notification][API Error] ${title}: ${formatted}`);
30
- }
31
- };
32
- var NotificationContext = createContext(consoleAdapter);
33
- function NotificationProvider({ adapter, children }) {
34
- return /* @__PURE__ */ jsx(NotificationContext.Provider, { value: adapter, children });
35
- }
36
- function useNotificationAdapter() {
37
- return useContext(NotificationContext);
38
- }
39
- var LazyCoreAuthKitInner = lazy(() => import('./CoreAuthKitInner-I32JCNE7.js').then((m) => ({ default: m.CoreAuthKitInner })));
40
- var defaultQueryClient = null;
41
- function getDefaultQueryClient() {
42
- if (!defaultQueryClient) {
43
- defaultQueryClient = new QueryClient({
44
- defaultOptions: { queries: { retry: 1 } }
45
- });
46
- }
47
- return defaultQueryClient;
48
- }
49
- var consoleNotificationAdapter = {
50
- success(title, message) {
51
- console.log(`[Notification][Success] ${title}: ${message}`);
52
- },
53
- error(title, message) {
54
- console.warn(`[Notification][Error] ${title}: ${message}`);
55
- },
56
- info(title, message) {
57
- console.log(`[Notification][Info] ${title}: ${message}`);
58
- },
59
- warning(title, message) {
60
- console.warn(`[Notification][Warning] ${title}: ${message}`);
61
- },
62
- apiError(error) {
63
- console.warn(`[Notification][API Error]`, error);
64
- }
65
- };
66
- function ElevasisCoreProvider({
67
- auth,
68
- queryClient,
69
- apiUrl,
70
- onError,
71
- notifications,
72
- children
73
- }) {
74
- if (auth.mode === "apiKey") {
75
- throw new Error(
76
- `ElevasisCoreProvider: auth mode 'apiKey' is not yet implemented. Only 'authkit' mode is supported.`
77
- );
78
- }
79
- const resolvedQueryClient = queryClient ?? getDefaultQueryClient();
80
- const content = apiUrl ? /* @__PURE__ */ jsx(ServiceStack, { apiUrl, onError, notifications, children }) : children;
81
- const AuthInner = /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyCoreAuthKitInner, { auth, children: content }) });
82
- return /* @__PURE__ */ jsx(QueryClientProvider, { client: resolvedQueryClient, children: AuthInner });
83
- }
84
- function ServiceStack({
85
- apiUrl,
86
- onError,
87
- notifications,
88
- children
89
- }) {
90
- const { getAccessToken } = useAuthContext();
91
- const orgIdRef = useRef(null);
92
- const getOrganizationId = useRef(() => orgIdRef.current).current;
93
- return /* @__PURE__ */ jsx(
94
- ApiClientProvider,
95
- {
96
- getAccessToken,
97
- getOrganizationId,
98
- isOrganizationReady: false,
99
- onError,
100
- children: /* @__PURE__ */ jsx(ServiceStackInner, { apiUrl, orgIdRef, notifications, children })
101
- }
102
- );
103
- }
104
- function ServiceStackInner({
105
- apiUrl,
106
- orgIdRef,
107
- notifications,
108
- children
109
- }) {
110
- const { apiRequest } = useApiClient(apiUrl);
111
- const resolvedNotifications = notifications ?? consoleNotificationAdapter;
112
- return /* @__PURE__ */ jsx(ProfileProvider, { apiRequest, children: /* @__PURE__ */ jsx(OrganizationProvider, { apiRequest, children: /* @__PURE__ */ jsx(OrgServiceBridge, { orgIdRef, apiRequest, notifications: resolvedNotifications, children }) }) });
113
- }
114
- function OrgServiceBridge({
115
- orgIdRef,
116
- apiRequest,
117
- notifications,
118
- children
119
- }) {
120
- const { currentWorkOSOrganizationId, isInitializing, isOrgRefreshing } = useOrganization();
121
- orgIdRef.current = currentWorkOSOrganizationId;
122
- const isReady = !!currentWorkOSOrganizationId && !isInitializing && !isOrgRefreshing;
123
- return /* @__PURE__ */ jsx(ElevasisServiceProvider, { apiRequest, organizationId: currentWorkOSOrganizationId, isReady, children: /* @__PURE__ */ jsx(NotificationProvider, { adapter: notifications, children: /* @__PURE__ */ jsx(InitializationProvider, { children }) }) });
124
- }
125
-
126
- export { ElevasisCoreProvider, NotificationProvider, useNotificationAdapter };