@yext/visual-editor 0.0.58 → 0.0.60

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.cts CHANGED
@@ -8,9 +8,9 @@ import { ClassValue } from 'clsx';
8
8
  import * as _measured_puck from '@measured/puck';
9
9
  import { Config, Data, DefaultComponentProps, DefaultRootProps, Field, CustomField, ComponentConfig, ArrayField, BaseField, ObjectField, NumberField, Slot } from '@measured/puck';
10
10
  import { ImageType, CTA as CTA$1, LinkType, HoursTableProps as HoursTableProps$1, ComplexImageType, HoursType, AddressType, Coordinate, DayOfWeekNames } from '@yext/pages-components';
11
- import * as _yext_search_headless_react from '@yext/search-headless-react';
12
11
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
13
12
  import { VariantProps } from 'class-variance-authority';
13
+ import * as _yext_search_headless_react from '@yext/search-headless-react';
14
14
  import * as react_jsx_runtime_js from 'react/jsx-runtime.js';
15
15
  import * as TogglePrimitive from '@radix-ui/react-toggle';
16
16
 
@@ -106,6 +106,7 @@ type StreamDocument = {
106
106
  name?: string;
107
107
  visualEditorConfig?: string;
108
108
  isPrimaryLocale?: boolean;
109
+ entityPageSetUrlTemplates?: string;
109
110
  };
110
111
  };
111
112
  declare const applyTheme: (document: StreamDocument, themeConfig: ThemeConfig, base?: string) => string;
@@ -150,9 +151,23 @@ type ComboboxOptionGroup = {
150
151
  options: ComboboxOption[];
151
152
  };
152
153
 
154
+ /**
155
+ * Applies a theme color as the background of a page section
156
+ * @ai This value MUST be one of the following
157
+ * { bgColor: "bg-white", textColor: "text-black" }
158
+ * { bgColor: "bg-palette-primary-light", textColor: "text-black", isDarkBackground: false }
159
+ * { bgColor: "bg-palette-secondary-light", textColor: "text-black", isDarkBackground: false }
160
+ * { bgColor: "bg-palette-tertiary-light", textColor: "text-black", isDarkBackground: false }
161
+ * { bgColor: "bg-palette-quaternary-light", textColor: "text-black", isDarkBackground: false }
162
+ * { bgColor: "bg-palette-primary-dark", textColor: "text-white", isDarkBackground: true }
163
+ * { bgColor: "bg-palette-secondary-dark", textColor: "text-white", isDarkBackground: true }
164
+ */
153
165
  type BackgroundStyle = {
166
+ /** The tailwind background color class */
154
167
  bgColor: string;
168
+ /** The tailwind text color class */
155
169
  textColor: string;
170
+ /** Whether the background color is dark (for adjusting other styles based on background) */
156
171
  isDarkBackground?: boolean;
157
172
  };
158
173
  type BackgroundOption = {
@@ -160,6 +175,7 @@ type BackgroundOption = {
160
175
  value: BackgroundStyle;
161
176
  };
162
177
  declare const backgroundColors: Record<string, BackgroundOption>;
178
+ /** Corresponds to the different semantic heading levels */
163
179
  type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
164
180
  declare const defaultThemeTailwindExtensions: {
165
181
  colors: {
@@ -366,6 +382,8 @@ type RootConfig = {
366
382
  };
367
383
  declare function getPageMetadata(document: Record<string, any>): RootConfig;
368
384
 
385
+ declare const getSchema: (document: Record<string, any>) => Record<string, any>;
386
+
369
387
  type MigrationAction = {
370
388
  action: "removed";
371
389
  } | {
@@ -398,7 +416,11 @@ declare const migrate: (data: Data<DefaultComponentProps, RootProps>, migrationR
398
416
  * @returns The fully resolved data for the component.
399
417
  */
400
418
  declare function resolveComponentData(data: TranslatableString | YextEntityField<TranslatableString>, locale: string, streamDocument?: any): string;
401
- declare function resolveComponentData(data: TranslatableRichText | YextEntityField<TranslatableRichText>, locale: string, streamDocument?: any): string | React__default.ReactElement;
419
+ declare function resolveComponentData(data: TranslatableRichText | YextEntityField<TranslatableRichText>, locale: string, streamDocument?: any, options?: {
420
+ variant?: BodyProps["variant"];
421
+ isDarkBackground?: boolean;
422
+ className?: string;
423
+ }): string | React__default.ReactElement;
402
424
  declare function resolveComponentData<T>(data: YextEntityField<T>, locale: string, streamDocument?: any): T | undefined;
403
425
 
404
426
  type Only<T, U> = {
@@ -428,11 +450,23 @@ type EntityFieldTypesFilter$1 = {
428
450
  type RenderEntityFieldFilter<T extends Record<string, any>> = EntityFieldTypesFilter$1 & EitherOrNeither<AllowList<T>, DisallowList<T>>;
429
451
  type EntityFieldTypes = "type.string" | "type.image" | "type.hours" | "type.address" | "type.phone" | "type.coordinate" | "type.cta" | "type.boolean" | "type.option" | "type.faq_section" | "type.testimonials_section" | "type.products_section" | "type.insights_section" | "type.rich_text_v2" | "type.team_section" | "type.events_section" | "type.promo_section" | "type.hero_section" | `c_${string}`;
430
452
 
453
+ /** Represents data that can either be from the Yext Knowledge Graph or statically defined */
431
454
  type YextEntityField<T> = {
455
+ /** The api name of the Yext field */
432
456
  field: string;
457
+ /** The static value of the field */
433
458
  constantValue: T;
459
+ /** Whether to use the Yext field or the constant value */
434
460
  constantValueEnabled?: boolean;
461
+ /**
462
+ * Whether the field can be translated or not.
463
+ * @ai always omit this property
464
+ */
435
465
  disallowTranslation?: boolean;
466
+ /**
467
+ * Filter the embedded field input to this type.
468
+ * @ai always omit this property
469
+ */
436
470
  selectedType?: string;
437
471
  };
438
472
  /**
@@ -468,10 +502,15 @@ type EntityFieldTypesFilter = {
468
502
  type: StructEntityFieldTypes;
469
503
  };
470
504
  type StructEntityFieldTypes = "type.hero_section" | "type.promo_section";
505
+ /** Represents a Yext struct entity field (hero or promo) with support for static values and overrides. */
471
506
  type YextStructEntityField<T extends Record<string, any> = any> = {
507
+ /** The Yext Knowledge Graph field api name */
472
508
  field: string;
509
+ /** The static value for the field */
473
510
  constantValue: T;
511
+ /** Whether to use the static value instead of the entity field value */
474
512
  constantValueEnabled?: boolean;
513
+ /** A map of subfield names to whether to use the static value for that subfield */
475
514
  constantValueOverride: {
476
515
  [K in keyof T]: boolean;
477
516
  };
@@ -485,6 +524,7 @@ declare const YextStructFieldSelector: <U extends Record<string, any>>(props: St
485
524
 
486
525
  declare const resolveYextEntityField: <T>(streamDocument: any, entityField: YextEntityField<T>, locale?: string) => T | undefined;
487
526
  declare const resolveYextStructField: <T extends Record<string, any>>(streamDocument: any, entityField: YextStructEntityField<T>, locale?: string) => T | undefined;
527
+ declare const resolveSchemaJson: (streamDocument: StreamDocument, schema: string) => string;
488
528
 
489
529
  /**
490
530
  * Resolves a URL template using the provided stream document, locale, and relativePrefixToRoot.
@@ -645,11 +685,26 @@ type AssetVideo = {
645
685
  id: string;
646
686
  };
647
687
 
688
+ /**
689
+ * A pages-components CTA with a translatable label and link
690
+ */
648
691
  type TranslatableCTA = Omit<CTA$1, "label" | "link"> & {
692
+ /** The text to display in the CTA */
649
693
  label: TranslatableString;
694
+ /** The link the for the CTA */
650
695
  link: TranslatableString;
651
696
  };
697
+ /** Enhanced CTA options */
652
698
  type EnhancedTranslatableCTA = TranslatableCTA & {
699
+ /**
700
+ * The type of CTA button to display.
701
+ * textAndLink is a standard button
702
+ * getDirections is a button that opens a map based on the coordinate field
703
+ * presetImage uses a preset image such as app store or food delivery logos for the button
704
+ * @defaultValue "textAndLink"
705
+ * @ai If the CTA is for getting directions, use "getDirections" and provide the coordinate field.
706
+ * If the CTA is for app downloads or food delivery, use "presetImage" and select the appropriate presetImageType. Otherwise, use "textAndLink".
707
+ */
653
708
  ctaType?: "textAndLink" | "getDirections" | "presetImage";
654
709
  coordinate?: {
655
710
  latitude: number;
@@ -657,80 +712,167 @@ type EnhancedTranslatableCTA = TranslatableCTA & {
657
712
  };
658
713
  presetImageType?: PresetImageType;
659
714
  };
715
+ /** Preset image types for CTA buttons - app store or food delivery logos */
660
716
  type PresetImageType = "app-store" | "google-play" | "galaxy-store" | "app-gallery" | "uber-eats";
717
+ /** Data for the HeroSection */
661
718
  type HeroSectionType = {
719
+ /**
720
+ * The image to show in the hero section
721
+ * @ai Always use ImageType
722
+ */
662
723
  image?: ImageType | AssetImageType;
724
+ /** The first CTA button for the hero section */
663
725
  primaryCta?: EnhancedTranslatableCTA;
726
+ /** The second CTA button for the hero section */
664
727
  secondaryCta?: EnhancedTranslatableCTA;
665
728
  };
729
+ /** Data for the PromoSection */
666
730
  type PromoSectionType = {
731
+ /**
732
+ * The image or video to show in the promo
733
+ * @ai Always use ImageType
734
+ */
667
735
  image?: ImageType | AssetImageType | AssetVideo;
736
+ /** The main text to display in the promo */
668
737
  title?: TranslatableString;
738
+ /** The sub text to display in the promo */
669
739
  description?: TranslatableRichText;
740
+ /** The CTA button for the promo */
670
741
  cta: EnhancedTranslatableCTA;
671
742
  };
743
+ /** Data for the ProductSection */
672
744
  type ProductSectionType = {
673
745
  products: Array<ProductStruct>;
674
746
  };
747
+ /** An individual product in the ProductSection */
675
748
  type ProductStruct = {
749
+ /**
750
+ * The product's image
751
+ * @ai Always use ImageType
752
+ */
676
753
  image?: ImageType | AssetImageType;
754
+ /** The product's name */
677
755
  name?: TranslatableString;
756
+ /** The product's description */
678
757
  description?: TranslatableRichText;
758
+ /**
759
+ * The product's category
760
+ * @ai This should not be more than a few words
761
+ */
679
762
  category?: TranslatableString;
763
+ /** The product's CTA */
680
764
  cta: EnhancedTranslatableCTA;
681
765
  };
766
+ /** Data for the EventSection */
682
767
  type EventSectionType = {
683
768
  events: Array<EventStruct>;
684
769
  };
770
+ /** An individual event in the EventsSection */
685
771
  type EventStruct = {
772
+ /**
773
+ * An image representing the event
774
+ * @ai Always use ImageType
775
+ */
686
776
  image?: ImageType | AssetImageType;
777
+ /** The event's title */
687
778
  title?: TranslatableString;
779
+ /** A UTC string for event's date and time (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ssZ) */
688
780
  dateTime?: string;
781
+ /** The event's description */
689
782
  description?: TranslatableRichText;
783
+ /** The event's CTA */
690
784
  cta: EnhancedTranslatableCTA;
691
785
  };
786
+ /** Data for the FAQSection */
692
787
  type FAQSectionType = {
693
788
  faqs: Array<FAQStruct>;
694
789
  };
790
+ /** An individual FAQ */
695
791
  type FAQStruct = {
792
+ /** The question (always visible on the page) */
696
793
  question: TranslatableString;
794
+ /** The answer (visible when the question is clicked) */
697
795
  answer: TranslatableRichText;
698
796
  };
797
+ /** Data for the TestimonialSection */
699
798
  type TestimonialSectionType = {
700
799
  testimonials: Array<TestimonialStruct>;
701
800
  };
801
+ /** An individual testimonial for the TestimonialSection */
702
802
  type TestimonialStruct = {
803
+ /** The testimonial text */
703
804
  description?: TranslatableRichText;
805
+ /** The name of the person who contributed the testimonial */
704
806
  contributorName?: TranslatableString;
807
+ /** A UTC string for the contribution's date and time (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ssZ) */
705
808
  contributionDate?: string;
706
809
  };
810
+ /** Data for the InsightSection */
707
811
  type InsightSectionType = {
708
812
  insights: Array<InsightStruct>;
709
813
  };
814
+ /** An individual insight for the InsightSection */
710
815
  type InsightStruct = {
816
+ /**
817
+ * An image representing the insight
818
+ * @ai Always use ImageType
819
+ */
711
820
  image?: ImageType | AssetImageType;
821
+ /** The insight's title */
712
822
  name?: TranslatableString;
823
+ /**
824
+ * The insight's category
825
+ * @ai This should not be more than a few words
826
+ */
713
827
  category?: TranslatableString;
828
+ /** A UTC string for the insight's publish time (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ssZ) */
714
829
  publishTime?: string;
830
+ /** The insight's description */
715
831
  description?: TranslatableRichText;
832
+ /** The insight's CTA */
716
833
  cta: EnhancedTranslatableCTA;
717
834
  };
835
+ /** Data for the TeamSection */
718
836
  type TeamSectionType = {
719
837
  people: Array<PersonStruct>;
720
838
  };
839
+ /** An individual person in the TeamSection */
721
840
  type PersonStruct = {
841
+ /**
842
+ * The person's headshot image
843
+ * @ai Always use ImageType
844
+ */
722
845
  headshot?: ImageType | AssetImageType;
846
+ /** The person's name */
723
847
  name?: TranslatableString;
848
+ /** The person's job title */
724
849
  title?: TranslatableString;
850
+ /** The person's phone number. Format: +1234567890 */
725
851
  phoneNumber?: string;
852
+ /** The person's email address */
726
853
  email?: string;
854
+ /** A call to action for the person */
727
855
  cta: EnhancedTranslatableCTA;
728
856
  };
857
+ /** Represents a translatable string. The key is the locale (en, es, fr), and the value is the localized string. */
729
858
  type LocalizedValues = {
730
859
  hasLocalizedValue: "true";
731
860
  } & Record<string, string>;
861
+ /**
862
+ * A string that can be translated for different locales.
863
+ * @ai This should always be the LocalizedValues type
864
+ */
732
865
  type TranslatableString = string | LocalizedValues;
866
+ /**
867
+ * Rich text that can be translated for different locales.
868
+ * @ai This should always be Record<string, RichText>
869
+ */
733
870
  type TranslatableRichText = (string | RichText) | Record<string, string | RichText>;
871
+ /**
872
+ * A rich text object with HTML and JSON (LexicalRichText) representations.
873
+ * The HTML representation is used on the live page.
874
+ * The JSON representation is used in the editor for rich text editing.
875
+ */
734
876
  type RichText = {
735
877
  html?: string;
736
878
  json?: string;
@@ -824,8 +966,9 @@ type EntityFieldProps = {
824
966
  constantValueEnabled?: boolean;
825
967
  children: React__default.ReactNode;
826
968
  fullHeight?: boolean;
969
+ className?: string;
827
970
  };
828
- declare const EntityField: ({ displayName, fieldId, constantValueEnabled, children, fullHeight, }: EntityFieldProps) => string | number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
971
+ declare const EntityField: ({ displayName, fieldId, constantValueEnabled, children, fullHeight, className, }: EntityFieldProps) => string | number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
829
972
 
830
973
  type OptionalNumberFieldProps = {
831
974
  fieldLabel: string;
@@ -975,7 +1118,7 @@ declare const filterMaxWidths: (styleElement: HTMLStyleElement) => {
975
1118
  };
976
1119
 
977
1120
  declare const bodyVariants: (props?: ({
978
- variant?: "sm" | "lg" | "base" | "xs" | null | undefined;
1121
+ variant?: "base" | "sm" | "lg" | "xs" | null | undefined;
979
1122
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
980
1123
  interface BodyProps extends Omit<React.HTMLAttributes<HTMLParagraphElement>, "color">, VariantProps<typeof bodyVariants> {
981
1124
  }
@@ -1007,11 +1150,21 @@ type CTAProps = {
1007
1150
  alwaysHideCaret?: boolean;
1008
1151
  ariaLabel?: string;
1009
1152
  };
1153
+ /**
1154
+ * The different visual variants for CTA buttons.
1155
+ * "primary": the default button style. A button filled with the primary theme color.
1156
+ * "secondary": an outlined button style. A button with a border in the primary theme color and transparent background.
1157
+ * "link": a text link style. A button with no border or background, just a hyperlink in the link theme color.
1158
+ * "directoryLink": a text link style optimized for directory listings.
1159
+ * "headerFooterMainLink": a text link style optimized for main links in the header and footer.
1160
+ * "headerFooterSecondaryLink": a text link style optimized for secondary links in the header and footer.
1161
+ */
1162
+ type CTAVariant = ButtonProps["variant"];
1010
1163
  declare const CTA: (props: CTAProps) => react_jsx_runtime_js.JSX.Element | null;
1011
1164
 
1012
1165
  declare const headingVariants: (props?: ({
1013
1166
  level?: 2 | 1 | 3 | 4 | 5 | 6 | null | undefined;
1014
- fontSize?: "default" | "sm" | "lg" | "base" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
1167
+ fontSize?: "default" | "base" | "sm" | "lg" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
1015
1168
  weight?: "default" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | null | undefined;
1016
1169
  transform?: "none" | "uppercase" | "lowercase" | "capitalize" | null | undefined;
1017
1170
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
@@ -1031,15 +1184,32 @@ interface ImageProps {
1031
1184
  aspectRatio?: number;
1032
1185
  width?: number;
1033
1186
  className?: string;
1187
+ /** sizes attribute of the underlying img tag */
1188
+ sizes?: string;
1034
1189
  }
1035
1190
  declare const Image: React.FC<ImageProps>;
1191
+ type ImgSizesByBreakpoint = {
1192
+ base: string;
1193
+ sm?: string;
1194
+ md?: string;
1195
+ lg?: string;
1196
+ xl?: string;
1197
+ "2xl"?: string;
1198
+ };
1199
+ /**
1200
+ * Creates an img sizes attribute based on the default Tailwind breakpoints.
1201
+ * Replaces `maxWidth` with the current page section max width from the theme.
1202
+ * @param sizes - the width of the image at different breakpoints
1203
+ * @returns a string for the sizes attribute of an img tag
1204
+ */
1205
+ declare const imgSizesHelper: (sizes: ImgSizesByBreakpoint) => string;
1036
1206
 
1037
1207
  type MaybeLinkProps = {
1038
1208
  href?: string;
1039
1209
  children?: React.ReactNode;
1040
1210
  className?: string;
1041
1211
  eventName?: string;
1042
- variant?: CTAProps["variant"];
1212
+ variant?: CTAVariant;
1043
1213
  alwaysHideCaret?: boolean;
1044
1214
  };
1045
1215
  declare const MaybeLink: (props: MaybeLinkProps) => react_jsx_runtime.JSX.Element;
@@ -1051,7 +1221,7 @@ interface MaybeRTFProps extends Record<string, any> {
1051
1221
  declare const MaybeRTF: ({ data, bodyVariant, ...props }: MaybeRTFProps) => react_jsx_runtime.JSX.Element;
1052
1222
 
1053
1223
  declare const pageSectionVariants: (props?: ({
1054
- verticalPadding?: "default" | "sm" | "none" | "footer" | "header" | "footerSecondary" | null | undefined;
1224
+ verticalPadding?: "default" | "footer" | "header" | "sm" | "none" | "footerSecondary" | null | undefined;
1055
1225
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
1056
1226
  declare const maxWidthVariants: (props?: ({
1057
1227
  maxWidth?: "theme" | "768px" | "960px" | "1024px" | "1280px" | "1440px" | "fullWidth" | null | undefined;
@@ -1102,7 +1272,7 @@ interface HoursStatusAtomProps {
1102
1272
  dayOfWeekFormat?: "short" | "long";
1103
1273
  timezone?: string;
1104
1274
  }
1105
- declare const HoursStatusAtom: ({ hours, className, showCurrentStatus, showDayNames, timeFormat, dayOfWeekFormat, timezone, }: HoursStatusAtomProps) => any;
1275
+ declare const HoursStatusAtom: React.MemoExoticComponent<({ hours, className, showCurrentStatus, showDayNames, timeFormat, dayOfWeekFormat, timezone, }: HoursStatusAtomProps) => any>;
1106
1276
 
1107
1277
  declare enum TimestampOption {
1108
1278
  DATE = "DATE",
@@ -1171,13 +1341,17 @@ interface GridProps extends layoutProps {
1171
1341
  };
1172
1342
  }
1173
1343
 
1344
+ /** Props for the Address component */
1174
1345
  interface AddressProps {
1175
1346
  data: {
1347
+ /** The address data to display. */
1176
1348
  address: YextEntityField<AddressType>;
1177
1349
  };
1178
1350
  styles: {
1351
+ /** Whether to include a "Get Directions" CTA to Google Maps */
1179
1352
  showGetDirectionsLink: boolean;
1180
- ctaVariant: CTAProps["variant"];
1353
+ /** The variant of the get directions button */
1354
+ ctaVariant: CTAVariant;
1181
1355
  };
1182
1356
  }
1183
1357
 
@@ -1192,8 +1366,8 @@ type BodyTextProps = {
1192
1366
 
1193
1367
  interface CTAWrapperProps {
1194
1368
  entityField: YextEntityField<EnhancedTranslatableCTA>;
1195
- variant: CTAProps["variant"];
1196
- className?: CTAProps["className"];
1369
+ variant: CTAVariant;
1370
+ className?: string;
1197
1371
  }
1198
1372
 
1199
1373
  interface EmailsProps {
@@ -1203,7 +1377,7 @@ interface EmailsProps {
1203
1377
 
1204
1378
  type GetDirectionsProps = {
1205
1379
  coordinate: YextEntityField<Coordinate>;
1206
- variant: CTAProps["variant"];
1380
+ variant: CTAVariant;
1207
1381
  };
1208
1382
 
1209
1383
  type HeadingTextProps = {
@@ -1211,14 +1385,23 @@ type HeadingTextProps = {
1211
1385
  level: HeadingProps["level"];
1212
1386
  };
1213
1387
 
1388
+ /** Props for the HoursTable component. */
1214
1389
  interface HoursTableProps {
1215
1390
  data: {
1391
+ /** The hours data to display in the table. */
1216
1392
  hours: YextEntityField<HoursType>;
1217
1393
  };
1218
1394
  styles: {
1395
+ /**
1396
+ * The day of week to display at the top of the table.
1397
+ * If set to "today", the current day will dynamically be at the top.
1398
+ */
1219
1399
  startOfWeek: keyof DayOfWeekNames | "today";
1400
+ /** If true, consecutive days that have the same hours will be collapsed into one row. */
1220
1401
  collapseDays: boolean;
1402
+ /** Shows the showAdditionalHoursText subfield from the hours field, if present */
1221
1403
  showAdditionalHoursText: boolean;
1404
+ /** Alignment of the text in the hours table */
1222
1405
  alignment: "items-start" | "items-center";
1223
1406
  };
1224
1407
  }
@@ -1232,7 +1415,9 @@ interface HoursStatusProps {
1232
1415
  showDayNames?: boolean;
1233
1416
  }
1234
1417
 
1418
+ /** Props for displaying an image */
1235
1419
  interface ImageStylingProps {
1420
+ /** The aspect ratio of the image */
1236
1421
  aspectRatio: number;
1237
1422
  width?: number;
1238
1423
  }
@@ -1247,17 +1432,22 @@ interface ImageWrapperProps {
1247
1432
  type MapboxStaticProps = {
1248
1433
  apiKey: string;
1249
1434
  coordinate: YextEntityField<Coordinate>;
1435
+ mapStyle: string;
1250
1436
  zoom?: number;
1251
- mapStyle?: string;
1252
1437
  };
1253
1438
 
1439
+ /** The props for the Phone component */
1254
1440
  interface PhoneProps {
1255
1441
  data: {
1442
+ /** The phone number data to display */
1256
1443
  number: YextEntityField<string>;
1444
+ /** The text to display before the phone number */
1257
1445
  label: TranslatableString;
1258
1446
  };
1259
1447
  styles: {
1448
+ /** Whether to format the phone number like a domestic or international number */
1260
1449
  phoneFormat: "domestic" | "international";
1450
+ /** Whether to make the phone number a clickable link */
1261
1451
  includePhoneHyperlink: boolean;
1262
1452
  };
1263
1453
  }
@@ -1984,7 +2174,14 @@ interface LocatorProps {
1984
2174
  * If 'true', displays a button to filter for locations that are currently open.
1985
2175
  * @defaultValue false
1986
2176
  */
1987
- openNowButton?: boolean;
2177
+ openNowButton: boolean;
2178
+ /**
2179
+ * The starting location for the map.
2180
+ */
2181
+ mapStartingLocation?: {
2182
+ latitude: string;
2183
+ longitude: string;
2184
+ };
1988
2185
  }
1989
2186
  /**
1990
2187
  * Available on Locator templates.
@@ -2104,12 +2301,20 @@ interface ExpandedFooterData {
2104
2301
  tiktokLink: string;
2105
2302
  youtubeLink: string;
2106
2303
  xLink: string;
2304
+ /** Small images to show under the main logo */
2107
2305
  utilityImages: {
2108
2306
  image: AssetImageType;
2109
2307
  linkTarget?: string;
2110
2308
  }[];
2309
+ /**
2310
+ * Whether to expand the footer to show additional link categories.
2311
+ * expandedFooter: false uses a single row of footerLinks.
2312
+ * expandedFooter: true uses multiple columns of expandedFooterLinks.
2313
+ */
2111
2314
  expandedFooter: boolean;
2315
+ /** Links for the default footer */
2112
2316
  footerLinks: TranslatableCTA[];
2317
+ /** Links for the expanded footer */
2113
2318
  expandedFooterLinks: {
2114
2319
  label: TranslatableString;
2115
2320
  links: TranslatableCTA[];
@@ -2117,6 +2322,7 @@ interface ExpandedFooterData {
2117
2322
  };
2118
2323
  /** Content for the secondary header bar. */
2119
2324
  secondaryFooter: {
2325
+ /** Whether to hide or show the secondary footer */
2120
2326
  show: boolean;
2121
2327
  copyrightMessage: TranslatableString;
2122
2328
  secondaryFooterLinks: TranslatableCTA[];
@@ -2194,17 +2400,26 @@ declare const Header: ComponentConfig<{
2194
2400
  interface ExpandedHeaderData {
2195
2401
  /** Content for the main primary header bar. */
2196
2402
  primaryHeader: {
2403
+ /** The main logo (top left) */
2197
2404
  logo: AssetImageType;
2405
+ /** The links to display in the primary header */
2198
2406
  links: TranslatableCTA[];
2407
+ /** Content for the first CTA (top right) */
2199
2408
  primaryCTA?: TranslatableCTA;
2409
+ /** Whether to show or hide the primary CTA */
2200
2410
  showPrimaryCTA: boolean;
2411
+ /** Content for the second CTA (top right) */
2201
2412
  secondaryCTA?: TranslatableCTA;
2413
+ /** Whether to show or hide the secondary CTA */
2202
2414
  showSecondaryCTA: boolean;
2203
2415
  };
2204
- /** Content for the secondary header (top bar). */
2416
+ /** Content for the secondary header (above the main header). */
2205
2417
  secondaryHeader: {
2418
+ /** Whether to show or hide the secondary header */
2206
2419
  show: boolean;
2420
+ /** Whether to include the locale dropdown for multi-locale pages */
2207
2421
  showLanguageDropdown: boolean;
2422
+ /** The links to display in the secondary header */
2208
2423
  secondaryLinks: TranslatableCTA[];
2209
2424
  };
2210
2425
  }
@@ -2213,8 +2428,8 @@ interface ExpandedHeaderStyles {
2213
2428
  primaryHeader: {
2214
2429
  logo: ImageStylingProps;
2215
2430
  backgroundColor?: BackgroundStyle;
2216
- primaryCtaVariant: CTAProps["variant"];
2217
- secondaryCtaVariant: CTAProps["variant"];
2431
+ primaryCtaVariant: CTAVariant;
2432
+ secondaryCtaVariant: CTAVariant;
2218
2433
  };
2219
2434
  /** Styling for the secondary header (top bar). */
2220
2435
  secondaryHeader: {
@@ -2483,19 +2698,27 @@ declare const BreadcrumbsSection: ComponentConfig<{
2483
2698
  interface CoreInfoData {
2484
2699
  /** Content for the "Information" column. */
2485
2700
  info: {
2701
+ /** The heading at the top of the left column */
2486
2702
  headingText: YextEntityField<TranslatableString>;
2703
+ /** The address of the entity */
2487
2704
  address: YextEntityField<AddressType>;
2705
+ /** The phone number for the entity */
2488
2706
  phoneNumbers: Array<PhoneProps["data"]>;
2707
+ /** Emails associated with the entity */
2489
2708
  emails: YextEntityField<string[]>;
2490
2709
  };
2491
2710
  /** Content for the "Hours" column. */
2492
2711
  hours: {
2712
+ /** The heading at the top of the middle column */
2493
2713
  headingText: YextEntityField<TranslatableString>;
2714
+ /** The hours for the entity */
2494
2715
  hours: YextEntityField<HoursType>;
2495
2716
  };
2496
2717
  /** Content for the "Services" column. */
2497
2718
  services: {
2719
+ /** The heading at the top of the right column */
2498
2720
  headingText: YextEntityField<TranslatableString>;
2721
+ /** A text list, often of services the entity provides */
2499
2722
  servicesList: YextEntityField<TranslatableString[]>;
2500
2723
  };
2501
2724
  }
@@ -2566,14 +2789,21 @@ interface EventStyles {
2566
2789
  backgroundColor?: BackgroundStyle;
2567
2790
  /** Styling for the heading. */
2568
2791
  heading: {
2792
+ /** The h tag level of the section heading */
2569
2793
  level: HeadingLevel;
2794
+ /** Alignment of the event section heading */
2570
2795
  align: "left" | "center" | "right";
2571
2796
  };
2572
2797
  /** Styling for all the cards. */
2573
2798
  cards: {
2799
+ /** The h tag level of each event card's title */
2574
2800
  headingLevel: HeadingLevel;
2801
+ /** The background color of each event card */
2575
2802
  backgroundColor?: BackgroundStyle;
2576
- ctaVariant: CTAProps["variant"];
2803
+ /** The CTA variant to use in each event card */
2804
+ ctaVariant: CTAVariant;
2805
+ /** Whether to truncate the event description text */
2806
+ truncateDescription: boolean;
2577
2807
  };
2578
2808
  }
2579
2809
  interface EventSectionProps {
@@ -2658,12 +2888,12 @@ interface HeroStyles {
2658
2888
  * The visual style variant for the primary call-to-action button.
2659
2889
  * @defaultValue primary
2660
2890
  */
2661
- primaryCTA: CTAProps["variant"];
2891
+ primaryCTA: CTAVariant;
2662
2892
  /**
2663
2893
  * The visual style variant for the secondary call-to-action button.
2664
2894
  * @defaultValue secondary
2665
2895
  */
2666
- secondaryCTA: CTAProps["variant"];
2896
+ secondaryCTA: CTAVariant;
2667
2897
  /**
2668
2898
  * Styling options for the hero image.
2669
2899
  * Classic variant: aspect ratio (ratios 4:1, 3:1, 2:1, and 9:16 are not supported) and height.
@@ -2745,14 +2975,19 @@ interface InsightStyles {
2745
2975
  backgroundColor?: BackgroundStyle;
2746
2976
  /** Styling for the main section heading. */
2747
2977
  heading: {
2978
+ /** The h tag level of the section heading */
2748
2979
  level: HeadingLevel;
2980
+ /** Alignment of the insight section heading */
2749
2981
  align: "left" | "center" | "right";
2750
2982
  };
2751
2983
  /** Styling for the individual insight cards. */
2752
2984
  cards: {
2985
+ /** The h tag level of each insight card's title */
2753
2986
  headingLevel: HeadingLevel;
2987
+ /** The background color of each insight card */
2754
2988
  backgroundColor?: BackgroundStyle;
2755
- ctaVariant: CTAProps["variant"];
2989
+ /** The CTA variant to use in each insight card */
2990
+ ctaVariant: CTAVariant;
2756
2991
  };
2757
2992
  }
2758
2993
  interface InsightSectionProps {
@@ -2834,9 +3069,12 @@ interface NearbyLocationsStyles {
2834
3069
  phoneNumberLink: boolean;
2835
3070
  /** Styling for the hours display on each card. */
2836
3071
  hours: {
3072
+ /** Whether to display the current status ("Open Now" or "Closed") */
2837
3073
  showCurrentStatus: boolean;
2838
3074
  timeFormat?: "12h" | "24h";
3075
+ /** How to format the days of the week (short:Mon, long:Monday) */
2839
3076
  dayOfWeekFormat?: "short" | "long";
3077
+ /** Whether to include the day of the week */
2840
3078
  showDayNames?: boolean;
2841
3079
  };
2842
3080
  }
@@ -2894,9 +3132,12 @@ interface ProductStyles {
2894
3132
  };
2895
3133
  /** Styling for the individual product cards. */
2896
3134
  cards: {
3135
+ /** The h tag level of each product card's title */
2897
3136
  headingLevel: HeadingLevel;
3137
+ /** The background color of each product card */
2898
3138
  backgroundColor?: BackgroundStyle;
2899
- ctaVariant: CTAProps["variant"];
3139
+ /** The CTA variant to use in each product card */
3140
+ ctaVariant: CTAVariant;
2900
3141
  };
2901
3142
  }
2902
3143
  interface ProductSectionProps {
@@ -2950,7 +3191,7 @@ interface PromoStyles {
2950
3191
  * The visual style variant for the call-to-action button.
2951
3192
  * @defaultValue 'primary'
2952
3193
  */
2953
- ctaVariant: CTAProps["variant"];
3194
+ ctaVariant: CTAVariant;
2954
3195
  /** Styling for the promo's title. */
2955
3196
  heading: {
2956
3197
  level: HeadingLevel;
@@ -3187,7 +3428,7 @@ interface TeamStyles {
3187
3428
  cards: {
3188
3429
  headingLevel: HeadingLevel;
3189
3430
  backgroundColor?: BackgroundStyle;
3190
- ctaVariant: CTAProps["variant"];
3431
+ ctaVariant: CTAVariant;
3191
3432
  };
3192
3433
  }
3193
3434
  interface TeamSectionProps {
@@ -3232,6 +3473,11 @@ interface StaticMapStyles {
3232
3473
  * @defaultValue Background Color 1
3233
3474
  */
3234
3475
  backgroundColor?: BackgroundStyle;
3476
+ /**
3477
+ * The style of the map to be displayed.
3478
+ * @defaultValue Default (streets-v12)
3479
+ */
3480
+ mapStyle: string;
3235
3481
  }
3236
3482
  interface StaticMapSectionProps {
3237
3483
  /**
@@ -4086,4 +4332,4 @@ declare const addHeadingAlignmentMigration: Migration;
4086
4332
 
4087
4333
  declare const defaultThemeConfig: ThemeConfig;
4088
4334
 
4089
- export { AdvancedCoreInfoCategory, AdvancedCoreInfoCategoryComponents, type AdvancedCoreInfoCategoryProps, type AggregateRating, type AssetImageType, type AssetVideo, Background, type BackgroundProps, BackgroundProvider, type BackgroundStyle, type BannerData, BannerSection, type BannerSectionProps, type BannerStyles, BasicSelector, Body, type BodyProps, type BreadcrumbsData, BreadcrumbsSection, type BreadcrumbsSectionProps, type BreadcrumbsStyles, Button, type ButtonProps, CTA, type CTAProps, CodeField, type CodeFieldProps, type ComponentField, ComponentFields, type CoreInfoData, CoreInfoSection, type CoreInfoSectionProps, type CoreInfoStyles, CustomCodeSection, type CustomCodeSectionProps, DeprecatedCategory, DeprecatedCategoryComponents, type DeprecatedCategoryProps, Directory, DirectoryCategory, DirectoryCategoryComponents, type DirectoryCategoryProps, type DirectoryConfigProps, type DirectoryData, type DirectoryProps, type DirectoryStyles, Editor, EmbeddedFieldStringInput, type EnhancedTranslatableCTA, EntityField, type EventData, EventSection, type EventSectionProps, type EventSectionType, type EventStruct, type EventStyles, ExpandedFooter, type ExpandedFooterData, type ExpandedFooterProps, type ExpandedFooterStyles, ExpandedHeader, type ExpandedHeaderData, type ExpandedHeaderProps, type ExpandedHeaderStyles, type FAQData, FAQSection, type FAQSectionProps, type FAQSectionType, type FAQStruct, type FAQStyles, type FontRegistry, FontSizeSelector, Footer, type FooterProps, Header, type HeaderProps, Heading, type HeadingLevel, type HeadingProps, type HeroData, HeroSection, type HeroSectionProps, type HeroSectionType, type HeroStyles, HoursStatusAtom, type HoursStatusAtomProps, HoursTableAtom, type HoursTableAtomProps, Image, type ImageContentData, type ImageProps, type InsightData, InsightSection, type InsightSectionProps, type InsightSectionType, type InsightStruct, type InsightStyles, KnowledgeGraphIcon, LocatorCategory, LocatorCategoryComponents, type LocatorCategoryProps, LocatorComponent, type LocatorConfigProps, type LocatorProps, type MainConfigProps, MaybeLink, type MaybeLinkProps, MaybeRTF, type MaybeRTFProps, type Metadata, type Migration, type MigrationAction, type MigrationRegistry, type NearbyLocationsData, NearbyLocationsSection, type NearbyLocationsSectionProps, type NearbyLocationsStyles, OptionalNumberField, type OptionalNumberFieldProps, OtherCategory, OtherCategoryComponents, type OtherCategoryProps, PageSection, PageSectionCategory, PageSectionCategoryComponents, type PageSectionCategoryProps, type PageSectionProps, type PersonStruct, PhoneAtom, type PhoneAtomProps, type PhotoGalleryData, PhotoGallerySection, type PhotoGallerySectionProps, type PhotoGalleryStyles, type PresetImageType, type ProductData, ProductSection, type ProductSectionProps, type ProductSectionType, type ProductStruct, type ProductStyles, type PromoData, PromoSection, type PromoSectionProps, type PromoSectionType, type PromoStyles, type RenderYextEntityFieldSelectorProps, ReviewStars, type ReviewStarsProps, ReviewsSection, type ReviewsSectionProps, type RichText, SectionContainer, type SectionContainerProps, SpacingSelector, StaticMapSection, type StaticMapSectionProps, type StaticMapStyles, type StreamDocument, TailwindConfigContext, TeamSection, type TeamSectionProps, type TeamSectionType, TemplatePropsContext, type TestimonialData, TestimonialSection, type TestimonialSectionProps, type TestimonialSectionType, type TestimonialStruct, type TestimonialStyles, type ThemeConfig, ThemeOptions, Timestamp, TimestampOption, type TimestampProps, Toggle, type TranslatableCTA, type TranslatableRichText, TranslatableRichTextField, type TranslatableString, TranslatableStringField, Video, type VideoData, type VideoProps, VideoSection, type VideoSectionProps, type VideoStyles, VisibilityWrapper, VisualEditorComponentsContentPath, 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, directoryConfig, fetchLocalesToPathsForEntity, fetchNearbyLocations, fetchReviewsForEntity, filterComponentsFromConfig, filterMaxWidths, getAggregateRating, getAnalyticsScopeHash, getFontWeightOptions, getFontWeightOverrideOptions, getMaxWidthOptions, getPageMetadata, headingVariants, i18nComponentsInstance, i18nPlatformInstance, locatorConfig, mainConfig, mergeMeta, migrate, migrationRegistry, msg, normalizeSlug, pt, resolveComponentData, resolveUrlTemplate, resolveYextEntityField, resolveYextStructField, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, useOverflow, usePlatformBridgeDocument, usePlatformBridgeEntityFields, usePlatformTranslation, useTailwindConfig, useTemplateProps, withPropOverrides };
4335
+ export { AdvancedCoreInfoCategory, AdvancedCoreInfoCategoryComponents, type AdvancedCoreInfoCategoryProps, type AggregateRating, type AssetImageType, type AssetVideo, Background, type BackgroundProps, BackgroundProvider, type BackgroundStyle, type BannerData, BannerSection, type BannerSectionProps, type BannerStyles, BasicSelector, Body, type BodyProps, type BreadcrumbsData, BreadcrumbsSection, type BreadcrumbsSectionProps, type BreadcrumbsStyles, Button, type ButtonProps, CTA, type CTAVariant, CodeField, type CodeFieldProps, type ComponentField, ComponentFields, type CoreInfoData, CoreInfoSection, type CoreInfoSectionProps, type CoreInfoStyles, CustomCodeSection, type CustomCodeSectionProps, DeprecatedCategory, DeprecatedCategoryComponents, type DeprecatedCategoryProps, Directory, DirectoryCategory, DirectoryCategoryComponents, type DirectoryCategoryProps, type DirectoryConfigProps, type DirectoryData, type DirectoryProps, type DirectoryStyles, Editor, EmbeddedFieldStringInput, type EnhancedTranslatableCTA, EntityField, type EventData, EventSection, type EventSectionProps, type EventSectionType, type EventStruct, type EventStyles, ExpandedFooter, type ExpandedFooterData, type ExpandedFooterProps, type ExpandedFooterStyles, ExpandedHeader, type ExpandedHeaderData, type ExpandedHeaderProps, type ExpandedHeaderStyles, type FAQData, FAQSection, type FAQSectionProps, type FAQSectionType, type FAQStruct, type FAQStyles, type FontRegistry, FontSizeSelector, Footer, type FooterProps, Header, type HeaderProps, Heading, type HeadingLevel, type HeadingProps, type HeroData, HeroSection, type HeroSectionProps, type HeroSectionType, type HeroStyles, HoursStatusAtom, type HoursStatusAtomProps, HoursTableAtom, type HoursTableAtomProps, Image, type ImageContentData, type ImageProps, type InsightData, InsightSection, type InsightSectionProps, type InsightSectionType, type InsightStruct, type InsightStyles, KnowledgeGraphIcon, LocatorCategory, LocatorCategoryComponents, type LocatorCategoryProps, LocatorComponent, type LocatorConfigProps, type LocatorProps, type MainConfigProps, MaybeLink, type MaybeLinkProps, MaybeRTF, type MaybeRTFProps, type Metadata, type Migration, type MigrationAction, type MigrationRegistry, type NearbyLocationsData, NearbyLocationsSection, type NearbyLocationsSectionProps, type NearbyLocationsStyles, OptionalNumberField, type OptionalNumberFieldProps, OtherCategory, OtherCategoryComponents, type OtherCategoryProps, PageSection, PageSectionCategory, PageSectionCategoryComponents, type PageSectionCategoryProps, type PageSectionProps, type PersonStruct, PhoneAtom, type PhoneAtomProps, type PhotoGalleryData, PhotoGallerySection, type PhotoGallerySectionProps, type PhotoGalleryStyles, type PresetImageType, type ProductData, ProductSection, type ProductSectionProps, type ProductSectionType, type ProductStruct, type ProductStyles, type PromoData, PromoSection, type PromoSectionProps, type PromoSectionType, type PromoStyles, type RenderYextEntityFieldSelectorProps, ReviewStars, type ReviewStarsProps, ReviewsSection, type ReviewsSectionProps, type RichText, SectionContainer, type SectionContainerProps, SpacingSelector, StaticMapSection, type StaticMapSectionProps, type StaticMapStyles, type StreamDocument, TailwindConfigContext, TeamSection, type TeamSectionProps, type TeamSectionType, TemplatePropsContext, type TestimonialData, TestimonialSection, type TestimonialSectionProps, type TestimonialSectionType, type TestimonialStruct, type TestimonialStyles, type ThemeConfig, ThemeOptions, Timestamp, TimestampOption, type TimestampProps, Toggle, type TranslatableCTA, type TranslatableRichText, TranslatableRichTextField, type TranslatableString, TranslatableStringField, Video, type VideoData, type VideoProps, VideoSection, type VideoSectionProps, type VideoStyles, VisibilityWrapper, VisualEditorComponentsContentPath, 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, directoryConfig, fetchLocalesToPathsForEntity, fetchNearbyLocations, fetchReviewsForEntity, filterComponentsFromConfig, filterMaxWidths, getAggregateRating, getAnalyticsScopeHash, getFontWeightOptions, getFontWeightOverrideOptions, getMaxWidthOptions, getPageMetadata, getSchema, headingVariants, i18nComponentsInstance, i18nPlatformInstance, imgSizesHelper, locatorConfig, mainConfig, mergeMeta, migrate, migrationRegistry, msg, normalizeSlug, pt, resolveComponentData, resolveSchemaJson, resolveUrlTemplate, resolveYextEntityField, resolveYextStructField, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, useOverflow, usePlatformBridgeDocument, usePlatformBridgeEntityFields, usePlatformTranslation, useTailwindConfig, useTemplateProps, withPropOverrides };