@elevasis/ui 1.3.1 → 1.3.3

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 (272) hide show
  1. package/dist/api/index.js +1 -1
  2. package/dist/auth/guards/AdminGuard.d.ts +32 -0
  3. package/dist/auth/guards/AdminGuard.d.ts.map +1 -0
  4. package/dist/auth/guards/ProtectedRoute.d.ts +60 -0
  5. package/dist/auth/guards/ProtectedRoute.d.ts.map +1 -0
  6. package/dist/auth/guards/__tests__/AdminGuard.test.d.ts +12 -0
  7. package/dist/auth/guards/__tests__/AdminGuard.test.d.ts.map +1 -0
  8. package/dist/auth/guards/__tests__/ProtectedRoute.test.d.ts +14 -0
  9. package/dist/auth/guards/__tests__/ProtectedRoute.test.d.ts.map +1 -0
  10. package/dist/auth/index.d.ts +14 -174
  11. package/dist/auth/index.d.ts.map +1 -0
  12. package/dist/auth/index.js +1 -1
  13. package/dist/{chunk-A3MCANC6.js → chunk-6IX5JZEH.js} +110 -50
  14. package/dist/chunk-GIFAF5ZS.js +313 -0
  15. package/dist/chunk-JQLT6HBI.js +850 -0
  16. package/dist/chunk-LFYO3MDC.js +58 -0
  17. package/dist/{chunk-72HOBFMP.js → chunk-LTQAAIGE.js} +3 -3
  18. package/dist/{chunk-JBFFCZI4.js → chunk-U34YGJQB.js} +1 -93
  19. package/dist/components/index.d.ts +1 -1353
  20. package/dist/components/index.js +1 -20
  21. package/dist/components/navigation/index.d.ts +2 -32
  22. package/dist/components/navigation/index.js +1 -29
  23. package/dist/execution/index.d.ts +63 -231
  24. package/dist/execution/index.js +1 -4
  25. package/dist/graph/index.css +0 -1
  26. package/dist/graph/index.d.ts +4 -203
  27. package/dist/graph/index.js +1 -1
  28. package/dist/hooks/command-queue/index.d.ts +7 -0
  29. package/dist/hooks/command-queue/index.d.ts.map +1 -0
  30. package/dist/hooks/command-queue/useCommandQueue.d.ts +33 -0
  31. package/dist/hooks/command-queue/useCommandQueue.d.ts.map +1 -0
  32. package/dist/hooks/command-queue/useCommandQueueTotals.d.ts +17 -0
  33. package/dist/hooks/command-queue/useCommandQueueTotals.d.ts.map +1 -0
  34. package/dist/hooks/command-queue/useDeleteTask.d.ts +5 -0
  35. package/dist/hooks/command-queue/useDeleteTask.d.ts.map +1 -0
  36. package/dist/hooks/command-queue/usePatchTask.d.ts +6 -0
  37. package/dist/hooks/command-queue/usePatchTask.d.ts.map +1 -0
  38. package/dist/hooks/command-queue/useSubmitAction.d.ts +29 -0
  39. package/dist/hooks/command-queue/useSubmitAction.d.ts.map +1 -0
  40. package/dist/hooks/executions/index.d.ts +16 -0
  41. package/dist/hooks/executions/index.d.ts.map +1 -0
  42. package/dist/hooks/executions/useBulkDeleteExecutions.d.ts +15 -0
  43. package/dist/hooks/executions/useBulkDeleteExecutions.d.ts.map +1 -0
  44. package/dist/hooks/executions/useCancelExecution.d.ts +20 -0
  45. package/dist/hooks/executions/useCancelExecution.d.ts.map +1 -0
  46. package/dist/hooks/executions/useDeleteExecution.d.ts +13 -0
  47. package/dist/hooks/executions/useDeleteExecution.d.ts.map +1 -0
  48. package/dist/hooks/executions/useExecuteAsync.d.ts +21 -0
  49. package/dist/hooks/executions/useExecuteAsync.d.ts.map +1 -0
  50. package/dist/hooks/executions/useExecution.d.ts +10 -0
  51. package/dist/hooks/executions/useExecution.d.ts.map +1 -0
  52. package/dist/hooks/executions/useExecutions.d.ts +16 -0
  53. package/dist/hooks/executions/useExecutions.d.ts.map +1 -0
  54. package/dist/hooks/executions/useResourceDefinition.d.ts +9 -0
  55. package/dist/hooks/executions/useResourceDefinition.d.ts.map +1 -0
  56. package/dist/hooks/executions/useResources.d.ts +15 -0
  57. package/dist/hooks/executions/useResources.d.ts.map +1 -0
  58. package/dist/hooks/executions/useRetryExecution.d.ts +16 -0
  59. package/dist/hooks/executions/useRetryExecution.d.ts.map +1 -0
  60. package/dist/hooks/feature-access/createUseFeatureAccess.d.ts +44 -0
  61. package/dist/hooks/feature-access/createUseFeatureAccess.d.ts.map +1 -0
  62. package/dist/hooks/feature-access/index.d.ts +2 -0
  63. package/dist/hooks/feature-access/index.d.ts.map +1 -0
  64. package/dist/hooks/index.d.ts +11 -4554
  65. package/dist/hooks/index.d.ts.map +1 -0
  66. package/dist/hooks/index.js +2 -4
  67. package/dist/hooks/monitoring/index.d.ts +9 -0
  68. package/dist/hooks/monitoring/index.d.ts.map +1 -0
  69. package/dist/hooks/monitoring/useActivities.d.ts +52 -0
  70. package/dist/hooks/monitoring/useActivities.d.ts.map +1 -0
  71. package/dist/hooks/monitoring/useCostSummary.d.ts +7 -0
  72. package/dist/hooks/monitoring/useCostSummary.d.ts.map +1 -0
  73. package/dist/hooks/monitoring/useExecutionHealth.d.ts +10 -0
  74. package/dist/hooks/monitoring/useExecutionHealth.d.ts.map +1 -0
  75. package/dist/hooks/monitoring/useExecutionLogs.d.ts +56 -0
  76. package/dist/hooks/monitoring/useExecutionLogs.d.ts.map +1 -0
  77. package/dist/hooks/monitoring/useNotifications.d.ts +11 -0
  78. package/dist/hooks/monitoring/useNotifications.d.ts.map +1 -0
  79. package/dist/hooks/notifications/index.d.ts +8 -0
  80. package/dist/hooks/notifications/index.d.ts.map +1 -0
  81. package/dist/hooks/notifications/useMarkAllAsRead.d.ts +2 -0
  82. package/dist/hooks/notifications/useMarkAllAsRead.d.ts.map +1 -0
  83. package/dist/hooks/notifications/useMarkAsRead.d.ts +2 -0
  84. package/dist/hooks/notifications/useMarkAsRead.d.ts.map +1 -0
  85. package/dist/hooks/notifications/useNotificationCount.d.ts +8 -0
  86. package/dist/hooks/notifications/useNotificationCount.d.ts.map +1 -0
  87. package/dist/hooks/observability/index.d.ts +19 -0
  88. package/dist/hooks/observability/index.d.ts.map +1 -0
  89. package/dist/hooks/observability/useBusinessImpact.d.ts +9 -0
  90. package/dist/hooks/observability/useBusinessImpact.d.ts.map +1 -0
  91. package/dist/hooks/observability/useCostBreakdown.d.ts +10 -0
  92. package/dist/hooks/observability/useCostBreakdown.d.ts.map +1 -0
  93. package/dist/hooks/observability/useCostByModel.d.ts +3 -0
  94. package/dist/hooks/observability/useCostByModel.d.ts.map +1 -0
  95. package/dist/hooks/observability/useCostTrends.d.ts +3 -0
  96. package/dist/hooks/observability/useCostTrends.d.ts.map +1 -0
  97. package/dist/hooks/observability/useDashboardMetrics.d.ts +3 -0
  98. package/dist/hooks/observability/useDashboardMetrics.d.ts.map +1 -0
  99. package/dist/hooks/observability/useErrorAnalysis.d.ts +7 -0
  100. package/dist/hooks/observability/useErrorAnalysis.d.ts.map +1 -0
  101. package/dist/hooks/observability/useErrorDetails.d.ts +20 -0
  102. package/dist/hooks/observability/useErrorDetails.d.ts.map +1 -0
  103. package/dist/hooks/observability/useErrorDistribution.d.ts +12 -0
  104. package/dist/hooks/observability/useErrorDistribution.d.ts.map +1 -0
  105. package/dist/hooks/observability/useErrorTrends.d.ts +12 -0
  106. package/dist/hooks/observability/useErrorTrends.d.ts.map +1 -0
  107. package/dist/hooks/observability/useResolveError.d.ts +17 -0
  108. package/dist/hooks/observability/useResolveError.d.ts.map +1 -0
  109. package/dist/hooks/observability/useTopFailingResources.d.ts +13 -0
  110. package/dist/hooks/observability/useTopFailingResources.d.ts.map +1 -0
  111. package/dist/hooks/published.d.ts +19 -4279
  112. package/dist/hooks/published.d.ts.map +1 -0
  113. package/dist/hooks/published.js +367 -4
  114. package/dist/hooks/scheduling/index.d.ts +5 -0
  115. package/dist/hooks/scheduling/index.d.ts.map +1 -0
  116. package/dist/hooks/scheduling/useSchedules.d.ts +185 -0
  117. package/dist/hooks/scheduling/useSchedules.d.ts.map +1 -0
  118. package/dist/hooks/sessions/index.d.ts +8 -0
  119. package/dist/hooks/sessions/index.d.ts.map +1 -0
  120. package/dist/hooks/sessions/useSessionExecutions.d.ts +13 -0
  121. package/dist/hooks/sessions/useSessionExecutions.d.ts.map +1 -0
  122. package/dist/hooks/sessions/useSessionMessages.d.ts +7 -0
  123. package/dist/hooks/sessions/useSessionMessages.d.ts.map +1 -0
  124. package/dist/hooks/sessions/useSessions.d.ts +26 -0
  125. package/dist/hooks/sessions/useSessions.d.ts.map +1 -0
  126. package/dist/index.css +0 -118
  127. package/dist/index.d.ts +15 -7889
  128. package/dist/index.d.ts.map +1 -0
  129. package/dist/index.js +1119 -24
  130. package/dist/initialization/InitializationProvider.d.ts +48 -0
  131. package/dist/initialization/InitializationProvider.d.ts.map +1 -0
  132. package/dist/initialization/hooks/useAppInitialization.d.ts +32 -0
  133. package/dist/initialization/hooks/useAppInitialization.d.ts.map +1 -0
  134. package/dist/initialization/index.d.ts +22 -2361
  135. package/dist/initialization/index.d.ts.map +1 -0
  136. package/dist/initialization/index.js +1 -1
  137. package/dist/organization/context/OrganizationProvider.d.ts +20 -0
  138. package/dist/organization/context/OrganizationProvider.d.ts.map +1 -0
  139. package/dist/organization/hooks/useOrgInitialization.d.ts +56 -0
  140. package/dist/organization/hooks/useOrgInitialization.d.ts.map +1 -0
  141. package/dist/organization/index.d.ts +21 -283
  142. package/dist/organization/index.d.ts.map +1 -0
  143. package/dist/organization/index.js +3 -3
  144. package/dist/profile/context/ProfileProvider.d.ts +27 -0
  145. package/dist/profile/context/ProfileProvider.d.ts.map +1 -0
  146. package/dist/profile/hooks/useUserProfile.d.ts +31 -0
  147. package/dist/profile/hooks/useUserProfile.d.ts.map +1 -0
  148. package/dist/profile/index.d.ts +14 -2290
  149. package/dist/profile/index.d.ts.map +1 -0
  150. package/dist/provider/CoreAuthKitInner.d.ts +12 -0
  151. package/dist/provider/CoreAuthKitInner.d.ts.map +1 -0
  152. package/dist/provider/ElevasisCoreProvider.d.ts +39 -0
  153. package/dist/provider/ElevasisCoreProvider.d.ts.map +1 -0
  154. package/dist/provider/ElevasisServiceContext.d.ts +31 -0
  155. package/dist/provider/ElevasisServiceContext.d.ts.map +1 -0
  156. package/dist/provider/__tests__/CoreAuthKitInner.test.d.ts +2 -0
  157. package/dist/provider/__tests__/CoreAuthKitInner.test.d.ts.map +1 -0
  158. package/dist/provider/__tests__/ElevasisCoreProvider.test.d.ts +2 -0
  159. package/dist/provider/__tests__/ElevasisCoreProvider.test.d.ts.map +1 -0
  160. package/dist/provider/index.d.ts +7 -372
  161. package/dist/provider/index.d.ts.map +1 -0
  162. package/dist/provider/index.js +3 -12
  163. package/dist/provider/published.d.ts +9 -263
  164. package/dist/provider/published.d.ts.map +1 -0
  165. package/dist/provider/published.js +5 -5
  166. package/dist/provider/types.d.ts +143 -0
  167. package/dist/provider/types.d.ts.map +1 -0
  168. package/dist/provider/types.js +1 -0
  169. package/dist/sdk-barrel.d.ts +20 -0
  170. package/dist/sdk-barrel.d.ts.map +1 -0
  171. package/dist/supabase/index.d.ts +0 -255
  172. package/dist/theme/cssVariables.d.ts +12 -0
  173. package/dist/theme/cssVariables.d.ts.map +1 -0
  174. package/dist/theme/cssVariables.js +93 -0
  175. package/dist/theme/index.d.ts +4 -0
  176. package/dist/theme/index.d.ts.map +1 -0
  177. package/dist/theme/index.js +1 -0
  178. package/dist/theme/presets/__tests__/getPreset.test.d.ts +2 -0
  179. package/dist/theme/presets/__tests__/getPreset.test.d.ts.map +1 -0
  180. package/dist/theme/presets/abyss.d.ts +3 -0
  181. package/dist/theme/presets/abyss.d.ts.map +1 -0
  182. package/dist/theme/presets/abyss.js +54 -0
  183. package/dist/theme/presets/aurora.d.ts +8 -0
  184. package/dist/theme/presets/aurora.d.ts.map +1 -0
  185. package/dist/theme/presets/aurora.js +59 -0
  186. package/dist/theme/presets/canopy.d.ts +3 -0
  187. package/dist/theme/presets/canopy.d.ts.map +1 -0
  188. package/dist/theme/presets/canopy.js +58 -0
  189. package/dist/theme/presets/cyber-flux.d.ts +8 -0
  190. package/dist/theme/presets/cyber-flux.d.ts.map +1 -0
  191. package/dist/theme/presets/cyber-flux.js +66 -0
  192. package/dist/theme/presets/cyber-strike.d.ts +9 -0
  193. package/dist/theme/presets/cyber-strike.d.ts.map +1 -0
  194. package/dist/theme/presets/cyber-strike.js +62 -0
  195. package/dist/theme/presets/cyber-void.d.ts +8 -0
  196. package/dist/theme/presets/cyber-void.d.ts.map +1 -0
  197. package/dist/theme/presets/cyber-void.js +62 -0
  198. package/dist/theme/presets/cyber-volt.d.ts +8 -0
  199. package/dist/theme/presets/cyber-volt.d.ts.map +1 -0
  200. package/dist/theme/presets/cyber-volt.js +66 -0
  201. package/dist/theme/presets/default.d.ts +4 -0
  202. package/dist/theme/presets/default.d.ts.map +1 -0
  203. package/dist/theme/presets/ember.d.ts +8 -0
  204. package/dist/theme/presets/ember.d.ts.map +1 -0
  205. package/dist/theme/presets/ember.js +63 -0
  206. package/dist/theme/presets/honey.d.ts +3 -0
  207. package/dist/theme/presets/honey.d.ts.map +1 -0
  208. package/dist/theme/presets/honey.js +62 -0
  209. package/dist/theme/presets/index.d.ts +6 -0
  210. package/dist/theme/presets/index.d.ts.map +1 -0
  211. package/dist/theme/presets/index.js +39 -0
  212. package/dist/theme/presets/midnight.d.ts +8 -0
  213. package/dist/theme/presets/midnight.d.ts.map +1 -0
  214. package/dist/theme/presets/midnight.js +68 -0
  215. package/dist/theme/presets/obsidian.d.ts +3 -0
  216. package/dist/theme/presets/obsidian.d.ts.map +1 -0
  217. package/dist/theme/presets/obsidian.js +56 -0
  218. package/dist/theme/presets/regal.d.ts +8 -0
  219. package/dist/theme/presets/regal.d.ts.map +1 -0
  220. package/dist/theme/presets/regal.js +63 -0
  221. package/dist/theme/presets/rose-gold.d.ts +8 -0
  222. package/dist/theme/presets/rose-gold.d.ts.map +1 -0
  223. package/dist/theme/presets/rose-gold.js +63 -0
  224. package/dist/theme/presets/slate.d.ts +3 -0
  225. package/dist/theme/presets/slate.d.ts.map +1 -0
  226. package/dist/theme/presets/slate.js +56 -0
  227. package/dist/theme/presets/tactical.d.ts +8 -0
  228. package/dist/theme/presets/tactical.d.ts.map +1 -0
  229. package/dist/theme/presets/tactical.js +57 -0
  230. package/dist/theme/presets/types.d.ts +26 -0
  231. package/dist/theme/presets/types.d.ts.map +1 -0
  232. package/dist/theme/presets/types.js +1 -0
  233. package/dist/utils/index.d.ts +1 -22
  234. package/dist/utils/index.js +1 -1
  235. package/package.json +4 -52
  236. package/dist/chunk-3KMDHCAR.js +0 -52
  237. package/dist/chunk-6BJOYF6E.js +0 -8
  238. package/dist/chunk-BLO4SISK.js +0 -113
  239. package/dist/chunk-HUWJXLLF.js +0 -681
  240. package/dist/chunk-JVAZHVNV.js +0 -110
  241. package/dist/chunk-JYSYHVLU.js +0 -379
  242. package/dist/chunk-NE36BUGQ.js +0 -146
  243. package/dist/chunk-O3PY6B6E.js +0 -749
  244. package/dist/chunk-OXVOHOP3.js +0 -661
  245. package/dist/chunk-PSLKGOBZ.js +0 -58
  246. package/dist/chunk-RJCA5672.js +0 -1664
  247. package/dist/chunk-TMFCNFLW.js +0 -107
  248. package/dist/chunk-TN3PU2WK.js +0 -748
  249. package/dist/chunk-TZPAA4RC.js +0 -1461
  250. package/dist/chunk-W7ZBF5AA.js +0 -1
  251. package/dist/chunk-YZ6GTZXL.js +0 -48
  252. package/dist/components/command-queue/index.css +0 -53
  253. package/dist/components/command-queue/index.d.ts +0 -204
  254. package/dist/components/command-queue/index.js +0 -12
  255. package/dist/components/forms/index.d.ts +0 -56
  256. package/dist/components/forms/index.js +0 -2
  257. package/dist/components/index.css +0 -443
  258. package/dist/components/monitoring/index.d.ts +0 -66
  259. package/dist/components/monitoring/index.js +0 -2
  260. package/dist/components/notifications/index.d.ts +0 -52
  261. package/dist/components/notifications/index.js +0 -5
  262. package/dist/components/resource-definition/index.css +0 -388
  263. package/dist/components/resource-definition/index.d.ts +0 -301
  264. package/dist/components/resource-definition/index.js +0 -3
  265. package/dist/display/index.css +0 -53
  266. package/dist/display/index.d.ts +0 -606
  267. package/dist/display/index.js +0 -7
  268. package/dist/execution/index.css +0 -388
  269. package/dist/provider/index.css +0 -61
  270. package/dist/{chunk-TYV5NJV2.js → chunk-BUZONXAW.js} +0 -0
  271. package/dist/{chunk-UMXDDEAG.js → chunk-SFF5MJEI.js} +1 -1
  272. /package/dist/{chunk-NXHL23JW.js → chunk-XXDDMASA.js} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/profile/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACvE,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAGpE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACvD,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAGlE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA"}
@@ -0,0 +1,12 @@
1
+ import type { AuthKitConfig } from './types';
2
+ import type { ReactNode } from 'react';
3
+ /**
4
+ * Inner component for authkit mode.
5
+ * Extracted to a separate module so it can be lazy-loaded,
6
+ * avoiding a hard dependency on @workos-inc/authkit-react for OAuth-only consumers.
7
+ */
8
+ export declare function CoreAuthKitInner({ auth, children }: {
9
+ auth: AuthKitConfig;
10
+ children: ReactNode;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=CoreAuthKitInner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CoreAuthKitInner.d.ts","sourceRoot":"","sources":["../../src/provider/CoreAuthKitInner.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAWhG"}
@@ -0,0 +1,39 @@
1
+ import type { ElevasisCoreProviderProps } from './types';
2
+ /**
3
+ * Headless root provider for Elevasis-powered applications.
4
+ *
5
+ * Pure auth + API provider with no style side-effects. Does not inject CSS
6
+ * variables, set `data-elevasis-scheme`, or load fonts. Consumers that need
7
+ * Elevasis theming should use `ElevasisProvider` (Mantine) instead.
8
+ *
9
+ * When `apiUrl` is provided, composes the full provider stack:
10
+ * QueryClientProvider -> AuthProvider -> ApiClientProvider ->
11
+ * ElevasisServiceProvider -> ProfileProvider -> OrganizationProvider ->
12
+ * NotificationProvider -> InitializationProvider
13
+ *
14
+ * The `notifications` prop wires a custom adapter (e.g. mantineNotificationAdapter)
15
+ * into the NotificationProvider. When omitted, the console fallback is used.
16
+ *
17
+ * @example Headless SDK consumer
18
+ * ```tsx
19
+ * <ElevasisCoreProvider
20
+ * auth={{ mode: 'authkit', clientId: '...', redirectUri: '/' }}
21
+ * apiUrl="https://api.elevasis.com"
22
+ * >
23
+ * <Dashboard />
24
+ * </ElevasisCoreProvider>
25
+ * ```
26
+ *
27
+ * @example With custom notification adapter
28
+ * ```tsx
29
+ * <ElevasisCoreProvider
30
+ * auth={{ mode: 'authkit', clientId: '...', redirectUri: '/' }}
31
+ * apiUrl="https://api.elevasis.com"
32
+ * notifications={myNotificationAdapter}
33
+ * >
34
+ * <Dashboard />
35
+ * </ElevasisCoreProvider>
36
+ * ```
37
+ */
38
+ export declare function ElevasisCoreProvider({ auth, queryClient, apiUrl, onError, notifications, children }: ElevasisCoreProviderProps): import("react/jsx-runtime").JSX.Element;
39
+ //# sourceMappingURL=ElevasisCoreProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElevasisCoreProvider.d.ts","sourceRoot":"","sources":["../../src/provider/ElevasisCoreProvider.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAmBxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,WAAW,EACX,MAAM,EACN,OAAO,EACP,aAAa,EACb,QAAQ,EACT,EAAE,yBAAyB,2CAwB3B"}
@@ -0,0 +1,31 @@
1
+ import type { ElevasisServiceContextValue, ElevasisServiceProviderProps } from './types';
2
+ export declare const ElevasisServiceContext: import("react").Context<ElevasisServiceContextValue | null>;
3
+ /**
4
+ * Hook to access the ElevasisServiceProvider context.
5
+ * Provides apiRequest, organizationId, and isReady.
6
+ *
7
+ * Throws if used outside of an ElevasisServiceProvider or ElevasisProvider (with apiUrl).
8
+ */
9
+ export declare function useElevasisServices(): ElevasisServiceContextValue;
10
+ /**
11
+ * Standalone service provider for testing, embedding, or advanced consumers.
12
+ *
13
+ * Accepts apiRequest, organizationId, and isReady directly as props.
14
+ * ElevasisProvider composes this internally when apiUrl is provided.
15
+ *
16
+ * @example Testing
17
+ * ```tsx
18
+ * <ElevasisServiceProvider apiRequest={mockApiRequest} organizationId="org-1" isReady={true}>
19
+ * <ComponentUnderTest />
20
+ * </ElevasisServiceProvider>
21
+ * ```
22
+ *
23
+ * @example Embedding
24
+ * ```tsx
25
+ * <ElevasisServiceProvider apiRequest={myFetcher} organizationId={orgId} isReady={!!orgId}>
26
+ * <CommandQueuePanel />
27
+ * </ElevasisServiceProvider>
28
+ * ```
29
+ */
30
+ export declare function ElevasisServiceProvider({ apiRequest, organizationId, isReady, children }: ElevasisServiceProviderProps): import("react/jsx-runtime").JSX.Element;
31
+ //# sourceMappingURL=ElevasisServiceContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElevasisServiceContext.d.ts","sourceRoot":"","sources":["../../src/provider/ElevasisServiceContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAExF,eAAO,MAAM,sBAAsB,6DAA0D,CAAA;AAE7F;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,2BAA2B,CASjE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,UAAU,EACV,cAAc,EACd,OAAO,EACP,QAAQ,EACT,EAAE,4BAA4B,2CAS9B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=CoreAuthKitInner.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CoreAuthKitInner.test.d.ts","sourceRoot":"","sources":["../../../src/provider/__tests__/CoreAuthKitInner.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ElevasisCoreProvider.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElevasisCoreProvider.test.d.ts","sourceRoot":"","sources":["../../../src/provider/__tests__/ElevasisCoreProvider.test.tsx"],"names":[],"mappings":""}
@@ -1,372 +1,7 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { MantineThemeOverride } from '@mantine/core';
3
- import { QueryClient } from '@tanstack/react-query';
4
- import { ReactNode } from 'react';
5
-
6
- type PresetName = 'default' | 'tactical' | 'regal' | 'cyber-volt' | 'aurora' | 'rose-gold' | 'midnight' | 'ember' | 'obsidian' | 'honey' | 'abyss' | 'canopy' | 'slate' | 'cyber-strike' | 'cyber-flux' | 'cyber-void';
7
-
8
- interface ApiErrorDetails {
9
- method: string;
10
- statusCode: number;
11
- requestId?: string;
12
- }
13
-
14
- /**
15
- * Pluggable notification adapter interface.
16
- *
17
- * Implement this to connect any notification library (Mantine, react-toastify, etc.)
18
- * to the Elevasis UI hooks.
19
- */
20
- interface NotificationAdapter {
21
- success(title: string, message: string): void;
22
- error(title: string, message: string): void;
23
- info(title: string, message: string): void;
24
- warning(title: string, message: string): void;
25
- /** Formats and displays an API error using structured error-utils helpers. */
26
- apiError(error: unknown): void;
27
- }
28
- /**
29
- * Provides a notification adapter to all descendant components.
30
- *
31
- * Pass a `MantineNotificationAdapter` for Command Center, or any custom
32
- * adapter for other consumers (template, tests, etc.).
33
- *
34
- * When omitted, hooks fall back to the console adapter automatically.
35
- *
36
- * @example
37
- * ```tsx
38
- * import { NotificationProvider } from '@repo/ui/provider'
39
- * import { mantineNotificationAdapter } from '@repo/ui/provider'
40
- *
41
- * <NotificationProvider adapter={mantineNotificationAdapter}>
42
- * <App />
43
- * </NotificationProvider>
44
- * ```
45
- */
46
- declare function NotificationProvider({ adapter, children }: {
47
- adapter: NotificationAdapter;
48
- children: ReactNode;
49
- }): react_jsx_runtime.JSX.Element;
50
- /**
51
- * Returns the active notification adapter.
52
- *
53
- * Falls back to the console adapter when used outside a NotificationProvider,
54
- * so hooks remain functional in template environments without Mantine.
55
- *
56
- * Named `useNotificationAdapter` to avoid collision with the data-fetching
57
- * `useNotifications` hook exported from `hooks/monitoring`.
58
- */
59
- declare function useNotificationAdapter(): NotificationAdapter;
60
-
61
- /** Flat + per-scheme override pattern. Flat values apply to both; `light`/`dark` win over flat. */
62
- type WithSchemes<T> = T & {
63
- light?: T;
64
- dark?: T;
65
- };
66
- /**
67
- * Theme token overrides. Each key maps 1:1 to a CSS variable.
68
- * All optional — defaults come from Elevasis design system.
69
- */
70
- interface ElevasisTokenOverrides {
71
- primary?: string;
72
- /** Text color that contrasts with `primary`. Defaults to '#fff'. */
73
- primaryContrast?: string;
74
- background?: string;
75
- surface?: string;
76
- surfaceHover?: string;
77
- text?: string;
78
- textDimmed?: string;
79
- textSubtle?: string;
80
- border?: string;
81
- error?: string;
82
- warning?: string;
83
- success?: string;
84
- glassBackground?: string;
85
- glassBlur?: string;
86
- shadow?: string;
87
- cardShadow?: string;
88
- durationFast?: string;
89
- durationNormal?: string;
90
- easing?: string;
91
- }
92
- /**
93
- * Core theme config — Mantine-free.
94
- * Used by ElevasisCoreProvider and as the base for ElevasisThemeConfig.
95
- */
96
- interface ElevasisCoreThemeConfig {
97
- /** Color scheme: 'light', 'dark', or 'auto'. Defaults to 'dark'. */
98
- colorScheme?: 'light' | 'dark' | 'auto';
99
- /** Named preset — bundles light/dark token defaults. Defaults to 'default'. */
100
- preset?: PresetName;
101
- /**
102
- * Semantic token overrides fed into CSS variables.
103
- * Flat values apply to both schemes. `light`/`dark` nested values win over flat.
104
- */
105
- tokens?: WithSchemes<ElevasisTokenOverrides>;
106
- }
107
- /**
108
- * Theme config passed to ElevasisProvider's `theme` prop.
109
- *
110
- * Three levels of customization:
111
- * 1. `tokens.primary` — most consumers only need this
112
- * 2. `tokens.*` — override any semantic token, with optional per-scheme values
113
- * 3. `mantine` — full Mantine theme escape hatch (fonts, spacing, component styles)
114
- */
115
- interface ElevasisThemeConfig extends ElevasisCoreThemeConfig {
116
- /** Full Mantine theme override — merged on top of Elevasis defaults. */
117
- mantine?: MantineThemeOverride;
118
- }
119
- /**
120
- * Auth configuration union.
121
- * 'authkit' (WorkOS AuthKit) is the supported mode.
122
- * 'apiKey' is defined for forward type compatibility but will throw at runtime.
123
- */
124
- type AuthConfig = AuthKitConfig | ApiKeyConfig;
125
- interface AuthKitConfig {
126
- mode: 'authkit';
127
- clientId: string;
128
- /** AuthKit API hostname. Defaults to 'api.workos.com'. */
129
- apiHostname?: string;
130
- /** Redirect URI after auth. */
131
- redirectUri?: string;
132
- /** Keep refresh tokens in localStorage. Defaults to false. */
133
- devMode?: boolean;
134
- }
135
- /** Deferred -- will throw at runtime. */
136
- interface ApiKeyConfig {
137
- mode: 'apiKey';
138
- key: string;
139
- }
140
- interface ElevasisCoreProviderProps {
141
- /** Auth configuration. Supports 'authkit' mode. */
142
- auth: AuthConfig;
143
- /**
144
- * Elevasis core theme configuration (Mantine-free).
145
- * Set `colorScheme` ('light', 'dark', 'auto') and override `tokens` (design tokens).
146
- * Defaults: colorScheme='dark', Elevasis design system tokens.
147
- */
148
- theme?: ElevasisCoreThemeConfig;
149
- /**
150
- * @deprecated Organization ID is now resolved automatically via OrganizationProvider.
151
- * This prop is accepted for backwards compatibility during migration but is no longer
152
- * used when the full provider stack is active (apiUrl provided).
153
- */
154
- organizationId?: string | null;
155
- /** Custom QueryClient. If omitted, a default is created internally. */
156
- queryClient?: QueryClient;
157
- /**
158
- * API base URL (e.g., 'https://api.elevasis.com' or 'http://localhost:5170').
159
- * When provided, ElevasisCoreProvider composes the full provider stack:
160
- * ApiClientProvider + ElevasisServiceProvider + ProfileProvider +
161
- * OrganizationProvider + NotificationProvider + InitializationProvider.
162
- * When omitted, no service context is provided (theme-only mode).
163
- */
164
- apiUrl?: string;
165
- /**
166
- * Error callback for API responses with status >= 500.
167
- * Only used when apiUrl is provided.
168
- */
169
- onError?: (endpoint: string, error: Error, details?: ApiErrorDetails) => void;
170
- /**
171
- * @deprecated Organization readiness is now managed internally by OrganizationProvider.
172
- * Accepted for backwards compatibility but ignored when apiUrl is provided.
173
- */
174
- isOrganizationReady?: boolean;
175
- /**
176
- * Notification adapter for displaying success/error/info messages.
177
- * When provided, wraps the subtree in a NotificationProvider with this adapter.
178
- * When omitted, the console fallback adapter is used automatically.
179
- *
180
- * ElevasisUIProvider (Mantine variant) passes mantineNotificationAdapter here automatically.
181
- * Headless/SDK consumers can pass a custom adapter or omit for console output.
182
- */
183
- notifications?: NotificationAdapter;
184
- /**
185
- * Whether to inject CSS variables, `data-elevasis-scheme` attribute, and font links.
186
- * Set to `false` when the consumer has its own complete design system and only
187
- * needs auth + API from this provider. Defaults to `true`.
188
- */
189
- injectStyles?: boolean;
190
- children: ReactNode;
191
- }
192
- interface ElevasisProviderProps {
193
- /** Auth configuration. Supports 'authkit' mode. */
194
- auth: AuthConfig;
195
- /**
196
- * Elevasis theme configuration.
197
- * Set `colorScheme` ('light', 'dark', 'auto') and override `tokens` (design tokens).
198
- * Defaults: colorScheme='auto', Elevasis design system tokens.
199
- */
200
- theme?: ElevasisThemeConfig;
201
- /**
202
- * @deprecated Organization ID is now resolved automatically via OrganizationProvider.
203
- * Accepted for backwards compatibility during migration but no longer used internally.
204
- */
205
- organizationId?: string | null;
206
- /** Custom QueryClient. If omitted, a default is created internally. */
207
- queryClient?: QueryClient;
208
- /**
209
- * API base URL (e.g., 'https://api.elevasis.com' or 'http://localhost:5170').
210
- * When provided, ElevasisUIProvider composes the full provider stack via ElevasisCoreProvider.
211
- * When omitted, no service context is provided (theme-only mode).
212
- */
213
- apiUrl?: string;
214
- /**
215
- * Error callback for API responses with status >= 500.
216
- * Only used when apiUrl is provided.
217
- */
218
- onError?: (endpoint: string, error: Error, details?: ApiErrorDetails) => void;
219
- /**
220
- * @deprecated Organization readiness is now managed internally by OrganizationProvider.
221
- * Accepted for backwards compatibility but ignored when apiUrl is provided.
222
- */
223
- isOrganizationReady?: boolean;
224
- children: ReactNode;
225
- }
226
- /**
227
- * Service context value exposed by ElevasisServiceProvider.
228
- * Provides a ready-to-use apiRequest function and organization state.
229
- *
230
- * For standalone usage (testing, embedding), use ElevasisServiceProvider directly.
231
- * For standard SDK usage, ElevasisProvider composes this automatically when apiUrl is provided.
232
- */
233
- interface ElevasisServiceContextValue {
234
- apiRequest: <T>(endpoint: string, options?: RequestInit) => Promise<T>;
235
- organizationId: string | null;
236
- isReady: boolean;
237
- }
238
- interface ElevasisServiceProviderProps {
239
- apiRequest: <T>(endpoint: string, options?: RequestInit) => Promise<T>;
240
- organizationId: string | null;
241
- isReady: boolean;
242
- children: ReactNode;
243
- }
244
-
245
- /**
246
- * UI provider for Elevasis-powered applications. Includes Mantine theme integration.
247
- *
248
- * A thin Mantine shell around ElevasisCoreProvider. Handles:
249
- * - MantineProvider with theme resolution (presets, token overrides, color scheme)
250
- * - Google Font injection for preset fonts
251
- * - CSS variables resolver
252
- * - Mantine notification adapter (wired into NotificationProvider automatically)
253
- *
254
- * All auth, API, profile, organization, and initialization composition is
255
- * delegated to ElevasisCoreProvider.
256
- *
257
- * @example Command-center (dogfooding)
258
- * ```tsx
259
- * <ElevasisUIProvider
260
- * auth={{ mode: 'authkit', clientId: '...', redirectUri: '/auth-redirect' }}
261
- * apiUrl={import.meta.env.VITE_API_SERVER}
262
- * onError={handleApiError}
263
- * queryClient={queryClient}
264
- * >
265
- * <AuthenticatedApp />
266
- * </ElevasisUIProvider>
267
- * ```
268
- *
269
- * @example SDK consumer (simple)
270
- * ```tsx
271
- * <ElevasisUIProvider
272
- * auth={{ mode: 'authkit', clientId: '...', redirectUri: '/' }}
273
- * apiUrl="https://api.elevasis.com"
274
- * >
275
- * <Dashboard />
276
- * </ElevasisUIProvider>
277
- * ```
278
- *
279
- * @example Theme-only mode (no API)
280
- * ```tsx
281
- * <ElevasisUIProvider auth={{ mode: 'authkit', clientId: '...' }}>
282
- * <ThemedContent />
283
- * </ElevasisUIProvider>
284
- * ```
285
- */
286
- declare function ElevasisUIProvider({ theme, children, ...coreProps }: ElevasisProviderProps): react_jsx_runtime.JSX.Element;
287
- /** @deprecated Use ElevasisUIProvider instead. Alias kept for backwards compatibility. */
288
- declare const ElevasisProvider: typeof ElevasisUIProvider;
289
-
290
- /**
291
- * Headless root provider for Elevasis-powered applications.
292
- *
293
- * Pure auth + API provider with no style side-effects. Does not inject CSS
294
- * variables, set `data-elevasis-scheme`, or load fonts. Consumers that need
295
- * Elevasis theming should use `ElevasisProvider` (Mantine) instead.
296
- *
297
- * When `apiUrl` is provided, composes the full provider stack:
298
- * QueryClientProvider -> AuthProvider -> ApiClientProvider ->
299
- * ElevasisServiceProvider -> ProfileProvider -> OrganizationProvider ->
300
- * NotificationProvider -> InitializationProvider
301
- *
302
- * The `notifications` prop wires a custom adapter (e.g. mantineNotificationAdapter)
303
- * into the NotificationProvider. When omitted, the console fallback is used.
304
- *
305
- * @example Headless SDK consumer
306
- * ```tsx
307
- * <ElevasisCoreProvider
308
- * auth={{ mode: 'authkit', clientId: '...', redirectUri: '/' }}
309
- * apiUrl="https://api.elevasis.com"
310
- * >
311
- * <Dashboard />
312
- * </ElevasisCoreProvider>
313
- * ```
314
- *
315
- * @example With custom notification adapter
316
- * ```tsx
317
- * <ElevasisCoreProvider
318
- * auth={{ mode: 'authkit', clientId: '...', redirectUri: '/' }}
319
- * apiUrl="https://api.elevasis.com"
320
- * notifications={myNotificationAdapter}
321
- * >
322
- * <Dashboard />
323
- * </ElevasisCoreProvider>
324
- * ```
325
- */
326
- declare function ElevasisCoreProvider({ auth, queryClient, apiUrl, onError, notifications, children }: ElevasisCoreProviderProps): react_jsx_runtime.JSX.Element;
327
-
328
- /**
329
- * Hook to access the ElevasisServiceProvider context.
330
- * Provides apiRequest, organizationId, and isReady.
331
- *
332
- * Throws if used outside of an ElevasisServiceProvider or ElevasisProvider (with apiUrl).
333
- */
334
- declare function useElevasisServices(): ElevasisServiceContextValue;
335
- /**
336
- * Standalone service provider for testing, embedding, or advanced consumers.
337
- *
338
- * Accepts apiRequest, organizationId, and isReady directly as props.
339
- * ElevasisProvider composes this internally when apiUrl is provided.
340
- *
341
- * @example Testing
342
- * ```tsx
343
- * <ElevasisServiceProvider apiRequest={mockApiRequest} organizationId="org-1" isReady={true}>
344
- * <ComponentUnderTest />
345
- * </ElevasisServiceProvider>
346
- * ```
347
- *
348
- * @example Embedding
349
- * ```tsx
350
- * <ElevasisServiceProvider apiRequest={myFetcher} organizationId={orgId} isReady={!!orgId}>
351
- * <CommandQueuePanel />
352
- * </ElevasisServiceProvider>
353
- * ```
354
- */
355
- declare function ElevasisServiceProvider({ apiRequest, organizationId, isReady, children }: ElevasisServiceProviderProps): react_jsx_runtime.JSX.Element;
356
-
357
- /**
358
- * Mantine-backed notification adapter.
359
- *
360
- * Wraps `@mantine/notifications` with the same defaults as `notify.tsx`
361
- * (`autoClose: 5000`, `position: 'top-right'`). The `apiError()` method
362
- * replicates `showApiErrorNotification` behavior including retryAfter-based
363
- * autoClose.
364
- *
365
- * Use this adapter in Command Center (Mantine-powered) consumers.
366
- * Template consumers should omit the NotificationProvider and rely on the
367
- * console fallback, or supply their own adapter.
368
- */
369
- declare const mantineNotificationAdapter: NotificationAdapter;
370
-
371
- export { ElevasisCoreProvider, ElevasisProvider, ElevasisServiceProvider, ElevasisUIProvider, NotificationProvider, mantineNotificationAdapter, useElevasisServices, useNotificationAdapter };
372
- export type { ApiKeyConfig, AuthConfig, AuthKitConfig, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisProviderProps, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisThemeConfig, ElevasisTokenOverrides, NotificationAdapter, PresetName, WithSchemes };
1
+ export { ElevasisCoreProvider } from './ElevasisCoreProvider';
2
+ export { ElevasisServiceProvider, useElevasisServices } from './ElevasisServiceContext';
3
+ export { NotificationProvider, useNotificationAdapter } from './NotificationContext';
4
+ export type { NotificationAdapter } from './NotificationContext';
5
+ export type { AuthConfig, AuthKitConfig, ApiKeyConfig, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisTokenOverrides, WithSchemes, ElevasisServiceContextValue, ElevasisServiceProviderProps } from './types';
6
+ export type { PresetName } from '../theme/presets';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACvF,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AACpF,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,YAAY,EACV,UAAU,EACV,aAAa,EACb,YAAY,EACZ,yBAAyB,EACzB,uBAAuB,EACvB,sBAAsB,EACtB,WAAW,EACX,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,SAAS,CAAA;AAChB,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA"}
@@ -1,12 +1,3 @@
1
- export { ElevasisProvider, ElevasisUIProvider, mantineNotificationAdapter } from '../chunk-TZPAA4RC.js';
2
- export { ElevasisCoreProvider } from '../chunk-72HOBFMP.js';
3
- import '../chunk-UMXDDEAG.js';
4
- import '../chunk-XLV6LYN2.js';
5
- export { NotificationProvider, useNotificationAdapter } from '../chunk-TIRMFDM4.js';
6
- import '../chunk-JVAZHVNV.js';
7
- import '../chunk-4VGWQ5AN.js';
8
- import '../chunk-NEK6JKPW.js';
9
- import '../chunk-L2CM2CUA.js';
10
- import '../chunk-DD3CCMCZ.js';
11
- export { ElevasisServiceProvider, useElevasisServices } from '../chunk-KA7LO7U5.js';
12
- import '../chunk-7PLEQFHO.js';
1
+ export { ElevasisCoreProvider } from './ElevasisCoreProvider';
2
+ export { ElevasisServiceProvider, useElevasisServices } from './ElevasisServiceContext';
3
+ export { NotificationProvider, useNotificationAdapter } from './NotificationContext';