@riverbankcms/sdk 0.128.0 → 0.129.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 (51) hide show
  1. package/README.md +33 -0
  2. package/dist/{PreviewEditorSidebar-Dbvb7GIr.mjs → PreviewEditorSidebar-B43CJ0g_.mjs} +3 -3
  3. package/dist/{PreviewEditorUI-e9O9l20X.mjs → PreviewEditorUI-DHirVkeM.mjs} +2 -2
  4. package/dist/{SdkPreviewModeRuntime-BZHt6e9w.mjs → SdkPreviewModeRuntime-BJumZy1B.mjs} +495 -292
  5. package/dist/{SiteChromeCustomizeContext-CvuGbHJX.mjs → SiteChromeCustomizeContext-D9SlpwEj.mjs} +140 -140
  6. package/dist/_dts/blocks/src/PageRenderer.d.ts +20 -10
  7. package/dist/_dts/blocks/src/index.d.ts +2 -1
  8. package/dist/_dts/blocks/src/pageRendererBoundaries.d.ts +30 -0
  9. package/dist/_dts/blocks/src/pageRenderingMode.d.ts +37 -0
  10. package/dist/_dts/blocks/src/server.d.ts +1 -1
  11. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +14 -0
  12. package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +2 -0
  13. package/dist/_dts/preview-next/src/client/index.d.ts +47 -47
  14. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +18 -6
  15. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +30 -21
  16. package/dist/_dts/preview-next/src/client/preview/PreviewThemedSiteDocument.d.ts +18 -5
  17. package/dist/_dts/preview-next/src/client/preview/themeRuntime.d.ts +9 -0
  18. package/dist/_dts/preview-next/src/client/sdk/SdkPreviewMode.d.ts +21 -6
  19. package/dist/_dts/preview-next/src/client/sdk-runtime.d.ts +8 -8
  20. package/dist/_dts/sdk/src/next/catch-all.d.ts +6 -0
  21. package/dist/_dts/sdk/src/next/index.d.ts +2 -1
  22. package/dist/_dts/sdk/src/next/renderSdkContent.d.ts +33 -0
  23. package/dist/_dts/sdk/src/next/types.d.ts +23 -9
  24. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +4 -6
  25. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +3 -3
  26. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  27. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +25 -3
  28. package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +13 -2
  29. package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +31 -18
  30. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +20 -9
  31. package/dist/_dts/sdk/src/rendering/index.d.ts +4 -2
  32. package/dist/_dts/sdk/src/rendering/renderingMode.d.ts +23 -0
  33. package/dist/_dts/sdk/src/rendering/server.d.ts +5 -3
  34. package/dist/_dts/sdk/src/rendering/themeRuntime.d.ts +6 -0
  35. package/dist/_dts/sdk/src/version.d.ts +1 -1
  36. package/dist/cli/index.mjs +237 -211
  37. package/dist/cli/init-docs/content/workflow-preview-mode.md +24 -11
  38. package/dist/client/client.mjs +420 -337
  39. package/dist/client/rendering.mjs +503 -358
  40. package/dist/preview-next/before-render.mjs +10 -3
  41. package/dist/preview-next/client/runtime.mjs +3 -3
  42. package/dist/{sdk-runtime-Cn_QSCOg.mjs → sdk-runtime-CfZd5pAm.mjs} +1 -1
  43. package/dist/{separator-CEoGABRc.mjs → separator-DkTe68HE.mjs} +1 -1
  44. package/dist/server/components.mjs +478 -351
  45. package/dist/server/index.mjs +1 -1
  46. package/dist/server/next.mjs +640 -500
  47. package/dist/server/prebuild.mjs +1 -1
  48. package/dist/server/rendering/server.mjs +499 -355
  49. package/dist/server/rendering.mjs +499 -355
  50. package/dist/server/server.mjs +1 -1
  51. package/package.json +1 -1
@@ -62345,6 +62345,216 @@ init_node();
62345
62345
  init_fragments();
62346
62346
  init_defineBlock();
62347
62347
  //#endregion
62348
+ //#region ../blocks/src/system/manifest/hydrateLinks.ts
62349
+ init_typeGuards();
62350
+ /**
62351
+ * Hydrates link objects within block content using the provided route map. Returns
62352
+ * the original content reference when no mutations are required to avoid unnecessary renders.
62353
+ */
62354
+ function hydrateManifestLinks(manifest, content, routes, pagesByIdentifier, entriesByIdentifier) {
62355
+ if (!routes || !manifest?.fields?.length) return content;
62356
+ return hydrateValue(content, {
62357
+ routes,
62358
+ pagesByIdentifier,
62359
+ entriesByIdentifier
62360
+ });
62361
+ }
62362
+ function hydrateValue(value, context) {
62363
+ try {
62364
+ if (Array.isArray(value)) {
62365
+ const resolvedItems = value.map((item) => hydrateValue(item, context));
62366
+ return resolvedItems.every((item, index) => item === value[index]) ? value : resolvedItems;
62367
+ }
62368
+ if (isRecord$25(value)) {
62369
+ if (isInternalLink$1(value)) return hydrateInternalLink(value, context.routes);
62370
+ if (isPageLink$1(value)) return hydratePageLink(value, context);
62371
+ if (isEntryLink$1(value)) return hydrateEntryLink(value, context);
62372
+ const resolvedEntries = Object.entries(value).map(([key, entry]) => [key, hydrateValue(entry, context)]);
62373
+ return resolvedEntries.every(([key, entry]) => entry === value[key]) ? value : Object.fromEntries(resolvedEntries);
62374
+ }
62375
+ return value;
62376
+ } catch (err) {
62377
+ console.error("[hydrateLinks] Error hydrating value:", err, value);
62378
+ return value;
62379
+ }
62380
+ }
62381
+ function hydrateInternalLink(link, routes) {
62382
+ const resolved = resolveRouteTarget(link.routeId, routes);
62383
+ if (!resolved) return link;
62384
+ const nextHref = resolved.href;
62385
+ const currentHref = typeof link.href === "string" && link.href.length > 0 ? link.href : null;
62386
+ const nextUpdatedAt = resolved.updatedAt;
62387
+ const updates = {};
62388
+ if (nextHref && nextHref !== currentHref) updates.href = nextHref;
62389
+ if (nextUpdatedAt && link.updatedAt !== nextUpdatedAt) updates.updatedAt = nextUpdatedAt;
62390
+ return Object.keys(updates).length > 0 ? {
62391
+ ...link,
62392
+ ...updates
62393
+ } : link;
62394
+ }
62395
+ function isInternalLink$1(value) {
62396
+ if (value.kind !== "internal") return false;
62397
+ if (typeof value.routeId !== "string" || value.routeId.length === 0) return false;
62398
+ return true;
62399
+ }
62400
+ function isPageLink$1(value) {
62401
+ if (value.kind !== "page") return false;
62402
+ if (typeof value.identifier !== "string" || value.identifier.length === 0) return false;
62403
+ return true;
62404
+ }
62405
+ function hydratePageLink(link, context) {
62406
+ const resolved = resolvePageRouteTarget(link, context);
62407
+ if (!resolved) return link;
62408
+ return {
62409
+ ...link,
62410
+ href: resolved.href,
62411
+ routeId: resolved.routeId
62412
+ };
62413
+ }
62414
+ function isEntryLink$1(value) {
62415
+ if (value.kind !== "entry") return false;
62416
+ if (typeof value.contentType !== "string" || value.contentType.length === 0) return false;
62417
+ if (typeof value.identifier !== "string" || value.identifier.length === 0) return false;
62418
+ return true;
62419
+ }
62420
+ function hydrateEntryLink(link, context) {
62421
+ const resolved = resolveEntryRouteTarget(link, context);
62422
+ if (!resolved) return link;
62423
+ return {
62424
+ ...link,
62425
+ href: resolved.href,
62426
+ routeId: resolved.routeId
62427
+ };
62428
+ }
62429
+ //#endregion
62430
+ //#region ../blocks/src/sdkBlockTransform.ts
62431
+ init_augmentManifest();
62432
+ /**
62433
+ * Transforms an SDK custom block into a BlockManifest.
62434
+ *
62435
+ * If the block has a `layout`, it can be rendered declaratively without React code.
62436
+ * If no layout, the block MUST use blockOverrides for rendering.
62437
+ */
62438
+ function transformSdkBlockToManifest(sdkBlock) {
62439
+ const hasLayout = Boolean(sdkBlock.layout) || Boolean(sdkBlock.variants && Object.keys(sdkBlock.variants).length > 0);
62440
+ return augmentManifest({
62441
+ name: sdkBlock.id,
62442
+ version: "1.0.0",
62443
+ title: sdkBlock.title,
62444
+ titleSource: sdkBlock.titleSource,
62445
+ description: sdkBlock.description,
62446
+ component: sdkBlock.id,
62447
+ fields: sdkBlock.fields,
62448
+ slots: [],
62449
+ category: sdkBlock.category,
62450
+ tags: sdkBlock.tags,
62451
+ icon: sdkBlock.icon,
62452
+ layout: sdkBlock.layout,
62453
+ variants: sdkBlock.variants,
62454
+ defaultVariant: sdkBlock.defaultVariant,
62455
+ variantOptions: sdkBlock.variantOptions,
62456
+ previewCustomize: sdkBlock.previewCustomize,
62457
+ behaviours: {
62458
+ supportsThemeSwitching: true,
62459
+ inlineEditing: hasLayout,
62460
+ animation: hasLayout,
62461
+ paletteHidden: false
62462
+ }
62463
+ });
62464
+ }
62465
+ /**
62466
+ * Transforms an SDK custom block into a SystemBlockDefinition.
62467
+ *
62468
+ * This creates a minimal definition with just the manifest - no data loaders
62469
+ * or content normalizers since SDK blocks handle their own rendering.
62470
+ */
62471
+ function transformSdkBlockToDefinition(sdkBlock) {
62472
+ return {
62473
+ manifest: transformSdkBlockToManifest(sdkBlock),
62474
+ dataLoaders: sdkBlock.dataLoaders
62475
+ };
62476
+ }
62477
+ //#endregion
62478
+ //#region ../blocks/src/customBlockRegistry.ts
62479
+ init_src$3();
62480
+ const defaultCustomBlockSourcePolicy = { kind: "canonical-db-fallback-sdk" };
62481
+ function isCustomBlockKind(blockKind) {
62482
+ return blockKind.startsWith("custom.");
62483
+ }
62484
+ function transformToBlockDescriptor(sdkBlock, source = "sdk") {
62485
+ return {
62486
+ name: sdkBlock.id,
62487
+ title: sdkBlock.title,
62488
+ description: sdkBlock.description,
62489
+ category: sdkBlock.category,
62490
+ tags: sdkBlock.tags,
62491
+ icon: sdkBlock.icon,
62492
+ definition: transformSdkBlockToDefinition(sdkBlock),
62493
+ source
62494
+ };
62495
+ }
62496
+ function toResolvedCustomBlock(manifest, source) {
62497
+ return {
62498
+ blockKind: manifest.id,
62499
+ manifest: transformSdkBlockToManifest(manifest),
62500
+ source,
62501
+ descriptor: transformToBlockDescriptor(manifest, source.kind === "managed-database" ? "database" : "sdk")
62502
+ };
62503
+ }
62504
+ function planCustomBlockRegistryResolution({ sdkConfig, customBlocks = [], policy = defaultCustomBlockSourcePolicy }) {
62505
+ switch (policy.kind) {
62506
+ case "canonical-db-fallback-sdk": {
62507
+ const entriesByKind = /* @__PURE__ */ new Map();
62508
+ const conflicts = [];
62509
+ for (const customBlock of customBlocks) entriesByKind.set(customBlock.manifest.id, toResolvedCustomBlock(customBlock.manifest, customBlock.source));
62510
+ for (const sdkBlock of sdkConfig?.customBlocks ?? []) {
62511
+ const existing = entriesByKind.get(sdkBlock.id);
62512
+ if (existing) {
62513
+ conflicts.push({
62514
+ kind: "conflict",
62515
+ blockKind: existing.blockKind,
62516
+ winner: existing.source,
62517
+ loser: { kind: "sdk-config" },
62518
+ reason: "db-canonical-sdk-fallback"
62519
+ });
62520
+ continue;
62521
+ }
62522
+ entriesByKind.set(sdkBlock.id, toResolvedCustomBlock(sdkBlock, { kind: "sdk-config" }));
62523
+ }
62524
+ return {
62525
+ policy,
62526
+ entries: Array.from(entriesByKind.values()),
62527
+ conflicts
62528
+ };
62529
+ }
62530
+ }
62531
+ }
62532
+ function createCustomBlockRegistry({ sdkConfig, customBlocks = [], policy = defaultCustomBlockSourcePolicy, onConflict }) {
62533
+ const plan = planCustomBlockRegistryResolution({
62534
+ sdkConfig,
62535
+ customBlocks,
62536
+ policy
62537
+ });
62538
+ const entriesByKind = new Map(plan.entries.map((entry) => [entry.blockKind, entry]));
62539
+ for (const conflict of plan.conflicts) onConflict?.(`Using ${sourceLabel(conflict.winner)} custom block "${conflict.blockKind}" - ${sourceLabel(conflict.loser)} block is fallback only`);
62540
+ return {
62541
+ entries: plan.entries,
62542
+ conflicts: plan.conflicts,
62543
+ findManifest: (blockKind) => {
62544
+ if (!isCustomBlockKind(blockKind)) return void 0;
62545
+ return entriesByKind.get(blockKind);
62546
+ }
62547
+ };
62548
+ }
62549
+ function sourceLabel(source) {
62550
+ switch (source.kind) {
62551
+ case "managed-database": return "DB";
62552
+ case "sdk-synced": return "SDK-synced DB";
62553
+ case "sdk-config": return "SDK config";
62554
+ default: return assertNever$24(source);
62555
+ }
62556
+ }
62557
+ //#endregion
62348
62558
  //#region ../theme-core/src/runtime/fontFamily.ts
62349
62559
  /**
62350
62560
  * Font Family Formatting Utilities
@@ -66127,214 +66337,111 @@ function mapFontStyle(italic) {
66127
66337
  return italic ? "italic" : "normal";
66128
66338
  }
66129
66339
  //#endregion
66130
- //#region ../blocks/src/system/manifest/hydrateLinks.ts
66131
- init_typeGuards();
66132
- /**
66133
- * Hydrates link objects within block content using the provided route map. Returns
66134
- * the original content reference when no mutations are required to avoid unnecessary renders.
66135
- */
66136
- function hydrateManifestLinks(manifest, content, routes, pagesByIdentifier, entriesByIdentifier) {
66137
- if (!routes || !manifest?.fields?.length) return content;
66138
- return hydrateValue(content, {
66139
- routes,
66140
- pagesByIdentifier,
66141
- entriesByIdentifier
66142
- });
66143
- }
66144
- function hydrateValue(value, context) {
66145
- try {
66146
- if (Array.isArray(value)) {
66147
- const resolvedItems = value.map((item) => hydrateValue(item, context));
66148
- return resolvedItems.every((item, index) => item === value[index]) ? value : resolvedItems;
66149
- }
66150
- if (isRecord$25(value)) {
66151
- if (isInternalLink$1(value)) return hydrateInternalLink(value, context.routes);
66152
- if (isPageLink$1(value)) return hydratePageLink(value, context);
66153
- if (isEntryLink$1(value)) return hydrateEntryLink(value, context);
66154
- const resolvedEntries = Object.entries(value).map(([key, entry]) => [key, hydrateValue(entry, context)]);
66155
- return resolvedEntries.every(([key, entry]) => entry === value[key]) ? value : Object.fromEntries(resolvedEntries);
66156
- }
66157
- return value;
66158
- } catch (err) {
66159
- console.error("[hydrateLinks] Error hydrating value:", err, value);
66160
- return value;
66340
+ //#region ../blocks/src/pageRenderingMode.ts
66341
+ var MissingBlockOverrideError$1 = class extends Error {
66342
+ constructor(blockKind) {
66343
+ super(`Override-only rendering requires an override for block kind "${blockKind}".`);
66344
+ this.blockKind = blockKind;
66345
+ this.code = "missing_block_override";
66346
+ this.name = "MissingBlockOverrideError";
66161
66347
  }
66348
+ };
66349
+ function isOverrideOnlyResourceInput(props) {
66350
+ return props.rendering?.kind === "overrides-only";
66162
66351
  }
66163
- function hydrateInternalLink(link, routes) {
66164
- const resolved = resolveRouteTarget(link.routeId, routes);
66165
- if (!resolved) return link;
66166
- const nextHref = resolved.href;
66167
- const currentHref = typeof link.href === "string" && link.href.length > 0 ? link.href : null;
66168
- const nextUpdatedAt = resolved.updatedAt;
66169
- const updates = {};
66170
- if (nextHref && nextHref !== currentHref) updates.href = nextHref;
66171
- if (nextUpdatedAt && link.updatedAt !== nextUpdatedAt) updates.updatedAt = nextUpdatedAt;
66172
- return Object.keys(updates).length > 0 ? {
66173
- ...link,
66174
- ...updates
66175
- } : link;
66176
- }
66177
- function isInternalLink$1(value) {
66178
- if (value.kind !== "internal") return false;
66179
- if (typeof value.routeId !== "string" || value.routeId.length === 0) return false;
66180
- return true;
66181
- }
66182
- function isPageLink$1(value) {
66183
- if (value.kind !== "page") return false;
66184
- if (typeof value.identifier !== "string" || value.identifier.length === 0) return false;
66185
- return true;
66186
- }
66187
- function hydratePageLink(link, context) {
66188
- const resolved = resolvePageRouteTarget(link, context);
66189
- if (!resolved) return link;
66352
+ function resolvePageThemeResources(props) {
66353
+ if (isOverrideOnlyResourceInput(props)) return { kind: "unavailable" };
66190
66354
  return {
66191
- ...link,
66192
- href: resolved.href,
66193
- routeId: resolved.routeId
66355
+ kind: "available",
66356
+ tokens: props.themeTokens ?? buildThemeRuntime$1(props.theme).tokens,
66357
+ config: props.theme
66194
66358
  };
66195
66359
  }
66196
- function isEntryLink$1(value) {
66197
- if (value.kind !== "entry") return false;
66198
- if (typeof value.contentType !== "string" || value.contentType.length === 0) return false;
66199
- if (typeof value.identifier !== "string" || value.identifier.length === 0) return false;
66200
- return true;
66360
+ function requireBlockOverride(resources, override, blockKind) {
66361
+ if (resources.kind === "unavailable" && !override) throw new MissingBlockOverrideError$1(blockKind);
66201
66362
  }
66202
- function hydrateEntryLink(link, context) {
66203
- const resolved = resolveEntryRouteTarget(link, context);
66204
- if (!resolved) return link;
66205
- return {
66206
- ...link,
66207
- href: resolved.href,
66208
- routeId: resolved.routeId
66209
- };
66363
+ function overrideThemeProps(resources) {
66364
+ return resources.kind === "available" ? {
66365
+ theme: resources.tokens,
66366
+ themeConfig: resources.config
66367
+ } : {};
66368
+ }
66369
+ function requireThemeResources(resources, blockKind) {
66370
+ if (resources.kind === "unavailable") throw new MissingBlockOverrideError$1(blockKind);
66371
+ return resources;
66210
66372
  }
66211
66373
  //#endregion
66212
- //#region ../blocks/src/sdkBlockTransform.ts
66213
- init_augmentManifest();
66214
- /**
66215
- * Transforms an SDK custom block into a BlockManifest.
66216
- *
66217
- * If the block has a `layout`, it can be rendered declaratively without React code.
66218
- * If no layout, the block MUST use blockOverrides for rendering.
66219
- */
66220
- function transformSdkBlockToManifest(sdkBlock) {
66221
- const hasLayout = Boolean(sdkBlock.layout) || Boolean(sdkBlock.variants && Object.keys(sdkBlock.variants).length > 0);
66222
- return augmentManifest({
66223
- name: sdkBlock.id,
66224
- version: "1.0.0",
66225
- title: sdkBlock.title,
66226
- titleSource: sdkBlock.titleSource,
66227
- description: sdkBlock.description,
66228
- component: sdkBlock.id,
66229
- fields: sdkBlock.fields,
66230
- slots: [],
66231
- category: sdkBlock.category,
66232
- tags: sdkBlock.tags,
66233
- icon: sdkBlock.icon,
66234
- layout: sdkBlock.layout,
66235
- variants: sdkBlock.variants,
66236
- defaultVariant: sdkBlock.defaultVariant,
66237
- variantOptions: sdkBlock.variantOptions,
66238
- previewCustomize: sdkBlock.previewCustomize,
66239
- behaviours: {
66240
- supportsThemeSwitching: true,
66241
- inlineEditing: hasLayout,
66242
- animation: hasLayout,
66243
- paletteHidden: false
66244
- }
66245
- });
66374
+ //#region ../blocks/src/pageRendererBoundaries.tsx
66375
+ init_typeGuards();
66376
+ const boundaryKey = (previousBlockId, nextBlockId) => `${previousBlockId}\u0000${nextBlockId}`;
66377
+ function isSiteStyleTransitionStyleGroup(value) {
66378
+ return value?.startsWith("site-style-transition-") === true;
66246
66379
  }
66247
- /**
66248
- * Transforms an SDK custom block into a SystemBlockDefinition.
66249
- *
66250
- * This creates a minimal definition with just the manifest - no data loaders
66251
- * or content normalizers since SDK blocks handle their own rendering.
66252
- */
66253
- function transformSdkBlockToDefinition(sdkBlock) {
66254
- return {
66255
- manifest: transformSdkBlockToManifest(sdkBlock),
66256
- dataLoaders: sdkBlock.dataLoaders
66257
- };
66380
+ function boundaryMapForAdjacentBlockIds(boundaries) {
66381
+ return new Map(boundaries.map((boundary) => [boundaryKey(boundary.previousBlockId, boundary.nextBlockId), boundary]));
66258
66382
  }
66259
- //#endregion
66260
- //#region ../blocks/src/customBlockRegistry.ts
66261
- init_src$3();
66262
- const defaultCustomBlockSourcePolicy = { kind: "canonical-db-fallback-sdk" };
66263
- function isCustomBlockKind(blockKind) {
66264
- return blockKind.startsWith("custom.");
66383
+ function boundaryBetweenBlocks(previousBlock, nextBlock, boundaries) {
66384
+ const previousBlockId = previousBlock?.id ?? null;
66385
+ const nextBlockId = nextBlock?.id ?? null;
66386
+ if (!previousBlockId || !nextBlockId) return null;
66387
+ return boundaries.get(boundaryKey(previousBlockId, nextBlockId)) ?? null;
66265
66388
  }
66266
- function transformToBlockDescriptor(sdkBlock, source = "sdk") {
66389
+ function renderBoundaryAfterBlock(input) {
66390
+ const previousBlockId = input.block.id;
66391
+ const nextBlockId = input.nextBlock?.id ?? null;
66392
+ if (!previousBlockId || !nextBlockId) return null;
66393
+ const boundary = input.boundaryByAdjacentBlockIds.get(boundaryKey(previousBlockId, nextBlockId));
66394
+ if (!boundary) return null;
66395
+ const rendered = /* @__PURE__ */ jsx("div", {
66396
+ "aria-hidden": "true",
66397
+ "data-block-boundary": "",
66398
+ "data-boundary-id": boundary.boundaryId,
66399
+ "data-boundary-previous-block-id": boundary.previousBlockId,
66400
+ "data-boundary-next-block-id": boundary.nextBlockId,
66401
+ "data-style-group": boundary.styleGroup,
66402
+ style: boundaryCssVarsStyle(boundary)
66403
+ }, `${input.blockKey}:boundary`);
66404
+ return input.wrapBoundary ? input.wrapBoundary(boundary, rendered) : rendered;
66405
+ }
66406
+ function boundaryCssVarsStyle(boundary) {
66267
66407
  return {
66268
- name: sdkBlock.id,
66269
- title: sdkBlock.title,
66270
- description: sdkBlock.description,
66271
- category: sdkBlock.category,
66272
- tags: sdkBlock.tags,
66273
- icon: sdkBlock.icon,
66274
- definition: transformSdkBlockToDefinition(sdkBlock),
66275
- source
66408
+ "--site-style-transition-from": boundary.cssVars.from,
66409
+ "--site-style-transition-to": boundary.cssVars.to
66276
66410
  };
66277
66411
  }
66278
- function toResolvedCustomBlock(manifest, source) {
66412
+ function boundaryReserveCssVarsStyle(input) {
66413
+ const before = input.before?.metrics.reserveCss ?? null;
66414
+ const after = input.after?.metrics.reserveCss ?? null;
66415
+ if (!before && !after) return void 0;
66279
66416
  return {
66280
- blockKind: manifest.id,
66281
- manifest: transformSdkBlockToManifest(manifest),
66282
- source,
66283
- descriptor: transformToBlockDescriptor(manifest, source.kind === "managed-database" ? "database" : "sdk")
66417
+ ...before ? { "--site-style-boundary-before-reserve": before } : {},
66418
+ ...after ? { "--site-style-boundary-after-reserve": after } : {}
66284
66419
  };
66285
66420
  }
66286
- function planCustomBlockRegistryResolution({ sdkConfig, customBlocks = [], policy = defaultCustomBlockSourcePolicy }) {
66287
- switch (policy.kind) {
66288
- case "canonical-db-fallback-sdk": {
66289
- const entriesByKind = /* @__PURE__ */ new Map();
66290
- const conflicts = [];
66291
- for (const customBlock of customBlocks) entriesByKind.set(customBlock.manifest.id, toResolvedCustomBlock(customBlock.manifest, customBlock.source));
66292
- for (const sdkBlock of sdkConfig?.customBlocks ?? []) {
66293
- const existing = entriesByKind.get(sdkBlock.id);
66294
- if (existing) {
66295
- conflicts.push({
66296
- kind: "conflict",
66297
- blockKind: existing.blockKind,
66298
- winner: existing.source,
66299
- loser: { kind: "sdk-config" },
66300
- reason: "db-canonical-sdk-fallback"
66301
- });
66302
- continue;
66303
- }
66304
- entriesByKind.set(sdkBlock.id, toResolvedCustomBlock(sdkBlock, { kind: "sdk-config" }));
66305
- }
66306
- return {
66307
- policy,
66308
- entries: Array.from(entriesByKind.values()),
66309
- conflicts
66310
- };
66311
- }
66312
- }
66421
+ function transitionCssVarsStyle(content) {
66422
+ const transitionStyles = isObjectRecord$1(content._transitionStyles) ? content._transitionStyles : null;
66423
+ const cssVars = isObjectRecord$1(transitionStyles?.cssVars) ? transitionStyles.cssVars : null;
66424
+ const from = typeof cssVars?.from === "string" ? cssVars.from : null;
66425
+ const to = typeof cssVars?.to === "string" ? cssVars.to : null;
66426
+ if (!from && !to) return void 0;
66427
+ return {
66428
+ ...from ? { "--site-style-transition-from": from } : {},
66429
+ ...to ? { "--site-style-transition-to": to } : {}
66430
+ };
66313
66431
  }
66314
- function createCustomBlockRegistry({ sdkConfig, customBlocks = [], policy = defaultCustomBlockSourcePolicy, onConflict }) {
66315
- const plan = planCustomBlockRegistryResolution({
66316
- sdkConfig,
66317
- customBlocks,
66318
- policy
66319
- });
66320
- const entriesByKind = new Map(plan.entries.map((entry) => [entry.blockKind, entry]));
66321
- for (const conflict of plan.conflicts) onConflict?.(`Using ${sourceLabel(conflict.winner)} custom block "${conflict.blockKind}" - ${sourceLabel(conflict.loser)} block is fallback only`);
66432
+ function mergeStyleObjects(left, right) {
66433
+ if (!left) return right;
66434
+ if (!right) return left;
66322
66435
  return {
66323
- entries: plan.entries,
66324
- conflicts: plan.conflicts,
66325
- findManifest: (blockKind) => {
66326
- if (!isCustomBlockKind(blockKind)) return void 0;
66327
- return entriesByKind.get(blockKind);
66328
- }
66436
+ ...left,
66437
+ ...right
66329
66438
  };
66330
66439
  }
66331
- function sourceLabel(source) {
66332
- switch (source.kind) {
66333
- case "managed-database": return "DB";
66334
- case "sdk-synced": return "SDK-synced DB";
66335
- case "sdk-config": return "SDK config";
66336
- default: return assertNever$24(source);
66337
- }
66440
+ function pageBlockPosition(index, blockCount) {
66441
+ if (blockCount <= 1) return "only";
66442
+ if (index === 0) return "first";
66443
+ if (index === blockCount - 1) return "last";
66444
+ return "middle";
66338
66445
  }
66339
66446
  //#endregion
66340
66447
  //#region ../blocks/src/PageRenderer.tsx
@@ -66342,7 +66449,8 @@ init_fragments();
66342
66449
  init_colorStyles();
66343
66450
  init_typeGuards();
66344
66451
  init_media();
66345
- function PageRenderer$1({ theme, page, runtimeBoundaries, usePlaceholders = false, dataContext, wrapBlock, wrapBoundary, registry, themeTokens: providedThemeTokens, routeMap, blockOverrides, sdkConfig, customBlocks, previewAuthoring }) {
66452
+ function PageRenderer$1(props) {
66453
+ const { page, runtimeBoundaries, usePlaceholders = false, dataContext, wrapBlock, wrapBoundary, registry, routeMap, blockOverrides, sdkConfig, customBlocks, previewAuthoring } = props;
66346
66454
  const imageResolveContext = React$1.useMemo(() => resolvePageRendererImageResolveContext(dataContext), [
66347
66455
  dataContext?.imageResolveContext,
66348
66456
  dataContext?.mediaAssets,
@@ -66351,12 +66459,16 @@ function PageRenderer$1({ theme, page, runtimeBoundaries, usePlaceholders = fals
66351
66459
  ]);
66352
66460
  const boundaryByAdjacentBlockIds = React$1.useMemo(() => boundaryMapForAdjacentBlockIds(runtimeBoundaries ?? []), [runtimeBoundaries]);
66353
66461
  const usesRuntimeBoundaries = runtimeBoundaries !== void 0;
66462
+ const themeResources = React$1.useMemo(() => resolvePageThemeResources(props), [
66463
+ props.rendering,
66464
+ props.theme,
66465
+ props.themeTokens
66466
+ ]);
66354
66467
  if (!page || page.blocks.length === 0) return /* @__PURE__ */ jsx("div", {
66355
66468
  className: "rb-p-6 rb-caption",
66356
66469
  style: textColorStyle("mutedText"),
66357
66470
  children: "No blocks found."
66358
66471
  });
66359
- const themeTokens = providedThemeTokens ?? buildThemeRuntime$1(theme).tokens;
66360
66472
  const resolvedRegistry = registry ?? getDefaultComponentRegistry();
66361
66473
  setContextResolveImageUrlContext(imageResolveContext);
66362
66474
  return /* @__PURE__ */ jsx("div", { children: page.blocks.map((block, index) => {
@@ -66379,22 +66491,14 @@ function PageRenderer$1({ theme, page, runtimeBoundaries, usePlaceholders = fals
66379
66491
  const renderableContent = getRenderableContent(block, dataContext?.previewStage);
66380
66492
  const variantKey = definition?.manifest ? resolveVariantKey(definition.manifest, renderableContent) : null;
66381
66493
  const shouldUseWrapper = !managesOwnWrapper || Boolean(wrapBlock);
66382
- const blockSectionProps = {
66383
- themeTokens,
66384
- themeConfig: theme,
66494
+ const blockSectionProps = buildBlockSectionProps({
66495
+ props,
66496
+ themeResources,
66385
66497
  block,
66386
- usePlaceholders,
66387
- dataContext,
66388
66498
  blockKey,
66389
- registry: resolvedRegistry,
66390
- routeMap,
66391
- wrapBlock,
66392
- blockOverrides,
66393
- sdkConfig,
66394
- customBlocks,
66395
66499
  imageResolveContext,
66396
- previewAuthoring
66397
- };
66500
+ registry: resolvedRegistry
66501
+ });
66398
66502
  if (!shouldUseWrapper) {
66399
66503
  const rendered = /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps }, `${blockKey}:block`);
66400
66504
  return boundaryElement ? /* @__PURE__ */ jsxs(React$1.Fragment, { children: [rendered, boundaryElement] }, blockKey) : rendered;
@@ -66436,81 +66540,6 @@ function PageRenderer$1({ theme, page, runtimeBoundaries, usePlaceholders = fals
66436
66540
  })] }, blockKey);
66437
66541
  }) });
66438
66542
  }
66439
- function isSiteStyleTransitionStyleGroup(value) {
66440
- return value?.startsWith("site-style-transition-") === true;
66441
- }
66442
- function boundaryMapForAdjacentBlockIds(boundaries) {
66443
- return new Map(boundaries.map((boundary) => [boundaryKey(boundary.previousBlockId, boundary.nextBlockId), boundary]));
66444
- }
66445
- function boundaryKey(previousBlockId, nextBlockId) {
66446
- return `${previousBlockId}\u0000${nextBlockId}`;
66447
- }
66448
- function boundaryBetweenBlocks(previousBlock, nextBlock, boundaryByAdjacentBlockIds) {
66449
- const previousBlockId = previousBlock?.id ?? null;
66450
- const nextBlockId = nextBlock?.id ?? null;
66451
- if (!previousBlockId || !nextBlockId) return null;
66452
- return boundaryByAdjacentBlockIds.get(boundaryKey(previousBlockId, nextBlockId)) ?? null;
66453
- }
66454
- function renderBoundaryAfterBlock(input) {
66455
- const previousBlockId = input.block.id;
66456
- const nextBlockId = input.nextBlock?.id ?? null;
66457
- if (!previousBlockId || !nextBlockId) return null;
66458
- const boundary = input.boundaryByAdjacentBlockIds.get(boundaryKey(previousBlockId, nextBlockId));
66459
- if (!boundary) return null;
66460
- const rendered = /* @__PURE__ */ jsx("div", {
66461
- "aria-hidden": "true",
66462
- "data-block-boundary": "",
66463
- "data-boundary-id": boundary.boundaryId,
66464
- "data-boundary-previous-block-id": boundary.previousBlockId,
66465
- "data-boundary-next-block-id": boundary.nextBlockId,
66466
- "data-style-group": boundary.styleGroup,
66467
- style: boundaryCssVarsStyle(boundary)
66468
- }, `${input.blockKey}:boundary`);
66469
- return input.wrapBoundary ? input.wrapBoundary(boundary, rendered) : rendered;
66470
- }
66471
- function boundaryCssVarsStyle(boundary) {
66472
- return {
66473
- "--site-style-transition-from": boundary.cssVars.from,
66474
- "--site-style-transition-to": boundary.cssVars.to
66475
- };
66476
- }
66477
- function boundaryReserveCssVarsStyle(input) {
66478
- const before = input.before ? boundaryReserveValueForTreatment(input.before) : null;
66479
- const after = input.after ? boundaryReserveValueForTreatment(input.after) : null;
66480
- if (!before && !after) return void 0;
66481
- return {
66482
- ...before ? { "--site-style-boundary-before-reserve": before } : {},
66483
- ...after ? { "--site-style-boundary-after-reserve": after } : {}
66484
- };
66485
- }
66486
- function boundaryReserveValueForTreatment(boundary) {
66487
- return boundary.metrics.reserveCss;
66488
- }
66489
- function transitionCssVarsStyle(content) {
66490
- const transitionStyles = isObjectRecord$1(content._transitionStyles) ? content._transitionStyles : null;
66491
- const cssVars = isObjectRecord$1(transitionStyles?.cssVars) ? transitionStyles.cssVars : null;
66492
- const from = typeof cssVars?.from === "string" ? cssVars.from : null;
66493
- const to = typeof cssVars?.to === "string" ? cssVars.to : null;
66494
- if (!from && !to) return void 0;
66495
- return {
66496
- ...from ? { "--site-style-transition-from": from } : {},
66497
- ...to ? { "--site-style-transition-to": to } : {}
66498
- };
66499
- }
66500
- function mergeStyleObjects(left, right) {
66501
- if (!left) return right;
66502
- if (!right) return left;
66503
- return {
66504
- ...left,
66505
- ...right
66506
- };
66507
- }
66508
- function pageBlockPosition(index, blockCount) {
66509
- if (blockCount <= 1) return "only";
66510
- if (index === 0) return "first";
66511
- if (index === blockCount - 1) return "last";
66512
- return "middle";
66513
- }
66514
66543
  function resolvePageRendererImageResolveContext(dataContext) {
66515
66544
  const input = dataContext?.imageResolveContext;
66516
66545
  return buildResolveImageUrlContext({
@@ -66520,6 +66549,23 @@ function resolvePageRendererImageResolveContext(dataContext) {
66520
66549
  mediaAssets: input?.mediaAssets ?? dataContext?.mediaAssets
66521
66550
  });
66522
66551
  }
66552
+ function buildBlockSectionProps(input) {
66553
+ return {
66554
+ themeResources: input.themeResources,
66555
+ block: input.block,
66556
+ usePlaceholders: input.props.usePlaceholders ?? false,
66557
+ dataContext: input.props.dataContext,
66558
+ blockKey: input.blockKey,
66559
+ registry: input.registry,
66560
+ routeMap: input.props.routeMap,
66561
+ wrapBlock: input.props.wrapBlock,
66562
+ blockOverrides: input.props.blockOverrides,
66563
+ sdkConfig: input.props.sdkConfig,
66564
+ customBlocks: input.props.customBlocks,
66565
+ imageResolveContext: input.imageResolveContext,
66566
+ previewAuthoring: input.props.previewAuthoring
66567
+ };
66568
+ }
66523
66569
  /**
66524
66570
  * Look up a block override component by block kind.
66525
66571
  * Supports both full ("block.hero") and short ("hero") keys.
@@ -66586,7 +66632,7 @@ function getCachedValidator(manifest, flavour) {
66586
66632
  * referential equality of all props that affect rendering. Standard React.memo
66587
66633
  * wouldn't catch all the render triggers from the editor store.
66588
66634
  */
66589
- const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeTokens, themeConfig, block, usePlaceholders, dataContext, registry, routeMap, wrapBlock, blockOverrides, sdkConfig, customBlocks, imageResolveContext, previewAuthoring }) {
66635
+ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources, block, usePlaceholders, dataContext, registry, routeMap, wrapBlock, blockOverrides, sdkConfig, customBlocks, imageResolveContext, previewAuthoring }) {
66590
66636
  const perfStart = globalThis.process?.env?.DEBUG_PERF === "1" && typeof window === "undefined" ? Date.now() : 0;
66591
66637
  const fallbackImageResolveContext = getCurrentResolveImageUrlContext();
66592
66638
  const resolvedImageResolveContext = imageResolveContext ?? fallbackImageResolveContext;
@@ -66607,6 +66653,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeTokens, t
66607
66653
  return node;
66608
66654
  }
66609
66655
  const OverrideComponent = getBlockOverride(block.kind, blockOverrides);
66656
+ requireBlockOverride(themeResources, OverrideComponent, block.kind);
66610
66657
  let definition = getBlockDefinition(block.kind);
66611
66658
  if (!definition && block.kind.startsWith("custom.")) definition = createCustomBlockRegistry({
66612
66659
  sdkConfig,
@@ -66619,8 +66666,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeTokens, t
66619
66666
  if (OverrideComponent) {
66620
66667
  const rendered = /* @__PURE__ */ jsx(OverrideComponent, {
66621
66668
  content: getRenderableContent(block, dataContext?.previewStage),
66622
- theme: themeTokens,
66623
- themeConfig,
66669
+ ...overrideThemeProps(themeResources),
66624
66670
  data: void 0,
66625
66671
  siteId: dataContext?.siteId,
66626
66672
  apiBaseUrl: dataContext?.apiBaseUrl,
@@ -66719,8 +66765,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeTokens, t
66719
66765
  const hasResolvedData = !!resolved && typeof resolved === "object" && Object.keys(resolved).length > 0;
66720
66766
  const baseProps = {
66721
66767
  content: hydratedContent,
66722
- theme: themeTokens,
66723
- themeConfig,
66768
+ ...overrideThemeProps(themeResources),
66724
66769
  data: resolved,
66725
66770
  siteId: dataContext?.siteId,
66726
66771
  apiBaseUrl: dataContext?.apiBaseUrl,
@@ -66740,6 +66785,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeTokens, t
66740
66785
  let rendered;
66741
66786
  if (OverrideComponent) rendered = /* @__PURE__ */ jsx(OverrideComponent, { ...baseProps });
66742
66787
  else {
66788
+ requireThemeResources(themeResources, block.kind);
66743
66789
  const BlockComponent = getCachedBlockComponent(definition.manifest);
66744
66790
  const pathBase = typeof block.id === "string" && block.id.length > 0 ? `blocks.${block.id}.` : void 0;
66745
66791
  const rootContext = { $root: {
@@ -66789,7 +66835,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeTokens, t
66789
66835
  });
66790
66836
  }
66791
66837
  }, (prev, next) => {
66792
- return prev.block === next.block && prev.registry === next.registry && prev.dataContext === next.dataContext && prev.themeTokens === next.themeTokens && prev.themeConfig === next.themeConfig && prev.routeMap === next.routeMap && prev.usePlaceholders === next.usePlaceholders && prev.wrapBlock === next.wrapBlock && prev.blockOverrides === next.blockOverrides && prev.sdkConfig === next.sdkConfig && prev.customBlocks === next.customBlocks && prev.imageResolveContext === next.imageResolveContext && prev.previewAuthoring === next.previewAuthoring;
66838
+ return prev.block === next.block && prev.registry === next.registry && prev.dataContext === next.dataContext && prev.themeResources === next.themeResources && prev.routeMap === next.routeMap && prev.usePlaceholders === next.usePlaceholders && prev.wrapBlock === next.wrapBlock && prev.blockOverrides === next.blockOverrides && prev.sdkConfig === next.sdkConfig && prev.customBlocks === next.customBlocks && prev.imageResolveContext === next.imageResolveContext && prev.previewAuthoring === next.previewAuthoring;
66793
66839
  });
66794
66840
  function fallback(message) {
66795
66841
  return /* @__PURE__ */ jsx("div", {
@@ -159880,8 +159926,9 @@ function parseBlocksTheme(theme) {
159880
159926
  function buildThemeRuntime(theme) {
159881
159927
  return { tokens: buildThemeRuntime$1(parseBlocksTheme(theme)).tokens };
159882
159928
  }
159883
- //#endregion
159884
- //#region src/rendering/blocks-page-renderer.ts
159929
+ function isOverrideOnlyPageRenderer(props) {
159930
+ return props.rendering?.kind === "overrides-only";
159931
+ }
159885
159932
  function normalizeSdkCustomBlocks(customBlocks) {
159886
159933
  if (!customBlocks) return void 0;
159887
159934
  return customBlocks.map((block) => {
@@ -159912,15 +159959,23 @@ function toBlocksPageRendererDataContext(dataContext) {
159912
159959
  }
159913
159960
  function PageRenderer(props) {
159914
159961
  const blocksSdkConfig = props.sdkConfig ? { customBlocks: normalizeSdkCustomBlocks(props.sdkConfig.customBlocks) } : props.sdkConfig;
159915
- const blocksTheme = parseBlocksTheme(props.theme);
159916
- const blocksProps = {
159917
- ...props,
159918
- theme: blocksTheme,
159962
+ const { rendering: _rendering, theme: _theme, themeTokens: _themeTokens, ...commonProps } = props;
159963
+ const commonBlocksProps = {
159964
+ ...commonProps,
159919
159965
  dataContext: props.dataContext ? toBlocksPageRendererDataContext(props.dataContext) : void 0,
159920
159966
  blockOverrides: toBlocksBlockOverrides(props.blockOverrides),
159921
159967
  sdkConfig: blocksSdkConfig,
159922
159968
  customBlocks: normalizeSdkCustomBlocks(props.customBlocks)
159923
159969
  };
159970
+ const blocksProps = isOverrideOnlyPageRenderer(props) ? {
159971
+ ...commonBlocksProps,
159972
+ rendering: { kind: "overrides-only" },
159973
+ blockOverrides: toBlocksBlockOverrides(props.blockOverrides) ?? {}
159974
+ } : {
159975
+ ...commonBlocksProps,
159976
+ theme: parseBlocksTheme(props.theme),
159977
+ themeTokens: props.themeTokens
159978
+ };
159924
159979
  return React$1.createElement(PageRenderer$1, blocksProps);
159925
159980
  }
159926
159981
  //#endregion
@@ -159953,8 +160008,31 @@ function renderWithSdkThemeRuntime({ themeRuntime, theme, children }) {
159953
160008
  default: return assertNever$24(themeRuntime);
159954
160009
  }
159955
160010
  }
160011
+ function renderWithOverrideOnlyRuntime({ runtime, children }) {
160012
+ switch (runtime.kind) {
160013
+ case "responsive-only": return /* @__PURE__ */ jsx(ResponsiveScope, {
160014
+ responsiveMode: runtime.responsiveMode,
160015
+ children
160016
+ });
160017
+ case "none": return /* @__PURE__ */ jsx(Fragment, { children });
160018
+ default: return assertNever$24(runtime);
160019
+ }
160020
+ }
159956
160021
  //#endregion
159957
160022
  //#region src/rendering/components/pageShared.tsx
160023
+ function isOverrideOnlyPage(props) {
160024
+ return props.rendering?.kind === "overrides-only";
160025
+ }
160026
+ function resolvePageThemeTokens(props) {
160027
+ const baseTokens = props.themeTokens ?? buildThemeRuntime(props.theme).tokens;
160028
+ return props.sdkConfig?.theme?.palette ? {
160029
+ ...baseTokens,
160030
+ palette: {
160031
+ ...baseTokens.palette,
160032
+ ...props.sdkConfig.theme.palette
160033
+ }
160034
+ } : baseTokens;
160035
+ }
159958
160036
  function toPageHydrationBootstrapConfig(props) {
159959
160037
  return {
159960
160038
  siteId: props.siteId,
@@ -159962,55 +160040,60 @@ function toPageHydrationBootstrapConfig(props) {
159962
160040
  mediaAssets: props.mediaAssets
159963
160041
  };
159964
160042
  }
159965
- function PageContent({ page, runtimeBoundaries, theme, themeTokens: providedTokens, siteId, resolvedData, bookingOfferingPresets, routeMap, pagesByIdentifier, entriesByIdentifier, wrapBlock, registry, usePlaceholders = false, blockOverrides, sdkConfig, customBlocks, supabaseUrl, mediaAssets, apiBaseUrl, portalToken, previewToken, dataContext, themeRuntime = defaultPageThemeRuntime }) {
159966
- const baseTokens = providedTokens ?? buildThemeRuntime(theme).tokens;
159967
- return renderWithSdkThemeRuntime({
159968
- themeRuntime,
159969
- theme,
159970
- children: /* @__PURE__ */ jsx(PageRenderer, {
159971
- theme,
159972
- page,
159973
- runtimeBoundaries,
159974
- themeTokens: sdkConfig?.theme?.palette ? {
159975
- ...baseTokens,
159976
- palette: {
159977
- ...baseTokens.palette,
159978
- ...sdkConfig.theme.palette
159979
- }
159980
- } : baseTokens,
159981
- usePlaceholders,
159982
- dataContext: {
160043
+ function PageContent(props) {
160044
+ const { page, runtimeBoundaries, siteId, resolvedData, bookingOfferingPresets, routeMap, pagesByIdentifier, entriesByIdentifier, wrapBlock, registry, usePlaceholders = false, blockOverrides, sdkConfig, customBlocks, supabaseUrl, mediaAssets, apiBaseUrl, portalToken, previewToken, dataContext } = props;
160045
+ const rendererCommonProps = {
160046
+ page,
160047
+ runtimeBoundaries,
160048
+ usePlaceholders,
160049
+ dataContext: {
160050
+ siteId,
160051
+ apiBaseUrl,
160052
+ portalToken,
160053
+ previewToken,
160054
+ resolvedData,
160055
+ bookingOfferingPresets: bookingOfferingPresets ?? [],
160056
+ routes: routeMap,
160057
+ pagesByIdentifier,
160058
+ entriesByIdentifier,
160059
+ occurrenceContext: dataContext?.occurrenceContext ?? null,
160060
+ entrySubrouteContext: dataContext?.entrySubrouteContext ?? null,
160061
+ contentEntry: dataContext?.contentEntry ?? null,
160062
+ pageSurface: dataContext?.pageSurface ?? null,
160063
+ subject: dataContext?.subject ?? null,
160064
+ editableRouteMetadataFieldIds: dataContext?.editableRouteMetadataFieldIds ?? null,
160065
+ previewStage: dataContext?.previewStage,
160066
+ supabaseUrl,
160067
+ mediaAssets,
160068
+ imageResolveContext: {
159983
160069
  siteId,
159984
- apiBaseUrl,
159985
- portalToken,
159986
- previewToken,
159987
- resolvedData,
159988
- bookingOfferingPresets: bookingOfferingPresets ?? [],
159989
- routes: routeMap,
159990
- pagesByIdentifier,
159991
- entriesByIdentifier,
159992
- occurrenceContext: dataContext?.occurrenceContext ?? null,
159993
- entrySubrouteContext: dataContext?.entrySubrouteContext ?? null,
159994
- contentEntry: dataContext?.contentEntry ?? null,
159995
- pageSurface: dataContext?.pageSurface ?? null,
159996
- subject: dataContext?.subject ?? null,
159997
- editableRouteMetadataFieldIds: dataContext?.editableRouteMetadataFieldIds ?? null,
159998
- previewStage: dataContext?.previewStage,
159999
160070
  supabaseUrl,
160000
- mediaAssets,
160001
- imageResolveContext: {
160002
- siteId,
160003
- supabaseUrl,
160004
- mediaAssets
160005
- }
160006
- },
160007
- routeMap,
160008
- wrapBlock,
160009
- registry,
160010
- blockOverrides,
160011
- sdkConfig: sdkConfig ? { customBlocks: sdkConfig.customBlocks } : null,
160012
- customBlocks
160013
- })
160071
+ mediaAssets
160072
+ }
160073
+ },
160074
+ routeMap,
160075
+ wrapBlock,
160076
+ registry,
160077
+ sdkConfig: sdkConfig ? { customBlocks: sdkConfig.customBlocks } : null,
160078
+ customBlocks
160079
+ };
160080
+ const content = isOverrideOnlyPage(props) ? /* @__PURE__ */ jsx(PageRenderer, {
160081
+ ...rendererCommonProps,
160082
+ rendering: { kind: "overrides-only" },
160083
+ blockOverrides: props.blockOverrides
160084
+ }) : /* @__PURE__ */ jsx(PageRenderer, {
160085
+ ...rendererCommonProps,
160086
+ theme: props.theme,
160087
+ themeTokens: resolvePageThemeTokens(props),
160088
+ blockOverrides
160089
+ });
160090
+ return isOverrideOnlyPage(props) ? renderWithOverrideOnlyRuntime({
160091
+ runtime: props.rendering.runtime,
160092
+ children: content
160093
+ }) : renderWithSdkThemeRuntime({
160094
+ themeRuntime: props.themeRuntime ?? defaultPageThemeRuntime,
160095
+ theme: props.theme,
160096
+ children: content
160014
160097
  });
160015
160098
  }
160016
160099
  //#endregion
@@ -160176,7 +160259,7 @@ var SimpleCache = class {
160176
160259
  * 1. This constant
160177
160260
  * 2. The "version" field in package.json
160178
160261
  */
160179
- const SDK_VERSION = "0.128.0";
160262
+ const SDK_VERSION = "0.129.0";
160180
160263
  //#endregion
160181
160264
  //#region src/client/error.ts
160182
160265
  let _Symbol$for;