@riverbankcms/sdk 0.85.0 → 0.88.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/{PreviewEditorSidebar-4PH35ZIE.mjs → PreviewEditorSidebar-EVRS3C7T.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-WHMCRJGM.mjs → PreviewEditorUI-54WD4IGE.mjs} +3 -3
  3. package/dist/SdkPreviewModeRuntime-ZALZDJEK.mjs +8 -0
  4. package/dist/_dts/api/src/endpoints.d.ts +58 -14
  5. package/dist/_dts/api/src/index.d.ts +3 -0
  6. package/dist/_dts/api/src/launchReadiness.d.ts +3 -3
  7. package/dist/_dts/api/src/mailchimpIntegration.d.ts +215 -0
  8. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +35 -15
  9. package/dist/_dts/api/src/siteInfrastructure.d.ts +0 -14
  10. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -13
  11. package/dist/_dts/api/src/types.d.ts +6 -3
  12. package/dist/_dts/blocks/src/PageRenderer.d.ts +1 -0
  13. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
  14. package/dist/_dts/blocks/src/index.d.ts +2 -1
  15. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
  16. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
  17. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
  18. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
  19. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
  20. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
  21. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
  22. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +288 -288
  23. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
  24. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
  25. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +42 -42
  26. package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +300 -0
  27. package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +63 -3
  28. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
  29. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
  30. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
  31. package/dist/_dts/blocks/src/system/fragments/library/newsletterForm.d.ts +53 -1
  32. package/dist/_dts/blocks/src/system/manifest/richTextSchema.d.ts +27 -0
  33. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -23
  34. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +10 -2
  35. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -0
  36. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -0
  37. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +1 -0
  38. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +4 -0
  39. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
  40. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +11 -1
  41. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +15 -0
  42. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +1 -1
  43. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +32 -0
  44. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +5 -1
  45. package/dist/_dts/blocks/src/system/runtime/shared/components/ModalShell.d.ts +5 -1
  46. package/dist/_dts/blocks/src/system/runtime/shared/utils/formatting.d.ts +1 -1
  47. package/dist/_dts/content-model/src/referenceFields.d.ts +1 -1
  48. package/dist/_dts/core/src/currency-format.d.ts +37 -2
  49. package/dist/_dts/core/src/event-pricing.d.ts +24 -0
  50. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +549 -18
  51. package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +3 -1
  52. package/dist/_dts/sdk/src/client/types.d.ts +9 -0
  53. package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
  54. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -0
  55. package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +3 -9
  56. package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +1 -1
  57. package/dist/_dts/sdk/src/manifest/three-pass-converter.d.ts +7 -18
  58. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
  59. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -1
  60. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +7 -3
  61. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +4 -24
  62. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +45 -0
  63. package/dist/_dts/sdk/src/version.d.ts +1 -1
  64. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  65. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -9
  66. package/dist/_dts/theme-core/src/schema.d.ts +11 -11
  67. package/dist/{chunk-ZR2GQK2A.mjs → chunk-7KOO7RPP.mjs} +953 -315
  68. package/dist/{chunk-OCGTXHSO.mjs → chunk-ER4UIW4X.mjs} +7 -7
  69. package/dist/{chunk-WFPYN7KA.mjs → chunk-HVOBXA3Y.mjs} +2 -2
  70. package/dist/{chunk-NFWGLRZZ.mjs → chunk-K3JWH6HE.mjs} +37 -3
  71. package/dist/{chunk-4QNLOTES.mjs → chunk-O4LVYUVH.mjs} +58 -14
  72. package/dist/{chunk-PYDHOMEO.mjs → chunk-YDMBIIS5.mjs} +1 -1
  73. package/dist/cli/index.mjs +408 -109
  74. package/dist/client/{accordion-2UZPBMYM.mjs → accordion-PT5CGW5N.mjs} +2 -2
  75. package/dist/client/{bookingForm-36CWQUMV.mjs → bookingForm-2HLRTEYS.mjs} +7 -7
  76. package/dist/client/bookings.mjs +51 -6
  77. package/dist/client/{carousel-QH77HR6X.mjs → carousel-Z2LKYSWA.mjs} +3 -3
  78. package/dist/client/cart-ND5IK4A6.mjs +18 -0
  79. package/dist/client/checkout-EYUSGAY7.mjs +18 -0
  80. package/dist/client/{chunk-SYIJ5JO2.mjs → chunk-6DVPO44G.mjs} +1 -1
  81. package/dist/client/{chunk-3C2VTPWI.mjs → chunk-BAWHZ5GM.mjs} +176 -13
  82. package/dist/client/{chunk-52CGCQ7B.mjs → chunk-BL66UWGD.mjs} +10 -80
  83. package/dist/client/{chunk-VGDBVNOO.mjs → chunk-DIRW2LNG.mjs} +241 -210
  84. package/dist/client/{chunk-UDNSI5PY.mjs → chunk-GOFO7HRH.mjs} +1 -2
  85. package/dist/client/{chunk-ZKUO52W3.mjs → chunk-H4MHEXYS.mjs} +1 -1
  86. package/dist/client/{chunk-ZE5G642V.mjs → chunk-LI2C6M5O.mjs} +75 -1
  87. package/dist/client/{chunk-3DTWLTXM.mjs → chunk-MHBEWDT7.mjs} +117 -3
  88. package/dist/client/{chunk-4OXKTA3D.mjs → chunk-O5JNI3E4.mjs} +2 -2
  89. package/dist/client/{chunk-XSV6KW4D.mjs → chunk-S4G65LGR.mjs} +1 -1
  90. package/dist/client/{chunk-DVNUDUVT.mjs → chunk-WBQG7VJA.mjs} +4 -1
  91. package/dist/client/{chunk-F5VRX5Y6.mjs → chunk-WCVK4MBJ.mjs} +1 -1
  92. package/dist/client/{chunk-7UCLJ5SP.mjs → chunk-X7GVFB7Y.mjs} +4 -7
  93. package/dist/client/client.mjs +2125 -1403
  94. package/dist/client/{courseRegistration-TMKU6ABO.mjs → courseRegistration-H3AZBUEG.mjs} +7 -7
  95. package/dist/client/{eventCalendar-G6TI32X6.mjs → eventCalendar-FPKJGLGS.mjs} +10 -11
  96. package/dist/client/{eventCombined-SCKEMNAR.mjs → eventCombined-QCGIZBUY.mjs} +10 -11
  97. package/dist/client/{eventDetails-XPIFXXPK.mjs → eventDetails-HIT3BJWU.mjs} +10 -11
  98. package/dist/client/{eventListing-7QFMEMGT.mjs → eventListing-R4HNWJDN.mjs} +10 -11
  99. package/dist/client/{eventRegistration-TOODSZUI.mjs → eventRegistration-Q7BYY5HF.mjs} +10 -11
  100. package/dist/client/{form-MTCMVCZT.mjs → form-NI6YOG6S.mjs} +3 -3
  101. package/dist/client/{headerSection-Y5TMR3TW.mjs → headerSection-SDYGII36.mjs} +4 -4
  102. package/dist/client/hooks.mjs +1682 -1412
  103. package/dist/client/{locationMap-RH2LG7FZ.mjs → locationMap-BDETEUQD.mjs} +3 -4
  104. package/dist/client/{newsletterForm-PCAIPFMA.mjs → newsletterForm-EKYIU67X.mjs} +70 -22
  105. package/dist/client/{productDetail-OIGDR4YE.mjs → productDetail-5UTGNN76.mjs} +8 -9
  106. package/dist/client/{productList-4MA5S2CX.mjs → productList-7YA5KXZQ.mjs} +8 -9
  107. package/dist/client/rendering/client.mjs +753 -329
  108. package/dist/client/rendering/islands.mjs +19 -19
  109. package/dist/client/rendering.mjs +3786 -3034
  110. package/dist/client/shop-AIMUMZYC.mjs +20 -0
  111. package/dist/preview-next/before-render.mjs +58 -14
  112. package/dist/preview-next/client/runtime.mjs +5 -5
  113. package/dist/preview-next/editor-chrome.css +56 -9
  114. package/dist/preview-next/middleware.mjs +58 -14
  115. package/dist/{sdk-runtime-QLOCYKVU.mjs → sdk-runtime-NW472WNT.mjs} +6 -6
  116. package/dist/server/components.mjs +1518 -1015
  117. package/dist/server/config-validation.mjs +1719 -1461
  118. package/dist/server/config.mjs +1719 -1461
  119. package/dist/server/data.mjs +1683 -1413
  120. package/dist/server/index.mjs +79 -17
  121. package/dist/server/next.mjs +1902 -1311
  122. package/dist/server/page-converter.mjs +2193 -1169
  123. package/dist/server/prebuild.mjs +1 -1
  124. package/dist/server/rendering/server.mjs +1709 -1209
  125. package/dist/server/rendering.mjs +1894 -1347
  126. package/dist/server/routing.mjs +1872 -1499
  127. package/dist/server/server.mjs +1571 -1264
  128. package/dist/server/theme-bridge.mjs +234 -0
  129. package/dist/styles/index.css +232 -0
  130. package/package.json +1 -1
  131. package/dist/SdkPreviewModeRuntime-4FGSVUYI.mjs +0 -8
  132. package/dist/client/cart-X4YK4FTW.mjs +0 -19
  133. package/dist/client/checkout-OM2BEPWD.mjs +0 -19
  134. package/dist/client/chunk-I2MMZO53.mjs +0 -6
  135. package/dist/client/shop-WXSYV5QO.mjs +0 -21
@@ -455,10 +455,13 @@ export type NewsletterSignupPreset = 'emailOnly' | 'emailName' | 'emailFirstLast
455
455
  export type NewsletterSignupContent = {
456
456
  title?: string | null;
457
457
  subtitle?: RichTextDoc | null;
458
+ listId?: string | null;
458
459
  preset: NewsletterSignupPreset;
460
+ includePhone?: boolean | null;
459
461
  buttonLabel?: string | null;
460
462
  successMessage?: string | null;
461
463
  privacyNote?: string | null;
464
+ tags?: string | null;
462
465
  _sectionStyles?: SectionStylesContent;
463
466
  };
464
467
  export type ContactNewsletterContent = {
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import type { PageOutline } from '../contracts';
6
6
  import type { SdkCustomBlock } from '../config/types';
7
+ import { SUPPORTED_LOADER_ENDPOINTS, type SupportedLoaderEndpoint } from '../../../blocks/src/system/data/index';
7
8
  import type { RiverbankClient } from '../client/types';
8
9
  export type PrefetchContext = {
9
10
  siteId?: string;
@@ -12,15 +13,8 @@ export type PrefetchContext = {
12
13
  root?: Record<string, unknown>;
13
14
  };
14
15
  export type ResolvedBlockData = Record<string, Record<string, unknown>>;
15
- /**
16
- * Supported loader endpoints for SDK data fetching.
17
- * Only these endpoints can be used in block data loaders when using the SDK.
18
- *
19
- * This is the SDK's public contract for whitelisted endpoints.
20
- * In the monorepo we should keep it in sync with blocks' internal list.
21
- */
22
- export declare const SUPPORTED_LOADER_ENDPOINTS: readonly ["listPublishedEntries", "getPublishedEntryPreview", "listPublicEvents", "listPublicCourses", "listPublicTeamMembers", "listPublicProducts", "listPublicPasses", "listPublicMemberships", "getPublicFormById", "getPublicBookingServices", "getPublicEventDetails"];
23
- export type SupportedLoaderEndpoint = (typeof SUPPORTED_LOADER_ENDPOINTS)[number];
16
+ export { SUPPORTED_LOADER_ENDPOINTS };
17
+ export type { SupportedLoaderEndpoint };
24
18
  /**
25
19
  * Options for SDK block data prefetching.
26
20
  */
@@ -291,4 +291,4 @@ export interface ContentTypeSummaryForPrompt {
291
291
  isRouted: boolean;
292
292
  }
293
293
  export declare function buildContentTypePromptSection(contentTypes: ContentTypeSummaryForPrompt[]): string;
294
- export declare const PASS1_SYSTEM_PROMPT = "You are an expert at analyzing HTML/JSX markup to extract editable content fields for a CMS.\n\nYour task: Analyze the HTML/JSX markup and identify ALL pieces of content that should be editable by a user.\n\n## FIELD ECONOMY PRINCIPLES\n\n**Prefer fewer, smarter fields. CMS editors should not face 25-field forms.**\n\n1. **Use richText for formatted lists and multi-line content:**\n - Opening hours \u2192 single richText with formatted list (not 6 separate text fields)\n - Address with line breaks \u2192 single richText (not address1, address2, city, postcode)\n - Feature lists, specs, ingredients \u2192 richText with bullet list\n\n RichText supports: paragraphs, bold, italic, bullet lists, numbered lists, links.\n The CMS editor can format content naturally without rigid field structure.\n\n2. **Use repeaters only when items need individual editing/reordering:**\n - Testimonials with avatar + name + quote \u2192 repeater (each item is distinct)\n - Team members with photo + bio \u2192 repeater\n - Social links where user adds/removes platforms \u2192 repeater\n\n3. **Anti-patterns to AVOID:**\n \u274C hoursMonFriDay, hoursMonFriTime, hoursSatDay... (6+ fields for hours table)\n \u274C socialInstagram, socialFacebook, socialTwitter (proliferating similar fields)\n \u274C address1, address2, city, state, zip (5 fields for one address)\n\n \u2705 openingHours: single richText field with formatted content\n \u2705 address: single richText field with line breaks\n \u2705 socialLinks: repeater with { platform, url } IF user needs to add/remove links\n\n## Field Type Rules\n\n### Simple Fields\n- **text**: Short text (<200 chars), headings, labels, button text\n - Set multiline: true for paragraphs or text with line breaks\n - Set multiline: false for single-line text\n- **richText**: Formatted content with HTML tags (p, strong, em, ul, etc.)\n- **media**: Images (<img>) or videos (<video>)\n - defaultValue: { \"src\": \"image-url\", \"alt\": \"description\" }\n- **link**: Anchors (<a>) or buttons that navigate\n - defaultValue: { \"label\": \"visible text\" }\n - Only extract the visible text - link destinations are configured in the CMS\n\n### Container Fields\n\n- **repeater**: List of similar items that editors can add/remove/reorder\n - Use when: Multiple similar items (social links, features, team members)\n - Requires: itemLabel (singular name for item), itemFields (array of nested fields)\n - Example: Social links \u2192 repeater with itemFields: [{ id: \"platform\", type: \"text\" }, { id: \"url\", type: \"link\" }]\n\n- **group**: Related fields grouped together (NOT repeating)\n - Use when: Logically related fields that should appear together in the CMS\n - Requires: groupFields (array of nested fields)\n - Example: Contact info \u2192 group with groupFields: [{ id: \"phone\", type: \"text\" }, { id: \"email\", type: \"text\" }]\n\n### When to use each type:\n- Single value \u2192 simple field (text, richText, media, link)\n- Formatted list where structure is static \u2192 richText (opening hours, address)\n- List where items can be added/removed/reordered \u2192 repeater\n- Related fields that belong together \u2192 group\n\n## Output Requirements\n\n1. Give each field a camelCase id (e.g., headline, ctaButton, heroImage)\n2. Extract the actual content as defaultValue\n3. Describe where each field appears in htmlContext\n4. Set required: true for primary content, false for optional\n\n## Examples\n\n### Example 1: Simple Fields\n\nInput HTML:\n```html\n<section>\n <h1>Welcome to Our Site</h1>\n <p>We build amazing products.</p>\n <a href=\"/start\">Get Started</a>\n</section>\n```\n\nOutput:\n```json\n{\n \"blockId\": \"custom.hero\",\n \"blockTitle\": \"Hero Section\",\n \"blockDescription\": \"Simple hero with headline, description, and CTA\",\n \"category\": \"marketing\",\n \"fields\": [\n { \"id\": \"headline\", \"type\": \"text\", \"label\": \"Headline\", \"required\": true, \"multiline\": false, \"defaultValue\": \"Welcome to Our Site\", \"htmlContext\": \"h1 main heading\" },\n { \"id\": \"description\", \"type\": \"text\", \"label\": \"Description\", \"required\": true, \"multiline\": false, \"defaultValue\": \"We build amazing products.\", \"htmlContext\": \"p below heading\" },\n { \"id\": \"cta\", \"type\": \"link\", \"label\": \"Call to Action\", \"required\": false, \"multiline\": null, \"defaultValue\": { \"label\": \"Get Started\" }, \"htmlContext\": \"a button at bottom\" }\n ],\n \"contentTypeApproach\": { \"approach\": \"none\", \"rationale\": \"Single hero section, not list data\" }\n}\n```\n\n### Example 2: Repeater Field\n\nInput HTML with repeating social links:\n```html\n<footer>\n <div class=\"social-links\">\n <a href=\"https://instagram.com/...\"><svg>Instagram</svg></a>\n <a href=\"https://facebook.com/...\"><svg>Facebook</svg></a>\n <a href=\"https://twitter.com/...\"><svg>Twitter</svg></a>\n </div>\n</footer>\n```\n\nOutput with repeater:\n```json\n{\n \"blockId\": \"custom.footer\",\n \"blockTitle\": \"Footer\",\n \"blockDescription\": \"Footer with social links\",\n \"category\": \"layout\",\n \"fields\": [\n {\n \"id\": \"socialLinks\",\n \"type\": \"repeater\",\n \"label\": \"Social Links\",\n \"required\": false,\n \"itemLabel\": \"Link\",\n \"itemFields\": [\n { \"id\": \"platform\", \"type\": \"text\", \"label\": \"Platform\", \"required\": true },\n { \"id\": \"url\", \"type\": \"link\", \"label\": \"URL\", \"required\": true }\n ],\n \"htmlContext\": \"Row of social media icon links\"\n }\n ],\n \"contentTypeApproach\": { \"approach\": \"repeater\", \"rationale\": \"Social links are page-specific and editors need to add/remove platforms\" }\n}\n```\n";
294
+ export declare const PASS1_SYSTEM_PROMPT = "You are an expert at analyzing HTML/JSX markup to extract editable content fields for a CMS.\n\nYour task: Analyze the HTML/JSX markup and identify ALL pieces of content that should be editable by a user.\n\n## FIELD ECONOMY PRINCIPLES\n\n**Prefer fewer, smarter fields. CMS editors should not face 25-field forms.**\n\n1. **Use richText for formatted lists and multi-line content:**\n - Opening hours \u2192 single richText with formatted list (not 6 separate text fields)\n - Address with line breaks \u2192 single richText with hard line breaks / Shift+Enter between lines (not address1, address2, city, postcode)\n - Feature lists, specs, ingredients \u2192 richText with bullet list\n\n RichText supports: paragraphs, hard line breaks, bold, italic, bullet lists, numbered lists, links.\n The CMS editor can format content naturally without rigid field structure.\n For line-oriented content like addresses, opening hours, and contact details, keep one logical paragraph and use hard line breaks between lines. In the CMS editor, authors create those line breaks with Shift+Enter; Enter creates a new paragraph.\n\n2. **Use repeaters only when items need individual editing/reordering:**\n - Testimonials with avatar + name + quote \u2192 repeater (each item is distinct)\n - Team members with photo + bio \u2192 repeater\n - Social links where user adds/removes platforms \u2192 repeater\n\n3. **Anti-patterns to AVOID:**\n \u274C hoursMonFriDay, hoursMonFriTime, hoursSatDay... (6+ fields for hours table)\n \u274C socialInstagram, socialFacebook, socialTwitter (proliferating similar fields)\n \u274C address1, address2, city, state, zip (5 fields for one address)\n\n \u2705 openingHours: single richText field with formatted content / hard line breaks\n \u2705 address: single richText field with hard line breaks (Shift+Enter in the editor)\n \u2705 socialLinks: repeater with { platform, url } IF user needs to add/remove links\n\n## Field Type Rules\n\n### Simple Fields\n- **text**: Short text (<200 chars), headings, labels, button text\n - Set multiline: true for paragraphs or text with line breaks\n - Set multiline: false for single-line text\n- **richText**: Formatted content with HTML tags (p, strong, em, ul, etc.)\n- **media**: Images (<img>) or videos (<video>)\n - defaultValue: { \"src\": \"image-url\", \"alt\": \"description\" }\n- **link**: Anchors (<a>) or buttons that navigate\n - defaultValue: { \"label\": \"visible text\" }\n - Only extract the visible text - link destinations are configured in the CMS\n\n### Container Fields\n\n- **repeater**: List of similar items that editors can add/remove/reorder\n - Use when: Multiple similar items (social links, features, team members)\n - Requires: itemLabel (singular name for item), itemFields (array of nested fields)\n - Example: Social links \u2192 repeater with itemFields: [{ id: \"platform\", type: \"text\" }, { id: \"url\", type: \"link\" }]\n\n- **group**: Related fields grouped together (NOT repeating)\n - Use when: Logically related fields that should appear together in the CMS\n - Requires: groupFields (array of nested fields)\n - Example: Contact info \u2192 group with groupFields: [{ id: \"phone\", type: \"text\" }, { id: \"email\", type: \"text\" }]\n\n### When to use each type:\n- Single value \u2192 simple field (text, richText, media, link)\n- Formatted list where structure is static \u2192 richText (opening hours, address; use hard line breaks / Shift+Enter for line-oriented text)\n- List where items can be added/removed/reordered \u2192 repeater\n- Related fields that belong together \u2192 group\n\n## Output Requirements\n\n1. Give each field a camelCase id (e.g., headline, ctaButton, heroImage)\n2. Extract the actual content as defaultValue\n3. Describe where each field appears in htmlContext\n4. Set required: true for primary content, false for optional\n\n## Examples\n\n### Example 1: Simple Fields\n\nInput HTML:\n```html\n<section>\n <h1>Welcome to Our Site</h1>\n <p>We build amazing products.</p>\n <a href=\"/start\">Get Started</a>\n</section>\n```\n\nOutput:\n```json\n{\n \"blockId\": \"custom.hero\",\n \"blockTitle\": \"Hero Section\",\n \"blockDescription\": \"Simple hero with headline, description, and CTA\",\n \"category\": \"marketing\",\n \"fields\": [\n { \"id\": \"headline\", \"type\": \"text\", \"label\": \"Headline\", \"required\": true, \"multiline\": false, \"defaultValue\": \"Welcome to Our Site\", \"htmlContext\": \"h1 main heading\" },\n { \"id\": \"description\", \"type\": \"text\", \"label\": \"Description\", \"required\": true, \"multiline\": false, \"defaultValue\": \"We build amazing products.\", \"htmlContext\": \"p below heading\" },\n { \"id\": \"cta\", \"type\": \"link\", \"label\": \"Call to Action\", \"required\": false, \"multiline\": null, \"defaultValue\": { \"label\": \"Get Started\" }, \"htmlContext\": \"a button at bottom\" }\n ],\n \"contentTypeApproach\": { \"approach\": \"none\", \"rationale\": \"Single hero section, not list data\" }\n}\n```\n\n### Example 2: Repeater Field\n\nInput HTML with repeating social links:\n```html\n<footer>\n <div class=\"social-links\">\n <a href=\"https://instagram.com/...\"><svg>Instagram</svg></a>\n <a href=\"https://facebook.com/...\"><svg>Facebook</svg></a>\n <a href=\"https://twitter.com/...\"><svg>Twitter</svg></a>\n </div>\n</footer>\n```\n\nOutput with repeater:\n```json\n{\n \"blockId\": \"custom.footer\",\n \"blockTitle\": \"Footer\",\n \"blockDescription\": \"Footer with social links\",\n \"category\": \"layout\",\n \"fields\": [\n {\n \"id\": \"socialLinks\",\n \"type\": \"repeater\",\n \"label\": \"Social Links\",\n \"required\": false,\n \"itemLabel\": \"Link\",\n \"itemFields\": [\n { \"id\": \"platform\", \"type\": \"text\", \"label\": \"Platform\", \"required\": true },\n { \"id\": \"url\", \"type\": \"link\", \"label\": \"URL\", \"required\": true }\n ],\n \"htmlContext\": \"Row of social media icon links\"\n }\n ],\n \"contentTypeApproach\": { \"approach\": \"repeater\", \"rationale\": \"Social links are page-specific and editors need to add/remove platforms\" }\n}\n```\n";
@@ -10,28 +10,16 @@
10
10
  * This approach ensures CSS rules reference classNames that actually exist
11
11
  * in the layout by applying patches programmatically between passes.
12
12
  */
13
+ import { parseRichTextInlineMarkdown, parseRichTextParagraphInlineMarkdown, type TipTapNode } from '../../../blocks/src/index';
13
14
  import type { HtmlToManifestInput, HtmlToManifestOutput, ConversionResult, ConverterOptions } from './types';
14
15
  import { DEFAULT_MANIFEST_MODEL } from './constants';
15
16
  export { DEFAULT_MANIFEST_MODEL };
16
- interface TipTapNode {
17
- type: string;
18
- content?: TipTapNode[];
19
- text?: string;
20
- marks?: Array<{
21
- type: string;
22
- }>;
23
- }
24
- /**
25
- * Parse inline markdown (bold only) into TipTap text nodes.
26
- *
27
- * Only bold (**text**) is supported because LLM-generated rich text defaults
28
- * typically only use bold for emphasis. Other markdown features (italic, links,
29
- * headings) are not expected in field default values and would add complexity
30
- * without meaningful benefit.
31
- */
32
- declare function parseInlineMarkdown(text: string): TipTapNode[];
33
17
  /**
34
18
  * Convert a plain string (or simple markdown) to TipTap doc format.
19
+ *
20
+ * Double newlines create semantic paragraphs. Single newlines remain inside the
21
+ * current paragraph as TipTap hardBreak nodes for line-oriented content such as
22
+ * addresses and opening hours.
35
23
  */
36
24
  declare function stringToTipTapDoc(text: string): TipTapNode;
37
25
  /**
@@ -70,7 +58,8 @@ export declare function validateManifestOutput(data: unknown): {
70
58
  * @internal
71
59
  */
72
60
  export declare const __testing: {
73
- parseInlineMarkdown: typeof parseInlineMarkdown;
61
+ parseInlineMarkdown: typeof parseRichTextInlineMarkdown;
62
+ parseParagraphInlineMarkdown: typeof parseRichTextParagraphInlineMarkdown;
74
63
  stringToTipTapDoc: typeof stringToTipTapDoc;
75
64
  coerceRichTextDefaultValue: typeof coerceRichTextDefaultValue;
76
65
  };
@@ -2,11 +2,13 @@ import * as React from 'react';
2
2
  import type { EntrySubrouteContextData, MediaAssetIndexItem, OccurrenceContextData, PageOutline, ResolveImageUrlContextInput, RouteMap, Theme, ThemeTokens } from '../contracts';
3
3
  import type { SdkCustomBlock } from '../config/types';
4
4
  import type { BlockOverrides } from './overrides';
5
+ import type { SiteBookingOfferingPresetSummary } from '../public-api/contracts';
5
6
  export type ComponentRegistry = Record<string, React.ElementType>;
6
7
  export type PageRendererDataContext = {
7
8
  siteId?: string;
8
9
  pageId?: string;
9
10
  resolvedData?: Record<string, Record<string, unknown>>;
11
+ bookingOfferingPresets?: readonly SiteBookingOfferingPresetSummary[];
10
12
  previewStage?: 'published' | 'preview';
11
13
  routes?: RouteMap;
12
14
  pagesByIdentifier?: Record<string, string>;
@@ -1,6 +1,7 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import type { EntrySubrouteContextData, MediaAssetIndexItem, OccurrenceContextData, PageOutline, RouteMap, Theme, ThemeTokens } from '../../contracts';
3
3
  import type { ResolvedBlockData } from '../../data';
4
+ import type { SiteBookingOfferingPresetSummary } from '../../public-api/contracts';
4
5
  import type { RuntimeSdkConfig } from '../helpers/loadPage';
5
6
  import { type ComponentRegistry } from '../blocks-page-renderer';
6
7
  import type { BlockOverrides } from '../overrides';
@@ -11,6 +12,7 @@ export type PageProps = {
11
12
  siteId: string;
12
13
  themeTokens?: ThemeTokens;
13
14
  resolvedData?: ResolvedBlockData;
15
+ bookingOfferingPresets?: readonly SiteBookingOfferingPresetSummary[];
14
16
  routeMap?: RouteMap;
15
17
  /** Page identifier to routeId lookup for { kind: 'page' } CTA links */
16
18
  pagesByIdentifier?: Record<string, string>;
@@ -89,4 +91,4 @@ export type PageHydrationBootstrapConfig = {
89
91
  mediaAssets?: readonly MediaAssetIndexItem[];
90
92
  };
91
93
  export declare function toPageHydrationBootstrapConfig(props: Pick<PageProps, 'siteId' | 'supabaseUrl' | 'mediaAssets'>): PageHydrationBootstrapConfig;
92
- export declare function PageContent({ page, theme, themeTokens: providedTokens, siteId, resolvedData, routeMap, pagesByIdentifier, entriesByIdentifier, wrapBlock, registry, usePlaceholders, blockOverrides, sdkConfig, customBlocks, supabaseUrl, mediaAssets, apiBaseUrl, portalToken, previewToken, dataContext, useThemeScope, }: PageProps): ReactElement;
94
+ export declare function PageContent({ page, theme, themeTokens: providedTokens, siteId, resolvedData, bookingOfferingPresets, routeMap, pagesByIdentifier, entriesByIdentifier, wrapBlock, registry, usePlaceholders, blockOverrides, sdkConfig, customBlocks, supabaseUrl, mediaAssets, apiBaseUrl, portalToken, previewToken, dataContext, useThemeScope, }: PageProps): ReactElement;
@@ -8,8 +8,8 @@ import type { MediaAssetIndexItem, RouteMap, Theme } from '../../contracts';
8
8
  import type { RiverbankClient, SiteResponse } from '../../client/types';
9
9
  import type { PageProps } from '../components/Page';
10
10
  import type { ResolvedBlockData } from '../../data/prefetchBlockData';
11
- import type { RuntimeSdkConfig } from './loadPage';
12
11
  import type { SdkCustomBlock } from '../../config/types';
12
+ import { type RuntimeSdkConfig } from './pageRuntimeSupport';
13
13
  /**
14
14
  * Site data included in content results for metadata generation.
15
15
  */
@@ -92,6 +92,8 @@ export type PageContentResult = {
92
92
  customBlocks?: SdkCustomBlock[];
93
93
  /** Pre-fetched block data for data loaders */
94
94
  resolvedData: ResolvedBlockData;
95
+ /** Selected booking offering presets exposed to SSR blocks. */
96
+ bookingOfferingPresets?: PageProps['bookingOfferingPresets'];
95
97
  /** Site data for metadata generation */
96
98
  site: SiteData;
97
99
  /**
@@ -112,7 +114,7 @@ export type PageContentResult = {
112
114
  /** ContentType -> identifier -> routeId lookup for { kind: 'entry' } CTA links */
113
115
  entriesByIdentifier?: Record<string, Record<string, string>>;
114
116
  /** Canonical media assets for resolving identifier-only media values in preview/edit UIs. */
115
- mediaAssets?: MediaAssetIndexItem[];
117
+ mediaAssets?: readonly MediaAssetIndexItem[];
116
118
  };
117
119
  /**
118
120
  * Result when path resolves to a content entry
@@ -125,6 +127,8 @@ export type EntryContentResult = {
125
127
  templatePage: PageProps['page'] | null;
126
128
  /** Pre-fetched block data for template page data loaders */
127
129
  resolvedData: ResolvedBlockData;
130
+ /** Selected booking offering presets exposed to SSR blocks. */
131
+ bookingOfferingPresets?: PageProps['bookingOfferingPresets'];
128
132
  /** Data context for template blocks (includes entry content for bindings) */
129
133
  dataContext: {
130
134
  contentEntry: Record<string, unknown>;
@@ -155,7 +159,7 @@ export type EntryContentResult = {
155
159
  /** ContentType -> identifier -> routeId lookup for { kind: 'entry' } CTA links */
156
160
  entriesByIdentifier?: Record<string, Record<string, string>>;
157
161
  /** Canonical media assets for resolving identifier-only media values in preview/edit UIs. */
158
- mediaAssets?: MediaAssetIndexItem[];
162
+ mediaAssets?: readonly MediaAssetIndexItem[];
159
163
  };
160
164
  /**
161
165
  * Discriminated union result from loadContent
@@ -3,15 +3,15 @@
3
3
  *
4
4
  * Use this in server components, getServerSideProps, or API routes.
5
5
  */
6
- import type { RiverbankClient, SiteResponse } from '../../client/types';
7
- import type { MediaAssetIndexItem } from '../../contracts';
6
+ import type { RiverbankClient } from '../../client/types';
8
7
  import type { PageProps } from '../components/Page';
9
8
  import type { DataLoaderOverrides } from '../../data/types';
9
+ import { type RuntimeSdkConfig } from './pageRuntimeSupport';
10
10
  /**
11
11
  * SDK config from API response (without siteId which is stripped at storage).
12
12
  * This is the runtime representation - for defining configs, use RiverbankSiteConfig.
13
13
  */
14
- export type RuntimeSdkConfig = NonNullable<SiteResponse['sdkConfig']>;
14
+ export type { RuntimeSdkConfig } from './pageRuntimeSupport';
15
15
  export type LoadPageParams = {
16
16
  client: RiverbankClient;
17
17
  siteId: string;
@@ -77,32 +77,12 @@ export type LoadPageParams = {
77
77
  */
78
78
  searchParams?: Record<string, string | string[] | undefined>;
79
79
  };
80
- export type LoadPageResult = Omit<PageProps, 'registry' | 'wrapBlock' | 'usePlaceholders' | 'blockOverrides'> & {
80
+ export type LoadPageResult = Omit<PageProps, 'registry' | 'wrapBlock' | 'usePlaceholders' | 'blockOverrides' | 'sdkConfig'> & {
81
81
  /**
82
82
  * SDK site configuration, if available.
83
83
  * Contains SDK-defined theme palette, section backgrounds, and style options.
84
84
  */
85
85
  sdkConfig: RuntimeSdkConfig | null;
86
- /**
87
- * Supabase storage URL for direct image access.
88
- * SDK sites use this instead of NEXT_PUBLIC_SUPABASE_URL env var.
89
- */
90
- supabaseUrl?: string;
91
- /**
92
- * Canonical media sidecar for resolving identifier-only media values on first paint.
93
- */
94
- mediaAssets?: readonly MediaAssetIndexItem[];
95
- /**
96
- * Page identifier to routeId lookup for CTA link resolution.
97
- * Used to resolve { kind: 'page', identifier: '...' } links at render time.
98
- */
99
- pagesByIdentifier?: Record<string, string>;
100
- /**
101
- * Entry identifier to routeId lookup for CTA link resolution.
102
- * Maps contentTypeKey -> identifier -> routeId.
103
- * Used to resolve { kind: 'entry', contentType: '...', identifier: '...' } links at render time.
104
- */
105
- entriesByIdentifier?: Record<string, Record<string, string>>;
106
86
  };
107
87
  /**
108
88
  * Server-side helper to fetch all data needed for <Page> component.
@@ -0,0 +1,45 @@
1
+ import type { MediaAssetIndexItem, PageOutline, RouteMap, Theme } from '../../contracts';
2
+ import type { SiteBookingOfferingPresetSummary } from '../../public-api/contracts';
3
+ import type { SiteResponse } from '../../client/types';
4
+ import type { SdkCustomBlock } from '../../config/types';
5
+ export type RuntimeSdkConfig = NonNullable<SiteResponse['sdkConfig']>;
6
+ export type SiteData = SiteResponse['site'];
7
+ export type SiteRenderSupport = Readonly<{
8
+ theme: Theme;
9
+ site: SiteData;
10
+ sdkConfig: RuntimeSdkConfig | null;
11
+ bookingOfferingPresets: readonly SiteBookingOfferingPresetSummary[];
12
+ customBlocks?: SdkCustomBlock[];
13
+ supabaseUrl?: string;
14
+ routeMap?: RouteMap;
15
+ pagesByIdentifier?: Record<string, string>;
16
+ entriesByIdentifier?: Record<string, Record<string, string>>;
17
+ mediaAssets?: readonly MediaAssetIndexItem[];
18
+ }>;
19
+ export type PageRecordForPreview = Readonly<{
20
+ id: string;
21
+ routeId?: string | null;
22
+ name: string;
23
+ path: string | null;
24
+ purpose: string;
25
+ status?: string | null;
26
+ draftStatus?: string | null;
27
+ publishedAt?: string | null;
28
+ draftTitle?: string | null;
29
+ draftPath?: string | null;
30
+ draftMetaTitle?: string | null;
31
+ draftMetaDescription?: string | null;
32
+ publishedMetaTitle?: string | null;
33
+ publishedMetaDescription?: string | null;
34
+ ogImageId?: string | null;
35
+ }>;
36
+ export declare function buildSiteRenderSupport(site: SiteResponse, mediaAssets: readonly MediaAssetIndexItem[] | undefined): SiteRenderSupport;
37
+ export declare function collectMediaAssetSidecar(mediaAssets: readonly MediaAssetIndexItem[] | null | undefined): readonly MediaAssetIndexItem[] | undefined;
38
+ export declare function buildPageOutline(input: Readonly<{
39
+ name: string;
40
+ path: string | null | undefined;
41
+ fallbackPath: string;
42
+ purpose: string;
43
+ blocks: readonly unknown[];
44
+ }>): PageOutline;
45
+ export declare function sanitizeSdkRuntimeBlockContent(blockKind: string, content: Record<string, unknown>): Record<string, unknown>;
@@ -8,4 +8,4 @@
8
8
  * 1. This constant
9
9
  * 2. The "version" field in package.json
10
10
  */
11
- export declare const SDK_VERSION = "0.85.0";
11
+ export declare const SDK_VERSION = "0.88.0";