@jmruthers/pace-core 0.5.191 → 0.6.1
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.
- package/CHANGELOG.md +29 -0
- package/README.md +7 -1
- package/cursor-rules/00-pace-core-compliance.mdc +372 -0
- package/cursor-rules/01-standards-compliance.mdc +275 -0
- package/cursor-rules/02-project-structure.mdc +200 -0
- package/cursor-rules/03-solid-principles.mdc +341 -0
- package/cursor-rules/04-testing-standards.mdc +315 -0
- package/cursor-rules/05-bug-reports-and-features.mdc +246 -0
- package/cursor-rules/06-code-quality.mdc +392 -0
- package/cursor-rules/07-tech-stack-compliance.mdc +309 -0
- package/cursor-rules/CHANGELOG.md +101 -0
- package/cursor-rules/README.md +191 -0
- package/dist/{AuthService-CbP_utw2.d.ts → AuthService-DjnJHDtC.d.ts} +1 -0
- package/dist/{DataTable-Be6dH_dR.d.ts → DataTable-CH1U5Tpy.d.ts} +1 -1
- package/dist/{DataTable-WKRZD47S.js → DataTable-DQ7RSOHE.js} +8 -7
- package/dist/{PublicPageProvider-ULXC_u6U.d.ts → PublicPageProvider-ce4xlHYA.d.ts} +37 -156
- package/dist/{UnifiedAuthProvider-BYA9qB-o.d.ts → UnifiedAuthProvider-185Ih4dj.d.ts} +2 -0
- package/dist/{UnifiedAuthProvider-FTSG5XH7.js → UnifiedAuthProvider-ATAP5UTR.js} +3 -3
- package/dist/{api-IHKALJZD.js → api-N774RPUA.js} +2 -2
- package/dist/{chunk-6C4YBBJM.js → chunk-3QRJFVBR.js} +1 -1
- package/dist/chunk-3QRJFVBR.js.map +1 -0
- package/dist/{chunk-OETXORNB.js → chunk-3XTALGJF.js} +211 -136
- package/dist/chunk-3XTALGJF.js.map +1 -0
- package/dist/{chunk-6TQDD426.js → chunk-4N5C5XZU.js} +47 -228
- package/dist/chunk-4N5C5XZU.js.map +1 -0
- package/dist/{chunk-LOMZXPSN.js → chunk-4ZC4GX36.js} +47 -74
- package/dist/chunk-4ZC4GX36.js.map +1 -0
- package/dist/{chunk-6LTQQAT6.js → chunk-BYFSK72L.js} +357 -158
- package/dist/chunk-BYFSK72L.js.map +1 -0
- package/dist/{chunk-XYXSXPUK.js → chunk-EXUD6RNJ.js} +50 -10
- package/dist/chunk-EXUD6RNJ.js.map +1 -0
- package/dist/{chunk-VKB2CO4Z.js → chunk-GLK6VM3F.js} +244 -249
- package/dist/chunk-GLK6VM3F.js.map +1 -0
- package/dist/{chunk-HW3OVDUF.js → chunk-J36DSWQK.js} +1 -1
- package/dist/{chunk-HW3OVDUF.js.map → chunk-J36DSWQK.js.map} +1 -1
- package/dist/{chunk-XNYQOL3Z.js → chunk-JBKQ3SAO.js} +9 -18
- package/dist/chunk-JBKQ3SAO.js.map +1 -0
- package/dist/{chunk-ROXMHMY2.js → chunk-KNC55RTG.js} +13 -3
- package/dist/{chunk-ROXMHMY2.js.map → chunk-KNC55RTG.js.map} +1 -1
- package/dist/{chunk-QWWZ5CAQ.js → chunk-LXQLPRQ2.js} +2 -2
- package/dist/{chunk-ULHIJK66.js → chunk-T33XF5ZC.js} +255 -140
- package/dist/chunk-T33XF5ZC.js.map +1 -0
- package/dist/{chunk-VRGWKHDB.js → chunk-XM25TVIE.js} +100 -33
- package/dist/chunk-XM25TVIE.js.map +1 -0
- package/dist/components.d.ts +4 -4
- package/dist/components.js +9 -9
- package/dist/hooks.d.ts +6 -6
- package/dist/hooks.js +20 -25
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.js +18 -21
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts +3 -3
- package/dist/providers.js +2 -2
- package/dist/rbac/index.d.ts +2 -20
- package/dist/rbac/index.js +7 -9
- package/dist/{usePublicRouteParams-TZe0gy-4.d.ts → usePublicRouteParams-BJAlWfuJ.d.ts} +3 -3
- package/dist/{useToast-C8gR5ir4.d.ts → useToast-AyaT-x7p.d.ts} +2 -2
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +3 -3
- package/docs/api/classes/ColumnFactory.md +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +1 -1
- package/docs/api/classes/Logger.md +1 -1
- package/docs/api/classes/MissingUserContextError.md +1 -1
- package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
- package/docs/api/classes/PermissionDeniedError.md +2 -2
- package/docs/api/classes/RBACAuditManager.md +2 -2
- package/docs/api/classes/RBACCache.md +1 -1
- package/docs/api/classes/RBACEngine.md +2 -2
- package/docs/api/classes/RBACError.md +1 -1
- package/docs/api/classes/RBACNotInitializedError.md +1 -1
- package/docs/api/classes/SecureSupabaseClient.md +10 -10
- package/docs/api/classes/StorageUtils.md +1 -1
- package/docs/api/enums/FileCategory.md +1 -1
- package/docs/api/enums/LogLevel.md +1 -1
- package/docs/api/enums/RBACErrorCode.md +1 -1
- package/docs/api/enums/RPCFunction.md +1 -1
- package/docs/api/interfaces/AddressFieldProps.md +1 -1
- package/docs/api/interfaces/AddressFieldRef.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- package/docs/api/interfaces/AutocompleteOptions.md +1 -1
- package/docs/api/interfaces/AvatarProps.md +1 -1
- package/docs/api/interfaces/BadgeProps.md +1 -1
- package/docs/api/interfaces/ButtonProps.md +1 -1
- package/docs/api/interfaces/CalendarProps.md +1 -1
- package/docs/api/interfaces/CardProps.md +1 -1
- package/docs/api/interfaces/ColorPalette.md +1 -1
- package/docs/api/interfaces/ColorShade.md +1 -1
- package/docs/api/interfaces/ComplianceResult.md +1 -1
- package/docs/api/interfaces/DataAccessRecord.md +1 -1
- package/docs/api/interfaces/DataRecord.md +1 -1
- package/docs/api/interfaces/DataTableAction.md +1 -1
- package/docs/api/interfaces/DataTableColumn.md +1 -1
- package/docs/api/interfaces/DataTableProps.md +1 -1
- package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
- package/docs/api/interfaces/DatabaseComplianceResult.md +1 -1
- package/docs/api/interfaces/DatabaseIssue.md +1 -1
- package/docs/api/interfaces/EmptyStateConfig.md +1 -1
- package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
- package/docs/api/interfaces/EventAppRoleData.md +1 -1
- package/docs/api/interfaces/ExportColumn.md +1 -1
- package/docs/api/interfaces/ExportOptions.md +1 -1
- package/docs/api/interfaces/FileDisplayProps.md +24 -11
- package/docs/api/interfaces/FileMetadata.md +1 -1
- package/docs/api/interfaces/FileReference.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadOptions.md +1 -1
- package/docs/api/interfaces/FileUploadProps.md +1 -1
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/FormFieldProps.md +1 -1
- package/docs/api/interfaces/FormProps.md +1 -1
- package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
- package/docs/api/interfaces/InputProps.md +1 -1
- package/docs/api/interfaces/LabelProps.md +1 -1
- package/docs/api/interfaces/LoggerConfig.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/NavigationAccessRecord.md +2 -2
- package/docs/api/interfaces/NavigationContextType.md +1 -1
- package/docs/api/interfaces/NavigationGuardProps.md +1 -1
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- package/docs/api/interfaces/NavigationProviderProps.md +1 -1
- package/docs/api/interfaces/Organisation.md +1 -1
- package/docs/api/interfaces/OrganisationContextType.md +1 -1
- package/docs/api/interfaces/OrganisationMembership.md +1 -1
- package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
- package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
- package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
- package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
- package/docs/api/interfaces/PageAccessRecord.md +1 -1
- package/docs/api/interfaces/PagePermissionContextType.md +1 -1
- package/docs/api/interfaces/PagePermissionGuardProps.md +2 -2
- package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/ParsedAddress.md +1 -1
- package/docs/api/interfaces/PermissionEnforcerProps.md +4 -4
- package/docs/api/interfaces/ProgressProps.md +1 -1
- package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
- package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
- package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
- package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
- package/docs/api/interfaces/QuickFix.md +1 -1
- package/docs/api/interfaces/RBACAccessValidateParams.md +1 -1
- package/docs/api/interfaces/RBACAccessValidateResult.md +1 -1
- package/docs/api/interfaces/RBACAuditLogParams.md +1 -1
- package/docs/api/interfaces/RBACAuditLogResult.md +1 -1
- package/docs/api/interfaces/RBACConfig.md +2 -2
- package/docs/api/interfaces/RBACContext.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RBACPageAccessCheckParams.md +1 -1
- package/docs/api/interfaces/RBACPerformanceMetrics.md +1 -1
- package/docs/api/interfaces/RBACPermissionCheckParams.md +1 -1
- package/docs/api/interfaces/RBACPermissionCheckResult.md +2 -2
- package/docs/api/interfaces/RBACPermissionsGetParams.md +1 -1
- package/docs/api/interfaces/RBACPermissionsGetResult.md +1 -1
- package/docs/api/interfaces/RBACResult.md +1 -1
- package/docs/api/interfaces/RBACRoleGrantParams.md +2 -2
- package/docs/api/interfaces/RBACRoleGrantResult.md +1 -1
- package/docs/api/interfaces/RBACRoleRevokeParams.md +2 -2
- package/docs/api/interfaces/RBACRoleRevokeResult.md +1 -1
- package/docs/api/interfaces/RBACRoleValidateParams.md +2 -2
- package/docs/api/interfaces/RBACRoleValidateResult.md +1 -1
- package/docs/api/interfaces/RBACRolesListParams.md +1 -1
- package/docs/api/interfaces/RBACRolesListResult.md +2 -2
- package/docs/api/interfaces/RBACSessionTrackParams.md +1 -1
- package/docs/api/interfaces/RBACSessionTrackResult.md +1 -1
- package/docs/api/interfaces/ResourcePermissions.md +1 -1
- package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
- package/docs/api/interfaces/RoleManagementResult.md +1 -1
- package/docs/api/interfaces/RouteAccessRecord.md +2 -2
- package/docs/api/interfaces/RouteConfig.md +2 -2
- package/docs/api/interfaces/RuntimeComplianceResult.md +1 -1
- package/docs/api/interfaces/SecureDataContextType.md +1 -1
- package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
- package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
- package/docs/api/interfaces/SetupIssue.md +1 -1
- package/docs/api/interfaces/StorageConfig.md +1 -1
- package/docs/api/interfaces/StorageFileInfo.md +1 -1
- package/docs/api/interfaces/StorageFileMetadata.md +1 -1
- package/docs/api/interfaces/StorageListOptions.md +1 -1
- package/docs/api/interfaces/StorageListResult.md +1 -1
- package/docs/api/interfaces/StorageUploadOptions.md +1 -1
- package/docs/api/interfaces/StorageUploadResult.md +1 -1
- package/docs/api/interfaces/StorageUrlOptions.md +1 -1
- package/docs/api/interfaces/StyleImport.md +1 -1
- package/docs/api/interfaces/SwitchProps.md +1 -1
- package/docs/api/interfaces/TabsContentProps.md +1 -1
- package/docs/api/interfaces/TabsListProps.md +1 -1
- package/docs/api/interfaces/TabsProps.md +1 -1
- package/docs/api/interfaces/TabsTriggerProps.md +1 -1
- package/docs/api/interfaces/TextareaProps.md +1 -1
- package/docs/api/interfaces/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +60 -38
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +13 -13
- package/docs/api/interfaces/UseFormDialogOptions.md +1 -1
- package/docs/api/interfaces/UseFormDialogReturn.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +2 -2
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayOptions.md +2 -2
- package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeOptions.md +2 -2
- package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
- package/docs/api/interfaces/UseResourcePermissionsOptions.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +1 -1
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +194 -209
- package/docs/getting-started/cursor-rules.md +262 -0
- package/docs/getting-started/installation-guide.md +6 -1
- package/docs/getting-started/quick-start.md +6 -1
- package/docs/migration/MIGRATION_GUIDE.md +4 -4
- package/docs/migration/REACT_19_MIGRATION.md +227 -0
- package/docs/migration/database-changes-december-2025.md +2 -1
- package/docs/rbac/event-based-apps.md +124 -6
- package/docs/standards/README.md +39 -0
- package/docs/troubleshooting/migration.md +4 -4
- package/examples/PublicPages/PublicEventPage.tsx +1 -1
- package/package.json +11 -6
- package/scripts/audit-consuming-app.cjs +961 -0
- package/scripts/check-pace-core-compliance.cjs +315 -61
- package/scripts/install-cursor-rules.cjs +236 -0
- package/src/__tests__/helpers/test-providers.tsx +1 -1
- package/src/__tests__/helpers/test-utils.tsx +1 -1
- package/src/__tests__/rls-policies.test.ts +3 -1
- package/src/components/Badge/Badge.tsx +2 -4
- package/src/components/Button/Button.tsx +5 -4
- package/src/components/Calendar/Calendar.tsx +1 -1
- package/src/components/DataTable/DataTable.test.tsx +57 -93
- package/src/components/DataTable/DataTable.tsx +2 -2
- package/src/components/DataTable/__tests__/DataTable.default-state.test.tsx +172 -45
- package/src/components/DataTable/__tests__/DataTable.grouping-aggregation.test.tsx +121 -28
- package/src/components/DataTable/__tests__/DataTableCore.test-setup.ts +9 -8
- package/src/components/DataTable/__tests__/DataTableCore.test.tsx +20 -52
- package/src/components/DataTable/__tests__/a11y.basic.test.tsx +170 -34
- package/src/components/DataTable/__tests__/keyboard.test.tsx +75 -12
- package/src/components/DataTable/__tests__/pagination.modes.test.tsx +88 -16
- package/src/components/DataTable/__tests__/ssr.strict-mode.test.tsx +12 -12
- package/src/components/DataTable/components/AccessDeniedPage.tsx +1 -1
- package/src/components/DataTable/components/BulkOperationsDropdown.tsx +1 -1
- package/src/components/DataTable/components/DataTableCore.tsx +4 -7
- package/src/components/DataTable/components/DataTableModals.tsx +1 -1
- package/src/components/DataTable/components/EditableRow.tsx +1 -1
- package/src/components/DataTable/components/UnifiedTableBody.tsx +86 -17
- package/src/components/DataTable/components/__tests__/DataTableModals.test.tsx +23 -23
- package/src/components/DataTable/components/__tests__/EditableRow.test.tsx +11 -11
- package/src/components/DataTable/components/__tests__/ExpandButton.test.tsx +36 -36
- package/src/components/DataTable/components/__tests__/GroupHeader.test.tsx +27 -27
- package/src/components/DataTable/components/__tests__/ImportModal.test.tsx +39 -39
- package/src/components/DataTable/components/__tests__/UnifiedTableBody.test.tsx +33 -33
- package/src/components/DataTable/components/__tests__/ViewRowModal.test.tsx +29 -29
- package/src/components/DataTable/hooks/useColumnReordering.ts +2 -2
- package/src/components/DataTable/hooks/useDataTablePermissions.ts +75 -10
- package/src/components/DataTable/hooks/useKeyboardNavigation.ts +2 -2
- package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +8 -14
- package/src/components/Dialog/Dialog.tsx +6 -5
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +1 -1
- package/src/components/EventSelector/EventSelector.tsx +1 -1
- package/src/components/FileDisplay/FileDisplay.test.tsx +4 -3
- package/src/components/FileDisplay/FileDisplay.tsx +16 -4
- package/src/components/Footer/Footer.tsx +1 -1
- package/src/components/Form/Form.test.tsx +36 -15
- package/src/components/Form/Form.tsx +30 -26
- package/src/components/Header/Header.tsx +1 -1
- package/src/components/InactivityWarningModal/InactivityWarningModal.test.tsx +40 -40
- package/src/components/InactivityWarningModal/InactivityWarningModal.tsx +1 -1
- package/src/components/Input/Input.tsx +28 -30
- package/src/components/Label/Label.tsx +1 -1
- package/src/components/LoadingSpinner/LoadingSpinner.tsx +1 -1
- package/src/components/LoginForm/LoginForm.test.tsx +42 -42
- package/src/components/LoginForm/LoginForm.tsx +8 -8
- package/src/components/NavigationMenu/NavigationMenu.test.tsx +6 -4
- package/src/components/NavigationMenu/NavigationMenu.tsx +2 -11
- package/src/components/OrganisationSelector/OrganisationSelector.tsx +0 -1
- package/src/components/PaceAppLayout/PaceAppLayout.performance.test.tsx +1 -1
- package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +75 -52
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +98 -69
- package/src/components/PaceAppLayout/README.md +1 -1
- package/src/components/PaceLoginPage/PaceLoginPage.tsx +1 -8
- package/src/components/PasswordChange/PasswordChangeForm.test.tsx +33 -33
- package/src/components/PasswordChange/PasswordChangeForm.tsx +1 -1
- package/src/components/Progress/Progress.tsx +1 -1
- package/src/components/ProtectedRoute/ProtectedRoute.test.tsx +5 -9
- package/src/components/ProtectedRoute/ProtectedRoute.tsx +0 -1
- package/src/components/PublicLayout/PublicPageLayout.tsx +1 -1
- package/src/components/PublicLayout/PublicPageProvider.tsx +0 -1
- package/src/components/Select/Select.tsx +33 -22
- package/src/components/SessionRestorationLoader/SessionRestorationLoader.tsx +1 -1
- package/src/components/Table/Table.tsx +1 -1
- package/src/components/Textarea/Textarea.tsx +27 -29
- package/src/components/Toast/Toast.tsx +1 -1
- package/src/components/Tooltip/Tooltip.tsx +1 -1
- package/src/components/UserMenu/UserMenu.tsx +1 -1
- package/src/hooks/__tests__/hooks.integration.test.tsx +80 -55
- package/src/hooks/__tests__/useSecureDataAccess.unit.test.tsx +14 -7
- package/src/hooks/__tests__/useStorage.unit.test.ts +36 -36
- package/src/hooks/public/usePublicEvent.ts +1 -1
- package/src/hooks/public/usePublicEventLogo.ts +1 -1
- package/src/hooks/public/usePublicRouteParams.ts +1 -1
- package/src/hooks/services/useAuthService.ts +21 -3
- package/src/hooks/services/useEventService.ts +21 -3
- package/src/hooks/services/useInactivityService.ts +21 -3
- package/src/hooks/services/useOrganisationService.ts +21 -3
- package/src/hooks/useDataTableState.ts +8 -18
- package/src/hooks/useFileDisplay.ts +10 -17
- package/src/hooks/useFocusManagement.ts +2 -2
- package/src/hooks/useFocusTrap.ts +4 -4
- package/src/hooks/useFormDialog.ts +8 -7
- package/src/hooks/useInactivityTracker.ts +1 -1
- package/src/hooks/usePermissionCache.ts +1 -1
- package/src/hooks/useSecureDataAccess.test.ts +16 -9
- package/src/hooks/useSecureDataAccess.ts +22 -6
- package/src/hooks/useToast.ts +2 -2
- package/src/providers/__tests__/OrganisationProvider.test.tsx +57 -13
- package/src/providers/__tests__/ProviderLifecycle.test.tsx +21 -6
- package/src/providers/__tests__/UnifiedAuthProvider.test.tsx +10 -10
- package/src/providers/services/EventServiceProvider.tsx +0 -8
- package/src/providers/services/UnifiedAuthProvider.tsx +196 -46
- package/src/providers/services/__tests__/AuthServiceProvider.integration.test.tsx +13 -3
- package/src/rbac/__tests__/adapters.comprehensive.test.tsx +34 -40
- package/src/rbac/__tests__/isSuperAdmin.real.test.ts +82 -0
- package/src/rbac/adapters.tsx +3 -22
- package/src/rbac/api.test.ts +2 -2
- package/src/rbac/api.ts +7 -1
- package/src/rbac/components/EnhancedNavigationMenu.tsx +3 -16
- package/src/rbac/components/NavigationGuard.tsx +2 -11
- package/src/rbac/components/NavigationProvider.tsx +1 -2
- package/src/rbac/components/PagePermissionGuard.tsx +1 -1
- package/src/rbac/components/PagePermissionProvider.tsx +1 -1
- package/src/rbac/components/PermissionEnforcer.tsx +46 -13
- package/src/rbac/components/RoleBasedRouter.tsx +1 -1
- package/src/rbac/components/SecureDataProvider.tsx +1 -2
- package/src/rbac/components/__tests__/EnhancedNavigationMenu.test.tsx +7 -43
- package/src/rbac/components/__tests__/NavigationGuard.test.tsx +4 -11
- package/src/rbac/components/__tests__/NavigationProvider.test.tsx +3 -3
- package/src/rbac/components/__tests__/SecureDataProvider.fixed.test.tsx +1 -1
- package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +1 -1
- package/src/rbac/engine.ts +14 -2
- package/src/rbac/hooks/index.ts +0 -3
- package/src/rbac/hooks/usePermissions.ts +51 -11
- package/src/rbac/hooks/useRBAC.ts +3 -13
- package/src/rbac/hooks/useResolvedScope.test.ts +75 -54
- package/src/rbac/hooks/useResolvedScope.ts +58 -33
- package/src/rbac/hooks/useSecureSupabase.ts +4 -9
- package/src/rbac/secureClient.ts +43 -0
- package/src/services/EventService.ts +4 -57
- package/src/services/InactivityService.ts +127 -34
- package/src/services/OrganisationService.ts +68 -10
- package/src/utils/security/secureDataAccess.test.ts +31 -20
- package/src/utils/security/secureDataAccess.ts +4 -3
- package/dist/chunk-6C4YBBJM.js.map +0 -1
- package/dist/chunk-6LTQQAT6.js.map +0 -1
- package/dist/chunk-6TQDD426.js.map +0 -1
- package/dist/chunk-LOMZXPSN.js.map +0 -1
- package/dist/chunk-OETXORNB.js.map +0 -1
- package/dist/chunk-ULHIJK66.js.map +0 -1
- package/dist/chunk-VKB2CO4Z.js.map +0 -1
- package/dist/chunk-VRGWKHDB.js.map +0 -1
- package/dist/chunk-XNYQOL3Z.js.map +0 -1
- package/dist/chunk-XYXSXPUK.js.map +0 -1
- package/scripts/check-pace-core-compliance.js +0 -512
- package/src/rbac/hooks/useSuperAdminBypass.ts +0 -126
- package/src/utils/context/superAdminOverride.ts +0 -58
- /package/dist/{DataTable-WKRZD47S.js.map → DataTable-DQ7RSOHE.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-FTSG5XH7.js.map → UnifiedAuthProvider-ATAP5UTR.js.map} +0 -0
- /package/dist/{api-IHKALJZD.js.map → api-N774RPUA.js.map} +0 -0
- /package/dist/{chunk-QWWZ5CAQ.js.map → chunk-LXQLPRQ2.js.map} +0 -0
- /package/examples/{rbac → RBAC}/CompleteRBACExample.tsx +0 -0
- /package/examples/{rbac → RBAC}/EventBasedApp.tsx +0 -0
- /package/examples/{rbac → RBAC}/PermissionExample.tsx +0 -0
- /package/examples/{rbac → RBAC}/index.ts +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Cursor Rules Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to pace-core cursor rules will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial release of cursor rules system
|
|
12
|
+
- 8 comprehensive rule files covering compliance, standards, structure, SOLID, testing, bug reports, code quality, and tech stack
|
|
13
|
+
- Installation script with safety guards
|
|
14
|
+
- Comprehensive audit tool with Phase 1 (deterministic) and Phase 2 (heuristic) checks
|
|
15
|
+
- Markdown report generation with timestamps
|
|
16
|
+
|
|
17
|
+
## [1.0.0] - 2025-01-15
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- **00-pace-core-compliance.mdc** - Enforces pace-core usage patterns
|
|
21
|
+
- **01-standards-compliance.mdc** - Maps to all pace-core standards
|
|
22
|
+
- **02-project-structure.mdc** - Defines standard folder structure
|
|
23
|
+
- **03-solid-principles.mdc** - Enforces SOLID architecture principles
|
|
24
|
+
- **04-testing-standards.mdc** - Enforces testing framework consistency
|
|
25
|
+
- **05-bug-reports-and-features.mdc** - Templates for bug reports and feature requests
|
|
26
|
+
- **06-code-quality.mdc** - Enforces code quality standards
|
|
27
|
+
- **07-tech-stack-compliance.mdc** - Enforces tech stack versions and patterns
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
- Opt-in installation script (not automatic postinstall)
|
|
31
|
+
- Safety guards (environment variable, git check)
|
|
32
|
+
- Version tracking in rule files
|
|
33
|
+
- Rule numbering system (pace-core: 00-09, apps: 50+)
|
|
34
|
+
- Targeted globs for efficient rule application
|
|
35
|
+
- MUST/SHOULD/MAY semantics for clear guidance
|
|
36
|
+
- Comprehensive audit tool with markdown reports
|
|
37
|
+
- Phase-based audit approach (deterministic vs heuristic)
|
|
38
|
+
|
|
39
|
+
### Documentation
|
|
40
|
+
- README.md with installation and usage guide
|
|
41
|
+
- Getting started guide in docs
|
|
42
|
+
- Updated standards README with cursor rules section
|
|
43
|
+
|
|
44
|
+
## Migration Guide
|
|
45
|
+
|
|
46
|
+
### From No Rules to Cursor Rules
|
|
47
|
+
|
|
48
|
+
1. Install pace-core (if not already installed):
|
|
49
|
+
```bash
|
|
50
|
+
npm install @jmruthers/pace-core
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
2. Install cursor rules:
|
|
54
|
+
```bash
|
|
55
|
+
node node_modules/@jmruthers/pace-core/scripts/install-cursor-rules.cjs
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
3. Restart Cursor to load rules
|
|
59
|
+
|
|
60
|
+
4. Run audit to check compliance:
|
|
61
|
+
```bash
|
|
62
|
+
node node_modules/@jmruthers/pace-core/scripts/audit-consuming-app.cjs
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Updating Rules
|
|
66
|
+
|
|
67
|
+
When pace-core is updated:
|
|
68
|
+
|
|
69
|
+
1. Update pace-core:
|
|
70
|
+
```bash
|
|
71
|
+
npm update @jmruthers/pace-core
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
2. Update rules:
|
|
75
|
+
```bash
|
|
76
|
+
npm run setup:cursor-rules
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
3. Review any changes in rule files
|
|
80
|
+
|
|
81
|
+
### Custom Rules
|
|
82
|
+
|
|
83
|
+
If you have custom rules, number them starting at 50:
|
|
84
|
+
- `50-my-custom-rule.mdc`
|
|
85
|
+
- `51-another-rule.mdc`
|
|
86
|
+
- etc.
|
|
87
|
+
|
|
88
|
+
This ensures pace-core rules (00-09) load first.
|
|
89
|
+
|
|
90
|
+
## Version History
|
|
91
|
+
|
|
92
|
+
- **1.0.0** (2025-01-15) - Initial release
|
|
93
|
+
|
|
94
|
+
## Future Enhancements
|
|
95
|
+
|
|
96
|
+
Potential future enhancements:
|
|
97
|
+
- CLI for rule validation
|
|
98
|
+
- GitHub Action template for PR audits
|
|
99
|
+
- Rule update notification system
|
|
100
|
+
- Interactive rule configuration
|
|
101
|
+
- Rule effectiveness metrics
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# pace-core Cursor Rules
|
|
2
|
+
|
|
3
|
+
This directory contains Cursor rules that ensure consuming apps maintain quality, consistency, and compliance with pace-core standards.
|
|
4
|
+
|
|
5
|
+
## What are Cursor Rules?
|
|
6
|
+
|
|
7
|
+
Cursor rules are `.mdc` (Markdown Cursor) files that guide AI assistants (like Cursor) to follow specific patterns and standards when writing code. These rules are automatically loaded by Cursor when present in `.cursor/rules/` directory.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
### Automatic Installation (Recommended)
|
|
12
|
+
|
|
13
|
+
Run the installation script from your consuming app root:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
node node_modules/@jmruthers/pace-core/scripts/install-cursor-rules.cjs
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Or add to your `package.json`:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"scripts": {
|
|
24
|
+
"setup:cursor-rules": "node node_modules/@jmruthers/pace-core/scripts/install-cursor-rules.cjs"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Then run:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm run setup:cursor-rules
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Manual Installation
|
|
36
|
+
|
|
37
|
+
Copy all `.mdc` files from `node_modules/@jmruthers/pace-core/cursor-rules/` to your `.cursor/rules/` directory.
|
|
38
|
+
|
|
39
|
+
## Rule Files
|
|
40
|
+
|
|
41
|
+
The rules are numbered for ordering (00-07):
|
|
42
|
+
|
|
43
|
+
- **00-pace-core-compliance.mdc** - Enforce pace-core usage patterns
|
|
44
|
+
- **01-standards-compliance.mdc** - Enforce all pace-core standards
|
|
45
|
+
- **02-project-structure.mdc** - Define standard folder structure
|
|
46
|
+
- **03-solid-principles.mdc** - Enforce SOLID architecture principles
|
|
47
|
+
- **04-testing-standards.mdc** - Enforce testing framework consistency
|
|
48
|
+
- **05-bug-reports-and-features.mdc** - Templates for bug reports and feature requests (guidance-only)
|
|
49
|
+
- **06-code-quality.mdc** - Enforce code quality standards
|
|
50
|
+
- **07-tech-stack-compliance.mdc** - Enforce tech stack versions and patterns
|
|
51
|
+
|
|
52
|
+
## Rule Numbering System
|
|
53
|
+
|
|
54
|
+
- **pace-core rules**: `00-09` (reserved for pace-core)
|
|
55
|
+
- **Your app rules**: `50+` (create your own rules starting at 50)
|
|
56
|
+
|
|
57
|
+
This ensures pace-core rules load first, and your custom rules load after.
|
|
58
|
+
|
|
59
|
+
## Customization
|
|
60
|
+
|
|
61
|
+
### Adding Your Own Rules
|
|
62
|
+
|
|
63
|
+
Create your own rules in `.cursor/rules/` with numbers starting at `50`:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
.cursor/rules/
|
|
67
|
+
├── 00-pace-core-compliance.mdc # pace-core rule
|
|
68
|
+
├── 01-standards-compliance.mdc # pace-core rule
|
|
69
|
+
├── ...
|
|
70
|
+
├── 50-my-custom-rule.mdc # Your custom rule
|
|
71
|
+
└── 51-another-custom-rule.mdc # Your custom rule
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Updating Rules
|
|
75
|
+
|
|
76
|
+
When pace-core is updated, run the installation script again. The script will:
|
|
77
|
+
- **Automatically update** pace-core rules (00-09) if they've changed (version or content differs)
|
|
78
|
+
- Preserve your custom rules (50+)
|
|
79
|
+
- Skip files that are already up to date
|
|
80
|
+
|
|
81
|
+
### Force Update
|
|
82
|
+
|
|
83
|
+
To force update all rules (even when versions match):
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
node node_modules/@jmruthers/pace-core/scripts/install-cursor-rules.cjs --force
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Note**: Normally, pace-core rules (00-09) are automatically updated when they change. The `--force` flag forces an update even when versions match (useful if content changed but version metadata wasn't updated).
|
|
90
|
+
|
|
91
|
+
## How Cursor Uses Rules
|
|
92
|
+
|
|
93
|
+
Cursor automatically loads all `.mdc` files from `.cursor/rules/` when:
|
|
94
|
+
- You open a file that matches the rule's `globs` pattern
|
|
95
|
+
- You ask Cursor to write or modify code
|
|
96
|
+
- Cursor needs context for code generation
|
|
97
|
+
|
|
98
|
+
Rules with `alwaysApply: true` are always considered, while rules with `alwaysApply: false` are only referenced when relevant.
|
|
99
|
+
|
|
100
|
+
## Explicitly Referencing Rules
|
|
101
|
+
|
|
102
|
+
When working with Cursor, you can explicitly reference rules:
|
|
103
|
+
|
|
104
|
+
> "Use pace-core components and follow rules 00–04."
|
|
105
|
+
|
|
106
|
+
This helps Cursor focus on specific rule sets.
|
|
107
|
+
|
|
108
|
+
## Rule Format
|
|
109
|
+
|
|
110
|
+
Each rule file follows this format:
|
|
111
|
+
|
|
112
|
+
```markdown
|
|
113
|
+
---
|
|
114
|
+
description: Brief description
|
|
115
|
+
globs: ["targeted/path/**/*.{ts,tsx}"] # Files this rule applies to
|
|
116
|
+
alwaysApply: true # or false
|
|
117
|
+
paceCoreVersion: "0.5.x" # pace-core version
|
|
118
|
+
rulesVersion: "2025-01-15" # Rule update date
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
# Rule Title
|
|
122
|
+
|
|
123
|
+
Content with examples and guidelines.
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Safety Guards
|
|
127
|
+
|
|
128
|
+
The installation script includes safety guards:
|
|
129
|
+
|
|
130
|
+
- **Environment variable**: Set `PACE_CURSOR_RULES_DISABLED=1` to skip installation
|
|
131
|
+
- **Git check**: Skips if no `.git` folder exists (CI/safety)
|
|
132
|
+
- **Auto-update**: Automatically updates pace-core rules (00-09) when they change
|
|
133
|
+
- **Protection**: Never overwrites custom app rules (50+)
|
|
134
|
+
|
|
135
|
+
## Monorepo Support
|
|
136
|
+
|
|
137
|
+
For monorepos, run the installation script from each app's root directory. Each app maintains its own `.cursor/rules/` directory.
|
|
138
|
+
|
|
139
|
+
## Troubleshooting
|
|
140
|
+
|
|
141
|
+
### Rules Not Loading
|
|
142
|
+
|
|
143
|
+
1. Verify rules are in `.cursor/rules/` directory
|
|
144
|
+
2. Check file extensions are `.mdc`
|
|
145
|
+
3. Restart Cursor if rules were just installed
|
|
146
|
+
4. Check rule frontmatter is valid YAML
|
|
147
|
+
|
|
148
|
+
### Rules Conflicting
|
|
149
|
+
|
|
150
|
+
1. Check rule numbering (pace-core: 00-09, yours: 50+)
|
|
151
|
+
2. Verify `globs` patterns don't overlap unnecessarily
|
|
152
|
+
3. Review rule priorities in frontmatter
|
|
153
|
+
|
|
154
|
+
### Installation Fails
|
|
155
|
+
|
|
156
|
+
1. Check you're in the app root directory
|
|
157
|
+
2. Verify `node_modules/@jmruthers/pace-core/` exists
|
|
158
|
+
3. Check file permissions
|
|
159
|
+
4. Try with `--force` flag if needed
|
|
160
|
+
|
|
161
|
+
## Audit Tool
|
|
162
|
+
|
|
163
|
+
Run the audit tool to check compliance:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
node node_modules/@jmruthers/pace-core/scripts/audit-consuming-app.cjs
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
This generates a timestamped markdown report in `audit/` directory.
|
|
170
|
+
|
|
171
|
+
## Version Tracking
|
|
172
|
+
|
|
173
|
+
Each rule file includes version metadata:
|
|
174
|
+
- `paceCoreVersion`: pace-core version these rules target
|
|
175
|
+
- `rulesVersion`: Date when rules were last updated
|
|
176
|
+
|
|
177
|
+
Check these to see if rules need updating.
|
|
178
|
+
|
|
179
|
+
## Related Documentation
|
|
180
|
+
|
|
181
|
+
- [pace-core Standards](../docs/standards/README.md)
|
|
182
|
+
- [Getting Started Guide](../docs/getting-started/cursor-rules.md)
|
|
183
|
+
- [pace-core Exports](../docs/api-reference/README.md)
|
|
184
|
+
|
|
185
|
+
## Support
|
|
186
|
+
|
|
187
|
+
For issues with cursor rules:
|
|
188
|
+
1. Check this README
|
|
189
|
+
2. Review rule files for guidance
|
|
190
|
+
3. File an issue in pace-core repository
|
|
191
|
+
4. Check pace-core documentation
|
|
@@ -203,6 +203,7 @@ declare class OrganisationService extends BaseService implements IOrganisationSe
|
|
|
203
203
|
private _roleMapState;
|
|
204
204
|
private _isLoading;
|
|
205
205
|
private _error;
|
|
206
|
+
private _isSuperAdmin;
|
|
206
207
|
private _isContextReady;
|
|
207
208
|
private retryCount;
|
|
208
209
|
private supabaseClient;
|
|
@@ -101,7 +101,7 @@ interface DataTableProps<TData extends DataRecord> {
|
|
|
101
101
|
/** Whether the table is in a loading state */
|
|
102
102
|
isLoading?: boolean;
|
|
103
103
|
/** Custom component to display when table is empty */
|
|
104
|
-
emptyState?: EmptyStateConfig | React__default.ReactElement
|
|
104
|
+
emptyState?: EmptyStateConfig | React__default.ReactElement<any>;
|
|
105
105
|
/** Array of aggregation functions for grouped data */
|
|
106
106
|
aggregates?: AggregateConfig[];
|
|
107
107
|
/** Import modal configuration */
|
|
@@ -60,8 +60,8 @@ import {
|
|
|
60
60
|
sum,
|
|
61
61
|
validateHierarchicalData,
|
|
62
62
|
validatePaginationConfig
|
|
63
|
-
} from "./chunk-
|
|
64
|
-
import "./chunk-
|
|
63
|
+
} from "./chunk-T33XF5ZC.js";
|
|
64
|
+
import "./chunk-XM25TVIE.js";
|
|
65
65
|
import {
|
|
66
66
|
CircuitBreaker,
|
|
67
67
|
DEFAULT_FALLBACK_CONFIG,
|
|
@@ -79,10 +79,11 @@ import {
|
|
|
79
79
|
safeExecute,
|
|
80
80
|
throttle,
|
|
81
81
|
useDataTablePerformance
|
|
82
|
-
} from "./chunk-
|
|
83
|
-
import "./chunk-
|
|
84
|
-
import "./chunk-
|
|
85
|
-
import "./chunk-
|
|
82
|
+
} from "./chunk-3QRJFVBR.js";
|
|
83
|
+
import "./chunk-3XTALGJF.js";
|
|
84
|
+
import "./chunk-KQCRWDSA.js";
|
|
85
|
+
import "./chunk-BYFSK72L.js";
|
|
86
|
+
import "./chunk-KNC55RTG.js";
|
|
86
87
|
import "./chunk-63FOKYGO.js";
|
|
87
88
|
import "./chunk-QXHPKYJV.js";
|
|
88
89
|
import "./chunk-R77UEZ4E.js";
|
|
@@ -169,4 +170,4 @@ export {
|
|
|
169
170
|
validateHierarchicalData,
|
|
170
171
|
validatePaginationConfig
|
|
171
172
|
};
|
|
172
|
-
//# sourceMappingURL=DataTable-
|
|
173
|
+
//# sourceMappingURL=DataTable-DQ7RSOHE.js.map
|