@yext/visual-editor 0.0.59 → 0.0.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -8,9 +8,9 @@ import { ClassValue } from 'clsx';
8
8
  import * as _measured_puck from '@measured/puck';
9
9
  import { Config, Data, DefaultComponentProps, DefaultRootProps, Field, CustomField, ComponentConfig, ArrayField, BaseField, ObjectField, NumberField, Slot } from '@measured/puck';
10
10
  import { ImageType, CTA as CTA$1, LinkType, HoursTableProps as HoursTableProps$1, ComplexImageType, HoursType, AddressType, Coordinate, DayOfWeekNames } from '@yext/pages-components';
11
- import * as _yext_search_headless_react from '@yext/search-headless-react';
12
11
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
13
12
  import { VariantProps } from 'class-variance-authority';
13
+ import * as _yext_search_headless_react from '@yext/search-headless-react';
14
14
  import * as react_jsx_runtime_js from 'react/jsx-runtime.js';
15
15
  import * as TogglePrimitive from '@radix-ui/react-toggle';
16
16
 
@@ -382,7 +382,7 @@ type RootConfig = {
382
382
  };
383
383
  declare function getPageMetadata(document: Record<string, any>): RootConfig;
384
384
 
385
- declare const getSchema: (document: Record<string, any>) => string;
385
+ declare const getSchema: (document: Record<string, any>) => Record<string, any>;
386
386
 
387
387
  type MigrationAction = {
388
388
  action: "removed";
@@ -416,7 +416,11 @@ declare const migrate: (data: Data<DefaultComponentProps, RootProps>, migrationR
416
416
  * @returns The fully resolved data for the component.
417
417
  */
418
418
  declare function resolveComponentData(data: TranslatableString | YextEntityField<TranslatableString>, locale: string, streamDocument?: any): string;
419
- declare function resolveComponentData(data: TranslatableRichText | YextEntityField<TranslatableRichText>, locale: string, streamDocument?: any): string | React__default.ReactElement;
419
+ declare function resolveComponentData(data: TranslatableRichText | YextEntityField<TranslatableRichText>, locale: string, streamDocument?: any, options?: {
420
+ variant?: BodyProps["variant"];
421
+ isDarkBackground?: boolean;
422
+ className?: string;
423
+ }): string | React__default.ReactElement;
420
424
  declare function resolveComponentData<T>(data: YextEntityField<T>, locale: string, streamDocument?: any): T | undefined;
421
425
 
422
426
  type Only<T, U> = {
@@ -984,7 +988,6 @@ type BasicSelectorProps = {
984
988
  noOptionsPlaceholder?: string;
985
989
  noOptionsMessage?: string;
986
990
  disableSearch?: boolean;
987
- icon?: React__default.ReactNode;
988
991
  } & ({
989
992
  options: ComboboxOption[];
990
993
  optionGroups?: never;
@@ -1114,7 +1117,7 @@ declare const filterMaxWidths: (styleElement: HTMLStyleElement) => {
1114
1117
  };
1115
1118
 
1116
1119
  declare const bodyVariants: (props?: ({
1117
- variant?: "sm" | "lg" | "base" | "xs" | null | undefined;
1120
+ variant?: "base" | "sm" | "lg" | "xs" | null | undefined;
1118
1121
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
1119
1122
  interface BodyProps extends Omit<React.HTMLAttributes<HTMLParagraphElement>, "color">, VariantProps<typeof bodyVariants> {
1120
1123
  }
@@ -1160,7 +1163,7 @@ declare const CTA: (props: CTAProps) => react_jsx_runtime_js.JSX.Element | null;
1160
1163
 
1161
1164
  declare const headingVariants: (props?: ({
1162
1165
  level?: 2 | 1 | 3 | 4 | 5 | 6 | null | undefined;
1163
- fontSize?: "default" | "sm" | "lg" | "base" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
1166
+ fontSize?: "default" | "base" | "sm" | "lg" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
1164
1167
  weight?: "default" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | null | undefined;
1165
1168
  transform?: "none" | "uppercase" | "lowercase" | "capitalize" | null | undefined;
1166
1169
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
@@ -1180,8 +1183,25 @@ interface ImageProps {
1180
1183
  aspectRatio?: number;
1181
1184
  width?: number;
1182
1185
  className?: string;
1186
+ /** sizes attribute of the underlying img tag */
1187
+ sizes?: string;
1183
1188
  }
1184
1189
  declare const Image: React.FC<ImageProps>;
1190
+ type ImgSizesByBreakpoint = {
1191
+ base: string;
1192
+ sm?: string;
1193
+ md?: string;
1194
+ lg?: string;
1195
+ xl?: string;
1196
+ "2xl"?: string;
1197
+ };
1198
+ /**
1199
+ * Creates an img sizes attribute based on the default Tailwind breakpoints.
1200
+ * Replaces `maxWidth` with the current page section max width from the theme.
1201
+ * @param sizes - the width of the image at different breakpoints
1202
+ * @returns a string for the sizes attribute of an img tag
1203
+ */
1204
+ declare const imgSizesHelper: (sizes: ImgSizesByBreakpoint) => string;
1185
1205
 
1186
1206
  type MaybeLinkProps = {
1187
1207
  href?: string;
@@ -1200,7 +1220,7 @@ interface MaybeRTFProps extends Record<string, any> {
1200
1220
  declare const MaybeRTF: ({ data, bodyVariant, ...props }: MaybeRTFProps) => react_jsx_runtime.JSX.Element;
1201
1221
 
1202
1222
  declare const pageSectionVariants: (props?: ({
1203
- verticalPadding?: "default" | "sm" | "none" | "footer" | "header" | "footerSecondary" | null | undefined;
1223
+ verticalPadding?: "default" | "footer" | "header" | "sm" | "none" | "footerSecondary" | null | undefined;
1204
1224
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
1205
1225
  declare const maxWidthVariants: (props?: ({
1206
1226
  maxWidth?: "theme" | "768px" | "960px" | "1024px" | "1280px" | "1440px" | "fullWidth" | null | undefined;
@@ -1251,7 +1271,7 @@ interface HoursStatusAtomProps {
1251
1271
  dayOfWeekFormat?: "short" | "long";
1252
1272
  timezone?: string;
1253
1273
  }
1254
- declare const HoursStatusAtom: ({ hours, className, showCurrentStatus, showDayNames, timeFormat, dayOfWeekFormat, timezone, }: HoursStatusAtomProps) => any;
1274
+ declare const HoursStatusAtom: React.MemoExoticComponent<({ hours, className, showCurrentStatus, showDayNames, timeFormat, dayOfWeekFormat, timezone, }: HoursStatusAtomProps) => any>;
1255
1275
 
1256
1276
  declare enum TimestampOption {
1257
1277
  DATE = "DATE",
@@ -4284,10 +4304,12 @@ interface MainConfigProps extends PageSectionCategoryProps, DeprecatedCategoryPr
4284
4304
  declare const mainConfig: Config<MainConfigProps>;
4285
4305
 
4286
4306
  interface DirectoryConfigProps extends DirectoryCategoryProps, DeprecatedCategoryProps, OtherCategoryProps {
4307
+ BannerSection: BannerSectionProps;
4287
4308
  }
4288
4309
  declare const directoryConfig: Config<DirectoryConfigProps>;
4289
4310
 
4290
4311
  interface LocatorConfigProps extends LocatorCategoryProps, DeprecatedCategoryProps, OtherCategoryProps {
4312
+ BannerSection: BannerSectionProps;
4291
4313
  }
4292
4314
  declare const locatorConfig: Config<LocatorConfigProps>;
4293
4315
 
@@ -4311,4 +4333,4 @@ declare const addHeadingAlignmentMigration: Migration;
4311
4333
 
4312
4334
  declare const defaultThemeConfig: ThemeConfig;
4313
4335
 
4314
- export { AdvancedCoreInfoCategory, AdvancedCoreInfoCategoryComponents, type AdvancedCoreInfoCategoryProps, type AggregateRating, type AssetImageType, type AssetVideo, Background, type BackgroundProps, BackgroundProvider, type BackgroundStyle, type BannerData, BannerSection, type BannerSectionProps, type BannerStyles, BasicSelector, Body, type BodyProps, type BreadcrumbsData, BreadcrumbsSection, type BreadcrumbsSectionProps, type BreadcrumbsStyles, Button, type ButtonProps, CTA, type CTAVariant, CodeField, type CodeFieldProps, type ComponentField, ComponentFields, type CoreInfoData, CoreInfoSection, type CoreInfoSectionProps, type CoreInfoStyles, CustomCodeSection, type CustomCodeSectionProps, DeprecatedCategory, DeprecatedCategoryComponents, type DeprecatedCategoryProps, Directory, DirectoryCategory, DirectoryCategoryComponents, type DirectoryCategoryProps, type DirectoryConfigProps, type DirectoryData, type DirectoryProps, type DirectoryStyles, Editor, EmbeddedFieldStringInput, type EnhancedTranslatableCTA, EntityField, type EventData, EventSection, type EventSectionProps, type EventSectionType, type EventStruct, type EventStyles, ExpandedFooter, type ExpandedFooterData, type ExpandedFooterProps, type ExpandedFooterStyles, ExpandedHeader, type ExpandedHeaderData, type ExpandedHeaderProps, type ExpandedHeaderStyles, type FAQData, FAQSection, type FAQSectionProps, type FAQSectionType, type FAQStruct, type FAQStyles, type FontRegistry, FontSizeSelector, Footer, type FooterProps, Header, type HeaderProps, Heading, type HeadingLevel, type HeadingProps, type HeroData, HeroSection, type HeroSectionProps, type HeroSectionType, type HeroStyles, HoursStatusAtom, type HoursStatusAtomProps, HoursTableAtom, type HoursTableAtomProps, Image, type ImageContentData, type ImageProps, type InsightData, InsightSection, type InsightSectionProps, type InsightSectionType, type InsightStruct, type InsightStyles, KnowledgeGraphIcon, LocatorCategory, LocatorCategoryComponents, type LocatorCategoryProps, LocatorComponent, type LocatorConfigProps, type LocatorProps, type MainConfigProps, MaybeLink, type MaybeLinkProps, MaybeRTF, type MaybeRTFProps, type Metadata, type Migration, type MigrationAction, type MigrationRegistry, type NearbyLocationsData, NearbyLocationsSection, type NearbyLocationsSectionProps, type NearbyLocationsStyles, OptionalNumberField, type OptionalNumberFieldProps, OtherCategory, OtherCategoryComponents, type OtherCategoryProps, PageSection, PageSectionCategory, PageSectionCategoryComponents, type PageSectionCategoryProps, type PageSectionProps, type PersonStruct, PhoneAtom, type PhoneAtomProps, type PhotoGalleryData, PhotoGallerySection, type PhotoGallerySectionProps, type PhotoGalleryStyles, type PresetImageType, type ProductData, ProductSection, type ProductSectionProps, type ProductSectionType, type ProductStruct, type ProductStyles, type PromoData, PromoSection, type PromoSectionProps, type PromoSectionType, type PromoStyles, type RenderYextEntityFieldSelectorProps, ReviewStars, type ReviewStarsProps, ReviewsSection, type ReviewsSectionProps, type RichText, SectionContainer, type SectionContainerProps, SpacingSelector, StaticMapSection, type StaticMapSectionProps, type StaticMapStyles, type StreamDocument, TailwindConfigContext, TeamSection, type TeamSectionProps, type TeamSectionType, TemplatePropsContext, type TestimonialData, TestimonialSection, type TestimonialSectionProps, type TestimonialSectionType, type TestimonialStruct, type TestimonialStyles, type ThemeConfig, ThemeOptions, Timestamp, TimestampOption, type TimestampProps, Toggle, type TranslatableCTA, type TranslatableRichText, TranslatableRichTextField, type TranslatableString, TranslatableStringField, Video, type VideoData, type VideoProps, VideoSection, type VideoSectionProps, type VideoStyles, VisibilityWrapper, VisualEditorComponentsContentPath, VisualEditorProvider, type YextEntityField, YextEntityFieldSelector, YextField, type YextFieldDefinition, type YextSchemaField, type YextStructEntityField, YextStructFieldSelector, addHeadingAlignmentMigration, applyAnalytics, applyHeaderScript, applyTheme, backgroundColors, bodyVariants, buttonVariants, constructFontSelectOptions, createSearchAnalyticsConfig, createSearchHeadlessConfig, defaultFonts, defaultThemeConfig, defaultThemeTailwindExtensions, directoryConfig, fetchLocalesToPathsForEntity, fetchNearbyLocations, fetchReviewsForEntity, filterComponentsFromConfig, filterMaxWidths, getAggregateRating, getAnalyticsScopeHash, getFontWeightOptions, getFontWeightOverrideOptions, getMaxWidthOptions, getPageMetadata, getSchema, headingVariants, i18nComponentsInstance, i18nPlatformInstance, locatorConfig, mainConfig, mergeMeta, migrate, migrationRegistry, msg, normalizeSlug, pt, resolveComponentData, resolveSchemaJson, resolveUrlTemplate, resolveYextEntityField, resolveYextStructField, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, useOverflow, usePlatformBridgeDocument, usePlatformBridgeEntityFields, usePlatformTranslation, useTailwindConfig, useTemplateProps, withPropOverrides };
4336
+ export { AdvancedCoreInfoCategory, AdvancedCoreInfoCategoryComponents, type AdvancedCoreInfoCategoryProps, type AggregateRating, type AssetImageType, type AssetVideo, Background, type BackgroundProps, BackgroundProvider, type BackgroundStyle, type BannerData, BannerSection, type BannerSectionProps, type BannerStyles, BasicSelector, Body, type BodyProps, type BreadcrumbsData, BreadcrumbsSection, type BreadcrumbsSectionProps, type BreadcrumbsStyles, Button, type ButtonProps, CTA, type CTAVariant, CodeField, type CodeFieldProps, type ComponentField, ComponentFields, type CoreInfoData, CoreInfoSection, type CoreInfoSectionProps, type CoreInfoStyles, CustomCodeSection, type CustomCodeSectionProps, DeprecatedCategory, DeprecatedCategoryComponents, type DeprecatedCategoryProps, Directory, DirectoryCategory, DirectoryCategoryComponents, type DirectoryCategoryProps, type DirectoryConfigProps, type DirectoryData, type DirectoryProps, type DirectoryStyles, Editor, EmbeddedFieldStringInput, type EnhancedTranslatableCTA, EntityField, type EventData, EventSection, type EventSectionProps, type EventSectionType, type EventStruct, type EventStyles, ExpandedFooter, type ExpandedFooterData, type ExpandedFooterProps, type ExpandedFooterStyles, ExpandedHeader, type ExpandedHeaderData, type ExpandedHeaderProps, type ExpandedHeaderStyles, type FAQData, FAQSection, type FAQSectionProps, type FAQSectionType, type FAQStruct, type FAQStyles, type FontRegistry, FontSizeSelector, Footer, type FooterProps, Header, type HeaderProps, Heading, type HeadingLevel, type HeadingProps, type HeroData, HeroSection, type HeroSectionProps, type HeroSectionType, type HeroStyles, HoursStatusAtom, type HoursStatusAtomProps, HoursTableAtom, type HoursTableAtomProps, Image, type ImageContentData, type ImageProps, type InsightData, InsightSection, type InsightSectionProps, type InsightSectionType, type InsightStruct, type InsightStyles, KnowledgeGraphIcon, LocatorCategory, LocatorCategoryComponents, type LocatorCategoryProps, LocatorComponent, type LocatorConfigProps, type LocatorProps, type MainConfigProps, MaybeLink, type MaybeLinkProps, MaybeRTF, type MaybeRTFProps, type Metadata, type Migration, type MigrationAction, type MigrationRegistry, type NearbyLocationsData, NearbyLocationsSection, type NearbyLocationsSectionProps, type NearbyLocationsStyles, OptionalNumberField, type OptionalNumberFieldProps, OtherCategory, OtherCategoryComponents, type OtherCategoryProps, PageSection, PageSectionCategory, PageSectionCategoryComponents, type PageSectionCategoryProps, type PageSectionProps, type PersonStruct, PhoneAtom, type PhoneAtomProps, type PhotoGalleryData, PhotoGallerySection, type PhotoGallerySectionProps, type PhotoGalleryStyles, type PresetImageType, type ProductData, ProductSection, type ProductSectionProps, type ProductSectionType, type ProductStruct, type ProductStyles, type PromoData, PromoSection, type PromoSectionProps, type PromoSectionType, type PromoStyles, type RenderYextEntityFieldSelectorProps, ReviewStars, type ReviewStarsProps, ReviewsSection, type ReviewsSectionProps, type RichText, SectionContainer, type SectionContainerProps, SpacingSelector, StaticMapSection, type StaticMapSectionProps, type StaticMapStyles, type StreamDocument, TailwindConfigContext, TeamSection, type TeamSectionProps, type TeamSectionType, TemplatePropsContext, type TestimonialData, TestimonialSection, type TestimonialSectionProps, type TestimonialSectionType, type TestimonialStruct, type TestimonialStyles, type ThemeConfig, ThemeOptions, Timestamp, TimestampOption, type TimestampProps, Toggle, type TranslatableCTA, type TranslatableRichText, TranslatableRichTextField, type TranslatableString, TranslatableStringField, Video, type VideoData, type VideoProps, VideoSection, type VideoSectionProps, type VideoStyles, VisibilityWrapper, VisualEditorComponentsContentPath, VisualEditorProvider, type YextEntityField, YextEntityFieldSelector, YextField, type YextFieldDefinition, type YextSchemaField, type YextStructEntityField, YextStructFieldSelector, addHeadingAlignmentMigration, applyAnalytics, applyHeaderScript, applyTheme, backgroundColors, bodyVariants, buttonVariants, constructFontSelectOptions, createSearchAnalyticsConfig, createSearchHeadlessConfig, defaultFonts, defaultThemeConfig, defaultThemeTailwindExtensions, directoryConfig, fetchLocalesToPathsForEntity, fetchNearbyLocations, fetchReviewsForEntity, filterComponentsFromConfig, filterMaxWidths, getAggregateRating, getAnalyticsScopeHash, getFontWeightOptions, getFontWeightOverrideOptions, getMaxWidthOptions, getPageMetadata, getSchema, headingVariants, i18nComponentsInstance, i18nPlatformInstance, imgSizesHelper, locatorConfig, mainConfig, mergeMeta, migrate, migrationRegistry, msg, normalizeSlug, pt, resolveComponentData, resolveSchemaJson, resolveUrlTemplate, resolveYextEntityField, resolveYextStructField, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, useOverflow, usePlatformBridgeDocument, usePlatformBridgeEntityFields, usePlatformTranslation, useTailwindConfig, useTemplateProps, withPropOverrides };
package/dist/index.d.ts CHANGED
@@ -8,9 +8,9 @@ import { ClassValue } from 'clsx';
8
8
  import * as _measured_puck from '@measured/puck';
9
9
  import { Config, Data, DefaultComponentProps, DefaultRootProps, Field, CustomField, ComponentConfig, ArrayField, BaseField, ObjectField, NumberField, Slot } from '@measured/puck';
10
10
  import { ImageType, CTA as CTA$1, LinkType, HoursTableProps as HoursTableProps$1, ComplexImageType, HoursType, AddressType, Coordinate, DayOfWeekNames } from '@yext/pages-components';
11
- import * as _yext_search_headless_react from '@yext/search-headless-react';
12
11
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
13
12
  import { VariantProps } from 'class-variance-authority';
13
+ import * as _yext_search_headless_react from '@yext/search-headless-react';
14
14
  import * as react_jsx_runtime_js from 'react/jsx-runtime.js';
15
15
  import * as TogglePrimitive from '@radix-ui/react-toggle';
16
16
 
@@ -382,7 +382,7 @@ type RootConfig = {
382
382
  };
383
383
  declare function getPageMetadata(document: Record<string, any>): RootConfig;
384
384
 
385
- declare const getSchema: (document: Record<string, any>) => string;
385
+ declare const getSchema: (document: Record<string, any>) => Record<string, any>;
386
386
 
387
387
  type MigrationAction = {
388
388
  action: "removed";
@@ -416,7 +416,11 @@ declare const migrate: (data: Data<DefaultComponentProps, RootProps>, migrationR
416
416
  * @returns The fully resolved data for the component.
417
417
  */
418
418
  declare function resolveComponentData(data: TranslatableString | YextEntityField<TranslatableString>, locale: string, streamDocument?: any): string;
419
- declare function resolveComponentData(data: TranslatableRichText | YextEntityField<TranslatableRichText>, locale: string, streamDocument?: any): string | React__default.ReactElement;
419
+ declare function resolveComponentData(data: TranslatableRichText | YextEntityField<TranslatableRichText>, locale: string, streamDocument?: any, options?: {
420
+ variant?: BodyProps["variant"];
421
+ isDarkBackground?: boolean;
422
+ className?: string;
423
+ }): string | React__default.ReactElement;
420
424
  declare function resolveComponentData<T>(data: YextEntityField<T>, locale: string, streamDocument?: any): T | undefined;
421
425
 
422
426
  type Only<T, U> = {
@@ -984,7 +988,6 @@ type BasicSelectorProps = {
984
988
  noOptionsPlaceholder?: string;
985
989
  noOptionsMessage?: string;
986
990
  disableSearch?: boolean;
987
- icon?: React__default.ReactNode;
988
991
  } & ({
989
992
  options: ComboboxOption[];
990
993
  optionGroups?: never;
@@ -1114,7 +1117,7 @@ declare const filterMaxWidths: (styleElement: HTMLStyleElement) => {
1114
1117
  };
1115
1118
 
1116
1119
  declare const bodyVariants: (props?: ({
1117
- variant?: "sm" | "lg" | "base" | "xs" | null | undefined;
1120
+ variant?: "base" | "sm" | "lg" | "xs" | null | undefined;
1118
1121
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
1119
1122
  interface BodyProps extends Omit<React.HTMLAttributes<HTMLParagraphElement>, "color">, VariantProps<typeof bodyVariants> {
1120
1123
  }
@@ -1160,7 +1163,7 @@ declare const CTA: (props: CTAProps) => react_jsx_runtime_js.JSX.Element | null;
1160
1163
 
1161
1164
  declare const headingVariants: (props?: ({
1162
1165
  level?: 2 | 1 | 3 | 4 | 5 | 6 | null | undefined;
1163
- fontSize?: "default" | "sm" | "lg" | "base" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
1166
+ fontSize?: "default" | "base" | "sm" | "lg" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
1164
1167
  weight?: "default" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | null | undefined;
1165
1168
  transform?: "none" | "uppercase" | "lowercase" | "capitalize" | null | undefined;
1166
1169
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
@@ -1180,8 +1183,25 @@ interface ImageProps {
1180
1183
  aspectRatio?: number;
1181
1184
  width?: number;
1182
1185
  className?: string;
1186
+ /** sizes attribute of the underlying img tag */
1187
+ sizes?: string;
1183
1188
  }
1184
1189
  declare const Image: React.FC<ImageProps>;
1190
+ type ImgSizesByBreakpoint = {
1191
+ base: string;
1192
+ sm?: string;
1193
+ md?: string;
1194
+ lg?: string;
1195
+ xl?: string;
1196
+ "2xl"?: string;
1197
+ };
1198
+ /**
1199
+ * Creates an img sizes attribute based on the default Tailwind breakpoints.
1200
+ * Replaces `maxWidth` with the current page section max width from the theme.
1201
+ * @param sizes - the width of the image at different breakpoints
1202
+ * @returns a string for the sizes attribute of an img tag
1203
+ */
1204
+ declare const imgSizesHelper: (sizes: ImgSizesByBreakpoint) => string;
1185
1205
 
1186
1206
  type MaybeLinkProps = {
1187
1207
  href?: string;
@@ -1200,7 +1220,7 @@ interface MaybeRTFProps extends Record<string, any> {
1200
1220
  declare const MaybeRTF: ({ data, bodyVariant, ...props }: MaybeRTFProps) => react_jsx_runtime.JSX.Element;
1201
1221
 
1202
1222
  declare const pageSectionVariants: (props?: ({
1203
- verticalPadding?: "default" | "sm" | "none" | "footer" | "header" | "footerSecondary" | null | undefined;
1223
+ verticalPadding?: "default" | "footer" | "header" | "sm" | "none" | "footerSecondary" | null | undefined;
1204
1224
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
1205
1225
  declare const maxWidthVariants: (props?: ({
1206
1226
  maxWidth?: "theme" | "768px" | "960px" | "1024px" | "1280px" | "1440px" | "fullWidth" | null | undefined;
@@ -1251,7 +1271,7 @@ interface HoursStatusAtomProps {
1251
1271
  dayOfWeekFormat?: "short" | "long";
1252
1272
  timezone?: string;
1253
1273
  }
1254
- declare const HoursStatusAtom: ({ hours, className, showCurrentStatus, showDayNames, timeFormat, dayOfWeekFormat, timezone, }: HoursStatusAtomProps) => any;
1274
+ declare const HoursStatusAtom: React.MemoExoticComponent<({ hours, className, showCurrentStatus, showDayNames, timeFormat, dayOfWeekFormat, timezone, }: HoursStatusAtomProps) => any>;
1255
1275
 
1256
1276
  declare enum TimestampOption {
1257
1277
  DATE = "DATE",
@@ -4284,10 +4304,12 @@ interface MainConfigProps extends PageSectionCategoryProps, DeprecatedCategoryPr
4284
4304
  declare const mainConfig: Config<MainConfigProps>;
4285
4305
 
4286
4306
  interface DirectoryConfigProps extends DirectoryCategoryProps, DeprecatedCategoryProps, OtherCategoryProps {
4307
+ BannerSection: BannerSectionProps;
4287
4308
  }
4288
4309
  declare const directoryConfig: Config<DirectoryConfigProps>;
4289
4310
 
4290
4311
  interface LocatorConfigProps extends LocatorCategoryProps, DeprecatedCategoryProps, OtherCategoryProps {
4312
+ BannerSection: BannerSectionProps;
4291
4313
  }
4292
4314
  declare const locatorConfig: Config<LocatorConfigProps>;
4293
4315
 
@@ -4311,4 +4333,4 @@ declare const addHeadingAlignmentMigration: Migration;
4311
4333
 
4312
4334
  declare const defaultThemeConfig: ThemeConfig;
4313
4335
 
4314
- export { AdvancedCoreInfoCategory, AdvancedCoreInfoCategoryComponents, type AdvancedCoreInfoCategoryProps, type AggregateRating, type AssetImageType, type AssetVideo, Background, type BackgroundProps, BackgroundProvider, type BackgroundStyle, type BannerData, BannerSection, type BannerSectionProps, type BannerStyles, BasicSelector, Body, type BodyProps, type BreadcrumbsData, BreadcrumbsSection, type BreadcrumbsSectionProps, type BreadcrumbsStyles, Button, type ButtonProps, CTA, type CTAVariant, CodeField, type CodeFieldProps, type ComponentField, ComponentFields, type CoreInfoData, CoreInfoSection, type CoreInfoSectionProps, type CoreInfoStyles, CustomCodeSection, type CustomCodeSectionProps, DeprecatedCategory, DeprecatedCategoryComponents, type DeprecatedCategoryProps, Directory, DirectoryCategory, DirectoryCategoryComponents, type DirectoryCategoryProps, type DirectoryConfigProps, type DirectoryData, type DirectoryProps, type DirectoryStyles, Editor, EmbeddedFieldStringInput, type EnhancedTranslatableCTA, EntityField, type EventData, EventSection, type EventSectionProps, type EventSectionType, type EventStruct, type EventStyles, ExpandedFooter, type ExpandedFooterData, type ExpandedFooterProps, type ExpandedFooterStyles, ExpandedHeader, type ExpandedHeaderData, type ExpandedHeaderProps, type ExpandedHeaderStyles, type FAQData, FAQSection, type FAQSectionProps, type FAQSectionType, type FAQStruct, type FAQStyles, type FontRegistry, FontSizeSelector, Footer, type FooterProps, Header, type HeaderProps, Heading, type HeadingLevel, type HeadingProps, type HeroData, HeroSection, type HeroSectionProps, type HeroSectionType, type HeroStyles, HoursStatusAtom, type HoursStatusAtomProps, HoursTableAtom, type HoursTableAtomProps, Image, type ImageContentData, type ImageProps, type InsightData, InsightSection, type InsightSectionProps, type InsightSectionType, type InsightStruct, type InsightStyles, KnowledgeGraphIcon, LocatorCategory, LocatorCategoryComponents, type LocatorCategoryProps, LocatorComponent, type LocatorConfigProps, type LocatorProps, type MainConfigProps, MaybeLink, type MaybeLinkProps, MaybeRTF, type MaybeRTFProps, type Metadata, type Migration, type MigrationAction, type MigrationRegistry, type NearbyLocationsData, NearbyLocationsSection, type NearbyLocationsSectionProps, type NearbyLocationsStyles, OptionalNumberField, type OptionalNumberFieldProps, OtherCategory, OtherCategoryComponents, type OtherCategoryProps, PageSection, PageSectionCategory, PageSectionCategoryComponents, type PageSectionCategoryProps, type PageSectionProps, type PersonStruct, PhoneAtom, type PhoneAtomProps, type PhotoGalleryData, PhotoGallerySection, type PhotoGallerySectionProps, type PhotoGalleryStyles, type PresetImageType, type ProductData, ProductSection, type ProductSectionProps, type ProductSectionType, type ProductStruct, type ProductStyles, type PromoData, PromoSection, type PromoSectionProps, type PromoSectionType, type PromoStyles, type RenderYextEntityFieldSelectorProps, ReviewStars, type ReviewStarsProps, ReviewsSection, type ReviewsSectionProps, type RichText, SectionContainer, type SectionContainerProps, SpacingSelector, StaticMapSection, type StaticMapSectionProps, type StaticMapStyles, type StreamDocument, TailwindConfigContext, TeamSection, type TeamSectionProps, type TeamSectionType, TemplatePropsContext, type TestimonialData, TestimonialSection, type TestimonialSectionProps, type TestimonialSectionType, type TestimonialStruct, type TestimonialStyles, type ThemeConfig, ThemeOptions, Timestamp, TimestampOption, type TimestampProps, Toggle, type TranslatableCTA, type TranslatableRichText, TranslatableRichTextField, type TranslatableString, TranslatableStringField, Video, type VideoData, type VideoProps, VideoSection, type VideoSectionProps, type VideoStyles, VisibilityWrapper, VisualEditorComponentsContentPath, VisualEditorProvider, type YextEntityField, YextEntityFieldSelector, YextField, type YextFieldDefinition, type YextSchemaField, type YextStructEntityField, YextStructFieldSelector, addHeadingAlignmentMigration, applyAnalytics, applyHeaderScript, applyTheme, backgroundColors, bodyVariants, buttonVariants, constructFontSelectOptions, createSearchAnalyticsConfig, createSearchHeadlessConfig, defaultFonts, defaultThemeConfig, defaultThemeTailwindExtensions, directoryConfig, fetchLocalesToPathsForEntity, fetchNearbyLocations, fetchReviewsForEntity, filterComponentsFromConfig, filterMaxWidths, getAggregateRating, getAnalyticsScopeHash, getFontWeightOptions, getFontWeightOverrideOptions, getMaxWidthOptions, getPageMetadata, getSchema, headingVariants, i18nComponentsInstance, i18nPlatformInstance, locatorConfig, mainConfig, mergeMeta, migrate, migrationRegistry, msg, normalizeSlug, pt, resolveComponentData, resolveSchemaJson, resolveUrlTemplate, resolveYextEntityField, resolveYextStructField, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, useOverflow, usePlatformBridgeDocument, usePlatformBridgeEntityFields, usePlatformTranslation, useTailwindConfig, useTemplateProps, withPropOverrides };
4336
+ export { AdvancedCoreInfoCategory, AdvancedCoreInfoCategoryComponents, type AdvancedCoreInfoCategoryProps, type AggregateRating, type AssetImageType, type AssetVideo, Background, type BackgroundProps, BackgroundProvider, type BackgroundStyle, type BannerData, BannerSection, type BannerSectionProps, type BannerStyles, BasicSelector, Body, type BodyProps, type BreadcrumbsData, BreadcrumbsSection, type BreadcrumbsSectionProps, type BreadcrumbsStyles, Button, type ButtonProps, CTA, type CTAVariant, CodeField, type CodeFieldProps, type ComponentField, ComponentFields, type CoreInfoData, CoreInfoSection, type CoreInfoSectionProps, type CoreInfoStyles, CustomCodeSection, type CustomCodeSectionProps, DeprecatedCategory, DeprecatedCategoryComponents, type DeprecatedCategoryProps, Directory, DirectoryCategory, DirectoryCategoryComponents, type DirectoryCategoryProps, type DirectoryConfigProps, type DirectoryData, type DirectoryProps, type DirectoryStyles, Editor, EmbeddedFieldStringInput, type EnhancedTranslatableCTA, EntityField, type EventData, EventSection, type EventSectionProps, type EventSectionType, type EventStruct, type EventStyles, ExpandedFooter, type ExpandedFooterData, type ExpandedFooterProps, type ExpandedFooterStyles, ExpandedHeader, type ExpandedHeaderData, type ExpandedHeaderProps, type ExpandedHeaderStyles, type FAQData, FAQSection, type FAQSectionProps, type FAQSectionType, type FAQStruct, type FAQStyles, type FontRegistry, FontSizeSelector, Footer, type FooterProps, Header, type HeaderProps, Heading, type HeadingLevel, type HeadingProps, type HeroData, HeroSection, type HeroSectionProps, type HeroSectionType, type HeroStyles, HoursStatusAtom, type HoursStatusAtomProps, HoursTableAtom, type HoursTableAtomProps, Image, type ImageContentData, type ImageProps, type InsightData, InsightSection, type InsightSectionProps, type InsightSectionType, type InsightStruct, type InsightStyles, KnowledgeGraphIcon, LocatorCategory, LocatorCategoryComponents, type LocatorCategoryProps, LocatorComponent, type LocatorConfigProps, type LocatorProps, type MainConfigProps, MaybeLink, type MaybeLinkProps, MaybeRTF, type MaybeRTFProps, type Metadata, type Migration, type MigrationAction, type MigrationRegistry, type NearbyLocationsData, NearbyLocationsSection, type NearbyLocationsSectionProps, type NearbyLocationsStyles, OptionalNumberField, type OptionalNumberFieldProps, OtherCategory, OtherCategoryComponents, type OtherCategoryProps, PageSection, PageSectionCategory, PageSectionCategoryComponents, type PageSectionCategoryProps, type PageSectionProps, type PersonStruct, PhoneAtom, type PhoneAtomProps, type PhotoGalleryData, PhotoGallerySection, type PhotoGallerySectionProps, type PhotoGalleryStyles, type PresetImageType, type ProductData, ProductSection, type ProductSectionProps, type ProductSectionType, type ProductStruct, type ProductStyles, type PromoData, PromoSection, type PromoSectionProps, type PromoSectionType, type PromoStyles, type RenderYextEntityFieldSelectorProps, ReviewStars, type ReviewStarsProps, ReviewsSection, type ReviewsSectionProps, type RichText, SectionContainer, type SectionContainerProps, SpacingSelector, StaticMapSection, type StaticMapSectionProps, type StaticMapStyles, type StreamDocument, TailwindConfigContext, TeamSection, type TeamSectionProps, type TeamSectionType, TemplatePropsContext, type TestimonialData, TestimonialSection, type TestimonialSectionProps, type TestimonialSectionType, type TestimonialStruct, type TestimonialStyles, type ThemeConfig, ThemeOptions, Timestamp, TimestampOption, type TimestampProps, Toggle, type TranslatableCTA, type TranslatableRichText, TranslatableRichTextField, type TranslatableString, TranslatableStringField, Video, type VideoData, type VideoProps, VideoSection, type VideoSectionProps, type VideoStyles, VisibilityWrapper, VisualEditorComponentsContentPath, VisualEditorProvider, type YextEntityField, YextEntityFieldSelector, YextField, type YextFieldDefinition, type YextSchemaField, type YextStructEntityField, YextStructFieldSelector, addHeadingAlignmentMigration, applyAnalytics, applyHeaderScript, applyTheme, backgroundColors, bodyVariants, buttonVariants, constructFontSelectOptions, createSearchAnalyticsConfig, createSearchHeadlessConfig, defaultFonts, defaultThemeConfig, defaultThemeTailwindExtensions, directoryConfig, fetchLocalesToPathsForEntity, fetchNearbyLocations, fetchReviewsForEntity, filterComponentsFromConfig, filterMaxWidths, getAggregateRating, getAnalyticsScopeHash, getFontWeightOptions, getFontWeightOverrideOptions, getMaxWidthOptions, getPageMetadata, getSchema, headingVariants, i18nComponentsInstance, i18nPlatformInstance, imgSizesHelper, locatorConfig, mainConfig, mergeMeta, migrate, migrationRegistry, msg, normalizeSlug, pt, resolveComponentData, resolveSchemaJson, resolveUrlTemplate, resolveYextEntityField, resolveYextStructField, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useBackground, useDocument, useEntityFields, useOverflow, usePlatformBridgeDocument, usePlatformBridgeEntityFields, usePlatformTranslation, useTailwindConfig, useTemplateProps, withPropOverrides };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-e2mjLldQ.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-CiLK9QKh.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-rTObTg5w.js";
1
+ import { r as b, n as l, e as w, a as k, l as S } from "./index-Dm79DrTB.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
  }