@jmruthers/pace-core 0.5.188 → 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 (424) 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-DrLDztHt.d.ts → PublicPageProvider-C4uxosp6.d.ts} +129 -40
  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-UNOTYLQF.js → chunk-NIU6J6OX.js} +772 -725
  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-IPCH26AG.js → chunk-STYK4OH2.js} +11 -11
  30. package/dist/chunk-STYK4OH2.js.map +1 -0
  31. package/dist/{chunk-EFCLXK7F.js → chunk-VVBAW5A5.js} +4201 -3809
  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 -5
  38. package/dist/components.js +19 -23
  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 -12
  46. package/dist/index.js +79 -73
  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 +128 -0
  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 +155 -135
  214. package/docs/api-reference/components.md +72 -29
  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 -4
  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 +252 -226
  243. package/src/components/Avatar/Avatar.tsx +179 -53
  244. package/src/components/Avatar/index.ts +1 -1
  245. package/src/components/Button/Button.test.tsx +2 -1
  246. package/src/components/Button/Button.tsx +3 -3
  247. package/src/components/Calendar/Calendar.test.tsx +53 -37
  248. package/src/components/Calendar/Calendar.tsx +409 -82
  249. package/src/components/Card/Card.test.tsx +7 -4
  250. package/src/components/Card/Card.tsx +3 -6
  251. package/src/components/Checkbox/Checkbox.tsx +2 -2
  252. package/src/components/DataTable/components/ActionButtons.tsx +5 -5
  253. package/src/components/DataTable/components/BulkOperationsDropdown.tsx +2 -2
  254. package/src/components/DataTable/components/ColumnFilter.tsx +1 -1
  255. package/src/components/DataTable/components/ColumnVisibilityDropdown.tsx +3 -3
  256. package/src/components/DataTable/components/DataTableBody.tsx +12 -12
  257. package/src/components/DataTable/components/DataTableCore.tsx +3 -3
  258. package/src/components/DataTable/components/DataTableToolbar.tsx +5 -5
  259. package/src/components/DataTable/components/DraggableColumnHeader.tsx +3 -3
  260. package/src/components/DataTable/components/EditableRow.tsx +2 -2
  261. package/src/components/DataTable/components/EmptyState.tsx +3 -3
  262. package/src/components/DataTable/components/GroupHeader.tsx +2 -2
  263. package/src/components/DataTable/components/GroupingDropdown.tsx +1 -1
  264. package/src/components/DataTable/components/ImportModal.tsx +4 -4
  265. package/src/components/DataTable/components/LoadingState.tsx +1 -1
  266. package/src/components/DataTable/components/PaginationControls.tsx +11 -11
  267. package/src/components/DataTable/components/UnifiedTableBody.tsx +9 -9
  268. package/src/components/DataTable/components/ViewRowModal.tsx +2 -2
  269. package/src/components/DataTable/components/__tests__/AccessDeniedPage.test.tsx +11 -37
  270. package/src/components/DataTable/components/__tests__/DataTableToolbar.test.tsx +157 -0
  271. package/src/components/DataTable/components/__tests__/LoadingState.test.tsx +2 -1
  272. package/src/components/DataTable/components/__tests__/VirtualizedDataTable.test.tsx +128 -0
  273. package/src/components/DataTable/core/__tests__/ActionManager.test.ts +19 -0
  274. package/src/components/DataTable/core/__tests__/ColumnFactory.test.ts +51 -0
  275. package/src/components/DataTable/core/__tests__/ColumnManager.test.ts +84 -0
  276. package/src/components/DataTable/core/__tests__/DataManager.test.ts +14 -0
  277. package/src/components/DataTable/core/__tests__/DataTableContext.test.tsx +136 -0
  278. package/src/components/DataTable/core/__tests__/LocalDataAdapter.test.ts +16 -0
  279. package/src/components/DataTable/core/__tests__/PluginRegistry.test.ts +18 -0
  280. package/src/components/DataTable/hooks/useDataTablePermissions.ts +28 -7
  281. package/src/components/DataTable/utils/__tests__/hierarchicalUtils.test.ts +30 -1
  282. package/src/components/DataTable/utils/hierarchicalUtils.ts +38 -10
  283. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +8 -3
  284. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.tsx +4 -4
  285. package/src/components/Dialog/Dialog.tsx +2 -2
  286. package/src/components/EventSelector/EventSelector.tsx +7 -7
  287. package/src/components/FileDisplay/FileDisplay.tsx +291 -179
  288. package/src/components/FileUpload/FileUpload.tsx +7 -4
  289. package/src/components/Header/Header.test.tsx +28 -0
  290. package/src/components/Header/Header.tsx +22 -9
  291. package/src/components/InactivityWarningModal/InactivityWarningModal.tsx +2 -2
  292. package/src/components/LoadingSpinner/LoadingSpinner.test.tsx +19 -14
  293. package/src/components/LoadingSpinner/LoadingSpinner.tsx +5 -5
  294. package/src/components/NavigationMenu/NavigationMenu.test.tsx +127 -1
  295. package/src/components/OrganisationSelector/OrganisationSelector.tsx +8 -8
  296. package/src/components/PaceAppLayout/PaceAppLayout.integration.test.tsx +4 -0
  297. package/src/components/PaceAppLayout/PaceAppLayout.performance.test.tsx +3 -0
  298. package/src/components/PaceAppLayout/PaceAppLayout.security.test.tsx +3 -0
  299. package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +16 -6
  300. package/src/components/PaceAppLayout/PaceAppLayout.tsx +37 -3
  301. package/src/components/PaceAppLayout/test-setup.tsx +1 -0
  302. package/src/components/PaceLoginPage/PaceLoginPage.test.tsx +66 -45
  303. package/src/components/PaceLoginPage/PaceLoginPage.tsx +6 -4
  304. package/src/components/Progress/Progress.test.tsx +18 -19
  305. package/src/components/Progress/Progress.tsx +31 -32
  306. package/src/components/PublicLayout/PublicLayout.test.tsx +6 -6
  307. package/src/components/PublicLayout/PublicPageProvider.tsx +5 -3
  308. package/src/components/Select/Select.tsx +5 -5
  309. package/src/components/Switch/Switch.test.tsx +2 -1
  310. package/src/components/Switch/Switch.tsx +1 -1
  311. package/src/components/Toast/Toast.tsx +1 -1
  312. package/src/components/Tooltip/Tooltip.test.tsx +8 -2
  313. package/src/components/UserMenu/UserMenu.test.tsx +7 -9
  314. package/src/components/UserMenu/UserMenu.tsx +10 -8
  315. package/src/components/index.ts +2 -1
  316. package/src/eslint-rules/pace-core-compliance.cjs +0 -2
  317. package/src/eslint-rules/pace-core-compliance.js +0 -2
  318. package/src/hooks/__tests__/hooks.integration.test.tsx +4 -1
  319. package/src/hooks/__tests__/useAppConfig.unit.test.ts +76 -5
  320. package/src/hooks/__tests__/useDataTableState.test.ts +76 -0
  321. package/src/hooks/__tests__/useFileUrl.unit.test.ts +25 -69
  322. package/src/hooks/__tests__/useFileUrlCache.test.ts +129 -0
  323. package/src/hooks/__tests__/usePreventTabReload.test.ts +88 -0
  324. package/src/hooks/__tests__/{usePublicEvent.unit.test.ts → usePublicEvent.test.ts} +28 -1
  325. package/src/hooks/__tests__/useQueryCache.test.ts +144 -0
  326. package/src/hooks/__tests__/useSecureDataAccess.unit.test.tsx +58 -16
  327. package/src/hooks/index.ts +1 -1
  328. package/src/hooks/public/usePublicEvent.ts +2 -2
  329. package/src/hooks/public/usePublicFileDisplay.ts +173 -87
  330. package/src/hooks/useAppConfig.ts +24 -5
  331. package/src/hooks/useFileDisplay.ts +297 -34
  332. package/src/hooks/useFileReference.ts +56 -11
  333. package/src/hooks/useFileUrl.ts +1 -1
  334. package/src/hooks/useInactivityTracker.ts +16 -7
  335. package/src/hooks/usePermissionCache.test.ts +85 -8
  336. package/src/hooks/useQueryCache.ts +21 -0
  337. package/src/hooks/useSecureDataAccess.test.ts +80 -35
  338. package/src/hooks/useSecureDataAccess.ts +80 -37
  339. package/src/index.ts +2 -1
  340. package/src/providers/services/EventServiceProvider.tsx +37 -17
  341. package/src/providers/services/InactivityServiceProvider.tsx +4 -4
  342. package/src/providers/services/OrganisationServiceProvider.tsx +8 -1
  343. package/src/providers/services/UnifiedAuthProvider.tsx +115 -29
  344. package/src/rbac/__tests__/auth-rbac.e2e.test.tsx +451 -0
  345. package/src/rbac/__tests__/engine.comprehensive.test.ts +12 -0
  346. package/src/rbac/__tests__/rbac-engine-core-logic.test.ts +8 -0
  347. package/src/rbac/__tests__/rbac-engine-simplified.test.ts +4 -0
  348. package/src/rbac/api.ts +240 -36
  349. package/src/rbac/cache-invalidation.ts +21 -7
  350. package/src/rbac/compliance/quick-fix-suggestions.ts +1 -1
  351. package/src/rbac/components/NavigationGuard.tsx +23 -63
  352. package/src/rbac/components/NavigationProvider.test.tsx +52 -23
  353. package/src/rbac/components/NavigationProvider.tsx +13 -11
  354. package/src/rbac/components/PagePermissionGuard.tsx +77 -203
  355. package/src/rbac/components/PagePermissionProvider.tsx +13 -11
  356. package/src/rbac/components/PermissionEnforcer.tsx +24 -62
  357. package/src/rbac/components/RoleBasedRouter.tsx +14 -12
  358. package/src/rbac/components/SecureDataProvider.tsx +13 -11
  359. package/src/rbac/components/__tests__/NavigationGuard.test.tsx +104 -41
  360. package/src/rbac/components/__tests__/NavigationProvider.test.tsx +49 -12
  361. package/src/rbac/components/__tests__/PagePermissionGuard.race-condition.test.tsx +22 -1
  362. package/src/rbac/components/__tests__/PagePermissionGuard.test.tsx +161 -82
  363. package/src/rbac/components/__tests__/PagePermissionGuard.verification.test.tsx +22 -1
  364. package/src/rbac/components/__tests__/PermissionEnforcer.test.tsx +77 -30
  365. package/src/rbac/components/__tests__/RoleBasedRouter.test.tsx +39 -5
  366. package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +47 -4
  367. package/src/rbac/engine.ts +4 -2
  368. package/src/rbac/hooks/__tests__/useSecureSupabase.test.ts +144 -52
  369. package/src/rbac/hooks/index.ts +3 -0
  370. package/src/rbac/hooks/useCan.test.ts +101 -53
  371. package/src/rbac/hooks/usePermissions.ts +108 -41
  372. package/src/rbac/hooks/useRBAC.test.ts +11 -3
  373. package/src/rbac/hooks/useRBAC.ts +83 -40
  374. package/src/rbac/hooks/useResolvedScope.test.ts +189 -63
  375. package/src/rbac/hooks/useResolvedScope.ts +128 -70
  376. package/src/rbac/hooks/useSecureSupabase.ts +36 -19
  377. package/src/rbac/hooks/useSuperAdminBypass.ts +126 -0
  378. package/src/rbac/request-deduplication.ts +1 -1
  379. package/src/rbac/secureClient.ts +72 -12
  380. package/src/rbac/security.ts +29 -23
  381. package/src/rbac/types.ts +10 -0
  382. package/src/rbac/utils/__tests__/contextValidator.test.ts +150 -0
  383. package/src/rbac/utils/__tests__/deep-equal.test.ts +53 -0
  384. package/src/rbac/utils/__tests__/eventContext.test.ts +6 -1
  385. package/src/rbac/utils/contextValidator.ts +288 -0
  386. package/src/rbac/utils/eventContext.ts +48 -2
  387. package/src/services/EventService.ts +165 -21
  388. package/src/services/OrganisationService.ts +37 -2
  389. package/src/services/__tests__/EventService.test.ts +26 -21
  390. package/src/types/file-reference.ts +13 -10
  391. package/src/utils/app/appNameResolver.test.ts +346 -73
  392. package/src/utils/context/superAdminOverride.ts +58 -0
  393. package/src/utils/file-reference/index.ts +61 -33
  394. package/src/utils/google-places/googlePlacesUtils.test.ts +98 -0
  395. package/src/utils/google-places/loadGoogleMapsScript.test.ts +83 -0
  396. package/src/utils/storage/helpers.test.ts +1 -1
  397. package/src/utils/storage/helpers.ts +38 -19
  398. package/src/utils/storage/types.ts +15 -8
  399. package/src/utils/validation/__tests__/csrf.test.ts +105 -0
  400. package/src/utils/validation/__tests__/sqlInjectionProtection.test.ts +92 -0
  401. package/src/vite-env.d.ts +2 -2
  402. package/dist/chunk-3GOZZZYH.js.map +0 -1
  403. package/dist/chunk-DDM4CCYT.js.map +0 -1
  404. package/dist/chunk-E7UAOUMY.js +0 -75
  405. package/dist/chunk-E7UAOUMY.js.map +0 -1
  406. package/dist/chunk-EFCLXK7F.js.map +0 -1
  407. package/dist/chunk-F2IMUDXZ.js.map +0 -1
  408. package/dist/chunk-HEHYGYOX.js.map +0 -1
  409. package/dist/chunk-IM4QE42D.js.map +0 -1
  410. package/dist/chunk-IPCH26AG.js.map +0 -1
  411. package/dist/chunk-SAUPYVLF.js.map +0 -1
  412. package/dist/chunk-THRPYOFK.js.map +0 -1
  413. package/dist/chunk-UNOTYLQF.js.map +0 -1
  414. package/dist/chunk-VGZZXKBR.js.map +0 -1
  415. package/dist/chunk-YHCN776L.js.map +0 -1
  416. package/src/hooks/__tests__/usePermissionCache.simple.test.ts +0 -192
  417. package/src/hooks/__tests__/usePermissionCache.unit.test.ts +0 -741
  418. package/src/hooks/__tests__/usePublicEvent.simple.test.ts +0 -703
  419. package/src/rbac/hooks/useRBAC.simple.test.ts +0 -95
  420. package/src/rbac/utils/__tests__/eventContext.unit.test.ts +0 -428
  421. /package/dist/{DataTable-GUFUNZ3N.js.map → DataTable-ON3IXISJ.js.map} +0 -0
  422. /package/dist/{UnifiedAuthProvider-643PUAIM.js.map → UnifiedAuthProvider-X5NXANVI.js.map} +0 -0
  423. /package/dist/{api-YP7XD5L6.js.map → api-I6UCQ5S6.js.map} +0 -0
  424. /package/dist/{chunk-HESYZWZW.js.map → chunk-QWWZ5CAQ.js.map} +0 -0
@@ -889,12 +889,12 @@ import {
889
889
 
890
890
  ## Alert
891
891
 
892
- A flexible and accessible alert component for displaying important messages.
892
+ A flexible and accessible alert component for displaying important messages. Uses semantic HTML (`<aside>`) for better accessibility and semantic meaning.
893
893
 
894
894
  ### Props
895
895
 
896
896
  ```typescript
897
- interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
897
+ interface AlertProps extends React.HTMLAttributes<HTMLElement> {
898
898
  variant?: 'default' | 'destructive' | 'inline';
899
899
  className?: string;
900
900
  }
@@ -903,7 +903,7 @@ interface AlertTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
903
903
  className?: string;
904
904
  }
905
905
 
906
- interface AlertDescriptionProps extends React.HTMLAttributes<HTMLDivElement> {
906
+ interface AlertDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
907
907
  className?: string;
908
908
  }
909
909
  ```
@@ -913,7 +913,7 @@ interface AlertDescriptionProps extends React.HTMLAttributes<HTMLDivElement> {
913
913
  ```tsx
914
914
  import { Alert, AlertTitle, AlertDescription } from '@jmruthers/pace-core';
915
915
 
916
- // Basic alert
916
+ // Basic alert (renders as <aside> element)
917
917
  <Alert>
918
918
  <AlertTitle>Success</AlertTitle>
919
919
  <AlertDescription>Your changes have been saved.</AlertDescription>
@@ -934,9 +934,17 @@ import { Alert, AlertTitle, AlertDescription } from '@jmruthers/pace-core';
934
934
 
935
935
  ### Variants
936
936
 
937
- - **default**: Standard alert with background and border
938
- - **destructive**: Red alert for errors and warnings
939
- - **inline**: Lightweight text formatting without background
937
+ - **default**: Standard alert with background and border (renders as `<aside>`)
938
+ - **destructive**: Red alert for errors and warnings (renders as `<aside>`)
939
+ - **inline**: Lightweight text formatting without background (renders as fragment)
940
+
941
+ ### Semantic HTML
942
+
943
+ The Alert component uses semantic HTML for better accessibility:
944
+ - **Default and destructive variants**: Render as `<aside>` elements with `role="alert"`
945
+ - **Inline variant**: Renders as a React Fragment (no wrapper element)
946
+ - **AlertTitle**: Renders as `<h5>` (default/destructive) or `<strong>` (inline)
947
+ - **AlertDescription**: Renders as `<p>` (default/destructive) or `<span>` (inline)
940
948
 
941
949
  ## Card
942
950
 
@@ -1997,49 +2005,84 @@ For more information about testing components, see the [Testing Guide](../testin
1997
2005
 
1998
2006
  ## Avatar
1999
2007
 
2000
- Display user profile pictures with fallback initials or icons.
2008
+ Display user profile pictures with fallback initials or icons. Supports three approaches for image display: direct URLs, file reference props, or file ID.
2001
2009
 
2002
2010
  ### Props
2003
2011
 
2004
2012
  ```typescript
2005
2013
  interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {
2006
- className?: string;
2007
- }
2008
-
2009
- interface AvatarImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
2014
+ // File reference approach (uses FileDisplay for Supabase storage)
2015
+ table_name?: string;
2016
+ record_id?: string;
2017
+ organisation_id?: string;
2018
+ category?: FileCategory;
2019
+
2020
+ // OR file ID approach (uses file reference lookup)
2021
+ fileId?: string;
2022
+
2023
+ // OR direct URL approach (simple <img> tag for public images)
2010
2024
  src?: string;
2011
2025
  alt?: string;
2026
+
2027
+ // Fallback (always required)
2028
+ fallback: string;
2029
+
2030
+ // Styling
2012
2031
  className?: string;
2013
- }
2014
-
2015
- interface AvatarFallbackProps extends React.HTMLAttributes<HTMLDivElement> {
2016
- className?: string;
2032
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
2017
2033
  }
2018
2034
  ```
2019
2035
 
2020
2036
  ### Usage
2021
2037
 
2022
2038
  ```tsx
2023
- import { Avatar, AvatarImage, AvatarFallback } from '@jmruthers/pace-core';
2039
+ import { Avatar } from '@jmruthers/pace-core';
2040
+ import { FileCategory } from '@jmruthers/pace-core/types';
2041
+
2042
+ // Avatar with direct URL
2043
+ <Avatar
2044
+ src="/user.jpg"
2045
+ alt="User"
2046
+ fallback="JD"
2047
+ />
2024
2048
 
2025
- // User avatar
2026
- <Avatar>
2027
- <AvatarImage src="/user.jpg" alt="User" />
2028
- <AvatarFallback>JD</AvatarFallback>
2029
- </Avatar>
2049
+ // Avatar with file reference props (Supabase storage)
2050
+ <Avatar
2051
+ table_name="user_profiles"
2052
+ record_id={userId}
2053
+ organisation_id={orgId}
2054
+ category={FileCategory.PROFILE_PHOTOS}
2055
+ fallback="JD"
2056
+ />
2030
2057
 
2031
- // Avatar without image
2032
- <Avatar>
2033
- <AvatarFallback>AB</AvatarFallback>
2034
- </Avatar>
2058
+ // Avatar with file ID
2059
+ <Avatar
2060
+ fileId={fileReferenceId}
2061
+ organisation_id={orgId}
2062
+ fallback="JD"
2063
+ />
2064
+
2065
+ // Avatar with fallback only
2066
+ <Avatar fallback="AB" />
2067
+
2068
+ // Avatar with custom size
2069
+ <Avatar
2070
+ src="/user.jpg"
2071
+ alt="User"
2072
+ fallback="JD"
2073
+ size="lg"
2074
+ className="custom-class"
2075
+ />
2035
2076
  ```
2036
2077
 
2037
2078
  ### Features
2038
2079
 
2039
- - Automatic fallback to initials or icon
2040
- - Responsive sizing
2080
+ - Three image source approaches: direct URL, file reference props, or file ID
2081
+ - Automatic fallback to initials when image fails or not provided
2082
+ - Responsive sizing with size prop or custom className
2041
2083
  - Accessible ARIA attributes
2042
- - Integration with user profiles
2084
+ - Integration with Supabase storage via FileDisplay
2085
+ - Circular avatar display with customizable styling
2043
2086
 
2044
2087
  ---
2045
2088
 
@@ -91,8 +91,8 @@ The `UnifiedAuthProvider` includes built-in inactivity tracking that automatical
91
91
 
92
92
  #### Features
93
93
 
94
- - **Automatic logout** after 30 minutes of inactivity (configurable)
95
- - **Warning modal** appears 60 seconds before logout (configurable)
94
+ - **Automatic logout** after configured period of inactivity (must be configured)
95
+ - **Warning modal** appears before logout (must be configured)
96
96
  - **Cross-tab synchronization** - activity in any tab resets the timer
97
97
  - **Persistence** - survives page reloads and browser restarts
98
98
  - **Production-safe** - cannot be disabled in production builds
@@ -146,6 +146,7 @@ Documented in [RBAC API Reference](../rbac/api-reference.md):
146
146
  **Data Access (RBAC-protected):**
147
147
  - `data_user_organisations_get` - Get all organisations for a user
148
148
  - `data_user_organisation_roles_get` - Get user roles in organisations
149
+ - `get_organisation_members` - (exception to naming standard) Returns distinct active organisation role assignments for dashboard statistics. Enforces `check_user_organisation_access` so only super admins or organisation members can call it.
149
150
  - `data_user_events_get` - Get events accessible to a user
150
151
  - `data_cake_meals_get` - Get cake meals for an event (application-specific, RBAC-protected)
151
152
 
@@ -242,7 +242,7 @@ For detailed testing guidelines, see [Testing Best Practices](./testing.md).
242
242
  // ✅ Good - Environment validation
243
243
  const config = {
244
244
  supabaseUrl: process.env.VITE_SUPABASE_URL,
245
- supabaseKey: process.env.VITE_SUPABASE_ANON_KEY,
245
+ supabaseKey: process.env.VITE_SUPABASE_PUBLISHABLE_KEY,
246
246
  appName: process.env.VITE_APP_NAME,
247
247
  };
248
248
 
@@ -25,21 +25,21 @@ Deployment in `@jmruthers/pace-core` covers multiple environments:
25
25
  // .env.local (development)
26
26
  VITE_SUPABASE_URL=http://localhost:54321
27
27
  // Accepts both legacy anon keys and modern publishable keys (sb_publishable_...)
28
- VITE_SUPABASE_ANON_KEY=your-local-publishable-key-or-anon-key
28
+ VITE_SUPABASE_PUBLISHABLE_KEY=your-local-publishable-key
29
29
  VITE_APP_ENV=development
30
30
  VITE_DEBUG=true
31
31
 
32
32
  // .env.staging
33
33
  VITE_SUPABASE_URL=https://your-project.supabase.co
34
34
  // Accepts both legacy anon keys and modern publishable keys (sb_publishable_...)
35
- VITE_SUPABASE_ANON_KEY=your-staging-publishable-key-or-anon-key
35
+ VITE_SUPABASE_PUBLISHABLE_KEY=your-staging-publishable-key
36
36
  VITE_APP_ENV=staging
37
37
  VITE_DEBUG=false
38
38
 
39
39
  // .env.production
40
40
  VITE_SUPABASE_URL=https://your-project.supabase.co
41
41
  // Accepts both legacy anon keys and modern publishable keys (sb_publishable_...)
42
- VITE_SUPABASE_ANON_KEY=your-production-publishable-key-or-anon-key
42
+ VITE_SUPABASE_PUBLISHABLE_KEY=your-production-publishable-key
43
43
  VITE_APP_ENV=production
44
44
  VITE_DEBUG=false
45
45
  ```
@@ -274,7 +274,7 @@ jobs:
274
274
  run: npm run build
275
275
  env:
276
276
  VITE_SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
277
- VITE_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
277
+ VITE_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.SUPABASE_PUBLISHABLE_KEY }}
278
278
  VITE_APP_ENV: production
279
279
 
280
280
  - name: Upload build artifacts
@@ -354,7 +354,7 @@ jobs:
354
354
  run: npm run build:staging
355
355
  env:
356
356
  VITE_SUPABASE_URL: ${{ secrets.STAGING_SUPABASE_URL }}
357
- VITE_SUPABASE_ANON_KEY: ${{ secrets.STAGING_SUPABASE_ANON_KEY }}
357
+ VITE_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.STAGING_SUPABASE_PUBLISHABLE_KEY }}
358
358
  VITE_APP_ENV: staging
359
359
 
360
360
  - name: Deploy to Vercel (Staging)
@@ -441,7 +441,7 @@ jobs:
441
441
  ],
442
442
  "env": {
443
443
  "VITE_SUPABASE_URL": "@supabase-url",
444
- "VITE_SUPABASE_ANON_KEY": "@supabase-anon-key"
444
+ "VITE_SUPABASE_PUBLISHABLE_KEY": "@supabase-publishable-key"
445
445
  }
446
446
  }
447
447
  ```
@@ -566,13 +566,13 @@ export const securityHeaders = {
566
566
  ```bash
567
567
  # .env.example (template for required variables)
568
568
  VITE_SUPABASE_URL=
569
- VITE_SUPABASE_ANON_KEY=
569
+ VITE_SUPABASE_PUBLISHABLE_KEY=
570
570
  VITE_APP_ENV=development
571
571
  VITE_DEBUG=false
572
572
 
573
573
  # .env.production (actual production values - never commit)
574
574
  VITE_SUPABASE_URL=https://your-project.supabase.co
575
- VITE_SUPABASE_ANON_KEY=your-production-anon-key
575
+ VITE_SUPABASE_PUBLISHABLE_KEY=your-production-publishable-key
576
576
  VITE_APP_ENV=production
577
577
  VITE_DEBUG=false
578
578
  ```
@@ -53,7 +53,7 @@ npm install @supabase/supabase-js react-router-dom
53
53
  Create `.env.local`:
54
54
  ```env
55
55
  VITE_SUPABASE_URL=your_supabase_url
56
- VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
56
+ VITE_SUPABASE_PUBLISHABLE_KEY=your_supabase_publishable_key
57
57
  VITE_APP_NAME=Basic Auth App
58
58
  ```
59
59
 
@@ -103,7 +103,7 @@ src/
103
103
  import { createClient } from '@supabase/supabase-js';
104
104
 
105
105
  const supabaseUrl = import.meta.env.VITE_SUPABASE_URL;
106
- const supabaseKey = import.meta.env.VITE_SUPABASE_ANON_KEY;
106
+ const supabaseKey = import.meta.env.VITE_SUPABASE_PUBLISHABLE_KEY;
107
107
 
108
108
  export const supabase = createClient(supabaseUrl, supabaseKey);
109
109
  ```
@@ -17,7 +17,7 @@ reviewedBy: documentation-standards-audit
17
17
  npm install @jmruthers/pace-core
18
18
 
19
19
  # 2. Install peer dependencies
20
- npm install react react-dom @tanstack/react-table @radix-ui/react-avatar @radix-ui/react-checkbox @radix-ui/react-dialog @radix-ui/react-label @radix-ui/react-progress @radix-ui/react-slot @radix-ui/react-switch @radix-ui/react-tabs @radix-ui/react-toast @radix-ui/react-tooltip lucide-react react-day-picker react-hook-form react-router-dom clsx tailwind-merge zod
20
+ npm install react react-dom @tanstack/react-table @radix-ui/react-avatar @radix-ui/react-checkbox @radix-ui/react-dialog @radix-ui/react-label @radix-ui/react-slot @radix-ui/react-switch @radix-ui/react-tabs @radix-ui/react-toast @radix-ui/react-tooltip lucide-react react-day-picker react-hook-form react-router-dom clsx tailwind-merge zod
21
21
 
22
22
  # 3. Install Tailwind v4
23
23
  npm install -D @tailwindcss/vite tailwindcss@^4.0.0
@@ -36,7 +36,7 @@ npm install @jmruthers/pace-core
36
36
 
37
37
  **Required Peer Dependencies:**
38
38
  ```bash
39
- npm install react react-dom @tanstack/react-table @radix-ui/react-avatar @radix-ui/react-checkbox @radix-ui/react-dialog @radix-ui/react-label @radix-ui/react-progress @radix-ui/react-slot @radix-ui/react-switch @radix-ui/react-tabs @radix-ui/react-toast @radix-ui/react-tooltip lucide-react react-day-picker react-hook-form react-router-dom clsx tailwind-merge zod
39
+ npm install react react-dom @tanstack/react-table @radix-ui/react-avatar @radix-ui/react-checkbox @radix-ui/react-dialog @radix-ui/react-label @radix-ui/react-slot @radix-ui/react-switch @radix-ui/react-tabs @radix-ui/react-toast @radix-ui/react-tooltip lucide-react react-day-picker react-hook-form react-router-dom clsx tailwind-merge zod
40
40
  ```
41
41
 
42
42
  **Note**: `@supabase/supabase-js` and `@tanstack/react-query` are included as dependencies and do not need to be installed separately.
@@ -291,7 +291,7 @@ Create `src/lib/supabase.ts`:
291
291
  import { createClient } from '@supabase/supabase-js'
292
292
 
293
293
  const supabaseUrl = process.env.VITE_SUPABASE_URL!
294
- const supabaseAnonKey = process.env.VITE_SUPABASE_ANON_KEY!
294
+ const supabasePublishableKey = process.env.VITE_SUPABASE_PUBLISHABLE_KEY!
295
295
 
296
296
  export const supabase = createClient(supabaseUrl, supabaseAnonKey)
297
297
  ```
@@ -301,7 +301,7 @@ Set environment variables in `.env.local`:
301
301
  ```bash
302
302
  VITE_SUPABASE_URL=https://your-project.supabase.co
303
303
  # Accepts both legacy anon keys and modern publishable keys (sb_publishable_...)
304
- VITE_SUPABASE_ANON_KEY=your-publishable-key-or-anon-key-here
304
+ VITE_SUPABASE_PUBLISHABLE_KEY=your-publishable-key-here
305
305
  ```
306
306
 
307
307
  Wrap your app with providers in the correct nesting order:
@@ -35,7 +35,7 @@ npm install @jmruthers/pace-core \
35
35
  @supabase/supabase-js \
36
36
  @tanstack/react-query @tanstack/react-table \
37
37
  @radix-ui/react-avatar @radix-ui/react-checkbox @radix-ui/react-dialog \
38
- @radix-ui/react-label @radix-ui/react-progress @radix-ui/react-slot \
38
+ @radix-ui/react-label @radix-ui/react-slot \
39
39
  @radix-ui/react-switch @radix-ui/react-tabs @radix-ui/react-toast @radix-ui/react-tooltip \
40
40
  clsx lucide-react react-day-picker react-hook-form react-router-dom tailwind-merge zod
41
41
 
@@ -104,7 +104,7 @@ Create `.env.local`:
104
104
 
105
105
  ```env
106
106
  VITE_SUPABASE_URL=your_supabase_project_url
107
- VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
107
+ VITE_SUPABASE_PUBLISHABLE_KEY=your_supabase_publishable_key
108
108
  ```
109
109
 
110
110
  Create `src/lib/supabase.ts`:
@@ -113,7 +113,7 @@ Create `src/lib/supabase.ts`:
113
113
  import { createClient } from '@supabase/supabase-js';
114
114
 
115
115
  const supabaseUrl = import.meta.env.VITE_SUPABASE_URL!;
116
- const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY!;
116
+ const supabasePublishableKey = import.meta.env.VITE_SUPABASE_PUBLISHABLE_KEY!;
117
117
 
118
118
  export const supabase = createClient(supabaseUrl, supabaseAnonKey);
119
119
  ```
@@ -830,7 +830,7 @@ VITE_DEBUG_MODE=true
830
830
 
831
831
  # New environment variables
832
832
  VITE_SUPABASE_URL=https://your-project.supabase.co
833
- VITE_SUPABASE_ANON_KEY=your-anon-key
833
+ VITE_SUPABASE_PUBLISHABLE_KEY=your-publishable-key
834
834
  VITE_APP_ENV=development
835
835
  VITE_DEBUG=false
836
836
 
@@ -847,7 +847,7 @@ cp .env .env.backup
847
847
  cat > .env << EOF
848
848
  # Supabase Configuration
849
849
  VITE_SUPABASE_URL=${VITE_SUPABASE_URL:-https://your-project.supabase.co}
850
- VITE_SUPABASE_ANON_KEY=${VITE_SUPABASE_ANON_KEY:-your-anon-key}
850
+ VITE_SUPABASE_PUBLISHABLE_KEY=${VITE_SUPABASE_PUBLISHABLE_KEY:-your-publishable-key}
851
851
 
852
852
  # Application Configuration
853
853
  VITE_APP_ENV=${VITE_APP_ENV:-development}
@@ -1133,7 +1133,7 @@ export class MigrationValidation {
1133
1133
  static validateConfiguration(config: any) {
1134
1134
  const required = [
1135
1135
  'VITE_SUPABASE_URL',
1136
- 'VITE_SUPABASE_ANON_KEY',
1136
+ 'VITE_SUPABASE_PUBLISHABLE_KEY',
1137
1137
  ];
1138
1138
 
1139
1139
  const warnings = [];
@@ -152,7 +152,7 @@ import { createClient } from '@supabase/supabase-js';
152
152
 
153
153
  const supabase = createClient(
154
154
  import.meta.env.VITE_SUPABASE_URL,
155
- import.meta.env.VITE_SUPABASE_ANON_KEY
155
+ import.meta.env.VITE_SUPABASE_PUBLISHABLE_KEY
156
156
  );
157
157
 
158
158
  // ⚠️ REQUIRED: Call setupRBAC before rendering
@@ -266,7 +266,7 @@ import { createClient } from '@supabase/supabase-js';
266
266
 
267
267
  export const supabase = createClient(
268
268
  import.meta.env.VITE_SUPABASE_URL,
269
- import.meta.env.VITE_SUPABASE_ANON_KEY
269
+ import.meta.env.VITE_SUPABASE_PUBLISHABLE_KEY
270
270
  );
271
271
  ```
272
272
 
@@ -89,7 +89,7 @@ Create `.env.local`:
89
89
  ```bash
90
90
  # .env.local
91
91
  VITE_SUPABASE_URL=https://your-project.supabase.co
92
- VITE_SUPABASE_ANON_KEY=your-anon-key-here
92
+ VITE_SUPABASE_PUBLISHABLE_KEY=your-publishable-key-here
93
93
  VITE_APP_NAME=pace-trac
94
94
  ```
95
95
 
@@ -225,7 +225,7 @@ Create `src/lib/supabase.ts`:
225
225
  import { createClient } from '@supabase/supabase-js'
226
226
 
227
227
  const supabaseUrl = import.meta.env.VITE_SUPABASE_URL
228
- const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY
228
+ const supabasePublishableKey = import.meta.env.VITE_SUPABASE_PUBLISHABLE_KEY
229
229
 
230
230
  if (!supabaseUrl || !supabaseAnonKey) {
231
231
  throw new Error('Missing Supabase environment variables')
@@ -99,7 +99,7 @@ import '@jmruthers/pace-core/src/styles/core.css';
99
99
  // Initialize Supabase
100
100
  const supabase = createClient(
101
101
  import.meta.env.VITE_SUPABASE_URL!,
102
- import.meta.env.VITE_SUPABASE_ANON_KEY!
102
+ import.meta.env.VITE_SUPABASE_PUBLISHABLE_KEY!
103
103
  );
104
104
 
105
105
  // ⚠️ REQUIRED: Setup RBAC before rendering
@@ -258,7 +258,7 @@ import App from './App';
258
258
  // Initialize Supabase
259
259
  const supabase = createClient(
260
260
  import.meta.env.VITE_SUPABASE_URL!,
261
- import.meta.env.VITE_SUPABASE_ANON_KEY!
261
+ import.meta.env.VITE_SUPABASE_PUBLISHABLE_KEY!
262
262
  );
263
263
 
264
264
  // ⚠️ REQUIRED: Setup RBAC before rendering
@@ -88,7 +88,7 @@ Create `.env.local`:
88
88
  # .env.local
89
89
  VITE_SUPABASE_URL=https://your-project.supabase.co
90
90
  # Accepts both legacy anon keys and modern publishable keys (sb_publishable_...)
91
- VITE_SUPABASE_ANON_KEY=your-publishable-key-or-anon-key-here
91
+ VITE_SUPABASE_PUBLISHABLE_KEY=your-publishable-key-here
92
92
  VITE_APP_NAME=user-manager
93
93
  ```
94
94
 
@@ -213,7 +213,7 @@ Create `src/lib/supabase.ts`:
213
213
  import { createClient } from '@supabase/supabase-js'
214
214
 
215
215
  const supabaseUrl = import.meta.env.VITE_SUPABASE_URL
216
- const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY
216
+ const supabasePublishableKey = import.meta.env.VITE_SUPABASE_PUBLISHABLE_KEY
217
217
 
218
218
  if (!supabaseUrl || !supabaseAnonKey) {
219
219
  throw new Error('Missing Supabase environment variables')
@@ -139,10 +139,10 @@ function ProtectedComponent() {
139
139
 
140
140
  ### 3. Inactivity Auto-Logout
141
141
 
142
- PACE Core includes built-in inactivity tracking for enhanced security:
142
+ PACE Core includes built-in inactivity tracking for enhanced security. **All inactivity timeout props are mandatory** - apps must explicitly configure them:
143
143
 
144
- - **Automatic logout** after 30 minutes of inactivity (configurable)
145
- - **Warning modal** appears 60 seconds before logout
144
+ - **Automatic logout** after configured period of inactivity (must be configured)
145
+ - **Warning modal** appears before logout (must be configured)
146
146
  - **Cross-tab synchronization** - activity in any tab resets the timer
147
147
  - **Persistence** - survives page reloads and browser restarts
148
148
  - **Production-safe** - cannot be disabled in production builds
@@ -597,7 +597,7 @@ Secure configuration using environment variables:
597
597
  ```bash
598
598
  # Authentication
599
599
  VITE_SUPABASE_URL=your_supabase_url
600
- VITE_SUPABASE_ANON_KEY=your_anon_key
600
+ VITE_SUPABASE_PUBLISHABLE_KEY=your_publishable_key
601
601
  VITE_SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
602
602
 
603
603
  # Security