@riverbankcms/sdk 0.78.0 → 0.78.2
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 +45 -43
- package/dist/{PreviewEditorSidebar-RIKFQ72L.mjs → PreviewEditorSidebar-4DXLYX2V.mjs} +29 -21
- package/dist/{PreviewEditorUI-XO7TUWKK.mjs → PreviewEditorUI-CS5P4N3P.mjs} +4 -4
- package/dist/SdkPreviewModeRuntime-IJDHTW4W.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +36 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +1 -0
- package/dist/_dts/api/src/endpoints.d.ts +9 -0
- package/dist/_dts/api/src/index.d.ts +3 -3
- package/dist/_dts/api/src/public/types.d.ts +1 -1
- package/dist/_dts/api/src/request.d.ts +3 -11
- package/dist/_dts/api/src/sdkConfig/contracts.d.ts +1 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +7 -1
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +10 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +15 -19
- package/dist/_dts/api/src/types.d.ts +11 -26
- package/dist/_dts/block-form/src/fields/types.d.ts +6 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +3 -2
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +6 -3
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +8 -3
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useLinearRepeaterDnd.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useRepeaterPointerDragCapability.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useResolvedItemLabel.d.ts +7 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/index.d.ts +3 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterDndDomain.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterLabelSource.d.ts +15 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +50 -0
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -0
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +164 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +1 -1
- package/dist/_dts/content-editor/src/index.d.ts +1 -1
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +2 -2
- package/dist/_dts/content-model/src/content-types/schema.d.ts +14 -0
- package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +3 -1
- package/dist/_dts/content-model/src/templates/bindingValidation.d.ts +10 -4
- package/dist/_dts/content-model/src/templates/fieldPaths.d.ts +20 -0
- package/dist/_dts/content-model/src/templates/manifestAdapter.d.ts +5 -2
- package/dist/_dts/core/src/branded.d.ts +108 -85
- package/dist/_dts/core/src/csv-types.d.ts +2 -2
- package/dist/_dts/core/src/editor-state.d.ts +7 -7
- package/dist/_dts/core/src/participants.d.ts +2 -2
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +11 -0
- package/dist/_dts/editor-blocks/src/blockPayload.d.ts +1 -1
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +3 -1
- package/dist/_dts/media-editor/src/MediaPreview.d.ts +3 -1
- package/dist/_dts/media-editor/src/fieldUi.d.ts +5 -0
- package/dist/_dts/media-editor/src/index.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/consts.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/metadata.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/commands/push/stale.d.ts +3 -3
- package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +7 -0
- package/dist/_dts/sdk/src/cli/commands/push.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +13 -0
- package/dist/_dts/sdk/src/cli/content/writer.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/helpers.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +6 -6
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +5 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +5 -2
- package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +10 -1
- package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +6 -0
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/config/content-types.d.ts +7 -0
- package/dist/_dts/sdk/src/config/field-definitions.d.ts +2 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +3 -0
- package/dist/{altcha-B5XGSXP5.mjs → altcha-EKUEQ4RP.mjs} +1 -1
- package/dist/{chunk-NIDXI46P.mjs → chunk-4QEGTLK6.mjs} +1 -1
- package/dist/{chunk-TXDES5P2.mjs → chunk-6HYXHRAI.mjs} +5 -5
- package/dist/{chunk-SVMMM2NA.mjs → chunk-CR5HKAGU.mjs} +24 -5
- package/dist/{chunk-OECWLDHN.mjs → chunk-MCRQMPET.mjs} +1030 -588
- package/dist/{chunk-SXOLGNMX.mjs → chunk-OKMBEAXY.mjs} +1 -1
- package/dist/{chunk-XGB3TDIC.mjs → chunk-R7POPVJR.mjs} +2 -8
- package/dist/{chunk-F7RTCZYN.mjs → chunk-RGTOD4AJ.mjs} +20 -14
- package/dist/cli/index.mjs +681 -225
- package/dist/cli/init-docs/content/cli-reference.md +3 -2
- package/dist/cli/init-docs/content/content-management.md +2 -2
- package/dist/cli/init-docs/content/workflow-preview-mode.md +68 -2
- package/dist/client/{accordion-EVDEOUPR.mjs → accordion-PLYNJIIM.mjs} +2 -2
- package/dist/client/analytics.mjs +1 -1
- package/dist/client/{bookingForm-DIHBLC64.mjs → bookingForm-BXAP6AO7.mjs} +55 -48
- package/dist/client/bookings.mjs +62 -55
- package/dist/client/{carousel-FEBQHIWI.mjs → carousel-TRBXDHGF.mjs} +3 -3
- package/dist/client/{cart-7CKSXAE4.mjs → cart-Z7H3HJRS.mjs} +7 -7
- package/dist/client/{checkout-WKYCANLV.mjs → checkout-WAFCUBIX.mjs} +7 -7
- package/dist/client/{chunk-OFMSCGNY.mjs → chunk-75OUS5MT.mjs} +2 -2
- package/dist/client/{chunk-IVNCUVAV.mjs → chunk-AUJ5DBZJ.mjs} +18 -18
- package/dist/client/{chunk-36WJCERQ.mjs → chunk-CE7IBGVW.mjs} +3 -1
- package/dist/client/{chunk-RZDWX7QW.mjs → chunk-CWGTG37I.mjs} +1 -1
- package/dist/client/{chunk-YDSEG6GZ.mjs → chunk-DNRGY432.mjs} +2 -2
- package/dist/client/{chunk-RV6FX7UH.mjs → chunk-FUXW6VW2.mjs} +9 -9
- package/dist/client/{chunk-65F47D7Y.mjs → chunk-JGXPTEI2.mjs} +43 -36
- package/dist/client/{chunk-GUK2FPXQ.mjs → chunk-JRDUHZCT.mjs} +37 -15
- package/dist/client/{chunk-VPPMNXCF.mjs → chunk-UVQEJJTN.mjs} +2 -2
- package/dist/client/{chunk-F7LHOKEH.mjs → chunk-XSV6KW4D.mjs} +1 -1
- package/dist/client/{chunk-PD6NBCEY.mjs → chunk-ZFHRN6W2.mjs} +1 -1
- package/dist/client/{chunk-2SAVKN2M.mjs → chunk-ZI3LLBPZ.mjs} +2 -2
- package/dist/client/client.mjs +249 -160
- package/dist/client/{courseRegistration-5QF2PHKM.mjs → courseRegistration-AHFQHWIJ.mjs} +10 -10
- package/dist/client/{eventCalendar-4ZOSETDU.mjs → eventCalendar-LDXTV5R7.mjs} +9 -9
- package/dist/client/{eventCombined-WQGU7JUX.mjs → eventCombined-A4JGTNJO.mjs} +9 -9
- package/dist/client/{eventDetails-AYWVUJ5Y.mjs → eventDetails-4YXTZ7EG.mjs} +9 -9
- package/dist/client/{eventListing-NT7C6UT5.mjs → eventListing-P72TPFFM.mjs} +9 -9
- package/dist/client/{eventRegistration-OH24F4ZJ.mjs → eventRegistration-LSYJHGMT.mjs} +9 -9
- package/dist/client/{form-7L42SRBB.mjs → form-AOPYOKOW.mjs} +6 -3
- package/dist/client/{headerSection-OZRZNZ52.mjs → headerSection-5TFYDFVQ.mjs} +3 -3
- package/dist/client/hooks.mjs +78 -48
- package/dist/client/{locationMap-ZBXRPQ7C.mjs → locationMap-QSZ3ZVAZ.mjs} +3 -3
- package/dist/client/{newsletterForm-SNAGFF2I.mjs → newsletterForm-KTRHZY52.mjs} +2 -2
- package/dist/client/{productDetail-I46BOFGV.mjs → productDetail-N4E775RG.mjs} +7 -7
- package/dist/client/{productList-BOYHTYI6.mjs → productList-UGUQ2S45.mjs} +7 -7
- package/dist/client/rendering/client.mjs +173 -131
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +230 -150
- package/dist/client/{shop-XTXPZTKR.mjs → shop-VHSZEEQ2.mjs} +7 -7
- package/dist/preview-next/before-render.mjs +10 -1
- package/dist/preview-next/client/runtime.mjs +6 -6
- package/dist/preview-next/middleware.mjs +10 -1
- package/dist/preview-next/tailwind-sources.css +1 -0
- package/dist/sdk-runtime-WHPJEF5G.mjs +8 -0
- package/dist/server/components.mjs +101 -54
- package/dist/server/config-template-validation.mjs +221 -15
- package/dist/server/config-validation.mjs +76 -42
- package/dist/server/config.mjs +76 -42
- package/dist/server/data.mjs +77 -47
- package/dist/server/index.mjs +31 -10
- package/dist/server/next.mjs +133 -71
- package/dist/server/page-converter.mjs +60 -40
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +107 -60
- package/dist/server/rendering.mjs +111 -61
- package/dist/server/routing.mjs +93 -63
- package/dist/server/server.mjs +102 -57
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-LAGYMPNF.mjs +0 -8
- package/dist/sdk-runtime-ZJLKC6DR.mjs +0 -8
package/dist/server/next.mjs
CHANGED
|
@@ -1781,7 +1781,16 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
1781
1781
|
revalidate: 60,
|
|
1782
1782
|
tags: ["site-{siteId}", "content-{siteId}-{type}"],
|
|
1783
1783
|
auth: "user",
|
|
1784
|
-
responseKind: "json"
|
|
1784
|
+
responseKind: "json",
|
|
1785
|
+
errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
|
|
1786
|
+
},
|
|
1787
|
+
reorderContentEntries: {
|
|
1788
|
+
path: "/sites/{siteId}/content/{type}/order",
|
|
1789
|
+
method: "POST",
|
|
1790
|
+
tags: ["site-{siteId}", "content-{siteId}-{type}"],
|
|
1791
|
+
auth: "user",
|
|
1792
|
+
responseKind: "json",
|
|
1793
|
+
errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
|
|
1785
1794
|
},
|
|
1786
1795
|
getContentTemplate: {
|
|
1787
1796
|
path: "/sites/{siteId}/content/types/{type}/template",
|
|
@@ -6281,9 +6290,6 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
6281
6290
|
};
|
|
6282
6291
|
var API_ENDPOINTS = ENDPOINT_DEFINITIONS;
|
|
6283
6292
|
|
|
6284
|
-
// ../core/src/branded.ts
|
|
6285
|
-
var asMediaAssetId = (id) => id;
|
|
6286
|
-
|
|
6287
6293
|
// ../core/src/result.ts
|
|
6288
6294
|
function ok(value) {
|
|
6289
6295
|
return { ok: true, value };
|
|
@@ -6292,6 +6298,9 @@ function err(error) {
|
|
|
6292
6298
|
return { ok: false, error };
|
|
6293
6299
|
}
|
|
6294
6300
|
|
|
6301
|
+
// ../core/src/branded.ts
|
|
6302
|
+
var unsafeAsMediaAssetId = (id) => id;
|
|
6303
|
+
|
|
6295
6304
|
// ../core/src/booking-date-time.ts
|
|
6296
6305
|
var DEFAULT_LOCALE = "en-US";
|
|
6297
6306
|
var FALLBACK_TIMEZONE = "UTC";
|
|
@@ -6995,14 +7004,14 @@ function rotateNormalizedPoint(point, rotation) {
|
|
|
6995
7004
|
const x = point.x;
|
|
6996
7005
|
const y = point.y;
|
|
6997
7006
|
switch (rotation) {
|
|
7007
|
+
case 0:
|
|
7008
|
+
return { x, y };
|
|
6998
7009
|
case 90:
|
|
6999
7010
|
return { x: 1 - y, y: x };
|
|
7000
7011
|
case 180:
|
|
7001
7012
|
return { x: 1 - x, y: 1 - y };
|
|
7002
7013
|
case 270:
|
|
7003
7014
|
return { x: y, y: 1 - x };
|
|
7004
|
-
default:
|
|
7005
|
-
return { x, y };
|
|
7006
7015
|
}
|
|
7007
7016
|
}
|
|
7008
7017
|
|
|
@@ -7195,6 +7204,8 @@ var uiSchema = z5.object({
|
|
|
7195
7204
|
mediaPickerAutoOpen: z5.boolean().optional(),
|
|
7196
7205
|
showMediaPreview: z5.boolean().optional(),
|
|
7197
7206
|
showMediaOverlayActions: z5.boolean().optional(),
|
|
7207
|
+
mediaPreviewMaxWidth: z5.enum(["xs", "sm", "md", "none"]).optional(),
|
|
7208
|
+
preventMediaPreviewUpscale: z5.boolean().optional(),
|
|
7198
7209
|
mediaDelivery: mediaDeliverySchema.optional(),
|
|
7199
7210
|
mediaDeliveryByVariant: z5.record(z5.string(), mediaDeliverySchema).optional(),
|
|
7200
7211
|
// Optional input hints for validators/widgets
|
|
@@ -7444,6 +7455,9 @@ var repeaterFieldSchema = baseFieldSchema.extend({
|
|
|
7444
7455
|
type: z5.literal("repeater"),
|
|
7445
7456
|
itemLabel: z5.string().default("Item"),
|
|
7446
7457
|
itemLabelSource: z5.string().optional(),
|
|
7458
|
+
showSummary: z5.boolean().optional(),
|
|
7459
|
+
summaryFields: z5.string().array().optional(),
|
|
7460
|
+
summaryMaxChars: z5.number().int().positive().optional(),
|
|
7447
7461
|
minItems: z5.number().int().min(0).default(0),
|
|
7448
7462
|
maxItems: z5.number().int().positive().optional(),
|
|
7449
7463
|
// Monomorphic mode
|
|
@@ -8097,7 +8111,7 @@ function normalizeStoredObjectChildren(children, value, ctx) {
|
|
|
8097
8111
|
return normalized;
|
|
8098
8112
|
}
|
|
8099
8113
|
function normalizeStoredRepeaterItems(plan, value, ctx) {
|
|
8100
|
-
if (!
|
|
8114
|
+
if (!isUnknownArray(value)) {
|
|
8101
8115
|
return value;
|
|
8102
8116
|
}
|
|
8103
8117
|
return value.map((item) => {
|
|
@@ -8144,7 +8158,7 @@ function normalizeObjectChildren(children, value, ctx) {
|
|
|
8144
8158
|
return normalized;
|
|
8145
8159
|
}
|
|
8146
8160
|
function normalizeRepeaterItems(plan, value, ctx) {
|
|
8147
|
-
if (!
|
|
8161
|
+
if (!isUnknownArray(value)) return value;
|
|
8148
8162
|
return value.map((item) => {
|
|
8149
8163
|
if (!item || typeof item !== "object" || Array.isArray(item)) return item;
|
|
8150
8164
|
const itemRecord = item;
|
|
@@ -8531,6 +8545,9 @@ function isEmptyValue(value) {
|
|
|
8531
8545
|
function isPlainObject(value) {
|
|
8532
8546
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
8533
8547
|
}
|
|
8548
|
+
function isUnknownArray(value) {
|
|
8549
|
+
return Array.isArray(value);
|
|
8550
|
+
}
|
|
8534
8551
|
function isValidRichTextDoc(value) {
|
|
8535
8552
|
const doc = richTextDoc(value);
|
|
8536
8553
|
return Boolean(isPlainObject(doc) && doc.type === "doc");
|
|
@@ -12256,13 +12273,13 @@ function generateShadowValue(elevation, softness, position = "bottom") {
|
|
|
12256
12273
|
const xOffset = position === "bottom-right" ? config.offset : 0;
|
|
12257
12274
|
const yOffset = config.offset;
|
|
12258
12275
|
switch (softness) {
|
|
12276
|
+
case null:
|
|
12277
|
+
case "soft":
|
|
12278
|
+
return `${xOffset}px ${yOffset}px ${config.blur}px ${config.spread}px rgb(0 0 0 / 0.3)`;
|
|
12259
12279
|
case "hard":
|
|
12260
12280
|
return `${xOffset}px ${yOffset}px 0 0 rgb(0 0 0 / 1)`;
|
|
12261
12281
|
case "crisp":
|
|
12262
12282
|
return `${xOffset}px ${yOffset}px ${config.offset}px ${config.spread}px rgb(0 0 0 / 0.4)`;
|
|
12263
|
-
case "soft":
|
|
12264
|
-
default:
|
|
12265
|
-
return `${xOffset}px ${yOffset}px ${config.blur}px ${config.spread}px rgb(0 0 0 / 0.3)`;
|
|
12266
12283
|
}
|
|
12267
12284
|
}
|
|
12268
12285
|
var BORDER_WIDTH_MAP = {
|
|
@@ -19743,47 +19760,48 @@ function validateFieldDefinitions(fields3, fragmentId) {
|
|
|
19743
19760
|
function prefixFieldId(field, scope) {
|
|
19744
19761
|
const cloned = cloneFieldDefinition2(field);
|
|
19745
19762
|
cloned.id = `${scope}.${field.id}`;
|
|
19746
|
-
|
|
19763
|
+
const defaultValue = cloned.defaultValue;
|
|
19764
|
+
cloned.defaultValue = cloneUnknown(defaultValue);
|
|
19747
19765
|
cloned.visibleRoles = cloned.visibleRoles ? [...cloned.visibleRoles] : void 0;
|
|
19748
19766
|
cloned.ui = cloneUnknown(cloned.ui);
|
|
19749
19767
|
return cloned;
|
|
19750
19768
|
}
|
|
19751
19769
|
function cloneFieldDefinition2(field) {
|
|
19752
|
-
|
|
19753
|
-
|
|
19754
|
-
|
|
19755
|
-
|
|
19756
|
-
|
|
19757
|
-
|
|
19758
|
-
|
|
19759
|
-
|
|
19760
|
-
|
|
19761
|
-
|
|
19762
|
-
|
|
19763
|
-
|
|
19764
|
-
|
|
19765
|
-
|
|
19766
|
-
|
|
19767
|
-
|
|
19768
|
-
|
|
19769
|
-
return {
|
|
19770
|
-
...field,
|
|
19771
|
-
schema: {
|
|
19772
|
-
fields: field.schema.fields.map(cloneFieldDefinition2)
|
|
19773
|
-
}
|
|
19774
|
-
};
|
|
19775
|
-
}
|
|
19776
|
-
return { ...field };
|
|
19777
|
-
case "group":
|
|
19770
|
+
if (field.type === "repeater") {
|
|
19771
|
+
if (field.polymorphic && field.itemTypes) {
|
|
19772
|
+
return {
|
|
19773
|
+
...field,
|
|
19774
|
+
polymorphic: true,
|
|
19775
|
+
itemTypes: Object.fromEntries(
|
|
19776
|
+
Object.entries(field.itemTypes).map(([key, itemType]) => [
|
|
19777
|
+
key,
|
|
19778
|
+
{
|
|
19779
|
+
...itemType,
|
|
19780
|
+
fields: itemType.fields.map(cloneFieldDefinition2)
|
|
19781
|
+
}
|
|
19782
|
+
])
|
|
19783
|
+
)
|
|
19784
|
+
};
|
|
19785
|
+
}
|
|
19786
|
+
if (field.schema) {
|
|
19778
19787
|
return {
|
|
19779
19788
|
...field,
|
|
19780
19789
|
schema: {
|
|
19781
19790
|
fields: field.schema.fields.map(cloneFieldDefinition2)
|
|
19782
19791
|
}
|
|
19783
19792
|
};
|
|
19784
|
-
|
|
19785
|
-
|
|
19793
|
+
}
|
|
19794
|
+
return { ...field };
|
|
19786
19795
|
}
|
|
19796
|
+
if (field.type === "group") {
|
|
19797
|
+
return {
|
|
19798
|
+
...field,
|
|
19799
|
+
schema: {
|
|
19800
|
+
fields: field.schema.fields.map(cloneFieldDefinition2)
|
|
19801
|
+
}
|
|
19802
|
+
};
|
|
19803
|
+
}
|
|
19804
|
+
return { ...field };
|
|
19787
19805
|
}
|
|
19788
19806
|
function cloneUnknown(value) {
|
|
19789
19807
|
if (value == null || typeof value !== "object") {
|
|
@@ -22218,7 +22236,8 @@ function createBlockManifestWithContentShape(config, _contentShape) {
|
|
|
22218
22236
|
return createBlockManifest(config);
|
|
22219
22237
|
}
|
|
22220
22238
|
function normalizeBlockLayout(layout) {
|
|
22221
|
-
|
|
22239
|
+
const rawLayout = layout;
|
|
22240
|
+
return Array.isArray(rawLayout) ? rawLayout : rawLayout;
|
|
22222
22241
|
}
|
|
22223
22242
|
function deriveComponentName(id) {
|
|
22224
22243
|
const base = id.replace(/^block\./, "");
|
|
@@ -23786,16 +23805,20 @@ var marqueeLoopTransform = {
|
|
|
23786
23805
|
summary: "Repeat an array to a minimum length, then duplicate it for seamless marquee looping",
|
|
23787
23806
|
schema: marqueeLoopOptionsSchema,
|
|
23788
23807
|
run: (value, options) => {
|
|
23789
|
-
|
|
23808
|
+
const items = toUnknownArray(value);
|
|
23809
|
+
if (items.length === 0) return [];
|
|
23790
23810
|
const minItems = options?.minItems ?? 10;
|
|
23791
23811
|
const base = [];
|
|
23792
23812
|
while (base.length < minItems) {
|
|
23793
|
-
base.push(...
|
|
23813
|
+
base.push(...items);
|
|
23794
23814
|
if (base.length > 1e3) break;
|
|
23795
23815
|
}
|
|
23796
23816
|
return [...base, ...base];
|
|
23797
23817
|
}
|
|
23798
23818
|
};
|
|
23819
|
+
function toUnknownArray(value) {
|
|
23820
|
+
return Array.isArray(value) ? value : [];
|
|
23821
|
+
}
|
|
23799
23822
|
var formattingTransforms = [
|
|
23800
23823
|
uppercaseTransform,
|
|
23801
23824
|
fallbackTransform,
|
|
@@ -27512,8 +27535,8 @@ var eventSurfaceScopeValues = [
|
|
|
27512
27535
|
"custom"
|
|
27513
27536
|
];
|
|
27514
27537
|
var eventScheduleScopeValues = ["any", "recurring", "oneOff"];
|
|
27515
|
-
var
|
|
27516
|
-
var
|
|
27538
|
+
var unsafeAsEventCategoryId = (value) => value;
|
|
27539
|
+
var unsafeAsVenueId = (value) => value;
|
|
27517
27540
|
function normalizeEventBlockKind(value) {
|
|
27518
27541
|
return value === "courses" || value === "events" ? value : "all";
|
|
27519
27542
|
}
|
|
@@ -27539,10 +27562,10 @@ function normalizeEventCategoryIds(value) {
|
|
|
27539
27562
|
if (Array.isArray(value)) {
|
|
27540
27563
|
return normalizeIdList(
|
|
27541
27564
|
value.filter((entry) => typeof entry === "string")
|
|
27542
|
-
).map(
|
|
27565
|
+
).map(unsafeAsEventCategoryId);
|
|
27543
27566
|
}
|
|
27544
27567
|
if (typeof value === "string") {
|
|
27545
|
-
return normalizeIdList(value.split(",")).map(
|
|
27568
|
+
return normalizeIdList(value.split(",")).map(unsafeAsEventCategoryId);
|
|
27546
27569
|
}
|
|
27547
27570
|
return [];
|
|
27548
27571
|
}
|
|
@@ -27555,7 +27578,7 @@ function normalizeEventVenueId(value) {
|
|
|
27555
27578
|
return null;
|
|
27556
27579
|
}
|
|
27557
27580
|
const trimmed = value.trim();
|
|
27558
|
-
return trimmed ?
|
|
27581
|
+
return trimmed ? unsafeAsVenueId(trimmed) : null;
|
|
27559
27582
|
}
|
|
27560
27583
|
function normalizeEventStaffMemberId(value) {
|
|
27561
27584
|
if (typeof value !== "string") {
|
|
@@ -30126,7 +30149,7 @@ function getProxyImageUrl(value, options, transformAspectRatio, resolved) {
|
|
|
30126
30149
|
if (!shouldUseExplicitRectProxy(value, options, resolvedTransform, sourceWidth, sourceHeight)) return void 0;
|
|
30127
30150
|
const params = buildProxyTransformParams(options, resolvedTransform);
|
|
30128
30151
|
const proxyBasePath = getImageProxyBasePath();
|
|
30129
|
-
const proxyUrl = getImageUrl({ id:
|
|
30152
|
+
const proxyUrl = getImageUrl({ id: unsafeAsMediaAssetId(value.assetId) }, params, proxyBasePath);
|
|
30130
30153
|
debugMediaNodeLog("resolve:proxy-img", { assetId: value.assetId, params, proxyBasePath, proxyUrl });
|
|
30131
30154
|
return proxyUrl;
|
|
30132
30155
|
}
|
|
@@ -39150,6 +39173,8 @@ var header_section_server_default = markEditableSurfaceForwarding(HeaderSectionN
|
|
|
39150
39173
|
import { jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
39151
39174
|
function resolveColorStyle(color) {
|
|
39152
39175
|
switch (color) {
|
|
39176
|
+
case void 0:
|
|
39177
|
+
return void 0;
|
|
39153
39178
|
case "inherit":
|
|
39154
39179
|
return { color: "inherit" };
|
|
39155
39180
|
case "foreground":
|
|
@@ -42627,14 +42652,23 @@ function injectMediaSlotPath(props2, node, parsedBinding, context) {
|
|
|
42627
42652
|
}
|
|
42628
42653
|
function resolveChildren(nodes, context) {
|
|
42629
42654
|
if (!nodes?.length) return [];
|
|
42630
|
-
|
|
42655
|
+
const children = [];
|
|
42656
|
+
nodes.forEach((child, index) => {
|
|
42631
42657
|
const childContext = { ...context, scopes: [...context.scopes] };
|
|
42632
42658
|
const resolved = resolveNode2(child, childContext, index);
|
|
42633
42659
|
if (Array.isArray(resolved)) {
|
|
42634
|
-
|
|
42660
|
+
for (const item of resolved) {
|
|
42661
|
+
const childNode = item;
|
|
42662
|
+
if (isReactNode(childNode)) children.push(childNode);
|
|
42663
|
+
}
|
|
42664
|
+
return;
|
|
42635
42665
|
}
|
|
42636
|
-
|
|
42666
|
+
if (isReactNode(resolved)) children.push(resolved);
|
|
42637
42667
|
});
|
|
42668
|
+
return children;
|
|
42669
|
+
}
|
|
42670
|
+
function isReactNode(value) {
|
|
42671
|
+
return value !== null && value !== void 0;
|
|
42638
42672
|
}
|
|
42639
42673
|
function resolveNode2(node, context, indexFallback) {
|
|
42640
42674
|
if (!shouldRenderNode(node, context)) {
|
|
@@ -42847,8 +42881,11 @@ var BLOCK_PREFIX = "block.";
|
|
|
42847
42881
|
function isPlainObject4(value) {
|
|
42848
42882
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
42849
42883
|
}
|
|
42884
|
+
function isUnknownArray2(value) {
|
|
42885
|
+
return Array.isArray(value);
|
|
42886
|
+
}
|
|
42850
42887
|
function cloneValue(value) {
|
|
42851
|
-
if (
|
|
42888
|
+
if (isUnknownArray2(value)) {
|
|
42852
42889
|
return value.map((item) => cloneValue(item));
|
|
42853
42890
|
}
|
|
42854
42891
|
if (isPlainObject4(value)) {
|
|
@@ -58285,11 +58322,11 @@ function normalizeContent(block) {
|
|
|
58285
58322
|
}
|
|
58286
58323
|
function normalizeParams(input) {
|
|
58287
58324
|
if (!input || typeof input !== "object") return {};
|
|
58288
|
-
const
|
|
58289
|
-
|
|
58290
|
-
coerceToString(value)
|
|
58291
|
-
|
|
58292
|
-
return
|
|
58325
|
+
const output = {};
|
|
58326
|
+
for (const [key, value] of Object.entries(input)) {
|
|
58327
|
+
output[key] = coerceToString(value);
|
|
58328
|
+
}
|
|
58329
|
+
return output;
|
|
58293
58330
|
}
|
|
58294
58331
|
function isNonArrayObject(value) {
|
|
58295
58332
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -58505,10 +58542,16 @@ var dashboardConfigSchema = z68.object({
|
|
|
58505
58542
|
var fieldDefinitionInputSchema = unsafeRetypeZodSchema(fieldSchema);
|
|
58506
58543
|
var nodeDefinitionSchema = unsafeRetypeZodSchema(NodeSchema);
|
|
58507
58544
|
var sdkLoaderEndpointSchema = z68.enum(SUPPORTED_LOADER_ENDPOINTS);
|
|
58545
|
+
var loaderFallbackScalarSchema = z68.union([
|
|
58546
|
+
z68.string(),
|
|
58547
|
+
z68.number(),
|
|
58548
|
+
z68.boolean(),
|
|
58549
|
+
z68.null()
|
|
58550
|
+
]);
|
|
58508
58551
|
var loaderParamBindingSchema = z68.object({
|
|
58509
58552
|
$bind: z68.object({
|
|
58510
58553
|
from: z68.string().min(1, "Binding path is required"),
|
|
58511
|
-
fallback:
|
|
58554
|
+
fallback: loaderFallbackScalarSchema.optional()
|
|
58512
58555
|
})
|
|
58513
58556
|
});
|
|
58514
58557
|
var loaderParamValueSchema = z68.union([
|
|
@@ -58654,9 +58697,13 @@ var sdkBlockFieldOptionsMapSchema = z68.record(
|
|
|
58654
58697
|
var sdkContentTypeTemplateConfigSchema = z68.object({
|
|
58655
58698
|
blocks: z68.array(z68.unknown())
|
|
58656
58699
|
}).passthrough();
|
|
58700
|
+
var sdkContentTypeOrderingConfigSchema = z68.object({
|
|
58701
|
+
mode: z68.enum(["default", "manual"]).optional()
|
|
58702
|
+
}).optional();
|
|
58657
58703
|
var sdkContentTypeConfigSchema = z68.object({
|
|
58658
58704
|
key: z68.string().min(1),
|
|
58659
58705
|
fields: z68.array(z68.unknown()),
|
|
58706
|
+
ordering: sdkContentTypeOrderingConfigSchema,
|
|
58660
58707
|
template: sdkContentTypeTemplateConfigSchema.nullable().optional()
|
|
58661
58708
|
}).passthrough();
|
|
58662
58709
|
var sdkContentConfigSchema = z68.object({
|
|
@@ -58926,18 +58973,21 @@ function buildEndpointURL(baseURL, endpoint) {
|
|
|
58926
58973
|
function isFormDataBody(value) {
|
|
58927
58974
|
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
58928
58975
|
}
|
|
58976
|
+
function isUnknownArray3(value) {
|
|
58977
|
+
return Array.isArray(value);
|
|
58978
|
+
}
|
|
58929
58979
|
function appendQueryParam(queryParams, key, value) {
|
|
58930
58980
|
if (value === void 0 || value === null) {
|
|
58931
58981
|
return;
|
|
58932
58982
|
}
|
|
58933
|
-
if (
|
|
58983
|
+
if (isUnknownArray3(value)) {
|
|
58934
58984
|
const stack2 = [...value].reverse();
|
|
58935
58985
|
while (stack2.length > 0) {
|
|
58936
58986
|
const item = stack2.pop();
|
|
58937
58987
|
if (item === void 0 || item === null) {
|
|
58938
58988
|
continue;
|
|
58939
58989
|
}
|
|
58940
|
-
if (
|
|
58990
|
+
if (isUnknownArray3(item)) {
|
|
58941
58991
|
stack2.push(...[...item].reverse());
|
|
58942
58992
|
continue;
|
|
58943
58993
|
}
|
|
@@ -58947,6 +58997,12 @@ function appendQueryParam(queryParams, key, value) {
|
|
|
58947
58997
|
}
|
|
58948
58998
|
queryParams.append(key, String(value));
|
|
58949
58999
|
}
|
|
59000
|
+
function serializePathParam(endpoint, key, value) {
|
|
59001
|
+
if (typeof value === "string") {
|
|
59002
|
+
return value;
|
|
59003
|
+
}
|
|
59004
|
+
throw new Error(`Invalid path param for endpoint ${String(endpoint)}: ${key} must be a string`);
|
|
59005
|
+
}
|
|
58950
59006
|
function invalidateCacheTags(tags2, params) {
|
|
58951
59007
|
const resolved = getRevalidateTag();
|
|
58952
59008
|
if (typeof window !== "undefined" || !resolved || !tags2) return;
|
|
@@ -59085,8 +59141,9 @@ function createRawCMSClient(headers = {}, baseUrl) {
|
|
|
59085
59141
|
const bracePlaceholder = `{${key}}`;
|
|
59086
59142
|
const colonPlaceholder = `:${key}`;
|
|
59087
59143
|
if (originalPath.includes(bracePlaceholder) || originalPath.includes(colonPlaceholder)) {
|
|
59088
|
-
|
|
59089
|
-
url = url.replace(
|
|
59144
|
+
const stringValue = serializePathParam(endpoint, key, value);
|
|
59145
|
+
url = url.replace(bracePlaceholder, stringValue);
|
|
59146
|
+
url = url.replace(colonPlaceholder, stringValue);
|
|
59090
59147
|
} else {
|
|
59091
59148
|
unusedParams[key] = value;
|
|
59092
59149
|
}
|
|
@@ -60100,7 +60157,7 @@ async function prefetchBlockData2(page, context, client, options) {
|
|
|
60100
60157
|
throw new Error("listPublishedEntries requires siteId and type params");
|
|
60101
60158
|
}
|
|
60102
60159
|
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
60103
|
-
const order = orderBy === "
|
|
60160
|
+
const order = orderBy === "order" ? "manual" : orderBy === "newest" || orderBy === "oldest" || orderBy === "title" ? orderBy : void 0;
|
|
60104
60161
|
const parsedEntryIds = mode === "manual" ? parseManualEntryIds(entryIds) : void 0;
|
|
60105
60162
|
if (mode === "manual" && (!parsedEntryIds || parsedEntryIds.length === 0)) {
|
|
60106
60163
|
return { entries: [] };
|
|
@@ -60526,6 +60583,9 @@ function isContentLoadNotFoundError(error) {
|
|
|
60526
60583
|
}
|
|
60527
60584
|
return Reflect.get(error, "status") === 404;
|
|
60528
60585
|
}
|
|
60586
|
+
function getRejectedReason(result) {
|
|
60587
|
+
return result.reason;
|
|
60588
|
+
}
|
|
60529
60589
|
async function loadContent(params) {
|
|
60530
60590
|
const { client, siteId, path, preview = false, forceSite } = params;
|
|
60531
60591
|
const [siteResult, contentResult] = await Promise.allSettled([
|
|
@@ -60533,7 +60593,7 @@ async function loadContent(params) {
|
|
|
60533
60593
|
client.getPage({ siteId, path, preview })
|
|
60534
60594
|
]);
|
|
60535
60595
|
if (siteResult.status === "rejected" || contentResult.status === "rejected") {
|
|
60536
|
-
const failures = [siteResult, contentResult].filter((result) => result.status === "rejected").map(
|
|
60596
|
+
const failures = [siteResult, contentResult].filter((result) => result.status === "rejected").map(getRejectedReason);
|
|
60537
60597
|
const upstreamFailure = failures.find((error) => !isContentLoadNotFoundError(error));
|
|
60538
60598
|
throw upstreamFailure ?? failures[0];
|
|
60539
60599
|
}
|
|
@@ -62075,7 +62135,7 @@ var CircuitOpenError = class extends Error {
|
|
|
62075
62135
|
};
|
|
62076
62136
|
|
|
62077
62137
|
// src/version.ts
|
|
62078
|
-
var SDK_VERSION = "0.78.
|
|
62138
|
+
var SDK_VERSION = "0.78.2";
|
|
62079
62139
|
|
|
62080
62140
|
// src/next/content-load-failure.ts
|
|
62081
62141
|
var SdkContentLoadError = RiverbankContentLoadError;
|
|
@@ -62233,7 +62293,7 @@ function readStringProperty(error, property) {
|
|
|
62233
62293
|
if (typeof error !== "object" || error === null || !(property in error)) {
|
|
62234
62294
|
return void 0;
|
|
62235
62295
|
}
|
|
62236
|
-
const value =
|
|
62296
|
+
const value = error[property];
|
|
62237
62297
|
return typeof value === "string" ? value : void 0;
|
|
62238
62298
|
}
|
|
62239
62299
|
|
|
@@ -62709,9 +62769,10 @@ var SimpleCache = class {
|
|
|
62709
62769
|
var prebuildModule = null;
|
|
62710
62770
|
function tryRequire(modulePath) {
|
|
62711
62771
|
try {
|
|
62712
|
-
const
|
|
62772
|
+
const getRequire = new Function(
|
|
62713
62773
|
'return typeof require === "function" ? require : null'
|
|
62714
|
-
)
|
|
62774
|
+
);
|
|
62775
|
+
const req = getRequire();
|
|
62715
62776
|
return req ? req(modulePath) : null;
|
|
62716
62777
|
} catch {
|
|
62717
62778
|
return null;
|
|
@@ -63224,8 +63285,7 @@ function createRiverbankClient(config) {
|
|
|
63224
63285
|
async (sig) => {
|
|
63225
63286
|
return await apiClient({
|
|
63226
63287
|
endpoint: "getContentByPath",
|
|
63227
|
-
params: { siteId },
|
|
63228
|
-
body: { path, preview },
|
|
63288
|
+
params: { siteId, path, preview: String(preview) },
|
|
63229
63289
|
options: { signal: sig }
|
|
63230
63290
|
});
|
|
63231
63291
|
},
|
|
@@ -63275,6 +63335,8 @@ function createRiverbankClient(config) {
|
|
|
63275
63335
|
orderParam = "published_at.asc";
|
|
63276
63336
|
} else if (order === "title") {
|
|
63277
63337
|
orderParam = "title.asc";
|
|
63338
|
+
} else if (order === "manual") {
|
|
63339
|
+
orderParam = "manual.asc";
|
|
63278
63340
|
}
|
|
63279
63341
|
const apiParams = {
|
|
63280
63342
|
siteId,
|
|
@@ -382,6 +382,8 @@ var uiSchema = z2.object({
|
|
|
382
382
|
mediaPickerAutoOpen: z2.boolean().optional(),
|
|
383
383
|
showMediaPreview: z2.boolean().optional(),
|
|
384
384
|
showMediaOverlayActions: z2.boolean().optional(),
|
|
385
|
+
mediaPreviewMaxWidth: z2.enum(["xs", "sm", "md", "none"]).optional(),
|
|
386
|
+
preventMediaPreviewUpscale: z2.boolean().optional(),
|
|
385
387
|
mediaDelivery: mediaDeliverySchema.optional(),
|
|
386
388
|
mediaDeliveryByVariant: z2.record(z2.string(), mediaDeliverySchema).optional(),
|
|
387
389
|
// Optional input hints for validators/widgets
|
|
@@ -631,6 +633,9 @@ var repeaterFieldSchema = baseFieldSchema.extend({
|
|
|
631
633
|
type: z2.literal("repeater"),
|
|
632
634
|
itemLabel: z2.string().default("Item"),
|
|
633
635
|
itemLabelSource: z2.string().optional(),
|
|
636
|
+
showSummary: z2.boolean().optional(),
|
|
637
|
+
summaryFields: z2.string().array().optional(),
|
|
638
|
+
summaryMaxChars: z2.number().int().positive().optional(),
|
|
634
639
|
minItems: z2.number().int().min(0).default(0),
|
|
635
640
|
maxItems: z2.number().int().positive().optional(),
|
|
636
641
|
// Monomorphic mode
|
|
@@ -8964,47 +8969,48 @@ function validateFieldDefinitions(fields3, fragmentId) {
|
|
|
8964
8969
|
function prefixFieldId(field, scope) {
|
|
8965
8970
|
const cloned = cloneFieldDefinition2(field);
|
|
8966
8971
|
cloned.id = `${scope}.${field.id}`;
|
|
8967
|
-
|
|
8972
|
+
const defaultValue = cloned.defaultValue;
|
|
8973
|
+
cloned.defaultValue = cloneUnknown(defaultValue);
|
|
8968
8974
|
cloned.visibleRoles = cloned.visibleRoles ? [...cloned.visibleRoles] : void 0;
|
|
8969
8975
|
cloned.ui = cloneUnknown(cloned.ui);
|
|
8970
8976
|
return cloned;
|
|
8971
8977
|
}
|
|
8972
8978
|
function cloneFieldDefinition2(field) {
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
8988
|
-
|
|
8989
|
-
|
|
8990
|
-
return {
|
|
8991
|
-
...field,
|
|
8992
|
-
schema: {
|
|
8993
|
-
fields: field.schema.fields.map(cloneFieldDefinition2)
|
|
8994
|
-
}
|
|
8995
|
-
};
|
|
8996
|
-
}
|
|
8997
|
-
return { ...field };
|
|
8998
|
-
case "group":
|
|
8979
|
+
if (field.type === "repeater") {
|
|
8980
|
+
if (field.polymorphic && field.itemTypes) {
|
|
8981
|
+
return {
|
|
8982
|
+
...field,
|
|
8983
|
+
polymorphic: true,
|
|
8984
|
+
itemTypes: Object.fromEntries(
|
|
8985
|
+
Object.entries(field.itemTypes).map(([key, itemType]) => [
|
|
8986
|
+
key,
|
|
8987
|
+
{
|
|
8988
|
+
...itemType,
|
|
8989
|
+
fields: itemType.fields.map(cloneFieldDefinition2)
|
|
8990
|
+
}
|
|
8991
|
+
])
|
|
8992
|
+
)
|
|
8993
|
+
};
|
|
8994
|
+
}
|
|
8995
|
+
if (field.schema) {
|
|
8999
8996
|
return {
|
|
9000
8997
|
...field,
|
|
9001
8998
|
schema: {
|
|
9002
8999
|
fields: field.schema.fields.map(cloneFieldDefinition2)
|
|
9003
9000
|
}
|
|
9004
9001
|
};
|
|
9005
|
-
|
|
9006
|
-
|
|
9002
|
+
}
|
|
9003
|
+
return { ...field };
|
|
9004
|
+
}
|
|
9005
|
+
if (field.type === "group") {
|
|
9006
|
+
return {
|
|
9007
|
+
...field,
|
|
9008
|
+
schema: {
|
|
9009
|
+
fields: field.schema.fields.map(cloneFieldDefinition2)
|
|
9010
|
+
}
|
|
9011
|
+
};
|
|
9007
9012
|
}
|
|
9013
|
+
return { ...field };
|
|
9008
9014
|
}
|
|
9009
9015
|
function cloneUnknown(value) {
|
|
9010
9016
|
if (value == null || typeof value !== "object") {
|
|
@@ -11347,7 +11353,8 @@ function createBlockManifestWithContentShape(config, _contentShape) {
|
|
|
11347
11353
|
return createBlockManifest(config);
|
|
11348
11354
|
}
|
|
11349
11355
|
function normalizeBlockLayout(layout) {
|
|
11350
|
-
|
|
11356
|
+
const rawLayout = layout;
|
|
11357
|
+
return Array.isArray(rawLayout) ? rawLayout : rawLayout;
|
|
11351
11358
|
}
|
|
11352
11359
|
function deriveComponentName(id) {
|
|
11353
11360
|
const base = id.replace(/^block\./, "");
|
|
@@ -15262,8 +15269,8 @@ var eventSurfaceScopeValues = [
|
|
|
15262
15269
|
"custom"
|
|
15263
15270
|
];
|
|
15264
15271
|
var eventScheduleScopeValues = ["any", "recurring", "oneOff"];
|
|
15265
|
-
var
|
|
15266
|
-
var
|
|
15272
|
+
var unsafeAsEventCategoryId = (value) => value;
|
|
15273
|
+
var unsafeAsVenueId = (value) => value;
|
|
15267
15274
|
function normalizeEventBlockKind(value) {
|
|
15268
15275
|
return value === "courses" || value === "events" ? value : "all";
|
|
15269
15276
|
}
|
|
@@ -15289,10 +15296,10 @@ function normalizeEventCategoryIds(value) {
|
|
|
15289
15296
|
if (Array.isArray(value)) {
|
|
15290
15297
|
return normalizeIdList(
|
|
15291
15298
|
value.filter((entry) => typeof entry === "string")
|
|
15292
|
-
).map(
|
|
15299
|
+
).map(unsafeAsEventCategoryId);
|
|
15293
15300
|
}
|
|
15294
15301
|
if (typeof value === "string") {
|
|
15295
|
-
return normalizeIdList(value.split(",")).map(
|
|
15302
|
+
return normalizeIdList(value.split(",")).map(unsafeAsEventCategoryId);
|
|
15296
15303
|
}
|
|
15297
15304
|
return [];
|
|
15298
15305
|
}
|
|
@@ -15305,7 +15312,7 @@ function normalizeEventVenueId(value) {
|
|
|
15305
15312
|
return null;
|
|
15306
15313
|
}
|
|
15307
15314
|
const trimmed = value.trim();
|
|
15308
|
-
return trimmed ?
|
|
15315
|
+
return trimmed ? unsafeAsVenueId(trimmed) : null;
|
|
15309
15316
|
}
|
|
15310
15317
|
function normalizeEventStaffMemberId(value) {
|
|
15311
15318
|
if (typeof value !== "string") {
|
|
@@ -23749,11 +23756,14 @@ function collectFieldIds(fields3) {
|
|
|
23749
23756
|
for (const field of fieldList) {
|
|
23750
23757
|
ids.add(field.id);
|
|
23751
23758
|
if (field.schema && typeof field.schema === "object" && "fields" in field.schema) {
|
|
23752
|
-
|
|
23759
|
+
const nestedFields = field.schema.fields;
|
|
23760
|
+
if (isFieldIdRecordArray(nestedFields)) {
|
|
23761
|
+
collect(nestedFields);
|
|
23762
|
+
}
|
|
23753
23763
|
}
|
|
23754
|
-
if (
|
|
23764
|
+
if (isRecordArray(field.tabs)) {
|
|
23755
23765
|
for (const tab of field.tabs) {
|
|
23756
|
-
if (
|
|
23766
|
+
if (isFieldIdRecordArray(tab.fields)) {
|
|
23757
23767
|
collect(tab.fields);
|
|
23758
23768
|
}
|
|
23759
23769
|
}
|
|
@@ -23770,6 +23780,12 @@ function collectFieldIds(fields3) {
|
|
|
23770
23780
|
collect(fields3);
|
|
23771
23781
|
return ids;
|
|
23772
23782
|
}
|
|
23783
|
+
function isRecordArray(value) {
|
|
23784
|
+
return Array.isArray(value);
|
|
23785
|
+
}
|
|
23786
|
+
function isFieldIdRecordArray(value) {
|
|
23787
|
+
return Array.isArray(value) && value.every((item) => typeof item === "object" && item !== null && typeof item.id === "string");
|
|
23788
|
+
}
|
|
23773
23789
|
var CONTENT_NODE_TYPES = ["text", "richText", "media", "button", "link"];
|
|
23774
23790
|
function collectFieldInfo(fields3) {
|
|
23775
23791
|
const topLevelFieldIds = /* @__PURE__ */ new Set();
|
|
@@ -25839,7 +25855,7 @@ async function convertHtmlToManifest(input, options) {
|
|
|
25839
25855
|
|
|
25840
25856
|
// src/page-converter/passes/pass2-population.ts
|
|
25841
25857
|
var builtinContentSchema = z59.object({
|
|
25842
|
-
content: z59.
|
|
25858
|
+
content: z59.unknown(),
|
|
25843
25859
|
rationale: z59.string()
|
|
25844
25860
|
});
|
|
25845
25861
|
var SECTION_STYLES_ALLOWED_KEYS = /* @__PURE__ */ new Set(["background", "spacing"]);
|
|
@@ -25899,6 +25915,9 @@ function sanitizeExtractedContent(content) {
|
|
|
25899
25915
|
}
|
|
25900
25916
|
return result;
|
|
25901
25917
|
}
|
|
25918
|
+
function isRecord2(value) {
|
|
25919
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
25920
|
+
}
|
|
25902
25921
|
function isBoxStylesField(fieldId) {
|
|
25903
25922
|
return fieldId === "_sectionStyles" || fieldId === "_containerStyles" || fieldId === "_cardStyles";
|
|
25904
25923
|
}
|
|
@@ -26004,7 +26023,8 @@ async function populateBuiltinBlock(sectionIndex, section2, blockInfo, ctx) {
|
|
|
26004
26023
|
);
|
|
26005
26024
|
await ctx.debug.writeText(`pass2-builtin-${sectionIndex}-raw.txt`, rawText);
|
|
26006
26025
|
await ctx.debug.writeJson(`pass2-builtin-${sectionIndex}-output.json`, result);
|
|
26007
|
-
const
|
|
26026
|
+
const rawContent = result.content;
|
|
26027
|
+
const sanitizedContent = isRecord2(rawContent) ? sanitizeExtractedContent(rawContent) : {};
|
|
26008
26028
|
return {
|
|
26009
26029
|
success: true,
|
|
26010
26030
|
block: {
|