@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.
Files changed (33) hide show
  1. package/dist/_dts/api/src/navigation/linkValue.d.ts +1 -1
  2. package/dist/_dts/blocks/src/index.d.ts +2 -1
  3. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +185 -0
  4. package/dist/_dts/blocks/src/system/manifest/index.d.ts +1 -0
  5. package/dist/_dts/blocks/src/system/manifest/validation.d.ts +2 -84
  6. package/dist/_dts/blocks/src/system/types/link.d.ts +93 -1
  7. package/dist/_dts/db/src/schemas/forms.d.ts +24 -3
  8. package/dist/_dts/editor-blocks/src/widgets/link/LinkSummary.d.ts +1 -1
  9. package/dist/_dts/editor-blocks/src/widgets/link/LinkWidget.d.ts +1 -1
  10. package/dist/_dts/editor-blocks/src/widgets/link/utils.d.ts +1 -1
  11. package/dist/_dts/sdk/src/config/typed-entries.d.ts +36 -1
  12. package/dist/_dts/sdk/src/contracts/content.d.ts +6 -1
  13. package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
  14. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +1 -0
  15. package/dist/_dts/sdk/src/version.d.ts +1 -1
  16. package/dist/cli/index.mjs +676 -428
  17. package/dist/client/client.mjs +39991 -39754
  18. package/dist/client/hooks.mjs +1737 -1735
  19. package/dist/client/rendering.mjs +1463 -1226
  20. package/dist/preview-next/client/runtime.mjs +1052 -799
  21. package/dist/server/components.mjs +2983 -2745
  22. package/dist/server/config-validation.mjs +1727 -1725
  23. package/dist/server/config.mjs +1727 -1725
  24. package/dist/server/data.mjs +1737 -1735
  25. package/dist/server/index.mjs +1 -1
  26. package/dist/server/next.mjs +3026 -2788
  27. package/dist/server/page-converter.mjs +10 -10
  28. package/dist/server/prebuild.mjs +1 -1
  29. package/dist/server/rendering/server.mjs +2996 -2758
  30. package/dist/server/rendering.mjs +2996 -2758
  31. package/dist/server/routing.mjs +256 -285
  32. package/dist/server/server.mjs +1738 -1736
  33. 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((issue) => ({
8792
- path: zodIssuePath(issue.path),
8793
- message: issue.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((issue) => ({
8826
- path: [...prefix, ...issue.path],
8827
- message: issue.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: isEmpty2 = false,
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 (isEmpty2) {
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((issue) => `${issue.path.join(".") || "<root>"}: ${issue.message}`).join("; ")}`
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/registry.ts
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/manifest/richTextSchema.ts
58791
- init_typeGuards2();
58779
+ // ../blocks/src/system/types/link.ts
58792
58780
  import { z as z39 } from "zod";
58793
- var TipTapMarkSchema = z39.object({
58794
- type: z39.string(),
58795
- attrs: z39.record(z39.string(), z39.unknown()).optional()
58796
- });
58797
- var TipTapNodeSchema = z39.lazy(
58798
- () => z39.object({
58799
- type: z39.string(),
58800
- content: z39.array(TipTapNodeSchema).optional(),
58801
- text: z39.string().optional(),
58802
- attrs: z39.record(z39.string(), z39.unknown()).optional(),
58803
- marks: z39.array(TipTapMarkSchema).optional()
58804
- })
58805
- );
58806
- var RichTextValueSchema = z39.union([
58807
- // New format: TipTap document directly
58808
- TipTapNodeSchema,
58809
- // Legacy format: wrapped in { doc: {...} }
58810
- z39.object({
58811
- doc: TipTapNodeSchema
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/validation.ts
58838
- function isEmpty(value) {
58839
- if (typeof value === "string" && value.trim() === "") return true;
58840
- if (value === null || value === void 0) return true;
58841
- if (Array.isArray(value) && value.length === 0) return true;
58842
- if (isEmptyRichTextDoc(value)) return true;
58843
- return false;
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 isEmptyRichTextDoc(value) {
58846
- if (!value || typeof value !== "object") return false;
58847
- const obj = value;
58848
- const doc = "doc" in obj ? obj.doc : obj;
58849
- if (!doc || typeof doc !== "object") return false;
58850
- const docObj = doc;
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 preprocessEmptyValues(content) {
58863
- if (!content || typeof content !== "object" || Array.isArray(content)) {
58864
- return {};
58865
- }
58866
- const result = {};
58867
- for (const [key, value] of Object.entries(content)) {
58868
- result[key] = isEmpty(value) ? void 0 : value;
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 createManifestValidator(manifestOrFields, options = {}) {
58873
- const allowNull = options.allowNull ?? true;
58874
- const isDraft = options.mode === "draft";
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 buildFieldSchema(field, allowNull, allowIncomplete = false) {
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
- schema = buildTextSchema(field);
58893
- break;
58894
- case "richText":
58895
- schema = buildRichTextSchema2();
58896
- break;
58897
- case "media": {
58898
- const baseMediaSchema = z40.record(z40.string(), z40.unknown());
58899
- const isRequired = Boolean(field.required);
58900
- schema = isRequired ? baseMediaSchema : baseMediaSchema.nullable();
58901
- break;
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
- schema = buildUrlSchema(field);
58911
- break;
58912
- case "link":
58913
- schema = buildLinkSchema();
58914
- break;
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
- schema = buildReferenceSchema(field);
58920
- break;
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
- schema = buildRepeaterSchema(field, allowNull, allowIncomplete);
58923
- break;
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
- schema = buildGroupSchema(field, allowNull, allowIncomplete);
58926
- break;
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
- schema = z40.unknown();
58929
- break;
58974
+ return assertNever6(field);
58930
58975
  }
58931
- return finalizeSchema(schema, required, allowNull, allowIncomplete);
58932
58976
  }
58933
- function buildFriendlyStringSchema(field) {
58934
- return z40.string({
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 buildTextSchema(field) {
58939
- const ui = field.ui ?? {};
58940
- const inputType = ui?.inputType;
58941
- let schema;
58942
- if (inputType === "number") {
58943
- schema = z40.coerce.number({
58944
- error: (issue) => issue.input === void 0 ? `${field.label} is required` : `${field.label} needs a number`
58945
- });
58946
- if (typeof ui?.min === "number") {
58947
- schema = schema.min(
58948
- ui.min,
58949
- `${field.label} must be ${ui.min} or more`
58950
- );
58951
- }
58952
- if (typeof ui?.max === "number") {
58953
- schema = schema.max(
58954
- ui.max,
58955
- `${field.label} must be ${ui.max} or less`
58956
- );
58957
- }
58958
- } else {
58959
- schema = buildFriendlyStringSchema(field);
58960
- if (inputType === "email") {
58961
- schema = schema.email("Enter a valid email address");
58962
- }
58963
- if (inputType === "tel") {
58964
- const TEL_RE = /^[+()0-9\s\-]{3,}$/;
58965
- schema = schema.regex(
58966
- TEL_RE,
58967
- "Enter a valid phone number"
58968
- );
58969
- }
58970
- if (ui?.pattern) {
58971
- try {
58972
- const re = new RegExp(ui.pattern);
58973
- schema = schema.regex(
58974
- re,
58975
- `${field.label} is not in the right format`
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 buildRichTextSchema2() {
58993
- return buildRichTextSchema();
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
- var SLUG_PATTERN = /^(?:[a-z0-9]+(?:-[a-z0-9]+)*)(?:\/(?:[a-z0-9]+(?:-[a-z0-9]+)*))*$/;
58996
- function buildSlugSchema(field) {
58997
- const message = `${field.label} can only use lowercase letters, numbers, and dashes`;
58998
- let schema = buildFriendlyStringSchema(field).regex(SLUG_PATTERN, message);
58999
- if (field.maxLength) {
59000
- schema = schema.max(
59001
- field.maxLength,
59002
- `${field.label} must be ${field.maxLength} characters or less`
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
- if (field.required) {
59006
- schema = schema.min(1, { message: `${field.label} is required` });
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
- var ALLOWED_URL_PROTOCOLS = ["http:", "https:"];
59011
- function buildUrlSchema(field) {
59012
- const message = "Enter a valid web address";
59013
- const validate = (value) => {
59014
- if (!value) {
59015
- return !field.required;
59016
- }
59017
- if (field.allowRelative && value.startsWith("/")) {
59018
- return true;
59019
- }
59020
- try {
59021
- const parsed = new URL(value);
59022
- return ALLOWED_URL_PROTOCOLS.includes(
59023
- parsed.protocol
59024
- );
59025
- } catch {
59026
- return false;
59027
- }
59028
- };
59029
- let schema = buildFriendlyStringSchema(field).trim().refine(validate, message);
59030
- if (field.required) {
59031
- schema = schema.min(1, { message: `${field.label} is required` });
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
- var nullableString = z40.union([z40.string().min(1), z40.null()]);
59036
- var internalLinkSchema = z40.object({
59037
- kind: z40.literal("internal"),
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 assertNeverSelectSource2(value) {
59076
- throw new Error(`Unhandled select source: ${JSON.stringify(value)}`);
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 buildSelectSchema(field) {
59079
- const source = normalizeSelectSource(field);
59080
- const singleValueSchema = (() => {
59081
- switch (source.kind) {
59082
- case "sdk":
59083
- case "site":
59084
- return buildFriendlyStringSchema(field);
59085
- case "static": {
59086
- const values = field.options.map((option) => option.value);
59087
- return buildFriendlyStringSchema(field).refine(
59088
- (value) => values.includes(value),
59089
- `Choose one of the available options for ${field.label}`
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 assertNeverSelectSource2(source);
59191
+ return assertNever6(constraint);
59094
59192
  }
59095
- })();
59096
- if (field.multiple) {
59097
- const arraySchema = z40.array(singleValueSchema);
59098
- return field.required ? arraySchema.min(1, { message: "This field is required" }) : arraySchema.nullable();
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 buildReferenceSchema(field) {
59103
- let schema = z40.string({
59104
- error: (issue) => issue.input === void 0 || issue.input === null ? "This field is required" : `${field.label} needs text`
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 buildRepeaterSchema(field, allowNull, allowIncomplete) {
59112
- const parsed = fieldSchema.array().parse(field.schema?.fields ?? []);
59113
- const childShape = {};
59114
- for (const child of parsed) {
59115
- if (child.type === "group" && child.ui?.flattenInRepeater) {
59116
- const groupParsed = fieldSchema.array().parse(child.schema?.fields ?? []);
59117
- for (const gc of groupParsed) {
59118
- childShape[gc.id] = buildFieldSchema(gc, allowNull, allowIncomplete);
59119
- }
59120
- } else {
59121
- childShape[child.id] = buildFieldSchema(child, allowNull, allowIncomplete);
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
- let schema = z40.object(childShape).catchall(z40.unknown()).passthrough();
59125
- let arraySchema = z40.array(schema);
59126
- if (typeof field.minItems === "number") {
59127
- arraySchema = arraySchema.min(field.minItems);
59294
+ }
59295
+ function compilePattern(pattern) {
59296
+ try {
59297
+ return new RegExp(pattern);
59298
+ } catch {
59299
+ return null;
59128
59300
  }
59129
- if (typeof field.maxItems === "number") {
59130
- arraySchema = arraySchema.max(field.maxItems);
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 buildGroupSchema(field, allowNull, allowIncomplete) {
59135
- const parsed = fieldSchema.array().parse(field.schema?.fields ?? []);
59136
- const childShape = {};
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 z40.object(childShape).catchall(z40.unknown()).passthrough();
59319
+ return typeof value === "string" && values.includes(value);
59141
59320
  }
59142
- function finalizeSchema(schema, required, allowNull, allowIncomplete = false) {
59143
- if (required) {
59144
- if (allowIncomplete) {
59145
- return allowNull ? schema.or(z40.null()).optional() : schema.optional();
59146
- }
59147
- return allowNull ? schema.or(z40.null()) : schema;
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 allowNull ? schema.optional().nullable() : schema.optional();
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 z45 } from "zod";
59724
+ import { z as z46 } from "zod";
59488
59725
 
59489
59726
  // ../theme-core/src/schema.ts
59490
- import { z as z44 } from "zod";
59727
+ import { z as z45 } from "zod";
59491
59728
 
59492
59729
  // ../theme-core/src/lib/media.ts
59493
- import z41 from "zod";
59494
- var hotspotSchema2 = z41.object({
59495
- x: z41.number().min(0).max(1),
59496
- y: z41.number().min(0).max(1),
59497
- radius: z41.number().optional()
59498
- });
59499
- var rotationSchema2 = z41.union([z41.literal(0), z41.literal(90), z41.literal(180), z41.literal(270)]);
59500
- var rectSchema2 = z41.tuple([z41.number(), z41.number(), z41.number(), z41.number()]);
59501
- var aspectCropSchema2 = z41.object({
59502
- aspect: z41.preprocess((value) => value == null ? void 0 : value, z41.string().optional()),
59503
- rect: z41.preprocess((value) => value == null ? void 0 : value, rectSchema2.optional()),
59504
- hotspot: z41.preprocess((value) => value == null ? void 0 : value, hotspotSchema2.optional()),
59505
- rotation: z41.preprocess((value) => value == null ? void 0 : value, rotationSchema2.optional())
59506
- });
59507
- var transformSchema2 = z41.object({
59508
- aspectCrops: z41.preprocess((value) => {
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
- }, z41.record(z41.string(), aspectCropSchema2.catch({}))).optional(),
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 = z41.object({
59519
- type: z41.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
59520
- purpose: z41.string().optional(),
59521
- placeholder: z41.boolean().default(true).optional(),
59522
- assetId: z41.string().optional(),
59523
- identifier: z41.string().optional(),
59524
- src: z41.string().optional(),
59525
- alt: z41.string().optional(),
59526
- filename: z41.string().optional(),
59527
- mimeType: z41.string().optional(),
59528
- width: z41.number().optional(),
59529
- height: z41.number().optional(),
59530
- storageBucket: z41.string().optional(),
59531
- storagePath: z41.string().optional(),
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 z42 } from "zod";
59540
- var cardSpacingSchema = z42.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
59541
- var gradientDirectionSchema2 = z42.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
59542
- var cardBackgroundSchema = z42.discriminatedUnion("type", [
59543
- z42.object({ type: z42.literal("solid"), colorToken: z42.string() }),
59544
- z42.object({
59545
- type: z42.literal("gradient"),
59546
- fromToken: z42.string(),
59547
- toToken: z42.string(),
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
- z42.object({ type: z42.literal("transparent") })
59787
+ z43.object({ type: z43.literal("transparent") })
59551
59788
  ]);
59552
- var cardBorderSchema = z42.object({
59553
- widthClass: z42.string(),
59554
- colorToken: z42.string()
59555
- });
59556
- var cardVariantSchema2 = z42.object({
59557
- id: z42.string(),
59558
- name: z42.string().min(1).max(20),
59559
- enabled: z42.boolean(),
59560
- priority: z42.union([z42.literal(1), z42.literal(2), z42.literal(3)]),
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: z42.object({
59566
- elevation: z42.enum(["none", "low", "medium", "high"]),
59567
- softness: z42.enum(["crisp", "soft", "hard"]).nullable(),
59568
- position: z42.enum(["bottom", "bottom-right"]).default("bottom")
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: z42.enum(["square", "soft", "rounded", "pill"]).optional(),
59807
+ corners: z43.enum(["square", "soft", "rounded", "pill"]).optional(),
59571
59808
  // Border (optional)
59572
59809
  border: cardBorderSchema.optional()
59573
59810
  });
59574
- var cardSystemSchema = z42.object({
59575
- variants: z42.array(cardVariantSchema2).min(1).max(3)
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 z43 } from "zod";
59589
- var gradientStopSchema = z43.object({
59590
- color: z43.string(),
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: z43.number().min(0).max(100)
59829
+ position: z44.number().min(0).max(100)
59593
59830
  // Percentage 0-100
59594
59831
  });
59595
- var gradientConfigSchema = z43.object({
59596
- type: z43.enum(["linear", "radial"]),
59597
- angle: z43.number().min(0).max(360).optional(),
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: z43.string().optional(),
59836
+ position: z44.string().optional(),
59600
59837
  // For radial gradients ('center', 'top left', etc.)
59601
- stops: z43.array(gradientStopSchema).min(2)
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 = z44.object({
59610
- tone: z44.enum(["minimal", "classic", "bold"]),
59611
- energy: z44.enum(["calm", "vibrant"]),
59612
- density: z44.enum(["airy", "regular", "compact"]),
59613
- mediaBias: z44.enum(["text", "media", "mixed"]),
59614
- conversionBias: z44.enum(["low", "med", "high"]),
59615
- motion: z44.enum(["subtle", "standard", "expressive"])
59616
- });
59617
- var colourHexString = z44.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
59618
- var paletteColorSchema = z44.object({
59619
- name: z44.string().min(1),
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 = z44.object({
59623
- mode: z44.enum(["light", "dark"])
59859
+ var paletteMetaSchema = z45.object({
59860
+ mode: z45.enum(["light", "dark"])
59624
59861
  });
59625
- var paletteSchema = z44.object({
59626
- colors: z44.array(paletteColorSchema),
59862
+ var paletteSchema = z45.object({
59863
+ colors: z45.array(paletteColorSchema),
59627
59864
  meta: paletteMetaSchema
59628
59865
  });
59629
- var typographyStyleSchema = z44.object({
59630
- family: z44.string().min(1),
59631
- weight: z44.enum(["light", "regular", "medium", "semibold", "bold"]),
59632
- letterSpacing: z44.enum(["tight", "normal", "loose"]),
59633
- lineHeight: z44.enum(["normal", "relaxed", "loose"])
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: z44.enum(["md", "lg", "xl"])
59873
+ size: z45.enum(["md", "lg", "xl"])
59637
59874
  });
59638
- var headingSizeSchema = z44.enum(["xs", "sm", "md", "lg", "xl", "2xl"]);
59639
- var headingTypographyOverridesSchema = z44.object({
59640
- weight: z44.enum(["light", "regular", "medium", "semibold", "bold"]).nullable().optional(),
59641
- letterSpacing: z44.enum(["tight", "normal", "loose"]).nullable().optional(),
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: z44.enum(["normal", "relaxed", "loose"]).nullable().optional(),
59644
- italic: z44.boolean().nullable().optional(),
59645
- colorToken: z44.string().min(1).nullable().optional()
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: z44.enum(["uppercase", "normal", "smallCaps"]).nullable(),
59650
- italic: z44.boolean().nullable(),
59651
- colorToken: z44.string().min(1).nullable().optional()
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 = z44.enum(["solid", "dotted", "dashed"]);
59655
- var proseLinkUnderlineThicknessSchema = z44.enum(["auto", "fromFont", "thin", "medium", "thick"]);
59656
- var proseLinkUnderlineOffsetSchema = z44.enum(["auto", "tight", "normal", "loose"]);
59657
- var proseLinkStyleSchema = z44.object({
59658
- colorToken: z44.string().min(1).optional(),
59659
- hoverColorToken: z44.string().min(1).optional(),
59660
- underline: z44.boolean().optional(),
59661
- decorationColorToken: z44.string().min(1).optional(),
59662
- hoverDecorationColorToken: z44.string().min(1).optional(),
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 = z44.enum([
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 = z44.enum(["none", "sm", "md", "lg", "xl", "2xl", "full"]);
59676
- var boxBackgroundOverlaySchema = z44.object({
59677
- type: z44.enum(["none", "color", "gradient"]).nullable().optional(),
59678
- color: z44.string().nullable().optional(),
59679
- gradient: z44.string().nullable().optional(),
59680
- opacity: z44.number().min(0).max(1).nullable().optional()
59681
- });
59682
- var boxBackgroundSchema = z44.object({
59683
- type: z44.enum(["color", "gradient", "image"]).optional(),
59684
- color: z44.string().nullable().optional(),
59685
- gradient: z44.string().nullable().optional(),
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: z44.enum(["fill", "fit", "original", "custom"]).nullable().optional(),
59688
- scale: z44.string().nullable().optional(),
59689
- position: z44.string().nullable().optional(),
59690
- opacity: z44.number().min(0).max(1).nullable().optional(),
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: z44.string().nullable().optional(),
59693
- headingColor: z44.string().nullable().optional()
59929
+ textColor: z45.string().nullable().optional(),
59930
+ headingColor: z45.string().nullable().optional()
59694
59931
  });
59695
- var sectionStylesOverrideSchema = z44.object({
59932
+ var sectionStylesOverrideSchema = z45.object({
59696
59933
  background: boxBackgroundSchema.nullable().optional(),
59697
59934
  spacing: semanticSpacingSchema.nullable().optional(),
59698
- minHeight: z44.enum(["none", "hero", "immersive"]).nullable().optional()
59935
+ minHeight: z45.enum(["none", "hero", "immersive"]).nullable().optional()
59699
59936
  });
59700
- var containerStylesOverrideSchema = z44.object({
59937
+ var containerStylesOverrideSchema = z45.object({
59701
59938
  background: boxBackgroundSchema.nullable().optional(),
59702
59939
  spacing: semanticSpacingSchema.nullable().optional(),
59703
- raised: z44.boolean().nullable().optional(),
59940
+ raised: z45.boolean().nullable().optional(),
59704
59941
  rounded: boxRoundedSchema.nullable().optional(),
59705
- fullWidth: z44.boolean().nullable().optional()
59942
+ fullWidth: z45.boolean().nullable().optional()
59706
59943
  });
59707
- var cardBorderOverrideSchema = z44.object({
59708
- enabled: z44.boolean().nullable().optional(),
59709
- width: z44.enum(["none", "1", "2", "3"]).nullable().optional(),
59710
- colorToken: z44.string().nullable().optional()
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 = z44.object({
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: z44.boolean().nullable().optional(),
59953
+ raised: z45.boolean().nullable().optional(),
59717
59954
  rounded: boxRoundedSchema.nullable().optional()
59718
59955
  });
59719
- var blockStyleOverridesSchema = z44.object({
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 = z44.object({
59725
- typography: z44.object({
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 = z44.enum([
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 = z44.object({
59980
+ var typographySchema = z45.object({
59744
59981
  body: bodyTypographyStyleSchema,
59745
- headings: z44.object({
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 = z44.enum(["comfortable", "standard", "dense"]);
59759
- var corners = z44.enum(["square", "soft", "rounded", "pill"]);
59760
- var shadow = z44.object({
59761
- elevation: z44.enum(["none", "low", "medium", "high"]),
59762
- softness: z44.enum(["crisp", "soft", "hard"]).nullable(),
59763
- position: z44.enum(["bottom", "bottom-right"]).default("bottom")
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 = z44.object({
59766
- width: z44.enum(["none", "hairline", "thin", "thick"]),
59767
- style: z44.enum(["solid", "dashed"])
60002
+ var border = z45.object({
60003
+ width: z45.enum(["none", "hairline", "thin", "thick"]),
60004
+ style: z45.enum(["solid", "dashed"])
59768
60005
  });
59769
- var motion = z44.object({
59770
- level: z44.enum(["off", "low", "medium", "high"]),
59771
- easing: z44.enum(["standard", "snappy", "gentle"]).nullable()
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 = z44.object({
60010
+ var buttonStyle = z45.object({
59774
60011
  shape: corners
59775
60012
  // Used for --radius-control CSS variable
59776
60013
  });
59777
- var cardStyle = z44.object({
59778
- elevation: z44.enum(["none", "low", "medium", "high"]),
59779
- border: z44.enum(["none", "subtle", "defined"]),
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: z44.enum(["plain", "accentBar", "subtleBg"]).nullable(),
59782
- mediaTreatment: z44.enum(["square", "rounded", "bleed"]).nullable()
60018
+ headerStyle: z45.enum(["plain", "accentBar", "subtleBg"]).nullable(),
60019
+ mediaTreatment: z45.enum(["square", "rounded", "bleed"]).nullable()
59783
60020
  });
59784
- var inputStyle = z44.object({
60021
+ var inputStyle = z45.object({
59785
60022
  shape: corners,
59786
- border: z44.enum(["subtle", "defined", "underline"]),
59787
- focus: z44.enum(["glow", "ring", "underline"]),
59788
- label: z44.enum(["inside", "above"])
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 = z44.enum(["classic", "centered", "transparent", "floating", "editorial"]);
59791
- var headerPositioning = z44.enum(["static", "sticky", "fixed"]);
59792
- var headerNavStyle = z44.enum([
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 = z44.enum(["regular", "medium", "semibold", "bold"]);
59802
- var headerMaxWidth = z44.enum(["container", "full"]);
59803
- var headerContainerSchema = z44.object({
59804
- rounded: z44.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("xl"),
59805
- border: z44.boolean().default(true),
59806
- shadow: z44.boolean().default(true),
59807
- padding: z44.enum(["sm", "md", "lg"]).default("md"),
59808
- tint: z44.string().nullable().optional(),
59809
- opacity: z44.number().min(0).max(1).default(0.12)
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: z44.enum(["bottom", "top", "both", "none"]).default("bottom")
60049
+ position: z45.enum(["bottom", "top", "both", "none"]).default("bottom")
59813
60050
  }).optional();
59814
- var logoStyleSchema = z44.object({
59815
- fontFamily: z44.enum(["heading", "body"]).default("heading"),
59816
- letterSpacing: z44.enum(["normal", "wide", "wider", "widest"]).default("normal"),
59817
- gradient: z44.boolean().default(false)
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 = z44.object({
59820
- mobileWrapLines: z44.union([z44.literal(1), z44.literal(2)]).optional(),
59821
- mobileMaxWidth: z44.enum(["xs", "sm", "md"]).optional(),
59822
- hideOnShrink: z44.boolean().optional()
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 = z44.object({
59825
- underlineGradient: z44.boolean().default(false),
59826
- glow: z44.boolean().default(false),
59827
- glowColor: z44.string().optional(),
59828
- neumorphic: z44.boolean().default(false)
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 = z44.object({
60067
+ var dropdownStyleSchema = z45.object({
59831
60068
  // Container styling
59832
- background: z44.string().default("surface"),
60069
+ background: z45.string().default("surface"),
59833
60070
  // color token
59834
- textColor: z44.string().default("text"),
60071
+ textColor: z45.string().default("text"),
59835
60072
  // color token
59836
- borderColor: z44.string().nullable().default("border"),
60073
+ borderColor: z45.string().nullable().default("border"),
59837
60074
  // null = no border
59838
- shadow: z44.enum(["none", "sm", "md", "lg"]).default("md"),
59839
- borderRadius: z44.enum(["none", "sm", "md", "lg"]).default("md"),
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: z44.string().nullable().optional(),
60078
+ hoverBackground: z45.string().nullable().optional(),
59842
60079
  // color token, null = transparent
59843
- hoverTextColor: z44.string().nullable().optional(),
60080
+ hoverTextColor: z45.string().nullable().optional(),
59844
60081
  // color token, null = inherit
59845
60082
  // Typography
59846
- textTransform: z44.enum(["none", "uppercase", "capitalize"]).default("none"),
59847
- letterSpacing: z44.enum(["normal", "wide", "wider"]).default("normal"),
59848
- fontWeight: z44.enum(["regular", "medium", "semibold", "bold"]).optional(),
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: z44.enum(["xs", "sm", "base", "lg"]).optional()
60087
+ textSize: z45.enum(["xs", "sm", "base", "lg"]).optional()
59851
60088
  // optional = no override (browser default)
59852
60089
  }).optional();
59853
- var headerCtaGapSchema = z44.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
59854
- var navContainerSchema = z44.object({
59855
- type: z44.enum(["none", "pill", "glass"]).default("none"),
59856
- tint: z44.string().nullable().optional(),
59857
- opacity: z44.number().min(0).max(1).default(0.15)
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 = z44.object({
59860
- type: z44.enum(["color", "gradient", "image"]),
59861
- color: z44.string().nullable().optional(),
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: z44.string().nullable().optional()
60101
+ textColor: z45.string().nullable().optional()
59865
60102
  });
59866
- var headerSchema = z44.object({
60103
+ var headerSchema = z45.object({
59867
60104
  variant: headerVariant,
59868
60105
  positioning: headerPositioning,
59869
- shrinkOnScroll: z44.boolean(),
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: z44.string().nullable().optional(),
60110
+ textColor: z45.string().nullable().optional(),
59874
60111
  // Site title and general header text
59875
60112
  navStyle: headerNavStyle,
59876
- navColor: z44.string().nullable().optional(),
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 = z44.enum(["simple", "columns", "split"]);
59896
- var footerMaxWidth = z44.enum(["container", "full"]);
59897
- var footerMode = z44.enum(["default", "blocks", "default+blocks", "none"]);
59898
- var footerNavLayoutMode = z44.enum(["stack", "inline", "inline-wrap"]);
59899
- var footerNavLayoutAlign = z44.enum(["start", "center", "end", "space-between"]);
59900
- var footerSpacing = z44.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
59901
- var footerLogoPlacement = z44.enum(["left", "right", "above", "below"]);
59902
- var footerLogoSize = z44.enum(["sm", "md", "lg", "xl"]);
59903
- var footerLogoMaxHeight = z44.enum(["sm", "md", "lg", "xl"]);
59904
- var footerBottomTextLinkStyleSchema = z44.object({
59905
- colorToken: z44.string().optional(),
59906
- hoverColorToken: z44.string().nullable().optional(),
59907
- decorationColorToken: z44.string().nullable().optional(),
59908
- underline: z44.boolean().optional()
59909
- });
59910
- var footerBottomBarSchema = z44.object({
59911
- enabled: z44.boolean().optional(),
59912
- fullBleed: z44.boolean().optional(),
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: z44.string().nullable().optional(),
59915
- textAlign: z44.enum(["left", "center", "right"]).optional(),
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: z44.object({
59919
- colorToken: z44.string().nullable().optional(),
59920
- width: z44.enum(["none", "thin", "medium", "thick"]).optional()
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 = z44.object({
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: z44.number().int().min(1).max(6).optional()
60165
+ columns: z45.number().int().min(1).max(6).optional()
59929
60166
  });
59930
- var footerLogoSchema = z44.object({
59931
- showLogo: z44.boolean().default(true),
59932
- showLogoText: z44.boolean().optional(),
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: z44.enum(["start", "center", "end"]).optional()
60173
+ align: z45.enum(["start", "center", "end"]).optional()
59937
60174
  });
59938
- var footerSchema = z44.object({
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: z44.boolean().optional(),
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: z44.string().nullable().optional(),
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 = z44.enum(["tight", "compact", "default", "relaxed"]);
59963
- var layoutSchema = z44.object({
59964
- containerPadding: z44.object({
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 = z44.enum([
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 = z44.enum(["tight", "snug", "normal", "relaxed"]);
59982
- var heroResponsiveTypographySchema = z44.object({
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 = z44.object({
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: z44.object({
60234
+ responsive: z45.object({
59998
60235
  tablet: heroResponsiveTypographySchema.optional(),
59999
60236
  mobile: heroResponsiveTypographySchema.optional()
60000
60237
  }).optional()
60001
60238
  });
60002
- var heroSchema = z44.object({
60239
+ var heroSchema = z45.object({
60003
60240
  typography: heroTypographySchema.optional()
60004
60241
  }).optional();
60005
- var gradientsSchema = z44.object({
60006
- button: z44.string().min(1).nullable().optional(),
60007
- hero: z44.string().min(1).nullable().optional(),
60008
- background: z44.string().min(1).nullable().optional()
60009
- });
60010
- var themeSchema = z44.object({
60011
- name: z44.string().min(1).max(30),
60012
- description: z44.string().min(1).max(400),
60013
- rationale: z44.string().min(1).max(400),
60014
- siteStyleId: z44.string().min(1).transform((value) => asSiteStyleId(value)).optional(),
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: z44.record(
60042
- z44.string(),
60278
+ blockCustomVars: z45.record(
60279
+ z45.string(),
60043
60280
  // block kind (matches data-block attribute)
60044
- z44.record(z44.string(), z44.string())
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: z44.record(
60050
- z44.string(),
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: z44.record(z44.string(), z44.array(z44.string())).optional()
60323
+ styleGroups: z45.record(z45.string(), z45.array(z45.string())).optional()
60087
60324
  });
60088
- var themesTurnSchema = z44.object({
60089
- message: z44.string().min(1),
60090
- themes: z44.array(themeSchema).length(3)
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 = z45.string().min(1).transform((value) => asPaletteVariantId(value));
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 = z45.enum(PALETTE_TOKEN_NAMES);
60353
+ var paletteTokenNameSchema = z46.enum(PALETTE_TOKEN_NAMES);
60117
60354
  var HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
60118
- var hexColorSchema = z45.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
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 = z45.object({
60359
+ var paletteVariantSchema = z46.object({
60123
60360
  id: paletteVariantIdSchema,
60124
- name: z45.string().min(1),
60125
- description: z45.string().min(1),
60361
+ name: z46.string().min(1),
60362
+ description: z46.string().min(1),
60126
60363
  tags: styleTagsSchema,
60127
- mode: z45.enum(["light", "dark"]),
60128
- colors: z45.array(variantPaletteColorSchema).min(1)
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 = z45.object({
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 z46 } from "zod";
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 = z46.enum(["generated", "user", "admin", "sdk"]);
60844
- var runtimeStyleFieldNameSchema = z46.enum(themeV2RuntimeStyleFieldNames);
60845
- var nonEmptyRuntimeStyleFieldNamesSchema = z46.array(runtimeStyleFieldNameSchema).min(1).transform((fields3) => [
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 = z46.enum([
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 = z46.discriminatedUnion("kind", [
60872
- z46.object({ kind: z46.literal("plain") }).strict(),
60873
- z46.object({
60874
- kind: z46.literal("panel"),
60875
- treatment: z46.enum(userPanelTreatments)
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
- z46.object({
60878
- kind: z46.literal("flush-panel"),
60879
- treatment: z46.enum(userFlushTreatments),
60880
- bleed: z46.enum(userFlushBleeds)
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 = z46.object({
60884
- blockId: z46.string().min(1).transform(asDesignBlockId),
60885
- blockKind: z46.string().min(1),
60886
- purpose: z46.string().min(1),
60887
- sectionSurface: z46.enum(userDesignOptionCatalog.sectionSurfaces),
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: z46.enum(userDesignOptionCatalog.itemSurfaces),
60890
- transitionAfter: z46.enum(userDesignOptionCatalog.transitions),
60891
- emphasis: z46.enum(userDesignOptionCatalog.emphases),
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 = z46.discriminatedUnion("kind", [
60895
- z46.object({
60896
- kind: z46.literal("theme-v2"),
61131
+ var styleAuthoritySchema = z47.discriminatedUnion("kind", [
61132
+ z47.object({
61133
+ kind: z47.literal("theme-v2"),
60897
61134
  source: designResolutionPolicySchema,
60898
- siteStyleId: z46.string().min(1).transform(asSiteStyleId),
60899
- templateId: z46.string().min(1).transform(asDesignSystemTemplateId),
60900
- templateVersion: z46.number().int().nonnegative(),
60901
- resolverVersion: z46.number().int().nonnegative()
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
- z46.object({
60904
- kind: z46.literal("legacy-raw"),
60905
- reason: z46.enum(["pre-theme-v2", "manual-runtime-fields"])
61140
+ z47.object({
61141
+ kind: z47.literal("legacy-raw"),
61142
+ reason: z47.enum(["pre-theme-v2", "manual-runtime-fields"])
60906
61143
  }).strict(),
60907
- z46.object({
60908
- kind: z46.literal("advanced-detached"),
60909
- reason: z46.literal("detached-custom-runtime-fields")
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 = z46.object({
60913
- unit: z46.literal("block-runtime-fields"),
60914
- blockId: z46.string().min(1).transform(asDesignBlockId),
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 = z46.object({
60919
- schemaVersion: z46.literal(themeV2DesignStateSchemaVersion),
60920
- siteStyleId: z46.string().min(1).transform(asSiteStyleId),
60921
- templateId: z46.string().min(1).transform(asDesignSystemTemplateId),
60922
- templateVersion: z46.number().int().nonnegative(),
60923
- resolverVersion: z46.number().int().nonnegative(),
60924
- rhythmPresetId: z46.string().min(1),
60925
- blocks: z46.array(blockDesignPlanSchema),
60926
- styleAuthorities: z46.array(blockRuntimeStyleAuthoritySchema)
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 z47 } from "zod";
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 = z47.object({
60949
- kind: z47.literal("panel"),
60950
- treatment: z47.enum(generatedPanelTreatments)
61185
+ var generatedPanelFrameSchema = z48.object({
61186
+ kind: z48.literal("panel"),
61187
+ treatment: z48.enum(generatedPanelTreatments)
60951
61188
  }).strict();
60952
- var generatedFlushPanelFrameSchema = z47.object({
60953
- kind: z47.literal("flush-panel"),
60954
- treatment: z47.enum(generatedFlushTreatments),
60955
- bleed: z47.enum(generatedFlushBleeds)
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 = z47.discriminatedUnion("kind", [
60958
- z47.object({ kind: z47.literal("plain") }).strict(),
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 = z47.enum(curatedSiteStyleIdValues).transform(asSiteStyleId);
61199
+ var generatedSiteStyleIdSchema = z48.enum(curatedSiteStyleIdValues).transform(asSiteStyleId);
60963
61200
  function generatedChoiceSchema(valueSchema) {
60964
- return z47.discriminatedUnion("kind", [
60965
- z47.object({
60966
- source: z47.literal("generated"),
60967
- kind: z47.literal("auto")
61201
+ return z48.discriminatedUnion("kind", [
61202
+ z48.object({
61203
+ source: z48.literal("generated"),
61204
+ kind: z48.literal("auto")
60968
61205
  }).strict(),
60969
- z47.object({
60970
- source: z47.literal("generated"),
60971
- kind: z47.literal("explicit"),
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 = z47.object({
61213
+ var generatedBlockDesignIntentSchema = z48.object({
60977
61214
  sectionSurface: generatedChoiceSchema(
60978
- z47.enum(generatedDesignOptionCatalog.sectionSurfaces)
61215
+ z48.enum(generatedDesignOptionCatalog.sectionSurfaces)
60979
61216
  ),
60980
61217
  contentFrame: generatedChoiceSchema(generatedContentFrameIntentSchema),
60981
61218
  itemSurface: generatedChoiceSchema(
60982
- z47.enum(generatedDesignOptionCatalog.itemSurfaces)
61219
+ z48.enum(generatedDesignOptionCatalog.itemSurfaces)
60983
61220
  ),
60984
61221
  transitionAfter: generatedChoiceSchema(
60985
- z47.enum(generatedDesignOptionCatalog.transitions)
61222
+ z48.enum(generatedDesignOptionCatalog.transitions)
60986
61223
  ),
60987
61224
  emphasis: generatedChoiceSchema(
60988
- z47.enum(generatedDesignOptionCatalog.emphases)
61225
+ z48.enum(generatedDesignOptionCatalog.emphases)
60989
61226
  )
60990
61227
  }).strict();
60991
- var generatedMediaCompositionIntentSchema = z47.enum([
61228
+ var generatedMediaCompositionIntentSchema = z48.enum([
60992
61229
  "none",
60993
61230
  "supporting",
60994
61231
  "dominant"
60995
61232
  ]);
60996
- var generatedDecorativeCompositionIntentSchema = z47.enum([
61233
+ var generatedDecorativeCompositionIntentSchema = z48.enum([
60997
61234
  "none",
60998
61235
  "supporting"
60999
61236
  ]);
61000
- var generatedHeroLegibilityStrategySchema = z47.enum([
61237
+ var generatedHeroLegibilityStrategySchema = z48.enum([
61001
61238
  "none",
61002
61239
  "scrim-gradient"
61003
61240
  ]);
61004
- var generatedBlockMediaIntentSchema = z47.object({
61241
+ var generatedBlockMediaIntentSchema = z48.object({
61005
61242
  media: generatedMediaCompositionIntentSchema,
61006
61243
  decorative: generatedDecorativeCompositionIntentSchema,
61007
61244
  heroLegibility: generatedChoiceSchema(generatedHeroLegibilityStrategySchema)
61008
61245
  }).strict();
61009
- var generatedBoundaryIntentSchema = z47.object({
61246
+ var generatedBoundaryIntentSchema = z48.object({
61010
61247
  transitionAfter: generatedChoiceSchema(
61011
- z47.enum(generatedDesignOptionCatalog.transitions)
61248
+ z48.enum(generatedDesignOptionCatalog.transitions)
61012
61249
  )
61013
61250
  }).strict();
61014
- var generatedPageDesignBlockIntentSchema = z47.object({
61015
- blockId: z47.string().min(1),
61016
- blockKind: z47.string().min(1),
61017
- purpose: z47.string().min(1),
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 = z47.object({
61259
+ var generatedPageDesignIntentSchema = z48.object({
61023
61260
  siteStyleId: generatedSiteStyleIdSchema,
61024
- blocks: z47.array(generatedPageDesignBlockIntentSchema)
61261
+ blocks: z48.array(generatedPageDesignBlockIntentSchema)
61025
61262
  }).strict();
61026
61263
 
61027
61264
  // ../theme-core/src/site-styles/pageDesignIntent.ts
61028
- import { z as z48 } from "zod";
61265
+ import { z as z49 } from "zod";
61029
61266
  var pageDesignIntentSchemaVersion = 1;
61030
- var pageDesignUserPinnedAppearanceChoiceSchema = z48.object({
61031
- kind: z48.literal("user-pinned"),
61032
- value: z48.string().min(1).transform(asAppearancePresetId)
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 = z48.object({
61035
- kind: z48.literal("user-pinned"),
61036
- value: z48.string().min(1).transform(asBoundaryOptionId)
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 = z48.object({
61039
- blockId: z48.string().min(1).transform(asDesignBlockId),
61040
- blockKind: z48.string().min(1),
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 = z48.object({
61044
- boundaryId: z48.string().min(1).transform(asDesignBoundaryId),
61045
- previousBlockId: z48.string().min(1).transform(asDesignBlockId),
61046
- nextBlockId: z48.string().min(1).transform(asDesignBlockId),
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: z48.ZodIssueCode.custom,
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 = z48.object({
61062
- schemaVersion: z48.literal(pageDesignIntentSchemaVersion),
61063
- siteStyleId: z48.string().min(1).transform(asSiteStyleId),
61064
- pageFlowPresetId: z48.string().min(1).transform(asPageFlowPresetId),
61065
- blockLookPins: z48.array(pageDesignBlockLookPinSchema),
61066
- boundaryPins: z48.array(pageDesignBoundaryPinSchema)
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: z48.ZodIssueCode.custom,
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 z49 } from "zod";
61350
- var nonEmptyStringSchema = z49.string().min(1);
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 = z49.number().int().nonnegative().transform(asBlockOrderIndex);
61356
- var publishedPageBlockSnapshotSchema = z49.object({
61357
- kind: z49.literal("published-block-content"),
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: z49.string().nullable(),
61597
+ identifier: z50.string().nullable(),
61361
61598
  blockKind: nonEmptyStringSchema,
61362
61599
  orderIndex: blockOrderIndexSchema
61363
61600
  }).strict();
61364
- var draftPageBlockSnapshotSchema = z49.object({
61365
- kind: z49.literal("draft-block-content"),
61601
+ var draftPageBlockSnapshotSchema = z50.object({
61602
+ kind: z50.literal("draft-block-content"),
61366
61603
  blockId: designBlockIdSchema,
61367
61604
  contentVersionId: blockContentVersionIdSchema.nullable(),
61368
- identifier: z49.string().nullable(),
61605
+ identifier: z50.string().nullable(),
61369
61606
  blockKind: nonEmptyStringSchema,
61370
61607
  orderIndex: blockOrderIndexSchema
61371
61608
  }).strict();
61372
- var missingPageBlockSnapshotSchema = z49.object({
61373
- kind: z49.literal("missing-block-content"),
61609
+ var missingPageBlockSnapshotSchema = z50.object({
61610
+ kind: z50.literal("missing-block-content"),
61374
61611
  blockId: designBlockIdSchema,
61375
- identifier: z49.string().nullable(),
61612
+ identifier: z50.string().nullable(),
61376
61613
  blockKind: nonEmptyStringSchema,
61377
61614
  orderIndex: blockOrderIndexSchema,
61378
- reason: z49.enum([
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 = z49.discriminatedUnion("kind", [
61621
+ var pageBlockSnapshotSchema = z50.discriminatedUnion("kind", [
61385
61622
  publishedPageBlockSnapshotSchema,
61386
61623
  draftPageBlockSnapshotSchema,
61387
61624
  missingPageBlockSnapshotSchema
61388
61625
  ]);
61389
- var publishedPageBlockSequenceSchema = z49.array(publishedPageBlockSnapshotSchema).superRefine(validateBlockSequence);
61390
- var draftPageBlockSequenceSchema = z49.array(pageBlockSnapshotSchema).superRefine(validateBlockSequence);
61391
- var publishedPageDesignVersionDataV1Schema = z49.object({
61392
- schemaVersion: z49.literal(1),
61393
- stage: z49.literal("published"),
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 = z49.object({
61398
- schemaVersion: z49.literal(1),
61399
- stage: z49.literal("draft"),
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 = z49.discriminatedUnion("stage", [
61640
+ var pageDesignVersionDataV1Schema = z50.discriminatedUnion("stage", [
61404
61641
  publishedPageDesignVersionDataV1Schema,
61405
61642
  draftPageDesignVersionDataV1Schema
61406
61643
  ]);
61407
- var contentVersionOwnerSchema = z49.discriminatedUnion("kind", [
61408
- z49.object({
61409
- kind: z49.literal("block"),
61644
+ var contentVersionOwnerSchema = z50.discriminatedUnion("kind", [
61645
+ z50.object({
61646
+ kind: z50.literal("block"),
61410
61647
  blockId: designBlockIdSchema
61411
61648
  }).strict(),
61412
- z49.object({
61413
- kind: z49.literal("entry"),
61649
+ z50.object({
61650
+ kind: z50.literal("entry"),
61414
61651
  entryId: designEntryIdSchema
61415
61652
  }).strict(),
61416
- z49.object({
61417
- kind: z49.literal("page"),
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 issue of collectBlockSequenceIssues(snapshots)) {
61423
- ctx.addIssue(issue);
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: z49.ZodIssueCode.custom,
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: z49.ZodIssueCode.custom,
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: z49.ZodIssueCode.custom,
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 z50 } from "zod";
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 = z50.object({
61523
- palette: z50.enum(themeTokenRecipeOptions.palette),
61524
- contrast: z50.enum(themeTokenRecipeOptions.contrast),
61525
- radius: z50.enum(themeTokenRecipeOptions.radius),
61526
- shadow: z50.enum(themeTokenRecipeOptions.shadow),
61527
- typography: z50.enum(themeTokenRecipeOptions.typography),
61528
- spacing: z50.enum(themeTokenRecipeOptions.spacing),
61529
- motion: z50.enum(themeTokenRecipeOptions.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 z51 } from "zod";
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 = z51.object({
61811
- id: z51.string(),
61812
- title: z51.string(),
61813
- slug: z51.string(),
61814
- path: z51.string(),
61815
- excerpt: z51.string().nullable().optional(),
61816
- image: z51.object({
61817
- url: z51.string().optional().nullable(),
61818
- alt: z51.string().optional().nullable()
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: z51.string().nullable().optional()
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 z52 } from "zod";
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 = z52.object({
62154
- id: z52.string(),
62155
- slug: z52.string(),
62156
- path: z52.string(),
62157
- title: z52.string(),
62158
- excerpt: z52.string().nullable().optional(),
62159
- publishedAt: z52.string().nullable().optional(),
62160
- updatedAt: z52.string(),
62161
- status: z52.string(),
62162
- image: z52.object({
62163
- url: z52.string(),
62164
- alt: z52.string().nullable().optional()
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: z52.array(blogPostListEntrySchema).optional()
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 z53 } from "zod";
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: z53.object({ fallback: z53.unknown() }),
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 = z53.object({
62350
- minItems: z53.number().int().min(1).default(10)
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 z54 } from "zod";
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 = z54.object({
62443
- base: z54.string().optional()
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 isPlainObject2(value) {
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 = z54.object({
62527
- base: z54.string().optional()
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 = isPlainObject2(value) ? value : isPlainObject2(context.data) ? context.data : {};
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 = isPlainObject2(value) ? value : isPlainObject2(context.data) ? context.data : {};
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 = isPlainObject2(value) ? value : isPlainObject2(context.data) ? context.data : {};
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 = z54.object({
62570
- base: z54.string()
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 = isPlainObject2(value) ? value : isPlainObject2(context.data) ? context.data : {};
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 = z54.object({
62585
- base: z54.string(),
62586
- whenAuto: z54.string(),
62587
- whenFixed: z54.string()
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 = z54.object({
62604
- max: z54.number().int().positive().default(1920),
62605
- quality: z54.number().int().min(1).max(100).default(85)
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 = z54.object({
62626
- whenTrue: z54.string(),
62627
- whenFalse: z54.string()
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 = z54.object({
62640
- base: z54.string(),
62641
- reverseClass: z54.string()
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 = z54.object({
62657
- side: z54.enum(["image", "text"])
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 = z54.object({
62672
- base: z54.string().optional()
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: z54.object({
62715
- breakpoint: z54.enum(["mobile", "md", "lg", "xl"])
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 z55 } from "zod";
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 = z55.object({
62847
- base: z55.string().optional(),
62848
- container: z55.string().optional(),
62849
- full: z55.string().optional()
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 = z55.object({
62866
- base: z55.string().optional(),
62867
- sticky: z55.string().optional(),
62868
- stickyTransparent: z55.string().optional(),
62869
- invert: z55.string().optional()
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 = z55.object({
62991
- base: z55.string().optional(),
62992
- surface: z55.string().optional(),
62993
- tokenPrefix: z55.string().optional(),
62994
- transparent: z55.string().optional()
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 = z55.object({
63099
- base: z55.string().optional()
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 = z55.object({
63122
- base: z55.string().optional(),
63123
- fullBleed: z55.string().optional(),
63124
- contained: z55.string().optional()
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 = z55.object({
63210
- base: z55.string().optional()
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 = z55.object({
63233
- base: z55.string().optional()
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 z56 } from "zod";
63288
- var mediaFromUrlOptionsSchema = z56.object({
63289
- width: z56.number().int().positive().optional(),
63290
- height: z56.number().int().positive().optional(),
63291
- quality: z56.number().int().min(1).max(100).optional(),
63292
- resize: z56.enum(["cover", "contain", "fill"]).optional()
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 z57 } from "zod";
63342
- var supportedRichTextTokenSchema = z57.enum(["year", "site_name"]);
63343
- var interpolateRichTextTokensOptionsSchema = z57.object({
63344
- tokens: z57.array(supportedRichTextTokenSchema).default(["year", "site_name"])
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 z58 } from "zod";
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 = z58.object({
65256
- slots: z58.array(z58.object({
65257
- startAt: z58.string(),
65258
- endAt: z58.string(),
65259
- resourceId: z58.string()
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 z59 } from "zod";
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 = z59.object({
65425
- id: z59.string(),
65426
- seriesId: z59.string(),
65427
- startsAt: z59.string(),
65428
- endsAt: z59.string(),
65429
- timeZone: z59.string(),
65430
- capacityOverride: z59.number().nullable().optional(),
65431
- overrides: z59.record(z59.string(), z59.unknown()).nullable().optional()
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: z59.object({
65673
+ eventDetailsData: z60.object({
65437
65674
  events: publicEventsArraySchema,
65438
- sitePasses: z59.object({ passes: z59.array(publicPassProductSchema) }),
65439
- siteMemberships: z59.object({ memberships: z59.array(publicMembershipProductSchema) })
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 z60 } from "zod";
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 = z60.object({
66014
- id: z60.string(),
66015
- identifier: z60.string(),
66016
- title: z60.string(),
66017
- slug: z60.string().nullable().optional(),
66018
- content: z60.record(z60.string(), z60.unknown()).optional(),
66019
- publishedAt: z60.string().nullable().optional()
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: z60.array(embedEntrySchema).optional()
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 z61 } from "zod";
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 = z61.object({
67240
- _type: z61.literal("teamMember"),
67241
- id: z61.string(),
67242
- name: z61.string(),
67243
- role: z61.string().nullable(),
67244
- roleLabel: z61.string().nullable(),
67245
- bio: z61.string().nullable(),
67246
- summary: z61.string().nullable(),
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: z61.string().nullable()
67485
+ profilePath: z62.string().nullable()
67249
67486
  });
67250
- var teamMembersDataSchema = z61.array(teamMemberDataSchema);
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 isPlainObject3(value) {
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 (isPlainObject3(value)) {
69029
+ if (isPlainObject4(value)) {
68793
69030
  return [routeId, value];
68794
69031
  }
68795
69032
  return null;
68796
69033
  }
68797
69034
  function extractRouteMapFromViewModel(viewModel) {
68798
- if (!isPlainObject3(viewModel)) return void 0;
69035
+ if (!isPlainObject4(viewModel)) return void 0;
68799
69036
  const root = viewModel.$root;
68800
- if (!isPlainObject3(root)) return void 0;
69037
+ if (!isPlainObject4(root)) return void 0;
68801
69038
  const routes = root.routes;
68802
- if (!isPlainObject3(routes)) return void 0;
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 (!isPlainObject3(viewModel)) return void 0;
69045
+ if (!isPlainObject4(viewModel)) return void 0;
68809
69046
  const root = viewModel.$root;
68810
- if (!isPlainObject3(root)) return void 0;
69047
+ if (!isPlainObject4(root)) return void 0;
68811
69048
  const pagesByIdentifier = root.pagesByIdentifier;
68812
- if (!isPlainObject3(pagesByIdentifier)) return void 0;
69049
+ if (!isPlainObject4(pagesByIdentifier)) return void 0;
68813
69050
  return pagesByIdentifier;
68814
69051
  }
68815
69052
  function extractEntriesByIdentifierFromViewModel(viewModel) {
68816
- if (!isPlainObject3(viewModel)) return void 0;
69053
+ if (!isPlainObject4(viewModel)) return void 0;
68817
69054
  const root = viewModel.$root;
68818
- if (!isPlainObject3(root)) return void 0;
69055
+ if (!isPlainObject4(root)) return void 0;
68819
69056
  const entriesByIdentifier = root.entriesByIdentifier;
68820
- if (!isPlainObject3(entriesByIdentifier)) return void 0;
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 = isPlainObject3(context.viewModel.$root) ? context.viewModel.$root : null;
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 && isPlainObject3(namedScope.value)) {
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 && isPlainObject3(scope.value)) {
69116
+ if (scope && isPlainObject4(scope.value)) {
68880
69117
  return scope.value;
68881
69118
  }
68882
69119
  }
68883
69120
  const content = context.viewModel.content;
68884
- if (isPlainObject3(content)) {
69121
+ if (isPlainObject4(content)) {
68885
69122
  return content;
68886
69123
  }
68887
- if (isPlainObject3(context.viewModel)) {
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 (!isPlainObject3(current)) return void 0;
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 (isPlainObject3(binding) && "source" in binding) {
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 (isPlainObject3(option) && "source" in option) {
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 = isPlainObject3(root) && root.contentEntry != null;
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 = isPlainObject3(root) && root.contentEntry != null;
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 = isPlainObject3(node.props) ? node.props : {};
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 isPlainObject4(value) {
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 isPlainObject4(value);
71610
+ return isPlainObject5(value);
71374
71611
  }
71375
71612
  function isRouteMap(value) {
71376
- if (!isPlainObject4(value)) return false;
71613
+ if (!isPlainObject5(value)) return false;
71377
71614
  return Object.values(value).every(isRouteMapEntry);
71378
71615
  }
71379
71616
  function isPageIdentifierMap(value) {
71380
- if (!isPlainObject4(value)) return false;
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 (!isPlainObject4(value)) return false;
71621
+ if (!isPlainObject5(value)) return false;
71385
71622
  for (const v of Object.values(value)) {
71386
- if (!isPlainObject4(v)) return false;
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 && isPlainObject4(root) && root.previewStage === "preview" ? "preview" : "published";
71394
- const routes = root && isPlainObject4(root) && isRouteMap(root.routes) ? root.routes : void 0;
71395
- const pagesByIdentifier = root && isPlainObject4(root) && isPageIdentifierMap(root.pagesByIdentifier) ? root.pagesByIdentifier : void 0;
71396
- const entriesByIdentifier = root && isPlainObject4(root) && isEntryIdentifierMap(root.entriesByIdentifier) ? root.entriesByIdentifier : void 0;
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 z62 } from "zod";
78205
- var portalLinkPayloadSchema = z62.object({
78206
- kind: z62.literal("portal"),
78207
- path: z62.string().trim().startsWith("/").optional(),
78208
- labels: z62.object({
78209
- loggedOut: z62.string().trim().min(1).optional(),
78210
- loggedIn: z62.string().trim().min(1).optional()
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 = z62.discriminatedUnion("kind", [
78214
- z62.object({
78215
- kind: z62.literal("icon-only")
78450
+ var cartLinkLabelConfigSchema = z63.discriminatedUnion("kind", [
78451
+ z63.object({
78452
+ kind: z63.literal("icon-only")
78216
78453
  }),
78217
- z62.object({
78218
- kind: z62.literal("icon-with-label"),
78219
- label: z62.string().trim().min(1)
78454
+ z63.object({
78455
+ kind: z63.literal("icon-with-label"),
78456
+ label: z63.string().trim().min(1)
78220
78457
  })
78221
78458
  ]);
78222
- var cartLinkPayloadSchema = z62.object({
78223
- kind: z62.literal("cart"),
78224
- badge: z62.enum(["show-count", "hidden"]),
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 = z62.object({
78228
- kind: z62.literal("internal"),
78229
- routeId: z62.string().uuid(),
78230
- entityId: z62.string().uuid(),
78231
- entityType: z62.enum(["page", "content"]),
78232
- href: z62.string().min(1),
78233
- title: z62.string().min(1),
78234
- typeLabel: z62.string().min(1),
78235
- contentTypeKey: z62.string().nullable().optional(),
78236
- contentTypeName: z62.string().nullable().optional(),
78237
- updatedAt: z62.string().nullable().optional()
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 = z62.object({
78240
- kind: z62.literal("external"),
78476
+ var externalLinkSchema2 = z63.object({
78477
+ kind: z63.literal("external"),
78241
78478
  // Navigation external links are expected to be absolute URLs.
78242
- href: z62.string().url()
78479
+ href: z63.string().url()
78243
78480
  });
78244
- var customLinkSchema2 = z62.object({
78245
- kind: z62.literal("url"),
78246
- href: z62.string().min(1)
78481
+ var customLinkSchema2 = z63.object({
78482
+ kind: z63.literal("url"),
78483
+ href: z63.string().min(1)
78247
78484
  });
78248
- var pageLinkSchema2 = z62.object({
78249
- kind: z62.literal("page"),
78250
- identifier: z62.string().min(1)
78485
+ var pageLinkSchema2 = z63.object({
78486
+ kind: z63.literal("page"),
78487
+ identifier: z63.string().min(1)
78251
78488
  });
78252
- var entryLinkSchema2 = z62.object({
78253
- kind: z62.literal("entry"),
78254
- contentType: z62.string().min(1),
78255
- identifier: z62.string().min(1)
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 = z62.discriminatedUnion("kind", [
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 = z62.discriminatedUnion(
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 z63 } from "zod";
78519
+ import { z as z64 } from "zod";
78283
78520
  function unsafeRetypeZodSchema(schema) {
78284
78521
  return schema;
78285
78522
  }
78286
- var navIdListSchema = z63.preprocess((value) => {
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
- }, z63.array(z63.string()).max(200).optional());
78291
- var dashboardNavVisibilityBaseSchema = z63.object({
78292
- mode: z63.enum(["augment", "restrict"]).optional(),
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 = z63.object({
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 = z63.object({
78542
+ var dashboardNavigationConfigSchema = z64.object({
78306
78543
  siteNav: dashboardNavVisibilitySchema.optional(),
78307
78544
  settingsNav: dashboardNavVisibilitySchema.optional()
78308
78545
  }).strip();
78309
- var dashboardConfigSchema = z63.object({
78310
- previewEditingEnabled: z63.boolean().optional(),
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 = z63.enum(SUPPORTED_LOADER_ENDPOINTS);
78316
- var loaderParamBindingSchema = z63.object({
78317
- $bind: z63.object({
78318
- from: z63.string().min(1, "Binding path is required"),
78319
- fallback: z63.string().optional()
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 = z63.union([
78323
- z63.string(),
78324
- z63.number(),
78325
- z63.boolean(),
78559
+ var loaderParamValueSchema = z64.union([
78560
+ z64.string(),
78561
+ z64.number(),
78562
+ z64.boolean(),
78326
78563
  loaderParamBindingSchema
78327
78564
  ]);
78328
- var sdkConfigLoaderSchema = z63.object({
78565
+ var sdkConfigLoaderSchema = z64.object({
78329
78566
  endpoint: sdkLoaderEndpointSchema,
78330
- params: z63.record(z63.string(), loaderParamValueSchema),
78331
- mode: z63.enum(["server", "client"]).default("server")
78567
+ params: z64.record(z64.string(), loaderParamValueSchema),
78568
+ mode: z64.enum(["server", "client"]).default("server")
78332
78569
  });
78333
- var sdkDataLoadersSchema = z63.record(z63.string(), sdkConfigLoaderSchema).refine((loaders) => Object.keys(loaders).length <= 5, { message: "Maximum 5 data loaders per block" }).optional();
78334
- var sdkCustomBlockIdSchema = z63.string().min(8).regex(/^custom\.[a-z][a-z0-9-]*$/, {
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 = z63.object({
78574
+ var sdkCustomBlockInputSchema = z64.object({
78338
78575
  id: sdkCustomBlockIdSchema,
78339
- title: z63.string().min(1),
78340
- titleSource: z63.union([z63.string().min(1), z63.array(z63.string().min(1)).min(1)]).optional(),
78341
- description: z63.string().optional(),
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: z63.string().optional(),
78344
- tags: z63.array(z63.string()).optional(),
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: z63.record(z63.string().min(1), NodeSchema).optional(),
78349
- defaultVariant: z63.string().min(1).optional(),
78350
- variantOptions: z63.record(
78351
- z63.string().min(1),
78352
- z63.object({
78353
- label: z63.string().min(1).optional(),
78354
- description: z63.string().min(1).optional(),
78355
- icon: z63.string().min(1).optional()
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: z63.ZodIssueCode.custom,
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: z63.ZodIssueCode.custom,
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: z63.ZodIssueCode.custom,
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: z63.ZodIssueCode.custom,
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: z63.ZodIssueCode.custom,
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 = z63.object({
78645
+ var sdkBlockFieldExtensionInputSchema = z64.object({
78409
78646
  fields: fieldDefinitionInputSchema.array().min(1)
78410
78647
  });
78411
- var sdkBlockFieldExtensionsInputSchema = z63.record(
78412
- z63.string().min(1),
78648
+ var sdkBlockFieldExtensionsInputSchema = z64.record(
78649
+ z64.string().min(1),
78413
78650
  sdkBlockFieldExtensionInputSchema
78414
78651
  );
78415
- var sdkThemePaletteSchema = z63.record(z63.string(), z63.string());
78416
- var sdkThemeConfigSchema = z63.object({
78652
+ var sdkThemePaletteSchema = z64.record(z64.string(), z64.string());
78653
+ var sdkThemeConfigSchema = z64.object({
78417
78654
  palette: sdkThemePaletteSchema
78418
78655
  });
78419
- var sdkSectionBackgroundSchema = z63.object({
78420
- id: z63.string().min(1),
78421
- label: z63.string().min(1),
78422
- token: z63.string().min(1)
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 = z63.object({
78425
- backgroundColor: z63.boolean().optional(),
78426
- backgroundImage: z63.boolean().optional(),
78427
- backgroundGradient: z63.boolean().optional(),
78428
- spacing: z63.union([z63.array(z63.enum(["compact", "default", "spacious"])), z63.boolean()]).optional(),
78429
- textColor: z63.boolean().optional()
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 = z63.object({
78432
- maxWidth: z63.union([z63.array(z63.enum(["narrow", "default", "wide", "full"])), z63.boolean()]).optional(),
78433
- alignment: z63.union([z63.array(z63.enum(["left", "center", "right"])), z63.boolean()]).optional()
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 = z63.object({
78436
- sectionBackgrounds: z63.array(sdkSectionBackgroundSchema).optional(),
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 = z63.object({
78441
- footerBlocks: z63.array(
78442
- z63.object({
78443
- id: z63.string().min(1).optional(),
78444
- kind: z63.string().min(1),
78445
- content: z63.record(z63.string(), z63.unknown()).optional()
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 = z63.object({
78450
- value: z63.string(),
78451
- label: z63.string()
78686
+ var sdkFieldSelectOptionSchema = z64.object({
78687
+ value: z64.string(),
78688
+ label: z64.string()
78452
78689
  });
78453
- var sdkBlockFieldConfigSchema = z63.object({
78454
- options: z63.array(sdkFieldSelectOptionSchema).optional()
78690
+ var sdkBlockFieldConfigSchema = z64.object({
78691
+ options: z64.array(sdkFieldSelectOptionSchema).optional()
78455
78692
  });
78456
- var sdkBlockFieldOptionsMapSchema = z63.record(
78457
- z63.string().regex(/^(block\.|custom\.)[a-z][a-z0-9-]*$/, {
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
- z63.record(z63.string().min(1), sdkBlockFieldConfigSchema)
78697
+ z64.record(z64.string().min(1), sdkBlockFieldConfigSchema)
78461
78698
  ).optional();
78462
- var sdkContentTypeTemplateConfigSchema = z63.object({
78463
- blocks: z63.array(z63.unknown())
78699
+ var sdkContentTypeTemplateConfigSchema = z64.object({
78700
+ blocks: z64.array(z64.unknown())
78464
78701
  }).passthrough();
78465
- var sdkContentTypeConfigSchema = z63.object({
78466
- key: z63.string().min(1),
78467
- fields: z63.array(z63.unknown()),
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 = z63.object({
78471
- contentTypes: z63.array(sdkContentTypeConfigSchema).optional(),
78472
- pages: z63.array(z63.unknown()).optional(),
78473
- entries: z63.array(z63.unknown()).optional(),
78474
- navigationMenus: z63.array(z63.unknown()).optional(),
78475
- settings: z63.unknown().optional()
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 = z63.string().min(1).max(SDK_WORKFLOW_ID_MAX_LENGTH).regex(SDK_WORKFLOW_ID_PATTERN, {
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 = z63.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 "/"' });
78492
- var sdkWorkflowManualTriggerSchema = z63.object({
78493
- type: z63.literal("manual")
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 = z63.discriminatedUnion("type", [
78732
+ var sdkWorkflowTriggerSchema = z64.discriminatedUnion("type", [
78496
78733
  sdkWorkflowManualTriggerSchema
78497
78734
  ]);
78498
- var sdkWorkflowConfirmationSchema = z63.object({
78499
- title: z63.string().trim().min(1).max(SDK_WORKFLOW_CONFIRMATION_TITLE_MAX_LENGTH),
78500
- body: z63.string().trim().min(1).max(SDK_WORKFLOW_CONFIRMATION_BODY_MAX_LENGTH).optional()
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 = z63.object({
78739
+ var sdkWorkflowConfigSchema = z64.object({
78503
78740
  id: sdkWorkflowIdSchema,
78504
- title: z63.string().trim().min(1).max(SDK_WORKFLOW_TITLE_MAX_LENGTH),
78505
- description: z63.string().trim().min(1).max(SDK_WORKFLOW_DESCRIPTION_MAX_LENGTH).optional(),
78506
- contentType: z63.string().trim().min(1).max(SDK_WORKFLOW_CONTENT_TYPE_MAX_LENGTH),
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: z63.array(sdkWorkflowTriggerSchema).min(1).max(SDK_WORKFLOW_TRIGGER_MAX_COUNT),
78745
+ triggers: z64.array(sdkWorkflowTriggerSchema).min(1).max(SDK_WORKFLOW_TRIGGER_MAX_COUNT),
78509
78746
  confirmation: sdkWorkflowConfirmationSchema.optional()
78510
78747
  }).strict();
78511
- var sdkWorkflowsSchema = z63.array(sdkWorkflowConfigSchema).max(SDK_WORKFLOW_MAX_COUNT, "Maximum 50 workflows per site").refine((workflows) => {
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 = z63.object({
78516
- siteId: z63.string().uuid(),
78517
- previewUrl: z63.string().url().optional(),
78518
- liveUrl: z63.string().url().optional(),
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: z63.array(sdkCustomBlockInputSchema).max(100, "Maximum 100 custom blocks per site").refine((blocks) => {
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: z63.string().optional(),
78531
- sync: z63.object({
78532
- existingEntries: z63.enum(["skip", "update"]).optional()
78767
+ contentDir: z64.string().optional(),
78768
+ sync: z64.object({
78769
+ existingEntries: z64.enum(["skip", "update"]).optional()
78533
78770
  }).optional(),
78534
- deploy: z63.object({
78535
- verifyCommand: z63.string().optional(),
78536
- prebuildOutput: z63.string().optional()
78771
+ deploy: z64.object({
78772
+ verifyCommand: z64.string().optional(),
78773
+ prebuildOutput: z64.string().optional()
78537
78774
  }).optional(),
78538
- themeSource: z63.enum(["local", "cms"]).optional(),
78539
- activeTheme: z63.string().optional(),
78540
- enablePortal: z63.boolean().optional(),
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 = z63.object({
78780
+ var pushSdkConfigBodySchema = z64.object({
78544
78781
  config: riverbankSiteConfigInputSchema,
78545
- forceContentTypes: z63.boolean().optional()
78782
+ forceContentTypes: z64.boolean().optional()
78546
78783
  }).strict();
78547
78784
 
78548
78785
  // ../api/src/siteOnboarding.ts
78549
- import { z as z64 } from "zod";
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 = z64.discriminatedUnion(
78793
+ var acknowledgeLaunchRequirementRequestSchema = z65.discriminatedUnion(
78557
78794
  "requirementId",
78558
78795
  [
78559
- z64.object({
78560
- requirementId: z64.literal("review_generated_site")
78796
+ z65.object({
78797
+ requirementId: z65.literal("review_generated_site")
78561
78798
  }),
78562
- z64.object({
78563
- requirementId: z64.literal(
78799
+ z65.object({
78800
+ requirementId: z65.literal(
78564
78801
  LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS.configure_appointments.requirementId
78565
78802
  ),
78566
- overrideReason: z64.literal(
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 z65 } from "zod";
78743
- var appointmentSetupRefSchema = z65.discriminatedUnion("kind", [
78744
- z65.object({ kind: z65.literal("existing"), id: z65.string().min(1) }),
78745
- z65.object({ kind: z65.literal("new"), draftId: z65.string().min(1) })
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 = z65.discriminatedUnion("kind", [
78748
- z65.object({ kind: z65.literal("none") }),
78749
- z65.object({ kind: z65.literal("existing"), venueId: z65.string().min(1) }),
78750
- z65.object({
78751
- kind: z65.literal("create"),
78752
- draftId: z65.string().min(1),
78753
- title: z65.string().trim().min(1),
78754
- description: z65.string().nullable(),
78755
- timezone: z65.string().trim().min(1).nullable(),
78756
- addressJson: z65.record(z65.string(), z65.unknown()),
78757
- locationJson: z65.object({ lat: z65.number(), lng: z65.number() }).nullable()
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 = z65.object({
78761
- priceType: z65.union([z65.literal("free"), z65.literal("paid")])
78762
- });
78763
- var appointmentSetupServiceAssignmentDraftSchema = z65.discriminatedUnion("kind", [
78764
- z65.object({ kind: z65.literal("all_practitioners") }),
78765
- z65.object({
78766
- kind: z65.literal("selected_practitioners"),
78767
- resourceRefs: z65.array(appointmentSetupRefSchema)
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 = z65.object({
79007
+ var appointmentSetupServiceDraftSchema = z66.object({
78771
79008
  ref: appointmentSetupRefSchema,
78772
- title: z65.string().trim().min(1),
78773
- description: z65.string().nullable(),
78774
- durationMinutes: z65.number().int().positive(),
78775
- priceAmount: z65.number().int().nonnegative().nullable(),
78776
- isActive: z65.boolean(),
78777
- locationType: z65.union([
78778
- z65.literal("virtual"),
78779
- z65.literal("in_person"),
78780
- z65.literal("hybrid")
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: z65.string().trim().min(1).nullable(),
79020
+ timezone: z66.string().trim().min(1).nullable(),
78784
79021
  payment: appointmentSetupPaymentDraftSchema,
78785
79022
  assignment: appointmentSetupServiceAssignmentDraftSchema
78786
79023
  });
78787
- var appointmentSetupPractitionerDraftSchema = z65.object({
79024
+ var appointmentSetupPractitionerDraftSchema = z66.object({
78788
79025
  ref: appointmentSetupRefSchema,
78789
- displayName: z65.string().trim().min(1),
78790
- bio: z65.string().nullable(),
78791
- timezone: z65.string().trim().min(1),
78792
- colorHex: z65.string().nullable()
78793
- });
78794
- var appointmentSetupWeeklyWindowDraftSchema = z65.object({
78795
- weekday: z65.number().int().min(0).max(6),
78796
- startTime: z65.string(),
78797
- endTime: z65.string()
78798
- });
78799
- var appointmentSetupAvailabilityDraftSchema = z65.object({
78800
- kind: z65.literal("weekly_windows"),
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: z65.array(appointmentSetupWeeklyWindowDraftSchema)
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 = z65.object({
78808
- minLeadMinutes: z65.number().int().nonnegative().max(APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX),
78809
- maxBookingNoticeMinutes: z65.number().int().nonnegative().max(APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX)
78810
- });
78811
- var applyAppointmentSetupRequestSchema = z65.object({
78812
- services: z65.array(appointmentSetupServiceDraftSchema),
78813
- practitioners: z65.array(appointmentSetupPractitionerDraftSchema),
78814
- availability: z65.array(appointmentSetupAvailabilityDraftSchema),
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 z66 } from "zod";
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 = z66.enum(SITE_BANNER_SCOPE_VALUES);
78839
- var siteBannerToneSchema = z66.enum(SITE_BANNER_TONE_VALUES);
78840
- var siteBannerBodySchema = z66.unknown().transform(unwrapRichTextValue);
78841
- var siteBannerCtaSchema = z66.object({
78842
- label: z66.string().trim().min(1),
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 = z66.discriminatedUnion("enabled", [
78846
- z66.object({
78847
- enabled: z66.literal(false)
79082
+ var siteBannerSettingsSchema = z67.discriminatedUnion("enabled", [
79083
+ z67.object({
79084
+ enabled: z67.literal(false)
78848
79085
  }),
78849
- z66.object({
78850
- enabled: z66.literal(true),
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 issue of analysis.issues) {
79099
+ for (const issue2 of analysis.issues) {
78863
79100
  ctx.addIssue({
78864
- code: z66.ZodIssueCode.custom,
79101
+ code: z67.ZodIssueCode.custom,
78865
79102
  path: ["body"],
78866
- message: siteBannerBodyIssueMessage(issue)
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(issue) {
78901
- switch (issue) {
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 z67 } from "zod";
79089
- var Rfc6902PatchOp = z67.discriminatedUnion("op", [
79325
+ import { z as z68 } from "zod";
79326
+ var Rfc6902PatchOp = z68.discriminatedUnion("op", [
79090
79327
  // Standard RFC-6902 operations
79091
- z67.object({
79092
- op: z67.literal("add"),
79093
- path: z67.string(),
79094
- value: z67.unknown()
79328
+ z68.object({
79329
+ op: z68.literal("add"),
79330
+ path: z68.string(),
79331
+ value: z68.unknown()
79095
79332
  }),
79096
- z67.object({
79097
- op: z67.literal("remove"),
79098
- path: z67.string()
79333
+ z68.object({
79334
+ op: z68.literal("remove"),
79335
+ path: z68.string()
79099
79336
  }),
79100
- z67.object({
79101
- op: z67.literal("replace"),
79102
- path: z67.string(),
79103
- value: z67.unknown()
79337
+ z68.object({
79338
+ op: z68.literal("replace"),
79339
+ path: z68.string(),
79340
+ value: z68.unknown()
79104
79341
  }),
79105
- z67.object({
79106
- op: z67.literal("move"),
79107
- from: z67.string(),
79108
- path: z67.string()
79342
+ z68.object({
79343
+ op: z68.literal("move"),
79344
+ from: z68.string(),
79345
+ path: z68.string()
79109
79346
  }),
79110
- z67.object({
79111
- op: z67.literal("copy"),
79112
- from: z67.string(),
79113
- path: z67.string()
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
- z67.object({
79117
- op: z67.literal("add_block"),
79118
- blockKind: z67.string(),
79119
- afterBlockId: z67.string().nullable(),
79120
- content: z67.record(z67.string(), z67.unknown()),
79121
- rationale: z67.string()
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
- z67.object({
79124
- op: z67.literal("delete_block"),
79125
- blockId: z67.string(),
79126
- rationale: z67.string()
79360
+ z68.object({
79361
+ op: z68.literal("delete_block"),
79362
+ blockId: z68.string(),
79363
+ rationale: z68.string()
79127
79364
  }),
79128
- z67.object({
79129
- op: z67.literal("reorder_block"),
79130
- blockId: z67.string(),
79131
- afterBlockId: z67.string().nullable(),
79132
- rationale: z67.string()
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 = z67.object({
79136
- request: z67.string().min(1).max(2e3)
79372
+ var PlaygroundProposeRequest = z68.object({
79373
+ request: z68.string().min(1).max(2e3)
79137
79374
  });
79138
- var MultiPagePatchEnvelope = z67.object({
79139
- pageId: z67.string(),
79140
- blockId: z67.string().optional(),
79375
+ var MultiPagePatchEnvelope = z68.object({
79376
+ pageId: z68.string(),
79377
+ blockId: z68.string().optional(),
79141
79378
  // Not present for page-level ops
79142
- blockKind: z67.string().optional(),
79143
- blockPurpose: z67.string().optional().nullable(),
79144
- ops: z67.array(Rfc6902PatchOp),
79145
- rationale: z67.string(),
79146
- currentContent: z67.record(z67.string(), z67.unknown()).optional()
79147
- });
79148
- var MultiPageUpdateResponse = z67.object({
79149
- patches: z67.array(MultiPagePatchEnvelope),
79150
- assistantMessage: z67.string(),
79151
- pagesModified: z67.number(),
79152
- toolCallsUsed: z67.number()
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