@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.
- package/README.md +29 -0
- package/dist/_dts/api/src/contentTypes.d.ts +2 -1
- package/dist/_dts/block-form/src/client/index.d.ts +1 -1
- package/dist/_dts/block-form/src/fields/types.d.ts +14 -2
- package/dist/_dts/block-form/src/registry/schemas.d.ts +2 -0
- package/dist/_dts/block-form/src/widgets/MediaField/mediaFieldDefaults.d.ts +2 -2
- package/dist/_dts/block-form/src/widgets/MediaField/mediaFieldSchema.d.ts +2 -2
- package/dist/_dts/blocks/src/lib/media.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +1829 -149
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +1829 -149
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +1829 -149
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +1829 -149
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +1829 -149
- package/dist/_dts/blocks/src/system/blocks/cta-full.d.ts +1 -30727
- package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +11 -30827
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +1829 -149
- package/dist/_dts/blocks/src/system/blocks/file-download.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +1829 -149
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +106 -1
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +1829 -149
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +1829 -149
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +1829 -149
- package/dist/_dts/blocks/src/system/defineBlock.d.ts +3 -3
- package/dist/_dts/blocks/src/system/fragments/library/card.d.ts +2 -30793
- package/dist/_dts/blocks/src/system/fragments/library/ctaRow.d.ts +2 -30727
- package/dist/_dts/blocks/src/system/fragments/library/feedbackCallout.d.ts +2 -30779
- package/dist/_dts/blocks/src/system/fragments/library/heroCtaRow.d.ts +33 -30743
- package/dist/_dts/blocks/src/system/fragments/library/sectionState.d.ts +2 -30770
- package/dist/_dts/blocks/src/system/fragments/types.d.ts +8 -7
- package/dist/_dts/blocks/src/system/manifest/derivedContent.d.ts +7 -5
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +192 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/file-download.d.ts +1 -1
- package/dist/_dts/content-model/src/content-types/schema.d.ts +7 -0
- package/dist/_dts/content-model/src/contentManifest.d.ts +4 -1
- package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +1 -1
- package/dist/_dts/core/src/index.d.ts +1 -1
- package/dist/_dts/core/src/planner.d.ts +4 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +53 -20
- package/dist/_dts/editor-blocks/src/index.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/media/MediaField.d.ts +6 -5
- package/dist/_dts/media-core/src/videoSlotPolicy.d.ts +0 -1
- package/dist/_dts/media-editor/src/context.d.ts +4 -1
- package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +8 -1
- package/dist/_dts/media-react/src/index.d.ts +1 -5
- package/dist/_dts/preview-next/src/client/widgets/PreviewMediaField.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/delete.d.ts +3 -0
- package/dist/_dts/sdk/src/cli/commands/style.d.ts +18 -0
- package/dist/_dts/sdk/src/cli/helpers.d.ts +8 -33
- package/dist/_dts/sdk/src/cli/site-commands/oneOffCommands.d.ts +81 -0
- package/dist/_dts/sdk/src/components.d.ts +2 -1
- package/dist/_dts/sdk/src/config/field-definitions.d.ts +6 -2
- package/dist/_dts/sdk/src/config/typed-entries.d.ts +4 -2
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +2 -1
- package/dist/_dts/sdk/src/manifest/prompt/examples/cta.d.ts +5 -5
- package/dist/_dts/sdk/src/manifest/prompt/examples/features-grid.d.ts +2 -2
- package/dist/_dts/sdk/src/manifest/prompt/examples/hero.d.ts +2 -2
- package/dist/_dts/sdk/src/manifest/prompt/examples/pricing.d.ts +10 -10
- package/dist/_dts/sdk/src/manifest/prompt/examples/testimonials.d.ts +4 -4
- package/dist/_dts/sdk/src/manifest/validation/output-schema.d.ts +11 -1
- package/dist/_dts/sdk/src/next/types.d.ts +4 -2
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/index.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/overrideResolution.d.ts +10 -0
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +12 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/cli/index.mjs +1072 -289
- package/dist/cli/init-docs/content/workflow-preview-mode.md +167 -0
- package/dist/client/client.mjs +443 -403
- package/dist/client/hooks.mjs +172 -121
- package/dist/client/rendering/client.mjs +148 -112
- package/dist/client/rendering/islands.mjs +80 -31
- package/dist/client/rendering.mjs +25531 -25481
- package/dist/preview-next/client/runtime.mjs +394 -1136
- package/dist/server/components.mjs +229 -171
- package/dist/server/config-template-validation.mjs +31 -1
- package/dist/server/config-validation.mjs +172 -121
- package/dist/server/config.mjs +172 -121
- package/dist/server/data.mjs +172 -121
- package/dist/server/index.mjs +1 -1
- package/dist/server/next.mjs +301 -174
- package/dist/server/page-converter.mjs +379 -185
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +219 -171
- package/dist/server/rendering.mjs +229 -171
- package/dist/server/routing.mjs +175 -124
- package/dist/server/server.mjs +173 -122
- package/package.json +5 -3
package/dist/server/routing.mjs
CHANGED
|
@@ -7306,6 +7306,9 @@ var init_repeaterGrid = __esm({
|
|
|
7306
7306
|
|
|
7307
7307
|
// ../blocks/src/system/manifest/schema.ts
|
|
7308
7308
|
import { z as z5 } from "zod";
|
|
7309
|
+
function isDisplayMediaKind(kind) {
|
|
7310
|
+
return DISPLAY_MEDIA_KINDS.includes(kind);
|
|
7311
|
+
}
|
|
7309
7312
|
function assertNeverSelectSource(value) {
|
|
7310
7313
|
throw new Error(`Unhandled select source: ${JSON.stringify(value)}`);
|
|
7311
7314
|
}
|
|
@@ -7317,6 +7320,7 @@ function getFieldSchemaInternal() {
|
|
|
7317
7320
|
textFieldSchema,
|
|
7318
7321
|
richTextFieldSchema,
|
|
7319
7322
|
mediaFieldSchema,
|
|
7323
|
+
fileFieldSchema,
|
|
7320
7324
|
booleanFieldSchema,
|
|
7321
7325
|
numberFieldSchema,
|
|
7322
7326
|
dateFieldSchema,
|
|
@@ -7380,7 +7384,7 @@ function createSdkSelectField(input) {
|
|
|
7380
7384
|
})
|
|
7381
7385
|
);
|
|
7382
7386
|
}
|
|
7383
|
-
var visibilityLevels, siteOptionSources, mediaDeliverySchema, selectOptionSchema, selectSourceSchema, uiSchema, baseFieldSchema, textFieldSchema, richTextFieldSchema, mediaFieldSchema, booleanFieldSchema, dateFieldSchema, timeFieldSchema, dateTimeFieldSchema, slugFieldSchema, urlFieldSchema, linkFieldSchema, selectFieldSchema, referenceFieldSchema, itemTypeSchema, repeaterFieldSchema, groupFieldSchema, modalFieldSchema, numberFieldSchema, tabDefinitionSchema, tabGroupFieldSchema, presetOptionSchema, presetOrCustomFieldSchema, contentTypeSelectFieldSchema, entryPickerFieldSchema, _fieldSchemaInternal, fieldSchema, slotSchema, typographyTokens, colorTokens, spacingTokens, radiusTokens, styleTokenSchema, behaviourSchema, blockCategoryEnum, manifestSchema;
|
|
7387
|
+
var visibilityLevels, MEDIA_KINDS, DISPLAY_MEDIA_KINDS, PUBLIC_FILE_FIELD_KINDS, siteOptionSources, mediaDeliverySchema, selectOptionSchema, selectSourceSchema, uiSchema, baseFieldSchema, textFieldSchema, richTextFieldSchema, mediaFieldSchema, fileFieldSchema, booleanFieldSchema, dateFieldSchema, timeFieldSchema, dateTimeFieldSchema, slugFieldSchema, urlFieldSchema, linkFieldSchema, selectFieldSchema, referenceFieldSchema, itemTypeSchema, repeaterFieldSchema, groupFieldSchema, modalFieldSchema, numberFieldSchema, tabDefinitionSchema, tabGroupFieldSchema, presetOptionSchema, presetOrCustomFieldSchema, contentTypeSelectFieldSchema, entryPickerFieldSchema, _fieldSchemaInternal, fieldSchema, slotSchema, typographyTokens, colorTokens, spacingTokens, radiusTokens, styleTokenSchema, behaviourSchema, blockCategoryEnum, manifestSchema;
|
|
7384
7388
|
var init_schema2 = __esm({
|
|
7385
7389
|
"../blocks/src/system/manifest/schema.ts"() {
|
|
7386
7390
|
"use strict";
|
|
@@ -7388,6 +7392,25 @@ var init_schema2 = __esm({
|
|
|
7388
7392
|
init_node();
|
|
7389
7393
|
init_repeaterGrid();
|
|
7390
7394
|
visibilityLevels = ["admin", "designer", "author"];
|
|
7395
|
+
MEDIA_KINDS = [
|
|
7396
|
+
"image",
|
|
7397
|
+
"video",
|
|
7398
|
+
"audio",
|
|
7399
|
+
"document",
|
|
7400
|
+
"spreadsheet",
|
|
7401
|
+
"archive"
|
|
7402
|
+
];
|
|
7403
|
+
DISPLAY_MEDIA_KINDS = [
|
|
7404
|
+
"image",
|
|
7405
|
+
"video",
|
|
7406
|
+
"audio"
|
|
7407
|
+
];
|
|
7408
|
+
PUBLIC_FILE_FIELD_KINDS = [
|
|
7409
|
+
"document",
|
|
7410
|
+
"spreadsheet",
|
|
7411
|
+
"archive",
|
|
7412
|
+
"audio"
|
|
7413
|
+
];
|
|
7391
7414
|
siteOptionSources = [
|
|
7392
7415
|
"eventCategories",
|
|
7393
7416
|
"venues",
|
|
@@ -7548,11 +7571,19 @@ var init_schema2 = __esm({
|
|
|
7548
7571
|
});
|
|
7549
7572
|
mediaFieldSchema = baseFieldSchema.extend({
|
|
7550
7573
|
type: z5.literal("media"),
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7574
|
+
// Keep full MEDIA_KINDS parse compatibility for pre-file-field manifests.
|
|
7575
|
+
// New authoring surfaces should use `file.fileKinds` for document/archive
|
|
7576
|
+
// style assets, but old saved schemas must not fail to open.
|
|
7577
|
+
mediaKinds: z5.array(z5.enum(MEDIA_KINDS)).default(["image"]).transform((kinds) => {
|
|
7578
|
+
const displayKinds = kinds.filter(isDisplayMediaKind);
|
|
7579
|
+
return displayKinds.length > 0 ? displayKinds : ["image"];
|
|
7580
|
+
}),
|
|
7554
7581
|
aspectRatio: z5.string().optional()
|
|
7555
7582
|
});
|
|
7583
|
+
fileFieldSchema = baseFieldSchema.extend({
|
|
7584
|
+
type: z5.literal("file"),
|
|
7585
|
+
fileKinds: z5.array(z5.enum(PUBLIC_FILE_FIELD_KINDS)).default([...PUBLIC_FILE_FIELD_KINDS])
|
|
7586
|
+
});
|
|
7556
7587
|
booleanFieldSchema = baseFieldSchema.extend({
|
|
7557
7588
|
type: z5.literal("boolean")
|
|
7558
7589
|
});
|
|
@@ -16107,13 +16138,19 @@ function defineFragment(config) {
|
|
|
16107
16138
|
function scopeFragmentFields(fragment, scope) {
|
|
16108
16139
|
const normalizedScope = scope.trim();
|
|
16109
16140
|
if (!normalizedScope) {
|
|
16110
|
-
return fragment.fields.map(
|
|
16141
|
+
return fragment.fields.map(
|
|
16142
|
+
(field) => cloneFieldDefinition2(field)
|
|
16143
|
+
);
|
|
16111
16144
|
}
|
|
16112
|
-
return fragment.fields.map(
|
|
16145
|
+
return fragment.fields.map(
|
|
16146
|
+
(field) => prefixFieldId(field, normalizedScope)
|
|
16147
|
+
);
|
|
16113
16148
|
}
|
|
16114
16149
|
function scopeFragmentLayout(fragment, scope) {
|
|
16115
16150
|
const normalizedScope = scope.trim();
|
|
16116
|
-
return fragment.layout.map(
|
|
16151
|
+
return fragment.layout.map(
|
|
16152
|
+
(node) => cloneAndScopeNode(node, normalizedScope)
|
|
16153
|
+
);
|
|
16117
16154
|
}
|
|
16118
16155
|
function validateFieldDefinitions(fields3, fragmentId) {
|
|
16119
16156
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -16195,7 +16232,9 @@ function cloneAndScopeNode(node, scope) {
|
|
|
16195
16232
|
...node
|
|
16196
16233
|
};
|
|
16197
16234
|
if (node.children) {
|
|
16198
|
-
cloned.children = node.children.map(
|
|
16235
|
+
cloned.children = node.children.map(
|
|
16236
|
+
(child) => cloneAndScopeNode(child, scope)
|
|
16237
|
+
);
|
|
16199
16238
|
}
|
|
16200
16239
|
if (node.props) {
|
|
16201
16240
|
cloned.props = scopePropBindings(node.props, scope);
|
|
@@ -16221,7 +16260,9 @@ function scopeBinding(binding, scope) {
|
|
|
16221
16260
|
const cloned = {
|
|
16222
16261
|
...binding,
|
|
16223
16262
|
transforms: binding.transforms?.map(
|
|
16224
|
-
(step) => ({
|
|
16263
|
+
(step) => ({
|
|
16264
|
+
...step
|
|
16265
|
+
})
|
|
16225
16266
|
) ?? []
|
|
16226
16267
|
};
|
|
16227
16268
|
cloned.from = scopeContentPath(binding.from, scope);
|
|
@@ -16265,7 +16306,9 @@ function scopePropValue(value, scope) {
|
|
|
16265
16306
|
};
|
|
16266
16307
|
}
|
|
16267
16308
|
const result = {};
|
|
16268
|
-
for (const [key, entry] of Object.entries(
|
|
16309
|
+
for (const [key, entry] of Object.entries(
|
|
16310
|
+
value
|
|
16311
|
+
)) {
|
|
16269
16312
|
result[key] = scopePropValue(entry, scope);
|
|
16270
16313
|
}
|
|
16271
16314
|
return result;
|
|
@@ -16312,13 +16355,18 @@ var init_types13 = __esm({
|
|
|
16312
16355
|
loader: dataLoaderSchema.optional()
|
|
16313
16356
|
});
|
|
16314
16357
|
fragmentConfigSchema = z30.object({
|
|
16315
|
-
id: z30.string().min(1, "Fragment id is required").regex(
|
|
16358
|
+
id: z30.string().min(1, "Fragment id is required").regex(
|
|
16359
|
+
FRAGMENT_ID_PATTERN,
|
|
16360
|
+
"Fragment id must be alphanumeric with optional . _ - separators"
|
|
16361
|
+
),
|
|
16316
16362
|
title: z30.string().optional(),
|
|
16317
16363
|
description: z30.string().optional(),
|
|
16318
16364
|
category: z30.enum(["content", "media", "interactive", "layout"]).optional(),
|
|
16319
16365
|
icon: z30.string().optional(),
|
|
16320
16366
|
fields: fieldSchema.array().default([]),
|
|
16321
|
-
layout: z30.union([NodeSchema, NodeSchema.array()]).transform(
|
|
16367
|
+
layout: z30.union([NodeSchema, NodeSchema.array()]).transform(
|
|
16368
|
+
(value) => Array.isArray(value) ? value : [value]
|
|
16369
|
+
),
|
|
16322
16370
|
data: fragmentDataSchema.optional()
|
|
16323
16371
|
});
|
|
16324
16372
|
FragmentConfigError = class extends Error {
|
|
@@ -16794,35 +16842,36 @@ var init_ctaRow2 = __esm({
|
|
|
16794
16842
|
});
|
|
16795
16843
|
|
|
16796
16844
|
// ../blocks/src/system/fragments/library/heroCtaRow.ts
|
|
16797
|
-
var heroCtaRowFragment;
|
|
16845
|
+
var heroCtaFields, heroCtaRowFragment;
|
|
16798
16846
|
var init_heroCtaRow = __esm({
|
|
16799
16847
|
"../blocks/src/system/fragments/library/heroCtaRow.ts"() {
|
|
16800
16848
|
"use strict";
|
|
16801
16849
|
init_types13();
|
|
16802
16850
|
init_fragments();
|
|
16803
16851
|
init_ctas();
|
|
16852
|
+
heroCtaFields = [
|
|
16853
|
+
createCtasRepeater({
|
|
16854
|
+
label: "Calls to action",
|
|
16855
|
+
itemLabel: "CTA",
|
|
16856
|
+
maxItems: 3,
|
|
16857
|
+
button: {
|
|
16858
|
+
variants: [
|
|
16859
|
+
{ value: "default", label: "Default" },
|
|
16860
|
+
{ value: "primary", label: "Primary" },
|
|
16861
|
+
{ value: "secondary", label: "Secondary" },
|
|
16862
|
+
{ value: "outline", label: "Outline" }
|
|
16863
|
+
],
|
|
16864
|
+
defaultVariant: "default",
|
|
16865
|
+
includeSize: true,
|
|
16866
|
+
defaultSize: "lg"
|
|
16867
|
+
}
|
|
16868
|
+
})
|
|
16869
|
+
];
|
|
16804
16870
|
heroCtaRowFragment = defineFragment({
|
|
16805
16871
|
id: "heroCtaRow",
|
|
16806
16872
|
title: "Hero CTAs",
|
|
16807
16873
|
description: "Repeatable hero calls to action rendered inline.",
|
|
16808
|
-
fields:
|
|
16809
|
-
createCtasRepeater({
|
|
16810
|
-
label: "Calls to action",
|
|
16811
|
-
itemLabel: "CTA",
|
|
16812
|
-
maxItems: 3,
|
|
16813
|
-
button: {
|
|
16814
|
-
variants: [
|
|
16815
|
-
{ value: "default", label: "Default" },
|
|
16816
|
-
{ value: "primary", label: "Primary" },
|
|
16817
|
-
{ value: "secondary", label: "Secondary" },
|
|
16818
|
-
{ value: "outline", label: "Outline" }
|
|
16819
|
-
],
|
|
16820
|
-
defaultVariant: "default",
|
|
16821
|
-
includeSize: true,
|
|
16822
|
-
defaultSize: "lg"
|
|
16823
|
-
}
|
|
16824
|
-
})
|
|
16825
|
-
],
|
|
16874
|
+
fields: heroCtaFields,
|
|
16826
16875
|
layout: [
|
|
16827
16876
|
ctaRow({
|
|
16828
16877
|
collectionPath: "content.ctas",
|
|
@@ -23517,8 +23566,7 @@ var init_media4 = __esm({
|
|
|
23517
23566
|
"document",
|
|
23518
23567
|
"spreadsheet",
|
|
23519
23568
|
"archive",
|
|
23520
|
-
"audio"
|
|
23521
|
-
"video"
|
|
23569
|
+
"audio"
|
|
23522
23570
|
];
|
|
23523
23571
|
hotspotSchema2 = z41.object({
|
|
23524
23572
|
x: z41.number().min(0).max(1),
|
|
@@ -25267,7 +25315,7 @@ var init_course_details = __esm({
|
|
|
25267
25315
|
});
|
|
25268
25316
|
|
|
25269
25317
|
// ../blocks/src/system/blocks/events/event-spotlight.ts
|
|
25270
|
-
var eventSpotlightManifest, eventSpotlightBlockDefinition;
|
|
25318
|
+
var eventSpotlightFields, eventSpotlightLayout, eventSpotlightConfig, eventSpotlightManifest, eventSpotlightBlockDefinition;
|
|
25271
25319
|
var init_event_spotlight = __esm({
|
|
25272
25320
|
"../blocks/src/system/blocks/events/event-spotlight.ts"() {
|
|
25273
25321
|
"use strict";
|
|
@@ -25278,104 +25326,107 @@ var init_event_spotlight = __esm({
|
|
|
25278
25326
|
init_boxStyles();
|
|
25279
25327
|
init_defineBlock();
|
|
25280
25328
|
init_shared3();
|
|
25281
|
-
|
|
25329
|
+
eventSpotlightFields = [
|
|
25330
|
+
...sectionHeaderFields("Upcoming Events"),
|
|
25331
|
+
{
|
|
25332
|
+
id: "maxEvents",
|
|
25333
|
+
type: "select",
|
|
25334
|
+
label: "Events to display",
|
|
25335
|
+
description: "Number of events to show",
|
|
25336
|
+
required: false,
|
|
25337
|
+
multiple: false,
|
|
25338
|
+
defaultValue: "3",
|
|
25339
|
+
options: [
|
|
25340
|
+
{ value: "1", label: "1 event" },
|
|
25341
|
+
{ value: "2", label: "2 events" },
|
|
25342
|
+
{ value: "3", label: "3 events" },
|
|
25343
|
+
{ value: "4", label: "4 events" },
|
|
25344
|
+
{ value: "5", label: "5 events" },
|
|
25345
|
+
{ value: "6", label: "6 events" }
|
|
25346
|
+
],
|
|
25347
|
+
ui: { intent: "display" }
|
|
25348
|
+
},
|
|
25349
|
+
{
|
|
25350
|
+
id: "ctaLabel",
|
|
25351
|
+
type: "text",
|
|
25352
|
+
label: "Section button text",
|
|
25353
|
+
description: "Optional button shown below the spotlight cards",
|
|
25354
|
+
required: false,
|
|
25355
|
+
multiline: false,
|
|
25356
|
+
maxLength: 40,
|
|
25357
|
+
ui: { intent: "content" }
|
|
25358
|
+
},
|
|
25359
|
+
{
|
|
25360
|
+
id: "ctaUrl",
|
|
25361
|
+
type: "link",
|
|
25362
|
+
label: "Section button destination",
|
|
25363
|
+
required: false,
|
|
25364
|
+
ui: { intent: "display" }
|
|
25365
|
+
},
|
|
25366
|
+
layoutField,
|
|
25367
|
+
columnsField(["2", "3"]),
|
|
25368
|
+
...cardStylingFields,
|
|
25369
|
+
...eventDisplayFields,
|
|
25370
|
+
emptyStateField,
|
|
25371
|
+
sectionStylesField({
|
|
25372
|
+
id: "_sectionStyles",
|
|
25373
|
+
label: "Section styles"
|
|
25374
|
+
})
|
|
25375
|
+
];
|
|
25376
|
+
eventSpotlightLayout = [
|
|
25377
|
+
styledSection({
|
|
25378
|
+
children: sectionContainer([
|
|
25379
|
+
// Optional heading
|
|
25380
|
+
text(
|
|
25381
|
+
{ as: "h2" },
|
|
25382
|
+
bind("content.heading"),
|
|
25383
|
+
when("content.heading")
|
|
25384
|
+
),
|
|
25385
|
+
// Optional description
|
|
25386
|
+
richText(
|
|
25387
|
+
{ className: "rb-prose rb-max-w-none" },
|
|
25388
|
+
bind("content.description"),
|
|
25389
|
+
when("content.description")
|
|
25390
|
+
),
|
|
25391
|
+
// Event spotlight component
|
|
25392
|
+
el("event-spotlight", {
|
|
25393
|
+
events: { $bind: { from: "data.events" } },
|
|
25394
|
+
layout: { $bind: { from: "content.layout", fallback: "grid" } },
|
|
25395
|
+
columns: { $bind: { from: "content.columns", fallback: "3" } },
|
|
25396
|
+
cardVariant: { $bind: { from: "content.cardVariant", fallback: "default" } },
|
|
25397
|
+
buttonVariant: { $bind: { from: "content.buttonVariant", fallback: "primary" } },
|
|
25398
|
+
buttonText: { $bind: { from: "content.buttonText", fallback: "View event" } },
|
|
25399
|
+
ctaLabel: { $bind: { from: "content.ctaLabel" } },
|
|
25400
|
+
ctaUrl: { $bind: { from: "content.ctaUrl", transforms: [{ id: "links.resolve" }] } },
|
|
25401
|
+
showVenue: { $bind: { from: "content.showVenue" } },
|
|
25402
|
+
showMap: { $bind: { from: "content.showMap" } },
|
|
25403
|
+
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
25404
|
+
emptyMessage: { $bind: { from: "content.emptyMessage" } }
|
|
25405
|
+
})
|
|
25406
|
+
], {
|
|
25407
|
+
gap: "lg"
|
|
25408
|
+
}),
|
|
25409
|
+
// sectionContainer (rb-container) already provides horizontal padding
|
|
25410
|
+
baseClass: "",
|
|
25411
|
+
spacing: "comfortable"
|
|
25412
|
+
})
|
|
25413
|
+
];
|
|
25414
|
+
eventSpotlightConfig = {
|
|
25282
25415
|
id: "block.event-spotlight",
|
|
25283
25416
|
version: "1.1.0",
|
|
25284
25417
|
title: "Event Spotlight",
|
|
25285
25418
|
titleSource: "heading",
|
|
25286
25419
|
description: "Feature a few upcoming events on your homepage",
|
|
25287
25420
|
skipSectionStyles: true,
|
|
25288
|
-
additionalFields:
|
|
25289
|
-
...sectionHeaderFields("Upcoming Events"),
|
|
25290
|
-
{
|
|
25291
|
-
id: "maxEvents",
|
|
25292
|
-
type: "select",
|
|
25293
|
-
label: "Events to display",
|
|
25294
|
-
description: "Number of events to show",
|
|
25295
|
-
required: false,
|
|
25296
|
-
multiple: false,
|
|
25297
|
-
defaultValue: "3",
|
|
25298
|
-
options: [
|
|
25299
|
-
{ value: "1", label: "1 event" },
|
|
25300
|
-
{ value: "2", label: "2 events" },
|
|
25301
|
-
{ value: "3", label: "3 events" },
|
|
25302
|
-
{ value: "4", label: "4 events" },
|
|
25303
|
-
{ value: "5", label: "5 events" },
|
|
25304
|
-
{ value: "6", label: "6 events" }
|
|
25305
|
-
],
|
|
25306
|
-
ui: { intent: "display" }
|
|
25307
|
-
},
|
|
25308
|
-
{
|
|
25309
|
-
id: "ctaLabel",
|
|
25310
|
-
type: "text",
|
|
25311
|
-
label: "Section button text",
|
|
25312
|
-
description: "Optional button shown below the spotlight cards",
|
|
25313
|
-
required: false,
|
|
25314
|
-
multiline: false,
|
|
25315
|
-
maxLength: 40,
|
|
25316
|
-
ui: { intent: "content" }
|
|
25317
|
-
},
|
|
25318
|
-
{
|
|
25319
|
-
id: "ctaUrl",
|
|
25320
|
-
type: "link",
|
|
25321
|
-
label: "Section button destination",
|
|
25322
|
-
required: false,
|
|
25323
|
-
ui: { intent: "display" }
|
|
25324
|
-
},
|
|
25325
|
-
layoutField,
|
|
25326
|
-
columnsField(["2", "3"]),
|
|
25327
|
-
...cardStylingFields,
|
|
25328
|
-
...eventDisplayFields,
|
|
25329
|
-
emptyStateField,
|
|
25330
|
-
sectionStylesField({
|
|
25331
|
-
id: "_sectionStyles",
|
|
25332
|
-
label: "Section styles"
|
|
25333
|
-
})
|
|
25334
|
-
],
|
|
25421
|
+
additionalFields: eventSpotlightFields,
|
|
25335
25422
|
styleTokens: { background: "surface", typography: "body", spacing: "md" },
|
|
25336
25423
|
behaviours: { supportsThemeSwitching: true, inlineEditing: false, animation: false, paletteHidden: false },
|
|
25337
25424
|
category: "content",
|
|
25338
25425
|
tags: ["events", "featured", "homepage", "spotlight", "upcoming"],
|
|
25339
25426
|
icon: "Star",
|
|
25340
|
-
layout:
|
|
25341
|
-
|
|
25342
|
-
|
|
25343
|
-
// Optional heading
|
|
25344
|
-
text(
|
|
25345
|
-
{ as: "h2" },
|
|
25346
|
-
bind("content.heading"),
|
|
25347
|
-
when("content.heading")
|
|
25348
|
-
),
|
|
25349
|
-
// Optional description
|
|
25350
|
-
richText(
|
|
25351
|
-
{ className: "rb-prose rb-max-w-none" },
|
|
25352
|
-
bind("content.description"),
|
|
25353
|
-
when("content.description")
|
|
25354
|
-
),
|
|
25355
|
-
// Event spotlight component
|
|
25356
|
-
el("event-spotlight", {
|
|
25357
|
-
events: { $bind: { from: "data.events" } },
|
|
25358
|
-
layout: { $bind: { from: "content.layout", fallback: "grid" } },
|
|
25359
|
-
columns: { $bind: { from: "content.columns", fallback: "3" } },
|
|
25360
|
-
cardVariant: { $bind: { from: "content.cardVariant", fallback: "default" } },
|
|
25361
|
-
buttonVariant: { $bind: { from: "content.buttonVariant", fallback: "primary" } },
|
|
25362
|
-
buttonText: { $bind: { from: "content.buttonText", fallback: "View event" } },
|
|
25363
|
-
ctaLabel: { $bind: { from: "content.ctaLabel" } },
|
|
25364
|
-
ctaUrl: { $bind: { from: "content.ctaUrl", transforms: [{ id: "links.resolve" }] } },
|
|
25365
|
-
showVenue: { $bind: { from: "content.showVenue" } },
|
|
25366
|
-
showMap: { $bind: { from: "content.showMap" } },
|
|
25367
|
-
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
25368
|
-
emptyMessage: { $bind: { from: "content.emptyMessage" } }
|
|
25369
|
-
})
|
|
25370
|
-
], {
|
|
25371
|
-
gap: "lg"
|
|
25372
|
-
}),
|
|
25373
|
-
// sectionContainer (rb-container) already provides horizontal padding
|
|
25374
|
-
baseClass: "",
|
|
25375
|
-
spacing: "comfortable"
|
|
25376
|
-
})
|
|
25377
|
-
]
|
|
25378
|
-
});
|
|
25427
|
+
layout: eventSpotlightLayout
|
|
25428
|
+
};
|
|
25429
|
+
eventSpotlightManifest = createBlockManifest(eventSpotlightConfig);
|
|
25379
25430
|
eventSpotlightBlockDefinition = {
|
|
25380
25431
|
manifest: eventSpotlightManifest,
|
|
25381
25432
|
dataSchemas: {
|
|
@@ -28213,18 +28264,18 @@ var init_file_download = __esm({
|
|
|
28213
28264
|
title: "File Download",
|
|
28214
28265
|
titleSource: ["title", "file.filename"],
|
|
28215
28266
|
category: "media",
|
|
28216
|
-
description: "Add a simple public download link for a document, ZIP,
|
|
28267
|
+
description: "Add a simple public download link for a document, ZIP, or audio file.",
|
|
28217
28268
|
tags: ["file", "download", "document", "zip", "media"],
|
|
28218
28269
|
icon: "Download",
|
|
28219
28270
|
includeContainerStyles: true,
|
|
28220
28271
|
additionalFields: [
|
|
28221
28272
|
{
|
|
28222
28273
|
id: "file",
|
|
28223
|
-
type: "
|
|
28274
|
+
type: "file",
|
|
28224
28275
|
label: "Download file",
|
|
28225
28276
|
description: "Choose the file visitors can download.",
|
|
28226
28277
|
required: false,
|
|
28227
|
-
|
|
28278
|
+
fileKinds: [...PUBLIC_DOWNLOAD_MEDIA_TYPES],
|
|
28228
28279
|
ui: { intent: "content" }
|
|
28229
28280
|
},
|
|
28230
28281
|
{
|