@riverbankcms/sdk 0.60.9 → 0.60.11

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.
@@ -465,6 +465,92 @@ function encodePublicProductCategorySelector(selector) {
465
465
  };
466
466
  }
467
467
  }
468
+ function isRecord(value) {
469
+ return typeof value === "object" && value !== null;
470
+ }
471
+ function isJsonResponseContentType(contentType) {
472
+ if (!contentType) return false;
473
+ const mimeType = contentType.split(";", 1)[0]?.trim().toLowerCase() ?? "";
474
+ return mimeType === "application/json" || mimeType.endsWith("+json");
475
+ }
476
+ function getResponseContentType(response) {
477
+ return response.headers.get("content-type");
478
+ }
479
+ async function parseJsonBody(response) {
480
+ const rawText = await response.text();
481
+ if (rawText.trim().length === 0) {
482
+ return { kind: "empty-body" };
483
+ }
484
+ try {
485
+ return { kind: "success", value: JSON.parse(rawText) };
486
+ } catch {
487
+ return { kind: "invalid-json" };
488
+ }
489
+ }
490
+ function getBlockApiErrorDetails(data) {
491
+ if (!isRecord(data)) {
492
+ return {};
493
+ }
494
+ const nestedError = isRecord(data.error) ? data.error : void 0;
495
+ const message = typeof nestedError?.message === "string" ? nestedError.message : typeof data.message === "string" ? data.message : void 0;
496
+ const code = typeof nestedError?.code === "string" ? nestedError.code : typeof data.code === "string" ? data.code : void 0;
497
+ return { message, code };
498
+ }
499
+ function buildUnexpectedJsonResponseMessage(parseResult) {
500
+ switch (parseResult.kind) {
501
+ case "empty-body":
502
+ return "Expected JSON response body but received an empty response";
503
+ case "invalid-json":
504
+ return "Expected JSON response but received invalid JSON";
505
+ }
506
+ }
507
+ async function extractErrorDetails(response) {
508
+ const contentType = getResponseContentType(response);
509
+ const fallbackMessage = `Request failed: ${response.statusText}`;
510
+ if (!isJsonResponseContentType(contentType)) {
511
+ return {
512
+ message: `${fallbackMessage} (received ${contentType ?? "unknown content type"})`
513
+ };
514
+ }
515
+ const parseResult = await parseJsonBody(response);
516
+ switch (parseResult.kind) {
517
+ case "success": {
518
+ const details = getBlockApiErrorDetails(parseResult.value);
519
+ return {
520
+ message: details.message ?? fallbackMessage,
521
+ code: details.code
522
+ };
523
+ }
524
+ case "invalid-json":
525
+ return {
526
+ message: `${fallbackMessage} (received invalid JSON)`
527
+ };
528
+ case "empty-body":
529
+ return {
530
+ message: `${fallbackMessage} (received an empty response)`
531
+ };
532
+ }
533
+ }
534
+ async function parseJsonApiResponse(response) {
535
+ if (response.status === 204 || response.status === 205) {
536
+ return void 0;
537
+ }
538
+ const contentType = getResponseContentType(response);
539
+ if (!isJsonResponseContentType(contentType)) {
540
+ throw new BlockApiError(
541
+ `Expected JSON response but received ${contentType ?? "unknown content type"}`,
542
+ response.status
543
+ );
544
+ }
545
+ const parseResult = await parseJsonBody(response);
546
+ if (parseResult.kind !== "success") {
547
+ throw new BlockApiError(
548
+ buildUnexpectedJsonResponseMessage(parseResult),
549
+ response.status
550
+ );
551
+ }
552
+ return parseResult.value;
553
+ }
468
554
  function getAuthHeaders(auth) {
469
555
  switch (auth.type) {
470
556
  case "api-key":
@@ -521,21 +607,10 @@ function createBlockApi(config) {
521
607
  const doFetch = async () => {
522
608
  const response = await fetch(url, fetchOptions);
523
609
  if (!response.ok) {
524
- let errorMessage = `Request failed: ${response.statusText}`;
525
- let errorCode;
526
- try {
527
- const errorData = await response.json();
528
- if (typeof errorData.error?.message === "string") {
529
- errorMessage = errorData.error.message;
530
- } else if (typeof errorData.message === "string") {
531
- errorMessage = errorData.message;
532
- }
533
- errorCode = errorData.error?.code || errorData.code;
534
- } catch {
535
- }
536
- throw new BlockApiError(errorMessage, response.status, errorCode);
610
+ const details = await extractErrorDetails(response);
611
+ throw new BlockApiError(details.message, response.status, details.code);
537
612
  }
538
- const json = await response.json();
613
+ const json = await parseJsonApiResponse(response);
539
614
  if (isApiSuccessResponse(json)) {
540
615
  return json.data;
541
616
  }
@@ -1520,6 +1595,15 @@ var init_layout = __esm({
1520
1595
 
1521
1596
  // ../theme-core/src/buttons/types.ts
1522
1597
  import { z } from "zod";
1598
+ function isVariantRole(value) {
1599
+ return VARIANT_ROLES.includes(value);
1600
+ }
1601
+ function asSpecialVariantId(value) {
1602
+ if (value.length === 0) {
1603
+ throw new Error("SpecialVariantId must be a non-empty string");
1604
+ }
1605
+ return value;
1606
+ }
1523
1607
  var VARIANT_ROLES, DEFAULT_VARIANT_ALIAS_ID, cornerStyleSchema, shadowSizeSchema, textTransformSchema, fontWeightSchema, buttonTypographySchema, letterSpacingSchema, hoverTransformSchema, hoverColorSchema, buttonPaddingPresetSchema, gradientStyleSchema, gradientSharpnessSchema, prioritySchema, variantRoleSchema, buttonSizeNameSchema, PADDING_TOKEN_PATTERN, paddingShorthandSchema, buttonSizeConfigSchema, buttonSizesSchema, buttonGlobalSettingsSchema, gradientDirectionSchema, buttonBackgroundSchema, effectApplicationSchema, buttonBorderSchema, variantShadowSchema, variantEffectsSchema, variantSizeOverridesSchema, buttonVariantSchema, buttonSystemSchema;
1524
1608
  var init_types = __esm({
1525
1609
  "../theme-core/src/buttons/types.ts"() {
@@ -1672,6 +1756,48 @@ var init_types = __esm({
1672
1756
  }
1673
1757
  });
1674
1758
 
1759
+ // ../theme-core/src/buttons/classNames.ts
1760
+ function parseThemeButtonVariantId(value) {
1761
+ const normalized = value?.trim() ?? "";
1762
+ if (normalized.length === 0) {
1763
+ return null;
1764
+ }
1765
+ if (normalized === DEFAULT_VARIANT_ALIAS_ID) {
1766
+ return DEFAULT_VARIANT_ALIAS_ID;
1767
+ }
1768
+ return isVariantRole(normalized) ? normalized : asSpecialVariantId(normalized);
1769
+ }
1770
+ function themeButtonVariantClassNames(variant) {
1771
+ if (variant === DEFAULT_VARIANT_ALIAS_ID) {
1772
+ return [variant];
1773
+ }
1774
+ return [variant, `button-${variant}`];
1775
+ }
1776
+ function themeButtonSizeClassName(size) {
1777
+ return `btn-${size}`;
1778
+ }
1779
+ function themeButtonSelector(variant, size) {
1780
+ const baseSelector = `.${variant}`;
1781
+ if (!size) {
1782
+ return baseSelector;
1783
+ }
1784
+ return `${baseSelector}.${themeButtonSizeClassName(size)}`;
1785
+ }
1786
+ function themeButtonClassName(spec) {
1787
+ const classes = [
1788
+ ...themeButtonVariantClassNames(spec.variant),
1789
+ themeButtonSizeClassName(spec.size),
1790
+ spec.extraClassName
1791
+ ];
1792
+ return classes.filter(Boolean).join(" ");
1793
+ }
1794
+ var init_classNames = __esm({
1795
+ "../theme-core/src/buttons/classNames.ts"() {
1796
+ "use strict";
1797
+ init_types();
1798
+ }
1799
+ });
1800
+
1675
1801
  // ../theme-core/src/tokens/resolver.ts
1676
1802
  var TokenResolver;
1677
1803
  var init_resolver = __esm({
@@ -3345,17 +3471,25 @@ function resolveAliasSource(enabled) {
3345
3471
  }
3346
3472
  function variantChunks(variant, global, themeSizes, themeId, tokens, theme) {
3347
3473
  const out = [];
3348
- out.push(variantBaseRule(variant, global, themeId, tokens, theme));
3349
- const hoverBg = variantHoverBackgroundRule(variant, global, themeId, tokens);
3474
+ const variantId = parseButtonVariantIdForCss(variant.id);
3475
+ out.push(variantBaseRule(variant, variantId, global, themeId, tokens, theme));
3476
+ const hoverBg = variantHoverBackgroundRule(variant, variantId, global, themeId, tokens);
3350
3477
  if (hoverBg) out.push(hoverBg);
3351
3478
  const effects = variantEffectsCss(variant, themeId, tokens, theme);
3352
3479
  if (effects) out.push({ raw: effects });
3353
- out.push(...variantDisabledRules(variant, themeId));
3354
- out.push(...variantSizeRules(variant, themeSizes, themeId));
3480
+ out.push(...variantDisabledRules(variantId, themeId));
3481
+ out.push(...variantSizeRules(variant, variantId, themeSizes, themeId));
3355
3482
  return out;
3356
3483
  }
3357
- function variantBaseRule(variant, global, themeId, tokens, theme) {
3358
- const selector = `:where([data-theme-scope="${themeId}"]) .${variant.id}`;
3484
+ function parseButtonVariantIdForCss(value) {
3485
+ const variantId = parseThemeButtonVariantId(value);
3486
+ if (!variantId) {
3487
+ throw new Error("Button variant id must be a non-empty string");
3488
+ }
3489
+ return variantId;
3490
+ }
3491
+ function variantBaseRule(variant, variantId, global, themeId, tokens, theme) {
3492
+ const selector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}`;
3359
3493
  const decls = [];
3360
3494
  decls.push(["font-weight", String(global.fontWeight)]);
3361
3495
  decls.push(["font-family", resolveFontFamily(global)]);
@@ -3388,13 +3522,13 @@ function variantBaseRule(variant, global, themeId, tokens, theme) {
3388
3522
  }
3389
3523
  return rule(selector, decls);
3390
3524
  }
3391
- function variantHoverBackgroundRule(variant, global, themeId, tokens) {
3525
+ function variantHoverBackgroundRule(variant, variantId, global, themeId, tokens) {
3392
3526
  let hoverToken = variant.hoverBackgroundToken;
3393
3527
  if (!hoverToken && global.hoverColor === "token" && global.hoverColorToken) {
3394
3528
  hoverToken = global.hoverColorToken;
3395
3529
  }
3396
3530
  if (!hoverToken) return null;
3397
- return rule(`:where([data-theme-scope="${themeId}"]) .${variant.id}:hover`, [
3531
+ return rule(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:hover`, [
3398
3532
  ["background-color", tokens.getColor(hoverToken)]
3399
3533
  ]);
3400
3534
  }
@@ -3414,8 +3548,8 @@ function variantEffectsCss(variant, themeId, tokens, theme) {
3414
3548
  theme
3415
3549
  });
3416
3550
  }
3417
- function variantDisabledRules(variant, themeId) {
3418
- const base = `:where([data-theme-scope="${themeId}"]) .${variant.id}:disabled`;
3551
+ function variantDisabledRules(variantId, themeId) {
3552
+ const base = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:disabled`;
3419
3553
  const disabledSelectors = [base, `${base}:hover`, `${base}:active`, `${base}:focus`];
3420
3554
  const pseudoSelectors = [`${base}::before`, `${base}::after`];
3421
3555
  return [
@@ -3433,12 +3567,12 @@ function variantDisabledRules(variant, themeId) {
3433
3567
  ])
3434
3568
  ];
3435
3569
  }
3436
- function variantSizeRules(variant, themeSizes, themeId) {
3570
+ function variantSizeRules(variant, variantId, themeSizes, themeId) {
3437
3571
  const borderWidth = variant.border ? BORDER_WIDTH_MAP[variant.border.widthClass] || "1px" : "0px";
3438
3572
  const rules = [];
3439
3573
  for (const sizeName of BUTTON_SIZE_NAMES) {
3440
3574
  const config = resolveSizeConfig(variant, sizeName, themeSizes);
3441
- const selector = `:where([data-theme-scope="${themeId}"]) .${variant.id}.btn-${sizeName}`;
3575
+ const selector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId, sizeName)}`;
3442
3576
  const decls = [];
3443
3577
  for (const decl of paddingDeclarations(config.padding, borderWidth)) decls.push(decl);
3444
3578
  if (config.fontSize) {
@@ -3501,6 +3635,7 @@ var init_generateButtonCss = __esm({
3501
3635
  "../theme-core/src/buttons/generateButtonCss.ts"() {
3502
3636
  "use strict";
3503
3637
  init_types();
3638
+ init_classNames();
3504
3639
  init_resolver();
3505
3640
  init_generateEffectsCSS();
3506
3641
  init_constants();
@@ -4181,6 +4316,7 @@ var init_buttons = __esm({
4181
4316
  "../theme-core/src/buttons/index.ts"() {
4182
4317
  "use strict";
4183
4318
  init_types();
4319
+ init_classNames();
4184
4320
  init_generateButtonCss();
4185
4321
  init_generateDefaultButtonSystem();
4186
4322
  init_constants();
@@ -4969,11 +5105,11 @@ var init_fileAssetLegacyProjection = __esm({
4969
5105
  });
4970
5106
 
4971
5107
  // ../media-core/src/typeGuards.ts
4972
- function isRecord(value) {
5108
+ function isRecord2(value) {
4973
5109
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
4974
5110
  }
4975
5111
  function asRecord(value) {
4976
- return isRecord(value) ? value : void 0;
5112
+ return isRecord2(value) ? value : void 0;
4977
5113
  }
4978
5114
  var init_typeGuards = __esm({
4979
5115
  "../media-core/src/typeGuards.ts"() {
@@ -6717,7 +6853,7 @@ var init_Text = __esm({
6717
6853
  });
6718
6854
 
6719
6855
  // ../blocks/src/lib/typeGuards.ts
6720
- function isRecord2(value) {
6856
+ function isRecord3(value) {
6721
6857
  return typeof value === "object" && value !== null && !Array.isArray(value);
6722
6858
  }
6723
6859
  function isObjectRecord(value) {
@@ -6769,11 +6905,11 @@ function markdownToTipTapDoc(markdown) {
6769
6905
  };
6770
6906
  }
6771
6907
  function coerceRichTextDoc(value) {
6772
- const raw = isRecord2(value) && "doc" in value ? value.doc : value;
6908
+ const raw = isRecord3(value) && "doc" in value ? value.doc : value;
6773
6909
  if (typeof raw === "string") {
6774
6910
  return markdownToTipTapDoc(raw);
6775
6911
  }
6776
- if (isRecord2(raw) && typeof raw.type === "string") {
6912
+ if (isRecord3(raw) && typeof raw.type === "string") {
6777
6913
  return raw;
6778
6914
  }
6779
6915
  return null;
@@ -6833,11 +6969,12 @@ var init_basic = __esm({
6833
6969
  }
6834
6970
  return null;
6835
6971
  }
6836
- const resolvedVariantId = typeof variantId === "string" ? variantId.trim() : "";
6837
- const normalizedVariantId = resolvedVariantId === DEFAULT_VARIANT_ALIAS_ID ? "" : resolvedVariantId;
6838
- const variantClasses = normalizedVariantId ? [normalizedVariantId, `button-${normalizedVariantId}`] : [];
6839
- const sizeClass = `btn-${size}`;
6840
- const combinedClassName = [...variantClasses, sizeClass, className].filter(Boolean).join(" ");
6972
+ const resolvedVariantId = parseThemeButtonVariantId(variantId);
6973
+ const combinedClassName = resolvedVariantId ? themeButtonClassName({
6974
+ variant: resolvedVariantId,
6975
+ size,
6976
+ extraClassName: className
6977
+ }) : className;
6841
6978
  if (resolvedHref) {
6842
6979
  return /* @__PURE__ */ jsx10(
6843
6980
  "a",
@@ -7842,19 +7979,6 @@ var init_media2 = __esm({
7842
7979
  }
7843
7980
  });
7844
7981
 
7845
- // ../blocks/src/system/runtime/shared/themedButtonClass.ts
7846
- function themedButtonClass(spec) {
7847
- const { variant, size, extraClassName } = spec;
7848
- const normalizedVariant = variant.trim();
7849
- const variantClasses = normalizedVariant ? [normalizedVariant, `button-${normalizedVariant}`] : [];
7850
- return [...variantClasses, `btn-${size}`, extraClassName].filter(Boolean).join(" ");
7851
- }
7852
- var init_themedButtonClass = __esm({
7853
- "../blocks/src/system/runtime/shared/themedButtonClass.ts"() {
7854
- "use strict";
7855
- }
7856
- });
7857
-
7858
7982
  // ../blocks/src/system/runtime/nodes/file-download.tsx
7859
7983
  import { jsx as jsx13, jsxs } from "react/jsx-runtime";
7860
7984
  function isDownloadableMediaType(type) {
@@ -7928,7 +8052,7 @@ function FileDownloadNode({
7928
8052
  {
7929
8053
  href,
7930
8054
  download: filename,
7931
- className: themedButtonClass({
8055
+ className: themeButtonClassName({
7932
8056
  variant,
7933
8057
  size: "md",
7934
8058
  extraClassName: "rb-inline-flex rb-shrink-0 rb-items-center rb-justify-center rb-gap-2"
@@ -7948,7 +8072,7 @@ var init_file_download = __esm({
7948
8072
  init_lucide_react();
7949
8073
  init_colorStyles();
7950
8074
  init_media2();
7951
- init_themedButtonClass();
8075
+ init_buttons();
7952
8076
  init_media();
7953
8077
  FILE_DOWNLOAD_BUTTON_VARIANTS = ["primary", "secondary", "outline", "link"];
7954
8078
  }
@@ -11560,7 +11684,7 @@ var init_EventCard = __esm({
11560
11684
  init_EventCardIcons();
11561
11685
  init_eventCapacity();
11562
11686
  init_utils();
11563
- init_themedButtonClass();
11687
+ init_buttons();
11564
11688
  EventCard = ({
11565
11689
  event,
11566
11690
  cardVariant = "default",
@@ -11586,7 +11710,7 @@ var init_EventCard = __esm({
11586
11710
  const isSoldOut = cta.hidden;
11587
11711
  const { available: spotsLeft } = getEventAvailability(event);
11588
11712
  const cardClass = `card-${cardVariant}`;
11589
- const buttonClass = themedButtonClass({ variant: buttonVariant, size: "md" });
11713
+ const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
11590
11714
  const title = event.title;
11591
11715
  const summary = event.presentation?.summary ?? event.description;
11592
11716
  const image = event.presentation?.image ?? null;
@@ -11668,7 +11792,7 @@ var init_EventCompactRow = __esm({
11668
11792
  "use strict";
11669
11793
  init_utils();
11670
11794
  init_EventCardIcons();
11671
- init_themedButtonClass();
11795
+ init_buttons();
11672
11796
  EventCompactRow = ({
11673
11797
  event,
11674
11798
  buttonVariant = "primary",
@@ -11680,7 +11804,7 @@ var init_EventCompactRow = __esm({
11680
11804
  const price = formatEventPrice(event);
11681
11805
  const teacherLine = formatEventTeacherLine(event);
11682
11806
  const cta = resolveEventCta(event, buttonText);
11683
- const buttonClass = themedButtonClass({ variant: buttonVariant, size: "sm" });
11807
+ const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "sm" });
11684
11808
  return /* @__PURE__ */ jsxs17("div", { className: "event-compact-row", children: [
11685
11809
  /* @__PURE__ */ jsxs17("div", { className: "event-compact-row-content", children: [
11686
11810
  /* @__PURE__ */ jsxs17("div", { className: "event-compact-row-top", children: [
@@ -11752,7 +11876,7 @@ var init_EventSpotlight = __esm({
11752
11876
  "../blocks/src/system/runtime/nodes/events/EventSpotlight.tsx"() {
11753
11877
  "use strict";
11754
11878
  init_shared3();
11755
- init_themedButtonClass();
11879
+ init_buttons();
11756
11880
  EventSpotlight = ({
11757
11881
  events,
11758
11882
  layout = "grid",
@@ -11774,7 +11898,7 @@ var init_EventSpotlight = __esm({
11774
11898
  }
11775
11899
  const containerClass = getContainerClass(layout, columns);
11776
11900
  const cardOrientation = getCardOrientation(layout);
11777
- const buttonClass = themedButtonClass({ variant: buttonVariant, size: "md" });
11901
+ const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
11778
11902
  return /* @__PURE__ */ jsxs19("div", { className: `event-spotlight-section ${className || ""}`, "data-block": "event-spotlight", children: [
11779
11903
  /* @__PURE__ */ jsx33("div", { className: `event-spotlight ${containerClass}`, children: normalizedEvents.map((event) => /* @__PURE__ */ jsx33(
11780
11904
  EventCard,
@@ -23488,7 +23612,16 @@ var init_view3 = __esm({
23488
23612
  import { Fragment as Fragment5, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
23489
23613
  function renderServerPendingAction(label, soldOut) {
23490
23614
  return /* @__PURE__ */ jsxs22(Fragment5, { children: [
23491
- /* @__PURE__ */ jsx37("button", { type: "button", className: "default", disabled: true, "aria-disabled": "true", children: soldOut ? "Sold out" : label }),
23615
+ /* @__PURE__ */ jsx37(
23616
+ "button",
23617
+ {
23618
+ type: "button",
23619
+ className: themeButtonClassName({ variant: "default", size: "md" }),
23620
+ disabled: true,
23621
+ "aria-disabled": "true",
23622
+ children: soldOut ? "Sold out" : label
23623
+ }
23624
+ ),
23492
23625
  !soldOut ? /* @__PURE__ */ jsx37("p", { className: "rb-caption status-muted", children: "Cart actions become interactive after page load." }) : null
23493
23626
  ] });
23494
23627
  }
@@ -23508,7 +23641,14 @@ function ProductListServerContent(props2) {
23508
23641
  ),
23509
23642
  actions: /* @__PURE__ */ jsxs22(Fragment5, { children: [
23510
23643
  renderServerPendingAction(card.actionLabel, card.soldOut),
23511
- card.path ? /* @__PURE__ */ jsx37("a", { href: card.path, className: "secondary btn-sm", children: "View details" }) : null
23644
+ card.path ? /* @__PURE__ */ jsx37(
23645
+ "a",
23646
+ {
23647
+ href: card.path,
23648
+ className: themeButtonClassName({ variant: "secondary", size: "sm" }),
23649
+ children: "View details"
23650
+ }
23651
+ ) : null
23512
23652
  ] })
23513
23653
  },
23514
23654
  card.productId
@@ -23551,6 +23691,7 @@ function CheckoutServerContent(props2) {
23551
23691
  var init_shop_commerce_server = __esm({
23552
23692
  "../blocks/src/system/runtime/nodes/shop-commerce.server.tsx"() {
23553
23693
  "use strict";
23694
+ init_buttons();
23554
23695
  init_RichText();
23555
23696
  init_carousel_server();
23556
23697
  init_richText_coerce();
@@ -24099,7 +24240,7 @@ function renderCalendarGrid(display) {
24099
24240
  "button",
24100
24241
  {
24101
24242
  type: "button",
24102
- className: themedButtonClass({
24243
+ className: themeButtonClassName({
24103
24244
  variant: display.buttonVariant,
24104
24245
  size: "sm"
24105
24246
  }),
@@ -24185,7 +24326,7 @@ function renderTimetableSsr(display) {
24185
24326
  "button",
24186
24327
  {
24187
24328
  type: "button",
24188
- className: themedButtonClass({
24329
+ className: themeButtonClassName({
24189
24330
  variant: display.buttonVariant,
24190
24331
  size: "sm"
24191
24332
  }),
@@ -24313,7 +24454,7 @@ var init_EventCalendar_server = __esm({
24313
24454
  init_renderEventListItem();
24314
24455
  init_utils();
24315
24456
  init_timetableModel();
24316
- init_themedButtonClass();
24457
+ init_buttons();
24317
24458
  EventCalendarSSR = (props2) => {
24318
24459
  const islandProps = buildEventCalendarInteractiveIslandProps(props2);
24319
24460
  const display = islandProps.render.display;
@@ -24444,7 +24585,7 @@ var init_form_server = __esm({
24444
24585
  "use strict";
24445
24586
  init_clsx();
24446
24587
  init_ssr();
24447
- init_themedButtonClass();
24588
+ init_buttons();
24448
24589
  init_form_interactive();
24449
24590
  FormNodeSSR = ({
24450
24591
  blockId,
@@ -24582,7 +24723,7 @@ var init_form_server = __esm({
24582
24723
  "button",
24583
24724
  {
24584
24725
  type: "submit",
24585
- className: themedButtonClass({
24726
+ className: themeButtonClassName({
24586
24727
  variant: "primary",
24587
24728
  size: "md",
24588
24729
  extraClassName: "rb-w-full rb-sm-w-auto"
@@ -24675,7 +24816,7 @@ function NewsletterFormSSR({
24675
24816
  "button",
24676
24817
  {
24677
24818
  type: "submit",
24678
- className: themedButtonClass({ variant: "primary", size: "md" }),
24819
+ className: themeButtonClassName({ variant: "primary", size: "md" }),
24679
24820
  children: display.buttonLabel
24680
24821
  }
24681
24822
  ) })
@@ -24692,7 +24833,7 @@ var init_newsletter_form_server = __esm({
24692
24833
  "use strict";
24693
24834
  init_clsx();
24694
24835
  init_ssr();
24695
- init_themedButtonClass();
24836
+ init_buttons();
24696
24837
  init_newsletter_form_interactive();
24697
24838
  newsletter_form_server_default = NewsletterFormSSR;
24698
24839
  }
@@ -24823,7 +24964,16 @@ function ShopSSR({
24823
24964
  PassCardView,
24824
24965
  {
24825
24966
  display: pass,
24826
- action: /* @__PURE__ */ jsx50("button", { type: "button", className: "default", disabled: true, "aria-disabled": "true", children: pass.actionLabel })
24967
+ action: /* @__PURE__ */ jsx50(
24968
+ "button",
24969
+ {
24970
+ type: "button",
24971
+ className: themeButtonClassName({ variant: "default", size: "md" }),
24972
+ disabled: true,
24973
+ "aria-disabled": "true",
24974
+ children: pass.actionLabel
24975
+ }
24976
+ )
24827
24977
  },
24828
24978
  pass.id
24829
24979
  )),
@@ -24831,7 +24981,16 @@ function ShopSSR({
24831
24981
  MembershipCardView,
24832
24982
  {
24833
24983
  display: membership,
24834
- action: /* @__PURE__ */ jsx50("button", { type: "button", className: "default", disabled: true, "aria-disabled": "true", children: membership.actionLabel })
24984
+ action: /* @__PURE__ */ jsx50(
24985
+ "button",
24986
+ {
24987
+ type: "button",
24988
+ className: themeButtonClassName({ variant: "default", size: "md" }),
24989
+ disabled: true,
24990
+ "aria-disabled": "true",
24991
+ children: membership.actionLabel
24992
+ }
24993
+ )
24835
24994
  },
24836
24995
  membership.id
24837
24996
  ))
@@ -24846,6 +25005,7 @@ var shop_server_default;
24846
25005
  var init_shop_server = __esm({
24847
25006
  "../blocks/src/system/runtime/nodes/shop.server.tsx"() {
24848
25007
  "use strict";
25008
+ init_buttons();
24849
25009
  init_ssr();
24850
25010
  init_view3();
24851
25011
  init_shop_interactive();
@@ -28272,7 +28432,7 @@ function MultiStepForm({
28272
28432
  type: "button",
28273
28433
  onClick: goToPrevious,
28274
28434
  disabled: !canGoBack,
28275
- className: "outline btn-md",
28435
+ className: themeButtonClassName({ variant: "outline", size: "md" }),
28276
28436
  children: backButtonLabel
28277
28437
  }
28278
28438
  ),
@@ -28282,7 +28442,11 @@ function MultiStepForm({
28282
28442
  type: "button",
28283
28443
  onClick: goToNext,
28284
28444
  disabled: !canGoNext,
28285
- className: "primary btn-md rb-flex-1",
28445
+ className: themeButtonClassName({
28446
+ variant: "primary",
28447
+ size: "md",
28448
+ extraClassName: "rb-flex-1"
28449
+ }),
28286
28450
  children: [
28287
28451
  (isValidating || isSubmitting) && /* @__PURE__ */ jsx52(
28288
28452
  SpinnerNode,
@@ -28398,6 +28562,7 @@ var init_MultiStepForm = __esm({
28398
28562
  "../blocks/src/system/runtime/components/multi-step/MultiStepForm.tsx"() {
28399
28563
  "use strict";
28400
28564
  "use client";
28565
+ init_buttons();
28401
28566
  init_MultiStepContext();
28402
28567
  init_useMultiStep();
28403
28568
  init_spinner();
@@ -29660,7 +29825,10 @@ function PaymentOptionSelectionStep({
29660
29825
  "button",
29661
29826
  {
29662
29827
  type: "button",
29663
- className: isSelected ? "primary btn-md" : "outline btn-md",
29828
+ className: themeButtonClassName({
29829
+ variant: isSelected ? "primary" : "outline",
29830
+ size: "md"
29831
+ }),
29664
29832
  style: paymentOptionLayoutStyle,
29665
29833
  onClick: () => updateData({
29666
29834
  selectedAppointmentPackageId: appointmentPackage.customerPassId,
@@ -29709,7 +29877,10 @@ function PaymentOptionSelectionStep({
29709
29877
  "button",
29710
29878
  {
29711
29879
  type: "button",
29712
- className: isSelected ? "primary btn-md" : "outline btn-md",
29880
+ className: themeButtonClassName({
29881
+ variant: isSelected ? "primary" : "outline",
29882
+ size: "md"
29883
+ }),
29713
29884
  style: paymentOptionLayoutStyle,
29714
29885
  onClick: () => updateData({
29715
29886
  selectedAppointmentPackageId: void 0,
@@ -29738,6 +29909,7 @@ var init_PaymentOptionSelectionStep = __esm({
29738
29909
  "../blocks/src/system/runtime/components/booking/PaymentOptionSelectionStep.tsx"() {
29739
29910
  "use strict";
29740
29911
  "use client";
29912
+ init_buttons();
29741
29913
  init_api();
29742
29914
  init_MultiStepContext();
29743
29915
  init_booking_form_state();
@@ -31370,6 +31542,7 @@ var init_booking_form_client = __esm({
31370
31542
  init_noop();
31371
31543
  init_client2();
31372
31544
  init_src3();
31545
+ init_buttons();
31373
31546
  init_api();
31374
31547
  init_MultiStepForm();
31375
31548
  init_SuccessMessage();
@@ -31606,7 +31779,7 @@ var init_booking_form_client = __esm({
31606
31779
  "button",
31607
31780
  {
31608
31781
  type: "button",
31609
- className: "secondary btn-sm",
31782
+ className: themeButtonClassName({ variant: "secondary", size: "sm" }),
31610
31783
  onClick: clearFeedback,
31611
31784
  children: "Dismiss"
31612
31785
  }
@@ -32981,7 +33154,7 @@ var init_PaymentSelectionStep = __esm({
32981
33154
  init_lucide_react();
32982
33155
  init_utils3();
32983
33156
  init_spinner();
32984
- init_themedButtonClass();
33157
+ init_buttons();
32985
33158
  init_CheckIcon2();
32986
33159
  init_SelectableOptionCard();
32987
33160
  PaymentSelectionStep = ({
@@ -33082,7 +33255,7 @@ var init_PaymentSelectionStep = __esm({
33082
33255
  "button",
33083
33256
  {
33084
33257
  type: "button",
33085
- className: themedButtonClass({ variant: "primary", size: "md" }),
33258
+ className: themeButtonClassName({ variant: "primary", size: "md" }),
33086
33259
  disabled: !email.trim(),
33087
33260
  onClick: onRequestLogin,
33088
33261
  children: "Email me a login link"
@@ -34742,7 +34915,7 @@ function MagicLinkForm({
34742
34915
  "button",
34743
34916
  {
34744
34917
  type: "button",
34745
- className: classPrefix === "cp" ? "secondary" : `${classPrefix}-modal-btn ${classPrefix}-modal-btn--secondary`,
34918
+ className: classPrefix === "cp" ? themeButtonClassName({ variant: "secondary", size: "md" }) : `${classPrefix}-modal-btn ${classPrefix}-modal-btn--secondary`,
34746
34919
  onClick: handleReset,
34747
34920
  children: "Try a different email"
34748
34921
  }
@@ -34770,7 +34943,7 @@ function MagicLinkForm({
34770
34943
  "button",
34771
34944
  {
34772
34945
  type: "submit",
34773
- className: classPrefix === "cp" ? "primary" : `${classPrefix}-modal-btn`,
34946
+ className: classPrefix === "cp" ? themeButtonClassName({ variant: "primary", size: "md" }) : `${classPrefix}-modal-btn`,
34774
34947
  disabled: !email.trim() || loading,
34775
34948
  children: loading ? "Sending..." : buttonText
34776
34949
  }
@@ -34781,6 +34954,7 @@ var init_MagicLinkForm = __esm({
34781
34954
  "../blocks/src/system/runtime/nodes/shared/MagicLinkForm.tsx"() {
34782
34955
  "use strict";
34783
34956
  "use client";
34957
+ init_buttons();
34784
34958
  init_api();
34785
34959
  }
34786
34960
  });
@@ -34806,7 +34980,7 @@ function EventRegistrationWizard(props2) {
34806
34980
  } = props2;
34807
34981
  const maxTicketsNum = parseInt(maxTickets, 10) || 5;
34808
34982
  const showSpamProtection = spamProtectionEnabled ?? isSpamProtectionEnabled();
34809
- const buttonClass = themedButtonClass({ variant: buttonVariant, size: "md" });
34983
+ const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
34810
34984
  const wizard = useEventRegistrationWizard({
34811
34985
  anchorId: EVENT_REGISTRATION_ANCHOR_ID,
34812
34986
  occurrenceContext: occurrenceContext ?? null,
@@ -34943,7 +35117,7 @@ var init_EventRegistrationWizard = __esm({
34943
35117
  init_useEventRegistrationWizard();
34944
35118
  init_MagicLinkForm();
34945
35119
  init_spinner();
34946
- init_themedButtonClass();
35120
+ init_buttons();
34947
35121
  init_event_registration2();
34948
35122
  EVENT_REGISTRATION_ANCHOR_ID = "event-registration";
34949
35123
  EVENT_PORTAL_AUTH_COPY = {
@@ -35389,7 +35563,7 @@ function ErrorStep2({
35389
35563
  buttonVariant = "primary",
35390
35564
  onRetry
35391
35565
  }) {
35392
- const buttonClass = themedButtonClass({ variant: buttonVariant, size: "md" });
35566
+ const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
35393
35567
  return /* @__PURE__ */ jsxs73("div", { className: "cr-error", role: "alert", children: [
35394
35568
  /* @__PURE__ */ jsx100(StateIcon, { variant: "error", children: /* @__PURE__ */ jsx100(CrossIcon, {}) }),
35395
35569
  /* @__PURE__ */ jsx100("h3", { className: "cr-error__title", children: "Enrollment Failed" }),
@@ -35401,7 +35575,7 @@ var init_ErrorStep2 = __esm({
35401
35575
  "../blocks/src/system/runtime/nodes/course-registration/ErrorStep.tsx"() {
35402
35576
  "use strict";
35403
35577
  init_shared6();
35404
- init_themedButtonClass();
35578
+ init_buttons();
35405
35579
  }
35406
35580
  });
35407
35581
 
@@ -35413,7 +35587,7 @@ function VerifyingTimeoutStep2({
35413
35587
  onCheckAgain,
35414
35588
  supportEmail
35415
35589
  }) {
35416
- const buttonClass = themedButtonClass({ variant: buttonVariant, size: "md" });
35590
+ const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
35417
35591
  return /* @__PURE__ */ jsxs74("div", { className: "cr-error", role: "alert", children: [
35418
35592
  /* @__PURE__ */ jsx101(StateIcon, { variant: "warning", children: /* @__PURE__ */ jsx101(ClockIcon, {}) }),
35419
35593
  /* @__PURE__ */ jsx101("h3", { className: "cr-error__title", children: "Payment Verification Taking Longer" }),
@@ -35430,7 +35604,7 @@ var init_VerifyingTimeoutStep2 = __esm({
35430
35604
  "../blocks/src/system/runtime/nodes/course-registration/VerifyingTimeoutStep.tsx"() {
35431
35605
  "use strict";
35432
35606
  init_shared6();
35433
- init_themedButtonClass();
35607
+ init_buttons();
35434
35608
  }
35435
35609
  });
35436
35610
 
@@ -35442,7 +35616,7 @@ function PaymentFailedStep2({
35442
35616
  buttonVariant = "primary",
35443
35617
  onRetry
35444
35618
  }) {
35445
- const buttonClass = themedButtonClass({ variant: buttonVariant, size: "md" });
35619
+ const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
35446
35620
  return /* @__PURE__ */ jsxs75("div", { className: "cr-payment-failed", role: "alert", children: [
35447
35621
  /* @__PURE__ */ jsx102(StateIcon, { variant: "error", children: /* @__PURE__ */ jsx102(CrossIcon, {}) }),
35448
35622
  /* @__PURE__ */ jsx102("h3", { className: "cr-payment-failed__title", children: "Payment Failed" }),
@@ -35454,7 +35628,7 @@ var init_PaymentFailedStep2 = __esm({
35454
35628
  "../blocks/src/system/runtime/nodes/course-registration/PaymentFailedStep.tsx"() {
35455
35629
  "use strict";
35456
35630
  init_shared6();
35457
- init_themedButtonClass();
35631
+ init_buttons();
35458
35632
  }
35459
35633
  });
35460
35634
 
@@ -36456,7 +36630,7 @@ function CourseRegistrationWizard(props2) {
36456
36630
  handleRetry,
36457
36631
  handleBookingModeChange
36458
36632
  } = useCourseRegistrationWizard(props2);
36459
- const buttonClass = themedButtonClass({ variant: buttonVariant, size: "md" });
36633
+ const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
36460
36634
  if (scopedCourses.length === 0) {
36461
36635
  return /* @__PURE__ */ jsx106(
36462
36636
  "div",
@@ -36866,7 +37040,7 @@ var init_CourseRegistrationWizard = __esm({
36866
37040
  init_PaymentFailedStep2();
36867
37041
  init_VerifyingTimeoutStep2();
36868
37042
  init_spinner();
36869
- init_themedButtonClass();
37043
+ init_buttons();
36870
37044
  }
36871
37045
  });
36872
37046
 
@@ -36898,7 +37072,7 @@ var init_course_registration_client = __esm({
36898
37072
  import { useEffect as useEffect19, useRef as useRef10, useState as useState15 } from "react";
36899
37073
  import { jsx as jsx108 } from "react/jsx-runtime";
36900
37074
  function isLeafletApi(value) {
36901
- if (!isRecord2(value)) return false;
37075
+ if (!isRecord3(value)) return false;
36902
37076
  return typeof value.map === "function" && typeof value.tileLayer === "function" && typeof value.marker === "function";
36903
37077
  }
36904
37078
  function loadLeaflet() {
@@ -37600,7 +37774,11 @@ function PassesMembershipsController({ render }) {
37600
37774
  "button",
37601
37775
  {
37602
37776
  type: "button",
37603
- className: "secondary btn-sm shop__return-dismiss",
37777
+ className: themeButtonClassName({
37778
+ variant: "secondary",
37779
+ size: "sm",
37780
+ extraClassName: "shop__return-dismiss"
37781
+ }),
37604
37782
  onClick: () => dispatch({ type: "clearReturnNotice" }),
37605
37783
  children: "Dismiss"
37606
37784
  }
@@ -37617,7 +37795,11 @@ function PassesMembershipsController({ render }) {
37617
37795
  "button",
37618
37796
  {
37619
37797
  type: "button",
37620
- className: "default shop__cta",
37798
+ className: themeButtonClassName({
37799
+ variant: "default",
37800
+ size: "md",
37801
+ extraClassName: "shop__cta"
37802
+ }),
37621
37803
  onClick: () => handleBuyPass(pass),
37622
37804
  children: passDisplay.actionLabel
37623
37805
  }
@@ -37644,7 +37826,11 @@ function PassesMembershipsController({ render }) {
37644
37826
  "button",
37645
37827
  {
37646
37828
  type: "button",
37647
- className: "default shop__cta",
37829
+ className: themeButtonClassName({
37830
+ variant: "default",
37831
+ size: "md",
37832
+ extraClassName: "shop__cta"
37833
+ }),
37648
37834
  onClick: () => handleSubscribe(membership),
37649
37835
  children: membershipDisplay.actionLabel
37650
37836
  }
@@ -37688,12 +37874,20 @@ function PassesMembershipsController({ render }) {
37688
37874
  ] }) : null
37689
37875
  ] }),
37690
37876
  /* @__PURE__ */ jsxs83(ActionRow, { className: "shop__modal-warning-actions", children: [
37691
- /* @__PURE__ */ jsx112("button", { type: "button", className: "secondary", onClick: closeCheckout, children: "Cancel" }),
37692
37877
  /* @__PURE__ */ jsx112(
37693
37878
  "button",
37694
37879
  {
37695
37880
  type: "button",
37696
- className: "default",
37881
+ className: themeButtonClassName({ variant: "secondary", size: "md" }),
37882
+ onClick: closeCheckout,
37883
+ children: "Cancel"
37884
+ }
37885
+ ),
37886
+ /* @__PURE__ */ jsx112(
37887
+ "button",
37888
+ {
37889
+ type: "button",
37890
+ className: themeButtonClassName({ variant: "default", size: "md" }),
37697
37891
  onClick: handleConfirmDuplicate,
37698
37892
  disabled: checkout2.submitting,
37699
37893
  children: checkout2.submitting ? "Processing..." : "Subscribe Anyway"
@@ -37736,8 +37930,25 @@ function PassesMembershipsController({ render }) {
37736
37930
  ] }),
37737
37931
  checkout2.formError ? /* @__PURE__ */ jsx112("p", { className: "shop__modal-error", role: "alert", children: checkout2.formError }) : null,
37738
37932
  /* @__PURE__ */ jsxs83(ActionRow, { className: "shop__modal-actions", children: [
37739
- /* @__PURE__ */ jsx112("button", { type: "button", className: "secondary", onClick: closeCheckout, disabled: checkout2.submitting, children: "Cancel" }),
37740
- /* @__PURE__ */ jsx112("button", { type: "submit", className: "default", disabled: checkout2.submitting, children: checkout2.submitting ? "Processing..." : "Continue to Payment" })
37933
+ /* @__PURE__ */ jsx112(
37934
+ "button",
37935
+ {
37936
+ type: "button",
37937
+ className: themeButtonClassName({ variant: "secondary", size: "md" }),
37938
+ onClick: closeCheckout,
37939
+ disabled: checkout2.submitting,
37940
+ children: "Cancel"
37941
+ }
37942
+ ),
37943
+ /* @__PURE__ */ jsx112(
37944
+ "button",
37945
+ {
37946
+ type: "submit",
37947
+ className: themeButtonClassName({ variant: "default", size: "md" }),
37948
+ disabled: checkout2.submitting,
37949
+ children: checkout2.submitting ? "Processing..." : "Continue to Payment"
37950
+ }
37951
+ )
37741
37952
  ] })
37742
37953
  ] })
37743
37954
  ] })
@@ -37750,6 +37961,7 @@ var init_shop_client = __esm({
37750
37961
  "../blocks/src/system/runtime/nodes/shop.client.tsx"() {
37751
37962
  "use strict";
37752
37963
  "use client";
37964
+ init_buttons();
37753
37965
  init_api();
37754
37966
  init_ModalShell();
37755
37967
  init_shared6();
@@ -37964,7 +38176,7 @@ var init_embla_carousel_autoplay_esm = __esm({
37964
38176
  function isObject(subject) {
37965
38177
  return Object.prototype.toString.call(subject) === "[object Object]";
37966
38178
  }
37967
- function isRecord3(subject) {
38179
+ function isRecord4(subject) {
37968
38180
  return isObject(subject) || Array.isArray(subject);
37969
38181
  }
37970
38182
  function canUseDOM() {
@@ -37981,7 +38193,7 @@ function areOptionsEqual(optionsA, optionsB) {
37981
38193
  const valueA = optionsA[key];
37982
38194
  const valueB = optionsB[key];
37983
38195
  if (typeof valueA === "function") return `${valueA}` === `${valueB}`;
37984
- if (!isRecord3(valueA) || !isRecord3(valueB)) return valueA === valueB;
38196
+ if (!isRecord4(valueA) || !isRecord4(valueB)) return valueA === valueB;
37985
38197
  return areOptionsEqual(valueA, valueB);
37986
38198
  });
37987
38199
  }
@@ -40075,7 +40287,7 @@ function ProductListController(props2) {
40075
40287
  "button",
40076
40288
  {
40077
40289
  type: "button",
40078
- className: "default",
40290
+ className: themeButtonClassName({ variant: "default", size: "md" }),
40079
40291
  onClick: () => {
40080
40292
  const product = props2.render.hydration.products.find((candidate) => candidate.id === card.productId);
40081
40293
  if (!product) return;
@@ -40091,7 +40303,14 @@ function ProductListController(props2) {
40091
40303
  children: card.soldOut ? "Sold out" : card.actionLabel
40092
40304
  }
40093
40305
  ),
40094
- card.path ? /* @__PURE__ */ jsx114("a", { href: card.path, className: "secondary btn-sm", children: "View details" }) : null
40306
+ card.path ? /* @__PURE__ */ jsx114(
40307
+ "a",
40308
+ {
40309
+ href: card.path,
40310
+ className: themeButtonClassName({ variant: "secondary", size: "sm" }),
40311
+ children: "View details"
40312
+ }
40313
+ ) : null
40095
40314
  ] }),
40096
40315
  feedback: /* @__PURE__ */ jsx114(
40097
40316
  ShopAddFeedback,
@@ -40157,7 +40376,7 @@ function ProductDetailController(props2) {
40157
40376
  "button",
40158
40377
  {
40159
40378
  type: "button",
40160
- className: "default",
40379
+ className: themeButtonClassName({ variant: "default", size: "md" }),
40161
40380
  disabled: display.soldOut,
40162
40381
  onClick: () => {
40163
40382
  if (!selectedProduct) return;
@@ -40207,15 +40426,31 @@ function CartController(props2) {
40207
40426
  onChange: item.quantityEditable ? (event) => cart2.updateQuantity(item.key, Number(event.target.value)) : void 0
40208
40427
  }
40209
40428
  ),
40210
- /* @__PURE__ */ jsx114("button", { type: "button", className: "secondary btn-sm", onClick: () => cart2.removeItem(item.key), children: "Remove" })
40429
+ /* @__PURE__ */ jsx114(
40430
+ "button",
40431
+ {
40432
+ type: "button",
40433
+ className: themeButtonClassName({ variant: "secondary", size: "sm" }),
40434
+ onClick: () => cart2.removeItem(item.key),
40435
+ children: "Remove"
40436
+ }
40437
+ )
40211
40438
  ] }),
40212
40439
  footerActions: /* @__PURE__ */ jsxs85(Fragment19, { children: [
40213
- /* @__PURE__ */ jsx114("button", { type: "button", className: "secondary btn-sm", onClick: () => cart2.clear(), children: display.clearButtonText }),
40214
40440
  /* @__PURE__ */ jsx114(
40215
40441
  "button",
40216
40442
  {
40217
40443
  type: "button",
40218
- className: "default",
40444
+ className: themeButtonClassName({ variant: "secondary", size: "sm" }),
40445
+ onClick: () => cart2.clear(),
40446
+ children: display.clearButtonText
40447
+ }
40448
+ ),
40449
+ /* @__PURE__ */ jsx114(
40450
+ "button",
40451
+ {
40452
+ type: "button",
40453
+ className: themeButtonClassName({ variant: "default", size: "md" }),
40219
40454
  onClick: () => {
40220
40455
  window.location.href = resolveDedicatedCheckoutPath(window.location.pathname);
40221
40456
  },
@@ -40321,7 +40556,15 @@ function CheckoutController(props2) {
40321
40556
  )
40322
40557
  ] }),
40323
40558
  state.feedback.tag === "error" ? /* @__PURE__ */ jsx114("p", { className: "rb-caption status-muted", children: state.feedback.message }) : null,
40324
- /* @__PURE__ */ jsx114("button", { type: "submit", className: "default", disabled: state.submission === "submitting", children: state.submission === "submitting" ? "Loading\u2026" : display.submitButtonText })
40559
+ /* @__PURE__ */ jsx114(
40560
+ "button",
40561
+ {
40562
+ type: "submit",
40563
+ className: themeButtonClassName({ variant: "default", size: "md" }),
40564
+ disabled: state.submission === "submitting",
40565
+ children: state.submission === "submitting" ? "Loading\u2026" : display.submitButtonText
40566
+ }
40567
+ )
40325
40568
  ] })
40326
40569
  }
40327
40570
  );
@@ -40331,6 +40574,7 @@ var init_shop_commerce = __esm({
40331
40574
  "../blocks/src/system/runtime/nodes/shop-commerce.tsx"() {
40332
40575
  "use strict";
40333
40576
  "use client";
40577
+ init_buttons();
40334
40578
  init_api();
40335
40579
  init_RichText();
40336
40580
  init_carousel_client();
@@ -40441,7 +40685,7 @@ function HeaderCartDrawerItems(props2) {
40441
40685
  "button",
40442
40686
  {
40443
40687
  type: "button",
40444
- className: "secondary btn-sm",
40688
+ className: themeButtonClassName({ variant: "secondary", size: "sm" }),
40445
40689
  onClick: () => props2.cart.removeItem(item.key),
40446
40690
  children: "Remove"
40447
40691
  }
@@ -40534,7 +40778,7 @@ function HeaderCartDrawer(props2) {
40534
40778
  "button",
40535
40779
  {
40536
40780
  type: "button",
40537
- className: "secondary",
40781
+ className: themeButtonClassName({ variant: "secondary", size: "md" }),
40538
40782
  onClick: () => props2.cart.clear(),
40539
40783
  disabled: display.state === "empty",
40540
40784
  children: display.clearButtonText
@@ -40543,12 +40787,20 @@ function HeaderCartDrawer(props2) {
40543
40787
  props2.checkoutHref && display.state === "ready" ? /* @__PURE__ */ jsx119(
40544
40788
  "a",
40545
40789
  {
40546
- className: "default",
40790
+ className: themeButtonClassName({ variant: "default", size: "md" }),
40547
40791
  href: props2.checkoutHref,
40548
40792
  onClick: props2.onClose,
40549
40793
  children: display.checkoutButtonText
40550
40794
  }
40551
- ) : /* @__PURE__ */ jsx119("button", { type: "button", className: "default", disabled: true, children: display.checkoutButtonText })
40795
+ ) : /* @__PURE__ */ jsx119(
40796
+ "button",
40797
+ {
40798
+ type: "button",
40799
+ className: themeButtonClassName({ variant: "default", size: "md" }),
40800
+ disabled: true,
40801
+ children: display.checkoutButtonText
40802
+ }
40803
+ )
40552
40804
  ] })
40553
40805
  ]
40554
40806
  }
@@ -40561,6 +40813,7 @@ var init_HeaderCartDrawer = __esm({
40561
40813
  "../blocks/src/system/runtime/header/HeaderCartDrawer.tsx"() {
40562
40814
  "use strict";
40563
40815
  "use client";
40816
+ init_buttons();
40564
40817
  init_display();
40565
40818
  init_ModalShell();
40566
40819
  }
@@ -41256,7 +41509,7 @@ var init_EventPaginatedListView_client = __esm({
41256
41509
  init_EventCompactRow();
41257
41510
  init_EmptyState();
41258
41511
  init_EventListing_view();
41259
- init_themedButtonClass();
41512
+ init_buttons();
41260
41513
  EventPaginatedListView = ({
41261
41514
  filters,
41262
41515
  display,
@@ -41299,7 +41552,7 @@ var init_EventPaginatedListView_client = __esm({
41299
41552
  {
41300
41553
  type: "button",
41301
41554
  onClick: loadMore,
41302
- className: themedButtonClass({
41555
+ className: themeButtonClassName({
41303
41556
  variant: display.buttonVariant,
41304
41557
  size: "md"
41305
41558
  }),
@@ -41313,7 +41566,7 @@ var init_EventPaginatedListView_client = __esm({
41313
41566
  type: "button",
41314
41567
  onClick: loadMore,
41315
41568
  disabled: loading,
41316
- className: themedButtonClass({
41569
+ className: themeButtonClassName({
41317
41570
  variant: display.buttonVariant,
41318
41571
  size: "md",
41319
41572
  extraClassName: loading ? "rb-opacity-50 rb-cursor-wait" : null
@@ -41325,7 +41578,7 @@ var init_EventPaginatedListView_client = __esm({
41325
41578
  "a",
41326
41579
  {
41327
41580
  href: seeAllUrl,
41328
- className: themedButtonClass({
41581
+ className: themeButtonClassName({
41329
41582
  variant: display.buttonVariant,
41330
41583
  size: "md"
41331
41584
  }),
@@ -42675,7 +42928,7 @@ var init_EventCombined_client = __esm({
42675
42928
  init_EventModalContext();
42676
42929
  init_EventModals();
42677
42930
  init_utils();
42678
- init_themedButtonClass();
42931
+ init_buttons();
42679
42932
  EventCombinedClient = ({
42680
42933
  events: initialEvents,
42681
42934
  siteId,
@@ -43001,7 +43254,7 @@ var init_EventCombined_client = __esm({
43001
43254
  {
43002
43255
  type: "button",
43003
43256
  onClick: goToToday,
43004
- className: themedButtonClass({ variant: buttonVariant, size: "sm" }),
43257
+ className: themeButtonClassName({ variant: buttonVariant, size: "sm" }),
43005
43258
  children: "Today"
43006
43259
  }
43007
43260
  )
@@ -43318,7 +43571,7 @@ var init_EventCalendar_client = __esm({
43318
43571
  init_EventModalContext();
43319
43572
  init_EventModals();
43320
43573
  init_WeekTimetableView();
43321
- init_themedButtonClass();
43574
+ init_buttons();
43322
43575
  EventCalendarClient = ({
43323
43576
  render
43324
43577
  }) => {
@@ -43607,7 +43860,7 @@ var init_EventCalendar_client = __esm({
43607
43860
  {
43608
43861
  type: "button",
43609
43862
  onClick: onToday,
43610
- className: themedButtonClass({
43863
+ className: themeButtonClassName({
43611
43864
  variant: display.buttonVariant,
43612
43865
  size: "sm"
43613
43866
  }),
@@ -43623,7 +43876,7 @@ var init_EventCalendar_client = __esm({
43623
43876
  {
43624
43877
  type: "button",
43625
43878
  onClick: onToday,
43626
- className: themedButtonClass({
43879
+ className: themeButtonClassName({
43627
43880
  variant: display.buttonVariant,
43628
43881
  size: "sm"
43629
43882
  }),
@@ -43721,7 +43974,7 @@ var init_form_client = __esm({
43721
43974
  init_client2();
43722
43975
  init_src3();
43723
43976
  init_useFormSubmission();
43724
- init_themedButtonClass();
43977
+ init_buttons();
43725
43978
  FormNodeClient = ({
43726
43979
  render
43727
43980
  }) => {
@@ -43863,7 +44116,7 @@ var init_form_client = __esm({
43863
44116
  "button",
43864
44117
  {
43865
44118
  type: "submit",
43866
- className: themedButtonClass({
44119
+ className: themeButtonClassName({
43867
44120
  variant: "primary",
43868
44121
  size: "md",
43869
44122
  extraClassName: "rb-w-full rb-sm-w-auto"
@@ -43990,7 +44243,7 @@ function NewsletterFormClient({
43990
44243
  "button",
43991
44244
  {
43992
44245
  type: "submit",
43993
- className: themedButtonClass({ variant: "primary", size: "md" }),
44246
+ className: themeButtonClassName({ variant: "primary", size: "md" }),
43994
44247
  disabled: isSubmitting,
43995
44248
  children: isSubmitting ? "Subscribing..." : render.display.buttonLabel
43996
44249
  }
@@ -44008,7 +44261,7 @@ var init_newsletter_form_client = __esm({
44008
44261
  init_client2();
44009
44262
  init_src3();
44010
44263
  init_api();
44011
- init_themedButtonClass();
44264
+ init_buttons();
44012
44265
  }
44013
44266
  });
44014
44267
 
@@ -58847,6 +59100,9 @@ function validationContext(options = {}) {
58847
59100
  allowIncomplete: isDraft || (options.allowIncomplete ?? false)
58848
59101
  };
58849
59102
  }
59103
+ function formatFieldPath(path) {
59104
+ return path.map((segment) => String(segment)).join(".");
59105
+ }
58850
59106
  function fieldIssueToMessage(issue2) {
58851
59107
  switch (issue2.kind) {
58852
59108
  case "required":
@@ -59070,7 +59326,7 @@ function normalizeRepeaterItems(plan, value, ctx) {
59070
59326
  return normalizeObjectChildren(fields3, itemRecord, ctx);
59071
59327
  });
59072
59328
  }
59073
- function normalizeNumberInput(value, allowNull) {
59329
+ function normalizeNumberInput(value, _allowNull) {
59074
59330
  if (value === "") return void 0;
59075
59331
  if (typeof value === "string" && value.trim() !== "") return Number(value);
59076
59332
  return value;
@@ -59202,7 +59458,7 @@ function validateRepeaterItem(plan, item, index, ctx) {
59202
59458
  const fields3 = plan.repeatedItemVariants ? plan.repeatedItemVariants.find((variant) => variant.typeId === itemType)?.fields : plan.repeatedItemPlan;
59203
59459
  if (!fields3) return [];
59204
59460
  return fields3.flatMap((childPlan) => {
59205
- const indexedPlan = withIndexedPath(childPlan, plan.path, index);
59461
+ const indexedPlan = materializeRepeaterItemPlan(childPlan, plan.path, index);
59206
59462
  return validateNormalizedFieldValue(indexedPlan, item[childPlan.fieldId], ctx);
59207
59463
  });
59208
59464
  }
@@ -59214,12 +59470,58 @@ function validateGroupPlan(plan, value, ctx) {
59214
59470
  function childValidationContext(plan, ctx) {
59215
59471
  return plan.allowNullChildren ? { ...ctx, allowNull: true } : ctx;
59216
59472
  }
59217
- function withIndexedPath(plan, parentPath, index) {
59218
- const suffix = plan.path.slice(parentPath.length + 1);
59219
- return {
59220
- ...plan,
59221
- path: [...parentPath, index, plan.fieldId, ...suffix]
59222
- };
59473
+ function materializeRepeaterItemPlan(plan, parentPath, index) {
59474
+ return rebaseFieldPlanPath(plan, [...parentPath, 0], [...parentPath, index]);
59475
+ }
59476
+ function rebaseFieldPlanPath(plan, fromPrefix, toPrefix) {
59477
+ const path = rebaseFieldPath(plan.path, fromPrefix, toPrefix);
59478
+ switch (plan.kind) {
59479
+ case "group":
59480
+ return {
59481
+ ...plan,
59482
+ path,
59483
+ children: plan.children.map((childPlan) => rebaseFieldPlanPath(childPlan, fromPrefix, toPrefix))
59484
+ };
59485
+ case "repeater":
59486
+ return {
59487
+ ...plan,
59488
+ path,
59489
+ ...plan.repeatedItemVariants ? {
59490
+ repeatedItemVariants: plan.repeatedItemVariants.map((variant) => ({
59491
+ ...variant,
59492
+ fields: variant.fields.map((fieldPlan) => rebaseFieldPlanPath(fieldPlan, fromPrefix, toPrefix))
59493
+ }))
59494
+ } : {},
59495
+ ...plan.repeatedItemPlan ? {
59496
+ repeatedItemPlan: plan.repeatedItemPlan.map(
59497
+ (fieldPlan) => rebaseFieldPlanPath(fieldPlan, fromPrefix, toPrefix)
59498
+ )
59499
+ } : {}
59500
+ };
59501
+ case "string":
59502
+ case "number":
59503
+ case "boolean":
59504
+ case "richText":
59505
+ case "media":
59506
+ case "link":
59507
+ case "select":
59508
+ case "passthrough":
59509
+ return {
59510
+ ...plan,
59511
+ path
59512
+ };
59513
+ default:
59514
+ return assertNever6(plan);
59515
+ }
59516
+ }
59517
+ function rebaseFieldPath(path, fromPrefix, toPrefix) {
59518
+ if (!startsWithFieldPath(path, fromPrefix)) {
59519
+ throw new Error(`Cannot rebase field path ${formatFieldPath(path)} from ${formatFieldPath(fromPrefix)}`);
59520
+ }
59521
+ return [...toPrefix, ...path.slice(fromPrefix.length)];
59522
+ }
59523
+ function startsWithFieldPath(path, prefix) {
59524
+ return prefix.every((segment, index) => path[index] === segment);
59223
59525
  }
59224
59526
  function issue(plan, kind, extra) {
59225
59527
  return {
@@ -63583,16 +63885,16 @@ var interpolateRichTextTokensOptionsSchema = z58.object({
63583
63885
  var richTextTokenPattern = /\{\{\s*([a-zA-Z0-9_]+)\s*\}\}/g;
63584
63886
  function getSiteName(context) {
63585
63887
  const viewModel = context.viewModel;
63586
- if (!isRecord2(viewModel)) return null;
63888
+ if (!isRecord3(viewModel)) return null;
63587
63889
  const site = viewModel.site;
63588
- if (isRecord2(site) && typeof site.title === "string") {
63890
+ if (isRecord3(site) && typeof site.title === "string") {
63589
63891
  const title = site.title.trim();
63590
63892
  return title.length > 0 ? title : null;
63591
63893
  }
63592
63894
  const root = viewModel.$root;
63593
- if (isRecord2(root)) {
63895
+ if (isRecord3(root)) {
63594
63896
  const rootSite = root.site;
63595
- if (isRecord2(rootSite) && typeof rootSite.title === "string") {
63897
+ if (isRecord3(rootSite) && typeof rootSite.title === "string") {
63596
63898
  const title = rootSite.title.trim();
63597
63899
  if (title.length > 0) return title;
63598
63900
  }
@@ -63614,7 +63916,7 @@ function replaceTokenText(input, allowedTokens, tokenValues) {
63614
63916
  });
63615
63917
  }
63616
63918
  function visitRichTextNode(node, allowedTokens, tokenValues) {
63617
- if (!isRecord2(node)) return node;
63919
+ if (!isRecord3(node)) return node;
63618
63920
  let changed = false;
63619
63921
  const nextNode = { ...node };
63620
63922
  if (nextNode.type === "text" && typeof nextNode.text === "string") {
@@ -63640,13 +63942,13 @@ function visitRichTextNode(node, allowedTokens, tokenValues) {
63640
63942
  return changed ? nextNode : node;
63641
63943
  }
63642
63944
  function interpolateRichTextTokens(value, options, context) {
63643
- if (!isRecord2(value)) return value;
63945
+ if (!isRecord3(value)) return value;
63644
63946
  const allowedTokens = new Set(options.tokens);
63645
63947
  const tokenValues = {
63646
63948
  year: String((/* @__PURE__ */ new Date()).getFullYear()),
63647
63949
  site_name: getSiteName(context)
63648
63950
  };
63649
- if (isRecord2(value.doc)) {
63951
+ if (isRecord3(value.doc)) {
63650
63952
  const nextDoc = visitRichTextNode(value.doc, allowedTokens, tokenValues);
63651
63953
  if (nextDoc === value.doc) return value;
63652
63954
  return { ...value, doc: nextDoc };
@@ -69671,7 +69973,7 @@ function hydrateValue(value, context) {
69671
69973
  const isUnchanged = resolvedItems.every((item, index) => item === value[index]);
69672
69974
  return isUnchanged ? value : resolvedItems;
69673
69975
  }
69674
- if (isRecord2(value)) {
69976
+ if (isRecord3(value)) {
69675
69977
  if (isInternalLink(value)) {
69676
69978
  return hydrateInternalLink(value, context.routes);
69677
69979
  }
@@ -78971,7 +79273,7 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
78971
79273
  }
78972
79274
 
78973
79275
  // ../api/src/utils/isRecord.ts
78974
- function isRecord4(value) {
79276
+ function isRecord5(value) {
78975
79277
  return typeof value === "object" && value !== null && !Array.isArray(value);
78976
79278
  }
78977
79279
 
@@ -79231,7 +79533,7 @@ function sanitizeMarks(marks) {
79231
79533
  if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
79232
79534
  return [{ type: mark.type }];
79233
79535
  }
79234
- if (mark.type === "link" && isRecord4(mark.attrs) && typeof mark.attrs.href === "string") {
79536
+ if (mark.type === "link" && isRecord5(mark.attrs) && typeof mark.attrs.href === "string") {
79235
79537
  const attrs = { href: mark.attrs.href };
79236
79538
  if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
79237
79539
  attrs.target = mark.attrs.target;
@@ -79246,10 +79548,10 @@ function sanitizeMarks(marks) {
79246
79548
  return sanitized.length > 0 ? sanitized : void 0;
79247
79549
  }
79248
79550
  function unwrapRichTextValue(value) {
79249
- if (isRecord4(value) && isRecord4(value.doc)) {
79551
+ if (isRecord5(value) && isRecord5(value.doc)) {
79250
79552
  return unwrapRichTextValue(value.doc);
79251
79553
  }
79252
- if (isRecord4(value) && value.type === "doc") {
79554
+ if (isRecord5(value) && value.type === "doc") {
79253
79555
  return {
79254
79556
  type: "doc",
79255
79557
  content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
@@ -79258,7 +79560,7 @@ function unwrapRichTextValue(value) {
79258
79560
  return EMPTY_SITE_BANNER_BODY;
79259
79561
  }
79260
79562
  function isTipTapNodeLike(value) {
79261
- return isRecord4(value) && typeof value.type === "string";
79563
+ return isRecord5(value) && typeof value.type === "string";
79262
79564
  }
79263
79565
  function coerceTipTapNode(value) {
79264
79566
  return {
@@ -79266,9 +79568,9 @@ function coerceTipTapNode(value) {
79266
79568
  ...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
79267
79569
  ...typeof value.text === "string" ? { text: value.text } : {},
79268
79570
  ...Array.isArray(value.marks) ? {
79269
- marks: value.marks.filter((mark) => isRecord4(mark) && typeof mark.type === "string").map((mark) => ({
79571
+ marks: value.marks.filter((mark) => isRecord5(mark) && typeof mark.type === "string").map((mark) => ({
79270
79572
  type: mark.type,
79271
- ...isRecord4(mark.attrs) ? { attrs: mark.attrs } : {}
79573
+ ...isRecord5(mark.attrs) ? { attrs: mark.attrs } : {}
79272
79574
  }))
79273
79575
  } : {}
79274
79576
  };
@@ -79321,6 +79623,9 @@ function parsePublicProductCategorySelector(value) {
79321
79623
  return void 0;
79322
79624
  }
79323
79625
 
79626
+ // ../api/src/navigation/linkValue.ts
79627
+ init_src();
79628
+
79324
79629
  // ../api/src/aiPlayground.ts
79325
79630
  import { z as z68 } from "zod";
79326
79631
  var Rfc6902PatchOp = z68.discriminatedUnion("op", [
@@ -79975,7 +80280,7 @@ function applyBindings(bindings, context) {
79975
80280
  }
79976
80281
  continue;
79977
80282
  }
79978
- if (isRecord2(bindingSpec)) {
80283
+ if (isRecord3(bindingSpec)) {
79979
80284
  const nested = applyBindings(bindingSpec, context);
79980
80285
  if (Object.keys(nested).length > 0) {
79981
80286
  setBindingValue(result, key, nested);
@@ -80005,7 +80310,7 @@ function setBindingValue(target, path, value) {
80005
80310
  current[Number(segment)] = value;
80006
80311
  return;
80007
80312
  }
80008
- if (isRecord2(current)) {
80313
+ if (isRecord3(current)) {
80009
80314
  current[segment] = value;
80010
80315
  }
80011
80316
  return;
@@ -80017,17 +80322,17 @@ function setBindingValue(target, path, value) {
80017
80322
  if (nextWantsArray) {
80018
80323
  if (!Array.isArray(existing)) current[index] = [];
80019
80324
  } else {
80020
- if (!isRecord2(existing)) current[index] = {};
80325
+ if (!isRecord3(existing)) current[index] = {};
80021
80326
  }
80022
80327
  current = current[index];
80023
80328
  continue;
80024
80329
  }
80025
- if (isRecord2(current)) {
80330
+ if (isRecord3(current)) {
80026
80331
  const existing = current[segment];
80027
80332
  if (nextWantsArray) {
80028
80333
  if (!Array.isArray(existing)) current[segment] = [];
80029
80334
  } else {
80030
- if (!isRecord2(existing)) current[segment] = {};
80335
+ if (!isRecord3(existing)) current[segment] = {};
80031
80336
  }
80032
80337
  current = current[segment];
80033
80338
  continue;
@@ -80067,7 +80372,7 @@ function getPath(source, path) {
80067
80372
  const segments = path.split(".").map((segment) => segment.trim()).filter(Boolean);
80068
80373
  let current = source;
80069
80374
  for (const segment of segments) {
80070
- if (!isRecord2(current)) return void 0;
80375
+ if (!isRecord3(current)) return void 0;
80071
80376
  current = current[segment];
80072
80377
  }
80073
80378
  return current;
@@ -80086,13 +80391,13 @@ function applyTransform(name, value) {
80086
80391
  }
80087
80392
  }
80088
80393
  function extractFirstParagraph(value) {
80089
- if (!isRecord2(value)) return null;
80394
+ if (!isRecord3(value)) return null;
80090
80395
  const doc = value;
80091
80396
  if (!Array.isArray(doc.content)) return null;
80092
80397
  for (const node of doc.content) {
80093
- if (!isRecord2(node)) continue;
80398
+ if (!isRecord3(node)) continue;
80094
80399
  if (node.type !== "paragraph" || !Array.isArray(node.content)) continue;
80095
- const text2 = node.content.filter((item) => isRecord2(item) && item.type === "text").map((item) => typeof item.text === "string" ? item.text : "").join("").trim();
80400
+ const text2 = node.content.filter((item) => isRecord3(item) && item.type === "text").map((item) => typeof item.text === "string" ? item.text : "").join("").trim();
80096
80401
  if (text2.length > 0) {
80097
80402
  return text2;
80098
80403
  }
@@ -80106,7 +80411,7 @@ function formatDate5(value, options) {
80106
80411
  return new Intl.DateTimeFormat(void 0, options).format(date);
80107
80412
  }
80108
80413
  function isBindingDescriptor(value) {
80109
- if (!isRecord2(value) || typeof value.source !== "string") {
80414
+ if (!isRecord3(value) || typeof value.source !== "string") {
80110
80415
  return false;
80111
80416
  }
80112
80417
  if (!BINDING_SOURCES.includes(value.source)) {
@@ -80127,7 +80432,7 @@ function isBindingDescriptor(value) {
80127
80432
  }
80128
80433
  }
80129
80434
  function isBindingDescriptorLike(value) {
80130
- return isBindingDescriptor(value) || typeof value === "string" || isRecord2(value) && typeof value.source === "string" && typeof value.path === "string";
80435
+ return isBindingDescriptor(value) || typeof value === "string" || isRecord3(value) && typeof value.source === "string" && typeof value.path === "string";
80131
80436
  }
80132
80437
  function normalizeBindingInput(value) {
80133
80438
  if (isBindingDescriptor(value)) return value;
@@ -80143,7 +80448,7 @@ function normalizeValue(value) {
80143
80448
  if (Array.isArray(value)) {
80144
80449
  return value.map((item) => normalizeValue(item));
80145
80450
  }
80146
- if (!isRecord2(value)) {
80451
+ if (!isRecord3(value)) {
80147
80452
  return value;
80148
80453
  }
80149
80454
  if (isDocWrapper(value)) {
@@ -80157,7 +80462,7 @@ function isDocWrapper(value) {
80157
80462
  const keys = Object.keys(value);
80158
80463
  if (keys.length !== 1) return false;
80159
80464
  const doc = value.doc;
80160
- return isRecord2(doc) && typeof doc.type === "string" && doc.type === "doc";
80465
+ return isRecord3(doc) && typeof doc.type === "string" && doc.type === "doc";
80161
80466
  }
80162
80467
 
80163
80468
  // src/rendering/helpers/bindings.ts