@riverbankcms/sdk 0.90.0 → 0.90.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/{PreviewEditorSidebar-KVXNF3VW.mjs → PreviewEditorSidebar-FNFRVSIM.mjs} +2 -2
  2. package/dist/{PreviewEditorUI-J3JN5Z7T.mjs → PreviewEditorUI-3WXJFQXG.mjs} +2 -2
  3. package/dist/SdkPreviewModeRuntime-2UCIMKUB.mjs +8 -0
  4. package/dist/_dts/api/src/bookingConfig.d.ts +3 -0
  5. package/dist/_dts/api/src/event-listing-destination.d.ts +59 -0
  6. package/dist/_dts/api/src/index.d.ts +4 -0
  7. package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +0 -1
  8. package/dist/_dts/api/src/navigation.d.ts +2 -0
  9. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +3 -1
  10. package/dist/_dts/api/src/settings/permissions.d.ts +273 -0
  11. package/dist/_dts/api/src/types.d.ts +1 -0
  12. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +60 -2
  13. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +12 -1
  14. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
  15. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +1 -1
  16. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +5 -0
  17. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +24 -0
  18. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/destination.d.ts +8 -0
  19. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +3 -0
  20. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
  21. package/dist/_dts/core/src/event-pricing.d.ts +12 -2
  22. package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
  23. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +11 -1
  24. package/dist/_dts/sdk/src/version.d.ts +1 -1
  25. package/dist/{chunk-PMBB6MQ7.mjs → chunk-CR2VX432.mjs} +297 -117
  26. package/dist/{chunk-AEOYWPE4.mjs → chunk-FA6LVZ7C.mjs} +5 -5
  27. package/dist/{chunk-RQ3XZ4SJ.mjs → chunk-H6TT5ZXI.mjs} +1 -1
  28. package/dist/{chunk-GSPFFUVB.mjs → chunk-SYYJZPKU.mjs} +1 -1
  29. package/dist/cli/index.mjs +160 -103
  30. package/dist/client/{accordion-GXQNWQ6O.mjs → accordion-4K7VGZ3I.mjs} +2 -2
  31. package/dist/client/{bookingForm-STLUJ36H.mjs → bookingForm-3QXA3CIS.mjs} +5 -5
  32. package/dist/client/bookings.mjs +1154 -556
  33. package/dist/client/{carousel-CVRN6EPP.mjs → carousel-BEJKNGQ7.mjs} +3 -3
  34. package/dist/client/{cart-IYIBA5CL.mjs → cart-44BBM6XG.mjs} +6 -6
  35. package/dist/client/{checkout-O3BGM4GS.mjs → checkout-THMHEYKF.mjs} +6 -6
  36. package/dist/client/{chunk-25W2EQUN.mjs → chunk-3H5CLFKT.mjs} +8 -0
  37. package/dist/client/{chunk-MFPKS6QS.mjs → chunk-4COPESPO.mjs} +5 -5
  38. package/dist/client/{chunk-4RTFGHZN.mjs → chunk-5AJIMWKS.mjs} +6 -3
  39. package/dist/client/{chunk-6DPXDOIL.mjs → chunk-B4H6QMPY.mjs} +93 -22
  40. package/dist/client/{chunk-VFHZLZAC.mjs → chunk-DQIRKNZE.mjs} +1 -1
  41. package/dist/client/{chunk-7DH35FGA.mjs → chunk-EJBHK74Y.mjs} +1 -1
  42. package/dist/client/{chunk-DAS5CIER.mjs → chunk-JV7ZNAOU.mjs} +118 -20
  43. package/dist/client/{chunk-FHU6PFPM.mjs → chunk-KNTLBQ3N.mjs} +1 -1
  44. package/dist/client/{chunk-Z62JYS5O.mjs → chunk-PEDNDLPB.mjs} +2 -2
  45. package/dist/client/{chunk-NBFRJ5NB.mjs → chunk-SLY6UDAS.mjs} +2 -2
  46. package/dist/client/{chunk-D3ETC2SU.mjs → chunk-ZIAF2DA4.mjs} +1 -1
  47. package/dist/client/client.mjs +272 -83
  48. package/dist/client/{courseRegistration-2D3ACMJR.mjs → courseRegistration-URX7RCCK.mjs} +5 -5
  49. package/dist/client/{eventCalendar-QY4UZUFF.mjs → eventCalendar-GTENOQCE.mjs} +8 -8
  50. package/dist/client/{eventCombined-RRCDKJC2.mjs → eventCombined-EZVB72MF.mjs} +8 -8
  51. package/dist/client/{eventDetails-YO335BUT.mjs → eventDetails-CH4BJR5Z.mjs} +8 -8
  52. package/dist/client/{eventListing-PXA6GFQ3.mjs → eventListing-4BVOI5HS.mjs} +8 -8
  53. package/dist/client/{eventRegistration-2ZHEDDXO.mjs → eventRegistration-37LPIKIE.mjs} +8 -8
  54. package/dist/client/{form-ZS6KX4U2.mjs → form-FX3Y54YK.mjs} +2 -2
  55. package/dist/client/{headerSection-QK5SLIIB.mjs → headerSection-UOZZGVYL.mjs} +3 -3
  56. package/dist/client/hooks.mjs +86 -35
  57. package/dist/client/{locationMap-GFNIUD2X.mjs → locationMap-VSIPKV35.mjs} +3 -3
  58. package/dist/client/{newsletterForm-PGLTTCUG.mjs → newsletterForm-6FRJKNAF.mjs} +2 -2
  59. package/dist/client/{productDetail-OPBE5ZPI.mjs → productDetail-6AHMLXCO.mjs} +6 -6
  60. package/dist/client/{productList-NI72Q62Z.mjs → productList-M2CYIZVH.mjs} +6 -6
  61. package/dist/client/rendering/client.mjs +231 -42
  62. package/dist/client/rendering/islands.mjs +19 -19
  63. package/dist/client/rendering.mjs +273 -84
  64. package/dist/client/{shop-3ZQPEWYI.mjs → shop-AUOT6GEX.mjs} +6 -6
  65. package/dist/preview-next/client/runtime.mjs +3 -3
  66. package/dist/{sdk-runtime-FSHXCWDS.mjs → sdk-runtime-6GPJNLU6.mjs} +4 -4
  67. package/dist/server/components.mjs +136 -58
  68. package/dist/server/config-validation.mjs +78 -27
  69. package/dist/server/config.mjs +78 -27
  70. package/dist/server/data.mjs +86 -35
  71. package/dist/server/index.mjs +1 -1
  72. package/dist/server/next.mjs +157 -79
  73. package/dist/server/page-converter.mjs +72 -21
  74. package/dist/server/prebuild.mjs +1 -1
  75. package/dist/server/rendering/server.mjs +148 -70
  76. package/dist/server/rendering.mjs +152 -74
  77. package/dist/server/routing.mjs +121 -44
  78. package/dist/server/server.mjs +95 -44
  79. package/package.json +2 -2
  80. package/dist/SdkPreviewModeRuntime-UBL6MSNP.mjs +0 -8
@@ -6497,6 +6497,8 @@ function publicEventPricingType(pricing) {
6497
6497
  case "ticket_types":
6498
6498
  case "course":
6499
6499
  return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
6500
+ case "external":
6501
+ return "external";
6500
6502
  }
6501
6503
  }
6502
6504
  function isFreePublicEventPriceDisplay(display) {
@@ -6510,6 +6512,7 @@ function isFreePublicEventPriceDisplay(display) {
6510
6512
  case "range":
6511
6513
  case "mixed":
6512
6514
  case "unavailable":
6515
+ case "external":
6513
6516
  return false;
6514
6517
  }
6515
6518
  }
@@ -28072,6 +28075,18 @@ var publicCoursesArraySchema = z42.array(publicCourseSchema);
28072
28075
  var eventPresetSchema = z43.enum(["event", "class", "workshop", "retreat", "performance"]);
28073
28076
  var eventScheduleScopeSchema = z43.enum(["recurring", "oneOff"]);
28074
28077
  var eventDestinationModeSchema = z43.enum(["cms-managed", "system-managed"]);
28078
+ var publicEventDestinationSchema = z43.discriminatedUnion("kind", [
28079
+ z43.object({
28080
+ kind: z43.literal("native"),
28081
+ mode: eventDestinationModeSchema,
28082
+ path: z43.string()
28083
+ }),
28084
+ z43.object({
28085
+ kind: z43.literal("external"),
28086
+ url: z43.string(),
28087
+ label: z43.string()
28088
+ })
28089
+ ]);
28075
28090
  var eventVenueSchema = z43.object({
28076
28091
  id: z43.string(),
28077
28092
  name: z43.string(),
@@ -28086,7 +28101,7 @@ var eventCategorySchema = z43.object({
28086
28101
  name: z43.string(),
28087
28102
  color: z43.string().nullable()
28088
28103
  });
28089
- var pricingTypeSchema = z43.enum(["free", "paid"]);
28104
+ var pricingTypeSchema = z43.enum(["free", "paid", "external"]);
28090
28105
  var accessRestrictionSchema = z43.enum(["none", "category"]);
28091
28106
  var eventPricingModeSchema = z43.enum(["single", "ticket_types"]);
28092
28107
  var publicCoursePriceDisplaySchema = z43.discriminatedUnion("kind", [
@@ -28107,6 +28122,7 @@ var publicEventPriceDisplaySchema = z43.discriminatedUnion("kind", [
28107
28122
  currency: z43.string()
28108
28123
  }),
28109
28124
  z43.object({ kind: z43.literal("unavailable"), currency: z43.string() }),
28125
+ z43.object({ kind: z43.literal("external"), label: z43.string() }),
28110
28126
  z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
28111
28127
  ]);
28112
28128
  var publicEventTicketTypePriceDisplaySchema = z43.union([
@@ -28185,6 +28201,10 @@ var publicEventPricingSchema = z43.discriminatedUnion("kind", [
28185
28201
  z43.object({
28186
28202
  kind: z43.literal("course"),
28187
28203
  display: z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
28204
+ }),
28205
+ z43.object({
28206
+ kind: z43.literal("external"),
28207
+ display: z43.object({ kind: z43.literal("external"), label: z43.string() })
28188
28208
  })
28189
28209
  ]);
28190
28210
  var publicTeamMemberSummarySchema = z43.object({
@@ -28213,7 +28233,8 @@ var publicEventSchema = z43.object({
28213
28233
  image: mediaSchema2.nullable().optional()
28214
28234
  }).optional(),
28215
28235
  slug: z43.string(),
28216
- path: z43.string(),
28236
+ path: z43.string().nullable(),
28237
+ destination: publicEventDestinationSchema,
28217
28238
  requiresRegistration: z43.boolean(),
28218
28239
  deliveryMode: z43.enum(["in_person", "online", "hybrid"]),
28219
28240
  attendanceModes: z43.array(publicEventAttendanceModeAvailabilitySchema),
@@ -28517,12 +28538,41 @@ function isEventContentType(slug) {
28517
28538
  return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
28518
28539
  }
28519
28540
 
28541
+ // ../blocks/src/system/runtime/nodes/events/shared/destination.ts
28542
+ function isRecord3(value) {
28543
+ return typeof value === "object" && value !== null && !Array.isArray(value);
28544
+ }
28545
+ function isRuntimeEventDestination(value) {
28546
+ if (!isRecord3(value) || typeof value.kind !== "string") return false;
28547
+ if (value.kind === "native") {
28548
+ return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
28549
+ }
28550
+ return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
28551
+ }
28552
+ function resolveRuntimeEventDestination(event) {
28553
+ if (isRuntimeEventDestination(event.destination)) {
28554
+ return event.destination;
28555
+ }
28556
+ return {
28557
+ kind: "native",
28558
+ mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
28559
+ path: typeof event.path === "string" ? event.path : ""
28560
+ };
28561
+ }
28562
+
28520
28563
  // ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
28521
28564
  var DEFAULT_EVENT_CURRENCY = "USD";
28522
28565
  function resolveRuntimeEventPricing(event) {
28523
28566
  if (isPublicEventPricing(event.pricing)) {
28524
28567
  return event.pricing;
28525
28568
  }
28569
+ const destination = resolveRuntimeEventDestination(event);
28570
+ if (destination.kind === "external") {
28571
+ return {
28572
+ kind: "external",
28573
+ display: { kind: "external", label: "External registration" }
28574
+ };
28575
+ }
28526
28576
  const legacy = event;
28527
28577
  const currency = readCurrency(legacy.currency);
28528
28578
  if (event.requiresRegistration === false) {
@@ -28559,22 +28609,22 @@ function resolveRuntimeEventPricing(event) {
28559
28609
  function readCurrency(value) {
28560
28610
  return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
28561
28611
  }
28562
- function isRecord3(value) {
28612
+ function isRecord4(value) {
28563
28613
  return typeof value === "object" && value !== null && !Array.isArray(value);
28564
28614
  }
28565
28615
  function isPublicEventPricing(value) {
28566
- if (!isRecord3(value) || typeof value.kind !== "string") return false;
28567
- return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course";
28616
+ if (!isRecord4(value) || typeof value.kind !== "string") return false;
28617
+ return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
28568
28618
  }
28569
28619
  function isPublicEventTicketType(value) {
28570
- return isRecord3(value) && typeof value.id === "string";
28620
+ return isRecord4(value) && typeof value.id === "string";
28571
28621
  }
28572
28622
  function readTicketTypePriceDisplay(value, currency) {
28573
28623
  const display = readLegacyPriceDisplay(value, currency);
28574
- return display.kind === "course" ? { kind: "unavailable", currency } : display;
28624
+ return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
28575
28625
  }
28576
28626
  function readLegacyPriceDisplay(value, currency) {
28577
- if (!isRecord3(value) || typeof value.kind !== "string") {
28627
+ if (!isRecord4(value) || typeof value.kind !== "string") {
28578
28628
  return { kind: "unavailable", currency };
28579
28629
  }
28580
28630
  const displayCurrency = readCurrency(value.currency);
@@ -28613,7 +28663,7 @@ function readLegacyPriceDisplay(value, currency) {
28613
28663
  case "unavailable":
28614
28664
  return { kind: "unavailable", currency: displayCurrency };
28615
28665
  case "course":
28616
- return isRecord3(value.display) ? {
28666
+ return isRecord4(value.display) ? {
28617
28667
  kind: "course",
28618
28668
  display: readCoursePriceDisplay(value.display, displayCurrency)
28619
28669
  } : {
@@ -28700,7 +28750,7 @@ function resolveEventRequiresPayment(input) {
28700
28750
  if (!input.event) {
28701
28751
  return false;
28702
28752
  }
28703
- return publicEventPricingType(resolveRuntimeEventPricing(input.event)) !== "free";
28753
+ return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
28704
28754
  }
28705
28755
 
28706
28756
  // ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
@@ -28897,15 +28947,16 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
28897
28947
  })
28898
28948
  });
28899
28949
  function normalizeEventRegistrationEventInput(value) {
28900
- if (!isRecord4(value)) {
28950
+ if (!isRecord5(value)) {
28901
28951
  return value;
28902
28952
  }
28903
28953
  return {
28904
28954
  ...value,
28955
+ destination: resolveRuntimeEventDestination(value),
28905
28956
  pricing: resolveRuntimeEventPricing(value)
28906
28957
  };
28907
28958
  }
28908
- function isRecord4(value) {
28959
+ function isRecord5(value) {
28909
28960
  return typeof value === "object" && value !== null && !Array.isArray(value);
28910
28961
  }
28911
28962
  var eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCodec({
@@ -31467,7 +31518,7 @@ function inferLegacyOfferingsPreviewGroupOrder(overrides) {
31467
31518
  return keys.length >= 2 ? keys : [];
31468
31519
  }
31469
31520
  function normalizeOfferingsPreviewContentForWrite(value) {
31470
- if (!isRecord5(value)) return null;
31521
+ if (!isRecord6(value)) return null;
31471
31522
  const groupOrderValue = value.groupOrder;
31472
31523
  if (Array.isArray(groupOrderValue)) {
31473
31524
  const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
@@ -31480,7 +31531,7 @@ function normalizeOfferingsPreviewContentForWrite(value) {
31480
31531
  return { ...value, groupOrder: [] };
31481
31532
  }
31482
31533
  const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(
31483
- Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord5) : []
31534
+ Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord6) : []
31484
31535
  );
31485
31536
  return legacyOrder.length > 0 ? { ...value, groupOrder: legacyOrder } : value;
31486
31537
  }
@@ -31494,7 +31545,7 @@ function uniqueOfferingsPreviewSourceKeys(values) {
31494
31545
  }
31495
31546
  return keys;
31496
31547
  }
31497
- function isRecord5(value) {
31548
+ function isRecord6(value) {
31498
31549
  return typeof value === "object" && value !== null && !Array.isArray(value);
31499
31550
  }
31500
31551
 
@@ -31861,7 +31912,7 @@ function isOfferingsPreviewItemLimit(value) {
31861
31912
  return value === "1" || value === "2" || value === "3" || value === "4" || value === "5" || value === "6" || value === null;
31862
31913
  }
31863
31914
  function normalizeOfferingsPreviewGroupOverride(value) {
31864
- if (!isRecord6(value)) return [];
31915
+ if (!isRecord7(value)) return [];
31865
31916
  const override = {};
31866
31917
  if (isOfferingsPreviewSourceKey(value.sourceKey) || value.sourceKey === null) {
31867
31918
  override.sourceKey = value.sourceKey;
@@ -31893,12 +31944,12 @@ function isButtonVariant(value) {
31893
31944
  return value === "primary" || value === "secondary" || value === "outline" || value === "link" || value === null;
31894
31945
  }
31895
31946
  function normalizeCardStylesContent(value) {
31896
- return isRecord6(value) || value === null ? value : void 0;
31947
+ return isRecord7(value) || value === null ? value : void 0;
31897
31948
  }
31898
31949
  function normalizeSectionStylesContent(value) {
31899
- return isRecord6(value) || value === null ? value : void 0;
31950
+ return isRecord7(value) || value === null ? value : void 0;
31900
31951
  }
31901
- function isRecord6(value) {
31952
+ function isRecord7(value) {
31902
31953
  return typeof value === "object" && value !== null && !Array.isArray(value);
31903
31954
  }
31904
31955
 
@@ -37138,7 +37189,7 @@ var defaultTransforms = createTransformRegistry(builtinTransformDefinitions);
37138
37189
  // ../blocks/src/system/data/linkedContentEntries.ts
37139
37190
  var LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
37140
37191
  function coerceLinkedContentEntriesPayload(payload) {
37141
- if (!isRecord7(payload)) return payload;
37192
+ if (!isRecord8(payload)) return payload;
37142
37193
  const response = payload;
37143
37194
  if (!Array.isArray(response.entries)) return payload;
37144
37195
  const contentType = parsePublicContentTypeMeta(response.contentType);
@@ -37146,12 +37197,12 @@ function coerceLinkedContentEntriesPayload(payload) {
37146
37197
  return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
37147
37198
  }
37148
37199
  function enrichLinkedContentEntry(entry, contentType) {
37149
- if (!isRecord7(entry)) return entry;
37200
+ if (!isRecord8(entry)) return entry;
37150
37201
  const entryId = typeof entry.id === "string" ? entry.id : null;
37151
37202
  if (!entryId) return entry;
37152
37203
  const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
37153
37204
  const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
37154
- const content = isRecord7(entry.content) ? entry.content : {};
37205
+ const content = isRecord8(entry.content) ? entry.content : {};
37155
37206
  const meta = {
37156
37207
  kind: "linked-content-entry",
37157
37208
  entryId,
@@ -37244,7 +37295,7 @@ function capitalize(value) {
37244
37295
  return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
37245
37296
  }
37246
37297
  function parsePublicContentTypeMeta(value) {
37247
- if (!isRecord7(value)) return null;
37298
+ if (!isRecord8(value)) return null;
37248
37299
  if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
37249
37300
  return {
37250
37301
  key: value.key,
@@ -37254,7 +37305,7 @@ function parsePublicContentTypeMeta(value) {
37254
37305
  };
37255
37306
  }
37256
37307
  function parsePublicContentTypeLinkedEntryEditing(value) {
37257
- if (!isRecord7(value) || typeof value.kind !== "string") return null;
37308
+ if (!isRecord8(value) || typeof value.kind !== "string") return null;
37258
37309
  switch (value.kind) {
37259
37310
  case "generic":
37260
37311
  return { kind: "generic" };
@@ -37268,7 +37319,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
37268
37319
  }
37269
37320
  }
37270
37321
  function parsePublicContentTypeFieldMeta(value) {
37271
- if (!isRecord7(value)) return [];
37322
+ if (!isRecord8(value)) return [];
37272
37323
  if (typeof value.id !== "string" || typeof value.type !== "string") return [];
37273
37324
  return [{
37274
37325
  id: value.id,
@@ -37282,7 +37333,7 @@ function parseStringArray(value) {
37282
37333
  if (!Array.isArray(value)) return null;
37283
37334
  return value.filter((item) => typeof item === "string");
37284
37335
  }
37285
- function isRecord7(value) {
37336
+ function isRecord8(value) {
37286
37337
  return typeof value === "object" && value !== null && !Array.isArray(value);
37287
37338
  }
37288
37339
 
@@ -39057,7 +39108,7 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
39057
39108
  }
39058
39109
 
39059
39110
  // ../api/src/utils/isRecord.ts
39060
- function isRecord8(value) {
39111
+ function isRecord9(value) {
39061
39112
  return typeof value === "object" && value !== null && !Array.isArray(value);
39062
39113
  }
39063
39114
 
@@ -39364,7 +39415,7 @@ function sanitizeMarks(marks) {
39364
39415
  if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
39365
39416
  return [{ type: mark.type }];
39366
39417
  }
39367
- if (mark.type === "link" && isRecord8(mark.attrs) && typeof mark.attrs.href === "string") {
39418
+ if (mark.type === "link" && isRecord9(mark.attrs) && typeof mark.attrs.href === "string") {
39368
39419
  const attrs = { href: mark.attrs.href };
39369
39420
  if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
39370
39421
  attrs.target = mark.attrs.target;
@@ -39379,10 +39430,10 @@ function sanitizeMarks(marks) {
39379
39430
  return sanitized.length > 0 ? sanitized : void 0;
39380
39431
  }
39381
39432
  function unwrapRichTextValue(value) {
39382
- if (isRecord8(value) && isRecord8(value.doc)) {
39433
+ if (isRecord9(value) && isRecord9(value.doc)) {
39383
39434
  return unwrapRichTextValue(value.doc);
39384
39435
  }
39385
- if (isRecord8(value) && value.type === "doc") {
39436
+ if (isRecord9(value) && value.type === "doc") {
39386
39437
  return {
39387
39438
  type: "doc",
39388
39439
  content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
@@ -39391,7 +39442,7 @@ function unwrapRichTextValue(value) {
39391
39442
  return EMPTY_SITE_BANNER_BODY;
39392
39443
  }
39393
39444
  function isTipTapNodeLike(value) {
39394
- return isRecord8(value) && typeof value.type === "string";
39445
+ return isRecord9(value) && typeof value.type === "string";
39395
39446
  }
39396
39447
  function coerceTipTapNode(value) {
39397
39448
  return {
@@ -39399,9 +39450,9 @@ function coerceTipTapNode(value) {
39399
39450
  ...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
39400
39451
  ...typeof value.text === "string" ? { text: value.text } : {},
39401
39452
  ...Array.isArray(value.marks) ? {
39402
- marks: value.marks.filter((mark) => isRecord8(mark) && typeof mark.type === "string").map((mark) => ({
39453
+ marks: value.marks.filter((mark) => isRecord9(mark) && typeof mark.type === "string").map((mark) => ({
39403
39454
  type: mark.type,
39404
- ...isRecord8(mark.attrs) ? { attrs: mark.attrs } : {}
39455
+ ...isRecord9(mark.attrs) ? { attrs: mark.attrs } : {}
39405
39456
  }))
39406
39457
  } : {}
39407
39458
  };
@@ -39571,7 +39622,7 @@ var ENTRY_REF_KEYS = [
39571
39622
  "entryId",
39572
39623
  "slug"
39573
39624
  ];
39574
- function isRecord9(value) {
39625
+ function isRecord10(value) {
39575
39626
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
39576
39627
  }
39577
39628
  function extractManualEntryRef(item) {
@@ -39579,7 +39630,7 @@ function extractManualEntryRef(item) {
39579
39630
  const trimmed = item.trim();
39580
39631
  return trimmed.length > 0 ? trimmed : null;
39581
39632
  }
39582
- if (!isRecord9(item)) return null;
39633
+ if (!isRecord10(item)) return null;
39583
39634
  for (const key of ENTRY_REF_KEYS) {
39584
39635
  const raw = item[key];
39585
39636
  if (typeof raw === "string" && raw.trim().length > 0) {
@@ -7062,7 +7062,7 @@ var SimpleCache = class {
7062
7062
  };
7063
7063
 
7064
7064
  // src/version.ts
7065
- var SDK_VERSION = "0.90.0";
7065
+ var SDK_VERSION = "0.90.1";
7066
7066
 
7067
7067
  // src/client/error.ts
7068
7068
  var RiverbankApiError = class _RiverbankApiError extends Error {