@jmruthers/pace-core 0.6.6 → 0.6.8

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 (292) hide show
  1. package/{scripts/audit/audit-dependencies.cjs → audit-tool/00-dependencies.cjs} +227 -22
  2. package/audit-tool/audits/01-pace-core-compliance.cjs +556 -0
  3. package/audit-tool/audits/02-project-structure.cjs +240 -0
  4. package/audit-tool/audits/03-architecture.cjs +224 -0
  5. package/audit-tool/audits/04-code-quality.cjs +149 -0
  6. package/audit-tool/audits/05-styling.cjs +224 -0
  7. package/audit-tool/audits/06-security-rbac.cjs +554 -0
  8. package/audit-tool/audits/07-api-tech-stack.cjs +355 -0
  9. package/audit-tool/audits/08-testing-documentation.cjs +202 -0
  10. package/audit-tool/audits/09-operations.cjs +208 -0
  11. package/audit-tool/index.cjs +295 -0
  12. package/audit-tool/utils/code-utils.cjs +218 -0
  13. package/audit-tool/utils/file-utils.cjs +230 -0
  14. package/audit-tool/utils/report-utils.cjs +380 -0
  15. package/cursor-rules/00-standards-overview.mdc +156 -0
  16. package/cursor-rules/{00-pace-core-compliance.mdc → 01-pace-core-compliance.mdc} +187 -34
  17. package/cursor-rules/02-project-structure.mdc +37 -5
  18. package/cursor-rules/{03-solid-principles.mdc → 03-architecture.mdc} +125 -11
  19. package/cursor-rules/04-code-quality.mdc +419 -0
  20. package/cursor-rules/{08-markup-quality.mdc → 05-styling.mdc} +55 -10
  21. package/cursor-rules/{09-rbac-compliance.mdc → 06-security-rbac.mdc} +62 -6
  22. package/cursor-rules/07-api-tech-stack.mdc +377 -0
  23. package/cursor-rules/08-testing-documentation.mdc +324 -0
  24. package/cursor-rules/09-operations.mdc +365 -0
  25. package/dist/DataTable-6RMSCQJ6.js +15 -0
  26. package/dist/{DataTable-2N_tqbfq.d.ts → DataTable-DRUIgtUH.d.ts} +1 -1
  27. package/dist/{PublicPageProvider-BBH6Vqg7.d.ts → PublicPageProvider-CIGSujI2.d.ts} +40 -24
  28. package/dist/{UnifiedAuthProvider-ZT6TIGM7.js → UnifiedAuthProvider-7SNDOWYD.js} +2 -2
  29. package/dist/{api-Y4MQWOFW.js → api-7P7DI652.js} +1 -1
  30. package/dist/{chunk-MAGBIDNS.js → chunk-4DDCYDQ3.js} +8 -7
  31. package/dist/{chunk-BVP2BCJF.js → chunk-5W2A3DRC.js} +10 -9
  32. package/dist/{chunk-SD6WQY43.js → chunk-7ILTDCL2.js} +9 -1
  33. package/dist/{chunk-3QC3KRHK.js → chunk-A3W6LW53.js} +16 -1
  34. package/dist/{chunk-3O3WHILE.js → chunk-EF2UGZWY.js} +239 -63
  35. package/dist/{chunk-LAZMKTTF.js → chunk-EURB7QFZ.js} +341 -337
  36. package/dist/{chunk-2HGJFNAH.js → chunk-FEJLJNWA.js} +1 -15
  37. package/dist/{chunk-7TYHROIV.js → chunk-GS5672WG.js} +55 -13
  38. package/dist/{chunk-UIYSCEV7.js → chunk-IUBRCBSY.js} +1 -1
  39. package/dist/{chunk-ZFYPMX46.js → chunk-LX6U42O3.js} +1 -1
  40. package/dist/{chunk-FENMYN2U.js → chunk-MPBLMWVR.js} +3 -3
  41. package/dist/{chunk-ZS5VO5JB.js → chunk-NKHKXPI4.js} +408 -453
  42. package/dist/{chunk-A55DK444.js → chunk-OJ4SKRSV.js} +1 -7
  43. package/dist/{chunk-4T7OBVTU.js → chunk-S6ZQKDY6.js} +1 -1
  44. package/dist/{chunk-FTCRZOG2.js → chunk-T5CVK4R3.js} +5 -5
  45. package/dist/{chunk-OHIK3MIO.js → chunk-Z2FNRKF3.js} +13 -13
  46. package/dist/components.d.ts +5 -4
  47. package/dist/components.js +29 -34
  48. package/dist/eslint-rules/index.cjs +22 -9
  49. package/{src/eslint-rules/rules/compliance.cjs → dist/eslint-rules/rules/01-pace-core-compliance.cjs} +184 -23
  50. package/dist/eslint-rules/rules/04-code-quality.cjs +346 -0
  51. package/dist/eslint-rules/rules/05-styling.cjs +61 -0
  52. package/dist/eslint-rules/rules/{rbac.cjs → 06-security-rbac.cjs} +34 -13
  53. package/dist/eslint-rules/rules/07-api-tech-stack.cjs +385 -0
  54. package/dist/eslint-rules/rules/08-testing.cjs +94 -0
  55. package/dist/{functions-DHebl8-F.d.ts → functions-lBy5L2ry.d.ts} +1 -1
  56. package/dist/hooks.d.ts +5 -5
  57. package/dist/hooks.js +8 -8
  58. package/dist/index.d.ts +7 -7
  59. package/dist/index.js +21 -20
  60. package/dist/providers.js +2 -2
  61. package/dist/rbac/index.d.ts +1 -1
  62. package/dist/rbac/index.js +8 -8
  63. package/dist/theming/runtime.d.ts +61 -1
  64. package/dist/theming/runtime.js +1 -1
  65. package/dist/{types-B-K_5VnO.d.ts → types-DXstZpNI.d.ts} +0 -17
  66. package/dist/types.d.ts +2 -2
  67. package/dist/{usePublicRouteParams-COZ28Mvq.d.ts → usePublicRouteParams-MamNgwqe.d.ts} +19 -19
  68. package/dist/utils.d.ts +2 -2
  69. package/dist/utils.js +8 -8
  70. package/docs/README.md +1 -1
  71. package/docs/api/modules.md +106 -41
  72. package/docs/api-reference/components.md +18 -20
  73. package/docs/api-reference/hooks.md +80 -80
  74. package/docs/api-reference/types.md +1 -1
  75. package/docs/api-reference/utilities.md +1 -1
  76. package/docs/architecture/README.md +1 -1
  77. package/docs/core-concepts/events.md +3 -3
  78. package/docs/core-concepts/organisations.md +6 -6
  79. package/docs/core-concepts/permissions.md +6 -6
  80. package/docs/documentation-index.md +12 -18
  81. package/docs/getting-started/dependencies.md +23 -0
  82. package/docs/getting-started/documentation-index.md +1 -1
  83. package/docs/getting-started/examples/README.md +4 -4
  84. package/docs/getting-started/examples/full-featured-app.md +1 -1
  85. package/docs/getting-started/faq.md +2 -2
  86. package/docs/getting-started/quick-reference.md +4 -4
  87. package/docs/implementation-guides/app-layout.md +1 -1
  88. package/docs/implementation-guides/authentication.md +15 -15
  89. package/docs/implementation-guides/component-styling.md +1 -1
  90. package/docs/implementation-guides/data-tables.md +127 -34
  91. package/docs/implementation-guides/datatable-rbac-usage.md +1 -1
  92. package/docs/implementation-guides/dynamic-colors.md +3 -3
  93. package/docs/implementation-guides/file-upload-storage.md +2 -2
  94. package/docs/implementation-guides/hierarchical-datatable.md +40 -60
  95. package/docs/implementation-guides/inactivity-tracking.md +3 -3
  96. package/docs/implementation-guides/large-datasets.md +3 -2
  97. package/docs/implementation-guides/organisation-security.md +2 -2
  98. package/docs/implementation-guides/performance.md +2 -2
  99. package/docs/implementation-guides/permission-enforcement.md +1 -1
  100. package/docs/migration/V0.3.44_organisation-context-timing-fix.md +1 -1
  101. package/docs/migration/V0.4.0_rbac-migration.md +6 -6
  102. package/docs/rbac/README.md +5 -5
  103. package/docs/rbac/advanced-patterns.md +6 -6
  104. package/docs/rbac/api-reference.md +20 -20
  105. package/docs/rbac/event-based-apps.md +3 -3
  106. package/docs/rbac/examples.md +41 -41
  107. package/docs/rbac/getting-started.md +37 -37
  108. package/docs/rbac/performance.md +1 -1
  109. package/docs/rbac/quick-start.md +52 -52
  110. package/docs/rbac/secure-client-protection.md +1 -1
  111. package/docs/rbac/troubleshooting.md +1 -1
  112. package/docs/security/README.md +5 -5
  113. package/docs/standards/0-standards-overview.md +220 -0
  114. package/docs/standards/{00-pace-core-compliance.md → 1-pace-core-compliance-standards.md} +241 -185
  115. package/docs/standards/{02-project-structure.md → 2-project-structure-standards.md} +11 -47
  116. package/docs/standards/3-architecture-standards.md +606 -0
  117. package/docs/standards/4-code-quality-standards.md +728 -0
  118. package/docs/standards/{08-markup-quality.md → 5-styling-standards.md} +12 -9
  119. package/docs/standards/{09-rbac-compliance.md → 6-security-rbac-standards.md} +126 -18
  120. package/docs/standards/7-api-tech-stack-standards.md +662 -0
  121. package/docs/standards/8-testing-documentation-standards.md +401 -0
  122. package/docs/standards/9-operations-standards.md +1102 -0
  123. package/docs/standards/README.md +203 -104
  124. package/docs/troubleshooting/README.md +4 -4
  125. package/docs/troubleshooting/common-issues.md +2 -2
  126. package/docs/troubleshooting/debugging.md +9 -9
  127. package/docs/troubleshooting/migration.md +4 -4
  128. package/eslint-config-pace-core.cjs +50 -20
  129. package/package.json +50 -19
  130. package/scripts/eslint-audit.cjs +123 -0
  131. package/scripts/install-cursor-rules.cjs +11 -243
  132. package/scripts/install-eslint-config.cjs +349 -0
  133. package/scripts/validate-dependencies.cjs +248 -0
  134. package/src/__tests__/helpers/__tests__/component-test-utils.test.tsx +2 -2
  135. package/src/__tests__/helpers/__tests__/test-providers.test.tsx +2 -2
  136. package/src/__tests__/helpers/__tests__/test-utils.test.tsx +30 -18
  137. package/src/__tests__/integration/UserProfile.test.tsx +14 -14
  138. package/src/__tests__/rbac/PagePermissionGuard.test.tsx +6 -6
  139. package/src/__tests__/templates/accessibility.test.template.tsx +10 -9
  140. package/src/__tests__/templates/component.test.template.tsx +18 -15
  141. package/src/components/AddressField/AddressField.tsx +26 -1
  142. package/src/components/Alert/Alert.test.tsx +86 -22
  143. package/src/components/Alert/Alert.tsx +19 -11
  144. package/src/components/Badge/Badge.tsx +1 -1
  145. package/src/components/Calendar/Calendar.tsx +201 -47
  146. package/src/components/Checkbox/Checkbox.test.tsx +2 -1
  147. package/src/components/ContextSelector/ContextSelector.tsx +108 -126
  148. package/src/components/DataTable/AUDIT_REPORT.md +293 -0
  149. package/src/components/DataTable/DataTable.tsx +1 -19
  150. package/src/components/DataTable/__tests__/DataTableCore.test.tsx +6 -2
  151. package/src/components/DataTable/__tests__/a11y.basic.test.tsx +21 -6
  152. package/src/components/DataTable/__tests__/pagination.modes.test.tsx +3 -2
  153. package/src/components/DataTable/__tests__/test-utils/sharedTestUtils.tsx +9 -9
  154. package/src/components/DataTable/components/ColumnFilter.tsx +63 -74
  155. package/src/components/DataTable/components/ColumnVisibilityDropdown.tsx +43 -41
  156. package/src/components/DataTable/components/DataTableErrorBoundary.tsx +9 -11
  157. package/src/components/DataTable/components/DataTableLayout.tsx +5 -16
  158. package/src/components/DataTable/components/EditableRow.tsx +5 -7
  159. package/src/components/DataTable/components/EmptyState.tsx +11 -10
  160. package/src/components/DataTable/components/FilterRow.tsx +2 -4
  161. package/src/components/DataTable/components/ImportModal.tsx +124 -126
  162. package/src/components/DataTable/components/LoadingState.tsx +5 -6
  163. package/src/components/DataTable/components/SortIndicator.tsx +50 -0
  164. package/src/components/DataTable/components/__tests__/COVERAGE_NOTE.md +4 -4
  165. package/src/components/DataTable/components/__tests__/ColumnFilter.test.tsx +23 -82
  166. package/src/components/DataTable/components/__tests__/DataTableErrorBoundary.test.tsx +37 -9
  167. package/src/components/DataTable/components/__tests__/EmptyState.test.tsx +7 -4
  168. package/src/components/DataTable/components/__tests__/FilterRow.test.tsx +12 -4
  169. package/src/components/DataTable/components/__tests__/LoadingState.test.tsx +45 -27
  170. package/src/components/DataTable/components/index.ts +2 -1
  171. package/src/components/DataTable/types.ts +0 -18
  172. package/src/components/DataTable/utils/a11yUtils.ts +17 -0
  173. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +1 -1
  174. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.tsx +11 -15
  175. package/src/components/DateTimeField/DateTimeField.tsx +7 -8
  176. package/src/components/Dialog/Dialog.test.tsx +1 -0
  177. package/src/components/Dialog/Dialog.tsx +25 -8
  178. package/src/components/ErrorBoundary/ErrorBoundary.tsx +77 -79
  179. package/src/components/FileUpload/FileUpload.test.tsx +45 -16
  180. package/src/components/FileUpload/FileUpload.tsx +141 -130
  181. package/src/components/NavigationMenu/NavigationMenu.test.tsx +48 -12
  182. package/src/components/PaceAppLayout/PaceAppLayout.performance.test.tsx +9 -9
  183. package/src/components/PaceAppLayout/PaceAppLayout.security.test.tsx +30 -30
  184. package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +4 -4
  185. package/src/components/PaceLoginPage/PaceLoginPage.test.tsx +7 -1
  186. package/src/components/Progress/Progress.tsx +2 -4
  187. package/src/components/ProtectedRoute/ProtectedRoute.tsx +8 -8
  188. package/src/components/Select/Select.tsx +86 -77
  189. package/src/components/Select/types.ts +3 -0
  190. package/src/hooks/__tests__/ServiceHooks.test.tsx +16 -16
  191. package/src/hooks/__tests__/hooks.integration.test.tsx +49 -49
  192. package/src/hooks/__tests__/useDataTablePerformance.unit.test.ts +8 -5
  193. package/src/hooks/__tests__/useFileUrl.unit.test.ts +4 -0
  194. package/src/hooks/__tests__/useFocusTrap.unit.test.tsx +99 -99
  195. package/src/hooks/__tests__/useInactivityTracker.unit.test.ts +45 -8
  196. package/src/hooks/__tests__/usePerformanceMonitor.unit.test.ts +22 -2
  197. package/src/hooks/public/usePublicEvent.ts +5 -5
  198. package/src/hooks/public/usePublicEventLogo.ts +5 -5
  199. package/src/hooks/public/usePublicFileDisplay.ts +2 -2
  200. package/src/hooks/public/usePublicRouteParams.ts +13 -9
  201. package/src/hooks/useAddressAutocomplete.test.ts +18 -18
  202. package/src/hooks/useAppConfig.ts +2 -2
  203. package/src/hooks/useEventTheme.test.ts +7 -7
  204. package/src/hooks/useEventTheme.ts +2 -1
  205. package/src/hooks/useFileDisplay.ts +2 -2
  206. package/src/hooks/useFileUrl.ts +52 -8
  207. package/src/hooks/useOrganisationSecurity.test.ts +2 -1
  208. package/src/providers/UnifiedAuthProvider.smoke.test.tsx +21 -21
  209. package/src/providers/__tests__/AuthProvider.test.tsx +21 -21
  210. package/src/providers/__tests__/EventProvider.test.tsx +61 -61
  211. package/src/providers/__tests__/InactivityProvider.test.tsx +56 -56
  212. package/src/providers/__tests__/OrganisationProvider.test.tsx +75 -75
  213. package/src/providers/__tests__/ProviderLifecycle.test.tsx +38 -38
  214. package/src/providers/__tests__/UnifiedAuthProvider.test.tsx +103 -103
  215. package/src/providers/services/__tests__/AuthServiceProvider.integration.test.tsx +7 -7
  216. package/src/providers/services/__tests__/UnifiedAuthProvider.integration.test.tsx +10 -10
  217. package/src/rbac/__tests__/auth-rbac.e2e.test.tsx +15 -6
  218. package/src/rbac/__tests__/rbac-functions.test.ts +3 -3
  219. package/src/rbac/api.test.ts +104 -0
  220. package/src/rbac/engine.ts +1 -1
  221. package/src/rbac/hooks/useCan.test.ts +2 -2
  222. package/src/rbac/secureClient.ts +1 -1
  223. package/src/rbac/types/functions.ts +1 -1
  224. package/src/styles/core.css +7 -0
  225. package/src/theming/__tests__/parseEventColours.test.ts +118 -3
  226. package/src/theming/parseEventColours.ts +77 -11
  227. package/src/types/supabase.ts +2 -3
  228. package/src/utils/__tests__/bundleAnalysis.unit.test.ts +9 -9
  229. package/src/utils/__tests__/lazyLoad.unit.test.tsx +42 -39
  230. package/src/utils/file-reference/__tests__/file-reference.test.ts +4 -0
  231. package/src/utils/formatting/formatDate.test.ts +3 -2
  232. package/src/utils/formatting/formatDateTime.test.ts +2 -2
  233. package/src/utils/google-places/googlePlacesUtils.test.ts +36 -24
  234. package/src/utils/storage/README.md +1 -1
  235. package/src/utils/storage/__tests__/helpers.unit.test.ts +19 -12
  236. package/src/utils/storage/helpers.test.ts +69 -3
  237. package/cursor-rules/01-standards-compliance.mdc +0 -285
  238. package/cursor-rules/04-testing-standards.mdc +0 -270
  239. package/cursor-rules/05-bug-reports-and-features.mdc +0 -248
  240. package/cursor-rules/06-code-quality.mdc +0 -311
  241. package/cursor-rules/07-tech-stack-compliance.mdc +0 -216
  242. package/cursor-rules/10-error-handling-patterns.mdc +0 -179
  243. package/cursor-rules/11-performance-optimization.mdc +0 -169
  244. package/cursor-rules/12-ci-cd-integration.mdc +0 -150
  245. package/dist/DataTable-LRJL4IRV.js +0 -15
  246. package/dist/eslint-rules/rules/compliance.cjs +0 -348
  247. package/dist/eslint-rules/rules/components.cjs +0 -113
  248. package/dist/eslint-rules/rules/imports.cjs +0 -102
  249. package/docs/best-practices/README.md +0 -472
  250. package/docs/best-practices/accessibility.md +0 -604
  251. package/docs/best-practices/common-patterns.md +0 -516
  252. package/docs/best-practices/deployment.md +0 -1103
  253. package/docs/best-practices/performance.md +0 -1328
  254. package/docs/best-practices/security.md +0 -940
  255. package/docs/best-practices/testing.md +0 -1034
  256. package/docs/rbac/compliance/compliance-guide.md +0 -544
  257. package/docs/standards/01-standards-compliance.md +0 -188
  258. package/docs/standards/03-solid-principles.md +0 -39
  259. package/docs/standards/04-testing-standards.md +0 -36
  260. package/docs/standards/05-bug-reports-and-features.md +0 -27
  261. package/docs/standards/06-code-quality.md +0 -34
  262. package/docs/standards/07-tech-stack-compliance.md +0 -30
  263. package/docs/standards/10-error-handling-patterns.md +0 -401
  264. package/docs/standards/11-performance-optimization.md +0 -348
  265. package/docs/standards/12-ci-cd-integration.md +0 -370
  266. package/docs/standards/ALIGNMENT_REVIEW_SUMMARY.md +0 -192
  267. package/scripts/audit/audit-compliance.cjs +0 -1295
  268. package/scripts/audit/audit-components.cjs +0 -260
  269. package/scripts/audit/audit-rbac.cjs +0 -954
  270. package/scripts/audit/audit-standards.cjs +0 -1268
  271. package/scripts/audit/index.cjs +0 -1927
  272. package/src/components/DataTable/components/DataTableBody.tsx +0 -478
  273. package/src/components/DataTable/components/DraggableColumnHeader.tsx +0 -156
  274. package/src/components/DataTable/components/ExpandButton.tsx +0 -113
  275. package/src/components/DataTable/components/GroupHeader.tsx +0 -54
  276. package/src/components/DataTable/components/ViewRowModal.tsx +0 -68
  277. package/src/components/DataTable/components/VirtualizedDataTable.tsx +0 -525
  278. package/src/components/DataTable/components/__tests__/ExpandButton.test.tsx +0 -462
  279. package/src/components/DataTable/components/__tests__/GroupHeader.test.tsx +0 -393
  280. package/src/components/DataTable/components/__tests__/ViewRowModal.test.tsx +0 -476
  281. package/src/components/DataTable/components/__tests__/VirtualizedDataTable.test.tsx +0 -128
  282. package/src/components/DataTable/core/DataTableContext.tsx +0 -216
  283. package/src/components/DataTable/core/__tests__/DataTableContext.test.tsx +0 -136
  284. package/src/components/DataTable/hooks/__tests__/useColumnReordering.test.ts +0 -570
  285. package/src/components/DataTable/hooks/useColumnReordering.ts +0 -123
  286. package/src/components/DataTable/utils/debugTools.ts +0 -514
  287. package/src/eslint-rules/index.cjs +0 -22
  288. package/src/eslint-rules/rules/components.cjs +0 -113
  289. package/src/eslint-rules/rules/imports.cjs +0 -102
  290. package/src/eslint-rules/rules/rbac.cjs +0 -790
  291. package/src/eslint-rules/utils/helpers.cjs +0 -42
  292. package/src/eslint-rules/utils/manifest-loader.cjs +0 -75
@@ -0,0 +1,385 @@
1
+ /**
2
+ * API & Tech Stack Rules (Standard 7)
3
+ * @package @jmruthers/pace-core
4
+ * @module ESLintRules/rules/api-tech-stack
5
+ *
6
+ * Enforces API and tech stack patterns from Standard 7:
7
+ * - RPC naming conventions (data_*, app_*)
8
+ * - React 19+ patterns (no class components)
9
+ * - import.meta.env usage (Vite) instead of process.env
10
+ *
11
+ * Reference: packages/core/docs/standards/7-api-tech-stack-standards.md
12
+ */
13
+
14
+ const { isPaceCoreSourceFile } = require('../utils/helpers.cjs');
15
+
16
+ module.exports = {
17
+ rules: {
18
+ /**
19
+ * Enforce RPC naming pattern: data_* for reads, app_* for writes
20
+ */
21
+ 'rpc-naming-pattern': {
22
+ meta: {
23
+ type: 'problem',
24
+ docs: {
25
+ description: 'Enforce RPC naming pattern: data_* for read operations, app_* for write operations',
26
+ category: 'Best Practices',
27
+ recommended: true,
28
+ url: 'https://github.com/jmruthers/pace-core/blob/main/packages/core/docs/standards/7-api-tech-stack-standards.md'
29
+ },
30
+ messages: {
31
+ invalidRpcNaming: "RPC '{{rpcName}}' does not follow naming pattern. Read operations must start with 'data_', write operations must start with 'app_' (e.g., data_events_list, app_event_create)",
32
+ invalidRpcVerb: "RPC '{{rpcName}}' uses invalid verb '{{verb}}'. Use only: list, get, create, update, delete, read, check, upsert, ensure, grant, insert, remove, revoke, resolve, bulk_create, bulk_update, bulk_import",
33
+ missingPrefix: "RPC '{{rpcName}}' must start with 'data_' (for read operations) or 'app_' (for write operations). Current name: '{{rpcName}}'. Suggested: '{{suggestedName}}'"
34
+ },
35
+ hasSuggestions: true
36
+ },
37
+ create(context) {
38
+ const filename = context.getFilename();
39
+
40
+ // Exclude pace-core source files - these rules are for consuming apps
41
+ if (isPaceCoreSourceFile(filename)) {
42
+ return {};
43
+ }
44
+
45
+ const validVerbs = ['list', 'get', 'create', 'update', 'delete', 'read', 'check', 'upsert', 'ensure', 'grant', 'insert', 'remove', 'revoke', 'resolve'];
46
+ const readVerbs = ['list', 'get', 'read', 'check', 'resolve'];
47
+ const writeVerbs = ['create', 'update', 'delete', 'upsert', 'bulk_create', 'bulk_update', 'bulk_import', 'ensure', 'grant', 'insert', 'remove', 'revoke'];
48
+ // Common qualifier patterns that can appear after the verb (e.g., _by_code, _by_id, _by_slug)
49
+ const qualifierPatterns = ['by_code', 'by_id', 'by_slug', 'by_name', 'by_email', 'by_uuid'];
50
+
51
+ /**
52
+ * Extract the verb from an RPC name, handling qualifiers like _by_code
53
+ * @param {string} rpcName - The RPC name (e.g., 'data_event_get_by_code')
54
+ * @returns {string|null} - The verb (e.g., 'get') or null if not found
55
+ */
56
+ function extractVerb(rpcName) {
57
+ const parts = rpcName.split('_');
58
+
59
+ // Remove prefix (data_ or app_)
60
+ if (parts[0] === 'data' || parts[0] === 'app') {
61
+ parts.shift();
62
+ }
63
+
64
+ // Look for valid verbs from the end, skipping qualifiers
65
+ for (let i = parts.length - 1; i >= 0; i--) {
66
+ // Check for bulk operations first (bulk_create, bulk_update, bulk_import)
67
+ // These span 2 parts, so check if parts[i-1]_parts[i] forms a bulk verb
68
+ if (i > 0) {
69
+ const bulkCandidate = `${parts[i - 1]}_${parts[i]}`;
70
+ if (writeVerbs.includes(bulkCandidate)) {
71
+ return bulkCandidate;
72
+ }
73
+ }
74
+
75
+ // Check for regular single-part verbs
76
+ const candidate = parts[i];
77
+ if (validVerbs.includes(candidate)) {
78
+ return candidate;
79
+ }
80
+
81
+ // Check if we're in a qualifier pattern
82
+ // Qualifiers like 'by_code' span multiple parts (e.g., 'by' + 'code')
83
+ // Check if the suffix from this position (or including previous part) matches any qualifier
84
+ const suffix = parts.slice(i).join('_');
85
+ const suffixWithPrev = i > 0 ? parts.slice(i - 1).join('_') : suffix;
86
+
87
+ if (qualifierPatterns.some(qp =>
88
+ suffix === qp ||
89
+ suffix.startsWith(qp + '_') ||
90
+ suffixWithPrev === qp ||
91
+ suffixWithPrev.startsWith(qp + '_')
92
+ )) {
93
+ // We're in a qualifier, continue searching backwards
94
+ continue;
95
+ }
96
+ }
97
+
98
+ return null;
99
+ }
100
+
101
+ // Updated pattern to allow verbs anywhere in the name (not just at the end)
102
+ // Pattern: (data_|app_) + domain/verb parts + optional qualifiers
103
+ // This allows patterns like: app_insert_event_app_access, app_ensure_page_permissions
104
+ const rpcPattern = /^(data_|app_)[a-z0-9_]+$/;
105
+
106
+ return {
107
+ CallExpression(node) {
108
+ // Check for supabase.rpc('rpc_name', ...)
109
+ if (node.callee.type === 'MemberExpression' &&
110
+ node.callee.property &&
111
+ node.callee.property.name === 'rpc' &&
112
+ node.arguments.length > 0) {
113
+
114
+ const firstArg = node.arguments[0];
115
+ if (firstArg.type === 'Literal' && typeof firstArg.value === 'string') {
116
+ const rpcName = firstArg.value;
117
+
118
+ // Skip if it's a variable (can't validate at lint time)
119
+ if (firstArg.type !== 'Literal') {
120
+ return;
121
+ }
122
+
123
+ // Check if RPC starts with required prefix
124
+ const hasDataPrefix = rpcName.startsWith('data_');
125
+ const hasAppPrefix = rpcName.startsWith('app_');
126
+
127
+ if (!hasDataPrefix && !hasAppPrefix) {
128
+ // RPC doesn't start with data_ or app_ prefix
129
+ // Try to determine the verb from the RPC name to suggest correct prefix
130
+ const parts = rpcName.split('_');
131
+ let verb = null;
132
+ let suggestedPrefix = 'data_'; // Default to data_ for read operations
133
+
134
+ // Look for verbs in the RPC name (check from the end)
135
+ for (let i = parts.length - 1; i >= 0; i--) {
136
+ const candidate = parts[i];
137
+ const candidateWithBulk = i > 0 ? `${parts[i - 1]}_${candidate}` : null;
138
+
139
+ // Check for bulk operations first
140
+ if (candidateWithBulk && writeVerbs.includes(candidateWithBulk)) {
141
+ verb = candidateWithBulk;
142
+ suggestedPrefix = 'app_';
143
+ break;
144
+ }
145
+
146
+ // Check for regular verbs
147
+ if (validVerbs.includes(candidate)) {
148
+ verb = candidate;
149
+ if (readVerbs.includes(candidate)) {
150
+ suggestedPrefix = 'data_';
151
+ } else if (writeVerbs.includes(candidate)) {
152
+ suggestedPrefix = 'app_';
153
+ }
154
+ break;
155
+ }
156
+ }
157
+
158
+ // Construct suggested name
159
+ // If we found a verb, suggest adding the prefix
160
+ // Otherwise, suggest data_ prefix (most common for read operations)
161
+ let suggestedName;
162
+ if (verb) {
163
+ // RPC already has a verb, just add the prefix
164
+ suggestedName = `${suggestedPrefix}${rpcName}`;
165
+ } else {
166
+ // Can't determine verb, suggest data_ as default
167
+ // User should review and adjust if it's a write operation
168
+ suggestedName = `data_${rpcName}`;
169
+ }
170
+
171
+ context.report({
172
+ node: firstArg,
173
+ messageId: 'missingPrefix',
174
+ data: {
175
+ rpcName,
176
+ suggestedName
177
+ },
178
+ suggest: [{
179
+ desc: `Rename to '${suggestedName}' (or 'app_${rpcName}' if it's a write operation)`,
180
+ fix(fixer) {
181
+ return null; // Complex fix - requires database migration
182
+ }
183
+ }]
184
+ });
185
+ return; // Don't check further if missing prefix
186
+ }
187
+
188
+ // Basic pattern check - just verify it starts with data_ or app_ and has valid characters
189
+ if (!rpcPattern.test(rpcName)) {
190
+ context.report({
191
+ node: firstArg,
192
+ messageId: 'invalidRpcNaming',
193
+ data: { rpcName },
194
+ suggest: [{
195
+ desc: `RPC name must follow pattern: data_<domain>_<verb> or app_<domain>_<verb>`,
196
+ fix(fixer) {
197
+ return null; // Complex fix
198
+ }
199
+ }]
200
+ });
201
+ return;
202
+ }
203
+
204
+ // Extract verb and validate prefix matches operation type
205
+ const verb = extractVerb(rpcName);
206
+
207
+ if (!verb) {
208
+ // Couldn't extract verb - this is okay for some RPCs that don't follow standard verb patterns
209
+ // But we still require the prefix, which we've already validated
210
+ return;
211
+ }
212
+
213
+ const isReadOperation = readVerbs.includes(verb);
214
+ const isWriteOperation = writeVerbs.includes(verb) || verb.startsWith('bulk_');
215
+
216
+ // Check if prefix matches verb type
217
+ const hasDataPrefixForVerb = rpcName.startsWith('data_');
218
+ const hasAppPrefixForVerb = rpcName.startsWith('app_');
219
+
220
+ if (hasDataPrefixForVerb && isWriteOperation) {
221
+ context.report({
222
+ node: firstArg,
223
+ messageId: 'invalidRpcNaming',
224
+ data: { rpcName },
225
+ suggest: [{
226
+ desc: `Use 'app_' prefix for write operations (${verb})`,
227
+ fix(fixer) {
228
+ return null; // Complex fix
229
+ }
230
+ }]
231
+ });
232
+ } else if (hasAppPrefixForVerb && isReadOperation) {
233
+ context.report({
234
+ node: firstArg,
235
+ messageId: 'invalidRpcNaming',
236
+ data: { rpcName },
237
+ suggest: [{
238
+ desc: `Use 'data_' prefix for read operations (${verb})`,
239
+ fix(fixer) {
240
+ return null; // Complex fix
241
+ }
242
+ }]
243
+ });
244
+ } else if (!isReadOperation && !isWriteOperation) {
245
+ // Verb not recognized - this might be a valid verb we haven't added yet
246
+ // Only report if it's clearly invalid
247
+ if (!validVerbs.includes(verb)) {
248
+ context.report({
249
+ node: firstArg,
250
+ messageId: 'invalidRpcVerb',
251
+ data: { rpcName, verb },
252
+ suggest: [{
253
+ desc: `Use valid verb: ${validVerbs.join(', ')}`,
254
+ fix(fixer) {
255
+ return null; // Complex fix
256
+ }
257
+ }]
258
+ });
259
+ }
260
+ }
261
+ }
262
+ }
263
+ }
264
+ };
265
+ }
266
+ },
267
+
268
+ /**
269
+ * Enforce React 19+ patterns: no class components
270
+ */
271
+ 'no-class-components': {
272
+ meta: {
273
+ type: 'problem',
274
+ docs: {
275
+ description: 'Disallow React class components. Use functional components with hooks (React 19+).',
276
+ category: 'Best Practices',
277
+ recommended: true,
278
+ url: 'https://github.com/jmruthers/pace-core/blob/main/packages/core/docs/standards/7-api-tech-stack-standards.md'
279
+ },
280
+ messages: {
281
+ classComponent: "Class components are not allowed. Use functional components with hooks instead (React 19+)."
282
+ },
283
+ hasSuggestions: true
284
+ },
285
+ create(context) {
286
+ const filename = context.getFilename();
287
+
288
+ // Exclude pace-core source files - these rules are for consuming apps
289
+ if (isPaceCoreSourceFile(filename)) {
290
+ return {};
291
+ }
292
+
293
+ return {
294
+ ClassDeclaration(node) {
295
+ // Check if class extends React.Component or Component
296
+ const hasReactExtends = node.superClass && (
297
+ (node.superClass.type === 'MemberExpression' &&
298
+ node.superClass.object?.name === 'React' &&
299
+ node.superClass.property?.name === 'Component') ||
300
+ (node.superClass.type === 'Identifier' &&
301
+ node.superClass.name === 'Component')
302
+ );
303
+
304
+ if (hasReactExtends) {
305
+ context.report({
306
+ node,
307
+ messageId: 'classComponent',
308
+ suggest: [{
309
+ desc: 'Convert to functional component with hooks',
310
+ fix(fixer) {
311
+ return null; // Complex conversion
312
+ }
313
+ }]
314
+ });
315
+ }
316
+ }
317
+ };
318
+ }
319
+ },
320
+
321
+ /**
322
+ * Enforce import.meta.env usage instead of process.env in client code
323
+ */
324
+ 'prefer-import-meta-env': {
325
+ meta: {
326
+ type: 'problem',
327
+ docs: {
328
+ description: 'Enforce import.meta.env (Vite) instead of process.env in client code',
329
+ category: 'Best Practices',
330
+ recommended: true,
331
+ url: 'https://github.com/jmruthers/pace-core/blob/main/packages/core/docs/standards/7-api-tech-stack-standards.md'
332
+ },
333
+ messages: {
334
+ processEnvUsage: "Use 'import.meta.env' (Vite) instead of 'process.env' in client code. process.env is Node.js and won't work in browser."
335
+ },
336
+ hasSuggestions: true
337
+ },
338
+ create(context) {
339
+ const filename = context.getFilename();
340
+
341
+ // Exclude pace-core source files - these rules are for consuming apps
342
+ if (isPaceCoreSourceFile(filename)) {
343
+ return {};
344
+ }
345
+
346
+ // Only check client code (not server/Node.js files)
347
+ // Exclude: scripts/, server/, node/, config files, and .config. files
348
+ const isNodeScript = filename.includes('/scripts/') ||
349
+ filename.includes('\\scripts\\') ||
350
+ filename.includes('/server/') ||
351
+ filename.includes('\\server\\') ||
352
+ filename.includes('/node/') ||
353
+ filename.includes('\\node\\') ||
354
+ filename.includes('config') ||
355
+ filename.match(/\.(config|server)\./);
356
+
357
+ if (isNodeScript) {
358
+ return {};
359
+ }
360
+
361
+ return {
362
+ MemberExpression(node) {
363
+ // Check for process.env usage
364
+ if (node.object?.type === 'Identifier' &&
365
+ node.object.name === 'process' &&
366
+ node.property?.type === 'Identifier' &&
367
+ node.property.name === 'env') {
368
+ context.report({
369
+ node,
370
+ messageId: 'processEnvUsage',
371
+ suggest: [{
372
+ desc: 'Replace with import.meta.env',
373
+ fix(fixer) {
374
+ // Replace process.env with import.meta.env
375
+ return fixer.replaceText(node, 'import.meta.env');
376
+ }
377
+ }]
378
+ });
379
+ }
380
+ }
381
+ };
382
+ }
383
+ }
384
+ }
385
+ };
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Testing Rules (Standard 8)
3
+ * @package @jmruthers/pace-core
4
+ * @module ESLintRules/rules/testing
5
+ *
6
+ * Enforces testing patterns from Standard 8:
7
+ * - Test file naming conventions (*.test.ts, *.test.tsx)
8
+ *
9
+ * Reference: packages/core/docs/standards/8-testing-documentation-standards.md
10
+ */
11
+
12
+ const path = require('path');
13
+ const fs = require('fs');
14
+ const { isPaceCoreSourceFile } = require('../utils/helpers.cjs');
15
+
16
+ module.exports = {
17
+ rules: {
18
+ /**
19
+ * Enforce test file naming: *.test.ts or *.test.tsx
20
+ */
21
+ 'test-file-naming': {
22
+ meta: {
23
+ type: 'suggestion',
24
+ docs: {
25
+ description: 'Enforce test file naming: *.test.ts or *.test.tsx (not *.spec.ts)',
26
+ category: 'Best Practices',
27
+ recommended: false,
28
+ url: 'https://github.com/jmruthers/pace-core/blob/main/packages/core/docs/standards/8-testing-documentation-standards.md'
29
+ },
30
+ messages: {
31
+ invalidTestFileName: "Test file '{{filename}}' should be named '{{expectedName}}.test.{{ext}}' instead of '{{currentName}}'"
32
+ },
33
+ hasSuggestions: true
34
+ },
35
+ create(context) {
36
+ const filename = context.getFilename();
37
+
38
+ // Exclude pace-core source files - these rules are for consuming apps
39
+ if (isPaceCoreSourceFile(filename)) {
40
+ return {};
41
+ }
42
+
43
+ // Only check test files
44
+ const isTestFile = filename.match(/\.(test|spec)\.(ts|tsx|js|jsx)$/);
45
+ if (!isTestFile) {
46
+ return {};
47
+ }
48
+
49
+ const basename = path.basename(filename);
50
+ const ext = path.extname(filename);
51
+ const nameWithoutExt = basename.replace(ext, '');
52
+
53
+ // Check if it uses .spec instead of .test
54
+ if (nameWithoutExt.endsWith('.spec')) {
55
+ const sourceName = nameWithoutExt.replace('.spec', '');
56
+ const expectedName = `${sourceName}.test${ext}`;
57
+
58
+ return {
59
+ Program(node) {
60
+ context.report({
61
+ node,
62
+ messageId: 'invalidTestFileName',
63
+ data: {
64
+ filename: basename,
65
+ expectedName,
66
+ currentName: basename
67
+ },
68
+ suggest: [{
69
+ desc: `Rename to ${expectedName}`,
70
+ fix(fixer) {
71
+ return null; // File rename requires filesystem operation
72
+ }
73
+ }]
74
+ });
75
+ }
76
+ };
77
+ }
78
+
79
+ // Check if test file is colocated with source file
80
+ // This is a suggestion, not an error
81
+ const sourceFile = filename.replace(/\.(test|spec)\.(ts|tsx|js|jsx)$/, '.$2');
82
+ const sourceExists = fs.existsSync(sourceFile);
83
+ const isInTestDir = filename.includes('/__tests__/') || filename.includes('/tests/');
84
+
85
+ if (!sourceExists && !isInTestDir) {
86
+ // Test file exists but source file doesn't - might be misnamed or in wrong location
87
+ // This is just informational, not an error
88
+ }
89
+
90
+ return {};
91
+ }
92
+ }
93
+ }
94
+ };
@@ -147,7 +147,7 @@ declare enum RPCFunction {
147
147
  RBAC_PAGE_ACCESS_CHECK = "rbac_page_access_check",
148
148
  RBAC_ROLE_GRANT = "rbac_role_grant",
149
149
  RBAC_ROLE_REVOKE = "rbac_role_revoke",
150
- RBAC_ROLES_LIST = "rbac_roles_list",
150
+ RBAC_ROLES_LIST = "data_rbac_roles_list",
151
151
  RBAC_ROLE_VALIDATE = "rbac_role_validate",
152
152
  RBAC_SESSION_TRACK = "rbac_session_track",
153
153
  RBAC_AUDIT_LOG = "rbac_audit_log"
package/dist/hooks.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { u as useToast } from './useToast-AyaT-x7p.js';
2
- import { S as StorageUploadOptions, a as StorageUploadResult, b as StorageListOptions, c as StorageListResult, d as StorageFileInfo } from './usePublicRouteParams-COZ28Mvq.js';
3
- export { O as OrganisationSecurityHook, l as UseAppConfigReturn, i as UseFormDialogOptions, j as UseFormDialogReturn, U as UseOrganisationPermissionsReturn, F as UsePublicEventLogoOptions, E as UsePublicEventLogoReturn, B as UsePublicEventOptions, A as UsePublicEventReturn, D as UsePublicFileDisplayOptions, C as UsePublicFileDisplayReturn, G as UsePublicRouteParamsReturn, n as clearPublicEventCache, q as clearPublicFileDisplayCache, t as clearPublicLogoCache, z as extractEventCodeFromPath, y as generatePublicRoutePath, o as getPublicEventCacheStats, r as getPublicFileDisplayCacheStats, v as getPublicLogoCacheStats, k as useAppConfig, u as useEventTheme, h as useFormDialog, e as useOrganisationPermissions, f as useOrganisationSecurity, m as usePublicEvent, x as usePublicEventCode, s as usePublicEventLogo, p as usePublicFileDisplay, w as usePublicRouteParams, g as useZodForm } from './usePublicRouteParams-COZ28Mvq.js';
2
+ import { S as StorageUploadOptions, a as StorageUploadResult, b as StorageListOptions, c as StorageListResult, d as StorageFileInfo } from './usePublicRouteParams-MamNgwqe.js';
3
+ export { O as OrganisationSecurityHook, l as UseAppConfigReturn, i as UseFormDialogOptions, j as UseFormDialogReturn, U as UseOrganisationPermissionsReturn, F as UsePublicEventLogoOptions, E as UsePublicEventLogoReturn, B as UsePublicEventOptions, A as UsePublicEventReturn, D as UsePublicFileDisplayOptions, C as UsePublicFileDisplayReturn, G as UsePublicRouteParamsReturn, n as clearPublicEventCache, q as clearPublicFileDisplayCache, t as clearPublicLogoCache, z as extractEventCodeFromPath, y as generatePublicRoutePath, o as getPublicEventCacheStats, r as getPublicFileDisplayCacheStats, v as getPublicLogoCacheStats, k as useAppConfig, u as useEventTheme, h as useFormDialog, e as useOrganisationPermissions, f as useOrganisationSecurity, m as usePublicEvent, x as usePublicEventCode, s as usePublicEventLogo, p as usePublicFileDisplay, w as usePublicRouteParams, g as useZodForm } from './usePublicRouteParams-MamNgwqe.js';
4
4
  import * as React$1 from 'react';
5
5
  import { SortingState, ColumnFiltersState, ExpandedState } from '@tanstack/react-table';
6
- import { d as DataRecord, g as PerformanceConfig, S as ServerSideConfig, C as ChunkingConfig, i as SearchIndexConfig, h as PaginationMode, k as ServerSideParams, l as ServerSideResponse, A as AutocompleteOptions, m as GooglePlaceAutocompletePrediction, P as ParsedAddress } from './types-B-K_5VnO.js';
6
+ import { d as DataRecord, g as PerformanceConfig, S as ServerSideConfig, C as ChunkingConfig, i as SearchIndexConfig, h as PaginationMode, k as ServerSideParams, l as ServerSideResponse, A as AutocompleteOptions, m as GooglePlaceAutocompletePrediction, P as ParsedAddress } from './types-DXstZpNI.js';
7
7
  export { u as useComponentPerformance } from './useComponentPerformance-DE9l5RkL.js';
8
8
  import { SupabaseClient } from '@supabase/supabase-js';
9
9
  import { D as Database } from './database.generated-CcnC_DRc.js';
@@ -455,8 +455,8 @@ declare const queryCacheHelpers: {
455
455
  * FileCategory.EVENT_LOGOS
456
456
  * );
457
457
  *
458
- * if (isLoading) return <div>Loading...</div>;
459
- * if (error) return <div>Error: {error.message}</div>;
458
+ * if (isLoading) return <p>Loading...</p>;
459
+ * if (error) return <p>Error: {error.message}</p>;
460
460
  *
461
461
  * return fileUrl ? <img src={fileUrl} alt="File" /> : null;
462
462
  * }
package/dist/hooks.js CHANGED
@@ -1,18 +1,18 @@
1
- export { clearPublicEventCache, clearPublicLogoCache, extractEventCodeFromPath, generatePublicRoutePath, getPublicEventCacheStats, getPublicLogoCacheStats, useFormDialog, useOrganisationPermissions, usePublicEvent, usePublicEventCode, usePublicEventLogo, usePublicRouteParams, useZodForm } from './chunk-MAGBIDNS.js';
2
- import { getPublicUrl, getSignedUrl, uploadFile, deleteFile, archiveFile, listFiles } from './chunk-FENMYN2U.js';
3
- export { cleanupQueryCache, clearFileDisplayCache, clearPublicFileDisplayCache, getFileDisplayCacheStats, getPublicFileDisplayCacheStats, invalidateFileDisplayCache, queryCacheHelpers, useAddressAutocomplete, useDebounce, useEventTheme, useFileDisplay, usePreventTabReload, usePublicFileDisplay, useQueryCache } from './chunk-FENMYN2U.js';
4
- import './chunk-BVP2BCJF.js';
1
+ export { clearPublicEventCache, clearPublicLogoCache, extractEventCodeFromPath, generatePublicRoutePath, getPublicEventCacheStats, getPublicLogoCacheStats, useFormDialog, useOrganisationPermissions, usePublicEvent, usePublicEventCode, usePublicEventLogo, usePublicRouteParams, useZodForm } from './chunk-4DDCYDQ3.js';
2
+ import { getPublicUrl, getSignedUrl, uploadFile, deleteFile, archiveFile, listFiles } from './chunk-MPBLMWVR.js';
3
+ export { cleanupQueryCache, clearFileDisplayCache, clearPublicFileDisplayCache, getFileDisplayCacheStats, getPublicFileDisplayCacheStats, invalidateFileDisplayCache, queryCacheHelpers, useAddressAutocomplete, useDebounce, useEventTheme, useFileDisplay, usePreventTabReload, usePublicFileDisplay, useQueryCache } from './chunk-MPBLMWVR.js';
4
+ import './chunk-5W2A3DRC.js';
5
5
  export { useDataTablePerformance, useFocusTrap, useToast } from './chunk-S7DKJPLT.js';
6
- export { useAppConfig, useOrganisationSecurity } from './chunk-3O3WHILE.js';
6
+ export { useAppConfig, useOrganisationSecurity } from './chunk-EF2UGZWY.js';
7
7
  import './chunk-C7NSAPTL.js';
8
- import './chunk-FTCRZOG2.js';
9
- import './chunk-ZFYPMX46.js';
8
+ import './chunk-T5CVK4R3.js';
9
+ import './chunk-LX6U42O3.js';
10
10
  import './chunk-AHU7G2R5.js';
11
11
  import './chunk-6QYDGKQY.js';
12
12
  import './chunk-4SXLQIZO.js';
13
13
  export { useComponentPerformance } from './chunk-6GLLNA6U.js';
14
14
  import './chunk-FYHN4DD5.js';
15
- import { performanceBudgetMonitor, PERFORMANCE_BUDGETS } from './chunk-SD6WQY43.js';
15
+ import { performanceBudgetMonitor, PERFORMANCE_BUDGETS } from './chunk-7ILTDCL2.js';
16
16
  import './chunk-HF6O3O37.js';
17
17
  import { createLogger } from './chunk-TTRFSOKR.js';
18
18
  import './chunk-3RG5ZIWI.js';
package/dist/index.d.ts CHANGED
@@ -8,16 +8,16 @@ import { i as OrganisationProviderProps$1, E as Event, h as OrganisationContextT
8
8
  export { O as Organisation, a as OrganisationMembership, g as OrganisationSecurityError, U as UserProfile } from './event-CW5YB_2p.js';
9
9
  import { S as SessionRestorationState } from './auth-BZOJqrdd.js';
10
10
  export { A as AccessLevel, E as EventAppRole, G as GlobalRole, I as InvalidScopeError, M as MissingUserContextError, O as Operation, e as OrganisationContextRequiredError, c as OrganisationRole, P as Permission, a as PermissionCheck, d as PermissionDeniedError, b as PermissionMap, R as RBACError, f as RBACNotInitializedError, S as Scope, U as UUID } from './types-BeoeWV5I.js';
11
- export { A as AccessLevelContext, s as AuditEventType, P as PermissionSource, d as RBACAccessValidateParams, e as RBACAccessValidateResult, q as RBACAuditLogParams, r as RBACAuditLogResult, t as RBACContext, w as RBACErrorCode, v as RBACFunctionResponse, f as RBACPageAccessCheckParams, R as RBACPermissionCheckParams, a as RBACPermissionCheckResult, b as RBACPermissionsGetParams, c as RBACPermissionsGetResult, u as RBACResult, g as RBACRoleGrantParams, h as RBACRoleGrantResult, i as RBACRoleRevokeParams, j as RBACRoleRevokeResult, m as RBACRoleValidateParams, n as RBACRoleValidateResult, k as RBACRolesListParams, l as RBACRolesListResult, o as RBACSessionTrackParams, p as RBACSessionTrackResult, x as RPCFunction, S as SessionType } from './functions-DHebl8-F.js';
11
+ export { A as AccessLevelContext, s as AuditEventType, P as PermissionSource, d as RBACAccessValidateParams, e as RBACAccessValidateResult, q as RBACAuditLogParams, r as RBACAuditLogResult, t as RBACContext, w as RBACErrorCode, v as RBACFunctionResponse, f as RBACPageAccessCheckParams, R as RBACPermissionCheckParams, a as RBACPermissionCheckResult, b as RBACPermissionsGetParams, c as RBACPermissionsGetResult, u as RBACResult, g as RBACRoleGrantParams, h as RBACRoleGrantResult, i as RBACRoleRevokeParams, j as RBACRoleRevokeResult, m as RBACRoleValidateParams, n as RBACRoleValidateResult, k as RBACRolesListParams, l as RBACRolesListResult, o as RBACSessionTrackParams, p as RBACSessionTrackResult, x as RPCFunction, S as SessionType } from './functions-lBy5L2ry.js';
12
12
  export { ALL_PERMISSIONS, AccessDenied, AccessDeniedProps, AllPermissions, CACHE_PATTERNS, ComplianceResult, DatabaseComplianceResult, DatabaseIssue, EVENT_APP_PERMISSIONS, EventAppRoleData, GLOBAL_PERMISSIONS, GrantEventAppRoleParams, NavigationGuard, NavigationGuardProps, ORGANISATION_PERMISSIONS, PAGE_PERMISSIONS, PagePermissionGuard, PagePermissionGuardProps, QuickFix, RBACAuditManager, RBACCache, RBACConfig, RBACEngine, RBACLogger, RBACPerformanceMetrics, ResourcePermissions, RevokeEventAppRoleParams, RoleManagementResult, RuntimeComplianceResult, SECURE_CLIENT_SYMBOL, SecureSupabaseClient, SetupIssue, UseResolvedScopeOptions, UseResolvedScopeReturn, UseResourcePermissionsOptions, checkRuntimeCompliance, clearInFlightRequests, createAuditManager, createRBACConfig, createRBACEngine, createRBACExpressMiddleware, createRBACMiddleware, createSecureClient, disablePerformanceMonitoring, emitAuditEvent, enablePerformanceMonitoring, fromSupabaseClient, getAccessLevel, getCustomAuthCodeFixes, getDirectSupabaseAuthFixes, getDuplicateConfigFixes, getGlobalAuditManager, getInFlightRequestCount, getPerformanceMetrics, getPerformanceSummary, getPermissionMap, getQuickFixes, getRBACConfig, getRBACLogger, getRoleContext, getSetupIssues, getUnprotectedPageFixes, hasAllPermissions, hasAnyPermission, isDebugMode, isDevelopmentMode, isPerformanceMonitoringEnabled, isPermitted, isPermittedCached, isRBACInitialized, isSecureClient, isValidPermission, rbacCache, recordAuditEvent, recordPermissionCheck, resetPerformanceMetrics, resolveAppContext, setGlobalAuditManager, setupRBAC, useAccessLevel, useCan, useMultiplePermissions, usePermissions, useRBAC, useResolvedScope, useResourcePermissions, useRoleManagement, useSecureSupabase, validateAndWarn, validateDatabaseConfiguration, validateRBACSetup, warnIfInsecureClient, withAccessLevelGuard, withPermissionGuard, withRoleGuard } from './rbac/index.js';
13
- export { A as AddressField, k as AddressFieldProps, l as AddressFieldRef, o as Alert, q as AlertDescription, p as AlertTitle, r as Avatar, s as AvatarProps, t as Badge, u as BadgeProps, v as BadgeVariant, B as Button, a as ButtonProps, am as Calendar, an as CalendarProps, C as Card, g as CardActions, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, w as Checkbox, aP as ContextSelector, aQ as ContextSelectorProps, M as Dialog, V as DialogBody, a4 as DialogBodyProps, Q as DialogClose, a1 as DialogCloseProps, R as DialogContent, $ as DialogContentProps, Y as DialogDescription, W as DialogFooter, a3 as DialogFooterProps, U as DialogHeader, a2 as DialogHeaderProps, N as DialogPortal, a0 as DialogPortalProps, Z as DialogProps, a5 as DialogSize, X as DialogTitle, O as DialogTrigger, _ as DialogTriggerProps, aS as ErrorBoundary, aU as ErrorBoundaryProps, aT as ErrorBoundaryProvider, aW as ErrorBoundaryProviderProps, aV as ErrorBoundaryState, b1 as FileDisplay, b2 as FileDisplayProps, a$ as FileUpload, b0 as FileUploadProps, aK as Footer, aL as FooterProps, aD as Form, aE as FormField, aG as FormFieldProps, aF as FormProps, aX as GlobalErrorHandler, aJ as Header, I as Input, j as InputProps, L as Label, m as LabelProps, aY as LoadingSpinner, aH as LoginForm, aI as LoginFormProps, aO as NavigationMenu, bk as PaceAppLayout, bj as PaceAppLayoutProps, bm as PaceLoginPage, bl as PaceLoginPageProps, bo as PasswordChangeForm, P as Progress, y as ProgressProps, aM as ProtectedRoute, aN as ProtectedRouteProps, bc as PublicPageFooter, bi as PublicPageFooterProps, bb as PublicPageHeader, bh as PublicPageHeaderProps, ba as PublicPageLayout, bg as PublicPageLayoutProps, bd as PublicPageProvider, a6 as Select, aa as SelectContent, a7 as SelectGroup, ac as SelectItem, ab as SelectLabel, ad as SelectSeparator, a9 as SelectTrigger, a8 as SelectValue, aZ as SessionRestorationLoader, a_ as SessionRestorationLoaderProps, S as Switch, x as SwitchProps, z as Table, E as TableBody, F as TableCaption, G as TableCell, H as TableFooter, J as TableHead, D as TableHeader, K as TableRow, ae as Tabs, ah as TabsContent, al as TabsContentProps, af as TabsList, aj as TabsListProps, ai as TabsProps, ag as TabsTrigger, ak as TabsTriggerProps, T as Textarea, n as TextareaProps, ao as Toast, aq as ToastAction, aw as ToastActionElement, av as ToastClose, au as ToastDescription, ax as ToastProps, ar as ToastProvider, at as ToastTitle, as as ToastViewport, ap as Toaster, ay as Tooltip, aA as TooltipContent, aB as TooltipProvider, aC as TooltipRoot, az as TooltipTrigger, b9 as UseFileReferenceForRecordReturn, b7 as UseFileReferenceOptions, b8 as UseFileReferenceReturn, aR as UserMenu, bn as UserMenuProps, b3 as useFileReference, b5 as useFileReferenceById, b4 as useFileReferenceForRecord, b6 as useFilesByCategory, bf as useIsPublicPage, be as usePublicPageContext } from './PublicPageProvider-BBH6Vqg7.js';
13
+ export { A as AddressField, k as AddressFieldProps, l as AddressFieldRef, o as Alert, q as AlertDescription, p as AlertTitle, r as Avatar, s as AvatarProps, t as Badge, u as BadgeProps, v as BadgeVariant, B as Button, a as ButtonProps, am as Calendar, an as CalendarProps, C as Card, g as CardActions, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, w as Checkbox, aP as ContextSelector, aQ as ContextSelectorProps, M as Dialog, V as DialogBody, a4 as DialogBodyProps, Q as DialogClose, a1 as DialogCloseProps, R as DialogContent, $ as DialogContentProps, Y as DialogDescription, W as DialogFooter, a3 as DialogFooterProps, U as DialogHeader, a2 as DialogHeaderProps, N as DialogPortal, a0 as DialogPortalProps, Z as DialogProps, a5 as DialogSize, X as DialogTitle, O as DialogTrigger, _ as DialogTriggerProps, aS as ErrorBoundary, aU as ErrorBoundaryProps, aT as ErrorBoundaryProvider, aW as ErrorBoundaryProviderProps, aV as ErrorBoundaryState, b1 as FileDisplay, b2 as FileDisplayProps, a$ as FileUpload, b0 as FileUploadProps, aK as Footer, aL as FooterProps, aD as Form, aE as FormField, aG as FormFieldProps, aF as FormProps, aX as GlobalErrorHandler, aJ as Header, I as Input, j as InputProps, L as Label, m as LabelProps, aY as LoadingSpinner, aH as LoginForm, aI as LoginFormProps, aO as NavigationMenu, bk as PaceAppLayout, bj as PaceAppLayoutProps, bm as PaceLoginPage, bl as PaceLoginPageProps, bo as PasswordChangeForm, P as Progress, y as ProgressProps, aM as ProtectedRoute, aN as ProtectedRouteProps, bc as PublicPageFooter, bi as PublicPageFooterProps, bb as PublicPageHeader, bh as PublicPageHeaderProps, ba as PublicPageLayout, bg as PublicPageLayoutProps, bd as PublicPageProvider, a6 as Select, aa as SelectContent, a7 as SelectGroup, ac as SelectItem, ab as SelectLabel, ad as SelectSeparator, a9 as SelectTrigger, a8 as SelectValue, aZ as SessionRestorationLoader, a_ as SessionRestorationLoaderProps, S as Switch, x as SwitchProps, z as Table, E as TableBody, F as TableCaption, G as TableCell, H as TableFooter, J as TableHead, D as TableHeader, K as TableRow, ae as Tabs, ah as TabsContent, al as TabsContentProps, af as TabsList, aj as TabsListProps, ai as TabsProps, ag as TabsTrigger, ak as TabsTriggerProps, T as Textarea, n as TextareaProps, ao as Toast, aq as ToastAction, aw as ToastActionElement, av as ToastClose, au as ToastDescription, ax as ToastProps, ar as ToastProvider, at as ToastTitle, as as ToastViewport, ap as Toaster, ay as Tooltip, aA as TooltipContent, aB as TooltipProvider, aC as TooltipRoot, az as TooltipTrigger, b9 as UseFileReferenceForRecordReturn, b7 as UseFileReferenceOptions, b8 as UseFileReferenceReturn, aR as UserMenu, bn as UserMenuProps, b3 as useFileReference, b5 as useFileReferenceById, b4 as useFileReferenceForRecord, b6 as useFilesByCategory, bf as useIsPublicPage, be as usePublicPageContext } from './PublicPageProvider-CIGSujI2.js';
14
14
  export { u as useToast } from './useToast-AyaT-x7p.js';
15
- export { D as DataTable, a as DataTableProps } from './DataTable-2N_tqbfq.js';
16
- import { d as DataRecord, a as DataTableAction, D as DataTableColumn } from './types-B-K_5VnO.js';
17
- export { c as AggregateConfig, A as AutocompleteOptions, f as DataTableFeatureConfig, b as DataTableToolbarButton, E as EmptyStateConfig, j as ExportOptions, G as GetRowId, P as ParsedAddress } from './types-B-K_5VnO.js';
15
+ export { D as DataTable, a as DataTableProps } from './DataTable-DRUIgtUH.js';
16
+ import { d as DataRecord, a as DataTableAction, D as DataTableColumn } from './types-DXstZpNI.js';
17
+ export { c as AggregateConfig, A as AutocompleteOptions, f as DataTableFeatureConfig, b as DataTableToolbarButton, E as EmptyStateConfig, j as ExportOptions, G as GetRowId, P as ParsedAddress } from './types-DXstZpNI.js';
18
18
  import { ColumnDef } from '@tanstack/react-table';
19
- import { H as FileSizeLimits, I as StorageConfig, S as StorageUploadOptions, J as StorageFileMetadata, a as StorageUploadResult, K as StorageUrlOptions, b as StorageListOptions, c as StorageListResult } from './usePublicRouteParams-COZ28Mvq.js';
20
- export { d as StorageFileInfo, i as UseFormDialogOptions, j as UseFormDialogReturn, F as UsePublicEventLogoOptions, E as UsePublicEventLogoReturn, B as UsePublicEventOptions, A as UsePublicEventReturn, D as UsePublicFileDisplayOptions, C as UsePublicFileDisplayReturn, G as UsePublicRouteParamsReturn, n as clearPublicEventCache, q as clearPublicFileDisplayCache, t as clearPublicLogoCache, z as extractEventCodeFromPath, y as generatePublicRoutePath, o as getPublicEventCacheStats, r as getPublicFileDisplayCacheStats, v as getPublicLogoCacheStats, k as useAppConfig, u as useEventTheme, h as useFormDialog, e as useOrganisationPermissions, f as useOrganisationSecurity, m as usePublicEvent, x as usePublicEventCode, s as usePublicEventLogo, p as usePublicFileDisplay, w as usePublicRouteParams, g as useZodForm } from './usePublicRouteParams-COZ28Mvq.js';
19
+ import { H as FileSizeLimits, I as StorageConfig, S as StorageUploadOptions, J as StorageFileMetadata, a as StorageUploadResult, K as StorageUrlOptions, b as StorageListOptions, c as StorageListResult } from './usePublicRouteParams-MamNgwqe.js';
20
+ export { d as StorageFileInfo, i as UseFormDialogOptions, j as UseFormDialogReturn, F as UsePublicEventLogoOptions, E as UsePublicEventLogoReturn, B as UsePublicEventOptions, A as UsePublicEventReturn, D as UsePublicFileDisplayOptions, C as UsePublicFileDisplayReturn, G as UsePublicRouteParamsReturn, n as clearPublicEventCache, q as clearPublicFileDisplayCache, t as clearPublicLogoCache, z as extractEventCodeFromPath, y as generatePublicRoutePath, o as getPublicEventCacheStats, r as getPublicFileDisplayCacheStats, v as getPublicLogoCacheStats, k as useAppConfig, u as useEventTheme, h as useFormDialog, e as useOrganisationPermissions, f as useOrganisationSecurity, m as usePublicEvent, x as usePublicEventCode, s as usePublicEventLogo, p as usePublicFileDisplay, w as usePublicRouteParams, g as useZodForm } from './usePublicRouteParams-MamNgwqe.js';
21
21
  export { z } from 'zod';
22
22
  export { F as FileCategory, b as FileMetadata, a as FileReference, c as FileUploadOptions } from './file-reference-BavO2eQj.js';
23
23
  import { SupabaseClient } from '@supabase/supabase-js';