@yext/visual-editor 0.0.38 → 0.0.39

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
@@ -2,12 +2,12 @@ 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
4
  import * as _measured_puck from '@measured/puck';
5
- import { Field, Fields, Config, CustomField, ArrayField, BaseField, NumberField, ObjectField, ComponentConfig } from '@measured/puck';
5
+ import { Field, CustomField, Fields, Config, ArrayField, BaseField, ObjectField, NumberField, ComponentConfig } from '@measured/puck';
6
6
  import { ClassValue } from 'clsx';
7
+ import { ImageType, CTA as CTA$1, LinkType, ComplexImageType, AddressType, HoursType, DayOfWeekNames, Coordinate } from '@yext/pages-components';
7
8
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
8
9
  import { VariantProps } from 'class-variance-authority';
9
10
  import * as react_jsx_runtime_js from 'react/jsx-runtime.js';
10
- import { LinkType, ImageType, ComplexImageType, AddressType, HoursType, DayOfWeekNames, Coordinate } from '@yext/pages-components';
11
11
 
12
12
  declare const usePlatformBridgeDocument: () => any;
13
13
 
@@ -231,13 +231,13 @@ type AllowList<T extends Record<string, any>> = {
231
231
  type DisallowList<T extends Record<string, any>> = {
232
232
  disallowList: ConfigFields<T>[number][];
233
233
  };
234
- type EntityFieldTypesFilter = {
234
+ type EntityFieldTypesFilter$1 = {
235
235
  types?: EntityFieldTypes[];
236
236
  includeListsOnly?: boolean;
237
237
  directChildrenOf?: string;
238
238
  };
239
- type RenderEntityFieldFilter<T extends Record<string, any>> = EntityFieldTypesFilter & EitherOrNeither<AllowList<T>, DisallowList<T>>;
240
- type EntityFieldTypes = "type.string" | "type.image" | "type.hours" | "type.address" | "type.phone" | "type.coordinate" | "type.cta" | "type.rich_text_v2" | `c_${string}`;
239
+ type RenderEntityFieldFilter<T extends Record<string, any>> = EntityFieldTypesFilter$1 & EitherOrNeither<AllowList<T>, DisallowList<T>>;
240
+ type EntityFieldTypes = "type.string" | "type.image" | "type.hours" | "type.address" | "type.phone" | "type.coordinate" | "type.cta" | "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}`;
241
241
 
242
242
  type YextEntityField<T> = {
243
243
  field: string;
@@ -263,7 +263,25 @@ declare const YextEntityFieldSelector: <T extends Record<string, any>, U>(props:
263
263
  */
264
264
  declare const YextCollectionSubfieldSelector: <T extends Record<string, any>, U>(props: RenderYextEntityFieldSelectorProps<T>) => Field<YextEntityField<U>>;
265
265
 
266
+ type EntityFieldTypesFilter = {
267
+ type: StructEntityFieldTypes;
268
+ };
269
+ type StructEntityFieldTypes = "type.hero_section" | "type.promo_section";
270
+ type YextStructEntityField<T extends Record<string, any> = any> = {
271
+ field: string;
272
+ constantValue: T;
273
+ constantValueOverride: {
274
+ [K in keyof T]: boolean;
275
+ };
276
+ };
277
+ type StructSelectorProps = {
278
+ label: string;
279
+ filter: EntityFieldTypesFilter;
280
+ };
281
+ declare const YextStructFieldSelector: <U extends Record<string, any>>(props: StructSelectorProps) => CustomField<YextStructEntityField<U>>;
282
+
266
283
  declare const resolveYextEntityField: <T>(document: any, entityField: YextEntityField<T>) => T | undefined;
284
+ declare const resolveYextStructField: <T extends Record<string, any>>(document: any, entityField: YextStructEntityField<T>) => T | undefined;
267
285
  declare const resolveYextSubfield: <T>(parent: any, field: YextEntityField<T> | undefined) => T | undefined;
268
286
  /**
269
287
  * handleResolveFieldsForCollections determines if lastFields
@@ -378,6 +396,8 @@ declare const normalizeSlug: (content: string) => string;
378
396
 
379
397
  declare const applyAnalytics: (document: Record<string, any>) => string | undefined;
380
398
 
399
+ declare const applyHeaderScript: (document: Record<string, any>) => any;
400
+
381
401
  type RootConfig = {
382
402
  title?: string;
383
403
  description?: string;
@@ -394,6 +414,79 @@ declare const fetchNearbyLocations: ({ contentEndpoint, latitude, longitude, rad
394
414
  entityType: string;
395
415
  }) => Promise<Record<string, any>>;
396
416
 
417
+ type HeroSectionType = {
418
+ image?: ImageType;
419
+ primaryCta?: CTA$1;
420
+ secondaryCta?: CTA$1;
421
+ };
422
+ type PromoSectionType = {
423
+ image?: ImageType;
424
+ title?: string;
425
+ description?: RTF2 | string;
426
+ cta?: CTA$1;
427
+ };
428
+ type ProductSectionType = {
429
+ products: Array<ProductStruct>;
430
+ };
431
+ type ProductStruct = {
432
+ image?: ImageType;
433
+ name?: string;
434
+ description?: RTF2;
435
+ category?: string;
436
+ cta?: CTA$1;
437
+ };
438
+ type EventSectionType = {
439
+ events: Array<EventStruct>;
440
+ };
441
+ type EventStruct = {
442
+ image?: ImageType;
443
+ title?: string;
444
+ dateTime?: string;
445
+ description?: RTF2;
446
+ cta?: CTA$1;
447
+ };
448
+ type FAQSectionType = {
449
+ faqs: Array<FAQStruct>;
450
+ };
451
+ type FAQStruct = {
452
+ question: string;
453
+ answer: RTF2;
454
+ };
455
+ type TestimonialSectionType = {
456
+ testimonials: Array<TestimonialStruct>;
457
+ };
458
+ type TestimonialStruct = {
459
+ description?: RTF2;
460
+ contributorName?: string;
461
+ contributionDate?: string;
462
+ };
463
+ type InsightSectionType = {
464
+ insights: Array<InsightStruct>;
465
+ };
466
+ type InsightStruct = {
467
+ image?: ImageType;
468
+ name?: string;
469
+ category?: string;
470
+ publishTime?: string;
471
+ description?: RTF2;
472
+ cta?: CTA$1;
473
+ };
474
+ type TeamSectionType = {
475
+ people: Array<PersonStruct>;
476
+ };
477
+ type PersonStruct = {
478
+ headshot?: ImageType;
479
+ name?: string;
480
+ title?: string;
481
+ phoneNumber?: string;
482
+ email?: string;
483
+ cta?: CTA$1;
484
+ };
485
+ type RTF2 = {
486
+ html?: string;
487
+ json?: string;
488
+ };
489
+
397
490
  type EditorProps = {
398
491
  document: any;
399
492
  componentRegistry: Map<string, Config<any>>;
@@ -580,6 +673,21 @@ declare const wrapperVariants: (props?: ({
580
673
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
581
674
  declare const VisibilityWrapper: React$1.FC<VisibilityWrapperProps>;
582
675
 
676
+ declare enum TimestampOption {
677
+ DATE = "DATE",
678
+ DATE_TIME = "DATE_TIME",
679
+ DATE_RANGE = "DATE_RANGE",
680
+ DATE_TIME_RANGE = "DATE_TIME_RANGE"
681
+ }
682
+ type TimestampProps = {
683
+ date: string;
684
+ option?: TimestampOption;
685
+ endDate?: string;
686
+ timeZone?: string;
687
+ hideTimeZone?: boolean;
688
+ };
689
+ declare function Timestamp({ date, option, endDate, timeZone, hideTimeZone, }: TimestampProps): JSX.Element;
690
+
583
691
  type BannerSectionProps = {
584
692
  text: YextEntityField<string>;
585
693
  textAlignment: "left" | "right" | "center";
@@ -631,38 +739,53 @@ interface CoreInfoSectionProps {
631
739
  }
632
740
  declare const CoreInfoSection: ComponentConfig<CoreInfoSectionProps>;
633
741
 
634
- interface HeroSectionProps {
635
- image: ImageWrapperProps;
636
- businessName: {
637
- entityField: YextEntityField<string>;
638
- level: HeadingLevel;
639
- };
640
- localGeoModifier: {
641
- entityField: YextEntityField<string>;
642
- level: HeadingLevel;
742
+ interface EventSectionProps {
743
+ data: {
744
+ heading: YextEntityField<string>;
745
+ events: YextEntityField<EventSectionType>;
643
746
  };
644
- hours: {
645
- entityField: YextEntityField<HoursType>;
646
- showHours: boolean;
647
- };
648
- primaryCta: {
649
- entityField: YextEntityField<CTAProps>;
650
- variant: CTAProps["variant"];
651
- showCTA: boolean;
747
+ styles: {
748
+ backgroundColor?: BackgroundStyle;
749
+ cardBackgroundColor?: BackgroundStyle;
750
+ headingLevel: HeadingLevel;
652
751
  };
653
- secondaryCta: {
654
- entityField: YextEntityField<CTAProps>;
655
- variant: CTAProps["variant"];
656
- showCTA: boolean;
752
+ liveVisibility: boolean;
753
+ }
754
+ declare const EventSection: ComponentConfig<EventSectionProps>;
755
+
756
+ interface HeroSectionProps {
757
+ data: {
758
+ businessName: YextEntityField<string>;
759
+ localGeoModifier: YextEntityField<string>;
760
+ hours: YextEntityField<HoursType>;
761
+ hero: YextStructEntityField<HeroSectionType>;
657
762
  };
658
763
  styles: {
659
764
  backgroundColor?: BackgroundStyle;
660
765
  imageOrientation: "left" | "right";
766
+ businessNameLevel: HeadingLevel;
767
+ localGeoModifierLevel: HeadingLevel;
768
+ primaryCTA: CTAProps["variant"];
769
+ secondaryCTA: CTAProps["variant"];
661
770
  };
662
771
  liveVisibility: boolean;
663
772
  }
664
773
  declare const HeroSection: ComponentConfig<HeroSectionProps>;
665
774
 
775
+ interface InsightSectionProps {
776
+ data: {
777
+ heading: YextEntityField<string>;
778
+ insights: YextEntityField<InsightSectionType>;
779
+ };
780
+ styles: {
781
+ backgroundColor?: BackgroundStyle;
782
+ cardBackgroundColor?: BackgroundStyle;
783
+ headingLevel: HeadingLevel;
784
+ };
785
+ liveVisibility: boolean;
786
+ }
787
+ declare const InsightSection: ComponentConfig<InsightSectionProps>;
788
+
666
789
  interface NearbyLocationsSectionProps {
667
790
  styles: {
668
791
  backgroundColor?: BackgroundStyle;
@@ -690,24 +813,28 @@ interface NearbyLocationsSectionProps {
690
813
  }
691
814
  declare const NearbyLocationsSection: ComponentConfig<NearbyLocationsSectionProps>;
692
815
 
693
- interface PromoSectionProps {
694
- image: ImageWrapperProps;
695
- title: {
696
- text: YextEntityField<string>;
697
- level: HeadingProps["level"];
816
+ interface ProductSectionProps {
817
+ data: {
818
+ heading: YextEntityField<string>;
819
+ products: YextEntityField<ProductSectionType>;
698
820
  };
699
- description: {
700
- text: YextEntityField<string>;
701
- variant: BodyProps["variant"];
821
+ styles: {
822
+ backgroundColor?: BackgroundStyle;
823
+ cardBackgroundColor?: BackgroundStyle;
824
+ headingLevel: HeadingLevel;
702
825
  };
703
- cta: {
704
- entityField: YextEntityField<CTAProps>;
705
- variant: CTAProps["variant"];
706
- visible: boolean;
826
+ liveVisibility: boolean;
827
+ }
828
+ declare const ProductSection: ComponentConfig<ProductSectionProps>;
829
+
830
+ interface PromoSectionProps {
831
+ data: {
832
+ promo: YextStructEntityField<PromoSectionType>;
707
833
  };
708
834
  styles: {
709
835
  backgroundColor?: BackgroundStyle;
710
836
  orientation: "left" | "right";
837
+ ctaVariant: CTAProps["variant"];
711
838
  };
712
839
  liveVisibility: boolean;
713
840
  }
@@ -729,40 +856,46 @@ interface PhotoGallerySectionProps {
729
856
  }
730
857
  declare const PhotoGallerySection: ComponentConfig<PhotoGallerySectionProps>;
731
858
 
732
- interface FAQsSectionProps {
859
+ interface FAQSectionProps {
860
+ data: {
861
+ heading: YextEntityField<string>;
862
+ faqs: YextEntityField<FAQSectionType>;
863
+ };
733
864
  styles: {
734
865
  backgroundColor?: BackgroundStyle;
866
+ headingLevel: HeadingProps["level"];
735
867
  };
736
- sectionHeading: {
737
- text: YextEntityField<string>;
738
- level: HeadingProps["level"];
739
- };
740
- collection: FAQsCollection;
741
868
  liveVisibility: boolean;
742
869
  }
743
- type FAQs = Array<{
744
- question: string;
745
- answer: string;
746
- }>;
747
- type FAQsCollection = YextCollection & {
748
- subfields?: {
749
- questionField: YextEntityField<string>;
750
- answerField: YextEntityField<string>;
870
+ declare const FAQSection: ComponentConfig<FAQSectionProps>;
871
+
872
+ interface TestimonialSectionProps {
873
+ data: {
874
+ heading: YextEntityField<string>;
875
+ testimonials: YextEntityField<TestimonialSectionType>;
751
876
  };
752
- FAQs?: FAQs;
753
- };
754
- declare const FAQsSection: ComponentConfig<FAQsSectionProps>;
877
+ styles: {
878
+ backgroundColor?: BackgroundStyle;
879
+ cardBackgroundColor?: BackgroundStyle;
880
+ headingLevel: HeadingLevel;
881
+ };
882
+ liveVisibility: boolean;
883
+ }
884
+ declare const TestimonialSection: ComponentConfig<TestimonialSectionProps>;
755
885
 
756
- type SectionContainerProps = {
757
- background?: BackgroundStyle;
758
- sectionHeading: {
759
- text: YextEntityField<string>;
760
- level: HeadingProps["level"];
761
- alignment: "left" | "right" | "center";
886
+ interface TeamSectionProps {
887
+ styles: {
888
+ backgroundColor?: BackgroundStyle;
889
+ cardBackgroundColor?: BackgroundStyle;
890
+ headingLevel: HeadingLevel;
891
+ };
892
+ data: {
893
+ heading: YextEntityField<string>;
894
+ people: YextEntityField<TeamSectionType>;
762
895
  };
763
896
  liveVisibility: boolean;
764
- };
765
- declare const SectionContainer: ComponentConfig<SectionContainerProps>;
897
+ }
898
+ declare const TeamSection: ComponentConfig<TeamSectionProps>;
766
899
 
767
900
  interface CollectionProps {
768
901
  collection: YextCollection;
@@ -799,21 +932,6 @@ interface GridProps extends layoutProps {
799
932
  }
800
933
  declare const Grid: ComponentConfig<GridProps>;
801
934
 
802
- type ProductCardProps = {
803
- card?: {
804
- image?: ImageWrapperProps;
805
- heading?: YextEntityField<string>;
806
- category?: YextEntityField<string>;
807
- description?: YextEntityField<string>;
808
- cta?: YextEntityField<CTAProps>;
809
- };
810
- styles: {
811
- cardBackgroundColor?: BackgroundStyle;
812
- };
813
- collection?: YextCollection;
814
- };
815
- declare const ProductCard: ComponentConfig<ProductCardProps>;
816
-
817
935
  type AddressProps = {
818
936
  address: YextEntityField<AddressType>;
819
937
  showGetDirections: boolean;
@@ -880,7 +998,7 @@ type MapboxStaticProps = {
880
998
  zoom?: number;
881
999
  mapStyle?: string;
882
1000
  };
883
- declare const MapboxStaticMapComponent: ComponentConfig<MapboxStaticProps>;
1001
+ declare const MapboxStaticMap: ComponentConfig<MapboxStaticProps>;
884
1002
 
885
1003
  interface PhoneProps {
886
1004
  phone: YextEntityField<string>;
@@ -921,18 +1039,20 @@ type EventCardProps = {
921
1039
  };
922
1040
  declare const EventCard: ComponentConfig<EventCardProps>;
923
1041
 
924
- type InsightCardProps = {
1042
+ type ProductCardProps = {
925
1043
  card?: {
926
- image: YextEntityField<ImageType>;
927
- title: YextEntityField<string>;
928
- category: YextEntityField<string>;
929
- date: YextEntityField<string>;
930
- description: YextEntityField<string>;
931
- cta: YextEntityField<CTAProps>;
1044
+ image?: ImageWrapperProps;
1045
+ heading?: YextEntityField<string>;
1046
+ category?: YextEntityField<string>;
1047
+ description?: YextEntityField<string>;
1048
+ cta?: YextEntityField<CTAProps>;
1049
+ };
1050
+ styles: {
1051
+ cardBackgroundColor?: BackgroundStyle;
932
1052
  };
933
1053
  collection?: YextCollection;
934
1054
  };
935
- declare const InsightCard: ComponentConfig<InsightCardProps>;
1055
+ declare const ProductCard: ComponentConfig<ProductCardProps>;
936
1056
 
937
1057
  interface PersonCardProps {
938
1058
  card?: {
@@ -950,6 +1070,19 @@ interface PersonCardProps {
950
1070
  }
951
1071
  declare const PersonCard: ComponentConfig<PersonCardProps>;
952
1072
 
1073
+ type InsightCardProps = {
1074
+ card?: {
1075
+ image: YextEntityField<ImageType>;
1076
+ title: YextEntityField<string>;
1077
+ category: YextEntityField<string>;
1078
+ date: YextEntityField<string>;
1079
+ description: YextEntityField<string>;
1080
+ cta: YextEntityField<CTAProps>;
1081
+ };
1082
+ collection?: YextCollection;
1083
+ };
1084
+ declare const InsightCard: ComponentConfig<InsightCardProps>;
1085
+
953
1086
  type TestimonialCardProps = {
954
1087
  card?: {
955
1088
  testimonial: YextEntityField<string>;
@@ -963,16 +1096,26 @@ type TestimonialCardProps = {
963
1096
  };
964
1097
  declare const TestimonialCard: ComponentConfig<TestimonialCardProps>;
965
1098
 
1099
+ type StaticMapSectionProps = {
1100
+ apiKey: string;
1101
+ liveVisibility: boolean;
1102
+ };
1103
+
966
1104
  interface PageSectionCategoryProps {
967
1105
  BreadcrumbsSection: BreadcrumbsSectionProps;
968
1106
  HeroSection: HeroSectionProps;
1107
+ EventSection: EventSectionProps;
969
1108
  CoreInfoSection: CoreInfoSectionProps;
1109
+ InsightSection: InsightSectionProps;
970
1110
  NearbyLocationsSection: NearbyLocationsSectionProps;
971
1111
  BannerSection: BannerSectionProps;
1112
+ ProductSection: ProductSectionProps;
972
1113
  PromoSection: PromoSectionProps;
973
1114
  PhotoGallerySection: PhotoGallerySectionProps;
974
- FAQsSection: FAQsSectionProps;
975
- SectionContainer: SectionContainerProps;
1115
+ TeamSection: TeamSectionProps;
1116
+ FAQSection: FAQSectionProps;
1117
+ StaticMapSection: StaticMapSectionProps;
1118
+ TestimonialSection: TestimonialSectionProps;
976
1119
  }
977
1120
  declare const PageSectionCategoryComponents: {
978
1121
  BreadcrumbsSection: _measured_puck.ComponentConfig<BreadcrumbsSectionProps>;
@@ -980,12 +1123,34 @@ declare const PageSectionCategoryComponents: {
980
1123
  CoreInfoSection: _measured_puck.ComponentConfig<CoreInfoSectionProps>;
981
1124
  NearbyLocationsSection: _measured_puck.ComponentConfig<NearbyLocationsSectionProps>;
982
1125
  BannerSection: _measured_puck.ComponentConfig<BannerSectionProps>;
983
- PromoSection: _measured_puck.ComponentConfig<PromoSectionProps>;
984
1126
  PhotoGallerySection: _measured_puck.ComponentConfig<PhotoGallerySectionProps>;
985
- FAQsSection: _measured_puck.ComponentConfig<FAQsSectionProps>;
986
- SectionContainer: _measured_puck.ComponentConfig<SectionContainerProps>;
1127
+ StaticMapSection: _measured_puck.ComponentConfig<StaticMapSectionProps>;
1128
+ EventSection: _measured_puck.ComponentConfig<EventSectionProps>;
1129
+ FAQSection: _measured_puck.ComponentConfig<FAQSectionProps>;
1130
+ InsightSection: _measured_puck.ComponentConfig<InsightSectionProps>;
1131
+ ProductSection: _measured_puck.ComponentConfig<ProductSectionProps>;
1132
+ PromoSection: _measured_puck.ComponentConfig<PromoSectionProps>;
1133
+ TeamSection: _measured_puck.ComponentConfig<TeamSectionProps>;
1134
+ TestimonialSection: _measured_puck.ComponentConfig<TestimonialSectionProps>;
987
1135
  };
988
1136
  declare const PageSectionCategory: (keyof PageSectionCategoryProps)[];
1137
+ interface OtherCategoryProps {
1138
+ Header: HeaderProps;
1139
+ Footer: FooterProps;
1140
+ }
1141
+ declare const OtherCategoryComponents: {
1142
+ Header: _measured_puck.ComponentConfig<HeaderProps>;
1143
+ Footer: _measured_puck.ComponentConfig<FooterProps>;
1144
+ };
1145
+ declare const OtherCategory: (keyof OtherCategoryProps)[];
1146
+ interface DirectoryCategoryProps {
1147
+ Directory: DirectoryProps;
1148
+ }
1149
+ declare const DirectoryCategoryComponents: {
1150
+ Directory: _measured_puck.ComponentConfig<DirectoryProps>;
1151
+ };
1152
+ declare const DirectoryCategory: (keyof DirectoryCategoryProps)[];
1153
+ /** THE CATEGORIES BELOW ARE NO LONGER SUPPORTED */
989
1154
  interface LayoutBlockCategoryProps {
990
1155
  Collection: CollectionProps;
991
1156
  Flex: FlexProps;
@@ -999,15 +1164,15 @@ declare const LayoutBlockCategoryComponents: {
999
1164
  declare const LayoutBlockCategory: (keyof LayoutBlockCategoryProps)[];
1000
1165
  interface CardCategoryProps {
1001
1166
  EventCard: EventCardProps;
1002
- InsightCard: InsightCardProps;
1003
1167
  PersonCard: PersonCardProps;
1168
+ InsightCard: InsightCardProps;
1004
1169
  ProductCard: ProductCardProps;
1005
1170
  TestimonialCard: TestimonialCardProps;
1006
1171
  }
1007
1172
  declare const CardCategoryComponents: {
1008
1173
  EventCard: _measured_puck.ComponentConfig<EventCardProps>;
1009
- InsightCard: _measured_puck.ComponentConfig<InsightCardProps>;
1010
1174
  PersonCard: _measured_puck.ComponentConfig<PersonCardProps>;
1175
+ InsightCard: _measured_puck.ComponentConfig<InsightCardProps>;
1011
1176
  ProductCard: _measured_puck.ComponentConfig<ProductCardProps>;
1012
1177
  TestimonialCard: _measured_puck.ComponentConfig<TestimonialCardProps>;
1013
1178
  };
@@ -1041,22 +1206,6 @@ declare const ContentBlockCategoryComponents: {
1041
1206
  TextList: _measured_puck.ComponentConfig<TextListProps>;
1042
1207
  };
1043
1208
  declare const ContentBlockCategory: (keyof ContentBlockCategoryProps)[];
1044
- interface OtherCategoryProps {
1045
- Header: HeaderProps;
1046
- Footer: FooterProps;
1047
- }
1048
- declare const OtherCategoryComponents: {
1049
- Header: _measured_puck.ComponentConfig<HeaderProps>;
1050
- Footer: _measured_puck.ComponentConfig<FooterProps>;
1051
- };
1052
- declare const OtherCategory: (keyof OtherCategoryProps)[];
1053
- interface DirectoryCategoryProps {
1054
- Directory: DirectoryProps;
1055
- }
1056
- declare const DirectoryCategoryComponents: {
1057
- Directory: _measured_puck.ComponentConfig<DirectoryProps>;
1058
- };
1059
- declare const DirectoryCategory: (keyof DirectoryCategoryProps)[];
1060
1209
 
1061
1210
  type ExampleRepeatableItemProps = {
1062
1211
  text?: YextEntityField<string>;
@@ -1065,6 +1214,17 @@ type ExampleRepeatableItemProps = {
1065
1214
  };
1066
1215
  declare const ExampleRepeatableItemComponent: ComponentConfig<ExampleRepeatableItemProps>;
1067
1216
 
1217
+ type SectionContainerProps = {
1218
+ background?: BackgroundStyle;
1219
+ sectionHeading: {
1220
+ text: YextEntityField<string>;
1221
+ level: HeadingProps["level"];
1222
+ alignment: "left" | "right" | "center";
1223
+ };
1224
+ liveVisibility: boolean;
1225
+ };
1226
+ declare const SectionContainer: ComponentConfig<SectionContainerProps>;
1227
+
1068
1228
  declare const defaultThemeConfig: ThemeConfig;
1069
1229
 
1070
- 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, ContentBlockCategory, ContentBlockCategoryComponents, type ContentBlockCategoryProps, CoreInfoSection, type CoreInfoSectionProps, Directory, DirectoryCategory, DirectoryCategoryComponents, type DirectoryCategoryProps, type DirectoryProps, Editor, Emails, type EmailsProps, EntityField, EventCard, type EventCardProps, ExampleRepeatableItemComponent, type ExampleRepeatableItemProps, FAQsSection, type FAQsSectionProps, 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, HoursStatus, type HoursStatusProps, HoursTable, type HoursTableProps, Image, type ImageProps, ImageWrapper, type ImageWrapperProps, InsightCard, type InsightCardProps, LayoutBlockCategory, LayoutBlockCategoryComponents, type LayoutBlockCategoryProps, MapboxStaticMapComponent as MapboxStaticMap, type MapboxStaticProps, MaybeLink, type MaybeLinkProps, NearbyLocationsSection, type NearbyLocationsSectionProps, OptionalNumberField, type OptionalNumberFieldProps, OtherCategory, OtherCategoryComponents, type OtherCategoryProps, PageSection, PageSectionCategory, PageSectionCategoryComponents, type PageSectionCategoryProps, type PageSectionProps, PersonCard, type PersonCardProps, Phone, PhoneAtom, type PhoneAtomProps, type PhoneProps, PhotoGallerySection, type PhotoGallerySectionProps, ProductCard, type ProductCardProps, PromoSection, type PromoSectionProps, type RenderYextEntityFieldSelectorProps, SectionContainer, type SectionContainerProps, SpacingSelector, TailwindConfigContext, TemplatePropsContext, TestimonialCard, type TestimonialCardProps, TextList, type TextListProps, type ThemeConfig, ThemeOptions, VisibilityWrapper, VisualEditorProvider, type YextCollection, YextCollectionSubfieldSelector, type YextEntityField, YextEntityFieldSelector, YextField, type YextFieldDefinition, type YextSchemaField, applyAnalytics, applyTheme, backgroundColors, bodyVariants, buttonVariants, constructFontSelectOptions, defaultFonts, defaultThemeConfig, defaultThemeTailwindExtensions, fetchNearbyLocations, getFontWeightOptions, getFontWeightOverrideOptions, getPageMetadata, handleResolveFieldsForCollections, headingVariants, normalizeSlug, resolveYextEntityField, resolveYextSubfield, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields, useTailwindConfig, useTemplateProps, validateSlug };
1230
+ 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, 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, type HoursStatusProps, HoursTable, type HoursTableProps, Image, type ImageProps, ImageWrapper, type ImageWrapperProps, InsightCard, type InsightCardProps, InsightSection, type InsightSectionProps, type InsightSectionType, type InsightStruct, LayoutBlockCategory, LayoutBlockCategoryComponents, type LayoutBlockCategoryProps, MapboxStaticMap, type MapboxStaticProps, MaybeLink, type MaybeLinkProps, 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 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, defaultFonts, defaultThemeConfig, defaultThemeTailwindExtensions, fetchNearbyLocations, getFontWeightOptions, getFontWeightOverrideOptions, getPageMetadata, handleResolveFieldsForCollections, headingVariants, normalizeSlug, resolveYextEntityField, resolveYextStructField, resolveYextSubfield, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields, useTailwindConfig, useTemplateProps, validateSlug };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("node:path"),i=require("fs-extra"),p=`/** THIS FILE IS AUTOGENERATED AND SHOULD NOT BE EDITED */
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("node:path"),r=require("fs-extra"),d=`/** THIS FILE IS AUTOGENERATED AND SHOULD NOT BE EDITED */
2
2
  import "@yext/visual-editor/style.css";
3
3
  import {
4
4
  Template,
@@ -17,6 +17,7 @@ import {
17
17
  normalizeSlug,
18
18
  getPageMetadata,
19
19
  applyAnalytics,
20
+ applyHeaderScript,
20
21
  } from "@yext/visual-editor";
21
22
  import { themeConfig } from "../../theme.config";
22
23
  import { AnalyticsProvider, SchemaWrapper } from "@yext/pages-components";
@@ -65,6 +66,7 @@ export const getHeadConfig: GetHeadConfig<TemplateRenderProps> = ({
65
66
  ],
66
67
  other: [
67
68
  applyAnalytics(document),
69
+ applyHeaderScript(document),
68
70
  applyTheme(document, themeConfig),
69
71
  SchemaWrapper(document._schema),
70
72
  ].join("\\n"),
@@ -101,7 +103,7 @@ const Location: Template<TemplateRenderProps> = (props) => {
101
103
  };
102
104
 
103
105
  export default Location;
104
- `,d=`/** THIS FILE IS AUTOGENERATED AND SHOULD NOT BE EDITED */
106
+ `,p=`/** THIS FILE IS AUTOGENERATED AND SHOULD NOT BE EDITED */
105
107
  import {
106
108
  applyTheme,
107
109
  Editor,
@@ -134,7 +136,7 @@ export const getHeadConfig: GetHeadConfig<TemplateRenderProps> = ({
134
136
  document,
135
137
  }): HeadConfig => {
136
138
  return {
137
- other: applyTheme(document, themeConfig),
139
+ other: fullStorySnippet + applyTheme(document, themeConfig),
138
140
  };
139
141
  };
140
142
 
@@ -161,7 +163,32 @@ const Edit: () => JSX.Element = () => {
161
163
  };
162
164
 
163
165
  export default Edit;
164
- `,l=`import "@yext/visual-editor/style.css";
166
+
167
+ const fullStorySnippet = \`<script>
168
+ window['_fs_run_in_iframe'] = true;
169
+ window['_fs_debug'] = false;
170
+ window['_fs_host'] = 'fullstory.com';
171
+ window['_fs_script'] = 'edge.fullstory.com/s/fs.js';
172
+ window['_fs_org'] = 'o-1RWKDJ-na1';
173
+ window['_fs_namespace'] = 'FS';
174
+ !function(m,n,e,t,l,o,g,y){var s,f,a=function(h){
175
+ return!(h in m)||(m.console&&m.console.log&&m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].'),!1)}(e)
176
+ ;function j(b){var h,d=[];function k(){h&&(d.forEach((function(b){var d;try{d=b[h[0]]&&b[h[0]](h[1])}catch(h){return void(b[3]&&b[3](h))}
177
+ d&&d.then?d.then(b[2],b[3]):b[2]&&b[2](d)})),d.length=0)}function r(b){return function(d){h||(h=[b,d],k())}}return b(r(0),r(1)),{
178
+ then:function(b,h){return j((function(r,i){d.push([b,h,r,i]),k()}))}}}a&&(g=m[e]=function(){var b=function(b,d,k,r){function i(i,c){
179
+ h(b,d,k,i,c,r)}r=r||2;var c,u=/Async$/;return u.test(b)?(b=b.replace(u,""),"function"==typeof Promise?new Promise(i):j(i)):h(b,d,k,c,c,r)}
180
+ ;function h(h,d,k,r,i,c){return b._api?b._api(h,d,k,r,i,c):(b.q&&b.q.push([h,d,k,r,i,c]),null)}return b.q=[],b}(),y=function(b){function h(h){
181
+ "function"==typeof h[4]&&h[4](new Error(b))}var d=g.q;if(d){for(var k=0;k<d.length;k++)h(d[k]);d.length=0,d.push=h}},function(){
182
+ (o=n.createElement(t)).async=!0,o.crossOrigin="anonymous",o.src="https://"+l,o.onerror=function(){y("Error loading "+l)}
183
+ ;var b=n.getElementsByTagName(t)[0];b.parentNode.insertBefore(o,b)}(),function(){function b(){}function h(b,h,d){g(b,h,d,1)}function d(b,d,k){
184
+ h("setProperties",{type:b,properties:d},k)}function k(b,h){d("user",b,h)}function r(b,h,d){k({uid:b},d),h&&k(h,d)}g.identify=r,g.setUserVars=k,
185
+ g.identifyAccount=b,g.clearUserCookie=b,g.setVars=d,g.event=function(b,d,k){h("trackEvent",{name:b,properties:d},k)},g.anonymize=function(){r(!1)
186
+ },g.shutdown=function(){h("shutdown")},g.restart=function(){h("restart")},g.log=function(b,d){h("log",{level:b,msg:d})},g.consent=function(b){
187
+ h("setIdentity",{consent:!arguments.length||b})}}(),s="fetch",f="XMLHttpRequest",g._w={},g._w[f]=m[f],g._w[s]=m[s],m[s]&&(m[s]=function(){
188
+ return g._w[s].apply(this,arguments)}),g._v="2.0.0")}(window,document,window._fs_namespace,"script",window._fs_script);
189
+ <\/script>\`;
190
+ `,l=`/** THIS FILE IS AUTOGENERATED AND SHOULD NOT BE EDITED */
191
+ import "@yext/visual-editor/style.css";
165
192
  import {
166
193
  Template,
167
194
  GetPath,
@@ -179,6 +206,7 @@ import {
179
206
  normalizeSlug,
180
207
  getPageMetadata,
181
208
  applyAnalytics,
209
+ applyHeaderScript,
182
210
  } from "@yext/visual-editor";
183
211
  import { themeConfig } from "../../theme.config";
184
212
  import { AnalyticsProvider, SchemaWrapper } from "@yext/pages-components";
@@ -227,6 +255,7 @@ export const getHeadConfig: GetHeadConfig<TemplateRenderProps> = ({
227
255
  ],
228
256
  other: [
229
257
  applyAnalytics(document),
258
+ applyHeaderScript(document),
230
259
  applyTheme(document, themeConfig),
231
260
  SchemaWrapper(document._schema),
232
261
  ].join("\\n"),
@@ -264,4 +293,4 @@ const Directory: Template<TemplateRenderProps> = (props) => {
264
293
  };
265
294
 
266
295
  export default Directory;
267
- `,m={"src/templates/main.tsx":p,"src/templates/edit.tsx":d,"src/templates/directory.tsx":l},u=()=>{let e=!1;const a=[],c=()=>{Object.entries(m).forEach(([n,r])=>{const o=s.join(process.cwd(),n);a.push(o),i.mkdirSync(s.dirname(o),{recursive:!0}),!i.existsSync(o)&&i.writeFileSync(o,r)})},t=()=>{a.forEach(n=>{i.rmSync(n,{force:!0})})};return process.on("SIGINT",()=>{t(),process.nextTick(()=>process.exit(0))}),process.on("SIGTERM",()=>{t(),process.nextTick(()=>process.exit(0))}),{name:"vite-plugin-yext-visual-editor",config(n,{command:r}){e=r==="build"},configureServer(n){e||(c(),n.httpServer?.on("close",()=>{t()}))},buildStart(){e&&c()},buildEnd(){e&&t()},closeBundle(){e&&t()}}};exports.yextVisualEditorPlugin=u;
296
+ `,m={"src/templates/main.tsx":d,"src/templates/edit.tsx":p,"src/templates/directory.tsx":l},u=()=>{let e=!1;const a=[],c=()=>{Object.entries(m).forEach(([n,i])=>{const o=s.join(process.cwd(),n);a.push(o),r.mkdirSync(s.dirname(o),{recursive:!0}),!r.existsSync(o)&&r.writeFileSync(o,i)})},t=()=>{a.forEach(n=>{r.rmSync(n,{force:!0})})};return process.on("SIGINT",()=>{t(),process.nextTick(()=>process.exit(0))}),process.on("SIGTERM",()=>{t(),process.nextTick(()=>process.exit(0))}),{name:"vite-plugin-yext-visual-editor",config(n,{command:i}){e=i==="build"},configureServer(n){e||(c(),n.httpServer?.on("close",()=>{t()}))},buildStart(){e&&c()},buildEnd(){e&&t()},closeBundle(){e&&t()}}};exports.yextVisualEditorPlugin=u;