@riverbankcms/sdk 0.60.7 → 0.60.9
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/dist/_dts/api/src/navigation/linkValue.d.ts +1 -1
- package/dist/_dts/blocks/src/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +185 -0
- package/dist/_dts/blocks/src/system/manifest/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/manifest/validation.d.ts +2 -84
- package/dist/_dts/blocks/src/system/types/link.d.ts +93 -1
- package/dist/_dts/db/src/schemas/forms.d.ts +24 -3
- package/dist/_dts/editor-blocks/src/widgets/link/LinkSummary.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkWidget.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/link/utils.d.ts +1 -1
- package/dist/_dts/sdk/src/config/typed-entries.d.ts +36 -1
- package/dist/_dts/sdk/src/contracts/content.d.ts +6 -1
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/cli/index.mjs +676 -428
- package/dist/client/client.mjs +39991 -39754
- package/dist/client/hooks.mjs +1737 -1735
- package/dist/client/rendering.mjs +1463 -1226
- package/dist/preview-next/client/runtime.mjs +1052 -799
- package/dist/server/components.mjs +2983 -2745
- package/dist/server/config-validation.mjs +1727 -1725
- package/dist/server/config.mjs +1727 -1725
- package/dist/server/data.mjs +1737 -1735
- package/dist/server/index.mjs +1 -1
- package/dist/server/next.mjs +3026 -2788
- package/dist/server/page-converter.mjs +10 -10
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2996 -2758
- package/dist/server/rendering.mjs +2996 -2758
- package/dist/server/routing.mjs +256 -285
- package/dist/server/server.mjs +1738 -1736
- package/package.json +1 -1
|
@@ -8788,9 +8788,9 @@ function createZodCodec(schema) {
|
|
|
8788
8788
|
return decodeSuccess(parsed.data);
|
|
8789
8789
|
}
|
|
8790
8790
|
return decodeFailure(
|
|
8791
|
-
parsed.error.issues.map((
|
|
8792
|
-
path: zodIssuePath(
|
|
8793
|
-
message:
|
|
8791
|
+
parsed.error.issues.map((issue2) => ({
|
|
8792
|
+
path: zodIssuePath(issue2.path),
|
|
8793
|
+
message: issue2.message
|
|
8794
8794
|
}))
|
|
8795
8795
|
);
|
|
8796
8796
|
}
|
|
@@ -8822,9 +8822,9 @@ function expectEncodedRecord(value, label) {
|
|
|
8822
8822
|
throw new Error(`Expected ${label} codec to encode an object`);
|
|
8823
8823
|
}
|
|
8824
8824
|
function prefixIssues(prefix, issues) {
|
|
8825
|
-
return issues.map((
|
|
8826
|
-
path: [...prefix, ...
|
|
8827
|
-
message:
|
|
8825
|
+
return issues.map((issue2) => ({
|
|
8826
|
+
path: [...prefix, ...issue2.path],
|
|
8827
|
+
message: issue2.message
|
|
8828
8828
|
}));
|
|
8829
8829
|
}
|
|
8830
8830
|
function defineInteractiveIslandMetaKeys(...keys) {
|
|
@@ -28877,7 +28877,7 @@ var init_DatePicker = __esm({
|
|
|
28877
28877
|
dateOptions,
|
|
28878
28878
|
required = true,
|
|
28879
28879
|
isLoading = false,
|
|
28880
|
-
isEmpty
|
|
28880
|
+
isEmpty = false,
|
|
28881
28881
|
hasMore = false,
|
|
28882
28882
|
onLoadMore
|
|
28883
28883
|
}) => {
|
|
@@ -28891,7 +28891,7 @@ var init_DatePicker = __esm({
|
|
|
28891
28891
|
/* @__PURE__ */ jsx57("p", { className: "ab-text ab-text--muted ab-text--sm", children: "Loading available dates..." })
|
|
28892
28892
|
] });
|
|
28893
28893
|
}
|
|
28894
|
-
if (
|
|
28894
|
+
if (isEmpty) {
|
|
28895
28895
|
return /* @__PURE__ */ jsxs40("div", { className: "ab-stack--sm", children: [
|
|
28896
28896
|
/* @__PURE__ */ jsxs40("label", { className: "ab-label", children: [
|
|
28897
28897
|
"Select Date",
|
|
@@ -58609,7 +58609,7 @@ var DEFAULT_REQUIRED_ERROR_MESSAGE = "This section failed to load. Please refres
|
|
|
58609
58609
|
var IslandPropsDecodeError = class extends Error {
|
|
58610
58610
|
constructor(kind, issues) {
|
|
58611
58611
|
super(
|
|
58612
|
-
`[sdk:islands] Invalid props for island kind="${kind}": ${issues.map((
|
|
58612
|
+
`[sdk:islands] Invalid props for island kind="${kind}": ${issues.map((issue2) => `${issue2.path.join(".") || "<root>"}: ${issue2.message}`).join("; ")}`
|
|
58613
58613
|
);
|
|
58614
58614
|
this.name = "IslandPropsDecodeError";
|
|
58615
58615
|
this.issues = issues;
|
|
@@ -58773,380 +58773,617 @@ function hydrateBlocksIslands(options = {}) {
|
|
|
58773
58773
|
// ../blocks/src/PageRenderer.tsx
|
|
58774
58774
|
import * as React38 from "react";
|
|
58775
58775
|
|
|
58776
|
-
// ../blocks/src/system/manifest/
|
|
58777
|
-
var REGISTRY_SYMBOL = /* @__PURE__ */ Symbol.for("@riverbankcms/blocks/manifest-registry");
|
|
58778
|
-
var isVitest = typeof process !== "undefined" && typeof process.env !== "undefined" && process.env.VITEST === "true";
|
|
58779
|
-
var globalScope = globalThis;
|
|
58780
|
-
var manifestStore = isVitest ? /* @__PURE__ */ new Map() : globalScope[REGISTRY_SYMBOL] ?? (globalScope[REGISTRY_SYMBOL] = /* @__PURE__ */ new Map());
|
|
58781
|
-
function registerManifest(manifest) {
|
|
58782
|
-
manifestStore.set(manifest.name, manifest);
|
|
58783
|
-
return manifest;
|
|
58784
|
-
}
|
|
58785
|
-
|
|
58786
|
-
// ../blocks/src/system/manifest/validation.ts
|
|
58787
|
-
init_schema2();
|
|
58776
|
+
// ../blocks/src/system/manifest/fieldValidation/index.ts
|
|
58788
58777
|
import { z as z40 } from "zod";
|
|
58789
58778
|
|
|
58790
|
-
// ../blocks/src/system/
|
|
58791
|
-
init_typeGuards2();
|
|
58779
|
+
// ../blocks/src/system/types/link.ts
|
|
58792
58780
|
import { z as z39 } from "zod";
|
|
58793
|
-
var
|
|
58794
|
-
|
|
58795
|
-
|
|
58796
|
-
|
|
58797
|
-
|
|
58798
|
-
|
|
58799
|
-
|
|
58800
|
-
|
|
58801
|
-
|
|
58802
|
-
|
|
58803
|
-
|
|
58804
|
-
})
|
|
58805
|
-
);
|
|
58806
|
-
var
|
|
58807
|
-
|
|
58808
|
-
|
|
58809
|
-
|
|
58810
|
-
z39.
|
|
58811
|
-
|
|
58812
|
-
|
|
58781
|
+
var nullableString = z39.union([z39.string().min(1), z39.null()]);
|
|
58782
|
+
var resolvedInternalLinkKeys = ["entityId", "entityType", "href", "title", "typeLabel"];
|
|
58783
|
+
var internalRouteOnlyLinkSchema = z39.object({
|
|
58784
|
+
kind: z39.literal("internal"),
|
|
58785
|
+
routeId: z39.string().min(1)
|
|
58786
|
+
}).passthrough().superRefine((value, ctx) => {
|
|
58787
|
+
const hasResolvedMetadata = resolvedInternalLinkKeys.some((key) => value[key] != null);
|
|
58788
|
+
if (!hasResolvedMetadata) return;
|
|
58789
|
+
ctx.addIssue({
|
|
58790
|
+
code: "custom",
|
|
58791
|
+
message: "Internal links with resolved metadata must include entityId, entityType, href, title, and typeLabel"
|
|
58792
|
+
});
|
|
58793
|
+
});
|
|
58794
|
+
var internalResolvedLinkSchema = z39.object({
|
|
58795
|
+
kind: z39.literal("internal"),
|
|
58796
|
+
routeId: z39.string().min(1),
|
|
58797
|
+
entityId: z39.string().min(1),
|
|
58798
|
+
entityType: z39.enum(["page", "content"]),
|
|
58799
|
+
href: z39.string().min(1),
|
|
58800
|
+
title: z39.string().min(1),
|
|
58801
|
+
typeLabel: z39.string().min(1),
|
|
58802
|
+
contentTypeKey: nullableString.optional(),
|
|
58803
|
+
contentTypeName: nullableString.optional(),
|
|
58804
|
+
updatedAt: nullableString.optional()
|
|
58805
|
+
}).passthrough();
|
|
58806
|
+
var internalLinkSchema = z39.union([
|
|
58807
|
+
internalResolvedLinkSchema,
|
|
58808
|
+
internalRouteOnlyLinkSchema
|
|
58809
|
+
]);
|
|
58810
|
+
var externalLinkSchema = z39.object({
|
|
58811
|
+
kind: z39.literal("external"),
|
|
58812
|
+
href: z39.string().min(1)
|
|
58813
|
+
}).passthrough();
|
|
58814
|
+
var customLinkSchema = z39.object({
|
|
58815
|
+
kind: z39.literal("url"),
|
|
58816
|
+
href: z39.string().min(1)
|
|
58817
|
+
}).passthrough();
|
|
58818
|
+
var pageLinkSchema = z39.object({
|
|
58819
|
+
kind: z39.literal("page"),
|
|
58820
|
+
identifier: z39.string().min(1)
|
|
58821
|
+
}).passthrough();
|
|
58822
|
+
var entryLinkSchema = z39.object({
|
|
58823
|
+
kind: z39.literal("entry"),
|
|
58824
|
+
contentType: z39.string().min(1),
|
|
58825
|
+
identifier: z39.string().min(1)
|
|
58826
|
+
}).passthrough();
|
|
58827
|
+
var linkSchema = z39.union([
|
|
58828
|
+
internalLinkSchema,
|
|
58829
|
+
externalLinkSchema,
|
|
58830
|
+
customLinkSchema,
|
|
58831
|
+
pageLinkSchema,
|
|
58832
|
+
entryLinkSchema
|
|
58813
58833
|
]);
|
|
58814
|
-
function buildRichTextSchema(options) {
|
|
58815
|
-
let schema = RichTextValueSchema;
|
|
58816
|
-
if (options?.required) {
|
|
58817
|
-
const label = options.label ?? "This field";
|
|
58818
|
-
schema = schema.refine(
|
|
58819
|
-
(val) => {
|
|
58820
|
-
const doc = isRecord2(val) && "doc" in val ? val.doc : val;
|
|
58821
|
-
const content = isRecord2(doc) ? doc.content : void 0;
|
|
58822
|
-
if (!Array.isArray(content) || content.length === 0) return false;
|
|
58823
|
-
const first = content[0];
|
|
58824
|
-
if (content.length === 1 && isRecord2(first) && first.type === "paragraph" && (!("content" in first) || first.content == null)) {
|
|
58825
|
-
return false;
|
|
58826
|
-
}
|
|
58827
|
-
return true;
|
|
58828
|
-
},
|
|
58829
|
-
{
|
|
58830
|
-
message: `${label} is required`
|
|
58831
|
-
}
|
|
58832
|
-
);
|
|
58833
|
-
}
|
|
58834
|
-
return schema;
|
|
58835
|
-
}
|
|
58836
58834
|
|
|
58837
|
-
// ../blocks/src/system/manifest/
|
|
58838
|
-
|
|
58839
|
-
|
|
58840
|
-
|
|
58841
|
-
|
|
58842
|
-
|
|
58843
|
-
|
|
58835
|
+
// ../blocks/src/system/manifest/fieldValidation/index.ts
|
|
58836
|
+
init_schema2();
|
|
58837
|
+
var TEL_RE = /^[+()0-9\s-]{3,}$/;
|
|
58838
|
+
var SLUG_PATTERN = /^(?:[a-z0-9]+(?:-[a-z0-9]+)*)(?:\/(?:[a-z0-9]+(?:-[a-z0-9]+)*))*$/;
|
|
58839
|
+
var ALLOWED_URL_PROTOCOLS = ["http:", "https:"];
|
|
58840
|
+
function assertNever6(value) {
|
|
58841
|
+
throw new Error(`Unhandled field validation variant: ${JSON.stringify(value)}`);
|
|
58844
58842
|
}
|
|
58845
|
-
function
|
|
58846
|
-
|
|
58847
|
-
|
|
58848
|
-
|
|
58849
|
-
|
|
58850
|
-
|
|
58851
|
-
if (docObj.type !== "doc") return false;
|
|
58852
|
-
const content = docObj.content;
|
|
58853
|
-
if (!Array.isArray(content) || content.length === 0) return true;
|
|
58854
|
-
if (content.length === 1) {
|
|
58855
|
-
const first = content[0];
|
|
58856
|
-
if (first.type === "paragraph" && (!first.content || first.content.length === 0)) {
|
|
58857
|
-
return true;
|
|
58858
|
-
}
|
|
58859
|
-
}
|
|
58860
|
-
return false;
|
|
58843
|
+
function validationContext(options = {}) {
|
|
58844
|
+
const isDraft = options.mode === "draft";
|
|
58845
|
+
return {
|
|
58846
|
+
allowNull: options.allowNull ?? true,
|
|
58847
|
+
allowIncomplete: isDraft || (options.allowIncomplete ?? false)
|
|
58848
|
+
};
|
|
58861
58849
|
}
|
|
58862
|
-
function
|
|
58863
|
-
|
|
58864
|
-
|
|
58865
|
-
|
|
58866
|
-
|
|
58867
|
-
|
|
58868
|
-
|
|
58850
|
+
function fieldIssueToMessage(issue2) {
|
|
58851
|
+
switch (issue2.kind) {
|
|
58852
|
+
case "required":
|
|
58853
|
+
return "This field is required";
|
|
58854
|
+
case "wrongType":
|
|
58855
|
+
return `${issue2.label} needs ${issue2.expected}`;
|
|
58856
|
+
case "tooLong":
|
|
58857
|
+
return `Use ${issue2.maximum} characters or fewer`;
|
|
58858
|
+
case "invalidEmail":
|
|
58859
|
+
return "Enter a valid email address";
|
|
58860
|
+
case "invalidPhone":
|
|
58861
|
+
return "Enter a valid phone number";
|
|
58862
|
+
case "invalidPattern":
|
|
58863
|
+
return "Check the format and try again";
|
|
58864
|
+
case "invalidUrl":
|
|
58865
|
+
return "Enter a valid web address";
|
|
58866
|
+
case "invalidNumber":
|
|
58867
|
+
return `${issue2.label} needs a number`;
|
|
58868
|
+
case "tooSmall":
|
|
58869
|
+
return `${issue2.label} must be ${issue2.minimum} or more`;
|
|
58870
|
+
case "tooLarge":
|
|
58871
|
+
return `${issue2.label} must be ${issue2.maximum} or less`;
|
|
58872
|
+
case "invalidSlug":
|
|
58873
|
+
return `${issue2.label} can only use lowercase letters, numbers, and dashes`;
|
|
58874
|
+
case "invalidOption":
|
|
58875
|
+
return `Choose one of the available options for ${issue2.label}`;
|
|
58876
|
+
case "tooFewItems":
|
|
58877
|
+
return `${issue2.label} must have at least ${issue2.minimum} ${pluralize(issue2.itemLabel, issue2.minimum)}`;
|
|
58878
|
+
case "tooManyItems":
|
|
58879
|
+
return `${issue2.label} must have at most ${issue2.maximum} ${pluralize(issue2.itemLabel, issue2.maximum)}`;
|
|
58880
|
+
case "invalidRichText":
|
|
58881
|
+
return `${issue2.label} must be valid rich text`;
|
|
58882
|
+
case "invalidMedia":
|
|
58883
|
+
return `${issue2.label} must be a valid media item`;
|
|
58884
|
+
case "invalidLink":
|
|
58885
|
+
return `${issue2.label} must be a valid link`;
|
|
58886
|
+
case "invalidReference":
|
|
58887
|
+
return `${issue2.label} must reference a valid item`;
|
|
58888
|
+
default:
|
|
58889
|
+
return assertNever6(issue2);
|
|
58869
58890
|
}
|
|
58870
|
-
return result;
|
|
58871
58891
|
}
|
|
58872
|
-
function
|
|
58873
|
-
|
|
58874
|
-
|
|
58875
|
-
const allowIncomplete = isDraft || (options.allowIncomplete ?? false);
|
|
58876
|
-
const shape = {};
|
|
58877
|
-
const fields3 = Array.isArray(manifestOrFields) ? manifestOrFields : manifestOrFields.fields ?? [];
|
|
58878
|
-
for (const field of fields3) {
|
|
58879
|
-
shape[field.id] = buildFieldSchema(field, allowNull, allowIncomplete);
|
|
58880
|
-
}
|
|
58881
|
-
const baseSchema = z40.object(shape).catchall(z40.unknown()).passthrough();
|
|
58882
|
-
if (isDraft) {
|
|
58883
|
-
return z40.preprocess(preprocessEmptyValues, baseSchema);
|
|
58884
|
-
}
|
|
58885
|
-
return baseSchema;
|
|
58892
|
+
function pluralize(label, count) {
|
|
58893
|
+
if (count === 1) return label;
|
|
58894
|
+
return label.endsWith("s") ? label : `${label}s`;
|
|
58886
58895
|
}
|
|
58887
|
-
function
|
|
58896
|
+
function deriveFieldValidationPlan(field, path = [field.id]) {
|
|
58888
58897
|
const required = Boolean(field.required);
|
|
58889
|
-
let schema;
|
|
58890
58898
|
switch (field.type) {
|
|
58891
|
-
case "text":
|
|
58892
|
-
|
|
58893
|
-
|
|
58894
|
-
|
|
58895
|
-
|
|
58896
|
-
|
|
58897
|
-
|
|
58898
|
-
|
|
58899
|
-
const
|
|
58900
|
-
|
|
58901
|
-
|
|
58899
|
+
case "text": {
|
|
58900
|
+
const inputType = field.ui?.inputType;
|
|
58901
|
+
if (inputType === "number") {
|
|
58902
|
+
const constraints2 = commonConstraints(required, { kind: "numberType" });
|
|
58903
|
+
if (typeof field.ui?.min === "number") constraints2.push({ kind: "numberMin", minimum: field.ui.min });
|
|
58904
|
+
if (typeof field.ui?.max === "number") constraints2.push({ kind: "numberMax", maximum: field.ui.max });
|
|
58905
|
+
return makePlan("number", "number", field, path, required, constraints2);
|
|
58906
|
+
}
|
|
58907
|
+
const constraints = commonConstraints(required, { kind: "textType" });
|
|
58908
|
+
if (inputType === "email") constraints.push({ kind: "emailFormat" });
|
|
58909
|
+
if (inputType === "tel") constraints.push({ kind: "phoneFormat" });
|
|
58910
|
+
if (field.ui?.pattern) constraints.push({ kind: "patternFormat", pattern: field.ui.pattern });
|
|
58911
|
+
if (typeof field.maxLength === "number") constraints.push({ kind: "maxLength", maximum: field.maxLength });
|
|
58912
|
+
return makePlan("string", "string", field, path, required, constraints);
|
|
58913
|
+
}
|
|
58914
|
+
case "number": {
|
|
58915
|
+
const constraints = commonConstraints(required, { kind: "numberType" });
|
|
58916
|
+
if (typeof field.min === "number") constraints.push({ kind: "numberMin", minimum: field.min });
|
|
58917
|
+
if (typeof field.max === "number") constraints.push({ kind: "numberMax", maximum: field.max });
|
|
58918
|
+
return makePlan("number", "number", field, path, required, constraints);
|
|
58919
|
+
}
|
|
58920
|
+
case "slug": {
|
|
58921
|
+
const constraints = commonConstraints(required, { kind: "textType" }, { kind: "slugFormat" });
|
|
58922
|
+
if (typeof field.maxLength === "number") constraints.push({ kind: "maxLength", maximum: field.maxLength });
|
|
58923
|
+
return makePlan("string", "string", field, path, required, constraints);
|
|
58902
58924
|
}
|
|
58903
|
-
case "boolean":
|
|
58904
|
-
schema = z40.boolean();
|
|
58905
|
-
break;
|
|
58906
|
-
case "slug":
|
|
58907
|
-
schema = buildSlugSchema(field);
|
|
58908
|
-
break;
|
|
58909
58925
|
case "url":
|
|
58910
|
-
|
|
58911
|
-
|
|
58912
|
-
|
|
58913
|
-
|
|
58914
|
-
|
|
58915
|
-
case "select":
|
|
58916
|
-
schema = buildSelectSchema(field);
|
|
58917
|
-
break;
|
|
58926
|
+
return makePlan("string", "string", field, path, required, commonConstraints(
|
|
58927
|
+
required,
|
|
58928
|
+
{ kind: "textType" },
|
|
58929
|
+
{ kind: "urlFormat", allowRelative: Boolean(field.allowRelative) }
|
|
58930
|
+
));
|
|
58918
58931
|
case "reference":
|
|
58919
|
-
|
|
58920
|
-
|
|
58932
|
+
return makePlan("string", "string", field, path, required, commonConstraints(required, { kind: "referenceText" }));
|
|
58933
|
+
case "date":
|
|
58934
|
+
case "time":
|
|
58935
|
+
case "datetime":
|
|
58936
|
+
return makePlan("string", "string", field, path, required, commonConstraints(required, { kind: "textType" }));
|
|
58937
|
+
case "select":
|
|
58938
|
+
return makePlan("select", "select", field, path, required, commonConstraints(required, {
|
|
58939
|
+
kind: "selectOption",
|
|
58940
|
+
source: resolveSelectConstraintSource(field),
|
|
58941
|
+
multiple: Boolean(field.multiple)
|
|
58942
|
+
}));
|
|
58943
|
+
case "richText":
|
|
58944
|
+
return makePlan("richText", "object", field, path, required, commonConstraints(required, { kind: "richTextDoc" }));
|
|
58945
|
+
case "media":
|
|
58946
|
+
return makePlan("media", "object", field, path, required, commonConstraints(required, { kind: "mediaObject" }));
|
|
58947
|
+
case "link":
|
|
58948
|
+
return makePlan("link", "object", field, path, required, commonConstraints(required, { kind: "linkObject" }));
|
|
58949
|
+
case "boolean":
|
|
58950
|
+
return makePlan("boolean", "boolean", field, path, required, requiredConstraints(required));
|
|
58921
58951
|
case "repeater":
|
|
58922
|
-
|
|
58923
|
-
|
|
58952
|
+
return {
|
|
58953
|
+
...makePlan("repeater", "array", field, path, required, commonConstraints(required, { kind: "arrayType" })),
|
|
58954
|
+
...field.polymorphic && field.itemTypes ? { repeatedItemVariants: deriveRepeatedItemVariants(field, [...path, 0]) } : { repeatedItemPlan: deriveNestedFieldPlans(getRepeaterFields(field), [...path, 0]) },
|
|
58955
|
+
constraints: withRepeaterItemConstraints(field, commonConstraints(required, { kind: "arrayType" }))
|
|
58956
|
+
};
|
|
58924
58957
|
case "group":
|
|
58925
|
-
|
|
58926
|
-
|
|
58958
|
+
case "modal":
|
|
58959
|
+
return {
|
|
58960
|
+
...makePlan("group", "object", field, path, required, requiredConstraints(required)),
|
|
58961
|
+
children: deriveNestedFieldPlans(field.schema?.fields ?? [], path),
|
|
58962
|
+
allowNullChildren: field.type === "group" && field.ui?.widget === "locationPicker"
|
|
58963
|
+
};
|
|
58964
|
+
case "tabGroup":
|
|
58965
|
+
return {
|
|
58966
|
+
...makePlan("group", "object", field, path, required, requiredConstraints(required)),
|
|
58967
|
+
children: field.tabs.flatMap((tab) => deriveNestedFieldPlans(tab.fields, path))
|
|
58968
|
+
};
|
|
58969
|
+
case "presetOrCustom":
|
|
58970
|
+
case "contentTypeSelect":
|
|
58971
|
+
case "entryPicker":
|
|
58972
|
+
return makePlan("passthrough", "unknown", field, path, false, []);
|
|
58927
58973
|
default:
|
|
58928
|
-
|
|
58929
|
-
break;
|
|
58974
|
+
return assertNever6(field);
|
|
58930
58975
|
}
|
|
58931
|
-
return finalizeSchema(schema, required, allowNull, allowIncomplete);
|
|
58932
58976
|
}
|
|
58933
|
-
function
|
|
58934
|
-
return
|
|
58935
|
-
error: (issue) => issue.input === void 0 || issue.input === null ? "This field is required" : `${field.label} needs text`
|
|
58936
|
-
});
|
|
58977
|
+
function commonConstraints(required, ...specific) {
|
|
58978
|
+
return required ? [{ kind: "required" }, ...specific] : [...specific];
|
|
58937
58979
|
}
|
|
58938
|
-
function
|
|
58939
|
-
|
|
58940
|
-
|
|
58941
|
-
|
|
58942
|
-
|
|
58943
|
-
|
|
58944
|
-
|
|
58945
|
-
|
|
58946
|
-
|
|
58947
|
-
|
|
58948
|
-
|
|
58949
|
-
|
|
58950
|
-
|
|
58951
|
-
|
|
58952
|
-
|
|
58953
|
-
|
|
58954
|
-
|
|
58955
|
-
|
|
58956
|
-
|
|
58957
|
-
|
|
58958
|
-
|
|
58959
|
-
|
|
58960
|
-
|
|
58961
|
-
|
|
58962
|
-
|
|
58963
|
-
|
|
58964
|
-
|
|
58965
|
-
|
|
58966
|
-
|
|
58967
|
-
|
|
58968
|
-
|
|
58969
|
-
|
|
58970
|
-
|
|
58971
|
-
|
|
58972
|
-
|
|
58973
|
-
|
|
58974
|
-
|
|
58975
|
-
|
|
58976
|
-
);
|
|
58977
|
-
} catch {
|
|
58978
|
-
}
|
|
58979
|
-
}
|
|
58980
|
-
if (field.maxLength) {
|
|
58981
|
-
schema = schema.max(
|
|
58982
|
-
field.maxLength,
|
|
58983
|
-
`${field.label} must be ${field.maxLength} characters or less`
|
|
58984
|
-
);
|
|
58985
|
-
}
|
|
58986
|
-
if (field.required) {
|
|
58987
|
-
schema = schema.min(1, { message: `${field.label} is required` }).refine((v) => v.trim().length > 0, { message: `${field.label} is required` });
|
|
58980
|
+
function requiredConstraints(required) {
|
|
58981
|
+
return required ? [{ kind: "required" }] : [];
|
|
58982
|
+
}
|
|
58983
|
+
function makePlan(kind, valueKind, field, path, required, constraints) {
|
|
58984
|
+
return {
|
|
58985
|
+
kind,
|
|
58986
|
+
valueKind,
|
|
58987
|
+
fieldId: field.id,
|
|
58988
|
+
label: field.label,
|
|
58989
|
+
fieldType: field.type,
|
|
58990
|
+
path,
|
|
58991
|
+
required,
|
|
58992
|
+
constraints
|
|
58993
|
+
};
|
|
58994
|
+
}
|
|
58995
|
+
function withRepeaterItemConstraints(field, constraints) {
|
|
58996
|
+
const next = [...constraints];
|
|
58997
|
+
if (typeof field.minItems === "number") next.push({ kind: "minItems", minimum: field.minItems });
|
|
58998
|
+
if (typeof field.maxItems === "number") next.push({ kind: "maxItems", maximum: field.maxItems });
|
|
58999
|
+
return next;
|
|
59000
|
+
}
|
|
59001
|
+
function deriveRepeatedItemVariants(field, parentPath) {
|
|
59002
|
+
return Object.entries(field.itemTypes ?? {}).map(([typeId, itemType]) => ({
|
|
59003
|
+
typeId,
|
|
59004
|
+
fields: deriveNestedFieldPlans(getFlattenedRepeaterFields(itemType.fields), parentPath)
|
|
59005
|
+
}));
|
|
59006
|
+
}
|
|
59007
|
+
function deriveNestedFieldPlans(fields3, parentPath) {
|
|
59008
|
+
return fields3.map((field) => deriveFieldValidationPlan(field, [...parentPath, field.id]));
|
|
59009
|
+
}
|
|
59010
|
+
function getRepeaterFields(field) {
|
|
59011
|
+
const fields3 = field.polymorphic && field.itemTypes ? Object.values(field.itemTypes).flatMap((itemType) => itemType.fields) : field.schema?.fields ?? [];
|
|
59012
|
+
return getFlattenedRepeaterFields(fields3);
|
|
59013
|
+
}
|
|
59014
|
+
function getFlattenedRepeaterFields(fields3) {
|
|
59015
|
+
return fields3.flatMap((child) => {
|
|
59016
|
+
if (child.type === "group" && child.ui?.flattenInRepeater) {
|
|
59017
|
+
return child.schema?.fields ?? [];
|
|
58988
59018
|
}
|
|
59019
|
+
return child;
|
|
59020
|
+
});
|
|
59021
|
+
}
|
|
59022
|
+
function resolveSelectConstraintSource(field) {
|
|
59023
|
+
const source = normalizeSelectSource(field);
|
|
59024
|
+
switch (source.kind) {
|
|
59025
|
+
case "static":
|
|
59026
|
+
return { kind: "static", values: field.options.map((option) => option.value) };
|
|
59027
|
+
case "site":
|
|
59028
|
+
case "sdk":
|
|
59029
|
+
return { kind: "runtime", source: source.kind };
|
|
59030
|
+
default:
|
|
59031
|
+
return assertNever6(source);
|
|
59032
|
+
}
|
|
59033
|
+
}
|
|
59034
|
+
function normalizeFieldValue(plan, value, ctx) {
|
|
59035
|
+
switch (plan.kind) {
|
|
59036
|
+
case "number":
|
|
59037
|
+
return normalizeNumberInput(value, ctx.allowNull);
|
|
59038
|
+
case "string":
|
|
59039
|
+
return acceptsOptionalBlankAsMissing(plan, value) ? void 0 : value;
|
|
59040
|
+
case "group":
|
|
59041
|
+
return normalizeObjectChildren(plan.children, value, childValidationContext(plan, ctx));
|
|
59042
|
+
case "repeater":
|
|
59043
|
+
return normalizeRepeaterItems(plan, value, ctx);
|
|
59044
|
+
case "boolean":
|
|
59045
|
+
case "richText":
|
|
59046
|
+
case "media":
|
|
59047
|
+
case "link":
|
|
59048
|
+
case "select":
|
|
59049
|
+
case "passthrough":
|
|
59050
|
+
return value;
|
|
59051
|
+
default:
|
|
59052
|
+
return assertNever6(plan);
|
|
58989
59053
|
}
|
|
58990
|
-
return schema;
|
|
58991
59054
|
}
|
|
58992
|
-
function
|
|
58993
|
-
|
|
59055
|
+
function normalizeObjectChildren(children, value, ctx) {
|
|
59056
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return value;
|
|
59057
|
+
const normalized = { ...value };
|
|
59058
|
+
for (const child of children) {
|
|
59059
|
+
normalized[child.fieldId] = normalizeFieldValue(child, normalized[child.fieldId], ctx);
|
|
59060
|
+
}
|
|
59061
|
+
return normalized;
|
|
58994
59062
|
}
|
|
58995
|
-
|
|
58996
|
-
|
|
58997
|
-
|
|
58998
|
-
|
|
58999
|
-
|
|
59000
|
-
|
|
59001
|
-
|
|
59002
|
-
|
|
59003
|
-
|
|
59063
|
+
function normalizeRepeaterItems(plan, value, ctx) {
|
|
59064
|
+
if (!Array.isArray(value)) return value;
|
|
59065
|
+
return value.map((item) => {
|
|
59066
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) return item;
|
|
59067
|
+
const itemRecord = item;
|
|
59068
|
+
const fields3 = plan.repeatedItemVariants ? plan.repeatedItemVariants.find((variant) => variant.typeId === itemRecord._type)?.fields : plan.repeatedItemPlan;
|
|
59069
|
+
if (!fields3) return item;
|
|
59070
|
+
return normalizeObjectChildren(fields3, itemRecord, ctx);
|
|
59071
|
+
});
|
|
59072
|
+
}
|
|
59073
|
+
function normalizeNumberInput(value, allowNull) {
|
|
59074
|
+
if (value === "") return void 0;
|
|
59075
|
+
if (typeof value === "string" && value.trim() !== "") return Number(value);
|
|
59076
|
+
return value;
|
|
59077
|
+
}
|
|
59078
|
+
function acceptsOptionalBlankAsMissing(plan, value) {
|
|
59079
|
+
if (plan.required || typeof value !== "string" || value.trim() !== "") return false;
|
|
59080
|
+
return plan.constraints.some(
|
|
59081
|
+
(constraint) => constraint.kind === "urlFormat" || constraint.kind === "slugFormat" || constraint.kind === "emailFormat" || constraint.kind === "phoneFormat" || constraint.kind === "patternFormat"
|
|
59082
|
+
);
|
|
59083
|
+
}
|
|
59084
|
+
function validateNormalizedFieldValue(plan, value, ctx) {
|
|
59085
|
+
if (value === null && (ctx.allowNull || acceptsOptionalNullValue(plan))) return [];
|
|
59086
|
+
if (isMissingForPlan(plan, value)) {
|
|
59087
|
+
return shouldRequireValue(plan, value, ctx) ? [requiredIssue(plan, value)] : [];
|
|
59004
59088
|
}
|
|
59005
|
-
|
|
59006
|
-
|
|
59089
|
+
switch (plan.kind) {
|
|
59090
|
+
case "string":
|
|
59091
|
+
return validateStringPlan(plan, value);
|
|
59092
|
+
case "number":
|
|
59093
|
+
return validateNumberPlan(plan, value);
|
|
59094
|
+
case "boolean":
|
|
59095
|
+
return typeof value === "boolean" ? [] : [issue(plan, "wrongType", { expected: "a true/false value" })];
|
|
59096
|
+
case "select":
|
|
59097
|
+
return validateSelectPlan(plan, value);
|
|
59098
|
+
case "richText":
|
|
59099
|
+
return isValidRichTextDoc(value) ? [] : [issue(plan, "invalidRichText")];
|
|
59100
|
+
case "media":
|
|
59101
|
+
return isPlainObject2(value) ? [] : [issue(plan, "invalidMedia")];
|
|
59102
|
+
case "link":
|
|
59103
|
+
return linkSchema.safeParse(value).success ? [] : [issue(plan, "invalidLink")];
|
|
59104
|
+
case "repeater":
|
|
59105
|
+
return validateRepeaterPlan(plan, value, ctx);
|
|
59106
|
+
case "group":
|
|
59107
|
+
return validateGroupPlan(plan, value, ctx);
|
|
59108
|
+
case "passthrough":
|
|
59109
|
+
return [];
|
|
59110
|
+
default:
|
|
59111
|
+
return assertNever6(plan);
|
|
59007
59112
|
}
|
|
59008
|
-
return schema;
|
|
59009
59113
|
}
|
|
59010
|
-
|
|
59011
|
-
|
|
59012
|
-
|
|
59013
|
-
|
|
59014
|
-
|
|
59015
|
-
|
|
59016
|
-
|
|
59017
|
-
|
|
59018
|
-
|
|
59019
|
-
|
|
59020
|
-
|
|
59021
|
-
|
|
59022
|
-
|
|
59023
|
-
|
|
59024
|
-
|
|
59025
|
-
|
|
59026
|
-
|
|
59027
|
-
|
|
59028
|
-
|
|
59029
|
-
|
|
59030
|
-
|
|
59031
|
-
|
|
59114
|
+
function shouldRequireValue(plan, value, ctx) {
|
|
59115
|
+
if (!plan.required || ctx.allowIncomplete) return false;
|
|
59116
|
+
if (value === null && ctx.allowNull) return false;
|
|
59117
|
+
return true;
|
|
59118
|
+
}
|
|
59119
|
+
function acceptsOptionalNullValue(plan) {
|
|
59120
|
+
return !plan.required && (plan.kind === "media" || plan.kind === "number");
|
|
59121
|
+
}
|
|
59122
|
+
function isMissingForPlan(plan, value) {
|
|
59123
|
+
if (value === void 0) return true;
|
|
59124
|
+
if (value === null) return plan.required;
|
|
59125
|
+
if (typeof value === "string" && value.trim() === "") return true;
|
|
59126
|
+
if (Array.isArray(value) && value.length === 0) return true;
|
|
59127
|
+
return false;
|
|
59128
|
+
}
|
|
59129
|
+
function validateStringPlan(plan, value) {
|
|
59130
|
+
if (typeof value !== "string") return [issue(plan, "wrongType", { expected: "text" })];
|
|
59131
|
+
return plan.constraints.flatMap((constraint) => validateStringConstraint(plan, constraint, value));
|
|
59132
|
+
}
|
|
59133
|
+
function validateStringConstraint(plan, constraint, value) {
|
|
59134
|
+
switch (constraint.kind) {
|
|
59135
|
+
case "required":
|
|
59136
|
+
case "textType":
|
|
59137
|
+
case "referenceText":
|
|
59138
|
+
return [];
|
|
59139
|
+
case "maxLength":
|
|
59140
|
+
return value.length > constraint.maximum ? [issue(plan, "tooLong", { maximum: constraint.maximum })] : [];
|
|
59141
|
+
case "emailFormat":
|
|
59142
|
+
return z40.email().safeParse(value).success ? [] : [issue(plan, "invalidEmail")];
|
|
59143
|
+
case "phoneFormat":
|
|
59144
|
+
return TEL_RE.test(value) ? [] : [issue(plan, "invalidPhone")];
|
|
59145
|
+
case "patternFormat": {
|
|
59146
|
+
const re = compilePattern(constraint.pattern);
|
|
59147
|
+
return re && !re.test(value) ? [issue(plan, "invalidPattern")] : [];
|
|
59148
|
+
}
|
|
59149
|
+
case "urlFormat":
|
|
59150
|
+
return isValidUrl(value, constraint.allowRelative) ? [] : [issue(plan, "invalidUrl")];
|
|
59151
|
+
case "slugFormat":
|
|
59152
|
+
return SLUG_PATTERN.test(value) ? [] : [issue(plan, "invalidSlug")];
|
|
59153
|
+
default:
|
|
59154
|
+
return assertNever6(constraint);
|
|
59032
59155
|
}
|
|
59033
|
-
return schema;
|
|
59034
59156
|
}
|
|
59035
|
-
|
|
59036
|
-
|
|
59037
|
-
|
|
59038
|
-
routeId: z40.string().min(1),
|
|
59039
|
-
entityId: z40.string().min(1).optional(),
|
|
59040
|
-
entityType: z40.enum(["page", "content"]).optional(),
|
|
59041
|
-
href: nullableString.optional(),
|
|
59042
|
-
title: nullableString.optional(),
|
|
59043
|
-
typeLabel: nullableString.optional(),
|
|
59044
|
-
contentTypeKey: nullableString.optional(),
|
|
59045
|
-
contentTypeName: nullableString.optional(),
|
|
59046
|
-
updatedAt: nullableString.optional()
|
|
59047
|
-
}).passthrough();
|
|
59048
|
-
var externalLinkSchema = z40.object({
|
|
59049
|
-
kind: z40.literal("external"),
|
|
59050
|
-
href: z40.string().min(1)
|
|
59051
|
-
}).passthrough();
|
|
59052
|
-
var customLinkSchema = z40.object({
|
|
59053
|
-
kind: z40.literal("url"),
|
|
59054
|
-
href: z40.string().min(1)
|
|
59055
|
-
}).passthrough();
|
|
59056
|
-
var pageLinkSchema = z40.object({
|
|
59057
|
-
kind: z40.literal("page"),
|
|
59058
|
-
identifier: z40.string().min(1)
|
|
59059
|
-
}).passthrough();
|
|
59060
|
-
var entryLinkSchema = z40.object({
|
|
59061
|
-
kind: z40.literal("entry"),
|
|
59062
|
-
contentType: z40.string().min(1),
|
|
59063
|
-
identifier: z40.string().min(1)
|
|
59064
|
-
}).passthrough();
|
|
59065
|
-
var linkSchema = z40.union([
|
|
59066
|
-
internalLinkSchema,
|
|
59067
|
-
externalLinkSchema,
|
|
59068
|
-
customLinkSchema,
|
|
59069
|
-
pageLinkSchema,
|
|
59070
|
-
entryLinkSchema
|
|
59071
|
-
]);
|
|
59072
|
-
function buildLinkSchema() {
|
|
59073
|
-
return linkSchema;
|
|
59157
|
+
function validateNumberPlan(plan, value) {
|
|
59158
|
+
if (!isValidNumber(value)) return [issue(plan, "invalidNumber")];
|
|
59159
|
+
return plan.constraints.flatMap((constraint) => validateNumberConstraint(plan, constraint, Number(value)));
|
|
59074
59160
|
}
|
|
59075
|
-
function
|
|
59076
|
-
|
|
59161
|
+
function validateNumberConstraint(plan, constraint, value) {
|
|
59162
|
+
switch (constraint.kind) {
|
|
59163
|
+
case "required":
|
|
59164
|
+
case "numberType":
|
|
59165
|
+
return [];
|
|
59166
|
+
case "numberMin":
|
|
59167
|
+
return value < constraint.minimum ? [issue(plan, "tooSmall", { minimum: constraint.minimum })] : [];
|
|
59168
|
+
case "numberMax":
|
|
59169
|
+
return value > constraint.maximum ? [issue(plan, "tooLarge", { maximum: constraint.maximum })] : [];
|
|
59170
|
+
default:
|
|
59171
|
+
return assertNever6(constraint);
|
|
59172
|
+
}
|
|
59077
59173
|
}
|
|
59078
|
-
function
|
|
59079
|
-
const
|
|
59080
|
-
|
|
59081
|
-
|
|
59082
|
-
|
|
59083
|
-
|
|
59084
|
-
|
|
59085
|
-
|
|
59086
|
-
|
|
59087
|
-
|
|
59088
|
-
|
|
59089
|
-
|
|
59090
|
-
|
|
59091
|
-
|
|
59174
|
+
function validateSelectPlan(plan, value) {
|
|
59175
|
+
const constraint = plan.constraints.find((candidate) => candidate.kind === "selectOption");
|
|
59176
|
+
if (!constraint || constraint.source.kind === "runtime") return [];
|
|
59177
|
+
return isValidSelectValue(value, constraint.source.values, constraint.multiple) ? [] : [issue(plan, "invalidOption")];
|
|
59178
|
+
}
|
|
59179
|
+
function validateRepeaterPlan(plan, value, ctx) {
|
|
59180
|
+
if (!Array.isArray(value)) return [issue(plan, "wrongType", { expected: "a list" })];
|
|
59181
|
+
const constraintIssues = plan.constraints.flatMap((constraint) => {
|
|
59182
|
+
switch (constraint.kind) {
|
|
59183
|
+
case "required":
|
|
59184
|
+
case "arrayType":
|
|
59185
|
+
return [];
|
|
59186
|
+
case "minItems":
|
|
59187
|
+
return value.length < constraint.minimum ? [issue(plan, "tooFewItems", { minimum: constraint.minimum, itemLabel: "item" })] : [];
|
|
59188
|
+
case "maxItems":
|
|
59189
|
+
return value.length > constraint.maximum ? [issue(plan, "tooManyItems", { maximum: constraint.maximum, itemLabel: "item" })] : [];
|
|
59092
59190
|
default:
|
|
59093
|
-
return
|
|
59191
|
+
return assertNever6(constraint);
|
|
59094
59192
|
}
|
|
59095
|
-
})
|
|
59096
|
-
|
|
59097
|
-
|
|
59098
|
-
|
|
59099
|
-
|
|
59100
|
-
return field.required ? singleValueSchema : singleValueSchema.nullable();
|
|
59193
|
+
});
|
|
59194
|
+
return [
|
|
59195
|
+
...constraintIssues,
|
|
59196
|
+
...value.flatMap((item, index) => validateRepeaterItem(plan, item, index, ctx))
|
|
59197
|
+
];
|
|
59101
59198
|
}
|
|
59102
|
-
function
|
|
59103
|
-
|
|
59104
|
-
|
|
59199
|
+
function validateRepeaterItem(plan, item, index, ctx) {
|
|
59200
|
+
if (!isPlainObject2(item)) return [];
|
|
59201
|
+
const itemType = item._type;
|
|
59202
|
+
const fields3 = plan.repeatedItemVariants ? plan.repeatedItemVariants.find((variant) => variant.typeId === itemType)?.fields : plan.repeatedItemPlan;
|
|
59203
|
+
if (!fields3) return [];
|
|
59204
|
+
return fields3.flatMap((childPlan) => {
|
|
59205
|
+
const indexedPlan = withIndexedPath(childPlan, plan.path, index);
|
|
59206
|
+
return validateNormalizedFieldValue(indexedPlan, item[childPlan.fieldId], ctx);
|
|
59105
59207
|
});
|
|
59106
|
-
if (field.required) {
|
|
59107
|
-
schema = schema.min(1, { message: `${field.label} is required` });
|
|
59108
|
-
}
|
|
59109
|
-
return schema;
|
|
59110
59208
|
}
|
|
59111
|
-
function
|
|
59112
|
-
|
|
59113
|
-
const
|
|
59114
|
-
|
|
59115
|
-
|
|
59116
|
-
|
|
59117
|
-
|
|
59118
|
-
|
|
59119
|
-
|
|
59120
|
-
|
|
59121
|
-
|
|
59209
|
+
function validateGroupPlan(plan, value, ctx) {
|
|
59210
|
+
if (!isPlainObject2(value)) return [issue(plan, "wrongType", { expected: "an object" })];
|
|
59211
|
+
const childCtx = childValidationContext(plan, ctx);
|
|
59212
|
+
return plan.children.flatMap((childPlan) => validateNormalizedFieldValue(childPlan, value[childPlan.fieldId], childCtx));
|
|
59213
|
+
}
|
|
59214
|
+
function childValidationContext(plan, ctx) {
|
|
59215
|
+
return plan.allowNullChildren ? { ...ctx, allowNull: true } : ctx;
|
|
59216
|
+
}
|
|
59217
|
+
function withIndexedPath(plan, parentPath, index) {
|
|
59218
|
+
const suffix = plan.path.slice(parentPath.length + 1);
|
|
59219
|
+
return {
|
|
59220
|
+
...plan,
|
|
59221
|
+
path: [...parentPath, index, plan.fieldId, ...suffix]
|
|
59222
|
+
};
|
|
59223
|
+
}
|
|
59224
|
+
function issue(plan, kind, extra) {
|
|
59225
|
+
return {
|
|
59226
|
+
kind,
|
|
59227
|
+
path: plan.path,
|
|
59228
|
+
fieldId: plan.fieldId,
|
|
59229
|
+
label: plan.label,
|
|
59230
|
+
...extra ?? {}
|
|
59231
|
+
};
|
|
59232
|
+
}
|
|
59233
|
+
function requiredIssue(plan, value) {
|
|
59234
|
+
if (typeof value === "string") return issue(plan, "required", { emptyOrigin: "string" });
|
|
59235
|
+
if (Array.isArray(value)) return issue(plan, "required", { emptyOrigin: "array" });
|
|
59236
|
+
return issue(plan, "required");
|
|
59237
|
+
}
|
|
59238
|
+
function fieldPlanToZod(plan, options = {}) {
|
|
59239
|
+
const ctx = validationContext(options);
|
|
59240
|
+
return z40.any().transform((value) => normalizeFieldValue(plan, value, ctx)).superRefine((value, zodCtx) => {
|
|
59241
|
+
for (const validationIssue of validateNormalizedFieldValue(plan, value, ctx)) {
|
|
59242
|
+
addFieldIssueToZodContext(zodCtx, validationIssue);
|
|
59122
59243
|
}
|
|
59244
|
+
});
|
|
59245
|
+
}
|
|
59246
|
+
function addFieldIssueToZodContext(zodCtx, validationIssue) {
|
|
59247
|
+
const message = fieldIssueToMessage(validationIssue);
|
|
59248
|
+
switch (validationIssue.kind) {
|
|
59249
|
+
case "required":
|
|
59250
|
+
if (validationIssue.emptyOrigin) {
|
|
59251
|
+
zodCtx.addIssue({
|
|
59252
|
+
code: "too_small",
|
|
59253
|
+
origin: validationIssue.emptyOrigin,
|
|
59254
|
+
minimum: 1,
|
|
59255
|
+
inclusive: true,
|
|
59256
|
+
message
|
|
59257
|
+
});
|
|
59258
|
+
return;
|
|
59259
|
+
}
|
|
59260
|
+
zodCtx.addIssue({ code: "invalid_type", expected: "nonoptional", message });
|
|
59261
|
+
return;
|
|
59262
|
+
case "tooLong":
|
|
59263
|
+
zodCtx.addIssue({
|
|
59264
|
+
code: "too_big",
|
|
59265
|
+
origin: "string",
|
|
59266
|
+
maximum: validationIssue.maximum,
|
|
59267
|
+
inclusive: true,
|
|
59268
|
+
message
|
|
59269
|
+
});
|
|
59270
|
+
return;
|
|
59271
|
+
case "invalidOption":
|
|
59272
|
+
zodCtx.addIssue({ code: "invalid_value", values: [], message });
|
|
59273
|
+
return;
|
|
59274
|
+
case "wrongType":
|
|
59275
|
+
case "invalidEmail":
|
|
59276
|
+
case "invalidPhone":
|
|
59277
|
+
case "invalidPattern":
|
|
59278
|
+
case "invalidUrl":
|
|
59279
|
+
case "invalidNumber":
|
|
59280
|
+
case "tooSmall":
|
|
59281
|
+
case "tooLarge":
|
|
59282
|
+
case "invalidSlug":
|
|
59283
|
+
case "tooFewItems":
|
|
59284
|
+
case "tooManyItems":
|
|
59285
|
+
case "invalidRichText":
|
|
59286
|
+
case "invalidMedia":
|
|
59287
|
+
case "invalidLink":
|
|
59288
|
+
case "invalidReference":
|
|
59289
|
+
zodCtx.addIssue({ code: "custom", message });
|
|
59290
|
+
return;
|
|
59291
|
+
default:
|
|
59292
|
+
assertNever6(validationIssue);
|
|
59123
59293
|
}
|
|
59124
|
-
|
|
59125
|
-
|
|
59126
|
-
|
|
59127
|
-
|
|
59294
|
+
}
|
|
59295
|
+
function compilePattern(pattern) {
|
|
59296
|
+
try {
|
|
59297
|
+
return new RegExp(pattern);
|
|
59298
|
+
} catch {
|
|
59299
|
+
return null;
|
|
59128
59300
|
}
|
|
59129
|
-
|
|
59130
|
-
|
|
59301
|
+
}
|
|
59302
|
+
function isValidNumber(value) {
|
|
59303
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
59304
|
+
}
|
|
59305
|
+
function isValidUrl(value, allowRelative) {
|
|
59306
|
+
if (!value) return false;
|
|
59307
|
+
if (allowRelative && value.startsWith("/")) return true;
|
|
59308
|
+
try {
|
|
59309
|
+
const parsed = new URL(value);
|
|
59310
|
+
return ALLOWED_URL_PROTOCOLS.includes(parsed.protocol);
|
|
59311
|
+
} catch {
|
|
59312
|
+
return false;
|
|
59131
59313
|
}
|
|
59132
|
-
return arraySchema;
|
|
59133
59314
|
}
|
|
59134
|
-
function
|
|
59135
|
-
|
|
59136
|
-
|
|
59137
|
-
for (const child of parsed) {
|
|
59138
|
-
childShape[child.id] = buildFieldSchema(child, allowNull, allowIncomplete);
|
|
59315
|
+
function isValidSelectValue(value, values, multiple) {
|
|
59316
|
+
if (multiple) {
|
|
59317
|
+
return Array.isArray(value) && value.every((item) => typeof item === "string" && values.includes(item));
|
|
59139
59318
|
}
|
|
59140
|
-
return
|
|
59319
|
+
return typeof value === "string" && values.includes(value);
|
|
59141
59320
|
}
|
|
59142
|
-
function
|
|
59143
|
-
if (
|
|
59144
|
-
|
|
59145
|
-
|
|
59146
|
-
|
|
59147
|
-
|
|
59321
|
+
function isEmptyValue(value) {
|
|
59322
|
+
if (value === null || value === void 0) return true;
|
|
59323
|
+
if (typeof value === "string" && value.trim() === "") return true;
|
|
59324
|
+
if (Array.isArray(value) && value.length === 0) return true;
|
|
59325
|
+
if (isEmptyRichTextDoc(value)) return true;
|
|
59326
|
+
return false;
|
|
59327
|
+
}
|
|
59328
|
+
function isPlainObject2(value) {
|
|
59329
|
+
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
59330
|
+
}
|
|
59331
|
+
function isValidRichTextDoc(value) {
|
|
59332
|
+
const doc = richTextDoc(value);
|
|
59333
|
+
return Boolean(isPlainObject2(doc) && doc.type === "doc");
|
|
59334
|
+
}
|
|
59335
|
+
function isEmptyRichTextDoc(value) {
|
|
59336
|
+
const doc = richTextDoc(value);
|
|
59337
|
+
if (!isPlainObject2(doc)) return false;
|
|
59338
|
+
if (doc.type !== "doc") return false;
|
|
59339
|
+
const content = doc.content;
|
|
59340
|
+
if (!Array.isArray(content) || content.length === 0) return true;
|
|
59341
|
+
if (content.length !== 1) return false;
|
|
59342
|
+
const first = content[0];
|
|
59343
|
+
return first?.type === "paragraph" && (!Array.isArray(first.content) || first.content.length === 0);
|
|
59344
|
+
}
|
|
59345
|
+
function richTextDoc(value) {
|
|
59346
|
+
if (!isPlainObject2(value)) return value;
|
|
59347
|
+
return isPlainObject2(value.doc) ? value.doc : value;
|
|
59348
|
+
}
|
|
59349
|
+
|
|
59350
|
+
// ../blocks/src/system/manifest/registry.ts
|
|
59351
|
+
var REGISTRY_SYMBOL = /* @__PURE__ */ Symbol.for("@riverbankcms/blocks/manifest-registry");
|
|
59352
|
+
var isVitest = typeof process !== "undefined" && typeof process.env !== "undefined" && process.env.VITEST === "true";
|
|
59353
|
+
var globalScope = globalThis;
|
|
59354
|
+
var manifestStore = isVitest ? /* @__PURE__ */ new Map() : globalScope[REGISTRY_SYMBOL] ?? (globalScope[REGISTRY_SYMBOL] = /* @__PURE__ */ new Map());
|
|
59355
|
+
function registerManifest(manifest) {
|
|
59356
|
+
manifestStore.set(manifest.name, manifest);
|
|
59357
|
+
return manifest;
|
|
59358
|
+
}
|
|
59359
|
+
|
|
59360
|
+
// ../blocks/src/system/manifest/validation.ts
|
|
59361
|
+
import { z as z41 } from "zod";
|
|
59362
|
+
function preprocessEmptyValues(content) {
|
|
59363
|
+
if (!content || typeof content !== "object" || Array.isArray(content)) {
|
|
59364
|
+
return {};
|
|
59365
|
+
}
|
|
59366
|
+
const result = {};
|
|
59367
|
+
for (const [key, value] of Object.entries(content)) {
|
|
59368
|
+
result[key] = isEmptyValue(value) ? void 0 : value;
|
|
59369
|
+
}
|
|
59370
|
+
return result;
|
|
59371
|
+
}
|
|
59372
|
+
function createManifestValidator(manifestOrFields, options = {}) {
|
|
59373
|
+
const isDraft = options.mode === "draft";
|
|
59374
|
+
const shape = {};
|
|
59375
|
+
const fields3 = Array.isArray(manifestOrFields) ? manifestOrFields : manifestOrFields.fields ?? [];
|
|
59376
|
+
for (const field of fields3) {
|
|
59377
|
+
shape[field.id] = buildFieldSchema(field, options);
|
|
59378
|
+
}
|
|
59379
|
+
const baseSchema = z41.object(shape).catchall(z41.unknown()).passthrough();
|
|
59380
|
+
if (isDraft) {
|
|
59381
|
+
return z41.preprocess(preprocessEmptyValues, baseSchema);
|
|
59148
59382
|
}
|
|
59149
|
-
return
|
|
59383
|
+
return baseSchema;
|
|
59384
|
+
}
|
|
59385
|
+
function buildFieldSchema(field, options) {
|
|
59386
|
+
return fieldPlanToZod(deriveFieldValidationPlan(field), options);
|
|
59150
59387
|
}
|
|
59151
59388
|
|
|
59152
59389
|
// ../blocks/src/system/manifest/variantKey.ts
|
|
@@ -59484,51 +59721,51 @@ init_personalities();
|
|
|
59484
59721
|
|
|
59485
59722
|
// ../theme-core/src/palette/variants/types.ts
|
|
59486
59723
|
init_styleTags();
|
|
59487
|
-
import { z as
|
|
59724
|
+
import { z as z46 } from "zod";
|
|
59488
59725
|
|
|
59489
59726
|
// ../theme-core/src/schema.ts
|
|
59490
|
-
import { z as
|
|
59727
|
+
import { z as z45 } from "zod";
|
|
59491
59728
|
|
|
59492
59729
|
// ../theme-core/src/lib/media.ts
|
|
59493
|
-
import
|
|
59494
|
-
var hotspotSchema2 =
|
|
59495
|
-
x:
|
|
59496
|
-
y:
|
|
59497
|
-
radius:
|
|
59498
|
-
});
|
|
59499
|
-
var rotationSchema2 =
|
|
59500
|
-
var rectSchema2 =
|
|
59501
|
-
var aspectCropSchema2 =
|
|
59502
|
-
aspect:
|
|
59503
|
-
rect:
|
|
59504
|
-
hotspot:
|
|
59505
|
-
rotation:
|
|
59506
|
-
});
|
|
59507
|
-
var transformSchema2 =
|
|
59508
|
-
aspectCrops:
|
|
59730
|
+
import z42 from "zod";
|
|
59731
|
+
var hotspotSchema2 = z42.object({
|
|
59732
|
+
x: z42.number().min(0).max(1),
|
|
59733
|
+
y: z42.number().min(0).max(1),
|
|
59734
|
+
radius: z42.number().optional()
|
|
59735
|
+
});
|
|
59736
|
+
var rotationSchema2 = z42.union([z42.literal(0), z42.literal(90), z42.literal(180), z42.literal(270)]);
|
|
59737
|
+
var rectSchema2 = z42.tuple([z42.number(), z42.number(), z42.number(), z42.number()]);
|
|
59738
|
+
var aspectCropSchema2 = z42.object({
|
|
59739
|
+
aspect: z42.preprocess((value) => value == null ? void 0 : value, z42.string().optional()),
|
|
59740
|
+
rect: z42.preprocess((value) => value == null ? void 0 : value, rectSchema2.optional()),
|
|
59741
|
+
hotspot: z42.preprocess((value) => value == null ? void 0 : value, hotspotSchema2.optional()),
|
|
59742
|
+
rotation: z42.preprocess((value) => value == null ? void 0 : value, rotationSchema2.optional())
|
|
59743
|
+
});
|
|
59744
|
+
var transformSchema2 = z42.object({
|
|
59745
|
+
aspectCrops: z42.preprocess((value) => {
|
|
59509
59746
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
59510
59747
|
return void 0;
|
|
59511
59748
|
}
|
|
59512
59749
|
return value;
|
|
59513
|
-
},
|
|
59750
|
+
}, z42.record(z42.string(), aspectCropSchema2.catch({}))).optional(),
|
|
59514
59751
|
rect: rectSchema2.optional(),
|
|
59515
59752
|
hotspot: hotspotSchema2.optional(),
|
|
59516
59753
|
rotation: rotationSchema2.optional()
|
|
59517
59754
|
});
|
|
59518
|
-
var mediaSchema2 =
|
|
59519
|
-
type:
|
|
59520
|
-
purpose:
|
|
59521
|
-
placeholder:
|
|
59522
|
-
assetId:
|
|
59523
|
-
identifier:
|
|
59524
|
-
src:
|
|
59525
|
-
alt:
|
|
59526
|
-
filename:
|
|
59527
|
-
mimeType:
|
|
59528
|
-
width:
|
|
59529
|
-
height:
|
|
59530
|
-
storageBucket:
|
|
59531
|
-
storagePath:
|
|
59755
|
+
var mediaSchema2 = z42.object({
|
|
59756
|
+
type: z42.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
|
|
59757
|
+
purpose: z42.string().optional(),
|
|
59758
|
+
placeholder: z42.boolean().default(true).optional(),
|
|
59759
|
+
assetId: z42.string().optional(),
|
|
59760
|
+
identifier: z42.string().optional(),
|
|
59761
|
+
src: z42.string().optional(),
|
|
59762
|
+
alt: z42.string().optional(),
|
|
59763
|
+
filename: z42.string().optional(),
|
|
59764
|
+
mimeType: z42.string().optional(),
|
|
59765
|
+
width: z42.number().optional(),
|
|
59766
|
+
height: z42.number().optional(),
|
|
59767
|
+
storageBucket: z42.string().optional(),
|
|
59768
|
+
storagePath: z42.string().optional(),
|
|
59532
59769
|
transform: transformSchema2.optional()
|
|
59533
59770
|
});
|
|
59534
59771
|
|
|
@@ -59536,43 +59773,43 @@ var mediaSchema2 = z41.object({
|
|
|
59536
59773
|
init_buttons();
|
|
59537
59774
|
|
|
59538
59775
|
// ../theme-core/src/cards/types.ts
|
|
59539
|
-
import { z as
|
|
59540
|
-
var cardSpacingSchema =
|
|
59541
|
-
var gradientDirectionSchema2 =
|
|
59542
|
-
var cardBackgroundSchema =
|
|
59543
|
-
|
|
59544
|
-
|
|
59545
|
-
type:
|
|
59546
|
-
fromToken:
|
|
59547
|
-
toToken:
|
|
59776
|
+
import { z as z43 } from "zod";
|
|
59777
|
+
var cardSpacingSchema = z43.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
|
|
59778
|
+
var gradientDirectionSchema2 = z43.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
|
|
59779
|
+
var cardBackgroundSchema = z43.discriminatedUnion("type", [
|
|
59780
|
+
z43.object({ type: z43.literal("solid"), colorToken: z43.string() }),
|
|
59781
|
+
z43.object({
|
|
59782
|
+
type: z43.literal("gradient"),
|
|
59783
|
+
fromToken: z43.string(),
|
|
59784
|
+
toToken: z43.string(),
|
|
59548
59785
|
direction: gradientDirectionSchema2
|
|
59549
59786
|
}),
|
|
59550
|
-
|
|
59787
|
+
z43.object({ type: z43.literal("transparent") })
|
|
59551
59788
|
]);
|
|
59552
|
-
var cardBorderSchema =
|
|
59553
|
-
widthClass:
|
|
59554
|
-
colorToken:
|
|
59555
|
-
});
|
|
59556
|
-
var cardVariantSchema2 =
|
|
59557
|
-
id:
|
|
59558
|
-
name:
|
|
59559
|
-
enabled:
|
|
59560
|
-
priority:
|
|
59789
|
+
var cardBorderSchema = z43.object({
|
|
59790
|
+
widthClass: z43.string(),
|
|
59791
|
+
colorToken: z43.string()
|
|
59792
|
+
});
|
|
59793
|
+
var cardVariantSchema2 = z43.object({
|
|
59794
|
+
id: z43.string(),
|
|
59795
|
+
name: z43.string().min(1).max(20),
|
|
59796
|
+
enabled: z43.boolean(),
|
|
59797
|
+
priority: z43.union([z43.literal(1), z43.literal(2), z43.literal(3)]),
|
|
59561
59798
|
// Appearance (token-based)
|
|
59562
59799
|
background: cardBackgroundSchema,
|
|
59563
59800
|
spacing: cardSpacingSchema,
|
|
59564
59801
|
// Optional overrides (uses theme defaults if not specified)
|
|
59565
|
-
shadow:
|
|
59566
|
-
elevation:
|
|
59567
|
-
softness:
|
|
59568
|
-
position:
|
|
59802
|
+
shadow: z43.object({
|
|
59803
|
+
elevation: z43.enum(["none", "low", "medium", "high"]),
|
|
59804
|
+
softness: z43.enum(["crisp", "soft", "hard"]).nullable(),
|
|
59805
|
+
position: z43.enum(["bottom", "bottom-right"]).default("bottom")
|
|
59569
59806
|
}).optional(),
|
|
59570
|
-
corners:
|
|
59807
|
+
corners: z43.enum(["square", "soft", "rounded", "pill"]).optional(),
|
|
59571
59808
|
// Border (optional)
|
|
59572
59809
|
border: cardBorderSchema.optional()
|
|
59573
59810
|
});
|
|
59574
|
-
var cardSystemSchema =
|
|
59575
|
-
variants:
|
|
59811
|
+
var cardSystemSchema = z43.object({
|
|
59812
|
+
variants: z43.array(cardVariantSchema2).min(1).max(3)
|
|
59576
59813
|
});
|
|
59577
59814
|
|
|
59578
59815
|
// ../theme-core/src/cards/index.ts
|
|
@@ -59585,20 +59822,20 @@ init_types5();
|
|
|
59585
59822
|
init_types12();
|
|
59586
59823
|
|
|
59587
59824
|
// ../theme-core/src/gradients/types.ts
|
|
59588
|
-
import { z as
|
|
59589
|
-
var gradientStopSchema =
|
|
59590
|
-
color:
|
|
59825
|
+
import { z as z44 } from "zod";
|
|
59826
|
+
var gradientStopSchema = z44.object({
|
|
59827
|
+
color: z44.string(),
|
|
59591
59828
|
// Theme color token name (e.g., 'primary-500')
|
|
59592
|
-
position:
|
|
59829
|
+
position: z44.number().min(0).max(100)
|
|
59593
59830
|
// Percentage 0-100
|
|
59594
59831
|
});
|
|
59595
|
-
var gradientConfigSchema =
|
|
59596
|
-
type:
|
|
59597
|
-
angle:
|
|
59832
|
+
var gradientConfigSchema = z44.object({
|
|
59833
|
+
type: z44.enum(["linear", "radial"]),
|
|
59834
|
+
angle: z44.number().min(0).max(360).optional(),
|
|
59598
59835
|
// For linear gradients (degrees)
|
|
59599
|
-
position:
|
|
59836
|
+
position: z44.string().optional(),
|
|
59600
59837
|
// For radial gradients ('center', 'top left', etc.)
|
|
59601
|
-
stops:
|
|
59838
|
+
stops: z44.array(gradientStopSchema).min(2)
|
|
59602
59839
|
});
|
|
59603
59840
|
|
|
59604
59841
|
// ../theme-core/src/schema.ts
|
|
@@ -59606,65 +59843,65 @@ init_types13();
|
|
|
59606
59843
|
init_validation3();
|
|
59607
59844
|
init_atRuleValidation();
|
|
59608
59845
|
init_shared7();
|
|
59609
|
-
var axesSchema =
|
|
59610
|
-
tone:
|
|
59611
|
-
energy:
|
|
59612
|
-
density:
|
|
59613
|
-
mediaBias:
|
|
59614
|
-
conversionBias:
|
|
59615
|
-
motion:
|
|
59616
|
-
});
|
|
59617
|
-
var colourHexString =
|
|
59618
|
-
var paletteColorSchema =
|
|
59619
|
-
name:
|
|
59846
|
+
var axesSchema = z45.object({
|
|
59847
|
+
tone: z45.enum(["minimal", "classic", "bold"]),
|
|
59848
|
+
energy: z45.enum(["calm", "vibrant"]),
|
|
59849
|
+
density: z45.enum(["airy", "regular", "compact"]),
|
|
59850
|
+
mediaBias: z45.enum(["text", "media", "mixed"]),
|
|
59851
|
+
conversionBias: z45.enum(["low", "med", "high"]),
|
|
59852
|
+
motion: z45.enum(["subtle", "standard", "expressive"])
|
|
59853
|
+
});
|
|
59854
|
+
var colourHexString = z45.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
|
|
59855
|
+
var paletteColorSchema = z45.object({
|
|
59856
|
+
name: z45.string().min(1),
|
|
59620
59857
|
hex: colourHexString
|
|
59621
59858
|
});
|
|
59622
|
-
var paletteMetaSchema =
|
|
59623
|
-
mode:
|
|
59859
|
+
var paletteMetaSchema = z45.object({
|
|
59860
|
+
mode: z45.enum(["light", "dark"])
|
|
59624
59861
|
});
|
|
59625
|
-
var paletteSchema =
|
|
59626
|
-
colors:
|
|
59862
|
+
var paletteSchema = z45.object({
|
|
59863
|
+
colors: z45.array(paletteColorSchema),
|
|
59627
59864
|
meta: paletteMetaSchema
|
|
59628
59865
|
});
|
|
59629
|
-
var typographyStyleSchema =
|
|
59630
|
-
family:
|
|
59631
|
-
weight:
|
|
59632
|
-
letterSpacing:
|
|
59633
|
-
lineHeight:
|
|
59866
|
+
var typographyStyleSchema = z45.object({
|
|
59867
|
+
family: z45.string().min(1),
|
|
59868
|
+
weight: z45.enum(["light", "regular", "medium", "semibold", "bold"]),
|
|
59869
|
+
letterSpacing: z45.enum(["tight", "normal", "loose"]),
|
|
59870
|
+
lineHeight: z45.enum(["normal", "relaxed", "loose"])
|
|
59634
59871
|
});
|
|
59635
59872
|
var bodyTypographyStyleSchema = typographyStyleSchema.extend({
|
|
59636
|
-
size:
|
|
59873
|
+
size: z45.enum(["md", "lg", "xl"])
|
|
59637
59874
|
});
|
|
59638
|
-
var headingSizeSchema =
|
|
59639
|
-
var headingTypographyOverridesSchema =
|
|
59640
|
-
weight:
|
|
59641
|
-
letterSpacing:
|
|
59875
|
+
var headingSizeSchema = z45.enum(["xs", "sm", "md", "lg", "xl", "2xl"]);
|
|
59876
|
+
var headingTypographyOverridesSchema = z45.object({
|
|
59877
|
+
weight: z45.enum(["light", "regular", "medium", "semibold", "bold"]).nullable().optional(),
|
|
59878
|
+
letterSpacing: z45.enum(["tight", "normal", "loose"]).nullable().optional(),
|
|
59642
59879
|
size: headingSizeSchema.nullable().optional(),
|
|
59643
|
-
lineHeight:
|
|
59644
|
-
italic:
|
|
59645
|
-
colorToken:
|
|
59880
|
+
lineHeight: z45.enum(["normal", "relaxed", "loose"]).nullable().optional(),
|
|
59881
|
+
italic: z45.boolean().nullable().optional(),
|
|
59882
|
+
colorToken: z45.string().min(1).nullable().optional()
|
|
59646
59883
|
// Palette token name for heading color
|
|
59647
59884
|
});
|
|
59648
59885
|
var headingTypographyStyleSchema = typographyStyleSchema.extend({
|
|
59649
|
-
case:
|
|
59650
|
-
italic:
|
|
59651
|
-
colorToken:
|
|
59886
|
+
case: z45.enum(["uppercase", "normal", "smallCaps"]).nullable(),
|
|
59887
|
+
italic: z45.boolean().nullable(),
|
|
59888
|
+
colorToken: z45.string().min(1).nullable().optional()
|
|
59652
59889
|
// Palette token name for heading color
|
|
59653
59890
|
});
|
|
59654
|
-
var proseLinkUnderlineStyleSchema =
|
|
59655
|
-
var proseLinkUnderlineThicknessSchema =
|
|
59656
|
-
var proseLinkUnderlineOffsetSchema =
|
|
59657
|
-
var proseLinkStyleSchema =
|
|
59658
|
-
colorToken:
|
|
59659
|
-
hoverColorToken:
|
|
59660
|
-
underline:
|
|
59661
|
-
decorationColorToken:
|
|
59662
|
-
hoverDecorationColorToken:
|
|
59891
|
+
var proseLinkUnderlineStyleSchema = z45.enum(["solid", "dotted", "dashed"]);
|
|
59892
|
+
var proseLinkUnderlineThicknessSchema = z45.enum(["auto", "fromFont", "thin", "medium", "thick"]);
|
|
59893
|
+
var proseLinkUnderlineOffsetSchema = z45.enum(["auto", "tight", "normal", "loose"]);
|
|
59894
|
+
var proseLinkStyleSchema = z45.object({
|
|
59895
|
+
colorToken: z45.string().min(1).optional(),
|
|
59896
|
+
hoverColorToken: z45.string().min(1).optional(),
|
|
59897
|
+
underline: z45.boolean().optional(),
|
|
59898
|
+
decorationColorToken: z45.string().min(1).optional(),
|
|
59899
|
+
hoverDecorationColorToken: z45.string().min(1).optional(),
|
|
59663
59900
|
underlineStyle: proseLinkUnderlineStyleSchema.optional(),
|
|
59664
59901
|
underlineThickness: proseLinkUnderlineThicknessSchema.optional(),
|
|
59665
59902
|
underlineOffset: proseLinkUnderlineOffsetSchema.optional()
|
|
59666
59903
|
});
|
|
59667
|
-
var semanticSpacingSchema =
|
|
59904
|
+
var semanticSpacingSchema = z45.enum([
|
|
59668
59905
|
"none",
|
|
59669
59906
|
"compact",
|
|
59670
59907
|
"cozy",
|
|
@@ -59672,62 +59909,62 @@ var semanticSpacingSchema = z44.enum([
|
|
|
59672
59909
|
"comfortable",
|
|
59673
59910
|
"spacious"
|
|
59674
59911
|
]);
|
|
59675
|
-
var boxRoundedSchema =
|
|
59676
|
-
var boxBackgroundOverlaySchema =
|
|
59677
|
-
type:
|
|
59678
|
-
color:
|
|
59679
|
-
gradient:
|
|
59680
|
-
opacity:
|
|
59681
|
-
});
|
|
59682
|
-
var boxBackgroundSchema =
|
|
59683
|
-
type:
|
|
59684
|
-
color:
|
|
59685
|
-
gradient:
|
|
59912
|
+
var boxRoundedSchema = z45.enum(["none", "sm", "md", "lg", "xl", "2xl", "full"]);
|
|
59913
|
+
var boxBackgroundOverlaySchema = z45.object({
|
|
59914
|
+
type: z45.enum(["none", "color", "gradient"]).nullable().optional(),
|
|
59915
|
+
color: z45.string().nullable().optional(),
|
|
59916
|
+
gradient: z45.string().nullable().optional(),
|
|
59917
|
+
opacity: z45.number().min(0).max(1).nullable().optional()
|
|
59918
|
+
});
|
|
59919
|
+
var boxBackgroundSchema = z45.object({
|
|
59920
|
+
type: z45.enum(["color", "gradient", "image"]).optional(),
|
|
59921
|
+
color: z45.string().nullable().optional(),
|
|
59922
|
+
gradient: z45.string().nullable().optional(),
|
|
59686
59923
|
image: mediaSchema2.nullable().optional(),
|
|
59687
|
-
objectFit:
|
|
59688
|
-
scale:
|
|
59689
|
-
position:
|
|
59690
|
-
opacity:
|
|
59924
|
+
objectFit: z45.enum(["fill", "fit", "original", "custom"]).nullable().optional(),
|
|
59925
|
+
scale: z45.string().nullable().optional(),
|
|
59926
|
+
position: z45.string().nullable().optional(),
|
|
59927
|
+
opacity: z45.number().min(0).max(1).nullable().optional(),
|
|
59691
59928
|
overlay: boxBackgroundOverlaySchema.nullable().optional(),
|
|
59692
|
-
textColor:
|
|
59693
|
-
headingColor:
|
|
59929
|
+
textColor: z45.string().nullable().optional(),
|
|
59930
|
+
headingColor: z45.string().nullable().optional()
|
|
59694
59931
|
});
|
|
59695
|
-
var sectionStylesOverrideSchema =
|
|
59932
|
+
var sectionStylesOverrideSchema = z45.object({
|
|
59696
59933
|
background: boxBackgroundSchema.nullable().optional(),
|
|
59697
59934
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
59698
|
-
minHeight:
|
|
59935
|
+
minHeight: z45.enum(["none", "hero", "immersive"]).nullable().optional()
|
|
59699
59936
|
});
|
|
59700
|
-
var containerStylesOverrideSchema =
|
|
59937
|
+
var containerStylesOverrideSchema = z45.object({
|
|
59701
59938
|
background: boxBackgroundSchema.nullable().optional(),
|
|
59702
59939
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
59703
|
-
raised:
|
|
59940
|
+
raised: z45.boolean().nullable().optional(),
|
|
59704
59941
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
59705
|
-
fullWidth:
|
|
59942
|
+
fullWidth: z45.boolean().nullable().optional()
|
|
59706
59943
|
});
|
|
59707
|
-
var cardBorderOverrideSchema =
|
|
59708
|
-
enabled:
|
|
59709
|
-
width:
|
|
59710
|
-
colorToken:
|
|
59944
|
+
var cardBorderOverrideSchema = z45.object({
|
|
59945
|
+
enabled: z45.boolean().nullable().optional(),
|
|
59946
|
+
width: z45.enum(["none", "1", "2", "3"]).nullable().optional(),
|
|
59947
|
+
colorToken: z45.string().nullable().optional()
|
|
59711
59948
|
});
|
|
59712
|
-
var cardStylesOverrideSchema =
|
|
59949
|
+
var cardStylesOverrideSchema = z45.object({
|
|
59713
59950
|
background: boxBackgroundSchema.nullable().optional(),
|
|
59714
59951
|
border: cardBorderOverrideSchema.nullable().optional(),
|
|
59715
59952
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
59716
|
-
raised:
|
|
59953
|
+
raised: z45.boolean().nullable().optional(),
|
|
59717
59954
|
rounded: boxRoundedSchema.nullable().optional()
|
|
59718
59955
|
});
|
|
59719
|
-
var blockStyleOverridesSchema =
|
|
59956
|
+
var blockStyleOverridesSchema = z45.object({
|
|
59720
59957
|
sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
|
|
59721
59958
|
containerStyles: containerStylesOverrideSchema.nullable().optional(),
|
|
59722
59959
|
cardStyles: cardStylesOverrideSchema.nullable().optional()
|
|
59723
59960
|
});
|
|
59724
|
-
var blockThemeOverrideSchema =
|
|
59725
|
-
typography:
|
|
59961
|
+
var blockThemeOverrideSchema = z45.object({
|
|
59962
|
+
typography: z45.object({
|
|
59726
59963
|
proseLinkStyle: proseLinkStyleSchema.optional()
|
|
59727
59964
|
}).optional(),
|
|
59728
59965
|
styles: blockStyleOverridesSchema.optional()
|
|
59729
59966
|
});
|
|
59730
|
-
var typographyScaleSchema =
|
|
59967
|
+
var typographyScaleSchema = z45.enum([
|
|
59731
59968
|
// New intuitive names
|
|
59732
59969
|
"compact",
|
|
59733
59970
|
// ratio 1.2 (was minorThird)
|
|
@@ -59740,9 +59977,9 @@ var typographyScaleSchema = z44.enum([
|
|
|
59740
59977
|
"majorThird",
|
|
59741
59978
|
"perfectFourth"
|
|
59742
59979
|
]);
|
|
59743
|
-
var typographySchema =
|
|
59980
|
+
var typographySchema = z45.object({
|
|
59744
59981
|
body: bodyTypographyStyleSchema,
|
|
59745
|
-
headings:
|
|
59982
|
+
headings: z45.object({
|
|
59746
59983
|
default: headingTypographyStyleSchema,
|
|
59747
59984
|
h1: headingTypographyOverridesSchema,
|
|
59748
59985
|
h2: headingTypographyOverridesSchema,
|
|
@@ -59755,41 +59992,41 @@ var typographySchema = z44.object({
|
|
|
59755
59992
|
scale: typographyScaleSchema,
|
|
59756
59993
|
proseLinkStyle: proseLinkStyleSchema.optional()
|
|
59757
59994
|
});
|
|
59758
|
-
var spaceSchema =
|
|
59759
|
-
var corners =
|
|
59760
|
-
var shadow =
|
|
59761
|
-
elevation:
|
|
59762
|
-
softness:
|
|
59763
|
-
position:
|
|
59995
|
+
var spaceSchema = z45.enum(["comfortable", "standard", "dense"]);
|
|
59996
|
+
var corners = z45.enum(["square", "soft", "rounded", "pill"]);
|
|
59997
|
+
var shadow = z45.object({
|
|
59998
|
+
elevation: z45.enum(["none", "low", "medium", "high"]),
|
|
59999
|
+
softness: z45.enum(["crisp", "soft", "hard"]).nullable(),
|
|
60000
|
+
position: z45.enum(["bottom", "bottom-right"]).default("bottom")
|
|
59764
60001
|
});
|
|
59765
|
-
var border =
|
|
59766
|
-
width:
|
|
59767
|
-
style:
|
|
60002
|
+
var border = z45.object({
|
|
60003
|
+
width: z45.enum(["none", "hairline", "thin", "thick"]),
|
|
60004
|
+
style: z45.enum(["solid", "dashed"])
|
|
59768
60005
|
});
|
|
59769
|
-
var motion =
|
|
59770
|
-
level:
|
|
59771
|
-
easing:
|
|
60006
|
+
var motion = z45.object({
|
|
60007
|
+
level: z45.enum(["off", "low", "medium", "high"]),
|
|
60008
|
+
easing: z45.enum(["standard", "snappy", "gentle"]).nullable()
|
|
59772
60009
|
});
|
|
59773
|
-
var buttonStyle =
|
|
60010
|
+
var buttonStyle = z45.object({
|
|
59774
60011
|
shape: corners
|
|
59775
60012
|
// Used for --radius-control CSS variable
|
|
59776
60013
|
});
|
|
59777
|
-
var cardStyle =
|
|
59778
|
-
elevation:
|
|
59779
|
-
border:
|
|
60014
|
+
var cardStyle = z45.object({
|
|
60015
|
+
elevation: z45.enum(["none", "low", "medium", "high"]),
|
|
60016
|
+
border: z45.enum(["none", "subtle", "defined"]),
|
|
59780
60017
|
shape: corners,
|
|
59781
|
-
headerStyle:
|
|
59782
|
-
mediaTreatment:
|
|
60018
|
+
headerStyle: z45.enum(["plain", "accentBar", "subtleBg"]).nullable(),
|
|
60019
|
+
mediaTreatment: z45.enum(["square", "rounded", "bleed"]).nullable()
|
|
59783
60020
|
});
|
|
59784
|
-
var inputStyle =
|
|
60021
|
+
var inputStyle = z45.object({
|
|
59785
60022
|
shape: corners,
|
|
59786
|
-
border:
|
|
59787
|
-
focus:
|
|
59788
|
-
label:
|
|
60023
|
+
border: z45.enum(["subtle", "defined", "underline"]),
|
|
60024
|
+
focus: z45.enum(["glow", "ring", "underline"]),
|
|
60025
|
+
label: z45.enum(["inside", "above"])
|
|
59789
60026
|
});
|
|
59790
|
-
var headerVariant =
|
|
59791
|
-
var headerPositioning =
|
|
59792
|
-
var headerNavStyle =
|
|
60027
|
+
var headerVariant = z45.enum(["classic", "centered", "transparent", "floating", "editorial"]);
|
|
60028
|
+
var headerPositioning = z45.enum(["static", "sticky", "fixed"]);
|
|
60029
|
+
var headerNavStyle = z45.enum([
|
|
59793
60030
|
"minimal",
|
|
59794
60031
|
"underline",
|
|
59795
60032
|
"underline-grow",
|
|
@@ -59798,82 +60035,82 @@ var headerNavStyle = z44.enum([
|
|
|
59798
60035
|
"frosted",
|
|
59799
60036
|
"solid"
|
|
59800
60037
|
]);
|
|
59801
|
-
var navFontWeight =
|
|
59802
|
-
var headerMaxWidth =
|
|
59803
|
-
var headerContainerSchema =
|
|
59804
|
-
rounded:
|
|
59805
|
-
border:
|
|
59806
|
-
shadow:
|
|
59807
|
-
padding:
|
|
59808
|
-
tint:
|
|
59809
|
-
opacity:
|
|
60038
|
+
var navFontWeight = z45.enum(["regular", "medium", "semibold", "bold"]);
|
|
60039
|
+
var headerMaxWidth = z45.enum(["container", "full"]);
|
|
60040
|
+
var headerContainerSchema = z45.object({
|
|
60041
|
+
rounded: z45.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("xl"),
|
|
60042
|
+
border: z45.boolean().default(true),
|
|
60043
|
+
shadow: z45.boolean().default(true),
|
|
60044
|
+
padding: z45.enum(["sm", "md", "lg"]).default("md"),
|
|
60045
|
+
tint: z45.string().nullable().optional(),
|
|
60046
|
+
opacity: z45.number().min(0).max(1).default(0.12)
|
|
59810
60047
|
}).optional();
|
|
59811
60048
|
var headerBorderSchema = componentBorderSchema.extend({
|
|
59812
|
-
position:
|
|
60049
|
+
position: z45.enum(["bottom", "top", "both", "none"]).default("bottom")
|
|
59813
60050
|
}).optional();
|
|
59814
|
-
var logoStyleSchema =
|
|
59815
|
-
fontFamily:
|
|
59816
|
-
letterSpacing:
|
|
59817
|
-
gradient:
|
|
60051
|
+
var logoStyleSchema = z45.object({
|
|
60052
|
+
fontFamily: z45.enum(["heading", "body"]).default("heading"),
|
|
60053
|
+
letterSpacing: z45.enum(["normal", "wide", "wider", "widest"]).default("normal"),
|
|
60054
|
+
gradient: z45.boolean().default(false)
|
|
59818
60055
|
}).optional();
|
|
59819
|
-
var headerLogoTextSchema =
|
|
59820
|
-
mobileWrapLines:
|
|
59821
|
-
mobileMaxWidth:
|
|
59822
|
-
hideOnShrink:
|
|
60056
|
+
var headerLogoTextSchema = z45.object({
|
|
60057
|
+
mobileWrapLines: z45.union([z45.literal(1), z45.literal(2)]).optional(),
|
|
60058
|
+
mobileMaxWidth: z45.enum(["xs", "sm", "md"]).optional(),
|
|
60059
|
+
hideOnShrink: z45.boolean().optional()
|
|
59823
60060
|
}).optional();
|
|
59824
|
-
var navEffectsSchema =
|
|
59825
|
-
underlineGradient:
|
|
59826
|
-
glow:
|
|
59827
|
-
glowColor:
|
|
59828
|
-
neumorphic:
|
|
60061
|
+
var navEffectsSchema = z45.object({
|
|
60062
|
+
underlineGradient: z45.boolean().default(false),
|
|
60063
|
+
glow: z45.boolean().default(false),
|
|
60064
|
+
glowColor: z45.string().optional(),
|
|
60065
|
+
neumorphic: z45.boolean().default(false)
|
|
59829
60066
|
}).optional();
|
|
59830
|
-
var dropdownStyleSchema =
|
|
60067
|
+
var dropdownStyleSchema = z45.object({
|
|
59831
60068
|
// Container styling
|
|
59832
|
-
background:
|
|
60069
|
+
background: z45.string().default("surface"),
|
|
59833
60070
|
// color token
|
|
59834
|
-
textColor:
|
|
60071
|
+
textColor: z45.string().default("text"),
|
|
59835
60072
|
// color token
|
|
59836
|
-
borderColor:
|
|
60073
|
+
borderColor: z45.string().nullable().default("border"),
|
|
59837
60074
|
// null = no border
|
|
59838
|
-
shadow:
|
|
59839
|
-
borderRadius:
|
|
60075
|
+
shadow: z45.enum(["none", "sm", "md", "lg"]).default("md"),
|
|
60076
|
+
borderRadius: z45.enum(["none", "sm", "md", "lg"]).default("md"),
|
|
59840
60077
|
// Link hover states (explicit control)
|
|
59841
|
-
hoverBackground:
|
|
60078
|
+
hoverBackground: z45.string().nullable().optional(),
|
|
59842
60079
|
// color token, null = transparent
|
|
59843
|
-
hoverTextColor:
|
|
60080
|
+
hoverTextColor: z45.string().nullable().optional(),
|
|
59844
60081
|
// color token, null = inherit
|
|
59845
60082
|
// Typography
|
|
59846
|
-
textTransform:
|
|
59847
|
-
letterSpacing:
|
|
59848
|
-
fontWeight:
|
|
60083
|
+
textTransform: z45.enum(["none", "uppercase", "capitalize"]).default("none"),
|
|
60084
|
+
letterSpacing: z45.enum(["normal", "wide", "wider"]).default("normal"),
|
|
60085
|
+
fontWeight: z45.enum(["regular", "medium", "semibold", "bold"]).optional(),
|
|
59849
60086
|
// optional = inherit from navWeight
|
|
59850
|
-
textSize:
|
|
60087
|
+
textSize: z45.enum(["xs", "sm", "base", "lg"]).optional()
|
|
59851
60088
|
// optional = no override (browser default)
|
|
59852
60089
|
}).optional();
|
|
59853
|
-
var headerCtaGapSchema =
|
|
59854
|
-
var navContainerSchema =
|
|
59855
|
-
type:
|
|
59856
|
-
tint:
|
|
59857
|
-
opacity:
|
|
60090
|
+
var headerCtaGapSchema = z45.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
|
|
60091
|
+
var navContainerSchema = z45.object({
|
|
60092
|
+
type: z45.enum(["none", "pill", "glass"]).default("none"),
|
|
60093
|
+
tint: z45.string().nullable().optional(),
|
|
60094
|
+
opacity: z45.number().min(0).max(1).default(0.15)
|
|
59858
60095
|
}).default({ type: "none", tint: null, opacity: 0.15 });
|
|
59859
|
-
var headerBackgroundSchema =
|
|
59860
|
-
type:
|
|
59861
|
-
color:
|
|
60096
|
+
var headerBackgroundSchema = z45.object({
|
|
60097
|
+
type: z45.enum(["color", "gradient", "image"]),
|
|
60098
|
+
color: z45.string().nullable().optional(),
|
|
59862
60099
|
gradient: gradientConfigSchema.nullable().optional(),
|
|
59863
60100
|
image: mediaSchema2.nullable().optional(),
|
|
59864
|
-
textColor:
|
|
60101
|
+
textColor: z45.string().nullable().optional()
|
|
59865
60102
|
});
|
|
59866
|
-
var headerSchema =
|
|
60103
|
+
var headerSchema = z45.object({
|
|
59867
60104
|
variant: headerVariant,
|
|
59868
60105
|
positioning: headerPositioning,
|
|
59869
|
-
shrinkOnScroll:
|
|
60106
|
+
shrinkOnScroll: z45.boolean(),
|
|
59870
60107
|
maxWidth: headerMaxWidth,
|
|
59871
60108
|
logoOverride: mediaSchema2.nullable().optional(),
|
|
59872
60109
|
background: headerBackgroundSchema.default({ type: "color", color: "surface" }),
|
|
59873
|
-
textColor:
|
|
60110
|
+
textColor: z45.string().nullable().optional(),
|
|
59874
60111
|
// Site title and general header text
|
|
59875
60112
|
navStyle: headerNavStyle,
|
|
59876
|
-
navColor:
|
|
60113
|
+
navColor: z45.string().nullable().optional(),
|
|
59877
60114
|
// Nav links (inherits textColor if not set)
|
|
59878
60115
|
navWeight: navFontWeight.default("medium"),
|
|
59879
60116
|
// New fields for header system enhancement
|
|
@@ -59892,50 +60129,50 @@ var headerSchema = z44.object({
|
|
|
59892
60129
|
// Dropdown menu styling (nav dropdowns and mobile drawer)
|
|
59893
60130
|
dropdownStyle: dropdownStyleSchema
|
|
59894
60131
|
});
|
|
59895
|
-
var footerVariant =
|
|
59896
|
-
var footerMaxWidth =
|
|
59897
|
-
var footerMode =
|
|
59898
|
-
var footerNavLayoutMode =
|
|
59899
|
-
var footerNavLayoutAlign =
|
|
59900
|
-
var footerSpacing =
|
|
59901
|
-
var footerLogoPlacement =
|
|
59902
|
-
var footerLogoSize =
|
|
59903
|
-
var footerLogoMaxHeight =
|
|
59904
|
-
var footerBottomTextLinkStyleSchema =
|
|
59905
|
-
colorToken:
|
|
59906
|
-
hoverColorToken:
|
|
59907
|
-
decorationColorToken:
|
|
59908
|
-
underline:
|
|
59909
|
-
});
|
|
59910
|
-
var footerBottomBarSchema =
|
|
59911
|
-
enabled:
|
|
59912
|
-
fullBleed:
|
|
60132
|
+
var footerVariant = z45.enum(["simple", "columns", "split"]);
|
|
60133
|
+
var footerMaxWidth = z45.enum(["container", "full"]);
|
|
60134
|
+
var footerMode = z45.enum(["default", "blocks", "default+blocks", "none"]);
|
|
60135
|
+
var footerNavLayoutMode = z45.enum(["stack", "inline", "inline-wrap"]);
|
|
60136
|
+
var footerNavLayoutAlign = z45.enum(["start", "center", "end", "space-between"]);
|
|
60137
|
+
var footerSpacing = z45.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
|
|
60138
|
+
var footerLogoPlacement = z45.enum(["left", "right", "above", "below"]);
|
|
60139
|
+
var footerLogoSize = z45.enum(["sm", "md", "lg", "xl"]);
|
|
60140
|
+
var footerLogoMaxHeight = z45.enum(["sm", "md", "lg", "xl"]);
|
|
60141
|
+
var footerBottomTextLinkStyleSchema = z45.object({
|
|
60142
|
+
colorToken: z45.string().optional(),
|
|
60143
|
+
hoverColorToken: z45.string().nullable().optional(),
|
|
60144
|
+
decorationColorToken: z45.string().nullable().optional(),
|
|
60145
|
+
underline: z45.boolean().optional()
|
|
60146
|
+
});
|
|
60147
|
+
var footerBottomBarSchema = z45.object({
|
|
60148
|
+
enabled: z45.boolean().optional(),
|
|
60149
|
+
fullBleed: z45.boolean().optional(),
|
|
59913
60150
|
background: headerBackgroundSchema.optional(),
|
|
59914
|
-
textColor:
|
|
59915
|
-
textAlign:
|
|
60151
|
+
textColor: z45.string().nullable().optional(),
|
|
60152
|
+
textAlign: z45.enum(["left", "center", "right"]).optional(),
|
|
59916
60153
|
paddingY: footerSpacing.optional(),
|
|
59917
60154
|
paddingX: footerSpacing.optional(),
|
|
59918
|
-
borderTop:
|
|
59919
|
-
colorToken:
|
|
59920
|
-
width:
|
|
60155
|
+
borderTop: z45.object({
|
|
60156
|
+
colorToken: z45.string().nullable().optional(),
|
|
60157
|
+
width: z45.enum(["none", "thin", "medium", "thick"]).optional()
|
|
59921
60158
|
}).optional()
|
|
59922
60159
|
});
|
|
59923
|
-
var footerNavLayoutSchema =
|
|
60160
|
+
var footerNavLayoutSchema = z45.object({
|
|
59924
60161
|
layout: footerNavLayoutMode.optional(),
|
|
59925
60162
|
align: footerNavLayoutAlign.optional(),
|
|
59926
60163
|
gapX: footerSpacing.optional(),
|
|
59927
60164
|
gapY: footerSpacing.optional(),
|
|
59928
|
-
columns:
|
|
60165
|
+
columns: z45.number().int().min(1).max(6).optional()
|
|
59929
60166
|
});
|
|
59930
|
-
var footerLogoSchema =
|
|
59931
|
-
showLogo:
|
|
59932
|
-
showLogoText:
|
|
60167
|
+
var footerLogoSchema = z45.object({
|
|
60168
|
+
showLogo: z45.boolean().default(true),
|
|
60169
|
+
showLogoText: z45.boolean().optional(),
|
|
59933
60170
|
placement: footerLogoPlacement.optional(),
|
|
59934
60171
|
size: footerLogoSize.optional(),
|
|
59935
60172
|
maxHeight: footerLogoMaxHeight.optional(),
|
|
59936
|
-
align:
|
|
60173
|
+
align: z45.enum(["start", "center", "end"]).optional()
|
|
59937
60174
|
});
|
|
59938
|
-
var footerSchema =
|
|
60175
|
+
var footerSchema = z45.object({
|
|
59939
60176
|
/**
|
|
59940
60177
|
* SDK-only footer rendering mode.
|
|
59941
60178
|
*
|
|
@@ -59944,11 +60181,11 @@ var footerSchema = z44.object({
|
|
|
59944
60181
|
mode: footerMode.optional(),
|
|
59945
60182
|
variant: footerVariant,
|
|
59946
60183
|
maxWidth: footerMaxWidth,
|
|
59947
|
-
showLogoText:
|
|
60184
|
+
showLogoText: z45.boolean().optional(),
|
|
59948
60185
|
background: headerBackgroundSchema.default({ type: "color", color: "surface" }),
|
|
59949
60186
|
// Footer nav styling (independent from header)
|
|
59950
60187
|
navStyle: headerNavStyle.default("minimal"),
|
|
59951
|
-
navColor:
|
|
60188
|
+
navColor: z45.string().nullable().optional(),
|
|
59952
60189
|
navWeight: navFontWeight.default("medium"),
|
|
59953
60190
|
// Full nav link customization (overrides navStyle if set)
|
|
59954
60191
|
navLinkStyle: navLinkStyleSchema.optional(),
|
|
@@ -59959,15 +60196,15 @@ var footerSchema = z44.object({
|
|
|
59959
60196
|
logo: footerLogoSchema.optional(),
|
|
59960
60197
|
bottomBar: footerBottomBarSchema.optional()
|
|
59961
60198
|
});
|
|
59962
|
-
var containerPaddingPresetSchema =
|
|
59963
|
-
var layoutSchema =
|
|
59964
|
-
containerPadding:
|
|
60199
|
+
var containerPaddingPresetSchema = z45.enum(["tight", "compact", "default", "relaxed"]);
|
|
60200
|
+
var layoutSchema = z45.object({
|
|
60201
|
+
containerPadding: z45.object({
|
|
59965
60202
|
mobile: containerPaddingPresetSchema.optional(),
|
|
59966
60203
|
tablet: containerPaddingPresetSchema.optional(),
|
|
59967
60204
|
desktop: containerPaddingPresetSchema.optional()
|
|
59968
60205
|
}).optional()
|
|
59969
60206
|
}).optional();
|
|
59970
|
-
var heroTypographySizeSchema =
|
|
60207
|
+
var heroTypographySizeSchema = z45.enum([
|
|
59971
60208
|
"sm",
|
|
59972
60209
|
"base",
|
|
59973
60210
|
"lg",
|
|
@@ -59978,14 +60215,14 @@ var heroTypographySizeSchema = z44.enum([
|
|
|
59978
60215
|
"5xl",
|
|
59979
60216
|
"6xl"
|
|
59980
60217
|
]);
|
|
59981
|
-
var heroTypographyLineHeightSchema =
|
|
59982
|
-
var heroResponsiveTypographySchema =
|
|
60218
|
+
var heroTypographyLineHeightSchema = z45.enum(["tight", "snug", "normal", "relaxed"]);
|
|
60219
|
+
var heroResponsiveTypographySchema = z45.object({
|
|
59983
60220
|
headlineSize: heroTypographySizeSchema.optional(),
|
|
59984
60221
|
headlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
59985
60222
|
subheadlineSize: heroTypographySizeSchema.optional(),
|
|
59986
60223
|
subheadlineLineHeight: heroTypographyLineHeightSchema.optional()
|
|
59987
60224
|
});
|
|
59988
|
-
var heroTypographySchema =
|
|
60225
|
+
var heroTypographySchema = z45.object({
|
|
59989
60226
|
headlineSize: heroTypographySizeSchema.optional(),
|
|
59990
60227
|
headlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
59991
60228
|
subheadlineSize: heroTypographySizeSchema.optional(),
|
|
@@ -59994,24 +60231,24 @@ var heroTypographySchema = z44.object({
|
|
|
59994
60231
|
microHeadlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
59995
60232
|
microSubheadlineSize: heroTypographySizeSchema.optional(),
|
|
59996
60233
|
microSubheadlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
59997
|
-
responsive:
|
|
60234
|
+
responsive: z45.object({
|
|
59998
60235
|
tablet: heroResponsiveTypographySchema.optional(),
|
|
59999
60236
|
mobile: heroResponsiveTypographySchema.optional()
|
|
60000
60237
|
}).optional()
|
|
60001
60238
|
});
|
|
60002
|
-
var heroSchema =
|
|
60239
|
+
var heroSchema = z45.object({
|
|
60003
60240
|
typography: heroTypographySchema.optional()
|
|
60004
60241
|
}).optional();
|
|
60005
|
-
var gradientsSchema =
|
|
60006
|
-
button:
|
|
60007
|
-
hero:
|
|
60008
|
-
background:
|
|
60009
|
-
});
|
|
60010
|
-
var themeSchema =
|
|
60011
|
-
name:
|
|
60012
|
-
description:
|
|
60013
|
-
rationale:
|
|
60014
|
-
siteStyleId:
|
|
60242
|
+
var gradientsSchema = z45.object({
|
|
60243
|
+
button: z45.string().min(1).nullable().optional(),
|
|
60244
|
+
hero: z45.string().min(1).nullable().optional(),
|
|
60245
|
+
background: z45.string().min(1).nullable().optional()
|
|
60246
|
+
});
|
|
60247
|
+
var themeSchema = z45.object({
|
|
60248
|
+
name: z45.string().min(1).max(30),
|
|
60249
|
+
description: z45.string().min(1).max(400),
|
|
60250
|
+
rationale: z45.string().min(1).max(400),
|
|
60251
|
+
siteStyleId: z45.string().min(1).transform((value) => asSiteStyleId(value)).optional(),
|
|
60015
60252
|
axes: axesSchema,
|
|
60016
60253
|
palette: paletteSchema,
|
|
60017
60254
|
typography: typographySchema,
|
|
@@ -60038,16 +60275,16 @@ var themeSchema = z44.object({
|
|
|
60038
60275
|
// Block-specific customization (Tier 3)
|
|
60039
60276
|
// blockCustomVars: Per-block CSS variable overrides as bare values
|
|
60040
60277
|
// Example: { "event-registration": { "--step-color": "#6d28d9" } }
|
|
60041
|
-
blockCustomVars:
|
|
60042
|
-
|
|
60278
|
+
blockCustomVars: z45.record(
|
|
60279
|
+
z45.string(),
|
|
60043
60280
|
// block kind (matches data-block attribute)
|
|
60044
|
-
|
|
60281
|
+
z45.record(z45.string(), z45.string())
|
|
60045
60282
|
// { '--var-name': 'value' }
|
|
60046
60283
|
).optional(),
|
|
60047
60284
|
// Structured block-kind theme overrides (v1: typography prose-link style only)
|
|
60048
60285
|
// Keyed by block kind (usually data-block value like "hero"; "block.hero" also accepted)
|
|
60049
|
-
blockOverrides:
|
|
60050
|
-
|
|
60286
|
+
blockOverrides: z45.record(
|
|
60287
|
+
z45.string(),
|
|
60051
60288
|
blockThemeOverrideSchema
|
|
60052
60289
|
).optional(),
|
|
60053
60290
|
// Structured custom CSS rules
|
|
@@ -60083,11 +60320,11 @@ var themeSchema = z44.object({
|
|
|
60083
60320
|
* }
|
|
60084
60321
|
* ```
|
|
60085
60322
|
*/
|
|
60086
|
-
styleGroups:
|
|
60323
|
+
styleGroups: z45.record(z45.string(), z45.array(z45.string())).optional()
|
|
60087
60324
|
});
|
|
60088
|
-
var themesTurnSchema =
|
|
60089
|
-
message:
|
|
60090
|
-
themes:
|
|
60325
|
+
var themesTurnSchema = z45.object({
|
|
60326
|
+
message: z45.string().min(1),
|
|
60327
|
+
themes: z45.array(themeSchema).length(3)
|
|
60091
60328
|
});
|
|
60092
60329
|
|
|
60093
60330
|
// ../theme-core/src/palette/variants/types.ts
|
|
@@ -60097,7 +60334,7 @@ function asPaletteVariantId(value) {
|
|
|
60097
60334
|
}
|
|
60098
60335
|
return value;
|
|
60099
60336
|
}
|
|
60100
|
-
var paletteVariantIdSchema =
|
|
60337
|
+
var paletteVariantIdSchema = z46.string().min(1).transform((value) => asPaletteVariantId(value));
|
|
60101
60338
|
var PALETTE_TOKEN_NAMES = [
|
|
60102
60339
|
"primary",
|
|
60103
60340
|
"primaryForeground",
|
|
@@ -60113,19 +60350,19 @@ var PALETTE_TOKEN_NAMES = [
|
|
|
60113
60350
|
"text",
|
|
60114
60351
|
"border"
|
|
60115
60352
|
];
|
|
60116
|
-
var paletteTokenNameSchema =
|
|
60353
|
+
var paletteTokenNameSchema = z46.enum(PALETTE_TOKEN_NAMES);
|
|
60117
60354
|
var HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
|
|
60118
|
-
var hexColorSchema =
|
|
60355
|
+
var hexColorSchema = z46.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
|
|
60119
60356
|
var variantPaletteColorSchema = paletteColorSchema.extend({
|
|
60120
60357
|
name: paletteTokenNameSchema
|
|
60121
60358
|
});
|
|
60122
|
-
var paletteVariantSchema =
|
|
60359
|
+
var paletteVariantSchema = z46.object({
|
|
60123
60360
|
id: paletteVariantIdSchema,
|
|
60124
|
-
name:
|
|
60125
|
-
description:
|
|
60361
|
+
name: z46.string().min(1),
|
|
60362
|
+
description: z46.string().min(1),
|
|
60126
60363
|
tags: styleTagsSchema,
|
|
60127
|
-
mode:
|
|
60128
|
-
colors:
|
|
60364
|
+
mode: z46.enum(["light", "dark"]),
|
|
60365
|
+
colors: z46.array(variantPaletteColorSchema).min(1)
|
|
60129
60366
|
});
|
|
60130
60367
|
function definePaletteVariant(input) {
|
|
60131
60368
|
return {
|
|
@@ -60137,7 +60374,7 @@ function definePaletteVariant(input) {
|
|
|
60137
60374
|
colors: input.colors
|
|
60138
60375
|
};
|
|
60139
60376
|
}
|
|
60140
|
-
var paletteOverridesSchema =
|
|
60377
|
+
var paletteOverridesSchema = z46.object({
|
|
60141
60378
|
primary: hexColorSchema.optional(),
|
|
60142
60379
|
primaryForeground: hexColorSchema.optional(),
|
|
60143
60380
|
secondary: hexColorSchema.optional(),
|
|
@@ -60814,7 +61051,7 @@ var curatedSiteStylesById = new Map(
|
|
|
60814
61051
|
);
|
|
60815
61052
|
|
|
60816
61053
|
// ../theme-core/src/site-styles/designState.ts
|
|
60817
|
-
import { z as
|
|
61054
|
+
import { z as z47 } from "zod";
|
|
60818
61055
|
|
|
60819
61056
|
// ../theme-core/src/site-styles/rawStyleFields.ts
|
|
60820
61057
|
var themeV2RuntimeStyleFieldNames = [
|
|
@@ -60840,13 +61077,13 @@ var themeV2NormalEditorRawStyleFieldNameSet = new Set(
|
|
|
60840
61077
|
|
|
60841
61078
|
// ../theme-core/src/site-styles/designState.ts
|
|
60842
61079
|
var themeV2DesignStateSchemaVersion = 1;
|
|
60843
|
-
var designResolutionPolicySchema =
|
|
60844
|
-
var runtimeStyleFieldNameSchema =
|
|
60845
|
-
var nonEmptyRuntimeStyleFieldNamesSchema =
|
|
61080
|
+
var designResolutionPolicySchema = z47.enum(["generated", "user", "admin", "sdk"]);
|
|
61081
|
+
var runtimeStyleFieldNameSchema = z47.enum(themeV2RuntimeStyleFieldNames);
|
|
61082
|
+
var nonEmptyRuntimeStyleFieldNamesSchema = z47.array(runtimeStyleFieldNameSchema).min(1).transform((fields3) => [
|
|
60846
61083
|
fields3[0],
|
|
60847
61084
|
...fields3.slice(1)
|
|
60848
61085
|
]);
|
|
60849
|
-
var heroLegibilityStrategySchema =
|
|
61086
|
+
var heroLegibilityStrategySchema = z47.enum([
|
|
60850
61087
|
"none",
|
|
60851
61088
|
"scrim-gradient",
|
|
60852
61089
|
"solid-panel"
|
|
@@ -60868,66 +61105,66 @@ var userFlushTreatments = uniqueNonEmpty(
|
|
|
60868
61105
|
var userFlushBleeds = uniqueNonEmpty(
|
|
60869
61106
|
userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.bleed)
|
|
60870
61107
|
);
|
|
60871
|
-
var contentFrameIntentSchema =
|
|
60872
|
-
|
|
60873
|
-
|
|
60874
|
-
kind:
|
|
60875
|
-
treatment:
|
|
61108
|
+
var contentFrameIntentSchema = z47.discriminatedUnion("kind", [
|
|
61109
|
+
z47.object({ kind: z47.literal("plain") }).strict(),
|
|
61110
|
+
z47.object({
|
|
61111
|
+
kind: z47.literal("panel"),
|
|
61112
|
+
treatment: z47.enum(userPanelTreatments)
|
|
60876
61113
|
}).strict(),
|
|
60877
|
-
|
|
60878
|
-
kind:
|
|
60879
|
-
treatment:
|
|
60880
|
-
bleed:
|
|
61114
|
+
z47.object({
|
|
61115
|
+
kind: z47.literal("flush-panel"),
|
|
61116
|
+
treatment: z47.enum(userFlushTreatments),
|
|
61117
|
+
bleed: z47.enum(userFlushBleeds)
|
|
60881
61118
|
}).strict()
|
|
60882
61119
|
]);
|
|
60883
|
-
var blockDesignPlanSchema =
|
|
60884
|
-
blockId:
|
|
60885
|
-
blockKind:
|
|
60886
|
-
purpose:
|
|
60887
|
-
sectionSurface:
|
|
61120
|
+
var blockDesignPlanSchema = z47.object({
|
|
61121
|
+
blockId: z47.string().min(1).transform(asDesignBlockId),
|
|
61122
|
+
blockKind: z47.string().min(1),
|
|
61123
|
+
purpose: z47.string().min(1),
|
|
61124
|
+
sectionSurface: z47.enum(userDesignOptionCatalog.sectionSurfaces),
|
|
60888
61125
|
contentFrame: contentFrameIntentSchema,
|
|
60889
|
-
itemSurface:
|
|
60890
|
-
transitionAfter:
|
|
60891
|
-
emphasis:
|
|
61126
|
+
itemSurface: z47.enum(userDesignOptionCatalog.itemSurfaces),
|
|
61127
|
+
transitionAfter: z47.enum(userDesignOptionCatalog.transitions),
|
|
61128
|
+
emphasis: z47.enum(userDesignOptionCatalog.emphases),
|
|
60892
61129
|
heroLegibility: heroLegibilityStrategySchema.optional()
|
|
60893
61130
|
}).strict();
|
|
60894
|
-
var styleAuthoritySchema =
|
|
60895
|
-
|
|
60896
|
-
kind:
|
|
61131
|
+
var styleAuthoritySchema = z47.discriminatedUnion("kind", [
|
|
61132
|
+
z47.object({
|
|
61133
|
+
kind: z47.literal("theme-v2"),
|
|
60897
61134
|
source: designResolutionPolicySchema,
|
|
60898
|
-
siteStyleId:
|
|
60899
|
-
templateId:
|
|
60900
|
-
templateVersion:
|
|
60901
|
-
resolverVersion:
|
|
61135
|
+
siteStyleId: z47.string().min(1).transform(asSiteStyleId),
|
|
61136
|
+
templateId: z47.string().min(1).transform(asDesignSystemTemplateId),
|
|
61137
|
+
templateVersion: z47.number().int().nonnegative(),
|
|
61138
|
+
resolverVersion: z47.number().int().nonnegative()
|
|
60902
61139
|
}).strict(),
|
|
60903
|
-
|
|
60904
|
-
kind:
|
|
60905
|
-
reason:
|
|
61140
|
+
z47.object({
|
|
61141
|
+
kind: z47.literal("legacy-raw"),
|
|
61142
|
+
reason: z47.enum(["pre-theme-v2", "manual-runtime-fields"])
|
|
60906
61143
|
}).strict(),
|
|
60907
|
-
|
|
60908
|
-
kind:
|
|
60909
|
-
reason:
|
|
61144
|
+
z47.object({
|
|
61145
|
+
kind: z47.literal("advanced-detached"),
|
|
61146
|
+
reason: z47.literal("detached-custom-runtime-fields")
|
|
60910
61147
|
}).strict()
|
|
60911
61148
|
]);
|
|
60912
|
-
var blockRuntimeStyleAuthoritySchema =
|
|
60913
|
-
unit:
|
|
60914
|
-
blockId:
|
|
61149
|
+
var blockRuntimeStyleAuthoritySchema = z47.object({
|
|
61150
|
+
unit: z47.literal("block-runtime-fields"),
|
|
61151
|
+
blockId: z47.string().min(1).transform(asDesignBlockId),
|
|
60915
61152
|
fields: nonEmptyRuntimeStyleFieldNamesSchema,
|
|
60916
61153
|
authority: styleAuthoritySchema
|
|
60917
61154
|
}).strict();
|
|
60918
|
-
var persistedPageDesignStateV1Schema =
|
|
60919
|
-
schemaVersion:
|
|
60920
|
-
siteStyleId:
|
|
60921
|
-
templateId:
|
|
60922
|
-
templateVersion:
|
|
60923
|
-
resolverVersion:
|
|
60924
|
-
rhythmPresetId:
|
|
60925
|
-
blocks:
|
|
60926
|
-
styleAuthorities:
|
|
61155
|
+
var persistedPageDesignStateV1Schema = z47.object({
|
|
61156
|
+
schemaVersion: z47.literal(themeV2DesignStateSchemaVersion),
|
|
61157
|
+
siteStyleId: z47.string().min(1).transform(asSiteStyleId),
|
|
61158
|
+
templateId: z47.string().min(1).transform(asDesignSystemTemplateId),
|
|
61159
|
+
templateVersion: z47.number().int().nonnegative(),
|
|
61160
|
+
resolverVersion: z47.number().int().nonnegative(),
|
|
61161
|
+
rhythmPresetId: z47.string().min(1),
|
|
61162
|
+
blocks: z47.array(blockDesignPlanSchema),
|
|
61163
|
+
styleAuthorities: z47.array(blockRuntimeStyleAuthoritySchema)
|
|
60927
61164
|
}).strict();
|
|
60928
61165
|
|
|
60929
61166
|
// ../theme-core/src/site-styles/generatedSchemas.ts
|
|
60930
|
-
import { z as
|
|
61167
|
+
import { z as z48 } from "zod";
|
|
60931
61168
|
function uniqueNonEmpty2(values) {
|
|
60932
61169
|
const uniqueValues = [...new Set(values)];
|
|
60933
61170
|
const firstValue = uniqueValues[0];
|
|
@@ -60945,105 +61182,105 @@ var generatedFlushTreatments = uniqueNonEmpty2(
|
|
|
60945
61182
|
var generatedFlushBleeds = uniqueNonEmpty2(
|
|
60946
61183
|
generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.bleed)
|
|
60947
61184
|
);
|
|
60948
|
-
var generatedPanelFrameSchema =
|
|
60949
|
-
kind:
|
|
60950
|
-
treatment:
|
|
61185
|
+
var generatedPanelFrameSchema = z48.object({
|
|
61186
|
+
kind: z48.literal("panel"),
|
|
61187
|
+
treatment: z48.enum(generatedPanelTreatments)
|
|
60951
61188
|
}).strict();
|
|
60952
|
-
var generatedFlushPanelFrameSchema =
|
|
60953
|
-
kind:
|
|
60954
|
-
treatment:
|
|
60955
|
-
bleed:
|
|
61189
|
+
var generatedFlushPanelFrameSchema = z48.object({
|
|
61190
|
+
kind: z48.literal("flush-panel"),
|
|
61191
|
+
treatment: z48.enum(generatedFlushTreatments),
|
|
61192
|
+
bleed: z48.enum(generatedFlushBleeds)
|
|
60956
61193
|
}).strict();
|
|
60957
|
-
var generatedContentFrameIntentSchema =
|
|
60958
|
-
|
|
61194
|
+
var generatedContentFrameIntentSchema = z48.discriminatedUnion("kind", [
|
|
61195
|
+
z48.object({ kind: z48.literal("plain") }).strict(),
|
|
60959
61196
|
generatedPanelFrameSchema,
|
|
60960
61197
|
generatedFlushPanelFrameSchema
|
|
60961
61198
|
]);
|
|
60962
|
-
var generatedSiteStyleIdSchema =
|
|
61199
|
+
var generatedSiteStyleIdSchema = z48.enum(curatedSiteStyleIdValues).transform(asSiteStyleId);
|
|
60963
61200
|
function generatedChoiceSchema(valueSchema) {
|
|
60964
|
-
return
|
|
60965
|
-
|
|
60966
|
-
source:
|
|
60967
|
-
kind:
|
|
61201
|
+
return z48.discriminatedUnion("kind", [
|
|
61202
|
+
z48.object({
|
|
61203
|
+
source: z48.literal("generated"),
|
|
61204
|
+
kind: z48.literal("auto")
|
|
60968
61205
|
}).strict(),
|
|
60969
|
-
|
|
60970
|
-
source:
|
|
60971
|
-
kind:
|
|
61206
|
+
z48.object({
|
|
61207
|
+
source: z48.literal("generated"),
|
|
61208
|
+
kind: z48.literal("explicit"),
|
|
60972
61209
|
value: valueSchema
|
|
60973
61210
|
}).strict()
|
|
60974
61211
|
]);
|
|
60975
61212
|
}
|
|
60976
|
-
var generatedBlockDesignIntentSchema =
|
|
61213
|
+
var generatedBlockDesignIntentSchema = z48.object({
|
|
60977
61214
|
sectionSurface: generatedChoiceSchema(
|
|
60978
|
-
|
|
61215
|
+
z48.enum(generatedDesignOptionCatalog.sectionSurfaces)
|
|
60979
61216
|
),
|
|
60980
61217
|
contentFrame: generatedChoiceSchema(generatedContentFrameIntentSchema),
|
|
60981
61218
|
itemSurface: generatedChoiceSchema(
|
|
60982
|
-
|
|
61219
|
+
z48.enum(generatedDesignOptionCatalog.itemSurfaces)
|
|
60983
61220
|
),
|
|
60984
61221
|
transitionAfter: generatedChoiceSchema(
|
|
60985
|
-
|
|
61222
|
+
z48.enum(generatedDesignOptionCatalog.transitions)
|
|
60986
61223
|
),
|
|
60987
61224
|
emphasis: generatedChoiceSchema(
|
|
60988
|
-
|
|
61225
|
+
z48.enum(generatedDesignOptionCatalog.emphases)
|
|
60989
61226
|
)
|
|
60990
61227
|
}).strict();
|
|
60991
|
-
var generatedMediaCompositionIntentSchema =
|
|
61228
|
+
var generatedMediaCompositionIntentSchema = z48.enum([
|
|
60992
61229
|
"none",
|
|
60993
61230
|
"supporting",
|
|
60994
61231
|
"dominant"
|
|
60995
61232
|
]);
|
|
60996
|
-
var generatedDecorativeCompositionIntentSchema =
|
|
61233
|
+
var generatedDecorativeCompositionIntentSchema = z48.enum([
|
|
60997
61234
|
"none",
|
|
60998
61235
|
"supporting"
|
|
60999
61236
|
]);
|
|
61000
|
-
var generatedHeroLegibilityStrategySchema =
|
|
61237
|
+
var generatedHeroLegibilityStrategySchema = z48.enum([
|
|
61001
61238
|
"none",
|
|
61002
61239
|
"scrim-gradient"
|
|
61003
61240
|
]);
|
|
61004
|
-
var generatedBlockMediaIntentSchema =
|
|
61241
|
+
var generatedBlockMediaIntentSchema = z48.object({
|
|
61005
61242
|
media: generatedMediaCompositionIntentSchema,
|
|
61006
61243
|
decorative: generatedDecorativeCompositionIntentSchema,
|
|
61007
61244
|
heroLegibility: generatedChoiceSchema(generatedHeroLegibilityStrategySchema)
|
|
61008
61245
|
}).strict();
|
|
61009
|
-
var generatedBoundaryIntentSchema =
|
|
61246
|
+
var generatedBoundaryIntentSchema = z48.object({
|
|
61010
61247
|
transitionAfter: generatedChoiceSchema(
|
|
61011
|
-
|
|
61248
|
+
z48.enum(generatedDesignOptionCatalog.transitions)
|
|
61012
61249
|
)
|
|
61013
61250
|
}).strict();
|
|
61014
|
-
var generatedPageDesignBlockIntentSchema =
|
|
61015
|
-
blockId:
|
|
61016
|
-
blockKind:
|
|
61017
|
-
purpose:
|
|
61251
|
+
var generatedPageDesignBlockIntentSchema = z48.object({
|
|
61252
|
+
blockId: z48.string().min(1),
|
|
61253
|
+
blockKind: z48.string().min(1),
|
|
61254
|
+
purpose: z48.string().min(1),
|
|
61018
61255
|
design: generatedBlockDesignIntentSchema,
|
|
61019
61256
|
mediaIntent: generatedBlockMediaIntentSchema,
|
|
61020
61257
|
boundaryIntent: generatedBoundaryIntentSchema
|
|
61021
61258
|
}).strict();
|
|
61022
|
-
var generatedPageDesignIntentSchema =
|
|
61259
|
+
var generatedPageDesignIntentSchema = z48.object({
|
|
61023
61260
|
siteStyleId: generatedSiteStyleIdSchema,
|
|
61024
|
-
blocks:
|
|
61261
|
+
blocks: z48.array(generatedPageDesignBlockIntentSchema)
|
|
61025
61262
|
}).strict();
|
|
61026
61263
|
|
|
61027
61264
|
// ../theme-core/src/site-styles/pageDesignIntent.ts
|
|
61028
|
-
import { z as
|
|
61265
|
+
import { z as z49 } from "zod";
|
|
61029
61266
|
var pageDesignIntentSchemaVersion = 1;
|
|
61030
|
-
var pageDesignUserPinnedAppearanceChoiceSchema =
|
|
61031
|
-
kind:
|
|
61032
|
-
value:
|
|
61267
|
+
var pageDesignUserPinnedAppearanceChoiceSchema = z49.object({
|
|
61268
|
+
kind: z49.literal("user-pinned"),
|
|
61269
|
+
value: z49.string().min(1).transform(asAppearancePresetId)
|
|
61033
61270
|
}).strict();
|
|
61034
|
-
var pageDesignUserPinnedBoundaryChoiceSchema =
|
|
61035
|
-
kind:
|
|
61036
|
-
value:
|
|
61271
|
+
var pageDesignUserPinnedBoundaryChoiceSchema = z49.object({
|
|
61272
|
+
kind: z49.literal("user-pinned"),
|
|
61273
|
+
value: z49.string().min(1).transform(asBoundaryOptionId)
|
|
61037
61274
|
}).strict();
|
|
61038
|
-
var pageDesignBlockLookPinSchema =
|
|
61039
|
-
blockId:
|
|
61040
|
-
blockKind:
|
|
61275
|
+
var pageDesignBlockLookPinSchema = z49.object({
|
|
61276
|
+
blockId: z49.string().min(1).transform(asDesignBlockId),
|
|
61277
|
+
blockKind: z49.string().min(1),
|
|
61041
61278
|
choice: pageDesignUserPinnedAppearanceChoiceSchema
|
|
61042
61279
|
}).strict();
|
|
61043
|
-
var pageDesignBoundaryPinSchema =
|
|
61044
|
-
boundaryId:
|
|
61045
|
-
previousBlockId:
|
|
61046
|
-
nextBlockId:
|
|
61280
|
+
var pageDesignBoundaryPinSchema = z49.object({
|
|
61281
|
+
boundaryId: z49.string().min(1).transform(asDesignBoundaryId),
|
|
61282
|
+
previousBlockId: z49.string().min(1).transform(asDesignBlockId),
|
|
61283
|
+
nextBlockId: z49.string().min(1).transform(asDesignBlockId),
|
|
61047
61284
|
choice: pageDesignUserPinnedBoundaryChoiceSchema
|
|
61048
61285
|
}).strict().superRefine((pin, ctx) => {
|
|
61049
61286
|
const expectedBoundaryId = makeBoundaryId(
|
|
@@ -61052,18 +61289,18 @@ var pageDesignBoundaryPinSchema = z48.object({
|
|
|
61052
61289
|
);
|
|
61053
61290
|
if (pin.boundaryId !== expectedBoundaryId) {
|
|
61054
61291
|
ctx.addIssue({
|
|
61055
|
-
code:
|
|
61292
|
+
code: z49.ZodIssueCode.custom,
|
|
61056
61293
|
path: ["boundaryId"],
|
|
61057
61294
|
message: `Boundary id must match previousBlockId and nextBlockId. Expected ${expectedBoundaryId}.`
|
|
61058
61295
|
});
|
|
61059
61296
|
}
|
|
61060
61297
|
});
|
|
61061
|
-
var pageDesignIntentV1Schema =
|
|
61062
|
-
schemaVersion:
|
|
61063
|
-
siteStyleId:
|
|
61064
|
-
pageFlowPresetId:
|
|
61065
|
-
blockLookPins:
|
|
61066
|
-
boundaryPins:
|
|
61298
|
+
var pageDesignIntentV1Schema = z49.object({
|
|
61299
|
+
schemaVersion: z49.literal(pageDesignIntentSchemaVersion),
|
|
61300
|
+
siteStyleId: z49.string().min(1).transform(asSiteStyleId),
|
|
61301
|
+
pageFlowPresetId: z49.string().min(1).transform(asPageFlowPresetId),
|
|
61302
|
+
blockLookPins: z49.array(pageDesignBlockLookPinSchema),
|
|
61303
|
+
boundaryPins: z49.array(pageDesignBoundaryPinSchema)
|
|
61067
61304
|
}).strict().superRefine((intent, ctx) => {
|
|
61068
61305
|
addDuplicateStringIssues(ctx, {
|
|
61069
61306
|
values: intent.blockLookPins.map((pin) => pin.blockId),
|
|
@@ -61089,7 +61326,7 @@ function addDuplicateStringIssues(ctx, input) {
|
|
|
61089
61326
|
}
|
|
61090
61327
|
for (const duplicate of duplicates) {
|
|
61091
61328
|
ctx.addIssue({
|
|
61092
|
-
code:
|
|
61329
|
+
code: z49.ZodIssueCode.custom,
|
|
61093
61330
|
path: [...input.path],
|
|
61094
61331
|
message: `Duplicate ${input.label}: ${duplicate}.`
|
|
61095
61332
|
});
|
|
@@ -61346,81 +61583,81 @@ var defaultComponentRuntimeRules = defineComponentRuntimeRules({
|
|
|
61346
61583
|
});
|
|
61347
61584
|
|
|
61348
61585
|
// ../theme-core/src/site-styles/pageDesignAuthority.ts
|
|
61349
|
-
import { z as
|
|
61350
|
-
var nonEmptyStringSchema =
|
|
61586
|
+
import { z as z50 } from "zod";
|
|
61587
|
+
var nonEmptyStringSchema = z50.string().min(1);
|
|
61351
61588
|
var blockContentVersionIdSchema = nonEmptyStringSchema.transform(asBlockContentVersionId);
|
|
61352
61589
|
var designBlockIdSchema = nonEmptyStringSchema.transform(asDesignBlockId);
|
|
61353
61590
|
var designPageIdSchema = nonEmptyStringSchema.transform(asDesignPageId);
|
|
61354
61591
|
var designEntryIdSchema = nonEmptyStringSchema.transform(asDesignEntryId);
|
|
61355
|
-
var blockOrderIndexSchema =
|
|
61356
|
-
var publishedPageBlockSnapshotSchema =
|
|
61357
|
-
kind:
|
|
61592
|
+
var blockOrderIndexSchema = z50.number().int().nonnegative().transform(asBlockOrderIndex);
|
|
61593
|
+
var publishedPageBlockSnapshotSchema = z50.object({
|
|
61594
|
+
kind: z50.literal("published-block-content"),
|
|
61358
61595
|
blockId: designBlockIdSchema,
|
|
61359
61596
|
contentVersionId: blockContentVersionIdSchema,
|
|
61360
|
-
identifier:
|
|
61597
|
+
identifier: z50.string().nullable(),
|
|
61361
61598
|
blockKind: nonEmptyStringSchema,
|
|
61362
61599
|
orderIndex: blockOrderIndexSchema
|
|
61363
61600
|
}).strict();
|
|
61364
|
-
var draftPageBlockSnapshotSchema =
|
|
61365
|
-
kind:
|
|
61601
|
+
var draftPageBlockSnapshotSchema = z50.object({
|
|
61602
|
+
kind: z50.literal("draft-block-content"),
|
|
61366
61603
|
blockId: designBlockIdSchema,
|
|
61367
61604
|
contentVersionId: blockContentVersionIdSchema.nullable(),
|
|
61368
|
-
identifier:
|
|
61605
|
+
identifier: z50.string().nullable(),
|
|
61369
61606
|
blockKind: nonEmptyStringSchema,
|
|
61370
61607
|
orderIndex: blockOrderIndexSchema
|
|
61371
61608
|
}).strict();
|
|
61372
|
-
var missingPageBlockSnapshotSchema =
|
|
61373
|
-
kind:
|
|
61609
|
+
var missingPageBlockSnapshotSchema = z50.object({
|
|
61610
|
+
kind: z50.literal("missing-block-content"),
|
|
61374
61611
|
blockId: designBlockIdSchema,
|
|
61375
|
-
identifier:
|
|
61612
|
+
identifier: z50.string().nullable(),
|
|
61376
61613
|
blockKind: nonEmptyStringSchema,
|
|
61377
61614
|
orderIndex: blockOrderIndexSchema,
|
|
61378
|
-
reason:
|
|
61615
|
+
reason: z50.enum([
|
|
61379
61616
|
"new-block",
|
|
61380
61617
|
"deleted-content-version",
|
|
61381
61618
|
"unpublished-block"
|
|
61382
61619
|
])
|
|
61383
61620
|
}).strict();
|
|
61384
|
-
var pageBlockSnapshotSchema =
|
|
61621
|
+
var pageBlockSnapshotSchema = z50.discriminatedUnion("kind", [
|
|
61385
61622
|
publishedPageBlockSnapshotSchema,
|
|
61386
61623
|
draftPageBlockSnapshotSchema,
|
|
61387
61624
|
missingPageBlockSnapshotSchema
|
|
61388
61625
|
]);
|
|
61389
|
-
var publishedPageBlockSequenceSchema =
|
|
61390
|
-
var draftPageBlockSequenceSchema =
|
|
61391
|
-
var publishedPageDesignVersionDataV1Schema =
|
|
61392
|
-
schemaVersion:
|
|
61393
|
-
stage:
|
|
61626
|
+
var publishedPageBlockSequenceSchema = z50.array(publishedPageBlockSnapshotSchema).superRefine(validateBlockSequence);
|
|
61627
|
+
var draftPageBlockSequenceSchema = z50.array(pageBlockSnapshotSchema).superRefine(validateBlockSequence);
|
|
61628
|
+
var publishedPageDesignVersionDataV1Schema = z50.object({
|
|
61629
|
+
schemaVersion: z50.literal(1),
|
|
61630
|
+
stage: z50.literal("published"),
|
|
61394
61631
|
pageId: designPageIdSchema,
|
|
61395
61632
|
blockSequence: publishedPageBlockSequenceSchema
|
|
61396
61633
|
}).strict();
|
|
61397
|
-
var draftPageDesignVersionDataV1Schema =
|
|
61398
|
-
schemaVersion:
|
|
61399
|
-
stage:
|
|
61634
|
+
var draftPageDesignVersionDataV1Schema = z50.object({
|
|
61635
|
+
schemaVersion: z50.literal(1),
|
|
61636
|
+
stage: z50.literal("draft"),
|
|
61400
61637
|
pageId: designPageIdSchema,
|
|
61401
61638
|
blockSequence: draftPageBlockSequenceSchema
|
|
61402
61639
|
}).strict();
|
|
61403
|
-
var pageDesignVersionDataV1Schema =
|
|
61640
|
+
var pageDesignVersionDataV1Schema = z50.discriminatedUnion("stage", [
|
|
61404
61641
|
publishedPageDesignVersionDataV1Schema,
|
|
61405
61642
|
draftPageDesignVersionDataV1Schema
|
|
61406
61643
|
]);
|
|
61407
|
-
var contentVersionOwnerSchema =
|
|
61408
|
-
|
|
61409
|
-
kind:
|
|
61644
|
+
var contentVersionOwnerSchema = z50.discriminatedUnion("kind", [
|
|
61645
|
+
z50.object({
|
|
61646
|
+
kind: z50.literal("block"),
|
|
61410
61647
|
blockId: designBlockIdSchema
|
|
61411
61648
|
}).strict(),
|
|
61412
|
-
|
|
61413
|
-
kind:
|
|
61649
|
+
z50.object({
|
|
61650
|
+
kind: z50.literal("entry"),
|
|
61414
61651
|
entryId: designEntryIdSchema
|
|
61415
61652
|
}).strict(),
|
|
61416
|
-
|
|
61417
|
-
kind:
|
|
61653
|
+
z50.object({
|
|
61654
|
+
kind: z50.literal("page"),
|
|
61418
61655
|
pageId: designPageIdSchema
|
|
61419
61656
|
}).strict()
|
|
61420
61657
|
]);
|
|
61421
61658
|
function validateBlockSequence(snapshots, ctx) {
|
|
61422
|
-
for (const
|
|
61423
|
-
ctx.addIssue(
|
|
61659
|
+
for (const issue2 of collectBlockSequenceIssues(snapshots)) {
|
|
61660
|
+
ctx.addIssue(issue2);
|
|
61424
61661
|
}
|
|
61425
61662
|
}
|
|
61426
61663
|
function collectBlockSequenceIssues(snapshots) {
|
|
@@ -61431,7 +61668,7 @@ function collectBlockSequenceIssues(snapshots) {
|
|
|
61431
61668
|
snapshots.forEach((snapshot, index) => {
|
|
61432
61669
|
if (seenBlockIds.has(snapshot.blockId)) {
|
|
61433
61670
|
issues.push({
|
|
61434
|
-
code:
|
|
61671
|
+
code: z50.ZodIssueCode.custom,
|
|
61435
61672
|
message: `Duplicate blockId in page design blockSequence: ${snapshot.blockId}`,
|
|
61436
61673
|
path: [index, "blockId"]
|
|
61437
61674
|
});
|
|
@@ -61440,7 +61677,7 @@ function collectBlockSequenceIssues(snapshots) {
|
|
|
61440
61677
|
const orderIndex = snapshot.orderIndex;
|
|
61441
61678
|
if (seenOrderIndexes.has(orderIndex)) {
|
|
61442
61679
|
issues.push({
|
|
61443
|
-
code:
|
|
61680
|
+
code: z50.ZodIssueCode.custom,
|
|
61444
61681
|
message: `Duplicate orderIndex in page design blockSequence: ${String(orderIndex)}`,
|
|
61445
61682
|
path: [index, "orderIndex"]
|
|
61446
61683
|
});
|
|
@@ -61448,7 +61685,7 @@ function collectBlockSequenceIssues(snapshots) {
|
|
|
61448
61685
|
seenOrderIndexes.add(orderIndex);
|
|
61449
61686
|
if (previousOrderIndex !== null && orderIndex <= previousOrderIndex) {
|
|
61450
61687
|
issues.push({
|
|
61451
|
-
code:
|
|
61688
|
+
code: z50.ZodIssueCode.custom,
|
|
61452
61689
|
message: `Expected orderIndex greater than ${String(previousOrderIndex)} for blockSequence position ${String(index)}; received ${String(orderIndex)}.`,
|
|
61453
61690
|
path: [index, "orderIndex"]
|
|
61454
61691
|
});
|
|
@@ -61504,7 +61741,7 @@ var pageFlowPresets = [
|
|
|
61504
61741
|
init_styleTags();
|
|
61505
61742
|
|
|
61506
61743
|
// ../theme-core/src/site-styles/tokenRecipes.ts
|
|
61507
|
-
import { z as
|
|
61744
|
+
import { z as z51 } from "zod";
|
|
61508
61745
|
var themeTokenRecipeOptions = {
|
|
61509
61746
|
palette: ["brand-led", "warm-neutral", "high-contrast", "soft-natural"],
|
|
61510
61747
|
contrast: ["standard", "strong", "maximum"],
|
|
@@ -61519,14 +61756,14 @@ var themeTokenRecipeOptions = {
|
|
|
61519
61756
|
spacing: ["compact", "regular", "airy"],
|
|
61520
61757
|
motion: ["none", "subtle", "expressive"]
|
|
61521
61758
|
};
|
|
61522
|
-
var themeTokenRecipesSchema =
|
|
61523
|
-
palette:
|
|
61524
|
-
contrast:
|
|
61525
|
-
radius:
|
|
61526
|
-
shadow:
|
|
61527
|
-
typography:
|
|
61528
|
-
spacing:
|
|
61529
|
-
motion:
|
|
61759
|
+
var themeTokenRecipesSchema = z51.object({
|
|
61760
|
+
palette: z51.enum(themeTokenRecipeOptions.palette),
|
|
61761
|
+
contrast: z51.enum(themeTokenRecipeOptions.contrast),
|
|
61762
|
+
radius: z51.enum(themeTokenRecipeOptions.radius),
|
|
61763
|
+
shadow: z51.enum(themeTokenRecipeOptions.shadow),
|
|
61764
|
+
typography: z51.enum(themeTokenRecipeOptions.typography),
|
|
61765
|
+
spacing: z51.enum(themeTokenRecipeOptions.spacing),
|
|
61766
|
+
motion: z51.enum(themeTokenRecipeOptions.motion)
|
|
61530
61767
|
});
|
|
61531
61768
|
|
|
61532
61769
|
// ../blocks/src/system/designCapabilities.ts
|
|
@@ -61778,7 +62015,7 @@ var bodyTextBlockDefinition = {
|
|
|
61778
62015
|
init_builder();
|
|
61779
62016
|
init_fragments2();
|
|
61780
62017
|
init_defineBlock();
|
|
61781
|
-
import { z as
|
|
62018
|
+
import { z as z52 } from "zod";
|
|
61782
62019
|
var composition = composeFragments([{ fragment: blogFeaturedPostFragment }]);
|
|
61783
62020
|
var blogPostLayout = section(
|
|
61784
62021
|
{ background: "background", className: "rb-px-6 rb-py-12" },
|
|
@@ -61807,17 +62044,17 @@ var blogPostManifest = createBlockManifest({
|
|
|
61807
62044
|
additionalFields: composition.fields,
|
|
61808
62045
|
layout: blogPostLayout
|
|
61809
62046
|
});
|
|
61810
|
-
var blogPostDataSchema =
|
|
61811
|
-
id:
|
|
61812
|
-
title:
|
|
61813
|
-
slug:
|
|
61814
|
-
path:
|
|
61815
|
-
excerpt:
|
|
61816
|
-
image:
|
|
61817
|
-
url:
|
|
61818
|
-
alt:
|
|
62047
|
+
var blogPostDataSchema = z52.object({
|
|
62048
|
+
id: z52.string(),
|
|
62049
|
+
title: z52.string(),
|
|
62050
|
+
slug: z52.string(),
|
|
62051
|
+
path: z52.string(),
|
|
62052
|
+
excerpt: z52.string().nullable().optional(),
|
|
62053
|
+
image: z52.object({
|
|
62054
|
+
url: z52.string().optional().nullable(),
|
|
62055
|
+
alt: z52.string().optional().nullable()
|
|
61819
62056
|
}).nullable().optional(),
|
|
61820
|
-
publishedAt:
|
|
62057
|
+
publishedAt: z52.string().nullable().optional()
|
|
61821
62058
|
});
|
|
61822
62059
|
var blogPostBlockDefinition = {
|
|
61823
62060
|
manifest: blogPostManifest,
|
|
@@ -61832,7 +62069,7 @@ init_schema2();
|
|
|
61832
62069
|
init_builder();
|
|
61833
62070
|
init_fragments();
|
|
61834
62071
|
init_colorStyles();
|
|
61835
|
-
import { z as
|
|
62072
|
+
import { z as z53 } from "zod";
|
|
61836
62073
|
var blogListingDataLoader = {
|
|
61837
62074
|
endpoint: "listPublishedEntries",
|
|
61838
62075
|
params: {
|
|
@@ -62150,24 +62387,24 @@ var blogListingManifest = createBlockManifest({
|
|
|
62150
62387
|
spacing: "lg"
|
|
62151
62388
|
}
|
|
62152
62389
|
});
|
|
62153
|
-
var blogPostListEntrySchema =
|
|
62154
|
-
id:
|
|
62155
|
-
slug:
|
|
62156
|
-
path:
|
|
62157
|
-
title:
|
|
62158
|
-
excerpt:
|
|
62159
|
-
publishedAt:
|
|
62160
|
-
updatedAt:
|
|
62161
|
-
status:
|
|
62162
|
-
image:
|
|
62163
|
-
url:
|
|
62164
|
-
alt:
|
|
62390
|
+
var blogPostListEntrySchema = z53.object({
|
|
62391
|
+
id: z53.string(),
|
|
62392
|
+
slug: z53.string(),
|
|
62393
|
+
path: z53.string(),
|
|
62394
|
+
title: z53.string(),
|
|
62395
|
+
excerpt: z53.string().nullable().optional(),
|
|
62396
|
+
publishedAt: z53.string().nullable().optional(),
|
|
62397
|
+
updatedAt: z53.string(),
|
|
62398
|
+
status: z53.string(),
|
|
62399
|
+
image: z53.object({
|
|
62400
|
+
url: z53.string(),
|
|
62401
|
+
alt: z53.string().nullable().optional()
|
|
62165
62402
|
}).nullable().optional()
|
|
62166
62403
|
});
|
|
62167
62404
|
var blogListingBlockDefinition = {
|
|
62168
62405
|
manifest: blogListingManifest,
|
|
62169
62406
|
dataSchemas: {
|
|
62170
|
-
posts:
|
|
62407
|
+
posts: z53.array(blogPostListEntrySchema).optional()
|
|
62171
62408
|
},
|
|
62172
62409
|
dataLoaders: {
|
|
62173
62410
|
posts: blogListingDataLoader
|
|
@@ -62288,7 +62525,7 @@ init_builder();
|
|
|
62288
62525
|
init_fragments();
|
|
62289
62526
|
|
|
62290
62527
|
// ../blocks/src/system/transforms/registry/formatting.ts
|
|
62291
|
-
import { z as
|
|
62528
|
+
import { z as z54 } from "zod";
|
|
62292
62529
|
var uppercaseTransform = {
|
|
62293
62530
|
id: "string.uppercase",
|
|
62294
62531
|
kind: "string",
|
|
@@ -62299,7 +62536,7 @@ var fallbackTransform = {
|
|
|
62299
62536
|
id: "value.fallback",
|
|
62300
62537
|
kind: "formatter",
|
|
62301
62538
|
summary: "Provide fallback when value is null or undefined",
|
|
62302
|
-
schema:
|
|
62539
|
+
schema: z54.object({ fallback: z54.unknown() }),
|
|
62303
62540
|
run: (value, options) => value === null || value === void 0 || value === "" ? options.fallback : value
|
|
62304
62541
|
};
|
|
62305
62542
|
var dateFormatShort = {
|
|
@@ -62346,8 +62583,8 @@ var jsonArrayTransform = {
|
|
|
62346
62583
|
return "";
|
|
62347
62584
|
}
|
|
62348
62585
|
};
|
|
62349
|
-
var marqueeLoopOptionsSchema =
|
|
62350
|
-
minItems:
|
|
62586
|
+
var marqueeLoopOptionsSchema = z54.object({
|
|
62587
|
+
minItems: z54.number().int().min(1).default(10)
|
|
62351
62588
|
});
|
|
62352
62589
|
var marqueeLoopTransform = {
|
|
62353
62590
|
id: "array.marqueeLoop",
|
|
@@ -62379,7 +62616,7 @@ init_core2();
|
|
|
62379
62616
|
init_colorStyles();
|
|
62380
62617
|
init_blockColorTokens();
|
|
62381
62618
|
init_sectionState_shared();
|
|
62382
|
-
import { z as
|
|
62619
|
+
import { z as z55 } from "zod";
|
|
62383
62620
|
var joinClasses6 = (parts) => parts.filter(
|
|
62384
62621
|
(part) => typeof part === "string" && part.trim().length > 0
|
|
62385
62622
|
).join(" ").replace(/\s+/g, " ").trim();
|
|
@@ -62439,8 +62676,8 @@ function getNavStyleClasses(navStyle) {
|
|
|
62439
62676
|
return baseClasses;
|
|
62440
62677
|
}
|
|
62441
62678
|
}
|
|
62442
|
-
var headerNavClassOptionsSchema =
|
|
62443
|
-
base:
|
|
62679
|
+
var headerNavClassOptionsSchema = z55.object({
|
|
62680
|
+
base: z55.string().optional()
|
|
62444
62681
|
});
|
|
62445
62682
|
var headerNavLinkClassTransform = {
|
|
62446
62683
|
id: "ui.headerNavLinkClass",
|
|
@@ -62486,7 +62723,7 @@ var sectionStateToneTransform = {
|
|
|
62486
62723
|
summary: "Map semantic section-state kind to feedback tone",
|
|
62487
62724
|
run: (value) => sectionStateToneFromUnknown(value)
|
|
62488
62725
|
};
|
|
62489
|
-
function
|
|
62726
|
+
function isPlainObject3(value) {
|
|
62490
62727
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
62491
62728
|
}
|
|
62492
62729
|
function readString(obj, key) {
|
|
@@ -62523,8 +62760,8 @@ function resolveHeroContentMaxWidth(content) {
|
|
|
62523
62760
|
return raw;
|
|
62524
62761
|
return "default";
|
|
62525
62762
|
}
|
|
62526
|
-
var heroContentWrapperClassSchema =
|
|
62527
|
-
base:
|
|
62763
|
+
var heroContentWrapperClassSchema = z55.object({
|
|
62764
|
+
base: z55.string().optional()
|
|
62528
62765
|
});
|
|
62529
62766
|
var heroContentWrapperClassTransform = {
|
|
62530
62767
|
id: "ui.heroContentWrapperClass",
|
|
@@ -62532,7 +62769,7 @@ var heroContentWrapperClassTransform = {
|
|
|
62532
62769
|
summary: "Resolve hero content wrapper className from alignment + max width controls",
|
|
62533
62770
|
schema: heroContentWrapperClassSchema,
|
|
62534
62771
|
run: (value, options, context) => {
|
|
62535
|
-
const content =
|
|
62772
|
+
const content = isPlainObject3(value) ? value : isPlainObject3(context.data) ? context.data : {};
|
|
62536
62773
|
const alignment = resolveHeroContentAlignment(content);
|
|
62537
62774
|
const maxWidth = resolveHeroContentMaxWidth(content);
|
|
62538
62775
|
const textAlignClass = alignment === "center" ? "rb-text-center" : alignment === "right" ? "rb-text-right" : "rb-text-left";
|
|
@@ -62551,7 +62788,7 @@ var heroCtaJustifyTransform = {
|
|
|
62551
62788
|
kind: "string",
|
|
62552
62789
|
summary: "Map hero contentAlignment to CTA row justify value",
|
|
62553
62790
|
run: (value, _options, context) => {
|
|
62554
|
-
const content =
|
|
62791
|
+
const content = isPlainObject3(value) ? value : isPlainObject3(context.data) ? context.data : {};
|
|
62555
62792
|
const alignment = resolveHeroContentAlignment(content);
|
|
62556
62793
|
return alignment === "left" ? "start" : alignment === "right" ? "end" : "center";
|
|
62557
62794
|
}
|
|
@@ -62561,13 +62798,13 @@ var heroStackJustifyFromVerticalAlignmentTransform = {
|
|
|
62561
62798
|
kind: "string",
|
|
62562
62799
|
summary: "Map hero verticalAlignment to stack justify value",
|
|
62563
62800
|
run: (value, _options, context) => {
|
|
62564
|
-
const content =
|
|
62801
|
+
const content = isPlainObject3(value) ? value : isPlainObject3(context.data) ? context.data : {};
|
|
62565
62802
|
const vertical = resolveHeroVerticalAlignment(content);
|
|
62566
62803
|
return vertical === "top" ? "start" : vertical === "bottom" ? "end" : "center";
|
|
62567
62804
|
}
|
|
62568
62805
|
};
|
|
62569
|
-
var heroGridClassFromVerticalAlignmentSchema =
|
|
62570
|
-
base:
|
|
62806
|
+
var heroGridClassFromVerticalAlignmentSchema = z55.object({
|
|
62807
|
+
base: z55.string()
|
|
62571
62808
|
});
|
|
62572
62809
|
var heroGridClassFromVerticalAlignmentTransform = {
|
|
62573
62810
|
id: "ui.heroGridClassFromVerticalAlignment",
|
|
@@ -62575,16 +62812,16 @@ var heroGridClassFromVerticalAlignmentTransform = {
|
|
|
62575
62812
|
summary: "Append align-items class for hero split layouts based on verticalAlignment",
|
|
62576
62813
|
schema: heroGridClassFromVerticalAlignmentSchema,
|
|
62577
62814
|
run: (value, options, context) => {
|
|
62578
|
-
const content =
|
|
62815
|
+
const content = isPlainObject3(value) ? value : isPlainObject3(context.data) ? context.data : {};
|
|
62579
62816
|
const vertical = resolveHeroVerticalAlignment(content);
|
|
62580
62817
|
const itemsClass = vertical === "top" ? "rb-items-start" : vertical === "bottom" ? "rb-items-end" : "rb-items-center";
|
|
62581
62818
|
return joinClasses6([options.base, itemsClass]);
|
|
62582
62819
|
}
|
|
62583
62820
|
};
|
|
62584
|
-
var imageFragmentClassOptionsSchema =
|
|
62585
|
-
base:
|
|
62586
|
-
whenAuto:
|
|
62587
|
-
whenFixed:
|
|
62821
|
+
var imageFragmentClassOptionsSchema = z55.object({
|
|
62822
|
+
base: z55.string(),
|
|
62823
|
+
whenAuto: z55.string(),
|
|
62824
|
+
whenFixed: z55.string()
|
|
62588
62825
|
});
|
|
62589
62826
|
var imageFragmentClassTransform = {
|
|
62590
62827
|
id: "ui.imageFragmentClass",
|
|
@@ -62600,9 +62837,9 @@ var imageFragmentClassTransform = {
|
|
|
62600
62837
|
]);
|
|
62601
62838
|
}
|
|
62602
62839
|
};
|
|
62603
|
-
var imageFragmentSizeOptionsSchema =
|
|
62604
|
-
max:
|
|
62605
|
-
quality:
|
|
62840
|
+
var imageFragmentSizeOptionsSchema = z55.object({
|
|
62841
|
+
max: z55.number().int().positive().default(1920),
|
|
62842
|
+
quality: z55.number().int().min(1).max(100).default(85)
|
|
62606
62843
|
});
|
|
62607
62844
|
var imageFragmentSizeTransform = {
|
|
62608
62845
|
id: "ui.imageFragmentSize",
|
|
@@ -62622,9 +62859,9 @@ var imageFragmentSizeTransform = {
|
|
|
62622
62859
|
return { width, height, quality, resize: "cover" };
|
|
62623
62860
|
}
|
|
62624
62861
|
};
|
|
62625
|
-
var conditionalClassOptionsSchema =
|
|
62626
|
-
whenTrue:
|
|
62627
|
-
whenFalse:
|
|
62862
|
+
var conditionalClassOptionsSchema = z55.object({
|
|
62863
|
+
whenTrue: z55.string(),
|
|
62864
|
+
whenFalse: z55.string()
|
|
62628
62865
|
});
|
|
62629
62866
|
var conditionalClassTransform = {
|
|
62630
62867
|
id: "ui.conditionalClass",
|
|
@@ -62636,9 +62873,9 @@ var conditionalClassTransform = {
|
|
|
62636
62873
|
return isTrue ? options.whenTrue : options.whenFalse;
|
|
62637
62874
|
}
|
|
62638
62875
|
};
|
|
62639
|
-
var twoColumnContainerClassOptionsSchema =
|
|
62640
|
-
base:
|
|
62641
|
-
reverseClass:
|
|
62876
|
+
var twoColumnContainerClassOptionsSchema = z55.object({
|
|
62877
|
+
base: z55.string(),
|
|
62878
|
+
reverseClass: z55.string()
|
|
62642
62879
|
});
|
|
62643
62880
|
var twoColumnContainerClassTransform = {
|
|
62644
62881
|
id: "ui.twoColumnContainerClass",
|
|
@@ -62653,8 +62890,8 @@ var twoColumnContainerClassTransform = {
|
|
|
62653
62890
|
]);
|
|
62654
62891
|
}
|
|
62655
62892
|
};
|
|
62656
|
-
var twoColumnFlexBasisOptionsSchema =
|
|
62657
|
-
side:
|
|
62893
|
+
var twoColumnFlexBasisOptionsSchema = z55.object({
|
|
62894
|
+
side: z55.enum(["image", "text"])
|
|
62658
62895
|
});
|
|
62659
62896
|
var twoColumnFlexBasisTransform = {
|
|
62660
62897
|
id: "ui.twoColumnFlexBasis",
|
|
@@ -62668,8 +62905,8 @@ var twoColumnFlexBasisTransform = {
|
|
|
62668
62905
|
return `${percent}%`;
|
|
62669
62906
|
}
|
|
62670
62907
|
};
|
|
62671
|
-
var columnsDesktopSpanClassOptionsSchema =
|
|
62672
|
-
base:
|
|
62908
|
+
var columnsDesktopSpanClassOptionsSchema = z55.object({
|
|
62909
|
+
base: z55.string().optional()
|
|
62673
62910
|
});
|
|
62674
62911
|
var columnsDesktopSpanClassTransform = {
|
|
62675
62912
|
id: "ui.columnsDesktopSpanClass",
|
|
@@ -62711,8 +62948,8 @@ var columnsColsAtTransform = {
|
|
|
62711
62948
|
id: "ui.columnsColsAt",
|
|
62712
62949
|
kind: "formatter",
|
|
62713
62950
|
summary: "Resolve columns count for a specific breakpoint",
|
|
62714
|
-
schema:
|
|
62715
|
-
breakpoint:
|
|
62951
|
+
schema: z55.object({
|
|
62952
|
+
breakpoint: z55.enum(["mobile", "md", "lg", "xl"])
|
|
62716
62953
|
}),
|
|
62717
62954
|
run: (value, options) => {
|
|
62718
62955
|
const content = asPartialObject(value) ?? {};
|
|
@@ -62839,14 +63076,14 @@ var uiTransforms = [
|
|
|
62839
63076
|
init_colorConversion();
|
|
62840
63077
|
init_core2();
|
|
62841
63078
|
init_colorStyles();
|
|
62842
|
-
import { z as
|
|
63079
|
+
import { z as z56 } from "zod";
|
|
62843
63080
|
var joinClasses7 = (parts) => parts.filter(
|
|
62844
63081
|
(part) => typeof part === "string" && part.trim().length > 0
|
|
62845
63082
|
).join(" ").replace(/\s+/g, " ").trim();
|
|
62846
|
-
var maxWidthClassSchema =
|
|
62847
|
-
base:
|
|
62848
|
-
container:
|
|
62849
|
-
full:
|
|
63083
|
+
var maxWidthClassSchema = z56.object({
|
|
63084
|
+
base: z56.string().optional(),
|
|
63085
|
+
container: z56.string().optional(),
|
|
63086
|
+
full: z56.string().optional()
|
|
62850
63087
|
});
|
|
62851
63088
|
var maxWidthClassTransform = {
|
|
62852
63089
|
id: "layout.maxWidthClass",
|
|
@@ -62862,11 +63099,11 @@ var maxWidthClassTransform = {
|
|
|
62862
63099
|
return joinClasses7([base, chosen]);
|
|
62863
63100
|
}
|
|
62864
63101
|
};
|
|
62865
|
-
var headerRootClassSchema =
|
|
62866
|
-
base:
|
|
62867
|
-
sticky:
|
|
62868
|
-
stickyTransparent:
|
|
62869
|
-
invert:
|
|
63102
|
+
var headerRootClassSchema = z56.object({
|
|
63103
|
+
base: z56.string().optional(),
|
|
63104
|
+
sticky: z56.string().optional(),
|
|
63105
|
+
stickyTransparent: z56.string().optional(),
|
|
63106
|
+
invert: z56.string().optional()
|
|
62870
63107
|
});
|
|
62871
63108
|
function resolveBackgroundVisualStyles(backgroundColor, tokens, defaultToken = "surface") {
|
|
62872
63109
|
const backgroundToken = typeof backgroundColor === "string" && backgroundColor.trim().length > 0 ? backgroundColor : defaultToken;
|
|
@@ -62987,11 +63224,11 @@ var headerRootClassTransform = {
|
|
|
62987
63224
|
return joinClasses7(classes);
|
|
62988
63225
|
}
|
|
62989
63226
|
};
|
|
62990
|
-
var footerRootClassSchema =
|
|
62991
|
-
base:
|
|
62992
|
-
surface:
|
|
62993
|
-
tokenPrefix:
|
|
62994
|
-
transparent:
|
|
63227
|
+
var footerRootClassSchema = z56.object({
|
|
63228
|
+
base: z56.string().optional(),
|
|
63229
|
+
surface: z56.string().optional(),
|
|
63230
|
+
tokenPrefix: z56.string().optional(),
|
|
63231
|
+
transparent: z56.string().optional()
|
|
62995
63232
|
});
|
|
62996
63233
|
var footerRootClassTransform = {
|
|
62997
63234
|
id: "layout.footerRootClass",
|
|
@@ -63095,8 +63332,8 @@ var footerAlignClassMap = {
|
|
|
63095
63332
|
end: "rb-justify-end",
|
|
63096
63333
|
"space-between": "rb-justify-between"
|
|
63097
63334
|
};
|
|
63098
|
-
var footerBottomBarClassSchema =
|
|
63099
|
-
base:
|
|
63335
|
+
var footerBottomBarClassSchema = z56.object({
|
|
63336
|
+
base: z56.string().optional()
|
|
63100
63337
|
});
|
|
63101
63338
|
var footerBottomBarClassTransform = {
|
|
63102
63339
|
id: "layout.footerBottomBarClass",
|
|
@@ -63118,10 +63355,10 @@ var footerBottomBarClassTransform = {
|
|
|
63118
63355
|
]);
|
|
63119
63356
|
}
|
|
63120
63357
|
};
|
|
63121
|
-
var footerBottomBarContainerClassSchema =
|
|
63122
|
-
base:
|
|
63123
|
-
fullBleed:
|
|
63124
|
-
contained:
|
|
63358
|
+
var footerBottomBarContainerClassSchema = z56.object({
|
|
63359
|
+
base: z56.string().optional(),
|
|
63360
|
+
fullBleed: z56.string().optional(),
|
|
63361
|
+
contained: z56.string().optional()
|
|
63125
63362
|
});
|
|
63126
63363
|
var footerBottomBarContainerClassTransform = {
|
|
63127
63364
|
id: "layout.footerBottomBarContainerClass",
|
|
@@ -63206,8 +63443,8 @@ var footerSplitNavSingleClassTransform = {
|
|
|
63206
63443
|
]);
|
|
63207
63444
|
}
|
|
63208
63445
|
};
|
|
63209
|
-
var footerLogoClassSchema =
|
|
63210
|
-
base:
|
|
63446
|
+
var footerLogoClassSchema = z56.object({
|
|
63447
|
+
base: z56.string().optional()
|
|
63211
63448
|
});
|
|
63212
63449
|
var footerLogoClassTransform = {
|
|
63213
63450
|
id: "layout.footerLogoClass",
|
|
@@ -63229,8 +63466,8 @@ var footerLogoClassTransform = {
|
|
|
63229
63466
|
]);
|
|
63230
63467
|
}
|
|
63231
63468
|
};
|
|
63232
|
-
var footerLogoMediaClassSchema =
|
|
63233
|
-
base:
|
|
63469
|
+
var footerLogoMediaClassSchema = z56.object({
|
|
63470
|
+
base: z56.string().optional()
|
|
63234
63471
|
});
|
|
63235
63472
|
var footerLogoMediaClassTransform = {
|
|
63236
63473
|
id: "layout.footerLogoMediaClass",
|
|
@@ -63284,12 +63521,12 @@ var layoutTransforms = [
|
|
|
63284
63521
|
];
|
|
63285
63522
|
|
|
63286
63523
|
// ../blocks/src/system/transforms/registry/media.ts
|
|
63287
|
-
import { z as
|
|
63288
|
-
var mediaFromUrlOptionsSchema =
|
|
63289
|
-
width:
|
|
63290
|
-
height:
|
|
63291
|
-
quality:
|
|
63292
|
-
resize:
|
|
63524
|
+
import { z as z57 } from "zod";
|
|
63525
|
+
var mediaFromUrlOptionsSchema = z57.object({
|
|
63526
|
+
width: z57.number().int().positive().optional(),
|
|
63527
|
+
height: z57.number().int().positive().optional(),
|
|
63528
|
+
quality: z57.number().int().min(1).max(100).optional(),
|
|
63529
|
+
resize: z57.enum(["cover", "contain", "fill"]).optional()
|
|
63293
63530
|
});
|
|
63294
63531
|
function maybeBuildSupabaseTransformUrl(inputUrl, options) {
|
|
63295
63532
|
const width = options.width;
|
|
@@ -63338,10 +63575,10 @@ var mediaTransforms = [mediaFromUrl];
|
|
|
63338
63575
|
|
|
63339
63576
|
// ../blocks/src/system/transforms/registry/content.ts
|
|
63340
63577
|
init_typeGuards2();
|
|
63341
|
-
import { z as
|
|
63342
|
-
var supportedRichTextTokenSchema =
|
|
63343
|
-
var interpolateRichTextTokensOptionsSchema =
|
|
63344
|
-
tokens:
|
|
63578
|
+
import { z as z58 } from "zod";
|
|
63579
|
+
var supportedRichTextTokenSchema = z58.enum(["year", "site_name"]);
|
|
63580
|
+
var interpolateRichTextTokensOptionsSchema = z58.object({
|
|
63581
|
+
tokens: z58.array(supportedRichTextTokenSchema).default(["year", "site_name"])
|
|
63345
63582
|
});
|
|
63346
63583
|
var richTextTokenPattern = /\{\{\s*([a-zA-Z0-9_]+)\s*\}\}/g;
|
|
63347
63584
|
function getSiteName(context) {
|
|
@@ -65176,7 +65413,7 @@ init_fragments();
|
|
|
65176
65413
|
init_boxStyles2();
|
|
65177
65414
|
init_defineBlock();
|
|
65178
65415
|
init_api_bindings();
|
|
65179
|
-
import { z as
|
|
65416
|
+
import { z as z59 } from "zod";
|
|
65180
65417
|
var appointmentBookingManifest = createBlockManifest({
|
|
65181
65418
|
id: "block.appointment-booking",
|
|
65182
65419
|
version: "2.0.0",
|
|
@@ -65252,11 +65489,11 @@ var appointmentBookingManifest = createBlockManifest({
|
|
|
65252
65489
|
})
|
|
65253
65490
|
]
|
|
65254
65491
|
});
|
|
65255
|
-
var availabilityDataSchema =
|
|
65256
|
-
slots:
|
|
65257
|
-
startAt:
|
|
65258
|
-
endAt:
|
|
65259
|
-
resourceId:
|
|
65492
|
+
var availabilityDataSchema = z59.object({
|
|
65493
|
+
slots: z59.array(z59.object({
|
|
65494
|
+
startAt: z59.string(),
|
|
65495
|
+
endAt: z59.string(),
|
|
65496
|
+
resourceId: z59.string()
|
|
65260
65497
|
}))
|
|
65261
65498
|
});
|
|
65262
65499
|
var appointmentBookingBlockDefinition = {
|
|
@@ -65292,7 +65529,7 @@ init_fragments();
|
|
|
65292
65529
|
init_shared4();
|
|
65293
65530
|
init_shop_shared();
|
|
65294
65531
|
init_defineBlock();
|
|
65295
|
-
import { z as
|
|
65532
|
+
import { z as z60 } from "zod";
|
|
65296
65533
|
var eventDetailsManifest = createBlockManifest({
|
|
65297
65534
|
id: "block.event-details",
|
|
65298
65535
|
version: "1.0.0",
|
|
@@ -65421,22 +65658,22 @@ var eventDetailsManifest = createBlockManifest({
|
|
|
65421
65658
|
})
|
|
65422
65659
|
]
|
|
65423
65660
|
});
|
|
65424
|
-
var occurrenceContextSchema2 =
|
|
65425
|
-
id:
|
|
65426
|
-
seriesId:
|
|
65427
|
-
startsAt:
|
|
65428
|
-
endsAt:
|
|
65429
|
-
timeZone:
|
|
65430
|
-
capacityOverride:
|
|
65431
|
-
overrides:
|
|
65661
|
+
var occurrenceContextSchema2 = z60.object({
|
|
65662
|
+
id: z60.string(),
|
|
65663
|
+
seriesId: z60.string(),
|
|
65664
|
+
startsAt: z60.string(),
|
|
65665
|
+
endsAt: z60.string(),
|
|
65666
|
+
timeZone: z60.string(),
|
|
65667
|
+
capacityOverride: z60.number().nullable().optional(),
|
|
65668
|
+
overrides: z60.record(z60.string(), z60.unknown()).nullable().optional()
|
|
65432
65669
|
}).nullable();
|
|
65433
65670
|
var eventDetailsBlockDefinition = {
|
|
65434
65671
|
manifest: eventDetailsManifest,
|
|
65435
65672
|
dataSchemas: {
|
|
65436
|
-
eventDetailsData:
|
|
65673
|
+
eventDetailsData: z60.object({
|
|
65437
65674
|
events: publicEventsArraySchema,
|
|
65438
|
-
sitePasses:
|
|
65439
|
-
siteMemberships:
|
|
65675
|
+
sitePasses: z60.object({ passes: z60.array(publicPassProductSchema) }),
|
|
65676
|
+
siteMemberships: z60.object({ memberships: z60.array(publicMembershipProductSchema) })
|
|
65440
65677
|
}).optional(),
|
|
65441
65678
|
occurrenceContext: occurrenceContextSchema2.optional()
|
|
65442
65679
|
},
|
|
@@ -65779,7 +66016,7 @@ init_builder();
|
|
|
65779
66016
|
init_fragments();
|
|
65780
66017
|
init_defineBlock();
|
|
65781
66018
|
init_colorStyles();
|
|
65782
|
-
import { z as
|
|
66019
|
+
import { z as z61 } from "zod";
|
|
65783
66020
|
var embedFields = [
|
|
65784
66021
|
// Section heading
|
|
65785
66022
|
parseFieldDefinition({
|
|
@@ -66010,18 +66247,18 @@ var embedManifest = createBlockManifest({
|
|
|
66010
66247
|
spacing: "lg"
|
|
66011
66248
|
}
|
|
66012
66249
|
});
|
|
66013
|
-
var embedEntrySchema =
|
|
66014
|
-
id:
|
|
66015
|
-
identifier:
|
|
66016
|
-
title:
|
|
66017
|
-
slug:
|
|
66018
|
-
content:
|
|
66019
|
-
publishedAt:
|
|
66250
|
+
var embedEntrySchema = z61.object({
|
|
66251
|
+
id: z61.string(),
|
|
66252
|
+
identifier: z61.string(),
|
|
66253
|
+
title: z61.string(),
|
|
66254
|
+
slug: z61.string().nullable().optional(),
|
|
66255
|
+
content: z61.record(z61.string(), z61.unknown()).optional(),
|
|
66256
|
+
publishedAt: z61.string().nullable().optional()
|
|
66020
66257
|
});
|
|
66021
66258
|
var embedBlockDefinition = {
|
|
66022
66259
|
manifest: embedManifest,
|
|
66023
66260
|
dataSchemas: {
|
|
66024
|
-
entries:
|
|
66261
|
+
entries: z61.array(embedEntrySchema).optional()
|
|
66025
66262
|
},
|
|
66026
66263
|
dataLoaders: {
|
|
66027
66264
|
entries: {
|
|
@@ -67230,24 +67467,24 @@ init_schema2();
|
|
|
67230
67467
|
init_defineBlock();
|
|
67231
67468
|
init_builder();
|
|
67232
67469
|
init_fragments();
|
|
67233
|
-
import { z as
|
|
67470
|
+
import { z as z62 } from "zod";
|
|
67234
67471
|
init_media2();
|
|
67235
67472
|
var ITEM_NAME2 = "member";
|
|
67236
67473
|
var teamMemberPhotoSchema = mediaSchema.refine((media2) => media2.type === "image", {
|
|
67237
67474
|
message: "Team member photos must be image media"
|
|
67238
67475
|
}).nullable();
|
|
67239
|
-
var teamMemberDataSchema =
|
|
67240
|
-
_type:
|
|
67241
|
-
id:
|
|
67242
|
-
name:
|
|
67243
|
-
role:
|
|
67244
|
-
roleLabel:
|
|
67245
|
-
bio:
|
|
67246
|
-
summary:
|
|
67476
|
+
var teamMemberDataSchema = z62.object({
|
|
67477
|
+
_type: z62.literal("teamMember"),
|
|
67478
|
+
id: z62.string(),
|
|
67479
|
+
name: z62.string(),
|
|
67480
|
+
role: z62.string().nullable(),
|
|
67481
|
+
roleLabel: z62.string().nullable(),
|
|
67482
|
+
bio: z62.string().nullable(),
|
|
67483
|
+
summary: z62.string().nullable(),
|
|
67247
67484
|
photo: teamMemberPhotoSchema,
|
|
67248
|
-
profilePath:
|
|
67485
|
+
profilePath: z62.string().nullable()
|
|
67249
67486
|
});
|
|
67250
|
-
var teamMembersDataSchema =
|
|
67487
|
+
var teamMembersDataSchema = z62.array(teamMemberDataSchema);
|
|
67251
67488
|
var dynamicSourceWhen = { equals: "site_staff" };
|
|
67252
67489
|
var manualSourceWhen = { equals: "site_staff", not: true };
|
|
67253
67490
|
var headingNode = text(
|
|
@@ -68779,7 +69016,7 @@ function readFromSource(source, segments) {
|
|
|
68779
69016
|
return void 0;
|
|
68780
69017
|
}, source);
|
|
68781
69018
|
}
|
|
68782
|
-
function
|
|
69019
|
+
function isPlainObject4(value) {
|
|
68783
69020
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
68784
69021
|
}
|
|
68785
69022
|
function parseRouteEntry(routeId, value) {
|
|
@@ -68789,35 +69026,35 @@ function parseRouteEntry(routeId, value) {
|
|
|
68789
69026
|
if (typeof value === "string") {
|
|
68790
69027
|
return [routeId, value];
|
|
68791
69028
|
}
|
|
68792
|
-
if (
|
|
69029
|
+
if (isPlainObject4(value)) {
|
|
68793
69030
|
return [routeId, value];
|
|
68794
69031
|
}
|
|
68795
69032
|
return null;
|
|
68796
69033
|
}
|
|
68797
69034
|
function extractRouteMapFromViewModel(viewModel) {
|
|
68798
|
-
if (!
|
|
69035
|
+
if (!isPlainObject4(viewModel)) return void 0;
|
|
68799
69036
|
const root = viewModel.$root;
|
|
68800
|
-
if (!
|
|
69037
|
+
if (!isPlainObject4(root)) return void 0;
|
|
68801
69038
|
const routes = root.routes;
|
|
68802
|
-
if (!
|
|
69039
|
+
if (!isPlainObject4(routes)) return void 0;
|
|
68803
69040
|
const entries = Object.entries(routes).map(([routeId, value]) => parseRouteEntry(routeId, value)).filter((entry) => entry !== null);
|
|
68804
69041
|
if (entries.length === 0) return void 0;
|
|
68805
69042
|
return Object.fromEntries(entries);
|
|
68806
69043
|
}
|
|
68807
69044
|
function extractPagesByIdentifierFromViewModel(viewModel) {
|
|
68808
|
-
if (!
|
|
69045
|
+
if (!isPlainObject4(viewModel)) return void 0;
|
|
68809
69046
|
const root = viewModel.$root;
|
|
68810
|
-
if (!
|
|
69047
|
+
if (!isPlainObject4(root)) return void 0;
|
|
68811
69048
|
const pagesByIdentifier = root.pagesByIdentifier;
|
|
68812
|
-
if (!
|
|
69049
|
+
if (!isPlainObject4(pagesByIdentifier)) return void 0;
|
|
68813
69050
|
return pagesByIdentifier;
|
|
68814
69051
|
}
|
|
68815
69052
|
function extractEntriesByIdentifierFromViewModel(viewModel) {
|
|
68816
|
-
if (!
|
|
69053
|
+
if (!isPlainObject4(viewModel)) return void 0;
|
|
68817
69054
|
const root = viewModel.$root;
|
|
68818
|
-
if (!
|
|
69055
|
+
if (!isPlainObject4(root)) return void 0;
|
|
68819
69056
|
const entriesByIdentifier = root.entriesByIdentifier;
|
|
68820
|
-
if (!
|
|
69057
|
+
if (!isPlainObject4(entriesByIdentifier)) return void 0;
|
|
68821
69058
|
return entriesByIdentifier;
|
|
68822
69059
|
}
|
|
68823
69060
|
function parseBinding(raw, origin) {
|
|
@@ -68833,7 +69070,7 @@ function applyTransformsAndFallback(value, binding, context) {
|
|
|
68833
69070
|
const routeMap = context.routes ?? extractRouteMapFromViewModel(context.viewModel);
|
|
68834
69071
|
const pagesByIdentifier = context.pagesByIdentifier ?? extractPagesByIdentifierFromViewModel(context.viewModel);
|
|
68835
69072
|
const entriesByIdentifier = context.entriesByIdentifier ?? extractEntriesByIdentifierFromViewModel(context.viewModel);
|
|
68836
|
-
const root =
|
|
69073
|
+
const root = isPlainObject4(context.viewModel.$root) ? context.viewModel.$root : null;
|
|
68837
69074
|
const stage = root?.previewStage === "preview" ? "preview" : "published";
|
|
68838
69075
|
const transformed = runTransforms(
|
|
68839
69076
|
value,
|
|
@@ -68870,21 +69107,21 @@ function resolveTransformData(context, bindingPath) {
|
|
|
68870
69107
|
const [first] = segments;
|
|
68871
69108
|
if (typeof first === "string" && first !== "$root") {
|
|
68872
69109
|
const namedScope = context.scopes.find((entry) => entry.name === first);
|
|
68873
|
-
if (namedScope &&
|
|
69110
|
+
if (namedScope && isPlainObject4(namedScope.value)) {
|
|
68874
69111
|
return namedScope.value;
|
|
68875
69112
|
}
|
|
68876
69113
|
}
|
|
68877
69114
|
for (let i = context.scopes.length - 1; i >= 0; i -= 1) {
|
|
68878
69115
|
const scope = context.scopes[i];
|
|
68879
|
-
if (scope &&
|
|
69116
|
+
if (scope && isPlainObject4(scope.value)) {
|
|
68880
69117
|
return scope.value;
|
|
68881
69118
|
}
|
|
68882
69119
|
}
|
|
68883
69120
|
const content = context.viewModel.content;
|
|
68884
|
-
if (
|
|
69121
|
+
if (isPlainObject4(content)) {
|
|
68885
69122
|
return content;
|
|
68886
69123
|
}
|
|
68887
|
-
if (
|
|
69124
|
+
if (isPlainObject4(context.viewModel)) {
|
|
68888
69125
|
return context.viewModel;
|
|
68889
69126
|
}
|
|
68890
69127
|
return void 0;
|
|
@@ -69019,7 +69256,7 @@ function getNestedBinding(bindings, path) {
|
|
|
69019
69256
|
const segments = path.split(".");
|
|
69020
69257
|
let current = bindings;
|
|
69021
69258
|
for (const segment of segments) {
|
|
69022
|
-
if (!
|
|
69259
|
+
if (!isPlainObject4(current)) return void 0;
|
|
69023
69260
|
current = current[segment];
|
|
69024
69261
|
}
|
|
69025
69262
|
return current;
|
|
@@ -69033,7 +69270,7 @@ function resolveBindingToEditorPath(fieldName, bindings, editableRouteMetadataFi
|
|
|
69033
69270
|
};
|
|
69034
69271
|
const binding = bindings[fieldName] ?? getNestedBinding(bindings, fieldName);
|
|
69035
69272
|
if (!binding) return null;
|
|
69036
|
-
if (
|
|
69273
|
+
if (isPlainObject4(binding) && "source" in binding) {
|
|
69037
69274
|
const source = binding.source;
|
|
69038
69275
|
if (source === "field" && "path" in binding) {
|
|
69039
69276
|
const path = binding.path;
|
|
@@ -69052,7 +69289,7 @@ function resolveBindingToEditorPath(fieldName, bindings, editableRouteMetadataFi
|
|
|
69052
69289
|
if (typeof option === "string") {
|
|
69053
69290
|
return `content.${option}`;
|
|
69054
69291
|
}
|
|
69055
|
-
if (
|
|
69292
|
+
if (isPlainObject4(option) && "source" in option) {
|
|
69056
69293
|
const optSource = option.source;
|
|
69057
69294
|
if (optSource === "field" && "path" in option) {
|
|
69058
69295
|
const path = option.path;
|
|
@@ -69097,7 +69334,7 @@ function injectEditorPath(props2, node, parsedBinding, context) {
|
|
|
69097
69334
|
}
|
|
69098
69335
|
}
|
|
69099
69336
|
const root = context.viewModel?.$root;
|
|
69100
|
-
const isEntryTemplatePage =
|
|
69337
|
+
const isEntryTemplatePage = isPlainObject4(root) && root.contentEntry != null;
|
|
69101
69338
|
if (isEntryTemplatePage && context.pathBase) return props2;
|
|
69102
69339
|
const prefix = context.pathBase ?? "";
|
|
69103
69340
|
const injectedPath = `${prefix}${fieldPath}`;
|
|
@@ -69126,7 +69363,7 @@ function injectMediaSlotPath(props2, node, parsedBinding, context) {
|
|
|
69126
69363
|
if (entryPath) return props2;
|
|
69127
69364
|
}
|
|
69128
69365
|
const root = context.viewModel?.$root;
|
|
69129
|
-
const isEntryTemplatePage =
|
|
69366
|
+
const isEntryTemplatePage = isPlainObject4(root) && root.contentEntry != null;
|
|
69130
69367
|
if (isEntryTemplatePage && context.pathBase) return props2;
|
|
69131
69368
|
return {
|
|
69132
69369
|
...props2,
|
|
@@ -69230,7 +69467,7 @@ function getNodeProps(node) {
|
|
|
69230
69467
|
if (key.startsWith("$")) continue;
|
|
69231
69468
|
legacy[key] = value;
|
|
69232
69469
|
}
|
|
69233
|
-
const props2 =
|
|
69470
|
+
const props2 = isPlainObject4(node.props) ? node.props : {};
|
|
69234
69471
|
return { ...legacy, ...props2 };
|
|
69235
69472
|
}
|
|
69236
69473
|
function resolveTree(node, options) {
|
|
@@ -71365,35 +71602,35 @@ init_blocks();
|
|
|
71365
71602
|
// ../blocks/src/system/runtime/bindings.ts
|
|
71366
71603
|
init_node();
|
|
71367
71604
|
var shouldLogWarnings = isNonProductionEnv();
|
|
71368
|
-
function
|
|
71605
|
+
function isPlainObject5(value) {
|
|
71369
71606
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
71370
71607
|
}
|
|
71371
71608
|
function isRouteMapEntry(value) {
|
|
71372
71609
|
if (typeof value === "string") return true;
|
|
71373
|
-
return
|
|
71610
|
+
return isPlainObject5(value);
|
|
71374
71611
|
}
|
|
71375
71612
|
function isRouteMap(value) {
|
|
71376
|
-
if (!
|
|
71613
|
+
if (!isPlainObject5(value)) return false;
|
|
71377
71614
|
return Object.values(value).every(isRouteMapEntry);
|
|
71378
71615
|
}
|
|
71379
71616
|
function isPageIdentifierMap(value) {
|
|
71380
|
-
if (!
|
|
71617
|
+
if (!isPlainObject5(value)) return false;
|
|
71381
71618
|
return Object.values(value).every((v) => typeof v === "string");
|
|
71382
71619
|
}
|
|
71383
71620
|
function isEntryIdentifierMap(value) {
|
|
71384
|
-
if (!
|
|
71621
|
+
if (!isPlainObject5(value)) return false;
|
|
71385
71622
|
for (const v of Object.values(value)) {
|
|
71386
|
-
if (!
|
|
71623
|
+
if (!isPlainObject5(v)) return false;
|
|
71387
71624
|
if (!Object.values(v).every((inner) => typeof inner === "string")) return false;
|
|
71388
71625
|
}
|
|
71389
71626
|
return true;
|
|
71390
71627
|
}
|
|
71391
71628
|
function buildTransformContext(vm) {
|
|
71392
71629
|
const root = vm.$root;
|
|
71393
|
-
const stage = root &&
|
|
71394
|
-
const routes = root &&
|
|
71395
|
-
const pagesByIdentifier = root &&
|
|
71396
|
-
const entriesByIdentifier = root &&
|
|
71630
|
+
const stage = root && isPlainObject5(root) && root.previewStage === "preview" ? "preview" : "published";
|
|
71631
|
+
const routes = root && isPlainObject5(root) && isRouteMap(root.routes) ? root.routes : void 0;
|
|
71632
|
+
const pagesByIdentifier = root && isPlainObject5(root) && isPageIdentifierMap(root.pagesByIdentifier) ? root.pagesByIdentifier : void 0;
|
|
71633
|
+
const entriesByIdentifier = root && isPlainObject5(root) && isEntryIdentifierMap(root.entriesByIdentifier) ? root.entriesByIdentifier : void 0;
|
|
71397
71634
|
return {
|
|
71398
71635
|
theme: defaultThemeTokens,
|
|
71399
71636
|
stage,
|
|
@@ -78201,60 +78438,60 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
78201
78438
|
};
|
|
78202
78439
|
|
|
78203
78440
|
// ../api/src/navigation/contracts.ts
|
|
78204
|
-
import { z as
|
|
78205
|
-
var portalLinkPayloadSchema =
|
|
78206
|
-
kind:
|
|
78207
|
-
path:
|
|
78208
|
-
labels:
|
|
78209
|
-
loggedOut:
|
|
78210
|
-
loggedIn:
|
|
78441
|
+
import { z as z63 } from "zod";
|
|
78442
|
+
var portalLinkPayloadSchema = z63.object({
|
|
78443
|
+
kind: z63.literal("portal"),
|
|
78444
|
+
path: z63.string().trim().startsWith("/").optional(),
|
|
78445
|
+
labels: z63.object({
|
|
78446
|
+
loggedOut: z63.string().trim().min(1).optional(),
|
|
78447
|
+
loggedIn: z63.string().trim().min(1).optional()
|
|
78211
78448
|
}).optional()
|
|
78212
78449
|
});
|
|
78213
|
-
var cartLinkLabelConfigSchema =
|
|
78214
|
-
|
|
78215
|
-
kind:
|
|
78450
|
+
var cartLinkLabelConfigSchema = z63.discriminatedUnion("kind", [
|
|
78451
|
+
z63.object({
|
|
78452
|
+
kind: z63.literal("icon-only")
|
|
78216
78453
|
}),
|
|
78217
|
-
|
|
78218
|
-
kind:
|
|
78219
|
-
label:
|
|
78454
|
+
z63.object({
|
|
78455
|
+
kind: z63.literal("icon-with-label"),
|
|
78456
|
+
label: z63.string().trim().min(1)
|
|
78220
78457
|
})
|
|
78221
78458
|
]);
|
|
78222
|
-
var cartLinkPayloadSchema =
|
|
78223
|
-
kind:
|
|
78224
|
-
badge:
|
|
78459
|
+
var cartLinkPayloadSchema = z63.object({
|
|
78460
|
+
kind: z63.literal("cart"),
|
|
78461
|
+
badge: z63.enum(["show-count", "hidden"]),
|
|
78225
78462
|
label: cartLinkLabelConfigSchema
|
|
78226
78463
|
});
|
|
78227
|
-
var internalLinkPayloadSchema =
|
|
78228
|
-
kind:
|
|
78229
|
-
routeId:
|
|
78230
|
-
entityId:
|
|
78231
|
-
entityType:
|
|
78232
|
-
href:
|
|
78233
|
-
title:
|
|
78234
|
-
typeLabel:
|
|
78235
|
-
contentTypeKey:
|
|
78236
|
-
contentTypeName:
|
|
78237
|
-
updatedAt:
|
|
78464
|
+
var internalLinkPayloadSchema = z63.object({
|
|
78465
|
+
kind: z63.literal("internal"),
|
|
78466
|
+
routeId: z63.string().uuid(),
|
|
78467
|
+
entityId: z63.string().uuid(),
|
|
78468
|
+
entityType: z63.enum(["page", "content"]),
|
|
78469
|
+
href: z63.string().min(1),
|
|
78470
|
+
title: z63.string().min(1),
|
|
78471
|
+
typeLabel: z63.string().min(1),
|
|
78472
|
+
contentTypeKey: z63.string().nullable().optional(),
|
|
78473
|
+
contentTypeName: z63.string().nullable().optional(),
|
|
78474
|
+
updatedAt: z63.string().nullable().optional()
|
|
78238
78475
|
}).passthrough();
|
|
78239
|
-
var externalLinkSchema2 =
|
|
78240
|
-
kind:
|
|
78476
|
+
var externalLinkSchema2 = z63.object({
|
|
78477
|
+
kind: z63.literal("external"),
|
|
78241
78478
|
// Navigation external links are expected to be absolute URLs.
|
|
78242
|
-
href:
|
|
78479
|
+
href: z63.string().url()
|
|
78243
78480
|
});
|
|
78244
|
-
var customLinkSchema2 =
|
|
78245
|
-
kind:
|
|
78246
|
-
href:
|
|
78481
|
+
var customLinkSchema2 = z63.object({
|
|
78482
|
+
kind: z63.literal("url"),
|
|
78483
|
+
href: z63.string().min(1)
|
|
78247
78484
|
});
|
|
78248
|
-
var pageLinkSchema2 =
|
|
78249
|
-
kind:
|
|
78250
|
-
identifier:
|
|
78485
|
+
var pageLinkSchema2 = z63.object({
|
|
78486
|
+
kind: z63.literal("page"),
|
|
78487
|
+
identifier: z63.string().min(1)
|
|
78251
78488
|
});
|
|
78252
|
-
var entryLinkSchema2 =
|
|
78253
|
-
kind:
|
|
78254
|
-
contentType:
|
|
78255
|
-
identifier:
|
|
78489
|
+
var entryLinkSchema2 = z63.object({
|
|
78490
|
+
kind: z63.literal("entry"),
|
|
78491
|
+
contentType: z63.string().min(1),
|
|
78492
|
+
identifier: z63.string().min(1)
|
|
78256
78493
|
});
|
|
78257
|
-
var linkPayloadSchema =
|
|
78494
|
+
var linkPayloadSchema = z63.discriminatedUnion("kind", [
|
|
78258
78495
|
internalLinkPayloadSchema,
|
|
78259
78496
|
pageLinkSchema2,
|
|
78260
78497
|
entryLinkSchema2,
|
|
@@ -78271,7 +78508,7 @@ var navigationLinkInputSchemaOptions = [
|
|
|
78271
78508
|
portalLinkPayloadSchema,
|
|
78272
78509
|
cartLinkPayloadSchema
|
|
78273
78510
|
];
|
|
78274
|
-
var navigationLinkInputSchema =
|
|
78511
|
+
var navigationLinkInputSchema = z63.discriminatedUnion(
|
|
78275
78512
|
"kind",
|
|
78276
78513
|
navigationLinkInputSchemaOptions
|
|
78277
78514
|
);
|
|
@@ -78279,21 +78516,21 @@ var navigationLinkInputSchema = z62.discriminatedUnion(
|
|
|
78279
78516
|
// ../api/src/sdkConfig/contracts.ts
|
|
78280
78517
|
init_schema2();
|
|
78281
78518
|
init_schema();
|
|
78282
|
-
import { z as
|
|
78519
|
+
import { z as z64 } from "zod";
|
|
78283
78520
|
function unsafeRetypeZodSchema(schema) {
|
|
78284
78521
|
return schema;
|
|
78285
78522
|
}
|
|
78286
|
-
var navIdListSchema =
|
|
78523
|
+
var navIdListSchema = z64.preprocess((value) => {
|
|
78287
78524
|
if (!Array.isArray(value)) return void 0;
|
|
78288
78525
|
const filtered = value.filter((v) => typeof v === "string" && v.trim().length > 0);
|
|
78289
78526
|
return filtered.length > 0 ? filtered : void 0;
|
|
78290
|
-
},
|
|
78291
|
-
var dashboardNavVisibilityBaseSchema =
|
|
78292
|
-
mode:
|
|
78527
|
+
}, z64.array(z64.string()).max(200).optional());
|
|
78528
|
+
var dashboardNavVisibilityBaseSchema = z64.object({
|
|
78529
|
+
mode: z64.enum(["augment", "restrict"]).optional(),
|
|
78293
78530
|
allowIds: navIdListSchema,
|
|
78294
78531
|
denyIds: navIdListSchema
|
|
78295
78532
|
}).strip();
|
|
78296
|
-
var dashboardNavVisibilityRolesSchema =
|
|
78533
|
+
var dashboardNavVisibilityRolesSchema = z64.object({
|
|
78297
78534
|
administrator: dashboardNavVisibilityBaseSchema.optional(),
|
|
78298
78535
|
editor: dashboardNavVisibilityBaseSchema.optional(),
|
|
78299
78536
|
team_member: dashboardNavVisibilityBaseSchema.optional(),
|
|
@@ -78302,57 +78539,57 @@ var dashboardNavVisibilityRolesSchema = z63.object({
|
|
|
78302
78539
|
var dashboardNavVisibilitySchema = dashboardNavVisibilityBaseSchema.extend({
|
|
78303
78540
|
roles: dashboardNavVisibilityRolesSchema
|
|
78304
78541
|
}).strip();
|
|
78305
|
-
var dashboardNavigationConfigSchema =
|
|
78542
|
+
var dashboardNavigationConfigSchema = z64.object({
|
|
78306
78543
|
siteNav: dashboardNavVisibilitySchema.optional(),
|
|
78307
78544
|
settingsNav: dashboardNavVisibilitySchema.optional()
|
|
78308
78545
|
}).strip();
|
|
78309
|
-
var dashboardConfigSchema =
|
|
78310
|
-
previewEditingEnabled:
|
|
78546
|
+
var dashboardConfigSchema = z64.object({
|
|
78547
|
+
previewEditingEnabled: z64.boolean().optional(),
|
|
78311
78548
|
navigation: dashboardNavigationConfigSchema.optional()
|
|
78312
78549
|
}).strip();
|
|
78313
78550
|
var fieldDefinitionInputSchema = unsafeRetypeZodSchema(fieldSchema);
|
|
78314
78551
|
var nodeDefinitionSchema = unsafeRetypeZodSchema(NodeSchema);
|
|
78315
|
-
var sdkLoaderEndpointSchema =
|
|
78316
|
-
var loaderParamBindingSchema =
|
|
78317
|
-
$bind:
|
|
78318
|
-
from:
|
|
78319
|
-
fallback:
|
|
78552
|
+
var sdkLoaderEndpointSchema = z64.enum(SUPPORTED_LOADER_ENDPOINTS);
|
|
78553
|
+
var loaderParamBindingSchema = z64.object({
|
|
78554
|
+
$bind: z64.object({
|
|
78555
|
+
from: z64.string().min(1, "Binding path is required"),
|
|
78556
|
+
fallback: z64.string().optional()
|
|
78320
78557
|
})
|
|
78321
78558
|
});
|
|
78322
|
-
var loaderParamValueSchema =
|
|
78323
|
-
|
|
78324
|
-
|
|
78325
|
-
|
|
78559
|
+
var loaderParamValueSchema = z64.union([
|
|
78560
|
+
z64.string(),
|
|
78561
|
+
z64.number(),
|
|
78562
|
+
z64.boolean(),
|
|
78326
78563
|
loaderParamBindingSchema
|
|
78327
78564
|
]);
|
|
78328
|
-
var sdkConfigLoaderSchema =
|
|
78565
|
+
var sdkConfigLoaderSchema = z64.object({
|
|
78329
78566
|
endpoint: sdkLoaderEndpointSchema,
|
|
78330
|
-
params:
|
|
78331
|
-
mode:
|
|
78567
|
+
params: z64.record(z64.string(), loaderParamValueSchema),
|
|
78568
|
+
mode: z64.enum(["server", "client"]).default("server")
|
|
78332
78569
|
});
|
|
78333
|
-
var sdkDataLoadersSchema =
|
|
78334
|
-
var sdkCustomBlockIdSchema =
|
|
78570
|
+
var sdkDataLoadersSchema = z64.record(z64.string(), sdkConfigLoaderSchema).refine((loaders) => Object.keys(loaders).length <= 5, { message: "Maximum 5 data loaders per block" }).optional();
|
|
78571
|
+
var sdkCustomBlockIdSchema = z64.string().min(8).regex(/^custom\.[a-z][a-z0-9-]*$/, {
|
|
78335
78572
|
message: "Block ID must start with 'custom.' followed by lowercase letters, numbers, or hyphens"
|
|
78336
78573
|
}).transform((value) => value);
|
|
78337
|
-
var sdkCustomBlockInputSchema =
|
|
78574
|
+
var sdkCustomBlockInputSchema = z64.object({
|
|
78338
78575
|
id: sdkCustomBlockIdSchema,
|
|
78339
|
-
title:
|
|
78340
|
-
titleSource:
|
|
78341
|
-
description:
|
|
78576
|
+
title: z64.string().min(1),
|
|
78577
|
+
titleSource: z64.union([z64.string().min(1), z64.array(z64.string().min(1)).min(1)]).optional(),
|
|
78578
|
+
description: z64.string().optional(),
|
|
78342
78579
|
category: blockCategoryEnum,
|
|
78343
|
-
icon:
|
|
78344
|
-
tags:
|
|
78580
|
+
icon: z64.string().optional(),
|
|
78581
|
+
tags: z64.array(z64.string()).optional(),
|
|
78345
78582
|
fields: fieldDefinitionInputSchema.array().min(1),
|
|
78346
78583
|
dataLoaders: sdkDataLoadersSchema,
|
|
78347
78584
|
layout: NodeSchema.optional(),
|
|
78348
|
-
variants:
|
|
78349
|
-
defaultVariant:
|
|
78350
|
-
variantOptions:
|
|
78351
|
-
|
|
78352
|
-
|
|
78353
|
-
label:
|
|
78354
|
-
description:
|
|
78355
|
-
icon:
|
|
78585
|
+
variants: z64.record(z64.string().min(1), NodeSchema).optional(),
|
|
78586
|
+
defaultVariant: z64.string().min(1).optional(),
|
|
78587
|
+
variantOptions: z64.record(
|
|
78588
|
+
z64.string().min(1),
|
|
78589
|
+
z64.object({
|
|
78590
|
+
label: z64.string().min(1).optional(),
|
|
78591
|
+
description: z64.string().min(1).optional(),
|
|
78592
|
+
icon: z64.string().min(1).optional()
|
|
78356
78593
|
})
|
|
78357
78594
|
).optional()
|
|
78358
78595
|
}).superRefine((data, ctx) => {
|
|
@@ -78362,7 +78599,7 @@ var sdkCustomBlockInputSchema = z63.object({
|
|
|
78362
78599
|
const exists = data.fields.some((field) => field.id === source);
|
|
78363
78600
|
if (!exists) {
|
|
78364
78601
|
ctx.addIssue({
|
|
78365
|
-
code:
|
|
78602
|
+
code: z64.ZodIssueCode.custom,
|
|
78366
78603
|
message: `titleSource must reference a valid field ID (got "${source}")`,
|
|
78367
78604
|
path: Array.isArray(data.titleSource) ? ["titleSource", index] : ["titleSource"]
|
|
78368
78605
|
});
|
|
@@ -78371,7 +78608,7 @@ var sdkCustomBlockInputSchema = z63.object({
|
|
|
78371
78608
|
}
|
|
78372
78609
|
if (data.layout && data.variants) {
|
|
78373
78610
|
ctx.addIssue({
|
|
78374
|
-
code:
|
|
78611
|
+
code: z64.ZodIssueCode.custom,
|
|
78375
78612
|
message: "Custom block must define either `layout` or `variants`, not both",
|
|
78376
78613
|
path: ["variants"]
|
|
78377
78614
|
});
|
|
@@ -78380,14 +78617,14 @@ var sdkCustomBlockInputSchema = z63.object({
|
|
|
78380
78617
|
const keys = Object.keys(data.variants);
|
|
78381
78618
|
if (keys.length === 0) {
|
|
78382
78619
|
ctx.addIssue({
|
|
78383
|
-
code:
|
|
78620
|
+
code: z64.ZodIssueCode.custom,
|
|
78384
78621
|
message: "`variants` must contain at least one variant key",
|
|
78385
78622
|
path: ["variants"]
|
|
78386
78623
|
});
|
|
78387
78624
|
}
|
|
78388
78625
|
if (data.defaultVariant && !Object.prototype.hasOwnProperty.call(data.variants, data.defaultVariant)) {
|
|
78389
78626
|
ctx.addIssue({
|
|
78390
|
-
code:
|
|
78627
|
+
code: z64.ZodIssueCode.custom,
|
|
78391
78628
|
message: "`defaultVariant` must be a key present in `variants`",
|
|
78392
78629
|
path: ["defaultVariant"]
|
|
78393
78630
|
});
|
|
@@ -78396,7 +78633,7 @@ var sdkCustomBlockInputSchema = z63.object({
|
|
|
78396
78633
|
for (const key of Object.keys(data.variantOptions)) {
|
|
78397
78634
|
if (!Object.prototype.hasOwnProperty.call(data.variants, key)) {
|
|
78398
78635
|
ctx.addIssue({
|
|
78399
|
-
code:
|
|
78636
|
+
code: z64.ZodIssueCode.custom,
|
|
78400
78637
|
message: "`variantOptions` key must exist in `variants`",
|
|
78401
78638
|
path: ["variantOptions", key]
|
|
78402
78639
|
});
|
|
@@ -78405,74 +78642,74 @@ var sdkCustomBlockInputSchema = z63.object({
|
|
|
78405
78642
|
}
|
|
78406
78643
|
}
|
|
78407
78644
|
});
|
|
78408
|
-
var sdkBlockFieldExtensionInputSchema =
|
|
78645
|
+
var sdkBlockFieldExtensionInputSchema = z64.object({
|
|
78409
78646
|
fields: fieldDefinitionInputSchema.array().min(1)
|
|
78410
78647
|
});
|
|
78411
|
-
var sdkBlockFieldExtensionsInputSchema =
|
|
78412
|
-
|
|
78648
|
+
var sdkBlockFieldExtensionsInputSchema = z64.record(
|
|
78649
|
+
z64.string().min(1),
|
|
78413
78650
|
sdkBlockFieldExtensionInputSchema
|
|
78414
78651
|
);
|
|
78415
|
-
var sdkThemePaletteSchema =
|
|
78416
|
-
var sdkThemeConfigSchema =
|
|
78652
|
+
var sdkThemePaletteSchema = z64.record(z64.string(), z64.string());
|
|
78653
|
+
var sdkThemeConfigSchema = z64.object({
|
|
78417
78654
|
palette: sdkThemePaletteSchema
|
|
78418
78655
|
});
|
|
78419
|
-
var sdkSectionBackgroundSchema =
|
|
78420
|
-
id:
|
|
78421
|
-
label:
|
|
78422
|
-
token:
|
|
78656
|
+
var sdkSectionBackgroundSchema = z64.object({
|
|
78657
|
+
id: z64.string().min(1),
|
|
78658
|
+
label: z64.string().min(1),
|
|
78659
|
+
token: z64.string().min(1)
|
|
78423
78660
|
});
|
|
78424
|
-
var sdkSectionOptionsConfigSchema =
|
|
78425
|
-
backgroundColor:
|
|
78426
|
-
backgroundImage:
|
|
78427
|
-
backgroundGradient:
|
|
78428
|
-
spacing:
|
|
78429
|
-
textColor:
|
|
78661
|
+
var sdkSectionOptionsConfigSchema = z64.object({
|
|
78662
|
+
backgroundColor: z64.boolean().optional(),
|
|
78663
|
+
backgroundImage: z64.boolean().optional(),
|
|
78664
|
+
backgroundGradient: z64.boolean().optional(),
|
|
78665
|
+
spacing: z64.union([z64.array(z64.enum(["compact", "default", "spacious"])), z64.boolean()]).optional(),
|
|
78666
|
+
textColor: z64.boolean().optional()
|
|
78430
78667
|
});
|
|
78431
|
-
var sdkContainerOptionsConfigSchema =
|
|
78432
|
-
maxWidth:
|
|
78433
|
-
alignment:
|
|
78668
|
+
var sdkContainerOptionsConfigSchema = z64.object({
|
|
78669
|
+
maxWidth: z64.union([z64.array(z64.enum(["narrow", "default", "wide", "full"])), z64.boolean()]).optional(),
|
|
78670
|
+
alignment: z64.union([z64.array(z64.enum(["left", "center", "right"])), z64.boolean()]).optional()
|
|
78434
78671
|
});
|
|
78435
|
-
var sdkSiteStyleConfigSchema =
|
|
78436
|
-
sectionBackgrounds:
|
|
78672
|
+
var sdkSiteStyleConfigSchema = z64.object({
|
|
78673
|
+
sectionBackgrounds: z64.array(sdkSectionBackgroundSchema).optional(),
|
|
78437
78674
|
sectionOptions: sdkSectionOptionsConfigSchema.optional(),
|
|
78438
78675
|
containerOptions: sdkContainerOptionsConfigSchema.optional()
|
|
78439
78676
|
});
|
|
78440
|
-
var sdkSiteLayoutConfigSchema =
|
|
78441
|
-
footerBlocks:
|
|
78442
|
-
|
|
78443
|
-
id:
|
|
78444
|
-
kind:
|
|
78445
|
-
content:
|
|
78677
|
+
var sdkSiteLayoutConfigSchema = z64.object({
|
|
78678
|
+
footerBlocks: z64.array(
|
|
78679
|
+
z64.object({
|
|
78680
|
+
id: z64.string().min(1).optional(),
|
|
78681
|
+
kind: z64.string().min(1),
|
|
78682
|
+
content: z64.record(z64.string(), z64.unknown()).optional()
|
|
78446
78683
|
})
|
|
78447
78684
|
).optional()
|
|
78448
78685
|
});
|
|
78449
|
-
var sdkFieldSelectOptionSchema =
|
|
78450
|
-
value:
|
|
78451
|
-
label:
|
|
78686
|
+
var sdkFieldSelectOptionSchema = z64.object({
|
|
78687
|
+
value: z64.string(),
|
|
78688
|
+
label: z64.string()
|
|
78452
78689
|
});
|
|
78453
|
-
var sdkBlockFieldConfigSchema =
|
|
78454
|
-
options:
|
|
78690
|
+
var sdkBlockFieldConfigSchema = z64.object({
|
|
78691
|
+
options: z64.array(sdkFieldSelectOptionSchema).optional()
|
|
78455
78692
|
});
|
|
78456
|
-
var sdkBlockFieldOptionsMapSchema =
|
|
78457
|
-
|
|
78693
|
+
var sdkBlockFieldOptionsMapSchema = z64.record(
|
|
78694
|
+
z64.string().regex(/^(block\.|custom\.)[a-z][a-z0-9-]*$/, {
|
|
78458
78695
|
message: "Block ID must be 'block.*' or 'custom.*' format"
|
|
78459
78696
|
}),
|
|
78460
|
-
|
|
78697
|
+
z64.record(z64.string().min(1), sdkBlockFieldConfigSchema)
|
|
78461
78698
|
).optional();
|
|
78462
|
-
var sdkContentTypeTemplateConfigSchema =
|
|
78463
|
-
blocks:
|
|
78699
|
+
var sdkContentTypeTemplateConfigSchema = z64.object({
|
|
78700
|
+
blocks: z64.array(z64.unknown())
|
|
78464
78701
|
}).passthrough();
|
|
78465
|
-
var sdkContentTypeConfigSchema =
|
|
78466
|
-
key:
|
|
78467
|
-
fields:
|
|
78702
|
+
var sdkContentTypeConfigSchema = z64.object({
|
|
78703
|
+
key: z64.string().min(1),
|
|
78704
|
+
fields: z64.array(z64.unknown()),
|
|
78468
78705
|
template: sdkContentTypeTemplateConfigSchema.nullable().optional()
|
|
78469
78706
|
}).passthrough();
|
|
78470
|
-
var sdkContentConfigSchema =
|
|
78471
|
-
contentTypes:
|
|
78472
|
-
pages:
|
|
78473
|
-
entries:
|
|
78474
|
-
navigationMenus:
|
|
78475
|
-
settings:
|
|
78707
|
+
var sdkContentConfigSchema = z64.object({
|
|
78708
|
+
contentTypes: z64.array(sdkContentTypeConfigSchema).optional(),
|
|
78709
|
+
pages: z64.array(z64.unknown()).optional(),
|
|
78710
|
+
entries: z64.array(z64.unknown()).optional(),
|
|
78711
|
+
navigationMenus: z64.array(z64.unknown()).optional(),
|
|
78712
|
+
settings: z64.unknown().optional()
|
|
78476
78713
|
}).passthrough();
|
|
78477
78714
|
var SDK_WORKFLOW_ID_MAX_LENGTH = 120;
|
|
78478
78715
|
var SDK_WORKFLOW_TITLE_MAX_LENGTH = 120;
|
|
@@ -78485,41 +78722,41 @@ var SDK_WORKFLOW_CONFIRMATION_TITLE_MAX_LENGTH = 120;
|
|
|
78485
78722
|
var SDK_WORKFLOW_CONFIRMATION_BODY_MAX_LENGTH = 500;
|
|
78486
78723
|
var SDK_WORKFLOW_ID_PATTERN = /^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/;
|
|
78487
78724
|
var SDK_WORKFLOW_ENDPOINT_PATTERN = /^\//;
|
|
78488
|
-
var sdkWorkflowIdSchema =
|
|
78725
|
+
var sdkWorkflowIdSchema = z64.string().min(1).max(SDK_WORKFLOW_ID_MAX_LENGTH).regex(SDK_WORKFLOW_ID_PATTERN, {
|
|
78489
78726
|
message: "Workflow ID must start with a lowercase letter and use lowercase letters, numbers, dots, underscores, or hyphens"
|
|
78490
78727
|
});
|
|
78491
|
-
var sdkWorkflowEndpointSchema =
|
|
78492
|
-
var sdkWorkflowManualTriggerSchema =
|
|
78493
|
-
type:
|
|
78728
|
+
var sdkWorkflowEndpointSchema = z64.string().min(1).max(SDK_WORKFLOW_ENDPOINT_MAX_LENGTH).regex(SDK_WORKFLOW_ENDPOINT_PATTERN, { message: 'Workflow endpoint must be a site-relative path starting with "/"' });
|
|
78729
|
+
var sdkWorkflowManualTriggerSchema = z64.object({
|
|
78730
|
+
type: z64.literal("manual")
|
|
78494
78731
|
}).strict();
|
|
78495
|
-
var sdkWorkflowTriggerSchema =
|
|
78732
|
+
var sdkWorkflowTriggerSchema = z64.discriminatedUnion("type", [
|
|
78496
78733
|
sdkWorkflowManualTriggerSchema
|
|
78497
78734
|
]);
|
|
78498
|
-
var sdkWorkflowConfirmationSchema =
|
|
78499
|
-
title:
|
|
78500
|
-
body:
|
|
78735
|
+
var sdkWorkflowConfirmationSchema = z64.object({
|
|
78736
|
+
title: z64.string().trim().min(1).max(SDK_WORKFLOW_CONFIRMATION_TITLE_MAX_LENGTH),
|
|
78737
|
+
body: z64.string().trim().min(1).max(SDK_WORKFLOW_CONFIRMATION_BODY_MAX_LENGTH).optional()
|
|
78501
78738
|
}).strict();
|
|
78502
|
-
var sdkWorkflowConfigSchema =
|
|
78739
|
+
var sdkWorkflowConfigSchema = z64.object({
|
|
78503
78740
|
id: sdkWorkflowIdSchema,
|
|
78504
|
-
title:
|
|
78505
|
-
description:
|
|
78506
|
-
contentType:
|
|
78741
|
+
title: z64.string().trim().min(1).max(SDK_WORKFLOW_TITLE_MAX_LENGTH),
|
|
78742
|
+
description: z64.string().trim().min(1).max(SDK_WORKFLOW_DESCRIPTION_MAX_LENGTH).optional(),
|
|
78743
|
+
contentType: z64.string().trim().min(1).max(SDK_WORKFLOW_CONTENT_TYPE_MAX_LENGTH),
|
|
78507
78744
|
endpoint: sdkWorkflowEndpointSchema,
|
|
78508
|
-
triggers:
|
|
78745
|
+
triggers: z64.array(sdkWorkflowTriggerSchema).min(1).max(SDK_WORKFLOW_TRIGGER_MAX_COUNT),
|
|
78509
78746
|
confirmation: sdkWorkflowConfirmationSchema.optional()
|
|
78510
78747
|
}).strict();
|
|
78511
|
-
var sdkWorkflowsSchema =
|
|
78748
|
+
var sdkWorkflowsSchema = z64.array(sdkWorkflowConfigSchema).max(SDK_WORKFLOW_MAX_COUNT, "Maximum 50 workflows per site").refine((workflows) => {
|
|
78512
78749
|
const ids = workflows.map((workflow) => workflow.id);
|
|
78513
78750
|
return ids.length === new Set(ids).size;
|
|
78514
78751
|
}, { message: "Workflow IDs must be unique" }).optional();
|
|
78515
|
-
var riverbankSiteConfigInputSchema =
|
|
78516
|
-
siteId:
|
|
78517
|
-
previewUrl:
|
|
78518
|
-
liveUrl:
|
|
78752
|
+
var riverbankSiteConfigInputSchema = z64.object({
|
|
78753
|
+
siteId: z64.string().uuid(),
|
|
78754
|
+
previewUrl: z64.string().url().optional(),
|
|
78755
|
+
liveUrl: z64.string().url().optional(),
|
|
78519
78756
|
theme: sdkThemeConfigSchema.optional(),
|
|
78520
78757
|
styles: sdkSiteStyleConfigSchema.optional(),
|
|
78521
78758
|
layout: sdkSiteLayoutConfigSchema.optional(),
|
|
78522
|
-
customBlocks:
|
|
78759
|
+
customBlocks: z64.array(sdkCustomBlockInputSchema).max(100, "Maximum 100 custom blocks per site").refine((blocks) => {
|
|
78523
78760
|
const ids = blocks.map((b2) => b2.id);
|
|
78524
78761
|
return ids.length === new Set(ids).size;
|
|
78525
78762
|
}, { message: "Block IDs must be unique" }).optional(),
|
|
@@ -78527,43 +78764,43 @@ var riverbankSiteConfigInputSchema = z63.object({
|
|
|
78527
78764
|
blockFieldExtensions: sdkBlockFieldExtensionsInputSchema.optional(),
|
|
78528
78765
|
workflows: sdkWorkflowsSchema,
|
|
78529
78766
|
content: sdkContentConfigSchema.optional(),
|
|
78530
|
-
contentDir:
|
|
78531
|
-
sync:
|
|
78532
|
-
existingEntries:
|
|
78767
|
+
contentDir: z64.string().optional(),
|
|
78768
|
+
sync: z64.object({
|
|
78769
|
+
existingEntries: z64.enum(["skip", "update"]).optional()
|
|
78533
78770
|
}).optional(),
|
|
78534
|
-
deploy:
|
|
78535
|
-
verifyCommand:
|
|
78536
|
-
prebuildOutput:
|
|
78771
|
+
deploy: z64.object({
|
|
78772
|
+
verifyCommand: z64.string().optional(),
|
|
78773
|
+
prebuildOutput: z64.string().optional()
|
|
78537
78774
|
}).optional(),
|
|
78538
|
-
themeSource:
|
|
78539
|
-
activeTheme:
|
|
78540
|
-
enablePortal:
|
|
78775
|
+
themeSource: z64.enum(["local", "cms"]).optional(),
|
|
78776
|
+
activeTheme: z64.string().optional(),
|
|
78777
|
+
enablePortal: z64.boolean().optional(),
|
|
78541
78778
|
dashboard: dashboardConfigSchema.optional()
|
|
78542
78779
|
}).strict();
|
|
78543
|
-
var pushSdkConfigBodySchema =
|
|
78780
|
+
var pushSdkConfigBodySchema = z64.object({
|
|
78544
78781
|
config: riverbankSiteConfigInputSchema,
|
|
78545
|
-
forceContentTypes:
|
|
78782
|
+
forceContentTypes: z64.boolean().optional()
|
|
78546
78783
|
}).strict();
|
|
78547
78784
|
|
|
78548
78785
|
// ../api/src/siteOnboarding.ts
|
|
78549
|
-
import { z as
|
|
78786
|
+
import { z as z65 } from "zod";
|
|
78550
78787
|
var LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS = {
|
|
78551
78788
|
configure_appointments: {
|
|
78552
78789
|
requirementId: "configure_appointments",
|
|
78553
78790
|
reason: "launch_anyway"
|
|
78554
78791
|
}
|
|
78555
78792
|
};
|
|
78556
|
-
var acknowledgeLaunchRequirementRequestSchema =
|
|
78793
|
+
var acknowledgeLaunchRequirementRequestSchema = z65.discriminatedUnion(
|
|
78557
78794
|
"requirementId",
|
|
78558
78795
|
[
|
|
78559
|
-
|
|
78560
|
-
requirementId:
|
|
78796
|
+
z65.object({
|
|
78797
|
+
requirementId: z65.literal("review_generated_site")
|
|
78561
78798
|
}),
|
|
78562
|
-
|
|
78563
|
-
requirementId:
|
|
78799
|
+
z65.object({
|
|
78800
|
+
requirementId: z65.literal(
|
|
78564
78801
|
LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS.configure_appointments.requirementId
|
|
78565
78802
|
),
|
|
78566
|
-
overrideReason:
|
|
78803
|
+
overrideReason: z65.literal(
|
|
78567
78804
|
LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS.configure_appointments.reason
|
|
78568
78805
|
)
|
|
78569
78806
|
})
|
|
@@ -78739,79 +78976,79 @@ function isRecord4(value) {
|
|
|
78739
78976
|
}
|
|
78740
78977
|
|
|
78741
78978
|
// ../api/src/appointmentSetup.ts
|
|
78742
|
-
import { z as
|
|
78743
|
-
var appointmentSetupRefSchema =
|
|
78744
|
-
|
|
78745
|
-
|
|
78979
|
+
import { z as z66 } from "zod";
|
|
78980
|
+
var appointmentSetupRefSchema = z66.discriminatedUnion("kind", [
|
|
78981
|
+
z66.object({ kind: z66.literal("existing"), id: z66.string().min(1) }),
|
|
78982
|
+
z66.object({ kind: z66.literal("new"), draftId: z66.string().min(1) })
|
|
78746
78983
|
]);
|
|
78747
|
-
var appointmentSetupVenueChoiceSchema =
|
|
78748
|
-
|
|
78749
|
-
|
|
78750
|
-
|
|
78751
|
-
kind:
|
|
78752
|
-
draftId:
|
|
78753
|
-
title:
|
|
78754
|
-
description:
|
|
78755
|
-
timezone:
|
|
78756
|
-
addressJson:
|
|
78757
|
-
locationJson:
|
|
78984
|
+
var appointmentSetupVenueChoiceSchema = z66.discriminatedUnion("kind", [
|
|
78985
|
+
z66.object({ kind: z66.literal("none") }),
|
|
78986
|
+
z66.object({ kind: z66.literal("existing"), venueId: z66.string().min(1) }),
|
|
78987
|
+
z66.object({
|
|
78988
|
+
kind: z66.literal("create"),
|
|
78989
|
+
draftId: z66.string().min(1),
|
|
78990
|
+
title: z66.string().trim().min(1),
|
|
78991
|
+
description: z66.string().nullable(),
|
|
78992
|
+
timezone: z66.string().trim().min(1).nullable(),
|
|
78993
|
+
addressJson: z66.record(z66.string(), z66.unknown()),
|
|
78994
|
+
locationJson: z66.object({ lat: z66.number(), lng: z66.number() }).nullable()
|
|
78758
78995
|
})
|
|
78759
78996
|
]);
|
|
78760
|
-
var appointmentSetupPaymentDraftSchema =
|
|
78761
|
-
priceType:
|
|
78762
|
-
});
|
|
78763
|
-
var appointmentSetupServiceAssignmentDraftSchema =
|
|
78764
|
-
|
|
78765
|
-
|
|
78766
|
-
kind:
|
|
78767
|
-
resourceRefs:
|
|
78997
|
+
var appointmentSetupPaymentDraftSchema = z66.object({
|
|
78998
|
+
priceType: z66.union([z66.literal("free"), z66.literal("paid")])
|
|
78999
|
+
});
|
|
79000
|
+
var appointmentSetupServiceAssignmentDraftSchema = z66.discriminatedUnion("kind", [
|
|
79001
|
+
z66.object({ kind: z66.literal("all_practitioners") }),
|
|
79002
|
+
z66.object({
|
|
79003
|
+
kind: z66.literal("selected_practitioners"),
|
|
79004
|
+
resourceRefs: z66.array(appointmentSetupRefSchema)
|
|
78768
79005
|
})
|
|
78769
79006
|
]);
|
|
78770
|
-
var appointmentSetupServiceDraftSchema =
|
|
79007
|
+
var appointmentSetupServiceDraftSchema = z66.object({
|
|
78771
79008
|
ref: appointmentSetupRefSchema,
|
|
78772
|
-
title:
|
|
78773
|
-
description:
|
|
78774
|
-
durationMinutes:
|
|
78775
|
-
priceAmount:
|
|
78776
|
-
isActive:
|
|
78777
|
-
locationType:
|
|
78778
|
-
|
|
78779
|
-
|
|
78780
|
-
|
|
79009
|
+
title: z66.string().trim().min(1),
|
|
79010
|
+
description: z66.string().nullable(),
|
|
79011
|
+
durationMinutes: z66.number().int().positive(),
|
|
79012
|
+
priceAmount: z66.number().int().nonnegative().nullable(),
|
|
79013
|
+
isActive: z66.boolean(),
|
|
79014
|
+
locationType: z66.union([
|
|
79015
|
+
z66.literal("virtual"),
|
|
79016
|
+
z66.literal("in_person"),
|
|
79017
|
+
z66.literal("hybrid")
|
|
78781
79018
|
]),
|
|
78782
79019
|
venue: appointmentSetupVenueChoiceSchema,
|
|
78783
|
-
timezone:
|
|
79020
|
+
timezone: z66.string().trim().min(1).nullable(),
|
|
78784
79021
|
payment: appointmentSetupPaymentDraftSchema,
|
|
78785
79022
|
assignment: appointmentSetupServiceAssignmentDraftSchema
|
|
78786
79023
|
});
|
|
78787
|
-
var appointmentSetupPractitionerDraftSchema =
|
|
79024
|
+
var appointmentSetupPractitionerDraftSchema = z66.object({
|
|
78788
79025
|
ref: appointmentSetupRefSchema,
|
|
78789
|
-
displayName:
|
|
78790
|
-
bio:
|
|
78791
|
-
timezone:
|
|
78792
|
-
colorHex:
|
|
78793
|
-
});
|
|
78794
|
-
var appointmentSetupWeeklyWindowDraftSchema =
|
|
78795
|
-
weekday:
|
|
78796
|
-
startTime:
|
|
78797
|
-
endTime:
|
|
78798
|
-
});
|
|
78799
|
-
var appointmentSetupAvailabilityDraftSchema =
|
|
78800
|
-
kind:
|
|
79026
|
+
displayName: z66.string().trim().min(1),
|
|
79027
|
+
bio: z66.string().nullable(),
|
|
79028
|
+
timezone: z66.string().trim().min(1),
|
|
79029
|
+
colorHex: z66.string().nullable()
|
|
79030
|
+
});
|
|
79031
|
+
var appointmentSetupWeeklyWindowDraftSchema = z66.object({
|
|
79032
|
+
weekday: z66.number().int().min(0).max(6),
|
|
79033
|
+
startTime: z66.string(),
|
|
79034
|
+
endTime: z66.string()
|
|
79035
|
+
});
|
|
79036
|
+
var appointmentSetupAvailabilityDraftSchema = z66.object({
|
|
79037
|
+
kind: z66.literal("weekly_windows"),
|
|
78801
79038
|
resourceRef: appointmentSetupRefSchema,
|
|
78802
79039
|
serviceRef: appointmentSetupRefSchema.nullable(),
|
|
78803
|
-
windows:
|
|
79040
|
+
windows: z66.array(appointmentSetupWeeklyWindowDraftSchema)
|
|
78804
79041
|
});
|
|
78805
79042
|
var APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX = 28 * 24 * 60;
|
|
78806
79043
|
var APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX = 10 * 365 * 24 * 60;
|
|
78807
|
-
var appointmentSetupBookingNoticeSchema =
|
|
78808
|
-
minLeadMinutes:
|
|
78809
|
-
maxBookingNoticeMinutes:
|
|
78810
|
-
});
|
|
78811
|
-
var applyAppointmentSetupRequestSchema =
|
|
78812
|
-
services:
|
|
78813
|
-
practitioners:
|
|
78814
|
-
availability:
|
|
79044
|
+
var appointmentSetupBookingNoticeSchema = z66.object({
|
|
79045
|
+
minLeadMinutes: z66.number().int().nonnegative().max(APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX),
|
|
79046
|
+
maxBookingNoticeMinutes: z66.number().int().nonnegative().max(APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX)
|
|
79047
|
+
});
|
|
79048
|
+
var applyAppointmentSetupRequestSchema = z66.object({
|
|
79049
|
+
services: z66.array(appointmentSetupServiceDraftSchema),
|
|
79050
|
+
practitioners: z66.array(appointmentSetupPractitionerDraftSchema),
|
|
79051
|
+
availability: z66.array(appointmentSetupAvailabilityDraftSchema),
|
|
78815
79052
|
bookingNotice: appointmentSetupBookingNoticeSchema
|
|
78816
79053
|
});
|
|
78817
79054
|
|
|
@@ -78830,24 +79067,24 @@ var STAFF_CANCELLATION_CONTEXT_CATEGORIES = [
|
|
|
78830
79067
|
];
|
|
78831
79068
|
|
|
78832
79069
|
// ../api/src/siteBanner.ts
|
|
78833
|
-
import { z as
|
|
79070
|
+
import { z as z67 } from "zod";
|
|
78834
79071
|
var SITE_BANNER_SCOPE_VALUES = ["homepage", "all-pages"];
|
|
78835
79072
|
var SITE_BANNER_TONE_VALUES = ["announcement", "promotion", "notice", "warning"];
|
|
78836
79073
|
var SITE_BANNER_MAX_TEXT_LENGTH = 320;
|
|
78837
79074
|
var SITE_BANNER_MAX_PARAGRAPHS = 2;
|
|
78838
|
-
var siteBannerScopeSchema =
|
|
78839
|
-
var siteBannerToneSchema =
|
|
78840
|
-
var siteBannerBodySchema =
|
|
78841
|
-
var siteBannerCtaSchema =
|
|
78842
|
-
label:
|
|
79075
|
+
var siteBannerScopeSchema = z67.enum(SITE_BANNER_SCOPE_VALUES);
|
|
79076
|
+
var siteBannerToneSchema = z67.enum(SITE_BANNER_TONE_VALUES);
|
|
79077
|
+
var siteBannerBodySchema = z67.unknown().transform(unwrapRichTextValue);
|
|
79078
|
+
var siteBannerCtaSchema = z67.object({
|
|
79079
|
+
label: z67.string().trim().min(1),
|
|
78843
79080
|
link: linkPayloadSchema
|
|
78844
79081
|
});
|
|
78845
|
-
var siteBannerSettingsSchema =
|
|
78846
|
-
|
|
78847
|
-
enabled:
|
|
79082
|
+
var siteBannerSettingsSchema = z67.discriminatedUnion("enabled", [
|
|
79083
|
+
z67.object({
|
|
79084
|
+
enabled: z67.literal(false)
|
|
78848
79085
|
}),
|
|
78849
|
-
|
|
78850
|
-
enabled:
|
|
79086
|
+
z67.object({
|
|
79087
|
+
enabled: z67.literal(true),
|
|
78851
79088
|
scope: siteBannerScopeSchema,
|
|
78852
79089
|
tone: siteBannerToneSchema,
|
|
78853
79090
|
body: siteBannerBodySchema,
|
|
@@ -78859,11 +79096,11 @@ var siteBannerSettingsInputSchema = siteBannerSettingsSchema.superRefine((value,
|
|
|
78859
79096
|
return;
|
|
78860
79097
|
}
|
|
78861
79098
|
const analysis = analyzeSiteBannerBody(value.body);
|
|
78862
|
-
for (const
|
|
79099
|
+
for (const issue2 of analysis.issues) {
|
|
78863
79100
|
ctx.addIssue({
|
|
78864
|
-
code:
|
|
79101
|
+
code: z67.ZodIssueCode.custom,
|
|
78865
79102
|
path: ["body"],
|
|
78866
|
-
message: siteBannerBodyIssueMessage(
|
|
79103
|
+
message: siteBannerBodyIssueMessage(issue2)
|
|
78867
79104
|
});
|
|
78868
79105
|
}
|
|
78869
79106
|
});
|
|
@@ -78897,8 +79134,8 @@ function analyzeSiteBannerBody(body) {
|
|
|
78897
79134
|
issues
|
|
78898
79135
|
};
|
|
78899
79136
|
}
|
|
78900
|
-
function siteBannerBodyIssueMessage(
|
|
78901
|
-
switch (
|
|
79137
|
+
function siteBannerBodyIssueMessage(issue2) {
|
|
79138
|
+
switch (issue2) {
|
|
78902
79139
|
case "empty":
|
|
78903
79140
|
return "Banner message is required when the banner is enabled.";
|
|
78904
79141
|
case "too-many-paragraphs":
|
|
@@ -79085,71 +79322,71 @@ function parsePublicProductCategorySelector(value) {
|
|
|
79085
79322
|
}
|
|
79086
79323
|
|
|
79087
79324
|
// ../api/src/aiPlayground.ts
|
|
79088
|
-
import { z as
|
|
79089
|
-
var Rfc6902PatchOp =
|
|
79325
|
+
import { z as z68 } from "zod";
|
|
79326
|
+
var Rfc6902PatchOp = z68.discriminatedUnion("op", [
|
|
79090
79327
|
// Standard RFC-6902 operations
|
|
79091
|
-
|
|
79092
|
-
op:
|
|
79093
|
-
path:
|
|
79094
|
-
value:
|
|
79328
|
+
z68.object({
|
|
79329
|
+
op: z68.literal("add"),
|
|
79330
|
+
path: z68.string(),
|
|
79331
|
+
value: z68.unknown()
|
|
79095
79332
|
}),
|
|
79096
|
-
|
|
79097
|
-
op:
|
|
79098
|
-
path:
|
|
79333
|
+
z68.object({
|
|
79334
|
+
op: z68.literal("remove"),
|
|
79335
|
+
path: z68.string()
|
|
79099
79336
|
}),
|
|
79100
|
-
|
|
79101
|
-
op:
|
|
79102
|
-
path:
|
|
79103
|
-
value:
|
|
79337
|
+
z68.object({
|
|
79338
|
+
op: z68.literal("replace"),
|
|
79339
|
+
path: z68.string(),
|
|
79340
|
+
value: z68.unknown()
|
|
79104
79341
|
}),
|
|
79105
|
-
|
|
79106
|
-
op:
|
|
79107
|
-
from:
|
|
79108
|
-
path:
|
|
79342
|
+
z68.object({
|
|
79343
|
+
op: z68.literal("move"),
|
|
79344
|
+
from: z68.string(),
|
|
79345
|
+
path: z68.string()
|
|
79109
79346
|
}),
|
|
79110
|
-
|
|
79111
|
-
op:
|
|
79112
|
-
from:
|
|
79113
|
-
path:
|
|
79347
|
+
z68.object({
|
|
79348
|
+
op: z68.literal("copy"),
|
|
79349
|
+
from: z68.string(),
|
|
79350
|
+
path: z68.string()
|
|
79114
79351
|
}),
|
|
79115
79352
|
// Block-level operations (Phase 2)
|
|
79116
|
-
|
|
79117
|
-
op:
|
|
79118
|
-
blockKind:
|
|
79119
|
-
afterBlockId:
|
|
79120
|
-
content:
|
|
79121
|
-
rationale:
|
|
79353
|
+
z68.object({
|
|
79354
|
+
op: z68.literal("add_block"),
|
|
79355
|
+
blockKind: z68.string(),
|
|
79356
|
+
afterBlockId: z68.string().nullable(),
|
|
79357
|
+
content: z68.record(z68.string(), z68.unknown()),
|
|
79358
|
+
rationale: z68.string()
|
|
79122
79359
|
}),
|
|
79123
|
-
|
|
79124
|
-
op:
|
|
79125
|
-
blockId:
|
|
79126
|
-
rationale:
|
|
79360
|
+
z68.object({
|
|
79361
|
+
op: z68.literal("delete_block"),
|
|
79362
|
+
blockId: z68.string(),
|
|
79363
|
+
rationale: z68.string()
|
|
79127
79364
|
}),
|
|
79128
|
-
|
|
79129
|
-
op:
|
|
79130
|
-
blockId:
|
|
79131
|
-
afterBlockId:
|
|
79132
|
-
rationale:
|
|
79365
|
+
z68.object({
|
|
79366
|
+
op: z68.literal("reorder_block"),
|
|
79367
|
+
blockId: z68.string(),
|
|
79368
|
+
afterBlockId: z68.string().nullable(),
|
|
79369
|
+
rationale: z68.string()
|
|
79133
79370
|
})
|
|
79134
79371
|
]);
|
|
79135
|
-
var PlaygroundProposeRequest =
|
|
79136
|
-
request:
|
|
79372
|
+
var PlaygroundProposeRequest = z68.object({
|
|
79373
|
+
request: z68.string().min(1).max(2e3)
|
|
79137
79374
|
});
|
|
79138
|
-
var MultiPagePatchEnvelope =
|
|
79139
|
-
pageId:
|
|
79140
|
-
blockId:
|
|
79375
|
+
var MultiPagePatchEnvelope = z68.object({
|
|
79376
|
+
pageId: z68.string(),
|
|
79377
|
+
blockId: z68.string().optional(),
|
|
79141
79378
|
// Not present for page-level ops
|
|
79142
|
-
blockKind:
|
|
79143
|
-
blockPurpose:
|
|
79144
|
-
ops:
|
|
79145
|
-
rationale:
|
|
79146
|
-
currentContent:
|
|
79147
|
-
});
|
|
79148
|
-
var MultiPageUpdateResponse =
|
|
79149
|
-
patches:
|
|
79150
|
-
assistantMessage:
|
|
79151
|
-
pagesModified:
|
|
79152
|
-
toolCallsUsed:
|
|
79379
|
+
blockKind: z68.string().optional(),
|
|
79380
|
+
blockPurpose: z68.string().optional().nullable(),
|
|
79381
|
+
ops: z68.array(Rfc6902PatchOp),
|
|
79382
|
+
rationale: z68.string(),
|
|
79383
|
+
currentContent: z68.record(z68.string(), z68.unknown()).optional()
|
|
79384
|
+
});
|
|
79385
|
+
var MultiPageUpdateResponse = z68.object({
|
|
79386
|
+
patches: z68.array(MultiPagePatchEnvelope),
|
|
79387
|
+
assistantMessage: z68.string(),
|
|
79388
|
+
pagesModified: z68.number(),
|
|
79389
|
+
toolCallsUsed: z68.number()
|
|
79153
79390
|
});
|
|
79154
79391
|
|
|
79155
79392
|
// src/data/prefetchBlockData.ts
|