@yext/visual-editor 0.0.16 → 0.0.17

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
@@ -1,70 +1,15 @@
1
- import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
2
1
  import * as React from 'react';
3
2
  import React__default from 'react';
4
- import { VariantProps } from 'class-variance-authority';
5
- import { CustomField, Field, ComponentConfig, Config } from '@measured/puck';
3
+ import { Field, Config, CustomField, ComponentConfig } from '@measured/puck';
4
+ import { ClassValue } from 'clsx';
6
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
- import { AddressType, GetDirectionsConfig, Coordinate, DayOfWeekNames, ImageType } from '@yext/pages-components';
8
-
9
- type NumberOrDefault = number | "default";
10
- type NumberFieldWithDefaultOptionProps = {
11
- label: string;
12
- defaultCustomValue: number;
13
- };
14
- declare const NumberFieldWithDefaultOption: ({ label, defaultCustomValue, }: NumberFieldWithDefaultOptionProps) => CustomField<NumberOrDefault>;
15
-
16
- declare const bodyVariants: (props?: ({
17
- fontWeight?: "default" | "bold" | "thin" | "extralight" | "light" | "normal" | "medium" | "semibold" | "extrabold" | "black" | null | undefined;
18
- color?: "default" | "text" | "primary" | "secondary" | "accent" | "background" | null | undefined;
19
- textTransform?: "none" | "uppercase" | "lowercase" | "capitalize" | null | undefined;
20
- } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
21
- interface BodyProps extends Omit<React.HTMLAttributes<HTMLParagraphElement>, "color">, VariantProps<typeof bodyVariants> {
22
- fontSize: NumberOrDefault;
23
- }
24
- declare const Body: React.ForwardRefExoticComponent<BodyProps & React.RefAttributes<HTMLParagraphElement>>;
25
-
26
- declare const buttonVariants: (props?: ({
27
- variant?: "link" | "primary" | "secondary" | "outline" | null | undefined;
28
- size?: "default" | "icon" | "sm" | "lg" | null | undefined;
29
- } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
30
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
31
- asChild?: boolean;
32
- fontSize?: NumberOrDefault;
33
- }
34
- declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
35
-
36
- interface CTAProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
37
- label?: string;
38
- url?: string;
39
- variant?: ButtonProps["variant"];
40
- size?: ButtonProps["size"];
41
- fontSize?: NumberOrDefault;
42
- }
43
- declare const CTA: {
44
- ({ label, url, variant, size, className, fontSize, }: CTAProps): react_jsx_runtime.JSX.Element;
45
- displayName: string;
46
- };
47
-
48
- declare const headingVariants: (props?: ({
49
- weight?: "default" | "bold" | "thin" | "extralight" | "light" | "normal" | "medium" | "semibold" | "extrabold" | "black" | null | undefined;
50
- color?: "default" | "text" | "primary" | "secondary" | "accent" | "background" | null | undefined;
51
- transform?: "none" | "uppercase" | "lowercase" | "capitalize" | null | undefined;
52
- level?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
53
- } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
54
- type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
55
- interface HeadingProps extends Omit<React.HTMLAttributes<HTMLHeadingElement>, "color">, VariantProps<typeof headingVariants> {
56
- level?: HeadingLevel;
57
- fontSize: NumberOrDefault;
58
- }
59
- declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
6
+ import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
7
+ import { VariantProps } from 'class-variance-authority';
8
+ import * as react_jsx_runtime_js from 'react/jsx-runtime.js';
9
+ import { AddressType, GetDirectionsConfig, Coordinate, HoursType, DayOfWeekNames, ImageType } from '@yext/pages-components';
10
+ import * as class_variance_authority_dist_types_js from 'class-variance-authority/dist/types.js';
60
11
 
61
- declare const sectionVariants: (props?: ({
62
- padding?: "default" | "small" | "none" | "large" | null | undefined;
63
- maxWidth?: "default" | "full" | "xl" | null | undefined;
64
- } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
65
- interface SectionProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof sectionVariants> {
66
- }
67
- declare const Section: React.ForwardRefExoticComponent<SectionProps & React.RefAttributes<HTMLDivElement>>;
12
+ declare const usePlatformBridgeDocument: () => any;
68
13
 
69
14
  type YextSchemaField = {
70
15
  name: string;
@@ -82,6 +27,74 @@ type YextFieldDefinition = {
82
27
  type: Record<string, string>;
83
28
  };
84
29
 
30
+ /**
31
+ * Under the hood we receive a Stream for a template, but we expose
32
+ * hooks with a more user-friendly name.
33
+ */
34
+ declare const usePlatformBridgeEntityFields: () => YextSchemaField[];
35
+ declare const useEntityFields: () => YextSchemaField[];
36
+
37
+ declare const DocumentContext: React.Context<any>;
38
+ declare const useDocument: <T>() => T;
39
+
40
+ declare const TailwindConfigContext: React.Context<any>;
41
+ declare const useTailwindConfig: <T>() => T;
42
+
43
+ type CoreStyle = {
44
+ label: string;
45
+ type: "number";
46
+ default: number;
47
+ } | {
48
+ label: string;
49
+ type: "select";
50
+ default: string;
51
+ options: StyleSelectOption[] | (() => StyleSelectOption[]);
52
+ } | {
53
+ label: string;
54
+ type: "color";
55
+ default: string;
56
+ };
57
+ type Style = CoreStyle & {
58
+ plugin: string;
59
+ };
60
+ type StyleSelectOption = {
61
+ label: string;
62
+ value: string;
63
+ };
64
+ type StyleGroup = {
65
+ label: string;
66
+ plugin: string;
67
+ styles: {
68
+ [key: string]: CoreStyle;
69
+ };
70
+ };
71
+ type ThemeConfigSection = {
72
+ label: string;
73
+ styles: {
74
+ [key: string]: Style | StyleGroup;
75
+ };
76
+ };
77
+ type ThemeConfig = {
78
+ [key: string]: ThemeConfigSection;
79
+ };
80
+ type TailwindConfig = {
81
+ [key: string]: {
82
+ [key: string]: any;
83
+ };
84
+ };
85
+ /**
86
+ * Merges the developer-specified theming and the marketer-specified theming,
87
+ * giving priority to the developer-specified theming.
88
+ */
89
+ declare const themeResolver: (developerTheming: TailwindConfig, marketerTheming: ThemeConfig) => TailwindConfig;
90
+
91
+ type Document = {
92
+ [key: string]: any;
93
+ };
94
+ declare const applyTheme: (document: Document, themeConfig: ThemeConfig, base?: string) => string;
95
+
96
+ declare function resolveVisualEditorData(data: any, pageSet: string | undefined): any;
97
+
85
98
  type Only<T, U> = {
86
99
  [P in keyof T]: T[P];
87
100
  } & {
@@ -106,7 +119,7 @@ type EntityFieldTypesFilter = {
106
119
  includeListsOnly?: boolean;
107
120
  };
108
121
  type RenderEntityFieldFilter<T extends Record<string, any>> = EntityFieldTypesFilter & EitherOrNeither<AllowList<T>, DisallowList<T>>;
109
- type EntityFieldTypes = "type.string" | "type.image" | "type.hours" | "type.address" | "type.phone" | "type.coordinate" | `c_${string}`;
122
+ type EntityFieldTypes = "type.string" | "type.image" | "type.hours" | "type.address" | "type.phone" | "type.coordinate" | "type.cta" | `c_${string}`;
110
123
 
111
124
  type YextEntityField<T> = {
112
125
  field: string;
@@ -122,6 +135,118 @@ type RenderYextEntityFieldSelectorProps<T extends Record<string, any>> = {
122
135
  */
123
136
  declare const YextEntityFieldSelector: <T extends Record<string, any>, U>(props: RenderYextEntityFieldSelectorProps<T>) => Field<YextEntityField<U>>;
124
137
 
138
+ declare const resolveYextEntityField: <T>(document: any, entityField: YextEntityField<T>) => T | undefined;
139
+
140
+ declare function yextCn(...inputs: ClassValue[]): string;
141
+
142
+ type FontRegistry = Record<string, FontSpecification>;
143
+ type FontSpecification = {
144
+ minWeight: number;
145
+ maxWeight: number;
146
+ italics: boolean;
147
+ fallback: "sans-serif" | "serif" | "monospace";
148
+ };
149
+ declare const defaultFonts: FontRegistry;
150
+ declare const constructFontSelectOptions: (fonts: FontRegistry) => StyleSelectOption[];
151
+ type getFontWeightParams = {
152
+ fontCssVariable?: string;
153
+ weightOptions?: StyleSelectOption[];
154
+ fontList?: FontRegistry;
155
+ };
156
+ declare const getFontWeightOptions: (options: getFontWeightParams) => StyleSelectOption[];
157
+ declare const getFontWeightOverrideOptions: (options: getFontWeightParams) => Promise<StyleSelectOption[]>;
158
+
159
+ type AllOrNothing<T extends Record<string, any>> = T | Partial<Record<keyof T, never>>;
160
+ type UniversalProps<T> = {
161
+ document: T;
162
+ children: React__default.ReactNode;
163
+ };
164
+ type EditorProps$1 = {
165
+ entityFields: YextSchemaField[];
166
+ tailwindConfig: TailwindConfig;
167
+ };
168
+ type VisualEditorProviderProps<T> = UniversalProps<T> & AllOrNothing<EditorProps$1>;
169
+ declare const VisualEditorProvider: <T>({ document, entityFields, tailwindConfig, children, }: VisualEditorProviderProps<T>) => react_jsx_runtime.JSX.Element;
170
+
171
+ type EditorProps = {
172
+ document: any;
173
+ componentRegistry: Map<string, Config<any>>;
174
+ themeConfig?: ThemeConfig;
175
+ };
176
+ declare const Editor: ({ document, componentRegistry, themeConfig, }: EditorProps) => react_jsx_runtime.JSX.Element;
177
+
178
+ type EntityFieldProps = {
179
+ displayName?: string;
180
+ fieldId?: string;
181
+ constantValueEnabled?: boolean;
182
+ children: React__default.ReactNode;
183
+ };
184
+ declare const EntityField: ({ displayName, fieldId, constantValueEnabled, children, }: EntityFieldProps) => string | number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
185
+
186
+ type NumberOrDefault = number | "default";
187
+ type NumberFieldWithDefaultOptionProps = {
188
+ label: string;
189
+ defaultCustomValue: number;
190
+ };
191
+ declare const NumberFieldWithDefaultOption: ({ label, defaultCustomValue, }: NumberFieldWithDefaultOptionProps) => CustomField<NumberOrDefault>;
192
+
193
+ declare const FontSizeSelector: (label?: string) => Field;
194
+
195
+ declare const bodyVariants: (props?: ({
196
+ fontSize?: "default" | "base" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
197
+ fontWeight?: "default" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | null | undefined;
198
+ color?: "default" | "text" | "secondary" | "primary" | "accent" | "background" | null | undefined;
199
+ textTransform?: "none" | "uppercase" | "lowercase" | "capitalize" | null | undefined;
200
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
201
+ interface BodyProps extends Omit<React.HTMLAttributes<HTMLParagraphElement>, "color">, VariantProps<typeof bodyVariants> {
202
+ }
203
+ declare const Body: React.ForwardRefExoticComponent<BodyProps & React.RefAttributes<HTMLParagraphElement>>;
204
+
205
+ declare const buttonVariants: (props?: ({
206
+ variant?: "link" | "primary" | null | undefined;
207
+ size?: "small" | "default" | "icon" | "large" | null | undefined;
208
+ fontSize?: "default" | "base" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
209
+ borderRadius?: "default" | "none" | "large" | "medium" | "full" | null | undefined;
210
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
211
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
212
+ asChild?: boolean;
213
+ }
214
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
215
+
216
+ interface CTAProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
217
+ label?: string;
218
+ link?: string;
219
+ variant?: ButtonProps["variant"];
220
+ size?: ButtonProps["size"];
221
+ borderRadius?: ButtonProps["borderRadius"];
222
+ fontSize?: ButtonProps["fontSize"];
223
+ }
224
+ declare const CTA: {
225
+ ({ label, link, variant, size, borderRadius, className, fontSize, }: CTAProps): react_jsx_runtime_js.JSX.Element;
226
+ displayName: string;
227
+ };
228
+
229
+ declare const headingVariants: (props?: ({
230
+ fontSize?: "default" | "base" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
231
+ weight?: "default" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | null | undefined;
232
+ color?: "default" | "text" | "secondary" | "primary" | "accent" | "background" | null | undefined;
233
+ transform?: "none" | "uppercase" | "lowercase" | "capitalize" | null | undefined;
234
+ level?: 2 | 1 | 3 | 4 | 5 | 6 | null | undefined;
235
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
236
+ type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
237
+ interface HeadingProps extends Omit<React.HTMLAttributes<HTMLHeadingElement>, "color">, VariantProps<typeof headingVariants> {
238
+ level?: HeadingLevel;
239
+ }
240
+ declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
241
+
242
+ declare const sectionVariants: (props?: ({
243
+ padding?: "small" | "default" | "none" | "large" | null | undefined;
244
+ maxWidth?: "default" | "xl" | "full" | null | undefined;
245
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
246
+ interface SectionProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof sectionVariants> {
247
+ }
248
+ declare const Section: React.ForwardRefExoticComponent<SectionProps & React.RefAttributes<HTMLDivElement>>;
249
+
125
250
  type AddressProps = {
126
251
  address: YextEntityField<AddressType>;
127
252
  getDirectionsProvider: GetDirectionsConfig["provider"];
@@ -130,17 +255,6 @@ type AddressProps = {
130
255
  };
131
256
  declare const AddressComponent: ComponentConfig<AddressProps>;
132
257
 
133
- type GetDirectionsProps = {
134
- coordinate: YextEntityField<Coordinate>;
135
- getDirectionsProvider: GetDirectionsConfig["provider"];
136
- variant: ButtonProps["variant"];
137
- size: ButtonProps["size"];
138
- alignment: "items-start" | "items-center";
139
- padding: VariantProps<typeof sectionVariants>["padding"];
140
- fontSize?: NumberOrDefault;
141
- };
142
- declare const GetDirectionsComponent: ComponentConfig<GetDirectionsProps>;
143
-
144
258
  interface BodyTextProps extends BodyProps {
145
259
  text: YextEntityField<string>;
146
260
  }
@@ -149,16 +263,16 @@ declare const BodyTextComponent: ComponentConfig<BodyTextProps>;
149
263
  interface CTAWrapperProps {
150
264
  entityField: YextEntityField<CTAProps>;
151
265
  variant: CTAProps["variant"];
152
- fontSize: NumberOrDefault;
266
+ fontSize: CTAProps["fontSize"];
153
267
  className?: CTAProps["className"];
154
268
  }
155
269
  declare const CTAWrapperComponent: ComponentConfig<CTAWrapperProps>;
156
270
 
157
271
  declare const emailsVariants: (props?: ({
158
- fontSize?: "default" | "medium" | "sm" | "lg" | "xl" | "xs" | "2xl" | "3xl" | "4xl" | "5xl" | null | undefined;
159
- fontWeight?: "default" | "bold" | "thin" | "extralight" | "light" | "normal" | "medium" | "semibold" | "extrabold" | "black" | null | undefined;
160
- color?: "default" | "text" | "primary" | "secondary" | "accent" | "background" | "foreground" | null | undefined;
161
- } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
272
+ fontSize?: "default" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "medium" | null | undefined;
273
+ fontWeight?: "bold" | "default" | "normal" | "black" | "medium" | "light" | "thin" | "extralight" | "semibold" | "extrabold" | null | undefined;
274
+ color?: "default" | "text" | "secondary" | "primary" | "accent" | "background" | "foreground" | null | undefined;
275
+ } & class_variance_authority_dist_types_js.ClassProp) | undefined) => string;
162
276
  interface EmailsProps extends VariantProps<typeof emailsVariants> {
163
277
  list: YextEntityField<string[]>;
164
278
  includeHyperlink: boolean;
@@ -167,33 +281,44 @@ interface EmailsProps extends VariantProps<typeof emailsVariants> {
167
281
  declare const EmailsComponent: ComponentConfig<EmailsProps>;
168
282
 
169
283
  declare const flexContainerVariants: (props?: ({
170
- direction?: "column" | "row" | null | undefined;
171
- alignment?: "stretch" | "center" | "end" | "start" | null | undefined;
284
+ direction?: "row" | "column" | null | undefined;
285
+ alignment?: "center" | "end" | "start" | "stretch" | null | undefined;
172
286
  justification?: "center" | "end" | "start" | "spaceBetween" | "spaceAround" | null | undefined;
173
- spacing?: "small" | "medium" | "large" | null | undefined;
174
- wrap?: "nowrap" | "wrap" | null | undefined;
175
- } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
287
+ spacing?: "small" | "large" | "medium" | null | undefined;
288
+ wrap?: "wrap" | "nowrap" | null | undefined;
289
+ } & class_variance_authority_dist_types_js.ClassProp) | undefined) => string;
176
290
  interface FlexContainerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof flexContainerVariants> {
177
291
  renderDropZone?: any;
178
292
  }
179
293
  declare const FlexContainerComponent: ComponentConfig<FlexContainerProps>;
180
294
 
295
+ type GetDirectionsProps = {
296
+ coordinate: YextEntityField<Coordinate>;
297
+ getDirectionsProvider: GetDirectionsConfig["provider"];
298
+ variant: ButtonProps["variant"];
299
+ size: ButtonProps["size"];
300
+ borderRadius: ButtonProps["borderRadius"];
301
+ alignment: "items-start" | "items-center";
302
+ padding: VariantProps<typeof sectionVariants>["padding"];
303
+ fontSize: ButtonProps["fontSize"];
304
+ };
305
+ declare const GetDirectionsComponent: ComponentConfig<GetDirectionsProps>;
306
+
181
307
  declare const backgroundVariants: (props?: ({
182
- backgroundColor?: "default" | "text" | "primary" | "secondary" | "accent" | "background" | null | undefined;
308
+ backgroundColor?: "default" | "text" | "secondary" | "primary" | "accent" | "background" | null | undefined;
183
309
  maxContentWidth?: "default" | "lg" | "xl" | "xxl" | null | undefined;
184
- } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
310
+ } & class_variance_authority_dist_types_js.ClassProp) | undefined) => string;
185
311
  declare const gridSectionVariants: (props?: ({
186
- horizontalSpacing?: "small" | "medium" | "large" | null | undefined;
187
- } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
312
+ horizontalSpacing?: "small" | "large" | "medium" | null | undefined;
313
+ } & class_variance_authority_dist_types_js.ClassProp) | undefined) => string;
188
314
  declare const columnVariants: (props?: ({
189
315
  verticalAlignment?: "center" | "end" | "start" | "spaceBetween" | null | undefined;
190
- verticalSpacing?: "default" | "small" | "medium" | "large" | null | undefined;
191
- padding?: "small" | "medium" | "none" | "large" | null | undefined;
192
- } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
316
+ } & class_variance_authority_dist_types_js.ClassProp) | undefined) => string;
193
317
  interface ColumnProps extends VariantProps<typeof columnVariants> {
194
318
  span?: number;
195
319
  }
196
- interface GridSectionProps extends React__default.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridSectionVariants>, VariantProps<typeof backgroundVariants> {
320
+ interface GridSectionProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridSectionVariants>, VariantProps<typeof backgroundVariants> {
321
+ verticalPadding: string;
197
322
  distribution: "auto" | "manual";
198
323
  columns: ColumnProps[];
199
324
  renderDropZone?: any;
@@ -206,6 +331,7 @@ interface HeadingTextProps extends HeadingProps {
206
331
  declare const HeadingTextComponent: ComponentConfig<HeadingTextProps>;
207
332
 
208
333
  type HoursCardProps = {
334
+ hours: YextEntityField<HoursType>;
209
335
  startOfWeek: keyof DayOfWeekNames | "today";
210
336
  collapseDays: boolean;
211
337
  showAdditionalHoursText: boolean;
@@ -215,7 +341,7 @@ type HoursCardProps = {
215
341
  declare const HoursCardComponent: ComponentConfig<HoursCardProps>;
216
342
 
217
343
  interface HoursStatusProps {
218
- hours: YextEntityField<any>;
344
+ hours: YextEntityField<HoursType>;
219
345
  className?: string;
220
346
  showCurrentStatus?: boolean;
221
347
  timeFormat?: "12h" | "24h";
@@ -225,129 +351,64 @@ interface HoursStatusProps {
225
351
  declare const HoursStatusComponent: ComponentConfig<HoursStatusProps>;
226
352
 
227
353
  declare const imageWrapperVariants: (props?: ({
228
- size?: "small" | "medium" | "large" | "full" | null | undefined;
229
- aspectRatio?: "auto" | "square" | "video" | "portrait" | null | undefined;
230
- rounded?: "small" | "medium" | "none" | "large" | "full" | null | undefined;
231
- } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
354
+ size?: "small" | "large" | "medium" | "full" | null | undefined;
355
+ aspectRatio?: "video" | "auto" | "square" | "portrait" | null | undefined;
356
+ rounded?: "small" | "none" | "large" | "medium" | "full" | null | undefined;
357
+ } & class_variance_authority_dist_types_js.ClassProp) | undefined) => string;
232
358
  interface ImageWrapperProps extends VariantProps<typeof imageWrapperVariants> {
233
359
  image: YextEntityField<ImageType>;
234
360
  }
235
361
  declare const ImageWrapperComponent: ComponentConfig<ImageWrapperProps>;
236
362
 
237
363
  declare const phoneVariants: (props?: ({
238
- fontWeight?: "default" | "bold" | "thin" | "extralight" | "light" | "normal" | "medium" | "semibold" | "extrabold" | "black" | null | undefined;
239
- color?: "default" | "text" | "primary" | "secondary" | "accent" | "background" | "foreground" | null | undefined;
240
- } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
364
+ fontWeight?: "default" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | null | undefined;
365
+ color?: "default" | "text" | "secondary" | "primary" | "accent" | "background" | "foreground" | null | undefined;
366
+ } & class_variance_authority_dist_types_js.ClassProp) | undefined) => string;
241
367
  interface PhoneProps extends VariantProps<typeof phoneVariants> {
242
368
  phone: YextEntityField<string>;
369
+ format?: "domestic" | "international";
243
370
  textSize?: number;
244
371
  }
245
372
  declare const PhoneComponent: ComponentConfig<PhoneProps>;
246
373
 
374
+ interface PromoProps {
375
+ orientation: "left" | "right";
376
+ title: {
377
+ text: YextEntityField<string>;
378
+ fontSize: HeadingProps["fontSize"];
379
+ color: HeadingProps["color"];
380
+ transform: HeadingProps["transform"];
381
+ };
382
+ description: {
383
+ text: YextEntityField<string>;
384
+ fontSize: HeadingProps["fontSize"];
385
+ color: HeadingProps["color"];
386
+ transform: HeadingProps["transform"];
387
+ };
388
+ image: {
389
+ image: YextEntityField<ImageType>;
390
+ size: ImageWrapperProps["size"];
391
+ aspectRatio: ImageWrapperProps["aspectRatio"];
392
+ rounded: ImageWrapperProps["rounded"];
393
+ };
394
+ cta: {
395
+ entityField: YextEntityField<CTAProps>;
396
+ variant: CTAProps["variant"];
397
+ fontSize: HeadingProps["fontSize"];
398
+ };
399
+ }
400
+ declare const PromoComponent: ComponentConfig<PromoProps>;
401
+
247
402
  declare const textListVariants: (props?: ({
248
- fontWeight?: "default" | "bold" | "thin" | "extralight" | "light" | "normal" | "medium" | "semibold" | "extrabold" | "black" | null | undefined;
249
- color?: "default" | "text" | "primary" | "secondary" | "accent" | "background" | null | undefined;
403
+ fontWeight?: "default" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | null | undefined;
404
+ color?: "default" | "text" | "secondary" | "primary" | "accent" | "background" | null | undefined;
250
405
  textTransform?: "none" | "uppercase" | "lowercase" | "capitalize" | null | undefined;
251
- padding?: "default" | "small" | "none" | "large" | null | undefined;
252
- } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
406
+ padding?: "small" | "default" | "none" | "large" | null | undefined;
407
+ } & class_variance_authority_dist_types_js.ClassProp) | undefined) => string;
253
408
  interface TextListProps extends VariantProps<typeof textListVariants> {
254
409
  list: YextEntityField<string[]>;
255
410
  textSize?: number;
256
411
  }
257
412
  declare const TextListComponent: ComponentConfig<TextListProps>;
258
413
 
259
- type CoreStyle = {
260
- label: string;
261
- type: "number";
262
- default: number;
263
- } | {
264
- label: string;
265
- type: "select";
266
- default: string;
267
- options: StyleSelectOption[];
268
- } | {
269
- label: string;
270
- type: "color";
271
- default: string;
272
- };
273
- type Style = CoreStyle & {
274
- plugin: string;
275
- };
276
- type StyleSelectOption = {
277
- label: string;
278
- value: string;
279
- };
280
- type StyleGroup = {
281
- label: string;
282
- plugin: string;
283
- styles: {
284
- [key: string]: CoreStyle;
285
- };
286
- };
287
- type ThemeConfigSection = {
288
- label: string;
289
- styles: {
290
- [key: string]: Style | StyleGroup;
291
- };
292
- };
293
- type ThemeConfig = {
294
- [key: string]: ThemeConfigSection;
295
- };
296
- type TailwindConfig = {
297
- [key: string]: {
298
- [key: string]: any;
299
- };
300
- };
301
- /**
302
- * Merges the developer-specified theming and the marketer-specified theming,
303
- * giving priority to the developer-specified theming.
304
- */
305
- declare const themeResolver: (developerTheming: TailwindConfig, marketerTheming: ThemeConfig) => TailwindConfig;
306
-
307
- type EditorProps = {
308
- document: any;
309
- componentRegistry: Map<string, Config<any>>;
310
- themeConfig?: ThemeConfig;
311
- };
312
- declare const Editor: ({ document, componentRegistry, themeConfig, }: EditorProps) => react_jsx_runtime.JSX.Element;
313
-
314
- type EntityFieldProps = {
315
- displayName?: string;
316
- fieldId?: string;
317
- constantValueEnabled?: boolean;
318
- children: React__default.ReactNode;
319
- };
320
- declare const EntityField: ({ displayName, fieldId, constantValueEnabled, children, }: EntityFieldProps) => string | number | boolean | react_jsx_runtime.JSX.Element | Iterable<React__default.ReactNode> | null | undefined;
321
-
322
- declare const usePlatformBridgeDocument: () => any;
323
-
324
- /**
325
- * Under the hood we receive a Stream for a template, but we expose
326
- * hooks with a more user-friendly name.
327
- */
328
- declare const usePlatformBridgeEntityFields: () => YextSchemaField[];
329
- type EntityFieldsProviderProps = {
330
- entityFields: YextSchemaField[];
331
- children: React.ReactNode;
332
- };
333
- declare const EntityFieldsProvider: ({ entityFields, children, }: EntityFieldsProviderProps) => react_jsx_runtime.JSX.Element;
334
- declare const useEntityFields: () => YextSchemaField[];
335
-
336
- declare const DocumentContext: React.Context<any>;
337
- type DocumentProviderProps<T> = {
338
- value: T;
339
- children: React.ReactNode;
340
- };
341
- declare const DocumentProvider: <T>({ value, children, }: DocumentProviderProps<T>) => react_jsx_runtime.JSX.Element;
342
- declare const useDocument: <T>() => T;
343
-
344
- type Document = {
345
- [key: string]: any;
346
- };
347
- declare const applyTheme: (document: Document, themeConfig: ThemeConfig, base?: string) => string;
348
-
349
- declare function resolveVisualEditorData(data: any, pageSet: string | undefined): any;
350
-
351
- declare const resolveYextEntityField: <T>(document: any, entityField: YextEntityField<T>) => T | undefined;
352
-
353
- export { AddressComponent, type AddressProps, Body, type BodyProps, BodyTextComponent, type BodyTextProps, Button, type ButtonProps, CTA, type CTAProps, CTAWrapperComponent, type CTAWrapperProps, DocumentContext, DocumentProvider, Editor, EmailsComponent, type EmailsProps, EntityField, EntityFieldsProvider, FlexContainerComponent, type FlexContainerProps, GetDirectionsComponent, type GetDirectionsProps, GridSectionComponent, type GridSectionProps, Heading, type HeadingProps, HeadingTextComponent, type HeadingTextProps, HoursCardComponent, type HoursCardProps, HoursStatusComponent, type HoursStatusProps, ImageWrapperComponent, type ImageWrapperProps, NumberFieldWithDefaultOption, type NumberFieldWithDefaultOptionProps, type NumberOrDefault, PhoneComponent, type PhoneProps, type RenderYextEntityFieldSelectorProps, Section, type SectionProps, TextListComponent, type TextListProps, type ThemeConfig, type YextEntityField, YextEntityFieldSelector, applyTheme, bodyVariants, buttonVariants, headingVariants, resolveVisualEditorData, resolveYextEntityField, sectionVariants, themeResolver, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields };
414
+ 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, Heading, type HeadingProps, HeadingTextComponent as HeadingText, type HeadingTextProps, HoursCardComponent as HoursCard, type HoursCardProps, HoursStatusComponent as HoursStatus, type HoursStatusProps, 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, resolveVisualEditorData, resolveYextEntityField, sectionVariants, themeResolver, useDocument, useEntityFields, usePlatformBridgeDocument, usePlatformBridgeEntityFields, useTailwindConfig, yextCn };