@jmruthers/pace-core 0.5.120 → 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 (239) 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.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/DataTable/utils/flexibleImport.ts +27 -6
  180. package/src/components/Dialog/Dialog.tsx +1 -1
  181. package/src/components/Dialog/README.md +24 -24
  182. package/src/components/Dialog/examples/BasicHtmlTest.tsx +2 -2
  183. package/src/components/Dialog/examples/DebugHtmlExample.tsx +6 -6
  184. package/src/components/Dialog/examples/HtmlDialogExample.tsx +2 -2
  185. package/src/components/Dialog/examples/SimpleHtmlTest.tsx +3 -3
  186. package/src/components/Dialog/examples/__tests__/SimpleHtmlTest.test.tsx +4 -4
  187. package/src/components/PaceAppLayout/PaceAppLayout.tsx +12 -1
  188. package/src/components/PublicLayout/EventLogo.tsx +175 -0
  189. package/src/components/PublicLayout/PublicErrorBoundary.tsx +22 -18
  190. package/src/components/PublicLayout/PublicLoadingSpinner.tsx +22 -14
  191. package/src/components/PublicLayout/PublicPageHeader.tsx +133 -40
  192. package/src/components/PublicLayout/PublicPageLayout.tsx +75 -72
  193. package/src/components/PublicLayout/__tests__/PublicErrorBoundary.test.tsx +1 -1
  194. package/src/components/PublicLayout/__tests__/PublicLoadingSpinner.test.tsx +8 -8
  195. package/src/components/PublicLayout/__tests__/PublicPageHeader.test.tsx +23 -16
  196. package/src/components/PublicLayout/__tests__/PublicPageLayout.test.tsx +86 -14
  197. package/src/examples/CorrectPublicPageImplementation.tsx +30 -30
  198. package/src/examples/PublicEventPage.tsx +41 -41
  199. package/src/examples/PublicPageApp.tsx +33 -33
  200. package/src/examples/PublicPageUsageExample.tsx +30 -30
  201. package/src/hooks/__tests__/usePublicEvent.unit.test.ts +583 -0
  202. package/src/hooks/__tests__/usePublicRouteParams.unit.test.ts +10 -3
  203. package/src/hooks/index.ts +1 -1
  204. package/src/hooks/public/usePublicEventLogo.ts +285 -0
  205. package/src/hooks/public/usePublicRouteParams.ts +21 -4
  206. package/src/hooks/useEventTheme.test.ts +119 -43
  207. package/src/hooks/useEventTheme.ts +84 -55
  208. package/src/index.ts +3 -1
  209. package/src/rbac/components/__tests__/EnhancedNavigationMenu.test.tsx +630 -0
  210. package/src/rbac/components/__tests__/NavigationProvider.test.tsx +667 -0
  211. package/src/rbac/components/__tests__/PagePermissionProvider.test.tsx +647 -0
  212. package/src/rbac/components/__tests__/SecureDataProvider.fixed.test.tsx +496 -0
  213. package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +496 -0
  214. package/src/rbac/secureClient.ts +4 -2
  215. package/src/services/EventService.ts +0 -66
  216. package/src/services/__tests__/EventService.eventColours.test.ts +44 -40
  217. package/src/styles/index.ts +1 -1
  218. package/src/theming/__tests__/parseEventColours.test.ts +209 -0
  219. package/src/theming/parseEventColours.ts +123 -0
  220. package/src/theming/runtime.ts +3 -0
  221. package/src/types/__tests__/file-reference.test.ts +447 -0
  222. package/src/types/database.generated.ts +1515 -424
  223. package/src/utils/formatDate.test.ts +11 -11
  224. package/src/utils/formatting.ts +3 -2
  225. package/dist/chunk-BHWIUEYH.js.map +0 -1
  226. package/dist/chunk-FKFHZUGF.js.map +0 -1
  227. package/dist/chunk-GZRXOUBE.js.map +0 -1
  228. package/dist/chunk-HFBOFZ3Z.js.map +0 -1
  229. package/dist/chunk-QPI2CCBA.js.map +0 -1
  230. package/dist/chunk-SMJZMKYN.js.map +0 -1
  231. package/dist/chunk-TDNI6ZWL.js.map +0 -1
  232. package/src/styles/semantic.css +0 -24
  233. /package/dist/{DataTable-DGZDJUYM.js.map → DataTable-WTS4IRF2.js.map} +0 -0
  234. /package/dist/{UnifiedAuthProvider-UACKFATV.js.map → UnifiedAuthProvider-6C47WIML.js.map} +0 -0
  235. /package/dist/{chunk-D6BOFXYR.js.map → chunk-35ZDPMBM.js.map} +0 -0
  236. /package/dist/{chunk-CGURJ27Z.js.map → chunk-4MXVZVNS.js.map} +0 -0
  237. /package/dist/{chunk-ZYJ6O5CA.js.map → chunk-C43QIDN3.js.map} +0 -0
  238. /package/dist/{chunk-B4GZ2BXO.js.map → chunk-NZGLXZGP.js.map} +0 -0
  239. /package/dist/{chunk-NZ32EONV.js.map → chunk-QWNJCQXZ.js.map} +0 -0
@@ -25,13 +25,13 @@ import {
25
25
  SelectSeparator,
26
26
  SelectTrigger,
27
27
  SelectValue
28
- } from "./chunk-HFBOFZ3Z.js";
28
+ } from "./chunk-DHMFMXFV.js";
29
29
  import {
30
30
  useCan,
31
31
  usePermissions,
32
32
  useRBAC,
33
33
  useResolvedScope
34
- } from "./chunk-D6BOFXYR.js";
34
+ } from "./chunk-35ZDPMBM.js";
35
35
  import {
36
36
  isSuperAdmin
37
37
  } from "./chunk-WP5I5GLN.js";
@@ -50,7 +50,7 @@ import {
50
50
  useIsPublicPage,
51
51
  usePublicFileDisplay,
52
52
  usePublicPageContext
53
- } from "./chunk-FKFHZUGF.js";
53
+ } from "./chunk-XN6GWKMV.js";
54
54
  import {
55
55
  useToast
56
56
  } from "./chunk-GKHF54DI.js";
@@ -58,11 +58,11 @@ import {
58
58
  init_useOrganisations,
59
59
  useEvents,
60
60
  useOrganisations
61
- } from "./chunk-CGURJ27Z.js";
61
+ } from "./chunk-4MXVZVNS.js";
62
62
  import {
63
63
  UnifiedAuthProvider_exports,
64
64
  init_UnifiedAuthProvider as init_UnifiedAuthProvider2
65
- } from "./chunk-ZYJ6O5CA.js";
65
+ } from "./chunk-C43QIDN3.js";
66
66
  import {
67
67
  EventServiceContext,
68
68
  EventServiceProvider,
@@ -72,13 +72,10 @@ import {
72
72
  useEventService,
73
73
  useSessionRestoration,
74
74
  useUnifiedAuth
75
- } from "./chunk-BHWIUEYH.js";
75
+ } from "./chunk-ZBLK676C.js";
76
76
  import {
77
77
  LoadingSpinner
78
78
  } from "./chunk-CDQ3PX7L.js";
79
- import {
80
- cn
81
- } from "./chunk-PYUXFQJ3.js";
82
79
  import {
83
80
  getCurrentAppName
84
81
  } from "./chunk-JCQZ6LA7.js";
@@ -86,9 +83,11 @@ import {
86
83
  performanceBudgetMonitor
87
84
  } from "./chunk-O3NWNXDY.js";
88
85
  import {
89
- clearPalette,
90
- init_runtime
91
- } from "./chunk-SMJZMKYN.js";
86
+ cn
87
+ } from "./chunk-PYUXFQJ3.js";
88
+ import {
89
+ clearPalette
90
+ } from "./chunk-GEVIB2UB.js";
92
91
  import {
93
92
  __esm,
94
93
  __export,
@@ -1670,7 +1669,7 @@ function PaceAppLayout({
1670
1669
  }
1671
1670
  }
1672
1671
  if (hasAccess && currentRoute.roles && currentRoute.roles.length > 0 && user?.id) {
1673
- const { useUnifiedAuth: useUnifiedAuth2 } = await import("./UnifiedAuthProvider-UACKFATV.js");
1672
+ const { useUnifiedAuth: useUnifiedAuth2 } = await import("./UnifiedAuthProvider-6C47WIML.js");
1674
1673
  hasAccess = true;
1675
1674
  }
1676
1675
  if (!isMounted) return;
@@ -1744,7 +1743,20 @@ function PaceAppLayout({
1744
1743
  return /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsxs10("div", { className: "text-center", children: [
1745
1744
  /* @__PURE__ */ jsx14("h2", { className: "text-xl font-semibold text-acc-600 mb-2", children: "Access Denied" }),
1746
1745
  /* @__PURE__ */ jsx14("p", { className: "text-sec-600 mb-4", children: "You don't have permission to access this page." }),
1747
- /* @__PURE__ */ jsx14(Button, { onClick: () => navigate("/"), children: "Go Home" })
1746
+ /* @__PURE__ */ jsxs10("div", { className: "flex gap-2 justify-center", children: [
1747
+ /* @__PURE__ */ jsx14(Button, { onClick: () => navigate("/"), children: "Go Home" }),
1748
+ /* @__PURE__ */ jsx14(
1749
+ Button,
1750
+ {
1751
+ variant: "outline",
1752
+ onClick: async () => {
1753
+ await handleSignOut();
1754
+ navigate("/login");
1755
+ },
1756
+ children: "Sign out"
1757
+ }
1758
+ )
1759
+ ] })
1748
1760
  ] }) });
1749
1761
  }
1750
1762
  return /* @__PURE__ */ jsxs10(Fragment4, { children: [
@@ -1780,7 +1792,6 @@ function PaceAppLayout({
1780
1792
  // src/components/PaceLoginPage/PaceLoginPage.tsx
1781
1793
  import { useEffect as useEffect4, useState as useState6, useContext } from "react";
1782
1794
  import { useNavigate as useNavigate2, useLocation as useLocation2 } from "react-router-dom";
1783
- init_runtime();
1784
1795
  init_EventServiceProvider();
1785
1796
  import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
1786
1797
  var PaceLoginPage = ({
@@ -3935,6 +3946,7 @@ var TableCaption = React19.forwardRef(({ className, ...props }, ref) => /* @__PU
3935
3946
  TableCaption.displayName = "TableCaption";
3936
3947
 
3937
3948
  // src/components/PublicLayout/PublicPageHeader.tsx
3949
+ import { Link as Link2 } from "react-router-dom";
3938
3950
  import { Fragment as Fragment7, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
3939
3951
  function PublicPageHeader({
3940
3952
  event,
@@ -3946,21 +3958,62 @@ function PublicPageHeader({
3946
3958
  className = "",
3947
3959
  children,
3948
3960
  customAppLogo,
3949
- customEventLogo
3961
+ customEventLogo,
3962
+ logoUrl,
3963
+ logoAlt,
3964
+ logoHref
3950
3965
  }) {
3951
3966
  const { appName } = useAppConfig();
3952
- const headerClasses = `bg-white border-b border-gray-200 ${className}`.trim();
3953
- return /* @__PURE__ */ jsx24("header", { className: headerClasses, children: /* @__PURE__ */ jsxs19("div", { className: "px-4 w-[min(var(--app-width),100%)] mx-auto", children: [
3954
- /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between py-4", children: [
3955
- showAppLogo && /* @__PURE__ */ jsx24("div", { className: "flex-shrink-0", children: customAppLogo || /* @__PURE__ */ jsx24(
3956
- "img",
3957
- {
3958
- className: "h-8 w-8 object-contain",
3959
- src: `/${appName.toLowerCase()}_logo_square.svg`,
3960
- alt: appName
3961
- }
3962
- ) }),
3963
- showEventLogo && event && /* @__PURE__ */ jsx24("div", { className: "flex-shrink-0", children: customEventLogo || /* @__PURE__ */ jsx24(
3967
+ return /* @__PURE__ */ jsxs19("header", { className: cn(
3968
+ " px-4 w-[min(var(--app-width),100%)] mx-auto bg-background border-b border-sec-200 grid grid-cols-[auto_1fr_auto] place-items-center gap-2",
3969
+ className
3970
+ ), children: [
3971
+ showAppLogo && /* @__PURE__ */ jsx24(Fragment7, { children: customAppLogo ? logoHref ? /* @__PURE__ */ jsx24(Link2, { to: logoHref, className: "cursor-pointer hover:opacity-80 transition-opacity", children: customAppLogo }) : customAppLogo : logoUrl ? logoHref ? /* @__PURE__ */ jsx24(Link2, { to: logoHref, className: "cursor-pointer hover:opacity-80 transition-opacity", children: /* @__PURE__ */ jsx24(
3972
+ "img",
3973
+ {
3974
+ className: "max-w-36 object-contain row-span-2",
3975
+ src: logoUrl,
3976
+ alt: logoAlt || appName
3977
+ }
3978
+ ) }) : /* @__PURE__ */ jsx24(
3979
+ "img",
3980
+ {
3981
+ className: "max-w-36 object-contain row-span-2",
3982
+ src: logoUrl,
3983
+ alt: logoAlt || appName
3984
+ }
3985
+ ) : appName ? logoHref ? /* @__PURE__ */ jsx24(Link2, { to: logoHref, className: "cursor-pointer hover:opacity-80 transition-opacity", children: /* @__PURE__ */ jsx24(
3986
+ "img",
3987
+ {
3988
+ className: "max-w-36 object-contain row-span-2",
3989
+ src: `/${appName.toLowerCase()}_logo_wide.svg`,
3990
+ alt: logoAlt || appName
3991
+ }
3992
+ ) }) : /* @__PURE__ */ jsx24(
3993
+ "img",
3994
+ {
3995
+ className: "max-w-36 object-contain row-span-2",
3996
+ src: `/${appName.toLowerCase()}_logo_wide.svg`,
3997
+ alt: logoAlt || appName
3998
+ }
3999
+ ) : logoHref ? /* @__PURE__ */ jsx24(Link2, { to: logoHref, className: "cursor-pointer hover:opacity-80 transition-opacity", children: /* @__PURE__ */ jsx24(
4000
+ "img",
4001
+ {
4002
+ src: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' fill='%23000'/%3E%3Ctext x='16' y='20' text-anchor='middle' fill='white' font-family='Arial' font-size='14' font-weight='bold'%3EL%3C/text%3E%3C/svg%3E",
4003
+ alt: logoAlt || "Logo",
4004
+ className: "max-w-36 object-contain row-span-2"
4005
+ }
4006
+ ) }) : /* @__PURE__ */ jsx24(
4007
+ "img",
4008
+ {
4009
+ src: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' fill='%23000'/%3E%3Ctext x='16' y='20' text-anchor='middle' fill='white' font-family='Arial' font-size='14' font-weight='bold'%3EL%3C/text%3E%3C/svg%3E",
4010
+ alt: logoAlt || "Logo",
4011
+ className: "max-w-36 object-contain row-span-2"
4012
+ }
4013
+ ) }),
4014
+ event && /* @__PURE__ */ jsxs19(Fragment7, { children: [
4015
+ /* @__PURE__ */ jsx24("h1", { children: event.event_name }),
4016
+ showEventLogo && event && /* @__PURE__ */ jsx24(Fragment7, { children: customEventLogo || /* @__PURE__ */ jsx24(
3964
4017
  FileDisplay,
3965
4018
  {
3966
4019
  table_name: "event",
@@ -3970,26 +4023,21 @@ function PublicPageHeader({
3970
4023
  displayOnly: true,
3971
4024
  showFallback: true,
3972
4025
  fallbackSize: "md",
3973
- className: "[&_img]:h-12 [&_img]:w-12 [&_img]:object-contain [&>div]:h-12 [&>div]:w-12",
4026
+ className: "max-w-36 row-span-2",
3974
4027
  generateFallbackText: (fileName) => {
3975
4028
  if (!event.event_name) return "EV";
3976
4029
  return event.event_name.split(/[\s\-_]+/).map((word) => word.charAt(0).toUpperCase()).join("").substring(0, 3);
3977
4030
  }
3978
4031
  }
3979
- ) })
4032
+ ) }),
4033
+ event.event_venue && /* @__PURE__ */ jsx24("h4", { children: event.event_venue })
3980
4034
  ] }),
3981
- /* @__PURE__ */ jsx24("div", { className: "pb-4", children: /* @__PURE__ */ jsxs19("div", { className: "text-center", children: [
3982
- event && /* @__PURE__ */ jsxs19(Fragment7, { children: [
3983
- /* @__PURE__ */ jsx24("h1", { className: "text-3xl font-bold text-gray-900 mb-2", children: event.event_name }),
3984
- event.event_venue && /* @__PURE__ */ jsx24("p", { className: "text-md text-gray-500 mb-4", children: event.event_venue })
3985
- ] }),
3986
- title && /* @__PURE__ */ jsxs19("div", { className: "mt-6", children: [
3987
- /* @__PURE__ */ jsx24("h2", { className: "text-2xl font-semibold text-gray-800 mb-2", children: title }),
3988
- description && /* @__PURE__ */ jsx24("p", { className: "text-lg text-gray-600 max-w-3xl mx-auto", children: description })
3989
- ] }),
3990
- children && /* @__PURE__ */ jsx24("div", { className: "mt-4", children })
3991
- ] }) })
3992
- ] }) });
4035
+ title && /* @__PURE__ */ jsxs19(Fragment7, { children: [
4036
+ /* @__PURE__ */ jsx24("h1", { children: title }),
4037
+ description && /* @__PURE__ */ jsx24("p", { className: "text-lg text-sec-600 max-w-3xl mx-auto", children: description })
4038
+ ] }),
4039
+ children && /* @__PURE__ */ jsx24(Fragment7, { children })
4040
+ ] });
3993
4041
  }
3994
4042
 
3995
4043
  // src/components/PublicLayout/PublicPageFooter.tsx
@@ -4031,7 +4079,7 @@ function PublicLoadingSpinner({
4031
4079
  }) {
4032
4080
  const sizeClass = sizeClasses[size];
4033
4081
  const displayMessage = customMessage || message;
4034
- const content = /* @__PURE__ */ jsxs21("div", { className: `flex flex-col items-center ${className}`, children: [
4082
+ const content = /* @__PURE__ */ jsxs21("div", { className: cn("flex flex-col items-center", className), children: [
4035
4083
  showLogo && /* @__PURE__ */ jsx26("div", { className: "mb-4", children: /* @__PURE__ */ jsx26(
4036
4084
  "img",
4037
4085
  {
@@ -4044,17 +4092,20 @@ function PublicLoadingSpinner({
4044
4092
  /* @__PURE__ */ jsx26(
4045
4093
  "div",
4046
4094
  {
4047
- className: `${sizeClass} border-2 border-gray-200 border-t-blue-600 rounded-full animate-spin`,
4095
+ className: cn(
4096
+ sizeClass,
4097
+ "border-2 border-sec-200 border-t-main-600 rounded-full animate-spin"
4098
+ ),
4048
4099
  role: "status",
4049
4100
  "aria-label": "Loading"
4050
4101
  }
4051
4102
  ),
4052
4103
  /* @__PURE__ */ jsx26("span", { className: "sr-only", children: displayMessage })
4053
4104
  ] }),
4054
- displayMessage && /* @__PURE__ */ jsx26("p", { className: "mt-4 text-sm text-gray-600 text-center", children: displayMessage })
4105
+ displayMessage && /* @__PURE__ */ jsx26("p", { className: "mt-4 text-sm text-sec-600 text-center", children: displayMessage })
4055
4106
  ] });
4056
4107
  if (centered) {
4057
- return /* @__PURE__ */ jsx26("div", { className: "min-h-screen bg-white flex items-center justify-center", children: /* @__PURE__ */ jsx26("div", { className: "max-w-md mx-auto px-4", children: content }) });
4108
+ return /* @__PURE__ */ jsx26("div", { className: "min-h-screen bg-background flex items-center justify-center", children: /* @__PURE__ */ jsx26("div", { className: "max-w-md mx-auto px-4", children: content }) });
4058
4109
  }
4059
4110
  return content;
4060
4111
  }
@@ -4063,7 +4114,10 @@ function PublicLoadingSpinnerFullPage({
4063
4114
  eventName,
4064
4115
  className = ""
4065
4116
  }) {
4066
- return /* @__PURE__ */ jsx26("div", { className: `min-h-screen bg-white flex items-center justify-center ${className}`, children: /* @__PURE__ */ jsxs21("div", { className: "max-w-md mx-auto text-center px-4", children: [
4117
+ return /* @__PURE__ */ jsx26("div", { className: cn(
4118
+ "min-h-screen bg-background flex items-center justify-center",
4119
+ className
4120
+ ), children: /* @__PURE__ */ jsxs21("div", { className: "max-w-md mx-auto text-center px-4", children: [
4067
4121
  /* @__PURE__ */ jsx26("div", { className: "mb-8", children: /* @__PURE__ */ jsx26(
4068
4122
  "img",
4069
4123
  {
@@ -4072,20 +4126,20 @@ function PublicLoadingSpinnerFullPage({
4072
4126
  alt: "PACE Core"
4073
4127
  }
4074
4128
  ) }),
4075
- eventName && /* @__PURE__ */ jsx26("h1", { className: "text-2xl font-bold text-gray-900 mb-4", children: eventName }),
4129
+ eventName && /* @__PURE__ */ jsx26("h1", { className: "text-2xl font-bold text-sec-900 mb-4", children: eventName }),
4076
4130
  /* @__PURE__ */ jsx26("div", { className: "relative mb-6", children: /* @__PURE__ */ jsx26(
4077
4131
  "div",
4078
4132
  {
4079
- className: "h-12 w-12 border-4 border-gray-200 border-t-blue-600 rounded-full animate-spin mx-auto",
4133
+ className: "h-12 w-12 border-4 border-sec-200 border-t-main-600 rounded-full animate-spin mx-auto",
4080
4134
  role: "status",
4081
4135
  "aria-label": "Loading"
4082
4136
  }
4083
4137
  ) }),
4084
- /* @__PURE__ */ jsx26("p", { className: "text-lg text-gray-600", children: message }),
4138
+ /* @__PURE__ */ jsx26("p", { className: "text-lg text-sec-600", children: message }),
4085
4139
  /* @__PURE__ */ jsxs21("div", { className: "mt-4 flex justify-center space-x-1", children: [
4086
- /* @__PURE__ */ jsx26("div", { className: "h-2 w-2 bg-blue-600 rounded-full animate-bounce", style: { animationDelay: "0ms" } }),
4087
- /* @__PURE__ */ jsx26("div", { className: "h-2 w-2 bg-blue-600 rounded-full animate-bounce", style: { animationDelay: "150ms" } }),
4088
- /* @__PURE__ */ jsx26("div", { className: "h-2 w-2 bg-blue-600 rounded-full animate-bounce", style: { animationDelay: "300ms" } })
4140
+ /* @__PURE__ */ jsx26("div", { className: "h-2 w-2 bg-main-600 rounded-full animate-bounce", style: { animationDelay: "0ms" } }),
4141
+ /* @__PURE__ */ jsx26("div", { className: "h-2 w-2 bg-main-600 rounded-full animate-bounce", style: { animationDelay: "150ms" } }),
4142
+ /* @__PURE__ */ jsx26("div", { className: "h-2 w-2 bg-main-600 rounded-full animate-bounce", style: { animationDelay: "300ms" } })
4089
4143
  ] })
4090
4144
  ] }) });
4091
4145
  }
@@ -4093,83 +4147,82 @@ function PublicLoadingSkeleton({
4093
4147
  lines = 3,
4094
4148
  className = ""
4095
4149
  }) {
4096
- return /* @__PURE__ */ jsx26("div", { className: `animate-pulse ${className}`, children: Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ jsx26(
4150
+ return /* @__PURE__ */ jsx26("div", { className: cn("animate-pulse", className), children: Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ jsx26(
4097
4151
  "div",
4098
4152
  {
4099
- className: `h-4 bg-gray-200 rounded mb-2 ${index === lines - 1 ? "w-3/4" : "w-full"}`
4153
+ className: cn(
4154
+ "h-4 bg-sec-200 rounded mb-2",
4155
+ index === lines - 1 ? "w-3/4" : "w-full"
4156
+ )
4100
4157
  },
4101
4158
  index
4102
4159
  )) });
4103
4160
  }
4104
4161
 
4105
4162
  // src/components/PublicLayout/PublicPageLayout.tsx
4106
- import { useMemo as useMemo10 } from "react";
4107
- import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
4163
+ import { Fragment as Fragment9, jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
4108
4164
  function PublicPageLayout({
4109
4165
  eventCode,
4110
4166
  children,
4111
4167
  event = null,
4168
+ isLoading = false,
4169
+ error = null,
4170
+ refetch,
4112
4171
  showFooter = true,
4113
4172
  className = "",
4114
4173
  errorFallback: ErrorFallback,
4115
4174
  loadingFallback: LoadingFallback = PublicLoadingSpinner,
4116
4175
  customHeader,
4117
4176
  customFooter,
4118
- showValidationErrors = true
4177
+ showValidationErrors = true,
4178
+ loadingMessage
4119
4179
  }) {
4120
- const isLoading = false;
4121
- const error = null;
4122
- const refetch = async () => {
4123
- };
4124
- const layoutClasses = useMemo10(() => {
4125
- const baseClasses = "min-h-screen bg-white flex flex-col";
4126
- return `${baseClasses} ${className}`.trim();
4127
- }, [className]);
4180
+ useEventTheme(event);
4181
+ const handleRefetch = refetch || (async () => {
4182
+ });
4128
4183
  if (isLoading) {
4129
- return /* @__PURE__ */ jsx27("div", { className: layoutClasses, children: /* @__PURE__ */ jsx27("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ jsx27(LoadingFallback, {}) }) });
4184
+ if (LoadingFallback === PublicLoadingSpinner) {
4185
+ return /* @__PURE__ */ jsx27(
4186
+ PublicLoadingSpinner,
4187
+ {
4188
+ className: "items-center justify-center",
4189
+ message: loadingMessage
4190
+ }
4191
+ );
4192
+ }
4193
+ return /* @__PURE__ */ jsx27(LoadingFallback, {});
4130
4194
  }
4131
4195
  if (error && showValidationErrors) {
4132
- return /* @__PURE__ */ jsx27("div", { className: layoutClasses, children: /* @__PURE__ */ jsx27("div", { className: "flex-1 flex items-center justify-center", children: ErrorFallback ? /* @__PURE__ */ jsx27(ErrorFallback, { error, retry: refetch }) : /* @__PURE__ */ jsxs22("div", { className: "text-center p-8", children: [
4133
- /* @__PURE__ */ jsx27("h1", { className: "text-2xl font-bold text-gray-900 mb-4", children: "Event Not Found" }),
4134
- /* @__PURE__ */ jsxs22("p", { className: "text-gray-600 mb-6", children: [
4196
+ if (ErrorFallback) {
4197
+ return /* @__PURE__ */ jsx27(ErrorFallback, { error, retry: handleRefetch });
4198
+ }
4199
+ return /* @__PURE__ */ jsx27("main", { className: "flex flex-col items-center justify-center px-4 w-[min(var(--app-width),100%)] mx-auto py-8", children: /* @__PURE__ */ jsxs22("div", { className: "text-center", children: [
4200
+ /* @__PURE__ */ jsx27("h1", { children: "Event Not Found" }),
4201
+ /* @__PURE__ */ jsxs22("p", { children: [
4135
4202
  'The event code "',
4136
4203
  eventCode,
4137
4204
  '" is invalid or the event is not available for public viewing.'
4138
4205
  ] }),
4139
- /* @__PURE__ */ jsx27(
4140
- "button",
4141
- {
4142
- onClick: refetch,
4143
- className: "px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors",
4144
- children: "Try Again"
4145
- }
4146
- )
4147
- ] }) }) });
4206
+ /* @__PURE__ */ jsx27(Button, { onClick: handleRefetch, children: "Try Again" })
4207
+ ] }) });
4148
4208
  }
4149
- if (!event) {
4150
- return /* @__PURE__ */ jsx27("div", { className: layoutClasses, children: /* @__PURE__ */ jsx27("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ jsxs22("div", { className: "text-center p-8", children: [
4151
- /* @__PURE__ */ jsx27("h1", { className: "text-2xl font-bold text-gray-900 mb-4", children: "Event Not Available" }),
4152
- /* @__PURE__ */ jsx27("p", { className: "text-gray-600 mb-6", children: "This event is not available for public viewing." }),
4153
- /* @__PURE__ */ jsx27(
4154
- "button",
4155
- {
4156
- onClick: refetch,
4157
- className: "px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors",
4158
- children: "Try Again"
4159
- }
4160
- )
4161
- ] }) }) });
4209
+ if (!event && showValidationErrors) {
4210
+ return /* @__PURE__ */ jsx27("main", { className: "flex flex-col items-center justify-center px-4 w-[min(var(--app-width),100%)] mx-auto py-8", children: /* @__PURE__ */ jsxs22("div", { className: "text-center", children: [
4211
+ /* @__PURE__ */ jsx27("h1", { children: "Event Not Available" }),
4212
+ /* @__PURE__ */ jsx27("p", { children: "This event is not available for public viewing." }),
4213
+ handleRefetch && /* @__PURE__ */ jsx27(Button, { onClick: handleRefetch, children: "Try Again" })
4214
+ ] }) });
4162
4215
  }
4163
- return /* @__PURE__ */ jsx27(PublicErrorBoundary, { children: /* @__PURE__ */ jsxs22("div", { className: layoutClasses, children: [
4216
+ return /* @__PURE__ */ jsx27(PublicErrorBoundary, { children: /* @__PURE__ */ jsxs22(Fragment9, { children: [
4164
4217
  customHeader || /* @__PURE__ */ jsx27(
4165
4218
  PublicPageHeader,
4166
4219
  {
4167
- event,
4220
+ event: event || void 0,
4168
4221
  eventCode
4169
4222
  }
4170
4223
  ),
4171
4224
  /* @__PURE__ */ jsx27("main", { className: "px-4 w-[min(var(--app-width),100%)] mx-auto py-8", children }),
4172
- showFooter && (customFooter || /* @__PURE__ */ jsx27(PublicPageFooter, { event }))
4225
+ showFooter && event && (customFooter || /* @__PURE__ */ jsx27(PublicPageFooter, { event }))
4173
4226
  ] }) });
4174
4227
  }
4175
4228
  function usePublicPageContext2() {
@@ -4513,4 +4566,4 @@ export {
4513
4566
  PublicPageDiagnostic,
4514
4567
  PublicPageContextChecker
4515
4568
  };
4516
- //# sourceMappingURL=chunk-QPI2CCBA.js.map
4569
+ //# sourceMappingURL=chunk-ZPJMYGEP.js.map