@yext/visual-editor 0.0.41 → 0.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,13 +1,14 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { ReactNode } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import * as react_i18next from 'react-i18next';
5
+ import * as i18next from 'i18next';
6
+ import { TOptions } from 'i18next';
4
7
  import * as _measured_puck from '@measured/puck';
5
- import { Field, CustomField, Fields, Data, DefaultComponentProps, Config, DefaultRootProps, ComponentConfig, ArrayField, BaseField, NumberField, ObjectField } from '@measured/puck';
8
+ import { Field, CustomField, Data, DefaultComponentProps, DefaultRootProps, Config, ComponentConfig, ArrayField, BaseField, ObjectField, NumberField } from '@measured/puck';
9
+ import { CTA as CTA$1, ImageType, LinkType, HoursTableProps as HoursTableProps$1, ComplexImageType, HoursType, AddressType, DayOfWeekNames, Coordinate } from '@yext/pages-components';
6
10
  import { ClassValue } from 'clsx';
7
11
  import * as _yext_search_headless_react from '@yext/search-headless-react';
8
- import * as i18next from 'i18next';
9
- import * as react_i18next from 'react-i18next';
10
- import { ImageType, CTA as CTA$1, LinkType, HoursTableProps as HoursTableProps$1, ComplexImageType, HoursType, AddressType, DayOfWeekNames, Coordinate } from '@yext/pages-components';
11
12
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
12
13
  import { VariantProps } from 'class-variance-authority';
13
14
  import * as react_jsx_runtime_js from 'react/jsx-runtime.js';
@@ -50,6 +51,25 @@ declare const useDocument: <T>() => T;
50
51
  declare const TailwindConfigContext: React$1.Context<any>;
51
52
  declare const useTailwindConfig: <T>() => T;
52
53
 
54
+ declare const i18nPlatformInstance: i18next.i18n;
55
+ declare const usePlatformTranslation: () => react_i18next.UseTranslationResponse<"visual-editor", undefined>;
56
+ type MsgString = string & {
57
+ __brand: "i18nPlatform";
58
+ };
59
+ /**
60
+ * msg marks strings for translation in config JSON such
61
+ * as Puck fields or the theme config. The TOptions are
62
+ * stringified in the config and dynamically replaced
63
+ * upon render.
64
+ */
65
+ declare const msg: (key: string, defaultValue: string, options?: TOptions) => MsgString;
66
+ /**
67
+ * pt translates strings based on the platform i18n. It can
68
+ * operate as a normal TFunction or handle configurations that
69
+ * have been stringified by msg.
70
+ */
71
+ declare const pt: (keyOrEncodedValue: string | MsgString, optionsOrDefault?: string | TOptions, options?: TOptions) => string;
72
+
53
73
  type BackgroundStyle = {
54
74
  bgColor: string;
55
75
  textColor: string;
@@ -96,7 +116,7 @@ declare const ThemeOptions: {
96
116
  value: HeadingLevel;
97
117
  }[];
98
118
  TEXT_TRANSFORM: {
99
- label: string;
119
+ label: MsgString;
100
120
  value: string;
101
121
  }[];
102
122
  LETTER_SPACING: {
@@ -114,19 +134,19 @@ declare const ThemeOptions: {
114
134
  color: string;
115
135
  }[];
116
136
  CTA_VARIANT: {
117
- label: string;
137
+ label: MsgString;
118
138
  value: string;
119
139
  }[];
120
140
  ALIGNMENT: {
121
- label: string;
141
+ label: MsgString;
122
142
  value: string;
123
143
  }[];
124
144
  JUSTIFY_CONTENT: {
125
- label: string;
145
+ label: MsgString;
126
146
  value: string;
127
147
  }[];
128
148
  BODY_VARIANT: {
129
- label: string;
149
+ label: MsgString;
130
150
  value: string;
131
151
  }[];
132
152
  BORDER_RADIUS: () => {
@@ -142,11 +162,11 @@ declare const ThemeOptions: {
142
162
  value: string;
143
163
  }[];
144
164
  HOURS_OPTIONS: {
145
- label: string;
165
+ label: MsgString;
146
166
  value: string;
147
167
  }[];
148
168
  PHONE_OPTIONS: {
149
- label: string;
169
+ label: MsgString;
150
170
  value: string;
151
171
  }[];
152
172
  };
@@ -247,25 +267,18 @@ type YextEntityField<T> = {
247
267
  field: string;
248
268
  constantValue: T;
249
269
  constantValueEnabled?: boolean;
250
- };
251
- type YextCollection = {
252
- items: YextEntityField<Array<any>>;
253
- limit: string | number;
270
+ disallowTranslation?: boolean;
254
271
  };
255
272
  type RenderYextEntityFieldSelectorProps<T extends Record<string, any>> = {
256
273
  label: string;
257
274
  filter: RenderEntityFieldFilter<T>;
258
- isCollection?: boolean;
259
275
  disableConstantValueToggle?: boolean;
276
+ disallowTranslation?: boolean;
260
277
  };
261
278
  /**
262
279
  * Allows the user to select an entity field from the document and set a constant value.
263
280
  */
264
281
  declare const YextEntityFieldSelector: <T extends Record<string, any>, U>(props: RenderYextEntityFieldSelectorProps<T>) => Field<YextEntityField<U>>;
265
- /**
266
- * Allows the user to select an entity subfield from the document and set a constant value.
267
- */
268
- declare const YextCollectionSubfieldSelector: <T extends Record<string, any>, U>(props: RenderYextEntityFieldSelectorProps<T>) => Field<YextEntityField<U>>;
269
282
 
270
283
  type EntityFieldTypesFilter = {
271
284
  type: StructEntityFieldTypes;
@@ -274,6 +287,7 @@ type StructEntityFieldTypes = "type.hero_section" | "type.promo_section";
274
287
  type YextStructEntityField<T extends Record<string, any> = any> = {
275
288
  field: string;
276
289
  constantValue: T;
290
+ constantValueEnabled?: boolean;
277
291
  constantValueOverride: {
278
292
  [K in keyof T]: boolean;
279
293
  };
@@ -281,37 +295,25 @@ type YextStructEntityField<T extends Record<string, any> = any> = {
281
295
  type StructSelectorProps = {
282
296
  label: string;
283
297
  filter: EntityFieldTypesFilter;
298
+ disallowTranslation?: boolean;
284
299
  };
285
300
  declare const YextStructFieldSelector: <U extends Record<string, any>>(props: StructSelectorProps) => CustomField<YextStructEntityField<U>>;
286
301
 
287
302
  declare const resolveYextEntityField: <T>(document: any, entityField: YextEntityField<T>) => T | undefined;
288
303
  declare const resolveYextStructField: <T extends Record<string, any>>(document: any, entityField: YextStructEntityField<T>) => T | undefined;
289
- declare const resolveYextSubfield: <T>(parent: any, field: YextEntityField<T> | undefined) => T | undefined;
304
+
290
305
  /**
291
- * handleResolveFieldsForCollections determines if lastFields
292
- * should be returned, returns filters for YextCollectionSubfieldSelector,
293
- * and resets prop data when isCollection changes.
294
- * @param data the data object from Puck's resolveFields
295
- * @param params the params object from Puck's resolveFields
306
+ * Converts a type TranslatableString to a string
307
+ * @param translatableString
308
+ * @param locale
296
309
  */
297
- declare const handleResolveFieldsForCollections: (data: {
298
- props: Record<string, any>;
299
- }, params: {
300
- lastFields: Fields<any>;
301
- parent: {
302
- props: Record<string, any>;
303
- } | null;
304
- }) => {
305
- /** No field updates need. Return params.lastFields */
306
- shouldReturnLastFields: boolean;
307
- /**
308
- * Whether the component is currently in a CollectionSection
309
- * with a field set. Use in YextCollectionSubfieldSelector.
310
- */
311
- isCollection: boolean;
312
- /** The parent's field selected field if applicable. Use in YextCollectionSubfieldSelector. */
313
- directChildrenFilter: string | undefined;
314
- };
310
+ declare const resolveTranslatableString: (translatableString?: TranslatableString, locale?: string) => string;
311
+ /**
312
+ * Converts a type TranslatableRichText to a type that can be viewed on the page
313
+ * @param translatableRichText
314
+ * @param locale
315
+ */
316
+ declare const resolveTranslatableRichText: (translatableRichText?: TranslatableRichText, locale?: string) => string | React__default.ReactElement;
315
317
 
316
318
  declare const themeManagerTwMergeConfiguration: {
317
319
  extend: {
@@ -423,6 +425,14 @@ declare const fetchNearbyLocations: ({ businessId, apiKey, contentEndpointId, co
423
425
  limit: number;
424
426
  }) => Promise<Record<string, any>>;
425
427
 
428
+ declare const fetchLocalesToPathsForEntity: ({ businessId, apiKey, contentEndpointId, contentDeliveryAPIDomain, entityId, }: {
429
+ businessId: string;
430
+ apiKey: string;
431
+ contentEndpointId: string;
432
+ contentDeliveryAPIDomain: string;
433
+ entityId: string;
434
+ }) => Promise<Record<string, string>>;
435
+
426
436
  /**
427
437
  * Builds the search headless config for the template. Returns undefined if the config is not valid.
428
438
  * @param document the entity document
@@ -467,53 +477,53 @@ declare function withPropOverrides<P extends DefaultComponentProps>(base: Compon
467
477
 
468
478
  declare const i18nComponentsInstance: i18next.i18n;
469
479
 
470
- declare const i18nPlatformInstance: i18next.i18n;
471
- declare const usePlatformTranslation: () => react_i18next.UseTranslationResponse<"visual-editor", undefined>;
472
-
480
+ type TranslatableCTA = Omit<CTA$1, "label"> & {
481
+ label: TranslatableString;
482
+ };
473
483
  type HeroSectionType = {
474
484
  image?: ImageType;
475
- primaryCta?: CTA$1;
476
- secondaryCta?: CTA$1;
485
+ primaryCta?: TranslatableCTA;
486
+ secondaryCta?: TranslatableCTA;
477
487
  };
478
488
  type PromoSectionType = {
479
489
  image?: ImageType;
480
- title?: string;
481
- description?: RTF2 | string;
482
- cta?: CTA$1;
490
+ title?: TranslatableString;
491
+ description?: TranslatableRichText;
492
+ cta?: TranslatableCTA;
483
493
  };
484
494
  type ProductSectionType = {
485
495
  products: Array<ProductStruct>;
486
496
  };
487
497
  type ProductStruct = {
488
498
  image?: ImageType;
489
- name?: string;
490
- description?: RTF2 | string;
491
- category?: string;
492
- cta?: CTA$1;
499
+ name?: TranslatableString;
500
+ description?: TranslatableRichText;
501
+ category?: TranslatableString;
502
+ cta?: TranslatableCTA;
493
503
  };
494
504
  type EventSectionType = {
495
505
  events: Array<EventStruct>;
496
506
  };
497
507
  type EventStruct = {
498
508
  image?: ImageType;
499
- title?: string;
509
+ title?: TranslatableString;
500
510
  dateTime?: string;
501
- description?: RTF2 | string;
502
- cta?: CTA$1;
511
+ description?: TranslatableRichText;
512
+ cta?: TranslatableCTA;
503
513
  };
504
514
  type FAQSectionType = {
505
515
  faqs: Array<FAQStruct>;
506
516
  };
507
517
  type FAQStruct = {
508
- question: string;
509
- answer: RTF2 | string;
518
+ question: TranslatableString;
519
+ answer: TranslatableRichText;
510
520
  };
511
521
  type TestimonialSectionType = {
512
522
  testimonials: Array<TestimonialStruct>;
513
523
  };
514
524
  type TestimonialStruct = {
515
- description?: RTF2 | string;
516
- contributorName?: string;
525
+ description?: TranslatableRichText;
526
+ contributorName?: TranslatableString;
517
527
  contributionDate?: string;
518
528
  };
519
529
  type InsightSectionType = {
@@ -521,24 +531,29 @@ type InsightSectionType = {
521
531
  };
522
532
  type InsightStruct = {
523
533
  image?: ImageType;
524
- name?: string;
525
- category?: string;
534
+ name?: TranslatableString;
535
+ category?: TranslatableString;
526
536
  publishTime?: string;
527
- description?: RTF2 | string;
528
- cta?: CTA$1;
537
+ description?: TranslatableRichText;
538
+ cta?: TranslatableCTA;
529
539
  };
530
540
  type TeamSectionType = {
531
541
  people: Array<PersonStruct>;
532
542
  };
533
543
  type PersonStruct = {
534
544
  headshot?: ImageType;
535
- name?: string;
536
- title?: string;
545
+ name?: TranslatableString;
546
+ title?: TranslatableString;
537
547
  phoneNumber?: string;
538
548
  email?: string;
539
- cta?: CTA$1;
540
- };
541
- type RTF2 = {
549
+ cta?: TranslatableCTA;
550
+ };
551
+ type LocalizedValues = {
552
+ hasLocalizedValue: "true";
553
+ } & Record<string, string>;
554
+ type TranslatableString = string | LocalizedValues;
555
+ type TranslatableRichText = (string | RichText) | Record<string, string | RichText>;
556
+ type RichText = {
542
557
  html?: string;
543
558
  json?: string;
544
559
  };
@@ -645,7 +660,14 @@ type Option<T = any> = {
645
660
  value: T;
646
661
  color?: string;
647
662
  };
648
- declare const BasicSelector: (label: string, options: Option[]) => Field;
663
+ type BasicSelectorProps = {
664
+ label: string;
665
+ options: Option[];
666
+ translateOptions?: boolean;
667
+ noOptionsPlaceholder?: string;
668
+ noOptionsMessage?: string;
669
+ };
670
+ declare const BasicSelector: (props: BasicSelectorProps) => Field;
649
671
 
650
672
  /** Copied from Puck, do not change */
651
673
  type FieldOption = {
@@ -682,6 +704,7 @@ type YextSelectField = YextBaseField & {
682
704
  type YextTextField = YextBaseField & {
683
705
  type: "text";
684
706
  isMultiline?: boolean;
707
+ disallowTranslation?: boolean;
685
708
  };
686
709
  type YextOptionalNumberField = YextBaseField & Omit<OptionalNumberFieldProps, "fieldLabel"> & {
687
710
  type: "optionalNumber";
@@ -697,6 +720,19 @@ declare const KnowledgeGraphIcon: ({ enabled }: {
697
720
  enabled: boolean;
698
721
  }) => react_jsx_runtime.JSX.Element;
699
722
 
723
+ /**
724
+ * Generates a translatable string config
725
+ * @param label optional label. Takes in a value from msg.
726
+ * @param fieldType text or textarea display mode
727
+ */
728
+ declare function TranslatableStringField<T extends TranslatableString | undefined = TranslatableString>(label?: MsgString, fieldType?: "text" | "textarea"): CustomField<T>;
729
+
730
+ /**
731
+ * Generates a translatableRichText field config
732
+ * @param label optional label. Takes in a value from msg
733
+ */
734
+ declare function TranslatableRichTextField<T extends TranslatableRichText | undefined = TranslatableRichText>(label?: MsgString): CustomField<T>;
735
+
700
736
  declare const bodyVariants: (props?: ({
701
737
  variant?: "sm" | "lg" | "base" | null | undefined;
702
738
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
@@ -767,7 +803,7 @@ type MaybeLinkProps = {
767
803
  declare const MaybeLink: (props: MaybeLinkProps) => react_jsx_runtime.JSX.Element;
768
804
 
769
805
  interface MaybeRTFProps extends Record<string, any> {
770
- data: RTF2 | string | undefined;
806
+ data: RichText | string | undefined;
771
807
  bodyVariant?: BodyProps["variant"];
772
808
  }
773
809
  declare const MaybeRTF: ({ data, bodyVariant, ...props }: MaybeRTFProps) => react_jsx_runtime.JSX.Element | undefined;
@@ -843,13 +879,16 @@ type BannerSectionProps = {
843
879
  textAlignment: "left" | "right" | "center";
844
880
  };
845
881
  data: {
846
- text: YextEntityField<string>;
882
+ text: YextEntityField<TranslatableString>;
847
883
  };
848
884
  liveVisibility: boolean;
849
885
  };
850
886
  declare const BannerSection: ComponentConfig<BannerSectionProps>;
851
887
 
852
888
  type BreadcrumbsSectionProps = {
889
+ data: {
890
+ directoryRoot: TranslatableString;
891
+ };
853
892
  analytics?: {
854
893
  scope?: string;
855
894
  };
@@ -860,25 +899,28 @@ declare const BreadcrumbsSection: ComponentConfig<BreadcrumbsSectionProps>;
860
899
  interface CoreInfoSectionProps {
861
900
  data: {
862
901
  info: {
863
- headingText: YextEntityField<string>;
902
+ headingText: YextEntityField<TranslatableString>;
864
903
  address: YextEntityField<AddressType>;
865
904
  phoneNumbers: Array<{
866
905
  number: YextEntityField<string>;
867
- label: string;
906
+ label: TranslatableString;
868
907
  }>;
869
908
  emails: YextEntityField<string[]>;
870
909
  };
871
910
  hours: {
872
- headingText: YextEntityField<string>;
911
+ headingText: YextEntityField<TranslatableString>;
873
912
  hours: YextEntityField<HoursType>;
874
913
  };
875
914
  services: {
876
- headingText: YextEntityField<string>;
877
- servicesList: YextEntityField<string[]>;
915
+ headingText: YextEntityField<TranslatableString>;
916
+ servicesList: YextEntityField<TranslatableString[]>;
878
917
  };
879
918
  };
880
919
  styles: {
881
- headingLevel: HeadingLevel;
920
+ heading: {
921
+ level: HeadingLevel;
922
+ align: "left" | "center" | "right";
923
+ };
882
924
  backgroundColor?: BackgroundStyle;
883
925
  info: {
884
926
  showGetDirectionsLink: boolean;
@@ -901,13 +943,16 @@ declare const CoreInfoSection: ComponentConfig<CoreInfoSectionProps>;
901
943
 
902
944
  interface EventSectionProps {
903
945
  data: {
904
- heading: YextEntityField<string>;
946
+ heading: YextEntityField<TranslatableString>;
905
947
  events: YextEntityField<EventSectionType>;
906
948
  };
907
949
  styles: {
908
950
  backgroundColor?: BackgroundStyle;
909
951
  cardBackgroundColor?: BackgroundStyle;
910
- headingLevel: HeadingLevel;
952
+ heading: {
953
+ level: HeadingLevel;
954
+ align: "left" | "center" | "right";
955
+ };
911
956
  };
912
957
  analytics?: {
913
958
  scope?: string;
@@ -918,8 +963,8 @@ declare const EventSection: ComponentConfig<EventSectionProps>;
918
963
 
919
964
  interface HeroSectionProps {
920
965
  data: {
921
- businessName: YextEntityField<string>;
922
- localGeoModifier: YextEntityField<string>;
966
+ businessName: YextEntityField<TranslatableString>;
967
+ localGeoModifier: YextEntityField<TranslatableString>;
923
968
  hours: YextEntityField<HoursType>;
924
969
  hero: YextStructEntityField<HeroSectionType>;
925
970
  };
@@ -934,19 +979,22 @@ interface HeroSectionProps {
934
979
  analytics?: {
935
980
  scope?: string;
936
981
  };
937
- liveVisibility: boolean;
982
+ liveVisibility?: boolean;
938
983
  }
939
984
  declare const HeroSection: ComponentConfig<HeroSectionProps>;
940
985
 
941
986
  interface InsightSectionProps {
942
987
  data: {
943
- heading: YextEntityField<string>;
988
+ heading: YextEntityField<TranslatableString>;
944
989
  insights: YextEntityField<InsightSectionType>;
945
990
  };
946
991
  styles: {
947
992
  backgroundColor?: BackgroundStyle;
948
993
  cardBackgroundColor?: BackgroundStyle;
949
- headingLevel: HeadingLevel;
994
+ heading: {
995
+ level: HeadingLevel;
996
+ align: "left" | "center" | "right";
997
+ };
950
998
  };
951
999
  analytics?: {
952
1000
  scope?: string;
@@ -957,7 +1005,7 @@ declare const InsightSection: ComponentConfig<InsightSectionProps>;
957
1005
 
958
1006
  interface NearbyLocationsSectionProps {
959
1007
  data: {
960
- heading: YextEntityField<string>;
1008
+ heading: YextEntityField<TranslatableString>;
961
1009
  coordinate: YextEntityField<Coordinate>;
962
1010
  radius: number;
963
1011
  limit: number;
@@ -965,7 +1013,10 @@ interface NearbyLocationsSectionProps {
965
1013
  styles: {
966
1014
  backgroundColor?: BackgroundStyle;
967
1015
  cardBackgroundColor?: BackgroundStyle;
968
- headingLevel: HeadingLevel;
1016
+ heading: {
1017
+ level: HeadingLevel;
1018
+ align: "left" | "center" | "right";
1019
+ };
969
1020
  cardHeadingLevel: HeadingLevel;
970
1021
  phoneNumberFormat: "domestic" | "international";
971
1022
  phoneNumberLink: boolean;
@@ -986,13 +1037,16 @@ declare const NearbyLocationsSection: ComponentConfig<NearbyLocationsSectionProp
986
1037
 
987
1038
  interface ProductSectionProps {
988
1039
  data: {
989
- heading: YextEntityField<string>;
1040
+ heading: YextEntityField<TranslatableString>;
990
1041
  products: YextEntityField<ProductSectionType>;
991
1042
  };
992
1043
  styles: {
993
1044
  backgroundColor?: BackgroundStyle;
994
1045
  cardBackgroundColor?: BackgroundStyle;
995
- headingLevel: HeadingLevel;
1046
+ heading: {
1047
+ level: HeadingLevel;
1048
+ align: "left" | "center" | "right";
1049
+ };
996
1050
  };
997
1051
  analytics?: {
998
1052
  scope?: string;
@@ -1009,22 +1063,29 @@ interface PromoSectionProps {
1009
1063
  backgroundColor?: BackgroundStyle;
1010
1064
  orientation: "left" | "right";
1011
1065
  ctaVariant: CTAProps["variant"];
1066
+ heading: {
1067
+ level: HeadingLevel;
1068
+ align: "left" | "center" | "right";
1069
+ };
1012
1070
  };
1013
1071
  analytics?: {
1014
1072
  scope?: string;
1015
1073
  };
1016
- liveVisibility: boolean;
1074
+ liveVisibility?: boolean;
1017
1075
  }
1018
1076
  declare const PromoSection: ComponentConfig<PromoSectionProps>;
1019
1077
 
1020
1078
  interface PhotoGallerySectionProps {
1021
1079
  data: {
1022
- heading: YextEntityField<string>;
1080
+ heading: YextEntityField<TranslatableString>;
1023
1081
  images: YextEntityField<ImageType[] | ComplexImageType[]>;
1024
1082
  };
1025
1083
  styles: {
1026
1084
  backgroundColor?: BackgroundStyle;
1027
- headingLevel: HeadingLevel;
1085
+ heading: {
1086
+ level: HeadingLevel;
1087
+ align: "left" | "center" | "right";
1088
+ };
1028
1089
  imageStyle: Omit<ImageWrapperProps, "image">;
1029
1090
  };
1030
1091
  liveVisibility: boolean;
@@ -1033,12 +1094,15 @@ declare const PhotoGallerySection: ComponentConfig<PhotoGallerySectionProps>;
1033
1094
 
1034
1095
  interface FAQSectionProps {
1035
1096
  data: {
1036
- heading: YextEntityField<string>;
1097
+ heading: YextEntityField<TranslatableString>;
1037
1098
  faqs: YextEntityField<FAQSectionType>;
1038
1099
  };
1039
1100
  styles: {
1040
1101
  backgroundColor?: BackgroundStyle;
1041
- headingLevel: HeadingProps["level"];
1102
+ heading: {
1103
+ level: HeadingLevel;
1104
+ align: "left" | "center" | "right";
1105
+ };
1042
1106
  };
1043
1107
  liveVisibility: boolean;
1044
1108
  }
@@ -1046,13 +1110,16 @@ declare const FAQSection: ComponentConfig<FAQSectionProps>;
1046
1110
 
1047
1111
  interface TestimonialSectionProps {
1048
1112
  data: {
1049
- heading: YextEntityField<string>;
1113
+ heading: YextEntityField<TranslatableString>;
1050
1114
  testimonials: YextEntityField<TestimonialSectionType>;
1051
1115
  };
1052
1116
  styles: {
1053
1117
  backgroundColor?: BackgroundStyle;
1054
1118
  cardBackgroundColor?: BackgroundStyle;
1055
- headingLevel: HeadingLevel;
1119
+ heading: {
1120
+ level: HeadingLevel;
1121
+ align: "left" | "center" | "right";
1122
+ };
1056
1123
  };
1057
1124
  liveVisibility: boolean;
1058
1125
  }
@@ -1062,10 +1129,13 @@ interface TeamSectionProps {
1062
1129
  styles: {
1063
1130
  backgroundColor?: BackgroundStyle;
1064
1131
  cardBackgroundColor?: BackgroundStyle;
1065
- headingLevel: HeadingLevel;
1132
+ heading: {
1133
+ level: HeadingLevel;
1134
+ align: "left" | "center" | "right";
1135
+ };
1066
1136
  };
1067
1137
  data: {
1068
- heading: YextEntityField<string>;
1138
+ heading: YextEntityField<TranslatableString>;
1069
1139
  people: YextEntityField<TeamSectionType>;
1070
1140
  };
1071
1141
  analytics?: {
@@ -1075,15 +1145,6 @@ interface TeamSectionProps {
1075
1145
  }
1076
1146
  declare const TeamSection: ComponentConfig<TeamSectionProps>;
1077
1147
 
1078
- interface CollectionProps {
1079
- collection: YextCollection;
1080
- shouldClearDropZone?: boolean;
1081
- layout?: "grid" | "flex";
1082
- direction?: "flex-row" | "flex-col";
1083
- liveVisibility: boolean;
1084
- }
1085
- declare const Collection: ComponentConfig<CollectionProps>;
1086
-
1087
1148
  declare const layoutVariants: (props?: ({
1088
1149
  gap?: "0" | "1" | "2" | "3" | "4" | "none" | "6" | "8" | "12" | "16" | "24" | "14" | "20" | "0.5" | "1.5" | "2.5" | "10" | "3.5" | "5" | "7" | "9" | "11" | null | undefined;
1089
1150
  verticalPadding?: "0" | "1" | "2" | "3" | "4" | "default" | "none" | "6" | "8" | "12" | "16" | "24" | "14" | "20" | "0.5" | "1.5" | "2.5" | "10" | "3.5" | "5" | "7" | "9" | "11" | null | undefined;
@@ -1117,7 +1178,7 @@ type AddressProps = {
1117
1178
  declare const Address: ComponentConfig<AddressProps>;
1118
1179
 
1119
1180
  interface BodyTextProps extends BodyProps {
1120
- text: YextEntityField<string>;
1181
+ text: YextEntityField<TranslatableString>;
1121
1182
  }
1122
1183
  declare const BodyText: ComponentConfig<BodyTextProps>;
1123
1184
 
@@ -1142,7 +1203,7 @@ type GetDirectionsProps = {
1142
1203
  declare const GetDirections: ComponentConfig<GetDirectionsProps>;
1143
1204
 
1144
1205
  interface HeadingTextProps extends HeadingProps {
1145
- text: YextEntityField<string>;
1206
+ text: YextEntityField<TranslatableString>;
1146
1207
  }
1147
1208
  declare const HeadingText: ComponentConfig<HeadingTextProps>;
1148
1209
 
@@ -1186,12 +1247,13 @@ interface PhoneProps {
1186
1247
  declare const Phone: ComponentConfig<PhoneProps>;
1187
1248
 
1188
1249
  interface TextListProps {
1189
- list: YextEntityField<string[]>;
1250
+ list: YextEntityField<TranslatableString[]>;
1190
1251
  }
1191
1252
  declare const TextList: ComponentConfig<TextListProps>;
1192
1253
 
1193
1254
  type HeaderProps = {
1194
1255
  logoWidth?: number;
1256
+ enableLanguageSelector: boolean;
1195
1257
  analytics?: {
1196
1258
  scope?: string;
1197
1259
  };
@@ -1207,6 +1269,9 @@ type FooterProps = {
1207
1269
  declare const Footer: ComponentConfig<FooterProps>;
1208
1270
 
1209
1271
  interface DirectoryProps {
1272
+ data: {
1273
+ directoryRoot: TranslatableString;
1274
+ };
1210
1275
  analytics?: {
1211
1276
  scope?: string;
1212
1277
  };
@@ -1220,75 +1285,6 @@ type LocatorProps = {
1220
1285
  };
1221
1286
  declare const LocatorComponent: ComponentConfig<LocatorProps>;
1222
1287
 
1223
- type EventCardProps = {
1224
- card?: {
1225
- title: YextEntityField<string>;
1226
- image: YextEntityField<ImageType>;
1227
- dateTime: YextEntityField<string>;
1228
- description: YextEntityField<string>;
1229
- cta: YextEntityField<CTAProps>;
1230
- };
1231
- collection?: YextCollection;
1232
- };
1233
- declare const EventCard: ComponentConfig<EventCardProps>;
1234
-
1235
- type ProductCardProps = {
1236
- card?: {
1237
- image?: ImageWrapperProps;
1238
- heading?: YextEntityField<string>;
1239
- category?: YextEntityField<string>;
1240
- description?: YextEntityField<string>;
1241
- cta?: YextEntityField<CTAProps>;
1242
- };
1243
- styles: {
1244
- cardBackgroundColor?: BackgroundStyle;
1245
- };
1246
- collection?: YextCollection;
1247
- };
1248
- declare const ProductCard: ComponentConfig<ProductCardProps>;
1249
-
1250
- interface PersonCardProps {
1251
- card?: {
1252
- headshot?: YextEntityField<ImageWrapperProps>;
1253
- name?: YextEntityField<string>;
1254
- title?: YextEntityField<string>;
1255
- phone?: YextEntityField<string>;
1256
- email?: YextEntityField<string>;
1257
- cta?: YextEntityField<CTAProps>;
1258
- };
1259
- styles: {
1260
- cardBackgroundColor?: BackgroundStyle;
1261
- };
1262
- collection?: YextCollection;
1263
- }
1264
- declare const PersonCard: ComponentConfig<PersonCardProps>;
1265
-
1266
- type InsightCardProps = {
1267
- card?: {
1268
- image: YextEntityField<ImageType>;
1269
- title: YextEntityField<string>;
1270
- category: YextEntityField<string>;
1271
- date: YextEntityField<string>;
1272
- description: YextEntityField<string>;
1273
- cta: YextEntityField<CTAProps>;
1274
- };
1275
- collection?: YextCollection;
1276
- };
1277
- declare const InsightCard: ComponentConfig<InsightCardProps>;
1278
-
1279
- type TestimonialCardProps = {
1280
- card?: {
1281
- testimonial: YextEntityField<string>;
1282
- authorName: YextEntityField<string>;
1283
- date: YextEntityField<string>;
1284
- };
1285
- styles: {
1286
- cardBackgroundColor?: BackgroundStyle;
1287
- };
1288
- collection?: YextCollection;
1289
- };
1290
- declare const TestimonialCard: ComponentConfig<TestimonialCardProps>;
1291
-
1292
1288
  type StaticMapSectionProps = {
1293
1289
  data: {
1294
1290
  apiKey: string;
@@ -1354,31 +1350,14 @@ declare const LocatorCategoryComponents: {
1354
1350
  declare const LocatorCategory: (keyof LocatorCategoryProps)[];
1355
1351
  /** THE CATEGORIES BELOW ARE NO LONGER SUPPORTED */
1356
1352
  interface LayoutBlockCategoryProps {
1357
- Collection: CollectionProps;
1358
1353
  Flex: FlexProps;
1359
1354
  Grid: GridProps;
1360
1355
  }
1361
1356
  declare const LayoutBlockCategoryComponents: {
1362
- Collection: _measured_puck.ComponentConfig<CollectionProps>;
1363
1357
  Flex: _measured_puck.ComponentConfig<FlexProps>;
1364
1358
  Grid: _measured_puck.ComponentConfig<GridProps>;
1365
1359
  };
1366
1360
  declare const LayoutBlockCategory: (keyof LayoutBlockCategoryProps)[];
1367
- interface CardCategoryProps {
1368
- EventCard: EventCardProps;
1369
- PersonCard: PersonCardProps;
1370
- InsightCard: InsightCardProps;
1371
- ProductCard: ProductCardProps;
1372
- TestimonialCard: TestimonialCardProps;
1373
- }
1374
- declare const CardCategoryComponents: {
1375
- EventCard: _measured_puck.ComponentConfig<EventCardProps>;
1376
- PersonCard: _measured_puck.ComponentConfig<PersonCardProps>;
1377
- InsightCard: _measured_puck.ComponentConfig<InsightCardProps>;
1378
- ProductCard: _measured_puck.ComponentConfig<ProductCardProps>;
1379
- TestimonialCard: _measured_puck.ComponentConfig<TestimonialCardProps>;
1380
- };
1381
- declare const CardCategory: (keyof CardCategoryProps)[];
1382
1361
  interface ContentBlockCategoryProps {
1383
1362
  Address: AddressProps;
1384
1363
  BodyText: BodyTextProps;
@@ -1409,17 +1388,10 @@ declare const ContentBlockCategoryComponents: {
1409
1388
  };
1410
1389
  declare const ContentBlockCategory: (keyof ContentBlockCategoryProps)[];
1411
1390
 
1412
- type ExampleRepeatableItemProps = {
1413
- text?: YextEntityField<string>;
1414
- image?: YextEntityField<ImageType>;
1415
- collection?: YextCollection;
1416
- };
1417
- declare const ExampleRepeatableItemComponent: ComponentConfig<ExampleRepeatableItemProps>;
1418
-
1419
1391
  type SectionContainerProps = {
1420
1392
  background?: BackgroundStyle;
1421
1393
  sectionHeading: {
1422
- text: YextEntityField<string>;
1394
+ text: YextEntityField<TranslatableString>;
1423
1395
  level: HeadingProps["level"];
1424
1396
  alignment: "left" | "right" | "center";
1425
1397
  };
@@ -1429,6 +1401,8 @@ declare const SectionContainer: ComponentConfig<SectionContainerProps>;
1429
1401
 
1430
1402
  declare const migrationRegistry: MigrationRegistry;
1431
1403
 
1404
+ declare const addHeadingAlignmentMigration: Migration;
1405
+
1432
1406
  declare const defaultThemeConfig: ThemeConfig;
1433
1407
 
1434
- export { Address, type AddressProps, Background, type BackgroundProps, BackgroundProvider, type BackgroundStyle, BannerSection, type BannerSectionProps, BasicSelector, Body, type BodyProps, BodyText, type BodyTextProps, BorderRadiusSelector, BreadcrumbsSection, type BreadcrumbsSectionProps, Button, type ButtonProps, CTA, type CTAProps, CTAWrapper, type CTAWrapperProps, CardCategory, CardCategoryComponents, type CardCategoryProps, Collection, type CollectionProps, type ComponentField, ComponentFields, ContentBlockCategory, ContentBlockCategoryComponents, type ContentBlockCategoryProps, CoreInfoSection, type CoreInfoSectionProps, Directory, DirectoryCategory, DirectoryCategoryComponents, type DirectoryCategoryProps, type DirectoryProps, Editor, Emails, type EmailsProps, EntityField, EventCard, type EventCardProps, EventSection, type EventSectionProps, type EventSectionType, type EventStruct, ExampleRepeatableItemComponent, type ExampleRepeatableItemProps, FAQSection, type FAQSectionProps, type FAQSectionType, type FAQStruct, Flex, type FlexProps, type FontRegistry, FontSizeSelector, Footer, type FooterProps, GetDirections, type GetDirectionsProps, Grid, type GridProps, Header, type HeaderProps, Heading, type HeadingLevel, type HeadingProps, HeadingText, type HeadingTextProps, HeroSection, type HeroSectionProps, type HeroSectionType, HoursStatus, HoursStatusAtom, type HoursStatusAtomProps, type HoursStatusProps, HoursTable, HoursTableAtom, type HoursTableAtomProps, type HoursTableProps, Image, type ImageProps, ImageWrapper, type ImageWrapperProps, InsightCard, type InsightCardProps, InsightSection, type InsightSectionProps, type InsightSectionType, type InsightStruct, KnowledgeGraphIcon, LayoutBlockCategory, LayoutBlockCategoryComponents, type LayoutBlockCategoryProps, LocatorCategory, LocatorCategoryComponents, type LocatorCategoryProps, LocatorComponent, type LocatorProps, MapboxStaticMap, type MapboxStaticProps, MaybeLink, type MaybeLinkProps, MaybeRTF, type MaybeRTFProps, type Migration, type MigrationAction, type MigrationRegistry, NearbyLocationsSection, type NearbyLocationsSectionProps, OptionalNumberField, type OptionalNumberFieldProps, OtherCategory, OtherCategoryComponents, type OtherCategoryProps, PageSection, PageSectionCategory, PageSectionCategoryComponents, type PageSectionCategoryProps, type PageSectionProps, PersonCard, type PersonCardProps, type PersonStruct, Phone, PhoneAtom, type PhoneAtomProps, type PhoneProps, PhotoGallerySection, type PhotoGallerySectionProps, ProductCard, type ProductCardProps, ProductSection, type ProductSectionProps, type ProductSectionType, type ProductStruct, PromoSection, type PromoSectionProps, type PromoSectionType, type RTF2, type RenderYextEntityFieldSelectorProps, SectionContainer, type SectionContainerProps, SpacingSelector, TailwindConfigContext, TeamSection, type TeamSectionProps, type TeamSectionType, TemplatePropsContext, TestimonialCard, type TestimonialCardProps, TestimonialSection, type TestimonialSectionProps, type TestimonialSectionType, type TestimonialStruct, TextList, type TextListProps, type ThemeConfig, ThemeOptions, Timestamp, TimestampOption, type TimestampProps, VisibilityWrapper, VisualEditorProvider, type YextCollection, YextCollectionSubfieldSelector, type YextEntityField, YextEntityFieldSelector, YextField, type YextFieldDefinition, type YextSchemaField, type YextStructEntityField, YextStructFieldSelector, applyAnalytics, applyHeaderScript, applyTheme, backgroundColors, bodyVariants, buttonVariants, constructFontSelectOptions, createSearchAnalyticsConfig, createSearchHeadlessConfig, defaultFonts, defaultThemeConfig, defaultThemeTailwindExtensions, fetchNearbyLocations, getFontWeightOptions, getFontWeightOverrideOptions, getPageMetadata, handleResolveFieldsForCollections, headingVariants, i18nComponentsInstance, i18nPlatformInstance, migrate, migrationRegistry, normalizeSlug, resolveYextEntityField, resolveYextStructField, resolveYextSubfield, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields, usePlatformTranslation, useTailwindConfig, useTemplateProps, validateSlug, withPropOverrides };
1408
+ export { Address, type AddressProps, Background, type BackgroundProps, BackgroundProvider, type BackgroundStyle, BannerSection, type BannerSectionProps, BasicSelector, Body, type BodyProps, BodyText, type BodyTextProps, BorderRadiusSelector, BreadcrumbsSection, type BreadcrumbsSectionProps, Button, type ButtonProps, CTA, type CTAProps, CTAWrapper, type CTAWrapperProps, type ComponentField, ComponentFields, ContentBlockCategory, ContentBlockCategoryComponents, type ContentBlockCategoryProps, CoreInfoSection, type CoreInfoSectionProps, Directory, DirectoryCategory, DirectoryCategoryComponents, type DirectoryCategoryProps, type DirectoryProps, Editor, Emails, type EmailsProps, EntityField, EventSection, type EventSectionProps, type EventSectionType, type EventStruct, FAQSection, type FAQSectionProps, type FAQSectionType, type FAQStruct, Flex, type FlexProps, type FontRegistry, FontSizeSelector, Footer, type FooterProps, GetDirections, type GetDirectionsProps, Grid, type GridProps, Header, type HeaderProps, Heading, type HeadingLevel, type HeadingProps, HeadingText, type HeadingTextProps, HeroSection, type HeroSectionProps, type HeroSectionType, HoursStatus, HoursStatusAtom, type HoursStatusAtomProps, type HoursStatusProps, HoursTable, HoursTableAtom, type HoursTableAtomProps, type HoursTableProps, Image, type ImageProps, ImageWrapper, type ImageWrapperProps, InsightSection, type InsightSectionProps, type InsightSectionType, type InsightStruct, KnowledgeGraphIcon, LayoutBlockCategory, LayoutBlockCategoryComponents, type LayoutBlockCategoryProps, LocatorCategory, LocatorCategoryComponents, type LocatorCategoryProps, LocatorComponent, type LocatorProps, MapboxStaticMap, type MapboxStaticProps, MaybeLink, type MaybeLinkProps, MaybeRTF, type MaybeRTFProps, type Migration, type MigrationAction, type MigrationRegistry, NearbyLocationsSection, type NearbyLocationsSectionProps, OptionalNumberField, type OptionalNumberFieldProps, OtherCategory, OtherCategoryComponents, type OtherCategoryProps, PageSection, PageSectionCategory, PageSectionCategoryComponents, type PageSectionCategoryProps, type PageSectionProps, type PersonStruct, Phone, PhoneAtom, type PhoneAtomProps, type PhoneProps, PhotoGallerySection, type PhotoGallerySectionProps, ProductSection, type ProductSectionProps, type ProductSectionType, type ProductStruct, PromoSection, type PromoSectionProps, type PromoSectionType, type RenderYextEntityFieldSelectorProps, type RichText, SectionContainer, type SectionContainerProps, SpacingSelector, TailwindConfigContext, TeamSection, type TeamSectionProps, type TeamSectionType, TemplatePropsContext, TestimonialSection, type TestimonialSectionProps, type TestimonialSectionType, type TestimonialStruct, TextList, type TextListProps, type ThemeConfig, ThemeOptions, Timestamp, TimestampOption, type TimestampProps, type TranslatableCTA, type TranslatableRichText, TranslatableRichTextField, type TranslatableString, TranslatableStringField, VisibilityWrapper, VisualEditorProvider, type YextEntityField, YextEntityFieldSelector, YextField, type YextFieldDefinition, type YextSchemaField, type YextStructEntityField, YextStructFieldSelector, addHeadingAlignmentMigration, applyAnalytics, applyHeaderScript, applyTheme, backgroundColors, bodyVariants, buttonVariants, constructFontSelectOptions, createSearchAnalyticsConfig, createSearchHeadlessConfig, defaultFonts, defaultThemeConfig, defaultThemeTailwindExtensions, fetchLocalesToPathsForEntity, fetchNearbyLocations, getFontWeightOptions, getFontWeightOverrideOptions, getPageMetadata, headingVariants, i18nComponentsInstance, i18nPlatformInstance, migrate, migrationRegistry, msg, normalizeSlug, pt, resolveTranslatableRichText, resolveTranslatableString, resolveYextEntityField, resolveYextStructField, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields, usePlatformTranslation, useTailwindConfig, useTemplateProps, validateSlug, withPropOverrides };