@riverbankcms/sdk 0.72.0 → 0.75.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 +1 -1
- package/dist/{PreviewEditorSidebar-44T64SAR.mjs → PreviewEditorSidebar-U2IHCBYN.mjs} +3 -3
- package/dist/{PreviewEditorUI-4WKHZTXW.mjs → PreviewEditorUI-ZGH2RQNP.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-MTUGBTLQ.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +10 -10
- package/dist/_dts/api/src/cache-tags.d.ts +22 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +1 -0
- package/dist/_dts/api/src/endpoints.d.ts +24 -24
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +2 -1
- package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +4 -1
- package/dist/_dts/blocks/src/client/booking-form.d.ts +2 -0
- package/dist/_dts/blocks/src/client/carousel.d.ts +1 -0
- package/dist/_dts/blocks/src/client/course-registration.d.ts +2 -0
- package/dist/_dts/blocks/src/client/events.d.ts +4 -0
- package/dist/_dts/blocks/src/client/form.d.ts +2 -0
- package/dist/_dts/blocks/src/client/header.d.ts +1 -0
- package/dist/_dts/blocks/src/client/location-map.d.ts +1 -0
- package/dist/_dts/blocks/src/client/newsletter-form.d.ts +2 -0
- package/dist/_dts/blocks/src/client/shop.d.ts +6 -0
- package/dist/_dts/blocks/src/lib/video.d.ts +2 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +21 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +6 -6
- package/dist/_dts/blocks/src/system/node/fragments/backgroundLayer.d.ts +15 -1
- package/dist/_dts/blocks/src/system/node/fragments/styledSection.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/header/enhanceHeaderSection.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/index.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/header-section.client.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/header-section.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/media.d.ts +6 -0
- package/dist/_dts/content-editor/src/hooks/validateBlocksForPublish.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/preview/SiteChromeEditableSurface.d.ts +12 -2
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/islands/deferredVideoEmbeds.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/accordion.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/bookingForm.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/carousel.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/cart.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/checkout.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/courseRegistration.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/eventCalendar.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/eventCombined.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/eventDetails.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/eventListing.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/eventRegistration.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/form.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/headerSection.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/locationMap.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/newsletterForm.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/productDetail.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/productList.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/shop.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/hydrateBlocksIslands.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/islands/propsDecoder.d.ts +7 -0
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +9 -0
- package/dist/_dts/sdk/src/rendering/server.d.ts +3 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/accordions/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +7 -7
- package/dist/_dts/theme-core/src/buttons/types.d.ts +20 -20
- package/dist/_dts/theme-core/src/cards/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/navDropdownSizing.d.ts +7 -0
- package/dist/_dts/theme-core/src/inputs/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/interactive/baseSchema.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +156 -156
- package/dist/_dts/theme-core/src/navigation/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +4 -4
- package/dist/_dts/theme-core/src/schema.d.ts +178 -178
- package/dist/_dts/theme-core/src/shared/componentStyles.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +8 -8
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +5 -5
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +2 -2
- package/dist/{chunk-G4NLITC2.mjs → chunk-BGMNDF6T.mjs} +7 -7
- package/dist/{chunk-3YNCQG5N.mjs → chunk-GFE74WRD.mjs} +457 -98
- package/dist/{chunk-HV745JYE.mjs → chunk-RWXQBRQZ.mjs} +1 -1
- package/dist/{chunk-7RX72SK2.mjs → chunk-VX7B5VAC.mjs} +36 -25
- package/dist/{chunk-YRJKZEQ3.mjs → chunk-Z7JLNTJR.mjs} +1 -1
- package/dist/{chunk-KWQPAJYS.mjs → chunk-ZSHFGFUG.mjs} +2 -2
- package/dist/cli/index.mjs +3498 -3826
- package/dist/client/accordion-T2UD2ZTH.mjs +120 -0
- package/dist/client/altcha-LIGLPZS5.mjs +2755 -0
- package/dist/client/bookingForm-GUP75FKN.mjs +3022 -0
- package/dist/client/bookings.mjs +32 -10
- package/dist/client/carousel-2NQA6V57.mjs +47 -0
- package/dist/client/cart-5TFIAFDS.mjs +18 -0
- package/dist/client/checkout-TP4WAHZE.mjs +18 -0
- package/dist/client/chunk-2PHQZ666.mjs +383 -0
- package/dist/client/chunk-3DCJ45Z2.mjs +36 -0
- package/dist/client/chunk-3PEDD5KJ.mjs +146 -0
- package/dist/client/chunk-CY2ZTSE5.mjs +204 -0
- package/dist/client/chunk-F7LHOKEH.mjs +146 -0
- package/dist/client/chunk-FU2QRZMX.mjs +7617 -0
- package/dist/client/chunk-I2MMZO53.mjs +6 -0
- package/dist/client/chunk-II7O4XN3.mjs +2206 -0
- package/dist/client/chunk-M3L3KYYR.mjs +1181 -0
- package/dist/client/chunk-N7PBWBWQ.mjs +26 -0
- package/dist/client/chunk-NWOUL6JY.mjs +1378 -0
- package/dist/client/chunk-OJPZEZU2.mjs +31 -0
- package/dist/client/chunk-PMAIXMAB.mjs +1960 -0
- package/dist/client/chunk-RTZ3JKKX.mjs +178 -0
- package/dist/client/chunk-TQ5MSPDX.mjs +74 -0
- package/dist/client/chunk-VUAOE3AG.mjs +5592 -0
- package/dist/client/chunk-WJXXNDSE.mjs +245 -0
- package/dist/client/chunk-YLMKMCSJ.mjs +86 -0
- package/dist/client/chunk-ZLMS67RR.mjs +106 -0
- package/dist/client/client.mjs +51865 -52071
- package/dist/client/courseRegistration-5DPU6PDY.mjs +1737 -0
- package/dist/client/eventCalendar-F3GZGTEF.mjs +40 -0
- package/dist/client/eventCombined-BQOB6QMY.mjs +37 -0
- package/dist/client/eventDetails-PEM2EJWE.mjs +25 -0
- package/dist/client/eventListing-YMIQPVME.mjs +40 -0
- package/dist/client/eventRegistration-4I6ZNDUF.mjs +40 -0
- package/dist/client/form-ZJVAYZ6G.mjs +300 -0
- package/dist/client/headerSection-TOT5MGTF.mjs +729 -0
- package/dist/client/hooks.mjs +91 -42
- package/dist/client/locationMap-J66NZREU.mjs +227 -0
- package/dist/client/newsletterForm-ET2XUMRO.mjs +208 -0
- package/dist/client/productDetail-C2XIH7C5.mjs +18 -0
- package/dist/client/productList-T2AZLFTP.mjs +18 -0
- package/dist/client/rendering/client.mjs +12796 -18295
- package/dist/client/rendering/islands.mjs +108 -44022
- package/dist/client/rendering.mjs +45141 -45346
- package/dist/client/shop-UZ6IUZXD.mjs +20 -0
- package/dist/preview-next/before-render.mjs +37 -25
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/middleware.mjs +37 -25
- package/dist/{sdk-runtime-NGDWSWOS.mjs → sdk-runtime-JCUQM63Y.mjs} +6 -6
- package/dist/server/components.mjs +472 -276
- package/dist/server/config-validation.mjs +91 -42
- package/dist/server/config.mjs +91 -42
- package/dist/server/data.mjs +91 -42
- package/dist/server/index.mjs +45 -33
- package/dist/server/next.mjs +468 -272
- package/dist/server/page-converter.mjs +41 -17
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +556 -275
- package/dist/server/rendering.mjs +474 -278
- package/dist/server/routing.mjs +99 -43
- package/dist/server/server.mjs +92 -43
- package/dist/server/theme-bridge.mjs +29 -0
- package/dist/styles/index.css +16 -0
- package/package.json +2 -1
- package/dist/SdkPreviewModeRuntime-FO6V7YVY.mjs +0 -8
package/dist/client/hooks.mjs
CHANGED
|
@@ -37,6 +37,18 @@ var TAG_TEMPLATES = {
|
|
|
37
37
|
siteForms: "riverbank:site:{siteId}:forms",
|
|
38
38
|
formById: "riverbank:form:{formId}",
|
|
39
39
|
formSubmissionsBySlug: "riverbank:form-submissions:{slug}",
|
|
40
|
+
// Public data loaders
|
|
41
|
+
publicEvents: "riverbank:site:{siteId}:public-events",
|
|
42
|
+
publicEventFilters: "riverbank:site:{siteId}:public-event-filters",
|
|
43
|
+
publicCourses: "riverbank:site:{siteId}:public-courses",
|
|
44
|
+
publicTeamMembers: "riverbank:site:{siteId}:public-team-members",
|
|
45
|
+
publicProducts: "riverbank:site:{siteId}:public-products",
|
|
46
|
+
publicPasses: "riverbank:site:{siteId}:public-passes",
|
|
47
|
+
publicMemberships: "riverbank:site:{siteId}:public-memberships",
|
|
48
|
+
publicGifting: "riverbank:site:{siteId}:public-gifting",
|
|
49
|
+
publicShop: "riverbank:site:{siteId}:public-shop",
|
|
50
|
+
publicCheckout: "riverbank:site:{siteId}:public-checkout",
|
|
51
|
+
publicBookingServices: "riverbank:site:{siteId}:public-booking-services",
|
|
40
52
|
// Navigation
|
|
41
53
|
siteNavigation: "riverbank:site:{siteId}:navigation",
|
|
42
54
|
navigationMenuById: "riverbank:navigation-menu:{menuId}",
|
|
@@ -3723,7 +3735,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3723
3735
|
path: "/public/sites/{siteId}/events",
|
|
3724
3736
|
method: "GET",
|
|
3725
3737
|
revalidate: 60,
|
|
3726
|
-
tags: [
|
|
3738
|
+
tags: [TAG_TEMPLATES.publicEvents],
|
|
3727
3739
|
auth: "public",
|
|
3728
3740
|
responseKind: "json"
|
|
3729
3741
|
},
|
|
@@ -3732,7 +3744,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3732
3744
|
path: "/public/sites/{siteId}/events/filters",
|
|
3733
3745
|
method: "GET",
|
|
3734
3746
|
revalidate: 60,
|
|
3735
|
-
tags: [
|
|
3747
|
+
tags: [TAG_TEMPLATES.publicEventFilters],
|
|
3736
3748
|
auth: "public",
|
|
3737
3749
|
responseKind: "json"
|
|
3738
3750
|
},
|
|
@@ -3741,7 +3753,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3741
3753
|
path: "/public/sites/{siteId}/courses",
|
|
3742
3754
|
method: "GET",
|
|
3743
3755
|
revalidate: 60,
|
|
3744
|
-
tags: [
|
|
3756
|
+
tags: [TAG_TEMPLATES.publicCourses],
|
|
3745
3757
|
auth: "public",
|
|
3746
3758
|
responseKind: "json"
|
|
3747
3759
|
},
|
|
@@ -3749,7 +3761,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3749
3761
|
path: "/public/sites/{siteId}/team-members",
|
|
3750
3762
|
method: "GET",
|
|
3751
3763
|
revalidate: 60,
|
|
3752
|
-
tags: [
|
|
3764
|
+
tags: [TAG_TEMPLATES.publicTeamMembers],
|
|
3753
3765
|
errors: [],
|
|
3754
3766
|
auth: "public",
|
|
3755
3767
|
responseKind: "json"
|
|
@@ -3758,21 +3770,21 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3758
3770
|
path: "/public/sites/{siteId}/courses/{courseId}",
|
|
3759
3771
|
method: "GET",
|
|
3760
3772
|
revalidate: 60,
|
|
3761
|
-
tags: [
|
|
3773
|
+
tags: [TAG_TEMPLATES.publicCourses],
|
|
3762
3774
|
auth: "public",
|
|
3763
3775
|
responseKind: "json"
|
|
3764
3776
|
},
|
|
3765
3777
|
enrollInCourse: {
|
|
3766
3778
|
path: "/public/sites/{siteId}/courses/enroll",
|
|
3767
3779
|
method: "POST",
|
|
3768
|
-
tags: [
|
|
3780
|
+
tags: [TAG_TEMPLATES.publicCourses, "course-enrollment"],
|
|
3769
3781
|
auth: "public",
|
|
3770
3782
|
responseKind: "json"
|
|
3771
3783
|
},
|
|
3772
3784
|
checkCourseEligibility: {
|
|
3773
3785
|
path: "/public/sites/{siteId}/courses/check-eligibility",
|
|
3774
3786
|
method: "POST",
|
|
3775
|
-
tags: [
|
|
3787
|
+
tags: [TAG_TEMPLATES.publicCourses, "course-enrollment"],
|
|
3776
3788
|
auth: "public",
|
|
3777
3789
|
responseKind: "json"
|
|
3778
3790
|
},
|
|
@@ -3780,8 +3792,8 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3780
3792
|
path: "/public/sites/{siteId}/waitlists/claim/resolve",
|
|
3781
3793
|
method: "POST",
|
|
3782
3794
|
tags: [
|
|
3783
|
-
|
|
3784
|
-
|
|
3795
|
+
TAG_TEMPLATES.publicCourses,
|
|
3796
|
+
TAG_TEMPLATES.publicEvents,
|
|
3785
3797
|
"waitlist-claims"
|
|
3786
3798
|
],
|
|
3787
3799
|
auth: "public",
|
|
@@ -3796,7 +3808,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3796
3808
|
createCourseCheckout: {
|
|
3797
3809
|
path: "/public/sites/{siteId}/courses/checkout",
|
|
3798
3810
|
method: "POST",
|
|
3799
|
-
tags: [
|
|
3811
|
+
tags: [TAG_TEMPLATES.publicCourses, "course-checkout"],
|
|
3800
3812
|
auth: "public",
|
|
3801
3813
|
responseKind: "json",
|
|
3802
3814
|
errors: [
|
|
@@ -3810,7 +3822,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3810
3822
|
getCourseRegistrationStatus: {
|
|
3811
3823
|
path: "/public/sites/{siteId}/courses/registration-status",
|
|
3812
3824
|
method: "GET",
|
|
3813
|
-
tags: [
|
|
3825
|
+
tags: [TAG_TEMPLATES.publicCourses, "course-checkout"],
|
|
3814
3826
|
auth: "public",
|
|
3815
3827
|
responseKind: "json"
|
|
3816
3828
|
},
|
|
@@ -3819,7 +3831,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3819
3831
|
path: "/public/sites/{siteId}/bookings/products/passes",
|
|
3820
3832
|
method: "GET",
|
|
3821
3833
|
revalidate: 300,
|
|
3822
|
-
tags: [
|
|
3834
|
+
tags: [TAG_TEMPLATES.publicPasses],
|
|
3823
3835
|
auth: "public",
|
|
3824
3836
|
responseKind: "json"
|
|
3825
3837
|
},
|
|
@@ -3828,7 +3840,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3828
3840
|
path: "/public/sites/{siteId}/bookings/products/memberships",
|
|
3829
3841
|
method: "GET",
|
|
3830
3842
|
revalidate: 300,
|
|
3831
|
-
tags: [
|
|
3843
|
+
tags: [TAG_TEMPLATES.publicMemberships],
|
|
3832
3844
|
auth: "public",
|
|
3833
3845
|
responseKind: "json"
|
|
3834
3846
|
},
|
|
@@ -3837,7 +3849,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3837
3849
|
path: "/public/sites/{siteId}/products",
|
|
3838
3850
|
method: "GET",
|
|
3839
3851
|
revalidate: 300,
|
|
3840
|
-
tags: [
|
|
3852
|
+
tags: [TAG_TEMPLATES.publicProducts],
|
|
3841
3853
|
errors: [],
|
|
3842
3854
|
auth: "public",
|
|
3843
3855
|
responseKind: "json"
|
|
@@ -3846,7 +3858,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3846
3858
|
path: "/public/sites/{siteId}/gifting/offers",
|
|
3847
3859
|
method: "GET",
|
|
3848
3860
|
revalidate: 300,
|
|
3849
|
-
tags: [
|
|
3861
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
3850
3862
|
errors: [],
|
|
3851
3863
|
auth: "public",
|
|
3852
3864
|
responseKind: "json"
|
|
@@ -3854,7 +3866,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3854
3866
|
createPublicGiftingCheckout: {
|
|
3855
3867
|
path: "/public/sites/{siteId}/gifting/checkout",
|
|
3856
3868
|
method: "POST",
|
|
3857
|
-
tags: [
|
|
3869
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
3858
3870
|
errors: [],
|
|
3859
3871
|
auth: "public",
|
|
3860
3872
|
responseKind: "json"
|
|
@@ -3862,7 +3874,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3862
3874
|
claimGiftCardPublic: {
|
|
3863
3875
|
path: "/public/sites/{siteId}/gifting/claim",
|
|
3864
3876
|
method: "POST",
|
|
3865
|
-
tags: [
|
|
3877
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
3866
3878
|
errors: [],
|
|
3867
3879
|
auth: "public",
|
|
3868
3880
|
responseKind: "json"
|
|
@@ -3870,14 +3882,14 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3870
3882
|
createShopCheckout: {
|
|
3871
3883
|
path: "/public/sites/{siteId}/bookings/checkout",
|
|
3872
3884
|
method: "POST",
|
|
3873
|
-
tags: [
|
|
3885
|
+
tags: [TAG_TEMPLATES.publicShop, "shop-checkout"],
|
|
3874
3886
|
auth: "public",
|
|
3875
3887
|
responseKind: "json"
|
|
3876
3888
|
},
|
|
3877
3889
|
createUnifiedCheckout: {
|
|
3878
3890
|
path: "/public/sites/{siteId}/checkout",
|
|
3879
3891
|
method: "POST",
|
|
3880
|
-
tags: [
|
|
3892
|
+
tags: [TAG_TEMPLATES.publicCheckout],
|
|
3881
3893
|
auth: "public",
|
|
3882
3894
|
responseKind: "json",
|
|
3883
3895
|
errors: [
|
|
@@ -3916,7 +3928,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3916
3928
|
path: "/public/sites/{siteId}/events/occurrences/resolve",
|
|
3917
3929
|
method: "GET",
|
|
3918
3930
|
revalidate: 60,
|
|
3919
|
-
tags: [
|
|
3931
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-occurrence"],
|
|
3920
3932
|
auth: "public",
|
|
3921
3933
|
responseKind: "json"
|
|
3922
3934
|
},
|
|
@@ -3924,7 +3936,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3924
3936
|
registerForEvent: {
|
|
3925
3937
|
path: "/public/sites/{siteId}/events/register",
|
|
3926
3938
|
method: "POST",
|
|
3927
|
-
tags: [
|
|
3939
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-registration"],
|
|
3928
3940
|
auth: "public",
|
|
3929
3941
|
responseKind: "json"
|
|
3930
3942
|
},
|
|
@@ -3932,7 +3944,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3932
3944
|
createPublicEventCheckout: {
|
|
3933
3945
|
path: "/public/sites/{siteId}/events/checkout",
|
|
3934
3946
|
method: "POST",
|
|
3935
|
-
tags: [
|
|
3947
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-checkout"],
|
|
3936
3948
|
auth: "public",
|
|
3937
3949
|
responseKind: "json"
|
|
3938
3950
|
},
|
|
@@ -3940,7 +3952,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3940
3952
|
checkPublicEventEligibility: {
|
|
3941
3953
|
path: "/public/sites/{siteId}/events/check-eligibility",
|
|
3942
3954
|
method: "POST",
|
|
3943
|
-
tags: [
|
|
3955
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-eligibility"],
|
|
3944
3956
|
auth: "public",
|
|
3945
3957
|
responseKind: "json"
|
|
3946
3958
|
},
|
|
@@ -3948,7 +3960,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3948
3960
|
getPublicEventRegistrationStatus: {
|
|
3949
3961
|
path: "/public/sites/{siteId}/events/registration-status",
|
|
3950
3962
|
method: "GET",
|
|
3951
|
-
tags: [
|
|
3963
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-registration"],
|
|
3952
3964
|
auth: "public",
|
|
3953
3965
|
responseKind: "json"
|
|
3954
3966
|
},
|
|
@@ -3956,7 +3968,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3956
3968
|
getPublicEventTicketQrSvg: {
|
|
3957
3969
|
path: "/public/sites/{siteId}/events/tickets/qr",
|
|
3958
3970
|
method: "GET",
|
|
3959
|
-
tags: [
|
|
3971
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-ticket-qr"],
|
|
3960
3972
|
auth: "public",
|
|
3961
3973
|
responseKind: "text"
|
|
3962
3974
|
},
|
|
@@ -12762,7 +12774,9 @@ function backgroundLayer(path, options = {}) {
|
|
|
12762
12774
|
imageClassName,
|
|
12763
12775
|
overlayClassName = "background-overlay rb-absolute rb-inset-0 rb-z-neg-10 rb-h-full rb-w-full rb-pointer-events-none",
|
|
12764
12776
|
fallbackToken,
|
|
12765
|
-
omitImageLayer = false
|
|
12777
|
+
omitImageLayer = false,
|
|
12778
|
+
imageLoading,
|
|
12779
|
+
imageFetchPriority
|
|
12766
12780
|
} = options;
|
|
12767
12781
|
const styleLayer = el("div", {
|
|
12768
12782
|
className: styleClassName,
|
|
@@ -12778,11 +12792,14 @@ function backgroundLayer(path, options = {}) {
|
|
|
12778
12792
|
}
|
|
12779
12793
|
}
|
|
12780
12794
|
});
|
|
12781
|
-
const imageLayer = createBackgroundImageNode(path, imageClassName
|
|
12795
|
+
const imageLayer = createBackgroundImageNode(path, imageClassName, {
|
|
12796
|
+
loading: imageLoading,
|
|
12797
|
+
fetchPriority: imageFetchPriority
|
|
12798
|
+
});
|
|
12782
12799
|
const overlayLayer = createBackgroundOverlayNode(path, overlayClassName);
|
|
12783
12800
|
return omitImageLayer ? [styleLayer, overlayLayer] : [styleLayer, imageLayer, overlayLayer];
|
|
12784
12801
|
}
|
|
12785
|
-
function createBackgroundImageNode(path, baseClassName = "rb-absolute rb-z-neg-10") {
|
|
12802
|
+
function createBackgroundImageNode(path, baseClassName = "rb-absolute rb-z-neg-10", options = {}) {
|
|
12786
12803
|
const imagePath = `${path}.image`;
|
|
12787
12804
|
return media(
|
|
12788
12805
|
{
|
|
@@ -12803,7 +12820,9 @@ function createBackgroundImageNode(path, baseClassName = "rb-absolute rb-z-neg-1
|
|
|
12803
12820
|
transforms: [{ id: "background.resolveImageStyle" }]
|
|
12804
12821
|
}
|
|
12805
12822
|
},
|
|
12806
|
-
videoPlayback: "background"
|
|
12823
|
+
videoPlayback: "background",
|
|
12824
|
+
...options.loading ? { loading: options.loading } : {},
|
|
12825
|
+
...options.fetchPriority ? { fetchPriority: options.fetchPriority } : {}
|
|
12807
12826
|
},
|
|
12808
12827
|
when(imagePath),
|
|
12809
12828
|
bind(imagePath)
|
|
@@ -13000,12 +13019,16 @@ function styledSection(config) {
|
|
|
13000
13019
|
bindFrom = "_sectionStyles",
|
|
13001
13020
|
imageClassName = "rb-absolute rb-z-neg-10",
|
|
13002
13021
|
renderBackgroundImage = true,
|
|
13022
|
+
backgroundImageLoading,
|
|
13023
|
+
backgroundImageFetchPriority,
|
|
13003
13024
|
fullWidthPath
|
|
13004
13025
|
} = config;
|
|
13005
13026
|
const renderedBackgroundNodes = backgroundLayer(`${bindFrom}.background`, {
|
|
13006
13027
|
imageClassName,
|
|
13007
13028
|
fallbackToken: background,
|
|
13008
|
-
omitImageLayer: !renderBackgroundImage
|
|
13029
|
+
omitImageLayer: !renderBackgroundImage,
|
|
13030
|
+
imageLoading: backgroundImageLoading,
|
|
13031
|
+
imageFetchPriority: backgroundImageFetchPriority
|
|
13009
13032
|
});
|
|
13010
13033
|
const childrenArray = Array.isArray(children) ? children : [children];
|
|
13011
13034
|
return section(
|
|
@@ -13220,7 +13243,7 @@ function navRow(opts) {
|
|
|
13220
13243
|
el(
|
|
13221
13244
|
"div",
|
|
13222
13245
|
{
|
|
13223
|
-
className: "nav-dropdown-menu rb-absolute rb-left-0 rb-top-full rb-z-50 rb-hidden rb-
|
|
13246
|
+
className: "nav-dropdown-menu rb-absolute rb-left-0 rb-top-full rb-z-50 rb-hidden rb-overflow-hidden",
|
|
13224
13247
|
id: dropdownMenuId
|
|
13225
13248
|
},
|
|
13226
13249
|
[dropdownLinks]
|
|
@@ -16703,6 +16726,10 @@ var heroCopyAndCta = composeFragments([
|
|
|
16703
16726
|
{ fragment: heroCopyFragment },
|
|
16704
16727
|
{ fragment: heroCtaRowFragment }
|
|
16705
16728
|
]);
|
|
16729
|
+
var heroPriorityMediaProps = {
|
|
16730
|
+
loading: "eager",
|
|
16731
|
+
fetchPriority: "high"
|
|
16732
|
+
};
|
|
16706
16733
|
var heroContentNodes = heroCopyAndCta.layout;
|
|
16707
16734
|
function heroContentCard(children, gap) {
|
|
16708
16735
|
return styledContainer({
|
|
@@ -16765,7 +16792,8 @@ function heroSplitImagePane() {
|
|
|
16765
16792
|
[
|
|
16766
16793
|
media(
|
|
16767
16794
|
{
|
|
16768
|
-
className: "rb-absolute rb-inset-0 rb-h-full rb-w-full rb-object-cover"
|
|
16795
|
+
className: "rb-absolute rb-inset-0 rb-h-full rb-w-full rb-object-cover",
|
|
16796
|
+
...heroPriorityMediaProps
|
|
16769
16797
|
},
|
|
16770
16798
|
when("_sectionStyles.background.image"),
|
|
16771
16799
|
bind("_sectionStyles.background.image")
|
|
@@ -16776,13 +16804,17 @@ function heroSplitImagePane() {
|
|
|
16776
16804
|
var classicLayout = styledSection({
|
|
16777
16805
|
children: heroContainerStack(heroContentNodes, "md"),
|
|
16778
16806
|
// styledContainer (rb-container) already provides horizontal padding
|
|
16779
|
-
baseClass: ""
|
|
16807
|
+
baseClass: "",
|
|
16808
|
+
backgroundImageLoading: heroPriorityMediaProps.loading,
|
|
16809
|
+
backgroundImageFetchPriority: heroPriorityMediaProps.fetchPriority
|
|
16780
16810
|
});
|
|
16781
16811
|
var microLayout = styledSection({
|
|
16782
16812
|
children: heroContainerStack(heroContentNodes, "sm"),
|
|
16783
16813
|
// styledContainer (rb-container) already provides horizontal padding
|
|
16784
16814
|
baseClass: "",
|
|
16785
|
-
spacing: "compact"
|
|
16815
|
+
spacing: "compact",
|
|
16816
|
+
backgroundImageLoading: heroPriorityMediaProps.loading,
|
|
16817
|
+
backgroundImageFetchPriority: heroPriorityMediaProps.fetchPriority
|
|
16786
16818
|
});
|
|
16787
16819
|
function splitLayoutWith(children) {
|
|
16788
16820
|
return styledSection({
|
|
@@ -21122,7 +21154,7 @@ var cardStylingFields = [
|
|
|
21122
21154
|
description: "Text for the event action button",
|
|
21123
21155
|
required: false,
|
|
21124
21156
|
multiline: false,
|
|
21125
|
-
defaultValue: "
|
|
21157
|
+
defaultValue: "Book now",
|
|
21126
21158
|
maxLength: 40
|
|
21127
21159
|
}
|
|
21128
21160
|
];
|
|
@@ -21621,6 +21653,7 @@ var eventRegistrationBlockDefinition = {
|
|
|
21621
21653
|
limit: "50",
|
|
21622
21654
|
// Get more events for selection
|
|
21623
21655
|
stage: { $bind: { from: "$root.previewStage", fallback: "published" } },
|
|
21656
|
+
readProfile: "registration",
|
|
21624
21657
|
// When rendering on an event content entry page, scope the list to that entry so
|
|
21625
21658
|
// the wizard always includes the current event (and avoids stale cached "all events" responses).
|
|
21626
21659
|
entryId: { $bind: { from: "$root.contentEntry._entryId", fallback: "" } }
|
|
@@ -22421,7 +22454,7 @@ var eventSpotlightLayout = [
|
|
|
22421
22454
|
columns: { $bind: { from: "content.columns", fallback: "3" } },
|
|
22422
22455
|
cardVariant: { $bind: { from: "content.cardVariant", fallback: "default" } },
|
|
22423
22456
|
buttonVariant: { $bind: { from: "content.buttonVariant", fallback: "primary" } },
|
|
22424
|
-
buttonText: { $bind: { from: "content.buttonText", fallback: "
|
|
22457
|
+
buttonText: { $bind: { from: "content.buttonText", fallback: "Book now" } },
|
|
22425
22458
|
ctaLabel: { $bind: { from: "content.ctaLabel" } },
|
|
22426
22459
|
ctaUrl: { $bind: { from: "content.ctaUrl", transforms: [{ id: "links.resolve" }] } },
|
|
22427
22460
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
@@ -22465,7 +22498,8 @@ var eventSpotlightBlockDefinition = {
|
|
|
22465
22498
|
siteId: { $bind: { from: "$root.siteId" } },
|
|
22466
22499
|
limit: { $bind: { from: "content.maxEvents", fallback: "3" } },
|
|
22467
22500
|
stage: { $bind: { from: "$root.previewStage", fallback: "published" } },
|
|
22468
|
-
detailLevel: "listing"
|
|
22501
|
+
detailLevel: "listing",
|
|
22502
|
+
readProfile: "spotlight"
|
|
22469
22503
|
},
|
|
22470
22504
|
mode: "server"
|
|
22471
22505
|
}
|
|
@@ -22483,7 +22517,7 @@ var COLUMN_CLASSES = {
|
|
|
22483
22517
|
};
|
|
22484
22518
|
function getContainerClass(layout, columns) {
|
|
22485
22519
|
if (layout === "compact") {
|
|
22486
|
-
return "rb-flex rb-flex-col rb-gap-2";
|
|
22520
|
+
return "event-listing-compact-container rb-flex rb-flex-col rb-gap-2";
|
|
22487
22521
|
}
|
|
22488
22522
|
if (layout === "stack") {
|
|
22489
22523
|
return "rb-flex rb-flex-col rb-gap-6";
|
|
@@ -22687,7 +22721,7 @@ var eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
22687
22721
|
containerClass: getContainerClass(layout, source.columns ?? "3"),
|
|
22688
22722
|
cardVariant: source.cardVariant ?? "default",
|
|
22689
22723
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
22690
|
-
buttonText: source.buttonText ?? "
|
|
22724
|
+
buttonText: source.buttonText ?? "Book now",
|
|
22691
22725
|
showVenue: source.showVenue ?? true,
|
|
22692
22726
|
showMap: source.showMap ?? true,
|
|
22693
22727
|
showCapacity: source.showCapacity ?? true,
|
|
@@ -22922,7 +22956,7 @@ var eventListingLayout = [
|
|
|
22922
22956
|
loadMoreText: { $bind: { from: "content.loadMoreText", fallback: "Load more events" } },
|
|
22923
22957
|
cardVariant: { $bind: { from: "content.cardVariant", fallback: "default" } },
|
|
22924
22958
|
buttonVariant: { $bind: { from: "content.buttonVariant", fallback: "primary" } },
|
|
22925
|
-
buttonText: { $bind: { from: "content.buttonText", fallback: "
|
|
22959
|
+
buttonText: { $bind: { from: "content.buttonText", fallback: "Book now" } },
|
|
22926
22960
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
22927
22961
|
showMap: { $bind: { from: "content.showMap" } },
|
|
22928
22962
|
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
@@ -23000,6 +23034,7 @@ var eventListingBlockDefinition = {
|
|
|
23000
23034
|
limit: { $bind: { from: "content.eventsPerPage", fallback: "12" } },
|
|
23001
23035
|
stage: { $bind: { from: "$root.previewStage", fallback: "published" } },
|
|
23002
23036
|
detailLevel: "listing",
|
|
23037
|
+
readProfile: { $bind: { from: "content.layout", fallback: "listing-card" } },
|
|
23003
23038
|
kind: { $bind: { from: "content.kind" } },
|
|
23004
23039
|
eventSurface: { $bind: { from: "content.eventSurface" } },
|
|
23005
23040
|
eventPresets: {
|
|
@@ -23139,7 +23174,7 @@ function buildEventCalendarDisplay(source) {
|
|
|
23139
23174
|
),
|
|
23140
23175
|
filterVenueId: normalizeEventVenueId(source.filterVenueId),
|
|
23141
23176
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
23142
|
-
buttonText: source.buttonText ?? "
|
|
23177
|
+
buttonText: source.buttonText ?? "Book now",
|
|
23143
23178
|
showVenue: source.showVenue ?? true,
|
|
23144
23179
|
showMap: source.showMap ?? true,
|
|
23145
23180
|
showCapacity: source.showCapacity ?? true,
|
|
@@ -23295,7 +23330,7 @@ var eventCalendarLayout = [
|
|
|
23295
23330
|
$bind: { from: "content.buttonVariant", fallback: "primary" }
|
|
23296
23331
|
},
|
|
23297
23332
|
buttonText: {
|
|
23298
|
-
$bind: { from: "content.buttonText", fallback: "
|
|
23333
|
+
$bind: { from: "content.buttonText", fallback: "Book now" }
|
|
23299
23334
|
},
|
|
23300
23335
|
emptyMessage: { $bind: { from: "content.emptyMessage" } }
|
|
23301
23336
|
})
|
|
@@ -23756,6 +23791,7 @@ var eventCalendarBlockDefinition = {
|
|
|
23756
23791
|
limit: 100,
|
|
23757
23792
|
stage: { $bind: { from: "$root.previewStage", fallback: "published" } },
|
|
23758
23793
|
detailLevel: "listing",
|
|
23794
|
+
readProfile: { $bind: { from: "content.variant", fallback: "listing-card" } },
|
|
23759
23795
|
// Pass filter params if configured
|
|
23760
23796
|
kind: { $bind: { from: "content.kind" } },
|
|
23761
23797
|
eventSurface: { $bind: { from: "content.eventSurface" } },
|
|
@@ -28906,6 +28942,19 @@ var NAV_LINK_PRESETS = {
|
|
|
28906
28942
|
};
|
|
28907
28943
|
var NAV_LINK_PRESET_IDS = Object.keys(NAV_LINK_PRESETS);
|
|
28908
28944
|
|
|
28945
|
+
// ../theme-core/src/header/navDropdownSizing.ts
|
|
28946
|
+
var NAV_DROPDOWN_MIN_WIDTH_REM = 12;
|
|
28947
|
+
var NAV_DROPDOWN_MAX_WIDTH_REM = 22;
|
|
28948
|
+
var NAV_DROPDOWN_VIEWPORT_GUTTER_REM = 1;
|
|
28949
|
+
var NAV_DROPDOWN_SHIFT_PROPERTY = "--nav-dropdown-shift-x";
|
|
28950
|
+
var NAV_DROPDOWN_MAX_WIDTH_CSS = `min(${NAV_DROPDOWN_MAX_WIDTH_REM}rem, calc(100vw - ${NAV_DROPDOWN_VIEWPORT_GUTTER_REM * 2}rem))`;
|
|
28951
|
+
var NAV_DROPDOWN_CONTAINER_RAIL_CSS_RULES = [
|
|
28952
|
+
`min-width: ${NAV_DROPDOWN_MIN_WIDTH_REM}rem;`,
|
|
28953
|
+
`width: max-content;`,
|
|
28954
|
+
`max-width: ${NAV_DROPDOWN_MAX_WIDTH_CSS};`,
|
|
28955
|
+
`transform: translateX(var(${NAV_DROPDOWN_SHIFT_PROPERTY}, 0px));`
|
|
28956
|
+
];
|
|
28957
|
+
|
|
28909
28958
|
// ../theme-core/src/layout/generateLayoutCss.ts
|
|
28910
28959
|
var waveTransitionMask = svgDataUrl(
|
|
28911
28960
|
"<svg viewBox='0 0 1440 72' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0 72V46C130 55 260 24 420 30C590 36 690 62 860 42C1035 21 1160 47 1305 36C1365 31 1415 33 1440 38V72H0Z' fill='white'/></svg>"
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { LeafletStaticMap } from './chunk-F7LHOKEH.mjs';
|
|
2
|
+
import './chunk-I2MMZO53.mjs';
|
|
3
|
+
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
4
|
+
import { defineIslandPropsDecoder } from './chunk-FU2QRZMX.mjs';
|
|
5
|
+
import { normalizeLocationAddressText, toLocationCoordinates, textColorStyle, mergeStyles, borderColorStyle, backgroundColorStyle } from './chunk-PMAIXMAB.mjs';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
// ../blocks/src/system/runtime/nodes/location-map.shared.ts
|
|
9
|
+
var LOCATION_MAP_DEFAULTS = {
|
|
10
|
+
zoom: 15,
|
|
11
|
+
heightPx: 320,
|
|
12
|
+
showAddressText: true,
|
|
13
|
+
showDirections: true,
|
|
14
|
+
directionsLabel: "Get directions"
|
|
15
|
+
};
|
|
16
|
+
var LOCATION_MAP_LIMITS = {
|
|
17
|
+
zoom: { min: 3, max: 18 },
|
|
18
|
+
heightPx: { min: 200, max: 600 }
|
|
19
|
+
};
|
|
20
|
+
function normalizeNumber(value, fallback) {
|
|
21
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
if (typeof value === "string") {
|
|
25
|
+
const parsed = Number.parseFloat(value);
|
|
26
|
+
if (Number.isFinite(parsed)) {
|
|
27
|
+
return parsed;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return fallback;
|
|
31
|
+
}
|
|
32
|
+
function normalizeOptionalNumber(value) {
|
|
33
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
36
|
+
if (typeof value === "string") {
|
|
37
|
+
const parsed = Number.parseFloat(value);
|
|
38
|
+
if (Number.isFinite(parsed)) {
|
|
39
|
+
return parsed;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
function normalizeBoolean(value, fallback) {
|
|
45
|
+
if (typeof value === "boolean") {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
if (typeof value === "string") {
|
|
49
|
+
if (value === "true") return true;
|
|
50
|
+
if (value === "false") return false;
|
|
51
|
+
}
|
|
52
|
+
return fallback;
|
|
53
|
+
}
|
|
54
|
+
function normalizeLocationMapValueRecord(record) {
|
|
55
|
+
const addressText = typeof record.addressText === "string" ? record.addressText : typeof record.displayAddress === "string" ? record.displayAddress : null;
|
|
56
|
+
const normalized = {
|
|
57
|
+
addressText: normalizeLocationAddressText(addressText),
|
|
58
|
+
lat: normalizeOptionalNumber(record.lat),
|
|
59
|
+
lng: normalizeOptionalNumber(record.lng)
|
|
60
|
+
};
|
|
61
|
+
if (normalized.addressText === null && normalized.lat === null && normalized.lng === null) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return normalized;
|
|
65
|
+
}
|
|
66
|
+
function normalizeLocationMapValue(value) {
|
|
67
|
+
if (typeof value !== "object" || value === null) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
return normalizeLocationMapValueRecord(value);
|
|
71
|
+
}
|
|
72
|
+
function normalizeLocationMapSource(value) {
|
|
73
|
+
return value === "business_address" || value === "venue" ? value : "custom";
|
|
74
|
+
}
|
|
75
|
+
function resolveLocationMapLocation(input) {
|
|
76
|
+
const source = normalizeLocationMapSource(input.locationSource);
|
|
77
|
+
if (source === "business_address") {
|
|
78
|
+
const locationValue2 = normalizeLocationMapValue(input.businessAddress ?? input.location);
|
|
79
|
+
return locationValue2 ? { kind: "business_address", locationValue: locationValue2 } : { kind: "unresolved", source, reason: "missing_business_address" };
|
|
80
|
+
}
|
|
81
|
+
if (source === "venue") {
|
|
82
|
+
const venueId = typeof input.venueId === "string" && input.venueId.trim() ? input.venueId.trim() : null;
|
|
83
|
+
if (!venueId) {
|
|
84
|
+
return { kind: "unresolved", source, reason: "missing_venue_id" };
|
|
85
|
+
}
|
|
86
|
+
const locationValue2 = input.venuesById ? normalizeLocationMapValue(input.venuesById[venueId] ?? null) : null;
|
|
87
|
+
return locationValue2 ? { kind: "venue", venueId, locationValue: locationValue2 } : { kind: "unresolved", source, reason: "missing_venue_location" };
|
|
88
|
+
}
|
|
89
|
+
const locationValue = normalizeLocationMapValue(input.location);
|
|
90
|
+
return locationValue ? { kind: "custom", locationValue } : { kind: "unresolved", source, reason: "missing_custom_location" };
|
|
91
|
+
}
|
|
92
|
+
function describeUnresolvedLocationMapLocation(resolvedLocation) {
|
|
93
|
+
if (resolvedLocation.kind !== "unresolved") {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
switch (resolvedLocation.reason) {
|
|
97
|
+
case "missing_business_address":
|
|
98
|
+
return "Business address details are not configured yet.";
|
|
99
|
+
case "missing_venue_id":
|
|
100
|
+
return "Choose a venue to show this map.";
|
|
101
|
+
case "missing_venue_location":
|
|
102
|
+
return "The selected venue does not have location details yet.";
|
|
103
|
+
case "missing_custom_location":
|
|
104
|
+
return "Location details coming soon.";
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function normalizeLocationMapProps(input) {
|
|
108
|
+
const resolvedLocation = resolveLocationMapLocation(input);
|
|
109
|
+
const locationValue = resolvedLocation.kind === "unresolved" ? null : resolvedLocation.locationValue;
|
|
110
|
+
const directionsLabel = normalizeLocationAddressText(input.directionsLabel) ?? LOCATION_MAP_DEFAULTS.directionsLabel;
|
|
111
|
+
return {
|
|
112
|
+
resolvedLocation,
|
|
113
|
+
locationValue,
|
|
114
|
+
unresolvedMessage: describeUnresolvedLocationMapLocation(resolvedLocation),
|
|
115
|
+
addressText: locationValue?.addressText ?? null,
|
|
116
|
+
location: toLocationCoordinates(locationValue),
|
|
117
|
+
zoom: Math.min(
|
|
118
|
+
LOCATION_MAP_LIMITS.zoom.max,
|
|
119
|
+
Math.max(
|
|
120
|
+
LOCATION_MAP_LIMITS.zoom.min,
|
|
121
|
+
Math.round(normalizeNumber(input.zoom, LOCATION_MAP_DEFAULTS.zoom))
|
|
122
|
+
)
|
|
123
|
+
),
|
|
124
|
+
heightPx: Math.min(
|
|
125
|
+
LOCATION_MAP_LIMITS.heightPx.max,
|
|
126
|
+
Math.max(
|
|
127
|
+
LOCATION_MAP_LIMITS.heightPx.min,
|
|
128
|
+
Math.round(normalizeNumber(input.heightPx, LOCATION_MAP_DEFAULTS.heightPx))
|
|
129
|
+
)
|
|
130
|
+
),
|
|
131
|
+
showAddressText: normalizeBoolean(input.showAddressText, LOCATION_MAP_DEFAULTS.showAddressText),
|
|
132
|
+
showDirections: normalizeBoolean(input.showDirections, LOCATION_MAP_DEFAULTS.showDirections),
|
|
133
|
+
directionsLabel,
|
|
134
|
+
className: typeof input.className === "string" ? input.className : null
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
function buildGoogleMapsDirectionsUrl(input) {
|
|
138
|
+
const destination = input.location ? `${input.location.lat},${input.location.lng}` : normalizeLocationAddressText(input.addressText);
|
|
139
|
+
if (!destination) {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
const url = new URL("https://www.google.com/maps/dir/");
|
|
143
|
+
url.searchParams.set("api", "1");
|
|
144
|
+
url.searchParams.set("destination", destination);
|
|
145
|
+
return url.toString();
|
|
146
|
+
}
|
|
147
|
+
function LocationMapView({
|
|
148
|
+
addressText,
|
|
149
|
+
location,
|
|
150
|
+
zoom,
|
|
151
|
+
heightPx,
|
|
152
|
+
showAddressText,
|
|
153
|
+
showDirections,
|
|
154
|
+
directionsLabel,
|
|
155
|
+
unresolvedMessage,
|
|
156
|
+
renderMap
|
|
157
|
+
}) {
|
|
158
|
+
const directionsUrl = buildGoogleMapsDirectionsUrl({ addressText, location });
|
|
159
|
+
if (!location && !addressText && !directionsUrl) {
|
|
160
|
+
return /* @__PURE__ */ jsx("p", { className: "rb-caption", style: textColorStyle("mutedText"), children: unresolvedMessage ?? "Location details coming soon." });
|
|
161
|
+
}
|
|
162
|
+
return /* @__PURE__ */ jsxs("div", { className: "rb-flex rb-flex-col rb-gap-4 rb-text-left", children: [
|
|
163
|
+
location && renderMap ? renderMap({
|
|
164
|
+
addressText,
|
|
165
|
+
location,
|
|
166
|
+
className: "rb-location-map-canvas",
|
|
167
|
+
height: heightPx,
|
|
168
|
+
zoom
|
|
169
|
+
}) : null,
|
|
170
|
+
showAddressText && addressText ? /* @__PURE__ */ jsx("p", { className: "rb-caption", style: textColorStyle("mutedText"), children: addressText }) : null,
|
|
171
|
+
showDirections && directionsUrl ? /* @__PURE__ */ jsx(
|
|
172
|
+
"a",
|
|
173
|
+
{
|
|
174
|
+
href: directionsUrl,
|
|
175
|
+
target: "_blank",
|
|
176
|
+
rel: "noreferrer",
|
|
177
|
+
className: "rb-inline-flex rb-w-fit rb-items-center rb-justify-center rb-rounded-md rb-border rb-px-4 rb-py-2 rb-text-sm rb-font-medium rb-no-underline transition-theme-standard rb-hover-opacity-90",
|
|
178
|
+
style: mergeStyles(
|
|
179
|
+
borderColorStyle("border"),
|
|
180
|
+
backgroundColorStyle("surface"),
|
|
181
|
+
textColorStyle("text")
|
|
182
|
+
),
|
|
183
|
+
children: directionsLabel
|
|
184
|
+
}
|
|
185
|
+
) : null
|
|
186
|
+
] });
|
|
187
|
+
}
|
|
188
|
+
function LocationMapClient(props) {
|
|
189
|
+
const normalized = normalizeLocationMapProps(props);
|
|
190
|
+
return /* @__PURE__ */ jsxs("div", { className: `location-map ${normalized.className ?? ""}`.trim(), "data-block": "location-map", children: [
|
|
191
|
+
/* @__PURE__ */ jsx(
|
|
192
|
+
LocationMapView,
|
|
193
|
+
{
|
|
194
|
+
addressText: normalized.addressText,
|
|
195
|
+
location: normalized.location,
|
|
196
|
+
zoom: normalized.zoom,
|
|
197
|
+
heightPx: normalized.heightPx,
|
|
198
|
+
showAddressText: normalized.showAddressText,
|
|
199
|
+
showDirections: normalized.showDirections,
|
|
200
|
+
directionsLabel: normalized.directionsLabel,
|
|
201
|
+
unresolvedMessage: normalized.unresolvedMessage,
|
|
202
|
+
renderMap: ({ addressText, className, height, location, zoom }) => /* @__PURE__ */ jsx(
|
|
203
|
+
LeafletStaticMap,
|
|
204
|
+
{
|
|
205
|
+
location,
|
|
206
|
+
label: addressText ?? void 0,
|
|
207
|
+
className,
|
|
208
|
+
height,
|
|
209
|
+
zoom
|
|
210
|
+
}
|
|
211
|
+
)
|
|
212
|
+
}
|
|
213
|
+
),
|
|
214
|
+
props.children
|
|
215
|
+
] });
|
|
216
|
+
}
|
|
217
|
+
function LocationMapIslandClient(props) {
|
|
218
|
+
return /* @__PURE__ */ jsx(LocationMapClient, { ...props });
|
|
219
|
+
}
|
|
220
|
+
var decode = defineIslandPropsDecoder("location-map");
|
|
221
|
+
var enhance = (root, props) => {
|
|
222
|
+
return mountReactIsland(root, ({ root: reactRoot }) => {
|
|
223
|
+
reactRoot.render(/* @__PURE__ */ jsx(LocationMapIslandClient, { ...props }));
|
|
224
|
+
});
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
export { decode, enhance };
|