@riverbankcms/sdk 0.88.0 → 0.89.1

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 (103) hide show
  1. package/dist/{PreviewEditorSidebar-EVRS3C7T.mjs → PreviewEditorSidebar-JDR64FEC.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-54WD4IGE.mjs → PreviewEditorUI-67TMJMAF.mjs} +3 -3
  3. package/dist/SdkPreviewModeRuntime-ZBEMRV7N.mjs +8 -0
  4. package/dist/_dts/api/src/accessAdmin.d.ts +7 -0
  5. package/dist/_dts/api/src/endpoints.d.ts +8 -0
  6. package/dist/_dts/api/src/index.d.ts +2 -2
  7. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +5 -1
  8. package/dist/_dts/api/src/siteMembers.d.ts +6 -1
  9. package/dist/_dts/api/src/types.d.ts +1 -1
  10. package/dist/_dts/blocks/src/system/icons/cta.d.ts +3 -3
  11. package/dist/_dts/blocks/src/system/icons/index.d.ts +1 -0
  12. package/dist/_dts/blocks/src/system/icons/registry.d.ts +2 -2
  13. package/dist/_dts/blocks/src/system/icons/semantic.d.ts +3 -3
  14. package/dist/_dts/blocks/src/system/icons/svg.d.ts +72 -0
  15. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +1 -0
  16. package/dist/_dts/blocks/src/system/runtime/hooks/loadStateError.d.ts +1 -0
  17. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +1 -1
  18. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.state.d.ts +55 -0
  19. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.state.d.ts +39 -0
  20. package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.d.ts +4 -27
  21. package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.state.d.ts +40 -0
  22. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -0
  23. package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.state.d.ts +31 -0
  24. package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +3 -3
  25. package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.state.d.ts +39 -0
  26. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventPaginatedListView.client.d.ts +1 -1
  27. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +24 -2
  28. package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.d.ts +24 -0
  29. package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.state.d.ts +35 -0
  30. package/dist/_dts/content-model/src/entry-slots/types.d.ts +54 -0
  31. package/dist/_dts/core/src/branded.d.ts +7 -0
  32. package/dist/_dts/core/src/index.d.ts +1 -0
  33. package/dist/_dts/core/src/site-route-target.d.ts +40 -0
  34. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +159 -2
  35. package/dist/_dts/media-core/src/fileDomain.d.ts +4 -0
  36. package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +160 -0
  37. package/dist/_dts/sdk/src/client/types.d.ts +26 -1
  38. package/dist/_dts/sdk/src/index.d.ts +3 -1
  39. package/dist/_dts/sdk/src/version.d.ts +1 -1
  40. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  41. package/dist/{chunk-YDMBIIS5.mjs → chunk-7N46MZHI.mjs} +1 -1
  42. package/dist/{chunk-7KOO7RPP.mjs → chunk-7YUAXONX.mjs} +1007 -353
  43. package/dist/{chunk-O4LVYUVH.mjs → chunk-F645A5UV.mjs} +18 -0
  44. package/dist/{chunk-ER4UIW4X.mjs → chunk-HKJQERFR.mjs} +7 -7
  45. package/dist/{chunk-K3JWH6HE.mjs → chunk-TGBJWKMP.mjs} +1 -1
  46. package/dist/{chunk-HVOBXA3Y.mjs → chunk-ZQRBLCW5.mjs} +2 -2
  47. package/dist/cli/index.mjs +668 -18
  48. package/dist/client/{accordion-PT5CGW5N.mjs → accordion-MUCVNGQ7.mjs} +2 -2
  49. package/dist/client/{bookingForm-2HLRTEYS.mjs → bookingForm-PKD6EFIE.mjs} +192 -76
  50. package/dist/client/bookings.mjs +436 -191
  51. package/dist/client/{carousel-Z2LKYSWA.mjs → carousel-3TKQSNJC.mjs} +4 -3
  52. package/dist/client/{cart-ND5IK4A6.mjs → cart-6XHSZK23.mjs} +8 -7
  53. package/dist/client/{checkout-EYUSGAY7.mjs → checkout-FVSPM6FI.mjs} +8 -7
  54. package/dist/client/chunk-6N7YRNYU.mjs +183 -0
  55. package/dist/client/{chunk-O5JNI3E4.mjs → chunk-7DH35FGA.mjs} +2 -2
  56. package/dist/client/{chunk-BAWHZ5GM.mjs → chunk-CQKKFEQD.mjs} +195 -61
  57. package/dist/client/{chunk-X7GVFB7Y.mjs → chunk-EY42X22F.mjs} +3 -3
  58. package/dist/client/{chunk-6DVPO44G.mjs → chunk-FHU6PFPM.mjs} +1 -1
  59. package/dist/client/{chunk-H4MHEXYS.mjs → chunk-LQFDYWPJ.mjs} +1 -1
  60. package/dist/client/{chunk-MHBEWDT7.mjs → chunk-RSQWWUAD.mjs} +122 -50
  61. package/dist/client/{chunk-GOFO7HRH.mjs → chunk-STJ2NCQM.mjs} +1 -1
  62. package/dist/client/{chunk-DIRW2LNG.mjs → chunk-UQFY4AHX.mjs} +272 -198
  63. package/dist/client/{chunk-WCVK4MBJ.mjs → chunk-VGLXACVK.mjs} +1 -1
  64. package/dist/client/{chunk-BL66UWGD.mjs → chunk-ZJZZA5EP.mjs} +6 -6
  65. package/dist/client/{chunk-S4G65LGR.mjs → chunk-ZT5XE7FK.mjs} +1 -1
  66. package/dist/client/client.mjs +3823 -3507
  67. package/dist/client/{courseRegistration-H3AZBUEG.mjs → courseRegistration-ATZSYDHM.mjs} +6 -6
  68. package/dist/client/{eventCalendar-FPKJGLGS.mjs → eventCalendar-6T2UGKKP.mjs} +10 -9
  69. package/dist/client/{eventCombined-QCGIZBUY.mjs → eventCombined-Q4VANXVF.mjs} +10 -9
  70. package/dist/client/{eventDetails-HIT3BJWU.mjs → eventDetails-DW37E7VW.mjs} +10 -9
  71. package/dist/client/{eventListing-R4HNWJDN.mjs → eventListing-XURTSAUW.mjs} +10 -9
  72. package/dist/client/{eventRegistration-Q7BYY5HF.mjs → eventRegistration-MRKEVAXW.mjs} +10 -9
  73. package/dist/client/{form-NI6YOG6S.mjs → form-WZZFFGMU.mjs} +3 -3
  74. package/dist/client/{headerSection-SDYGII36.mjs → headerSection-EQYVQBLM.mjs} +3 -3
  75. package/dist/client/hooks.mjs +18 -0
  76. package/dist/client/{locationMap-BDETEUQD.mjs → locationMap-MFF5VAZR.mjs} +3 -3
  77. package/dist/client/{newsletterForm-EKYIU67X.mjs → newsletterForm-JQ77UYIE.mjs} +60 -24
  78. package/dist/client/{productDetail-5UTGNN76.mjs → productDetail-25LMT3IZ.mjs} +8 -7
  79. package/dist/client/{productList-7YA5KXZQ.mjs → productList-5ABEMKUG.mjs} +8 -7
  80. package/dist/client/rendering/client.mjs +3266 -3528
  81. package/dist/client/rendering/islands.mjs +19 -19
  82. package/dist/client/rendering.mjs +3143 -3452
  83. package/dist/client/{shop-AIMUMZYC.mjs → shop-OMMQZ6YO.mjs} +8 -7
  84. package/dist/preview-next/before-render.mjs +18 -0
  85. package/dist/preview-next/client/runtime.mjs +5 -5
  86. package/dist/preview-next/middleware.mjs +18 -0
  87. package/dist/{sdk-runtime-NW472WNT.mjs → sdk-runtime-WNLBZ3ZH.mjs} +6 -6
  88. package/dist/server/components.mjs +1068 -1540
  89. package/dist/server/config-validation.mjs +18 -0
  90. package/dist/server/config.mjs +18 -0
  91. package/dist/server/data.mjs +18 -0
  92. package/dist/server/index.mjs +847 -261
  93. package/dist/server/next.mjs +1708 -1555
  94. package/dist/server/prebuild.mjs +1 -1
  95. package/dist/server/rendering/server.mjs +1068 -1540
  96. package/dist/server/rendering.mjs +1074 -1546
  97. package/dist/server/routing.mjs +314 -9
  98. package/dist/server/server.mjs +668 -25
  99. package/dist/server/theme-bridge.mjs +26 -0
  100. package/dist/styles/index.css +26 -0
  101. package/package.json +2 -1
  102. package/dist/SdkPreviewModeRuntime-ZALZDJEK.mjs +0 -8
  103. /package/dist/client/{chunk-LI2C6M5O.mjs → chunk-25W2EQUN.mjs} +0 -0
@@ -1,7 +1,8 @@
1
- import { normalizeCarouselProps, CarouselNodeClient } from './chunk-O5JNI3E4.mjs';
1
+ import { normalizeCarouselProps, CarouselNodeClient } from './chunk-7DH35FGA.mjs';
2
+ import './chunk-6N7YRNYU.mjs';
2
3
  import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
3
- import { defineIslandPropsDecoder } from './chunk-DIRW2LNG.mjs';
4
- import './chunk-LI2C6M5O.mjs';
4
+ import { defineIslandPropsDecoder } from './chunk-UQFY4AHX.mjs';
5
+ import './chunk-25W2EQUN.mjs';
5
6
  import { jsx } from 'react/jsx-runtime';
6
7
 
7
8
  var decode = defineIslandPropsDecoder("carousel");
@@ -1,15 +1,16 @@
1
- import { mountShopBlockIsland, CartClient } from './chunk-BL66UWGD.mjs';
2
- import './chunk-WCVK4MBJ.mjs';
3
- import './chunk-O5JNI3E4.mjs';
1
+ import { mountShopBlockIsland, CartClient } from './chunk-ZJZZA5EP.mjs';
2
+ import './chunk-VGLXACVK.mjs';
3
+ import './chunk-7DH35FGA.mjs';
4
+ import './chunk-6N7YRNYU.mjs';
4
5
  import './chunk-ZFHRN6W2.mjs';
5
6
  import './chunk-L4J5Y62O.mjs';
6
- import './chunk-X7GVFB7Y.mjs';
7
+ import './chunk-EY42X22F.mjs';
7
8
  import './chunk-3DCJ45Z2.mjs';
8
9
  import './chunk-WBQG7VJA.mjs';
9
- import './chunk-GOFO7HRH.mjs';
10
+ import './chunk-STJ2NCQM.mjs';
10
11
  import './chunk-N7PBWBWQ.mjs';
11
- import { defineIslandPropsDecoder } from './chunk-DIRW2LNG.mjs';
12
- import './chunk-LI2C6M5O.mjs';
12
+ import { defineIslandPropsDecoder } from './chunk-UQFY4AHX.mjs';
13
+ import './chunk-25W2EQUN.mjs';
13
14
 
14
15
  // src/rendering/islands/enhancers/cart.tsx
15
16
  var decode = defineIslandPropsDecoder("cart");
@@ -1,15 +1,16 @@
1
- import { mountShopBlockIsland, CheckoutClient } from './chunk-BL66UWGD.mjs';
2
- import './chunk-WCVK4MBJ.mjs';
3
- import './chunk-O5JNI3E4.mjs';
1
+ import { mountShopBlockIsland, CheckoutClient } from './chunk-ZJZZA5EP.mjs';
2
+ import './chunk-VGLXACVK.mjs';
3
+ import './chunk-7DH35FGA.mjs';
4
+ import './chunk-6N7YRNYU.mjs';
4
5
  import './chunk-ZFHRN6W2.mjs';
5
6
  import './chunk-L4J5Y62O.mjs';
6
- import './chunk-X7GVFB7Y.mjs';
7
+ import './chunk-EY42X22F.mjs';
7
8
  import './chunk-3DCJ45Z2.mjs';
8
9
  import './chunk-WBQG7VJA.mjs';
9
- import './chunk-GOFO7HRH.mjs';
10
+ import './chunk-STJ2NCQM.mjs';
10
11
  import './chunk-N7PBWBWQ.mjs';
11
- import { defineIslandPropsDecoder } from './chunk-DIRW2LNG.mjs';
12
- import './chunk-LI2C6M5O.mjs';
12
+ import { defineIslandPropsDecoder } from './chunk-UQFY4AHX.mjs';
13
+ import './chunk-25W2EQUN.mjs';
13
14
 
14
15
  // src/rendering/islands/enhancers/checkout.tsx
15
16
  var decode = defineIslandPropsDecoder("checkout");
@@ -0,0 +1,183 @@
1
+ "use client";
2
+ import { createContext, forwardRef, useContext, createElement } from 'react';
3
+
4
+ // ../../node_modules/.pnpm/lucide-react@1.21.0_react@19.2.7/node_modules/lucide-react/dist/esm/createLucideIcon.mjs
5
+
6
+ // ../../node_modules/.pnpm/lucide-react@1.21.0_react@19.2.7/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
7
+ var mergeClasses = (...classes) => classes.filter((className, index, array) => {
8
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
9
+ }).join(" ").trim();
10
+
11
+ // ../../node_modules/.pnpm/lucide-react@1.21.0_react@19.2.7/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs
12
+ var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
13
+
14
+ // ../../node_modules/.pnpm/lucide-react@1.21.0_react@19.2.7/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs
15
+ var toCamelCase = (string) => string.replace(
16
+ /^([A-Z])|[\s-_]+(\w)/g,
17
+ (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
18
+ );
19
+
20
+ // ../../node_modules/.pnpm/lucide-react@1.21.0_react@19.2.7/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs
21
+ var toPascalCase = (string) => {
22
+ const camelCase = toCamelCase(string);
23
+ return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
24
+ };
25
+
26
+ // ../../node_modules/.pnpm/lucide-react@1.21.0_react@19.2.7/node_modules/lucide-react/dist/esm/defaultAttributes.mjs
27
+ var defaultAttributes = {
28
+ xmlns: "http://www.w3.org/2000/svg",
29
+ width: 24,
30
+ height: 24,
31
+ viewBox: "0 0 24 24",
32
+ fill: "none",
33
+ stroke: "currentColor",
34
+ strokeWidth: 2,
35
+ strokeLinecap: "round",
36
+ strokeLinejoin: "round"
37
+ };
38
+
39
+ // ../../node_modules/.pnpm/lucide-react@1.21.0_react@19.2.7/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs
40
+ var hasA11yProp = (props) => {
41
+ for (const prop in props) {
42
+ if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
43
+ return true;
44
+ }
45
+ }
46
+ return false;
47
+ };
48
+ var LucideContext = createContext({});
49
+ var useLucideContext = () => useContext(LucideContext);
50
+
51
+ // ../../node_modules/.pnpm/lucide-react@1.21.0_react@19.2.7/node_modules/lucide-react/dist/esm/Icon.mjs
52
+ var Icon = forwardRef(
53
+ ({ color, size, strokeWidth, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref) => {
54
+ const {
55
+ size: contextSize = 24,
56
+ strokeWidth: contextStrokeWidth = 2,
57
+ absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,
58
+ color: contextColor = "currentColor",
59
+ className: contextClass = ""
60
+ } = useLucideContext() ?? {};
61
+ const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size ?? contextSize) : strokeWidth ?? contextStrokeWidth;
62
+ return createElement(
63
+ "svg",
64
+ {
65
+ ref,
66
+ ...defaultAttributes,
67
+ width: size ?? contextSize ?? defaultAttributes.width,
68
+ height: size ?? contextSize ?? defaultAttributes.height,
69
+ stroke: color ?? contextColor,
70
+ strokeWidth: calculatedStrokeWidth,
71
+ className: mergeClasses("lucide", contextClass, className),
72
+ ...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
73
+ ...rest
74
+ },
75
+ [
76
+ ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
77
+ ...Array.isArray(children) ? children : [children]
78
+ ]
79
+ );
80
+ }
81
+ );
82
+
83
+ // ../../node_modules/.pnpm/lucide-react@1.21.0_react@19.2.7/node_modules/lucide-react/dist/esm/createLucideIcon.mjs
84
+ var createLucideIcon = (iconName, iconNode) => {
85
+ const Component = forwardRef(
86
+ ({ className, ...props }, ref) => createElement(Icon, {
87
+ ref,
88
+ iconNode,
89
+ className: mergeClasses(
90
+ `lucide-${toKebabCase(toPascalCase(iconName))}`,
91
+ `lucide-${iconName}`,
92
+ className
93
+ ),
94
+ ...props
95
+ })
96
+ );
97
+ Component.displayName = toPascalCase(iconName);
98
+ return Component;
99
+ };
100
+
101
+ // ../../node_modules/.pnpm/lucide-react@1.21.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/chevron-left.mjs
102
+ var __iconNode = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
103
+ var ChevronLeft = createLucideIcon("chevron-left", __iconNode);
104
+
105
+ // ../../node_modules/.pnpm/lucide-react@1.21.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/chevron-right.mjs
106
+ var __iconNode2 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
107
+ var ChevronRight = createLucideIcon("chevron-right", __iconNode2);
108
+
109
+ // ../../node_modules/.pnpm/lucide-react@1.21.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/credit-card.mjs
110
+ var __iconNode3 = [
111
+ ["rect", { width: "20", height: "14", x: "2", y: "5", rx: "2", key: "ynyp8z" }],
112
+ ["line", { x1: "2", x2: "22", y1: "10", y2: "10", key: "1b3vmo" }]
113
+ ];
114
+ var CreditCard = createLucideIcon("credit-card", __iconNode3);
115
+
116
+ // ../../node_modules/.pnpm/lucide-react@1.21.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/sparkles.mjs
117
+ var __iconNode4 = [
118
+ [
119
+ "path",
120
+ {
121
+ d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
122
+ key: "1s2grr"
123
+ }
124
+ ],
125
+ ["path", { d: "M20 2v4", key: "1rf3ol" }],
126
+ ["path", { d: "M22 4h-4", key: "gwowj6" }],
127
+ ["circle", { cx: "4", cy: "20", r: "2", key: "6kqj1y" }]
128
+ ];
129
+ var Sparkles = createLucideIcon("sparkles", __iconNode4);
130
+
131
+ // ../../node_modules/.pnpm/lucide-react@1.21.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/star.mjs
132
+ var __iconNode5 = [
133
+ [
134
+ "path",
135
+ {
136
+ d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
137
+ key: "r04s7s"
138
+ }
139
+ ]
140
+ ];
141
+ var Star = createLucideIcon("star", __iconNode5);
142
+
143
+ // ../../node_modules/.pnpm/lucide-react@1.21.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/ticket.mjs
144
+ var __iconNode6 = [
145
+ [
146
+ "path",
147
+ {
148
+ d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",
149
+ key: "qn84l0"
150
+ }
151
+ ],
152
+ ["path", { d: "M13 5v2", key: "dyzc3o" }],
153
+ ["path", { d: "M13 17v2", key: "1ont0d" }],
154
+ ["path", { d: "M13 11v2", key: "1wjjxi" }]
155
+ ];
156
+ var Ticket = createLucideIcon("ticket", __iconNode6);
157
+ /*! Bundled license information:
158
+
159
+ lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs:
160
+ lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs:
161
+ lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs:
162
+ lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs:
163
+ lucide-react/dist/esm/defaultAttributes.mjs:
164
+ lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs:
165
+ lucide-react/dist/esm/context.mjs:
166
+ lucide-react/dist/esm/Icon.mjs:
167
+ lucide-react/dist/esm/createLucideIcon.mjs:
168
+ lucide-react/dist/esm/icons/chevron-left.mjs:
169
+ lucide-react/dist/esm/icons/chevron-right.mjs:
170
+ lucide-react/dist/esm/icons/credit-card.mjs:
171
+ lucide-react/dist/esm/icons/sparkles.mjs:
172
+ lucide-react/dist/esm/icons/star.mjs:
173
+ lucide-react/dist/esm/icons/ticket.mjs:
174
+ lucide-react/dist/esm/lucide-react.mjs:
175
+ (**
176
+ * @license lucide-react v1.21.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ *)
181
+ */
182
+
183
+ export { ChevronLeft, ChevronRight, CreditCard, Sparkles, Star, Ticket };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { ChevronLeft, ChevronRight } from './chunk-DIRW2LNG.mjs';
3
- import { clsx_default } from './chunk-LI2C6M5O.mjs';
2
+ import { ChevronLeft, ChevronRight } from './chunk-6N7YRNYU.mjs';
3
+ import { clsx_default } from './chunk-25W2EQUN.mjs';
4
4
  import React, { useRef, useState, useCallback, useEffect } from 'react';
5
5
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
6
6
 
@@ -1,17 +1,18 @@
1
1
  "use client";
2
- import { LeafletStaticMap } from './chunk-S4G65LGR.mjs';
3
- import { resolveCoursePricingState, useWaitlistClaim, MagicLinkForm, formatCoursePriceAmount, formatCoursePriceDisplay } from './chunk-MHBEWDT7.mjs';
4
- import { usePolling } from './chunk-H4MHEXYS.mjs';
5
- import { SpinnerNode } from './chunk-6DVPO44G.mjs';
2
+ import { LeafletStaticMap } from './chunk-ZT5XE7FK.mjs';
3
+ import { resolveCoursePricingState, useWaitlistClaim, MagicLinkForm, formatCoursePriceAmount, formatCoursePriceDisplay } from './chunk-RSQWWUAD.mjs';
4
+ import { CreditCard, Ticket, Star, Sparkles } from './chunk-6N7YRNYU.mjs';
5
+ import { usePolling } from './chunk-LQFDYWPJ.mjs';
6
+ import { SpinnerNode } from './chunk-FHU6PFPM.mjs';
6
7
  import { useDiscountCodeUi } from './chunk-ZFHRN6W2.mjs';
7
- import { createBodyThemePortalRoot, TabBarFragment, logoutPortal, consumeSearchParam, StepIndicator, DiscountCodeDisclosure, TerminalPanel, StateIcon, formatPrice, CrossIcon, ClockIcon, LoggedInAsUser, CheckIcon } from './chunk-X7GVFB7Y.mjs';
8
+ import { createBodyThemePortalRoot, TabBarFragment, logoutPortal, consumeSearchParam, StepIndicator, DiscountCodeDisclosure, TerminalPanel, StateIcon, formatPrice, CrossIcon, ClockIcon, LoggedInAsUser, CheckIcon } from './chunk-EY42X22F.mjs';
8
9
  import { getFieldValidationControlProps, FieldValidationMessage } from './chunk-3DCJ45Z2.mjs';
9
10
  import { ModalShell } from './chunk-WBQG7VJA.mjs';
10
11
  import { isSpamProtectionEnabled, AltchaWidget, getChallengeUrl } from './chunk-SDIYSQAY.mjs';
11
- import { useBlockApi, FeedbackMessage } from './chunk-GOFO7HRH.mjs';
12
- import { buildEventRuntimeFilters, buildEventCalendarListingRender, groupEventsByDate, getOrderedDayNames, formatDateKey, getEventRuntimeFiltersKey, themeButtonClassName, normalizeCsvIds, normalizeOptionalId, normalizeEventBlockKind, normalizeCsvString, EventCompactRow, EmptyState, getContainerClass, getCardOrientation, isToday, MAX_EVENTS_PER_DAY, formatTime, WIZARD_STEPS, getWizardStepsForContext, getStepNumber, formatEventPriceDisplay, resolveRuntimeEventPricing, formatEventPrice, formatEventDateParts, DateTimeTile, EventCard, buildCalendarViewport, shiftCalendarAnchorDate, addMonths, getThreeMonthRange, buildTimetableModel, formatDate, toRegistrationEvents, isEventContentType, findPreSelectedEvent, resolveRegistrationTarget, findEventByOccurrenceId, resolveEventRequiresPayment, resolveDiscountContext, MONTH_NAMES, getEventAvailability, formatEventTeacherLine, assertNever11, CreditCard, Ticket, Star, Sparkles } from './chunk-DIRW2LNG.mjs';
13
- import { publicEventPricingType, getBookingLocalDateKey, toScheduledBookingDateTime, toBookingTimeZone, publicEventPricingCurrency, formatBookingDateTime, publicEventPricingMode, publicEventScalarPrice, publicEventTicketTypes, formatCurrencyAmount, formatBookingDate, formatBookingTime } from './chunk-LI2C6M5O.mjs';
14
- import React9, { createContext, useId, useMemo, useState, useRef, useEffect, useCallback, useContext, useReducer } from 'react';
12
+ import { useBlockApi, FeedbackMessage } from './chunk-STJ2NCQM.mjs';
13
+ import { buildEventRuntimeFilters, buildEventCalendarListingRender, groupEventsByDate, getOrderedDayNames, formatDateKey, getEventRuntimeFiltersKey, themeButtonClassName, normalizeCsvIds, normalizeOptionalId, normalizeEventBlockKind, normalizeCsvString, EventCompactRow, EmptyState, getContainerClass, getCardOrientation, isToday, MAX_EVENTS_PER_DAY, formatTime, WIZARD_STEPS, getWizardStepsForContext, getStepNumber, formatEventPriceDisplay, resolveRuntimeEventPricing, formatEventPrice, formatEventDateParts, DateTimeTile, assertNever11, EventCard, buildCalendarViewport, shiftCalendarAnchorDate, addMonths, getThreeMonthRange, buildTimetableModel, formatDate, toRegistrationEvents, isEventContentType, findPreSelectedEvent, resolveRegistrationTarget, findEventByOccurrenceId, resolveEventRequiresPayment, resolveDiscountContext, MONTH_NAMES, getEventAvailability, formatEventTeacherLine } from './chunk-UQFY4AHX.mjs';
14
+ import { publicEventPricingType, getBookingLocalDateKey, toScheduledBookingDateTime, toBookingTimeZone, publicEventPricingCurrency, formatBookingDateTime, publicEventPricingMode, publicEventScalarPrice, publicEventTicketTypes, formatCurrencyAmount, formatBookingDate, formatBookingTime } from './chunk-25W2EQUN.mjs';
15
+ import React9, { createContext, useId, useMemo, useReducer, useState, useRef, useEffect, useCallback, useContext } from 'react';
15
16
  import { createPortal } from 'react-dom';
16
17
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
17
18
 
@@ -3697,9 +3698,74 @@ var EventPaginatedListView = ({
3697
3698
  }
3698
3699
  );
3699
3700
  };
3701
+
3702
+ // ../blocks/src/system/runtime/hooks/loadStateError.ts
3703
+ function toError(error, fallbackMessage) {
3704
+ return error instanceof Error ? error : new Error(fallbackMessage);
3705
+ }
3706
+
3707
+ // ../blocks/src/system/runtime/hooks/useEventPagination.state.ts
3708
+ function createInitialEventPaginationLoadState(events, pageSize) {
3709
+ return {
3710
+ kind: "ready",
3711
+ events,
3712
+ hasMore: hasMoreEventPages(events, pageSize)
3713
+ };
3714
+ }
3715
+ function eventPaginationLoadReducer(state, action) {
3716
+ switch (action.type) {
3717
+ case "started":
3718
+ return {
3719
+ kind: "loading",
3720
+ events: state.events,
3721
+ hasMore: action.reset ? true : state.hasMore
3722
+ };
3723
+ case "succeeded":
3724
+ return {
3725
+ kind: "ready",
3726
+ events: action.events,
3727
+ hasMore: action.hasMore
3728
+ };
3729
+ case "failed":
3730
+ return {
3731
+ kind: "error",
3732
+ events: state.events,
3733
+ hasMore: state.hasMore,
3734
+ error: action.error
3735
+ };
3736
+ case "synced":
3737
+ return createInitialEventPaginationLoadState(action.events, action.pageSize);
3738
+ default:
3739
+ return assertNever11(action);
3740
+ }
3741
+ }
3700
3742
  function getEventIdentity(event) {
3701
3743
  return event.occurrenceId || event.id;
3702
3744
  }
3745
+ function mergeEventPaginationEvents(existingEvents, newEvents) {
3746
+ const existingIds = new Set(existingEvents.map(getEventIdentity));
3747
+ const uniqueNew = newEvents.filter(
3748
+ (event) => !existingIds.has(getEventIdentity(event))
3749
+ );
3750
+ return [...existingEvents, ...uniqueNew];
3751
+ }
3752
+ function toEventPaginationLoadError(error) {
3753
+ return toError(error, "Unknown error");
3754
+ }
3755
+ function getEventPaginationEvents(state) {
3756
+ return state.events;
3757
+ }
3758
+ function isEventPaginationLoading(state) {
3759
+ return state.kind === "loading";
3760
+ }
3761
+ function getEventPaginationError(state) {
3762
+ return state.kind === "error" ? state.error : null;
3763
+ }
3764
+ function hasMoreEventPages(events, pageSize) {
3765
+ return events.length >= pageSize;
3766
+ }
3767
+
3768
+ // ../blocks/src/system/runtime/hooks/useEventPagination.ts
3703
3769
  function getEventsKey(events) {
3704
3770
  return events.map((e) => `${getEventIdentity(e)}:${e.startsAt}`).join("|");
3705
3771
  }
@@ -3722,10 +3788,15 @@ function useEventPagination({
3722
3788
  useEffect(() => {
3723
3789
  initialEventsRef.current = initialEvents;
3724
3790
  }, [initialEventsKey]);
3725
- const [events, setEvents] = useState(initialEvents);
3726
- const [loading, setLoading] = useState(false);
3727
- const [error, setError] = useState(null);
3728
- const [hasMore, setHasMore] = useState(initialEvents.length >= pageSize);
3791
+ const [loadState, dispatchLoadState] = useReducer(
3792
+ eventPaginationLoadReducer,
3793
+ { events: initialEvents, pageSize },
3794
+ ({ events: events2, pageSize: initialPageSize }) => createInitialEventPaginationLoadState(events2, initialPageSize)
3795
+ );
3796
+ const events = getEventPaginationEvents(loadState);
3797
+ const loading = isEventPaginationLoading(loadState);
3798
+ const error = getEventPaginationError(loadState);
3799
+ const hasMore = loadState.hasMore;
3729
3800
  const normalizedCategoryIds = normalizeCsvString(filters?.categoryIds);
3730
3801
  const normalizedStaffMemberId = normalizeOptionalId(filters?.staffMemberId);
3731
3802
  const normalizedVenueId = normalizeOptionalId(filters?.venueId);
@@ -3750,9 +3821,11 @@ function useEventPagination({
3750
3821
  if (loadingRef.current) return;
3751
3822
  if (!hasMoreRef.current && !options.reset) return;
3752
3823
  const currentRequestId = ++requestIdRef.current;
3753
- setLoading(true);
3824
+ dispatchLoadState({ type: "started", reset: options.reset });
3754
3825
  loadingRef.current = true;
3755
- setError(null);
3826
+ if (options.reset) {
3827
+ hasMoreRef.current = true;
3828
+ }
3756
3829
  try {
3757
3830
  const currentEvents = eventsRef.current;
3758
3831
  const lastEvent = options.reset ? void 0 : currentEvents[currentEvents.length - 1];
@@ -3773,29 +3846,25 @@ function useEventPagination({
3773
3846
  venueId: normalizedVenueId ?? void 0
3774
3847
  });
3775
3848
  if (currentRequestId === requestIdRef.current) {
3776
- if (options.reset) {
3777
- setEvents(newEvents);
3778
- eventsRef.current = newEvents;
3779
- } else {
3780
- setEvents((prev) => {
3781
- const existingIds = new Set(prev.map(getEventIdentity));
3782
- const uniqueNew = newEvents.filter((e) => !existingIds.has(getEventIdentity(e)));
3783
- const updated = [...prev, ...uniqueNew];
3784
- eventsRef.current = updated;
3785
- return updated;
3786
- });
3787
- }
3788
- const nextHasMore = newEvents.length >= pageSize;
3789
- setHasMore(nextHasMore);
3849
+ const nextEvents = options.reset ? newEvents : mergeEventPaginationEvents(eventsRef.current, newEvents);
3850
+ const nextHasMore = hasMoreEventPages(newEvents, pageSize);
3851
+ dispatchLoadState({
3852
+ type: "succeeded",
3853
+ events: nextEvents,
3854
+ hasMore: nextHasMore
3855
+ });
3856
+ eventsRef.current = [...nextEvents];
3790
3857
  hasMoreRef.current = nextHasMore;
3791
3858
  }
3792
3859
  } catch (err) {
3793
3860
  if (currentRequestId === requestIdRef.current) {
3794
- setError(err instanceof Error ? err : new Error("Unknown error"));
3861
+ dispatchLoadState({
3862
+ type: "failed",
3863
+ error: toEventPaginationLoadError(err)
3864
+ });
3795
3865
  }
3796
3866
  } finally {
3797
3867
  if (currentRequestId === requestIdRef.current) {
3798
- setLoading(false);
3799
3868
  loadingRef.current = false;
3800
3869
  }
3801
3870
  }
@@ -3837,19 +3906,20 @@ function useEventPagination({
3837
3906
  try {
3838
3907
  if (filtersMatchInitial) {
3839
3908
  if (!prevFiltersMatchInitial || prevInitialEventsKey !== initialEventsKey) {
3840
- setEvents(latestInitialEvents);
3909
+ dispatchLoadState({
3910
+ type: "synced",
3911
+ events: latestInitialEvents,
3912
+ pageSize
3913
+ });
3841
3914
  eventsRef.current = latestInitialEvents;
3842
3915
  }
3843
- const nextHasMore = latestInitialEvents.length >= pageSize;
3916
+ const nextHasMore = hasMoreEventPages(latestInitialEvents, pageSize);
3844
3917
  if (hasMoreRef.current !== nextHasMore) {
3845
- setHasMore(nextHasMore);
3846
3918
  hasMoreRef.current = nextHasMore;
3847
3919
  }
3848
- if (error !== null) setError(null);
3849
3920
  return;
3850
3921
  }
3851
3922
  if (prevFiltersMatchInitial || prevFiltersKey !== filtersKey) {
3852
- setHasMore(true);
3853
3923
  hasMoreRef.current = true;
3854
3924
  void fetchPage({ reset: true });
3855
3925
  }
@@ -3858,7 +3928,7 @@ function useEventPagination({
3858
3928
  prevInitialEventsKeyRef.current = initialEventsKey;
3859
3929
  prevFiltersKeyRef.current = filtersKey;
3860
3930
  }
3861
- }, [error, fetchPage, filtersKey, filtersMatchInitial, initialEventsKey, pageSize]);
3931
+ }, [fetchPage, filtersKey, filtersMatchInitial, initialEventsKey, pageSize]);
3862
3932
  return {
3863
3933
  events,
3864
3934
  loading,
@@ -3867,6 +3937,43 @@ function useEventPagination({
3867
3937
  loadMore
3868
3938
  };
3869
3939
  }
3940
+
3941
+ // ../blocks/src/system/runtime/hooks/useEventFilters.state.ts
3942
+ var EMPTY_EVENT_FILTERS = Object.freeze({
3943
+ categories: [],
3944
+ venues: [],
3945
+ staffMembers: [],
3946
+ labels: Object.freeze({ courseOption: "Course" })
3947
+ });
3948
+ function createInitialEventFiltersLoadState() {
3949
+ return { kind: "idle", filters: EMPTY_EVENT_FILTERS };
3950
+ }
3951
+ function eventFiltersLoadReducer(state, action) {
3952
+ switch (action.type) {
3953
+ case "started":
3954
+ return { kind: "loading", filters: state.filters };
3955
+ case "succeeded":
3956
+ return { kind: "loaded", filters: action.filters };
3957
+ case "failed":
3958
+ return { kind: "error", filters: state.filters, error: action.error };
3959
+ default:
3960
+ return assertNever11(action);
3961
+ }
3962
+ }
3963
+ function toEventFiltersLoadError(error) {
3964
+ return toError(error, "Failed to load filters");
3965
+ }
3966
+ function getEventFiltersData(state) {
3967
+ return state.filters;
3968
+ }
3969
+ function isEventFiltersLoading(state) {
3970
+ return state.kind === "loading";
3971
+ }
3972
+ function getEventFiltersError(state) {
3973
+ return state.kind === "error" ? state.error : null;
3974
+ }
3975
+
3976
+ // ../blocks/src/system/runtime/hooks/useEventFilters.ts
3870
3977
  function useEventFilters({
3871
3978
  showCategoryFilter = "auto",
3872
3979
  showVenueFilter = false,
@@ -3880,14 +3987,14 @@ function useEventFilters({
3880
3987
  preFilterScheduleScope
3881
3988
  } = {}) {
3882
3989
  const api = useBlockApi();
3883
- const [filters, setFilters] = useState({
3884
- categories: [],
3885
- venues: [],
3886
- staffMembers: [],
3887
- labels: { courseOption: "Course" }
3888
- });
3889
- const [loading, setLoading] = useState(false);
3890
- const [error, setError] = useState(null);
3990
+ const [loadState, dispatchLoadState] = useReducer(
3991
+ eventFiltersLoadReducer,
3992
+ void 0,
3993
+ createInitialEventFiltersLoadState
3994
+ );
3995
+ const filters = getEventFiltersData(loadState);
3996
+ const loading = isEventFiltersLoading(loadState);
3997
+ const error = getEventFiltersError(loadState);
3891
3998
  const [selectedKind, setSelectedKindState] = useState("all");
3892
3999
  const [selectedCategoryId, setSelectedCategoryId] = useState("all");
3893
4000
  const [selectedStaffMemberId, setSelectedStaffMemberId] = useState("all");
@@ -3922,7 +4029,7 @@ function useEventFilters({
3922
4029
  const needFilters = showCategoryFilter !== "never" && fixedKind !== "courses" || showVenueFilter || showStaffFilter;
3923
4030
  if (!needFilters) return;
3924
4031
  hasFetchedRef.current = true;
3925
- setLoading(true);
4032
+ dispatchLoadState({ type: "started" });
3926
4033
  api.getEventFilters({
3927
4034
  categoryIds: allowedCategoryIds.length > 0 ? allowedCategoryIds.join(",") : void 0,
3928
4035
  venueId: fixedVenueId ?? void 0,
@@ -3932,12 +4039,12 @@ function useEventFilters({
3932
4039
  eventPresets: fixedEventPresets,
3933
4040
  scheduleScope: fixedScheduleScope
3934
4041
  }).then((data) => {
3935
- setFilters(data);
3936
- setError(null);
4042
+ dispatchLoadState({ type: "succeeded", filters: data });
3937
4043
  }).catch((err) => {
3938
- setError(err instanceof Error ? err : new Error("Failed to load filters"));
3939
- }).finally(() => {
3940
- setLoading(false);
4044
+ dispatchLoadState({
4045
+ type: "failed",
4046
+ error: toEventFiltersLoadError(err)
4047
+ });
3941
4048
  });
3942
4049
  }, [
3943
4050
  allowedCategoryIds,
@@ -4269,6 +4376,31 @@ var TabBar = ({
4269
4376
  }
4270
4377
  );
4271
4378
  };
4379
+
4380
+ // ../blocks/src/system/runtime/hooks/useCalendarEvents.state.ts
4381
+ function calendarEventCacheLoadReducer(_state, action) {
4382
+ switch (action.type) {
4383
+ case "started":
4384
+ return { kind: "loading" };
4385
+ case "succeeded":
4386
+ return { kind: "idle" };
4387
+ case "failed":
4388
+ return { kind: "error", error: action.error };
4389
+ default:
4390
+ return assertNever11(action);
4391
+ }
4392
+ }
4393
+ function toCalendarEventCacheLoadError(error) {
4394
+ return toError(error, "Unknown error");
4395
+ }
4396
+ function isCalendarEventCacheLoading(state) {
4397
+ return state.kind === "loading";
4398
+ }
4399
+ function getCalendarEventCacheError(state) {
4400
+ return state.kind === "error" ? state.error : null;
4401
+ }
4402
+
4403
+ // ../blocks/src/system/runtime/hooks/useCalendarEvents.ts
4272
4404
  var CALENDAR_FETCH_LIMIT = 200;
4273
4405
  function getMonthKey(date) {
4274
4406
  return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}`;
@@ -4312,8 +4444,10 @@ function useCalendarEventCache({
4312
4444
  stage
4313
4445
  }) {
4314
4446
  const { getPublicEvents } = useBlockApi();
4315
- const [loading, setLoading] = useState(false);
4316
- const [error, setError] = useState(null);
4447
+ const [loadState, dispatchLoadState] = useReducer(
4448
+ calendarEventCacheLoadReducer,
4449
+ { kind: "idle" }
4450
+ );
4317
4451
  const [cacheVersion, setCacheVersion] = useState(0);
4318
4452
  const filtersKey = useMemo(
4319
4453
  () => getEventRuntimeFiltersKey(filters),
@@ -4358,8 +4492,7 @@ function useCalendarEventCache({
4358
4492
  if (monthsToFetch.length === 0) return;
4359
4493
  monthsToFetch.forEach((m) => fetchingRef.current.add(m));
4360
4494
  const currentRequestId = ++requestIdRef.current;
4361
- setLoading(true);
4362
- setError(null);
4495
+ dispatchLoadState({ type: "started" });
4363
4496
  try {
4364
4497
  const result = await getPublicEvents({
4365
4498
  from,
@@ -4391,16 +4524,17 @@ function useCalendarEventCache({
4391
4524
  }
4392
4525
  }
4393
4526
  setCacheVersion((v) => v + 1);
4527
+ dispatchLoadState({ type: "succeeded" });
4394
4528
  }
4395
4529
  } catch (err) {
4396
4530
  if (currentRequestId === requestIdRef.current) {
4397
- setError(err instanceof Error ? err : new Error("Unknown error"));
4531
+ dispatchLoadState({
4532
+ type: "failed",
4533
+ error: toCalendarEventCacheLoadError(err)
4534
+ });
4398
4535
  }
4399
4536
  } finally {
4400
4537
  monthsToFetch.forEach((m) => fetchingRef.current.delete(m));
4401
- if (currentRequestId === requestIdRef.current) {
4402
- setLoading(false);
4403
- }
4404
4538
  }
4405
4539
  }, [
4406
4540
  getPublicEvents,
@@ -4450,8 +4584,8 @@ function useCalendarEventCache({
4450
4584
  }, [viewDate, cacheVersion]);
4451
4585
  return {
4452
4586
  events,
4453
- loading,
4454
- error
4587
+ loading: isCalendarEventCacheLoading(loadState),
4588
+ error: getCalendarEventCacheError(loadState)
4455
4589
  };
4456
4590
  }
4457
4591
  function useCalendarEvents({
@@ -1,6 +1,6 @@
1
- import { FeedbackMessage } from './chunk-GOFO7HRH.mjs';
2
- import { themeButtonClassName } from './chunk-DIRW2LNG.mjs';
3
- import { formatCurrencyAmount, clsx_default } from './chunk-LI2C6M5O.mjs';
1
+ import { FeedbackMessage } from './chunk-STJ2NCQM.mjs';
2
+ import { themeButtonClassName } from './chunk-UQFY4AHX.mjs';
3
+ import { formatCurrencyAmount, clsx_default } from './chunk-25W2EQUN.mjs';
4
4
  import { useId } from 'react';
5
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
6
 
@@ -1,4 +1,4 @@
1
- import { clsx_default } from './chunk-LI2C6M5O.mjs';
1
+ import { clsx_default } from './chunk-25W2EQUN.mjs';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
 
4
4
  function resolveColorStyle(color) {