@riverbankcms/sdk 0.124.0 → 0.126.0

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 (130) hide show
  1. package/README.md +3 -1
  2. package/dist/{PreviewEditorSidebar-DBmAJJkQ.mjs → PreviewEditorSidebar-DcYJxTgc.mjs} +67 -266
  3. package/dist/{PreviewEditorUI-CfGaz9cY.mjs → PreviewEditorUI-Ctt1yTJr.mjs} +3 -3
  4. package/dist/{PreviewQueryProvider-BH-3-jSj.mjs → PreviewQueryProvider-DgFDIwvK.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-BW9Z8j8T.mjs → SdkPreviewModeRuntime-CvW1vdQ4.mjs} +38 -30
  6. package/dist/{SiteChromeCustomizeContext-2z8moxYf.mjs → SiteChromeCustomizeContext-C87qlKWw.mjs} +493 -1378
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +1354 -202
  8. package/dist/_dts/api/src/accessAdmin.d.ts +2 -14
  9. package/dist/_dts/api/src/common/envelope.d.ts +1 -1
  10. package/dist/_dts/api/src/contentRuntime.d.ts +0 -2
  11. package/dist/_dts/api/src/endpoints.d.ts +0 -7
  12. package/dist/_dts/api/src/sdk-event-upsert.d.ts +42 -0
  13. package/dist/_dts/api/src/sdkContracts.d.ts +11 -9
  14. package/dist/_dts/api/src/siteAccessAdmin.d.ts +23 -0
  15. package/dist/_dts/api/src/siteOperations.d.ts +18 -1
  16. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -14
  17. package/dist/_dts/billing/src/plans/types.d.ts +24 -5
  18. package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +4 -0
  19. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +2 -0
  20. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +1 -0
  21. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +2 -0
  22. package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +3 -1
  23. package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +2 -1
  24. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +15 -2
  25. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +331 -19
  26. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +1 -2
  27. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -3
  28. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -2
  29. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -12
  30. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -13
  31. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +8 -100
  32. package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -4
  33. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -15
  34. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +11 -21
  35. package/dist/_dts/sdk/src/cli/commands/event.d.ts +2 -2
  36. package/dist/_dts/sdk/src/cli/commands/eventOccurrenceSchedule.d.ts +12 -0
  37. package/dist/_dts/sdk/src/cli/commands/push/pushAllExtras.d.ts +6 -0
  38. package/dist/_dts/sdk/src/cli/commands/style.d.ts +1 -1
  39. package/dist/_dts/sdk/src/cli/content/legacyEventScheduleShapeError.d.ts +5 -0
  40. package/dist/_dts/sdk/src/cli/content/localEventSchedule.d.ts +17 -0
  41. package/dist/_dts/sdk/src/cli/content/reader.d.ts +5 -10
  42. package/dist/_dts/sdk/src/cli/migrations/events.d.ts +1 -1
  43. package/dist/_dts/sdk/src/cli/site-commands/eventScheduleCompiler.d.ts +24 -0
  44. package/dist/_dts/sdk/src/client/management/http.d.ts +1 -1
  45. package/dist/_dts/sdk/src/client/management/types.d.ts +3 -28
  46. package/dist/_dts/sdk/src/config/index.d.ts +1 -1
  47. package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -20
  48. package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
  49. package/dist/_dts/sdk/src/version.d.ts +1 -1
  50. package/dist/_dts/site-commands/src/commandContract.d.ts +33 -5
  51. package/dist/_dts/site-commands/src/commandDomain.d.ts +2 -2
  52. package/dist/_dts/site-commands/src/commands.d.ts +38 -9
  53. package/dist/_dts/site-commands/src/siteStyleCommandSchema.d.ts +28 -1
  54. package/dist/_dts/site-commands/src/siteStyleSelectionSchemaBuilder.d.ts +4 -4
  55. package/dist/_dts/theme-core/src/palette/concretePalette.d.ts +20 -0
  56. package/dist/_dts/theme-core/src/palette/curated/index.d.ts +2 -17
  57. package/dist/_dts/theme-core/src/palette/index.d.ts +1 -6
  58. package/dist/_dts/theme-core/src/palette/schema.d.ts +39 -0
  59. package/dist/_dts/theme-core/src/schema.d.ts +38 -26
  60. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -6
  61. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +5 -6
  62. package/dist/cli/index.mjs +631 -525
  63. package/dist/cli/init-docs/content/cli-reference.md +6 -3
  64. package/dist/cli/init-docs/content/content-management.md +24 -13
  65. package/dist/client/{DiscountCodeDisclosure-DxvjKvck.mjs → DiscountCodeDisclosure-DS0AuFWW.mjs} +1 -1
  66. package/dist/client/{EventCombined.client-BydMGc4c.mjs → EventCombined.client-DtMxLr7q.mjs} +2 -2
  67. package/dist/client/{EventListing.client-vpzhhysN.mjs → EventListing.client-BdLSRNg1.mjs} +2 -2
  68. package/dist/client/{LeafletStaticMap-CB07rpf8.mjs → LeafletStaticMap-BrpC6vsT.mjs} +1 -1
  69. package/dist/client/{MagicLinkForm-BzyRJ8VF.mjs → MagicLinkForm-Bt3IuLMy.mjs} +1 -1
  70. package/dist/client/{StepIndicator-CTcGf8Be.mjs → StepIndicator-CBYPFVoy.mjs} +2 -2
  71. package/dist/client/{accordion-B-DUDLRD.mjs → accordion-BqqwPJWM.mjs} +1 -1
  72. package/dist/client/{bookingForm-DSbClLcZ.mjs → bookingForm-SneP3yxC.mjs} +5 -6
  73. package/dist/client/bookings.mjs +190 -24
  74. package/dist/client/{carousel-B6Ccdx8M.mjs → carousel-BTIR9L3I.mjs} +1 -1
  75. package/dist/client/{cart-BZh8G8wM.mjs → cart-bqiqd8SX.mjs} +3 -3
  76. package/dist/client/{checkout-o6zaC-kM.mjs → checkout-WbTFV5v4.mjs} +3 -3
  77. package/dist/client/client.mjs +175 -223
  78. package/dist/client/{courseRegistration-Cf11pNDs.mjs → courseRegistration-BcemLAdN.mjs} +6 -7
  79. package/dist/client/{eventCalendar-BeXrdsSE.mjs → eventCalendar-CsxIw0V_.mjs} +4 -4
  80. package/dist/client/{eventCombined-DA76PZgG.mjs → eventCombined-B6XMoHfa.mjs} +2 -2
  81. package/dist/client/{eventDetails-BLxg0rok.mjs → eventDetails-BJaoPPfo.mjs} +10 -5
  82. package/dist/client/{eventListing-tO9LheBX.mjs → eventListing-DgwdYHRT.mjs} +2 -2
  83. package/dist/client/{eventRegistration-Cnene9D9.mjs → eventRegistration-C0O3folu.mjs} +30 -22
  84. package/dist/client/{form-DZf72CHB.mjs → form-Bk9txGFt.mjs} +1 -1
  85. package/dist/client/{headerSection-Hioja5Cr.mjs → headerSection-yIBt0yTv.mjs} +2 -2
  86. package/dist/client/hooks.mjs +54 -102
  87. package/dist/client/{locationMap-DwhUXEix.mjs → locationMap-C-3KIpv-.mjs} +2 -2
  88. package/dist/client/{newsletterForm-C350bEQf.mjs → newsletterForm-CzB8g8h2.mjs} +1 -1
  89. package/dist/client/{pricing-BYWN_ATa.mjs → pricing-C1QeDes_.mjs} +1 -1
  90. package/dist/client/{productDetail-CCqCyXgU.mjs → productDetail-w7SBp5uc.mjs} +3 -3
  91. package/dist/client/{productList-BAiNJrOU.mjs → productList-D0tGKHGf.mjs} +3 -3
  92. package/dist/client/{propsDecoder-DeunRj6m.mjs → propsDecoder-Bcin2DB3.mjs} +172 -11
  93. package/dist/client/rendering/client.mjs +322 -363
  94. package/dist/client/rendering/islands.mjs +18 -18
  95. package/dist/client/rendering.mjs +231 -272
  96. package/dist/client/{useDiscountCodeUi-I-92-x2V.mjs → scrollToBlock-h-o_STf_.mjs} +18 -2
  97. package/dist/client/{shop-DUmCdBtw.mjs → shop-BGzmL8O_.mjs} +5 -6
  98. package/dist/client/{shop-commerce-CY27mEUr.mjs → shop-commerce-lX8QxjX-.mjs} +4 -4
  99. package/dist/client/{shop-commerce-store-ChXPbWfa.mjs → shop-commerce-store-CEurARtu.mjs} +1 -1
  100. package/dist/client/{shopShared-q0kin1cv.mjs → shopShared-DXxH8xxw.mjs} +2 -2
  101. package/dist/client/{useEventFilters-DlcVluZh.mjs → useEventFilters-B591g9vd.mjs} +2 -2
  102. package/dist/client/{usePolling-Bz7GFV_a.mjs → usePolling-BvnChV4m.mjs} +2 -2
  103. package/dist/preview-next/before-render.mjs +0 -7
  104. package/dist/preview-next/client/runtime.mjs +4 -4
  105. package/dist/preview-next/middleware.mjs +0 -7
  106. package/dist/{previewAuthStore-CJX21dGi.mjs → previewAuthStore-Dev9CdG9.mjs} +0 -7
  107. package/dist/{sdk-runtime-OnPM8Z69.mjs → sdk-runtime-M__i3Jce.mjs} +2 -2
  108. package/dist/{separator-CPtfzHqA.mjs → separator-VSlnI9bc.mjs} +1 -1
  109. package/dist/server/components.mjs +99 -141
  110. package/dist/server/config-validation.mjs +54 -102
  111. package/dist/server/config.mjs +54 -102
  112. package/dist/server/data.mjs +54 -102
  113. package/dist/server/index.mjs +1 -8
  114. package/dist/server/next.mjs +103 -152
  115. package/dist/server/page-converter.mjs +54 -102
  116. package/dist/server/prebuild.mjs +1 -1
  117. package/dist/server/rendering/server.mjs +62 -104
  118. package/dist/server/rendering.mjs +100 -142
  119. package/dist/server/routing.mjs +75 -147
  120. package/dist/server/server.mjs +55 -110
  121. package/dist/server/theme-bridge.mjs +172 -162
  122. package/dist/server/theme.mjs +167 -11
  123. package/package.json +1 -1
  124. package/dist/_dts/theme-core/src/palette/editorState.d.ts +0 -75
  125. package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +0 -64
  126. package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +0 -81
  127. package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +0 -75
  128. package/dist/_dts/theme-core/src/palette/selection.d.ts +0 -74
  129. package/dist/_dts/theme-core/src/palette/sitePalettePersistence.d.ts +0 -34
  130. package/dist/client/scrollToBlock-C86BYkyV.mjs +0 -17
@@ -2172,6 +2172,185 @@ var init_media$2 = __esmMin((() => {
2172
2172
  });
2173
2173
  }));
2174
2174
  //#endregion
2175
+ //#region ../theme-core/src/palette/colors.ts
2176
+ function normalizePaletteHex(value) {
2177
+ if (!NORMALIZABLE_HEX_REGEX.test(value)) return null;
2178
+ const normalized = value.toLowerCase();
2179
+ if (normalized.length === 7) return normalized;
2180
+ const triplet = normalized.slice(1);
2181
+ const red = triplet.charAt(0);
2182
+ const green = triplet.charAt(1);
2183
+ const blue = triplet.charAt(2);
2184
+ return `#${red}${red}${green}${green}${blue}${blue}`;
2185
+ }
2186
+ function paletteColorsFromEntries(entries) {
2187
+ const values = {};
2188
+ for (const entry of entries) {
2189
+ const parsedRole = paletteTokenNameSchema.safeParse(entry.name);
2190
+ if (!parsedRole.success) return {
2191
+ ok: false,
2192
+ error: {
2193
+ kind: "unknown-role",
2194
+ role: entry.name
2195
+ }
2196
+ };
2197
+ const role = parsedRole.data;
2198
+ if (values[role] !== void 0) return {
2199
+ ok: false,
2200
+ error: {
2201
+ kind: "duplicate-role",
2202
+ role
2203
+ }
2204
+ };
2205
+ const hex = normalizePaletteHex(entry.hex);
2206
+ if (!hex) return {
2207
+ ok: false,
2208
+ error: {
2209
+ kind: "invalid-color",
2210
+ role,
2211
+ value: entry.hex
2212
+ }
2213
+ };
2214
+ values[role] = hex;
2215
+ }
2216
+ const missing = PALETTE_TOKEN_NAMES.filter((role) => values[role] === void 0);
2217
+ if (missing.length > 0) return {
2218
+ ok: false,
2219
+ error: {
2220
+ kind: "missing-roles",
2221
+ roles: missing
2222
+ }
2223
+ };
2224
+ return {
2225
+ ok: true,
2226
+ colors: paletteColorsSchema.parse(values)
2227
+ };
2228
+ }
2229
+ function requirePaletteColorsFromEntries(entries) {
2230
+ const result = paletteColorsFromEntries(entries);
2231
+ if (result.ok) return result.colors;
2232
+ throw new Error(`Invalid complete palette: ${result.error.kind}`);
2233
+ }
2234
+ function paletteColorEntries(colors) {
2235
+ return THEME_PALETTE_COLOR_ORDER.map((name) => ({
2236
+ name,
2237
+ hex: colors[name]
2238
+ }));
2239
+ }
2240
+ function paletteColorFingerprint(colors) {
2241
+ return PALETTE_TOKEN_NAMES.map((name) => `${name}:${colors[name]}`).join("|");
2242
+ }
2243
+ function canonicalPaletteHashInput(colors, mode) {
2244
+ return `${mode}|${paletteColorFingerprint(colors)}`;
2245
+ }
2246
+ /**
2247
+ * The shared TypeScript/SQL protocol. Do not reorder roles: the order comes
2248
+ * from PALETTE_TOKEN_NAMES through canonicalPaletteHashInput.
2249
+ */
2250
+ function paletteValueKey(colors, mode) {
2251
+ return `${PALETTE_VALUE_KEY_PREFIX}${canonicalPaletteHashInput(colors, mode)}`;
2252
+ }
2253
+ /** Parses only the exact v1 canonical form emitted by paletteValueKey. */
2254
+ function parsePaletteValueKey(value) {
2255
+ if (typeof value !== "string" || !value.startsWith(PALETTE_VALUE_KEY_PREFIX)) return null;
2256
+ const [rawMode, ...rawRoles] = value.slice(PALETTE_VALUE_KEY_PREFIX.length).split("|");
2257
+ const mode = paletteModeSchema.safeParse(rawMode);
2258
+ if (!mode.success || rawRoles.length !== PALETTE_TOKEN_NAMES.length) return null;
2259
+ const colors = paletteColorsFromEntries(rawRoles.map((roleValue) => {
2260
+ const separator = roleValue.indexOf(":");
2261
+ return separator === -1 ? {
2262
+ name: "",
2263
+ hex: ""
2264
+ } : {
2265
+ name: roleValue.slice(0, separator),
2266
+ hex: roleValue.slice(separator + 1)
2267
+ };
2268
+ }));
2269
+ if (!colors.ok || paletteValueKey(colors.colors, mode.data) !== value) return null;
2270
+ return value;
2271
+ }
2272
+ var HEX_COLOR_REGEX, NORMALIZABLE_HEX_REGEX, THEME_PALETTE_COLOR_ORDER, hexColorSchema, paletteModeSchema, PALETTE_VALUE_KEY_PREFIX, paletteColorsSchema, paletteValueKeySchema;
2273
+ var init_colors = __esmMin((() => {
2274
+ init_themeColorTokens();
2275
+ HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
2276
+ NORMALIZABLE_HEX_REGEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2277
+ THEME_PALETTE_COLOR_ORDER = [
2278
+ "primary",
2279
+ "secondary",
2280
+ "accent",
2281
+ "success",
2282
+ "warning",
2283
+ "destructive",
2284
+ "background",
2285
+ "surface",
2286
+ "surfaceAlt",
2287
+ "muted",
2288
+ "text",
2289
+ "primaryForeground",
2290
+ "border"
2291
+ ];
2292
+ hexColorSchema = z$1.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
2293
+ paletteModeSchema = z$1.enum(["light", "dark"]);
2294
+ PALETTE_VALUE_KEY_PREFIX = "palette-value:v1|";
2295
+ z$1.string().regex(/^[0-9a-f]{64}$/, "Palette hash must be a lowercase SHA-256 value").transform((value) => value);
2296
+ paletteColorsSchema = z$1.object({
2297
+ primary: hexColorSchema,
2298
+ primaryForeground: hexColorSchema,
2299
+ secondary: hexColorSchema,
2300
+ accent: hexColorSchema,
2301
+ success: hexColorSchema,
2302
+ warning: hexColorSchema,
2303
+ destructive: hexColorSchema,
2304
+ background: hexColorSchema,
2305
+ surface: hexColorSchema,
2306
+ surfaceAlt: hexColorSchema,
2307
+ muted: hexColorSchema,
2308
+ text: hexColorSchema,
2309
+ border: hexColorSchema
2310
+ }).strict().transform((value) => value);
2311
+ paletteValueKeySchema = z$1.string().transform((value, ctx) => {
2312
+ const parsed = parsePaletteValueKey(value);
2313
+ if (parsed) return parsed;
2314
+ ctx.addIssue({
2315
+ code: "custom",
2316
+ message: "Invalid canonical palette value key"
2317
+ });
2318
+ return z$1.NEVER;
2319
+ });
2320
+ }));
2321
+ //#endregion
2322
+ //#region ../theme-core/src/palette/schema.ts
2323
+ var colourHexString, paletteColorSchema, paletteMetaSchema, paletteSchema;
2324
+ var init_schema$3 = __esmMin((() => {
2325
+ init_colors();
2326
+ colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
2327
+ paletteColorSchema = z$1.object({
2328
+ name: z$1.string().min(1),
2329
+ hex: colourHexString
2330
+ });
2331
+ paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
2332
+ paletteSchema = z$1.object({
2333
+ colors: z$1.array(paletteColorSchema),
2334
+ meta: paletteMetaSchema
2335
+ }).transform((palette, ctx) => {
2336
+ const colors = paletteColorsFromEntries(palette.colors);
2337
+ if (!colors.ok) {
2338
+ ctx.addIssue({
2339
+ code: "custom",
2340
+ message: `Invalid complete palette: ${colors.error.kind}`
2341
+ });
2342
+ return z$1.NEVER;
2343
+ }
2344
+ return {
2345
+ colors: paletteColorEntries(colors.colors).map(({ name, hex }) => ({
2346
+ name: String(name),
2347
+ hex: String(hex)
2348
+ })),
2349
+ meta: palette.meta
2350
+ };
2351
+ });
2352
+ }));
2353
+ //#endregion
2175
2354
  //#region ../theme-core/src/cards/types.ts
2176
2355
  function isCardVariantRole(value) {
2177
2356
  return typeof value === "string" && cardVariantRoleValues.includes(value);
@@ -3221,9 +3400,10 @@ function normaliseHeaderNavFontRole(header) {
3221
3400
  navFontRole: navTypography
3222
3401
  } : rest;
3223
3402
  }
3224
- var axesSchema, colourHexString, paletteColorSchema, paletteMetaSchema, paletteSchema, typographyStyleSchema, bodyTypographyStyleSchema, headingSizeSchema, headingTypographyOverridesSchema, headingTypographyStyleSchema, proseLinkUnderlineStyleSchema, proseLinkUnderlineThicknessSchema, proseLinkUnderlineOffsetSchema, proseLinkStyleSchema, semanticSpacingSchema, boxRoundedSchema, boxBackgroundOverlaySchema, boxBackgroundSchema, noHeadingDecorationSchema, visibleHeadingDecorationSchema, headingDecorationSchema, headingDecorationOverrideSchema, accordionIconTreatmentSchema, sectionStylesOverrideSchema, containerStylesOverrideSchema, cardBorderOverrideSchema, cardStylesOverrideSchema, blockStyleOverridesSchema, blockThemeOverrideSchema, typographyScaleSchema, eyebrowTypographyStyleSchema, typographySchema, spaceSchema, corners, shadow, border, motion, inputStyle$1, headerVariant, headerPositioning, headerNavStyle, navFontWeight, headerMaxWidth, headerBarFrame, headerContainerSchema, headerBorderSchema, logoStyleSchema, headerLogoTextSchema, navEffectsSchema, dropdownStyleSchema, headerCtaGapSchema, headerCtaTreatmentSchema, navContainerSchema, headerBackgroundSchema, headerSchema, footerVariant, footerMaxWidth, footerMode, footerNavLayoutMode, footerNavLayoutAlign, footerSpacing, footerLogoPlacement, footerLogoSize, footerLogoMaxHeight, footerBottomTextLinkStyleSchema, footerBottomBarSchema, footerNavLayoutSchema, footerLogoSchema, footerSchema, containerPaddingPresetSchema, layoutSchema, heroTypographySizeSchema, heroTypographyLineHeightSchema, heroResponsiveTypographySchema, heroTypographySchema, heroSchema, bodyTextIntroTypographySizeSchema, bodyTextSchema, gradientsSchema, testimonialQuoteTreatmentSchema, themeSchema;
3403
+ var axesSchema, typographyStyleSchema, bodyTypographyStyleSchema, headingSizeSchema, headingTypographyOverridesSchema, headingTypographyStyleSchema, proseLinkUnderlineStyleSchema, proseLinkUnderlineThicknessSchema, proseLinkUnderlineOffsetSchema, proseLinkStyleSchema, semanticSpacingSchema, boxRoundedSchema, boxBackgroundOverlaySchema, boxBackgroundSchema, noHeadingDecorationSchema, visibleHeadingDecorationSchema, headingDecorationSchema, headingDecorationOverrideSchema, accordionIconTreatmentSchema, sectionStylesOverrideSchema, containerStylesOverrideSchema, cardBorderOverrideSchema, cardStylesOverrideSchema, blockStyleOverridesSchema, blockThemeOverrideSchema, typographyScaleSchema, eyebrowTypographyStyleSchema, typographySchema, spaceSchema, corners, shadow, border, motion, inputStyle$1, headerVariant, headerPositioning, headerNavStyle, navFontWeight, headerMaxWidth, headerBarFrame, headerContainerSchema, headerBorderSchema, logoStyleSchema, headerLogoTextSchema, navEffectsSchema, dropdownStyleSchema, headerCtaGapSchema, headerCtaTreatmentSchema, navContainerSchema, headerBackgroundSchema, headerSchema, footerVariant, footerMaxWidth, footerMode, footerNavLayoutMode, footerNavLayoutAlign, footerSpacing, footerLogoPlacement, footerLogoSize, footerLogoMaxHeight, footerBottomTextLinkStyleSchema, footerBottomBarSchema, footerNavLayoutSchema, footerLogoSchema, footerSchema, containerPaddingPresetSchema, layoutSchema, heroTypographySizeSchema, heroTypographyLineHeightSchema, heroResponsiveTypographySchema, heroTypographySchema, heroSchema, bodyTextIntroTypographySizeSchema, bodyTextSchema, gradientsSchema, testimonialQuoteTreatmentSchema, themeSchema;
3225
3404
  var init_schema$2 = __esmMin((() => {
3226
3405
  init_media$2();
3406
+ init_schema$3();
3227
3407
  init_buttons();
3228
3408
  init_cards();
3229
3409
  init_types$13();
@@ -3266,16 +3446,6 @@ var init_schema$2 = __esmMin((() => {
3266
3446
  "expressive"
3267
3447
  ])
3268
3448
  });
3269
- colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
3270
- paletteColorSchema = z$1.object({
3271
- name: z$1.string().min(1),
3272
- hex: colourHexString
3273
- });
3274
- paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
3275
- paletteSchema = z$1.object({
3276
- colors: z$1.array(paletteColorSchema),
3277
- meta: paletteMetaSchema
3278
- });
3279
3449
  typographyStyleSchema = z$1.object({
3280
3450
  family: z$1.string().min(1),
3281
3451
  weight: z$1.enum([
@@ -4398,7 +4568,7 @@ function selectionBranch(styleId, parameters) {
4398
4568
  }).strict();
4399
4569
  }
4400
4570
  var BUTTON_STYLE_IDS, quietArrowParametersSchema, emptyParametersSchema$1, buttonStyleSelectionWireSchema, buttonStyleSelectionSchema;
4401
- var init_selection$1 = __esmMin((() => {
4571
+ var init_selection = __esmMin((() => {
4402
4572
  BUTTON_STYLE_IDS = [
4403
4573
  "soft-pill",
4404
4574
  "earth-pill",
@@ -4437,7 +4607,7 @@ var quietArrowRecipe;
4437
4607
  var init_quietArrow = __esmMin((() => {
4438
4608
  init_domain();
4439
4609
  init_types$15();
4440
- init_selection$1();
4610
+ init_selection();
4441
4611
  quietArrowRecipe = defineButtonStyleRecipe({
4442
4612
  id: "quiet-arrow",
4443
4613
  accessibilityLabel: "Wide uppercase buttons with trailing arrows",
@@ -5903,7 +6073,7 @@ function defaultButtonStyleSelectionFor(styleId) {
5903
6073
  var buttonStyleRecipes, recipesById, registeredIds;
5904
6074
  var init_registry$1 = __esmMin((() => {
5905
6075
  init_domain();
5906
- init_selection$1();
6076
+ init_selection();
5907
6077
  init_quietArrow();
5908
6078
  init_staticRecipes();
5909
6079
  buttonStyleRecipes = [
@@ -5929,7 +6099,7 @@ var init_registry$1 = __esmMin((() => {
5929
6099
  var init_styles = __esmMin((() => {
5930
6100
  init_domain();
5931
6101
  init_registry$1();
5932
- init_selection$1();
6102
+ init_selection();
5933
6103
  }));
5934
6104
  function presetCategory(recipe) {
5935
6105
  switch (recipe.tags.era) {
@@ -12811,6 +12981,90 @@ function BookingFormSSR({ blockId, siteId, apiBaseUrl, portalToken, formId, serv
12811
12981
  });
12812
12982
  }
12813
12983
  //#endregion
12984
+ //#region ../blocks/src/system/runtime/nodes/event-registration/eventScope.ts
12985
+ function parseEventRegistrationPageSurfaceSubject(value) {
12986
+ return parseEventPageSurfaceSubject(value);
12987
+ }
12988
+ function normalizeEventRegistrationPageSurfaceSubject(value) {
12989
+ const parsed = parseEventRegistrationPageSurfaceSubject(value);
12990
+ if (parsed.ok) return parsed.value;
12991
+ switch (parsed.error.kind) {
12992
+ case "notObject": return null;
12993
+ case "unsupportedSubject": return {
12994
+ kind: "unsupported",
12995
+ reason: "unsupportedSubject"
12996
+ };
12997
+ case "invalidEventSeriesId": return {
12998
+ kind: "unsupported",
12999
+ reason: "invalidEventSeriesId"
13000
+ };
13001
+ case "invalidEventOfferingId": return {
13002
+ kind: "unsupported",
13003
+ reason: "invalidEventOfferingId"
13004
+ };
13005
+ }
13006
+ }
13007
+ function resolveEventRegistrationScope(context) {
13008
+ const occurrenceSeriesId = context.occurrenceContext?.seriesId;
13009
+ if (occurrenceSeriesId) return {
13010
+ kind: "occurrenceSeries",
13011
+ seriesId: occurrenceSeriesId
13012
+ };
13013
+ if (context.subject?.kind === "eventSeries") return {
13014
+ kind: "pageSurfaceSeries",
13015
+ seriesId: context.subject.eventSeriesId
13016
+ };
13017
+ if (context.subject?.kind === "eventOffering") return {
13018
+ kind: "pageSurfaceOffering",
13019
+ offeringId: context.subject.eventOfferingId,
13020
+ seriesIds: context.subject.availableEventSeriesIds
13021
+ };
13022
+ if (context.subject?.kind === "unsupported") return {
13023
+ kind: "unsupportedPageSurfaceSubject",
13024
+ reason: context.subject.reason
13025
+ };
13026
+ return { kind: "unscoped" };
13027
+ }
13028
+ function applyEventRegistrationScope(events, scope) {
13029
+ switch (scope.kind) {
13030
+ case "occurrenceSeries":
13031
+ case "pageSurfaceSeries": return events.filter((event) => event.seriesId === scope.seriesId);
13032
+ case "pageSurfaceOffering": {
13033
+ const seriesIds = new Set(scope.seriesIds);
13034
+ return events.filter((event) => seriesIds.has(event.seriesId));
13035
+ }
13036
+ case "unsupportedPageSurfaceSubject": return [];
13037
+ case "unscoped": return [...events];
13038
+ }
13039
+ }
13040
+ function resolveEventRegistrationScopedEvents(events, context) {
13041
+ return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
13042
+ }
13043
+ var unsupportedEventRegistrationPageSurfaceSubjectReasons, unsupportedEventRegistrationPageSurfaceSubjectSchema, eventRegistrationPageSurfaceSubjectSchema;
13044
+ var init_eventScope = __esmMin((() => {
13045
+ init_src$3();
13046
+ unsupportedEventRegistrationPageSurfaceSubjectReasons = [
13047
+ "unsupportedSubject",
13048
+ "invalidEventSeriesId",
13049
+ "invalidEventOfferingId"
13050
+ ];
13051
+ unsupportedEventRegistrationPageSurfaceSubjectSchema = z$1.object({
13052
+ kind: z$1.literal("unsupported"),
13053
+ reason: z$1.enum(unsupportedEventRegistrationPageSurfaceSubjectReasons)
13054
+ });
13055
+ eventRegistrationPageSurfaceSubjectSchema = z$1.unknown().transform((value, ctx) => {
13056
+ const unsupported = unsupportedEventRegistrationPageSurfaceSubjectSchema.safeParse(value);
13057
+ if (unsupported.success) return unsupported.data;
13058
+ const parsed = parseEventPageSurfaceSubject(value);
13059
+ if (parsed.ok) return parsed.value;
13060
+ ctx.addIssue({
13061
+ code: z$1.ZodIssueCode.custom,
13062
+ message: `Invalid event page-surface subject (${parsed.error.kind})`
13063
+ });
13064
+ return z$1.NEVER;
13065
+ });
13066
+ }));
13067
+ //#endregion
12814
13068
  //#region ../blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.ts
12815
13069
  function isCategoryEligible(eligibleCategoryIds, eventCategoryId) {
12816
13070
  const categories = eligibleCategoryIds ?? [];
@@ -12884,7 +13138,10 @@ function uniqByOccurrenceId(events) {
12884
13138
  return out;
12885
13139
  }
12886
13140
  function selectEventDetails(args) {
12887
- const all = uniqByOccurrenceId((args.events ?? []).filter(Boolean));
13141
+ const all = uniqByOccurrenceId(resolveEventRegistrationScopedEvents((args.events ?? []).filter(Boolean), {
13142
+ occurrenceContext: args.occurrenceContext,
13143
+ subject: args.subject
13144
+ }));
12888
13145
  const occurrenceContext = args.occurrenceContext ?? null;
12889
13146
  const otherLimit = parseLimit$1(args.otherDatesLimit, 5);
12890
13147
  const selectedFromContext = (() => {
@@ -12923,6 +13180,7 @@ function selectEventDetails(args) {
12923
13180
  }
12924
13181
  var init_logic = __esmMin((() => {
12925
13182
  init_src$3();
13183
+ init_eventScope();
12926
13184
  init_eventProductEligibility();
12927
13185
  }));
12928
13186
  //#endregion
@@ -14460,11 +14718,14 @@ var init_view$2 = __esmMin((() => {
14460
14718
  //#region ../blocks/src/system/runtime/nodes/event-details.server.tsx
14461
14719
  init_logic();
14462
14720
  init_view$2();
14463
- function EventDetailsSSR({ blockId, occurrenceContext, events, showVenue = true, showMap = true, showOtherDates = true, otherDatesLimit, showCost = true, showAcceptedPasses = true, showAcceptedMemberships = true, sitePasses, siteMemberships, autoApplyDiscount, className, children }) {
14721
+ init_eventScope();
14722
+ function EventDetailsSSR({ blockId, occurrenceContext, subject, events, showVenue = true, showMap = true, showOtherDates = true, otherDatesLimit, showCost = true, showAcceptedPasses = true, showAcceptedMemberships = true, sitePasses, siteMemberships, autoApplyDiscount, className, children }) {
14464
14723
  const nowIso = (/* @__PURE__ */ new Date()).toISOString();
14724
+ const normalizedSubject = normalizeEventRegistrationPageSurfaceSubject(subject);
14465
14725
  const selection = selectEventDetails({
14466
14726
  events: events ?? null,
14467
14727
  occurrenceContext: occurrenceContext ?? null,
14728
+ subject: normalizedSubject,
14468
14729
  nowIso,
14469
14730
  otherDatesLimit
14470
14731
  });
@@ -14479,6 +14740,7 @@ function EventDetailsSSR({ blockId, occurrenceContext, events, showVenue = true,
14479
14740
  children: [
14480
14741
  /* @__PURE__ */ jsx(IslandPropsScript, { value: {
14481
14742
  occurrenceContext,
14743
+ subject: normalizedSubject,
14482
14744
  events,
14483
14745
  showVenue,
14484
14746
  showMap,
@@ -20521,134 +20783,12 @@ var init_browser = __esmMin((() => {
20521
20783
  var init_extractPalette = __esmMin((() => {
20522
20784
  init_browser();
20523
20785
  }));
20524
- //#endregion
20525
- //#region ../theme-core/src/palette/colors.ts
20526
- function normalizePaletteHex(value) {
20527
- if (!NORMALIZABLE_HEX_REGEX.test(value)) return null;
20528
- const normalized = value.toLowerCase();
20529
- if (normalized.length === 7) return normalized;
20530
- const triplet = normalized.slice(1);
20531
- const red = triplet.charAt(0);
20532
- const green = triplet.charAt(1);
20533
- const blue = triplet.charAt(2);
20534
- return `#${red}${red}${green}${green}${blue}${blue}`;
20535
- }
20536
- function paletteColorsFromEntries(entries) {
20537
- const values = {};
20538
- for (const entry of entries) {
20539
- const parsedRole = paletteTokenNameSchema.safeParse(entry.name);
20540
- if (!parsedRole.success) return {
20541
- ok: false,
20542
- error: {
20543
- kind: "unknown-role",
20544
- role: entry.name
20545
- }
20546
- };
20547
- const role = parsedRole.data;
20548
- if (values[role] !== void 0) return {
20549
- ok: false,
20550
- error: {
20551
- kind: "duplicate-role",
20552
- role
20553
- }
20554
- };
20555
- const hex = normalizePaletteHex(entry.hex);
20556
- if (!hex) return {
20557
- ok: false,
20558
- error: {
20559
- kind: "invalid-color",
20560
- role,
20561
- value: entry.hex
20562
- }
20563
- };
20564
- values[role] = hex;
20565
- }
20566
- const missing = PALETTE_TOKEN_NAMES.filter((role) => values[role] === void 0);
20567
- if (missing.length > 0) return {
20568
- ok: false,
20569
- error: {
20570
- kind: "missing-roles",
20571
- roles: missing
20572
- }
20573
- };
20574
- return {
20575
- ok: true,
20576
- colors: paletteColorsSchema.parse(values)
20577
- };
20578
- }
20579
- function requirePaletteColorsFromEntries(entries) {
20580
- const result = paletteColorsFromEntries(entries);
20581
- if (result.ok) return result.colors;
20582
- throw new Error(`Invalid complete palette: ${result.error.kind}`);
20583
- }
20584
- function paletteColorFingerprint(colors) {
20585
- return PALETTE_TOKEN_NAMES.map((name) => `${name}:${colors[name]}`).join("|");
20586
- }
20587
- function canonicalPaletteHashInput(colors, mode) {
20588
- return `${mode}|${paletteColorFingerprint(colors)}`;
20589
- }
20590
- /**
20591
- * The shared TypeScript/SQL protocol. Do not reorder roles: the order comes
20592
- * from PALETTE_TOKEN_NAMES through canonicalPaletteHashInput.
20593
- */
20594
- function paletteValueKey(colors, mode) {
20595
- return `${PALETTE_VALUE_KEY_PREFIX}${canonicalPaletteHashInput(colors, mode)}`;
20596
- }
20597
- /** Parses only the exact v1 canonical form emitted by paletteValueKey. */
20598
- function parsePaletteValueKey(value) {
20599
- if (typeof value !== "string" || !value.startsWith(PALETTE_VALUE_KEY_PREFIX)) return null;
20600
- const [rawMode, ...rawRoles] = value.slice(PALETTE_VALUE_KEY_PREFIX.length).split("|");
20601
- const mode = paletteModeSchema.safeParse(rawMode);
20602
- if (!mode.success || rawRoles.length !== PALETTE_TOKEN_NAMES.length) return null;
20603
- const colors = paletteColorsFromEntries(rawRoles.map((roleValue) => {
20604
- const separator = roleValue.indexOf(":");
20605
- return separator === -1 ? {
20606
- name: "",
20607
- hex: ""
20608
- } : {
20609
- name: roleValue.slice(0, separator),
20610
- hex: roleValue.slice(separator + 1)
20611
- };
20612
- }));
20613
- if (!colors.ok || paletteValueKey(colors.colors, mode.data) !== value) return null;
20614
- return value;
20615
- }
20616
- var HEX_COLOR_REGEX, NORMALIZABLE_HEX_REGEX, hexColorSchema, paletteModeSchema, PALETTE_VALUE_KEY_PREFIX, paletteColorsSchema, paletteValueKeySchema;
20617
- var init_colors = __esmMin((() => {
20618
- init_themeColorTokens();
20619
- HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
20620
- NORMALIZABLE_HEX_REGEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
20621
- hexColorSchema = z$1.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
20622
- paletteModeSchema = z$1.enum(["light", "dark"]);
20623
- PALETTE_VALUE_KEY_PREFIX = "palette-value:v1|";
20624
- z$1.string().regex(/^[0-9a-f]{64}$/, "Palette hash must be a lowercase SHA-256 value").transform((value) => value);
20625
- paletteColorsSchema = z$1.object({
20626
- primary: hexColorSchema,
20627
- primaryForeground: hexColorSchema,
20628
- secondary: hexColorSchema,
20629
- accent: hexColorSchema,
20630
- success: hexColorSchema,
20631
- warning: hexColorSchema,
20632
- destructive: hexColorSchema,
20633
- background: hexColorSchema,
20634
- surface: hexColorSchema,
20635
- surfaceAlt: hexColorSchema,
20636
- muted: hexColorSchema,
20637
- text: hexColorSchema,
20638
- border: hexColorSchema
20639
- }).strict().transform((value) => value);
20640
- paletteValueKeySchema = z$1.string().transform((value, ctx) => {
20641
- const parsed = parsePaletteValueKey(value);
20642
- if (parsed) return parsed;
20643
- ctx.addIssue({
20644
- code: "custom",
20645
- message: "Invalid canonical palette value key"
20646
- });
20647
- return z$1.NEVER;
20648
- });
20786
+ var init_concretePalette = __esmMin((() => {
20787
+ init_colors();
20788
+ }));
20789
+ var init_fromVibrant = __esmMin((() => {
20790
+ init_utils$5();
20649
20791
  }));
20650
- var init_editorState = __esmMin((() => {}));
20651
- var init_libraryModel = __esmMin((() => {}));
20652
20792
  //#endregion
20653
20793
  //#region ../theme-core/src/site-styles/styleTags.ts
20654
20794
  var STYLE_AXIS_VALUES, styleTagsSchema;
@@ -21938,22 +22078,12 @@ var init_warm_dark = __esmMin((() => {
21938
22078
  }));
21939
22079
  //#endregion
21940
22080
  //#region ../theme-core/src/palette/curated/index.ts
21941
- /**
21942
- * Curated palette library.
21943
- *
21944
- * Authoring keys are readable source aliases. Value keys are derived from the
21945
- * complete mode and semantic colours and are the only curated identity used at
21946
- * persistence and runtime boundaries.
21947
- */
21948
22081
  function admitCuratedPaletteDefinition(definition) {
21949
22082
  return {
21950
22083
  ...definition,
21951
22084
  valueKey: definition.valueKey
21952
22085
  };
21953
22086
  }
21954
- function findCuratedPalette(valueKey) {
21955
- return curatedPalettesByValueKey.get(valueKey);
21956
- }
21957
22087
  function findCuratedPaletteByAuthoringKey(authoringKey) {
21958
22088
  return curatedPalettesByAuthoringKey.get(authoringKey);
21959
22089
  }
@@ -21962,9 +22092,8 @@ function requireCuratedPaletteValueKey(authoringKey) {
21962
22092
  if (!palette) throw new Error(`Unknown curated palette authoring key "${authoringKey}"`);
21963
22093
  return palette.valueKey;
21964
22094
  }
21965
- var curatedPalettes, curatedPalettesByValueKey, curatedPalettesByAuthoringKey, knownCuratedPaletteValueKeySchema;
22095
+ var curatedPalettes, curatedPalettesByAuthoringKey;
21966
22096
  var init_curated = __esmMin((() => {
21967
- init_colors();
21968
22097
  init_brand_led();
21969
22098
  init_high_contrast();
21970
22099
  init_soft_natural();
@@ -21991,107 +22120,8 @@ var init_curated = __esmMin((() => {
21991
22120
  admitCuratedPaletteDefinition(warmDarkEmber),
21992
22121
  admitCuratedPaletteDefinition(warmDarkKirtanGold)
21993
22122
  ];
21994
- curatedPalettesByValueKey = new Map(curatedPalettes.map((palette) => [palette.valueKey, palette]));
22123
+ new Map(curatedPalettes.map((palette) => [palette.valueKey, palette]));
21995
22124
  curatedPalettesByAuthoringKey = new Map(curatedPalettes.map((palette) => [palette.authoringKey, palette]));
21996
- knownCuratedPaletteValueKeySchema = z$1.string().transform((value, ctx) => {
21997
- const valueKey = parsePaletteValueKey(value);
21998
- if (!valueKey) {
21999
- ctx.addIssue({
22000
- code: "custom",
22001
- message: "Invalid canonical palette value key"
22002
- });
22003
- return z$1.NEVER;
22004
- }
22005
- const palette = findCuratedPalette(valueKey);
22006
- if (!palette) {
22007
- ctx.addIssue({
22008
- code: "custom",
22009
- message: "Unknown curated palette value key"
22010
- });
22011
- return z$1.NEVER;
22012
- }
22013
- return palette.valueKey;
22014
- });
22015
- }));
22016
- var init_resolveSelection = __esmMin((() => {
22017
- init_curated();
22018
- })), sitePaletteIdSchema, sitePaletteVersionSchema, paletteSelectionSchema, onboardingPaletteOriginSchema, curatedForkPaletteOriginSchema, manualPaletteOriginSchema, legacyCustomizedPaletteOriginSchema, sitePaletteOriginSchema, editorSitePaletteOriginSchema;
22019
- var init_selection = __esmMin((() => {
22020
- init_colors();
22021
- init_curated();
22022
- sitePaletteIdSchema = z$1.string().uuid().transform((value) => value);
22023
- sitePaletteVersionSchema = z$1.number().int().nonnegative().transform((value) => value);
22024
- paletteSelectionSchema = z$1.discriminatedUnion("kind", [z$1.object({
22025
- kind: z$1.literal("curated"),
22026
- valueKey: knownCuratedPaletteValueKeySchema
22027
- }), z$1.object({
22028
- kind: z$1.literal("site"),
22029
- paletteId: sitePaletteIdSchema
22030
- })]);
22031
- onboardingPaletteOriginSchema = z$1.object({
22032
- kind: z$1.literal("onboarding"),
22033
- sourceKey: z$1.string().min(1).nullable()
22034
- });
22035
- curatedForkPaletteOriginSchema = z$1.object({
22036
- kind: z$1.literal("curated-fork"),
22037
- sourceValueKey: paletteValueKeySchema
22038
- });
22039
- manualPaletteOriginSchema = z$1.object({ kind: z$1.literal("manual") });
22040
- legacyCustomizedPaletteOriginSchema = z$1.object({
22041
- kind: z$1.literal("legacy-customized"),
22042
- sourceKey: z$1.string().min(1).nullable()
22043
- });
22044
- sitePaletteOriginSchema = z$1.discriminatedUnion("kind", [
22045
- onboardingPaletteOriginSchema,
22046
- curatedForkPaletteOriginSchema,
22047
- manualPaletteOriginSchema,
22048
- legacyCustomizedPaletteOriginSchema
22049
- ]);
22050
- editorSitePaletteOriginSchema = z$1.discriminatedUnion("kind", [z$1.object({
22051
- kind: z$1.literal("curated-fork"),
22052
- sourceValueKey: knownCuratedPaletteValueKeySchema
22053
- }), manualPaletteOriginSchema]);
22054
- z$1.object({
22055
- id: sitePaletteIdSchema,
22056
- colors: paletteColorsSchema,
22057
- mode: paletteModeSchema,
22058
- origin: sitePaletteOriginSchema,
22059
- version: sitePaletteVersionSchema
22060
- });
22061
- z$1.discriminatedUnion("kind", [
22062
- z$1.object({ kind: z$1.literal("preserve") }),
22063
- z$1.object({
22064
- kind: z$1.literal("select"),
22065
- selection: paletteSelectionSchema
22066
- }),
22067
- z$1.object({
22068
- kind: z$1.literal("create-site"),
22069
- colors: paletteColorsSchema,
22070
- mode: paletteModeSchema,
22071
- origin: editorSitePaletteOriginSchema
22072
- }),
22073
- z$1.object({
22074
- kind: z$1.literal("update-site"),
22075
- paletteId: sitePaletteIdSchema,
22076
- expectedVersion: sitePaletteVersionSchema,
22077
- colors: paletteColorsSchema,
22078
- mode: paletteModeSchema
22079
- })
22080
- ]);
22081
- }));
22082
- var init_persistenceReadSource = __esmMin((() => {
22083
- init_curated();
22084
- init_colors();
22085
- init_resolveSelection();
22086
- init_selection();
22087
- }));
22088
- var init_sitePalettePersistence = __esmMin((() => {
22089
- init_curated();
22090
- init_colors();
22091
- init_selection();
22092
- }));
22093
- var init_fromVibrant = __esmMin((() => {
22094
- init_utils$5();
22095
22125
  })), init_palette$1 = __esmMin((() => {
22096
22126
  init_all();
22097
22127
  init_classifyColor();
@@ -22104,12 +22134,7 @@ var init_fromVibrant = __esmMin((() => {
22104
22134
  init_paletteAccess();
22105
22135
  init_extractPalette();
22106
22136
  init_colors();
22107
- init_editorState();
22108
- init_libraryModel();
22109
- init_persistenceReadSource();
22110
- init_resolveSelection();
22111
- init_selection();
22112
- init_sitePalettePersistence();
22137
+ init_concretePalette();
22113
22138
  init_fromVibrant();
22114
22139
  init_suggestRecipes();
22115
22140
  init_allRecipes();
@@ -24696,7 +24721,6 @@ var init_runtimeCompiler = __esmMin((() => {
24696
24721
  init_modern_minimal();
24697
24722
  init_expandPalette();
24698
24723
  init_styles();
24699
- init_colors();
24700
24724
  init_designState();
24701
24725
  init_types$9();
24702
24726
  init_accessibleSurfaces();
@@ -26559,7 +26583,7 @@ var init_siteStyleThemeCompiler = __esmMin((() => {
26559
26583
  init_curatedSiteStyles();
26560
26584
  init_runtimeCompiler();
26561
26585
  init_curated();
26562
- init_resolveSelection();
26586
+ init_concretePalette();
26563
26587
  }));
26564
26588
  var init_previewCustomization = __esmMin((() => {
26565
26589
  init_types$9();
@@ -26569,7 +26593,7 @@ var init_previewCompiler = __esmMin((() => {
26569
26593
  init_onColor();
26570
26594
  init_tokens();
26571
26595
  init_curated();
26572
- init_resolveSelection();
26596
+ init_concretePalette();
26573
26597
  init_curatedSiteStyles();
26574
26598
  init_resolver();
26575
26599
  init_types$9();
@@ -32500,90 +32524,6 @@ const checkoutBlockDefinition = {
32500
32524
  runtime: checkoutBlockRuntime
32501
32525
  };
32502
32526
  //#endregion
32503
- //#region ../blocks/src/system/runtime/nodes/event-registration/eventScope.ts
32504
- function parseEventRegistrationPageSurfaceSubject(value) {
32505
- return parseEventPageSurfaceSubject(value);
32506
- }
32507
- function normalizeEventRegistrationPageSurfaceSubject(value) {
32508
- const parsed = parseEventRegistrationPageSurfaceSubject(value);
32509
- if (parsed.ok) return parsed.value;
32510
- switch (parsed.error.kind) {
32511
- case "notObject": return null;
32512
- case "unsupportedSubject": return {
32513
- kind: "unsupported",
32514
- reason: "unsupportedSubject"
32515
- };
32516
- case "invalidEventSeriesId": return {
32517
- kind: "unsupported",
32518
- reason: "invalidEventSeriesId"
32519
- };
32520
- case "invalidEventOfferingId": return {
32521
- kind: "unsupported",
32522
- reason: "invalidEventOfferingId"
32523
- };
32524
- }
32525
- }
32526
- function resolveEventRegistrationScope(context) {
32527
- const occurrenceSeriesId = context.occurrenceContext?.seriesId;
32528
- if (occurrenceSeriesId) return {
32529
- kind: "occurrenceSeries",
32530
- seriesId: occurrenceSeriesId
32531
- };
32532
- if (context.subject?.kind === "eventSeries") return {
32533
- kind: "pageSurfaceSeries",
32534
- seriesId: context.subject.eventSeriesId
32535
- };
32536
- if (context.subject?.kind === "eventOffering") return {
32537
- kind: "pageSurfaceOffering",
32538
- offeringId: context.subject.eventOfferingId,
32539
- seriesIds: context.subject.availableEventSeriesIds
32540
- };
32541
- if (context.subject?.kind === "unsupported") return {
32542
- kind: "unsupportedPageSurfaceSubject",
32543
- reason: context.subject.reason
32544
- };
32545
- return { kind: "unscoped" };
32546
- }
32547
- function applyEventRegistrationScope(events, scope) {
32548
- switch (scope.kind) {
32549
- case "occurrenceSeries":
32550
- case "pageSurfaceSeries": return events.filter((event) => event.seriesId === scope.seriesId);
32551
- case "pageSurfaceOffering": {
32552
- const seriesIds = new Set(scope.seriesIds);
32553
- return events.filter((event) => seriesIds.has(event.seriesId));
32554
- }
32555
- case "unsupportedPageSurfaceSubject": return [];
32556
- case "unscoped": return [...events];
32557
- }
32558
- }
32559
- function resolveEventRegistrationScopedEvents(events, context) {
32560
- return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
32561
- }
32562
- var unsupportedEventRegistrationPageSurfaceSubjectReasons, unsupportedEventRegistrationPageSurfaceSubjectSchema, eventRegistrationPageSurfaceSubjectSchema;
32563
- var init_eventScope = __esmMin((() => {
32564
- init_src$3();
32565
- unsupportedEventRegistrationPageSurfaceSubjectReasons = [
32566
- "unsupportedSubject",
32567
- "invalidEventSeriesId",
32568
- "invalidEventOfferingId"
32569
- ];
32570
- unsupportedEventRegistrationPageSurfaceSubjectSchema = z$1.object({
32571
- kind: z$1.literal("unsupported"),
32572
- reason: z$1.enum(unsupportedEventRegistrationPageSurfaceSubjectReasons)
32573
- });
32574
- eventRegistrationPageSurfaceSubjectSchema = z$1.unknown().transform((value, ctx) => {
32575
- const unsupported = unsupportedEventRegistrationPageSurfaceSubjectSchema.safeParse(value);
32576
- if (unsupported.success) return unsupported.data;
32577
- const parsed = parseEventPageSurfaceSubject(value);
32578
- if (parsed.ok) return parsed.value;
32579
- ctx.addIssue({
32580
- code: z$1.ZodIssueCode.custom,
32581
- message: `Invalid event page-surface subject (${parsed.error.kind})`
32582
- });
32583
- return z$1.NEVER;
32584
- });
32585
- }));
32586
- //#endregion
32587
32527
  //#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
32588
32528
  function buildCourseRegistrationDisplay(source) {
32589
32529
  return {
@@ -102813,15 +102753,20 @@ var init_usePaymentVerification = __esmMin((() => {
102813
102753
  //#endregion
102814
102754
  //#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.ts
102815
102755
  function useEventRegistrationStripeReturn(options) {
102756
+ return useEventRegistrationStripeReturnWithDeps(options, eventRegistrationStripeReturnDeps);
102757
+ }
102758
+ function useEventRegistrationStripeReturnWithDeps(options, deps) {
102816
102759
  const { api, events, occurrenceId, pendingAttendeeId, setErrorMessage, setFormData, setPaymentSelection, setPendingAttendeeId, setRegistrationResult, setSelectedEvent, setSelectedAttendanceMode, setTicketSelections, setStep, setTicketsCount, step } = options;
102817
- const verification = usePaymentVerification(useMemo(() => step === "verifying-payment" && pendingAttendeeId ? { transactionId: pendingAttendeeId } : null, [step, pendingAttendeeId]));
102760
+ const verificationConfig = useMemo(() => step === "verifying-payment" && pendingAttendeeId ? { transactionId: pendingAttendeeId } : null, [step, pendingAttendeeId]);
102761
+ const verification = deps.usePaymentVerification(verificationConfig);
102818
102762
  useEffect(() => {
102819
- cleanupStaleRegistrations();
102820
- const registrationStatus = consumeSearchParam("registration");
102821
- if (!registrationStatus) return;
102763
+ deps.cleanupStaleRegistrations();
102764
+ const registrationStatus = deps.consumeSearchParam("registration");
102765
+ if (registrationStatus !== "cancelled" && registrationStatus !== "success") return;
102766
+ deps.scrollToBlock(EVENT_REGISTRATION_ANCHOR_ID);
102822
102767
  const siteId = api.config.siteId;
102823
102768
  if (!siteId) return;
102824
- const pending = getPendingRegistration(siteId, occurrenceId || void 0);
102769
+ const pending = deps.getPendingRegistration(siteId, occurrenceId || void 0);
102825
102770
  if (!pending) return;
102826
102771
  setFormData(pending.formData);
102827
102772
  setTicketSelections(pending.ticketSelections);
@@ -102841,7 +102786,7 @@ function useEventRegistrationStripeReturn(options) {
102841
102786
  useEffect(() => {
102842
102787
  if (verification.status === "completed") {
102843
102788
  const siteId = api.config.siteId;
102844
- if (siteId && occurrenceId) clearPendingRegistration(siteId, occurrenceId);
102789
+ if (siteId && occurrenceId) deps.clearPendingRegistration(siteId, occurrenceId);
102845
102790
  setRegistrationResult({ status: "confirmed" });
102846
102791
  setStep("success");
102847
102792
  } else if (verification.status === "failed") {
@@ -102861,11 +102806,21 @@ function useEventRegistrationStripeReturn(options) {
102861
102806
  ]);
102862
102807
  return verification;
102863
102808
  }
102809
+ var eventRegistrationStripeReturnDeps;
102864
102810
  var init_useEventRegistrationStripeReturn = __esmMin((() => {
102865
102811
  init_usePaymentVerification();
102866
102812
  init_shared();
102813
+ init_constants();
102867
102814
  init_sessionStorage();
102868
102815
  init_ticketSelectionLines();
102816
+ eventRegistrationStripeReturnDeps = {
102817
+ usePaymentVerification,
102818
+ consumeSearchParam,
102819
+ scrollToBlock,
102820
+ cleanupStaleRegistrations,
102821
+ clearPendingRegistration,
102822
+ getPendingRegistration
102823
+ };
102869
102824
  }));
102870
102825
  //#endregion
102871
102826
  //#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.ts
@@ -102957,13 +102912,7 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
102957
102912
  if (!result.alreadyRegistered && result.status === "confirmed" && result.pendingPayment && (method === "stripe" || method === "pass_bundle" || method === "membership_bundle")) {
102958
102913
  options.setPendingAttendeeId(result.attendeeId);
102959
102914
  options.setStep("redirecting");
102960
- const currentUrl = new URL(window.location.href);
102961
- const successParams = new URLSearchParams(currentUrl.search);
102962
- successParams.set("registration", "success");
102963
- const successUrl = `${currentUrl.origin}${currentUrl.pathname}?${successParams.toString()}${currentUrl.hash}`;
102964
- const cancelParams = new URLSearchParams(currentUrl.search);
102965
- cancelParams.set("registration", "cancelled");
102966
- const cancelUrl = `${currentUrl.origin}${currentUrl.pathname}?${cancelParams.toString()}${currentUrl.hash}`;
102915
+ const { successUrl, cancelUrl } = buildCheckoutReturnUrls("registration", EVENT_REGISTRATION_ANCHOR_ID);
102967
102916
  const checkoutType = method === "pass_bundle" ? "pass_bundle" : method === "membership_bundle" ? "membership_bundle" : "event";
102968
102917
  const checkoutResult = await options.api.createEventCheckout({
102969
102918
  attendeeId: result.attendeeId,
@@ -103028,6 +102977,8 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
103028
102977
  }
103029
102978
  var eventRegistrationSubmitDeps;
103030
102979
  var init_useEventRegistrationSubmit = __esmMin((() => {
102980
+ init_shared();
102981
+ init_constants();
103031
102982
  init_sessionStorage();
103032
102983
  init_ticketSelectionLines();
103033
102984
  eventRegistrationSubmitDeps = { savePendingRegistration };
@@ -106429,6 +106380,7 @@ var init_LeafletStaticMap = __esmMin((() => {
106429
106380
  function toEventDetailsClientProps(props) {
106430
106381
  return {
106431
106382
  occurrenceContext: props.occurrenceContext,
106383
+ subject: props.subject,
106432
106384
  events: props.events ? [...props.events] : props.events,
106433
106385
  showVenue: props.showVenue,
106434
106386
  showMap: props.showMap,
@@ -106444,10 +106396,11 @@ function toEventDetailsClientProps(props) {
106444
106396
  nowIso: props.nowIso
106445
106397
  };
106446
106398
  }
106447
- function EventDetailsClient({ occurrenceContext, events, showVenue = true, showMap = true, showOtherDates = true, otherDatesLimit, showCost = true, showAcceptedPasses = true, showAcceptedMemberships = true, sitePasses, siteMemberships, autoApplyDiscount, className, nowIso, children }) {
106399
+ function EventDetailsClient({ occurrenceContext, subject, events, showVenue = true, showMap = true, showOtherDates = true, otherDatesLimit, showCost = true, showAcceptedPasses = true, showAcceptedMemberships = true, sitePasses, siteMemberships, autoApplyDiscount, className, nowIso, children }) {
106448
106400
  const selection = selectEventDetails({
106449
106401
  events: events ?? null,
106450
106402
  occurrenceContext: occurrenceContext ?? null,
106403
+ subject,
106451
106404
  nowIso: nowIso ?? (/* @__PURE__ */ new Date()).toISOString(),
106452
106405
  otherDatesLimit
106453
106406
  });
@@ -116128,6 +116081,10 @@ var init_event_details = __esmMin((() => {
116128
116081
  from: "$root.occurrenceContext",
116129
116082
  fallback: null
116130
116083
  } },
116084
+ subject: { $bind: {
116085
+ from: "$root.subject",
116086
+ fallback: null
116087
+ } },
116131
116088
  events: { $bind: { from: "data.eventDetailsData.events" } },
116132
116089
  showVenue: { $bind: { from: "content.showVenue" } },
116133
116090
  showMap: { $bind: { from: "content.showMap" } },
@@ -116196,6 +116153,7 @@ var init_non_block_islands = __esmMin((() => {
116196
116153
  init_shop_shared();
116197
116154
  init_schemas();
116198
116155
  init_event_details();
116156
+ init_eventScope();
116199
116157
  accordionIslandSchema = z$1.object({
116200
116158
  type: z$1.enum(["single", "multiple"]).optional(),
116201
116159
  defaultValue: z$1.union([z$1.string(), z$1.array(z$1.string())]).optional(),
@@ -116237,6 +116195,7 @@ var init_non_block_islands = __esmMin((() => {
116237
116195
  });
116238
116196
  eventDetailsIslandSchema = z$1.object({
116239
116197
  occurrenceContext: eventDetailsOccurrenceContextSchema.nullable().optional(),
116198
+ subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
116240
116199
  events: z$1.array(publicEventSchema).nullable().optional(),
116241
116200
  showVenue: z$1.boolean().optional(),
116242
116201
  showMap: z$1.boolean().optional(),