@yext/visual-editor 0.0.30 → 0.0.31
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 +14 -4
- package/dist/index.d.ts +14 -4
- package/dist/visual-editor.cjs +50 -50
- package/dist/visual-editor.js +4769 -4606
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -34,7 +34,8 @@ type YextFieldDefinition = {
|
|
|
34
34
|
declare const usePlatformBridgeEntityFields: () => YextSchemaField[] | null;
|
|
35
35
|
declare const useEntityFields: () => YextSchemaField[] | null;
|
|
36
36
|
|
|
37
|
-
declare const
|
|
37
|
+
declare const TemplatePropsContext: React.Context<any>;
|
|
38
|
+
declare const useTemplateProps: <T>() => T;
|
|
38
39
|
declare const useDocument: <T>() => T;
|
|
39
40
|
|
|
40
41
|
declare const TailwindConfigContext: React.Context<any>;
|
|
@@ -198,7 +199,7 @@ declare const getFontWeightOverrideOptions: (options: getFontWeightParams) => Pr
|
|
|
198
199
|
|
|
199
200
|
type AllOrNothing<T extends Record<string, any>> = T | Partial<Record<keyof T, never>>;
|
|
200
201
|
type UniversalProps<T> = {
|
|
201
|
-
|
|
202
|
+
templateProps: T;
|
|
202
203
|
children: React__default.ReactNode;
|
|
203
204
|
};
|
|
204
205
|
type EditorProps$1 = {
|
|
@@ -206,7 +207,7 @@ type EditorProps$1 = {
|
|
|
206
207
|
tailwindConfig: TailwindConfig;
|
|
207
208
|
};
|
|
208
209
|
type VisualEditorProviderProps<T> = UniversalProps<T> & AllOrNothing<EditorProps$1>;
|
|
209
|
-
declare const VisualEditorProvider: <T>({
|
|
210
|
+
declare const VisualEditorProvider: <T>({ templateProps, entityFields, tailwindConfig, children, }: VisualEditorProviderProps<T>) => react_jsx_runtime.JSX.Element;
|
|
210
211
|
|
|
211
212
|
/**
|
|
212
213
|
* Check that the string is a valid slug.
|
|
@@ -398,6 +399,7 @@ interface CardProps {
|
|
|
398
399
|
};
|
|
399
400
|
cta: {
|
|
400
401
|
entityField: YextEntityField<CTAProps>;
|
|
402
|
+
linkType: CTAProps["linkType"];
|
|
401
403
|
variant: CTAProps["variant"];
|
|
402
404
|
fontSize: CTAProps["fontSize"];
|
|
403
405
|
};
|
|
@@ -411,6 +413,7 @@ interface CTAWrapperProps {
|
|
|
411
413
|
size: CTAProps["size"];
|
|
412
414
|
borderRadius: CTAProps["borderRadius"];
|
|
413
415
|
fontSize: CTAProps["fontSize"];
|
|
416
|
+
linkType: CTAProps["linkType"];
|
|
414
417
|
className?: CTAProps["className"];
|
|
415
418
|
}
|
|
416
419
|
declare const CTAWrapperComponent: ComponentConfig<CTAWrapperProps>;
|
|
@@ -503,6 +506,7 @@ declare const HoursStatusComponent: ComponentConfig<HoursStatusProps>;
|
|
|
503
506
|
declare const phoneVariants: (props?: ({
|
|
504
507
|
fontWeight?: "default" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | null | undefined;
|
|
505
508
|
color?: "default" | "text" | "accent" | "secondary" | "primary" | "background" | null | undefined;
|
|
509
|
+
includeHyperlink?: boolean | null | undefined;
|
|
506
510
|
} & class_variance_authority_dist_types_js.ClassProp) | undefined) => string;
|
|
507
511
|
interface PhoneProps extends VariantProps<typeof phoneVariants> {
|
|
508
512
|
phone: YextEntityField<string>;
|
|
@@ -535,6 +539,7 @@ interface PromoProps {
|
|
|
535
539
|
entityField: YextEntityField<CTAProps>;
|
|
536
540
|
variant: CTAProps["variant"];
|
|
537
541
|
fontSize: CTAProps["fontSize"];
|
|
542
|
+
linkType: CTAProps["linkType"];
|
|
538
543
|
};
|
|
539
544
|
}
|
|
540
545
|
declare const PromoComponent: ComponentConfig<PromoProps>;
|
|
@@ -556,4 +561,9 @@ type BreadcrumbsProps = {
|
|
|
556
561
|
};
|
|
557
562
|
declare const Breadcrumbs: ComponentConfig<BreadcrumbsProps>;
|
|
558
563
|
|
|
559
|
-
|
|
564
|
+
interface DirectoryProps {
|
|
565
|
+
separator?: string;
|
|
566
|
+
}
|
|
567
|
+
declare const Directory: ComponentConfig<DirectoryProps>;
|
|
568
|
+
|
|
569
|
+
export { AddressComponent as Address, type AddressProps, Banner, type BannerProps, Body, type BodyProps, BodyTextComponent as BodyText, type BodyTextProps, BorderRadiusSelector, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CTA, type CTAProps, CTAWrapperComponent as CTAWrapper, type CTAWrapperProps, CardComponent as Card, type CardProps, Directory, type DirectoryProps, 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, TemplatePropsContext, 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, useTemplateProps, validateSlug };
|
package/dist/index.d.ts
CHANGED
|
@@ -34,7 +34,8 @@ type YextFieldDefinition = {
|
|
|
34
34
|
declare const usePlatformBridgeEntityFields: () => YextSchemaField[] | null;
|
|
35
35
|
declare const useEntityFields: () => YextSchemaField[] | null;
|
|
36
36
|
|
|
37
|
-
declare const
|
|
37
|
+
declare const TemplatePropsContext: React.Context<any>;
|
|
38
|
+
declare const useTemplateProps: <T>() => T;
|
|
38
39
|
declare const useDocument: <T>() => T;
|
|
39
40
|
|
|
40
41
|
declare const TailwindConfigContext: React.Context<any>;
|
|
@@ -198,7 +199,7 @@ declare const getFontWeightOverrideOptions: (options: getFontWeightParams) => Pr
|
|
|
198
199
|
|
|
199
200
|
type AllOrNothing<T extends Record<string, any>> = T | Partial<Record<keyof T, never>>;
|
|
200
201
|
type UniversalProps<T> = {
|
|
201
|
-
|
|
202
|
+
templateProps: T;
|
|
202
203
|
children: React__default.ReactNode;
|
|
203
204
|
};
|
|
204
205
|
type EditorProps$1 = {
|
|
@@ -206,7 +207,7 @@ type EditorProps$1 = {
|
|
|
206
207
|
tailwindConfig: TailwindConfig;
|
|
207
208
|
};
|
|
208
209
|
type VisualEditorProviderProps<T> = UniversalProps<T> & AllOrNothing<EditorProps$1>;
|
|
209
|
-
declare const VisualEditorProvider: <T>({
|
|
210
|
+
declare const VisualEditorProvider: <T>({ templateProps, entityFields, tailwindConfig, children, }: VisualEditorProviderProps<T>) => react_jsx_runtime.JSX.Element;
|
|
210
211
|
|
|
211
212
|
/**
|
|
212
213
|
* Check that the string is a valid slug.
|
|
@@ -398,6 +399,7 @@ interface CardProps {
|
|
|
398
399
|
};
|
|
399
400
|
cta: {
|
|
400
401
|
entityField: YextEntityField<CTAProps>;
|
|
402
|
+
linkType: CTAProps["linkType"];
|
|
401
403
|
variant: CTAProps["variant"];
|
|
402
404
|
fontSize: CTAProps["fontSize"];
|
|
403
405
|
};
|
|
@@ -411,6 +413,7 @@ interface CTAWrapperProps {
|
|
|
411
413
|
size: CTAProps["size"];
|
|
412
414
|
borderRadius: CTAProps["borderRadius"];
|
|
413
415
|
fontSize: CTAProps["fontSize"];
|
|
416
|
+
linkType: CTAProps["linkType"];
|
|
414
417
|
className?: CTAProps["className"];
|
|
415
418
|
}
|
|
416
419
|
declare const CTAWrapperComponent: ComponentConfig<CTAWrapperProps>;
|
|
@@ -503,6 +506,7 @@ declare const HoursStatusComponent: ComponentConfig<HoursStatusProps>;
|
|
|
503
506
|
declare const phoneVariants: (props?: ({
|
|
504
507
|
fontWeight?: "default" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | null | undefined;
|
|
505
508
|
color?: "default" | "text" | "accent" | "secondary" | "primary" | "background" | null | undefined;
|
|
509
|
+
includeHyperlink?: boolean | null | undefined;
|
|
506
510
|
} & class_variance_authority_dist_types_js.ClassProp) | undefined) => string;
|
|
507
511
|
interface PhoneProps extends VariantProps<typeof phoneVariants> {
|
|
508
512
|
phone: YextEntityField<string>;
|
|
@@ -535,6 +539,7 @@ interface PromoProps {
|
|
|
535
539
|
entityField: YextEntityField<CTAProps>;
|
|
536
540
|
variant: CTAProps["variant"];
|
|
537
541
|
fontSize: CTAProps["fontSize"];
|
|
542
|
+
linkType: CTAProps["linkType"];
|
|
538
543
|
};
|
|
539
544
|
}
|
|
540
545
|
declare const PromoComponent: ComponentConfig<PromoProps>;
|
|
@@ -556,4 +561,9 @@ type BreadcrumbsProps = {
|
|
|
556
561
|
};
|
|
557
562
|
declare const Breadcrumbs: ComponentConfig<BreadcrumbsProps>;
|
|
558
563
|
|
|
559
|
-
|
|
564
|
+
interface DirectoryProps {
|
|
565
|
+
separator?: string;
|
|
566
|
+
}
|
|
567
|
+
declare const Directory: ComponentConfig<DirectoryProps>;
|
|
568
|
+
|
|
569
|
+
export { AddressComponent as Address, type AddressProps, Banner, type BannerProps, Body, type BodyProps, BodyTextComponent as BodyText, type BodyTextProps, BorderRadiusSelector, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CTA, type CTAProps, CTAWrapperComponent as CTAWrapper, type CTAWrapperProps, CardComponent as Card, type CardProps, Directory, type DirectoryProps, 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, TemplatePropsContext, 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, useTemplateProps, validateSlug };
|