@riverbankcms/sdk 0.70.3 → 0.71.0

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 (82) hide show
  1. package/dist/_dts/api/src/contentTypes.d.ts +2 -1
  2. package/dist/_dts/block-form/src/client/index.d.ts +1 -1
  3. package/dist/_dts/block-form/src/fields/types.d.ts +14 -2
  4. package/dist/_dts/block-form/src/registry/schemas.d.ts +2 -0
  5. package/dist/_dts/block-form/src/widgets/MediaField/mediaFieldDefaults.d.ts +2 -2
  6. package/dist/_dts/block-form/src/widgets/MediaField/mediaFieldSchema.d.ts +2 -2
  7. package/dist/_dts/blocks/src/lib/media.d.ts +1 -1
  8. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +1829 -149
  9. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +1829 -149
  10. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +1829 -149
  11. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +1829 -149
  12. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +1829 -149
  13. package/dist/_dts/blocks/src/system/blocks/cta-full.d.ts +1 -30727
  14. package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +11 -30827
  15. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +1829 -149
  16. package/dist/_dts/blocks/src/system/blocks/file-download.d.ts +3 -3
  17. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +1829 -149
  18. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +106 -1
  19. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +1829 -149
  20. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +1829 -149
  21. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +1829 -149
  22. package/dist/_dts/blocks/src/system/defineBlock.d.ts +3 -3
  23. package/dist/_dts/blocks/src/system/fragments/library/card.d.ts +2 -30793
  24. package/dist/_dts/blocks/src/system/fragments/library/ctaRow.d.ts +2 -30727
  25. package/dist/_dts/blocks/src/system/fragments/library/feedbackCallout.d.ts +2 -30779
  26. package/dist/_dts/blocks/src/system/fragments/library/heroCtaRow.d.ts +33 -30743
  27. package/dist/_dts/blocks/src/system/fragments/library/sectionState.d.ts +2 -30770
  28. package/dist/_dts/blocks/src/system/fragments/types.d.ts +8 -7
  29. package/dist/_dts/blocks/src/system/manifest/derivedContent.d.ts +7 -5
  30. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +1 -1
  31. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +192 -3
  32. package/dist/_dts/blocks/src/system/runtime/nodes/file-download.d.ts +1 -1
  33. package/dist/_dts/content-model/src/content-types/schema.d.ts +7 -0
  34. package/dist/_dts/content-model/src/contentManifest.d.ts +4 -1
  35. package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +1 -1
  36. package/dist/_dts/core/src/index.d.ts +1 -1
  37. package/dist/_dts/core/src/planner.d.ts +4 -0
  38. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +53 -20
  39. package/dist/_dts/editor-blocks/src/index.d.ts +1 -1
  40. package/dist/_dts/editor-blocks/src/media/MediaField.d.ts +6 -5
  41. package/dist/_dts/media-core/src/videoSlotPolicy.d.ts +0 -1
  42. package/dist/_dts/media-editor/src/context.d.ts +4 -1
  43. package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +8 -1
  44. package/dist/_dts/media-react/src/index.d.ts +1 -5
  45. package/dist/_dts/preview-next/src/client/sdk/SdkPreviewMode.d.ts +1 -0
  46. package/dist/_dts/preview-next/src/client/widgets/PreviewMediaField.d.ts +2 -1
  47. package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +1 -0
  48. package/dist/_dts/sdk/src/config/field-definitions.d.ts +6 -2
  49. package/dist/_dts/sdk/src/config/typed-entries.d.ts +4 -2
  50. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +2 -1
  51. package/dist/_dts/sdk/src/manifest/prompt/examples/cta.d.ts +5 -5
  52. package/dist/_dts/sdk/src/manifest/prompt/examples/features-grid.d.ts +2 -2
  53. package/dist/_dts/sdk/src/manifest/prompt/examples/hero.d.ts +2 -2
  54. package/dist/_dts/sdk/src/manifest/prompt/examples/pricing.d.ts +10 -10
  55. package/dist/_dts/sdk/src/manifest/prompt/examples/testimonials.d.ts +4 -4
  56. package/dist/_dts/sdk/src/manifest/validation/output-schema.d.ts +11 -1
  57. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +19 -1
  58. package/dist/_dts/sdk/src/public-api/contracts.d.ts +2 -1
  59. package/dist/_dts/sdk/src/version.d.ts +1 -1
  60. package/dist/cli/index.mjs +395 -190
  61. package/dist/cli/init-docs/content/workflow-preview-mode.md +167 -0
  62. package/dist/client/client.mjs +243 -203
  63. package/dist/client/hooks.mjs +172 -121
  64. package/dist/client/rendering/client.mjs +148 -112
  65. package/dist/client/rendering/islands.mjs +80 -31
  66. package/dist/client/rendering.mjs +242 -202
  67. package/dist/preview-next/client/index.mjs +60 -10
  68. package/dist/preview-next/client/runtime.mjs +408 -1141
  69. package/dist/server/components.mjs +219 -171
  70. package/dist/server/config-template-validation.mjs +31 -1
  71. package/dist/server/config-validation.mjs +172 -121
  72. package/dist/server/config.mjs +172 -121
  73. package/dist/server/data.mjs +172 -121
  74. package/dist/server/index.mjs +1 -1
  75. package/dist/server/next.mjs +220 -172
  76. package/dist/server/page-converter.mjs +379 -185
  77. package/dist/server/prebuild.mjs +1 -1
  78. package/dist/server/rendering/server.mjs +219 -171
  79. package/dist/server/rendering.mjs +219 -171
  80. package/dist/server/routing.mjs +175 -124
  81. package/dist/server/server.mjs +173 -122
  82. package/package.json +6 -1
@@ -1,6 +1,6 @@
1
- import { z } from "zod";
2
- import { fieldSchema, type FieldDefinition } from "../manifest/schema";
3
- import { type NodeDefinition } from "../node";
1
+ import { z } from 'zod';
2
+ import { type FieldDefinition, type FieldDefinitionInput } from '../manifest/schema';
3
+ import { type NodeDefinition } from '../node';
4
4
  declare const fragmentDataSchema: z.ZodObject<{
5
5
  key: z.ZodString;
6
6
  loader: z.ZodOptional<z.ZodObject<{
@@ -14,17 +14,18 @@ declare const fragmentDataSchema: z.ZodObject<{
14
14
  }, z.core.$strip>;
15
15
  export type FragmentDataConfigInput = z.input<typeof fragmentDataSchema>;
16
16
  export type FragmentDataConfig = z.output<typeof fragmentDataSchema>;
17
+ export type FragmentFieldConfigInput = FieldDefinitionInput;
17
18
  export type FragmentConfig = {
18
19
  id: string;
19
20
  title?: string;
20
21
  description?: string;
21
- category?: "content" | "media" | "interactive" | "layout";
22
+ category?: 'content' | 'media' | 'interactive' | 'layout';
22
23
  icon?: string;
23
- fields?: readonly z.input<typeof fieldSchema>[];
24
+ fields?: readonly FragmentFieldConfigInput[];
24
25
  layout: NodeDefinition | readonly NodeDefinition[];
25
26
  data?: FragmentDataConfigInput;
26
27
  };
27
- export type FragmentDefinition = Omit<FragmentConfig, "fields" | "layout" | "data"> & {
28
+ export type FragmentDefinition = Omit<FragmentConfig, 'fields' | 'layout' | 'data'> & {
28
29
  fields: FieldDefinition[];
29
30
  layout: NodeDefinition[];
30
31
  data?: FragmentDataConfig;
@@ -37,7 +38,7 @@ type PickFragmentProperty<C, K extends keyof FragmentConfig> = K extends keyof C
37
38
  * Content derivation needs only a fragment's declared fields. Layout and data
38
39
  * loader details stay runtime-only, keeping block manifest phantoms compact.
39
40
  */
40
- export type FragmentContentShapeInput<C extends FragmentConfig> = PickFragmentProperty<C, "fields">;
41
+ export type FragmentContentShapeInput<C extends FragmentConfig> = PickFragmentProperty<C, 'fields'>;
41
42
  export type DefinedFragment<C> = FragmentDefinition & {
42
43
  readonly [FragmentInput]: C;
43
44
  };
@@ -98,7 +98,7 @@ type FieldToValue<F extends DerivableField> = F extends {
98
98
  readonly __boxStyleType?: 'container';
99
99
  } ? ContainerStylesContent : F extends {
100
100
  readonly __boxStyleType?: 'card';
101
- } ? CardStylesContent : F['type'] extends 'text' | 'slug' | 'url' | 'reference' | 'date' | 'time' | 'datetime' ? string : F['type'] extends 'number' ? number : F['type'] extends 'boolean' ? boolean : F['type'] extends 'richText' ? RichTextDoc : F['type'] extends 'media' ? Media : F['type'] extends 'link' ? LinkValue : F['type'] extends 'select' ? SelectValue<F> : F['type'] extends 'group' | 'modal' | 'tabGroup' ? CompositeValue<F> : F['type'] extends 'repeater' ? ReadonlyArray<RepeaterItemValue<F>> : F['type'] extends 'presetOrCustom' | 'contentTypeSelect' | 'entryPicker' ? unknown : never;
101
+ } ? CardStylesContent : F['type'] extends 'text' | 'slug' | 'url' | 'reference' | 'date' | 'time' | 'datetime' ? string : F['type'] extends 'number' ? number : F['type'] extends 'boolean' ? boolean : F['type'] extends 'richText' ? RichTextDoc : F['type'] extends 'media' | 'file' ? Media : F['type'] extends 'link' ? LinkValue : F['type'] extends 'select' ? SelectValue<F> : F['type'] extends 'group' | 'modal' | 'tabGroup' ? CompositeValue<F> : F['type'] extends 'repeater' ? ReadonlyArray<RepeaterItemValue<F>> : F['type'] extends 'presetOrCustom' | 'contentTypeSelect' | 'entryPicker' ? unknown : never;
102
102
  /**
103
103
  * Select-field value type.
104
104
  *
@@ -184,7 +184,9 @@ type FieldsFromFragmentInstance<Instance> = Instance extends {
184
184
  } ? ScopeFields<FieldsFromFragment<Fragment>, Scope> : Instance extends {
185
185
  fragment: infer Fragment;
186
186
  } ? FieldsFromFragment<Fragment> : never;
187
- type FieldsFromFragment<Fragment> = [FragmentConfigInputOf<Fragment>] extends [never] ? Fragment extends {
187
+ type FieldsFromFragment<Fragment> = [FragmentConfigInputOf<Fragment>] extends [
188
+ never
189
+ ] ? Fragment extends {
188
190
  fields: infer Fs extends ReadonlyArray<DerivableField>;
189
191
  } ? Fs[number] : never : FragmentConfigInputOf<Fragment> extends {
190
192
  fields?: infer Fs extends ReadonlyArray<DerivableField>;
@@ -220,9 +222,9 @@ type SyntheticSectionStylesField<C> = C extends {
220
222
  type: 'modal';
221
223
  readonly __boxStyleType?: 'section';
222
224
  };
223
- export type ContentFromBlockConfig<C> = [
224
- FieldsFromBlockConfig<C>
225
- ] extends [never] ? Record<string, never> : ContentFromFieldUnion<FieldsFromBlockConfig<C>>;
225
+ export type ContentFromBlockConfig<C> = [FieldsFromBlockConfig<C>] extends [
226
+ never
227
+ ] ? Record<string, never> : ContentFromFieldUnion<FieldsFromBlockConfig<C>>;
226
228
  /**
227
229
  * The block content type for a manifest. Pre-existing field-only shape:
228
230
  * `type HeroContent = ContentFromManifest<typeof heroManifest>`
@@ -145,7 +145,7 @@ export type RichTextFieldValidationPlan = PlanBase<"richText", "object", ObjectC
145
145
  fieldType: "richText";
146
146
  }>;
147
147
  export type MediaFieldValidationPlan = PlanBase<"media", "object", ObjectConstraint> & Readonly<{
148
- fieldType: "media";
148
+ fieldType: "media" | "file";
149
149
  }>;
150
150
  export type LinkFieldValidationPlan = PlanBase<"link", "object", ObjectConstraint> & Readonly<{
151
151
  fieldType: "link";
@@ -7,6 +7,12 @@ import type { SupportedLoaderEndpoint } from '../data/loaderEndpoints';
7
7
  */
8
8
  export declare const visibilityLevels: readonly ["admin", "designer", "author"];
9
9
  export type VisibilityLevel = (typeof visibilityLevels)[number];
10
+ export declare const MEDIA_KINDS: readonly ["image", "video", "audio", "document", "spreadsheet", "archive"];
11
+ export type MediaKind = (typeof MEDIA_KINDS)[number];
12
+ export declare const DISPLAY_MEDIA_KINDS: readonly ["image", "video", "audio"];
13
+ export type DisplayMediaKind = (typeof DISPLAY_MEDIA_KINDS)[number];
14
+ export declare const PUBLIC_FILE_FIELD_KINDS: readonly ["document", "spreadsheet", "archive", "audio"];
15
+ export type FileFieldKind = (typeof PUBLIC_FILE_FIELD_KINDS)[number];
10
16
  export declare const siteOptionSources: readonly ["eventCategories", "venues", "staffMembers"];
11
17
  export type SiteOptionSource = (typeof siteOptionSources)[number];
12
18
  declare const selectOptionSchema: z.ZodObject<{
@@ -889,16 +895,197 @@ declare const mediaFieldSchema: z.ZodObject<{
889
895
  }>>>;
890
896
  }, z.core.$strip>>;
891
897
  type: z.ZodLiteral<"media">;
892
- mediaKinds: z.ZodDefault<z.ZodArray<z.ZodEnum<{
898
+ mediaKinds: z.ZodPipe<z.ZodDefault<z.ZodArray<z.ZodEnum<{
893
899
  image: "image";
894
900
  video: "video";
895
901
  audio: "audio";
896
902
  document: "document";
897
903
  spreadsheet: "spreadsheet";
898
904
  archive: "archive";
899
- }>>>;
905
+ }>>>, z.ZodTransform<("image" | "video" | "audio")[], ("image" | "video" | "audio" | "document" | "spreadsheet" | "archive")[]>>;
900
906
  aspectRatio: z.ZodOptional<z.ZodString>;
901
907
  }, z.core.$strip>;
908
+ declare const fileFieldSchema: z.ZodObject<{
909
+ id: z.ZodString;
910
+ label: z.ZodString;
911
+ description: z.ZodOptional<z.ZodString>;
912
+ visibleRoles: z.ZodOptional<z.ZodArray<z.ZodEnum<{
913
+ admin: "admin";
914
+ designer: "designer";
915
+ author: "author";
916
+ }>>>;
917
+ defaultValue: z.ZodOptional<z.ZodAny>;
918
+ required: z.ZodDefault<z.ZodBoolean>;
919
+ ui: z.ZodOptional<z.ZodObject<{
920
+ widget: z.ZodOptional<z.ZodOptional<z.ZodString>>;
921
+ preset: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
922
+ disclosure: "disclosure";
923
+ }>>>;
924
+ flattenInRepeater: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
925
+ hidden: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
926
+ hideLabel: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
927
+ hideDescription: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
928
+ showCharCount: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
929
+ max: z.ZodNumber;
930
+ }, z.core.$strip>]>>>;
931
+ showSlugPreview: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
932
+ variant: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
933
+ full: "full";
934
+ inline: "inline";
935
+ limited: "limited";
936
+ media: "media";
937
+ notes: "notes";
938
+ }>>>;
939
+ richTextVariant: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
940
+ full: "full";
941
+ inline: "inline";
942
+ limited: "limited";
943
+ media: "media";
944
+ notes: "notes";
945
+ }>>>;
946
+ cropEditorMode: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
947
+ inline: "inline";
948
+ dialog: "dialog";
949
+ }>>>;
950
+ cropEditorAutoOpen: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
951
+ mediaPickerAutoOpen: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
952
+ showMediaPreview: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
953
+ showMediaOverlayActions: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
954
+ mediaDelivery: z.ZodOptional<z.ZodOptional<z.ZodObject<{
955
+ sizes: z.ZodOptional<z.ZodString>;
956
+ widthCandidates: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
957
+ maxCssWidth: z.ZodOptional<z.ZodNumber>;
958
+ maxCssHeight: z.ZodOptional<z.ZodNumber>;
959
+ strategy: z.ZodOptional<z.ZodEnum<{
960
+ default: "default";
961
+ columnsAuto: "columnsAuto";
962
+ imageGalleryVariant: "imageGalleryVariant";
963
+ }>>;
964
+ strategyOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
965
+ }, z.core.$strip>>>;
966
+ mediaDeliveryByVariant: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
967
+ sizes: z.ZodOptional<z.ZodString>;
968
+ widthCandidates: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
969
+ maxCssWidth: z.ZodOptional<z.ZodNumber>;
970
+ maxCssHeight: z.ZodOptional<z.ZodNumber>;
971
+ strategy: z.ZodOptional<z.ZodEnum<{
972
+ default: "default";
973
+ columnsAuto: "columnsAuto";
974
+ imageGalleryVariant: "imageGalleryVariant";
975
+ }>>;
976
+ strategyOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
977
+ }, z.core.$strip>>>>;
978
+ inputType: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
979
+ number: "number";
980
+ email: "email";
981
+ text: "text";
982
+ tel: "tel";
983
+ }>>>;
984
+ min: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
985
+ max: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
986
+ step: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
987
+ showValue: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
988
+ pattern: z.ZodOptional<z.ZodOptional<z.ZodString>>;
989
+ placeholder: z.ZodOptional<z.ZodOptional<z.ZodString>>;
990
+ visibleWhen: z.ZodOptional<z.ZodOptional<z.ZodObject<{
991
+ field: z.ZodString;
992
+ equals: z.ZodOptional<z.ZodAny>;
993
+ notEquals: z.ZodOptional<z.ZodAny>;
994
+ oneOf: z.ZodOptional<z.ZodArray<z.ZodAny>>;
995
+ notIn: z.ZodOptional<z.ZodArray<z.ZodAny>>;
996
+ }, z.core.$strip>>>;
997
+ modalConfig: z.ZodOptional<z.ZodOptional<z.ZodObject<{
998
+ buttonLabel: z.ZodOptional<z.ZodString>;
999
+ description: z.ZodOptional<z.ZodString>;
1000
+ buttonVariant: z.ZodOptional<z.ZodEnum<{
1001
+ outline: "outline";
1002
+ default: "default";
1003
+ }>>;
1004
+ showCustomizedIndicator: z.ZodOptional<z.ZodBoolean>;
1005
+ maxWidth: z.ZodOptional<z.ZodString>;
1006
+ }, z.core.$strip>>>;
1007
+ allowedTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodEnum<{
1008
+ image: "image";
1009
+ color: "color";
1010
+ gradient: "gradient";
1011
+ }>>>>;
1012
+ fullWidth: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
1013
+ row: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1014
+ colSpan: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
1015
+ layout: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
1016
+ grid: "grid";
1017
+ stack: "stack";
1018
+ }>>>;
1019
+ columns: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
1020
+ gridColsPreset: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
1021
+ simple2: "simple2";
1022
+ simple3: "simple3";
1023
+ simple4: "simple4";
1024
+ buttonCtaRow: "buttonCtaRow";
1025
+ }>>>;
1026
+ gridColumns: z.ZodOptional<z.ZodOptional<z.ZodObject<{
1027
+ base: z.ZodOptional<z.ZodNumber>;
1028
+ sm: z.ZodOptional<z.ZodNumber>;
1029
+ md: z.ZodOptional<z.ZodNumber>;
1030
+ lg: z.ZodOptional<z.ZodNumber>;
1031
+ xl: z.ZodOptional<z.ZodNumber>;
1032
+ }, z.core.$strip>>>;
1033
+ gridColsClassName: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1034
+ repeaterPreset: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
1035
+ thumbnailGrid: "thumbnailGrid";
1036
+ layoutGrid: "layoutGrid";
1037
+ }>>>;
1038
+ thumbnailField: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1039
+ thumbnailAltField: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1040
+ thumbnailLabelField: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1041
+ thumbnailAspectRatio: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1042
+ thumbnailCardDensity: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
1043
+ compact: "compact";
1044
+ comfortable: "comfortable";
1045
+ }>>>;
1046
+ layoutGridColumnsFields: z.ZodOptional<z.ZodOptional<z.ZodObject<{
1047
+ base: z.ZodOptional<z.ZodString>;
1048
+ sm: z.ZodOptional<z.ZodString>;
1049
+ md: z.ZodOptional<z.ZodString>;
1050
+ lg: z.ZodString;
1051
+ xl: z.ZodOptional<z.ZodString>;
1052
+ }, z.core.$strip>>>;
1053
+ layoutGridSpanField: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1054
+ layoutGridRowField: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1055
+ layoutGridColumnField: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1056
+ layoutGridMaxRows: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
1057
+ iconPickerPreset: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
1058
+ cta: "cta";
1059
+ }>>>;
1060
+ contentTypeField: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1061
+ fixedContentType: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1062
+ valueFrom: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
1063
+ id: "id";
1064
+ identifier: "identifier";
1065
+ slug: "slug";
1066
+ }>>>;
1067
+ siteOptionSource: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
1068
+ eventCategories: "eventCategories";
1069
+ venues: "venues";
1070
+ staffMembers: "staffMembers";
1071
+ }>>>;
1072
+ searchThreshold: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
1073
+ renderInHeader: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
1074
+ intent: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
1075
+ content: "content";
1076
+ style: "style";
1077
+ display: "display";
1078
+ behavior: "behavior";
1079
+ }>>>;
1080
+ }, z.core.$strip>>;
1081
+ type: z.ZodLiteral<"file">;
1082
+ fileKinds: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1083
+ audio: "audio";
1084
+ document: "document";
1085
+ spreadsheet: "spreadsheet";
1086
+ archive: "archive";
1087
+ }>>>;
1088
+ }, z.core.$strip>;
902
1089
  declare const booleanFieldSchema: z.ZodObject<{
903
1090
  id: z.ZodString;
904
1091
  label: z.ZodString;
@@ -3970,6 +4157,7 @@ type FieldSchemaMembers = readonly [
3970
4157
  typeof textFieldSchema,
3971
4158
  typeof richTextFieldSchema,
3972
4159
  typeof mediaFieldSchema,
4160
+ typeof fileFieldSchema,
3973
4161
  typeof booleanFieldSchema,
3974
4162
  typeof numberFieldSchema,
3975
4163
  typeof dateFieldSchema,
@@ -4002,6 +4190,7 @@ type SelectFieldBaseInput = Omit<z.input<typeof baseFieldSchema>, 'type' | 'ui'>
4002
4190
  export type TextFieldDefinition = z.output<typeof textFieldSchema>;
4003
4191
  export type RichTextFieldDefinition = z.output<typeof richTextFieldSchema>;
4004
4192
  export type MediaFieldDefinition = z.output<typeof mediaFieldSchema>;
4193
+ export type FileFieldDefinition = z.output<typeof fileFieldSchema>;
4005
4194
  export type BooleanFieldDefinition = z.output<typeof booleanFieldSchema>;
4006
4195
  export type NumberFieldDefinition = z.output<typeof numberFieldSchema>;
4007
4196
  export type DateFieldDefinition = z.output<typeof dateFieldSchema>;
@@ -4069,7 +4258,7 @@ export type PresetOption = {
4069
4258
  export type PresetOrCustomFieldDefinition = z.output<typeof presetOrCustomFieldSchema>;
4070
4259
  export type ContentTypeSelectFieldDefinition = z.output<typeof contentTypeSelectFieldSchema>;
4071
4260
  export type EntryPickerFieldDefinition = z.output<typeof entryPickerFieldSchema>;
4072
- export type FieldDefinition = TextFieldDefinition | RichTextFieldDefinition | MediaFieldDefinition | BooleanFieldDefinition | NumberFieldDefinition | DateFieldDefinition | TimeFieldDefinition | DateTimeFieldDefinition | SlugFieldDefinition | UrlFieldDefinition | LinkFieldDefinition | SelectFieldDefinition | ReferenceFieldDefinition | RepeaterFieldDefinition | GroupFieldDefinition | ModalFieldDefinition | TabGroupFieldDefinition | PresetOrCustomFieldDefinition | ContentTypeSelectFieldDefinition | EntryPickerFieldDefinition;
4261
+ export type FieldDefinition = TextFieldDefinition | RichTextFieldDefinition | MediaFieldDefinition | FileFieldDefinition | BooleanFieldDefinition | NumberFieldDefinition | DateFieldDefinition | TimeFieldDefinition | DateTimeFieldDefinition | SlugFieldDefinition | UrlFieldDefinition | LinkFieldDefinition | SelectFieldDefinition | ReferenceFieldDefinition | RepeaterFieldDefinition | GroupFieldDefinition | ModalFieldDefinition | TabGroupFieldDefinition | PresetOrCustomFieldDefinition | ContentTypeSelectFieldDefinition | EntryPickerFieldDefinition;
4073
4262
  /**
4074
4263
  * FieldDefinition input type (pre-defaults).
4075
4264
  *
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type Media, type PublicDownloadMediaType } from '../../../lib/media';
3
3
  declare const FILE_DOWNLOAD_BUTTON_VARIANTS: readonly ["primary", "secondary", "outline", "link"];
4
- type FileDownloadButtonVariant = typeof FILE_DOWNLOAD_BUTTON_VARIANTS[number];
4
+ type FileDownloadButtonVariant = (typeof FILE_DOWNLOAD_BUTTON_VARIANTS)[number];
5
5
  export type FileDownloadNodeProps = Readonly<{
6
6
  value?: Media | null;
7
7
  title?: string | null;
@@ -16,6 +16,7 @@ declare const BaseContentFieldSchema: z.ZodObject<{
16
16
  textarea: "textarea";
17
17
  text: "text";
18
18
  richText: "richText";
19
+ file: "file";
19
20
  datetime: "datetime";
20
21
  reference: "reference";
21
22
  repeater: "repeater";
@@ -39,6 +40,12 @@ declare const BaseContentFieldSchema: z.ZodObject<{
39
40
  spreadsheet: "spreadsheet";
40
41
  archive: "archive";
41
42
  }>>>;
43
+ fileKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
44
+ audio: "audio";
45
+ document: "document";
46
+ spreadsheet: "spreadsheet";
47
+ archive: "archive";
48
+ }>>>;
42
49
  allowRelative: z.ZodOptional<z.ZodBoolean>;
43
50
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
44
51
  value: z.ZodString;
@@ -60,7 +60,10 @@ export type FieldDefinition = (BaseFieldDefinition & {
60
60
  type: 'richText';
61
61
  }) | (BaseFieldDefinition & {
62
62
  type: 'media';
63
- mediaKinds: Array<'image' | 'video' | 'audio' | 'document' | 'spreadsheet' | 'archive'>;
63
+ mediaKinds: Array<'image' | 'video' | 'audio'>;
64
+ }) | (BaseFieldDefinition & {
65
+ type: 'file';
66
+ fileKinds: Array<'document' | 'spreadsheet' | 'archive' | 'audio'>;
64
67
  }) | (BaseFieldDefinition & {
65
68
  type: 'select';
66
69
  options: Array<{
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import type { ContentFieldConfig } from '../content-types/schema';
8
8
  export type ContentFieldType = ContentFieldConfig['type'];
9
- export type BlockFieldType = 'text' | 'number' | 'slug' | 'url' | 'richText' | 'media' | 'boolean' | 'select' | 'reference' | 'link' | 'date' | 'datetime';
9
+ export type BlockFieldType = 'text' | 'number' | 'slug' | 'url' | 'richText' | 'media' | 'file' | 'boolean' | 'select' | 'reference' | 'link' | 'date' | 'datetime';
10
10
  export type MetaFieldType = 'text' | 'date' | 'enum';
11
11
  /**
12
12
  * Canonical meta-field registry.
@@ -22,4 +22,4 @@ export * from "./assertNever";
22
22
  export * from "./participants";
23
23
  export * from "./participant-identity";
24
24
  export { disabledSelection, enabledSelection, plannerNoChange, plannerPatch, plannerUpdate, resolvePlanningDateInput, resolvePlanningNow, resolvePlanningNowDate, systemPlanningClock, } from "./planner";
25
- export type { DisabledSelection, EnabledSelection, OptionalSelection, PlannerNoChange, PlannerPatch, PlannerUpdate, PlanningClock, PlanningDateInput, } from "./planner";
25
+ export type { DisabledSelection, EnabledSelection, OptionalSelection, PlannerNoChange, PlannerPatch, PlannerUpdate, PlanningClock, PlanningDateInput, PlanningTimeOptions, } from "./planner";
@@ -27,6 +27,10 @@ export type PlanningDateInput = Date | Readonly<{
27
27
  now?: Date;
28
28
  clock?: PlanningClock;
29
29
  }>;
30
+ /** Standard optional planning-time seam for services that accept injected dates. */
31
+ export type PlanningTimeOptions = Readonly<{
32
+ nowInput?: PlanningDateInput;
33
+ }>;
30
34
  /** Default clock for production callers that do not inject time explicitly. */
31
35
  export declare const systemPlanningClock: PlanningClock;
32
36
  /** Resolve current time from an explicit timestamp, injected clock, or system clock. */
@@ -14989,26 +14989,6 @@ export type Database = {
14989
14989
  };
14990
14990
  Returns: number;
14991
14991
  };
14992
- apply_site_style_selection_atomic: {
14993
- Args: {
14994
- p_base_selection_version: number;
14995
- p_button_personality_id: string | null;
14996
- p_footer_look_id: string | null;
14997
- p_header_look_id: string | null;
14998
- p_palette_overrides: Json | null;
14999
- p_palette_variant_id: string | null;
15000
- p_selection_id?: string | null;
15001
- p_site_id: string;
15002
- p_theme: Json;
15003
- };
15004
- Returns: {
15005
- outcome: string;
15006
- selection_id: string | null;
15007
- selection_updated_at: string | null;
15008
- style_selection_version: number | null;
15009
- theme_id: string | null;
15010
- }[];
15011
- };
15012
14992
  apply_customer_profile_rectification: {
15013
14993
  Args: {
15014
14994
  audit_actor_user_id: string;
@@ -15148,6 +15128,26 @@ export type Database = {
15148
15128
  updated_at: string;
15149
15129
  }[];
15150
15130
  };
15131
+ apply_site_style_selection_atomic: {
15132
+ Args: {
15133
+ p_base_selection_version: number;
15134
+ p_button_personality_id: string;
15135
+ p_footer_look_id: string;
15136
+ p_header_look_id: string;
15137
+ p_palette_overrides: Json;
15138
+ p_palette_variant_id: string;
15139
+ p_selection_id?: string;
15140
+ p_site_id: string;
15141
+ p_theme: Json;
15142
+ };
15143
+ Returns: {
15144
+ outcome: string;
15145
+ selection_id: string;
15146
+ selection_updated_at: string;
15147
+ style_selection_version: number;
15148
+ theme_id: string;
15149
+ }[];
15150
+ };
15151
15151
  assert_single_subject_participant_roster_atomic: {
15152
15152
  Args: {
15153
15153
  p_customer_id: string;
@@ -15307,6 +15307,7 @@ export type Database = {
15307
15307
  cancel_booking_with_pass_credit_restoration: {
15308
15308
  Args: {
15309
15309
  p_actor_kind?: string;
15310
+ p_cancelled_at?: string;
15310
15311
  p_customer_id?: string;
15311
15312
  p_idempotency_key: string;
15312
15313
  p_reason?: string;
@@ -15968,6 +15969,24 @@ export type Database = {
15968
15969
  order_id: string;
15969
15970
  }[];
15970
15971
  };
15972
+ postgres_fdw_disconnect: {
15973
+ Args: {
15974
+ "": string;
15975
+ };
15976
+ Returns: boolean;
15977
+ };
15978
+ postgres_fdw_disconnect_all: {
15979
+ Args: never;
15980
+ Returns: boolean;
15981
+ };
15982
+ postgres_fdw_get_connections: {
15983
+ Args: never;
15984
+ Returns: Record<string, unknown>[];
15985
+ };
15986
+ postgres_fdw_handler: {
15987
+ Args: never;
15988
+ Returns: unknown;
15989
+ };
15971
15990
  redeem_pass_credits: {
15972
15991
  Args: {
15973
15992
  credits_amount?: number;
@@ -16024,6 +16043,20 @@ export type Database = {
16024
16043
  locked_until: string;
16025
16044
  }[];
16026
16045
  };
16046
+ replace_appointment_availability_schedule_payload: {
16047
+ Args: {
16048
+ p_interval_minutes: number;
16049
+ p_resource_id: string;
16050
+ p_role_kind: string;
16051
+ p_schedule_id: string;
16052
+ p_service_ids: string[];
16053
+ p_site_id: string;
16054
+ p_start_policy_kind: string;
16055
+ p_start_rows: Json;
16056
+ p_window_rows: Json;
16057
+ };
16058
+ Returns: string;
16059
+ };
16027
16060
  reschedule_appointment_for_actor: {
16028
16061
  Args: {
16029
16062
  p_appointment_id: string;
@@ -17,7 +17,7 @@ export { deriveBlockDraftSaveability, formatUnfinishedBlocksSummary, normalizeMa
17
17
  export type { BlockDraftSaveability, BlockDraftValidationIssue } from '../../block-form/src/client/index';
18
18
  export { applyManifestIssuesToForm } from './manifestIssues';
19
19
  export { BlockPickerDialog } from './block-editor/BlockPickerDialog';
20
- export { MediaField } from './media/MediaField';
20
+ export { FileField, MediaField } from './media/MediaField';
21
21
  export * from './widgets/index';
22
22
  export { createBlockFormLogger, setBlockFormLoggerFactory, setBlockFormAppLogger } from './block-form/debug';
23
23
  export type { BlockFormLogger } from './block-form/debug';
@@ -1,10 +1,11 @@
1
1
  import type { FieldWidgetProps } from '../../../block-form/src/client/index';
2
- import type { MediaFieldConfig } from '../../../block-form/src/client/index';
2
+ import type { FileFieldConfig, MediaFieldConfig } from '../../../block-form/src/client/index';
3
3
  import type { UploadIntentContract } from '../../../api/src/index';
4
4
  import { type VideoPrepIntent } from '../../../media-core/src/index';
5
5
  import { type MediaValue } from '../../../media-editor/src/index';
6
6
  import type { VideoPrepIntentResolver } from '../../../media-react/src/index';
7
- export declare function uploadIntentForMediaField(blockKind: string | undefined, fieldPath: string): UploadIntentContract | undefined;
8
- export declare function videoPrepIntentForMediaField(blockKind: string | undefined, fieldPath: string, mediaKinds: readonly NonNullable<MediaFieldConfig['mediaKinds']>[number][] | undefined): VideoPrepIntentResolver | undefined;
9
- export declare function videoSelectionIntentForMediaField(blockKind: string | undefined, fieldPath: string, mediaKinds: readonly NonNullable<MediaFieldConfig['mediaKinds']>[number][] | undefined): VideoPrepIntent | undefined;
10
- export declare function MediaField({ path, backend, config }: FieldWidgetProps<MediaValue, MediaFieldConfig>): import("react/jsx-runtime").JSX.Element;
7
+ export declare function uploadIntentForFileField(): UploadIntentContract;
8
+ export declare function videoPrepIntentForMediaField(fieldPath: string, mediaKinds: readonly NonNullable<MediaFieldConfig['mediaKinds']>[number][] | undefined): VideoPrepIntentResolver | undefined;
9
+ export declare function videoSelectionIntentForMediaField(fieldPath: string, mediaKinds: readonly NonNullable<MediaFieldConfig['mediaKinds']>[number][] | undefined): VideoPrepIntent | undefined;
10
+ export declare function MediaField({ path, backend, config, }: FieldWidgetProps<MediaValue, MediaFieldConfig>): import("react/jsx-runtime").JSX.Element;
11
+ export declare function FileField({ path, backend, config, }: FieldWidgetProps<MediaValue, FileFieldConfig>): import("react/jsx-runtime").JSX.Element;
@@ -13,7 +13,6 @@ export type VideoSlotAssetLike = Readonly<{
13
13
  durationSeconds?: number | null;
14
14
  }>;
15
15
  export type VideoSlotFieldInput = Readonly<{
16
- blockKind?: string | null;
17
16
  fieldPath: string;
18
17
  mediaKinds?: readonly string[] | null;
19
18
  }>;
@@ -1,13 +1,15 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import type { ApiClient } from '../../api/src/request';
3
3
  import type { MediaAssetWithLabels, MediaStorageRepo } from '@riverbankcms/media-storage-supabase';
4
- import type { UploadProgressHandler } from '../../media-react/src/index';
4
+ import type { UploadProgressHandler, UseApiMediaUploaderOptions } from '../../media-react/src/index';
5
5
  import type { MediaAssetIndex, ResolveImageUrlContext } from '../../blocks/src/index';
6
+ type MediaEditorUploaderOptions = Omit<UseApiMediaUploaderOptions, 'siteId' | 'apiClient' | 'bucket'>;
6
7
  export type MediaEditorContextValue = {
7
8
  siteId: string;
8
9
  apiClient: ApiClient;
9
10
  repo: MediaStorageRepo;
10
11
  uploader: (file: File, onProgress?: UploadProgressHandler) => Promise<MediaAssetWithLabels>;
12
+ uploaderOptions?: MediaEditorUploaderOptions;
11
13
  getPublicUrl: (asset: MediaAssetWithLabels) => string;
12
14
  registerMediaAsset: (asset: MediaAssetWithLabels) => void;
13
15
  bearerToken?: string | null;
@@ -20,3 +22,4 @@ export declare function MediaEditorContextProvider({ value, children, }: {
20
22
  }): import("react/jsx-runtime").JSX.Element;
21
23
  export declare function useMediaEditor(): MediaEditorContextValue;
22
24
  export declare function useMediaEditorOptional(): MediaEditorContextValue | null;
25
+ export {};
@@ -3,10 +3,16 @@ import { type ApiClient } from '../../../api/src/request';
3
3
  import type { UploadIntentContract } from '../../../api/src/index';
4
4
  import type { VideoPrepIntent } from '../../../media-core/src/index';
5
5
  import type { MediaAssetWithLabels } from '@riverbankcms/media-storage-supabase';
6
+ import type { Result } from '../../../core/src/index';
6
7
  import type { UploadProgressHandler } from './useUploads';
8
+ import type { BrowserVideoPrepError, BrowserVideoPrepInput, BrowserVideoPrepResult } from '../videoPrepBrowser';
7
9
  import { type ClassificationHook, type LoggerLike } from './internal/classification';
8
10
  export type UploadIntentResolver = UploadIntentContract | ((file: File) => UploadIntentContract | undefined);
9
11
  export type VideoPrepIntentResolver = VideoPrepIntent | ((file: File) => VideoPrepIntent | undefined);
12
+ export type BrowserVideoPreparer = (input: BrowserVideoPrepInput) => Promise<Result<BrowserVideoPrepResult, BrowserVideoPrepError>>;
13
+ export type BrowserVideoPrepLoader = () => Promise<{
14
+ readonly prepareBrowserVideoUpload: BrowserVideoPreparer;
15
+ }>;
10
16
  export declare class MediaUploaderError extends Error {
11
17
  readonly code?: ApiErrorCode;
12
18
  readonly status?: number;
@@ -26,7 +32,8 @@ export type UseApiMediaUploaderOptions = {
26
32
  autoClassify?: boolean;
27
33
  uploadIntent?: UploadIntentResolver;
28
34
  videoPrepIntent?: VideoPrepIntentResolver;
35
+ loadVideoPrep?: BrowserVideoPrepLoader;
29
36
  onClassification?: ClassificationHook;
30
37
  logger?: LoggerLike;
31
38
  };
32
- export declare const useApiMediaUploader: ({ siteId, apiClient, autoClassify, uploadIntent, videoPrepIntent, onClassification, logger: providedLogger, }: UseApiMediaUploaderOptions) => (file: File, onProgress?: UploadProgressHandler) => Promise<MediaAssetWithLabels>;
39
+ export declare const useApiMediaUploader: ({ siteId, apiClient, autoClassify, uploadIntent, videoPrepIntent, loadVideoPrep, onClassification, logger: providedLogger, }: UseApiMediaUploaderOptions) => (file: File, onProgress?: UploadProgressHandler) => Promise<MediaAssetWithLabels>;
@@ -7,14 +7,10 @@ export type { UseUploadsOptions, UseUploadsResult, UploadItem, UploadStatus, Upl
7
7
  export { useSupabaseMediaUploader } from './hooks/useSupabaseMediaUploader';
8
8
  export type { UseSupabaseMediaUploaderOptions } from './hooks/useSupabaseMediaUploader';
9
9
  export { getMediaUploaderErrorCode, MediaUploaderError, useApiMediaUploader, } from './hooks/useApiMediaUploader';
10
- export type { UploadIntentResolver, UseApiMediaUploaderOptions, VideoPrepIntentResolver } from './hooks/useApiMediaUploader';
10
+ export type { BrowserVideoPrepLoader, BrowserVideoPreparer, UploadIntentResolver, UseApiMediaUploaderOptions, VideoPrepIntentResolver, } from './hooks/useApiMediaUploader';
11
11
  export { useAuthenticatedImageSrc } from './hooks/useAuthenticatedImageSrc';
12
12
  export { extractVideoPosterFrame } from './videoFrameExtraction';
13
13
  export type { VideoFrameExtractionError, VideoFrameExtractionOptions, VideoFrameExtractionResult, } from './videoFrameExtraction';
14
- export { FFMPEG_CORE_BASE_PATH, FFMPEG_CORE_VERSION, loadBrowserFfmpeg } from './ffmpegLoader';
15
- export type { BrowserFfmpeg, BrowserFfmpegLoadError, BrowserFfmpegRuntime, } from './ffmpegLoader';
16
- export { prepareBrowserVideoUpload } from './videoPrepBrowser';
17
- export type { BrowserVideoPrepError, BrowserVideoPrepInput, BrowserVideoPrepOutputTag, BrowserVideoPrepResult, VideoPrepProgressEvent, } from './videoPrepBrowser';
18
14
  export { MediaLibrary } from './components/MediaLibrary';
19
15
  export type { MediaLibraryProps, MediaLibraryRenderProps } from './components/MediaLibrary';
20
16
  export { MediaPickerMini } from './components/MediaPickerMini';
@@ -18,6 +18,7 @@ export type SdkPreviewModeContent = {
18
18
  };
19
19
  export type SdkPreviewModeProps = {
20
20
  apiBaseUrl: string;
21
+ dashboardBaseUrl?: string | null;
21
22
  siteId: string;
22
23
  siteSlug: string;
23
24
  surfaceId?: SurfaceId;
@@ -1,3 +1,4 @@
1
- import type { FieldWidgetProps, MediaFieldConfig } from '../../../../block-form/src/client/index';
1
+ import type { FieldWidgetProps, FileFieldConfig, MediaFieldConfig } from '../../../../block-form/src/client/index';
2
2
  import { type MediaValue } from '../../../../media-editor/src/index';
3
3
  export declare function PreviewMediaField({ path, backend, config, }: FieldWidgetProps<MediaValue, MediaFieldConfig>): import("react/jsx-runtime").JSX.Element;
4
+ export declare function PreviewFileField({ path, backend, config, }: FieldWidgetProps<MediaValue, FileFieldConfig>): import("react/jsx-runtime").JSX.Element;
@@ -14,6 +14,7 @@ export declare function PreviewFormProvider({ siteId: rawSiteId, theme, previewC
14
14
  }): import("react/jsx-runtime").JSX.Element;
15
15
  export declare const previewWidgetOverrides: {
16
16
  readonly link: FieldWidgetComponent;
17
+ readonly file: FieldWidgetComponent;
17
18
  readonly media: FieldWidgetComponent;
18
19
  readonly richText: FieldWidgetComponent;
19
20
  readonly reference: FieldWidgetComponent;