@yext/visual-editor 0.0.26 → 0.0.28

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
@@ -239,6 +239,13 @@ declare const getSpacingOptions: () => {
239
239
 
240
240
  declare const applyAnalytics: (document: Record<string, any>) => string | undefined;
241
241
 
242
+ type RootConfig = {
243
+ title?: string;
244
+ description?: string;
245
+ [key: string]: any;
246
+ };
247
+ declare function getPageMetadata(document: Record<string, any>): RootConfig;
248
+
242
249
  type EditorProps = {
243
250
  document: any;
244
251
  componentRegistry: Map<string, Config<any>>;
@@ -422,9 +429,9 @@ declare const EmailsComponent: ComponentConfig<EmailsProps>;
422
429
 
423
430
  declare const layoutVariants: (props?: ({
424
431
  gap?: "0" | "1" | "2" | "3" | "4" | "default" | "none" | "5" | "6" | "7" | "8" | "12" | "16" | "24" | "14" | "20" | "0.5" | "1.5" | "2.5" | "10" | "3.5" | "9" | "11" | null | undefined;
425
- verticalPadding?: "0" | "1" | "2" | "3" | "4" | "default" | "5" | "6" | "7" | "8" | "12" | "16" | "24" | "14" | "20" | "0.5" | "1.5" | "2.5" | "10" | "3.5" | "9" | "11" | null | undefined;
426
- horizontalPadding?: "0" | "1" | "2" | "3" | "4" | "default" | "5" | "6" | "7" | "8" | "12" | "16" | "24" | "14" | "20" | "0.5" | "1.5" | "2.5" | "10" | "3.5" | "9" | "11" | null | undefined;
427
- backgroundColor?: "default" | "text" | "accent" | "inherit" | "secondary" | "primary" | "background" | null | undefined;
432
+ verticalPadding?: "0" | "1" | "2" | "3" | "4" | "default" | "none" | "5" | "6" | "7" | "8" | "12" | "16" | "24" | "14" | "20" | "0.5" | "1.5" | "2.5" | "10" | "3.5" | "9" | "11" | null | undefined;
433
+ horizontalPadding?: "0" | "1" | "2" | "3" | "4" | "default" | "none" | "5" | "6" | "7" | "8" | "12" | "16" | "24" | "14" | "20" | "0.5" | "1.5" | "2.5" | "10" | "3.5" | "9" | "11" | null | undefined;
434
+ backgroundColor?: "default" | "text" | "accent" | "none" | "inherit" | "secondary" | "primary" | "background" | null | undefined;
428
435
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
429
436
  declare const innerLayoutVariants: (props?: ({
430
437
  maxContentWidth?: "default" | "none" | "lg" | "xl" | "xxl" | null | undefined;
@@ -558,4 +565,4 @@ interface TextListProps extends VariantProps<typeof textListVariants> {
558
565
  }
559
566
  declare const TextListComponent: ComponentConfig<TextListProps>;
560
567
 
561
- export { AddressComponent as Address, type AddressProps, Banner, type BannerProps, Body, type BodyProps, BodyTextComponent as BodyText, type BodyTextProps, BorderRadiusSelector, Button, type ButtonProps, CTA, type CTAProps, CTAWrapperComponent as CTAWrapper, type CTAWrapperProps, CardComponent as Card, type CardProps, DocumentContext, Editor, EmailsComponent as Emails, type EmailsProps, EntityField, FlexContainerComponent as Flex, type FlexProps, type FontRegistry, FontSizeSelector, Footer, type FooterProps, GetDirectionsComponent as GetDirections, type GetDirectionsProps, GridSectionComponent as Grid, type GridProps, Header, type HeaderProps, Heading, type HeadingProps, HeadingTextComponent as HeadingText, type HeadingTextProps, HoursStatusComponent as HoursStatus, type HoursStatusProps, HoursTableComponent as HoursTable, type HoursTableProps, ImageWrapperComponent as ImageWrapper, type ImageWrapperProps, NumberFieldWithDefaultOption, type NumberFieldWithDefaultOptionProps, type NumberOrDefault, PhoneComponent as Phone, type PhoneProps, PromoComponent as Promo, type PromoProps, type RenderYextEntityFieldSelectorProps, Section, type SectionProps, SpacingSelector, TailwindConfigContext, TextListComponent as TextList, type TextListProps, type ThemeConfig, VisualEditorProvider, type YextEntityField, YextEntityFieldSelector, type YextFieldDefinition, type YextSchemaField, applyAnalytics, applyTheme, bodyVariants, buttonVariants, constructFontSelectOptions, defaultFonts, getBorderRadiusOptions, getFontSizeOptions, getFontWeightOptions, getFontWeightOverrideOptions, getSpacingOptions, headingVariants, normalizeSlug, resolveYextEntityField, sectionVariants, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields, useTailwindConfig, validateSlug };
568
+ export { AddressComponent as Address, type AddressProps, Banner, type BannerProps, Body, type BodyProps, BodyTextComponent as BodyText, type BodyTextProps, BorderRadiusSelector, Button, type ButtonProps, CTA, type CTAProps, CTAWrapperComponent as CTAWrapper, type CTAWrapperProps, CardComponent as Card, type CardProps, DocumentContext, Editor, EmailsComponent as Emails, type EmailsProps, EntityField, FlexContainerComponent as Flex, type FlexProps, type FontRegistry, FontSizeSelector, Footer, type FooterProps, GetDirectionsComponent as GetDirections, type GetDirectionsProps, GridSectionComponent as Grid, type GridProps, Header, type HeaderProps, Heading, type HeadingProps, HeadingTextComponent as HeadingText, type HeadingTextProps, HoursStatusComponent as HoursStatus, type HoursStatusProps, HoursTableComponent as HoursTable, type HoursTableProps, ImageWrapperComponent as ImageWrapper, type ImageWrapperProps, NumberFieldWithDefaultOption, type NumberFieldWithDefaultOptionProps, type NumberOrDefault, PhoneComponent as Phone, type PhoneProps, PromoComponent as Promo, type PromoProps, type RenderYextEntityFieldSelectorProps, Section, type SectionProps, SpacingSelector, TailwindConfigContext, TextListComponent as TextList, type TextListProps, type ThemeConfig, VisualEditorProvider, type YextEntityField, YextEntityFieldSelector, type YextFieldDefinition, type YextSchemaField, applyAnalytics, applyTheme, bodyVariants, buttonVariants, constructFontSelectOptions, defaultFonts, getBorderRadiusOptions, getFontSizeOptions, getFontWeightOptions, getFontWeightOverrideOptions, getPageMetadata, getSpacingOptions, headingVariants, normalizeSlug, resolveYextEntityField, sectionVariants, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields, useTailwindConfig, validateSlug };
package/dist/index.d.ts CHANGED
@@ -239,6 +239,13 @@ declare const getSpacingOptions: () => {
239
239
 
240
240
  declare const applyAnalytics: (document: Record<string, any>) => string | undefined;
241
241
 
242
+ type RootConfig = {
243
+ title?: string;
244
+ description?: string;
245
+ [key: string]: any;
246
+ };
247
+ declare function getPageMetadata(document: Record<string, any>): RootConfig;
248
+
242
249
  type EditorProps = {
243
250
  document: any;
244
251
  componentRegistry: Map<string, Config<any>>;
@@ -422,9 +429,9 @@ declare const EmailsComponent: ComponentConfig<EmailsProps>;
422
429
 
423
430
  declare const layoutVariants: (props?: ({
424
431
  gap?: "0" | "1" | "2" | "3" | "4" | "default" | "none" | "5" | "6" | "7" | "8" | "12" | "16" | "24" | "14" | "20" | "0.5" | "1.5" | "2.5" | "10" | "3.5" | "9" | "11" | null | undefined;
425
- verticalPadding?: "0" | "1" | "2" | "3" | "4" | "default" | "5" | "6" | "7" | "8" | "12" | "16" | "24" | "14" | "20" | "0.5" | "1.5" | "2.5" | "10" | "3.5" | "9" | "11" | null | undefined;
426
- horizontalPadding?: "0" | "1" | "2" | "3" | "4" | "default" | "5" | "6" | "7" | "8" | "12" | "16" | "24" | "14" | "20" | "0.5" | "1.5" | "2.5" | "10" | "3.5" | "9" | "11" | null | undefined;
427
- backgroundColor?: "default" | "text" | "accent" | "inherit" | "secondary" | "primary" | "background" | null | undefined;
432
+ verticalPadding?: "0" | "1" | "2" | "3" | "4" | "default" | "none" | "5" | "6" | "7" | "8" | "12" | "16" | "24" | "14" | "20" | "0.5" | "1.5" | "2.5" | "10" | "3.5" | "9" | "11" | null | undefined;
433
+ horizontalPadding?: "0" | "1" | "2" | "3" | "4" | "default" | "none" | "5" | "6" | "7" | "8" | "12" | "16" | "24" | "14" | "20" | "0.5" | "1.5" | "2.5" | "10" | "3.5" | "9" | "11" | null | undefined;
434
+ backgroundColor?: "default" | "text" | "accent" | "none" | "inherit" | "secondary" | "primary" | "background" | null | undefined;
428
435
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
429
436
  declare const innerLayoutVariants: (props?: ({
430
437
  maxContentWidth?: "default" | "none" | "lg" | "xl" | "xxl" | null | undefined;
@@ -558,4 +565,4 @@ interface TextListProps extends VariantProps<typeof textListVariants> {
558
565
  }
559
566
  declare const TextListComponent: ComponentConfig<TextListProps>;
560
567
 
561
- export { AddressComponent as Address, type AddressProps, Banner, type BannerProps, Body, type BodyProps, BodyTextComponent as BodyText, type BodyTextProps, BorderRadiusSelector, Button, type ButtonProps, CTA, type CTAProps, CTAWrapperComponent as CTAWrapper, type CTAWrapperProps, CardComponent as Card, type CardProps, DocumentContext, Editor, EmailsComponent as Emails, type EmailsProps, EntityField, FlexContainerComponent as Flex, type FlexProps, type FontRegistry, FontSizeSelector, Footer, type FooterProps, GetDirectionsComponent as GetDirections, type GetDirectionsProps, GridSectionComponent as Grid, type GridProps, Header, type HeaderProps, Heading, type HeadingProps, HeadingTextComponent as HeadingText, type HeadingTextProps, HoursStatusComponent as HoursStatus, type HoursStatusProps, HoursTableComponent as HoursTable, type HoursTableProps, ImageWrapperComponent as ImageWrapper, type ImageWrapperProps, NumberFieldWithDefaultOption, type NumberFieldWithDefaultOptionProps, type NumberOrDefault, PhoneComponent as Phone, type PhoneProps, PromoComponent as Promo, type PromoProps, type RenderYextEntityFieldSelectorProps, Section, type SectionProps, SpacingSelector, TailwindConfigContext, TextListComponent as TextList, type TextListProps, type ThemeConfig, VisualEditorProvider, type YextEntityField, YextEntityFieldSelector, type YextFieldDefinition, type YextSchemaField, applyAnalytics, applyTheme, bodyVariants, buttonVariants, constructFontSelectOptions, defaultFonts, getBorderRadiusOptions, getFontSizeOptions, getFontWeightOptions, getFontWeightOverrideOptions, getSpacingOptions, headingVariants, normalizeSlug, resolveYextEntityField, sectionVariants, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields, useTailwindConfig, validateSlug };
568
+ export { AddressComponent as Address, type AddressProps, Banner, type BannerProps, Body, type BodyProps, BodyTextComponent as BodyText, type BodyTextProps, BorderRadiusSelector, Button, type ButtonProps, CTA, type CTAProps, CTAWrapperComponent as CTAWrapper, type CTAWrapperProps, CardComponent as Card, type CardProps, DocumentContext, Editor, EmailsComponent as Emails, type EmailsProps, EntityField, FlexContainerComponent as Flex, type FlexProps, type FontRegistry, FontSizeSelector, Footer, type FooterProps, GetDirectionsComponent as GetDirections, type GetDirectionsProps, GridSectionComponent as Grid, type GridProps, Header, type HeaderProps, Heading, type HeadingProps, HeadingTextComponent as HeadingText, type HeadingTextProps, HoursStatusComponent as HoursStatus, type HoursStatusProps, HoursTableComponent as HoursTable, type HoursTableProps, ImageWrapperComponent as ImageWrapper, type ImageWrapperProps, NumberFieldWithDefaultOption, type NumberFieldWithDefaultOptionProps, type NumberOrDefault, PhoneComponent as Phone, type PhoneProps, PromoComponent as Promo, type PromoProps, type RenderYextEntityFieldSelectorProps, Section, type SectionProps, SpacingSelector, TailwindConfigContext, TextListComponent as TextList, type TextListProps, type ThemeConfig, VisualEditorProvider, type YextEntityField, YextEntityFieldSelector, type YextFieldDefinition, type YextSchemaField, applyAnalytics, applyTheme, bodyVariants, buttonVariants, constructFontSelectOptions, defaultFonts, getBorderRadiusOptions, getFontSizeOptions, getFontWeightOptions, getFontWeightOverrideOptions, getPageMetadata, getSpacingOptions, headingVariants, normalizeSlug, resolveYextEntityField, sectionVariants, themeManagerCn, themeManagerTwMergeConfiguration, themeResolver, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields, useTailwindConfig, validateSlug };