@jmruthers/pace-core 0.5.189 → 0.5.190

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 (420) hide show
  1. package/core-usage-manifest.json +0 -4
  2. package/dist/{AuthService-B-cd2MA4.d.ts → AuthService-CbP_utw2.d.ts} +7 -3
  3. package/dist/{DataTable-GUFUNZ3N.js → DataTable-ON3IXISJ.js} +8 -8
  4. package/dist/{PublicPageProvider-B8HaLe69.d.ts → PublicPageProvider-C4uxosp6.d.ts} +83 -24
  5. package/dist/{UnifiedAuthProvider-BG0AL5eE.d.ts → UnifiedAuthProvider-BYA9qB-o.d.ts} +4 -3
  6. package/dist/{UnifiedAuthProvider-643PUAIM.js → UnifiedAuthProvider-X5NXANVI.js} +4 -2
  7. package/dist/{api-YP7XD5L6.js → api-I6UCQ5S6.js} +4 -2
  8. package/dist/{chunk-DDM4CCYT.js → chunk-4QYC5L4K.js} +60 -35
  9. package/dist/chunk-4QYC5L4K.js.map +1 -0
  10. package/dist/{chunk-IM4QE42D.js → chunk-73HSNNOQ.js} +141 -326
  11. package/dist/chunk-73HSNNOQ.js.map +1 -0
  12. package/dist/{chunk-YHCN776L.js → chunk-DZWK57KZ.js} +2 -75
  13. package/dist/chunk-DZWK57KZ.js.map +1 -0
  14. package/dist/{chunk-3GOZZZYH.js → chunk-HQVPB5MZ.js} +238 -301
  15. package/dist/chunk-HQVPB5MZ.js.map +1 -0
  16. package/dist/{chunk-THRPYOFK.js → chunk-HW3OVDUF.js} +5 -5
  17. package/dist/chunk-HW3OVDUF.js.map +1 -0
  18. package/dist/{chunk-F2IMUDXZ.js → chunk-I7PSE6JW.js} +75 -2
  19. package/dist/chunk-I7PSE6JW.js.map +1 -0
  20. package/dist/{chunk-VGZZXKBR.js → chunk-J2XXC7R5.js} +280 -52
  21. package/dist/chunk-J2XXC7R5.js.map +1 -0
  22. package/dist/{chunk-UCQSRW7Z.js → chunk-NIU6J6OX.js} +425 -378
  23. package/dist/chunk-NIU6J6OX.js.map +1 -0
  24. package/dist/{chunk-HESYZWZW.js → chunk-QWWZ5CAQ.js} +2 -2
  25. package/dist/{chunk-HEHYGYOX.js → chunk-RUYZKXOD.js} +401 -46
  26. package/dist/chunk-RUYZKXOD.js.map +1 -0
  27. package/dist/{chunk-2UUZZJFT.js → chunk-SDMHPX3X.js} +176 -160
  28. package/dist/{chunk-2UUZZJFT.js.map → chunk-SDMHPX3X.js.map} +1 -1
  29. package/dist/{chunk-MX64ZF6I.js → chunk-STYK4OH2.js} +11 -11
  30. package/dist/chunk-STYK4OH2.js.map +1 -0
  31. package/dist/{chunk-YGPFYGA6.js → chunk-VVBAW5A5.js} +822 -498
  32. package/dist/chunk-VVBAW5A5.js.map +1 -0
  33. package/dist/chunk-Y4BUBBHD.js +614 -0
  34. package/dist/chunk-Y4BUBBHD.js.map +1 -0
  35. package/dist/{chunk-SAUPYVLF.js → chunk-ZSAAAMVR.js} +1 -1
  36. package/dist/chunk-ZSAAAMVR.js.map +1 -0
  37. package/dist/components.d.ts +3 -4
  38. package/dist/components.js +19 -19
  39. package/dist/components.js.map +1 -1
  40. package/dist/eslint-rules/pace-core-compliance.cjs +0 -2
  41. package/dist/{file-reference-D037xOFK.d.ts → file-reference-BavO2eQj.d.ts} +13 -10
  42. package/dist/hooks.d.ts +10 -5
  43. package/dist/hooks.js +14 -8
  44. package/dist/hooks.js.map +1 -1
  45. package/dist/index.d.ts +13 -11
  46. package/dist/index.js +79 -69
  47. package/dist/index.js.map +1 -1
  48. package/dist/providers.d.ts +3 -3
  49. package/dist/providers.js +3 -1
  50. package/dist/rbac/index.d.ts +76 -12
  51. package/dist/rbac/index.js +12 -9
  52. package/dist/types.d.ts +1 -1
  53. package/dist/types.js +1 -1
  54. package/dist/{usePublicRouteParams-CTDELQ7H.d.ts → usePublicRouteParams-DxIDS4bC.d.ts} +16 -9
  55. package/dist/utils.js +16 -16
  56. package/docs/README.md +2 -2
  57. package/docs/api/classes/ColumnFactory.md +1 -1
  58. package/docs/api/classes/ErrorBoundary.md +1 -1
  59. package/docs/api/classes/InvalidScopeError.md +2 -2
  60. package/docs/api/classes/Logger.md +1 -1
  61. package/docs/api/classes/MissingUserContextError.md +2 -2
  62. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  63. package/docs/api/classes/PermissionDeniedError.md +1 -1
  64. package/docs/api/classes/RBACAuditManager.md +1 -1
  65. package/docs/api/classes/RBACCache.md +1 -1
  66. package/docs/api/classes/RBACEngine.md +4 -4
  67. package/docs/api/classes/RBACError.md +1 -1
  68. package/docs/api/classes/RBACNotInitializedError.md +2 -2
  69. package/docs/api/classes/SecureSupabaseClient.md +21 -16
  70. package/docs/api/classes/StorageUtils.md +7 -4
  71. package/docs/api/enums/FileCategory.md +1 -1
  72. package/docs/api/enums/LogLevel.md +1 -1
  73. package/docs/api/enums/RBACErrorCode.md +1 -1
  74. package/docs/api/enums/RPCFunction.md +1 -1
  75. package/docs/api/interfaces/AddressFieldProps.md +1 -1
  76. package/docs/api/interfaces/AddressFieldRef.md +1 -1
  77. package/docs/api/interfaces/AggregateConfig.md +1 -1
  78. package/docs/api/interfaces/AutocompleteOptions.md +1 -1
  79. package/docs/api/interfaces/AvatarProps.md +1 -1
  80. package/docs/api/interfaces/BadgeProps.md +1 -1
  81. package/docs/api/interfaces/ButtonProps.md +1 -1
  82. package/docs/api/interfaces/CalendarProps.md +20 -6
  83. package/docs/api/interfaces/CardProps.md +1 -1
  84. package/docs/api/interfaces/ColorPalette.md +1 -1
  85. package/docs/api/interfaces/ColorShade.md +1 -1
  86. package/docs/api/interfaces/ComplianceResult.md +1 -1
  87. package/docs/api/interfaces/DataAccessRecord.md +9 -9
  88. package/docs/api/interfaces/DataRecord.md +1 -1
  89. package/docs/api/interfaces/DataTableAction.md +1 -1
  90. package/docs/api/interfaces/DataTableColumn.md +1 -1
  91. package/docs/api/interfaces/DataTableProps.md +1 -1
  92. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  93. package/docs/api/interfaces/DatabaseComplianceResult.md +1 -1
  94. package/docs/api/interfaces/DatabaseIssue.md +1 -1
  95. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  96. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  97. package/docs/api/interfaces/EventAppRoleData.md +1 -1
  98. package/docs/api/interfaces/ExportColumn.md +1 -1
  99. package/docs/api/interfaces/ExportOptions.md +1 -1
  100. package/docs/api/interfaces/FileDisplayProps.md +62 -16
  101. package/docs/api/interfaces/FileMetadata.md +1 -1
  102. package/docs/api/interfaces/FileReference.md +2 -2
  103. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  104. package/docs/api/interfaces/FileUploadOptions.md +26 -12
  105. package/docs/api/interfaces/FileUploadProps.md +30 -19
  106. package/docs/api/interfaces/FooterProps.md +1 -1
  107. package/docs/api/interfaces/FormFieldProps.md +1 -1
  108. package/docs/api/interfaces/FormProps.md +1 -1
  109. package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
  110. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  111. package/docs/api/interfaces/InputProps.md +1 -1
  112. package/docs/api/interfaces/LabelProps.md +1 -1
  113. package/docs/api/interfaces/LoggerConfig.md +1 -1
  114. package/docs/api/interfaces/LoginFormProps.md +1 -1
  115. package/docs/api/interfaces/NavigationAccessRecord.md +10 -10
  116. package/docs/api/interfaces/NavigationContextType.md +9 -9
  117. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  118. package/docs/api/interfaces/NavigationItem.md +1 -1
  119. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  120. package/docs/api/interfaces/NavigationProviderProps.md +7 -7
  121. package/docs/api/interfaces/Organisation.md +1 -1
  122. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  123. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  124. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  125. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  126. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  127. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  128. package/docs/api/interfaces/PageAccessRecord.md +8 -8
  129. package/docs/api/interfaces/PagePermissionContextType.md +8 -8
  130. package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
  131. package/docs/api/interfaces/PagePermissionProviderProps.md +7 -7
  132. package/docs/api/interfaces/PaletteData.md +1 -1
  133. package/docs/api/interfaces/ParsedAddress.md +1 -1
  134. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  135. package/docs/api/interfaces/ProgressProps.md +3 -11
  136. package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
  137. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  138. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  139. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  140. package/docs/api/interfaces/QuickFix.md +1 -1
  141. package/docs/api/interfaces/RBACAccessValidateParams.md +1 -1
  142. package/docs/api/interfaces/RBACAccessValidateResult.md +1 -1
  143. package/docs/api/interfaces/RBACAuditLogParams.md +1 -1
  144. package/docs/api/interfaces/RBACAuditLogResult.md +1 -1
  145. package/docs/api/interfaces/RBACConfig.md +1 -1
  146. package/docs/api/interfaces/RBACContext.md +1 -1
  147. package/docs/api/interfaces/RBACLogger.md +1 -1
  148. package/docs/api/interfaces/RBACPageAccessCheckParams.md +1 -1
  149. package/docs/api/interfaces/RBACPerformanceMetrics.md +1 -1
  150. package/docs/api/interfaces/RBACPermissionCheckParams.md +1 -1
  151. package/docs/api/interfaces/RBACPermissionCheckResult.md +1 -1
  152. package/docs/api/interfaces/RBACPermissionsGetParams.md +1 -1
  153. package/docs/api/interfaces/RBACPermissionsGetResult.md +1 -1
  154. package/docs/api/interfaces/RBACResult.md +1 -1
  155. package/docs/api/interfaces/RBACRoleGrantParams.md +1 -1
  156. package/docs/api/interfaces/RBACRoleGrantResult.md +1 -1
  157. package/docs/api/interfaces/RBACRoleRevokeParams.md +1 -1
  158. package/docs/api/interfaces/RBACRoleRevokeResult.md +1 -1
  159. package/docs/api/interfaces/RBACRoleValidateParams.md +1 -1
  160. package/docs/api/interfaces/RBACRoleValidateResult.md +1 -1
  161. package/docs/api/interfaces/RBACRolesListParams.md +1 -1
  162. package/docs/api/interfaces/RBACRolesListResult.md +1 -1
  163. package/docs/api/interfaces/RBACSessionTrackParams.md +1 -1
  164. package/docs/api/interfaces/RBACSessionTrackResult.md +1 -1
  165. package/docs/api/interfaces/ResourcePermissions.md +1 -1
  166. package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
  167. package/docs/api/interfaces/RoleBasedRouterContextType.md +8 -8
  168. package/docs/api/interfaces/RoleBasedRouterProps.md +10 -10
  169. package/docs/api/interfaces/RoleManagementResult.md +1 -1
  170. package/docs/api/interfaces/RouteAccessRecord.md +10 -10
  171. package/docs/api/interfaces/RouteConfig.md +10 -10
  172. package/docs/api/interfaces/RuntimeComplianceResult.md +1 -1
  173. package/docs/api/interfaces/SecureDataContextType.md +9 -9
  174. package/docs/api/interfaces/SecureDataProviderProps.md +8 -8
  175. package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
  176. package/docs/api/interfaces/SetupIssue.md +1 -1
  177. package/docs/api/interfaces/StorageConfig.md +4 -4
  178. package/docs/api/interfaces/StorageFileInfo.md +7 -7
  179. package/docs/api/interfaces/StorageFileMetadata.md +25 -14
  180. package/docs/api/interfaces/StorageListOptions.md +22 -9
  181. package/docs/api/interfaces/StorageListResult.md +4 -4
  182. package/docs/api/interfaces/StorageUploadOptions.md +21 -8
  183. package/docs/api/interfaces/StorageUploadResult.md +6 -6
  184. package/docs/api/interfaces/StorageUrlOptions.md +19 -6
  185. package/docs/api/interfaces/StyleImport.md +1 -1
  186. package/docs/api/interfaces/SwitchProps.md +1 -1
  187. package/docs/api/interfaces/TabsContentProps.md +1 -1
  188. package/docs/api/interfaces/TabsListProps.md +1 -1
  189. package/docs/api/interfaces/TabsProps.md +1 -1
  190. package/docs/api/interfaces/TabsTriggerProps.md +1 -1
  191. package/docs/api/interfaces/TextareaProps.md +1 -1
  192. package/docs/api/interfaces/ToastActionElement.md +1 -1
  193. package/docs/api/interfaces/ToastProps.md +1 -1
  194. package/docs/api/interfaces/UnifiedAuthContextType.md +53 -53
  195. package/docs/api/interfaces/UnifiedAuthProviderProps.md +13 -13
  196. package/docs/api/interfaces/UseFormDialogOptions.md +1 -1
  197. package/docs/api/interfaces/UseFormDialogReturn.md +1 -1
  198. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  199. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  200. package/docs/api/interfaces/UsePublicEventLogoOptions.md +1 -1
  201. package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
  202. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  203. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  204. package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
  205. package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
  206. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  207. package/docs/api/interfaces/UseResolvedScopeOptions.md +4 -4
  208. package/docs/api/interfaces/UseResolvedScopeReturn.md +4 -4
  209. package/docs/api/interfaces/UseResourcePermissionsOptions.md +1 -1
  210. package/docs/api/interfaces/UserEventAccess.md +11 -11
  211. package/docs/api/interfaces/UserMenuProps.md +1 -1
  212. package/docs/api/interfaces/UserProfile.md +1 -1
  213. package/docs/api/modules.md +151 -92
  214. package/docs/api-reference/components.md +15 -7
  215. package/docs/api-reference/providers.md +2 -2
  216. package/docs/api-reference/rpc-functions.md +1 -0
  217. package/docs/best-practices/README.md +1 -1
  218. package/docs/best-practices/deployment.md +8 -8
  219. package/docs/getting-started/examples/README.md +2 -2
  220. package/docs/getting-started/installation-guide.md +4 -4
  221. package/docs/getting-started/quick-start.md +3 -3
  222. package/docs/migration/MIGRATION_GUIDE.md +3 -3
  223. package/docs/rbac/compliance/compliance-guide.md +2 -2
  224. package/docs/rbac/event-based-apps.md +2 -2
  225. package/docs/rbac/getting-started.md +2 -2
  226. package/docs/rbac/quick-start.md +2 -2
  227. package/docs/security/README.md +4 -4
  228. package/docs/standards/07-rbac-and-rls-standard.md +430 -7
  229. package/docs/troubleshooting/README.md +2 -2
  230. package/docs/troubleshooting/migration.md +3 -3
  231. package/package.json +1 -3
  232. package/scripts/check-pace-core-compliance.cjs +1 -1
  233. package/scripts/check-pace-core-compliance.js +1 -1
  234. package/src/__tests__/fixtures/supabase.ts +301 -0
  235. package/src/__tests__/public-recipe-view.test.ts +9 -9
  236. package/src/__tests__/rls-policies.test.ts +197 -61
  237. package/src/components/AddressField/AddressField.test.tsx +42 -0
  238. package/src/components/AddressField/AddressField.tsx +71 -60
  239. package/src/components/AddressField/README.md +1 -0
  240. package/src/components/Alert/Alert.test.tsx +50 -10
  241. package/src/components/Alert/Alert.tsx +5 -3
  242. package/src/components/Avatar/Avatar.test.tsx +95 -43
  243. package/src/components/Avatar/Avatar.tsx +16 -16
  244. package/src/components/Button/Button.test.tsx +2 -1
  245. package/src/components/Button/Button.tsx +3 -3
  246. package/src/components/Calendar/Calendar.test.tsx +53 -37
  247. package/src/components/Calendar/Calendar.tsx +409 -82
  248. package/src/components/Card/Card.test.tsx +7 -4
  249. package/src/components/Card/Card.tsx +3 -6
  250. package/src/components/Checkbox/Checkbox.tsx +2 -2
  251. package/src/components/DataTable/components/ActionButtons.tsx +5 -5
  252. package/src/components/DataTable/components/BulkOperationsDropdown.tsx +2 -2
  253. package/src/components/DataTable/components/ColumnFilter.tsx +1 -1
  254. package/src/components/DataTable/components/ColumnVisibilityDropdown.tsx +3 -3
  255. package/src/components/DataTable/components/DataTableBody.tsx +12 -12
  256. package/src/components/DataTable/components/DataTableCore.tsx +3 -3
  257. package/src/components/DataTable/components/DataTableToolbar.tsx +5 -5
  258. package/src/components/DataTable/components/DraggableColumnHeader.tsx +3 -3
  259. package/src/components/DataTable/components/EditableRow.tsx +2 -2
  260. package/src/components/DataTable/components/EmptyState.tsx +3 -3
  261. package/src/components/DataTable/components/GroupHeader.tsx +2 -2
  262. package/src/components/DataTable/components/GroupingDropdown.tsx +1 -1
  263. package/src/components/DataTable/components/ImportModal.tsx +4 -4
  264. package/src/components/DataTable/components/LoadingState.tsx +1 -1
  265. package/src/components/DataTable/components/PaginationControls.tsx +11 -11
  266. package/src/components/DataTable/components/UnifiedTableBody.tsx +9 -9
  267. package/src/components/DataTable/components/ViewRowModal.tsx +2 -2
  268. package/src/components/DataTable/components/__tests__/AccessDeniedPage.test.tsx +11 -37
  269. package/src/components/DataTable/components/__tests__/DataTableToolbar.test.tsx +157 -0
  270. package/src/components/DataTable/components/__tests__/LoadingState.test.tsx +2 -1
  271. package/src/components/DataTable/components/__tests__/VirtualizedDataTable.test.tsx +128 -0
  272. package/src/components/DataTable/core/__tests__/ActionManager.test.ts +19 -0
  273. package/src/components/DataTable/core/__tests__/ColumnFactory.test.ts +51 -0
  274. package/src/components/DataTable/core/__tests__/ColumnManager.test.ts +84 -0
  275. package/src/components/DataTable/core/__tests__/DataManager.test.ts +14 -0
  276. package/src/components/DataTable/core/__tests__/DataTableContext.test.tsx +136 -0
  277. package/src/components/DataTable/core/__tests__/LocalDataAdapter.test.ts +16 -0
  278. package/src/components/DataTable/core/__tests__/PluginRegistry.test.ts +18 -0
  279. package/src/components/DataTable/hooks/useDataTablePermissions.ts +28 -7
  280. package/src/components/DataTable/utils/__tests__/hierarchicalUtils.test.ts +30 -1
  281. package/src/components/DataTable/utils/hierarchicalUtils.ts +38 -10
  282. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +8 -3
  283. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.tsx +4 -4
  284. package/src/components/Dialog/Dialog.tsx +2 -2
  285. package/src/components/EventSelector/EventSelector.tsx +7 -7
  286. package/src/components/FileDisplay/FileDisplay.tsx +291 -179
  287. package/src/components/FileUpload/FileUpload.tsx +7 -4
  288. package/src/components/Header/Header.test.tsx +28 -0
  289. package/src/components/Header/Header.tsx +22 -9
  290. package/src/components/InactivityWarningModal/InactivityWarningModal.tsx +2 -2
  291. package/src/components/LoadingSpinner/LoadingSpinner.test.tsx +19 -14
  292. package/src/components/LoadingSpinner/LoadingSpinner.tsx +5 -5
  293. package/src/components/NavigationMenu/NavigationMenu.test.tsx +127 -1
  294. package/src/components/OrganisationSelector/OrganisationSelector.tsx +8 -8
  295. package/src/components/PaceAppLayout/PaceAppLayout.integration.test.tsx +4 -0
  296. package/src/components/PaceAppLayout/PaceAppLayout.performance.test.tsx +3 -0
  297. package/src/components/PaceAppLayout/PaceAppLayout.security.test.tsx +3 -0
  298. package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +16 -6
  299. package/src/components/PaceAppLayout/PaceAppLayout.tsx +37 -3
  300. package/src/components/PaceAppLayout/test-setup.tsx +1 -0
  301. package/src/components/PaceLoginPage/PaceLoginPage.test.tsx +66 -45
  302. package/src/components/PaceLoginPage/PaceLoginPage.tsx +6 -4
  303. package/src/components/Progress/Progress.test.tsx +18 -19
  304. package/src/components/Progress/Progress.tsx +31 -32
  305. package/src/components/PublicLayout/PublicLayout.test.tsx +6 -6
  306. package/src/components/PublicLayout/PublicPageProvider.tsx +5 -3
  307. package/src/components/Select/Select.tsx +5 -5
  308. package/src/components/Switch/Switch.test.tsx +2 -1
  309. package/src/components/Switch/Switch.tsx +1 -1
  310. package/src/components/Toast/Toast.tsx +1 -1
  311. package/src/components/Tooltip/Tooltip.test.tsx +8 -2
  312. package/src/components/UserMenu/UserMenu.tsx +3 -3
  313. package/src/eslint-rules/pace-core-compliance.cjs +0 -2
  314. package/src/eslint-rules/pace-core-compliance.js +0 -2
  315. package/src/hooks/__tests__/hooks.integration.test.tsx +4 -1
  316. package/src/hooks/__tests__/useAppConfig.unit.test.ts +76 -5
  317. package/src/hooks/__tests__/useDataTableState.test.ts +76 -0
  318. package/src/hooks/__tests__/useFileUrl.unit.test.ts +25 -69
  319. package/src/hooks/__tests__/useFileUrlCache.test.ts +129 -0
  320. package/src/hooks/__tests__/usePreventTabReload.test.ts +88 -0
  321. package/src/hooks/__tests__/{usePublicEvent.unit.test.ts → usePublicEvent.test.ts} +28 -1
  322. package/src/hooks/__tests__/useQueryCache.test.ts +144 -0
  323. package/src/hooks/__tests__/useSecureDataAccess.unit.test.tsx +58 -16
  324. package/src/hooks/index.ts +1 -1
  325. package/src/hooks/public/usePublicEvent.ts +2 -2
  326. package/src/hooks/public/usePublicFileDisplay.ts +173 -87
  327. package/src/hooks/useAppConfig.ts +24 -5
  328. package/src/hooks/useFileDisplay.ts +297 -34
  329. package/src/hooks/useFileReference.ts +56 -11
  330. package/src/hooks/useFileUrl.ts +1 -1
  331. package/src/hooks/useInactivityTracker.ts +16 -7
  332. package/src/hooks/usePermissionCache.test.ts +85 -8
  333. package/src/hooks/useQueryCache.ts +21 -0
  334. package/src/hooks/useSecureDataAccess.test.ts +80 -35
  335. package/src/hooks/useSecureDataAccess.ts +80 -37
  336. package/src/providers/services/EventServiceProvider.tsx +37 -17
  337. package/src/providers/services/InactivityServiceProvider.tsx +4 -4
  338. package/src/providers/services/OrganisationServiceProvider.tsx +8 -1
  339. package/src/providers/services/UnifiedAuthProvider.tsx +115 -29
  340. package/src/rbac/__tests__/auth-rbac.e2e.test.tsx +451 -0
  341. package/src/rbac/__tests__/engine.comprehensive.test.ts +12 -0
  342. package/src/rbac/__tests__/rbac-engine-core-logic.test.ts +8 -0
  343. package/src/rbac/__tests__/rbac-engine-simplified.test.ts +4 -0
  344. package/src/rbac/api.ts +240 -36
  345. package/src/rbac/cache-invalidation.ts +21 -7
  346. package/src/rbac/compliance/quick-fix-suggestions.ts +1 -1
  347. package/src/rbac/components/NavigationGuard.tsx +23 -63
  348. package/src/rbac/components/NavigationProvider.test.tsx +52 -23
  349. package/src/rbac/components/NavigationProvider.tsx +13 -11
  350. package/src/rbac/components/PagePermissionGuard.tsx +77 -203
  351. package/src/rbac/components/PagePermissionProvider.tsx +13 -11
  352. package/src/rbac/components/PermissionEnforcer.tsx +24 -62
  353. package/src/rbac/components/RoleBasedRouter.tsx +14 -12
  354. package/src/rbac/components/SecureDataProvider.tsx +13 -11
  355. package/src/rbac/components/__tests__/NavigationGuard.test.tsx +104 -41
  356. package/src/rbac/components/__tests__/NavigationProvider.test.tsx +49 -12
  357. package/src/rbac/components/__tests__/PagePermissionGuard.race-condition.test.tsx +22 -1
  358. package/src/rbac/components/__tests__/PagePermissionGuard.test.tsx +161 -82
  359. package/src/rbac/components/__tests__/PagePermissionGuard.verification.test.tsx +22 -1
  360. package/src/rbac/components/__tests__/PermissionEnforcer.test.tsx +77 -30
  361. package/src/rbac/components/__tests__/RoleBasedRouter.test.tsx +39 -5
  362. package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +47 -4
  363. package/src/rbac/engine.ts +4 -2
  364. package/src/rbac/hooks/__tests__/useSecureSupabase.test.ts +144 -52
  365. package/src/rbac/hooks/index.ts +3 -0
  366. package/src/rbac/hooks/useCan.test.ts +101 -53
  367. package/src/rbac/hooks/usePermissions.ts +108 -41
  368. package/src/rbac/hooks/useRBAC.test.ts +11 -3
  369. package/src/rbac/hooks/useRBAC.ts +83 -40
  370. package/src/rbac/hooks/useResolvedScope.test.ts +189 -63
  371. package/src/rbac/hooks/useResolvedScope.ts +128 -70
  372. package/src/rbac/hooks/useSecureSupabase.ts +36 -19
  373. package/src/rbac/hooks/useSuperAdminBypass.ts +126 -0
  374. package/src/rbac/request-deduplication.ts +1 -1
  375. package/src/rbac/secureClient.ts +72 -12
  376. package/src/rbac/security.ts +29 -23
  377. package/src/rbac/types.ts +10 -0
  378. package/src/rbac/utils/__tests__/contextValidator.test.ts +150 -0
  379. package/src/rbac/utils/__tests__/deep-equal.test.ts +53 -0
  380. package/src/rbac/utils/__tests__/eventContext.test.ts +6 -1
  381. package/src/rbac/utils/contextValidator.ts +288 -0
  382. package/src/rbac/utils/eventContext.ts +48 -2
  383. package/src/services/EventService.ts +165 -21
  384. package/src/services/OrganisationService.ts +37 -2
  385. package/src/services/__tests__/EventService.test.ts +26 -21
  386. package/src/types/file-reference.ts +13 -10
  387. package/src/utils/app/appNameResolver.test.ts +346 -73
  388. package/src/utils/context/superAdminOverride.ts +58 -0
  389. package/src/utils/file-reference/index.ts +61 -33
  390. package/src/utils/google-places/googlePlacesUtils.test.ts +98 -0
  391. package/src/utils/google-places/loadGoogleMapsScript.test.ts +83 -0
  392. package/src/utils/storage/helpers.test.ts +1 -1
  393. package/src/utils/storage/helpers.ts +38 -19
  394. package/src/utils/storage/types.ts +15 -8
  395. package/src/utils/validation/__tests__/csrf.test.ts +105 -0
  396. package/src/utils/validation/__tests__/sqlInjectionProtection.test.ts +92 -0
  397. package/src/vite-env.d.ts +2 -2
  398. package/dist/chunk-3GOZZZYH.js.map +0 -1
  399. package/dist/chunk-DDM4CCYT.js.map +0 -1
  400. package/dist/chunk-E7UAOUMY.js +0 -75
  401. package/dist/chunk-E7UAOUMY.js.map +0 -1
  402. package/dist/chunk-F2IMUDXZ.js.map +0 -1
  403. package/dist/chunk-HEHYGYOX.js.map +0 -1
  404. package/dist/chunk-IM4QE42D.js.map +0 -1
  405. package/dist/chunk-MX64ZF6I.js.map +0 -1
  406. package/dist/chunk-SAUPYVLF.js.map +0 -1
  407. package/dist/chunk-THRPYOFK.js.map +0 -1
  408. package/dist/chunk-UCQSRW7Z.js.map +0 -1
  409. package/dist/chunk-VGZZXKBR.js.map +0 -1
  410. package/dist/chunk-YGPFYGA6.js.map +0 -1
  411. package/dist/chunk-YHCN776L.js.map +0 -1
  412. package/src/hooks/__tests__/usePermissionCache.simple.test.ts +0 -192
  413. package/src/hooks/__tests__/usePermissionCache.unit.test.ts +0 -741
  414. package/src/hooks/__tests__/usePublicEvent.simple.test.ts +0 -703
  415. package/src/rbac/hooks/useRBAC.simple.test.ts +0 -95
  416. package/src/rbac/utils/__tests__/eventContext.unit.test.ts +0 -428
  417. /package/dist/{DataTable-GUFUNZ3N.js.map → DataTable-ON3IXISJ.js.map} +0 -0
  418. /package/dist/{UnifiedAuthProvider-643PUAIM.js.map → UnifiedAuthProvider-X5NXANVI.js.map} +0 -0
  419. /package/dist/{api-YP7XD5L6.js.map → api-I6UCQ5S6.js.map} +0 -0
  420. /package/dist/{chunk-HESYZWZW.js.map → chunk-QWWZ5CAQ.js.map} +0 -0
@@ -1,6 +1,6 @@
1
- [@jmruthers/pace-core - v0.5.189](README.md) / Exports
1
+ [@jmruthers/pace-core - v0.5.190](README.md) / Exports
2
2
 
3
- # @jmruthers/pace-core - v0.5.189
3
+ # @jmruthers/pace-core - v0.5.190
4
4
 
5
5
  **`File`**
6
6
 
@@ -443,6 +443,7 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
443
443
  - [useResourcePermissions](modules.md#useresourcepermissions)
444
444
  - [useRoleManagement](modules.md#userolemanagement)
445
445
  - [useSecureSupabase](modules.md#usesecuresupabase)
446
+ - [useSuperAdminBypass](modules.md#usesuperadminbypass)
446
447
  - [enablePerformanceMonitoring](modules.md#enableperformancemonitoring)
447
448
  - [disablePerformanceMonitoring](modules.md#disableperformancemonitoring)
448
449
  - [isPerformanceMonitoringEnabled](modules.md#isperformancemonitoringenabled)
@@ -586,7 +587,7 @@ ___
586
587
 
587
588
  #### Defined in
588
589
 
589
- [packages/core/src/hooks/useFileReference.ts:430](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useFileReference.ts#L430)
590
+ [packages/core/src/hooks/useFileReference.ts:475](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useFileReference.ts#L475)
590
591
 
591
592
  ___
592
593
 
@@ -612,7 +613,7 @@ ___
612
613
 
613
614
  #### Defined in
614
615
 
615
- [packages/core/src/hooks/useFileReference.ts:436](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useFileReference.ts#L436)
616
+ [packages/core/src/hooks/useFileReference.ts:481](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useFileReference.ts#L481)
616
617
 
617
618
  ___
618
619
 
@@ -640,7 +641,7 @@ ___
640
641
 
641
642
  #### Defined in
642
643
 
643
- [packages/core/src/hooks/useFileReference.ts:450](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useFileReference.ts#L450)
644
+ [packages/core/src/hooks/useFileReference.ts:495](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useFileReference.ts#L495)
644
645
 
645
646
  ___
646
647
 
@@ -1274,7 +1275,7 @@ JSX.Element - The rendered address field
1274
1275
 
1275
1276
  #### Defined in
1276
1277
 
1277
- [packages/core/src/components/AddressField/AddressField.tsx:49](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/AddressField/AddressField.tsx#L49)
1278
+ [packages/core/src/components/AddressField/AddressField.tsx:56](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/AddressField/AddressField.tsx#L56)
1278
1279
 
1279
1280
  ___
1280
1281
 
@@ -1286,7 +1287,7 @@ ___
1286
1287
 
1287
1288
  | Name | Type |
1288
1289
  | :------ | :------ |
1289
- | `props` | `HTMLAttributes`\<`HTMLDivElement`\> & \{ `variant?`: ``"default"`` \| ``"inline"`` \| ``"destructive"`` } & `RefAttributes`\<`HTMLDivElement`\> |
1290
+ | `props` | `HTMLAttributes`\<`HTMLElement`\> & \{ `variant?`: ``"default"`` \| ``"inline"`` \| ``"destructive"`` } & `RefAttributes`\<`HTMLElement`\> |
1290
1291
 
1291
1292
  #### Returns
1292
1293
 
@@ -1294,7 +1295,7 @@ ___
1294
1295
 
1295
1296
  #### Defined in
1296
1297
 
1297
- [packages/core/src/components/Alert/Alert.tsx:67](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Alert/Alert.tsx#L67)
1298
+ [packages/core/src/components/Alert/Alert.tsx:69](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Alert/Alert.tsx#L69)
1298
1299
 
1299
1300
  ___
1300
1301
 
@@ -1314,7 +1315,7 @@ ___
1314
1315
 
1315
1316
  #### Defined in
1316
1317
 
1317
- [packages/core/src/components/Alert/Alert.tsx:94](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Alert/Alert.tsx#L94)
1318
+ [packages/core/src/components/Alert/Alert.tsx:96](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Alert/Alert.tsx#L96)
1318
1319
 
1319
1320
  ___
1320
1321
 
@@ -1334,7 +1335,7 @@ ___
1334
1335
 
1335
1336
  #### Defined in
1336
1337
 
1337
- [packages/core/src/components/Alert/Alert.tsx:114](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Alert/Alert.tsx#L114)
1338
+ [packages/core/src/components/Alert/Alert.tsx:116](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Alert/Alert.tsx#L116)
1338
1339
 
1339
1340
  ___
1340
1341
 
@@ -1449,11 +1450,20 @@ Calendar component
1449
1450
  A flexible, accessible calendar component for date selection.
1450
1451
  Built on react-day-picker with pace-core styling.
1451
1452
 
1453
+ Defaults to Australian locale (en-AU) with Monday as the first day of the week.
1454
+ The locale can be overridden by passing a `locale` prop.
1455
+
1456
+ Month navigation is automatically managed internally when `month` and `onMonthChange` props
1457
+ are not provided. The displayed month will sync with the selected date when available,
1458
+ or default to the current month. Navigation buttons (prev/next) work automatically.
1459
+
1460
+ For controlled month state, pass `month` and `onMonthChange` props.
1461
+
1452
1462
  #### Parameters
1453
1463
 
1454
1464
  | Name | Type | Description |
1455
1465
  | :------ | :------ | :------ |
1456
- | `props` | [`CalendarProps`](interfaces/CalendarProps.md) & `RefAttributes`\<`HTMLDivElement`\> | Calendar configuration and styling |
1466
+ | `props` | [`CalendarProps`](interfaces/CalendarProps.md) & `RefAttributes`\<`HTMLTableElement`\> | Calendar configuration and styling |
1457
1467
 
1458
1468
  #### Returns
1459
1469
 
@@ -1464,7 +1474,7 @@ JSX.Element - The rendered calendar element
1464
1474
  **`Example`**
1465
1475
 
1466
1476
  ```tsx
1467
- // Single date selection
1477
+ // Single date selection (uses default Australian locale)
1468
1478
  <Calendar
1469
1479
  mode="single"
1470
1480
  selected={date}
@@ -1478,11 +1488,30 @@ JSX.Element - The rendered calendar element
1478
1488
  onSelect={setDate}
1479
1489
  disabled={(date) => date < new Date()}
1480
1490
  />
1491
+
1492
+ // Override locale (e.g., US locale with Sunday as first day)
1493
+ import { enUS } from 'date-fns/locale';
1494
+ <Calendar
1495
+ mode="single"
1496
+ selected={date}
1497
+ onSelect={setDate}
1498
+ locale={enUS}
1499
+ />
1500
+
1501
+ // Controlled month state (optional - month is auto-managed if not provided)
1502
+ const [month, setMonth] = useState(new Date());
1503
+ <Calendar
1504
+ mode="single"
1505
+ selected={date}
1506
+ onSelect={setDate}
1507
+ month={month}
1508
+ onMonthChange={setMonth}
1509
+ />
1481
1510
  ```
1482
1511
 
1483
1512
  #### Defined in
1484
1513
 
1485
- [packages/core/src/components/Calendar/Calendar.tsx:111](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Calendar/Calendar.tsx#L111)
1514
+ [packages/core/src/components/Calendar/Calendar.tsx:188](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Calendar/Calendar.tsx#L188)
1486
1515
 
1487
1516
  ___
1488
1517
 
@@ -1562,7 +1591,7 @@ ___
1562
1591
 
1563
1592
  #### Defined in
1564
1593
 
1565
- [packages/core/src/components/Card/Card.tsx:215](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Card/Card.tsx#L215)
1594
+ [packages/core/src/components/Card/Card.tsx:212](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Card/Card.tsx#L212)
1566
1595
 
1567
1596
  ___
1568
1597
 
@@ -1582,7 +1611,7 @@ ___
1582
1611
 
1583
1612
  #### Defined in
1584
1613
 
1585
- [packages/core/src/components/Card/Card.tsx:227](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Card/Card.tsx#L227)
1614
+ [packages/core/src/components/Card/Card.tsx:224](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Card/Card.tsx#L224)
1586
1615
 
1587
1616
  ___
1588
1617
 
@@ -1602,7 +1631,7 @@ ___
1602
1631
 
1603
1632
  #### Defined in
1604
1633
 
1605
- [packages/core/src/components/Card/Card.tsx:239](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Card/Card.tsx#L239)
1634
+ [packages/core/src/components/Card/Card.tsx:236](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Card/Card.tsx#L236)
1606
1635
 
1607
1636
  ___
1608
1637
 
@@ -1622,7 +1651,7 @@ ___
1622
1651
 
1623
1652
  #### Defined in
1624
1653
 
1625
- [packages/core/src/components/Card/Card.tsx:251](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Card/Card.tsx#L251)
1654
+ [packages/core/src/components/Card/Card.tsx:248](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Card/Card.tsx#L248)
1626
1655
 
1627
1656
  ___
1628
1657
 
@@ -2464,7 +2493,7 @@ React element with file display
2464
2493
 
2465
2494
  #### Defined in
2466
2495
 
2467
- [packages/core/src/components/FileDisplay/FileDisplay.tsx:797](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L797)
2496
+ [packages/core/src/components/FileDisplay/FileDisplay.tsx:900](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L900)
2468
2497
 
2469
2498
  ___
2470
2499
 
@@ -2484,7 +2513,7 @@ ___
2484
2513
 
2485
2514
  #### Defined in
2486
2515
 
2487
- [packages/core/src/components/FileUpload/FileUpload.tsx:49](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileUpload/FileUpload.tsx#L49)
2516
+ [packages/core/src/components/FileUpload/FileUpload.tsx:50](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileUpload/FileUpload.tsx#L50)
2488
2517
 
2489
2518
  ___
2490
2519
 
@@ -2765,7 +2794,7 @@ function MinimalHeader() {
2765
2794
 
2766
2795
  #### Defined in
2767
2796
 
2768
- [packages/core/src/components/Header/Header.tsx:240](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Header/Header.tsx#L240)
2797
+ [packages/core/src/components/Header/Header.tsx:241](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Header/Header.tsx#L241)
2769
2798
 
2770
2799
  ___
2771
2800
 
@@ -3422,13 +3451,13 @@ ___
3422
3451
  ▸ **Progress**(`props`): `ReactNode`
3423
3452
 
3424
3453
  Progress component
3425
- An accessible progress bar with smooth animations
3454
+ An accessible progress bar with smooth animations using native HTML `<progress>` element
3426
3455
 
3427
3456
  #### Parameters
3428
3457
 
3429
3458
  | Name | Type | Description |
3430
3459
  | :------ | :------ | :------ |
3431
- | `props` | [`ProgressProps`](interfaces/ProgressProps.md) & `RefAttributes`\<`HTMLDivElement`\> | Progress configuration and styling |
3460
+ | `props` | [`ProgressProps`](interfaces/ProgressProps.md) & `RefAttributes`\<`HTMLProgressElement`\> | Progress configuration and styling |
3432
3461
 
3433
3462
  #### Returns
3434
3463
 
@@ -3595,7 +3624,7 @@ Public page context with environment variables
3595
3624
 
3596
3625
  #### Defined in
3597
3626
 
3598
- [packages/core/src/components/PublicLayout/PublicPageProvider.tsx:131](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageProvider.tsx#L131)
3627
+ [packages/core/src/components/PublicLayout/PublicPageProvider.tsx:133](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageProvider.tsx#L133)
3599
3628
 
3600
3629
  ___
3601
3630
 
@@ -3613,7 +3642,7 @@ True if we're in a public page context
3613
3642
 
3614
3643
  #### Defined in
3615
3644
 
3616
- [packages/core/src/components/PublicLayout/PublicPageProvider.tsx:146](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageProvider.tsx#L146)
3645
+ [packages/core/src/components/PublicLayout/PublicPageProvider.tsx:148](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageProvider.tsx#L148)
3617
3646
 
3618
3647
  ___
3619
3648
 
@@ -4758,7 +4787,7 @@ Useful for testing or when you need to force refresh all data
4758
4787
 
4759
4788
  #### Defined in
4760
4789
 
4761
- [packages/core/src/hooks/public/usePublicFileDisplay.ts:396](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L396)
4790
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:482](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L482)
4762
4791
 
4763
4792
  ___
4764
4793
 
@@ -4779,7 +4808,7 @@ Get cache statistics for debugging
4779
4808
 
4780
4809
  #### Defined in
4781
4810
 
4782
- [packages/core/src/hooks/public/usePublicFileDisplay.ts:407](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L407)
4811
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:493](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L493)
4783
4812
 
4784
4813
  ___
4785
4814
 
@@ -5094,7 +5123,7 @@ ___
5094
5123
 
5095
5124
  #### Defined in
5096
5125
 
5097
- [packages/core/src/hooks/useFileReference.ts:19](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useFileReference.ts#L19)
5126
+ [packages/core/src/hooks/useFileReference.ts:62](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useFileReference.ts#L62)
5098
5127
 
5099
5128
  ___
5100
5129
 
@@ -5133,7 +5162,7 @@ ___
5133
5162
 
5134
5163
  #### Defined in
5135
5164
 
5136
- [packages/core/src/hooks/useFileReference.ts:202](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useFileReference.ts#L202)
5165
+ [packages/core/src/hooks/useFileReference.ts:245](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useFileReference.ts#L245)
5137
5166
 
5138
5167
  ___
5139
5168
 
@@ -5166,7 +5195,7 @@ Hook for getting a file reference by ID
5166
5195
 
5167
5196
  #### Defined in
5168
5197
 
5169
- [packages/core/src/hooks/useFileReference.ts:304](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useFileReference.ts#L304)
5198
+ [packages/core/src/hooks/useFileReference.ts:349](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useFileReference.ts#L349)
5170
5199
 
5171
5200
  ___
5172
5201
 
@@ -5210,7 +5239,7 @@ For more control, use useFileReference() directly and manage URLs yourself.
5210
5239
 
5211
5240
  #### Defined in
5212
5241
 
5213
- [packages/core/src/hooks/useFileReference.ts:377](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useFileReference.ts#L377)
5242
+ [packages/core/src/hooks/useFileReference.ts:422](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useFileReference.ts#L422)
5214
5243
 
5215
5244
  ___
5216
5245
 
@@ -5540,7 +5569,7 @@ ___
5540
5569
 
5541
5570
  #### Defined in
5542
5571
 
5543
- [packages/core/src/providers/services/UnifiedAuthProvider.tsx:119](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/providers/services/UnifiedAuthProvider.tsx#L119)
5572
+ [packages/core/src/providers/services/UnifiedAuthProvider.tsx:120](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/providers/services/UnifiedAuthProvider.tsx#L120)
5544
5573
 
5545
5574
  ___
5546
5575
 
@@ -5560,7 +5589,7 @@ ___
5560
5589
 
5561
5590
  #### Defined in
5562
5591
 
5563
- [packages/core/src/providers/services/UnifiedAuthProvider.tsx:590](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/providers/services/UnifiedAuthProvider.tsx#L590)
5592
+ [packages/core/src/providers/services/UnifiedAuthProvider.tsx:675](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/providers/services/UnifiedAuthProvider.tsx#L675)
5564
5593
 
5565
5594
  ___
5566
5595
 
@@ -6067,13 +6096,13 @@ Setup RBAC system
6067
6096
 
6068
6097
  #### Defined in
6069
6098
 
6070
- [packages/core/src/rbac/api.ts:44](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L44)
6099
+ [packages/core/src/rbac/api.ts:46](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L46)
6071
6100
 
6072
6101
  ___
6073
6102
 
6074
6103
  ### getAccessLevel
6075
6104
 
6076
- ▸ **getAccessLevel**(`input`): `Promise`\<[`AccessLevel`](modules.md#accesslevel)\>
6105
+ ▸ **getAccessLevel**(`input`, `appConfig?`, `appName?`): `Promise`\<[`AccessLevel`](modules.md#accesslevel)\>
6077
6106
 
6078
6107
  Get user's access level in a scope
6079
6108
 
@@ -6084,6 +6113,8 @@ Get user's access level in a scope
6084
6113
  | `input` | `Object` | Access level input |
6085
6114
  | `input.userId` | `string` | - |
6086
6115
  | `input.scope` | [`Scope`](modules.md#scope) | - |
6116
+ | `appConfig?` | ``null`` \| `AppConfig` | Optional app configuration |
6117
+ | `appName?` | `string` | Optional app name |
6087
6118
 
6088
6119
  #### Returns
6089
6120
 
@@ -6102,13 +6133,13 @@ const accessLevel = await getAccessLevel({
6102
6133
 
6103
6134
  #### Defined in
6104
6135
 
6105
- [packages/core/src/rbac/api.ts:121](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L121)
6136
+ [packages/core/src/rbac/api.ts:125](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L125)
6106
6137
 
6107
6138
  ___
6108
6139
 
6109
6140
  ### getPermissionMap
6110
6141
 
6111
- ▸ **getPermissionMap**(`input`): `Promise`\<[`PermissionMap`](modules.md#permissionmap)\>
6142
+ ▸ **getPermissionMap**(`input`, `appConfig?`, `appName?`): `Promise`\<[`PermissionMap`](modules.md#permissionmap)\>
6112
6143
 
6113
6144
  Get user's permission map for a scope
6114
6145
 
@@ -6119,6 +6150,8 @@ Get user's permission map for a scope
6119
6150
  | `input` | `Object` | Permission map input |
6120
6151
  | `input.userId` | `string` | - |
6121
6152
  | `input.scope` | [`Scope`](modules.md#scope) | - |
6153
+ | `appConfig?` | ``null`` \| `AppConfig` | Optional app configuration |
6154
+ | `appName?` | `string` | Optional app name |
6122
6155
 
6123
6156
  #### Returns
6124
6157
 
@@ -6141,7 +6174,7 @@ const permissions = await getPermissionMap({
6141
6174
 
6142
6175
  #### Defined in
6143
6176
 
6144
- [packages/core/src/rbac/api.ts:147](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L147)
6177
+ [packages/core/src/rbac/api.ts:188](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L188)
6145
6178
 
6146
6179
  ___
6147
6180
 
@@ -6163,13 +6196,13 @@ ___
6163
6196
 
6164
6197
  #### Defined in
6165
6198
 
6166
- [packages/core/src/rbac/api.ts:155](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L155)
6199
+ [packages/core/src/rbac/api.ts:225](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L225)
6167
6200
 
6168
6201
  ___
6169
6202
 
6170
6203
  ### getRoleContext
6171
6204
 
6172
- ▸ **getRoleContext**(`input`): `Promise`\<`RBACRoleContext`\>
6205
+ ▸ **getRoleContext**(`input`, `appConfig?`, `appName?`): `Promise`\<`RBACRoleContext`\>
6173
6206
 
6174
6207
  #### Parameters
6175
6208
 
@@ -6178,6 +6211,8 @@ ___
6178
6211
  | `input` | `Object` |
6179
6212
  | `input.userId` | `string` |
6180
6213
  | `input.scope` | [`Scope`](modules.md#scope) |
6214
+ | `appConfig?` | ``null`` \| `AppConfig` |
6215
+ | `appName?` | `string` |
6181
6216
 
6182
6217
  #### Returns
6183
6218
 
@@ -6185,13 +6220,13 @@ ___
6185
6220
 
6186
6221
  #### Defined in
6187
6222
 
6188
- [packages/core/src/rbac/api.ts:163](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L163)
6223
+ [packages/core/src/rbac/api.ts:233](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L233)
6189
6224
 
6190
6225
  ___
6191
6226
 
6192
6227
  ### isPermitted
6193
6228
 
6194
- ▸ **isPermitted**(`input`): `Promise`\<`boolean`\>
6229
+ ▸ **isPermitted**(`input`, `appConfig?`, `appName?`): `Promise`\<`boolean`\>
6195
6230
 
6196
6231
  Check if user has a specific permission
6197
6232
 
@@ -6200,6 +6235,8 @@ Check if user has a specific permission
6200
6235
  | Name | Type | Description |
6201
6236
  | :------ | :------ | :------ |
6202
6237
  | `input` | [`PermissionCheck`](modules.md#permissioncheck) | Permission check input |
6238
+ | `appConfig?` | ``null`` \| `AppConfig` | Optional app configuration (if not provided, will be fetched) |
6239
+ | `appName?` | `string` | Optional app name (for PORTAL/ADMIN special case and config lookup) |
6203
6240
 
6204
6241
  #### Returns
6205
6242
 
@@ -6220,13 +6257,13 @@ const canManage = await isPermitted({
6220
6257
 
6221
6258
  #### Defined in
6222
6259
 
6223
- [packages/core/src/rbac/api.ts:187](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L187)
6260
+ [packages/core/src/rbac/api.ts:288](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L288)
6224
6261
 
6225
6262
  ___
6226
6263
 
6227
6264
  ### isPermittedCached
6228
6265
 
6229
- ▸ **isPermittedCached**(`input`): `Promise`\<`boolean`\>
6266
+ ▸ **isPermittedCached**(`input`, `appConfig?`, `appName?`): `Promise`\<`boolean`\>
6230
6267
 
6231
6268
  Check if user has a specific permission (cached version)
6232
6269
 
@@ -6238,6 +6275,8 @@ and checks cache before making new requests. Uses session cache for page-level c
6238
6275
  | Name | Type | Description |
6239
6276
  | :------ | :------ | :------ |
6240
6277
  | `input` | [`PermissionCheck`](modules.md#permissioncheck) | Permission check input |
6278
+ | `appConfig?` | ``null`` \| `AppConfig` | Optional app configuration |
6279
+ | `appName?` | `string` | Optional app name |
6241
6280
 
6242
6281
  #### Returns
6243
6282
 
@@ -6247,7 +6286,7 @@ Promise resolving to permission result
6247
6286
 
6248
6287
  #### Defined in
6249
6288
 
6250
- [packages/core/src/rbac/api.ts:216](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L216)
6289
+ [packages/core/src/rbac/api.ts:363](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L363)
6251
6290
 
6252
6291
  ___
6253
6292
 
@@ -6271,7 +6310,7 @@ Promise<boolean> - True if user has permission
6271
6310
 
6272
6311
  #### Defined in
6273
6312
 
6274
- [packages/core/src/rbac/api.ts:255](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L255)
6313
+ [packages/core/src/rbac/api.ts:406](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L406)
6275
6314
 
6276
6315
  ___
6277
6316
 
@@ -6299,7 +6338,7 @@ Promise resolving to true if user has any permission
6299
6338
 
6300
6339
  #### Defined in
6301
6340
 
6302
- [packages/core/src/rbac/api.ts:265](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L265)
6341
+ [packages/core/src/rbac/api.ts:416](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L416)
6303
6342
 
6304
6343
  ___
6305
6344
 
@@ -6327,7 +6366,7 @@ Promise resolving to true if user has all permissions
6327
6366
 
6328
6367
  #### Defined in
6329
6368
 
6330
- [packages/core/src/rbac/api.ts:293](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L293)
6369
+ [packages/core/src/rbac/api.ts:444](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/api.ts#L444)
6331
6370
 
6332
6371
  ___
6333
6372
 
@@ -6713,7 +6752,7 @@ React element with navigation permission context
6713
6752
 
6714
6753
  #### Defined in
6715
6754
 
6716
- [packages/core/src/rbac/components/NavigationProvider.tsx:167](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/NavigationProvider.tsx#L167)
6755
+ [packages/core/src/rbac/components/NavigationProvider.tsx:168](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/NavigationProvider.tsx#L168)
6717
6756
 
6718
6757
  ___
6719
6758
 
@@ -6735,7 +6774,7 @@ Error if used outside of NavigationProvider
6735
6774
 
6736
6775
  #### Defined in
6737
6776
 
6738
- [packages/core/src/rbac/components/NavigationProvider.tsx:331](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/NavigationProvider.tsx#L331)
6777
+ [packages/core/src/rbac/components/NavigationProvider.tsx:333](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/NavigationProvider.tsx#L333)
6739
6778
 
6740
6779
  ___
6741
6780
 
@@ -6755,7 +6794,7 @@ ___
6755
6794
 
6756
6795
  #### Defined in
6757
6796
 
6758
- [packages/core/src/rbac/components/PagePermissionGuard.tsx:499](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/PagePermissionGuard.tsx#L499)
6797
+ [packages/core/src/rbac/components/PagePermissionGuard.tsx:373](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/PagePermissionGuard.tsx#L373)
6759
6798
 
6760
6799
  ___
6761
6800
 
@@ -6782,7 +6821,7 @@ React element with page permission context
6782
6821
 
6783
6822
  #### Defined in
6784
6823
 
6785
- [packages/core/src/rbac/components/PagePermissionProvider.tsx:128](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/PagePermissionProvider.tsx#L128)
6824
+ [packages/core/src/rbac/components/PagePermissionProvider.tsx:129](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/PagePermissionProvider.tsx#L129)
6786
6825
 
6787
6826
  ___
6788
6827
 
@@ -6804,7 +6843,7 @@ Error if used outside of PagePermissionProvider
6804
6843
 
6805
6844
  #### Defined in
6806
6845
 
6807
- [packages/core/src/rbac/components/PagePermissionProvider.tsx:267](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/PagePermissionProvider.tsx#L267)
6846
+ [packages/core/src/rbac/components/PagePermissionProvider.tsx:269](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/PagePermissionProvider.tsx#L269)
6808
6847
 
6809
6848
  ___
6810
6849
 
@@ -6859,7 +6898,7 @@ React element with role-based routing
6859
6898
 
6860
6899
  #### Defined in
6861
6900
 
6862
- [packages/core/src/rbac/components/RoleBasedRouter.tsx:182](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/RoleBasedRouter.tsx#L182)
6901
+ [packages/core/src/rbac/components/RoleBasedRouter.tsx:183](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/RoleBasedRouter.tsx#L183)
6863
6902
 
6864
6903
  ___
6865
6904
 
@@ -6881,7 +6920,7 @@ Error if used outside of RoleBasedRouter
6881
6920
 
6882
6921
  #### Defined in
6883
6922
 
6884
- [packages/core/src/rbac/components/RoleBasedRouter.tsx:397](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/RoleBasedRouter.tsx#L397)
6923
+ [packages/core/src/rbac/components/RoleBasedRouter.tsx:399](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/RoleBasedRouter.tsx#L399)
6885
6924
 
6886
6925
  ___
6887
6926
 
@@ -6908,7 +6947,7 @@ React element with secure data context
6908
6947
 
6909
6948
  #### Defined in
6910
6949
 
6911
- [packages/core/src/rbac/components/SecureDataProvider.tsx:136](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/SecureDataProvider.tsx#L136)
6950
+ [packages/core/src/rbac/components/SecureDataProvider.tsx:137](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/SecureDataProvider.tsx#L137)
6912
6951
 
6913
6952
  ___
6914
6953
 
@@ -6930,7 +6969,7 @@ Error if used outside of SecureDataProvider
6930
6969
 
6931
6970
  #### Defined in
6932
6971
 
6933
- [packages/core/src/rbac/components/SecureDataProvider.tsx:313](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/SecureDataProvider.tsx#L313)
6972
+ [packages/core/src/rbac/components/SecureDataProvider.tsx:315](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/SecureDataProvider.tsx#L315)
6934
6973
 
6935
6974
  ___
6936
6975
 
@@ -7031,7 +7070,7 @@ RBACEngine instance
7031
7070
 
7032
7071
  #### Defined in
7033
7072
 
7034
- [packages/core/src/rbac/engine.ts:602](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/engine.ts#L602)
7073
+ [packages/core/src/rbac/engine.ts:604](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/engine.ts#L604)
7035
7074
 
7036
7075
  ___
7037
7076
 
@@ -7091,13 +7130,13 @@ function MyComponent() {
7091
7130
 
7092
7131
  #### Defined in
7093
7132
 
7094
- [packages/core/src/rbac/hooks/usePermissions.ts:58](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/usePermissions.ts#L58)
7133
+ [packages/core/src/rbac/hooks/usePermissions.ts:60](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/usePermissions.ts#L60)
7095
7134
 
7096
7135
  ___
7097
7136
 
7098
7137
  ### useCan
7099
7138
 
7100
- ▸ **useCan**(`userId`, `scope`, `permission`, `pageId?`, `useCache?`): `Object`
7139
+ ▸ **useCan**(`userId`, `scope`, `permission`, `pageId?`, `useCache?`, `appName?`): `Object`
7101
7140
 
7102
7141
  Hook to check if user can perform an action
7103
7142
 
@@ -7110,6 +7149,7 @@ Hook to check if user can perform an action
7110
7149
  | `permission` | \`create:$\{string}\` \| \`update:$\{string}\` \| \`read:$\{string}\` \| \`delete:$\{string}\` | `undefined` | Permission to check |
7111
7150
  | `pageId?` | `string` | `undefined` | Optional page ID |
7112
7151
  | `useCache` | `boolean` | `true` | Whether to use cached results |
7152
+ | `appName?` | `string` | `undefined` | Optional app name (for PORTAL/ADMIN special case) |
7113
7153
 
7114
7154
  #### Returns
7115
7155
 
@@ -7139,7 +7179,7 @@ function MyComponent() {
7139
7179
 
7140
7180
  #### Defined in
7141
7181
 
7142
- [packages/core/src/rbac/hooks/usePermissions.ts:300](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/usePermissions.ts#L300)
7182
+ [packages/core/src/rbac/hooks/usePermissions.ts:305](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/usePermissions.ts#L305)
7143
7183
 
7144
7184
  ___
7145
7185
 
@@ -7189,7 +7229,7 @@ function MyComponent() {
7189
7229
 
7190
7230
  #### Defined in
7191
7231
 
7192
- [packages/core/src/rbac/hooks/usePermissions.ts:511](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/usePermissions.ts#L511)
7232
+ [packages/core/src/rbac/hooks/usePermissions.ts:547](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/usePermissions.ts#L547)
7193
7233
 
7194
7234
  ___
7195
7235
 
@@ -7246,7 +7286,7 @@ function MyComponent() {
7246
7286
 
7247
7287
  #### Defined in
7248
7288
 
7249
- [packages/core/src/rbac/hooks/usePermissions.ts:586](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/usePermissions.ts#L586)
7289
+ [packages/core/src/rbac/hooks/usePermissions.ts:653](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/usePermissions.ts#L653)
7250
7290
 
7251
7291
  ___
7252
7292
 
@@ -7297,7 +7337,7 @@ function MyComponent() {
7297
7337
 
7298
7338
  #### Defined in
7299
7339
 
7300
- [packages/core/src/rbac/hooks/usePermissions.ts:669](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/usePermissions.ts#L669)
7340
+ [packages/core/src/rbac/hooks/usePermissions.ts:736](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/usePermissions.ts#L736)
7301
7341
 
7302
7342
  ___
7303
7343
 
@@ -7348,7 +7388,7 @@ function MyComponent() {
7348
7388
 
7349
7389
  #### Defined in
7350
7390
 
7351
- [packages/core/src/rbac/hooks/usePermissions.ts:755](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/usePermissions.ts#L755)
7391
+ [packages/core/src/rbac/hooks/usePermissions.ts:822](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/usePermissions.ts#L822)
7352
7392
 
7353
7393
  ___
7354
7394
 
@@ -7399,7 +7439,7 @@ function MyComponent() {
7399
7439
 
7400
7440
  #### Defined in
7401
7441
 
7402
- [packages/core/src/rbac/hooks/usePermissions.ts:840](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/usePermissions.ts#L840)
7442
+ [packages/core/src/rbac/hooks/usePermissions.ts:907](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/usePermissions.ts#L907)
7403
7443
 
7404
7444
  ___
7405
7445
 
@@ -7419,7 +7459,7 @@ ___
7419
7459
 
7420
7460
  #### Defined in
7421
7461
 
7422
- [packages/core/src/rbac/hooks/useRBAC.ts:51](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/useRBAC.ts#L51)
7462
+ [packages/core/src/rbac/hooks/useRBAC.ts:52](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/useRBAC.ts#L52)
7423
7463
 
7424
7464
  ___
7425
7465
 
@@ -7462,7 +7502,7 @@ const permission = useCan(userId, resolvedScope, permission);
7462
7502
 
7463
7503
  #### Defined in
7464
7504
 
7465
- [packages/core/src/rbac/hooks/useResolvedScope.ts:64](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/useResolvedScope.ts#L64)
7505
+ [packages/core/src/rbac/hooks/useResolvedScope.ts:75](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/useResolvedScope.ts#L75)
7466
7506
 
7467
7507
  ___
7468
7508
 
@@ -7609,7 +7649,21 @@ function MyComponent() {
7609
7649
 
7610
7650
  #### Defined in
7611
7651
 
7612
- [packages/core/src/rbac/hooks/useSecureSupabase.ts:205](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/useSecureSupabase.ts#L205)
7652
+ [packages/core/src/rbac/hooks/useSecureSupabase.ts:208](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/useSecureSupabase.ts#L208)
7653
+
7654
+ ___
7655
+
7656
+ ### useSuperAdminBypass
7657
+
7658
+ ▸ **useSuperAdminBypass**(): `SuperAdminBypassState`
7659
+
7660
+ #### Returns
7661
+
7662
+ `SuperAdminBypassState`
7663
+
7664
+ #### Defined in
7665
+
7666
+ [packages/core/src/rbac/hooks/useSuperAdminBypass.ts:38](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/hooks/useSuperAdminBypass.ts#L38)
7613
7667
 
7614
7668
  ___
7615
7669
 
@@ -7854,19 +7908,20 @@ ___
7854
7908
 
7855
7909
  ### createSecureClient
7856
7910
 
7857
- ▸ **createSecureClient**(`supabaseUrl`, `supabaseKey`, `organisationId`, `eventId?`, `appId?`): [`SecureSupabaseClient`](classes/SecureSupabaseClient.md)
7911
+ ▸ **createSecureClient**(`supabaseUrl`, `supabaseKey`, `organisationId`, `eventId?`, `appId?`, `isSuperAdmin?`): [`SecureSupabaseClient`](classes/SecureSupabaseClient.md)
7858
7912
 
7859
7913
  Create a secure Supabase client with organisation context
7860
7914
 
7861
7915
  #### Parameters
7862
7916
 
7863
- | Name | Type | Description |
7864
- | :------ | :------ | :------ |
7865
- | `supabaseUrl` | `string` | Supabase project URL |
7866
- | `supabaseKey` | `string` | Supabase publishable key or anon key (accepts both legacy anon keys and modern publishable keys) |
7867
- | `organisationId` | `string` | Required organisation ID |
7868
- | `eventId?` | `string` | Optional event ID |
7869
- | `appId?` | `string` | Optional app ID |
7917
+ | Name | Type | Default value | Description |
7918
+ | :------ | :------ | :------ | :------ |
7919
+ | `supabaseUrl` | `string` | `undefined` | Supabase project URL |
7920
+ | `supabaseKey` | `string` | `undefined` | Supabase publishable key or anon key (accepts both legacy anon keys and modern publishable keys) |
7921
+ | `organisationId` | `string` | `undefined` | Required organisation ID |
7922
+ | `eventId?` | `string` | `undefined` | Optional event ID |
7923
+ | `appId?` | `string` | `undefined` | Optional app ID |
7924
+ | `isSuperAdmin` | `boolean` | `false` | Optional super admin flag (defaults to false) |
7870
7925
 
7871
7926
  #### Returns
7872
7927
 
@@ -7882,13 +7937,14 @@ const client = createSecureClient(
7882
7937
  'your-publishable-key-or-anon-key',
7883
7938
  'org-123',
7884
7939
  'event-456',
7885
- 'app-789'
7940
+ 'app-789',
7941
+ false // isSuperAdmin
7886
7942
  );
7887
7943
  ```
7888
7944
 
7889
7945
  #### Defined in
7890
7946
 
7891
- [packages/core/src/rbac/secureClient.ts:265](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L265)
7947
+ [packages/core/src/rbac/secureClient.ts:324](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L324)
7892
7948
 
7893
7949
  ___
7894
7950
 
@@ -7915,7 +7971,7 @@ SecureSupabaseClient instance
7915
7971
 
7916
7972
  #### Defined in
7917
7973
 
7918
- [packages/core/src/rbac/secureClient.ts:284](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L284)
7974
+ [packages/core/src/rbac/secureClient.ts:344](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L344)
7919
7975
 
7920
7976
  ___
7921
7977
 
@@ -8513,7 +8569,9 @@ ___
8513
8569
 
8514
8570
  ▸ **generateFilePath**(`options`, `fileName`): `string`
8515
8571
 
8516
- Generate a file path based on organization-first structure
8572
+ Generate a file path based on organization-first or user-first structure
8573
+ - If orgId is provided: {orgId}/{folder}/filename
8574
+ - If userId is provided (and orgId is not): users/{userId}/{folder}/filename
8517
8575
 
8518
8576
  #### Parameters
8519
8577
 
@@ -8528,7 +8586,7 @@ Generate a file path based on organization-first structure
8528
8586
 
8529
8587
  #### Defined in
8530
8588
 
8531
- [packages/core/src/utils/storage/helpers.ts:23](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L23)
8589
+ [packages/core/src/utils/storage/helpers.ts:25](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L25)
8532
8590
 
8533
8591
  ___
8534
8592
 
@@ -8551,7 +8609,7 @@ Sanitizes the original filename to remove spaces and invalid characters for stor
8551
8609
 
8552
8610
  #### Defined in
8553
8611
 
8554
- [packages/core/src/utils/storage/helpers.ts:54](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L54)
8612
+ [packages/core/src/utils/storage/helpers.ts:58](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L58)
8555
8613
 
8556
8614
  ___
8557
8615
 
@@ -8575,7 +8633,7 @@ Extract file metadata from a File object
8575
8633
 
8576
8634
  #### Defined in
8577
8635
 
8578
- [packages/core/src/utils/storage/helpers.ts:81](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L81)
8636
+ [packages/core/src/utils/storage/helpers.ts:85](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L85)
8579
8637
 
8580
8638
  ___
8581
8639
 
@@ -8599,7 +8657,7 @@ Upload a file to Supabase storage with app segregation
8599
8657
 
8600
8658
  #### Defined in
8601
8659
 
8602
- [packages/core/src/utils/storage/helpers.ts:219](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L219)
8660
+ [packages/core/src/utils/storage/helpers.ts:224](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L224)
8603
8661
 
8604
8662
  ___
8605
8663
 
@@ -8625,7 +8683,7 @@ Public URL for the file
8625
8683
 
8626
8684
  #### Defined in
8627
8685
 
8628
- [packages/core/src/utils/storage/helpers.ts:299](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L299)
8686
+ [packages/core/src/utils/storage/helpers.ts:304](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L304)
8629
8687
 
8630
8688
  ___
8631
8689
 
@@ -8652,7 +8710,7 @@ Signed URL with expiration timestamp, or null if failed
8652
8710
 
8653
8711
  #### Defined in
8654
8712
 
8655
- [packages/core/src/utils/storage/helpers.ts:395](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L395)
8713
+ [packages/core/src/utils/storage/helpers.ts:400](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L400)
8656
8714
 
8657
8715
  ___
8658
8716
 
@@ -8679,7 +8737,7 @@ Map of file ID to URL string (only includes successful URL generations)
8679
8737
 
8680
8738
  #### Defined in
8681
8739
 
8682
- [packages/core/src/utils/storage/helpers.ts:462](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L462)
8740
+ [packages/core/src/utils/storage/helpers.ts:467](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L467)
8683
8741
 
8684
8742
  ___
8685
8743
 
@@ -8705,7 +8763,7 @@ Success status and optional error message
8705
8763
 
8706
8764
  #### Defined in
8707
8765
 
8708
- [packages/core/src/utils/storage/helpers.ts:569](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L569)
8766
+ [packages/core/src/utils/storage/helpers.ts:574](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L574)
8709
8767
 
8710
8768
  ___
8711
8769
 
@@ -8730,7 +8788,7 @@ List of files with metadata
8730
8788
 
8731
8789
  #### Defined in
8732
8790
 
8733
- [packages/core/src/utils/storage/helpers.ts:603](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L603)
8791
+ [packages/core/src/utils/storage/helpers.ts:608](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L608)
8734
8792
 
8735
8793
  ___
8736
8794
 
@@ -8756,7 +8814,7 @@ File blob with metadata, or null if failed
8756
8814
 
8757
8815
  #### Defined in
8758
8816
 
8759
- [packages/core/src/utils/storage/helpers.ts:663](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L663)
8817
+ [packages/core/src/utils/storage/helpers.ts:675](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L675)
8760
8818
 
8761
8819
  ___
8762
8820
 
@@ -8774,7 +8832,8 @@ Move a file to archived location (soft delete)
8774
8832
  | `path` | `string` | File path within the bucket |
8775
8833
  | `options` | `Object` | Archive options including bucket selection via isPublic |
8776
8834
  | `options.appName` | `string` | - |
8777
- | `options.orgId` | `string` | - |
8835
+ | `options.orgId?` | `string` | - |
8836
+ | `options.userId?` | `string` | - |
8778
8837
  | `options.isPublic?` | `boolean` | - |
8779
8838
 
8780
8839
  #### Returns
@@ -8783,7 +8842,7 @@ Move a file to archived location (soft delete)
8783
8842
 
8784
8843
  #### Defined in
8785
8844
 
8786
- [packages/core/src/utils/storage/helpers.ts:716](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L716)
8845
+ [packages/core/src/utils/storage/helpers.ts:728](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L728)
8787
8846
 
8788
8847
  ___
8789
8848