@riverbankcms/sdk 0.129.1 → 0.130.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.
- package/README.md +32 -10
- package/dist/{PreviewEditorSidebar-DceRseRV.mjs → PreviewEditorSidebar-DiEpbOdw.mjs} +313 -239
- package/dist/{PreviewEditorUI-BNunq3kk.mjs → PreviewEditorUI-C6MvxnIa.mjs} +3 -3
- package/dist/{PreviewQueryProvider-B1kbhaJD.mjs → PreviewQueryProvider-C2rnoPz6.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-Bt87-62u.mjs → SdkPreviewModeRuntime-DRXA_m5L.mjs} +208 -211
- package/dist/{SiteChromeCustomizeContext-BLl-OlL4.mjs → SiteChromeCustomizeContext-BTHdv5_-.mjs} +6204 -6239
- package/dist/_dts/ai/src/contracts/proposalPrimitives.d.ts +52 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +4950 -29100
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +32572 -0
- package/dist/_dts/api/src/appointmentSetup.d.ts +21 -9
- package/dist/_dts/api/src/bookingConfig.d.ts +4 -46
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +13 -11
- package/dist/_dts/api/src/bookingRecords.d.ts +1 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +3 -5
- package/dist/_dts/api/src/endpoints.d.ts +14 -21
- package/dist/_dts/api/src/eventManagementContracts.d.ts +76 -0
- package/dist/_dts/api/src/index.d.ts +3 -2
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +22 -47
- package/dist/_dts/api/src/sdk-event-schedule.d.ts +5 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +112 -20
- package/dist/_dts/api/src/sdkContracts.d.ts +38 -66
- package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +35 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +2423 -501
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +5 -0
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +23 -37
- package/dist/_dts/blocks/src/contracts/index.d.ts +2 -0
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +6 -8
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +36 -14
- package/dist/_dts/blocks/src/index.d.ts +5 -3
- package/dist/_dts/blocks/src/lib/media.d.ts +9 -539
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +3 -2
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +135 -90
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +37 -4
- package/dist/_dts/blocks/src/system/blocks/site-footer-nav-groups-layout.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +3 -0
- package/dist/_dts/blocks/src/system/componentFactory.d.ts +5 -5
- package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +8 -6
- package/dist/_dts/blocks/src/system/customize/serializeBackgroundOverride.d.ts +3 -0
- package/dist/_dts/blocks/src/system/fields/background.d.ts +2 -20
- package/dist/_dts/blocks/src/system/fields/backgroundContent.d.ts +17 -0
- package/dist/_dts/blocks/src/system/fields/backgroundContentAudit.d.ts +20 -0
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +5 -33
- package/dist/_dts/blocks/src/system/fragments/builder.d.ts +1 -0
- package/dist/_dts/blocks/src/system/fragments/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/helpers/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/helpers/resolveBackground.d.ts +10 -45
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +7 -4
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/writeCanonicalization.d.ts +4 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +123 -55
- package/dist/_dts/blocks/src/system/registry.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/shop.d.ts +2 -37
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +61 -24
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +30 -12
- package/dist/_dts/blocks/src/system/runtime/header/enhanceHeaderSection.d.ts +3 -5
- package/dist/_dts/blocks/src/system/runtime/header/headerScrollRuntime.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/header/runtimeContract.d.ts +22 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/commerce/shared/display.d.ts +9 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/commerce/shared/view.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/header-section.client.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/header-section.frame.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/header-section.server.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +41 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.pass-contract.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.state.d.ts +3 -3
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.d.ts +3 -1
- package/dist/_dts/blocks/src/system/transforms/registry/background.d.ts +1 -1
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +3 -1
- package/dist/_dts/blocks/src/system/transforms/registry/core.d.ts +4 -1
- package/dist/_dts/blocks/src/system/transforms/registry/headerRuntime.d.ts +3 -0
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +0 -3
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +41 -43
- package/dist/_dts/content-editor/src/FooterComposerOverview.d.ts +4 -2
- package/dist/_dts/content-editor/src/FooterComposerPanel.d.ts +2 -17
- package/dist/_dts/content-editor/src/FooterNavigationLayoutControl.d.ts +5 -0
- package/dist/_dts/content-editor/src/footerComposer.d.ts +2 -1
- package/dist/_dts/content-editor/src/footerComposerPanelTypes.d.ts +21 -0
- package/dist/_dts/content-editor/src/footerPreviewRuntime.d.ts +2 -1
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +11 -1
- package/dist/_dts/content-editor/src/useFooterNavigationLayout.d.ts +26 -0
- package/dist/_dts/content-model/src/templates/defaults.d.ts +7 -0
- package/dist/_dts/core/src/booking-date-time.d.ts +2 -2
- package/dist/_dts/core/src/booking-time-zone.d.ts +6 -0
- package/dist/_dts/core/src/footer-composition-types.d.ts +4 -4
- package/dist/_dts/core/src/footer-navigation-layout.d.ts +4 -0
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +38 -18
- package/dist/_dts/preview-next/src/client/preview/FooterSidebarDisclosure.d.ts +8 -0
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +5 -5
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +15 -17
- package/dist/_dts/preview-next/src/client/preview/PreviewFooterEditorPanel.d.ts +20 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +3 -5
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +3 -5
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +4 -4
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -5
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +6 -7
- package/dist/_dts/preview-next/src/client/preview/siteChromeBrandPreferences.d.ts +7 -7
- package/dist/_dts/preview-next/src/client/preview/siteChromeCustomizeTypes.d.ts +4 -4
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +12 -11
- package/dist/_dts/preview-next/src/client/preview/siteChromeSelectionRows.d.ts +53 -0
- package/dist/_dts/preview-next/src/client/preview/siteStyleAccess.d.ts +1 -6
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +6 -15
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +4 -6
- package/dist/_dts/sdk/src/config/types.d.ts +1 -0
- package/dist/_dts/sdk/src/config/validation.d.ts +2 -0
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +4 -41
- package/dist/_dts/sdk/src/next/catch-all-theme-admission.d.ts +23 -0
- package/dist/_dts/sdk/src/next/index.d.ts +8 -6
- package/dist/_dts/sdk/src/next/resolveTheme.d.ts +1 -2
- package/dist/_dts/sdk/src/next/types.d.ts +10 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +2 -16
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +5 -3
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +4 -2
- package/dist/_dts/sdk/src/rendering/index.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +6 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +11 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/blockOverrides.d.ts +1 -1
- package/dist/_dts/theme-core/src/boxBackgroundSchema.d.ts +184 -0
- package/dist/_dts/theme-core/src/buttons/buttonColourContract.d.ts +96 -0
- package/dist/_dts/theme-core/src/buttons/buttonSurfaceContext.d.ts +78 -0
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/parseThemeForPersistence.d.ts +2 -2
- package/dist/_dts/theme-core/src/buttons/resolveButtonColourStates.d.ts +9 -57
- package/dist/_dts/theme-core/src/buttons/resolvedButtonCss.d.ts +6 -3
- package/dist/_dts/theme-core/src/buttons/styles/domain.d.ts +8 -7
- package/dist/_dts/theme-core/src/buttons/styles/recipes/quietArrow.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/staticRecipes.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/styles/registry.d.ts +12 -0
- package/dist/_dts/theme-core/src/buttons/styles/selection.d.ts +5 -0
- package/dist/_dts/theme-core/src/buttons/types.d.ts +51 -4
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/lib/media.d.ts +583 -10
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +5117 -1433
- package/dist/_dts/theme-core/src/schema.d.ts +5079 -2005
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +6 -14
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +29 -102
- package/dist/_dts/theme-core/src/site-styles/customizableSurfaces.d.ts +3 -76
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/generatedDesignPipeline.d.ts +3 -7
- package/dist/_dts/theme-core/src/site-styles/generatedDesignPipelineHelpers.d.ts +17 -0
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/headerLayoutCatalog.d.ts +281 -0
- package/dist/_dts/theme-core/src/site-styles/headerLayoutResolution.d.ts +13 -0
- package/dist/_dts/theme-core/src/site-styles/headerLayoutStyles.d.ts +6 -0
- package/dist/_dts/theme-core/src/site-styles/{headerLookTypes.d.ts → headerLayoutTypes.d.ts} +16 -86
- package/dist/_dts/theme-core/src/site-styles/headerNavStyles.d.ts +6 -0
- package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +7 -4
- package/dist/_dts/theme-core/src/site-styles/headerOpeningSection.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/imageSurfaceBackground.d.ts +14 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +14 -41
- package/dist/_dts/theme-core/src/site-styles/runtimeBackgroundResolution.d.ts +23 -0
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +8 -6
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +1 -1
- package/dist/client/{CourseRegistrationWizard-xRmA7REV.mjs → CourseRegistrationWizard-Bvtz9G9g.mjs} +5 -5
- package/dist/client/{DiscountCodeDisclosure-B9vriL5C.mjs → DiscountCodeDisclosure-Ur-Xx1U_.mjs} +1 -1
- package/dist/client/{EventCombined.client-BgVnVTlz.mjs → EventCombined.client-EhscD4U6.mjs} +2 -2
- package/dist/client/{EventListing.client-CqdsO7jO.mjs → EventListing.client-Bn26cFTY.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-CKPxot9M.mjs → LeafletStaticMap-BUw9Ntzr.mjs} +1 -1
- package/dist/client/{StepIndicator-DGCYuBJ1.mjs → StepIndicator-BfbdiVQI.mjs} +2 -2
- package/dist/client/{accordion-BfN5Eqd-.mjs → accordion-CjIeof73.mjs} +1 -1
- package/dist/client/{bookingForm-DOvCpBFP.mjs → bookingForm-DwEeovf_.mjs} +5 -5
- package/dist/client/bookings.mjs +1028 -1038
- package/dist/client/{carousel-DPNmiH0f.mjs → carousel-BMrfgOba.mjs} +1 -1
- package/dist/client/{cart--egVXlrR.mjs → cart-rXEdxTdb.mjs} +3 -3
- package/dist/client/{checkout-DywWtMcq.mjs → checkout-D3JlSzh3.mjs} +3 -3
- package/dist/client/client.mjs +18345 -18311
- package/dist/client/{courseRegistration-Dk9qFVwt.mjs → courseRegistration-DO5XvMAA.mjs} +2 -2
- package/dist/client/{eventCalendar-Bkz2HjlS.mjs → eventCalendar-DO6rTqCn.mjs} +4 -4
- package/dist/client/{eventCombined-D4kipYWg.mjs → eventCombined-bJ3i_ovU.mjs} +2 -2
- package/dist/client/{eventDetails-Dz_5ix2Q.mjs → eventDetails-CCbrXE7o.mjs} +3 -3
- package/dist/client/{eventListing-D0vm-zST.mjs → eventListing-Bdlt9YTm.mjs} +2 -2
- package/dist/client/{eventRegistration-Cw1E4Q4p.mjs → eventRegistration-B02lt6iY.mjs} +6 -6
- package/dist/client/{form-C2Zf1n3K.mjs → form-DrUBAAox.mjs} +1 -1
- package/dist/client/{headerSection-CP05gzdc.mjs → headerSection-MzqvHL6T.mjs} +151 -104
- package/dist/client/hooks.mjs +4532 -4216
- package/dist/client/{locationMap-Cl3x9PYJ.mjs → locationMap-DG8BxTBm.mjs} +2 -2
- package/dist/client/{newsletterForm-DyEJoClm.mjs → newsletterForm-BzO-Td3p.mjs} +1 -1
- package/dist/client/{pricing-DGuNR1W4.mjs → pricing-NgK7ozkg.mjs} +1 -1
- package/dist/client/{productDetail-Cq-HrGew.mjs → productDetail-CfQ7rhVK.mjs} +3 -3
- package/dist/client/{productList-DbB3jwqd.mjs → productList-C23rOLUi.mjs} +3 -3
- package/dist/client/{propsDecoder-CiTuhUwY.mjs → propsDecoder-CAZdhwjs.mjs} +2166 -2157
- package/dist/client/rendering/client.mjs +3600 -4118
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +15950 -15890
- package/dist/client/{scrollToBlock-CShkRqab.mjs → scrollToBlock-DSSqVQr1.mjs} +1 -1
- package/dist/client/{shop-Cu4Ib-ZA.mjs → shop-BMToKLK7.mjs} +34 -23
- package/dist/client/{shop-commerce-BzpsOdh7.mjs → shop-commerce-DB4JRKmp.mjs} +4 -4
- package/dist/client/{shop-commerce-store-DaE7Fhj8.mjs → shop-commerce-store-BOqSIOuc.mjs} +1 -1
- package/dist/client/{shopShared-cF0c20vB.mjs → shopShared-B6SK9DZv.mjs} +9 -3
- package/dist/client/{useEventFilters-QZ3HMgaJ.mjs → useEventFilters-CULOa4nB.mjs} +2 -2
- package/dist/client/{usePolling-BKf0GcE-.mjs → usePolling-BGG_8-jl.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +16 -27
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +16 -27
- package/dist/{previewAuthStore-BesgU5Xu.mjs → previewAuthStore-_GXFRg2W.mjs} +16 -27
- package/dist/{sdk-runtime-C20CVWbb.mjs → sdk-runtime-hhSOMShR.mjs} +2 -2
- package/dist/{separator-BE3NCquy.mjs → separator-flRaFc14.mjs} +1 -1
- package/dist/server/components.mjs +17770 -17866
- package/dist/server/config-validation.mjs +4711 -4421
- package/dist/server/config.mjs +4715 -4425
- package/dist/server/data.mjs +4515 -4216
- package/dist/server/date-time.mjs +22 -13
- package/dist/server/index.mjs +17 -28
- package/dist/server/next.mjs +17586 -17650
- package/dist/server/page-converter.mjs +3759 -4390
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +18952 -19064
- package/dist/server/rendering.mjs +17824 -17901
- package/dist/server/routing.mjs +4748 -4365
- package/dist/server/server.mjs +4591 -4269
- package/dist/server/theme-bridge.mjs +1393 -1886
- package/dist/server/theme.mjs +736 -605
- package/dist/styles/index.css +22 -3
- package/package.json +1 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeLookRows.d.ts +0 -66
- package/dist/_dts/theme-core/src/site-styles/headerLayoutStyleCatalog.d.ts +0 -254
- package/dist/_dts/theme-core/src/site-styles/headerLegacyLooks.d.ts +0 -372
- package/dist/_dts/theme-core/src/site-styles/headerLookBranding.d.ts +0 -106
- package/dist/_dts/theme-core/src/site-styles/headerLookSelection.d.ts +0 -2
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +0 -7
- package/dist/_dts/theme-core/src/site-styles/headerStyleCompilerPrimitives.d.ts +0 -23
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-CAZdhwjs.mjs";
|
|
2
2
|
import { t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
|
|
3
|
-
import { o as CourseRegistrationErrorBoundary, t as CourseRegistrationWizard } from "./CourseRegistrationWizard-
|
|
3
|
+
import { o as CourseRegistrationErrorBoundary, t as CourseRegistrationWizard } from "./CourseRegistrationWizard-Bvtz9G9g.mjs";
|
|
4
4
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
5
5
|
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
|
|
6
6
|
import "react";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as clsx } from "./clsx-DgIEfj3H.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { o as EventFilters, t as useEventFilters } from "./useEventFilters-
|
|
5
|
-
import { a as CalendarDayCell, c as useCalendarEvents, d as getOrderedDayNames, f as getWeekCalendarDayTuple, h as isToday, i as WeekAgendaView, l as MONTH_NAMES, m as isSameLocalDay, o as EventModalProvider, p as getWeekCalendarDays, r as EventModals, s as useEventModal, t as EventCombinedClient, u as formatDateKey } from "./EventCombined.client-
|
|
3
|
+
import { B as groupEventsByDate, D as getEventRuntimeFiltersKey, E as buildEventRuntimeFilters, G as getEventAvailabilityStatus, H as resolveEventLinkProps, I as formatEventTeacherLine, K as getLocalDateKey, L as formatTime, W as getEventAvailability, Z as themeButtonClassName, q as getLocalMinuteOfDay, t as defineIslandPropsDecoder, w as buildEventCalendarListingRender } from "./propsDecoder-CAZdhwjs.mjs";
|
|
4
|
+
import { o as EventFilters, t as useEventFilters } from "./useEventFilters-CULOa4nB.mjs";
|
|
5
|
+
import { a as CalendarDayCell, c as useCalendarEvents, d as getOrderedDayNames, f as getWeekCalendarDayTuple, h as isToday, i as WeekAgendaView, l as MONTH_NAMES, m as isSameLocalDay, o as EventModalProvider, p as getWeekCalendarDays, r as EventModals, s as useEventModal, t as EventCombinedClient, u as formatDateKey } from "./EventCombined.client-EhscD4U6.mjs";
|
|
6
6
|
import { t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
|
|
7
7
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
8
8
|
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
|
|
9
|
-
import { n as EventListingController } from "./EventListing.client-
|
|
9
|
+
import { n as EventListingController } from "./EventListing.client-Bn26cFTY.mjs";
|
|
10
10
|
import { useEffect, useId, useMemo, useState } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region ../calendar/src/lane-packing.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
2
|
-
import { n as EventCombinedIslandClient } from "./EventCombined.client-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-CAZdhwjs.mjs";
|
|
2
|
+
import { n as EventCombinedIslandClient } from "./EventCombined.client-EhscD4U6.mjs";
|
|
3
3
|
import { t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
|
|
4
4
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
5
5
|
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as formatCoursePriceDisplay, r as resolveCoursePricingState, t as formatCoursePriceAmount } from "./pricing-
|
|
1
|
+
import { Bt as publicEventPricingCurrency, Gt as formatCurrencyAmount, H as resolveEventLinkProps, Ht as publicEventPricingType, It as toBookingTimeZone, Lt as toScheduledBookingDateTime, N as formatEventDateParts, Nt as getBookingLocalDateKey, P as formatEventPrice, U as resolveRuntimeEventPricing, X as resolveEventRegistrationScopedEvents, t as defineIslandPropsDecoder } from "./propsDecoder-CAZdhwjs.mjs";
|
|
2
|
+
import { n as formatCoursePriceDisplay, r as resolveCoursePricingState, t as formatCoursePriceAmount } from "./pricing-NgK7ozkg.mjs";
|
|
3
3
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
4
4
|
import { n as filterPassesForEvent, t as filterMembershipsForEvent } from "./eventProductEligibility-AVxyCB1u.mjs";
|
|
5
|
-
import { t as LeafletStaticMap } from "./LeafletStaticMap-
|
|
5
|
+
import { t as LeafletStaticMap } from "./LeafletStaticMap-BUw9Ntzr.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region ../blocks/src/system/runtime/nodes/event-details/logic.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-CAZdhwjs.mjs";
|
|
2
2
|
import { t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
|
|
3
3
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
4
4
|
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
|
|
5
|
-
import { t as EventListingClient } from "./EventListing.client-
|
|
5
|
+
import { t as EventListingClient } from "./EventListing.client-Bn26cFTY.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/rendering/islands/enhancers/eventListing.tsx
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as buildBookingPaymentSelectionViewModel, t as usePolling } from "./usePolling-
|
|
3
|
-
import {
|
|
2
|
+
import { n as buildBookingPaymentSelectionViewModel, t as usePolling } from "./usePolling-BGG_8-jl.mjs";
|
|
3
|
+
import { Bt as publicEventPricingCurrency, C as getWizardStepsForContext, F as formatEventPriceDisplay, Gt as formatCurrencyAmount, Ht as publicEventPricingType, It as toBookingTimeZone, Lt as toScheduledBookingDateTime, Ot as formatBookingDate, S as getStepNumber, U as resolveRuntimeEventPricing, Ut as publicEventScalarPrice, Vt as publicEventPricingMode, Wt as publicEventTicketTypes, X as resolveEventRegistrationScopedEvents, Z as themeButtonClassName, _ as findPreSelectedEvent, b as resolveRegistrationTarget, bt as assertNever, g as findEventByOccurrenceId, h as toRegistrationEvents, jt as formatBookingTime, kt as formatBookingDateTime, t as defineIslandPropsDecoder, v as resolveDiscountContext, x as WIZARD_STEPS, y as resolveEventRequiresPayment } from "./propsDecoder-CAZdhwjs.mjs";
|
|
4
4
|
import { n as useBlockApi, t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
|
|
5
5
|
import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
|
|
6
|
-
import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-
|
|
7
|
-
import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-
|
|
8
|
-
import { n as SpinnerNode, r as formatPrice, t as StepIndicator$1 } from "./StepIndicator-
|
|
6
|
+
import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-DSSqVQr1.mjs";
|
|
7
|
+
import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-Ur-Xx1U_.mjs";
|
|
8
|
+
import { n as SpinnerNode, r as formatPrice, t as StepIndicator$1 } from "./StepIndicator-BfbdiVQI.mjs";
|
|
9
9
|
import { t as FeedbackMessage } from "./FeedbackMessage-ByMrs3cr.mjs";
|
|
10
10
|
import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-AYanWFb-.mjs";
|
|
11
11
|
import { t as buildCheckoutReturnUrls } from "./checkoutUrls-Ct8Mxna3.mjs";
|
|
12
12
|
import { t as createBodyThemePortalRoot } from "./themePortalRoot-AGs4cE7t.mjs";
|
|
13
13
|
import { t as consumeSearchParam } from "./urlParams-D71VXFGx.mjs";
|
|
14
|
-
import { a as LoggedInAsUser, i as useWaitlistClaim, n as MagicLinkForm, o as CourseRegistrationErrorBoundary, r as logoutPortal, s as ClockIcon, t as CourseRegistrationWizard } from "./CourseRegistrationWizard-
|
|
14
|
+
import { a as LoggedInAsUser, i as useWaitlistClaim, n as MagicLinkForm, o as CourseRegistrationErrorBoundary, r as logoutPortal, s as ClockIcon, t as CourseRegistrationWizard } from "./CourseRegistrationWizard-Bvtz9G9g.mjs";
|
|
15
15
|
import { t as CrossIcon } from "./CrossIcon-Dn1KRKW5.mjs";
|
|
16
16
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
17
17
|
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as clsx } from "./clsx-DgIEfj3H.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { Ct as ok, St as err, Z as themeButtonClassName, bt as assertNever, t as defineIslandPropsDecoder } from "./propsDecoder-CAZdhwjs.mjs";
|
|
4
4
|
import { n as useBlockApi, t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
|
|
5
5
|
import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
|
|
6
6
|
import { t as FeedbackMessage } from "./FeedbackMessage-ByMrs3cr.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { T as staticHeaderChromeRuntime, Z as themeButtonClassName, r as buildCartDisplay, t as defineIslandPropsDecoder } from "./propsDecoder-CAZdhwjs.mjs";
|
|
3
3
|
import { t as resolveDedicatedCheckoutPath } from "./checkoutRoute-ClwHwYVA.mjs";
|
|
4
|
-
import { n as useCommerceCart } from "./shop-commerce-store-
|
|
4
|
+
import { n as useCommerceCart } from "./shop-commerce-store-BOqSIOuc.mjs";
|
|
5
5
|
import { t as ModalShell } from "./ModalShell-CqkBvBIC.mjs";
|
|
6
6
|
import * as React$1 from "react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -276,6 +276,153 @@ function mountHeaderCartRuntime(root, siteId, mounts) {
|
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
//#endregion
|
|
279
|
+
//#region ../blocks/src/system/runtime/header/headerScrollRuntime.ts
|
|
280
|
+
const SCROLL_ON_THRESHOLD_MIN_PX = 24;
|
|
281
|
+
const SCROLL_ON_THRESHOLD_MAX_PX = 96;
|
|
282
|
+
const SCROLL_ON_THRESHOLD_HEADER_RATIO = .25;
|
|
283
|
+
const SCROLL_TOP_EPSILON_PX = 1;
|
|
284
|
+
const SCROLL_SETTLE_MS = 360;
|
|
285
|
+
const HEADER_SCROLLED_CLASS = "header-scrolled";
|
|
286
|
+
function resolveScrollOnThreshold(target) {
|
|
287
|
+
const height = target.getBoundingClientRect().height;
|
|
288
|
+
if (!Number.isFinite(height) || height <= 0) return SCROLL_ON_THRESHOLD_MIN_PX;
|
|
289
|
+
return Math.max(SCROLL_ON_THRESHOLD_MIN_PX, Math.min(SCROLL_ON_THRESHOLD_MAX_PX, Math.round(height * SCROLL_ON_THRESHOLD_HEADER_RATIO)));
|
|
290
|
+
}
|
|
291
|
+
function getScrollContainer(element) {
|
|
292
|
+
let parent = element.parentElement;
|
|
293
|
+
while (parent && parent !== document.body) {
|
|
294
|
+
const style = getComputedStyle(parent);
|
|
295
|
+
const overflowY = style.overflowY || style.overflow;
|
|
296
|
+
if (/auto|scroll|overlay/.test(overflowY) && parent.scrollHeight > parent.clientHeight) return parent;
|
|
297
|
+
parent = parent.parentElement;
|
|
298
|
+
}
|
|
299
|
+
return document.scrollingElement || window;
|
|
300
|
+
}
|
|
301
|
+
function isRootScrollContainer(container) {
|
|
302
|
+
return container === window || container instanceof HTMLElement && (container === document.scrollingElement || container === document.documentElement || container === document.body);
|
|
303
|
+
}
|
|
304
|
+
function readRootScrollTop() {
|
|
305
|
+
if (typeof window.scrollY === "number" && Number.isFinite(window.scrollY)) return window.scrollY;
|
|
306
|
+
return document.scrollingElement?.scrollTop || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
307
|
+
}
|
|
308
|
+
function bindScrollContainer(target, onScroll) {
|
|
309
|
+
let container = getScrollContainer(target);
|
|
310
|
+
let eventTarget = isRootScrollContainer(container) ? window : container;
|
|
311
|
+
let discoveringLatePreviewContainer = false;
|
|
312
|
+
const stopDiscovery = () => {
|
|
313
|
+
if (!discoveringLatePreviewContainer) return;
|
|
314
|
+
document.removeEventListener("scroll", onPotentialContainerScroll, true);
|
|
315
|
+
discoveringLatePreviewContainer = false;
|
|
316
|
+
};
|
|
317
|
+
const setContainer = (next) => {
|
|
318
|
+
const nextEventTarget = isRootScrollContainer(next) ? window : next;
|
|
319
|
+
if (nextEventTarget !== eventTarget) {
|
|
320
|
+
eventTarget.removeEventListener("scroll", onScroll);
|
|
321
|
+
nextEventTarget.addEventListener("scroll", onScroll, { passive: true });
|
|
322
|
+
eventTarget = nextEventTarget;
|
|
323
|
+
}
|
|
324
|
+
container = next;
|
|
325
|
+
};
|
|
326
|
+
function onPotentialContainerScroll(event) {
|
|
327
|
+
const candidate = event.target;
|
|
328
|
+
if (!(candidate instanceof HTMLElement) || !candidate.contains(target)) return;
|
|
329
|
+
const resolved = getScrollContainer(target);
|
|
330
|
+
if (isRootScrollContainer(resolved)) return;
|
|
331
|
+
setContainer(resolved);
|
|
332
|
+
stopDiscovery();
|
|
333
|
+
onScroll();
|
|
334
|
+
}
|
|
335
|
+
const startDiscovery = () => {
|
|
336
|
+
if (discoveringLatePreviewContainer) return;
|
|
337
|
+
document.addEventListener("scroll", onPotentialContainerScroll, {
|
|
338
|
+
capture: true,
|
|
339
|
+
passive: true
|
|
340
|
+
});
|
|
341
|
+
discoveringLatePreviewContainer = true;
|
|
342
|
+
};
|
|
343
|
+
const onResize = () => {
|
|
344
|
+
const resolved = getScrollContainer(target);
|
|
345
|
+
setContainer(resolved);
|
|
346
|
+
if (isRootScrollContainer(resolved)) startDiscovery();
|
|
347
|
+
else stopDiscovery();
|
|
348
|
+
onScroll();
|
|
349
|
+
};
|
|
350
|
+
eventTarget.addEventListener("scroll", onScroll, { passive: true });
|
|
351
|
+
window.addEventListener("resize", onResize, { passive: true });
|
|
352
|
+
if (isRootScrollContainer(container)) startDiscovery();
|
|
353
|
+
return {
|
|
354
|
+
readScrollTop: () => isRootScrollContainer(container) ? readRootScrollTop() : container.scrollTop,
|
|
355
|
+
dispose: () => {
|
|
356
|
+
eventTarget.removeEventListener("scroll", onScroll);
|
|
357
|
+
window.removeEventListener("resize", onResize);
|
|
358
|
+
stopDiscovery();
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
function createScrollState(target, readScrollTop) {
|
|
363
|
+
const scrollOnThreshold = resolveScrollOnThreshold(target);
|
|
364
|
+
let lastScrolledAtMs = Number.NEGATIVE_INFINITY;
|
|
365
|
+
let unscrollTimeoutId = null;
|
|
366
|
+
const clearUnscrollTimeout = () => {
|
|
367
|
+
if (unscrollTimeoutId === null) return;
|
|
368
|
+
window.clearTimeout(unscrollTimeoutId);
|
|
369
|
+
unscrollTimeoutId = null;
|
|
370
|
+
};
|
|
371
|
+
const update = () => {
|
|
372
|
+
const scrollTop = Math.max(0, readScrollTop());
|
|
373
|
+
if (target.classList.contains(HEADER_SCROLLED_CLASS)) {
|
|
374
|
+
if (scrollTop > SCROLL_TOP_EPSILON_PX) {
|
|
375
|
+
clearUnscrollTimeout();
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
const remainingSettleMs = SCROLL_SETTLE_MS - ((window.performance?.now?.() ?? Date.now()) - lastScrolledAtMs);
|
|
379
|
+
if (remainingSettleMs > 0) {
|
|
380
|
+
if (unscrollTimeoutId === null) unscrollTimeoutId = window.setTimeout(() => {
|
|
381
|
+
unscrollTimeoutId = null;
|
|
382
|
+
update();
|
|
383
|
+
}, remainingSettleMs);
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
target.classList.remove(HEADER_SCROLLED_CLASS);
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
clearUnscrollTimeout();
|
|
390
|
+
if (scrollTop > scrollOnThreshold) {
|
|
391
|
+
target.classList.add(HEADER_SCROLLED_CLASS);
|
|
392
|
+
lastScrolledAtMs = window.performance?.now?.() ?? Date.now();
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
return {
|
|
396
|
+
update,
|
|
397
|
+
dispose: clearUnscrollTimeout
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
function enhanceHeaderScrollBehavior(target, runtime) {
|
|
401
|
+
if (runtime.kind === "none") return [];
|
|
402
|
+
let update = () => {};
|
|
403
|
+
let rafId = null;
|
|
404
|
+
let rafScheduled = false;
|
|
405
|
+
const scheduleUpdate = () => {
|
|
406
|
+
if (rafScheduled) return;
|
|
407
|
+
rafScheduled = true;
|
|
408
|
+
rafId = window.requestAnimationFrame(() => {
|
|
409
|
+
rafScheduled = false;
|
|
410
|
+
rafId = null;
|
|
411
|
+
update();
|
|
412
|
+
});
|
|
413
|
+
if (!rafScheduled) rafId = null;
|
|
414
|
+
};
|
|
415
|
+
const binding = bindScrollContainer(target, scheduleUpdate);
|
|
416
|
+
const state = createScrollState(target, binding.readScrollTop);
|
|
417
|
+
update = state.update;
|
|
418
|
+
update();
|
|
419
|
+
return [() => {
|
|
420
|
+
binding.dispose();
|
|
421
|
+
state.dispose();
|
|
422
|
+
if (rafId !== null) window.cancelAnimationFrame(rafId);
|
|
423
|
+
}];
|
|
424
|
+
}
|
|
425
|
+
//#endregion
|
|
279
426
|
//#region ../blocks/src/system/runtime/header/enhanceHeaderSection.ts
|
|
280
427
|
const SELECTORS = {
|
|
281
428
|
dropdown: ".nav-dropdown",
|
|
@@ -292,8 +439,6 @@ const SELECTORS = {
|
|
|
292
439
|
};
|
|
293
440
|
const CLASSES = {
|
|
294
441
|
hidden: "rb-hidden",
|
|
295
|
-
headerShrink: "rb-header-shrink",
|
|
296
|
-
headerScrolled: "header-scrolled",
|
|
297
442
|
mobileOpen: "nav-mobile-open"
|
|
298
443
|
};
|
|
299
444
|
const FOCUSABLE_SELECTOR = "a[href], button:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
@@ -570,104 +715,6 @@ function enhanceCartMounts(root) {
|
|
|
570
715
|
if (cleanup) cleanups.push(cleanup);
|
|
571
716
|
return { cleanups };
|
|
572
717
|
}
|
|
573
|
-
const SCROLL_ON_THRESHOLD_MIN_PX = 24;
|
|
574
|
-
const SCROLL_ON_THRESHOLD_MAX_PX = 96;
|
|
575
|
-
const SCROLL_ON_THRESHOLD_HEADER_RATIO = .25;
|
|
576
|
-
const SCROLL_TOP_EPSILON_PX = 1;
|
|
577
|
-
const SCROLL_SETTLE_MS = 360;
|
|
578
|
-
function clampScrollThreshold(value) {
|
|
579
|
-
return Math.max(SCROLL_ON_THRESHOLD_MIN_PX, Math.min(SCROLL_ON_THRESHOLD_MAX_PX, value));
|
|
580
|
-
}
|
|
581
|
-
function resolveScrollOnThreshold(target) {
|
|
582
|
-
const height = target.getBoundingClientRect().height;
|
|
583
|
-
if (!Number.isFinite(height) || height <= 0) return SCROLL_ON_THRESHOLD_MIN_PX;
|
|
584
|
-
return clampScrollThreshold(Math.round(height * SCROLL_ON_THRESHOLD_HEADER_RATIO));
|
|
585
|
-
}
|
|
586
|
-
function nowMs() {
|
|
587
|
-
return window.performance?.now?.() ?? Date.now();
|
|
588
|
-
}
|
|
589
|
-
/**
|
|
590
|
-
* Find the nearest scrollable ancestor, or return window.
|
|
591
|
-
* This handles both published mode (window scrolls) and preview mode (container scrolls).
|
|
592
|
-
*/
|
|
593
|
-
function getScrollContainer(element) {
|
|
594
|
-
let parent = element.parentElement;
|
|
595
|
-
while (parent && parent !== document.body) {
|
|
596
|
-
const style = getComputedStyle(parent);
|
|
597
|
-
const overflowY = style.overflowY || style.overflow;
|
|
598
|
-
if (/auto|scroll|overlay/.test(overflowY)) {
|
|
599
|
-
if (parent.scrollHeight > parent.clientHeight) return parent;
|
|
600
|
-
}
|
|
601
|
-
parent = parent.parentElement;
|
|
602
|
-
}
|
|
603
|
-
return document.scrollingElement || window;
|
|
604
|
-
}
|
|
605
|
-
function getRootScrollTop() {
|
|
606
|
-
if (typeof window.scrollY === "number" && Number.isFinite(window.scrollY)) return window.scrollY;
|
|
607
|
-
const scrollingElement = document.scrollingElement;
|
|
608
|
-
if (scrollingElement) return scrollingElement.scrollTop;
|
|
609
|
-
return document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
610
|
-
}
|
|
611
|
-
function enhanceScrollBehavior(target, scrollEnabled) {
|
|
612
|
-
const cleanups = [];
|
|
613
|
-
if (!(typeof scrollEnabled === "boolean" ? scrollEnabled : target.classList.contains(CLASSES.headerShrink))) return cleanups;
|
|
614
|
-
const scrollContainer = getScrollContainer(target);
|
|
615
|
-
const isRootScroll = scrollContainer === window || scrollContainer instanceof HTMLElement && (scrollContainer === document.scrollingElement || scrollContainer === document.documentElement || scrollContainer === document.body);
|
|
616
|
-
const scrollEventTarget = isRootScroll ? window : scrollContainer;
|
|
617
|
-
const getScrollTop = () => isRootScroll ? getRootScrollTop() : scrollContainer.scrollTop;
|
|
618
|
-
const scrollOnThreshold = resolveScrollOnThreshold(target);
|
|
619
|
-
let lastScrolledAtMs = Number.NEGATIVE_INFINITY;
|
|
620
|
-
let unscrollTimeoutId = null;
|
|
621
|
-
const clearUnscrollTimeout = () => {
|
|
622
|
-
if (unscrollTimeoutId === null) return;
|
|
623
|
-
window.clearTimeout(unscrollTimeoutId);
|
|
624
|
-
unscrollTimeoutId = null;
|
|
625
|
-
};
|
|
626
|
-
const update = () => {
|
|
627
|
-
const scrollTop = Math.max(0, getScrollTop());
|
|
628
|
-
if (target.classList.contains(CLASSES.headerScrolled)) {
|
|
629
|
-
if (scrollTop > SCROLL_TOP_EPSILON_PX) {
|
|
630
|
-
clearUnscrollTimeout();
|
|
631
|
-
return;
|
|
632
|
-
}
|
|
633
|
-
const remainingSettleMs = SCROLL_SETTLE_MS - (nowMs() - lastScrolledAtMs);
|
|
634
|
-
if (remainingSettleMs > 0) {
|
|
635
|
-
if (unscrollTimeoutId === null) unscrollTimeoutId = window.setTimeout(() => {
|
|
636
|
-
unscrollTimeoutId = null;
|
|
637
|
-
update();
|
|
638
|
-
}, remainingSettleMs);
|
|
639
|
-
return;
|
|
640
|
-
}
|
|
641
|
-
target.classList.remove(CLASSES.headerScrolled);
|
|
642
|
-
return;
|
|
643
|
-
}
|
|
644
|
-
clearUnscrollTimeout();
|
|
645
|
-
if (scrollTop > scrollOnThreshold) {
|
|
646
|
-
target.classList.add(CLASSES.headerScrolled);
|
|
647
|
-
lastScrolledAtMs = nowMs();
|
|
648
|
-
}
|
|
649
|
-
};
|
|
650
|
-
let rafId = null;
|
|
651
|
-
let rafScheduled = false;
|
|
652
|
-
const onScroll = () => {
|
|
653
|
-
if (rafScheduled) return;
|
|
654
|
-
rafScheduled = true;
|
|
655
|
-
rafId = window.requestAnimationFrame(() => {
|
|
656
|
-
rafScheduled = false;
|
|
657
|
-
rafId = null;
|
|
658
|
-
update();
|
|
659
|
-
});
|
|
660
|
-
if (!rafScheduled) rafId = null;
|
|
661
|
-
};
|
|
662
|
-
update();
|
|
663
|
-
scrollEventTarget.addEventListener("scroll", onScroll, { passive: true });
|
|
664
|
-
cleanups.push(() => {
|
|
665
|
-
scrollEventTarget.removeEventListener("scroll", onScroll);
|
|
666
|
-
if (rafId !== null) window.cancelAnimationFrame(rafId);
|
|
667
|
-
clearUnscrollTimeout();
|
|
668
|
-
});
|
|
669
|
-
return cleanups;
|
|
670
|
-
}
|
|
671
718
|
/**
|
|
672
719
|
* Enhances a rendered site header section with:
|
|
673
720
|
* - Desktop dropdown ARIA state
|
|
@@ -687,7 +734,7 @@ function mountHeaderChromeRuntime(root, options = {}) {
|
|
|
687
734
|
const cartMounts = enhanceCartMounts(root);
|
|
688
735
|
cleanups.push(...cartMounts.cleanups);
|
|
689
736
|
const target = options.scrollTarget ?? getFirstNonScriptChild(root);
|
|
690
|
-
if (target) cleanups.push(...
|
|
737
|
+
if (target) cleanups.push(...enhanceHeaderScrollBehavior(target, (options.runtime ?? staticHeaderChromeRuntime).scroll));
|
|
691
738
|
if (cleanups.length === 0) {
|
|
692
739
|
delete root.dataset.rbHeaderEnhanced;
|
|
693
740
|
return { kind: "not-applicable" };
|
|
@@ -707,7 +754,7 @@ function mountHeaderChromeRuntime(root, options = {}) {
|
|
|
707
754
|
//#region src/rendering/islands/enhancers/headerSection.ts
|
|
708
755
|
const decode = defineIslandPropsDecoder("headerSection");
|
|
709
756
|
const enhance = (root, props) => {
|
|
710
|
-
const mount = mountHeaderChromeRuntime(root, {
|
|
757
|
+
const mount = mountHeaderChromeRuntime(root, { runtime: props.runtime });
|
|
711
758
|
return mount.kind === "mounted" ? mount.dispose : void 0;
|
|
712
759
|
};
|
|
713
760
|
//#endregion
|