@jmruthers/pace-core 0.5.86 → 0.5.88

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 (248) hide show
  1. package/dist/{AuthService-Df3IozMG.d.ts → AuthService-DcTI5Ov4.d.ts} +9 -0
  2. package/dist/{DataTable-DKGTBLWT.js → DataTable-PWBMKMOG.js} +8 -8
  3. package/dist/{PublicLoadingSpinner-CnUaz0vG.d.ts → PublicLoadingSpinner-BQXD1fbO.d.ts} +161 -131
  4. package/dist/{UnifiedAuthProvider-K2IZAY5F.js → UnifiedAuthProvider-5D3HEQND.js} +4 -4
  5. package/dist/{UnifiedAuthProvider-B391Aqum.d.ts → UnifiedAuthProvider-BVKmQd9u.d.ts} +4 -0
  6. package/dist/auth-DReDSLq9.d.ts +16 -0
  7. package/dist/{chunk-CBSD3BZ3.js → chunk-3RZBKQ5Y.js} +2 -6
  8. package/dist/{chunk-CBSD3BZ3.js.map → chunk-3RZBKQ5Y.js.map} +1 -1
  9. package/dist/{chunk-NTW3KGS4.js → chunk-6UHXQH7P.js} +5 -5
  10. package/dist/{chunk-YVUZWLQG.js → chunk-AQGF5OG7.js} +3 -3
  11. package/dist/{chunk-CVMVPYAL.js → chunk-BDZUMRBD.js} +3 -5
  12. package/dist/chunk-BDZUMRBD.js.map +1 -0
  13. package/dist/{chunk-QCCJ3P4W.js → chunk-BNXBJOGL.js} +5 -5
  14. package/dist/{chunk-IBMPGOCN.js → chunk-CJIZS3UE.js} +1430 -783
  15. package/dist/chunk-CJIZS3UE.js.map +1 -0
  16. package/dist/{chunk-S3JKDMD5.js → chunk-CXKMRKRF.js} +4 -4
  17. package/dist/{chunk-5BN3YGNK.js → chunk-DP5X5ORK.js} +217 -27
  18. package/dist/chunk-DP5X5ORK.js.map +1 -0
  19. package/dist/{chunk-KUYWZVR2.js → chunk-H3P2RGKZ.js} +353 -9
  20. package/dist/chunk-H3P2RGKZ.js.map +1 -0
  21. package/dist/{chunk-RIXPZJUB.js → chunk-KTPG5VCH.js} +2 -2
  22. package/dist/{chunk-YCKPEMJA.js → chunk-QPCAGLUS.js} +2 -3
  23. package/dist/chunk-QPCAGLUS.js.map +1 -0
  24. package/dist/{chunk-WUXCWRL6.js → chunk-XJ2HZOBU.js} +6 -1
  25. package/dist/chunk-XJ2HZOBU.js.map +1 -0
  26. package/dist/{chunk-V5SWX6KL.js → chunk-XXVM53P4.js} +4 -4
  27. package/dist/{chunk-I2VVV5PQ.js → chunk-YY4YYM3E.js} +2 -2
  28. package/dist/components.d.ts +6 -55
  29. package/dist/components.js +25 -206
  30. package/dist/components.js.map +1 -1
  31. package/dist/{file-reference-9xUOnwyt.d.ts → file-reference-C9isKNPn.d.ts} +67 -2
  32. package/dist/hooks.js +10 -9
  33. package/dist/hooks.js.map +1 -1
  34. package/dist/index.d.ts +152 -26
  35. package/dist/index.js +65 -195
  36. package/dist/index.js.map +1 -1
  37. package/dist/providers.d.ts +5 -3
  38. package/dist/providers.js +3 -3
  39. package/dist/rbac/index.js +8 -8
  40. package/dist/types.d.ts +2 -1
  41. package/dist/types.js +3 -3
  42. package/dist/utils.js +2 -2
  43. package/docs/DOCUMENTATION_AUDIT.md +6 -6
  44. package/docs/DOCUMENTATION_STANDARD.md +137 -0
  45. package/docs/README.md +1 -1
  46. package/docs/api/classes/ColumnFactory.md +1 -1
  47. package/docs/api/classes/ErrorBoundary.md +1 -1
  48. package/docs/api/classes/InvalidScopeError.md +1 -1
  49. package/docs/api/classes/MissingUserContextError.md +1 -1
  50. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  51. package/docs/api/classes/PermissionDeniedError.md +1 -1
  52. package/docs/api/classes/PublicErrorBoundary.md +1 -1
  53. package/docs/api/classes/RBACAuditManager.md +1 -1
  54. package/docs/api/classes/RBACCache.md +1 -1
  55. package/docs/api/classes/RBACEngine.md +1 -1
  56. package/docs/api/classes/RBACError.md +1 -1
  57. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  58. package/docs/api/classes/SecureSupabaseClient.md +1 -1
  59. package/docs/api/classes/StorageUtils.md +83 -40
  60. package/docs/api/enums/FileCategory.md +56 -1
  61. package/docs/api/interfaces/AggregateConfig.md +1 -1
  62. package/docs/api/interfaces/ButtonProps.md +1 -1
  63. package/docs/api/interfaces/CardProps.md +1 -1
  64. package/docs/api/interfaces/ColorPalette.md +1 -1
  65. package/docs/api/interfaces/ColorShade.md +1 -1
  66. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  67. package/docs/api/interfaces/DataRecord.md +1 -1
  68. package/docs/api/interfaces/DataTableAction.md +1 -1
  69. package/docs/api/interfaces/DataTableColumn.md +1 -1
  70. package/docs/api/interfaces/DataTableProps.md +1 -1
  71. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  72. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  73. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  74. package/docs/api/interfaces/EventLogoProps.md +11 -11
  75. package/docs/api/interfaces/FileDisplayProps.md +10 -10
  76. package/docs/api/interfaces/FileMetadata.md +1 -1
  77. package/docs/api/interfaces/FileReference.md +1 -1
  78. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  79. package/docs/api/interfaces/FileUploadOptions.md +8 -8
  80. package/docs/api/interfaces/FileUploadProps.md +137 -42
  81. package/docs/api/interfaces/FooterProps.md +1 -1
  82. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  83. package/docs/api/interfaces/InputProps.md +1 -1
  84. package/docs/api/interfaces/LabelProps.md +1 -1
  85. package/docs/api/interfaces/LoginFormProps.md +1 -1
  86. package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
  87. package/docs/api/interfaces/NavigationContextType.md +1 -1
  88. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  89. package/docs/api/interfaces/NavigationItem.md +1 -1
  90. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  91. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  92. package/docs/api/interfaces/Organisation.md +1 -1
  93. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  94. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  95. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  96. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  97. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  98. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  99. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  100. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  101. package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
  102. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  103. package/docs/api/interfaces/PaletteData.md +1 -1
  104. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  105. package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
  106. package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
  107. package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
  108. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  109. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  110. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  111. package/docs/api/interfaces/RBACConfig.md +1 -1
  112. package/docs/api/interfaces/RBACLogger.md +1 -1
  113. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  114. package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
  115. package/docs/api/interfaces/RouteAccessRecord.md +1 -1
  116. package/docs/api/interfaces/RouteConfig.md +1 -1
  117. package/docs/api/interfaces/SecureDataContextType.md +1 -1
  118. package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
  119. package/docs/api/interfaces/StorageConfig.md +1 -1
  120. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  121. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  122. package/docs/api/interfaces/StorageListOptions.md +1 -1
  123. package/docs/api/interfaces/StorageListResult.md +1 -1
  124. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  125. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  126. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  127. package/docs/api/interfaces/StyleImport.md +1 -1
  128. package/docs/api/interfaces/SwitchProps.md +1 -1
  129. package/docs/api/interfaces/ToastActionElement.md +1 -1
  130. package/docs/api/interfaces/ToastProps.md +1 -1
  131. package/docs/api/interfaces/UnifiedAuthContextType.md +83 -50
  132. package/docs/api/interfaces/UnifiedAuthProviderProps.md +13 -13
  133. package/docs/api/interfaces/UseEventLogoOptions.md +74 -0
  134. package/docs/api/interfaces/UseEventLogoReturn.md +81 -0
  135. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  136. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  137. package/docs/api/interfaces/UsePublicEventLogoOptions.md +6 -6
  138. package/docs/api/interfaces/UsePublicEventLogoReturn.md +6 -6
  139. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  140. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  141. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  142. package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
  143. package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
  144. package/docs/api/interfaces/UserEventAccess.md +11 -11
  145. package/docs/api/interfaces/UserMenuProps.md +1 -1
  146. package/docs/api/interfaces/UserProfile.md +1 -1
  147. package/docs/api/modules.md +292 -97
  148. package/docs/api-reference/components.md +1 -18
  149. package/docs/api-reference/hooks.md +1 -4
  150. package/docs/best-practices/testing.md +2 -0
  151. package/docs/documentation-index.md +1 -1
  152. package/docs/getting-started/faq.md +1 -1
  153. package/docs/implementation-guides/file-reference-system.md +592 -58
  154. package/docs/implementation-guides/file-upload-storage.md +137 -73
  155. package/docs/rbac/super-admin-guide.md +18 -70
  156. package/docs/testing/README.md +2 -0
  157. package/package.json +1 -1
  158. package/src/__tests__/TEST_STANDARD.md +674 -0
  159. package/src/__tests__/helpers/test-utils.tsx +3 -2
  160. package/src/components/DataTable/__tests__/{DataTable.comprehensive.test.tsx.skip → DataTable.comprehensive.test.tsx} +17 -18
  161. package/src/components/DataTable/__tests__/{DataTable.test.tsx.skip → DataTable.test.tsx} +14 -22
  162. package/src/components/DataTable/__tests__/{ssr.strict-mode.test.tsx.skip → ssr.strict-mode.test.tsx} +42 -47
  163. package/src/components/DataTable/components/__tests__/COVERAGE_NOTE.md +1 -1
  164. package/src/components/DataTable/examples/__tests__/PerformanceExample.test.tsx +13 -4
  165. package/src/components/DataTable/utils/__tests__/COVERAGE_NOTE.md +1 -1
  166. package/src/components/DataTable/utils/__tests__/performanceUtils.test.ts +10 -6
  167. package/src/components/DataTable/utils/performanceUtils.ts +12 -3
  168. package/src/components/FileDisplay/FileDisplay.test.tsx +257 -0
  169. package/src/components/{FileDisplay.tsx → FileDisplay/FileDisplay.tsx} +111 -10
  170. package/src/components/FileDisplay/index.tsx +4 -0
  171. package/src/components/FileUpload/FileUpload.test.tsx +171 -621
  172. package/src/components/FileUpload/FileUpload.tsx +512 -168
  173. package/src/components/FileUpload/index.tsx +4 -0
  174. package/src/components/Progress/Progress.test.tsx +38 -0
  175. package/src/components/PublicLayout/EventLogo.tsx +220 -39
  176. package/src/components/PublicLayout/PublicPageProvider.tsx +1 -1
  177. package/src/components/Select/Select.test.tsx +1 -1
  178. package/src/components/SessionRestorationLoader.tsx +48 -0
  179. package/src/components/Toast/Toast.tsx +13 -8
  180. package/src/components/index.ts +16 -16
  181. package/src/hooks/__tests__/ServiceHooks.test.tsx +615 -0
  182. package/src/hooks/public/usePublicEventLogo.ts +17 -7
  183. package/src/hooks/useDataTablePerformance.ts +4 -0
  184. package/src/hooks/useEventLogo.ts +316 -0
  185. package/src/hooks/useEvents.ts +0 -5
  186. package/src/hooks/useFileReference.test.ts +659 -0
  187. package/src/hooks/useFileReference.ts +207 -3
  188. package/src/hooks/useSessionRestoration.ts +64 -0
  189. package/src/index.ts +17 -5
  190. package/src/providers/{UnifiedAuthProvider.test.simple.tsx → UnifiedAuthProvider.smoke.test.tsx} +81 -60
  191. package/src/providers/services/AuthServiceProvider.tsx +27 -3
  192. package/src/providers/services/UnifiedAuthProvider.tsx +34 -5
  193. package/src/rbac/{engine.test.simple.ts → RBACEngine.smoke.test.ts} +17 -12
  194. package/src/services/AuthService.ts +142 -20
  195. package/src/services/EventService.ts +0 -4
  196. package/src/types/auth.ts +15 -0
  197. package/src/types/file-reference.ts +73 -1
  198. package/src/types/index.ts +1 -0
  199. package/src/utils/__tests__/organisationContext.unit.test.ts +2 -4
  200. package/src/utils/appNameResolver.simple.test.ts +99 -29
  201. package/src/utils/file-reference.test.ts +535 -0
  202. package/src/utils/file-reference.ts +200 -30
  203. package/src/utils/organisationContext.test.ts +5 -19
  204. package/src/utils/organisationContext.ts +3 -5
  205. package/src/utils/storage/README.md +269 -262
  206. package/src/utils/storage/config.ts +9 -0
  207. package/src/utils/storage/helpers.test.ts +631 -0
  208. package/src/utils/storage/helpers.ts +112 -14
  209. package/src/utils/storage/index.ts +3 -0
  210. package/src/validation/__tests__/sanitization.unit.test.ts +1 -1
  211. package/src/validation/__tests__/schemaUtils.unit.test.ts +1 -1
  212. package/src/validation/__tests__/user.unit.test.ts +1 -1
  213. package/dist/chunk-5BN3YGNK.js.map +0 -1
  214. package/dist/chunk-CVMVPYAL.js.map +0 -1
  215. package/dist/chunk-IBMPGOCN.js.map +0 -1
  216. package/dist/chunk-KUYWZVR2.js.map +0 -1
  217. package/dist/chunk-WUXCWRL6.js.map +0 -1
  218. package/dist/chunk-YCKPEMJA.js.map +0 -1
  219. package/docs/CONTENT_AUDIT_REPORT.md +0 -253
  220. package/docs/STYLE_GUIDE.md +0 -37
  221. package/examples/RBAC/__tests__/PermissionExample.test.tsx +0 -150
  222. package/examples/public-pages/__tests__/PublicPageUsageExample.test.tsx +0 -159
  223. package/src/__tests__/TEST_GUIDE_CURSOR.md +0 -1605
  224. package/src/__tests__/TEST_GUIDE_HUMAN.md +0 -103
  225. package/src/components/FileUpload/FileUpload.example.tsx +0 -218
  226. package/src/components/FileUpload/index.ts +0 -6
  227. package/src/components/FileUpload.tsx +0 -176
  228. package/src/components/Progress/index.ts +0 -3
  229. package/src/components/PublicLayout/__tests__/EventLogo.test.tsx +0 -666
  230. package/src/components/SuperAdminGuard.tsx +0 -116
  231. package/src/components/__tests__/FileDisplay.test.tsx +0 -575
  232. package/src/components/__tests__/FileUpload.test.tsx +0 -446
  233. package/src/components/__tests__/SuperAdminGuard.test.tsx +0 -627
  234. package/src/components/examples/PermissionExample.tsx +0 -173
  235. package/src/hooks/__tests__/usePublicEvent.unit.test.ts +0 -583
  236. package/src/hooks/__tests__/usePublicEventLogo.unit.test.ts +0 -640
  237. package/src/types/__tests__/file-reference.test.ts +0 -447
  238. package/src/utils/__tests__/file-reference.test.ts +0 -383
  239. /package/dist/{DataTable-DKGTBLWT.js.map → DataTable-PWBMKMOG.js.map} +0 -0
  240. /package/dist/{UnifiedAuthProvider-K2IZAY5F.js.map → UnifiedAuthProvider-5D3HEQND.js.map} +0 -0
  241. /package/dist/{chunk-NTW3KGS4.js.map → chunk-6UHXQH7P.js.map} +0 -0
  242. /package/dist/{chunk-YVUZWLQG.js.map → chunk-AQGF5OG7.js.map} +0 -0
  243. /package/dist/{chunk-QCCJ3P4W.js.map → chunk-BNXBJOGL.js.map} +0 -0
  244. /package/dist/{chunk-S3JKDMD5.js.map → chunk-CXKMRKRF.js.map} +0 -0
  245. /package/dist/{chunk-RIXPZJUB.js.map → chunk-KTPG5VCH.js.map} +0 -0
  246. /package/dist/{chunk-V5SWX6KL.js.map → chunk-XXVM53P4.js.map} +0 -0
  247. /package/dist/{chunk-I2VVV5PQ.js.map → chunk-YY4YYM3E.js.map} +0 -0
  248. /package/src/providers/{OrganisationProvider.test.simple.tsx → OrganisationProvider.context.test.tsx} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- export { a as UnifiedAuthContextType, c as UnifiedAuthProvider, b as UnifiedAuthProviderProps, U as UserEventAccess, u as useUnifiedAuth } from './UnifiedAuthProvider-B391Aqum.js';
2
- import { m as InactivityService, n as EventService, o as OrganisationService, A as AuthService } from './AuthService-Df3IozMG.js';
3
- export { d as EventProvider, k as InactivityProvider, g as OrganisationProvider } from './AuthService-Df3IozMG.js';
1
+ export { a as UnifiedAuthContextType, c as UnifiedAuthProvider, b as UnifiedAuthProviderProps, U as UserEventAccess, u as useUnifiedAuth } from './UnifiedAuthProvider-BVKmQd9u.js';
2
+ import { m as InactivityService, n as EventService, o as OrganisationService, A as AuthService } from './AuthService-DcTI5Ov4.js';
3
+ export { d as EventProvider, k as InactivityProvider, g as OrganisationProvider } from './AuthService-DcTI5Ov4.js';
4
4
  import { e as OrganisationContextType } from './organisation-D6qRDtbF.js';
5
5
  export { O as Organisation, a as OrganisationMembership, f as OrganisationProviderProps, g as OrganisationSecurityError, U as UserProfile } from './organisation-D6qRDtbF.js';
6
6
  import { E as Event } from './unified-DQ4VcT7H.js';
7
+ import { S as SessionRestorationState } from './auth-DReDSLq9.js';
7
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
9
  export { ALL_PERMISSIONS, AccessLevel, AccessLevelGuard, AllPermissions, CACHE_PATTERNS, DataAccessRecord, EVENT_APP_PERMISSIONS, EnhancedNavigationMenu, EnhancedNavigationMenuProps, EventAppRole, GLOBAL_PERMISSIONS, GlobalRole, InvalidScopeError, LogLevel, MissingUserContextError, NavigationAccessRecord, NavigationContextType, NavigationGuard, NavigationGuardProps, NavigationProvider, NavigationProviderProps, ORGANISATION_PERMISSIONS, Operation, OrganisationContextRequiredError, OrganisationRole, PAGE_PERMISSIONS, PageAccessRecord, PagePermissionContextType, PagePermissionGuard, PagePermissionGuardProps, PagePermissionProvider, PagePermissionProviderProps, Permission, PermissionCheck, PermissionDeniedError, PermissionEnforcer, PermissionEnforcerProps, PermissionGuard, PermissionMap, RBACAuditManager, RBACCache, RBACConfig, RBACEngine, RBACError, RBACLogger, RBACNotInitializedError, RoleBasedRouter, RoleBasedRouterContextType, RoleBasedRouterProps, RouteAccessRecord, RouteConfig, Scope, SecureDataContextType, SecureDataProvider, SecureDataProviderProps, SecureSupabaseClient, UUID, UseResolvedScopeOptions, UseResolvedScopeReturn, createAuditManager, createRBACConfig, createRBACEngine, createRBACExpressMiddleware, createRBACMiddleware, createSecureClient, emitAuditEvent, fromSupabaseClient, getAccessLevel, getGlobalAuditManager, getPermissionMap, getPermissionsForRole, getRBACConfig, getRBACLogger, getRoleContext, hasAllPermissions, hasAnyPermission, hasAnyPermissionCached, hasPermission, hasPermissionCached, isDebugMode, isDevelopmentMode, isPermitted, isPermittedCached, isValidPermission, rbacCache, resolveAppContext, setGlobalAuditManager, setupRBAC, useAccessLevel, useCachedPermissions, useCan, useHasAllPermissions, useHasAnyPermission, useMultiplePermissions, useNavigationPermissions, usePagePermissions, usePermissions, useRBAC, useResolvedScope, useRoleBasedRouter, useSecureData, withAccessLevelGuard, withPermissionGuard, withRoleGuard } from './rbac/index.js';
9
- import { bi as FileSizeLimits, bj as StorageConfig, bk as StorageUploadOptions, bl as StorageFileMetadata, bm as StorageUploadResult, bn as StorageUrlOptions, bo as StorageListOptions, bp as StorageListResult } from './PublicLoadingSpinner-CnUaz0vG.js';
10
- export { A as Alert, m as AlertDescription, l as AlertTitle, n as Avatar, p as AvatarFallback, o as AvatarImage, B as Button, a as ButtonProps, C as Card, g as CardActions, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, q as Checkbox, b3 as DefaultPublicErrorFallback, D as Dialog, K as DialogBody, G as DialogClose, H as DialogContent, O as DialogDescription, M as DialogFooter, J as DialogHeader, E as DialogOverlay, z as DialogPortal, N as DialogTitle, F as DialogTrigger, az as ErrorBoundary, a_ as EventLogo, a$ as EventLogoCompact, b0 as EventLogoLarge, ba as EventLogoProps, aD as EventSelector, aF as FileDisplay, aG as FileDisplayProps, ar as Footer, as as FooterProps, am as Form, aq as Header, I as Input, j as InputProps, L as Label, k as LabelProps, aC as LoadingSpinner, ao as LoginForm, ap as LoginFormProps, av as NavigationItem, at as NavigationMenu, au as NavigationMenuProps, aw as OrganisationSelector, bf as PaceAppLayout, be as PaceAppLayoutProps, bh as PaceLoginPage, bg as PaceLoginPageProps, aE as PasswordResetForm, P as Progress, b1 as PublicErrorBoundary, bb as PublicErrorBoundaryProps, bc as PublicErrorBoundaryState, b6 as PublicLoadingSkeleton, b4 as PublicLoadingSpinner, b5 as PublicLoadingSpinnerFullPage, bd as PublicLoadingSpinnerProps, aZ as PublicPageContextChecker, aX as PublicPageDebugger, aY as PublicPageDiagnostic, aW as PublicPageFooter, b9 as PublicPageFooterProps, aS as PublicPageHeader, b8 as PublicPageHeaderProps, aQ as PublicPageLayout, b7 as PublicPageLayoutProps, aT as PublicPageProvider, $ as Select, a3 as SelectContent, a0 as SelectGroup, a5 as SelectItem, a4 as SelectLabel, a6 as SelectSeparator, a2 as SelectTrigger, a1 as SelectValue, br as StorageFileInfo, S as Switch, r as SwitchProps, T as Table, t as TableBody, u as TableCaption, v as TableCell, w as TableFooter, x as TableHead, s as TableHeader, y as TableRow, a7 as Toast, a9 as ToastAction, af as ToastActionElement, ae as ToastClose, ad as ToastDescription, ag as ToastProps, aa as ToastProvider, ac as ToastTitle, ab as ToastViewport, a8 as Toaster, ah as Tooltip, aj as TooltipContent, ak as TooltipProvider, al as TooltipRoot, ai as TooltipTrigger, aP as UseFileReferenceForRecordReturn, aN as UseFileReferenceOptions, aO as UseFileReferenceReturn, ay as UserMenu, bq as UserMenuProps, b2 as useErrorBoundary, aL as useFileReference, aM as useFileReferenceForRecord, aI as useFileUpload, aV as useIsPublicPage, aR as usePublicPageContext, aU as usePublicPageProviderContext, aH as useStorage } from './PublicLoadingSpinner-CnUaz0vG.js';
10
+ export { A as Alert, m as AlertDescription, l as AlertTitle, n as Avatar, p as AvatarFallback, o as AvatarImage, B as Button, a as ButtonProps, C as Card, g as CardActions, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, q as Checkbox, b9 as DefaultPublicErrorFallback, D as Dialog, K as DialogBody, G as DialogClose, H as DialogContent, O as DialogDescription, M as DialogFooter, J as DialogHeader, E as DialogOverlay, z as DialogPortal, N as DialogTitle, F as DialogTrigger, az as ErrorBoundary, b4 as EventLogo, b5 as EventLogoCompact, b6 as EventLogoLarge, bg as EventLogoProps, aE as EventSelector, aI as FileDisplay, aJ as FileDisplayProps, aG as FileUpload, aH as FileUploadProps, ar as Footer, as as FooterProps, am as Form, aq as Header, I as Input, j as InputProps, L as Label, k as LabelProps, aC as LoadingSpinner, ao as LoginForm, ap as LoginFormProps, av as NavigationItem, at as NavigationMenu, au as NavigationMenuProps, aw as OrganisationSelector, bl as PaceAppLayout, bk as PaceAppLayoutProps, bn as PaceLoginPage, bm as PaceLoginPageProps, aF as PasswordResetForm, P as Progress, b7 as PublicErrorBoundary, bh as PublicErrorBoundaryProps, bi as PublicErrorBoundaryState, bc as PublicLoadingSkeleton, ba as PublicLoadingSpinner, bb as PublicLoadingSpinnerFullPage, bj as PublicLoadingSpinnerProps, b3 as PublicPageContextChecker, b1 as PublicPageDebugger, b2 as PublicPageDiagnostic, b0 as PublicPageFooter, bf as PublicPageFooterProps, aY as PublicPageHeader, be as PublicPageHeaderProps, aW as PublicPageLayout, bd as PublicPageLayoutProps, aZ as PublicPageProvider, $ as Select, a3 as SelectContent, a0 as SelectGroup, a5 as SelectItem, a4 as SelectLabel, a6 as SelectSeparator, a2 as SelectTrigger, a1 as SelectValue, aD as SessionRestorationLoader, S as Switch, r as SwitchProps, T as Table, t as TableBody, u as TableCaption, v as TableCell, w as TableFooter, x as TableHead, s as TableHeader, y as TableRow, a7 as Toast, a9 as ToastAction, af as ToastActionElement, ae as ToastClose, ad as ToastDescription, ag as ToastProps, aa as ToastProvider, ac as ToastTitle, ab as ToastViewport, a8 as Toaster, ah as Tooltip, aj as TooltipContent, ak as TooltipProvider, al as TooltipRoot, ai as TooltipTrigger, aV as UseEventLogoOptions, aU as UseEventLogoReturn, aQ as UseFileReferenceForRecordReturn, aO as UseFileReferenceOptions, aP as UseFileReferenceReturn, ay as UserMenu, bo as UserMenuProps, aS as clearEventLogoCache, aT as getEventLogoCacheStats, b8 as useErrorBoundary, aR as useEventLogo, aK as useFileReference, aM as useFileReferenceById, aL as useFileReferenceForRecord, aN as useFilesByCategory, a$ as useIsPublicPage, aX as usePublicPageContext, a_ as usePublicPageProviderContext } from './PublicLoadingSpinner-BQXD1fbO.js';
11
11
  export { u as useToast } from './useToast-Bm6TnSK-.js';
12
12
  export { D as DataTable, a as DataTableProps } from './DataTable-BE0OXZKQ.js';
13
13
  import { D as DataRecord, f as DataTableAction } from './types-BDg1mAGG.js';
@@ -15,11 +15,11 @@ export { A as AggregateConfig, a as DataTableColumn, g as DataTableToolbarButton
15
15
  import { ColumnDef } from '@tanstack/react-table';
16
16
  export { r as UsePublicEventLogoOptions, q as UsePublicEventLogoReturn, p as UsePublicEventOptions, o as UsePublicEventReturn, s as UsePublicRouteParamsReturn, f as clearPublicEventCache, i as clearPublicLogoCache, n as extractEventCodeFromPath, m as generatePublicRoutePath, g as getPublicEventCacheStats, j as getPublicLogoCacheStats, c as useAppConfig, u as useEventTheme, a as useOrganisationPermissions, b as useOrganisationSecurity, e as usePublicEvent, l as usePublicEventCode, h as usePublicEventLogo, k as usePublicRouteParams } from './usePublicRouteParams-BlgwXweB.js';
17
17
  export { a as cn, c as createSecureDataAccess, j as formatCompactNumber, e as formatCurrency, f as formatDate, k as formatFileSize, h as formatNumber, i as formatPercent, g as getAppConfig, d as getCurrentAppId, b as getCurrentAppName, s as setAppConfig } from './formatting-BfDeV-ja.js';
18
- import React__default from 'react';
18
+ export { b as FileCategory, a as FileMetadata, F as FileReference, c as FileUploadOptions } from './file-reference-C9isKNPn.js';
19
19
  import { SupabaseClient } from '@supabase/supabase-js';
20
- export { b as FileCategory, a as FileMetadata, F as FileReference, c as FileUploadOptions } from './file-reference-9xUOnwyt.js';
21
20
  export { StyleImport, getAllStylePaths, getStylePath, styleConfig } from './styles/index.js';
22
21
  export { ColorPalette, ColorShade, PaletteData, applyPalette, clearPalette, generateSSRThemeCSS, getCurrentThemeData, isDynamicThemingActive } from './theming/runtime.js';
22
+ import 'react';
23
23
  import './database-BXAfr2Y_.js';
24
24
  import '@radix-ui/react-label';
25
25
  import '@radix-ui/react-avatar';
@@ -166,6 +166,25 @@ declare function useOrganisationService(): OrganisationService;
166
166
 
167
167
  declare function useAuthService(): AuthService;
168
168
 
169
+ /**
170
+ * @file useSessionRestoration Hook
171
+ * @package @jmruthers/pace-core
172
+ * @module Hooks
173
+ * @since 0.1.0
174
+ *
175
+ * Provides reactive session restoration state from the AuthService.
176
+ * Handles timeout detection to prevent infinite loading loops when
177
+ * Supabase session hydration from localStorage takes too long.
178
+ */
179
+
180
+ interface UseSessionRestorationResult extends SessionRestorationState {
181
+ /** Indicates whether the restoration process exceeded the timeout window */
182
+ hasTimedOut: boolean;
183
+ /** Timeout duration in milliseconds */
184
+ timeoutMs: number;
185
+ }
186
+ declare function useSessionRestoration(): UseSessionRestorationResult;
187
+
169
188
  /**
170
189
  * @file Inactivity Warning Modal
171
190
  * @package @jmruthers/pace-core
@@ -521,24 +540,87 @@ interface PasswordChangeFormProps {
521
540
  }
522
541
  declare function PasswordChangeForm({ onSubmit, className }: PasswordChangeFormProps): react_jsx_runtime.JSX.Element;
523
542
 
524
- interface FileUploadProps {
525
- supabase: SupabaseClient;
543
+ /**
544
+ * Storage utility types for pace-core
545
+ */
546
+ interface StorageUploadOptions {
547
+ /** The app name from rbac_apps */
526
548
  appName: string;
549
+ /** Organisation ID for scoping */
527
550
  orgId: string;
528
- onUploadComplete?: (result: {
529
- success: boolean;
530
- path?: string;
531
- error?: string;
532
- }) => void;
533
- onUploadStart?: () => void;
534
- accept?: string;
535
- maxSize?: number;
536
- multiple?: boolean;
537
- disabled?: boolean;
538
- className?: string;
539
- children?: React__default.ReactNode;
551
+ /** Whether the file should be publicly accessible */
552
+ isPublic?: boolean;
553
+ /** Optional tags for categorisation */
554
+ tags?: string[];
555
+ /** Optional custom path within the app/org structure */
556
+ customPath?: string;
557
+ /** Optional metadata to store with the file */
558
+ metadata?: Record<string, any>;
559
+ }
560
+ interface StorageFileMetadata {
561
+ mimeType: string;
562
+ size: number;
563
+ width?: number;
564
+ height?: number;
565
+ hash?: string;
566
+ orgId: string;
567
+ appName: string;
568
+ uploadedBy: string;
569
+ uploadedAt: string;
570
+ tags?: string[];
571
+ isPublic: boolean;
572
+ customMetadata?: Record<string, any>;
573
+ }
574
+ interface StorageUploadResult {
575
+ success: boolean;
576
+ path?: string;
577
+ publicUrl?: string;
578
+ metadata?: StorageFileMetadata;
579
+ error?: string;
580
+ }
581
+ interface StorageUrlOptions {
582
+ /** The app name from rbac_apps */
583
+ appName: string;
584
+ /** Organisation ID for scoping */
585
+ orgId: string;
586
+ /** Expiry time in seconds for signed URLs (default: 3600) */
587
+ expiresIn?: number;
588
+ }
589
+ interface StorageListOptions {
590
+ /** The app name from rbac_apps */
591
+ appName: string;
592
+ /** Organisation ID for scoping */
593
+ orgId: string;
594
+ /** Optional path prefix to filter by */
595
+ pathPrefix?: string;
596
+ /** Optional tags to filter by */
597
+ tags?: string[];
598
+ /** Maximum number of files to return */
599
+ limit?: number;
600
+ /** Offset for pagination */
601
+ offset?: number;
602
+ }
603
+ interface StorageFileInfo {
604
+ name: string;
605
+ path: string;
606
+ size: number;
607
+ mimeType: string;
608
+ lastModified: string;
609
+ metadata: StorageFileMetadata;
610
+ }
611
+ interface StorageListResult {
612
+ files: StorageFileInfo[];
613
+ totalCount: number;
614
+ hasMore: boolean;
615
+ }
616
+ interface FileSizeLimits {
617
+ [mimeType: string]: number;
618
+ }
619
+ interface StorageConfig {
620
+ bucketName: string;
621
+ fileSizeLimits: FileSizeLimits;
622
+ defaultFileSizeLimit: number;
540
623
  }
541
- declare function FileUpload({ supabase, appName, orgId, onUploadComplete, onUploadStart, accept, maxSize, multiple, disabled, className, children }: FileUploadProps): react_jsx_runtime.JSX.Element;
542
624
 
543
625
  /**
544
626
  * Storage configuration for pace-core
@@ -565,6 +647,12 @@ declare const STORAGE_CONFIG: StorageConfig;
565
647
  * Get the file size limit for a given MIME type
566
648
  */
567
649
  declare function getFileSizeLimit(mimeType: string): number;
650
+ /**
651
+ * Get the bucket name based on whether the file is public or private
652
+ * @param isPublic - Whether the file should be publicly accessible
653
+ * @returns The bucket name: 'public-files' for public files, 'files' for private files
654
+ */
655
+ declare function getBucketName(isPublic: boolean): 'files' | 'public-files';
568
656
  /**
569
657
  * Validate file size against limits
570
658
  */
@@ -595,10 +683,19 @@ declare function extractFileMetadata(file: File, options: StorageUploadOptions,
595
683
  declare function uploadFile(supabase: SupabaseClient, file: File, options: StorageUploadOptions): Promise<StorageUploadResult>;
596
684
  /**
597
685
  * Get a public URL for a file
686
+ * @param supabase - Supabase client instance
687
+ * @param path - File path within the bucket
688
+ * @param isPublic - Whether the file is in the public-files bucket (default: true)
689
+ * @returns Public URL for the file
598
690
  */
599
- declare function getPublicUrl(supabase: SupabaseClient, path: string): string;
691
+ declare function getPublicUrl(supabase: SupabaseClient, path: string, isPublic?: boolean): string;
600
692
  /**
601
693
  * Get a signed URL for a protected file
694
+ * Private files are always in the 'files' bucket, so this always uses 'files' bucket
695
+ * @param supabase - Supabase client instance
696
+ * @param path - File path within the bucket
697
+ * @param options - URL options including expiry time
698
+ * @returns Signed URL with expiration timestamp, or null if failed
602
699
  */
603
700
  declare function getSignedUrl(supabase: SupabaseClient, path: string, options: StorageUrlOptions): Promise<{
604
701
  url: string;
@@ -606,21 +703,49 @@ declare function getSignedUrl(supabase: SupabaseClient, path: string, options: S
606
703
  } | null>;
607
704
  /**
608
705
  * Delete a file from storage
706
+ * @param supabase - Supabase client instance
707
+ * @param path - File path within the bucket
708
+ * @param isPublic - Whether the file is in the public-files bucket (default: false)
709
+ * @returns Success status and optional error message
609
710
  */
610
- declare function deleteFile(supabase: SupabaseClient, path: string): Promise<{
711
+ declare function deleteFile(supabase: SupabaseClient, path: string, isPublic?: boolean): Promise<{
611
712
  success: boolean;
612
713
  error?: string;
613
714
  }>;
614
715
  /**
615
716
  * List files in an organization scope
717
+ * @param supabase - Supabase client instance
718
+ * @param options - List options including bucket selection via isPublic
719
+ * @returns List of files with metadata
616
720
  */
617
- declare function listFiles(supabase: SupabaseClient, options: StorageListOptions): Promise<StorageListResult>;
721
+ declare function listFiles(supabase: SupabaseClient, options: StorageListOptions & {
722
+ isPublic?: boolean;
723
+ }): Promise<StorageListResult>;
724
+ /**
725
+ * Download a file from storage
726
+ * @param supabase - Supabase client instance
727
+ * @param path - File path within the bucket
728
+ * @param isPublic - Whether the file is in the public-files bucket (default: false)
729
+ * @returns File blob with metadata, or null if failed
730
+ */
731
+ declare function downloadFile(supabase: SupabaseClient, path: string, isPublic?: boolean): Promise<{
732
+ blob: Blob;
733
+ metadata: {
734
+ name: string;
735
+ size: number;
736
+ type: string;
737
+ };
738
+ } | null>;
618
739
  /**
619
740
  * Move a file to archived location (soft delete)
741
+ * @param supabase - Supabase client instance
742
+ * @param path - File path within the bucket
743
+ * @param options - Archive options including bucket selection via isPublic
620
744
  */
621
745
  declare function archiveFile(supabase: SupabaseClient, path: string, options: {
622
746
  appName: string;
623
747
  orgId: string;
748
+ isPublic?: boolean;
624
749
  }): Promise<{
625
750
  success: boolean;
626
751
  error?: string;
@@ -643,8 +768,9 @@ declare class StorageUtils {
643
768
  static getPublicUrl: typeof getPublicUrl;
644
769
  static getSignedUrl: typeof getSignedUrl;
645
770
  static deleteFile: typeof deleteFile;
771
+ static downloadFile: typeof downloadFile;
646
772
  static listFiles: typeof listFiles;
647
773
  static archiveFile: typeof archiveFile;
648
774
  }
649
775
 
650
- export { APP_PATH_MAPPING, ColumnFactory, DEFAULT_FILE_SIZE_LIMIT, DataRecord, DataTableAction, FILE_SIZE_LIMITS, FileSizeLimits, FileUpload, type FileUploadProps, InactivityWarningModal, type InactivityWarningModalProps, OrganisationContextType, PasswordChangeForm, STORAGE_CONFIG, StorageConfig, StorageFileMetadata, StorageListOptions, StorageListResult, StorageUploadOptions, StorageUploadResult, StorageUrlOptions, StorageUtils, type UseInactivityTrackerOptions, type UseInactivityTrackerReturn, archiveFile, deleteFile, extractFileMetadata, generateFilePath, generateUniqueFileName, getFileSizeLimit, getPublicUrl, getSignedUrl, listFiles, uploadFile, useAuthService, useEventService, useEvents, useInactivityService, useInactivityTracker, useOrganisationService, useOrganisations, validateFileSize };
776
+ export { APP_PATH_MAPPING, ColumnFactory, DEFAULT_FILE_SIZE_LIMIT, DataRecord, DataTableAction, FILE_SIZE_LIMITS, type FileSizeLimits, InactivityWarningModal, type InactivityWarningModalProps, OrganisationContextType, PasswordChangeForm, STORAGE_CONFIG, type StorageConfig, type StorageFileInfo, type StorageFileMetadata, type StorageListOptions, type StorageListResult, type StorageUploadOptions, type StorageUploadResult, type StorageUrlOptions, StorageUtils, type UseInactivityTrackerOptions, type UseInactivityTrackerReturn, archiveFile, deleteFile, downloadFile, extractFileMetadata, generateFilePath, generateUniqueFileName, getBucketName, getFileSizeLimit, getPublicUrl, getSignedUrl, listFiles, uploadFile, useAuthService, useEventService, useEvents, useInactivityService, useInactivityTracker, useOrganisationService, useOrganisations, useSessionRestoration, validateFileSize };