@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
@@ -1,11 +1,5 @@
1
1
  import { createLogger } from './chunk-TTRFSOKR.js';
2
2
  import { __require } from './chunk-3RG5ZIWI.js';
3
- import { clsx } from 'clsx';
4
- import { twMerge } from 'tailwind-merge';
5
-
6
- function cn(...inputs) {
7
- return twMerge(clsx(inputs));
8
- }
9
3
 
10
4
  // src/utils/app/appNameResolver.ts
11
5
  var log = createLogger("AppNameResolver");
@@ -108,4 +102,4 @@ function getCurrentAppNameWithFallback(fallback = "default-app") {
108
102
  return getCurrentAppName() || fallback;
109
103
  }
110
104
 
111
- export { cn, getAppNameFromBuildTime, getAppNameFromEnvironment, getAppNameFromGlobal, getAppNameFromPackageJson, getCurrentAppName, getCurrentAppNameWithFallback, setRBACAppName };
105
+ export { getAppNameFromBuildTime, getAppNameFromEnvironment, getAppNameFromGlobal, getAppNameFromPackageJson, getCurrentAppName, getCurrentAppNameWithFallback, setRBACAppName };
@@ -1,4 +1,4 @@
1
- import { Button } from './chunk-7TYHROIV.js';
1
+ import { Button } from './chunk-GS5672WG.js';
2
2
  import { ShieldX } from 'lucide-react';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
 
@@ -1,4 +1,4 @@
1
- import { isRBACInitialized, setupRBAC } from './chunk-ZFYPMX46.js';
1
+ import { isRBACInitialized, setupRBAC } from './chunk-LX6U42O3.js';
2
2
  import { assertOrganisationId, assertUserId } from './chunk-4SXLQIZO.js';
3
3
  import { secureStorage } from './chunk-HF6O3O37.js';
4
4
  import { createLogger, logger } from './chunk-TTRFSOKR.js';
@@ -1017,7 +1017,7 @@ var _OrganisationService = class _OrganisationService extends BaseService {
1017
1017
  let userIsSuperAdmin = false;
1018
1018
  if (this.user?.id) {
1019
1019
  try {
1020
- const { isSuperAdmin: checkSuperAdmin, isRBACInitialized: isRBACInitialized2, setupRBAC: setupRBAC2 } = await import('./api-Y4MQWOFW.js');
1020
+ const { isSuperAdmin: checkSuperAdmin, isRBACInitialized: isRBACInitialized2, setupRBAC: setupRBAC2 } = await import('./api-7P7DI652.js');
1021
1021
  if (!isRBACInitialized2() && this.supabaseClient) {
1022
1022
  setupRBAC2(this.supabaseClient);
1023
1023
  }
@@ -1276,7 +1276,7 @@ var _EventService = class _EventService extends BaseService {
1276
1276
  this.setSelectedEventId = setSelectedEventId;
1277
1277
  if (user?.id) {
1278
1278
  try {
1279
- const { isRBACInitialized: isRBACInitialized2, isSuperAdmin: checkSuperAdmin, setupRBAC: setupRBAC2 } = await import('./api-Y4MQWOFW.js');
1279
+ const { isRBACInitialized: isRBACInitialized2, isSuperAdmin: checkSuperAdmin, setupRBAC: setupRBAC2 } = await import('./api-7P7DI652.js');
1280
1280
  if (!isRBACInitialized2() && this.supabaseClient) {
1281
1281
  setupRBAC2(this.supabaseClient);
1282
1282
  }
@@ -1490,7 +1490,7 @@ var _EventService = class _EventService extends BaseService {
1490
1490
  let organisationIdForRpc = null;
1491
1491
  let userIsSuperAdmin = this.isSuperAdmin;
1492
1492
  try {
1493
- const { isRBACInitialized: isRBACInitialized2, isSuperAdmin: checkSuperAdmin, setupRBAC: setupRBAC2 } = await import('./api-Y4MQWOFW.js');
1493
+ const { isRBACInitialized: isRBACInitialized2, isSuperAdmin: checkSuperAdmin, setupRBAC: setupRBAC2 } = await import('./api-7P7DI652.js');
1494
1494
  if (!isRBACInitialized2() && this.supabaseClient) {
1495
1495
  setupRBAC2(this.supabaseClient);
1496
1496
  }
@@ -2386,7 +2386,7 @@ function UnifiedAuthContextProvider({
2386
2386
  resolvedUserIdRef.current = currentUserId;
2387
2387
  const userId = currentUserId;
2388
2388
  const appNameValue = appName;
2389
- import('./api-Y4MQWOFW.js').then(async ({ resolveAppContext, setupRBAC: setupRBAC2 }) => {
2389
+ import('./api-7P7DI652.js').then(async ({ resolveAppContext, setupRBAC: setupRBAC2 }) => {
2390
2390
  try {
2391
2391
  setupRBAC2(supabase);
2392
2392
  const result = await resolveAppContext({
@@ -1,7 +1,7 @@
1
- import { AccessDenied } from './chunk-4T7OBVTU.js';
2
- import { useResolvedScope, scopeEqual, useCan, useMultiplePermissions } from './chunk-7TYHROIV.js';
3
- import { useUnifiedAuth } from './chunk-FTCRZOG2.js';
4
- import { getRBACLogger, getRBACConfig, RBACNotInitializedError } from './chunk-ZFYPMX46.js';
1
+ import { AccessDenied } from './chunk-S6ZQKDY6.js';
2
+ import { useResolvedScope, scopeEqual, useCan, useMultiplePermissions } from './chunk-GS5672WG.js';
3
+ import { useUnifiedAuth } from './chunk-T5CVK4R3.js';
4
+ import { getRBACLogger, getRBACConfig, RBACNotInitializedError } from './chunk-LX6U42O3.js';
5
5
  import { createLogger } from './chunk-TTRFSOKR.js';
6
6
  import React, { useRef, useMemo, useState, useEffect } from 'react';
7
7
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
@@ -14,7 +14,7 @@ var RPCFunction = /* @__PURE__ */ ((RPCFunction2) => {
14
14
  RPCFunction2["RBAC_PAGE_ACCESS_CHECK"] = "rbac_page_access_check";
15
15
  RPCFunction2["RBAC_ROLE_GRANT"] = "rbac_role_grant";
16
16
  RPCFunction2["RBAC_ROLE_REVOKE"] = "rbac_role_revoke";
17
- RPCFunction2["RBAC_ROLES_LIST"] = "rbac_roles_list";
17
+ RPCFunction2["RBAC_ROLES_LIST"] = "data_rbac_roles_list";
18
18
  RPCFunction2["RBAC_ROLE_VALIDATE"] = "rbac_role_validate";
19
19
  RPCFunction2["RBAC_SESSION_TRACK"] = "rbac_session_track";
20
20
  RPCFunction2["RBAC_AUDIT_LOG"] = "rbac_audit_log";
@@ -74,7 +74,7 @@ var PagePermissionGuardComponent = ({
74
74
  const checkSuperAdmin = async () => {
75
75
  const startTime = Date.now();
76
76
  try {
77
- const { isSuperAdmin: checkSuperAdmin2 } = await import('./api-Y4MQWOFW.js');
77
+ const { isSuperAdmin: checkSuperAdmin2 } = await import('./api-7P7DI652.js');
78
78
  const timeoutPromise = new Promise((_, reject) => {
79
79
  setTimeout(() => reject(new Error("Super admin check timeout")), 1e4);
80
80
  });
@@ -377,7 +377,7 @@ function withPermissionGuard(config, handler) {
377
377
  if (!userId || !organisationId) {
378
378
  throw new Error("User context required for permission check");
379
379
  }
380
- const { isPermitted: isPermitted2 } = await import('./api-Y4MQWOFW.js');
380
+ const { isPermitted: isPermitted2 } = await import('./api-7P7DI652.js');
381
381
  const hasPermission = await isPermitted2({
382
382
  userId,
383
383
  scope: { organisationId, eventId, appId },
@@ -400,7 +400,7 @@ function withAccessLevelGuard(minLevel, handler) {
400
400
  if (!userId || !organisationId) {
401
401
  throw new Error("User context required for access level check");
402
402
  }
403
- const { getAccessLevel: getAccessLevel2 } = await import('./api-Y4MQWOFW.js');
403
+ const { getAccessLevel: getAccessLevel2 } = await import('./api-7P7DI652.js');
404
404
  const accessLevel = await getAccessLevel2({
405
405
  userId,
406
406
  scope: { organisationId, eventId, appId }
@@ -425,7 +425,7 @@ function withRoleGuard(config, handler) {
425
425
  throw new Error("User context required for role check");
426
426
  }
427
427
  if (config.globalRoles && config.globalRoles.length > 0) {
428
- const { isSuperAdmin } = await import('./api-Y4MQWOFW.js');
428
+ const { isSuperAdmin } = await import('./api-7P7DI652.js');
429
429
  const isSuper = await isSuperAdmin(userId);
430
430
  if (isSuper) {
431
431
  if (organisationId) {
@@ -451,14 +451,14 @@ function withRoleGuard(config, handler) {
451
451
  }
452
452
  }
453
453
  if (config.organisationRoles && config.organisationRoles.length > 0) {
454
- const { isOrganisationAdmin } = await import('./api-Y4MQWOFW.js');
454
+ const { isOrganisationAdmin } = await import('./api-7P7DI652.js');
455
455
  const isOrgAdmin = await isOrganisationAdmin(userId, organisationId);
456
456
  if (!isOrgAdmin && config.requireAll !== false) {
457
457
  throw new Error(`Organisation admin role required`);
458
458
  }
459
459
  }
460
460
  if (config.eventAppRoles && config.eventAppRoles.length > 0 && eventId && appId) {
461
- const { isEventAdmin } = await import('./api-Y4MQWOFW.js');
461
+ const { isEventAdmin } = await import('./api-7P7DI652.js');
462
462
  const isEventAdminUser = await isEventAdmin(userId, { organisationId, eventId, appId });
463
463
  if (!isEventAdminUser && config.requireAll !== false) {
464
464
  throw new Error(`Event admin role required`);
@@ -498,7 +498,7 @@ function createRBACMiddleware(config) {
498
498
  );
499
499
  if (protectedRoute) {
500
500
  try {
501
- const { isPermitted: isPermitted2 } = await import('./api-Y4MQWOFW.js');
501
+ const { isPermitted: isPermitted2 } = await import('./api-7P7DI652.js');
502
502
  const hasPermission = await isPermitted2({
503
503
  userId,
504
504
  scope: { organisationId },
@@ -525,7 +525,7 @@ function createRBACExpressMiddleware(config) {
525
525
  return res.status(401).json({ error: "User context required" });
526
526
  }
527
527
  try {
528
- const { isPermitted: isPermitted2 } = await import('./api-Y4MQWOFW.js');
528
+ const { isPermitted: isPermitted2 } = await import('./api-7P7DI652.js');
529
529
  const hasPermission = await isPermitted2({
530
530
  userId,
531
531
  scope: { organisationId, eventId, appId },
@@ -1,9 +1,9 @@
1
1
  export { a as UnifiedAuthContextType, d as UnifiedAuthProvider, c as UnifiedAuthProviderProps, u as useUnifiedAuth } from './UnifiedAuthProvider-CKvHP1MK.js';
2
- 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, i as CardActionsProps, 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, 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, b3 as useFileReference, b5 as useFileReferenceById, b4 as useFileReferenceForRecord, b6 as useFilesByCategory, bf as useIsPublicPage, be as usePublicPageContext } from './PublicPageProvider-BBH6Vqg7.js';
2
+ 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, i as CardActionsProps, 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, 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, b3 as useFileReference, b5 as useFileReferenceById, b4 as useFileReferenceForRecord, b6 as useFilesByCategory, bf as useIsPublicPage, be as usePublicPageContext } from './PublicPageProvider-CIGSujI2.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  export { u as useToast } from './useToast-AyaT-x7p.js';
5
- export { D as DataTable, a as DataTableProps } from './DataTable-2N_tqbfq.js';
6
- export { c as AggregateConfig, A as AutocompleteOptions, d as DataRecord, a as DataTableAction, D as DataTableColumn, b as DataTableToolbarButton, E as EmptyStateConfig, G as GetRowId, P as ParsedAddress } from './types-B-K_5VnO.js';
5
+ export { D as DataTable, a as DataTableProps } from './DataTable-DRUIgtUH.js';
6
+ export { c as AggregateConfig, A as AutocompleteOptions, d as DataRecord, a as DataTableAction, D as DataTableColumn, b as DataTableToolbarButton, E as EmptyStateConfig, G as GetRowId, P as ParsedAddress } from './types-DXstZpNI.js';
7
7
  export { F as FileCategory, b as FileMetadata, a as FileReference, c as FileUploadOptions } from './file-reference-BavO2eQj.js';
8
8
  export { a as NavigationItem, N as NavigationMenuProps } from './types-t9H8qKRw.js';
9
9
  import 'react';
@@ -131,11 +131,12 @@ declare function DateTimeField({ label, value, onChange, timezone, required, cla
131
131
  * Provides a calendar interface with timezone context for date selection.
132
132
  *
133
133
  * Features:
134
- * - Calendar date selection
134
+ * - Calendar date selection with dropdown month/year navigation
135
135
  * - Timezone display (shows "Local" when matches user timezone)
136
136
  * - Optional "Done" button
137
137
  * - Accessible date selection
138
138
  * - Keyboard navigation support
139
+ * - Wide date range support (1900-2100) via dropdown selectors
139
140
  *
140
141
  * @example
141
142
  * ```tsx
@@ -1,26 +1,25 @@
1
- import { Label, Calendar } from './chunk-LAZMKTTF.js';
2
- export { AddressField, Avatar, Badge, Calendar, ContextSelector, FileDisplay, FileUpload, Footer, Form, FormField, Header, Label, LoginForm, NavigationMenu, PaceAppLayout, PaceLoginPage, ProtectedRoute, PublicPageFooter, PublicPageHeader, PublicPageLayout, SessionRestorationLoader, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, UserMenu, useFileReference, useFileReferenceById, useFileReferenceForRecord, useFilesByCategory } from './chunk-LAZMKTTF.js';
3
- import './chunk-4T7OBVTU.js';
4
- import { Input } from './chunk-ZS5VO5JB.js';
5
- export { Alert, AlertDescription, AlertTitle, Card, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, DataTable, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTitle, DialogTrigger, Input, Progress, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue } from './chunk-ZS5VO5JB.js';
6
- import { Button } from './chunk-7TYHROIV.js';
7
- export { Button, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger } from './chunk-7TYHROIV.js';
8
- import './chunk-FENMYN2U.js';
9
- import './chunk-BVP2BCJF.js';
1
+ import { Calendar } from './chunk-EURB7QFZ.js';
2
+ export { AddressField, Avatar, Badge, Calendar, ContextSelector, FileDisplay, FileUpload, Footer, Form, FormField, Header, LoginForm, NavigationMenu, PaceAppLayout, PaceLoginPage, ProtectedRoute, PublicPageFooter, PublicPageHeader, PublicPageLayout, SessionRestorationLoader, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, UserMenu, useFileReference, useFileReferenceById, useFileReferenceForRecord, useFilesByCategory } from './chunk-EURB7QFZ.js';
3
+ import './chunk-S6ZQKDY6.js';
4
+ import { Label, Input } from './chunk-NKHKXPI4.js';
5
+ export { Alert, AlertDescription, AlertTitle, Checkbox, DataTable, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTitle, DialogTrigger, Input, Label, Progress, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from './chunk-NKHKXPI4.js';
6
+ import { Button } from './chunk-GS5672WG.js';
7
+ export { Button, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger } from './chunk-GS5672WG.js';
8
+ import './chunk-MPBLMWVR.js';
9
+ import './chunk-5W2A3DRC.js';
10
10
  export { useToast } from './chunk-S7DKJPLT.js';
11
- export { ErrorBoundary, ErrorBoundaryProvider, PublicPageProvider, useIsPublicPage, usePublicPageContext } from './chunk-3O3WHILE.js';
11
+ export { Card, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ErrorBoundary, ErrorBoundaryProvider, PublicPageProvider, useIsPublicPage, usePublicPageContext } from './chunk-EF2UGZWY.js';
12
12
  import './chunk-C7NSAPTL.js';
13
- export { UnifiedAuthProvider, useUnifiedAuth } from './chunk-FTCRZOG2.js';
14
- import './chunk-ZFYPMX46.js';
13
+ export { UnifiedAuthProvider, useUnifiedAuth } from './chunk-T5CVK4R3.js';
14
+ import './chunk-LX6U42O3.js';
15
15
  import './chunk-AHU7G2R5.js';
16
16
  export { FileCategory } from './chunk-6QYDGKQY.js';
17
17
  import './chunk-4SXLQIZO.js';
18
- import { toZonedTime, fromZonedTime, getUserTimeZone } from './chunk-2HGJFNAH.js';
19
- export { LoadingSpinner } from './chunk-2HGJFNAH.js';
20
- import './chunk-3QC3KRHK.js';
21
- import { cn } from './chunk-A55DK444.js';
18
+ import { toZonedTime, fromZonedTime, getUserTimeZone } from './chunk-FEJLJNWA.js';
19
+ export { LoadingSpinner } from './chunk-A3W6LW53.js';
20
+ import './chunk-OJ4SKRSV.js';
22
21
  import './chunk-FYHN4DD5.js';
23
- import './chunk-SD6WQY43.js';
22
+ import { cn } from './chunk-7ILTDCL2.js';
24
23
  import './chunk-HF6O3O37.js';
25
24
  import './chunk-TTRFSOKR.js';
26
25
  import './chunk-3RG5ZIWI.js';
@@ -103,8 +102,8 @@ function DateTimeField({
103
102
  return timezone;
104
103
  }, [timezone]);
105
104
  const timezoneDisplay = getTimezoneDisplay();
106
- return /* @__PURE__ */ jsxs("div", { className: cn("space-y-2", className), children: [
107
- /* @__PURE__ */ jsx(Label, { htmlFor: fieldId, required, helperText, error, children: label }),
105
+ return /* @__PURE__ */ jsxs(Label, { className: cn("space-y-2", className), htmlFor: fieldId, required, helperText, error, children: [
106
+ label,
108
107
  /* @__PURE__ */ jsx(
109
108
  Input,
110
109
  {
@@ -119,7 +118,7 @@ function DateTimeField({
119
118
  className: "w-full"
120
119
  }
121
120
  ),
122
- timezoneDisplay && !error && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: timezoneDisplay })
121
+ timezoneDisplay && /* @__PURE__ */ jsx("span", { className: "absolute right-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground pointer-events-none", children: timezoneDisplay })
123
122
  ] });
124
123
  }
125
124
  function DatePickerWithTimezone({
@@ -132,8 +131,8 @@ function DatePickerWithTimezone({
132
131
  const userTimezone = getUserTimeZone();
133
132
  const displayTimezone = timezone || userTimezone;
134
133
  const timezoneDisplay = displayTimezone === userTimezone ? "Local" : displayTimezone;
135
- return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col", className), children: [
136
- /* @__PURE__ */ jsx("div", { className: "p-3", children: /* @__PURE__ */ jsx(
134
+ return /* @__PURE__ */ jsxs("form", { className: cn("grid grid-cols-[1fr_auto] gap-2", className), children: [
135
+ /* @__PURE__ */ jsx(
137
136
  Calendar,
138
137
  {
139
138
  mode: "single",
@@ -143,19 +142,15 @@ function DatePickerWithTimezone({
143
142
  captionLayout: "dropdown",
144
143
  startMonth: new Date(1900, 0),
145
144
  endMonth: new Date(2100, 11),
146
- className: "p-0"
145
+ className: "p-0 col-span-full"
147
146
  }
148
- ) }),
149
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-t border-border px-3 py-2", children: [
150
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
151
- /* @__PURE__ */ jsx(Clock, { className: "size-4", "aria-hidden": "true" }),
152
- /* @__PURE__ */ jsxs("span", { children: [
153
- "Timezone: ",
154
- /* @__PURE__ */ jsx("span", { "aria-label": `Timezone ${timezoneDisplay}`, children: timezoneDisplay })
155
- ] })
156
- ] }),
157
- onDone && /* @__PURE__ */ jsx(Button, { onClick: onDone, size: "sm", className: "h-8", children: "Done" })
158
- ] })
147
+ ),
148
+ /* @__PURE__ */ jsxs("label", { htmlFor: "timezone", children: [
149
+ /* @__PURE__ */ jsx(Clock, { className: "size-4 inline-block mr-2", "aria-hidden": "true" }),
150
+ "Timezone: ",
151
+ /* @__PURE__ */ jsx("span", { "aria-label": `Timezone ${timezoneDisplay}`, children: timezoneDisplay })
152
+ ] }),
153
+ onDone && /* @__PURE__ */ jsx(Button, { onClick: onDone, size: "sm", className: "ml-auto h-8", children: "Done" })
159
154
  ] });
160
155
  }
161
156
 
@@ -3,20 +3,33 @@
3
3
  * @package @jmruthers/pace-core
4
4
  * @module ESLintRules
5
5
  *
6
- * This module exports all pace-core compliance ESLint rules organized by category.
6
+ * This module exports all pace-core ESLint rules organized by standards.
7
+ * Rules are organized to match the 10-file standards structure.
8
+ *
9
+ * Reference: packages/core/docs/standards/README.md
7
10
  */
8
11
 
9
- const complianceRules = require('./rules/compliance.cjs');
10
- const componentRules = require('./rules/components.cjs');
11
- const rbacRules = require('./rules/rbac.cjs');
12
- const importRules = require('./rules/imports.cjs');
12
+ const paceCoreComplianceRules = require('./rules/01-pace-core-compliance.cjs');
13
+ const codeQualityRules = require('./rules/04-code-quality.cjs');
14
+ const stylingRules = require('./rules/05-styling.cjs');
15
+ const securityRbacRules = require('./rules/06-security-rbac.cjs');
16
+ const apiTechStackRules = require('./rules/07-api-tech-stack.cjs');
17
+ const testingRules = require('./rules/08-testing.cjs');
13
18
 
14
19
  module.exports = {
15
20
  rules: {
16
- ...complianceRules.rules,
17
- ...componentRules.rules,
18
- ...rbacRules.rules,
19
- ...importRules.rules,
21
+ // Standard 1: pace-core Compliance
22
+ ...paceCoreComplianceRules.rules,
23
+ // Standard 4: Code Quality
24
+ ...codeQualityRules.rules,
25
+ // Standard 5: Styling
26
+ ...stylingRules.rules,
27
+ // Standard 6: Security & RBAC
28
+ ...securityRbacRules.rules,
29
+ // Standard 7: API & Tech Stack
30
+ ...apiTechStackRules.rules,
31
+ // Standard 8: Testing
32
+ ...testingRules.rules,
20
33
  }
21
34
  };
22
35
 
@@ -1,12 +1,22 @@
1
1
  /**
2
- * General compliance rules
2
+ * pace-core Compliance Rules (Standard 1)
3
3
  * @package @jmruthers/pace-core
4
- * @module ESLintRules/rules/compliance
4
+ * @module ESLintRules/rules/pace-core-compliance
5
+ *
6
+ * Enforces pace-core usage patterns from Standard 1:
7
+ * - Use pace-core components instead of native HTML or custom implementations
8
+ * - Use pace-core hooks instead of custom hooks
9
+ * - Use pace-core utilities instead of custom utilities
10
+ * - Block restricted imports (libraries wrapped by pace-core)
11
+ * - Prefer pace-core Form component
12
+ * - Prevent component duplication
13
+ *
14
+ * Reference: packages/core/docs/standards/1-pace-core-compliance-standards.md
5
15
  */
6
16
 
7
17
  const path = require('path');
8
- const { getPaceCoreComponents, getPaceCoreHooks, getPaceCoreUtils } = require('../utils/manifest-loader.cjs');
9
- const { isPaceCoreSourceFile } = require('../utils/helpers.cjs');
18
+ const { getPaceCoreComponents, getPaceCoreHooks, getPaceCoreUtils, getRestrictedImports } = require('../utils/manifest-loader.cjs');
19
+ const { getPaceCoreAlternative, isPaceCoreSourceFile } = require('../utils/helpers.cjs');
10
20
 
11
21
  module.exports = {
12
22
  rules: {
@@ -19,7 +29,8 @@ module.exports = {
19
29
  docs: {
20
30
  description: 'Suggest using pace-core components instead of native HTML elements',
21
31
  category: 'Best Practices',
22
- recommended: true
32
+ recommended: true,
33
+ url: 'https://github.com/jmruthers/pace-core/blob/main/packages/core/docs/standards/1-pace-core-compliance-standards.md'
23
34
  },
24
35
  hasSuggestions: true,
25
36
  messages: {
@@ -94,7 +105,8 @@ module.exports = {
94
105
  docs: {
95
106
  description: 'Suggest using pace-core hooks instead of custom implementations',
96
107
  category: 'Best Practices',
97
- recommended: true
108
+ recommended: true,
109
+ url: 'https://github.com/jmruthers/pace-core/blob/main/packages/core/docs/standards/1-pace-core-compliance-standards.md'
98
110
  },
99
111
  messages: {
100
112
  preferPaceCoreHook: "Consider using '{{hook}}' from '@jmruthers/pace-core' instead of custom hook '{{customHook}}'"
@@ -155,7 +167,8 @@ module.exports = {
155
167
  docs: {
156
168
  description: 'Suggest using pace-core utilities instead of custom implementations',
157
169
  category: 'Best Practices',
158
- recommended: true
170
+ recommended: true,
171
+ url: 'https://github.com/jmruthers/pace-core/blob/main/packages/core/docs/standards/1-pace-core-compliance-standards.md'
159
172
  },
160
173
  messages: {
161
174
  preferPaceCoreUtil: "Consider using '{{util}}' from '@jmruthers/pace-core' instead of custom function '{{customUtil}}'"
@@ -243,7 +256,8 @@ module.exports = {
243
256
  docs: {
244
257
  description: 'Disallow local components with names matching pace-core components',
245
258
  category: 'Best Practices',
246
- recommended: true
259
+ recommended: true,
260
+ url: 'https://github.com/jmruthers/pace-core/blob/main/packages/core/docs/standards/1-pace-core-compliance-standards.md'
247
261
  },
248
262
  messages: {
249
263
  duplicateComponent: "Component '{{componentName}}' conflicts with pace-core component. Use '@jmruthers/pace-core' instead of creating a local version."
@@ -301,20 +315,23 @@ module.exports = {
301
315
  },
302
316
 
303
317
  /**
304
- * Disallow inline styles
318
+ * Block direct imports of libraries wrapped by pace-core
305
319
  */
306
- 'no-inline-styles': {
320
+ 'no-restricted-imports': {
307
321
  meta: {
308
322
  type: 'problem',
309
323
  docs: {
310
- description: 'Disallow inline styles. Use pace-core components or Tailwind classes instead.',
324
+ description: 'Disallow direct imports of libraries that pace-core wraps',
311
325
  category: 'Best Practices',
312
- recommended: true
326
+ recommended: true,
327
+ url: 'https://github.com/jmruthers/pace-core/blob/main/packages/core/docs/standards/1-pace-core-compliance-standards.md'
313
328
  },
329
+ fixable: 'code',
330
+ hasSuggestions: true,
314
331
  messages: {
315
- inlineStyle: 'Inline style detected. Use pace-core components or Tailwind classes instead.'
316
- },
317
- hasSuggestions: true
332
+ restrictedImport: '{{message}} Import from {{alternative}} instead.',
333
+ restrictedImportWithReason: '{{message}} {{reason}}'
334
+ }
318
335
  },
319
336
  create(context) {
320
337
  const filename = context.getFilename();
@@ -324,20 +341,165 @@ module.exports = {
324
341
  return {};
325
342
  }
326
343
 
344
+ const restrictedImports = getRestrictedImports();
345
+ const restrictedModules = restrictedImports.map(imp => imp.module);
346
+
347
+ // Also catch @radix-ui/* patterns
348
+ const radixPattern = /^@radix-ui\//;
349
+
327
350
  return {
328
- JSXAttribute(node) {
329
- if (node.name && node.name.name === 'style') {
351
+ ImportDeclaration(node) {
352
+ const importSource = node.source.value;
353
+
354
+ // Check exact matches
355
+ const restricted = restrictedImports.find(imp => imp.module === importSource);
356
+ if (restricted) {
330
357
  context.report({
331
- node,
332
- messageId: 'inlineStyle',
358
+ node: node.source,
359
+ messageId: 'restrictedImportWithReason',
360
+ data: {
361
+ message: `Direct import of '${importSource}' is not allowed.`,
362
+ reason: restricted.reason
363
+ },
333
364
  suggest: [{
334
- desc: 'Remove inline style and use pace-core component styling or Tailwind utility classes',
365
+ desc: `Use pace-core alternative: ${restricted.reason}`,
335
366
  fix(fixer) {
336
- // Remove the style attribute
337
- return fixer.remove(node);
367
+ // Suggest importing from pace-core instead
368
+ const paceCoreAlternative = getPaceCoreAlternative(importSource);
369
+ if (paceCoreAlternative) {
370
+ return fixer.replaceText(
371
+ node.source,
372
+ `'@jmruthers/pace-core${paceCoreAlternative}'`
373
+ );
374
+ }
375
+ return null;
338
376
  }
339
377
  }]
340
378
  });
379
+ return;
380
+ }
381
+
382
+ // Check @radix-ui/* pattern
383
+ if (radixPattern.test(importSource) && !restrictedModules.includes(importSource)) {
384
+ context.report({
385
+ node: node.source,
386
+ messageId: 'restrictedImport',
387
+ data: {
388
+ message: `Direct import of '${importSource}' is not allowed.`,
389
+ alternative: '@jmruthers/pace-core'
390
+ },
391
+ suggest: [{
392
+ desc: 'Use pace-core component instead',
393
+ fix(fixer) {
394
+ return fixer.replaceText(
395
+ node.source,
396
+ "'@jmruthers/pace-core'"
397
+ );
398
+ }
399
+ }]
400
+ });
401
+ }
402
+ }
403
+ };
404
+ }
405
+ },
406
+
407
+ /**
408
+ * Prefer pace-core Form component over plain form tags and direct react-hook-form usage
409
+ */
410
+ 'prefer-pace-core-form': {
411
+ meta: {
412
+ type: 'problem',
413
+ docs: {
414
+ description: 'Disallow plain <form> tags and direct react-hook-form imports. Use pace-core Form component instead.',
415
+ category: 'Best Practices',
416
+ recommended: true,
417
+ url: 'https://github.com/jmruthers/pace-core/blob/main/packages/core/docs/standards/1-pace-core-compliance-standards.md'
418
+ },
419
+ messages: {
420
+ plainFormTag: "Plain <form> tag detected. Use pace-core Form component instead.",
421
+ reactHookFormImport: "Direct import from 'react-hook-form' detected: {{imports}}. Use pace-core Form component instead. useFormContext is allowed when Form is imported from pace-core."
422
+ },
423
+ hasSuggestions: true
424
+ },
425
+ create(context) {
426
+ const filename = context.getFilename();
427
+
428
+ // Exclude pace-core source files - these rules are for consuming apps
429
+ if (isPaceCoreSourceFile(filename)) {
430
+ return {};
431
+ }
432
+
433
+ let hasPaceCoreForm = false;
434
+ const problematicImports = ['useForm', 'FormProvider', 'Controller', 'useWatch', 'useFieldArray', 'useController'];
435
+
436
+ return {
437
+ ImportDeclaration(node) {
438
+ const importSource = node.source.value;
439
+
440
+ // Check if Form is imported from pace-core
441
+ if (importSource === '@jmruthers/pace-core' ||
442
+ importSource === '@jmruthers/pace-core/components') {
443
+ const hasForm = node.specifiers.some(spec => {
444
+ if (spec.type === 'ImportSpecifier') {
445
+ return spec.imported.name === 'Form';
446
+ }
447
+ return false;
448
+ });
449
+ if (hasForm) {
450
+ hasPaceCoreForm = true;
451
+ }
452
+ }
453
+
454
+ // Check for react-hook-form imports
455
+ if (importSource === 'react-hook-form') {
456
+ const importedItems = node.specifiers
457
+ .filter(spec => spec.type === 'ImportSpecifier')
458
+ .map(spec => spec.imported.name);
459
+
460
+ const foundProblematic = importedItems.filter(item => problematicImports.includes(item));
461
+
462
+ // Allow useFormContext when Form is imported from pace-core
463
+ const isAcceptable = hasPaceCoreForm &&
464
+ foundProblematic.length === 1 &&
465
+ foundProblematic[0] === 'useFormContext';
466
+
467
+ if (foundProblematic.length > 0 && !isAcceptable) {
468
+ context.report({
469
+ node: node.source,
470
+ messageId: 'reactHookFormImport',
471
+ data: {
472
+ imports: foundProblematic.join(', ')
473
+ },
474
+ suggest: [{
475
+ desc: 'Use pace-core Form component instead',
476
+ fix(fixer) {
477
+ return fixer.remove(node);
478
+ }
479
+ }]
480
+ });
481
+ }
482
+ }
483
+ },
484
+
485
+ JSXOpeningElement(node) {
486
+ // Check for plain <form> tags (lowercase, not Form component)
487
+ if (node.name.type === 'JSXIdentifier') {
488
+ const elementName = node.name.name;
489
+ // Check if it's lowercase 'form' (not 'Form' component)
490
+ if (elementName === 'form') {
491
+ context.report({
492
+ node,
493
+ messageId: 'plainFormTag',
494
+ suggest: [{
495
+ desc: 'Replace with pace-core Form component',
496
+ fix(fixer) {
497
+ // This is complex to auto-fix, so we'll just report
498
+ return null;
499
+ }
500
+ }]
501
+ });
502
+ }
341
503
  }
342
504
  }
343
505
  };
@@ -345,4 +507,3 @@ module.exports = {
345
507
  }
346
508
  }
347
509
  };
348
-