@riverbankcms/sdk 0.60.6 → 0.60.7
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/dist/_dts/api/src/appointmentSetup.d.ts +2 -2
- package/dist/_dts/api/src/bookingConfig.d.ts +6 -0
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +45 -3
- package/dist/_dts/api/src/bookingOperations.d.ts +40 -3
- package/dist/_dts/api/src/courses.d.ts +1 -5
- package/dist/_dts/api/src/endpoints.d.ts +80 -1
- package/dist/_dts/api/src/index.d.ts +3 -2
- package/dist/_dts/api/src/navigation/contracts.d.ts +9 -9
- package/dist/_dts/api/src/public/endpoints.d.ts +1 -1
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +15 -1
- package/dist/_dts/api/src/resources.d.ts +1 -1
- package/dist/_dts/api/src/siteBanner.d.ts +8 -8
- package/dist/_dts/api/src/siteOnboarding.d.ts +1 -0
- package/dist/_dts/api/src/teamMembers.d.ts +27 -0
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +35 -29
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +1 -5
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +40 -34
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +1 -5
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/products/shared.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/shared/bookingPaymentTerms.d.ts +9 -9
- package/dist/_dts/blocks/src/system/blocks/shared/teamMembers.d.ts +24 -0
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +18 -8
- package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
- package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
- package/dist/_dts/blocks/src/system/data/utils.d.ts +1 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +201 -201
- package/dist/_dts/blocks/src/system/manifest/validation.d.ts +2 -2
- package/dist/_dts/blocks/src/system/node/schema.d.ts +5 -5
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +4 -4
- package/dist/_dts/blocks/src/system/transforms/registry/ui.d.ts +1 -1
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +3 -3
- package/dist/_dts/content-model/src/content-types/schema.d.ts +8 -8
- package/dist/_dts/content-model/src/metadataConfig.d.ts +1 -0
- package/dist/_dts/core/src/branded.d.ts +2 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +124 -8
- package/dist/_dts/db/src/schemas/forms.d.ts +61 -61
- package/dist/_dts/sdk/src/client/types.d.ts +9 -2
- package/dist/_dts/sdk/src/config/types.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +40 -37
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +17 -8
- package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +19 -19
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +87 -69
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -5
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/accordions/types.d.ts +11 -11
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +10 -10
- package/dist/_dts/theme-core/src/buttons/types.d.ts +27 -27
- package/dist/_dts/theme-core/src/cards/types.d.ts +17 -17
- package/dist/_dts/theme-core/src/inputs/types.d.ts +14 -14
- package/dist/_dts/theme-core/src/interactive/baseSchema.d.ts +2 -2
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +438 -438
- package/dist/_dts/theme-core/src/navigation/types.d.ts +16 -16
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +15 -15
- package/dist/_dts/theme-core/src/schema.d.ts +662 -662
- package/dist/_dts/theme-core/src/shared/componentStyles.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +15 -15
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +7 -7
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +5 -5
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/button-group.d.ts +1 -1
- package/dist/_dts/ui/src/button.d.ts +2 -2
- package/dist/_dts/ui/src/callout.d.ts +1 -1
- package/dist/_dts/ui/src/card.d.ts +1 -1
- package/dist/_dts/ui/src/surface.d.ts +2 -2
- package/dist/_dts/ui/src/toggle.d.ts +4 -4
- package/dist/cli/index.mjs +276 -24
- package/dist/client/client.mjs +607 -306
- package/dist/client/hooks.mjs +272 -23
- package/dist/client/rendering/client.mjs +179 -130
- package/dist/client/rendering/islands.mjs +68 -43
- package/dist/client/rendering.mjs +646 -363
- package/dist/preview-next/before-render.mjs +147 -1
- package/dist/preview-next/client/runtime.mjs +338 -43
- package/dist/preview-next/middleware.mjs +147 -1
- package/dist/server/components.mjs +727 -470
- package/dist/server/config-validation.mjs +488 -254
- package/dist/server/config.mjs +488 -254
- package/dist/server/data.mjs +272 -23
- package/dist/server/index.mjs +168 -2
- package/dist/server/next.mjs +476 -185
- package/dist/server/page-converter.mjs +335 -249
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +742 -469
- package/dist/server/rendering.mjs +742 -469
- package/dist/server/routing.mjs +274 -24
- package/dist/server/server.mjs +291 -24
- package/package.json +1 -1
|
@@ -8125,7 +8125,9 @@ var init_schemas = __esm({
|
|
|
8125
8125
|
courseTeamMemberSummarySchema = z8.object({
|
|
8126
8126
|
id: z8.string(),
|
|
8127
8127
|
name: z8.string(),
|
|
8128
|
-
|
|
8128
|
+
roleLabel: z8.string().nullable(),
|
|
8129
|
+
summary: z8.string().nullable(),
|
|
8130
|
+
profilePath: z8.string().nullable()
|
|
8129
8131
|
});
|
|
8130
8132
|
coursePricingOptionSchema = z8.object({
|
|
8131
8133
|
id: z8.string(),
|
|
@@ -8648,6 +8650,12 @@ var init_CoursePricingDisplay = __esm({
|
|
|
8648
8650
|
|
|
8649
8651
|
// ../blocks/src/system/runtime/nodes/event-details/view.tsx
|
|
8650
8652
|
import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
8653
|
+
function TeamMemberName({
|
|
8654
|
+
name,
|
|
8655
|
+
profilePath
|
|
8656
|
+
}) {
|
|
8657
|
+
return profilePath ? /* @__PURE__ */ jsx23("a", { href: profilePath, className: "rb-hover-opacity-80", children: /* @__PURE__ */ jsx23("strong", { children: name }) }) : /* @__PURE__ */ jsx23("strong", { children: name });
|
|
8658
|
+
}
|
|
8651
8659
|
function EventDetailsView({
|
|
8652
8660
|
selection,
|
|
8653
8661
|
showVenue,
|
|
@@ -8711,7 +8719,13 @@ function EventDetailsView({
|
|
|
8711
8719
|
teamMembers.length > 0 ? /* @__PURE__ */ jsxs9("div", { className: "rb-mt-6", children: [
|
|
8712
8720
|
/* @__PURE__ */ jsx23("div", { className: "rb-label rb-mb-2", children: "Team members" }),
|
|
8713
8721
|
/* @__PURE__ */ jsx23("div", { className: "rb-flex rb-flex-col rb-gap-3", children: teamMembers.map((teamMember) => /* @__PURE__ */ jsxs9("div", { children: [
|
|
8714
|
-
/* @__PURE__ */ jsx23("p", { children: /* @__PURE__ */ jsx23(
|
|
8722
|
+
/* @__PURE__ */ jsx23("p", { children: /* @__PURE__ */ jsx23(
|
|
8723
|
+
TeamMemberName,
|
|
8724
|
+
{
|
|
8725
|
+
name: teamMember.name,
|
|
8726
|
+
profilePath: teamMember.profilePath
|
|
8727
|
+
}
|
|
8728
|
+
) }),
|
|
8715
8729
|
teamMember.summary ? /* @__PURE__ */ jsx23("p", { className: "rb-caption status-muted", children: teamMember.summary }) : null
|
|
8716
8730
|
] }, teamMember.id)) })
|
|
8717
8731
|
] }) : null,
|
|
@@ -9261,6 +9275,12 @@ var init_runs = __esm({
|
|
|
9261
9275
|
|
|
9262
9276
|
// ../blocks/src/system/runtime/nodes/course-details/view.tsx
|
|
9263
9277
|
import { jsx as jsx27, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
9278
|
+
function TeamMemberName2({
|
|
9279
|
+
name,
|
|
9280
|
+
profilePath
|
|
9281
|
+
}) {
|
|
9282
|
+
return profilePath ? /* @__PURE__ */ jsx27("a", { href: profilePath, className: "rb-hover-opacity-80", children: /* @__PURE__ */ jsx27("strong", { children: name }) }) : /* @__PURE__ */ jsx27("strong", { children: name });
|
|
9283
|
+
}
|
|
9264
9284
|
function parseLimit2(value, fallback) {
|
|
9265
9285
|
if (value === "all") return "all";
|
|
9266
9286
|
const n = typeof value === "string" ? Number.parseInt(value, 10) : typeof value === "number" ? value : NaN;
|
|
@@ -9318,7 +9338,13 @@ function CourseDetailsView(props2) {
|
|
|
9318
9338
|
teamMembers.length > 0 && /* @__PURE__ */ jsxs13("div", { children: [
|
|
9319
9339
|
/* @__PURE__ */ jsx27("div", { className: "rb-label rb-mb-2", children: "Team members" }),
|
|
9320
9340
|
/* @__PURE__ */ jsx27("div", { className: "rb-flex rb-flex-col rb-gap-3", children: teamMembers.map((teamMember) => /* @__PURE__ */ jsxs13("div", { children: [
|
|
9321
|
-
/* @__PURE__ */ jsx27("p", { children: /* @__PURE__ */ jsx27(
|
|
9341
|
+
/* @__PURE__ */ jsx27("p", { children: /* @__PURE__ */ jsx27(
|
|
9342
|
+
TeamMemberName2,
|
|
9343
|
+
{
|
|
9344
|
+
name: teamMember.name,
|
|
9345
|
+
profilePath: teamMember.profilePath
|
|
9346
|
+
}
|
|
9347
|
+
) }),
|
|
9322
9348
|
teamMember.summary && /* @__PURE__ */ jsx27("p", { className: "rb-caption status-muted", children: teamMember.summary })
|
|
9323
9349
|
] }, teamMember.id)) })
|
|
9324
9350
|
] })
|
|
@@ -9995,7 +10021,9 @@ var init_schemas2 = __esm({
|
|
|
9995
10021
|
publicTeamMemberSummarySchema = z9.object({
|
|
9996
10022
|
id: z9.string(),
|
|
9997
10023
|
name: z9.string(),
|
|
9998
|
-
|
|
10024
|
+
roleLabel: z9.string().nullable(),
|
|
10025
|
+
summary: z9.string().nullable(),
|
|
10026
|
+
profilePath: z9.string().nullable()
|
|
9999
10027
|
});
|
|
10000
10028
|
publicEventSchema = z9.object({
|
|
10001
10029
|
kind: z9.enum(["event", "course_session"]).optional(),
|
|
@@ -15530,7 +15558,19 @@ var init_teamMember = __esm({
|
|
|
15530
15558
|
bind("photo")
|
|
15531
15559
|
)
|
|
15532
15560
|
]),
|
|
15533
|
-
|
|
15561
|
+
link(
|
|
15562
|
+
{
|
|
15563
|
+
href: { $bind: { from: "profilePath" } },
|
|
15564
|
+
className: "rb-team-member-name-link"
|
|
15565
|
+
},
|
|
15566
|
+
[text({ as: "h3" }, bind("name"))],
|
|
15567
|
+
when("profilePath")
|
|
15568
|
+
),
|
|
15569
|
+
text(
|
|
15570
|
+
{ as: "h3" },
|
|
15571
|
+
when("profilePath", { not: true }),
|
|
15572
|
+
bind("name")
|
|
15573
|
+
),
|
|
15534
15574
|
text({ as: "p", className: "rb-team-member-role" }, when("role"), bind("role")),
|
|
15535
15575
|
richText(
|
|
15536
15576
|
{ className: "rb-prose rb-max-w-none" },
|
|
@@ -32331,7 +32371,16 @@ var init_CourseRegistrationErrorBoundary = __esm({
|
|
|
32331
32371
|
});
|
|
32332
32372
|
|
|
32333
32373
|
// ../blocks/src/system/runtime/nodes/course-registration/components.tsx
|
|
32374
|
+
import React19 from "react";
|
|
32334
32375
|
import { Fragment as Fragment15, jsx as jsx105, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
32376
|
+
function TeamMemberInlineList({
|
|
32377
|
+
teamMembers
|
|
32378
|
+
}) {
|
|
32379
|
+
return /* @__PURE__ */ jsx105(Fragment15, { children: teamMembers.map((teamMember, index) => /* @__PURE__ */ jsxs78(React19.Fragment, { children: [
|
|
32380
|
+
index > 0 ? ", " : "",
|
|
32381
|
+
teamMember.profilePath ? /* @__PURE__ */ jsx105("a", { href: teamMember.profilePath, children: teamMember.name }) : teamMember.name
|
|
32382
|
+
] }, teamMember.id)) });
|
|
32383
|
+
}
|
|
32335
32384
|
function CourseCard({
|
|
32336
32385
|
course,
|
|
32337
32386
|
isSelected,
|
|
@@ -32412,7 +32461,7 @@ function CourseSummary({
|
|
|
32412
32461
|
teamMembers.length > 0 && /* @__PURE__ */ jsxs78("div", { className: "cr-summary__venue", children: [
|
|
32413
32462
|
/* @__PURE__ */ jsx105("strong", { children: "Team:" }),
|
|
32414
32463
|
" ",
|
|
32415
|
-
|
|
32464
|
+
/* @__PURE__ */ jsx105(TeamMemberInlineList, { teamMembers })
|
|
32416
32465
|
] }),
|
|
32417
32466
|
showPrice && pricing.display.kind !== "unavailable" && /* @__PURE__ */ jsxs78("p", { className: "cr-summary__price", children: [
|
|
32418
32467
|
/* @__PURE__ */ jsx105("strong", { children: pricing.selectableOptions.length > 0 ? "Pricing:" : "Price:" }),
|
|
@@ -33970,7 +34019,7 @@ var init_location_map_client = __esm({
|
|
|
33970
34019
|
});
|
|
33971
34020
|
|
|
33972
34021
|
// ../blocks/src/system/runtime/nodes/shop-commerce-store.ts
|
|
33973
|
-
import * as
|
|
34022
|
+
import * as React21 from "react";
|
|
33974
34023
|
function storageKey(siteId) {
|
|
33975
34024
|
return `riverbank:shop-cart:${siteId}`;
|
|
33976
34025
|
}
|
|
@@ -33986,8 +34035,8 @@ function addPassToCommerceCart(siteId, input) {
|
|
|
33986
34035
|
}
|
|
33987
34036
|
function useCommerceCart(siteId) {
|
|
33988
34037
|
const effectiveSiteId = siteId ?? "unknown";
|
|
33989
|
-
const store =
|
|
33990
|
-
const state =
|
|
34038
|
+
const store = React21.useMemo(() => getStore(effectiveSiteId), [effectiveSiteId]);
|
|
34039
|
+
const state = React21.useSyncExternalStore(
|
|
33991
34040
|
(listener) => store.subscribe(listener),
|
|
33992
34041
|
() => store.getSnapshot(),
|
|
33993
34042
|
() => EMPTY_STATE
|
|
@@ -34082,11 +34131,11 @@ var init_shop_commerce_store = __esm({
|
|
|
34082
34131
|
});
|
|
34083
34132
|
|
|
34084
34133
|
// ../blocks/src/system/runtime/nodes/shop-add-feedback.tsx
|
|
34085
|
-
import * as
|
|
34134
|
+
import * as React22 from "react";
|
|
34086
34135
|
import { jsx as jsx111, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
34087
34136
|
function useTransientShopAddFeedback(timeoutMs = DEFAULT_TIMEOUT_MS) {
|
|
34088
|
-
const [activeKey, setActiveKey] =
|
|
34089
|
-
|
|
34137
|
+
const [activeKey, setActiveKey] = React22.useState(null);
|
|
34138
|
+
React22.useEffect(() => {
|
|
34090
34139
|
if (!activeKey) return;
|
|
34091
34140
|
const timeoutId = window.setTimeout(() => {
|
|
34092
34141
|
setActiveKey((current) => current === activeKey ? null : current);
|
|
@@ -34243,7 +34292,7 @@ var init_shop_state = __esm({
|
|
|
34243
34292
|
});
|
|
34244
34293
|
|
|
34245
34294
|
// ../blocks/src/system/runtime/nodes/shop.client.tsx
|
|
34246
|
-
import
|
|
34295
|
+
import React23, { useCallback as useCallback10, useEffect as useEffect21, useRef as useRef11, useState as useState17 } from "react";
|
|
34247
34296
|
import { Fragment as Fragment17, jsx as jsx112, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
34248
34297
|
function ShopClient(props2) {
|
|
34249
34298
|
return /* @__PURE__ */ jsx112(PassesMembershipsController, { render: props2.render });
|
|
@@ -34255,7 +34304,7 @@ function getCheckoutModalTitle(checkout2) {
|
|
|
34255
34304
|
}
|
|
34256
34305
|
function PassesMembershipsController({ render }) {
|
|
34257
34306
|
const api = useBlockApi();
|
|
34258
|
-
const [state, dispatch] =
|
|
34307
|
+
const [state, dispatch] = React23.useReducer(
|
|
34259
34308
|
shopPassesMembershipsReducer,
|
|
34260
34309
|
initialShopPassesMembershipsState
|
|
34261
34310
|
);
|
|
@@ -36473,7 +36522,7 @@ var init_embla_carousel_react_esm = __esm({
|
|
|
36473
36522
|
});
|
|
36474
36523
|
|
|
36475
36524
|
// ../blocks/src/system/runtime/nodes/carousel.client.tsx
|
|
36476
|
-
import
|
|
36525
|
+
import React24 from "react";
|
|
36477
36526
|
import { Fragment as Fragment18, jsx as jsx113, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
36478
36527
|
function normalizeCarouselProps(input) {
|
|
36479
36528
|
const transition = input.transition === "fade" ? "fade" : "slide";
|
|
@@ -36528,8 +36577,8 @@ var init_carousel_client = __esm({
|
|
|
36528
36577
|
autoplayDelay,
|
|
36529
36578
|
loop
|
|
36530
36579
|
}) => {
|
|
36531
|
-
const slides =
|
|
36532
|
-
const normalized =
|
|
36580
|
+
const slides = React24.Children.toArray(children).filter(Boolean);
|
|
36581
|
+
const normalized = React24.useMemo(
|
|
36533
36582
|
() => normalizeCarouselProps({
|
|
36534
36583
|
slidesToShow,
|
|
36535
36584
|
transition,
|
|
@@ -36552,11 +36601,11 @@ var init_carousel_client = __esm({
|
|
|
36552
36601
|
]
|
|
36553
36602
|
);
|
|
36554
36603
|
const resolvedSlides = resolveSlidesToShowMobile(normalized.slidesToShow);
|
|
36555
|
-
const cssVars =
|
|
36604
|
+
const cssVars = React24.useMemo(
|
|
36556
36605
|
() => getCarouselSlidesToShowCssVars(normalized.slidesToShow),
|
|
36557
36606
|
[normalized.slidesToShow]
|
|
36558
36607
|
);
|
|
36559
|
-
const plugins =
|
|
36608
|
+
const plugins = React24.useMemo(() => {
|
|
36560
36609
|
if (!normalized.autoplay) return void 0;
|
|
36561
36610
|
return [
|
|
36562
36611
|
Autoplay({
|
|
@@ -36578,11 +36627,11 @@ var init_carousel_client = __esm({
|
|
|
36578
36627
|
},
|
|
36579
36628
|
plugins
|
|
36580
36629
|
);
|
|
36581
|
-
const [selectedIndex, setSelectedIndex] =
|
|
36582
|
-
const [scrollSnaps, setScrollSnaps] =
|
|
36583
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
36584
|
-
const [canScrollNext, setCanScrollNext] =
|
|
36585
|
-
|
|
36630
|
+
const [selectedIndex, setSelectedIndex] = React24.useState(0);
|
|
36631
|
+
const [scrollSnaps, setScrollSnaps] = React24.useState([]);
|
|
36632
|
+
const [canScrollPrev, setCanScrollPrev] = React24.useState(false);
|
|
36633
|
+
const [canScrollNext, setCanScrollNext] = React24.useState(false);
|
|
36634
|
+
React24.useEffect(() => {
|
|
36586
36635
|
if (!api) return;
|
|
36587
36636
|
const onInit = () => {
|
|
36588
36637
|
setScrollSnaps(api.scrollSnapList());
|
|
@@ -36605,7 +36654,7 @@ var init_carousel_client = __esm({
|
|
|
36605
36654
|
api.off("reInit", onSelect);
|
|
36606
36655
|
};
|
|
36607
36656
|
}, [api]);
|
|
36608
|
-
|
|
36657
|
+
React24.useEffect(() => {
|
|
36609
36658
|
if (!api || !normalized.autoplay) return;
|
|
36610
36659
|
const autoplayPlugin = api.plugins()?.autoplay;
|
|
36611
36660
|
if (!autoplayPlugin) return;
|
|
@@ -36816,16 +36865,16 @@ var init_shop_checkout_state = __esm({
|
|
|
36816
36865
|
});
|
|
36817
36866
|
|
|
36818
36867
|
// ../blocks/src/system/runtime/nodes/shop-commerce.tsx
|
|
36819
|
-
import * as
|
|
36868
|
+
import * as React25 from "react";
|
|
36820
36869
|
import { Fragment as Fragment19, jsx as jsx114, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
36821
36870
|
function ProductListController(props2) {
|
|
36822
36871
|
const api = useBlockApi();
|
|
36823
36872
|
const cart2 = useCommerceCart(api.config.siteId);
|
|
36824
36873
|
const addFeedback = useTransientShopAddFeedback();
|
|
36825
|
-
const [variantSelection, setVariantSelection] =
|
|
36874
|
+
const [variantSelection, setVariantSelection] = React25.useState(
|
|
36826
36875
|
() => Object.fromEntries(props2.render.display.cards.map((card) => [card.productId, card.selectedVariantId]))
|
|
36827
36876
|
);
|
|
36828
|
-
const cards =
|
|
36877
|
+
const cards = React25.useMemo(
|
|
36829
36878
|
() => props2.render.hydration.products.map(
|
|
36830
36879
|
(product) => buildProductCardDisplay(
|
|
36831
36880
|
product,
|
|
@@ -36840,7 +36889,7 @@ function ProductListController(props2) {
|
|
|
36840
36889
|
),
|
|
36841
36890
|
[props2.render.hydration, variantSelection]
|
|
36842
36891
|
);
|
|
36843
|
-
const display =
|
|
36892
|
+
const display = React25.useMemo(
|
|
36844
36893
|
() => ({
|
|
36845
36894
|
...props2.render.display,
|
|
36846
36895
|
state: cards.length === 0 ? "empty" : "ready",
|
|
@@ -36902,17 +36951,17 @@ function ProductDetailController(props2) {
|
|
|
36902
36951
|
const api = useBlockApi();
|
|
36903
36952
|
const cart2 = useCommerceCart(api.config.siteId);
|
|
36904
36953
|
const addFeedback = useTransientShopAddFeedback();
|
|
36905
|
-
const selectedProduct =
|
|
36954
|
+
const selectedProduct = React25.useMemo(
|
|
36906
36955
|
() => props2.render.hydration.products.find((product) => product.id === props2.render.hydration.productId) ?? null,
|
|
36907
36956
|
[props2.render.hydration.productId, props2.render.hydration.products]
|
|
36908
36957
|
);
|
|
36909
|
-
const [variantId, setVariantId] =
|
|
36958
|
+
const [variantId, setVariantId] = React25.useState(
|
|
36910
36959
|
props2.render.display.state === "ready" ? props2.render.display.selectedVariantId : null
|
|
36911
36960
|
);
|
|
36912
|
-
|
|
36961
|
+
React25.useEffect(() => {
|
|
36913
36962
|
setVariantId(props2.render.display.state === "ready" ? props2.render.display.selectedVariantId : null);
|
|
36914
36963
|
}, [props2.render.display]);
|
|
36915
|
-
const display =
|
|
36964
|
+
const display = React25.useMemo(
|
|
36916
36965
|
() => buildProductDetailDisplay(
|
|
36917
36966
|
selectedProduct,
|
|
36918
36967
|
{
|
|
@@ -36980,7 +37029,7 @@ function ProductDetailController(props2) {
|
|
|
36980
37029
|
function CartController(props2) {
|
|
36981
37030
|
const api = useBlockApi();
|
|
36982
37031
|
const cart2 = useCommerceCart(api.config.siteId);
|
|
36983
|
-
const display =
|
|
37032
|
+
const display = React25.useMemo(
|
|
36984
37033
|
() => getShopDisplayForItems(props2.render, cart2.items),
|
|
36985
37034
|
[cart2.items, props2.render]
|
|
36986
37035
|
);
|
|
@@ -37023,11 +37072,11 @@ function CartController(props2) {
|
|
|
37023
37072
|
function CheckoutController(props2) {
|
|
37024
37073
|
const api = useBlockApi();
|
|
37025
37074
|
const cart2 = useCommerceCart(api.config.siteId);
|
|
37026
|
-
const [state, dispatch] =
|
|
37075
|
+
const [state, dispatch] = React25.useReducer(
|
|
37027
37076
|
shopCheckoutReducer,
|
|
37028
37077
|
initialShopCheckoutState
|
|
37029
37078
|
);
|
|
37030
|
-
|
|
37079
|
+
React25.useEffect(() => {
|
|
37031
37080
|
const checkout2 = consumeSearchParam("checkout");
|
|
37032
37081
|
if (checkout2 === "success") {
|
|
37033
37082
|
cart2.clear();
|
|
@@ -37036,7 +37085,7 @@ function CheckoutController(props2) {
|
|
|
37036
37085
|
dispatch({ type: "setNotice", notice: "cancelled" });
|
|
37037
37086
|
}
|
|
37038
37087
|
}, [cart2]);
|
|
37039
|
-
const display =
|
|
37088
|
+
const display = React25.useMemo(
|
|
37040
37089
|
() => getShopDisplayForItems(props2.render, cart2.items),
|
|
37041
37090
|
[cart2.items, props2.render]
|
|
37042
37091
|
);
|
|
@@ -37582,24 +37631,24 @@ var init_gifting_client = __esm({
|
|
|
37582
37631
|
});
|
|
37583
37632
|
|
|
37584
37633
|
// ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.2.10_react@19.2.4/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
37585
|
-
import * as
|
|
37634
|
+
import * as React27 from "react";
|
|
37586
37635
|
import { jsx as jsx120 } from "react/jsx-runtime";
|
|
37587
37636
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
37588
37637
|
let defaultContexts = [];
|
|
37589
37638
|
function createContext32(rootComponentName, defaultContext) {
|
|
37590
|
-
const BaseContext =
|
|
37639
|
+
const BaseContext = React27.createContext(defaultContext);
|
|
37591
37640
|
const index = defaultContexts.length;
|
|
37592
37641
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
37593
37642
|
const Provider = (props2) => {
|
|
37594
37643
|
const { scope, children, ...context } = props2;
|
|
37595
37644
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
37596
|
-
const value =
|
|
37645
|
+
const value = React27.useMemo(() => context, Object.values(context));
|
|
37597
37646
|
return /* @__PURE__ */ jsx120(Context.Provider, { value, children });
|
|
37598
37647
|
};
|
|
37599
37648
|
Provider.displayName = rootComponentName + "Provider";
|
|
37600
37649
|
function useContext22(consumerName, scope) {
|
|
37601
37650
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
37602
|
-
const context =
|
|
37651
|
+
const context = React27.useContext(Context);
|
|
37603
37652
|
if (context) return context;
|
|
37604
37653
|
if (defaultContext !== void 0) return defaultContext;
|
|
37605
37654
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
@@ -37608,11 +37657,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
37608
37657
|
}
|
|
37609
37658
|
const createScope = () => {
|
|
37610
37659
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
37611
|
-
return
|
|
37660
|
+
return React27.createContext(defaultContext);
|
|
37612
37661
|
});
|
|
37613
37662
|
return function useScope(scope) {
|
|
37614
37663
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
37615
|
-
return
|
|
37664
|
+
return React27.useMemo(
|
|
37616
37665
|
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
37617
37666
|
[scope, contexts]
|
|
37618
37667
|
);
|
|
@@ -37635,7 +37684,7 @@ function composeContextScopes(...scopes) {
|
|
|
37635
37684
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
37636
37685
|
return { ...nextScopes2, ...currentScope };
|
|
37637
37686
|
}, {});
|
|
37638
|
-
return
|
|
37687
|
+
return React27.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
37639
37688
|
};
|
|
37640
37689
|
};
|
|
37641
37690
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -37648,7 +37697,7 @@ var init_dist3 = __esm({
|
|
|
37648
37697
|
});
|
|
37649
37698
|
|
|
37650
37699
|
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.10_react@19.2.4/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
37651
|
-
import * as
|
|
37700
|
+
import * as React28 from "react";
|
|
37652
37701
|
function setRef(ref, value) {
|
|
37653
37702
|
if (typeof ref === "function") {
|
|
37654
37703
|
return ref(value);
|
|
@@ -37681,7 +37730,7 @@ function composeRefs(...refs) {
|
|
|
37681
37730
|
};
|
|
37682
37731
|
}
|
|
37683
37732
|
function useComposedRefs(...refs) {
|
|
37684
|
-
return
|
|
37733
|
+
return React28.useCallback(composeRefs(...refs), refs);
|
|
37685
37734
|
}
|
|
37686
37735
|
var init_dist4 = __esm({
|
|
37687
37736
|
"../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.10_react@19.2.4/node_modules/@radix-ui/react-compose-refs/dist/index.mjs"() {
|
|
@@ -37690,26 +37739,26 @@ var init_dist4 = __esm({
|
|
|
37690
37739
|
});
|
|
37691
37740
|
|
|
37692
37741
|
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.2.10_react@19.2.4/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
37693
|
-
import * as
|
|
37742
|
+
import * as React29 from "react";
|
|
37694
37743
|
import { Fragment as Fragment22, jsx as jsx121 } from "react/jsx-runtime";
|
|
37695
37744
|
// @__NO_SIDE_EFFECTS__
|
|
37696
37745
|
function createSlot(ownerName) {
|
|
37697
37746
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
37698
|
-
const Slot2 =
|
|
37747
|
+
const Slot2 = React29.forwardRef((props2, forwardedRef) => {
|
|
37699
37748
|
const { children, ...slotProps } = props2;
|
|
37700
|
-
const childrenArray =
|
|
37749
|
+
const childrenArray = React29.Children.toArray(children);
|
|
37701
37750
|
const slottable = childrenArray.find(isSlottable);
|
|
37702
37751
|
if (slottable) {
|
|
37703
37752
|
const newElement = slottable.props.children;
|
|
37704
37753
|
const newChildren = childrenArray.map((child) => {
|
|
37705
37754
|
if (child === slottable) {
|
|
37706
|
-
if (
|
|
37707
|
-
return
|
|
37755
|
+
if (React29.Children.count(newElement) > 1) return React29.Children.only(null);
|
|
37756
|
+
return React29.isValidElement(newElement) ? newElement.props.children : null;
|
|
37708
37757
|
} else {
|
|
37709
37758
|
return child;
|
|
37710
37759
|
}
|
|
37711
37760
|
});
|
|
37712
|
-
return /* @__PURE__ */ jsx121(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
37761
|
+
return /* @__PURE__ */ jsx121(SlotClone, { ...slotProps, ref: forwardedRef, children: React29.isValidElement(newElement) ? React29.cloneElement(newElement, void 0, newChildren) : null });
|
|
37713
37762
|
}
|
|
37714
37763
|
return /* @__PURE__ */ jsx121(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
37715
37764
|
});
|
|
@@ -37718,23 +37767,23 @@ function createSlot(ownerName) {
|
|
|
37718
37767
|
}
|
|
37719
37768
|
// @__NO_SIDE_EFFECTS__
|
|
37720
37769
|
function createSlotClone(ownerName) {
|
|
37721
|
-
const SlotClone =
|
|
37770
|
+
const SlotClone = React29.forwardRef((props2, forwardedRef) => {
|
|
37722
37771
|
const { children, ...slotProps } = props2;
|
|
37723
|
-
if (
|
|
37772
|
+
if (React29.isValidElement(children)) {
|
|
37724
37773
|
const childrenRef = getElementRef(children);
|
|
37725
37774
|
const props22 = mergeProps(slotProps, children.props);
|
|
37726
|
-
if (children.type !==
|
|
37775
|
+
if (children.type !== React29.Fragment) {
|
|
37727
37776
|
props22.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
37728
37777
|
}
|
|
37729
|
-
return
|
|
37778
|
+
return React29.cloneElement(children, props22);
|
|
37730
37779
|
}
|
|
37731
|
-
return
|
|
37780
|
+
return React29.Children.count(children) > 1 ? React29.Children.only(null) : null;
|
|
37732
37781
|
});
|
|
37733
37782
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
37734
37783
|
return SlotClone;
|
|
37735
37784
|
}
|
|
37736
37785
|
function isSlottable(child) {
|
|
37737
|
-
return
|
|
37786
|
+
return React29.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
37738
37787
|
}
|
|
37739
37788
|
function mergeProps(slotProps, childProps) {
|
|
37740
37789
|
const overrideProps = { ...childProps };
|
|
@@ -37783,7 +37832,7 @@ var init_dist5 = __esm({
|
|
|
37783
37832
|
});
|
|
37784
37833
|
|
|
37785
37834
|
// ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.10__@types+r_2988d950cbd44144aec5e6ce60804441/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
37786
|
-
import
|
|
37835
|
+
import React30 from "react";
|
|
37787
37836
|
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
37788
37837
|
import React210 from "react";
|
|
37789
37838
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
@@ -37796,14 +37845,14 @@ function createCollection(name) {
|
|
|
37796
37845
|
);
|
|
37797
37846
|
const CollectionProvider = (props2) => {
|
|
37798
37847
|
const { scope, children } = props2;
|
|
37799
|
-
const ref =
|
|
37800
|
-
const itemMap =
|
|
37848
|
+
const ref = React30.useRef(null);
|
|
37849
|
+
const itemMap = React30.useRef(/* @__PURE__ */ new Map()).current;
|
|
37801
37850
|
return /* @__PURE__ */ jsx122(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
37802
37851
|
};
|
|
37803
37852
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
37804
37853
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
37805
37854
|
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
37806
|
-
const CollectionSlot =
|
|
37855
|
+
const CollectionSlot = React30.forwardRef(
|
|
37807
37856
|
(props2, forwardedRef) => {
|
|
37808
37857
|
const { scope, children } = props2;
|
|
37809
37858
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
@@ -37815,13 +37864,13 @@ function createCollection(name) {
|
|
|
37815
37864
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
37816
37865
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
37817
37866
|
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
37818
|
-
const CollectionItemSlot =
|
|
37867
|
+
const CollectionItemSlot = React30.forwardRef(
|
|
37819
37868
|
(props2, forwardedRef) => {
|
|
37820
37869
|
const { scope, children, ...itemData } = props2;
|
|
37821
|
-
const ref =
|
|
37870
|
+
const ref = React30.useRef(null);
|
|
37822
37871
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
37823
37872
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
37824
|
-
|
|
37873
|
+
React30.useEffect(() => {
|
|
37825
37874
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
37826
37875
|
return () => void context.itemMap.delete(ref);
|
|
37827
37876
|
});
|
|
@@ -37831,7 +37880,7 @@ function createCollection(name) {
|
|
|
37831
37880
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
37832
37881
|
function useCollection2(scope) {
|
|
37833
37882
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
37834
|
-
const getItems =
|
|
37883
|
+
const getItems = React30.useCallback(() => {
|
|
37835
37884
|
const collectionNode = context.collectionRef.current;
|
|
37836
37885
|
if (!collectionNode) return [];
|
|
37837
37886
|
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
@@ -37877,18 +37926,18 @@ var init_dist7 = __esm({
|
|
|
37877
37926
|
});
|
|
37878
37927
|
|
|
37879
37928
|
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.2.10_react@19.2.4/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
37880
|
-
import * as
|
|
37929
|
+
import * as React31 from "react";
|
|
37881
37930
|
var useLayoutEffect2;
|
|
37882
37931
|
var init_dist8 = __esm({
|
|
37883
37932
|
"../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.2.10_react@19.2.4/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"() {
|
|
37884
37933
|
"use strict";
|
|
37885
|
-
useLayoutEffect2 = globalThis?.document ?
|
|
37934
|
+
useLayoutEffect2 = globalThis?.document ? React31.useLayoutEffect : () => {
|
|
37886
37935
|
};
|
|
37887
37936
|
}
|
|
37888
37937
|
});
|
|
37889
37938
|
|
|
37890
37939
|
// ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.2.10_react@19.2.4/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
37891
|
-
import * as
|
|
37940
|
+
import * as React32 from "react";
|
|
37892
37941
|
import * as React211 from "react";
|
|
37893
37942
|
function useControllableState({
|
|
37894
37943
|
prop,
|
|
@@ -37904,8 +37953,8 @@ function useControllableState({
|
|
|
37904
37953
|
const isControlled = prop !== void 0;
|
|
37905
37954
|
const value = isControlled ? prop : uncontrolledProp;
|
|
37906
37955
|
if (true) {
|
|
37907
|
-
const isControlledRef =
|
|
37908
|
-
|
|
37956
|
+
const isControlledRef = React32.useRef(prop !== void 0);
|
|
37957
|
+
React32.useEffect(() => {
|
|
37909
37958
|
const wasControlled = isControlledRef.current;
|
|
37910
37959
|
if (wasControlled !== isControlled) {
|
|
37911
37960
|
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
@@ -37917,7 +37966,7 @@ function useControllableState({
|
|
|
37917
37966
|
isControlledRef.current = isControlled;
|
|
37918
37967
|
}, [isControlled, caller]);
|
|
37919
37968
|
}
|
|
37920
|
-
const setValue =
|
|
37969
|
+
const setValue = React32.useCallback(
|
|
37921
37970
|
(nextValue) => {
|
|
37922
37971
|
if (isControlled) {
|
|
37923
37972
|
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
@@ -37936,13 +37985,13 @@ function useUncontrolledState({
|
|
|
37936
37985
|
defaultProp,
|
|
37937
37986
|
onChange
|
|
37938
37987
|
}) {
|
|
37939
|
-
const [value, setValue] =
|
|
37940
|
-
const prevValueRef =
|
|
37941
|
-
const onChangeRef =
|
|
37988
|
+
const [value, setValue] = React32.useState(defaultProp);
|
|
37989
|
+
const prevValueRef = React32.useRef(value);
|
|
37990
|
+
const onChangeRef = React32.useRef(onChange);
|
|
37942
37991
|
useInsertionEffect(() => {
|
|
37943
37992
|
onChangeRef.current = onChange;
|
|
37944
37993
|
}, [onChange]);
|
|
37945
|
-
|
|
37994
|
+
React32.useEffect(() => {
|
|
37946
37995
|
if (prevValueRef.current !== value) {
|
|
37947
37996
|
onChangeRef.current?.(value);
|
|
37948
37997
|
prevValueRef.current = value;
|
|
@@ -37958,12 +38007,12 @@ var init_dist9 = __esm({
|
|
|
37958
38007
|
"../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.2.10_react@19.2.4/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"() {
|
|
37959
38008
|
"use strict";
|
|
37960
38009
|
init_dist8();
|
|
37961
|
-
useInsertionEffect =
|
|
38010
|
+
useInsertionEffect = React32[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
37962
38011
|
}
|
|
37963
38012
|
});
|
|
37964
38013
|
|
|
37965
38014
|
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.10__@types+re_cc7cc65f5706fd7d49339c0539c4dc85/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
37966
|
-
import * as
|
|
38015
|
+
import * as React33 from "react";
|
|
37967
38016
|
import * as ReactDOM from "react-dom";
|
|
37968
38017
|
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
37969
38018
|
var NODES, Primitive;
|
|
@@ -37992,7 +38041,7 @@ var init_dist10 = __esm({
|
|
|
37992
38041
|
];
|
|
37993
38042
|
Primitive = NODES.reduce((primitive, node) => {
|
|
37994
38043
|
const Slot = createSlot(`Primitive.${node}`);
|
|
37995
|
-
const Node2 =
|
|
38044
|
+
const Node2 = React33.forwardRef((props2, forwardedRef) => {
|
|
37996
38045
|
const { asChild, ...primitiveProps } = props2;
|
|
37997
38046
|
const Comp = asChild ? Slot : node;
|
|
37998
38047
|
if (typeof window !== "undefined") {
|
|
@@ -38008,9 +38057,9 @@ var init_dist10 = __esm({
|
|
|
38008
38057
|
|
|
38009
38058
|
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@19.2.3_@types+react@19.2.10__@types+rea_dc32f20a733f643b296d92d5e258c3cd/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
38010
38059
|
import * as React212 from "react";
|
|
38011
|
-
import * as
|
|
38060
|
+
import * as React34 from "react";
|
|
38012
38061
|
function useStateMachine(initialState, machine) {
|
|
38013
|
-
return
|
|
38062
|
+
return React34.useReducer((state, event) => {
|
|
38014
38063
|
const nextState = machine[state][event];
|
|
38015
38064
|
return nextState ?? state;
|
|
38016
38065
|
}, initialState);
|
|
@@ -38142,9 +38191,9 @@ var init_dist11 = __esm({
|
|
|
38142
38191
|
});
|
|
38143
38192
|
|
|
38144
38193
|
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.10_react@19.2.4/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
38145
|
-
import * as
|
|
38194
|
+
import * as React35 from "react";
|
|
38146
38195
|
function useId2(deterministicId) {
|
|
38147
|
-
const [id, setId] =
|
|
38196
|
+
const [id, setId] = React35.useState(useReactId());
|
|
38148
38197
|
useLayoutEffect2(() => {
|
|
38149
38198
|
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
|
|
38150
38199
|
}, [deterministicId]);
|
|
@@ -38155,13 +38204,13 @@ var init_dist12 = __esm({
|
|
|
38155
38204
|
"../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.10_react@19.2.4/node_modules/@radix-ui/react-id/dist/index.mjs"() {
|
|
38156
38205
|
"use strict";
|
|
38157
38206
|
init_dist8();
|
|
38158
|
-
useReactId =
|
|
38207
|
+
useReactId = React35[" useId ".trim().toString()] || (() => void 0);
|
|
38159
38208
|
count = 0;
|
|
38160
38209
|
}
|
|
38161
38210
|
});
|
|
38162
38211
|
|
|
38163
38212
|
// ../../node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.2.3_@types+react@19.2.10__@types_04a209fb0c8c91319b0caf91504da9bf/node_modules/@radix-ui/react-collapsible/dist/index.mjs
|
|
38164
|
-
import * as
|
|
38213
|
+
import * as React36 from "react";
|
|
38165
38214
|
import { jsx as jsx124 } from "react/jsx-runtime";
|
|
38166
38215
|
function getState(open) {
|
|
38167
38216
|
return open ? "open" : "closed";
|
|
@@ -38182,7 +38231,7 @@ var init_dist13 = __esm({
|
|
|
38182
38231
|
COLLAPSIBLE_NAME = "Collapsible";
|
|
38183
38232
|
[createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
|
|
38184
38233
|
[CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
|
|
38185
|
-
Collapsible =
|
|
38234
|
+
Collapsible = React36.forwardRef(
|
|
38186
38235
|
(props2, forwardedRef) => {
|
|
38187
38236
|
const {
|
|
38188
38237
|
__scopeCollapsible,
|
|
@@ -38205,7 +38254,7 @@ var init_dist13 = __esm({
|
|
|
38205
38254
|
disabled,
|
|
38206
38255
|
contentId: useId2(),
|
|
38207
38256
|
open,
|
|
38208
|
-
onOpenToggle:
|
|
38257
|
+
onOpenToggle: React36.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
38209
38258
|
children: /* @__PURE__ */ jsx124(
|
|
38210
38259
|
Primitive.div,
|
|
38211
38260
|
{
|
|
@@ -38221,7 +38270,7 @@ var init_dist13 = __esm({
|
|
|
38221
38270
|
);
|
|
38222
38271
|
Collapsible.displayName = COLLAPSIBLE_NAME;
|
|
38223
38272
|
TRIGGER_NAME = "CollapsibleTrigger";
|
|
38224
|
-
CollapsibleTrigger =
|
|
38273
|
+
CollapsibleTrigger = React36.forwardRef(
|
|
38225
38274
|
(props2, forwardedRef) => {
|
|
38226
38275
|
const { __scopeCollapsible, ...triggerProps } = props2;
|
|
38227
38276
|
const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);
|
|
@@ -38243,7 +38292,7 @@ var init_dist13 = __esm({
|
|
|
38243
38292
|
);
|
|
38244
38293
|
CollapsibleTrigger.displayName = TRIGGER_NAME;
|
|
38245
38294
|
CONTENT_NAME = "CollapsibleContent";
|
|
38246
|
-
CollapsibleContent =
|
|
38295
|
+
CollapsibleContent = React36.forwardRef(
|
|
38247
38296
|
(props2, forwardedRef) => {
|
|
38248
38297
|
const { forceMount, ...contentProps } = props2;
|
|
38249
38298
|
const context = useCollapsibleContext(CONTENT_NAME, props2.__scopeCollapsible);
|
|
@@ -38251,20 +38300,20 @@ var init_dist13 = __esm({
|
|
|
38251
38300
|
}
|
|
38252
38301
|
);
|
|
38253
38302
|
CollapsibleContent.displayName = CONTENT_NAME;
|
|
38254
|
-
CollapsibleContentImpl =
|
|
38303
|
+
CollapsibleContentImpl = React36.forwardRef((props2, forwardedRef) => {
|
|
38255
38304
|
const { __scopeCollapsible, present, children, ...contentProps } = props2;
|
|
38256
38305
|
const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);
|
|
38257
|
-
const [isPresent, setIsPresent] =
|
|
38258
|
-
const ref =
|
|
38306
|
+
const [isPresent, setIsPresent] = React36.useState(present);
|
|
38307
|
+
const ref = React36.useRef(null);
|
|
38259
38308
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
38260
|
-
const heightRef =
|
|
38309
|
+
const heightRef = React36.useRef(0);
|
|
38261
38310
|
const height = heightRef.current;
|
|
38262
|
-
const widthRef =
|
|
38311
|
+
const widthRef = React36.useRef(0);
|
|
38263
38312
|
const width = widthRef.current;
|
|
38264
38313
|
const isOpen = context.open || isPresent;
|
|
38265
|
-
const isMountAnimationPreventedRef =
|
|
38266
|
-
const originalStylesRef =
|
|
38267
|
-
|
|
38314
|
+
const isMountAnimationPreventedRef = React36.useRef(isOpen);
|
|
38315
|
+
const originalStylesRef = React36.useRef(void 0);
|
|
38316
|
+
React36.useEffect(() => {
|
|
38268
38317
|
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
|
|
38269
38318
|
return () => cancelAnimationFrame(rAF);
|
|
38270
38319
|
}, []);
|
|
@@ -38312,22 +38361,22 @@ var init_dist13 = __esm({
|
|
|
38312
38361
|
});
|
|
38313
38362
|
|
|
38314
38363
|
// ../../node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.2.10_react@19.2.4/node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
38315
|
-
import * as
|
|
38364
|
+
import * as React37 from "react";
|
|
38316
38365
|
import { jsx as jsx125 } from "react/jsx-runtime";
|
|
38317
38366
|
function useDirection(localDir) {
|
|
38318
|
-
const globalDir =
|
|
38367
|
+
const globalDir = React37.useContext(DirectionContext);
|
|
38319
38368
|
return localDir || globalDir || "ltr";
|
|
38320
38369
|
}
|
|
38321
38370
|
var DirectionContext;
|
|
38322
38371
|
var init_dist14 = __esm({
|
|
38323
38372
|
"../../node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.2.10_react@19.2.4/node_modules/@radix-ui/react-direction/dist/index.mjs"() {
|
|
38324
38373
|
"use strict";
|
|
38325
|
-
DirectionContext =
|
|
38374
|
+
DirectionContext = React37.createContext(void 0);
|
|
38326
38375
|
}
|
|
38327
38376
|
});
|
|
38328
38377
|
|
|
38329
38378
|
// ../../node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.2.3_@types+react@19.2.10__@types+r_2675506df0b59b9402340fa0483c6185/node_modules/@radix-ui/react-accordion/dist/index.mjs
|
|
38330
|
-
import
|
|
38379
|
+
import React38 from "react";
|
|
38331
38380
|
import { jsx as jsx126 } from "react/jsx-runtime";
|
|
38332
38381
|
function getState2(open) {
|
|
38333
38382
|
return open ? "open" : "closed";
|
|
@@ -38355,7 +38404,7 @@ var init_dist15 = __esm({
|
|
|
38355
38404
|
createCollapsibleScope
|
|
38356
38405
|
]);
|
|
38357
38406
|
useCollapsibleScope = createCollapsibleScope();
|
|
38358
|
-
Accordion =
|
|
38407
|
+
Accordion = React38.forwardRef(
|
|
38359
38408
|
(props2, forwardedRef) => {
|
|
38360
38409
|
const { type, ...accordionProps } = props2;
|
|
38361
38410
|
const singleProps = accordionProps;
|
|
@@ -38369,7 +38418,7 @@ var init_dist15 = __esm({
|
|
|
38369
38418
|
ACCORDION_NAME,
|
|
38370
38419
|
{ collapsible: false }
|
|
38371
38420
|
);
|
|
38372
|
-
AccordionImplSingle =
|
|
38421
|
+
AccordionImplSingle = React38.forwardRef(
|
|
38373
38422
|
(props2, forwardedRef) => {
|
|
38374
38423
|
const {
|
|
38375
38424
|
value: valueProp,
|
|
@@ -38389,15 +38438,15 @@ var init_dist15 = __esm({
|
|
|
38389
38438
|
AccordionValueProvider,
|
|
38390
38439
|
{
|
|
38391
38440
|
scope: props2.__scopeAccordion,
|
|
38392
|
-
value:
|
|
38441
|
+
value: React38.useMemo(() => value ? [value] : [], [value]),
|
|
38393
38442
|
onItemOpen: setValue,
|
|
38394
|
-
onItemClose:
|
|
38443
|
+
onItemClose: React38.useCallback(() => collapsible && setValue(""), [collapsible, setValue]),
|
|
38395
38444
|
children: /* @__PURE__ */ jsx126(AccordionCollapsibleProvider, { scope: props2.__scopeAccordion, collapsible, children: /* @__PURE__ */ jsx126(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })
|
|
38396
38445
|
}
|
|
38397
38446
|
);
|
|
38398
38447
|
}
|
|
38399
38448
|
);
|
|
38400
|
-
AccordionImplMultiple =
|
|
38449
|
+
AccordionImplMultiple = React38.forwardRef((props2, forwardedRef) => {
|
|
38401
38450
|
const {
|
|
38402
38451
|
value: valueProp,
|
|
38403
38452
|
defaultValue,
|
|
@@ -38411,11 +38460,11 @@ var init_dist15 = __esm({
|
|
|
38411
38460
|
onChange: onValueChange,
|
|
38412
38461
|
caller: ACCORDION_NAME
|
|
38413
38462
|
});
|
|
38414
|
-
const handleItemOpen =
|
|
38463
|
+
const handleItemOpen = React38.useCallback(
|
|
38415
38464
|
(itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
|
|
38416
38465
|
[setValue]
|
|
38417
38466
|
);
|
|
38418
|
-
const handleItemClose =
|
|
38467
|
+
const handleItemClose = React38.useCallback(
|
|
38419
38468
|
(itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),
|
|
38420
38469
|
[setValue]
|
|
38421
38470
|
);
|
|
@@ -38431,10 +38480,10 @@ var init_dist15 = __esm({
|
|
|
38431
38480
|
);
|
|
38432
38481
|
});
|
|
38433
38482
|
[AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME);
|
|
38434
|
-
AccordionImpl =
|
|
38483
|
+
AccordionImpl = React38.forwardRef(
|
|
38435
38484
|
(props2, forwardedRef) => {
|
|
38436
38485
|
const { __scopeAccordion, disabled, dir, orientation = "vertical", ...accordionProps } = props2;
|
|
38437
|
-
const accordionRef =
|
|
38486
|
+
const accordionRef = React38.useRef(null);
|
|
38438
38487
|
const composedRefs = useComposedRefs(accordionRef, forwardedRef);
|
|
38439
38488
|
const getItems = useCollection(__scopeAccordion);
|
|
38440
38489
|
const direction = useDirection(dir);
|
|
@@ -38523,7 +38572,7 @@ var init_dist15 = __esm({
|
|
|
38523
38572
|
);
|
|
38524
38573
|
ITEM_NAME = "AccordionItem";
|
|
38525
38574
|
[AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME);
|
|
38526
|
-
AccordionItem =
|
|
38575
|
+
AccordionItem = React38.forwardRef(
|
|
38527
38576
|
(props2, forwardedRef) => {
|
|
38528
38577
|
const { __scopeAccordion, value, ...accordionItemProps } = props2;
|
|
38529
38578
|
const accordionContext = useAccordionContext(ITEM_NAME, __scopeAccordion);
|
|
@@ -38564,7 +38613,7 @@ var init_dist15 = __esm({
|
|
|
38564
38613
|
);
|
|
38565
38614
|
AccordionItem.displayName = ITEM_NAME;
|
|
38566
38615
|
HEADER_NAME = "AccordionHeader";
|
|
38567
|
-
AccordionHeader =
|
|
38616
|
+
AccordionHeader = React38.forwardRef(
|
|
38568
38617
|
(props2, forwardedRef) => {
|
|
38569
38618
|
const { __scopeAccordion, ...headerProps } = props2;
|
|
38570
38619
|
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
@@ -38583,7 +38632,7 @@ var init_dist15 = __esm({
|
|
|
38583
38632
|
);
|
|
38584
38633
|
AccordionHeader.displayName = HEADER_NAME;
|
|
38585
38634
|
TRIGGER_NAME2 = "AccordionTrigger";
|
|
38586
|
-
AccordionTrigger =
|
|
38635
|
+
AccordionTrigger = React38.forwardRef(
|
|
38587
38636
|
(props2, forwardedRef) => {
|
|
38588
38637
|
const { __scopeAccordion, ...triggerProps } = props2;
|
|
38589
38638
|
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
@@ -38605,7 +38654,7 @@ var init_dist15 = __esm({
|
|
|
38605
38654
|
);
|
|
38606
38655
|
AccordionTrigger.displayName = TRIGGER_NAME2;
|
|
38607
38656
|
CONTENT_NAME2 = "AccordionContent";
|
|
38608
|
-
AccordionContent =
|
|
38657
|
+
AccordionContent = React38.forwardRef(
|
|
38609
38658
|
(props2, forwardedRef) => {
|
|
38610
38659
|
const { __scopeAccordion, ...contentProps } = props2;
|
|
38611
38660
|
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
@@ -38639,7 +38688,7 @@ var init_dist15 = __esm({
|
|
|
38639
38688
|
});
|
|
38640
38689
|
|
|
38641
38690
|
// ../blocks/src/system/runtime/shared/accordionPrimitives.tsx
|
|
38642
|
-
import * as
|
|
38691
|
+
import * as React39 from "react";
|
|
38643
38692
|
import { jsx as jsx127 } from "react/jsx-runtime";
|
|
38644
38693
|
var Accordion2, AccordionItem2, AccordionTrigger2, AccordionContent2;
|
|
38645
38694
|
var init_accordionPrimitives = __esm({
|
|
@@ -38648,11 +38697,11 @@ var init_accordionPrimitives = __esm({
|
|
|
38648
38697
|
"use client";
|
|
38649
38698
|
init_dist15();
|
|
38650
38699
|
Accordion2 = Root2;
|
|
38651
|
-
AccordionItem2 =
|
|
38700
|
+
AccordionItem2 = React39.forwardRef(({ className, ...props2 }, ref) => /* @__PURE__ */ jsx127(Item, { ref, className, ...props2 }));
|
|
38652
38701
|
AccordionItem2.displayName = "AccordionItem";
|
|
38653
|
-
AccordionTrigger2 =
|
|
38702
|
+
AccordionTrigger2 = React39.forwardRef(({ className, children, ...props2 }, ref) => /* @__PURE__ */ jsx127(Header, { className: "accordion-header", children: /* @__PURE__ */ jsx127(Trigger2, { ref, className, ...props2, children }) }));
|
|
38654
38703
|
AccordionTrigger2.displayName = "AccordionTrigger";
|
|
38655
|
-
AccordionContent2 =
|
|
38704
|
+
AccordionContent2 = React39.forwardRef(({ className, children, ...props2 }, ref) => /* @__PURE__ */ jsx127(
|
|
38656
38705
|
Content2,
|
|
38657
38706
|
{
|
|
38658
38707
|
ref,
|
|
@@ -38667,7 +38716,7 @@ var init_accordionPrimitives = __esm({
|
|
|
38667
38716
|
});
|
|
38668
38717
|
|
|
38669
38718
|
// ../blocks/src/system/runtime/nodes/accordion.tsx
|
|
38670
|
-
import
|
|
38719
|
+
import React40 from "react";
|
|
38671
38720
|
import { jsx as jsx128, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
38672
38721
|
var ACCORDION_ICONS2, AccordionNode, AccordionItemNode;
|
|
38673
38722
|
var init_accordion = __esm({
|
|
@@ -38746,7 +38795,7 @@ var init_accordion = __esm({
|
|
|
38746
38795
|
pathBase: _pathBase,
|
|
38747
38796
|
...rest
|
|
38748
38797
|
}) => {
|
|
38749
|
-
const generatedId =
|
|
38798
|
+
const generatedId = React40.useId();
|
|
38750
38799
|
const resolvedValue = value !== void 0 && value !== null ? String(value) : generatedId;
|
|
38751
38800
|
const triggerSource = trigger ?? question;
|
|
38752
38801
|
const contentSource = content ?? answer;
|
|
@@ -38782,7 +38831,7 @@ var init_accordion = __esm({
|
|
|
38782
38831
|
});
|
|
38783
38832
|
|
|
38784
38833
|
// ../blocks/src/system/runtime/header/HeaderCartDrawer.tsx
|
|
38785
|
-
import * as
|
|
38834
|
+
import * as React41 from "react";
|
|
38786
38835
|
import { jsx as jsx129, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
38787
38836
|
function normalizeQuantityInput(value) {
|
|
38788
38837
|
const parsed = Number(value);
|
|
@@ -38832,8 +38881,8 @@ function HeaderCartDrawerItems(props2) {
|
|
|
38832
38881
|
)) });
|
|
38833
38882
|
}
|
|
38834
38883
|
function HeaderCartDrawer(props2) {
|
|
38835
|
-
const titleId =
|
|
38836
|
-
const display =
|
|
38884
|
+
const titleId = React41.useId();
|
|
38885
|
+
const display = React41.useMemo(
|
|
38837
38886
|
() => buildCartDisplay(props2.cart.items, {
|
|
38838
38887
|
heading: "Cart",
|
|
38839
38888
|
emptyMessage: "Your cart is empty.",
|
|
@@ -39047,15 +39096,15 @@ var init_HeaderCartTrigger = __esm({
|
|
|
39047
39096
|
});
|
|
39048
39097
|
|
|
39049
39098
|
// ../blocks/src/system/runtime/header/headerCartRuntime.tsx
|
|
39050
|
-
import * as
|
|
39099
|
+
import * as React42 from "react";
|
|
39051
39100
|
import { createPortal as createPortal2 } from "react-dom";
|
|
39052
39101
|
import { createRoot } from "react-dom/client";
|
|
39053
39102
|
import { Fragment as Fragment21, jsx as jsx131, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
39054
39103
|
function HeaderCartRuntime(props2) {
|
|
39055
39104
|
const cart2 = useCommerceCart(props2.siteId);
|
|
39056
|
-
const itemCount =
|
|
39057
|
-
const [open, setOpen] =
|
|
39058
|
-
const checkoutHref =
|
|
39105
|
+
const itemCount = React42.useMemo(() => getCartItemCount(cart2.items), [cart2.items]);
|
|
39106
|
+
const [open, setOpen] = React42.useState(false);
|
|
39107
|
+
const checkoutHref = React42.useMemo(
|
|
39059
39108
|
() => resolveHeaderCartCheckoutHref(
|
|
39060
39109
|
props2.mounts,
|
|
39061
39110
|
typeof window === "undefined" ? null : window.location.pathname
|
|
@@ -42573,7 +42622,7 @@ var init_newsletter_form_client = __esm({
|
|
|
42573
42622
|
});
|
|
42574
42623
|
|
|
42575
42624
|
// ../blocks/src/system/runtime/components/registry.client.tsx
|
|
42576
|
-
import
|
|
42625
|
+
import React53 from "react";
|
|
42577
42626
|
function isRecord4(value) {
|
|
42578
42627
|
return typeof value === "object" && value !== null;
|
|
42579
42628
|
}
|
|
@@ -42665,7 +42714,7 @@ function defineRuntimeBackedBlockClientEntry(kind, client) {
|
|
|
42665
42714
|
const NormalizedClient = (props2) => {
|
|
42666
42715
|
const ClientComponent = client;
|
|
42667
42716
|
const normalizedProps = normalizeLegacyInteractiveRenderProps(serverEntry.definition.runtime, mode, props2);
|
|
42668
|
-
return
|
|
42717
|
+
return React53.createElement(ClientComponent, normalizedProps);
|
|
42669
42718
|
};
|
|
42670
42719
|
NormalizedClient.displayName = `RuntimeBackedBlockClient(${kind})`;
|
|
42671
42720
|
return {
|
|
@@ -47570,7 +47619,7 @@ init_responsiveMode();
|
|
|
47570
47619
|
import { jsx as jsx168 } from "react/jsx-runtime";
|
|
47571
47620
|
|
|
47572
47621
|
// ../theme-core/src/ThemeFontLoader.tsx
|
|
47573
|
-
import * as
|
|
47622
|
+
import * as React54 from "react";
|
|
47574
47623
|
init_selectorUtils();
|
|
47575
47624
|
import { Fragment as Fragment25, jsx as jsx169, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
47576
47625
|
|