@yext/visual-editor 0.0.46 → 0.0.48

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
@@ -6,7 +6,7 @@ import * as i18next from 'i18next';
6
6
  import { TOptions } from 'i18next';
7
7
  import * as _measured_puck from '@measured/puck';
8
8
  import { Field, CustomField, Data, DefaultComponentProps, DefaultRootProps, Config, ComponentConfig, ArrayField, BaseField, ObjectField, NumberField } from '@measured/puck';
9
- import { CTA as CTA$1, ImageType, LinkType, HoursTableProps as HoursTableProps$1, ComplexImageType, HoursType, AddressType, DayOfWeekNames, Coordinate } from '@yext/pages-components';
9
+ import { AddressType, CTA as CTA$1, ImageType, LinkType, HoursTableProps as HoursTableProps$1, ComplexImageType, HoursType, DayOfWeekNames, Coordinate } from '@yext/pages-components';
10
10
  import { ClassValue } from 'clsx';
11
11
  import * as _yext_search_headless_react from '@yext/search-headless-react';
12
12
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
@@ -45,9 +45,71 @@ type StreamFields = {
45
45
  declare const usePlatformBridgeEntityFields: () => StreamFields | null;
46
46
  declare const useEntityFields: () => StreamFields | null;
47
47
 
48
+ type CoreStyle = {
49
+ label: string;
50
+ type: "number";
51
+ default: number;
52
+ } | {
53
+ label: string;
54
+ type: "select";
55
+ default: string;
56
+ options: StyleSelectOption[] | (() => StyleSelectOption[]);
57
+ } | {
58
+ label: string;
59
+ type: "color";
60
+ default: string;
61
+ };
62
+ type Style = CoreStyle & {
63
+ plugin: string;
64
+ };
65
+ type StyleSelectOption = {
66
+ label: string;
67
+ value: string;
68
+ };
69
+ type StyleGroup = {
70
+ label: string;
71
+ plugin: string;
72
+ styles: {
73
+ [key: string]: CoreStyle;
74
+ };
75
+ };
76
+ type ThemeConfigSection = {
77
+ label: string;
78
+ styles: {
79
+ [key: string]: Style | StyleGroup;
80
+ };
81
+ };
82
+ type ThemeConfig = {
83
+ [key: string]: ThemeConfigSection;
84
+ };
85
+ type TailwindConfig = {
86
+ [key: string]: {
87
+ [key: string]: any;
88
+ };
89
+ };
90
+ /**
91
+ * Merges the developer-specified theming and the marketer-specified theming,
92
+ * giving priority to the developer-specified theming.
93
+ */
94
+ declare const themeResolver: (developerTheming: TailwindConfig, marketerTheming: ThemeConfig) => TailwindConfig;
95
+
96
+ type Document = {
97
+ [key: string]: any;
98
+ __?: {
99
+ layout?: string;
100
+ theme?: string;
101
+ codeTemplate?: string;
102
+ name?: string;
103
+ };
104
+ };
105
+ declare const applyTheme: (document: Document, themeConfig: ThemeConfig, base?: string) => string;
106
+
48
107
  declare const TemplatePropsContext: React$1.Context<any>;
49
- declare const useTemplateProps: <T>() => T;
50
- declare const useDocument: <T>() => T;
108
+ declare const useTemplateProps: <T = {
109
+ document: Record<string, any>;
110
+ relativePrefixToRoot?: string;
111
+ }>() => T;
112
+ declare const useDocument: <T = Document>() => T;
51
113
 
52
114
  declare const TailwindConfigContext: React$1.Context<any>;
53
115
  declare const useTailwindConfig: <T>() => T;
@@ -85,6 +147,7 @@ type ComboboxOptionGroup = {
85
147
  type BackgroundStyle = {
86
148
  bgColor: string;
87
149
  textColor: string;
150
+ isDarkBackground?: boolean;
88
151
  };
89
152
  type BackgroundOption = {
90
153
  label: string;
@@ -179,71 +242,12 @@ declare const ThemeOptions: {
179
242
  }[];
180
243
  };
181
244
 
182
- declare const useBackground: () => BackgroundStyle | undefined;
245
+ declare const useBackground: () => Required<BackgroundStyle> | undefined;
183
246
  declare const BackgroundProvider: ({ children, value, }: {
184
247
  children: ReactNode;
185
- value: BackgroundStyle;
248
+ value: Required<BackgroundStyle>;
186
249
  }) => react_jsx_runtime.JSX.Element;
187
250
 
188
- type CoreStyle = {
189
- label: string;
190
- type: "number";
191
- default: number;
192
- } | {
193
- label: string;
194
- type: "select";
195
- default: string;
196
- options: StyleSelectOption[] | (() => StyleSelectOption[]);
197
- } | {
198
- label: string;
199
- type: "color";
200
- default: string;
201
- };
202
- type Style = CoreStyle & {
203
- plugin: string;
204
- };
205
- type StyleSelectOption = {
206
- label: string;
207
- value: string;
208
- };
209
- type StyleGroup = {
210
- label: string;
211
- plugin: string;
212
- styles: {
213
- [key: string]: CoreStyle;
214
- };
215
- };
216
- type ThemeConfigSection = {
217
- label: string;
218
- styles: {
219
- [key: string]: Style | StyleGroup;
220
- };
221
- };
222
- type ThemeConfig = {
223
- [key: string]: ThemeConfigSection;
224
- };
225
- type TailwindConfig = {
226
- [key: string]: {
227
- [key: string]: any;
228
- };
229
- };
230
- /**
231
- * Merges the developer-specified theming and the marketer-specified theming,
232
- * giving priority to the developer-specified theming.
233
- */
234
- declare const themeResolver: (developerTheming: TailwindConfig, marketerTheming: ThemeConfig) => TailwindConfig;
235
-
236
- type Document = {
237
- [key: string]: any;
238
- __?: {
239
- layout?: string;
240
- theme?: string;
241
- codeTemplate?: string;
242
- name?: string;
243
- };
244
- };
245
- declare const applyTheme: (document: Document, themeConfig: ThemeConfig, base?: string) => string;
246
-
247
251
  type Only<T, U> = {
248
252
  [P in keyof T]: T[P];
249
253
  } & {
@@ -307,15 +311,16 @@ type StructSelectorProps = {
307
311
  };
308
312
  declare const YextStructFieldSelector: <U extends Record<string, any>>(props: StructSelectorProps) => CustomField<YextStructEntityField<U>>;
309
313
 
310
- declare const resolveYextEntityField: <T>(document: any, entityField: YextEntityField<T>) => T | undefined;
311
- declare const resolveYextStructField: <T extends Record<string, any>>(document: any, entityField: YextStructEntityField<T>) => T | undefined;
314
+ declare const resolveYextEntityField: <T>(document: any, entityField: YextEntityField<T>, locale?: string) => T | undefined;
315
+ declare const resolveYextStructField: <T extends Record<string, any>>(document: any, entityField: YextStructEntityField<T>, locale?: string) => T | undefined;
312
316
 
313
317
  /**
314
318
  * Converts a type TranslatableString to a string
315
319
  * @param translatableString
316
320
  * @param locale
321
+ * @param document
317
322
  */
318
- declare const resolveTranslatableString: (translatableString?: TranslatableString, locale?: string) => string;
323
+ declare const resolveTranslatableString: (translatableString?: TranslatableString, locale?: string, document?: any) => string;
319
324
  /**
320
325
  * Converts a type TranslatableRichText to string or RTF Element
321
326
  * @param translatableRichText
@@ -423,8 +428,9 @@ type RootConfig = {
423
428
  };
424
429
  declare function getPageMetadata(document: Record<string, any>): RootConfig;
425
430
 
426
- declare const fetchNearbyLocations: ({ businessId, apiKey, contentEndpointId, contentDeliveryAPIDomain, latitude, longitude, radiusMi, limit, }: {
431
+ declare const fetchNearbyLocations: ({ businessId, entityId, apiKey, contentEndpointId, contentDeliveryAPIDomain, latitude, longitude, radiusMi, limit, locale, }: {
427
432
  businessId: string;
433
+ entityId: string;
428
434
  apiKey: string;
429
435
  contentEndpointId: string;
430
436
  contentDeliveryAPIDomain: string;
@@ -432,6 +438,7 @@ declare const fetchNearbyLocations: ({ businessId, apiKey, contentEndpointId, co
432
438
  latitude: number;
433
439
  radiusMi: number;
434
440
  limit: number;
441
+ locale: string;
435
442
  }) => Promise<Record<string, any>>;
436
443
 
437
444
  declare const fetchLocalesToPathsForEntity: ({ businessId, apiKey, contentEndpointId, contentDeliveryAPIDomain, entityId, }: {
@@ -500,6 +507,13 @@ declare function withPropOverrides<P extends DefaultComponentProps>(base: Compon
500
507
 
501
508
  declare const i18nComponentsInstance: i18next.i18n;
502
509
 
510
+ interface LocationDocument extends Record<string, any> {
511
+ slug?: string;
512
+ id: string;
513
+ address?: AddressType;
514
+ }
515
+ declare const getLocationPath: (location: LocationDocument, locale: string, relativePrefixToRoot: string | undefined) => string | undefined;
516
+
503
517
  type TranslatableCTA = Omit<CTA$1, "label"> & {
504
518
  label: TranslatableString;
505
519
  };
@@ -752,9 +766,9 @@ declare const KnowledgeGraphIcon: ({ enabled }: {
752
766
  /**
753
767
  * Generates a translatable string config
754
768
  * @param label optional label. Takes in a value from msg.
755
- * @param fieldType text or textarea display mode
769
+ * @param filter optional filter for the entity fields that can be embedded.
756
770
  */
757
- declare function TranslatableStringField<T extends TranslatableString | undefined = TranslatableString>(label?: MsgString, fieldType?: "text" | "textarea"): CustomField<T>;
771
+ declare function TranslatableStringField<T extends TranslatableString | undefined = TranslatableString>(label?: MsgString, filter?: RenderEntityFieldFilter<any>): CustomField<T>;
758
772
 
759
773
  /**
760
774
  * Generates a translatableRichText field config
@@ -762,6 +776,15 @@ declare function TranslatableStringField<T extends TranslatableString | undefine
762
776
  */
763
777
  declare function TranslatableRichTextField<T extends TranslatableRichText | undefined = TranslatableRichText>(label?: MsgString): CustomField<T>;
764
778
 
779
+ /**
780
+ * A debounced string input that allows embedding entity fields via a popover selector.
781
+ */
782
+ declare const EmbeddedFieldStringInput: <T extends Record<string, any>>({ value, onChange, filter, }: {
783
+ value: string;
784
+ onChange: (value: string) => void;
785
+ filter: RenderEntityFieldFilter<T>;
786
+ }) => react_jsx_runtime.JSX.Element;
787
+
765
788
  declare const bodyVariants: (props?: ({
766
789
  variant?: "sm" | "lg" | "base" | "xs" | null | undefined;
767
790
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
@@ -911,7 +934,6 @@ type AggregateRating = {
911
934
  };
912
935
  type ReviewStarsProps = {
913
936
  averageRating: number;
914
- hasDarkBackground: boolean;
915
937
  reviewCount?: number;
916
938
  };
917
939
  declare const ReviewStars: (props: ReviewStarsProps) => react_jsx_runtime.JSX.Element;
@@ -979,6 +1001,7 @@ interface CoreInfoSectionProps {
979
1001
  phoneFormat: "domestic" | "international";
980
1002
  includePhoneHyperlink: boolean;
981
1003
  emailsListLength?: number;
1004
+ ctaVariant: CTAProps["variant"];
982
1005
  };
983
1006
  hours: {
984
1007
  startOfWeek: keyof DayOfWeekNames | "today";
@@ -1007,6 +1030,7 @@ interface EventSectionProps {
1007
1030
  cards: {
1008
1031
  headingLevel: HeadingLevel;
1009
1032
  backgroundColor?: BackgroundStyle;
1033
+ ctaVariant: CTAProps["variant"];
1010
1034
  };
1011
1035
  };
1012
1036
  analytics?: {
@@ -1059,6 +1083,7 @@ interface InsightSectionProps {
1059
1083
  cards: {
1060
1084
  headingLevel: HeadingLevel;
1061
1085
  backgroundColor?: BackgroundStyle;
1086
+ ctaVariant: CTAProps["variant"];
1062
1087
  };
1063
1088
  };
1064
1089
  analytics?: {
@@ -1116,6 +1141,7 @@ interface ProductSectionProps {
1116
1141
  cards: {
1117
1142
  headingLevel: HeadingLevel;
1118
1143
  backgroundColor?: BackgroundStyle;
1144
+ ctaVariant: CTAProps["variant"];
1119
1145
  };
1120
1146
  };
1121
1147
  analytics?: {
@@ -1182,6 +1208,14 @@ interface FAQSectionProps {
1182
1208
  }
1183
1209
  declare const FAQSection: ComponentConfig<FAQSectionProps>;
1184
1210
 
1211
+ type ReviewsSectionProps = {
1212
+ backgroundColor: BackgroundStyle;
1213
+ analytics?: {
1214
+ scope?: string;
1215
+ };
1216
+ };
1217
+ declare const ReviewsSection: ComponentConfig<ReviewsSectionProps>;
1218
+
1185
1219
  interface TestimonialSectionProps {
1186
1220
  data: {
1187
1221
  heading: YextEntityField<TranslatableString>;
@@ -1216,6 +1250,7 @@ interface TeamSectionProps {
1216
1250
  cards: {
1217
1251
  headingLevel: HeadingLevel;
1218
1252
  backgroundColor?: BackgroundStyle;
1253
+ ctaVariant: CTAProps["variant"];
1219
1254
  };
1220
1255
  };
1221
1256
  analytics?: {
@@ -1348,7 +1383,9 @@ interface ExpandedHeaderProps {
1348
1383
  logo: string;
1349
1384
  links: TranslatableCTA[];
1350
1385
  primaryCTA?: TranslatableCTA;
1386
+ showPrimaryCTA: boolean;
1351
1387
  secondaryCTA?: TranslatableCTA;
1388
+ showSecondaryCTA: boolean;
1352
1389
  };
1353
1390
  secondaryHeader: {
1354
1391
  show: boolean;
@@ -1383,6 +1420,7 @@ declare const Footer: ComponentConfig<FooterProps>;
1383
1420
 
1384
1421
  interface DirectoryProps {
1385
1422
  data: {
1423
+ title: YextEntityField<TranslatableString>;
1386
1424
  directoryRoot: TranslatableString;
1387
1425
  };
1388
1426
  styles: {
@@ -1458,6 +1496,7 @@ interface ExpandedFooterProps {
1458
1496
  scope?: string;
1459
1497
  };
1460
1498
  }
1499
+ declare const ExpandedFooter: ComponentConfig<ExpandedFooterProps>;
1461
1500
 
1462
1501
  interface PageSectionCategoryProps {
1463
1502
  BannerSection: BannerSectionProps;
@@ -1471,6 +1510,7 @@ interface PageSectionCategoryProps {
1471
1510
  PhotoGallerySection: PhotoGallerySectionProps;
1472
1511
  ProductSection: ProductSectionProps;
1473
1512
  PromoSection: PromoSectionProps;
1513
+ ReviewsSection: ReviewsSectionProps;
1474
1514
  StaticMapSection: StaticMapSectionProps;
1475
1515
  TeamSection: TeamSectionProps;
1476
1516
  TestimonialSection: TestimonialSectionProps;
@@ -1487,6 +1527,7 @@ declare const PageSectionCategoryComponents: {
1487
1527
  PhotoGallerySection: _measured_puck.ComponentConfig<PhotoGallerySectionProps>;
1488
1528
  ProductSection: _measured_puck.ComponentConfig<ProductSectionProps>;
1489
1529
  PromoSection: _measured_puck.ComponentConfig<PromoSectionProps>;
1530
+ ReviewsSection: _measured_puck.ComponentConfig<ReviewsSectionProps>;
1490
1531
  StaticMapSection: _measured_puck.ComponentConfig<StaticMapSectionProps>;
1491
1532
  TeamSection: _measured_puck.ComponentConfig<TeamSectionProps>;
1492
1533
  TestimonialSection: _measured_puck.ComponentConfig<TestimonialSectionProps>;
@@ -1564,14 +1605,6 @@ declare const ContentBlockCategoryComponents: {
1564
1605
  };
1565
1606
  declare const ContentBlockCategory: (keyof ContentBlockCategoryProps)[];
1566
1607
 
1567
- type ReviewsSectionProps = {
1568
- backgroundColor: BackgroundStyle;
1569
- analytics?: {
1570
- scope?: string;
1571
- };
1572
- };
1573
- declare const ReviewsSection: ComponentConfig<ReviewsSectionProps>;
1574
-
1575
1608
  type SectionContainerProps = {
1576
1609
  background?: BackgroundStyle;
1577
1610
  sectionHeading: {
@@ -1589,4 +1622,4 @@ declare const addHeadingAlignmentMigration: Migration;
1589
1622
 
1590
1623
  declare const defaultThemeConfig: ThemeConfig;
1591
1624
 
1592
- export { Address, type AddressProps, type AggregateRating, Background, type BackgroundProps, BackgroundProvider, type BackgroundStyle, BannerSection, type BannerSectionProps, BasicSelector, Body, type BodyProps, BodyText, type BodyTextProps, BreadcrumbsSection, type BreadcrumbsSectionProps, Button, type ButtonProps, CTA, type CTAProps, CTAWrapper, type CTAWrapperProps, type ComponentField, ComponentFields, ContentBlockCategory, ContentBlockCategoryComponents, type ContentBlockCategoryProps, CoreInfoSection, type CoreInfoSectionProps, DeprecatedCategory, DeprecatedCategoryComponents, type DeprecatedCategoryProps, Directory, DirectoryCategory, DirectoryCategoryComponents, type DirectoryCategoryProps, type DirectoryProps, Editor, Emails, type EmailsProps, EntityField, EventSection, type EventSectionProps, type EventSectionType, type EventStruct, ExpandedHeader, type ExpandedHeaderProps, FAQSection, type FAQSectionProps, type FAQSectionType, type FAQStruct, Flex, type FlexProps, type FontRegistry, FontSizeSelector, Footer, type FooterProps, type GalleryImageType, GetDirections, type GetDirectionsProps, Grid, type GridProps, Header, type HeaderProps, Heading, type HeadingLevel, type HeadingProps, HeadingText, type HeadingTextProps, HeroSection, type HeroSectionProps, type HeroSectionType, HoursStatus, HoursStatusAtom, type HoursStatusAtomProps, type HoursStatusProps, HoursTable, HoursTableAtom, type HoursTableAtomProps, type HoursTableProps, Image, type ImageProps, ImageWrapper, type ImageWrapperProps, InsightSection, type InsightSectionProps, type InsightSectionType, type InsightStruct, KnowledgeGraphIcon, LayoutBlockCategory, LayoutBlockCategoryComponents, type LayoutBlockCategoryProps, LocatorCategory, LocatorCategoryComponents, type LocatorCategoryProps, LocatorComponent, type LocatorProps, MapboxStaticMap, type MapboxStaticProps, MaybeLink, type MaybeLinkProps, MaybeRTF, type MaybeRTFProps, type Migration, type MigrationAction, type MigrationRegistry, NearbyLocationsSection, type NearbyLocationsSectionProps, OptionalNumberField, type OptionalNumberFieldProps, OtherCategory, OtherCategoryComponents, type OtherCategoryProps, PageSection, PageSectionCategory, PageSectionCategoryComponents, type PageSectionCategoryProps, type PageSectionProps, type PersonStruct, Phone, PhoneAtom, type PhoneAtomProps, type PhoneProps, PhotoGallerySection, type PhotoGallerySectionProps, ProductSection, type ProductSectionProps, type ProductSectionType, type ProductStruct, PromoSection, type PromoSectionProps, type PromoSectionType, type RenderYextEntityFieldSelectorProps, ReviewStars, type ReviewStarsProps, ReviewsSection, type ReviewsSectionProps, type RichText, SectionContainer, type SectionContainerProps, SpacingSelector, TailwindConfigContext, TeamSection, type TeamSectionProps, type TeamSectionType, TemplatePropsContext, TestimonialSection, type TestimonialSectionProps, type TestimonialSectionType, type TestimonialStruct, TextList, type TextListProps, type ThemeConfig, ThemeOptions, Timestamp, TimestampOption, type TimestampProps, 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, getAggregateRating, getAnalyticsScopeHash, getFontWeightOptions, getFontWeightOverrideOptions, getPageMetadata, headingVariants, i18nComponentsInstance, i18nPlatformInstance, migrate, migrationRegistry, msg, normalizeSlug, pt, resolveTranslatableRichText, resolveTranslatableString, resolveYextEntityField, resolveYextStructField, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields, usePlatformTranslation, useTailwindConfig, useTemplateProps, validateSlug, withPropOverrides };
1625
+ export { Address, type AddressProps, type AggregateRating, Background, type BackgroundProps, BackgroundProvider, type BackgroundStyle, BannerSection, type BannerSectionProps, BasicSelector, Body, type BodyProps, BodyText, type BodyTextProps, BreadcrumbsSection, type BreadcrumbsSectionProps, Button, type ButtonProps, CTA, type CTAProps, CTAWrapper, type CTAWrapperProps, type ComponentField, ComponentFields, ContentBlockCategory, ContentBlockCategoryComponents, type ContentBlockCategoryProps, CoreInfoSection, type CoreInfoSectionProps, DeprecatedCategory, DeprecatedCategoryComponents, type DeprecatedCategoryProps, Directory, DirectoryCategory, DirectoryCategoryComponents, type DirectoryCategoryProps, type DirectoryProps, Editor, Emails, type EmailsProps, EmbeddedFieldStringInput, EntityField, EventSection, type EventSectionProps, type EventSectionType, type EventStruct, ExpandedFooter, type ExpandedFooterProps, ExpandedHeader, type ExpandedHeaderProps, FAQSection, type FAQSectionProps, type FAQSectionType, type FAQStruct, Flex, type FlexProps, type FontRegistry, FontSizeSelector, Footer, type FooterProps, type GalleryImageType, GetDirections, type GetDirectionsProps, Grid, type GridProps, Header, type HeaderProps, Heading, type HeadingLevel, type HeadingProps, HeadingText, type HeadingTextProps, HeroSection, type HeroSectionProps, type HeroSectionType, HoursStatus, HoursStatusAtom, type HoursStatusAtomProps, type HoursStatusProps, HoursTable, HoursTableAtom, type HoursTableAtomProps, type HoursTableProps, Image, type ImageProps, ImageWrapper, type ImageWrapperProps, InsightSection, type InsightSectionProps, type InsightSectionType, type InsightStruct, KnowledgeGraphIcon, LayoutBlockCategory, LayoutBlockCategoryComponents, type LayoutBlockCategoryProps, LocatorCategory, LocatorCategoryComponents, type LocatorCategoryProps, LocatorComponent, type LocatorProps, MapboxStaticMap, type MapboxStaticProps, MaybeLink, type MaybeLinkProps, MaybeRTF, type MaybeRTFProps, type Migration, type MigrationAction, type MigrationRegistry, NearbyLocationsSection, type NearbyLocationsSectionProps, OptionalNumberField, type OptionalNumberFieldProps, OtherCategory, OtherCategoryComponents, type OtherCategoryProps, PageSection, PageSectionCategory, PageSectionCategoryComponents, type PageSectionCategoryProps, type PageSectionProps, type PersonStruct, Phone, PhoneAtom, type PhoneAtomProps, type PhoneProps, PhotoGallerySection, type PhotoGallerySectionProps, ProductSection, type ProductSectionProps, type ProductSectionType, type ProductStruct, PromoSection, type PromoSectionProps, type PromoSectionType, type RenderYextEntityFieldSelectorProps, ReviewStars, type ReviewStarsProps, ReviewsSection, type ReviewsSectionProps, type RichText, SectionContainer, type SectionContainerProps, SpacingSelector, TailwindConfigContext, TeamSection, type TeamSectionProps, type TeamSectionType, TemplatePropsContext, TestimonialSection, type TestimonialSectionProps, type TestimonialSectionType, type TestimonialStruct, TextList, type TextListProps, type ThemeConfig, ThemeOptions, Timestamp, TimestampOption, type TimestampProps, 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, getAggregateRating, getAnalyticsScopeHash, getFontWeightOptions, getFontWeightOverrideOptions, getLocationPath, getPageMetadata, headingVariants, i18nComponentsInstance, i18nPlatformInstance, migrate, migrationRegistry, msg, normalizeSlug, pt, resolveTranslatableRichText, resolveTranslatableString, resolveYextEntityField, resolveYextStructField, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields, usePlatformTranslation, useTailwindConfig, useTemplateProps, validateSlug, withPropOverrides };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-eZDH6Ewi.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-VxR-Uzc8.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-VSKE1T0Y.js";
1
+ import { r as b, n as l, e as w, a as k, l as S } from "./index-CKR-HS0G.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
  }