@yext/visual-editor 0.0.53 → 0.0.55
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 +103 -26
- package/dist/index.d.ts +103 -26
- package/dist/plugin/{debugger-DoQ3QjB9-isGWHbSR.cjs → debugger-DoQ3QjB9-DnUBGvaf.cjs} +1 -1
- package/dist/plugin/{debugger-DoQ3QjB9-DGbIzXYH.js → debugger-DoQ3QjB9-qIX4IBDL.js} +1 -1
- package/dist/plugin/{index-CyGzetnD.cjs → index-BKPX93xf.cjs} +271 -271
- package/dist/plugin/{index-trNUeK31.js → index-BOS5ghXn.js} +41023 -37631
- package/dist/plugin/plugin.cjs +1 -1
- package/dist/plugin/plugin.js +1 -1
- package/dist/visual-editor.cjs +62 -62
- package/dist/visual-editor.js +21452 -17574
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -544,16 +544,25 @@ type TranslatableCTA = Omit<CTA$1, "label" | "link"> & {
|
|
|
544
544
|
label: TranslatableString;
|
|
545
545
|
link: TranslatableString;
|
|
546
546
|
};
|
|
547
|
+
type EnhancedTranslatableCTA = TranslatableCTA & {
|
|
548
|
+
ctaType?: "textAndLink" | "getDirections" | "presetImage";
|
|
549
|
+
coordinate?: {
|
|
550
|
+
latitude: number;
|
|
551
|
+
longitude: number;
|
|
552
|
+
};
|
|
553
|
+
presetImageType?: PresetImageType;
|
|
554
|
+
};
|
|
555
|
+
type PresetImageType = "app-store" | "google-play" | "galaxy-store" | "app-gallery" | "uber-eats";
|
|
547
556
|
type HeroSectionType = {
|
|
548
557
|
image?: ImageType;
|
|
549
|
-
primaryCta?:
|
|
550
|
-
secondaryCta?:
|
|
558
|
+
primaryCta?: EnhancedTranslatableCTA;
|
|
559
|
+
secondaryCta?: EnhancedTranslatableCTA;
|
|
551
560
|
};
|
|
552
561
|
type PromoSectionType = {
|
|
553
562
|
image?: ImageType;
|
|
554
563
|
title?: TranslatableString;
|
|
555
564
|
description?: TranslatableRichText;
|
|
556
|
-
cta
|
|
565
|
+
cta: EnhancedTranslatableCTA;
|
|
557
566
|
};
|
|
558
567
|
type ProductSectionType = {
|
|
559
568
|
products: Array<ProductStruct>;
|
|
@@ -563,7 +572,7 @@ type ProductStruct = {
|
|
|
563
572
|
name?: TranslatableString;
|
|
564
573
|
description?: TranslatableRichText;
|
|
565
574
|
category?: TranslatableString;
|
|
566
|
-
cta
|
|
575
|
+
cta: EnhancedTranslatableCTA;
|
|
567
576
|
};
|
|
568
577
|
type EventSectionType = {
|
|
569
578
|
events: Array<EventStruct>;
|
|
@@ -573,7 +582,7 @@ type EventStruct = {
|
|
|
573
582
|
title?: TranslatableString;
|
|
574
583
|
dateTime?: string;
|
|
575
584
|
description?: TranslatableRichText;
|
|
576
|
-
cta
|
|
585
|
+
cta: EnhancedTranslatableCTA;
|
|
577
586
|
};
|
|
578
587
|
type FAQSectionType = {
|
|
579
588
|
faqs: Array<FAQStruct>;
|
|
@@ -599,7 +608,7 @@ type InsightStruct = {
|
|
|
599
608
|
category?: TranslatableString;
|
|
600
609
|
publishTime?: string;
|
|
601
610
|
description?: TranslatableRichText;
|
|
602
|
-
cta
|
|
611
|
+
cta: EnhancedTranslatableCTA;
|
|
603
612
|
};
|
|
604
613
|
type TeamSectionType = {
|
|
605
614
|
people: Array<PersonStruct>;
|
|
@@ -610,7 +619,7 @@ type PersonStruct = {
|
|
|
610
619
|
title?: TranslatableString;
|
|
611
620
|
phoneNumber?: string;
|
|
612
621
|
email?: string;
|
|
613
|
-
cta
|
|
622
|
+
cta: EnhancedTranslatableCTA;
|
|
614
623
|
};
|
|
615
624
|
type LocalizedValues = {
|
|
616
625
|
hasLocalizedValue: "true";
|
|
@@ -714,8 +723,9 @@ type EntityFieldProps = {
|
|
|
714
723
|
fieldId?: string;
|
|
715
724
|
constantValueEnabled?: boolean;
|
|
716
725
|
children: React__default.ReactNode;
|
|
726
|
+
fullHeight?: boolean;
|
|
717
727
|
};
|
|
718
|
-
declare const EntityField: ({ displayName, fieldId, constantValueEnabled, children, }: EntityFieldProps) => string | number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
728
|
+
declare const EntityField: ({ displayName, fieldId, constantValueEnabled, children, fullHeight, }: EntityFieldProps) => string | number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
719
729
|
|
|
720
730
|
type OptionalNumberFieldProps = {
|
|
721
731
|
fieldLabel: string;
|
|
@@ -874,21 +884,24 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Var
|
|
|
874
884
|
}
|
|
875
885
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
876
886
|
|
|
877
|
-
|
|
878
|
-
label
|
|
887
|
+
type CTAProps = {
|
|
888
|
+
label: React.ReactNode;
|
|
889
|
+
ctaType?: "textAndLink" | "getDirections" | "presetImage";
|
|
879
890
|
link?: string;
|
|
880
891
|
linkType?: LinkType;
|
|
881
|
-
|
|
892
|
+
coordinate?: {
|
|
893
|
+
latitude: number;
|
|
894
|
+
longitude: number;
|
|
895
|
+
};
|
|
896
|
+
presetImageType?: PresetImageType;
|
|
882
897
|
variant?: ButtonProps["variant"];
|
|
883
898
|
className?: string;
|
|
899
|
+
eventName?: string;
|
|
884
900
|
target?: "_self" | "_blank" | "_parent" | "_top";
|
|
885
901
|
alwaysHideCaret?: boolean;
|
|
886
902
|
ariaLabel?: string;
|
|
887
|
-
}
|
|
888
|
-
declare const CTA: {
|
|
889
|
-
({ label, link, linkType, variant, eventName, className, target, alwaysHideCaret, ariaLabel, }: CTAProps): react_jsx_runtime_js.JSX.Element;
|
|
890
|
-
displayName: string;
|
|
891
903
|
};
|
|
904
|
+
declare const CTA: (props: CTAProps) => react_jsx_runtime_js.JSX.Element | null;
|
|
892
905
|
|
|
893
906
|
declare const headingVariants: (props?: ({
|
|
894
907
|
level?: 2 | 1 | 3 | 4 | 5 | 6 | null | undefined;
|
|
@@ -932,7 +945,7 @@ interface MaybeRTFProps extends Record<string, any> {
|
|
|
932
945
|
declare const MaybeRTF: ({ data, bodyVariant, ...props }: MaybeRTFProps) => react_jsx_runtime.JSX.Element;
|
|
933
946
|
|
|
934
947
|
declare const pageSectionVariants: (props?: ({
|
|
935
|
-
verticalPadding?: "default" | "sm" | "footer" | "header" | "footerSecondary" | null | undefined;
|
|
948
|
+
verticalPadding?: "default" | "sm" | "none" | "footer" | "header" | "footerSecondary" | null | undefined;
|
|
936
949
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
937
950
|
declare const maxWidthVariants: (props?: ({
|
|
938
951
|
maxWidth?: "theme" | "768px" | "960px" | "1024px" | "1280px" | "1440px" | "fullWidth" | null | undefined;
|
|
@@ -942,6 +955,7 @@ interface PageSectionProps extends VariantProps<typeof maxWidthVariants>, React.
|
|
|
942
955
|
verticalPadding?: VariantProps<typeof pageSectionVariants>["verticalPadding"];
|
|
943
956
|
as?: "div" | "section" | "nav" | "header" | "footer" | "main" | "aside";
|
|
944
957
|
outerClassName?: string;
|
|
958
|
+
outerStyle?: React.CSSProperties;
|
|
945
959
|
}
|
|
946
960
|
declare const PageSection: React.ForwardRefExoticComponent<PageSectionProps & React.RefAttributes<HTMLDivElement>>;
|
|
947
961
|
|
|
@@ -1011,6 +1025,7 @@ type AggregateRating = {
|
|
|
1011
1025
|
type ReviewStarsProps = {
|
|
1012
1026
|
averageRating: number;
|
|
1013
1027
|
reviewCount?: number;
|
|
1028
|
+
className?: string;
|
|
1014
1029
|
};
|
|
1015
1030
|
declare const ReviewStars: (props: ReviewStarsProps) => react_jsx_runtime.JSX.Element;
|
|
1016
1031
|
/**
|
|
@@ -1279,15 +1294,16 @@ interface HeroData {
|
|
|
1279
1294
|
}
|
|
1280
1295
|
interface HeroStyles {
|
|
1281
1296
|
/**
|
|
1282
|
-
* The
|
|
1283
|
-
* @defaultValue
|
|
1297
|
+
* The visual variant for the hero section.
|
|
1298
|
+
* @defaultValue classic
|
|
1284
1299
|
*/
|
|
1285
|
-
|
|
1300
|
+
variant: "classic" | "immersive" | "spotlight" | "compact";
|
|
1286
1301
|
/**
|
|
1287
|
-
*
|
|
1288
|
-
*
|
|
1302
|
+
* The background color for the entire section (classic and compact variants).
|
|
1303
|
+
* The background color for the featured content (spotlight variant).
|
|
1304
|
+
* @defaultValue Background Color 1
|
|
1289
1305
|
*/
|
|
1290
|
-
|
|
1306
|
+
backgroundColor?: BackgroundStyle;
|
|
1291
1307
|
/**
|
|
1292
1308
|
* The HTML heading level for the business name.
|
|
1293
1309
|
* @defaultValue 3
|
|
@@ -1309,9 +1325,40 @@ interface HeroStyles {
|
|
|
1309
1325
|
*/
|
|
1310
1326
|
secondaryCTA: CTAProps["variant"];
|
|
1311
1327
|
/**
|
|
1312
|
-
* Styling options for the hero image
|
|
1328
|
+
* Styling options for the hero image.
|
|
1329
|
+
* Classic variant: aspect ratio (ratios 4:1, 3:1, 2:1, and 9:16 are not supported) and height.
|
|
1330
|
+
* Immersive variant: height (500px default, minimum height: content height + Page Section Top/Bottom Padding)
|
|
1331
|
+
* Spotlight variant: height (500px default, minimum height: content height + Page Section Top/Bottom Padding)
|
|
1332
|
+
* Compact variant: aspect ratio (ratios 4:1, 3:1, 2:1, and 9:16 are not supported).
|
|
1313
1333
|
*/
|
|
1314
|
-
image: ImageStylingProps
|
|
1334
|
+
image: ImageStylingProps & {
|
|
1335
|
+
height?: number;
|
|
1336
|
+
};
|
|
1337
|
+
/**
|
|
1338
|
+
* Container position on desktop (spotlight and immersive variants).
|
|
1339
|
+
* @defaultValue left
|
|
1340
|
+
*/
|
|
1341
|
+
desktopContainerPosition?: "left" | "center";
|
|
1342
|
+
/**
|
|
1343
|
+
* Content alignment for mobile viewports.
|
|
1344
|
+
* @defaultValue left
|
|
1345
|
+
*/
|
|
1346
|
+
mobileContentAlignment?: "left" | "center";
|
|
1347
|
+
/**
|
|
1348
|
+
* Whether to show the hero image (classic and compact variant).
|
|
1349
|
+
* @defaultValue true
|
|
1350
|
+
*/
|
|
1351
|
+
showImage: boolean;
|
|
1352
|
+
/**
|
|
1353
|
+
* Positions the image to the left or right of the hero content on desktop (classic and compact variants).
|
|
1354
|
+
* @defaultValue right
|
|
1355
|
+
*/
|
|
1356
|
+
desktopImagePosition: "left" | "right";
|
|
1357
|
+
/**
|
|
1358
|
+
* Positions the image to the top or bottom of the hero content on mobile (classic and compact variants).
|
|
1359
|
+
* @defaultValue top
|
|
1360
|
+
*/
|
|
1361
|
+
mobileImagePosition: "bottom" | "top";
|
|
1315
1362
|
}
|
|
1316
1363
|
interface HeroSectionProps {
|
|
1317
1364
|
/**
|
|
@@ -1853,7 +1900,7 @@ type BodyTextProps = {
|
|
|
1853
1900
|
};
|
|
1854
1901
|
|
|
1855
1902
|
interface CTAWrapperProps {
|
|
1856
|
-
entityField: YextEntityField<
|
|
1903
|
+
entityField: YextEntityField<EnhancedTranslatableCTA>;
|
|
1857
1904
|
variant: CTAProps["variant"];
|
|
1858
1905
|
className?: CTAProps["className"];
|
|
1859
1906
|
}
|
|
@@ -1967,6 +2014,8 @@ interface ExpandedHeaderStyles {
|
|
|
1967
2014
|
};
|
|
1968
2015
|
/** The maximum width of the header */
|
|
1969
2016
|
maxWidth: PageSectionProps["maxWidth"];
|
|
2017
|
+
/** Whether the header is "sticky" or not */
|
|
2018
|
+
headerPosition: "sticky" | "scrollsWithPage";
|
|
1970
2019
|
}
|
|
1971
2020
|
interface ExpandedHeaderProps {
|
|
1972
2021
|
/**
|
|
@@ -2023,6 +2072,11 @@ interface DirectoryData {
|
|
|
2023
2072
|
* @defaultValue "Directory Root" (constant)
|
|
2024
2073
|
*/
|
|
2025
2074
|
directoryRoot: TranslatableString;
|
|
2075
|
+
/**
|
|
2076
|
+
* The site name to display above the title.
|
|
2077
|
+
* @defaultValue "" (empty string)
|
|
2078
|
+
*/
|
|
2079
|
+
siteName: YextEntityField<TranslatableString>;
|
|
2026
2080
|
}
|
|
2027
2081
|
interface DirectoryStyles {
|
|
2028
2082
|
/**
|
|
@@ -2042,6 +2096,23 @@ interface DirectoryStyles {
|
|
|
2042
2096
|
headingLevel: HeadingLevel;
|
|
2043
2097
|
backgroundColor?: BackgroundStyle;
|
|
2044
2098
|
};
|
|
2099
|
+
/**
|
|
2100
|
+
* The display format for phone numbers on the cards.
|
|
2101
|
+
* @defaultValue 'domestic'
|
|
2102
|
+
*/
|
|
2103
|
+
phoneNumberFormat: "domestic" | "international";
|
|
2104
|
+
/**
|
|
2105
|
+
* If "true", wraps phone numbers in a clickable "tel:" hyperlink.
|
|
2106
|
+
* @defaultValue false
|
|
2107
|
+
*/
|
|
2108
|
+
phoneNumberLink: boolean;
|
|
2109
|
+
/** Styling for the hours display on each card. */
|
|
2110
|
+
hours: {
|
|
2111
|
+
showCurrentStatus: boolean;
|
|
2112
|
+
timeFormat?: "12h" | "24h";
|
|
2113
|
+
dayOfWeekFormat?: "short" | "long";
|
|
2114
|
+
showDayNames?: boolean;
|
|
2115
|
+
};
|
|
2045
2116
|
}
|
|
2046
2117
|
interface DirectoryProps {
|
|
2047
2118
|
/**
|
|
@@ -2082,6 +2153,10 @@ interface LocatorProps {
|
|
|
2082
2153
|
*/
|
|
2083
2154
|
declare const LocatorComponent: ComponentConfig<LocatorProps>;
|
|
2084
2155
|
|
|
2156
|
+
interface CTAGroupProps {
|
|
2157
|
+
buttons: CTAWrapperProps[];
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2085
2160
|
interface StaticMapData {
|
|
2086
2161
|
/**
|
|
2087
2162
|
* The API key used to generate the map image.
|
|
@@ -2281,6 +2356,7 @@ interface AdvancedCoreInfoCategoryProps {
|
|
|
2281
2356
|
Grid: GridProps;
|
|
2282
2357
|
Address: AddressProps;
|
|
2283
2358
|
BodyText: BodyTextProps;
|
|
2359
|
+
CTAGroup: CTAGroupProps;
|
|
2284
2360
|
CTAWrapper: CTAWrapperProps;
|
|
2285
2361
|
Emails: EmailsProps;
|
|
2286
2362
|
GetDirections: GetDirectionsProps;
|
|
@@ -2296,6 +2372,7 @@ declare const AdvancedCoreInfoCategoryComponents: {
|
|
|
2296
2372
|
Grid: _measured_puck.ComponentConfig<GridProps>;
|
|
2297
2373
|
Address: _measured_puck.ComponentConfig<AddressProps>;
|
|
2298
2374
|
BodyText: _measured_puck.ComponentConfig<BodyTextProps>;
|
|
2375
|
+
CTAGroup: _measured_puck.ComponentConfig<CTAGroupProps>;
|
|
2299
2376
|
CTAWrapper: _measured_puck.ComponentConfig<CTAWrapperProps>;
|
|
2300
2377
|
Emails: _measured_puck.ComponentConfig<EmailsProps>;
|
|
2301
2378
|
GetDirections: _measured_puck.ComponentConfig<GetDirectionsProps>;
|
|
@@ -2375,4 +2452,4 @@ declare const addHeadingAlignmentMigration: Migration;
|
|
|
2375
2452
|
|
|
2376
2453
|
declare const defaultThemeConfig: ThemeConfig;
|
|
2377
2454
|
|
|
2378
|
-
export { AdvancedCoreInfoCategory, AdvancedCoreInfoCategoryComponents, type AdvancedCoreInfoCategoryProps, type AggregateRating, 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, ContentBlockCategory, ContentBlockCategoryComponents, type ContentBlockCategoryProps, type CoreInfoData, CoreInfoSection, type CoreInfoSectionProps, type CoreInfoStyles, CustomCodeSection, type CustomCodeSectionProps, DeprecatedCategory, DeprecatedCategoryComponents, type DeprecatedCategoryProps, Directory, DirectoryCategory, DirectoryCategoryComponents, type DirectoryCategoryProps, type DirectoryData, type DirectoryProps, type DirectoryStyles, Editor, EmbeddedFieldStringInput, 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, type GalleryImageType, 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 ImageProps, type InsightData, InsightSection, type InsightSectionProps, type InsightSectionType, type InsightStruct, type InsightStyles, KnowledgeGraphIcon, LayoutBlockCategory, LayoutBlockCategoryComponents, type LayoutBlockCategoryProps, LocatorCategory, LocatorCategoryComponents, type LocatorCategoryProps, LocatorComponent, type LocatorProps, 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 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, 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, 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, fetchReviewsForEntity, filterComponentsFromConfig, filterMaxWidths, getAggregateRating, getAnalyticsScopeHash, getFontWeightOptions, getFontWeightOverrideOptions, getLocationPath, getMaxWidthOptions, getPageMetadata, headingVariants, i18nComponentsInstance, i18nPlatformInstance, migrate, migrationRegistry, msg, normalizeSlug, pt, resolveComponentData, resolveYextEntityField, resolveYextStructField, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, useOverflow, usePlatformBridgeDocument, usePlatformBridgeEntityFields, usePlatformTranslation, useTailwindConfig, useTemplateProps, validateSlug, withPropOverrides };
|
|
2455
|
+
export { AdvancedCoreInfoCategory, AdvancedCoreInfoCategoryComponents, type AdvancedCoreInfoCategoryProps, type AggregateRating, 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, ContentBlockCategory, ContentBlockCategoryComponents, type ContentBlockCategoryProps, type CoreInfoData, CoreInfoSection, type CoreInfoSectionProps, type CoreInfoStyles, CustomCodeSection, type CustomCodeSectionProps, DeprecatedCategory, DeprecatedCategoryComponents, type DeprecatedCategoryProps, Directory, DirectoryCategory, DirectoryCategoryComponents, type DirectoryCategoryProps, 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, type GalleryImageType, 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 ImageProps, type InsightData, InsightSection, type InsightSectionProps, type InsightSectionType, type InsightStruct, type InsightStyles, KnowledgeGraphIcon, LayoutBlockCategory, LayoutBlockCategoryComponents, type LayoutBlockCategoryProps, LocatorCategory, LocatorCategoryComponents, type LocatorCategoryProps, LocatorComponent, type LocatorProps, 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, 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, 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, fetchReviewsForEntity, filterComponentsFromConfig, filterMaxWidths, getAggregateRating, getAnalyticsScopeHash, getFontWeightOptions, getFontWeightOverrideOptions, getLocationPath, getMaxWidthOptions, getPageMetadata, headingVariants, i18nComponentsInstance, i18nPlatformInstance, migrate, migrationRegistry, msg, normalizeSlug, pt, resolveComponentData, resolveYextEntityField, resolveYextStructField, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, useOverflow, usePlatformBridgeDocument, usePlatformBridgeEntityFields, usePlatformTranslation, useTailwindConfig, useTemplateProps, validateSlug, withPropOverrides };
|
package/dist/index.d.ts
CHANGED
|
@@ -544,16 +544,25 @@ type TranslatableCTA = Omit<CTA$1, "label" | "link"> & {
|
|
|
544
544
|
label: TranslatableString;
|
|
545
545
|
link: TranslatableString;
|
|
546
546
|
};
|
|
547
|
+
type EnhancedTranslatableCTA = TranslatableCTA & {
|
|
548
|
+
ctaType?: "textAndLink" | "getDirections" | "presetImage";
|
|
549
|
+
coordinate?: {
|
|
550
|
+
latitude: number;
|
|
551
|
+
longitude: number;
|
|
552
|
+
};
|
|
553
|
+
presetImageType?: PresetImageType;
|
|
554
|
+
};
|
|
555
|
+
type PresetImageType = "app-store" | "google-play" | "galaxy-store" | "app-gallery" | "uber-eats";
|
|
547
556
|
type HeroSectionType = {
|
|
548
557
|
image?: ImageType;
|
|
549
|
-
primaryCta?:
|
|
550
|
-
secondaryCta?:
|
|
558
|
+
primaryCta?: EnhancedTranslatableCTA;
|
|
559
|
+
secondaryCta?: EnhancedTranslatableCTA;
|
|
551
560
|
};
|
|
552
561
|
type PromoSectionType = {
|
|
553
562
|
image?: ImageType;
|
|
554
563
|
title?: TranslatableString;
|
|
555
564
|
description?: TranslatableRichText;
|
|
556
|
-
cta
|
|
565
|
+
cta: EnhancedTranslatableCTA;
|
|
557
566
|
};
|
|
558
567
|
type ProductSectionType = {
|
|
559
568
|
products: Array<ProductStruct>;
|
|
@@ -563,7 +572,7 @@ type ProductStruct = {
|
|
|
563
572
|
name?: TranslatableString;
|
|
564
573
|
description?: TranslatableRichText;
|
|
565
574
|
category?: TranslatableString;
|
|
566
|
-
cta
|
|
575
|
+
cta: EnhancedTranslatableCTA;
|
|
567
576
|
};
|
|
568
577
|
type EventSectionType = {
|
|
569
578
|
events: Array<EventStruct>;
|
|
@@ -573,7 +582,7 @@ type EventStruct = {
|
|
|
573
582
|
title?: TranslatableString;
|
|
574
583
|
dateTime?: string;
|
|
575
584
|
description?: TranslatableRichText;
|
|
576
|
-
cta
|
|
585
|
+
cta: EnhancedTranslatableCTA;
|
|
577
586
|
};
|
|
578
587
|
type FAQSectionType = {
|
|
579
588
|
faqs: Array<FAQStruct>;
|
|
@@ -599,7 +608,7 @@ type InsightStruct = {
|
|
|
599
608
|
category?: TranslatableString;
|
|
600
609
|
publishTime?: string;
|
|
601
610
|
description?: TranslatableRichText;
|
|
602
|
-
cta
|
|
611
|
+
cta: EnhancedTranslatableCTA;
|
|
603
612
|
};
|
|
604
613
|
type TeamSectionType = {
|
|
605
614
|
people: Array<PersonStruct>;
|
|
@@ -610,7 +619,7 @@ type PersonStruct = {
|
|
|
610
619
|
title?: TranslatableString;
|
|
611
620
|
phoneNumber?: string;
|
|
612
621
|
email?: string;
|
|
613
|
-
cta
|
|
622
|
+
cta: EnhancedTranslatableCTA;
|
|
614
623
|
};
|
|
615
624
|
type LocalizedValues = {
|
|
616
625
|
hasLocalizedValue: "true";
|
|
@@ -714,8 +723,9 @@ type EntityFieldProps = {
|
|
|
714
723
|
fieldId?: string;
|
|
715
724
|
constantValueEnabled?: boolean;
|
|
716
725
|
children: React__default.ReactNode;
|
|
726
|
+
fullHeight?: boolean;
|
|
717
727
|
};
|
|
718
|
-
declare const EntityField: ({ displayName, fieldId, constantValueEnabled, children, }: EntityFieldProps) => string | number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
728
|
+
declare const EntityField: ({ displayName, fieldId, constantValueEnabled, children, fullHeight, }: EntityFieldProps) => string | number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
719
729
|
|
|
720
730
|
type OptionalNumberFieldProps = {
|
|
721
731
|
fieldLabel: string;
|
|
@@ -874,21 +884,24 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Var
|
|
|
874
884
|
}
|
|
875
885
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
876
886
|
|
|
877
|
-
|
|
878
|
-
label
|
|
887
|
+
type CTAProps = {
|
|
888
|
+
label: React.ReactNode;
|
|
889
|
+
ctaType?: "textAndLink" | "getDirections" | "presetImage";
|
|
879
890
|
link?: string;
|
|
880
891
|
linkType?: LinkType;
|
|
881
|
-
|
|
892
|
+
coordinate?: {
|
|
893
|
+
latitude: number;
|
|
894
|
+
longitude: number;
|
|
895
|
+
};
|
|
896
|
+
presetImageType?: PresetImageType;
|
|
882
897
|
variant?: ButtonProps["variant"];
|
|
883
898
|
className?: string;
|
|
899
|
+
eventName?: string;
|
|
884
900
|
target?: "_self" | "_blank" | "_parent" | "_top";
|
|
885
901
|
alwaysHideCaret?: boolean;
|
|
886
902
|
ariaLabel?: string;
|
|
887
|
-
}
|
|
888
|
-
declare const CTA: {
|
|
889
|
-
({ label, link, linkType, variant, eventName, className, target, alwaysHideCaret, ariaLabel, }: CTAProps): react_jsx_runtime_js.JSX.Element;
|
|
890
|
-
displayName: string;
|
|
891
903
|
};
|
|
904
|
+
declare const CTA: (props: CTAProps) => react_jsx_runtime_js.JSX.Element | null;
|
|
892
905
|
|
|
893
906
|
declare const headingVariants: (props?: ({
|
|
894
907
|
level?: 2 | 1 | 3 | 4 | 5 | 6 | null | undefined;
|
|
@@ -932,7 +945,7 @@ interface MaybeRTFProps extends Record<string, any> {
|
|
|
932
945
|
declare const MaybeRTF: ({ data, bodyVariant, ...props }: MaybeRTFProps) => react_jsx_runtime.JSX.Element;
|
|
933
946
|
|
|
934
947
|
declare const pageSectionVariants: (props?: ({
|
|
935
|
-
verticalPadding?: "default" | "sm" | "footer" | "header" | "footerSecondary" | null | undefined;
|
|
948
|
+
verticalPadding?: "default" | "sm" | "none" | "footer" | "header" | "footerSecondary" | null | undefined;
|
|
936
949
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
937
950
|
declare const maxWidthVariants: (props?: ({
|
|
938
951
|
maxWidth?: "theme" | "768px" | "960px" | "1024px" | "1280px" | "1440px" | "fullWidth" | null | undefined;
|
|
@@ -942,6 +955,7 @@ interface PageSectionProps extends VariantProps<typeof maxWidthVariants>, React.
|
|
|
942
955
|
verticalPadding?: VariantProps<typeof pageSectionVariants>["verticalPadding"];
|
|
943
956
|
as?: "div" | "section" | "nav" | "header" | "footer" | "main" | "aside";
|
|
944
957
|
outerClassName?: string;
|
|
958
|
+
outerStyle?: React.CSSProperties;
|
|
945
959
|
}
|
|
946
960
|
declare const PageSection: React.ForwardRefExoticComponent<PageSectionProps & React.RefAttributes<HTMLDivElement>>;
|
|
947
961
|
|
|
@@ -1011,6 +1025,7 @@ type AggregateRating = {
|
|
|
1011
1025
|
type ReviewStarsProps = {
|
|
1012
1026
|
averageRating: number;
|
|
1013
1027
|
reviewCount?: number;
|
|
1028
|
+
className?: string;
|
|
1014
1029
|
};
|
|
1015
1030
|
declare const ReviewStars: (props: ReviewStarsProps) => react_jsx_runtime.JSX.Element;
|
|
1016
1031
|
/**
|
|
@@ -1279,15 +1294,16 @@ interface HeroData {
|
|
|
1279
1294
|
}
|
|
1280
1295
|
interface HeroStyles {
|
|
1281
1296
|
/**
|
|
1282
|
-
* The
|
|
1283
|
-
* @defaultValue
|
|
1297
|
+
* The visual variant for the hero section.
|
|
1298
|
+
* @defaultValue classic
|
|
1284
1299
|
*/
|
|
1285
|
-
|
|
1300
|
+
variant: "classic" | "immersive" | "spotlight" | "compact";
|
|
1286
1301
|
/**
|
|
1287
|
-
*
|
|
1288
|
-
*
|
|
1302
|
+
* The background color for the entire section (classic and compact variants).
|
|
1303
|
+
* The background color for the featured content (spotlight variant).
|
|
1304
|
+
* @defaultValue Background Color 1
|
|
1289
1305
|
*/
|
|
1290
|
-
|
|
1306
|
+
backgroundColor?: BackgroundStyle;
|
|
1291
1307
|
/**
|
|
1292
1308
|
* The HTML heading level for the business name.
|
|
1293
1309
|
* @defaultValue 3
|
|
@@ -1309,9 +1325,40 @@ interface HeroStyles {
|
|
|
1309
1325
|
*/
|
|
1310
1326
|
secondaryCTA: CTAProps["variant"];
|
|
1311
1327
|
/**
|
|
1312
|
-
* Styling options for the hero image
|
|
1328
|
+
* Styling options for the hero image.
|
|
1329
|
+
* Classic variant: aspect ratio (ratios 4:1, 3:1, 2:1, and 9:16 are not supported) and height.
|
|
1330
|
+
* Immersive variant: height (500px default, minimum height: content height + Page Section Top/Bottom Padding)
|
|
1331
|
+
* Spotlight variant: height (500px default, minimum height: content height + Page Section Top/Bottom Padding)
|
|
1332
|
+
* Compact variant: aspect ratio (ratios 4:1, 3:1, 2:1, and 9:16 are not supported).
|
|
1313
1333
|
*/
|
|
1314
|
-
image: ImageStylingProps
|
|
1334
|
+
image: ImageStylingProps & {
|
|
1335
|
+
height?: number;
|
|
1336
|
+
};
|
|
1337
|
+
/**
|
|
1338
|
+
* Container position on desktop (spotlight and immersive variants).
|
|
1339
|
+
* @defaultValue left
|
|
1340
|
+
*/
|
|
1341
|
+
desktopContainerPosition?: "left" | "center";
|
|
1342
|
+
/**
|
|
1343
|
+
* Content alignment for mobile viewports.
|
|
1344
|
+
* @defaultValue left
|
|
1345
|
+
*/
|
|
1346
|
+
mobileContentAlignment?: "left" | "center";
|
|
1347
|
+
/**
|
|
1348
|
+
* Whether to show the hero image (classic and compact variant).
|
|
1349
|
+
* @defaultValue true
|
|
1350
|
+
*/
|
|
1351
|
+
showImage: boolean;
|
|
1352
|
+
/**
|
|
1353
|
+
* Positions the image to the left or right of the hero content on desktop (classic and compact variants).
|
|
1354
|
+
* @defaultValue right
|
|
1355
|
+
*/
|
|
1356
|
+
desktopImagePosition: "left" | "right";
|
|
1357
|
+
/**
|
|
1358
|
+
* Positions the image to the top or bottom of the hero content on mobile (classic and compact variants).
|
|
1359
|
+
* @defaultValue top
|
|
1360
|
+
*/
|
|
1361
|
+
mobileImagePosition: "bottom" | "top";
|
|
1315
1362
|
}
|
|
1316
1363
|
interface HeroSectionProps {
|
|
1317
1364
|
/**
|
|
@@ -1853,7 +1900,7 @@ type BodyTextProps = {
|
|
|
1853
1900
|
};
|
|
1854
1901
|
|
|
1855
1902
|
interface CTAWrapperProps {
|
|
1856
|
-
entityField: YextEntityField<
|
|
1903
|
+
entityField: YextEntityField<EnhancedTranslatableCTA>;
|
|
1857
1904
|
variant: CTAProps["variant"];
|
|
1858
1905
|
className?: CTAProps["className"];
|
|
1859
1906
|
}
|
|
@@ -1967,6 +2014,8 @@ interface ExpandedHeaderStyles {
|
|
|
1967
2014
|
};
|
|
1968
2015
|
/** The maximum width of the header */
|
|
1969
2016
|
maxWidth: PageSectionProps["maxWidth"];
|
|
2017
|
+
/** Whether the header is "sticky" or not */
|
|
2018
|
+
headerPosition: "sticky" | "scrollsWithPage";
|
|
1970
2019
|
}
|
|
1971
2020
|
interface ExpandedHeaderProps {
|
|
1972
2021
|
/**
|
|
@@ -2023,6 +2072,11 @@ interface DirectoryData {
|
|
|
2023
2072
|
* @defaultValue "Directory Root" (constant)
|
|
2024
2073
|
*/
|
|
2025
2074
|
directoryRoot: TranslatableString;
|
|
2075
|
+
/**
|
|
2076
|
+
* The site name to display above the title.
|
|
2077
|
+
* @defaultValue "" (empty string)
|
|
2078
|
+
*/
|
|
2079
|
+
siteName: YextEntityField<TranslatableString>;
|
|
2026
2080
|
}
|
|
2027
2081
|
interface DirectoryStyles {
|
|
2028
2082
|
/**
|
|
@@ -2042,6 +2096,23 @@ interface DirectoryStyles {
|
|
|
2042
2096
|
headingLevel: HeadingLevel;
|
|
2043
2097
|
backgroundColor?: BackgroundStyle;
|
|
2044
2098
|
};
|
|
2099
|
+
/**
|
|
2100
|
+
* The display format for phone numbers on the cards.
|
|
2101
|
+
* @defaultValue 'domestic'
|
|
2102
|
+
*/
|
|
2103
|
+
phoneNumberFormat: "domestic" | "international";
|
|
2104
|
+
/**
|
|
2105
|
+
* If "true", wraps phone numbers in a clickable "tel:" hyperlink.
|
|
2106
|
+
* @defaultValue false
|
|
2107
|
+
*/
|
|
2108
|
+
phoneNumberLink: boolean;
|
|
2109
|
+
/** Styling for the hours display on each card. */
|
|
2110
|
+
hours: {
|
|
2111
|
+
showCurrentStatus: boolean;
|
|
2112
|
+
timeFormat?: "12h" | "24h";
|
|
2113
|
+
dayOfWeekFormat?: "short" | "long";
|
|
2114
|
+
showDayNames?: boolean;
|
|
2115
|
+
};
|
|
2045
2116
|
}
|
|
2046
2117
|
interface DirectoryProps {
|
|
2047
2118
|
/**
|
|
@@ -2082,6 +2153,10 @@ interface LocatorProps {
|
|
|
2082
2153
|
*/
|
|
2083
2154
|
declare const LocatorComponent: ComponentConfig<LocatorProps>;
|
|
2084
2155
|
|
|
2156
|
+
interface CTAGroupProps {
|
|
2157
|
+
buttons: CTAWrapperProps[];
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2085
2160
|
interface StaticMapData {
|
|
2086
2161
|
/**
|
|
2087
2162
|
* The API key used to generate the map image.
|
|
@@ -2281,6 +2356,7 @@ interface AdvancedCoreInfoCategoryProps {
|
|
|
2281
2356
|
Grid: GridProps;
|
|
2282
2357
|
Address: AddressProps;
|
|
2283
2358
|
BodyText: BodyTextProps;
|
|
2359
|
+
CTAGroup: CTAGroupProps;
|
|
2284
2360
|
CTAWrapper: CTAWrapperProps;
|
|
2285
2361
|
Emails: EmailsProps;
|
|
2286
2362
|
GetDirections: GetDirectionsProps;
|
|
@@ -2296,6 +2372,7 @@ declare const AdvancedCoreInfoCategoryComponents: {
|
|
|
2296
2372
|
Grid: _measured_puck.ComponentConfig<GridProps>;
|
|
2297
2373
|
Address: _measured_puck.ComponentConfig<AddressProps>;
|
|
2298
2374
|
BodyText: _measured_puck.ComponentConfig<BodyTextProps>;
|
|
2375
|
+
CTAGroup: _measured_puck.ComponentConfig<CTAGroupProps>;
|
|
2299
2376
|
CTAWrapper: _measured_puck.ComponentConfig<CTAWrapperProps>;
|
|
2300
2377
|
Emails: _measured_puck.ComponentConfig<EmailsProps>;
|
|
2301
2378
|
GetDirections: _measured_puck.ComponentConfig<GetDirectionsProps>;
|
|
@@ -2375,4 +2452,4 @@ declare const addHeadingAlignmentMigration: Migration;
|
|
|
2375
2452
|
|
|
2376
2453
|
declare const defaultThemeConfig: ThemeConfig;
|
|
2377
2454
|
|
|
2378
|
-
export { AdvancedCoreInfoCategory, AdvancedCoreInfoCategoryComponents, type AdvancedCoreInfoCategoryProps, type AggregateRating, 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, ContentBlockCategory, ContentBlockCategoryComponents, type ContentBlockCategoryProps, type CoreInfoData, CoreInfoSection, type CoreInfoSectionProps, type CoreInfoStyles, CustomCodeSection, type CustomCodeSectionProps, DeprecatedCategory, DeprecatedCategoryComponents, type DeprecatedCategoryProps, Directory, DirectoryCategory, DirectoryCategoryComponents, type DirectoryCategoryProps, type DirectoryData, type DirectoryProps, type DirectoryStyles, Editor, EmbeddedFieldStringInput, 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, type GalleryImageType, 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 ImageProps, type InsightData, InsightSection, type InsightSectionProps, type InsightSectionType, type InsightStruct, type InsightStyles, KnowledgeGraphIcon, LayoutBlockCategory, LayoutBlockCategoryComponents, type LayoutBlockCategoryProps, LocatorCategory, LocatorCategoryComponents, type LocatorCategoryProps, LocatorComponent, type LocatorProps, 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 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, 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, 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, fetchReviewsForEntity, filterComponentsFromConfig, filterMaxWidths, getAggregateRating, getAnalyticsScopeHash, getFontWeightOptions, getFontWeightOverrideOptions, getLocationPath, getMaxWidthOptions, getPageMetadata, headingVariants, i18nComponentsInstance, i18nPlatformInstance, migrate, migrationRegistry, msg, normalizeSlug, pt, resolveComponentData, resolveYextEntityField, resolveYextStructField, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, useOverflow, usePlatformBridgeDocument, usePlatformBridgeEntityFields, usePlatformTranslation, useTailwindConfig, useTemplateProps, validateSlug, withPropOverrides };
|
|
2455
|
+
export { AdvancedCoreInfoCategory, AdvancedCoreInfoCategoryComponents, type AdvancedCoreInfoCategoryProps, type AggregateRating, 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, ContentBlockCategory, ContentBlockCategoryComponents, type ContentBlockCategoryProps, type CoreInfoData, CoreInfoSection, type CoreInfoSectionProps, type CoreInfoStyles, CustomCodeSection, type CustomCodeSectionProps, DeprecatedCategory, DeprecatedCategoryComponents, type DeprecatedCategoryProps, Directory, DirectoryCategory, DirectoryCategoryComponents, type DirectoryCategoryProps, 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, type GalleryImageType, 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 ImageProps, type InsightData, InsightSection, type InsightSectionProps, type InsightSectionType, type InsightStruct, type InsightStyles, KnowledgeGraphIcon, LayoutBlockCategory, LayoutBlockCategoryComponents, type LayoutBlockCategoryProps, LocatorCategory, LocatorCategoryComponents, type LocatorCategoryProps, LocatorComponent, type LocatorProps, 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, 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, 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, fetchReviewsForEntity, filterComponentsFromConfig, filterMaxWidths, getAggregateRating, getAnalyticsScopeHash, getFontWeightOptions, getFontWeightOverrideOptions, getLocationPath, getMaxWidthOptions, getPageMetadata, headingVariants, i18nComponentsInstance, i18nPlatformInstance, migrate, migrationRegistry, msg, normalizeSlug, pt, resolveComponentData, resolveYextEntityField, resolveYextStructField, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, useOverflow, usePlatformBridgeDocument, usePlatformBridgeEntityFields, usePlatformTranslation, useTailwindConfig, useTemplateProps, validateSlug, withPropOverrides };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-BKPX93xf.cjs");function N(){return n.la().name!=="browser"||window.hasOwnProperty("debuggerInitialized")?null:(window.debuggerInitialized=!0,n.reactDomExports.createPortal(n.nt.jsx(j,{}),document.body))}const k=(e,a)=>{const s=e.dataset.yaAction,t=e.dataset.yaScopeoverride,o=e.dataset.yaEventname,i=t||a;return{action:s,originalEventName:i?`${i}_${o}`:o,scope:i}},S=(e,a)=>{const s=[];let t=e;for(;t!=null&&t.parentElement;)t=t.parentElement.closest(a),t&&s.push(t);return s},v={},w="YA_NO_SCOPE",y=(e,a,s,t)=>{v.hasOwnProperty(e)?v[e].events.map(o=>o.el).includes(t)||(v[e].events=[...v[e].events,{eventData:a,el:t}]):v[e]={scopeEl:s||t,events:[{eventData:a,el:t}]}};function j(){const[e,a]=n.reactExports.useState(),[s,t]=n.reactExports.useState([]),[o,i]=n.reactExports.useState(!1),l=r=>{a(e===r?void 0:r)};return n.reactExports.useEffect(()=>{let r=null;const d=()=>{r&&r.abort(),r=new AbortController;const c=r.signal;document.documentElement.classList.add("xYextDebug"),document.querySelectorAll("[data-ya-eventname]").forEach((u,E)=>{const m=u.closest("[data-ya-scope]"),h=m?.dataset.yaScope,p=k(u,h);u.addEventListener("mouseenter",()=>{t([{elem:u,key:`${p.originalEventName}_${E}`,action:p.action,originalEventName:p.originalEventName,scope:p.scope}])},{signal:c}),u.addEventListener("mouseleave",()=>{t([])},{signal:c});const x=u.dataset.yaScopeoverride;x?y(x,p,m,u):[h,...S(u,"[data-ya-scope]").map(b=>b.dataset.yaScope)].forEach(b=>{y(b||w,p,m,u)})}),i(!0)};d();const g=new MutationObserver(d);return g.observe(document,{childList:!0,subtree:!0}),()=>{document.documentElement.classList.remove("xYextDebug"),g.disconnect(),r?.abort()}},[]),o?n.nt.jsxs(n.nt.Fragment,{children:[n.nt.jsxs("div",{className:"analytics-debugger",children:[n.nt.jsxs("div",{className:"analytics-debugger-toggles",children:[n.nt.jsx("button",{className:n.el("analytics-debugger-toggle",{"is-active":e==="Events"}),onClick:()=>l("Events"),children:"Events"}),n.nt.jsx("button",{className:n.el("analytics-debugger-toggle",{"is-active":e==="Scopes"}),onClick:()=>l("Scopes"),children:"Scopes"})]}),e&&n.nt.jsx("div",{className:"analytics-debugger-tabs",children:e==="Events"?n.nt.jsx(C,{data:v,setTooltips:t}):n.nt.jsx($,{data:v,setTooltips:t})})]}),n.nt.jsx(D,{tooltips:s})]}):null}const Y=()=>{const e={};return Object.values(v).forEach(a=>{a.events.forEach(s=>{const{originalEventName:t}=s.eventData;e[t]||(e[t]=[]),!e[t].find(o=>o.el===s.el)&&e[t].push(s)})}),e};function C(e){const{setTooltips:a}=e,[s,t]=n.reactExports.useState([]),[o,i]=n.reactExports.useState(""),l=(r,d)=>{s.forEach(c=>c.classList.remove("analytics-event-highlight"));const g=r.map(c=>(c.el.scrollIntoView({behavior:"smooth",block:"nearest"}),c.el.classList.add("analytics-event-highlight"),c.el));t(g),i(d),a(r.map((c,u)=>({elem:c.el,key:`${c.eventData.originalEventName}_${u}`,action:c.eventData.action,originalEventName:c.eventData.originalEventName,scope:c.eventData.scope})))};return n.nt.jsxs("div",{className:"analytics-debugger-tab",children:[n.nt.jsx("h2",{className:"analytics-debugger-tab-title",children:"Event Names"}),n.nt.jsx("ul",{className:"analytics-debugger-list",children:Object.entries(Y()).map(([r,d],g)=>{const c=`${r}_${g}`;return n.nt.jsx("li",{className:"analytics-debugger-listItem",children:n.nt.jsx("button",{className:n.el("analytics-debugger-button",{"is-active":c===o}),onClick:()=>l(d,c),children:r})},c)})})]})}function $(e){const{data:a,setTooltips:s}=e,[t,o]=n.reactExports.useState(""),i=l=>{const r=a[l];r.scopeEl&&(r.scopeEl.scrollIntoView({behavior:"smooth",block:"nearest"}),o(l),s(r.events.map((d,g)=>{const c=d.eventData;return{elem:d.el,key:`${c.originalEventName}_${g}`,action:c.action,originalEventName:c.originalEventName,scope:c.scope}})))};return n.nt.jsxs("div",{className:"analytics-debugger-tab",children:[n.nt.jsx("h2",{className:"analytics-debugger-tab-title",children:"Scope Names"}),n.nt.jsx("ul",{className:"analytics-debugger-list",children:Object.keys(a).map((l,r)=>{if(l!==w)return n.nt.jsx("li",{className:"analytics-debugger-listItem",children:n.nt.jsx("button",{className:n.el("analytics-debugger-button",{"is-active":l===t}),onClick:()=>i(l),children:l})},l+r)})})]})}function D(e){const a=n.reactExports.useRef({});return n.reactExports.useEffect(()=>{if(a.current)for(const s of Object.values(a.current)){const t=Object.values(a.current).map(o=>o.el).filter(o=>o!==s.el);O(s,t),s.el.style.visibility="visible"}},[e.tooltips]),n.nt.jsx(n.nt.Fragment,{children:e.tooltips.map(s=>n.nt.jsxs("div",{style:{visibility:"hidden"},className:"analytics-debugger-tooltip",ref:t=>{t?a.current[s.key]={el:t,tooltip:s}:delete a.current[s.key]},children:[n.nt.jsxs("span",{children:["Action: ",s.action]}),n.nt.jsx("br",{}),n.nt.jsxs("span",{children:["Scope: ",s.scope]}),n.nt.jsx("br",{}),n.nt.jsxs("span",{children:["Original Event Name: ",s.originalEventName]})]},s.key))})}function O(e,a){for(let s=0;s<9;s++){const t=I(e.tooltip.elem.getBoundingClientRect(),e.el,s);if(e.el.style.inset=`${t.top} auto auto ${t.left}`,!!B(e.el.getBoundingClientRect().left,e.el.getBoundingClientRect().top+window.scrollY,e.el.getBoundingClientRect().right,e.el.getBoundingClientRect().bottom+window.scrollY))continue;let o=!0;for(let i=0;i<a.length;i++){const l=a[i];R(e.el,l)&&(o=!1)}if(o)break}}function R(e,a){const s=e.getBoundingClientRect().top+window.scrollY,t=e.getBoundingClientRect().left,o=s+e.clientHeight,i=t+e.clientWidth,l=a.getBoundingClientRect().top+window.scrollY,r=a.getBoundingClientRect().left,d=l+a.clientHeight,g=r+a.clientWidth,c=(u,E,m,h,p,x,b,f)=>m<=p&&p<=b&&h<=x&&x<=f||m<=u&&u<=b&&h<=E&&E<=f||m<=u&&u<=b&&h<=x&&x<=f||m<=p&&p<=b&&h<=E&&E<=f;return c(t,s,r,l,i,o,g,d)||c(r,l,t,s,g,d,i,o)}function B(e,a,s,t){return e<0||s>window.innerWidth||a<0||t>document.documentElement.scrollHeight}function I(e,a,s){const t=a.clientHeight,o=a.clientWidth;let i,l;switch(s){case 0:{l=window.scrollY+e.top-t+"px",i=e.left-o+"px";break}case 1:{l=window.scrollY+e.top-t+"px",i=e.left+"px";break}case 2:{l=window.scrollY+e.top-t+"px",i=e.right+"px";break}case 3:{l=window.scrollY+e.top-t+"px",i=e.right-o+"px";break}case 4:{l=window.scrollY+e.bottom+"px",i=e.left-o+"px";break}case 5:{l=window.scrollY+e.bottom+"px",i=e.left+"px";break}case 6:{l=window.scrollY+e.bottom+"px",i=e.right-o+"px";break}case 7:{l=window.scrollY+e.bottom+"px",i=e.right+"px";break}default:l=0,i=0}return{top:l,left:i}}exports.AnalyticsDebuggerInternal=j;exports.default=N;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as b, n as l, e as w, a as k, l as S } from "./index-
|
|
1
|
+
import { r as b, n as l, e as w, a as k, l as S } from "./index-BOS5ghXn.js";
|
|
2
2
|
function P() {
|
|
3
3
|
return S().name !== "browser" || window.hasOwnProperty("debuggerInitialized") ? null : (window.debuggerInitialized = !0, k.createPortal(/* @__PURE__ */ l.jsx($, {}), document.body));
|
|
4
4
|
}
|