@jmruthers/pace-core 0.5.121 → 0.5.123

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 (254) hide show
  1. package/dist/{AuthService-D4646R4b.d.ts → AuthService-DYuQPJj6.d.ts} +0 -9
  2. package/dist/{DataTable-DGZDJUYM.js → DataTable-WTS4IRF2.js} +7 -8
  3. package/dist/{PublicLoadingSpinner-DgDWTFqn.d.ts → PublicLoadingSpinner-CaoRbHvJ.d.ts} +30 -4
  4. package/dist/{UnifiedAuthProvider-UACKFATV.js → UnifiedAuthProvider-6C47WIML.js} +3 -4
  5. package/dist/{chunk-D6BOFXYR.js → chunk-35ZDPMBM.js} +3 -3
  6. package/dist/{chunk-CGURJ27Z.js → chunk-4MXVZVNS.js} +2 -2
  7. package/dist/{chunk-ZYJ6O5CA.js → chunk-C43QIDN3.js} +2 -2
  8. package/dist/{chunk-VKOCWWVY.js → chunk-CX5M4ZAG.js} +1 -6
  9. package/dist/{chunk-VKOCWWVY.js 3.map → chunk-CX5M4ZAG.js.map} +1 -1
  10. package/dist/{chunk-HFBOFZ3Z.js → chunk-DHMFMXFV.js} +258 -243
  11. package/dist/chunk-DHMFMXFV.js.map +1 -0
  12. package/dist/{chunk-RIEJGKD3.js → chunk-ESJTIADP.js} +15 -6
  13. package/dist/{chunk-RIEJGKD3.js.map → chunk-ESJTIADP.js.map} +1 -1
  14. package/dist/{chunk-SMJZMKYN.js → chunk-GEVIB2UB.js} +43 -10
  15. package/dist/chunk-GEVIB2UB.js.map +1 -0
  16. package/dist/{chunk-TDNI6ZWL.js → chunk-IJOZZOGT.js} +7 -7
  17. package/dist/chunk-IJOZZOGT.js.map +1 -0
  18. package/dist/{chunk-GZRXOUBE.js → chunk-M6DDYFUD.js} +2 -2
  19. package/dist/chunk-M6DDYFUD.js.map +1 -0
  20. package/dist/{chunk-B4GZ2BXO.js → chunk-NZGLXZGP.js} +3 -3
  21. package/dist/{chunk-NZ32EONV.js → chunk-QWNJCQXZ.js} +2 -2
  22. package/dist/{chunk-FKFHZUGF.js → chunk-XN6GWKMV.js} +43 -56
  23. package/dist/chunk-XN6GWKMV.js.map +1 -0
  24. package/dist/{chunk-BHWIUEYH.js → chunk-ZBLK676C.js} +1 -61
  25. package/dist/chunk-ZBLK676C.js.map +1 -0
  26. package/dist/{chunk-QPI2CCBA.js → chunk-ZPJMYGEP.js} +149 -96
  27. package/dist/chunk-ZPJMYGEP.js.map +1 -0
  28. package/dist/components.d.ts +1 -1
  29. package/dist/components.js +11 -11
  30. package/dist/{formatting-B1jSqgl-.d.ts → formatting-DFcCxUEk.d.ts} +1 -1
  31. package/dist/hooks.d.ts +1 -1
  32. package/dist/hooks.js +9 -8
  33. package/dist/hooks.js.map +1 -1
  34. package/dist/index.d.ts +6 -6
  35. package/dist/index.js +19 -17
  36. package/dist/index.js.map +1 -1
  37. package/dist/providers.d.ts +2 -2
  38. package/dist/providers.js +2 -3
  39. package/dist/rbac/index.js +7 -8
  40. package/dist/styles/index.d.ts +1 -1
  41. package/dist/styles/index.js +5 -3
  42. package/dist/theming/runtime.d.ts +73 -1
  43. package/dist/theming/runtime.js +5 -5
  44. package/dist/{usePublicRouteParams-BdF8bZgs.d.ts → usePublicRouteParams-Dyt1tzI9.d.ts} +60 -8
  45. package/dist/utils.d.ts +1 -1
  46. package/dist/utils.js +5 -5
  47. package/docs/api/classes/ColumnFactory.md +1 -1
  48. package/docs/api/classes/ErrorBoundary.md +1 -1
  49. package/docs/api/classes/InvalidScopeError.md +1 -1
  50. package/docs/api/classes/MissingUserContextError.md +1 -1
  51. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  52. package/docs/api/classes/PermissionDeniedError.md +1 -1
  53. package/docs/api/classes/PublicErrorBoundary.md +6 -6
  54. package/docs/api/classes/RBACAuditManager.md +1 -1
  55. package/docs/api/classes/RBACCache.md +1 -1
  56. package/docs/api/classes/RBACEngine.md +1 -1
  57. package/docs/api/classes/RBACError.md +1 -1
  58. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  59. package/docs/api/classes/SecureSupabaseClient.md +6 -6
  60. package/docs/api/classes/StorageUtils.md +1 -1
  61. package/docs/api/enums/FileCategory.md +1 -1
  62. package/docs/api/interfaces/AggregateConfig.md +1 -1
  63. package/docs/api/interfaces/ButtonProps.md +1 -1
  64. package/docs/api/interfaces/CardProps.md +1 -1
  65. package/docs/api/interfaces/ColorPalette.md +1 -1
  66. package/docs/api/interfaces/ColorShade.md +1 -1
  67. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  68. package/docs/api/interfaces/DataRecord.md +1 -1
  69. package/docs/api/interfaces/DataTableAction.md +1 -1
  70. package/docs/api/interfaces/DataTableColumn.md +1 -1
  71. package/docs/api/interfaces/DataTableProps.md +1 -1
  72. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  73. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  74. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  75. package/docs/api/interfaces/EventAppRoleData.md +1 -1
  76. package/docs/api/interfaces/FileDisplayProps.md +1 -1
  77. package/docs/api/interfaces/FileMetadata.md +1 -1
  78. package/docs/api/interfaces/FileReference.md +1 -1
  79. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  80. package/docs/api/interfaces/FileUploadOptions.md +1 -1
  81. package/docs/api/interfaces/FileUploadProps.md +1 -1
  82. package/docs/api/interfaces/FooterProps.md +1 -1
  83. package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
  84. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  85. package/docs/api/interfaces/InputProps.md +1 -1
  86. package/docs/api/interfaces/LabelProps.md +1 -1
  87. package/docs/api/interfaces/LoginFormProps.md +1 -1
  88. package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
  89. package/docs/api/interfaces/NavigationContextType.md +1 -1
  90. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  91. package/docs/api/interfaces/NavigationItem.md +1 -1
  92. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  93. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  94. package/docs/api/interfaces/Organisation.md +1 -1
  95. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  96. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  97. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  98. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  99. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  100. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  101. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  102. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  103. package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
  104. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  105. package/docs/api/interfaces/PaletteData.md +1 -1
  106. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  107. package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
  108. package/docs/api/interfaces/PublicErrorBoundaryProps.md +7 -7
  109. package/docs/api/interfaces/PublicErrorBoundaryState.md +5 -5
  110. package/docs/api/interfaces/PublicLoadingSpinnerProps.md +7 -7
  111. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  112. package/docs/api/interfaces/PublicPageHeaderProps.md +51 -12
  113. package/docs/api/interfaces/PublicPageLayoutProps.md +72 -12
  114. package/docs/api/interfaces/RBACConfig.md +1 -1
  115. package/docs/api/interfaces/RBACLogger.md +1 -1
  116. package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
  117. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  118. package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
  119. package/docs/api/interfaces/RoleManagementResult.md +1 -1
  120. package/docs/api/interfaces/RouteAccessRecord.md +1 -1
  121. package/docs/api/interfaces/RouteConfig.md +1 -1
  122. package/docs/api/interfaces/SecureDataContextType.md +1 -1
  123. package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
  124. package/docs/api/interfaces/StorageConfig.md +1 -1
  125. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  126. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  127. package/docs/api/interfaces/StorageListOptions.md +1 -1
  128. package/docs/api/interfaces/StorageListResult.md +1 -1
  129. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  130. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  131. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  132. package/docs/api/interfaces/StyleImport.md +1 -1
  133. package/docs/api/interfaces/SwitchProps.md +1 -1
  134. package/docs/api/interfaces/ToastActionElement.md +1 -1
  135. package/docs/api/interfaces/ToastProps.md +1 -1
  136. package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
  137. package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
  138. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  139. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  140. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  141. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  142. package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
  143. package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
  144. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  145. package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
  146. package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
  147. package/docs/api/interfaces/UserEventAccess.md +1 -1
  148. package/docs/api/interfaces/UserMenuProps.md +1 -1
  149. package/docs/api/interfaces/UserProfile.md +1 -1
  150. package/docs/api/modules.md +140 -30
  151. package/docs/best-practices/README.md +1 -1
  152. package/docs/implementation-guides/datatable-filtering.md +313 -0
  153. package/docs/implementation-guides/datatable-rbac-usage.md +317 -0
  154. package/docs/implementation-guides/hierarchical-datatable.md +850 -0
  155. package/docs/implementation-guides/large-datasets.md +281 -0
  156. package/docs/implementation-guides/performance.md +403 -0
  157. package/docs/implementation-guides/public-pages.md +4 -4
  158. package/docs/migration/quick-migration-guide.md +320 -0
  159. package/docs/rbac/quick-start.md +16 -16
  160. package/docs/troubleshooting/README.md +4 -4
  161. package/docs/troubleshooting/cake-page-permission-guard-issue-summary.md +1 -1
  162. package/docs/troubleshooting/debugging.md +1117 -0
  163. package/docs/troubleshooting/migration.md +918 -0
  164. package/examples/public-pages/CorrectPublicPageImplementation.tsx +30 -30
  165. package/examples/public-pages/PublicEventPage.tsx +41 -41
  166. package/examples/public-pages/PublicPageApp.tsx +33 -33
  167. package/examples/public-pages/PublicPageUsageExample.tsx +30 -30
  168. package/package.json +4 -4
  169. package/src/__tests__/hooks/usePermissions.test.ts +265 -0
  170. package/src/components/DataTable/DataTable.test.tsx +9 -38
  171. package/src/components/DataTable/DataTable.tsx +0 -7
  172. package/src/components/DataTable/components/DataTableCore.tsx +66 -136
  173. package/src/components/DataTable/components/DataTableModals.tsx +25 -22
  174. package/src/components/DataTable/components/EditableRow.tsx +118 -42
  175. package/src/components/DataTable/components/UnifiedTableBody.tsx +129 -76
  176. package/src/components/DataTable/components/__tests__/DataTableModals.test.tsx +33 -14
  177. package/src/components/DataTable/utils/__tests__/exportUtils.test.ts +17 -5
  178. package/src/components/DataTable/utils/exportUtils.ts +3 -2
  179. package/src/components/Dialog/Dialog.tsx +1 -1
  180. package/src/components/Dialog/README.md +24 -24
  181. package/src/components/Dialog/examples/BasicHtmlTest.tsx +2 -2
  182. package/src/components/Dialog/examples/DebugHtmlExample.tsx +6 -6
  183. package/src/components/Dialog/examples/HtmlDialogExample.tsx +2 -2
  184. package/src/components/Dialog/examples/SimpleHtmlTest.tsx +3 -3
  185. package/src/components/Dialog/examples/__tests__/SimpleHtmlTest.test.tsx +4 -4
  186. package/src/components/PaceAppLayout/PaceAppLayout.tsx +12 -1
  187. package/src/components/PublicLayout/EventLogo.tsx +175 -0
  188. package/src/components/PublicLayout/PublicErrorBoundary.tsx +22 -18
  189. package/src/components/PublicLayout/PublicLoadingSpinner.tsx +22 -14
  190. package/src/components/PublicLayout/PublicPageHeader.tsx +133 -40
  191. package/src/components/PublicLayout/PublicPageLayout.tsx +75 -72
  192. package/src/components/PublicLayout/__tests__/PublicErrorBoundary.test.tsx +1 -1
  193. package/src/components/PublicLayout/__tests__/PublicLoadingSpinner.test.tsx +8 -8
  194. package/src/components/PublicLayout/__tests__/PublicPageHeader.test.tsx +23 -16
  195. package/src/components/PublicLayout/__tests__/PublicPageLayout.test.tsx +86 -14
  196. package/src/examples/CorrectPublicPageImplementation.tsx +30 -30
  197. package/src/examples/PublicEventPage.tsx +41 -41
  198. package/src/examples/PublicPageApp.tsx +33 -33
  199. package/src/examples/PublicPageUsageExample.tsx +30 -30
  200. package/src/hooks/__tests__/usePublicEvent.unit.test.ts +583 -0
  201. package/src/hooks/__tests__/usePublicRouteParams.unit.test.ts +10 -3
  202. package/src/hooks/index.ts +1 -1
  203. package/src/hooks/public/usePublicEventLogo.ts +285 -0
  204. package/src/hooks/public/usePublicRouteParams.ts +21 -4
  205. package/src/hooks/useEventTheme.test.ts +119 -43
  206. package/src/hooks/useEventTheme.ts +84 -55
  207. package/src/index.ts +3 -1
  208. package/src/rbac/components/__tests__/EnhancedNavigationMenu.test.tsx +630 -0
  209. package/src/rbac/components/__tests__/NavigationProvider.test.tsx +667 -0
  210. package/src/rbac/components/__tests__/PagePermissionProvider.test.tsx +647 -0
  211. package/src/rbac/components/__tests__/SecureDataProvider.fixed.test.tsx +496 -0
  212. package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +496 -0
  213. package/src/rbac/secureClient.ts +4 -2
  214. package/src/services/EventService.ts +0 -66
  215. package/src/services/__tests__/EventService.eventColours.test.ts +44 -40
  216. package/src/styles/index.ts +1 -1
  217. package/src/theming/__tests__/parseEventColours.test.ts +209 -0
  218. package/src/theming/parseEventColours.ts +123 -0
  219. package/src/theming/runtime.ts +3 -0
  220. package/src/types/__tests__/file-reference.test.ts +447 -0
  221. package/src/utils/formatDate.test.ts +11 -11
  222. package/src/utils/formatting.ts +3 -2
  223. package/dist/chunk-BDZUMRBD.js 3.map +0 -1
  224. package/dist/chunk-BHWIUEYH.js.map +0 -1
  225. package/dist/chunk-CGURJ27Z.js.map +0 -1
  226. package/dist/chunk-FKFHZUGF.js.map +0 -1
  227. package/dist/chunk-GKHF54DI 2.js +0 -619
  228. package/dist/chunk-GKHF54DI.js 2.map +0 -1
  229. package/dist/chunk-GZRXOUBE.js.map +0 -1
  230. package/dist/chunk-HFBOFZ3Z.js.map +0 -1
  231. package/dist/chunk-NZ32EONV.js.map +0 -1
  232. package/dist/chunk-O3NWNXDY 2.js +0 -76
  233. package/dist/chunk-QPI2CCBA.js.map +0 -1
  234. package/dist/chunk-SMJZMKYN.js.map +0 -1
  235. package/dist/chunk-TDNI6ZWL.js 2.map +0 -1
  236. package/dist/chunk-TDNI6ZWL.js.map +0 -1
  237. package/dist/chunk-VKOCWWVY.js.map +0 -1
  238. package/dist/chunk-WP5I5GLN 2.js +0 -1564
  239. package/dist/index 3.js +0 -856
  240. package/dist/providers 3.js +0 -38
  241. package/dist/providers.js 3.map +0 -1
  242. package/dist/types 3.js +0 -128
  243. package/dist/types.js 3.map +0 -1
  244. package/dist/useInactivityTracker-MRUU55XI.js 3.map +0 -1
  245. package/dist/utils.js 3.map +0 -1
  246. package/dist/validation 3.js +0 -479
  247. package/src/styles/semantic.css +0 -24
  248. /package/dist/{DataTable-DGZDJUYM.js.map → DataTable-WTS4IRF2.js.map} +0 -0
  249. /package/dist/{UnifiedAuthProvider-UACKFATV.js.map → UnifiedAuthProvider-6C47WIML.js.map} +0 -0
  250. /package/dist/{chunk-D6BOFXYR.js.map → chunk-35ZDPMBM.js.map} +0 -0
  251. /package/dist/{chunk-CGURJ27Z.js 2.map → chunk-4MXVZVNS.js.map} +0 -0
  252. /package/dist/{chunk-ZYJ6O5CA.js.map → chunk-C43QIDN3.js.map} +0 -0
  253. /package/dist/{chunk-B4GZ2BXO.js.map → chunk-NZGLXZGP.js.map} +0 -0
  254. /package/dist/{chunk-NZ32EONV.js 2.map → chunk-QWNJCQXZ.js.map} +0 -0
@@ -0,0 +1,320 @@
1
+ # Quick Migration Guide
2
+
3
+ > **🚀 Fast Track Migration** | [Full Migration Guide](./README.md) | [Breaking Changes](./breaking-changes.md)
4
+
5
+ Quick migration guide for common PACE Core upgrade scenarios. For detailed migration instructions, see the [Full Migration Guide](./README.md).
6
+
7
+ ## 🎯 Quick Migration Checklist
8
+
9
+ ### Before You Start
10
+ - [ ] **Backup your project** - Always backup before major updates
11
+ - [ ] **Check current version** - `npm list @jmruthers/pace-core`
12
+ - [ ] **Review changelog** - Check for breaking changes
13
+ - [ ] **Test in development** - Never migrate directly in production
14
+
15
+ ### Common Migration Scenarios
16
+
17
+ ## 📦 Package Updates
18
+
19
+ ### Minor Version Updates (e.g., v0.4.16 → v0.4.17)
20
+
21
+ **Usually safe, but check for:**
22
+ - New features
23
+ - Bug fixes
24
+ - Performance improvements
25
+
26
+ ```bash
27
+ # Update to latest
28
+ npm update @jmruthers/pace-core
29
+
30
+ # Or specific version
31
+ npm install @jmruthers/pace-core@0.4.17
32
+ ```
33
+
34
+ **What to check:**
35
+ - [ ] App still builds successfully
36
+ - [ ] No console errors
37
+ - [ ] Components render correctly
38
+ - [ ] Authentication still works
39
+
40
+ ### Major Version Updates (e.g., v0.x → v1.x)
41
+
42
+ **Requires more attention:**
43
+ - Breaking API changes
44
+ - New required props
45
+ - Deprecated features
46
+ - Configuration changes
47
+
48
+ ```bash
49
+ # Check what's new
50
+ npm info @jmruthers/pace-core versions --json
51
+
52
+ # Update to latest
53
+ npm install @jmruthers/pace-core@latest
54
+ ```
55
+
56
+ **What to check:**
57
+ - [ ] Review [Breaking Changes](./breaking-changes.md)
58
+ - [ ] Update import statements
59
+ - [ ] Fix deprecated API usage
60
+ - [ ] Update configuration files
61
+ - [ ] Test all functionality
62
+
63
+ ## 🔧 Configuration Updates
64
+
65
+ ### Tailwind v4 Migration
66
+
67
+ **From v0.4.15 to v0.4.16+ (CSS-First Approach):**
68
+
69
+ ```bash
70
+ # Remove old dependencies
71
+ npm uninstall tailwindcss postcss autoprefixer
72
+
73
+ # Install new dependencies
74
+ npm install @tailwindcss/vite tailwindcss@^4.0.0
75
+ ```
76
+
77
+ **Update vite.config.ts:**
78
+ ```ts
79
+ // Before (v0.4.15)
80
+ import tailwindcss from '@tailwindcss/vite'
81
+ export default defineConfig({
82
+ plugins: [
83
+ react(),
84
+ tailwindcss({
85
+ content: [
86
+ './src/**/*.{js,ts,jsx,tsx}',
87
+ './node_modules/@jmruthers/pace-core/src/**/*.{js,ts,jsx,tsx}'
88
+ ]
89
+ })
90
+ ],
91
+ })
92
+
93
+ // After (v0.4.16+)
94
+ import tailwindcss from '@tailwindcss/vite'
95
+ export default defineConfig({
96
+ plugins: [
97
+ react(),
98
+ tailwindcss({
99
+ content: [
100
+ './src/**/*.{js,ts,jsx,tsx}' // Only app files, pace-core scanned via @source
101
+ ]
102
+ })
103
+ ],
104
+ })
105
+ ```
106
+
107
+ **Update CSS imports:**
108
+ ```tsx
109
+ // Before
110
+ import '@jmruthers/pace-core/src/styles/core.css';
111
+
112
+ // After
113
+ import '@jmruthers/pace-core/src/styles/core.css';
114
+ ```
115
+
116
+ ### Source Path Fix (v0.4.17+)
117
+
118
+ **Critical fix for @source directive paths:**
119
+
120
+ ```ts
121
+ // vite.config.ts
122
+ import tailwindcss from '@tailwindcss/vite'
123
+ export default defineConfig({
124
+ plugins: [
125
+ react(),
126
+ tailwindcss({
127
+ content: [
128
+ './src/**/*.{js,ts,jsx,tsx}',
129
+ './node_modules/@jmruthers/pace-core/**/*.{js,ts,jsx,tsx}'
130
+ ]
131
+ })
132
+ ],
133
+ })
134
+ ```
135
+
136
+ ## 🔄 API Changes
137
+
138
+ ### Component Props
139
+
140
+ **Common prop changes:**
141
+
142
+ ```tsx
143
+ // Before (v0.x)
144
+ <DataTable
145
+ data={data}
146
+ columns={columns}
147
+ enableSearch={true}
148
+ enablePagination={true}
149
+ />
150
+
151
+ // After (v1.x)
152
+ <DataTable
153
+ data={data}
154
+ columns={columns}
155
+ features={{
156
+ search: true,
157
+ pagination: true,
158
+ sorting: true,
159
+ filtering: true
160
+ }}
161
+ />
162
+ ```
163
+
164
+ ### Hook Changes
165
+
166
+ **RBAC hooks moved to separate module:**
167
+
168
+ ```tsx
169
+ // Before
170
+ import { useCan, usePermissions } from '@jmruthers/pace-core';
171
+
172
+ // After
173
+ import { useCan, usePermissions } from '@jmruthers/pace-core/rbac';
174
+ ```
175
+
176
+ ### Import Changes
177
+
178
+ **Consolidated imports:**
179
+
180
+ ```tsx
181
+ // Before
182
+ import { Button } from '@jmruthers/pace-core/components';
183
+ import { useUnifiedAuth } from '@jmruthers/pace-core/hooks';
184
+
185
+ // After
186
+ import { Button, useUnifiedAuth } from '@jmruthers/pace-core';
187
+ ```
188
+
189
+ ## 🐛 Common Migration Issues
190
+
191
+ ### Styling Issues
192
+
193
+ **Problem**: Components appear unstyled after update
194
+
195
+ **Solution**:
196
+ ```tsx
197
+ // Ensure CSS import is first
198
+ import '@jmruthers/pace-core/src/styles/core.css';
199
+ import { Button } from '@jmruthers/pace-core';
200
+ ```
201
+
202
+ ### Build Errors
203
+
204
+ **Problem**: Build fails with Tailwind errors
205
+
206
+ **Solution**:
207
+ ```bash
208
+ # Clear all caches
209
+ rm -rf node_modules package-lock.json
210
+ npm install
211
+
212
+ # Check Tailwind config
213
+ npm run build -- --debug
214
+ ```
215
+
216
+ ### TypeScript Errors
217
+
218
+ **Problem**: Type errors after update
219
+
220
+ **Solution**:
221
+ ```bash
222
+ # Update TypeScript types
223
+ npm install @types/react@latest @types/react-dom@latest
224
+
225
+ # Regenerate types
226
+ npm run type-check
227
+ ```
228
+
229
+ ### Authentication Issues
230
+
231
+ **Problem**: Login not working after update
232
+
233
+ **Solution**:
234
+ ```tsx
235
+ // Check provider hierarchy
236
+ <UnifiedAuthProvider supabaseClient={supabase} appName="my-app">
237
+ <OrganisationProvider>
238
+ <EventProvider>
239
+ <YourApp />
240
+ </EventProvider>
241
+ </OrganisationProvider>
242
+ </UnifiedAuthProvider>
243
+ ```
244
+
245
+ ## ✅ Post-Migration Testing
246
+
247
+ ### Essential Tests
248
+ - [ ] **Build succeeds** - `npm run build`
249
+ - [ ] **App starts** - `npm run dev`
250
+ - [ ] **Authentication works** - Login/logout
251
+ - [ ] **Components render** - All UI components display
252
+ - [ ] **Permissions work** - RBAC functions correctly
253
+ - [ ] **Forms work** - Form validation and submission
254
+ - [ ] **Data tables work** - CRUD operations
255
+ - [ ] **Styling correct** - No visual regressions
256
+
257
+ ### Performance Tests
258
+ - [ ] **Bundle size** - Check for size increases
259
+ - [ ] **Load time** - Measure initial load
260
+ - [ ] **Runtime performance** - Check for slowdowns
261
+ - [ ] **Memory usage** - Monitor for leaks
262
+
263
+ ### Browser Tests
264
+ - [ ] **Chrome** - Latest version
265
+ - [ ] **Firefox** - Latest version
266
+ - [ ] **Safari** - Latest version
267
+ - [ ] **Mobile browsers** - iOS Safari, Chrome Mobile
268
+
269
+ ## 🆘 Getting Help
270
+
271
+ ### If Migration Fails
272
+
273
+ 1. **Check the logs** - Look for specific error messages
274
+ 2. **Revert changes** - Go back to working version
275
+ 3. **Check documentation** - Look for migration guides
276
+ 4. **Search issues** - Check GitHub issues
277
+ 5. **Ask for help** - Create detailed issue report
278
+
279
+ ### Debug Information
280
+
281
+ When asking for help, include:
282
+
283
+ ```bash
284
+ # Version information
285
+ npm list @jmruthers/pace-core
286
+ node --version
287
+ npm --version
288
+
289
+ # Build output
290
+ npm run build 2>&1 | tee build.log
291
+
292
+ # Error details
293
+ # Include full error messages and stack traces
294
+ ```
295
+
296
+ ### Emergency Rollback
297
+
298
+ ```bash
299
+ # Rollback to previous version
300
+ npm install @jmruthers/pace-core@0.4.16
301
+
302
+ # Or specific working version
303
+ npm install @jmruthers/pace-core@0.4.15
304
+
305
+ # Clear caches
306
+ rm -rf node_modules package-lock.json
307
+ npm install
308
+ ```
309
+
310
+ ## 📚 Additional Resources
311
+
312
+ - **[Full Migration Guide](./README.md)** - Detailed migration instructions
313
+ - **[Breaking Changes](./breaking-changes.md)** - Complete list of breaking changes
314
+ - **[Changelog](../CHANGELOG.md)** - Version history and changes
315
+ - **[Troubleshooting](../troubleshooting/README.md)** - Common issues and solutions
316
+ - **[GitHub Issues](https://github.com/jmruthers/pace-core/issues)** - Report bugs and get help
317
+
318
+ ---
319
+
320
+ **Remember**: Always test migrations in a development environment first!
@@ -356,10 +356,10 @@ export function Login() {
356
356
  }
357
357
 
358
358
  return (
359
- <div className="min-h-screen flex items-center justify-center bg-gray-50">
359
+ <div className="min-h-screen flex items-center justify-center bg-sec-50">
360
360
  <div className="max-w-md w-full space-y-8">
361
361
  <div>
362
- <h2 className="mt-6 text-center text-3xl font-extrabold text-gray-900">
362
+ <h2 className="mt-6 text-center text-3xl font-extrabold text-sec-900">
363
363
  Sign in to your account
364
364
  </h2>
365
365
  </div>
@@ -373,7 +373,7 @@ export function Login() {
373
373
  name="email"
374
374
  type="email"
375
375
  required
376
- className="appearance-none rounded-md relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
376
+ className="appearance-none rounded-md relative block w-full px-3 py-2 border border-sec-300 placeholder-sec-500 text-sec-900 focus:outline-none focus:ring-sec-500 focus:border-sec-500 focus:z-10 sm:text-sm"
377
377
  placeholder="Email address"
378
378
  value={email}
379
379
  onChange={(e) => setEmail(e.target.value)}
@@ -388,7 +388,7 @@ export function Login() {
388
388
  name="password"
389
389
  type="password"
390
390
  required
391
- className="appearance-none rounded-md relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
391
+ className="appearance-none rounded-md relative block w-full px-3 py-2 border border-sec-300 placeholder-sec-500 text-sec-900 focus:outline-none focus:ring-sec-500 focus:border-sec-500 focus:z-10 sm:text-sm"
392
392
  placeholder="Password"
393
393
  value={password}
394
394
  onChange={(e) => setPassword(e.target.value)}
@@ -398,7 +398,7 @@ export function Login() {
398
398
  <button
399
399
  type="submit"
400
400
  disabled={loading}
401
- className="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 disabled:opacity-50"
401
+ className="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-main-50 bg-sec-600 hover:bg-sec-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-sec-500 disabled:opacity-50"
402
402
  >
403
403
  {loading ? 'Signing in...' : 'Sign in'}
404
404
  </button>
@@ -430,7 +430,7 @@ export function Dashboard() {
430
430
  }
431
431
 
432
432
  return (
433
- <div className="min-h-screen bg-gray-50">
433
+ <div className="min-h-screen bg-sec-50">
434
434
  <nav className="bg-white shadow">
435
435
  <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
436
436
  <div className="flex justify-between h-16">
@@ -438,12 +438,12 @@ export function Dashboard() {
438
438
  <h1 className="text-xl font-semibold">Dashboard</h1>
439
439
  </div>
440
440
  <div className="flex items-center space-x-4">
441
- <span className="text-sm text-gray-700">
441
+ <span className="text-sm text-sec-700">
442
442
  {user.email} | Org: {selectedOrganisationId}
443
443
  </span>
444
444
  <button
445
445
  onClick={() => supabase.auth.signOut()}
446
- className="text-sm text-gray-500 hover:text-gray-700"
446
+ className="text-sm text-sec-500 hover:text-sec-700"
447
447
  >
448
448
  Sign out
449
449
  </button>
@@ -454,7 +454,7 @@ export function Dashboard() {
454
454
 
455
455
  <main className="max-w-7xl mx-auto py-6 sm:px-6 lg:px-8">
456
456
  <div className="px-4 py-6 sm:px-0">
457
- <div className="border-4 border-dashed border-gray-200 rounded-lg h-96 p-8">
457
+ <div className="border-4 border-dashed border-sec-200 rounded-lg h-96 p-8">
458
458
  <h2 className="text-2xl font-bold mb-4">Welcome to your Dashboard</h2>
459
459
 
460
460
  {/* CRITICAL: Use PagePermissionGuard for page-level permissions */}
@@ -469,7 +469,7 @@ export function Dashboard() {
469
469
  <div className="space-x-4">
470
470
  <Link
471
471
  to="/users"
472
- className="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600"
472
+ className="bg-main-500 text-main-50 px-4 py-2 rounded hover:bg-main-600"
473
473
  >
474
474
  View Users
475
475
  </Link>
@@ -504,23 +504,23 @@ export function Users() {
504
504
  }
505
505
 
506
506
  return (
507
- <div className="min-h-screen bg-gray-50">
507
+ <div className="min-h-screen bg-sec-50">
508
508
  <nav className="bg-white shadow">
509
509
  <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
510
510
  <div className="flex justify-between h-16">
511
511
  <div className="flex items-center">
512
- <Link to="/" className="text-blue-600 hover:text-blue-800 mr-4">
512
+ <Link to="/" className="text-main-600 hover:text-main-800 mr-4">
513
513
  ← Back to Dashboard
514
514
  </Link>
515
515
  <h1 className="text-xl font-semibold">Users</h1>
516
516
  </div>
517
517
  <div className="flex items-center space-x-4">
518
- <span className="text-sm text-gray-700">
518
+ <span className="text-sm text-sec-700">
519
519
  {user.email} | Org: {selectedOrganisationId}
520
520
  </span>
521
521
  <button
522
522
  onClick={() => supabase.auth.signOut()}
523
- className="text-sm text-gray-500 hover:text-gray-700"
523
+ className="text-sm text-sec-500 hover:text-sec-700"
524
524
  >
525
525
  Sign out
526
526
  </button>
@@ -531,7 +531,7 @@ export function Users() {
531
531
 
532
532
  <main className="max-w-7xl mx-auto py-6 sm:px-6 lg:px-8">
533
533
  <div className="px-4 py-6 sm:px-0">
534
- <div className="border-4 border-dashed border-gray-200 rounded-lg h-96 p-8">
534
+ <div className="border-4 border-dashed border-sec-200 rounded-lg h-96 p-8">
535
535
  <h2 className="text-2xl font-bold mb-4">User Management</h2>
536
536
 
537
537
  {/* CRITICAL: Use PagePermissionGuard for page-level permissions */}
@@ -544,7 +544,7 @@ export function Users() {
544
544
  <p>You have access to the users page!</p>
545
545
  <p>This means your RBAC system is working correctly.</p>
546
546
 
547
- <div className="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded">
547
+ <div className="bg-main-100 border border-main-400 text-main-700 px-4 py-3 rounded">
548
548
  <strong>Success!</strong> Your RBAC setup is working correctly.
549
549
  </div>
550
550
  </div>
@@ -777,13 +777,13 @@ class DebugErrorBoundary extends React.Component {
777
777
  render() {
778
778
  if (this.state.hasError) {
779
779
  return (
780
- <div className="p-4 border border-red-500 bg-red-50">
781
- <h2 className="text-red-800 font-bold">Something went wrong</h2>
780
+ <div className="p-4 border border-acc-500 bg-acc-50">
781
+ <h2 className="text-acc-800 font-bold">Something went wrong</h2>
782
782
  <details className="mt-2">
783
- <summary className="cursor-pointer text-red-700">
783
+ <summary className="cursor-pointer text-acc-700">
784
784
  Error Details (Click to expand)
785
785
  </summary>
786
- <pre className="mt-2 text-xs text-red-600 whitespace-pre-wrap">
786
+ <pre className="mt-2 text-xs text-acc-600 whitespace-pre-wrap">
787
787
  {this.state.error && this.state.error.toString()}
788
788
  {this.state.errorInfo.componentStack}
789
789
  </pre>
@@ -135,7 +135,7 @@ export function Meals() {
135
135
  fallback={
136
136
  <div className="min-h-screen flex items-center justify-center">
137
137
  <div className="text-center">
138
- <div className="animate-spin rounded-full h-8 w-8 border-b-2 border-gray-900 mx-auto mb-4"></div>
138
+ <div className="animate-spin rounded-full h-8 w-8 border-b-2 border-sec-900 mx-auto mb-4"></div>
139
139
  <p>Loading permissions...</p>
140
140
  </div>
141
141
  </div>