@riverbankcms/sdk 0.70.2 → 0.70.4

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 (89) hide show
  1. package/README.md +29 -0
  2. package/dist/_dts/api/src/contentTypes.d.ts +2 -1
  3. package/dist/_dts/block-form/src/client/index.d.ts +1 -1
  4. package/dist/_dts/block-form/src/fields/types.d.ts +14 -2
  5. package/dist/_dts/block-form/src/registry/schemas.d.ts +2 -0
  6. package/dist/_dts/block-form/src/widgets/MediaField/mediaFieldDefaults.d.ts +2 -2
  7. package/dist/_dts/block-form/src/widgets/MediaField/mediaFieldSchema.d.ts +2 -2
  8. package/dist/_dts/blocks/src/lib/media.d.ts +1 -1
  9. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +1829 -149
  10. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +1829 -149
  11. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +1829 -149
  12. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +1829 -149
  13. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +1829 -149
  14. package/dist/_dts/blocks/src/system/blocks/cta-full.d.ts +1 -30727
  15. package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +11 -30827
  16. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +1829 -149
  17. package/dist/_dts/blocks/src/system/blocks/file-download.d.ts +3 -3
  18. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +1829 -149
  19. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +106 -1
  20. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +1829 -149
  21. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +1829 -149
  22. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +1829 -149
  23. package/dist/_dts/blocks/src/system/defineBlock.d.ts +3 -3
  24. package/dist/_dts/blocks/src/system/fragments/library/card.d.ts +2 -30793
  25. package/dist/_dts/blocks/src/system/fragments/library/ctaRow.d.ts +2 -30727
  26. package/dist/_dts/blocks/src/system/fragments/library/feedbackCallout.d.ts +2 -30779
  27. package/dist/_dts/blocks/src/system/fragments/library/heroCtaRow.d.ts +33 -30743
  28. package/dist/_dts/blocks/src/system/fragments/library/sectionState.d.ts +2 -30770
  29. package/dist/_dts/blocks/src/system/fragments/types.d.ts +8 -7
  30. package/dist/_dts/blocks/src/system/manifest/derivedContent.d.ts +7 -5
  31. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +1 -1
  32. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +192 -3
  33. package/dist/_dts/blocks/src/system/runtime/nodes/file-download.d.ts +1 -1
  34. package/dist/_dts/content-model/src/content-types/schema.d.ts +7 -0
  35. package/dist/_dts/content-model/src/contentManifest.d.ts +4 -1
  36. package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +1 -1
  37. package/dist/_dts/core/src/index.d.ts +1 -1
  38. package/dist/_dts/core/src/planner.d.ts +4 -0
  39. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +53 -20
  40. package/dist/_dts/editor-blocks/src/index.d.ts +1 -1
  41. package/dist/_dts/editor-blocks/src/media/MediaField.d.ts +6 -5
  42. package/dist/_dts/media-core/src/videoSlotPolicy.d.ts +0 -1
  43. package/dist/_dts/media-editor/src/context.d.ts +4 -1
  44. package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +8 -1
  45. package/dist/_dts/media-react/src/index.d.ts +1 -5
  46. package/dist/_dts/preview-next/src/client/widgets/PreviewMediaField.d.ts +2 -1
  47. package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +1 -0
  48. package/dist/_dts/sdk/src/cli/commands/delete.d.ts +3 -0
  49. package/dist/_dts/sdk/src/cli/commands/style.d.ts +18 -0
  50. package/dist/_dts/sdk/src/cli/helpers.d.ts +8 -33
  51. package/dist/_dts/sdk/src/cli/site-commands/oneOffCommands.d.ts +81 -0
  52. package/dist/_dts/sdk/src/components.d.ts +2 -1
  53. package/dist/_dts/sdk/src/config/field-definitions.d.ts +6 -2
  54. package/dist/_dts/sdk/src/config/typed-entries.d.ts +4 -2
  55. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +2 -1
  56. package/dist/_dts/sdk/src/manifest/prompt/examples/cta.d.ts +5 -5
  57. package/dist/_dts/sdk/src/manifest/prompt/examples/features-grid.d.ts +2 -2
  58. package/dist/_dts/sdk/src/manifest/prompt/examples/hero.d.ts +2 -2
  59. package/dist/_dts/sdk/src/manifest/prompt/examples/pricing.d.ts +10 -10
  60. package/dist/_dts/sdk/src/manifest/prompt/examples/testimonials.d.ts +4 -4
  61. package/dist/_dts/sdk/src/manifest/validation/output-schema.d.ts +11 -1
  62. package/dist/_dts/sdk/src/next/types.d.ts +4 -2
  63. package/dist/_dts/sdk/src/public-api/contracts.d.ts +2 -1
  64. package/dist/_dts/sdk/src/rendering/index.d.ts +2 -1
  65. package/dist/_dts/sdk/src/rendering/overrideResolution.d.ts +10 -0
  66. package/dist/_dts/sdk/src/rendering/overrides.d.ts +12 -0
  67. package/dist/_dts/sdk/src/version.d.ts +1 -1
  68. package/dist/cli/index.mjs +1072 -289
  69. package/dist/cli/init-docs/content/workflow-preview-mode.md +167 -0
  70. package/dist/client/client.mjs +443 -403
  71. package/dist/client/hooks.mjs +172 -121
  72. package/dist/client/rendering/client.mjs +148 -112
  73. package/dist/client/rendering/islands.mjs +80 -31
  74. package/dist/client/rendering.mjs +25531 -25481
  75. package/dist/preview-next/client/runtime.mjs +394 -1136
  76. package/dist/server/components.mjs +229 -171
  77. package/dist/server/config-template-validation.mjs +31 -1
  78. package/dist/server/config-validation.mjs +172 -121
  79. package/dist/server/config.mjs +172 -121
  80. package/dist/server/data.mjs +172 -121
  81. package/dist/server/index.mjs +1 -1
  82. package/dist/server/next.mjs +301 -174
  83. package/dist/server/page-converter.mjs +379 -185
  84. package/dist/server/prebuild.mjs +1 -1
  85. package/dist/server/rendering/server.mjs +219 -171
  86. package/dist/server/rendering.mjs +229 -171
  87. package/dist/server/routing.mjs +175 -124
  88. package/dist/server/server.mjs +173 -122
  89. package/package.json +5 -3
@@ -7094,6 +7094,28 @@ function resolveRepeaterGridColumnFieldId(options) {
7094
7094
 
7095
7095
  // ../blocks/src/system/manifest/schema.ts
7096
7096
  var visibilityLevels = ["admin", "designer", "author"];
7097
+ var MEDIA_KINDS = [
7098
+ "image",
7099
+ "video",
7100
+ "audio",
7101
+ "document",
7102
+ "spreadsheet",
7103
+ "archive"
7104
+ ];
7105
+ var DISPLAY_MEDIA_KINDS = [
7106
+ "image",
7107
+ "video",
7108
+ "audio"
7109
+ ];
7110
+ var PUBLIC_FILE_FIELD_KINDS = [
7111
+ "document",
7112
+ "spreadsheet",
7113
+ "archive",
7114
+ "audio"
7115
+ ];
7116
+ function isDisplayMediaKind(kind) {
7117
+ return DISPLAY_MEDIA_KINDS.includes(kind);
7118
+ }
7097
7119
  var siteOptionSources = [
7098
7120
  "eventCategories",
7099
7121
  "venues",
@@ -7257,11 +7279,19 @@ var richTextFieldSchema = baseFieldSchema.extend({
7257
7279
  });
7258
7280
  var mediaFieldSchema = baseFieldSchema.extend({
7259
7281
  type: z5.literal("media"),
7260
- mediaKinds: z5.array(
7261
- z5.enum(["image", "video", "audio", "document", "spreadsheet", "archive"])
7262
- ).default(["image"]),
7282
+ // Keep full MEDIA_KINDS parse compatibility for pre-file-field manifests.
7283
+ // New authoring surfaces should use `file.fileKinds` for document/archive
7284
+ // style assets, but old saved schemas must not fail to open.
7285
+ mediaKinds: z5.array(z5.enum(MEDIA_KINDS)).default(["image"]).transform((kinds) => {
7286
+ const displayKinds = kinds.filter(isDisplayMediaKind);
7287
+ return displayKinds.length > 0 ? displayKinds : ["image"];
7288
+ }),
7263
7289
  aspectRatio: z5.string().optional()
7264
7290
  });
7291
+ var fileFieldSchema = baseFieldSchema.extend({
7292
+ type: z5.literal("file"),
7293
+ fileKinds: z5.array(z5.enum(PUBLIC_FILE_FIELD_KINDS)).default([...PUBLIC_FILE_FIELD_KINDS])
7294
+ });
7265
7295
  var booleanFieldSchema = baseFieldSchema.extend({
7266
7296
  type: z5.literal("boolean")
7267
7297
  });
@@ -7567,6 +7597,7 @@ function getFieldSchemaInternal() {
7567
7597
  textFieldSchema,
7568
7598
  richTextFieldSchema,
7569
7599
  mediaFieldSchema,
7600
+ fileFieldSchema,
7570
7601
  booleanFieldSchema,
7571
7602
  numberFieldSchema,
7572
7603
  dateFieldSchema,
@@ -7845,6 +7876,7 @@ function deriveFieldValidationPlan(field, path = [field.id]) {
7845
7876
  case "richText":
7846
7877
  return makePlan("richText", "object", field, path, required, commonConstraints(required, { kind: "richTextDoc" }));
7847
7878
  case "media":
7879
+ case "file":
7848
7880
  return makePlan("media", "object", field, path, required, commonConstraints(required, { kind: "mediaObject" }));
7849
7881
  case "link":
7850
7882
  return makePlan("link", "object", field, path, required, commonConstraints(required, { kind: "linkObject" }));
@@ -17736,13 +17768,18 @@ var fragmentDataSchema = z30.object({
17736
17768
  loader: dataLoaderSchema.optional()
17737
17769
  });
17738
17770
  var fragmentConfigSchema = z30.object({
17739
- id: z30.string().min(1, "Fragment id is required").regex(FRAGMENT_ID_PATTERN, "Fragment id must be alphanumeric with optional . _ - separators"),
17771
+ id: z30.string().min(1, "Fragment id is required").regex(
17772
+ FRAGMENT_ID_PATTERN,
17773
+ "Fragment id must be alphanumeric with optional . _ - separators"
17774
+ ),
17740
17775
  title: z30.string().optional(),
17741
17776
  description: z30.string().optional(),
17742
17777
  category: z30.enum(["content", "media", "interactive", "layout"]).optional(),
17743
17778
  icon: z30.string().optional(),
17744
17779
  fields: fieldSchema.array().default([]),
17745
- layout: z30.union([NodeSchema, NodeSchema.array()]).transform((value) => Array.isArray(value) ? value : [value]),
17780
+ layout: z30.union([NodeSchema, NodeSchema.array()]).transform(
17781
+ (value) => Array.isArray(value) ? value : [value]
17782
+ ),
17746
17783
  data: fragmentDataSchema.optional()
17747
17784
  });
17748
17785
  var FragmentConfigError = class extends Error {
@@ -17764,13 +17801,19 @@ function defineFragment(config) {
17764
17801
  function scopeFragmentFields(fragment, scope) {
17765
17802
  const normalizedScope = scope.trim();
17766
17803
  if (!normalizedScope) {
17767
- return fragment.fields.map((field) => cloneFieldDefinition2(field));
17804
+ return fragment.fields.map(
17805
+ (field) => cloneFieldDefinition2(field)
17806
+ );
17768
17807
  }
17769
- return fragment.fields.map((field) => prefixFieldId(field, normalizedScope));
17808
+ return fragment.fields.map(
17809
+ (field) => prefixFieldId(field, normalizedScope)
17810
+ );
17770
17811
  }
17771
17812
  function scopeFragmentLayout(fragment, scope) {
17772
17813
  const normalizedScope = scope.trim();
17773
- return fragment.layout.map((node) => cloneAndScopeNode(node, normalizedScope));
17814
+ return fragment.layout.map(
17815
+ (node) => cloneAndScopeNode(node, normalizedScope)
17816
+ );
17774
17817
  }
17775
17818
  function validateFieldDefinitions(fields3, fragmentId) {
17776
17819
  const seen = /* @__PURE__ */ new Set();
@@ -17852,7 +17895,9 @@ function cloneAndScopeNode(node, scope) {
17852
17895
  ...node
17853
17896
  };
17854
17897
  if (node.children) {
17855
- cloned.children = node.children.map((child) => cloneAndScopeNode(child, scope));
17898
+ cloned.children = node.children.map(
17899
+ (child) => cloneAndScopeNode(child, scope)
17900
+ );
17856
17901
  }
17857
17902
  if (node.props) {
17858
17903
  cloned.props = scopePropBindings(node.props, scope);
@@ -17878,7 +17923,9 @@ function scopeBinding(binding, scope) {
17878
17923
  const cloned = {
17879
17924
  ...binding,
17880
17925
  transforms: binding.transforms?.map(
17881
- (step) => ({ ...step })
17926
+ (step) => ({
17927
+ ...step
17928
+ })
17882
17929
  ) ?? []
17883
17930
  };
17884
17931
  cloned.from = scopeContentPath(binding.from, scope);
@@ -17922,7 +17969,9 @@ function scopePropValue(value, scope) {
17922
17969
  };
17923
17970
  }
17924
17971
  const result = {};
17925
- for (const [key, entry] of Object.entries(value)) {
17972
+ for (const [key, entry] of Object.entries(
17973
+ value
17974
+ )) {
17926
17975
  result[key] = scopePropValue(entry, scope);
17927
17976
  }
17928
17977
  return result;
@@ -18371,28 +18420,29 @@ var ctaRowFragment = defineFragment({
18371
18420
  });
18372
18421
 
18373
18422
  // ../blocks/src/system/fragments/library/heroCtaRow.ts
18423
+ var heroCtaFields = [
18424
+ createCtasRepeater({
18425
+ label: "Calls to action",
18426
+ itemLabel: "CTA",
18427
+ maxItems: 3,
18428
+ button: {
18429
+ variants: [
18430
+ { value: "default", label: "Default" },
18431
+ { value: "primary", label: "Primary" },
18432
+ { value: "secondary", label: "Secondary" },
18433
+ { value: "outline", label: "Outline" }
18434
+ ],
18435
+ defaultVariant: "default",
18436
+ includeSize: true,
18437
+ defaultSize: "lg"
18438
+ }
18439
+ })
18440
+ ];
18374
18441
  var heroCtaRowFragment = defineFragment({
18375
18442
  id: "heroCtaRow",
18376
18443
  title: "Hero CTAs",
18377
18444
  description: "Repeatable hero calls to action rendered inline.",
18378
- fields: [
18379
- createCtasRepeater({
18380
- label: "Calls to action",
18381
- itemLabel: "CTA",
18382
- maxItems: 3,
18383
- button: {
18384
- variants: [
18385
- { value: "default", label: "Default" },
18386
- { value: "primary", label: "Primary" },
18387
- { value: "secondary", label: "Secondary" },
18388
- { value: "outline", label: "Outline" }
18389
- ],
18390
- defaultVariant: "default",
18391
- includeSize: true,
18392
- defaultSize: "lg"
18393
- }
18394
- })
18395
- ],
18445
+ fields: heroCtaFields,
18396
18446
  layout: [
18397
18447
  ctaRow({
18398
18448
  collectionPath: "content.ctas",
@@ -24397,8 +24447,7 @@ var PUBLIC_DOWNLOAD_MEDIA_TYPES = [
24397
24447
  "document",
24398
24448
  "spreadsheet",
24399
24449
  "archive",
24400
- "audio",
24401
- "video"
24450
+ "audio"
24402
24451
  ];
24403
24452
  var hotspotSchema2 = z41.object({
24404
24453
  x: z41.number().min(0).max(1),
@@ -26134,104 +26183,107 @@ var courseDetailsBlockDefinition = {
26134
26183
  };
26135
26184
 
26136
26185
  // ../blocks/src/system/blocks/events/event-spotlight.ts
26137
- var eventSpotlightManifest = createBlockManifest({
26186
+ var eventSpotlightFields = [
26187
+ ...sectionHeaderFields("Upcoming Events"),
26188
+ {
26189
+ id: "maxEvents",
26190
+ type: "select",
26191
+ label: "Events to display",
26192
+ description: "Number of events to show",
26193
+ required: false,
26194
+ multiple: false,
26195
+ defaultValue: "3",
26196
+ options: [
26197
+ { value: "1", label: "1 event" },
26198
+ { value: "2", label: "2 events" },
26199
+ { value: "3", label: "3 events" },
26200
+ { value: "4", label: "4 events" },
26201
+ { value: "5", label: "5 events" },
26202
+ { value: "6", label: "6 events" }
26203
+ ],
26204
+ ui: { intent: "display" }
26205
+ },
26206
+ {
26207
+ id: "ctaLabel",
26208
+ type: "text",
26209
+ label: "Section button text",
26210
+ description: "Optional button shown below the spotlight cards",
26211
+ required: false,
26212
+ multiline: false,
26213
+ maxLength: 40,
26214
+ ui: { intent: "content" }
26215
+ },
26216
+ {
26217
+ id: "ctaUrl",
26218
+ type: "link",
26219
+ label: "Section button destination",
26220
+ required: false,
26221
+ ui: { intent: "display" }
26222
+ },
26223
+ layoutField,
26224
+ columnsField(["2", "3"]),
26225
+ ...cardStylingFields,
26226
+ ...eventDisplayFields,
26227
+ emptyStateField,
26228
+ sectionStylesField({
26229
+ id: "_sectionStyles",
26230
+ label: "Section styles"
26231
+ })
26232
+ ];
26233
+ var eventSpotlightLayout = [
26234
+ styledSection({
26235
+ children: sectionContainer([
26236
+ // Optional heading
26237
+ text(
26238
+ { as: "h2" },
26239
+ bind("content.heading"),
26240
+ when("content.heading")
26241
+ ),
26242
+ // Optional description
26243
+ richText(
26244
+ { className: "rb-prose rb-max-w-none" },
26245
+ bind("content.description"),
26246
+ when("content.description")
26247
+ ),
26248
+ // Event spotlight component
26249
+ el("event-spotlight", {
26250
+ events: { $bind: { from: "data.events" } },
26251
+ layout: { $bind: { from: "content.layout", fallback: "grid" } },
26252
+ columns: { $bind: { from: "content.columns", fallback: "3" } },
26253
+ cardVariant: { $bind: { from: "content.cardVariant", fallback: "default" } },
26254
+ buttonVariant: { $bind: { from: "content.buttonVariant", fallback: "primary" } },
26255
+ buttonText: { $bind: { from: "content.buttonText", fallback: "View event" } },
26256
+ ctaLabel: { $bind: { from: "content.ctaLabel" } },
26257
+ ctaUrl: { $bind: { from: "content.ctaUrl", transforms: [{ id: "links.resolve" }] } },
26258
+ showVenue: { $bind: { from: "content.showVenue" } },
26259
+ showMap: { $bind: { from: "content.showMap" } },
26260
+ showCapacity: { $bind: { from: "content.showCapacity" } },
26261
+ emptyMessage: { $bind: { from: "content.emptyMessage" } }
26262
+ })
26263
+ ], {
26264
+ gap: "lg"
26265
+ }),
26266
+ // sectionContainer (rb-container) already provides horizontal padding
26267
+ baseClass: "",
26268
+ spacing: "comfortable"
26269
+ })
26270
+ ];
26271
+ var eventSpotlightConfig = {
26138
26272
  id: "block.event-spotlight",
26139
26273
  version: "1.1.0",
26140
26274
  title: "Event Spotlight",
26141
26275
  titleSource: "heading",
26142
26276
  description: "Feature a few upcoming events on your homepage",
26143
26277
  skipSectionStyles: true,
26144
- additionalFields: [
26145
- ...sectionHeaderFields("Upcoming Events"),
26146
- {
26147
- id: "maxEvents",
26148
- type: "select",
26149
- label: "Events to display",
26150
- description: "Number of events to show",
26151
- required: false,
26152
- multiple: false,
26153
- defaultValue: "3",
26154
- options: [
26155
- { value: "1", label: "1 event" },
26156
- { value: "2", label: "2 events" },
26157
- { value: "3", label: "3 events" },
26158
- { value: "4", label: "4 events" },
26159
- { value: "5", label: "5 events" },
26160
- { value: "6", label: "6 events" }
26161
- ],
26162
- ui: { intent: "display" }
26163
- },
26164
- {
26165
- id: "ctaLabel",
26166
- type: "text",
26167
- label: "Section button text",
26168
- description: "Optional button shown below the spotlight cards",
26169
- required: false,
26170
- multiline: false,
26171
- maxLength: 40,
26172
- ui: { intent: "content" }
26173
- },
26174
- {
26175
- id: "ctaUrl",
26176
- type: "link",
26177
- label: "Section button destination",
26178
- required: false,
26179
- ui: { intent: "display" }
26180
- },
26181
- layoutField,
26182
- columnsField(["2", "3"]),
26183
- ...cardStylingFields,
26184
- ...eventDisplayFields,
26185
- emptyStateField,
26186
- sectionStylesField({
26187
- id: "_sectionStyles",
26188
- label: "Section styles"
26189
- })
26190
- ],
26278
+ additionalFields: eventSpotlightFields,
26191
26279
  styleTokens: { background: "surface", typography: "body", spacing: "md" },
26192
26280
  behaviours: { supportsThemeSwitching: true, inlineEditing: false, animation: false, paletteHidden: false },
26193
26281
  category: "content",
26194
26282
  tags: ["events", "featured", "homepage", "spotlight", "upcoming"],
26195
26283
  icon: "Star",
26196
- layout: [
26197
- styledSection({
26198
- children: sectionContainer([
26199
- // Optional heading
26200
- text(
26201
- { as: "h2" },
26202
- bind("content.heading"),
26203
- when("content.heading")
26204
- ),
26205
- // Optional description
26206
- richText(
26207
- { className: "rb-prose rb-max-w-none" },
26208
- bind("content.description"),
26209
- when("content.description")
26210
- ),
26211
- // Event spotlight component
26212
- el("event-spotlight", {
26213
- events: { $bind: { from: "data.events" } },
26214
- layout: { $bind: { from: "content.layout", fallback: "grid" } },
26215
- columns: { $bind: { from: "content.columns", fallback: "3" } },
26216
- cardVariant: { $bind: { from: "content.cardVariant", fallback: "default" } },
26217
- buttonVariant: { $bind: { from: "content.buttonVariant", fallback: "primary" } },
26218
- buttonText: { $bind: { from: "content.buttonText", fallback: "View event" } },
26219
- ctaLabel: { $bind: { from: "content.ctaLabel" } },
26220
- ctaUrl: { $bind: { from: "content.ctaUrl", transforms: [{ id: "links.resolve" }] } },
26221
- showVenue: { $bind: { from: "content.showVenue" } },
26222
- showMap: { $bind: { from: "content.showMap" } },
26223
- showCapacity: { $bind: { from: "content.showCapacity" } },
26224
- emptyMessage: { $bind: { from: "content.emptyMessage" } }
26225
- })
26226
- ], {
26227
- gap: "lg"
26228
- }),
26229
- // sectionContainer (rb-container) already provides horizontal padding
26230
- baseClass: "",
26231
- spacing: "comfortable"
26232
- })
26233
- ]
26234
- });
26284
+ layout: eventSpotlightLayout
26285
+ };
26286
+ var eventSpotlightManifest = createBlockManifest(eventSpotlightConfig);
26235
26287
  var eventSpotlightBlockDefinition = {
26236
26288
  manifest: eventSpotlightManifest,
26237
26289
  dataSchemas: {
@@ -30956,18 +31008,18 @@ var fileDownloadManifest = createBlockManifest({
30956
31008
  title: "File Download",
30957
31009
  titleSource: ["title", "file.filename"],
30958
31010
  category: "media",
30959
- description: "Add a simple public download link for a document, ZIP, audio, or video file.",
31011
+ description: "Add a simple public download link for a document, ZIP, or audio file.",
30960
31012
  tags: ["file", "download", "document", "zip", "media"],
30961
31013
  icon: "Download",
30962
31014
  includeContainerStyles: true,
30963
31015
  additionalFields: [
30964
31016
  {
30965
31017
  id: "file",
30966
- type: "media",
31018
+ type: "file",
30967
31019
  label: "Download file",
30968
31020
  description: "Choose the file visitors can download.",
30969
31021
  required: false,
30970
- mediaKinds: [...PUBLIC_DOWNLOAD_MEDIA_TYPES],
31022
+ fileKinds: [...PUBLIC_DOWNLOAD_MEDIA_TYPES],
30971
31023
  ui: { intent: "content" }
30972
31024
  },
30973
31025
  {
@@ -35476,28 +35528,8 @@ var __iconNode15 = [
35476
35528
  ];
35477
35529
  var FileHeadphone = createLucideIcon("file-headphone", __iconNode15);
35478
35530
 
35479
- // ../../node_modules/.pnpm/lucide-react@0.563.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/file-play.js
35480
- var __iconNode16 = [
35481
- [
35482
- "path",
35483
- {
35484
- d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
35485
- key: "1oefj6"
35486
- }
35487
- ],
35488
- ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
35489
- [
35490
- "path",
35491
- {
35492
- d: "M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z",
35493
- key: "1tzo1f"
35494
- }
35495
- ]
35496
- ];
35497
- var FilePlay = createLucideIcon("file-play", __iconNode16);
35498
-
35499
35531
  // ../../node_modules/.pnpm/lucide-react@0.563.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/file-spreadsheet.js
35500
- var __iconNode17 = [
35532
+ var __iconNode16 = [
35501
35533
  [
35502
35534
  "path",
35503
35535
  {
@@ -35511,10 +35543,10 @@ var __iconNode17 = [
35511
35543
  ["path", { d: "M8 17h2", key: "2yhykz" }],
35512
35544
  ["path", { d: "M14 17h2", key: "10kma7" }]
35513
35545
  ];
35514
- var FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode17);
35546
+ var FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode16);
35515
35547
 
35516
35548
  // ../../node_modules/.pnpm/lucide-react@0.563.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/file-text.js
35517
- var __iconNode18 = [
35549
+ var __iconNode17 = [
35518
35550
  [
35519
35551
  "path",
35520
35552
  {
@@ -35527,25 +35559,25 @@ var __iconNode18 = [
35527
35559
  ["path", { d: "M16 13H8", key: "t4e002" }],
35528
35560
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
35529
35561
  ];
35530
- var FileText = createLucideIcon("file-text", __iconNode18);
35562
+ var FileText = createLucideIcon("file-text", __iconNode17);
35531
35563
 
35532
35564
  // ../../node_modules/.pnpm/lucide-react@0.563.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/info.js
35533
- var __iconNode19 = [
35565
+ var __iconNode18 = [
35534
35566
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
35535
35567
  ["path", { d: "M12 16v-4", key: "1dtifu" }],
35536
35568
  ["path", { d: "M12 8h.01", key: "e9boi3" }]
35537
35569
  ];
35538
- var Info = createLucideIcon("info", __iconNode19);
35570
+ var Info = createLucideIcon("info", __iconNode18);
35539
35571
 
35540
35572
  // ../../node_modules/.pnpm/lucide-react@0.563.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/mail.js
35541
- var __iconNode20 = [
35573
+ var __iconNode19 = [
35542
35574
  ["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
35543
35575
  ["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
35544
35576
  ];
35545
- var Mail = createLucideIcon("mail", __iconNode20);
35577
+ var Mail = createLucideIcon("mail", __iconNode19);
35546
35578
 
35547
35579
  // ../../node_modules/.pnpm/lucide-react@0.563.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/map-pin.js
35548
- var __iconNode21 = [
35580
+ var __iconNode20 = [
35549
35581
  [
35550
35582
  "path",
35551
35583
  {
@@ -35555,14 +35587,14 @@ var __iconNode21 = [
35555
35587
  ],
35556
35588
  ["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }]
35557
35589
  ];
35558
- var MapPin = createLucideIcon("map-pin", __iconNode21);
35590
+ var MapPin = createLucideIcon("map-pin", __iconNode20);
35559
35591
 
35560
35592
  // ../../node_modules/.pnpm/lucide-react@0.563.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/minus.js
35561
- var __iconNode22 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
35562
- var Minus = createLucideIcon("minus", __iconNode22);
35593
+ var __iconNode21 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
35594
+ var Minus = createLucideIcon("minus", __iconNode21);
35563
35595
 
35564
35596
  // ../../node_modules/.pnpm/lucide-react@0.563.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/phone.js
35565
- var __iconNode23 = [
35597
+ var __iconNode22 = [
35566
35598
  [
35567
35599
  "path",
35568
35600
  {
@@ -35571,10 +35603,10 @@ var __iconNode23 = [
35571
35603
  }
35572
35604
  ]
35573
35605
  ];
35574
- var Phone = createLucideIcon("phone", __iconNode23);
35606
+ var Phone = createLucideIcon("phone", __iconNode22);
35575
35607
 
35576
35608
  // ../../node_modules/.pnpm/lucide-react@0.563.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/play.js
35577
- var __iconNode24 = [
35609
+ var __iconNode23 = [
35578
35610
  [
35579
35611
  "path",
35580
35612
  {
@@ -35583,17 +35615,17 @@ var __iconNode24 = [
35583
35615
  }
35584
35616
  ]
35585
35617
  ];
35586
- var Play = createLucideIcon("play", __iconNode24);
35618
+ var Play = createLucideIcon("play", __iconNode23);
35587
35619
 
35588
35620
  // ../../node_modules/.pnpm/lucide-react@0.563.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/plus.js
35589
- var __iconNode25 = [
35621
+ var __iconNode24 = [
35590
35622
  ["path", { d: "M5 12h14", key: "1ays0h" }],
35591
35623
  ["path", { d: "M12 5v14", key: "s699le" }]
35592
35624
  ];
35593
- var Plus = createLucideIcon("plus", __iconNode25);
35625
+ var Plus = createLucideIcon("plus", __iconNode24);
35594
35626
 
35595
35627
  // ../../node_modules/.pnpm/lucide-react@0.563.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/shopping-cart.js
35596
- var __iconNode26 = [
35628
+ var __iconNode25 = [
35597
35629
  ["circle", { cx: "8", cy: "21", r: "1", key: "jimo8o" }],
35598
35630
  ["circle", { cx: "19", cy: "21", r: "1", key: "13723u" }],
35599
35631
  [
@@ -35604,22 +35636,22 @@ var __iconNode26 = [
35604
35636
  }
35605
35637
  ]
35606
35638
  ];
35607
- var ShoppingCart = createLucideIcon("shopping-cart", __iconNode26);
35639
+ var ShoppingCart = createLucideIcon("shopping-cart", __iconNode25);
35608
35640
 
35609
35641
  // ../../node_modules/.pnpm/lucide-react@0.563.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/upload.js
35610
- var __iconNode27 = [
35642
+ var __iconNode26 = [
35611
35643
  ["path", { d: "M12 3v12", key: "1x0j5s" }],
35612
35644
  ["path", { d: "m17 8-5-5-5 5", key: "7q97r8" }],
35613
35645
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
35614
35646
  ];
35615
- var Upload = createLucideIcon("upload", __iconNode27);
35647
+ var Upload = createLucideIcon("upload", __iconNode26);
35616
35648
 
35617
35649
  // ../../node_modules/.pnpm/lucide-react@0.563.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/x.js
35618
- var __iconNode28 = [
35650
+ var __iconNode27 = [
35619
35651
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
35620
35652
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
35621
35653
  ];
35622
- var X = createLucideIcon("x", __iconNode28);
35654
+ var X = createLucideIcon("x", __iconNode27);
35623
35655
 
35624
35656
  // ../blocks/src/system/icons/cta.ts
35625
35657
  var CTA_ICON_NAMES = [
@@ -35711,7 +35743,12 @@ var IconNode = ({
35711
35743
 
35712
35744
  // ../blocks/src/system/runtime/nodes/file-download.tsx
35713
35745
  import { jsx as jsx17, jsxs as jsxs6 } from "react/jsx-runtime";
35714
- var FILE_DOWNLOAD_BUTTON_VARIANTS = ["primary", "secondary", "outline", "link"];
35746
+ var FILE_DOWNLOAD_BUTTON_VARIANTS = [
35747
+ "primary",
35748
+ "secondary",
35749
+ "outline",
35750
+ "link"
35751
+ ];
35715
35752
  function isDownloadableMediaType(type) {
35716
35753
  return typeof type === "string" && PUBLIC_DOWNLOAD_MEDIA_TYPES.includes(type);
35717
35754
  }
@@ -35726,8 +35763,6 @@ function iconForMediaType(type) {
35726
35763
  switch (type) {
35727
35764
  case "audio":
35728
35765
  return /* @__PURE__ */ jsx17(FileHeadphone, { "aria-hidden": "true" });
35729
- case "video":
35730
- return /* @__PURE__ */ jsx17(FilePlay, { "aria-hidden": "true" });
35731
35766
  case "document":
35732
35767
  return /* @__PURE__ */ jsx17(FileText, { "aria-hidden": "true" });
35733
35768
  case "spreadsheet":
@@ -35766,8 +35801,22 @@ function FileDownloadNode({
35766
35801
  }
35767
35802
  ),
35768
35803
  /* @__PURE__ */ jsxs6("div", { className: "rb-min-w-0 rb-space-y-1", children: [
35769
- /* @__PURE__ */ jsx17("h2", { className: "rb-m-0 rb-text-lg rb-font-semibold", style: textColorStyle("heading"), children: heading }),
35770
- body ? /* @__PURE__ */ jsx17("p", { className: "rb-m-0 rb-text-sm", style: textColorStyle("mutedText"), children: body }) : null,
35804
+ /* @__PURE__ */ jsx17(
35805
+ "h2",
35806
+ {
35807
+ className: "rb-m-0 rb-text-lg rb-font-semibold",
35808
+ style: textColorStyle("heading"),
35809
+ children: heading
35810
+ }
35811
+ ),
35812
+ body ? /* @__PURE__ */ jsx17(
35813
+ "p",
35814
+ {
35815
+ className: "rb-m-0 rb-text-sm",
35816
+ style: textColorStyle("mutedText"),
35817
+ children: body
35818
+ }
35819
+ ) : null,
35771
35820
  /* @__PURE__ */ jsx17(
35772
35821
  "p",
35773
35822
  {
@@ -57097,6 +57146,83 @@ function Page(props2) {
57097
57146
  return /* @__PURE__ */ jsx59(PageContent, { ...props2 });
57098
57147
  }
57099
57148
 
57149
+ // src/rendering/overrides.ts
57150
+ var lazyBlockOverrideSymbol = /* @__PURE__ */ Symbol.for("riverbankcms.sdk.lazyBlockOverride");
57151
+
57152
+ // src/rendering/overrideResolution.ts
57153
+ function isRecord6(value) {
57154
+ return typeof value === "object" && value !== null;
57155
+ }
57156
+ function isBlockOutlineLike(value) {
57157
+ const id = value.id;
57158
+ return typeof value.kind === "string" && (typeof id === "string" || id === null) && (typeof value.purpose === "string" || isRecord6(value.content) || isRecord6(value.draftContent) || isRecord6(value.bindings));
57159
+ }
57160
+ function collectBlockKindsFromValue(value, usedKinds, seen) {
57161
+ if (!isRecord6(value)) return;
57162
+ if (seen.has(value)) return;
57163
+ seen.add(value);
57164
+ if (isBlockOutlineLike(value)) {
57165
+ usedKinds.add(value.kind);
57166
+ }
57167
+ for (const child of Object.values(value)) {
57168
+ if (Array.isArray(child)) {
57169
+ for (const item of child) {
57170
+ collectBlockKindsFromValue(item, usedKinds, seen);
57171
+ }
57172
+ continue;
57173
+ }
57174
+ collectBlockKindsFromValue(child, usedKinds, seen);
57175
+ }
57176
+ }
57177
+ function collectUsedBlockKinds(page) {
57178
+ const usedKinds = /* @__PURE__ */ new Set();
57179
+ const seen = /* @__PURE__ */ new WeakSet();
57180
+ for (const block of page?.blocks ?? []) {
57181
+ collectBlockKindsFromValue(block, usedKinds, seen);
57182
+ }
57183
+ return usedKinds;
57184
+ }
57185
+ function shortBlockKind(blockKind) {
57186
+ return blockKind.replace(/^block\./, "");
57187
+ }
57188
+ function selectOverrideKeysForUsedKinds(usedKinds, entries) {
57189
+ const availableKeys = new Set(entries.map(([key]) => key));
57190
+ const selectedKeys = /* @__PURE__ */ new Set();
57191
+ for (const blockKind of usedKinds) {
57192
+ if (availableKeys.has(blockKind)) {
57193
+ selectedKeys.add(blockKind);
57194
+ continue;
57195
+ }
57196
+ const shortKind = shortBlockKind(blockKind);
57197
+ if (availableKeys.has(shortKind)) {
57198
+ selectedKeys.add(shortKind);
57199
+ }
57200
+ }
57201
+ return selectedKeys;
57202
+ }
57203
+ function isLazyRegistration(registration) {
57204
+ return isRecord6(registration) && registration[lazyBlockOverrideSymbol] === true;
57205
+ }
57206
+ async function resolveOverrideComponent(registration) {
57207
+ if (isLazyRegistration(registration)) {
57208
+ return registration.load();
57209
+ }
57210
+ return registration;
57211
+ }
57212
+ async function resolveBlockOverridesForPage(registrations, page) {
57213
+ if (!registrations) return void 0;
57214
+ const entries = Object.entries(registrations);
57215
+ if (entries.length === 0) return void 0;
57216
+ const selectedKeys = selectOverrideKeysForUsedKinds(collectUsedBlockKinds(page), entries);
57217
+ if (selectedKeys.size === 0) return void 0;
57218
+ const resolved = {};
57219
+ for (const [key, registration] of entries) {
57220
+ if (!selectedKeys.has(key)) continue;
57221
+ resolved[key] = await resolveOverrideComponent(registration);
57222
+ }
57223
+ return resolved;
57224
+ }
57225
+
57100
57226
  // src/metadata/generatePageMetadata.ts
57101
57227
  function generatePageMetadata(input) {
57102
57228
  const { page, site, path, siteUrl, overrides, googleSiteVerification, titleMode = "append-site-title" } = input;
@@ -57819,6 +57945,7 @@ function createCatchAllPage(options) {
57819
57945
  const resolvedTheme = themeResult.theme;
57820
57946
  let rendered;
57821
57947
  if (isPageContent(content)) {
57948
+ const resolvedBlockOverrides = await resolveBlockOverridesForPage(blockOverrides, content.page);
57822
57949
  rendered = /* @__PURE__ */ jsx60(
57823
57950
  Page,
57824
57951
  {
@@ -57828,7 +57955,7 @@ function createCatchAllPage(options) {
57828
57955
  apiBaseUrl,
57829
57956
  portalToken,
57830
57957
  resolvedData: content.resolvedData,
57831
- blockOverrides,
57958
+ blockOverrides: resolvedBlockOverrides,
57832
57959
  sdkConfig: content.sdkConfig,
57833
57960
  supabaseUrl: content.supabaseUrl,
57834
57961
  mediaAssets: content.mediaAssets,
@@ -57842,6 +57969,7 @@ function createCatchAllPage(options) {
57842
57969
  if (!content.templatePage) {
57843
57970
  return notFound();
57844
57971
  }
57972
+ const resolvedBlockOverrides = await resolveBlockOverridesForPage(blockOverrides, content.templatePage);
57845
57973
  rendered = /* @__PURE__ */ jsx60(
57846
57974
  Page,
57847
57975
  {
@@ -57851,7 +57979,7 @@ function createCatchAllPage(options) {
57851
57979
  apiBaseUrl,
57852
57980
  portalToken,
57853
57981
  resolvedData: content.resolvedData,
57854
- blockOverrides,
57982
+ blockOverrides: resolvedBlockOverrides,
57855
57983
  sdkConfig: content.sdkConfig,
57856
57984
  supabaseUrl: content.supabaseUrl,
57857
57985
  mediaAssets: content.mediaAssets,
@@ -58063,7 +58191,7 @@ var SimpleCache = class {
58063
58191
  };
58064
58192
 
58065
58193
  // src/version.ts
58066
- var SDK_VERSION = "0.70.2";
58194
+ var SDK_VERSION = "0.70.4";
58067
58195
 
58068
58196
  // src/client/error.ts
58069
58197
  var RiverbankApiError = class _RiverbankApiError extends Error {
@@ -59465,7 +59593,6 @@ lucide-react/dist/esm/icons/download.js:
59465
59593
  lucide-react/dist/esm/icons/external-link.js:
59466
59594
  lucide-react/dist/esm/icons/file-archive.js:
59467
59595
  lucide-react/dist/esm/icons/file-headphone.js:
59468
- lucide-react/dist/esm/icons/file-play.js:
59469
59596
  lucide-react/dist/esm/icons/file-spreadsheet.js:
59470
59597
  lucide-react/dist/esm/icons/file-text.js:
59471
59598
  lucide-react/dist/esm/icons/info.js: