@yext/visual-editor 0.0.19 → 0.0.21

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
@@ -6,7 +6,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
7
7
  import { VariantProps } from 'class-variance-authority';
8
8
  import * as react_jsx_runtime_js from 'react/jsx-runtime.js';
9
- import { AddressType, GetDirectionsConfig, Coordinate, ImageType, CTA as CTA$1, HoursType, DayOfWeekNames } from '@yext/pages-components';
9
+ import { AddressType, GetDirectionsConfig, ImageType, CTA as CTA$1, Coordinate, HoursType, DayOfWeekNames } from '@yext/pages-components';
10
10
  import * as class_variance_authority_dist_types_js from 'class-variance-authority/dist/types.js';
11
11
 
12
12
  declare const usePlatformBridgeDocument: () => any;
@@ -289,14 +289,70 @@ type AddressProps = {
289
289
  };
290
290
  declare const AddressComponent: ComponentConfig<AddressProps>;
291
291
 
292
+ type BannerProps = {
293
+ text: YextEntityField<string>;
294
+ textAlignment: "justify-end" | "justify-start" | "justify-center";
295
+ fontSize: BodyProps["fontSize"];
296
+ fontWeight?: BodyProps["fontWeight"];
297
+ textColor: BodyProps["color"];
298
+ backgroundColor: "bg-palette-primary" | "bg-palette-secondary" | "bg-palette-accent" | "bg-palette-text" | "bg-palette-background";
299
+ };
300
+ declare const Banner: ComponentConfig<BannerProps>;
301
+
292
302
  interface BodyTextProps extends BodyProps {
293
303
  text: YextEntityField<string>;
294
304
  }
295
305
  declare const BodyTextComponent: ComponentConfig<BodyTextProps>;
296
306
 
307
+ declare const imageWrapperVariants: (props?: ({
308
+ size?: "small" | "large" | "medium" | "full" | null | undefined;
309
+ aspectRatio?: "video" | "auto" | "square" | "portrait" | null | undefined;
310
+ rounded?: "small" | "none" | "large" | "medium" | "full" | null | undefined;
311
+ } & class_variance_authority_dist_types_js.ClassProp) | undefined) => string;
312
+ interface ImageWrapperProps extends VariantProps<typeof imageWrapperVariants> {
313
+ image: YextEntityField<ImageType>;
314
+ }
315
+ declare const ImageWrapperComponent: ComponentConfig<ImageWrapperProps>;
316
+
317
+ interface CardProps {
318
+ orientation: "left" | "right";
319
+ heading: {
320
+ text: YextEntityField<string>;
321
+ fontSize: HeadingProps["fontSize"];
322
+ color: HeadingProps["color"];
323
+ transform: HeadingProps["transform"];
324
+ };
325
+ subheading: {
326
+ text: YextEntityField<string>;
327
+ fontSize: HeadingProps["fontSize"];
328
+ color: HeadingProps["color"];
329
+ transform: HeadingProps["transform"];
330
+ };
331
+ body: {
332
+ text: YextEntityField<string>;
333
+ fontSize: BodyProps["fontSize"];
334
+ color: BodyProps["color"];
335
+ transform: BodyProps["textTransform"];
336
+ };
337
+ image: {
338
+ image: YextEntityField<ImageType>;
339
+ size: ImageWrapperProps["size"];
340
+ aspectRatio: ImageWrapperProps["aspectRatio"];
341
+ rounded: ImageWrapperProps["rounded"];
342
+ };
343
+ cta: {
344
+ entityField: YextEntityField<CTAProps>;
345
+ variant: CTAProps["variant"];
346
+ fontSize: HeadingProps["fontSize"];
347
+ };
348
+ }
349
+ declare const CardComponent: ComponentConfig<CardProps>;
350
+
297
351
  interface CTAWrapperProps {
298
352
  entityField: YextEntityField<CTAProps>;
299
353
  variant: CTAProps["variant"];
354
+ size: CTAProps["size"];
355
+ borderRadius: CTAProps["borderRadius"];
300
356
  fontSize: CTAProps["fontSize"];
301
357
  className?: CTAProps["className"];
302
358
  }
@@ -326,14 +382,26 @@ interface FlexContainerProps extends React.HTMLAttributes<HTMLDivElement>, Varia
326
382
  }
327
383
  declare const FlexContainerComponent: ComponentConfig<FlexContainerProps>;
328
384
 
385
+ declare const footerVariants: (props?: ({
386
+ backgroundColor?: "default" | "text" | "accent" | "secondary" | "primary" | "background" | null | undefined;
387
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
388
+ interface FooterProps extends VariantProps<typeof footerVariants> {
389
+ copyright: BodyProps & {
390
+ text: YextEntityField<string>;
391
+ };
392
+ links: {
393
+ cta: YextEntityField<CTA$1>;
394
+ id?: string;
395
+ }[];
396
+ }
397
+ declare const Footer: ComponentConfig<FooterProps>;
398
+
329
399
  type GetDirectionsProps = {
330
400
  coordinate: YextEntityField<Coordinate>;
331
401
  getDirectionsProvider: GetDirectionsConfig["provider"];
332
402
  variant: ButtonProps["variant"];
333
403
  size: ButtonProps["size"];
334
404
  borderRadius: ButtonProps["borderRadius"];
335
- alignment: "items-start" | "items-center";
336
- padding: VariantProps<typeof sectionVariants>["padding"];
337
405
  fontSize: ButtonProps["fontSize"];
338
406
  };
339
407
  declare const GetDirectionsComponent: ComponentConfig<GetDirectionsProps>;
@@ -398,16 +466,6 @@ interface HoursStatusProps {
398
466
  }
399
467
  declare const HoursStatusComponent: ComponentConfig<HoursStatusProps>;
400
468
 
401
- declare const imageWrapperVariants: (props?: ({
402
- size?: "small" | "large" | "medium" | "full" | null | undefined;
403
- aspectRatio?: "video" | "auto" | "square" | "portrait" | null | undefined;
404
- rounded?: "small" | "none" | "large" | "medium" | "full" | null | undefined;
405
- } & class_variance_authority_dist_types_js.ClassProp) | undefined) => string;
406
- interface ImageWrapperProps extends VariantProps<typeof imageWrapperVariants> {
407
- image: YextEntityField<ImageType>;
408
- }
409
- declare const ImageWrapperComponent: ComponentConfig<ImageWrapperProps>;
410
-
411
469
  declare const phoneVariants: (props?: ({
412
470
  fontWeight?: "default" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | null | undefined;
413
471
  color?: "default" | "text" | "accent" | "secondary" | "primary" | "background" | null | undefined;
@@ -459,4 +517,4 @@ interface TextListProps extends VariantProps<typeof textListVariants> {
459
517
  }
460
518
  declare const TextListComponent: ComponentConfig<TextListProps>;
461
519
 
462
- export { AddressComponent as Address, type AddressProps, Body, type BodyProps, BodyTextComponent as BodyText, type BodyTextProps, Button, type ButtonProps, CTA, type CTAProps, CTAWrapperComponent as CTAWrapper, type CTAWrapperProps, DocumentContext, Editor, EmailsComponent as Emails, type EmailsProps, EntityField, FlexContainerComponent as FlexContainer, type FlexContainerProps, type FontRegistry, FontSizeSelector, GetDirectionsComponent as GetDirections, type GetDirectionsProps, GridSectionComponent as GridSection, type GridSectionProps, 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, TailwindConfigContext, TextListComponent as TextList, type TextListProps, type ThemeConfig, VisualEditorProvider, type YextEntityField, YextEntityFieldSelector, applyTheme, bodyVariants, buttonVariants, constructFontSelectOptions, defaultFonts, getFontWeightOptions, getFontWeightOverrideOptions, headingVariants, resolveYextEntityField, sectionVariants, themeMangerCn, themeMangerTwMergeConfiguration, themeResolver, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields, useTailwindConfig };
520
+ export { AddressComponent as Address, type AddressProps, Banner, type BannerProps, Body, type BodyProps, BodyTextComponent as BodyText, type BodyTextProps, 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 FlexContainer, type FlexContainerProps, type FontRegistry, FontSizeSelector, Footer, type FooterProps, GetDirectionsComponent as GetDirections, type GetDirectionsProps, GridSectionComponent as GridSection, type GridSectionProps, 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, TailwindConfigContext, TextListComponent as TextList, type TextListProps, type ThemeConfig, VisualEditorProvider, type YextEntityField, YextEntityFieldSelector, applyTheme, bodyVariants, buttonVariants, constructFontSelectOptions, defaultFonts, getFontWeightOptions, getFontWeightOverrideOptions, headingVariants, resolveYextEntityField, sectionVariants, themeMangerCn, themeMangerTwMergeConfiguration, themeResolver, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields, useTailwindConfig };
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
7
7
  import { VariantProps } from 'class-variance-authority';
8
8
  import * as react_jsx_runtime_js from 'react/jsx-runtime.js';
9
- import { AddressType, GetDirectionsConfig, Coordinate, ImageType, CTA as CTA$1, HoursType, DayOfWeekNames } from '@yext/pages-components';
9
+ import { AddressType, GetDirectionsConfig, ImageType, CTA as CTA$1, Coordinate, HoursType, DayOfWeekNames } from '@yext/pages-components';
10
10
  import * as class_variance_authority_dist_types_js from 'class-variance-authority/dist/types.js';
11
11
 
12
12
  declare const usePlatformBridgeDocument: () => any;
@@ -289,14 +289,70 @@ type AddressProps = {
289
289
  };
290
290
  declare const AddressComponent: ComponentConfig<AddressProps>;
291
291
 
292
+ type BannerProps = {
293
+ text: YextEntityField<string>;
294
+ textAlignment: "justify-end" | "justify-start" | "justify-center";
295
+ fontSize: BodyProps["fontSize"];
296
+ fontWeight?: BodyProps["fontWeight"];
297
+ textColor: BodyProps["color"];
298
+ backgroundColor: "bg-palette-primary" | "bg-palette-secondary" | "bg-palette-accent" | "bg-palette-text" | "bg-palette-background";
299
+ };
300
+ declare const Banner: ComponentConfig<BannerProps>;
301
+
292
302
  interface BodyTextProps extends BodyProps {
293
303
  text: YextEntityField<string>;
294
304
  }
295
305
  declare const BodyTextComponent: ComponentConfig<BodyTextProps>;
296
306
 
307
+ declare const imageWrapperVariants: (props?: ({
308
+ size?: "small" | "large" | "medium" | "full" | null | undefined;
309
+ aspectRatio?: "video" | "auto" | "square" | "portrait" | null | undefined;
310
+ rounded?: "small" | "none" | "large" | "medium" | "full" | null | undefined;
311
+ } & class_variance_authority_dist_types_js.ClassProp) | undefined) => string;
312
+ interface ImageWrapperProps extends VariantProps<typeof imageWrapperVariants> {
313
+ image: YextEntityField<ImageType>;
314
+ }
315
+ declare const ImageWrapperComponent: ComponentConfig<ImageWrapperProps>;
316
+
317
+ interface CardProps {
318
+ orientation: "left" | "right";
319
+ heading: {
320
+ text: YextEntityField<string>;
321
+ fontSize: HeadingProps["fontSize"];
322
+ color: HeadingProps["color"];
323
+ transform: HeadingProps["transform"];
324
+ };
325
+ subheading: {
326
+ text: YextEntityField<string>;
327
+ fontSize: HeadingProps["fontSize"];
328
+ color: HeadingProps["color"];
329
+ transform: HeadingProps["transform"];
330
+ };
331
+ body: {
332
+ text: YextEntityField<string>;
333
+ fontSize: BodyProps["fontSize"];
334
+ color: BodyProps["color"];
335
+ transform: BodyProps["textTransform"];
336
+ };
337
+ image: {
338
+ image: YextEntityField<ImageType>;
339
+ size: ImageWrapperProps["size"];
340
+ aspectRatio: ImageWrapperProps["aspectRatio"];
341
+ rounded: ImageWrapperProps["rounded"];
342
+ };
343
+ cta: {
344
+ entityField: YextEntityField<CTAProps>;
345
+ variant: CTAProps["variant"];
346
+ fontSize: HeadingProps["fontSize"];
347
+ };
348
+ }
349
+ declare const CardComponent: ComponentConfig<CardProps>;
350
+
297
351
  interface CTAWrapperProps {
298
352
  entityField: YextEntityField<CTAProps>;
299
353
  variant: CTAProps["variant"];
354
+ size: CTAProps["size"];
355
+ borderRadius: CTAProps["borderRadius"];
300
356
  fontSize: CTAProps["fontSize"];
301
357
  className?: CTAProps["className"];
302
358
  }
@@ -326,14 +382,26 @@ interface FlexContainerProps extends React.HTMLAttributes<HTMLDivElement>, Varia
326
382
  }
327
383
  declare const FlexContainerComponent: ComponentConfig<FlexContainerProps>;
328
384
 
385
+ declare const footerVariants: (props?: ({
386
+ backgroundColor?: "default" | "text" | "accent" | "secondary" | "primary" | "background" | null | undefined;
387
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
388
+ interface FooterProps extends VariantProps<typeof footerVariants> {
389
+ copyright: BodyProps & {
390
+ text: YextEntityField<string>;
391
+ };
392
+ links: {
393
+ cta: YextEntityField<CTA$1>;
394
+ id?: string;
395
+ }[];
396
+ }
397
+ declare const Footer: ComponentConfig<FooterProps>;
398
+
329
399
  type GetDirectionsProps = {
330
400
  coordinate: YextEntityField<Coordinate>;
331
401
  getDirectionsProvider: GetDirectionsConfig["provider"];
332
402
  variant: ButtonProps["variant"];
333
403
  size: ButtonProps["size"];
334
404
  borderRadius: ButtonProps["borderRadius"];
335
- alignment: "items-start" | "items-center";
336
- padding: VariantProps<typeof sectionVariants>["padding"];
337
405
  fontSize: ButtonProps["fontSize"];
338
406
  };
339
407
  declare const GetDirectionsComponent: ComponentConfig<GetDirectionsProps>;
@@ -398,16 +466,6 @@ interface HoursStatusProps {
398
466
  }
399
467
  declare const HoursStatusComponent: ComponentConfig<HoursStatusProps>;
400
468
 
401
- declare const imageWrapperVariants: (props?: ({
402
- size?: "small" | "large" | "medium" | "full" | null | undefined;
403
- aspectRatio?: "video" | "auto" | "square" | "portrait" | null | undefined;
404
- rounded?: "small" | "none" | "large" | "medium" | "full" | null | undefined;
405
- } & class_variance_authority_dist_types_js.ClassProp) | undefined) => string;
406
- interface ImageWrapperProps extends VariantProps<typeof imageWrapperVariants> {
407
- image: YextEntityField<ImageType>;
408
- }
409
- declare const ImageWrapperComponent: ComponentConfig<ImageWrapperProps>;
410
-
411
469
  declare const phoneVariants: (props?: ({
412
470
  fontWeight?: "default" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | null | undefined;
413
471
  color?: "default" | "text" | "accent" | "secondary" | "primary" | "background" | null | undefined;
@@ -459,4 +517,4 @@ interface TextListProps extends VariantProps<typeof textListVariants> {
459
517
  }
460
518
  declare const TextListComponent: ComponentConfig<TextListProps>;
461
519
 
462
- export { AddressComponent as Address, type AddressProps, Body, type BodyProps, BodyTextComponent as BodyText, type BodyTextProps, Button, type ButtonProps, CTA, type CTAProps, CTAWrapperComponent as CTAWrapper, type CTAWrapperProps, DocumentContext, Editor, EmailsComponent as Emails, type EmailsProps, EntityField, FlexContainerComponent as FlexContainer, type FlexContainerProps, type FontRegistry, FontSizeSelector, GetDirectionsComponent as GetDirections, type GetDirectionsProps, GridSectionComponent as GridSection, type GridSectionProps, 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, TailwindConfigContext, TextListComponent as TextList, type TextListProps, type ThemeConfig, VisualEditorProvider, type YextEntityField, YextEntityFieldSelector, applyTheme, bodyVariants, buttonVariants, constructFontSelectOptions, defaultFonts, getFontWeightOptions, getFontWeightOverrideOptions, headingVariants, resolveYextEntityField, sectionVariants, themeMangerCn, themeMangerTwMergeConfiguration, themeResolver, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields, useTailwindConfig };
520
+ export { AddressComponent as Address, type AddressProps, Banner, type BannerProps, Body, type BodyProps, BodyTextComponent as BodyText, type BodyTextProps, 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 FlexContainer, type FlexContainerProps, type FontRegistry, FontSizeSelector, Footer, type FooterProps, GetDirectionsComponent as GetDirections, type GetDirectionsProps, GridSectionComponent as GridSection, type GridSectionProps, 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, TailwindConfigContext, TextListComponent as TextList, type TextListProps, type ThemeConfig, VisualEditorProvider, type YextEntityField, YextEntityFieldSelector, applyTheme, bodyVariants, buttonVariants, constructFontSelectOptions, defaultFonts, getFontWeightOptions, getFontWeightOverrideOptions, headingVariants, resolveYextEntityField, sectionVariants, themeMangerCn, themeMangerTwMergeConfiguration, themeResolver, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields, useTailwindConfig };