@elevasis/ui 1.3.4 → 1.3.5

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 (213) hide show
  1. package/dist/api/index.js +1 -1
  2. package/dist/auth/index.d.ts +174 -14
  3. package/dist/{chunk-XLV6LYN2.js → chunk-LBPALY25.js} +0 -1
  4. package/dist/{chunk-LTQAAIGE.js → chunk-Y2I5JJ3N.js} +1 -1
  5. package/dist/hooks/index.d.ts +4401 -11
  6. package/dist/hooks/published.d.ts +5013 -19
  7. package/dist/index.d.ts +6316 -15
  8. package/dist/index.js +18 -97
  9. package/dist/initialization/index.d.ts +2222 -22
  10. package/dist/organization/index.d.ts +266 -21
  11. package/dist/profile/index.d.ts +2158 -14
  12. package/dist/provider/index.d.ts +266 -7
  13. package/dist/provider/index.js +12 -3
  14. package/dist/provider/published.d.ts +263 -9
  15. package/dist/provider/published.js +2 -2
  16. package/package.json +46 -5
  17. package/dist/auth/guards/AdminGuard.d.ts +0 -32
  18. package/dist/auth/guards/AdminGuard.d.ts.map +0 -1
  19. package/dist/auth/guards/ProtectedRoute.d.ts +0 -60
  20. package/dist/auth/guards/ProtectedRoute.d.ts.map +0 -1
  21. package/dist/auth/guards/__tests__/AdminGuard.test.d.ts +0 -12
  22. package/dist/auth/guards/__tests__/AdminGuard.test.d.ts.map +0 -1
  23. package/dist/auth/guards/__tests__/ProtectedRoute.test.d.ts +0 -14
  24. package/dist/auth/guards/__tests__/ProtectedRoute.test.d.ts.map +0 -1
  25. package/dist/auth/index.d.ts.map +0 -1
  26. package/dist/hooks/command-queue/index.d.ts +0 -7
  27. package/dist/hooks/command-queue/index.d.ts.map +0 -1
  28. package/dist/hooks/command-queue/useCommandQueue.d.ts +0 -33
  29. package/dist/hooks/command-queue/useCommandQueue.d.ts.map +0 -1
  30. package/dist/hooks/command-queue/useCommandQueueTotals.d.ts +0 -17
  31. package/dist/hooks/command-queue/useCommandQueueTotals.d.ts.map +0 -1
  32. package/dist/hooks/command-queue/useDeleteTask.d.ts +0 -5
  33. package/dist/hooks/command-queue/useDeleteTask.d.ts.map +0 -1
  34. package/dist/hooks/command-queue/usePatchTask.d.ts +0 -6
  35. package/dist/hooks/command-queue/usePatchTask.d.ts.map +0 -1
  36. package/dist/hooks/command-queue/useSubmitAction.d.ts +0 -29
  37. package/dist/hooks/command-queue/useSubmitAction.d.ts.map +0 -1
  38. package/dist/hooks/executions/index.d.ts +0 -16
  39. package/dist/hooks/executions/index.d.ts.map +0 -1
  40. package/dist/hooks/executions/useBulkDeleteExecutions.d.ts +0 -15
  41. package/dist/hooks/executions/useBulkDeleteExecutions.d.ts.map +0 -1
  42. package/dist/hooks/executions/useCancelExecution.d.ts +0 -20
  43. package/dist/hooks/executions/useCancelExecution.d.ts.map +0 -1
  44. package/dist/hooks/executions/useDeleteExecution.d.ts +0 -13
  45. package/dist/hooks/executions/useDeleteExecution.d.ts.map +0 -1
  46. package/dist/hooks/executions/useExecuteAsync.d.ts +0 -21
  47. package/dist/hooks/executions/useExecuteAsync.d.ts.map +0 -1
  48. package/dist/hooks/executions/useExecution.d.ts +0 -10
  49. package/dist/hooks/executions/useExecution.d.ts.map +0 -1
  50. package/dist/hooks/executions/useExecutions.d.ts +0 -16
  51. package/dist/hooks/executions/useExecutions.d.ts.map +0 -1
  52. package/dist/hooks/executions/useResourceDefinition.d.ts +0 -9
  53. package/dist/hooks/executions/useResourceDefinition.d.ts.map +0 -1
  54. package/dist/hooks/executions/useResources.d.ts +0 -15
  55. package/dist/hooks/executions/useResources.d.ts.map +0 -1
  56. package/dist/hooks/executions/useRetryExecution.d.ts +0 -16
  57. package/dist/hooks/executions/useRetryExecution.d.ts.map +0 -1
  58. package/dist/hooks/feature-access/createUseFeatureAccess.d.ts +0 -44
  59. package/dist/hooks/feature-access/createUseFeatureAccess.d.ts.map +0 -1
  60. package/dist/hooks/feature-access/index.d.ts +0 -2
  61. package/dist/hooks/feature-access/index.d.ts.map +0 -1
  62. package/dist/hooks/index.d.ts.map +0 -1
  63. package/dist/hooks/monitoring/index.d.ts +0 -9
  64. package/dist/hooks/monitoring/index.d.ts.map +0 -1
  65. package/dist/hooks/monitoring/useActivities.d.ts +0 -52
  66. package/dist/hooks/monitoring/useActivities.d.ts.map +0 -1
  67. package/dist/hooks/monitoring/useCostSummary.d.ts +0 -7
  68. package/dist/hooks/monitoring/useCostSummary.d.ts.map +0 -1
  69. package/dist/hooks/monitoring/useExecutionHealth.d.ts +0 -10
  70. package/dist/hooks/monitoring/useExecutionHealth.d.ts.map +0 -1
  71. package/dist/hooks/monitoring/useExecutionLogs.d.ts +0 -56
  72. package/dist/hooks/monitoring/useExecutionLogs.d.ts.map +0 -1
  73. package/dist/hooks/monitoring/useNotifications.d.ts +0 -11
  74. package/dist/hooks/monitoring/useNotifications.d.ts.map +0 -1
  75. package/dist/hooks/notifications/index.d.ts +0 -8
  76. package/dist/hooks/notifications/index.d.ts.map +0 -1
  77. package/dist/hooks/notifications/useMarkAllAsRead.d.ts +0 -2
  78. package/dist/hooks/notifications/useMarkAllAsRead.d.ts.map +0 -1
  79. package/dist/hooks/notifications/useMarkAsRead.d.ts +0 -2
  80. package/dist/hooks/notifications/useMarkAsRead.d.ts.map +0 -1
  81. package/dist/hooks/notifications/useNotificationCount.d.ts +0 -8
  82. package/dist/hooks/notifications/useNotificationCount.d.ts.map +0 -1
  83. package/dist/hooks/observability/index.d.ts +0 -19
  84. package/dist/hooks/observability/index.d.ts.map +0 -1
  85. package/dist/hooks/observability/useBusinessImpact.d.ts +0 -9
  86. package/dist/hooks/observability/useBusinessImpact.d.ts.map +0 -1
  87. package/dist/hooks/observability/useCostBreakdown.d.ts +0 -10
  88. package/dist/hooks/observability/useCostBreakdown.d.ts.map +0 -1
  89. package/dist/hooks/observability/useCostByModel.d.ts +0 -3
  90. package/dist/hooks/observability/useCostByModel.d.ts.map +0 -1
  91. package/dist/hooks/observability/useCostTrends.d.ts +0 -3
  92. package/dist/hooks/observability/useCostTrends.d.ts.map +0 -1
  93. package/dist/hooks/observability/useDashboardMetrics.d.ts +0 -3
  94. package/dist/hooks/observability/useDashboardMetrics.d.ts.map +0 -1
  95. package/dist/hooks/observability/useErrorAnalysis.d.ts +0 -7
  96. package/dist/hooks/observability/useErrorAnalysis.d.ts.map +0 -1
  97. package/dist/hooks/observability/useErrorDetails.d.ts +0 -20
  98. package/dist/hooks/observability/useErrorDetails.d.ts.map +0 -1
  99. package/dist/hooks/observability/useErrorDistribution.d.ts +0 -12
  100. package/dist/hooks/observability/useErrorDistribution.d.ts.map +0 -1
  101. package/dist/hooks/observability/useErrorTrends.d.ts +0 -12
  102. package/dist/hooks/observability/useErrorTrends.d.ts.map +0 -1
  103. package/dist/hooks/observability/useResolveError.d.ts +0 -17
  104. package/dist/hooks/observability/useResolveError.d.ts.map +0 -1
  105. package/dist/hooks/observability/useTopFailingResources.d.ts +0 -13
  106. package/dist/hooks/observability/useTopFailingResources.d.ts.map +0 -1
  107. package/dist/hooks/published.d.ts.map +0 -1
  108. package/dist/hooks/scheduling/index.d.ts +0 -5
  109. package/dist/hooks/scheduling/index.d.ts.map +0 -1
  110. package/dist/hooks/scheduling/useSchedules.d.ts +0 -185
  111. package/dist/hooks/scheduling/useSchedules.d.ts.map +0 -1
  112. package/dist/hooks/sessions/index.d.ts +0 -8
  113. package/dist/hooks/sessions/index.d.ts.map +0 -1
  114. package/dist/hooks/sessions/useSessionExecutions.d.ts +0 -13
  115. package/dist/hooks/sessions/useSessionExecutions.d.ts.map +0 -1
  116. package/dist/hooks/sessions/useSessionMessages.d.ts +0 -7
  117. package/dist/hooks/sessions/useSessionMessages.d.ts.map +0 -1
  118. package/dist/hooks/sessions/useSessions.d.ts +0 -26
  119. package/dist/hooks/sessions/useSessions.d.ts.map +0 -1
  120. package/dist/index.d.ts.map +0 -1
  121. package/dist/initialization/InitializationProvider.d.ts +0 -48
  122. package/dist/initialization/InitializationProvider.d.ts.map +0 -1
  123. package/dist/initialization/hooks/useAppInitialization.d.ts +0 -32
  124. package/dist/initialization/hooks/useAppInitialization.d.ts.map +0 -1
  125. package/dist/initialization/index.d.ts.map +0 -1
  126. package/dist/organization/context/OrganizationProvider.d.ts +0 -20
  127. package/dist/organization/context/OrganizationProvider.d.ts.map +0 -1
  128. package/dist/organization/hooks/useOrgInitialization.d.ts +0 -56
  129. package/dist/organization/hooks/useOrgInitialization.d.ts.map +0 -1
  130. package/dist/organization/index.d.ts.map +0 -1
  131. package/dist/profile/context/ProfileProvider.d.ts +0 -27
  132. package/dist/profile/context/ProfileProvider.d.ts.map +0 -1
  133. package/dist/profile/hooks/useUserProfile.d.ts +0 -31
  134. package/dist/profile/hooks/useUserProfile.d.ts.map +0 -1
  135. package/dist/profile/index.d.ts.map +0 -1
  136. package/dist/provider/CoreAuthKitInner.d.ts +0 -12
  137. package/dist/provider/CoreAuthKitInner.d.ts.map +0 -1
  138. package/dist/provider/ElevasisCoreProvider.d.ts +0 -39
  139. package/dist/provider/ElevasisCoreProvider.d.ts.map +0 -1
  140. package/dist/provider/ElevasisServiceContext.d.ts +0 -31
  141. package/dist/provider/ElevasisServiceContext.d.ts.map +0 -1
  142. package/dist/provider/__tests__/CoreAuthKitInner.test.d.ts +0 -2
  143. package/dist/provider/__tests__/CoreAuthKitInner.test.d.ts.map +0 -1
  144. package/dist/provider/__tests__/ElevasisCoreProvider.test.d.ts +0 -2
  145. package/dist/provider/__tests__/ElevasisCoreProvider.test.d.ts.map +0 -1
  146. package/dist/provider/index.d.ts.map +0 -1
  147. package/dist/provider/published.d.ts.map +0 -1
  148. package/dist/provider/types.d.ts +0 -143
  149. package/dist/provider/types.d.ts.map +0 -1
  150. package/dist/provider/types.js +0 -1
  151. package/dist/sdk-barrel.d.ts +0 -20
  152. package/dist/sdk-barrel.d.ts.map +0 -1
  153. package/dist/theme/cssVariables.d.ts +0 -12
  154. package/dist/theme/cssVariables.d.ts.map +0 -1
  155. package/dist/theme/cssVariables.js +0 -93
  156. package/dist/theme/index.d.ts +0 -4
  157. package/dist/theme/index.d.ts.map +0 -1
  158. package/dist/theme/index.js +0 -1
  159. package/dist/theme/presets/__tests__/getPreset.test.d.ts +0 -2
  160. package/dist/theme/presets/__tests__/getPreset.test.d.ts.map +0 -1
  161. package/dist/theme/presets/abyss.d.ts +0 -3
  162. package/dist/theme/presets/abyss.d.ts.map +0 -1
  163. package/dist/theme/presets/abyss.js +0 -54
  164. package/dist/theme/presets/aurora.d.ts +0 -8
  165. package/dist/theme/presets/aurora.d.ts.map +0 -1
  166. package/dist/theme/presets/aurora.js +0 -59
  167. package/dist/theme/presets/canopy.d.ts +0 -3
  168. package/dist/theme/presets/canopy.d.ts.map +0 -1
  169. package/dist/theme/presets/canopy.js +0 -58
  170. package/dist/theme/presets/cyber-flux.d.ts +0 -8
  171. package/dist/theme/presets/cyber-flux.d.ts.map +0 -1
  172. package/dist/theme/presets/cyber-flux.js +0 -66
  173. package/dist/theme/presets/cyber-strike.d.ts +0 -9
  174. package/dist/theme/presets/cyber-strike.d.ts.map +0 -1
  175. package/dist/theme/presets/cyber-strike.js +0 -62
  176. package/dist/theme/presets/cyber-void.d.ts +0 -8
  177. package/dist/theme/presets/cyber-void.d.ts.map +0 -1
  178. package/dist/theme/presets/cyber-void.js +0 -62
  179. package/dist/theme/presets/cyber-volt.d.ts +0 -8
  180. package/dist/theme/presets/cyber-volt.d.ts.map +0 -1
  181. package/dist/theme/presets/cyber-volt.js +0 -66
  182. package/dist/theme/presets/default.d.ts +0 -4
  183. package/dist/theme/presets/default.d.ts.map +0 -1
  184. package/dist/theme/presets/ember.d.ts +0 -8
  185. package/dist/theme/presets/ember.d.ts.map +0 -1
  186. package/dist/theme/presets/ember.js +0 -63
  187. package/dist/theme/presets/honey.d.ts +0 -3
  188. package/dist/theme/presets/honey.d.ts.map +0 -1
  189. package/dist/theme/presets/honey.js +0 -62
  190. package/dist/theme/presets/index.d.ts +0 -6
  191. package/dist/theme/presets/index.d.ts.map +0 -1
  192. package/dist/theme/presets/index.js +0 -39
  193. package/dist/theme/presets/midnight.d.ts +0 -8
  194. package/dist/theme/presets/midnight.d.ts.map +0 -1
  195. package/dist/theme/presets/midnight.js +0 -68
  196. package/dist/theme/presets/obsidian.d.ts +0 -3
  197. package/dist/theme/presets/obsidian.d.ts.map +0 -1
  198. package/dist/theme/presets/obsidian.js +0 -56
  199. package/dist/theme/presets/regal.d.ts +0 -8
  200. package/dist/theme/presets/regal.d.ts.map +0 -1
  201. package/dist/theme/presets/regal.js +0 -63
  202. package/dist/theme/presets/rose-gold.d.ts +0 -8
  203. package/dist/theme/presets/rose-gold.d.ts.map +0 -1
  204. package/dist/theme/presets/rose-gold.js +0 -63
  205. package/dist/theme/presets/slate.d.ts +0 -3
  206. package/dist/theme/presets/slate.d.ts.map +0 -1
  207. package/dist/theme/presets/slate.js +0 -56
  208. package/dist/theme/presets/tactical.d.ts +0 -8
  209. package/dist/theme/presets/tactical.d.ts.map +0 -1
  210. package/dist/theme/presets/tactical.js +0 -57
  211. package/dist/theme/presets/types.d.ts +0 -26
  212. package/dist/theme/presets/types.d.ts.map +0 -1
  213. package/dist/theme/presets/types.js +0 -1
@@ -1,48 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import type { AppInitializationState } from './hooks/useAppInitialization';
3
- declare const InitializationContext: import("react").Context<AppInitializationState | null>;
4
- /**
5
- * Consumes the nearest InitializationProvider.
6
- *
7
- * @throws {Error} If called outside of an InitializationProvider tree.
8
- */
9
- export declare function useInitialization(): AppInitializationState;
10
- /**
11
- * Aggregates auth, profile, and organization state into a single initialization context.
12
- *
13
- * Must be rendered inside:
14
- * - An AuthProvider (needs useAuthContext)
15
- * - A ProfileProvider (needs useProfile)
16
- * - An OrganizationProvider (needs useOrganization)
17
- *
18
- * Initialization Layers (Sequential):
19
- * 1. WorkOS Auth (useAuthContext)
20
- * 2. User Profile Sync (useProfile)
21
- * 3. Organization Context (useOrganization)
22
- *
23
- * @example
24
- * // Org-scoped pages with data queries (most common)
25
- * const { organizationReady } = useInitialization()
26
- * const { data, isLoading } = useResources()
27
- * if (!organizationReady || isLoading) return <SubshellLoader />
28
- *
29
- * @example
30
- * // Pages accessible without org (invitations, pending)
31
- * const { userReady, error } = useInitialization()
32
- * if (!userReady) return <SubshellLoader />
33
- * if (error?.layer === 'organization') {
34
- * return <PendingInvitationPage message={error.message} />
35
- * }
36
- *
37
- * @example
38
- * // Pages with error handling
39
- * const { organizationReady, error, retry } = useInitialization()
40
- * if (error?.layer === 'organization') return <NoOrgError error={error} />
41
- * if (error) return <ErrorCard error={error} onRetry={retry} />
42
- * if (!organizationReady) return <SubshellLoader />
43
- */
44
- export declare function InitializationProvider({ children }: {
45
- children: ReactNode;
46
- }): import("react").FunctionComponentElement<import("react").ProviderProps<AppInitializationState | null>>;
47
- export { InitializationContext };
48
- //# sourceMappingURL=InitializationProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InitializationProvider.d.ts","sourceRoot":"","sources":["../../src/initialization/InitializationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAItG,OAAO,KAAK,EAAE,sBAAsB,EAAuB,MAAM,8BAA8B,CAAA;AAE/F,QAAA,MAAM,qBAAqB,wDAAqD,CAAA;AAEhF;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,sBAAsB,CAS1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,0GA2E3E;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
@@ -1,32 +0,0 @@
1
- import type { SupabaseUserProfile } from '@repo/core';
2
- import type { UseOrgInitializationReturn } from '../../organization/hooks/useOrgInitialization';
3
- export interface InitializationError {
4
- layer: 'auth' | 'profile' | 'organization';
5
- message: string;
6
- originalError?: Error;
7
- }
8
- export interface AppInitializationState {
9
- userReady: boolean;
10
- organizationReady: boolean;
11
- allReady: boolean;
12
- isInitializing: boolean;
13
- error: InitializationError | null;
14
- retry: () => void;
15
- profile: SupabaseUserProfile | null;
16
- }
17
- /**
18
- * Factory function to create a useAppInitialization hook for your app.
19
- *
20
- * Usage in app:
21
- * ```typescript
22
- * import { createUseAppInitialization } from '@repo/ui/initialization'
23
- * import { useOrgInitialization } from './organization/hooks/useOrgInitialization'
24
- *
25
- * export const useAppInitialization = createUseAppInitialization(useOrgInitialization)
26
- * ```
27
- *
28
- * This pattern allows the shared package to provide the hook logic
29
- * while each app provides its own hook instances.
30
- */
31
- export declare function createUseAppInitialization(useOrgInitialization: () => UseOrgInitializationReturn): () => AppInitializationState;
32
- //# sourceMappingURL=useAppInitialization.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAppInitialization.d.ts","sourceRoot":"","sources":["../../../src/initialization/hooks/useAppInitialization.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAA;AAE/F,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,cAAc,CAAA;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,KAAK,CAAA;CACtB;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,OAAO,CAAA;IAClB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,QAAQ,EAAE,OAAO,CAAA;IACjB,cAAc,EAAE,OAAO,CAAA;IACvB,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAAA;IACjC,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAA;CACpC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CACxC,oBAAoB,EAAE,MAAM,0BAA0B,GACrD,MAAM,sBAAsB,CAiG9B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/initialization/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAE3G;;;;;GAKG;AACH,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA;AACzE,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA"}
@@ -1,20 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import { type OrganizationContextValue } from './OrganizationContext';
3
- /**
4
- * Provides organization state to its subtree via React Context.
5
- *
6
- * Must be rendered inside:
7
- * - ElevasisServiceProvider (needs apiRequest)
8
- * - ProfileProvider (needs useProfile for last_visited_org preference)
9
- * - A TanStack QueryClientProvider (needs useQueryClient for cache invalidation)
10
- *
11
- * Behaviors:
12
- * - Fetches all memberships for the authenticated user via GET /memberships/my-memberships
13
- * - Selects the active org by priority: saved preference > WorkOS org ID > first membership
14
- * - Persists org switches to PATCH /users/me { last_visited_org }
15
- * - Clears all state when the user signs out (user becomes null)
16
- */
17
- export declare function OrganizationProvider({ children }: {
18
- children: ReactNode;
19
- }): import("react").FunctionComponentElement<import("react").ProviderProps<OrganizationContextValue | null>>;
20
- //# sourceMappingURL=OrganizationProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrganizationProvider.d.ts","sourceRoot":"","sources":["../../../src/organization/context/OrganizationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAM/F,OAAO,EAAuB,KAAK,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAE1F;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,4GAuNzE"}
@@ -1,56 +0,0 @@
1
- import type { MembershipWithDetails } from '@repo/core';
2
- /**
3
- * Type for the useOrganizations hook return value
4
- */
5
- export interface UseOrganizationsReturn {
6
- currentWorkOSOrganizationId: string | null;
7
- currentMembership: MembershipWithDetails | null;
8
- setCurrentWorkOSOrganizationId: (id: string | null) => void;
9
- setCurrentMembership: (membership: MembershipWithDetails | null) => void;
10
- setOrganizationsInitializing: (initializing: boolean) => void;
11
- setOrganizationsLoading: (loading: boolean) => void;
12
- setOrganizationsError: (error: string | null) => void;
13
- organizations: {
14
- isInitializing: boolean;
15
- isOrgRefreshing: boolean;
16
- error: string | null;
17
- };
18
- }
19
- /**
20
- * Type for the useApiClient hook return value
21
- */
22
- export interface UseApiClientReturn {
23
- apiRequest: <T = unknown>(path: string, options?: RequestInit) => Promise<T>;
24
- }
25
- /**
26
- * Return type for useOrgInitialization hook
27
- */
28
- export interface UseOrgInitializationReturn {
29
- memberships: MembershipWithDetails[];
30
- isInitializing: boolean;
31
- isLoading: boolean;
32
- isInitialized: boolean;
33
- error: string | null;
34
- currentOrganization: MembershipWithDetails['organization'] | null;
35
- retry: () => Promise<void>;
36
- }
37
- /**
38
- * Factory function to create a useOrgInitialization hook for your app.
39
- *
40
- * Usage in app:
41
- * ```typescript
42
- * import { createUseOrgInitialization } from '@repo/ui/organization'
43
- * import { useOrganizations } from './hooks/useOrganizations'
44
- * import { useApiClient } from './api/hooks/useApiClient'
45
- *
46
- * export const useOrgInitialization = createUseOrgInitialization(
47
- * useOrganizations,
48
- * useApiClient
49
- * )
50
- * ```
51
- *
52
- * This pattern allows the shared package to provide the hook logic
53
- * while each app provides its own hook instances.
54
- */
55
- export declare function createUseOrgInitialization(useOrganizations: () => UseOrganizationsReturn, useApiClient: () => UseApiClientReturn): () => UseOrgInitializationReturn;
56
- //# sourceMappingURL=useOrgInitialization.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useOrgInitialization.d.ts","sourceRoot":"","sources":["../../../src/organization/hooks/useOrgInitialization.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAEvD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1C,iBAAiB,EAAE,qBAAqB,GAAG,IAAI,CAAA;IAC/C,8BAA8B,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC3D,oBAAoB,EAAE,CAAC,UAAU,EAAE,qBAAqB,GAAG,IAAI,KAAK,IAAI,CAAA;IACxE,4BAA4B,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAA;IAC7D,uBAAuB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IACnD,qBAAqB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACrD,aAAa,EAAE;QACb,cAAc,EAAE,OAAO,CAAA;QACvB,eAAe,EAAE,OAAO,CAAA;QACxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KACrB,CAAA;CACF;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,CAAA;CAC7E;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,qBAAqB,EAAE,CAAA;IACpC,cAAc,EAAE,OAAO,CAAA;IACvB,SAAS,EAAE,OAAO,CAAA;IAClB,aAAa,EAAE,OAAO,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,mBAAmB,EAAE,qBAAqB,CAAC,cAAc,CAAC,GAAG,IAAI,CAAA;IACjE,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,0BAA0B,CACxC,gBAAgB,EAAE,MAAM,sBAAsB,EAC9C,YAAY,EAAE,MAAM,kBAAkB,GACrC,MAAM,0BAA0B,CA6NlC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/organization/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAA;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,YAAY,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAG7E,cAAc,eAAe,CAAA;AAC7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAGrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA;AACzE,YAAY,EACV,sBAAsB,EACtB,kBAAkB,EAClB,0BAA0B,EAC3B,MAAM,8BAA8B,CAAA"}
@@ -1,27 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import type { SupabaseUserProfile } from '@repo/core';
3
- export interface ProfileContextValue {
4
- profile: SupabaseUserProfile | null;
5
- loading: boolean;
6
- error: Error | null;
7
- refetch: () => Promise<void>;
8
- }
9
- /**
10
- * Consumes the nearest ProfileProvider.
11
- *
12
- * @throws {Error} If called outside of a ProfileProvider tree.
13
- */
14
- export declare function useProfile(): ProfileContextValue;
15
- /**
16
- * Provides shared profile state to its subtree via React Context.
17
- *
18
- * Wraps useUserProfile so that all consumers share one profile fetch
19
- * instead of each triggering an independent sync call.
20
- *
21
- * Must be rendered inside the auth and service provider layers so that
22
- * the underlying hook can access useAuthContext and useElevasisServices.
23
- */
24
- export declare function ProfileProvider({ children }: {
25
- children: ReactNode;
26
- }): import("react").FunctionComponentElement<import("react").ProviderProps<ProfileContextValue | null>>;
27
- //# sourceMappingURL=ProfileProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProfileProvider.d.ts","sourceRoot":"","sources":["../../../src/profile/context/ProfileProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAiB,MAAM,OAAO,CAAA;AAEhF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAErD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAA;IACnC,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IACnB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC7B;AAID;;;;GAIG;AACH,wBAAgB,UAAU,IAAI,mBAAmB,CAShD;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,uGAGpE"}
@@ -1,31 +0,0 @@
1
- import type { SupabaseUserProfile } from '@repo/core';
2
- interface UseUserProfileOptions {
3
- /**
4
- * Optional error handler for profile sync failures
5
- * If not provided, errors are logged to console
6
- */
7
- onError?: (context: {
8
- phase: 'profile-sync';
9
- userId?: string;
10
- }, error: Error) => void;
11
- }
12
- export interface UseUserProfileReturn {
13
- profile: SupabaseUserProfile | null;
14
- loading: boolean;
15
- error: Error | null;
16
- refetch: () => Promise<void>;
17
- }
18
- /**
19
- * Hook for managing user profile data with automatic WorkOS -> Supabase sync
20
- *
21
- * This hook:
22
- * 1. Automatically syncs WorkOS user data to Supabase on authentication
23
- * 2. Provides access to the user's Supabase profile data
24
- * 3. Handles loading states and errors
25
- * 4. Includes a refetch function for manual updates
26
- *
27
- * @param options - Optional configuration including error handler
28
- */
29
- export declare const useUserProfile: (options?: UseUserProfileOptions) => UseUserProfileReturn;
30
- export {};
31
- //# sourceMappingURL=useUserProfile.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useUserProfile.d.ts","sourceRoot":"","sources":["../../../src/profile/hooks/useUserProfile.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAErD,UAAU,qBAAqB;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,cAAc,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CACtF;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAA;IACnC,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IACnB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC7B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU,qBAAqB,KAAG,oBAyEhE,CAAA"}
@@ -1 +0,0 @@
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"}
@@ -1,12 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,39 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,31 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=CoreAuthKitInner.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CoreAuthKitInner.test.d.ts","sourceRoot":"","sources":["../../../src/provider/__tests__/CoreAuthKitInner.test.tsx"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ElevasisCoreProvider.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ElevasisCoreProvider.test.d.ts","sourceRoot":"","sources":["../../../src/provider/__tests__/ElevasisCoreProvider.test.tsx"],"names":[],"mappings":""}
@@ -1 +0,0 @@
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 +0,0 @@
1
- {"version":3,"file":"published.d.ts","sourceRoot":"","sources":["../../src/provider/published.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,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"}
@@ -1,143 +0,0 @@
1
- import type { PresetName } from '../theme/presets';
2
- import type { QueryClient } from '@tanstack/react-query';
3
- import type { ReactNode } from 'react';
4
- import type { ApiErrorDetails } from '../api/types';
5
- import type { NotificationAdapter } from './NotificationContext';
6
- /** Flat + per-scheme override pattern. Flat values apply to both; `light`/`dark` win over flat. */
7
- export type WithSchemes<T> = T & {
8
- light?: T;
9
- dark?: T;
10
- };
11
- /**
12
- * Theme token overrides. Each key maps 1:1 to a CSS variable.
13
- * All optional — defaults come from Elevasis design system.
14
- */
15
- export interface ElevasisTokenOverrides {
16
- primary?: string;
17
- /** Text color that contrasts with `primary`. Defaults to '#fff'. */
18
- primaryContrast?: string;
19
- background?: string;
20
- surface?: string;
21
- surfaceHover?: string;
22
- text?: string;
23
- textDimmed?: string;
24
- textSubtle?: string;
25
- border?: string;
26
- error?: string;
27
- warning?: string;
28
- success?: string;
29
- glassBackground?: string;
30
- glassBlur?: string;
31
- shadow?: string;
32
- cardShadow?: string;
33
- durationFast?: string;
34
- durationNormal?: string;
35
- easing?: string;
36
- }
37
- /**
38
- * Core theme config — Mantine-free.
39
- * Used by ElevasisCoreProvider and as the base for ElevasisThemeConfig.
40
- */
41
- export interface ElevasisCoreThemeConfig {
42
- /** Color scheme: 'light', 'dark', or 'auto'. Defaults to 'dark'. */
43
- colorScheme?: 'light' | 'dark' | 'auto';
44
- /** Named preset — bundles light/dark token defaults. Defaults to 'default'. */
45
- preset?: PresetName;
46
- /**
47
- * Semantic token overrides fed into CSS variables.
48
- * Flat values apply to both schemes. `light`/`dark` nested values win over flat.
49
- */
50
- tokens?: WithSchemes<ElevasisTokenOverrides>;
51
- }
52
- /**
53
- * Auth configuration union.
54
- * 'authkit' (WorkOS AuthKit) is the supported mode.
55
- * 'apiKey' is defined for forward type compatibility but will throw at runtime.
56
- */
57
- export type AuthConfig = AuthKitConfig | ApiKeyConfig;
58
- export interface AuthKitConfig {
59
- mode: 'authkit';
60
- clientId: string;
61
- /** AuthKit API hostname. Defaults to 'api.workos.com'. */
62
- apiHostname?: string;
63
- /** Redirect URI after auth. */
64
- redirectUri?: string;
65
- /** Keep refresh tokens in localStorage. Defaults to false. */
66
- devMode?: boolean;
67
- }
68
- /** Deferred -- will throw at runtime. */
69
- export interface ApiKeyConfig {
70
- mode: 'apiKey';
71
- key: string;
72
- }
73
- export interface ElevasisCoreProviderProps {
74
- /** Auth configuration. Supports 'authkit' mode. */
75
- auth: AuthConfig;
76
- /**
77
- * Elevasis core theme configuration (Mantine-free).
78
- * Set `colorScheme` ('light', 'dark', 'auto') and override `tokens` (design tokens).
79
- * Defaults: colorScheme='dark', Elevasis design system tokens.
80
- */
81
- theme?: ElevasisCoreThemeConfig;
82
- /**
83
- * @deprecated Organization ID is now resolved automatically via OrganizationProvider.
84
- * This prop is accepted for backwards compatibility during migration but is no longer
85
- * used when the full provider stack is active (apiUrl provided).
86
- */
87
- organizationId?: string | null;
88
- /** Custom QueryClient. If omitted, a default is created internally. */
89
- queryClient?: QueryClient;
90
- /**
91
- * API base URL (e.g., 'https://api.elevasis.com' or 'http://localhost:5170').
92
- * When provided, ElevasisCoreProvider composes the full provider stack:
93
- * ApiClientProvider + ElevasisServiceProvider + ProfileProvider +
94
- * OrganizationProvider + NotificationProvider + InitializationProvider.
95
- * When omitted, no service context is provided (theme-only mode).
96
- */
97
- apiUrl?: string;
98
- /**
99
- * Error callback for API responses with status >= 500.
100
- * Only used when apiUrl is provided.
101
- */
102
- onError?: (endpoint: string, error: Error, details?: ApiErrorDetails) => void;
103
- /**
104
- * @deprecated Organization readiness is now managed internally by OrganizationProvider.
105
- * Accepted for backwards compatibility but ignored when apiUrl is provided.
106
- */
107
- isOrganizationReady?: boolean;
108
- /**
109
- * Notification adapter for displaying success/error/info messages.
110
- * When provided, wraps the subtree in a NotificationProvider with this adapter.
111
- * When omitted, the console fallback adapter is used automatically.
112
- *
113
- * ElevasisUIProvider (Mantine variant) passes mantineNotificationAdapter here automatically.
114
- * Headless/SDK consumers can pass a custom adapter or omit for console output.
115
- */
116
- notifications?: NotificationAdapter;
117
- /**
118
- * Whether to inject CSS variables, `data-elevasis-scheme` attribute, and font links.
119
- * Set to `false` when the consumer has its own complete design system and only
120
- * needs auth + API from this provider. Defaults to `true`.
121
- */
122
- injectStyles?: boolean;
123
- children: ReactNode;
124
- }
125
- /**
126
- * Service context value exposed by ElevasisServiceProvider.
127
- * Provides a ready-to-use apiRequest function and organization state.
128
- *
129
- * For standalone usage (testing, embedding), use ElevasisServiceProvider directly.
130
- * For standard SDK usage, ElevasisProvider composes this automatically when apiUrl is provided.
131
- */
132
- export interface ElevasisServiceContextValue {
133
- apiRequest: <T>(endpoint: string, options?: RequestInit) => Promise<T>;
134
- organizationId: string | null;
135
- isReady: boolean;
136
- }
137
- export interface ElevasisServiceProviderProps {
138
- apiRequest: <T>(endpoint: string, options?: RequestInit) => Promise<T>;
139
- organizationId: string | null;
140
- isReady: boolean;
141
- children: ReactNode;
142
- }
143
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/provider/types.ts"],"names":[],"mappings":"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"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,20 +0,0 @@
1
- /**
2
- * SDK-safe root barrel.
3
- *
4
- * Used by tsup/rollup for the published @elevasis/sdk-ui root entry.
5
- * Excludes CC-only re-exports (supabase, CC-only components).
6
- * The full barrel (./index.ts) is used by monorepo consumers.
7
- */
8
- export * from './theme';
9
- export * from './execution';
10
- export * from './utils';
11
- export * from './graph';
12
- export * from './router';
13
- export * from './provider';
14
- export * from './hooks';
15
- export * from './auth';
16
- export * from './profile';
17
- export * from './organization';
18
- export * from './api';
19
- export * from './initialization';
20
- //# sourceMappingURL=sdk-barrel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sdk-barrel.d.ts","sourceRoot":"","sources":["../src/sdk-barrel.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AAGvB,cAAc,SAAS,CAAA;AAGvB,cAAc,UAAU,CAAA;AAGxB,cAAc,YAAY,CAAA;AAG1B,cAAc,SAAS,CAAA;AAGvB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,OAAO,CAAA;AACrB,cAAc,kBAAkB,CAAA"}
@@ -1,12 +0,0 @@
1
- import type { CSSVariablesResolver } from '@mantine/core';
2
- import type { ElevasisTokenOverrides, ElevasisCoreThemeConfig } from '../provider/types';
3
- import type { PresetName } from './presets';
4
- /** Token key → CSS variable name. Single source of truth for the mapping. */
5
- export declare const TOKEN_VAR_MAP: Record<keyof ElevasisTokenOverrides, string>;
6
- /**
7
- * Creates a CSS variables resolver from theme config.
8
- *
9
- * Merge order per scheme: PRESET_DEFAULTS → flat overrides → scheme-specific overrides
10
- */
11
- export declare function createCssVariablesResolver(tokens?: ElevasisCoreThemeConfig['tokens'], preset?: PresetName): CSSVariablesResolver;
12
- //# sourceMappingURL=cssVariables.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cssVariables.d.ts","sourceRoot":"","sources":["../../src/theme/cssVariables.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAExF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,6EAA6E;AAC7E,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,sBAAsB,EAAE,MAAM,CAoBtE,CAAA;AAiDD;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,CAAC,EAAE,uBAAuB,CAAC,QAAQ,CAAC,EAC1C,MAAM,CAAC,EAAE,UAAU,GAClB,oBAAoB,CAoBtB"}