@jmruthers/pace-core 0.5.184 → 0.5.186

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 (319) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +60 -1
  3. package/core-usage-manifest.json +312 -0
  4. package/dist/{DataTable-QAB34V6K.js → DataTable-IX2NBUTP.js} +6 -6
  5. package/dist/{DataTable-Bz8ffqyA.d.ts → DataTable-Z9NLVJh0.d.ts} +1 -1
  6. package/dist/{index-Bl--n7-T.d.ts → PublicPageProvider-DIzEzwKl.d.ts} +23 -10
  7. package/dist/{UnifiedAuthProvider-7F6T4B6K.js → UnifiedAuthProvider-A4BCQRJY.js} +4 -2
  8. package/dist/{UnifiedAuthProvider-F86d7dSi.d.ts → UnifiedAuthProvider-BG0AL5eE.d.ts} +2 -1
  9. package/dist/{api-ROMBCNKU.js → api-BMFCXVQX.js} +2 -2
  10. package/dist/{chunk-RA3JUFMW.js → chunk-445GEP27.js} +154 -4
  11. package/dist/{chunk-RA3JUFMW.js.map → chunk-445GEP27.js.map} +1 -1
  12. package/dist/{chunk-W22JP75J.js → chunk-DAGICKHT.js} +9 -7
  13. package/dist/chunk-DAGICKHT.js.map +1 -0
  14. package/dist/{chunk-FUEYYMX5.js → chunk-FXFJRTKI.js} +24 -3
  15. package/dist/chunk-FXFJRTKI.js.map +1 -0
  16. package/dist/{chunk-CSOFYHAG.js → chunk-GRIQLQ52.js} +374 -60
  17. package/dist/chunk-GRIQLQ52.js.map +1 -0
  18. package/dist/{chunk-NQPMQGS2.js → chunk-HDCUMOOI.js} +497 -399
  19. package/dist/chunk-HDCUMOOI.js.map +1 -0
  20. package/dist/chunk-HESYZWZW.js +388 -0
  21. package/dist/chunk-HESYZWZW.js.map +1 -0
  22. package/dist/{chunk-QUVSNGIP.js → chunk-HGPQUCBC.js} +34 -9
  23. package/dist/{chunk-QUVSNGIP.js.map → chunk-HGPQUCBC.js.map} +1 -1
  24. package/dist/{chunk-PWAHJW4G.js → chunk-OALXJH4Y.js} +86 -33
  25. package/dist/chunk-OALXJH4Y.js.map +1 -0
  26. package/dist/{chunk-MI7HBHN3.js → chunk-TC7D3CR3.js} +89 -9
  27. package/dist/chunk-TC7D3CR3.js.map +1 -0
  28. package/dist/chunk-THRPYOFK.js +215 -0
  29. package/dist/chunk-THRPYOFK.js.map +1 -0
  30. package/dist/{chunk-M7W4CP3M.js → chunk-U6WNSFX5.js} +2 -1
  31. package/dist/chunk-U6WNSFX5.js.map +1 -0
  32. package/dist/{chunk-UHNYIBXL.js → chunk-UQWSHFVX.js} +1 -1
  33. package/dist/chunk-UQWSHFVX.js.map +1 -0
  34. package/dist/{chunk-QCDXODCA.js → chunk-XAUHJD3L.js} +2 -2
  35. package/dist/components.d.ts +182 -6
  36. package/dist/components.js +157 -11
  37. package/dist/components.js.map +1 -1
  38. package/dist/{database.generated-CBmg2950.d.ts → database.generated-DI89OQeI.d.ts} +63 -9
  39. package/dist/eslint-rules/pace-core-compliance.cjs +406 -0
  40. package/dist/{file-reference-D06mEEWW.d.ts → file-reference-PRTSLxKx.d.ts} +10 -1
  41. package/dist/hooks.d.ts +52 -15
  42. package/dist/hooks.js +12 -22
  43. package/dist/hooks.js.map +1 -1
  44. package/dist/index.d.ts +12 -12
  45. package/dist/index.js +82 -18
  46. package/dist/index.js.map +1 -1
  47. package/dist/providers.d.ts +1 -1
  48. package/dist/providers.js +3 -1
  49. package/dist/rbac/index.d.ts +206 -15
  50. package/dist/rbac/index.js +28 -6
  51. package/dist/timezone-_pgH8qrY.d.ts +530 -0
  52. package/dist/{types-_x1f4QBF.d.ts → types-DUyCRSTj.d.ts} +1 -1
  53. package/dist/types.d.ts +2 -2
  54. package/dist/types.js +1 -1
  55. package/dist/{usePublicRouteParams-JJczomYq.d.ts → usePublicRouteParams-D71QLlg4.d.ts} +114 -3
  56. package/dist/utils.d.ts +110 -152
  57. package/dist/utils.js +128 -138
  58. package/dist/utils.js.map +1 -1
  59. package/docs/api/README.md +60 -1
  60. package/docs/api/classes/ColumnFactory.md +1 -1
  61. package/docs/api/classes/ErrorBoundary.md +1 -1
  62. package/docs/api/classes/InvalidScopeError.md +1 -1
  63. package/docs/api/classes/Logger.md +178 -0
  64. package/docs/api/classes/MissingUserContextError.md +1 -1
  65. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  66. package/docs/api/classes/PermissionDeniedError.md +1 -1
  67. package/docs/api/classes/RBACAuditManager.md +2 -2
  68. package/docs/api/classes/RBACCache.md +1 -1
  69. package/docs/api/classes/RBACEngine.md +2 -2
  70. package/docs/api/classes/RBACError.md +1 -1
  71. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  72. package/docs/api/classes/SecureSupabaseClient.md +5 -5
  73. package/docs/api/classes/StorageUtils.md +1 -1
  74. package/docs/api/enums/FileCategory.md +1 -1
  75. package/docs/api/enums/LogLevel.md +54 -0
  76. package/docs/api/enums/RBACErrorCode.md +1 -1
  77. package/docs/api/enums/RPCFunction.md +1 -1
  78. package/docs/api/interfaces/AggregateConfig.md +1 -1
  79. package/docs/api/interfaces/BadgeProps.md +1 -1
  80. package/docs/api/interfaces/ButtonProps.md +1 -1
  81. package/docs/api/interfaces/CalendarProps.md +18 -2
  82. package/docs/api/interfaces/CardProps.md +1 -1
  83. package/docs/api/interfaces/ColorPalette.md +1 -1
  84. package/docs/api/interfaces/ColorShade.md +1 -1
  85. package/docs/api/interfaces/ComplianceResult.md +30 -0
  86. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  87. package/docs/api/interfaces/DataRecord.md +1 -1
  88. package/docs/api/interfaces/DataTableAction.md +1 -1
  89. package/docs/api/interfaces/DataTableColumn.md +1 -1
  90. package/docs/api/interfaces/DataTableProps.md +1 -1
  91. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  92. package/docs/api/interfaces/DatabaseComplianceResult.md +85 -0
  93. package/docs/api/interfaces/DatabaseIssue.md +41 -0
  94. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  95. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  96. package/docs/api/interfaces/EventAppRoleData.md +6 -6
  97. package/docs/api/interfaces/ExportColumn.md +1 -1
  98. package/docs/api/interfaces/ExportOptions.md +1 -1
  99. package/docs/api/interfaces/FileDisplayProps.md +1 -1
  100. package/docs/api/interfaces/FileMetadata.md +1 -1
  101. package/docs/api/interfaces/FileReference.md +1 -1
  102. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  103. package/docs/api/interfaces/FileUploadOptions.md +48 -8
  104. package/docs/api/interfaces/FileUploadProps.md +46 -13
  105. package/docs/api/interfaces/FooterProps.md +1 -1
  106. package/docs/api/interfaces/FormFieldProps.md +1 -1
  107. package/docs/api/interfaces/FormProps.md +1 -1
  108. package/docs/api/interfaces/GrantEventAppRoleParams.md +9 -9
  109. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  110. package/docs/api/interfaces/InputProps.md +1 -1
  111. package/docs/api/interfaces/LabelProps.md +1 -1
  112. package/docs/api/interfaces/LoggerConfig.md +62 -0
  113. package/docs/api/interfaces/LoginFormProps.md +1 -1
  114. package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
  115. package/docs/api/interfaces/NavigationContextType.md +1 -1
  116. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  117. package/docs/api/interfaces/NavigationItem.md +1 -1
  118. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  119. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  120. package/docs/api/interfaces/Organisation.md +1 -1
  121. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  122. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  123. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  124. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  125. package/docs/api/interfaces/PaceAppLayoutProps.md +36 -23
  126. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  127. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  128. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  129. package/docs/api/interfaces/PagePermissionGuardProps.md +11 -11
  130. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  131. package/docs/api/interfaces/PaletteData.md +1 -1
  132. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  133. package/docs/api/interfaces/ProgressProps.md +1 -1
  134. package/docs/api/interfaces/ProtectedRouteProps.md +6 -6
  135. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  136. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  137. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  138. package/docs/api/interfaces/QuickFix.md +52 -0
  139. package/docs/api/interfaces/RBACAccessValidateParams.md +1 -1
  140. package/docs/api/interfaces/RBACAccessValidateResult.md +1 -1
  141. package/docs/api/interfaces/RBACAuditLogParams.md +1 -1
  142. package/docs/api/interfaces/RBACAuditLogResult.md +1 -1
  143. package/docs/api/interfaces/RBACConfig.md +4 -4
  144. package/docs/api/interfaces/RBACContext.md +1 -1
  145. package/docs/api/interfaces/RBACLogger.md +1 -1
  146. package/docs/api/interfaces/RBACPageAccessCheckParams.md +1 -1
  147. package/docs/api/interfaces/RBACPermissionCheckParams.md +1 -1
  148. package/docs/api/interfaces/RBACPermissionCheckResult.md +1 -1
  149. package/docs/api/interfaces/RBACPermissionsGetParams.md +1 -1
  150. package/docs/api/interfaces/RBACPermissionsGetResult.md +1 -1
  151. package/docs/api/interfaces/RBACResult.md +1 -1
  152. package/docs/api/interfaces/RBACRoleGrantParams.md +1 -1
  153. package/docs/api/interfaces/RBACRoleGrantResult.md +1 -1
  154. package/docs/api/interfaces/RBACRoleRevokeParams.md +1 -1
  155. package/docs/api/interfaces/RBACRoleRevokeResult.md +1 -1
  156. package/docs/api/interfaces/RBACRoleValidateParams.md +1 -1
  157. package/docs/api/interfaces/RBACRoleValidateResult.md +1 -1
  158. package/docs/api/interfaces/RBACRolesListParams.md +1 -1
  159. package/docs/api/interfaces/RBACRolesListResult.md +1 -1
  160. package/docs/api/interfaces/RBACSessionTrackParams.md +1 -1
  161. package/docs/api/interfaces/RBACSessionTrackResult.md +1 -1
  162. package/docs/api/interfaces/ResourcePermissions.md +1 -1
  163. package/docs/api/interfaces/RevokeEventAppRoleParams.md +7 -7
  164. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  165. package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
  166. package/docs/api/interfaces/RoleManagementResult.md +5 -5
  167. package/docs/api/interfaces/RouteAccessRecord.md +1 -1
  168. package/docs/api/interfaces/RouteConfig.md +1 -1
  169. package/docs/api/interfaces/RuntimeComplianceResult.md +55 -0
  170. package/docs/api/interfaces/SecureDataContextType.md +1 -1
  171. package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
  172. package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
  173. package/docs/api/interfaces/SetupIssue.md +41 -0
  174. package/docs/api/interfaces/StorageConfig.md +1 -1
  175. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  176. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  177. package/docs/api/interfaces/StorageListOptions.md +1 -1
  178. package/docs/api/interfaces/StorageListResult.md +1 -1
  179. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  180. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  181. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  182. package/docs/api/interfaces/StyleImport.md +1 -1
  183. package/docs/api/interfaces/SwitchProps.md +1 -1
  184. package/docs/api/interfaces/TabsContentProps.md +1 -1
  185. package/docs/api/interfaces/TabsListProps.md +1 -1
  186. package/docs/api/interfaces/TabsProps.md +1 -1
  187. package/docs/api/interfaces/TabsTriggerProps.md +1 -1
  188. package/docs/api/interfaces/TextareaProps.md +1 -1
  189. package/docs/api/interfaces/ToastActionElement.md +1 -1
  190. package/docs/api/interfaces/ToastProps.md +1 -1
  191. package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
  192. package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
  193. package/docs/api/interfaces/UseFormDialogOptions.md +62 -0
  194. package/docs/api/interfaces/UseFormDialogReturn.md +117 -0
  195. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  196. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  197. package/docs/api/interfaces/UsePublicEventLogoOptions.md +2 -2
  198. package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
  199. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  200. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  201. package/docs/api/interfaces/UsePublicFileDisplayOptions.md +2 -2
  202. package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
  203. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  204. package/docs/api/interfaces/UseResolvedScopeOptions.md +2 -2
  205. package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
  206. package/docs/api/interfaces/UseResourcePermissionsOptions.md +1 -1
  207. package/docs/api/interfaces/UserEventAccess.md +1 -1
  208. package/docs/api/interfaces/UserMenuProps.md +1 -1
  209. package/docs/api/interfaces/UserProfile.md +1 -1
  210. package/docs/api/modules.md +746 -50
  211. package/docs/api-reference/components.md +26 -12
  212. package/docs/api-reference/hooks.md +111 -0
  213. package/docs/api-reference/rpc-functions.md +1 -1
  214. package/docs/api-reference/utilities.md +184 -0
  215. package/docs/getting-started/installation-guide.md +75 -16
  216. package/docs/getting-started/quick-start.md +61 -11
  217. package/docs/implementation-guides/authentication.md +88 -12
  218. package/docs/implementation-guides/file-reference-system.md +26 -3
  219. package/docs/implementation-guides/file-upload-storage.md +30 -1
  220. package/docs/rbac/README.md +1 -0
  221. package/docs/rbac/compliance/compliance-guide.md +544 -0
  222. package/docs/rbac/getting-started.md +158 -33
  223. package/docs/standards/pace-core-compliance.md +432 -0
  224. package/eslint-config-pace-core.cjs +93 -0
  225. package/package.json +15 -3
  226. package/scripts/analyze-bundle.js +232 -0
  227. package/scripts/build-css.js +56 -0
  228. package/scripts/build-docs-incremental.js +1015 -0
  229. package/scripts/check-pace-core-compliance.cjs +2353 -0
  230. package/scripts/check-pace-core-compliance.js +512 -0
  231. package/scripts/generate-docs.js +157 -0
  232. package/scripts/setup-build-cache.js +73 -0
  233. package/scripts/utils/command-runner.js +131 -0
  234. package/scripts/utils/env.js +33 -0
  235. package/scripts/utils/index.js +10 -0
  236. package/scripts/utils/logger.js +88 -0
  237. package/scripts/utils/path-helpers.js +37 -0
  238. package/scripts/validate-formats.js +133 -0
  239. package/scripts/validate-master.js +155 -0
  240. package/scripts/validate-pre-publish.js +140 -0
  241. package/scripts/validate-theme.js +142 -0
  242. package/src/components/Calendar/Calendar.tsx +8 -1
  243. package/src/components/Card/Card.tsx +47 -8
  244. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +314 -0
  245. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.tsx +126 -0
  246. package/src/components/DatePickerWithTimezone/README.md +135 -0
  247. package/src/components/DatePickerWithTimezone/index.ts +10 -0
  248. package/src/components/DateTimeField/DateTimeField.test.tsx +358 -0
  249. package/src/components/DateTimeField/DateTimeField.tsx +232 -0
  250. package/src/components/DateTimeField/README.md +148 -0
  251. package/src/components/DateTimeField/index.ts +10 -0
  252. package/src/components/FileUpload/FileUpload.test.tsx +2 -0
  253. package/src/components/FileUpload/FileUpload.tsx +10 -1
  254. package/src/components/Header/Header.test.tsx +47 -18
  255. package/src/components/Header/Header.tsx +22 -7
  256. package/src/components/PaceAppLayout/PaceAppLayout.tsx +29 -20
  257. package/src/components/PaceAppLayout/README.md +9 -0
  258. package/src/components/ProtectedRoute/ProtectedRoute.test.tsx +37 -8
  259. package/src/components/ProtectedRoute/ProtectedRoute.tsx +146 -5
  260. package/src/components/index.ts +8 -0
  261. package/src/eslint-rules/pace-core-compliance.cjs +406 -0
  262. package/src/eslint-rules/pace-core-compliance.js +640 -0
  263. package/src/hooks/__tests__/useFormDialog.test.ts +478 -0
  264. package/src/hooks/index.ts +5 -0
  265. package/src/hooks/useFileReference.test.ts +2 -0
  266. package/src/hooks/useFormDialog.ts +147 -0
  267. package/src/hooks/usePreventTabReload.ts +106 -0
  268. package/src/hooks/useSecureDataAccess.ts +2 -2
  269. package/src/index.ts +27 -0
  270. package/src/providers/services/OrganisationServiceProvider.tsx +6 -5
  271. package/src/providers/services/UnifiedAuthProvider.tsx +24 -3
  272. package/src/rbac/__tests__/rbac-role-isolation.test.ts +456 -0
  273. package/src/rbac/__tests__/scenarios.user-role.test.tsx +3 -0
  274. package/src/rbac/compliance/database-validator.ts +165 -0
  275. package/src/rbac/compliance/index.ts +38 -0
  276. package/src/rbac/compliance/quick-fix-suggestions.ts +209 -0
  277. package/src/rbac/compliance/runtime-compliance.ts +77 -0
  278. package/src/rbac/compliance/setup-validator.ts +131 -0
  279. package/src/rbac/components/PagePermissionGuard.tsx +8 -64
  280. package/src/rbac/components/__tests__/PagePermissionGuard.test.tsx +35 -21
  281. package/src/rbac/docs/event-based-apps.md +285 -0
  282. package/src/rbac/errors.ts +11 -0
  283. package/src/rbac/hooks/useRoleManagement.ts +292 -12
  284. package/src/rbac/index.ts +30 -0
  285. package/src/services/OrganisationService.ts +4 -0
  286. package/src/styles/core.css +5 -5
  287. package/src/types/database.generated.ts +63 -9
  288. package/src/types/file-reference.ts +9 -0
  289. package/src/utils/__tests__/timezone.test.ts +345 -0
  290. package/src/utils/file-reference/__tests__/file-reference.test.ts +60 -4
  291. package/src/utils/file-reference/index.ts +13 -2
  292. package/src/utils/formatting/formatDateTimeTimezone.test.ts +167 -0
  293. package/src/utils/formatting/formatting.ts +179 -0
  294. package/src/utils/index.ts +27 -1
  295. package/src/utils/location/index.ts +16 -0
  296. package/src/utils/location/location.test.ts +286 -0
  297. package/src/utils/location/location.ts +175 -0
  298. package/src/utils/security/secureDataAccess.ts +1 -1
  299. package/src/utils/storage/helpers.ts +68 -0
  300. package/src/utils/timezone/index.ts +17 -0
  301. package/src/utils/timezone/timezone.test.ts +349 -0
  302. package/src/utils/timezone/timezone.ts +281 -0
  303. package/dist/chunk-CSOFYHAG.js.map +0 -1
  304. package/dist/chunk-FUEYYMX5.js.map +0 -1
  305. package/dist/chunk-HKIT6O7W.js +0 -198
  306. package/dist/chunk-HKIT6O7W.js.map +0 -1
  307. package/dist/chunk-KUEN3HFB.js +0 -94
  308. package/dist/chunk-KUEN3HFB.js.map +0 -1
  309. package/dist/chunk-M7W4CP3M.js.map +0 -1
  310. package/dist/chunk-MI7HBHN3.js.map +0 -1
  311. package/dist/chunk-NQPMQGS2.js.map +0 -1
  312. package/dist/chunk-PWAHJW4G.js.map +0 -1
  313. package/dist/chunk-UHNYIBXL.js.map +0 -1
  314. package/dist/chunk-W22JP75J.js.map +0 -1
  315. package/dist/formatting-5wETwiGF.d.ts +0 -162
  316. /package/dist/{DataTable-QAB34V6K.js.map → DataTable-IX2NBUTP.js.map} +0 -0
  317. /package/dist/{UnifiedAuthProvider-7F6T4B6K.js.map → UnifiedAuthProvider-A4BCQRJY.js.map} +0 -0
  318. /package/dist/{api-ROMBCNKU.js.map → api-BMFCXVQX.js.map} +0 -0
  319. /package/dist/{chunk-QCDXODCA.js.map → chunk-XAUHJD3L.js.map} +0 -0
@@ -0,0 +1,406 @@
1
+ /**
2
+ * ESLint Rules for pace-core Compliance Enforcement
3
+ * @package @jmruthers/pace-core
4
+ * @module ESLintRules/pace-core-compliance
5
+ * @since 1.0.0
6
+ *
7
+ * This module provides ESLint rules to enforce pace-core usage patterns
8
+ * and prevent consuming apps from creating local alternatives.
9
+ */
10
+
11
+ const fs = require('fs');
12
+ const path = require('path');
13
+
14
+ // Load manifest data
15
+ let manifestData = null;
16
+ try {
17
+ const manifestPath = path.join(__dirname, '../../core-usage-manifest.json');
18
+ if (fs.existsSync(manifestPath)) {
19
+ manifestData = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
20
+ }
21
+ } catch (error) {
22
+ // If manifest can't be loaded, rules will use hardcoded defaults
23
+ console.warn('Warning: Could not load core-usage-manifest.json, using defaults');
24
+ }
25
+
26
+ // Get restricted imports from manifest or use defaults
27
+ const getRestrictedImports = () => {
28
+ if (manifestData && manifestData.restrictedImports) {
29
+ return manifestData.restrictedImports;
30
+ }
31
+ // Fallback defaults
32
+ return [
33
+ { module: '@radix-ui/react-avatar', reason: 'Use Avatar component from pace-core instead' },
34
+ { module: '@radix-ui/react-checkbox', reason: 'Use Checkbox component from pace-core instead' },
35
+ { module: '@radix-ui/react-dialog', reason: 'Use Dialog component from pace-core instead' },
36
+ { module: '@radix-ui/react-label', reason: 'Use Label component from pace-core instead' },
37
+ { module: '@radix-ui/react-progress', reason: 'Use Progress component from pace-core instead' },
38
+ { module: '@radix-ui/react-slot', reason: 'Use Button component from pace-core which handles slot composition' },
39
+ { module: '@radix-ui/react-switch', reason: 'Use Switch component from pace-core instead' },
40
+ { module: '@radix-ui/react-tabs', reason: 'Use Tabs component from pace-core instead' },
41
+ { module: '@radix-ui/react-toast', reason: 'Use Toast component and useToast hook from pace-core instead' },
42
+ { module: '@radix-ui/react-tooltip', reason: 'Use Tooltip component from pace-core instead' },
43
+ { module: 'react-day-picker', reason: 'Use Calendar component from pace-core instead' },
44
+ { module: '@tanstack/react-table', reason: 'Use DataTable component and related hooks from pace-core instead. DataTable wraps and standardizes table functionality' },
45
+ { module: 'react-hook-form', reason: 'Use Form component and useZodForm hook from pace-core instead' },
46
+ { module: 'zod', reason: 'Use validation utilities and schemas from pace-core instead. pace-core provides standardized validation helpers' }
47
+ ];
48
+ };
49
+
50
+ // Get pace-core components from manifest or use defaults
51
+ const getPaceCoreComponents = () => {
52
+ if (manifestData && manifestData.components) {
53
+ return manifestData.components;
54
+ }
55
+ return ['Button', 'Card', 'Dialog', 'Input', 'Form', 'Select', 'Alert', 'Badge', 'Checkbox', 'Switch', 'Textarea', 'Label', 'Table', 'DataTable', 'Toast', 'Tooltip', 'Tabs', 'Calendar', 'Avatar', 'Progress'];
56
+ };
57
+
58
+ // Get pace-core hooks from manifest or use defaults
59
+ const getPaceCoreHooks = () => {
60
+ if (manifestData && manifestData.hooks) {
61
+ return manifestData.hooks;
62
+ }
63
+ return ['useToast', 'useDebounce', 'useUnifiedAuth', 'useEvents', 'useOrganisations', 'useFileReference', 'useStorage', 'useZodForm', 'useRBAC', 'usePermissions'];
64
+ };
65
+
66
+ // Get pace-core utils from manifest or use defaults
67
+ const getPaceCoreUtils = () => {
68
+ if (manifestData && manifestData.utils) {
69
+ return manifestData.utils;
70
+ }
71
+ return ['formatDate', 'formatCurrency', 'formatNumber', 'formatTime', 'formatDateTime', 'cn', 'validateUserInput', 'sanitizeUserInput', 'hasPermission', 'getAppConfig'];
72
+ };
73
+
74
+ module.exports = {
75
+ rules: {
76
+ /**
77
+ * Block direct imports of libraries wrapped by pace-core
78
+ */
79
+ 'no-restricted-imports': {
80
+ meta: {
81
+ type: 'problem',
82
+ docs: {
83
+ description: 'Disallow direct imports of libraries that pace-core wraps',
84
+ category: 'Best Practices',
85
+ recommended: true
86
+ },
87
+ fixable: 'code',
88
+ hasSuggestions: true,
89
+ messages: {
90
+ restrictedImport: '{{message}} Import from {{alternative}} instead.',
91
+ restrictedImportWithReason: '{{message}} {{reason}}'
92
+ }
93
+ },
94
+ create(context) {
95
+ const restrictedImports = getRestrictedImports();
96
+ const restrictedModules = restrictedImports.map(imp => imp.module);
97
+
98
+ // Also catch @radix-ui/* patterns
99
+ const radixPattern = /^@radix-ui\//;
100
+
101
+ return {
102
+ ImportDeclaration(node) {
103
+ const importSource = node.source.value;
104
+
105
+ // Check exact matches
106
+ const restricted = restrictedImports.find(imp => imp.module === importSource);
107
+ if (restricted) {
108
+ context.report({
109
+ node: node.source,
110
+ messageId: 'restrictedImportWithReason',
111
+ data: {
112
+ message: `Direct import of '${importSource}' is not allowed.`,
113
+ reason: restricted.reason
114
+ },
115
+ suggest: [{
116
+ desc: `Use pace-core alternative: ${restricted.reason}`,
117
+ fix(fixer) {
118
+ // Suggest importing from pace-core instead
119
+ const paceCoreAlternative = getPaceCoreAlternative(importSource);
120
+ if (paceCoreAlternative) {
121
+ return fixer.replaceText(
122
+ node.source,
123
+ `'@jmruthers/pace-core${paceCoreAlternative}'`
124
+ );
125
+ }
126
+ return null;
127
+ }
128
+ }]
129
+ });
130
+ return;
131
+ }
132
+
133
+ // Check @radix-ui/* pattern
134
+ if (radixPattern.test(importSource) && !restrictedModules.includes(importSource)) {
135
+ context.report({
136
+ node: node.source,
137
+ messageId: 'restrictedImport',
138
+ data: {
139
+ message: `Direct import of '${importSource}' is not allowed.`,
140
+ alternative: '@jmruthers/pace-core'
141
+ },
142
+ suggest: [{
143
+ desc: 'Use pace-core component instead',
144
+ fix(fixer) {
145
+ return fixer.replaceText(
146
+ node.source,
147
+ "'@jmruthers/pace-core'"
148
+ );
149
+ }
150
+ }]
151
+ });
152
+ }
153
+ }
154
+ };
155
+ }
156
+ },
157
+
158
+ /**
159
+ * Prefer pace-core components over native HTML elements or custom implementations
160
+ */
161
+ 'prefer-pace-core-components': {
162
+ meta: {
163
+ type: 'suggestion',
164
+ docs: {
165
+ description: 'Suggest using pace-core components instead of native HTML elements',
166
+ category: 'Best Practices',
167
+ recommended: true
168
+ },
169
+ hasSuggestions: true,
170
+ messages: {
171
+ preferButton: "Use 'Button' component from '@jmruthers/pace-core' instead of <button>",
172
+ preferInput: "Use 'Input' component from '@jmruthers/pace-core' instead of <input>",
173
+ preferTextarea: "Use 'Textarea' component from '@jmruthers/pace-core' instead of <textarea>",
174
+ preferLabel: "Use 'Label' component from '@jmruthers/pace-core' instead of <label>",
175
+ preferForm: "Use 'Form' component from '@jmruthers/pace-core' instead of custom form implementation"
176
+ }
177
+ },
178
+ create(context) {
179
+ const paceCoreComponents = getPaceCoreComponents();
180
+
181
+ return {
182
+ JSXOpeningElement(node) {
183
+ const elementName = node.name.name;
184
+
185
+ if (!elementName) return;
186
+
187
+ // Check for native HTML elements that have pace-core alternatives
188
+ const nativeToPaceCore = {
189
+ 'button': 'Button',
190
+ 'input': 'Input',
191
+ 'textarea': 'Textarea',
192
+ 'label': 'Label'
193
+ };
194
+
195
+ if (nativeToPaceCore[elementName.toLowerCase()]) {
196
+ const paceCoreComponent = nativeToPaceCore[elementName.toLowerCase()];
197
+ if (paceCoreComponents.includes(paceCoreComponent)) {
198
+ context.report({
199
+ node,
200
+ messageId: `prefer${paceCoreComponent}`,
201
+ suggest: [{
202
+ desc: `Import and use ${paceCoreComponent} from pace-core`,
203
+ fix(fixer) {
204
+ // This is a complex fix, so we'll just report
205
+ return null;
206
+ }
207
+ }]
208
+ });
209
+ }
210
+ }
211
+ }
212
+ };
213
+ }
214
+ },
215
+
216
+ /**
217
+ * Detect custom hooks that duplicate pace-core functionality
218
+ */
219
+ 'prefer-pace-core-hooks': {
220
+ meta: {
221
+ type: 'suggestion',
222
+ docs: {
223
+ description: 'Suggest using pace-core hooks instead of custom implementations',
224
+ category: 'Best Practices',
225
+ recommended: true
226
+ },
227
+ messages: {
228
+ preferPaceCoreHook: "Consider using '{{hook}}' from '@jmruthers/pace-core' instead of custom hook '{{customHook}}'"
229
+ }
230
+ },
231
+ create(context) {
232
+ const paceCoreHooks = getPaceCoreHooks();
233
+ const hookPatterns = {
234
+ 'useToast': ['useToast', 'useNotification', 'useSnackbar'],
235
+ 'useDebounce': ['useDebounce', 'useDebounced'],
236
+ 'useAuth': ['useAuth', 'useAuthentication', 'useUser'],
237
+ 'useFile': ['useFile', 'useFileUpload', 'useFileReference'],
238
+ 'useForm': ['useForm', 'useZodForm'],
239
+ 'useTable': ['useTable', 'useDataTable']
240
+ };
241
+
242
+ return {
243
+ FunctionDeclaration(node) {
244
+ const functionName = node.id?.name;
245
+ if (!functionName || !functionName.startsWith('use')) return;
246
+
247
+ // Check if this looks like a hook that pace-core provides
248
+ for (const [paceCoreHook, patterns] of Object.entries(hookPatterns)) {
249
+ if (paceCoreHooks.includes(paceCoreHook)) {
250
+ for (const pattern of patterns) {
251
+ if (functionName.toLowerCase().includes(pattern.toLowerCase().replace('use', ''))) {
252
+ context.report({
253
+ node: node.id,
254
+ messageId: 'preferPaceCoreHook',
255
+ data: {
256
+ hook: paceCoreHook,
257
+ customHook: functionName
258
+ }
259
+ });
260
+ return;
261
+ }
262
+ }
263
+ }
264
+ }
265
+ }
266
+ };
267
+ }
268
+ },
269
+
270
+ /**
271
+ * Detect utility functions that duplicate pace-core functionality
272
+ */
273
+ 'prefer-pace-core-utils': {
274
+ meta: {
275
+ type: 'suggestion',
276
+ docs: {
277
+ description: 'Suggest using pace-core utilities instead of custom implementations',
278
+ category: 'Best Practices',
279
+ recommended: true
280
+ },
281
+ messages: {
282
+ preferPaceCoreUtil: "Consider using '{{util}}' from '@jmruthers/pace-core' instead of custom function '{{customUtil}}'"
283
+ }
284
+ },
285
+ create(context) {
286
+ const paceCoreUtils = getPaceCoreUtils();
287
+ const utilPatterns = {
288
+ 'formatDate': ['formatDate', 'formatDateTime', 'dateFormat'],
289
+ 'formatCurrency': ['formatCurrency', 'formatMoney', 'currencyFormat'],
290
+ 'formatNumber': ['formatNumber', 'numberFormat'],
291
+ 'cn': ['cn', 'classNames', 'clsx', 'mergeClasses'],
292
+ 'validateUserInput': ['validate', 'validateInput', 'validateUser'],
293
+ 'sanitizeUserInput': ['sanitize', 'sanitizeInput', 'sanitizeUser']
294
+ };
295
+
296
+ return {
297
+ FunctionDeclaration(node) {
298
+ const functionName = node.id?.name;
299
+ if (!functionName) return;
300
+
301
+ // Check if this looks like a util that pace-core provides
302
+ for (const [paceCoreUtil, patterns] of Object.entries(utilPatterns)) {
303
+ if (paceCoreUtils.includes(paceCoreUtil)) {
304
+ for (const pattern of patterns) {
305
+ if (functionName.toLowerCase().includes(pattern.toLowerCase())) {
306
+ context.report({
307
+ node: node.id,
308
+ messageId: 'preferPaceCoreUtil',
309
+ data: {
310
+ util: paceCoreUtil,
311
+ customUtil: functionName
312
+ }
313
+ });
314
+ return;
315
+ }
316
+ }
317
+ }
318
+ }
319
+ }
320
+ };
321
+ }
322
+ },
323
+
324
+ /**
325
+ * Detect component files with names matching pace-core components
326
+ */
327
+ 'no-local-component-duplication': {
328
+ meta: {
329
+ type: 'problem',
330
+ docs: {
331
+ description: 'Disallow local components with names matching pace-core components',
332
+ category: 'Best Practices',
333
+ recommended: true
334
+ },
335
+ messages: {
336
+ duplicateComponent: "Component '{{componentName}}' conflicts with pace-core component. Use '@jmruthers/pace-core' instead of creating a local version."
337
+ }
338
+ },
339
+ create(context) {
340
+ const paceCoreComponents = getPaceCoreComponents();
341
+ const filename = context.getFilename();
342
+
343
+ // Only check component files (components/, src/components/, etc.)
344
+ if (!filename.match(/(components|Components)\//)) {
345
+ return {};
346
+ }
347
+
348
+ // Extract component name from filename
349
+ const basename = path.basename(filename, path.extname(filename));
350
+ const componentName = basename.replace(/\.(test|spec)$/, '');
351
+
352
+ return {
353
+ Program(node) {
354
+ // Check if this file exports a component with a name matching pace-core
355
+ if (paceCoreComponents.includes(componentName)) {
356
+ // Check if file exports this component
357
+ const hasExport = node.body.some(stmt => {
358
+ if (stmt.type === 'ExportNamedDeclaration') {
359
+ return stmt.declaration?.id?.name === componentName ||
360
+ stmt.specifiers?.some(spec => spec.exported.name === componentName);
361
+ }
362
+ if (stmt.type === 'ExportDefaultDeclaration') {
363
+ return stmt.declaration?.id?.name === componentName ||
364
+ stmt.declaration?.name === componentName;
365
+ }
366
+ return false;
367
+ });
368
+
369
+ if (hasExport) {
370
+ context.report({
371
+ node,
372
+ messageId: 'duplicateComponent',
373
+ data: {
374
+ componentName
375
+ }
376
+ });
377
+ }
378
+ }
379
+ }
380
+ };
381
+ }
382
+ }
383
+ }
384
+ };
385
+
386
+ // Helper function to get pace-core alternative for restricted imports
387
+ function getPaceCoreAlternative(importSource) {
388
+ const alternatives = {
389
+ '@radix-ui/react-avatar': '/components',
390
+ '@radix-ui/react-checkbox': '/components',
391
+ '@radix-ui/react-dialog': '/components',
392
+ '@radix-ui/react-label': '/components',
393
+ '@radix-ui/react-progress': '/components',
394
+ '@radix-ui/react-switch': '/components',
395
+ '@radix-ui/react-tabs': '/components',
396
+ '@radix-ui/react-toast': '/components',
397
+ '@radix-ui/react-tooltip': '/components',
398
+ 'react-day-picker': '/components',
399
+ '@tanstack/react-table': '/components',
400
+ 'react-hook-form': '/components',
401
+ 'zod': '/utils'
402
+ };
403
+
404
+ return alternatives[importSource] || '';
405
+ }
406
+
@@ -43,12 +43,21 @@ declare enum FileCategory {
43
43
  TRAC_JOURNAL = "trac_journal",
44
44
  TRAC_TRANSPORT = "trac_transport"
45
45
  }
46
+ /**
47
+ * Options for uploading a file with a file reference
48
+ * @property pageContext - The page context where the file upload occurs (e.g., 'configuration', 'forms', 'applications')
49
+ * Used for context-aware permission checks. Required to check appropriate page-level permissions.
50
+ * @property event_id - Optional event ID for event-scoped permission checks. Required for event-based apps.
51
+ */
46
52
  interface FileUploadOptions {
47
53
  table_name: string;
48
54
  record_id: string;
49
55
  organisation_id: string;
50
56
  app_id: AppId;
51
57
  category: FileCategory;
58
+ folder: string;
59
+ pageContext: string;
60
+ event_id?: string;
52
61
  is_public?: boolean;
53
62
  custom_metadata?: Record<string, unknown>;
54
63
  }
@@ -134,4 +143,4 @@ interface FileUrlInfo {
134
143
  bucket: BucketInfo;
135
144
  }
136
145
 
137
- export { type BulkUploadResult as B, type FileReference as F, type StorageUploadOptions as S, type UploadProgress as U, type FileMetadata as a, FileCategory as b, type FileUploadOptions as c, type FileReferenceService as d, type FileUploadResult as e, type FileReferenceWithUrl as f, type BucketInfo as g, type FileUrlInfo as h };
146
+ export { type BulkUploadResult as B, FileCategory as F, type StorageUploadOptions as S, type UploadProgress as U, type FileReference as a, type FileMetadata as b, type FileUploadOptions as c, type FileReferenceService as d, type FileUploadResult as e, type FileReferenceWithUrl as f, type BucketInfo as g, type FileUrlInfo as h };
package/dist/hooks.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  export { u as useToast } from './useToast-C8gR5ir4.js';
2
- import { S as StorageUploadOptions, a as StorageUploadResult, b as StorageListOptions, c as StorageListResult, d as StorageFileInfo } from './usePublicRouteParams-JJczomYq.js';
3
- export { O as OrganisationSecurityHook, h as UseAppConfigReturn, U as UseOrganisationPermissionsReturn, B as UsePublicEventLogoOptions, A as UsePublicEventLogoReturn, x as UsePublicEventOptions, w as UsePublicEventReturn, z as UsePublicFileDisplayOptions, y as UsePublicFileDisplayReturn, C as UsePublicRouteParamsReturn, j as clearPublicEventCache, m as clearPublicFileDisplayCache, p as clearPublicLogoCache, v as extractEventCodeFromPath, t as generatePublicRoutePath, k as getPublicEventCacheStats, n as getPublicFileDisplayCacheStats, q as getPublicLogoCacheStats, g as useAppConfig, u as useEventTheme, e as useOrganisationPermissions, f as useOrganisationSecurity, i as usePublicEvent, s as usePublicEventCode, o as usePublicEventLogo, l as usePublicFileDisplay, r as usePublicRouteParams } from './usePublicRouteParams-JJczomYq.js';
2
+ import { S as StorageUploadOptions, a as StorageUploadResult, b as StorageListOptions, c as StorageListResult, d as StorageFileInfo } from './usePublicRouteParams-D71QLlg4.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-D71QLlg4.js';
4
4
  import * as React$1 from 'react';
5
5
  import { SortingState, ColumnFiltersState, ExpandedState } from '@tanstack/react-table';
6
- import * as react_hook_form from 'react-hook-form';
7
- import { z } from 'zod';
8
6
  export { u as useComponentPerformance } from './useComponentPerformance-DE9l5RkL.js';
9
- import { D as DataRecord, P as PerformanceConfig, S as ServerSideConfig, C as ChunkingConfig, e as SearchIndexConfig, d as PaginationMode, h as ServerSideParams, i as ServerSideResponse } from './types-_x1f4QBF.js';
7
+ import { c as DataRecord, P as PerformanceConfig, S as ServerSideConfig, C as ChunkingConfig, g as SearchIndexConfig, f as PaginationMode, i as ServerSideParams, j as ServerSideResponse } from './types-DUyCRSTj.js';
10
8
  import { SupabaseClient } from '@supabase/supabase-js';
11
- import { b as FileCategory, F as FileReference } from './file-reference-D06mEEWW.js';
9
+ import { F as FileCategory, a as FileReference } from './file-reference-PRTSLxKx.js';
10
+ import 'react-hook-form';
11
+ import 'zod';
12
12
  import './event-CW5YB_2p.js';
13
13
  import './core-CUElvH_C.js';
14
- import './database.generated-CBmg2950.js';
14
+ import './database.generated-DI89OQeI.js';
15
15
 
16
16
  /**
17
17
  * @file Error Handling Stubs
@@ -335,13 +335,6 @@ interface DataAccessRecord {
335
335
  */
336
336
  declare function useSecureDataAccess(): SecureDataAccessReturn;
337
337
 
338
- interface UseZodFormProps<T extends z.ZodTypeAny> {
339
- schema: T;
340
- defaultValues?: Partial<z.infer<T>>;
341
- mode?: 'onSubmit' | 'onBlur' | 'onChange' | 'onTouched' | 'all';
342
- }
343
- declare function useZodForm<T extends z.ZodTypeAny>({ schema, defaultValues, mode }: UseZodFormProps<T>): react_hook_form.UseFormReturn<z.TypeOf<T>, any, z.TypeOf<T>>;
344
-
345
338
  interface PerformanceMetrics {
346
339
  renderTime: number;
347
340
  componentName: string;
@@ -512,4 +505,48 @@ declare function useFileUpload({ supabase, appName, orgId }: UseStorageOptions):
512
505
  uploadError: string | null;
513
506
  };
514
507
 
515
- export { type SecureDataAccessReturn, type UseDataTablePerformanceOptions, type UseDataTablePerformanceReturn, type UseFileDisplayOptions, type UseFileDisplayReturn, type UseStorageOptions, type UseStorageReturn, clearFileDisplayCache, getFileDisplayCacheStats, invalidateFileDisplayCache, useDataTablePerformance, useDataTableState, useDebounce, useFileDisplay, useFileUpload, useFocusManagement, useFocusTrap, useIsMobile, useKeyboardShortcuts, usePerformanceMonitor, useSecureDataAccess, useStorage, useZodForm };
508
+ /**
509
+ * @file usePreventTabReload Hook
510
+ * @package @jmruthers/pace-core
511
+ * @module Hooks
512
+ * @since 0.6.0
513
+ *
514
+ * Prevents full page reloads when switching browser tabs.
515
+ * Handles browser back-forward cache (bfcache) restoration and tab visibility changes.
516
+ */
517
+ interface UsePreventTabReloadOptions {
518
+ /**
519
+ * Whether to enable the prevention logic
520
+ * @default true
521
+ */
522
+ enabled?: boolean;
523
+ /**
524
+ * Grace period in milliseconds to wait after tab becomes visible
525
+ * before allowing any potential reloads
526
+ * @default 2000
527
+ */
528
+ gracePeriodMs?: number;
529
+ }
530
+ /**
531
+ * Hook to prevent full page reloads when switching browser tabs.
532
+ *
533
+ * This hook handles:
534
+ * - Browser back-forward cache (bfcache) restoration
535
+ * - Tab visibility changes
536
+ * - Prevents unwanted page reloads when returning to a tab
537
+ *
538
+ * @param options - Configuration options
539
+ *
540
+ * @example
541
+ * ```tsx
542
+ * import { usePreventTabReload } from '@jmruthers/pace-core';
543
+ *
544
+ * function MyComponent() {
545
+ * usePreventTabReload();
546
+ * // Component code...
547
+ * }
548
+ * ```
549
+ */
550
+ declare function usePreventTabReload(options?: UsePreventTabReloadOptions): void;
551
+
552
+ export { type SecureDataAccessReturn, type UseDataTablePerformanceOptions, type UseDataTablePerformanceReturn, type UseFileDisplayOptions, type UseFileDisplayReturn, type UsePreventTabReloadOptions, type UseStorageOptions, type UseStorageReturn, clearFileDisplayCache, getFileDisplayCacheStats, invalidateFileDisplayCache, useDataTablePerformance, useDataTableState, useDebounce, useFileDisplay, useFileUpload, useFocusManagement, useFocusTrap, useIsMobile, useKeyboardShortcuts, usePerformanceMonitor, usePreventTabReload, useSecureDataAccess, useStorage };
package/dist/hooks.js CHANGED
@@ -5,16 +5,18 @@ import {
5
5
  generatePublicRoutePath,
6
6
  getPublicEventCacheStats,
7
7
  getPublicLogoCacheStats,
8
+ useFormDialog,
8
9
  useOrganisationPermissions,
9
10
  useOrganisationSecurity,
10
11
  usePublicEvent,
11
12
  usePublicEventCode,
12
13
  usePublicEventLogo,
13
- usePublicRouteParams
14
- } from "./chunk-PWAHJW4G.js";
14
+ usePublicRouteParams,
15
+ useZodForm
16
+ } from "./chunk-OALXJH4Y.js";
15
17
  import {
16
18
  useSecureDataAccess
17
- } from "./chunk-W22JP75J.js";
19
+ } from "./chunk-DAGICKHT.js";
18
20
  import {
19
21
  archiveFile,
20
22
  clearFileDisplayCache,
@@ -30,16 +32,17 @@ import {
30
32
  useAppConfig,
31
33
  useEventTheme,
32
34
  useFileDisplay,
35
+ usePreventTabReload,
33
36
  usePublicFileDisplay
34
- } from "./chunk-MI7HBHN3.js";
37
+ } from "./chunk-TC7D3CR3.js";
35
38
  import {
36
39
  useDataTablePerformance,
37
40
  useToast
38
41
  } from "./chunk-6C4YBBJM.js";
39
- import "./chunk-QCDXODCA.js";
42
+ import "./chunk-XAUHJD3L.js";
40
43
  import "./chunk-KQCRWDSA.js";
41
- import "./chunk-FUEYYMX5.js";
42
- import "./chunk-UHNYIBXL.js";
44
+ import "./chunk-FXFJRTKI.js";
45
+ import "./chunk-UQWSHFVX.js";
43
46
  import "./chunk-QXHPKYJV.js";
44
47
  import {
45
48
  useComponentPerformance
@@ -408,21 +411,6 @@ function useDataTableState(options) {
408
411
  };
409
412
  }
410
413
 
411
- // src/hooks/useZodForm.ts
412
- import { useForm } from "react-hook-form";
413
- import { zodResolver } from "@hookform/resolvers/zod";
414
- function useZodForm({
415
- schema,
416
- defaultValues,
417
- mode = "onSubmit"
418
- }) {
419
- return useForm({
420
- resolver: zodResolver(schema),
421
- defaultValues,
422
- mode
423
- });
424
- }
425
-
426
414
  // src/hooks/usePerformanceMonitor.ts
427
415
  import { useEffect as useEffect6, useRef as useRef3, useCallback as useCallback5 } from "react";
428
416
  var log = createLogger("usePerformanceMonitor");
@@ -684,11 +672,13 @@ export {
684
672
  useFileUpload,
685
673
  useFocusManagement,
686
674
  useFocusTrap,
675
+ useFormDialog,
687
676
  useIsMobile,
688
677
  useKeyboardShortcuts,
689
678
  useOrganisationPermissions,
690
679
  useOrganisationSecurity,
691
680
  usePerformanceMonitor,
681
+ usePreventTabReload,
692
682
  usePublicEvent,
693
683
  usePublicEventCode,
694
684
  usePublicEventLogo,