@yext/visual-editor 1.4.11 → 2.0.0-beta.1

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.
Files changed (225) hide show
  1. package/dist/SectionLibraryVisualEditorProvider-67ng4X9e.js +108670 -0
  2. package/dist/SectionLibraryVisualEditorProvider.css +1 -0
  3. package/dist/cli/assets/directory-locator-source/components/contentBlocks/Address.tsx +251 -0
  4. package/dist/cli/assets/directory-locator-source/components/contentBlocks/HeadingText.tsx +147 -0
  5. package/dist/cli/assets/directory-locator-source/components/contentBlocks/HoursStatus.tsx +157 -0
  6. package/dist/cli/assets/directory-locator-source/components/contentBlocks/HoursTable.tsx +164 -0
  7. package/dist/cli/assets/directory-locator-source/components/contentBlocks/MapboxStaticMap.tsx +205 -0
  8. package/dist/cli/assets/directory-locator-source/components/contentBlocks/Phone.tsx +155 -0
  9. package/dist/cli/assets/directory-locator-source/components/contentBlocks/image/EmptyImageState.tsx +168 -0
  10. package/dist/cli/assets/directory-locator-source/components/contentBlocks/image/Image.tsx +275 -0
  11. package/dist/cli/assets/directory-locator-source/components/contentBlocks/image/styling.ts +66 -0
  12. package/dist/cli/assets/directory-locator-source/components/contentBlocks/index.ts +13 -0
  13. package/dist/cli/assets/directory-locator-source/components/sections/Breadcrumbs.tsx +298 -0
  14. package/dist/cli/assets/directory-locator-source/components/sections/directory/Directory.test.tsx +872 -0
  15. package/dist/cli/assets/directory-locator-source/components/sections/directory/Directory.tsx +260 -0
  16. package/dist/cli/assets/directory-locator-source/components/sections/directory/DirectoryCard.tsx +507 -0
  17. package/dist/cli/assets/directory-locator-source/components/sections/directory/DirectoryWrapper.tsx +491 -0
  18. package/dist/cli/assets/directory-locator-source/components/sections/directory/directoryChildReference.test.tsx +226 -0
  19. package/dist/cli/assets/directory-locator-source/components/sections/directory/directoryChildReference.tsx +98 -0
  20. package/dist/cli/assets/directory-locator-source/components/sections/locator/Filters.test.tsx +147 -0
  21. package/dist/cli/assets/directory-locator-source/components/sections/locator/Filters.tsx +691 -0
  22. package/dist/cli/assets/directory-locator-source/components/sections/locator/Locator.test.tsx +1551 -0
  23. package/dist/cli/assets/directory-locator-source/components/sections/locator/Locator.tsx +541 -0
  24. package/dist/cli/assets/directory-locator-source/components/sections/locator/LocatorFields.test.ts +43 -0
  25. package/dist/cli/assets/directory-locator-source/components/sections/locator/LocatorResultCard.tsx +1594 -0
  26. package/dist/cli/assets/directory-locator-source/components/sections/locator/LocatorWrapper.tsx +1157 -0
  27. package/dist/cli/assets/directory-locator-source/components/sections/locator/Map.tsx +304 -0
  28. package/dist/cli/assets/directory-locator-source/components/sections/locator/MapPinIcon.tsx +160 -0
  29. package/dist/cli/assets/directory-locator-source/components/sections/locator/Results.tsx +267 -0
  30. package/dist/cli/assets/directory-locator-source/sectionLibrarySupport.ts +245 -0
  31. package/dist/cli/yextve.js +16888 -0
  32. package/dist/index.d.ts +542 -6311
  33. package/dist/locales/page/cs/visual-editor.json +85 -0
  34. package/dist/locales/page/da/visual-editor.json +73 -0
  35. package/dist/locales/page/de/visual-editor.json +73 -0
  36. package/dist/locales/page/en/visual-editor.json +73 -0
  37. package/dist/locales/page/en-GB/visual-editor.json +73 -0
  38. package/dist/locales/page/es/visual-editor.json +79 -0
  39. package/dist/locales/page/et/visual-editor.json +73 -0
  40. package/dist/locales/page/fi/visual-editor.json +73 -0
  41. package/dist/locales/page/fr/visual-editor.json +79 -0
  42. package/dist/locales/page/hr/visual-editor.json +79 -0
  43. package/dist/locales/page/hu/visual-editor.json +73 -0
  44. package/dist/locales/page/it/visual-editor.json +79 -0
  45. package/dist/locales/page/ja/visual-editor.json +73 -0
  46. package/dist/locales/page/lt/visual-editor.json +85 -0
  47. package/dist/locales/page/lv/visual-editor.json +77 -0
  48. package/dist/locales/page/nb/visual-editor.json +73 -0
  49. package/dist/locales/page/nl/visual-editor.json +73 -0
  50. package/dist/locales/page/pl/visual-editor.json +85 -0
  51. package/dist/locales/page/pt/visual-editor.json +79 -0
  52. package/dist/locales/page/ro/visual-editor.json +79 -0
  53. package/dist/locales/page/sk/visual-editor.json +85 -0
  54. package/dist/locales/page/sv/visual-editor.json +73 -0
  55. package/dist/locales/page/tr/visual-editor.json +73 -0
  56. package/dist/locales/page/zh/visual-editor.json +73 -0
  57. package/dist/locales/page/zh-TW/visual-editor.json +73 -0
  58. package/dist/locales/platform/cs/visual-editor.json +531 -0
  59. package/dist/locales/platform/da/visual-editor.json +519 -0
  60. package/dist/locales/platform/de/visual-editor.json +519 -0
  61. package/dist/locales/platform/en/visual-editor.json +519 -0
  62. package/dist/locales/platform/en-GB/visual-editor.json +519 -0
  63. package/dist/locales/platform/es/visual-editor.json +525 -0
  64. package/dist/locales/platform/et/visual-editor.json +519 -0
  65. package/dist/locales/platform/fi/visual-editor.json +519 -0
  66. package/dist/locales/platform/fr/visual-editor.json +525 -0
  67. package/dist/locales/platform/hr/visual-editor.json +525 -0
  68. package/dist/locales/platform/hu/visual-editor.json +519 -0
  69. package/dist/locales/platform/it/visual-editor.json +525 -0
  70. package/dist/locales/platform/ja/visual-editor.json +519 -0
  71. package/dist/locales/platform/lt/visual-editor.json +531 -0
  72. package/dist/locales/platform/lv/visual-editor.json +523 -0
  73. package/dist/locales/platform/nb/visual-editor.json +519 -0
  74. package/dist/locales/platform/nl/visual-editor.json +519 -0
  75. package/dist/locales/platform/pl/visual-editor.json +531 -0
  76. package/dist/locales/platform/pt/visual-editor.json +525 -0
  77. package/dist/locales/platform/ro/visual-editor.json +525 -0
  78. package/dist/locales/platform/sk/visual-editor.json +531 -0
  79. package/dist/locales/platform/sv/visual-editor.json +519 -0
  80. package/dist/locales/platform/tr/visual-editor.json +519 -0
  81. package/dist/locales/platform/zh/visual-editor.json +519 -0
  82. package/dist/locales/platform/zh-TW/visual-editor.json +519 -0
  83. package/dist/locatorEntityTypes-s4dmT9l5.d.ts +1850 -0
  84. package/dist/plugin/internal/sectionLibraryValidation/builtInTranslationResources.d.ts +3 -0
  85. package/dist/plugin/internal/sectionLibraryValidation/stages/api/api.d.ts +7 -0
  86. package/dist/plugin/internal/sectionLibraryValidation/stages/api/libraryMetadata.d.ts +7 -0
  87. package/dist/plugin/internal/sectionLibraryValidation/stages/code/importRules.d.ts +13 -0
  88. package/dist/plugin/internal/sectionLibraryValidation/stages/code/validateCode.d.ts +10 -0
  89. package/dist/plugin/internal/sectionLibraryValidation/stages/code/xssRules.d.ts +7 -0
  90. package/dist/plugin/internal/sectionLibraryValidation/stages/structure/structure.d.ts +7 -0
  91. package/dist/plugin/internal/sectionLibraryValidation/types.d.ts +48 -0
  92. package/dist/plugin/internal/sectionLibraryValidation/validateSectionLibrary.d.ts +8 -0
  93. package/dist/plugin/internal/sectionLibraryValidation/validationError.d.ts +6 -0
  94. package/dist/plugin/plugin.js +2233 -5786
  95. package/dist/plugin/types/entityFields.d.ts +21 -0
  96. package/dist/plugin/types/images.d.ts +62 -0
  97. package/dist/plugin/types/sectionLibrary.d.ts +94 -0
  98. package/dist/plugin/types/types.d.ts +204 -0
  99. package/dist/plugin/types/videos.d.ts +24 -0
  100. package/dist/plugin/utils/i18n/locales.d.ts +5 -0
  101. package/dist/plugin/utils/i18n/translationResources.d.ts +41 -0
  102. package/dist/plugin/utils/normalizeLocale.d.ts +8 -0
  103. package/dist/plugin/utils/plainText.d.ts +6 -0
  104. package/dist/plugin/vite-plugin/index.d.ts +2 -0
  105. package/dist/plugin/vite-plugin/local-editor/artifacts.d.ts +18 -0
  106. package/dist/plugin/vite-plugin/local-editor/config.d.ts +11 -0
  107. package/dist/plugin/vite-plugin/local-editor/data.d.ts +10 -0
  108. package/dist/plugin/vite-plugin/local-editor/entityFields.d.ts +13 -0
  109. package/dist/plugin/vite-plugin/local-editor/fixtureData.d.ts +12 -0
  110. package/dist/plugin/vite-plugin/local-editor/generatedFiles.d.ts +34 -0
  111. package/dist/plugin/vite-plugin/local-editor/server.d.ts +18 -0
  112. package/dist/plugin/vite-plugin/local-editor/types.d.ts +109 -0
  113. package/dist/plugin/vite-plugin/local-editor/utils.d.ts +16 -0
  114. package/dist/plugin/vite-plugin/plugin.d.ts +8 -0
  115. package/dist/plugin/vite-plugin/section-library/migrationRegistry.d.ts +6 -0
  116. package/dist/plugin/vite-plugin/section-library/sectionFrontmatter.d.ts +3 -0
  117. package/dist/plugin/vite-plugin/section-library/sectionLibraryGenerator.d.ts +21 -0
  118. package/dist/plugin/vite-plugin/section-library/sharedComponentRegistry.d.ts +16 -0
  119. package/dist/section-library-support.js +158 -0
  120. package/dist/sectionLibrarySupport.d.ts +282 -0
  121. package/dist/style.css +1 -1
  122. package/dist/visual-editor-9bLkRo2X.js +702 -0
  123. package/dist/visual-editor-B5f3AZF6.js +706 -0
  124. package/dist/visual-editor-BGZbJkMp.js +694 -0
  125. package/dist/visual-editor-BPVqHHz5.js +706 -0
  126. package/dist/visual-editor-BPvDMSb8.js +706 -0
  127. package/dist/visual-editor-BTT9n9b6.js +718 -0
  128. package/dist/visual-editor-BXSlgf31.js +694 -0
  129. package/dist/visual-editor-BXYlpe7B.js +145 -0
  130. package/dist/visual-editor-Bez9GftS.js +694 -0
  131. package/dist/visual-editor-Bk5QJccl.js +718 -0
  132. package/dist/visual-editor-BqtG2m0y.js +694 -0
  133. package/dist/visual-editor-Bxy81Ezy.js +145 -0
  134. package/dist/visual-editor-C00efXqJ.js +706 -0
  135. package/dist/visual-editor-C0vq2BRM.js +145 -0
  136. package/dist/visual-editor-CCgmYV5S.js +169 -0
  137. package/dist/visual-editor-CERViyTJ.js +145 -0
  138. package/dist/visual-editor-CZdmgAn0.js +706 -0
  139. package/dist/visual-editor-CcOCcCUQ.js +694 -0
  140. package/dist/visual-editor-CjORnP1D.js +169 -0
  141. package/dist/visual-editor-CmomGJB8.js +157 -0
  142. package/dist/visual-editor-Cymg8ID2.js +169 -0
  143. package/dist/visual-editor-D2Hk1nhM.js +145 -0
  144. package/dist/visual-editor-D2_8u6ZI.js +694 -0
  145. package/dist/visual-editor-D4vaqoBN.js +694 -0
  146. package/dist/visual-editor-D6n8EP_O.js +694 -0
  147. package/dist/visual-editor-D8MRFn5x.js +157 -0
  148. package/dist/visual-editor-DKG_E7X4.js +694 -0
  149. package/dist/visual-editor-DOXtCqRv.js +145 -0
  150. package/dist/visual-editor-DQEd3xwY.js +145 -0
  151. package/dist/visual-editor-DQq0_rUn.js +706 -0
  152. package/dist/visual-editor-DRXezaoB.js +694 -0
  153. package/dist/visual-editor-DUngIOnE.js +157 -0
  154. package/dist/visual-editor-DbgFzBNV.js +718 -0
  155. package/dist/visual-editor-DeZVZYfd.js +169 -0
  156. package/dist/visual-editor-DfJMZpiP.js +145 -0
  157. package/dist/visual-editor-DgAsQK9D.js +145 -0
  158. package/dist/visual-editor-Dhi__-7_.js +145 -0
  159. package/dist/visual-editor-DiLdoISr.js +718 -0
  160. package/dist/visual-editor-DjdqpJU-.js +145 -0
  161. package/dist/visual-editor-DnTPMRV4.js +694 -0
  162. package/dist/visual-editor-DvuH3jyL.js +157 -0
  163. package/dist/visual-editor-E0hASBXn.js +694 -0
  164. package/dist/visual-editor-TfVDfO5_.js +145 -0
  165. package/dist/visual-editor-W1OHU94y.js +694 -0
  166. package/dist/visual-editor-W_ZDmMFn.js +145 -0
  167. package/dist/visual-editor-b7ALusk8.js +145 -0
  168. package/dist/visual-editor-bauJ9beX.js +694 -0
  169. package/dist/visual-editor-erGXf3kS.js +157 -0
  170. package/dist/visual-editor-xnDHZFuO.js +153 -0
  171. package/dist/visual-editor-yiWZqIH0.js +157 -0
  172. package/dist/visual-editor.css +1 -0
  173. package/dist/visual-editor.js +15074 -137463
  174. package/package.json +46 -25
  175. package/dist/editor.css +0 -1
  176. package/dist/visual-editor-1QC8zZX_.js +0 -221
  177. package/dist/visual-editor-5C5XV5rL.js +0 -221
  178. package/dist/visual-editor-B8-FoFxc.js +0 -1049
  179. package/dist/visual-editor-BJgCpnYV.js +0 -1073
  180. package/dist/visual-editor-BKLiin5z.js +0 -1049
  181. package/dist/visual-editor-BWbqw_QE.js +0 -233
  182. package/dist/visual-editor-Bb6upvTE.js +0 -221
  183. package/dist/visual-editor-BcZCBLFh.js +0 -1049
  184. package/dist/visual-editor-BecDYKH8.js +0 -1049
  185. package/dist/visual-editor-BllAUu_T.js +0 -1073
  186. package/dist/visual-editor-BmaYFuCe.js +0 -233
  187. package/dist/visual-editor-BnPFkJlo.js +0 -221
  188. package/dist/visual-editor-BoIXa-xl.js +0 -245
  189. package/dist/visual-editor-BtDJICJp.js +0 -1073
  190. package/dist/visual-editor-BwxWyr_L.js +0 -221
  191. package/dist/visual-editor-Bz7BlR_j.js +0 -221
  192. package/dist/visual-editor-CC0RAmib.js +0 -1049
  193. package/dist/visual-editor-CDY9slY9.js +0 -1061
  194. package/dist/visual-editor-CFebs6R8.js +0 -1049
  195. package/dist/visual-editor-CNL0HyVh.js +0 -1049
  196. package/dist/visual-editor-CYnzwNwX.js +0 -229
  197. package/dist/visual-editor-CZH605TK.js +0 -233
  198. package/dist/visual-editor-Cada46ZF.js +0 -1049
  199. package/dist/visual-editor-CheComxC.js +0 -1061
  200. package/dist/visual-editor-CuA8h_Xv.js +0 -221
  201. package/dist/visual-editor-CuRmgs-p.js +0 -245
  202. package/dist/visual-editor-D9_YWQQY.js +0 -1073
  203. package/dist/visual-editor-D9w4wRG8.js +0 -245
  204. package/dist/visual-editor-D9xTiOC0.js +0 -221
  205. package/dist/visual-editor-DA7CixSl.js +0 -1061
  206. package/dist/visual-editor-DAnBQ9H_.js +0 -221
  207. package/dist/visual-editor-DF8RsMvq.js +0 -233
  208. package/dist/visual-editor-DLrKYx7j.js +0 -1061
  209. package/dist/visual-editor-DQJc_Xok.js +0 -233
  210. package/dist/visual-editor-DTZFGKm7.js +0 -221
  211. package/dist/visual-editor-DXebihTA.js +0 -233
  212. package/dist/visual-editor-DZ4U1fk-.js +0 -221
  213. package/dist/visual-editor-Dg7P-vDv.js +0 -1057
  214. package/dist/visual-editor-Dh2cuwWt.js +0 -1049
  215. package/dist/visual-editor-DpetyO9o.js +0 -1049
  216. package/dist/visual-editor-Duav2tXb.js +0 -1061
  217. package/dist/visual-editor-DvYsu_s9.js +0 -221
  218. package/dist/visual-editor-DwlX3nnZ.js +0 -221
  219. package/dist/visual-editor-Dz5s66Og.js +0 -221
  220. package/dist/visual-editor-E57fPJMD.js +0 -1049
  221. package/dist/visual-editor-Fy_uEJju.js +0 -1061
  222. package/dist/visual-editor-G8e2TllW.js +0 -1049
  223. package/dist/visual-editor-HkfpXRw7.js +0 -1049
  224. package/dist/visual-editor-ZKG4e_Ey.js +0 -1049
  225. package/dist/visual-editor-rZRnDwgU.js +0 -245
@@ -0,0 +1,1850 @@
1
+ import * as React from 'react';
2
+ import React__default, { ReactNode } from 'react';
3
+ import { ClassValue } from 'clsx';
4
+ import { ImageType, CTA as CTA$1, LinkType, HoursType, HoursTableProps, ComplexImageType } from '@yext/pages-components';
5
+ import { BaseField, FieldProps, DefaultComponentProps, ComponentConfig, Field, ArrayField, ObjectField, Fields, CustomField, Config, ComponentData } from '@puckeditor/core';
6
+ import * as class_variance_authority_types from 'class-variance-authority/types';
7
+ import { VariantProps } from 'class-variance-authority';
8
+ import * as _yext_search_headless_react from '@yext/search-headless-react';
9
+ import { SearchAnalyticsConfig } from '@yext/search-ui-react';
10
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
11
+ import * as react_i18next from 'react-i18next';
12
+ import { TOptions } from 'i18next';
13
+
14
+ type YextSchemaField = {
15
+ name: string;
16
+ displayName?: string;
17
+ definition: YextSchemaFieldDefinition;
18
+ children?: {
19
+ fields: YextSchemaField[];
20
+ };
21
+ optionFormat?: "OPTION_FORMAT_EXPANDED";
22
+ };
23
+ type YextSchemaFieldDefinition = {
24
+ name: string;
25
+ isList?: boolean;
26
+ registryId?: string;
27
+ typeName?: string;
28
+ typeRegistryId?: string;
29
+ type: Record<string, string>;
30
+ };
31
+ type StreamFields = {
32
+ fields: YextSchemaField[];
33
+ displayNames?: Record<string, string>;
34
+ };
35
+
36
+ type StreamDocument = {
37
+ [key: string]: any;
38
+ locale?: string;
39
+ meta?: {
40
+ locale?: string;
41
+ entityType?: {
42
+ id?: string;
43
+ };
44
+ };
45
+ __certified_facts?: any;
46
+ _pageset?: string;
47
+ __?: {
48
+ pathInfo?: PathInfoShape;
49
+ layout?: string;
50
+ theme?: string;
51
+ codeTemplate?: string;
52
+ name?: string;
53
+ visualEditorConfig?: string;
54
+ isPrimaryLocale?: boolean;
55
+ entityPageSetUrlTemplates?: string;
56
+ locatorSourcePageSets?: string;
57
+ categoryRootAncestorId?: number;
58
+ };
59
+ };
60
+ type PathInfoShape = {
61
+ primaryLocale?: string;
62
+ includeLocalePrefixForPrimaryLocale?: boolean;
63
+ template?: string;
64
+ breadcrumbPrefix?: string;
65
+ sourceEntityPageSetTemplate?: string;
66
+ [key: string]: any;
67
+ };
68
+ type LocatorConfig = {
69
+ source?: string;
70
+ experienceKey?: string;
71
+ entityType?: string;
72
+ savedFilter?: string;
73
+ entityTypeScope?: EntityTypeScope[];
74
+ [key: string]: any;
75
+ };
76
+ type EntityTypeScope = {
77
+ entityType?: string;
78
+ savedFilter?: string;
79
+ };
80
+
81
+ declare const TemplatePropsContext: React.Context<any>;
82
+ declare const useTemplateProps: <T = {
83
+ document: Record<string, any>;
84
+ relativePrefixToRoot?: string;
85
+ }>() => T;
86
+ declare const useDocument: <T = StreamDocument>() => T;
87
+
88
+ declare const usePlatformTranslation: () => react_i18next.UseTranslationResponse<"visual-editor", undefined>;
89
+ type MsgString = string & {
90
+ __brand: "i18nPlatform";
91
+ };
92
+ /**
93
+ * msg marks strings for translation in config JSON such
94
+ * as Puck fields or the theme config. The TOptions are
95
+ * stringified in the config and dynamically replaced
96
+ * upon render.
97
+ */
98
+ declare const msg: (key: string, defaultValue: string, options?: TOptions) => MsgString;
99
+ /**
100
+ * pt translates strings based on the platform i18n. It can
101
+ * operate as a normal TFunction or handle configurations that
102
+ * have been stringified by msg.
103
+ */
104
+ declare const pt: (keyOrEncodedValue: string | MsgString, optionsOrDefault?: string | TOptions, options?: TOptions) => string;
105
+
106
+ type ComboboxOption = {
107
+ label: string;
108
+ value: any;
109
+ color?: string;
110
+ colorStyle?: React__default.CSSProperties;
111
+ icon?: string;
112
+ };
113
+ type ComboboxOptionGroup = {
114
+ title?: string;
115
+ description?: string;
116
+ options: ComboboxOption[];
117
+ };
118
+
119
+ /** Describes the possible image fill types. */
120
+ type ImageFillType = "fill" | "fit";
121
+ /** Describes an image's aspect ratio. */
122
+ type ImageAspectRatio = {
123
+ horizontalFactor: number;
124
+ verticalFactor: number;
125
+ };
126
+ /** Describes the dimensions of an image. */
127
+ type ImageDimension = {
128
+ width: number;
129
+ height: number;
130
+ };
131
+ /** Describes the data corresponding to a single image. */
132
+ type ImageData = {
133
+ url: string;
134
+ dimension?: ImageDimension;
135
+ exifMetadata?: {
136
+ rotate: number;
137
+ };
138
+ };
139
+ /** Describes the data corresponding to an image rotation. */
140
+ type ImageRotation = {
141
+ degree: number;
142
+ };
143
+ /** Describes the crop boundary box data */
144
+ type ImageCrop = {
145
+ left: number;
146
+ top: number;
147
+ height: number;
148
+ width: number;
149
+ aspectRatio?: ImageAspectRatio;
150
+ };
151
+ type TransformKind = "CROP" | "ROTATION";
152
+ /** Outlines the possible image transformations. */
153
+ type ImageTransformation = ImageRotation | ImageCrop;
154
+ type ImageTransformations = Partial<Record<TransformKind, ImageTransformation>>;
155
+ /** Describes the data corresponding to a piece of image content. */
156
+ type ImageContentData = {
157
+ name?: string;
158
+ transformedImage?: ImageData;
159
+ originalImage?: ImageData;
160
+ childImages?: ImageData[];
161
+ transformations?: ImageTransformations;
162
+ sourceUrl?: string;
163
+ altText?: string;
164
+ };
165
+ type AssetImageType = Omit<ImageType, "alternateText"> & {
166
+ alternateText?: TranslatableString;
167
+ assetImage?: ImageContentData;
168
+ };
169
+ type LocalizedAssetImage = {
170
+ hasLocalizedValue?: "true";
171
+ defaultValue?: AssetImageType;
172
+ } & {
173
+ [locale: string]: AssetImageType | undefined;
174
+ };
175
+ type TranslatableAssetImage = AssetImageType | LocalizedAssetImage;
176
+ declare const isLocalizedAssetImage: (value: unknown) => value is LocalizedAssetImage;
177
+ declare const resolveLocalizedAssetImage: (value: TranslatableAssetImage | ImageType | undefined, locale: string) => AssetImageType | undefined;
178
+
179
+ type Video = {
180
+ /** The YouTube video URL */
181
+ url: string;
182
+ /** The YouTube video ID */
183
+ id: string;
184
+ /** The YouTube video title */
185
+ title: string;
186
+ /** The YouTube video thumbnail URL */
187
+ thumbnail: string;
188
+ /** The YouTube video duration */
189
+ duration: string;
190
+ /** The embedded YouTube video URL (https://youtube.com/embed/<video_id>) */
191
+ embeddedUrl: string;
192
+ };
193
+ type AssetVideo = {
194
+ video: Video;
195
+ /** Asset video description field */
196
+ videoDescription?: string;
197
+ /** Asset name (unique) */
198
+ name: string;
199
+ /** Asset internal id */
200
+ id: string;
201
+ };
202
+
203
+ /**
204
+ * A pages-components CTA with a translatable label and link
205
+ */
206
+ type TranslatableCTA = Omit<CTA$1, "label" | "link"> & {
207
+ /** The text to display in the CTA */
208
+ label: TranslatableString;
209
+ /** The link the for the CTA */
210
+ link: TranslatableString;
211
+ /** Whether the link should be normalized before rendering */
212
+ normalizeLink?: boolean;
213
+ openInNewTab?: boolean;
214
+ };
215
+ /** Enhanced CTA options */
216
+ type EnhancedTranslatableCTA = TranslatableCTA & {
217
+ /**
218
+ * The type of CTA button to display.
219
+ * textAndLink is a standard button
220
+ * getDirections is a button that opens a map based on the coordinate field
221
+ * presetImage uses a preset image such as app store or food delivery logos for the button
222
+ * @defaultValue "textAndLink"
223
+ */
224
+ ctaType?: "textAndLink" | "getDirections" | "presetImage";
225
+ };
226
+ /** Preset delivery logo options */
227
+ declare const FOOD_DELIVERY_SERVICES: readonly ["deliveroo", "doordash", "grubhub", "skip-the-dishes", "postmates", "uber-eats", "ezcater"];
228
+ type FoodDeliveryServiceType = (typeof FOOD_DELIVERY_SERVICES)[number];
229
+ /** Preset image types for CTA buttons - app store or food delivery logos */
230
+ type PresetImageType = "app-store" | "google-play" | "galaxy-store" | "app-gallery" | FoodDeliveryServiceType;
231
+ /** Data for the HeroSection */
232
+ type HeroSectionType = {
233
+ /**
234
+ * The image to show in the hero section
235
+ */
236
+ image?: ImageType | AssetImageType;
237
+ /** The first CTA button for the hero section */
238
+ primaryCta?: EnhancedTranslatableCTA;
239
+ /** The second CTA button for the hero section */
240
+ secondaryCta?: EnhancedTranslatableCTA;
241
+ };
242
+ /** Data for the PromoSection */
243
+ type PromoSectionType = {
244
+ /**
245
+ * The image or video to show in the promo
246
+ */
247
+ image?: ImageType | AssetImageType | AssetVideo;
248
+ /** The main text to display in the promo */
249
+ title?: TranslatableString;
250
+ /** The sub text to display in the promo */
251
+ description?: TranslatableRichText;
252
+ /** The CTA button for the promo */
253
+ cta: EnhancedTranslatableCTA;
254
+ };
255
+ /** Data for the ProductSection */
256
+ type ProductSectionType = {
257
+ products: Array<ProductStruct>;
258
+ };
259
+ /** A structured product price with an amount and ISO currency code. */
260
+ type ProductPrice = {
261
+ /** The numeric price value. */
262
+ value?: number | string;
263
+ /** The ISO 4217 currency code, for example USD or GBP. */
264
+ currencyCode?: string;
265
+ };
266
+ /** An individual product in the ProductSection */
267
+ type ProductStruct = {
268
+ /**
269
+ * The product's image
270
+ */
271
+ image?: ImageType | AssetImageType;
272
+ /**
273
+ * The product's brow text above the title/name
274
+ */
275
+ brow?: TranslatableString | TranslatableRichText;
276
+ /** The product's name */
277
+ name?: TranslatableString;
278
+ /**
279
+ * The product's price
280
+ */
281
+ price?: ProductPrice;
282
+ /** The product's description */
283
+ description?: TranslatableRichText;
284
+ /**
285
+ * The product's category
286
+ */
287
+ category?: TranslatableString | TranslatableRichText;
288
+ /** The product's CTA */
289
+ cta: EnhancedTranslatableCTA;
290
+ };
291
+ /** Data for the EventSection */
292
+ type EventSectionType = {
293
+ events: Array<EventStruct>;
294
+ };
295
+ /** An individual event in the EventsSection */
296
+ type EventStruct = {
297
+ /**
298
+ * An image representing the event
299
+ */
300
+ image?: ImageType | AssetImageType;
301
+ /** The event's title */
302
+ title?: TranslatableString;
303
+ /** A UTC string for event's date and time (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ssZ) */
304
+ dateTime?: string;
305
+ /** The event's description */
306
+ description?: TranslatableRichText;
307
+ /** The event's CTA */
308
+ cta: EnhancedTranslatableCTA;
309
+ };
310
+ /** Data for the FAQSection */
311
+ type FAQSectionType = {
312
+ faqs: Array<FAQStruct>;
313
+ };
314
+ /** An individual FAQ */
315
+ type FAQStruct = {
316
+ /** The question (always visible on the page) */
317
+ question: TranslatableString | TranslatableRichText;
318
+ /** The answer (visible when the question is clicked) */
319
+ answer: TranslatableRichText;
320
+ };
321
+ /** Data for the TestimonialSection */
322
+ type TestimonialSectionType = {
323
+ testimonials: Array<TestimonialStruct>;
324
+ };
325
+ /** An individual testimonial for the TestimonialSection */
326
+ type TestimonialStruct = {
327
+ /** The testimonial text */
328
+ description?: TranslatableRichText;
329
+ /** The name of the person who contributed the testimonial */
330
+ contributorName?: TranslatableString;
331
+ /** A UTC string for the contribution's date and time (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ssZ) */
332
+ contributionDate?: string;
333
+ };
334
+ /** An individual insight for the InsightSection */
335
+ type InsightStruct = {
336
+ /**
337
+ * An image representing the insight
338
+ */
339
+ image?: ImageType | AssetImageType;
340
+ /** The insight's title */
341
+ name?: TranslatableString;
342
+ /**
343
+ * The insight's category
344
+ */
345
+ category?: TranslatableString | TranslatableRichText;
346
+ /** A UTC string for the insight's publish time (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ssZ) */
347
+ publishTime?: string;
348
+ /** The insight's description */
349
+ description?: TranslatableRichText;
350
+ /** The insight's CTA */
351
+ cta: EnhancedTranslatableCTA;
352
+ };
353
+ /** Data for the InsightSection */
354
+ type InsightSectionType = {
355
+ insights: Array<InsightStruct>;
356
+ };
357
+ /** Data for the TeamSection */
358
+ type TeamSectionType = {
359
+ people: Array<PersonStruct>;
360
+ };
361
+ /** An individual person in the TeamSection */
362
+ type PersonStruct = {
363
+ /**
364
+ * The person's headshot image
365
+ */
366
+ headshot?: ImageType | AssetImageType;
367
+ /** The person's name */
368
+ name?: TranslatableString;
369
+ /** The person's job title */
370
+ title?: TranslatableString | TranslatableRichText;
371
+ /** The person's phone number. Format: +1234567890 */
372
+ phoneNumber?: string;
373
+ /** The person's email address */
374
+ email?: string;
375
+ /** A call to action for the person */
376
+ cta: EnhancedTranslatableCTA;
377
+ };
378
+ /** Represents a translatable string. The key is the locale (en, es, fr), and the value is the localized string. */
379
+ type LocalizedValues = {
380
+ hasLocalizedValue?: "true";
381
+ defaultValue?: string;
382
+ } & Record<string, string | undefined>;
383
+ /**
384
+ * A string that can be translated for different locales.
385
+ */
386
+ type TranslatableString = string | LocalizedValues;
387
+ /**
388
+ * Rich text that can be translated for different locales.
389
+ */
390
+ type TranslatableRichText = (string | RichText) | ({
391
+ hasLocalizedValue?: "true";
392
+ defaultValue?: string | RichText;
393
+ } & Record<string, string | RichText | undefined>);
394
+ /**
395
+ * A rich text object with HTML and JSON (LexicalRichText) representations.
396
+ * The HTML representation is used on the live page.
397
+ * The JSON representation is used in the editor for rich text editing.
398
+ */
399
+ type RichText = {
400
+ html?: string;
401
+ json?: string;
402
+ };
403
+
404
+ /**
405
+ * An object representing a color based on the theme specified by the user.
406
+ */
407
+ type ThemeColor = {
408
+ /** The theme color token selected by the user. */
409
+ selectedColor: string;
410
+ /** The theme color token that contrasts with the selectedColor. */
411
+ contrastingColor: string;
412
+ /**
413
+ * Whether the user-selected color is dark.
414
+ */
415
+ isDarkColor?: boolean;
416
+ };
417
+ declare const backgroundColors: Record<string, {
418
+ label: string;
419
+ value: ThemeColor;
420
+ }>;
421
+ /** Corresponds to the different semantic heading levels */
422
+ type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
423
+ declare const defaultThemeTailwindExtensions: {
424
+ colors: {
425
+ "palette-primary-light": string;
426
+ "palette-secondary-light": string;
427
+ "palette-tertiary-light": string;
428
+ "palette-quaternary-light": string;
429
+ "palette-primary-dark": string;
430
+ "palette-secondary-dark": string;
431
+ "palette-primary-contrast": string;
432
+ "palette-secondary-contrast": string;
433
+ "palette-tertiary-contrast": string;
434
+ "palette-quaternary-contrast": string;
435
+ gray: {
436
+ 100: string;
437
+ 200: string;
438
+ 300: string;
439
+ 400: string;
440
+ 500: string;
441
+ 600: string;
442
+ 800: string;
443
+ 900: string;
444
+ };
445
+ };
446
+ fontSize: {
447
+ "body-xs-fontSize": string;
448
+ "body-sm-fontSize": string;
449
+ "body-lg-fontSize": string;
450
+ "link-xs-fontSize": string;
451
+ "link-sm-fontSize": string;
452
+ "3xl": string;
453
+ "4xl": string;
454
+ };
455
+ };
456
+ type BorderRadiusOption = {
457
+ label: string;
458
+ value: string;
459
+ };
460
+ declare const imageBorderRadiusOptions: {
461
+ label: string;
462
+ value: string;
463
+ }[];
464
+ type ImageBorderRadius = (typeof imageBorderRadiusOptions)[number]["value"];
465
+ declare const ThemeOptions: {
466
+ HEADING_LEVEL: {
467
+ label: string;
468
+ value: HeadingLevel;
469
+ }[];
470
+ TEXT_TRANSFORM: {
471
+ label: MsgString;
472
+ value: string;
473
+ }[];
474
+ FONT_STYLE: {
475
+ label: MsgString;
476
+ value: string;
477
+ }[];
478
+ LETTER_SPACING: {
479
+ label: string;
480
+ value: string;
481
+ }[];
482
+ BACKGROUND_COLOR: ComboboxOptionGroup[];
483
+ SITE_COLOR: ComboboxOptionGroup[];
484
+ CTA_VARIANT: {
485
+ label: MsgString;
486
+ value: string;
487
+ }[];
488
+ PRESET_IMAGE: {
489
+ label: string;
490
+ value: PresetImageType;
491
+ }[];
492
+ ALIGNMENT: {
493
+ label: MsgString;
494
+ value: string;
495
+ }[];
496
+ VERTICAL_POSITION: {
497
+ label: MsgString;
498
+ value: string;
499
+ }[];
500
+ JUSTIFY_CONTENT: {
501
+ label: MsgString;
502
+ value: string;
503
+ }[];
504
+ BODY_VARIANT: {
505
+ label: MsgString;
506
+ value: string;
507
+ }[];
508
+ BUTTON_BORDER_RADIUS: BorderRadiusOption[];
509
+ IMAGE_BORDER_RADIUS: {
510
+ label: string;
511
+ value: string;
512
+ }[];
513
+ SPACING: () => {
514
+ label: string;
515
+ value: string;
516
+ }[];
517
+ FONT_SIZE: (includeLargeSizes?: boolean) => {
518
+ label: string;
519
+ value: string;
520
+ }[];
521
+ HOURS_OPTIONS: {
522
+ label: MsgString;
523
+ value: string;
524
+ }[];
525
+ PHONE_OPTIONS: {
526
+ label: MsgString;
527
+ value: string;
528
+ }[];
529
+ MAX_WIDTH: {
530
+ label: MsgString;
531
+ value: string;
532
+ }[];
533
+ SHOW_HIDE: {
534
+ label: MsgString;
535
+ value: boolean;
536
+ }[];
537
+ };
538
+ declare const VisualEditorThemeClassSafelist: string[];
539
+ declare const VisualEditorComponentsContentPath = "node_modules/@yext/visual-editor/dist/**/*.js";
540
+
541
+ declare const useBackground: () => Required<ThemeColor> | undefined;
542
+ declare const BackgroundProvider: ({ children, value, }: {
543
+ children: ReactNode;
544
+ value: Required<ThemeColor>;
545
+ }) => React__default.JSX.Element;
546
+
547
+ /** An object mapping translation keys to the translated values. Allows sub-objects. */
548
+ type TranslationDictionary = {
549
+ [key: string]: string | TranslationDictionary;
550
+ };
551
+ /** A function that loads one complete locale dictionary on request. */
552
+ type TranslationLoader = () => Promise<TranslationDictionary>;
553
+ /** Maps normalized locales to complete, ready-to-install dictionaries. */
554
+ type TranslationLoaders = Partial<Record<string, TranslationLoader>>;
555
+ /** The complete translation loaders used by a Section Library runtime. */
556
+ type SectionLibraryTranslationLoaders = {
557
+ platform: TranslationLoaders;
558
+ page: TranslationLoaders;
559
+ };
560
+ /** Loads a complete generated translation dictionary, falling back to English. */
561
+ declare const loadTranslationDictionary: (locale: string, loaders: TranslationLoaders) => Promise<TranslationDictionary>;
562
+
563
+ /**
564
+ * Returns the preferred distance unit for a given locale.
565
+ */
566
+ declare const getPreferredDistanceUnit: (locale: string) => "mile" | "kilometer";
567
+ /**
568
+ * Converts miles to kilometers.
569
+ */
570
+ declare const toKilometers: (miles: number) => number;
571
+ declare const toMiles: (kilometers: number) => number;
572
+ declare const toMeters: (distance: number, unit: "mile" | "kilometer") => number;
573
+ declare const fromMeters: (meters: number, unit: "mile" | "kilometer") => number;
574
+ declare const formatDistance: (distance: number, locale: string, minDigits?: number, maxDigits?: number) => string;
575
+
576
+ declare const fetchLocalesToPathsForEntity: ({ businessId, apiKey, contentEndpointId, contentDeliveryAPIDomain, entityId, streamDocument, }: {
577
+ businessId: string;
578
+ apiKey: string;
579
+ contentEndpointId: string;
580
+ contentDeliveryAPIDomain: string;
581
+ entityId: string;
582
+ streamDocument: StreamDocument;
583
+ }) => Promise<Record<string, string>>;
584
+
585
+ type CoreStyle = {
586
+ label: string;
587
+ type: "number";
588
+ default: number;
589
+ } | {
590
+ label: string;
591
+ type: "select";
592
+ default: string;
593
+ options: StyleSelectOption[] | (() => StyleSelectOption[]);
594
+ } | {
595
+ label: string;
596
+ type: "color";
597
+ default: string;
598
+ };
599
+ type Style = CoreStyle & {
600
+ plugin: string;
601
+ };
602
+ type StyleSelectOption = {
603
+ label: string;
604
+ value: string;
605
+ };
606
+ type StyleGroup = {
607
+ label: string;
608
+ plugin: string;
609
+ styles: {
610
+ [key: string]: CoreStyle;
611
+ };
612
+ };
613
+ type ThemeConfigSection = {
614
+ label: string;
615
+ styles: {
616
+ [key: string]: Style | StyleGroup;
617
+ };
618
+ };
619
+ type ThemeConfig = {
620
+ [key: string]: ThemeConfigSection;
621
+ };
622
+ type TailwindConfig = {
623
+ [key: string]: {
624
+ [key: string]: any;
625
+ };
626
+ };
627
+ type PlainObject = Record<string, any>;
628
+ /**
629
+ * Merges two objects deeply, giving priority to properties from the first object.
630
+ */
631
+ declare const deepMerge: <T extends PlainObject, U extends PlainObject>(obj1: T, obj2: U) => T & U;
632
+ /**
633
+ * Merges the developer-specified theming and the marketer-specified theming,
634
+ * giving priority to the developer-specified theming.
635
+ */
636
+ declare const themeResolver: (developerTheming: TailwindConfig, marketerTheming: ThemeConfig) => TailwindConfig;
637
+
638
+ type FontWeightSupport = {
639
+ weights: number[];
640
+ } | {
641
+ minWeight: number;
642
+ maxWeight: number;
643
+ };
644
+ type FontVariant = {
645
+ style: "normal" | "italic";
646
+ filePath: string;
647
+ } & FontWeightSupport;
648
+ type Font = {
649
+ fallback: "sans-serif" | "serif" | "monospace" | "cursive";
650
+ italics: boolean;
651
+ facePath?: string;
652
+ variants?: FontVariant[];
653
+ } & FontWeightSupport;
654
+ type FontRegistry = Record<string, Font>;
655
+ declare const defaultFonts: FontRegistry;
656
+ /**
657
+ * Builds font-family select options from a font registry. The label and CSS
658
+ * font-family value are both derived from the font family name so theme data
659
+ * remains human-readable.
660
+ */
661
+ declare const constructFontSelectOptions: (fonts: FontRegistry) => {
662
+ label: string;
663
+ value: string;
664
+ }[];
665
+ type getFontWeightParams = {
666
+ fontCssVariable?: string;
667
+ weightOptions?: StyleSelectOption[];
668
+ fontList?: FontRegistry;
669
+ };
670
+ declare const getFontWeightOptions: (options: getFontWeightParams) => StyleSelectOption[];
671
+ declare const getFontWeightOverrideOptions: (options: getFontWeightParams) => Promise<StyleSelectOption[]>;
672
+
673
+ declare const themeManagerTwMergeConfiguration: {
674
+ extend: {
675
+ classGroups: {
676
+ "font-family": {
677
+ font: ((value: string) => boolean)[];
678
+ }[];
679
+ "font-weight": {
680
+ font: ((value: string) => boolean)[];
681
+ }[];
682
+ "font-size": {
683
+ text: ((value: string) => boolean)[];
684
+ }[];
685
+ "text-color": {
686
+ text: ((value: string) => boolean)[];
687
+ }[];
688
+ gap: {
689
+ gap: ((value: string) => boolean)[];
690
+ }[];
691
+ py: {
692
+ py: ((value: string) => boolean)[];
693
+ }[];
694
+ px: {
695
+ px: ((value: string) => boolean)[];
696
+ }[];
697
+ "max-w": {
698
+ "max-w": ((value: string) => boolean)[];
699
+ }[];
700
+ "bg-color": {
701
+ "bg-color": ((value: string) => boolean)[];
702
+ }[];
703
+ rounded: {
704
+ rounded: ((value: string) => boolean)[];
705
+ }[];
706
+ "text-transform": ((value: string) => boolean)[];
707
+ tracking: ((value: string) => boolean)[];
708
+ };
709
+ };
710
+ };
711
+ declare function themeManagerCn(...inputs: ClassValue[]): string;
712
+
713
+ /**
714
+ * Binds parent data into the first child of each named slot.
715
+ *
716
+ * 1. Looks up the first child in each named slot.
717
+ * 2. Detects whether that child supports shorthand binding through
718
+ * `slotChildTypeToParentDataKey`.
719
+ * 3. Normalizes raw values like `title` or `image` into the child component's
720
+ * expected `parentData` shape.
721
+ * 4. Detects linked mode from `props.field` and clears missing shorthand
722
+ * values so authored fallback constants do not bleed through.
723
+ * 5. Writes the resulting `parentData` back onto the slot child.
724
+ *
725
+ * Pass a full parent-data object when a slot needs custom shape like
726
+ * `{ field, text }`. For common slot child types, raw values can be passed and
727
+ * this helper will wrap them automatically.
728
+ *
729
+ * In linked mode, a missing value still writes an empty parent-data object for
730
+ * supported slot child types so authored fallback constants do not bleed
731
+ * through. In manual/default mode, missing values clear any stale
732
+ * `parentData`, so authored slot content stays visible and cards unlock when
733
+ * switching back from linked mode.
734
+ *
735
+ * Example:
736
+ * ```ts
737
+ * bindSlots(data, {
738
+ * TitleSlot: data.props.title,
739
+ * DescriptionSlot: data.props.description,
740
+ * ImageSlot: data.props.image,
741
+ * CTASlot: data.props.cta,
742
+ * })
743
+ * ```
744
+ *
745
+ * If the first child types are `HeadingTextSlot`, `BodyTextSlot`, `ImageSlot`,
746
+ * and `CTASlot`, that example resolves to parent-data payloads like:
747
+ * ```ts
748
+ * {
749
+ * TitleSlot: { text: data.props.title },
750
+ * DescriptionSlot: { richText: data.props.description },
751
+ * ImageSlot: { image: data.props.image },
752
+ * CTASlot: { cta: data.props.cta },
753
+ * }
754
+ * ```
755
+ */
756
+ declare const bindSlots: <TData extends {
757
+ props: {
758
+ field?: string;
759
+ slots?: Record<string, Array<{
760
+ props?: Record<string, unknown>;
761
+ type?: string;
762
+ }>>;
763
+ };
764
+ }>(data: TData, slotBindings: Record<string, unknown>) => TData;
765
+
766
+ type RootConfig = {
767
+ title?: string;
768
+ description?: string;
769
+ [key: string]: any;
770
+ };
771
+ declare function getPageMetadata(document: Record<string, any>): RootConfig;
772
+ /**
773
+ * resolveDirectoryRootProps scans the meta title and description fields
774
+ * and replaces PLACEHOLDER with an appropriate value based on the entityType
775
+ */
776
+ declare const resolveDirectoryRootProps: (props: Record<string, any>, streamDocument: StreamDocument) => {
777
+ [x: string]: any;
778
+ };
779
+
780
+ declare const isNonNormalizableLinkType: (linkType?: LinkType | string | null) => boolean;
781
+ /**
782
+ * Normalizes the provided content by converting upper-case ones to lower case,
783
+ * replacing white spaces with a "-" and stripping all other illegal characters.
784
+ * Does not normalize links for EMAIL and PHONE link types.
785
+ */
786
+ declare const normalizeLink: (content?: string, linkType?: LinkType) => string;
787
+
788
+ /**
789
+ * hexToRGB converts a hex color to rgb
790
+ * @param H hex string beginning with '#'
791
+ * @returns {number[] | undefined} [r, g, b] if conversion succeeds
792
+ */
793
+ declare const hexToRGB: (H: string) => number[] | undefined;
794
+ /**
795
+ * isColorContrastWcagCompliant checks color contrast based on WCAG 2.1 SC 1.4.3 (Level AA)
796
+ * The visual presentation of text and images of text has a contrast ratio of at least 4.5:1, except for
797
+ * large-scale text and images of large-scale text have a contrast ratio of at least 3:1.
798
+ * Large-scale text means with at least 18 point or 14 point bold.
799
+ * @param rgb1 [r, g, b]
800
+ * @param rgb2 [r, g, b]
801
+ * @param fontSizePt the font size in points
802
+ * @param fontWeight the numerical font weight (100-900)
803
+ * @returns {boolean} Whether the colors pass the contrast check. False if color conversion fails
804
+ */
805
+ declare const isColorContrastWcagCompliant: (rgb1: number[], rgb2: number[], fontSizePt: number, fontWeight: number) => boolean;
806
+ /**
807
+ * Resolves a ThemeColor token to a concrete CSS color value.
808
+ * Supports base palette/contrast tokens, derived dark/light palette tokens,
809
+ * literal white/black, and bracketed custom colors.
810
+ */
811
+ declare const getThemeColorCssValue: (colorToken?: ThemeColor | string) => string | undefined;
812
+ declare const normalizeThemeColorToken: (color?: ThemeColor | string) => string | undefined;
813
+ /**
814
+ * Resolves a ThemeColor token to a concrete hex color value in both browser and SSR contexts.
815
+ */
816
+ declare const getThemeColorHexValue: (colorToken?: ThemeColor | string, streamDocument?: StreamDocument | Record<string, any>) => string | undefined;
817
+ /** Returns true when the color needs a white foreground for readable text. */
818
+ declare const isDarkColor: (color?: ThemeColor | string, streamDocument?: StreamDocument | Record<string, any>) => boolean;
819
+ /** Returns a readable foreground color for a themed surface. */
820
+ declare const getDefaultForegroundColor: (surfaceColor?: ThemeColor | string, streamDocument?: StreamDocument | Record<string, any>) => ThemeColor | undefined;
821
+ /** Returns inline background and foreground colors for a themed surface. */
822
+ declare const getSurfaceColorStyle: (surfaceColor?: ThemeColor | string, streamDocument?: StreamDocument | Record<string, any>, options?: {
823
+ fallbackBackgroundColor?: string;
824
+ fallbackTextColor?: string;
825
+ }) => {
826
+ backgroundColor?: string;
827
+ color?: string;
828
+ } | undefined;
829
+ /**
830
+ * Resolves ThemeColor classes for background contexts.
831
+ * @param color a ThemeColor object
832
+ * @returns a class string containing the selected background class and contrasting text class.
833
+ */
834
+ declare const getBackgroundColorClasses: (color?: ThemeColor) => string;
835
+ /**
836
+ * Resolves inline styles for bracketed custom colors in background contexts.
837
+ * @param color a ThemeColor object
838
+ * @returns inline background/text color styles, e.g. `{ backgroundColor: "#FF6D66" }`
839
+ */
840
+ declare const getBackgroundColorStyle: (color?: ThemeColor) => {
841
+ backgroundColor?: string;
842
+ color?: string;
843
+ } | undefined;
844
+ /**
845
+ * Resolves ThemeColor class for text contexts.
846
+ * @param color a ThemeColor object
847
+ * @returns the selected text color class, if present.
848
+ */
849
+ declare const getTextColorClass: (color?: ThemeColor) => string | undefined;
850
+ /**
851
+ * Resolves inline styles for bracketed custom colors in text contexts.
852
+ * @param color a ThemeColor object
853
+ * @returns inline text color styles, e.g. `{ color: "#FF6D66" }`
854
+ */
855
+ declare const getTextColorStyle: (color?: ThemeColor) => {
856
+ color?: string;
857
+ } | undefined;
858
+
859
+ declare const bodyVariants: (props?: ({
860
+ variant?: "xs" | "sm" | "base" | "lg" | null | undefined;
861
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
862
+ interface BodyProps extends Omit<React.HTMLAttributes<HTMLParagraphElement>, "color">, VariantProps<typeof bodyVariants> {
863
+ color?: ThemeColor;
864
+ }
865
+ declare const Body: React.ForwardRefExoticComponent<BodyProps & React.RefAttributes<HTMLParagraphElement>>;
866
+
867
+ type Only<T, U> = {
868
+ [P in keyof T]: T[P];
869
+ } & {
870
+ [P in keyof U]?: never;
871
+ };
872
+ type Neither<T, U> = {
873
+ [P in keyof T]?: never;
874
+ } & {
875
+ [P in keyof U]?: never;
876
+ };
877
+ type Either<T, U> = Only<T, U> | Only<U, T>;
878
+ type EitherOrNeither<T, U> = Either<T, U> | Neither<T, U>;
879
+ type ConfigFields<T extends Record<string, any>> = T["stream"]["fields"];
880
+ type AllowList<T extends Record<string, any>> = {
881
+ allowList: ConfigFields<T>[number][];
882
+ };
883
+ type DisallowList<T extends Record<string, any>> = {
884
+ disallowList: ConfigFields<T>[number][];
885
+ };
886
+ type EntityFieldTypesFilter = {
887
+ types?: EntityFieldTypes[];
888
+ includeListsOnly?: boolean;
889
+ directChildrenOf?: string;
890
+ descendantsOf?: string;
891
+ subdocumentField?: string;
892
+ };
893
+ type RenderEntityFieldFilter<T extends Record<string, any>> = EntityFieldTypesFilter & EitherOrNeither<AllowList<T>, DisallowList<T>>;
894
+ type EntityFieldTypes = "type.string" | "type.decimal" | "type.float" | "type.integer" | "type.image" | "type.hours" | "type.address" | "type.phone" | "type.coordinate" | "type.cta" | "type.boolean" | "type.option" | "type.datetime" | "type.price" | "type.faq_section" | "type.testimonials_section" | "type.products_section" | "type.insights_section" | "type.rich_text_v2" | "type.team_section" | "type.events_section" | "type.promo_section" | `c_${string}`;
895
+
896
+ type MappedSourceFieldFilter<T extends Record<string, any>> = RenderEntityFieldFilter<T> & {
897
+ /** Higher-priority repeated-source constraints used by itemSource pickers. */
898
+ itemSourceTypes?: EntityFieldTypes[][];
899
+ /** Used only when itemSourceTypes is not provided. */
900
+ mappedSourceTypes?: EntityFieldTypes[][];
901
+ };
902
+
903
+ type ThemeOptionKey = keyof typeof ThemeOptions;
904
+ type BasicSelectorOptions = ComboboxOption[] | (() => ComboboxOption[]) | ThemeOptionKey;
905
+ /**
906
+ Example usage:
907
+
908
+ import type { PuckComponent } from "@puckeditor/core";
909
+ import { msg } from "../utils/i18n/platform.ts";
910
+ import { YextComponentConfig, YextFields } from "./fields.ts";
911
+
912
+ export type MyComponentProps = {
913
+ foo: string;
914
+ };
915
+
916
+ const myComponentFields: YextFields<MyComponentProps> = {
917
+ foo: {
918
+ type: "basicSelector",
919
+ label: msg("tone", "Tone"),
920
+ options: [
921
+ { label: msg("foo.options.neutral", "Neutral"), value: "neutral" },
922
+ { label: msg("foo.options.bold", "Bold"), value: "bold" },
923
+ ],
924
+ disableSearch: false,
925
+ },
926
+ };
927
+
928
+ const MyComponentWrapper: PuckComponent<MyComponentProps> = ({ foo }) => {
929
+ return <div>{foo}</div>;
930
+ };
931
+
932
+ export const MyComponent: YextComponentConfig<MyComponentProps> = {
933
+ label: msg("components.myComponent", "My Component"),
934
+ fields: myComponentFields,
935
+ // resolveData: (data) => {...},
936
+ render: (props) => <MyComponentWrapper {...props} />,
937
+ };
938
+ */
939
+ type BasicSelectorFieldBase = BaseField & {
940
+ type: "basicSelector";
941
+ label?: string | MsgString;
942
+ visible?: boolean;
943
+ translateOptions?: boolean;
944
+ noOptionsPlaceholder?: string | MsgString;
945
+ noOptionsMessage?: string | MsgString;
946
+ disableSearch?: boolean;
947
+ };
948
+ type BasicSelectorFieldWithOptions = BasicSelectorFieldBase & {
949
+ options: BasicSelectorOptions;
950
+ optionGroups?: never;
951
+ };
952
+ type BasicSelectorFieldWithGroups = BasicSelectorFieldBase & {
953
+ options?: never;
954
+ optionGroups: ComboboxOptionGroup[];
955
+ };
956
+ type BasicSelectorField = BasicSelectorFieldWithOptions | BasicSelectorFieldWithGroups;
957
+ type BasicSelectorFieldProps = FieldProps<BasicSelectorField>;
958
+ declare const BasicSelectorFieldOverride: ({ field, value, onChange, }: BasicSelectorFieldProps) => React__default.JSX.Element;
959
+
960
+ type CodeLanguageOptions = "html" | "css" | "json" | "shell" | "java" | "javascript" | "jsx" | "markdown" | "typescript";
961
+ type CodeField = BaseField & {
962
+ type: "code";
963
+ label?: string | MsgString;
964
+ visible?: boolean;
965
+ codeLanguage: CodeLanguageOptions;
966
+ };
967
+ type CodeFieldOverrideProps = FieldProps<CodeField> & {
968
+ children: React__default.ReactNode;
969
+ };
970
+ declare const CodeFieldOverride: ({ field, value, onChange, }: CodeFieldOverrideProps) => React__default.JSX.Element;
971
+
972
+ type DateTimeSelectorField = BaseField & {
973
+ type: "dateTimeSelector";
974
+ label?: string | MsgString;
975
+ visible?: boolean;
976
+ };
977
+ type DateTimeSelectorFieldProps = FieldProps<DateTimeSelectorField>;
978
+ declare const DateTimeSelectorFieldOverride: ({ field, value, onChange, }: DateTimeSelectorFieldProps) => React__default.JSX.Element;
979
+
980
+ type FontSizeSelectorField = BaseField & {
981
+ type: "fontSizeSelector";
982
+ label?: string | MsgString;
983
+ visible?: boolean;
984
+ includeLargeSizes?: boolean;
985
+ };
986
+ type FontSizeSelectorFieldProps = FieldProps<FontSizeSelectorField>;
987
+ declare const FontSizeSelectorFieldOverride: ({ field, value, onChange, }: FontSizeSelectorFieldProps) => React__default.JSX.Element;
988
+
989
+ /** Represents data that can either be from the Yext Knowledge Graph or statically defined */
990
+ type YextEntityField<TValue, TMappings = never> = {
991
+ /** The api name of the Yext field */
992
+ field: string;
993
+ /** The static value of the field */
994
+ constantValue: TValue;
995
+ /** Whether to use the Yext field or the constant value */
996
+ constantValueEnabled?: boolean;
997
+ /** Whether the field can be translated or not. */
998
+ disallowTranslation?: boolean;
999
+ /** Nested mappings used by repeated linked-item sources. */
1000
+ mappings?: TMappings;
1001
+ };
1002
+
1003
+ declare const CTA_SELECTION_TYPES: readonly ["textAndLink", "getDirections", "presetImage"];
1004
+ type CTASelectionType = (typeof CTA_SELECTION_TYPES)[number];
1005
+ type CTAFieldLike = {
1006
+ constantValueEnabled?: boolean;
1007
+ constantValue?: {
1008
+ ctaType?: CTASelectionType;
1009
+ };
1010
+ selectedType?: CTASelectionType;
1011
+ };
1012
+ /**
1013
+ * Determines the CTA type for either static or Knowledge Graph CTA values.
1014
+ */
1015
+ declare const getCTAType: (entityField?: CTAFieldLike | null) => {
1016
+ ctaType: "textAndLink" | "getDirections" | "presetImage" | undefined;
1017
+ };
1018
+
1019
+ type YextCTAField = YextEntityField<EnhancedTranslatableCTA> & {
1020
+ selectedType?: CTASelectionType;
1021
+ };
1022
+ type CTASelectorField = BaseField & {
1023
+ type: "ctaSelector";
1024
+ label?: string | MsgString;
1025
+ visible?: boolean;
1026
+ disableConstantValueToggle?: boolean;
1027
+ };
1028
+ type CTASelectorFieldProps = FieldProps<CTASelectorField>;
1029
+ declare const CTASelectorFieldOverride: ({ field, value, onChange, }: CTASelectorFieldProps) => React__default.JSX.Element;
1030
+
1031
+ type MultiSelectorOptionValue = string | number | boolean;
1032
+ type MultiSelectorOptionSelection<T extends MultiSelectorOptionValue> = {
1033
+ value: T | undefined;
1034
+ };
1035
+ interface MultiSelectorValue<T extends MultiSelectorOptionValue> {
1036
+ selections: MultiSelectorOptionSelection<T>[];
1037
+ }
1038
+ interface MultiSelectorOption<T extends MultiSelectorOptionValue> {
1039
+ label: string;
1040
+ value: T | undefined;
1041
+ }
1042
+ type MultiSelectorOptions<T extends MultiSelectorOptionValue> = MultiSelectorOption<T>[] | (() => MultiSelectorOption<T>[]);
1043
+ /**
1044
+ * A field type for selecting multiple values from a static or dynamic list of
1045
+ * options.
1046
+ *
1047
+ * Example:
1048
+ *
1049
+ * ```tsx
1050
+ * const fields: YextFields<MyComponentProps> = {
1051
+ * filters: {
1052
+ * type: "multiSelector",
1053
+ * label: msg("fields.filters", "Filters"),
1054
+ * dropdownLabel: msg("fields.field", "Field"),
1055
+ * options: [
1056
+ * { label: msg("fields.city", "City"), value: "address.city" },
1057
+ * { label: msg("fields.region", "Region"), value: "address.region" },
1058
+ * ],
1059
+ * placeholderOptionLabel: msg("fields.selectAField", "Select a field"),
1060
+ * },
1061
+ * };
1062
+ * ```
1063
+ *
1064
+ * The saved value shape is:
1065
+ *
1066
+ * ```ts
1067
+ * { selections: [{ value: "address.city" }] }
1068
+ * ```
1069
+ */
1070
+ type MultiSelectorField<T extends MultiSelectorOptionValue = any> = BaseField & {
1071
+ type: "multiSelector";
1072
+ label: string | MsgString;
1073
+ dropdownLabel: string | MsgString;
1074
+ options: MultiSelectorOptions<T>;
1075
+ placeholderOptionLabel?: string | MsgString;
1076
+ };
1077
+ type MultiSelectorFieldProps<T extends MultiSelectorOptionValue> = FieldProps<MultiSelectorField<T>, MultiSelectorValue<T> | undefined>;
1078
+ /** A multi-select field whose options may be static or loaded from a function. */
1079
+ declare const MultiSelectorFieldOverride: <T extends MultiSelectorOptionValue>({ field, value, onChange, id, readOnly, }: MultiSelectorFieldProps<T>) => React.JSX.Element;
1080
+
1081
+ type OptionalNumberValue = number | string | null | undefined;
1082
+ type OptionalNumberField = BaseField & {
1083
+ type: "optionalNumber";
1084
+ label?: string | MsgString;
1085
+ hideNumberFieldRadioLabel: string | MsgString;
1086
+ showNumberFieldRadioLabel: string | MsgString;
1087
+ defaultCustomValue: number;
1088
+ };
1089
+ type OptionalNumberFieldProps = FieldProps<OptionalNumberField, OptionalNumberValue>;
1090
+ declare const OptionalNumberFieldOverride: ({ field, value, onChange, }: OptionalNumberFieldProps) => React__default.JSX.Element;
1091
+
1092
+ type HeadDeployStatus = "RUNNING" | "INACTIVE" | "FAILED" | "ACTIVE";
1093
+ type TemplateMetadata = {
1094
+ siteId: number;
1095
+ templateId: string;
1096
+ layoutId?: number;
1097
+ entityId?: number;
1098
+ themeEntityId?: number;
1099
+ assignment: "ALL" | "ENTITY";
1100
+ isDevMode: boolean;
1101
+ devOverride: boolean;
1102
+ isxYextDebug: boolean;
1103
+ isThemeMode: boolean;
1104
+ entityCount: number;
1105
+ totalEntityCount: number;
1106
+ entityTypeDisplayName: string;
1107
+ platformLocale?: string;
1108
+ locales: string[];
1109
+ layoutTaskApprovals: boolean;
1110
+ locatorDisplayFields?: Record<string, FieldTypeData>;
1111
+ customFonts?: FontRegistry;
1112
+ headDeployStatus: HeadDeployStatus;
1113
+ };
1114
+ type FieldTypeData = {
1115
+ field_id: string;
1116
+ field_name: string;
1117
+ field_type: object;
1118
+ field_type_id: string;
1119
+ };
1120
+
1121
+ /**
1122
+ * A rendered combobox group of entity field options.
1123
+ */
1124
+ type EntityFieldOptionGroup<TOption> = {
1125
+ title?: string;
1126
+ options: TOption[];
1127
+ };
1128
+
1129
+ type EmbeddedStringOption = {
1130
+ label: string;
1131
+ value: string;
1132
+ };
1133
+ /**
1134
+ * A debounced string input that allows embedding entity fields via a popover selector.
1135
+ */
1136
+ declare const EmbeddedFieldStringInputFromEntity: <T extends Record<string, any>>({ value, onChange, filter, showFieldSelector, sourceFieldPath, sourceField: sourceFieldFromInputProps, }: {
1137
+ value: string;
1138
+ onChange: (value: string) => void;
1139
+ filter: RenderEntityFieldFilter<T>;
1140
+ showFieldSelector: boolean;
1141
+ sourceFieldPath?: string;
1142
+ sourceField?: string;
1143
+ }) => React__default.JSX.Element;
1144
+ declare const EmbeddedFieldStringInputFromOptions: ({ value, onChange, optionGroups, showFieldSelector, useOptionValueSublabel, sourceField, onFieldSelect, }: {
1145
+ value: string;
1146
+ onChange: (value: string) => void;
1147
+ optionGroups: EntityFieldOptionGroup<{
1148
+ label: string;
1149
+ value: string;
1150
+ }>[];
1151
+ showFieldSelector: boolean;
1152
+ useOptionValueSublabel?: boolean;
1153
+ sourceField?: string;
1154
+ onFieldSelect?: (fieldPath: string, resolutionFieldPath?: string, resolutionDocument?: Record<string, unknown>) => void;
1155
+ }) => React__default.JSX.Element;
1156
+
1157
+ type ImagePayload = {
1158
+ id: string;
1159
+ value: ImageContentData;
1160
+ locale: string;
1161
+ };
1162
+ type ImageField = BaseField & {
1163
+ type: "image";
1164
+ label?: string | MsgString;
1165
+ visible?: boolean;
1166
+ hideAltTextField?: boolean;
1167
+ maxFileSizeBytes?: number;
1168
+ getAltTextOptions?: (templateMetadata: TemplateMetadata) => EmbeddedStringOption[];
1169
+ };
1170
+ type ImageFieldOverrideProps = FieldProps<ImageField>;
1171
+ declare const buildLocatorDisplayOptions: (locatorDisplayFields?: Record<string, FieldTypeData>) => EmbeddedStringOption[];
1172
+ declare const ImageFieldOverride: ({ field, onChange, value, }: ImageFieldOverrideProps) => React__default.JSX.Element;
1173
+
1174
+ /**
1175
+ * Defines the core typography styling properties shared across text-based components.
1176
+ */
1177
+ type BaseTextStyles = {
1178
+ fontFamily: string;
1179
+ fontSize: string;
1180
+ fontWeight: string;
1181
+ fontStyle: "normal" | "italic" | "default";
1182
+ textTransform: "none" | "uppercase" | "lowercase" | "capitalize" | "default";
1183
+ };
1184
+
1185
+ type StyledButtonValue = BaseTextStyles & {
1186
+ borderRadius: string;
1187
+ letterSpacing: string;
1188
+ };
1189
+ type StyledButtonField = BaseField & {
1190
+ type: "styledButton";
1191
+ label?: string | MsgString;
1192
+ visible?: boolean;
1193
+ };
1194
+ type StyledButtonFieldProps = FieldProps<StyledButtonField, StyledButtonValue>;
1195
+ declare const StyledButtonFieldOverride: ({ field, value, onChange, }: StyledButtonFieldProps) => React__default.JSX.Element;
1196
+
1197
+ type StyledImageValue = {
1198
+ borderRadius: ImageBorderRadius | "default";
1199
+ };
1200
+ type StyledImageField = BaseField & {
1201
+ type: "styledImage";
1202
+ label?: string | MsgString;
1203
+ visible?: boolean;
1204
+ };
1205
+ type StyledImageFieldProps = FieldProps<StyledImageField, StyledImageValue>;
1206
+ declare const StyledImageFieldOverride: ({ field, value, onChange, }: StyledImageFieldProps) => React__default.JSX.Element;
1207
+
1208
+ type StyledLinkValue = BaseTextStyles & {
1209
+ letterSpacing: string;
1210
+ includeCaret: string;
1211
+ };
1212
+ type StyledLinkField = BaseField & {
1213
+ type: "styledLink";
1214
+ label?: string | MsgString;
1215
+ visible?: boolean;
1216
+ showIncludeCaretField?: boolean;
1217
+ };
1218
+ type StyledLinkFieldProps = FieldProps<StyledLinkField, StyledLinkValue>;
1219
+ /**
1220
+ * A custom field override for configuring link typography, letter spacing,
1221
+ * and an optional caret indicator.
1222
+ */
1223
+ declare const StyledLinkFieldOverride: ({ field, value, onChange, }: StyledLinkFieldProps) => React__default.JSX.Element;
1224
+
1225
+ type StyledPageSectionValue = {
1226
+ contentWidth: ContentWidthValue;
1227
+ verticalPadding: VerticalPaddingValue;
1228
+ };
1229
+ type ContentWidthValue = "default" | "768px" | "960px" | "1024px" | "1280px" | "1440px";
1230
+ type VerticalPaddingValue = "default" | "0px" | "2px" | "4px" | "6px" | "8px" | "10px" | "12px" | "14px" | "16px" | "20px" | "24px" | "28px" | "32px" | "36px" | "40px" | "44px" | "48px" | "56px" | "64px" | "80px" | "96px";
1231
+ type StyledPageSectionField = BaseField & {
1232
+ type: "styledPageSection";
1233
+ label?: string | MsgString;
1234
+ visible?: boolean;
1235
+ };
1236
+ type StyledPageSectionFieldProps = FieldProps<StyledPageSectionField, StyledPageSectionValue>;
1237
+ declare const StyledPageSectionFieldOverride: ({ field, value, onChange, }: StyledPageSectionFieldProps) => React.JSX.Element;
1238
+
1239
+ type StyledTextValue = BaseTextStyles & {
1240
+ color?: ThemeColor;
1241
+ };
1242
+ type StyledTextField = BaseField & {
1243
+ type: "styledText";
1244
+ label?: string | MsgString;
1245
+ visible?: boolean;
1246
+ includeColor?: boolean;
1247
+ colorLabel?: string | MsgString;
1248
+ };
1249
+ type StyledTextFieldProps = FieldProps<StyledTextField, StyledTextValue>;
1250
+ declare const StyledTextFieldOverride: ({ field, value, onChange, }: StyledTextFieldProps) => React__default.JSX.Element;
1251
+
1252
+ type TranslatableStringField = BaseField & {
1253
+ type: "translatableString";
1254
+ label?: string | MsgString;
1255
+ visible?: boolean;
1256
+ filter?: RenderEntityFieldFilter<any>;
1257
+ showApplyAllOption?: boolean;
1258
+ showFieldSelector?: boolean;
1259
+ getOptions?: () => EmbeddedStringOption[];
1260
+ sourceField?: string;
1261
+ sourceFieldPath?: string;
1262
+ };
1263
+ type TranslatableStringFieldProps = FieldProps<TranslatableStringField, TranslatableString | undefined>;
1264
+ declare const TranslatableStringFieldOverride: ({ field, onChange, value, }: TranslatableStringFieldProps) => React__default.JSX.Element;
1265
+
1266
+ type VideoField = BaseField & {
1267
+ type: "video";
1268
+ label?: string | MsgString;
1269
+ visible?: boolean;
1270
+ };
1271
+ type VideoFieldProps = FieldProps<VideoField, AssetVideo | undefined>;
1272
+ declare const VideoFieldOverride: ({ field, onChange, value, }: VideoFieldProps) => React.JSX.Element;
1273
+
1274
+ declare const buttonVariants: (props?: ({
1275
+ variant?: "link" | "primary" | "secondary" | "directoryLink" | "headerFooterMainLink" | "headerFooterSecondaryLink" | null | undefined;
1276
+ hasDarkBackground?: boolean | null | undefined;
1277
+ linkPadding?: "none" | "yOnly" | null | undefined;
1278
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1279
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
1280
+ asChild?: boolean;
1281
+ }
1282
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
1283
+
1284
+ type CTAProps = {
1285
+ label: React.ReactNode;
1286
+ ctaType?: "textAndLink" | "getDirections" | "presetImage";
1287
+ actionType?: "link" | "button";
1288
+ link?: string;
1289
+ linkType?: LinkType;
1290
+ normalizeLink: boolean;
1291
+ presetImageType?: PresetImageType;
1292
+ id?: string;
1293
+ dataAttributes?: Record<`data-${string}`, string>;
1294
+ variant?: ButtonProps["variant"];
1295
+ className?: string;
1296
+ style?: React.CSSProperties;
1297
+ eventName?: string;
1298
+ target?: "_self" | "_blank" | "_parent" | "_top";
1299
+ alwaysHideCaret?: boolean;
1300
+ ariaLabel?: string;
1301
+ onClick?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement, MouseEvent>) => void;
1302
+ disabled?: boolean;
1303
+ color?: ThemeColor;
1304
+ openInNewTab?: boolean;
1305
+ /**
1306
+ * When true and variant is "link", applies vertical padding (py-3) to the CTA.
1307
+ * @defaultValue false
1308
+ */
1309
+ setPadding?: boolean;
1310
+ };
1311
+ /**
1312
+ * The different visual variants for CTA buttons.
1313
+ * "primary": the default button style. A button filled with the primary theme color.
1314
+ * "secondary": an outlined button style. A button with a border in the primary theme color and transparent background.
1315
+ * "link": a text link style. A button with no border or background, just a hyperlink in the link theme color.
1316
+ * "directoryLink": a text link style optimized for directory listings.
1317
+ * "headerFooterMainLink": a text link style optimized for main links in the header and footer.
1318
+ * "headerFooterSecondaryLink": a text link style optimized for secondary links in the header and footer.
1319
+ */
1320
+ type CTAVariant = ButtonProps["variant"];
1321
+ /** Returns whether a CTA variant supports user-configurable color overrides. */
1322
+ declare const isCtaVariantWithColor: (variant?: CTAVariant) => boolean;
1323
+ declare const CTA: (props: CTAProps) => React.JSX.Element | null;
1324
+
1325
+ type ComprehensiveCTAValue = {
1326
+ data: {
1327
+ /**
1328
+ * Whether to render the <a> or <button> tag under the hood.
1329
+ * Normal CTAs are "link".
1330
+ * Custom implementations can use "button" to integrate with custom JS.
1331
+ */
1332
+ actionType: "link" | "button";
1333
+ /** The data source for the CTA. */
1334
+ cta: YextCTAField;
1335
+ /** Whether to open the link in a new tab for actionType: "link". */
1336
+ openInNewTab: boolean;
1337
+ /** The label for actionType: "button". */
1338
+ buttonText?: TranslatableString;
1339
+ /** The id for actionType: "button". */
1340
+ customId?: string;
1341
+ /** The class names for actionType: "button". */
1342
+ customClass?: string;
1343
+ /** The data attributes for actionType: "button". */
1344
+ dataAttributes?: Array<{
1345
+ key: string;
1346
+ value: string;
1347
+ }>;
1348
+ /** The aria label for actionType: "button". */
1349
+ ariaLabel?: TranslatableString;
1350
+ };
1351
+ styles: {
1352
+ /** The visual variant of the CTA. */
1353
+ variant: CTAVariant;
1354
+ /** The preset image to use when cta.selectedType is "presetImage". */
1355
+ presetImage?: PresetImageType;
1356
+ /** The color of the button or link when cta.selectedType is not "presetImage". */
1357
+ color?: ThemeColor;
1358
+ /** The theme styling when the variant is "primary" or "secondary" */
1359
+ button?: StyledButtonValue;
1360
+ /** The theme styling when the variant is "link". */
1361
+ link?: StyledLinkValue;
1362
+ };
1363
+ /** @internal Additional class names to pass to the underlying component. */
1364
+ className?: string;
1365
+ /** @internal Additional styles to pass to the underlying component. */
1366
+ sx?: React__default.CSSProperties;
1367
+ /** @internal The event name to use for Yext Analytics. */
1368
+ eventName?: string;
1369
+ };
1370
+ type ComprehensiveCTAField = BaseField & {
1371
+ type: "comprehensiveCTA";
1372
+ label?: string | MsgString;
1373
+ visible?: boolean;
1374
+ disableConstantValueToggle?: boolean;
1375
+ };
1376
+ type ComprehensiveCTAFieldProps = FieldProps<ComprehensiveCTAField, ComprehensiveCTAValue>;
1377
+ declare const ComprehensiveCTAFieldOverride: ({ field, value, onChange, }: ComprehensiveCTAFieldProps) => React__default.JSX.Element;
1378
+
1379
+ type YextPuckFields = {
1380
+ basicSelector: BasicSelectorField;
1381
+ ctaSelector: CTASelectorField;
1382
+ code: CodeField;
1383
+ comprehensiveCTA: ComprehensiveCTAField;
1384
+ dateTimeSelector: DateTimeSelectorField;
1385
+ entityField: EntityFieldSelectorField;
1386
+ multiSelector: MultiSelectorField;
1387
+ fontSizeSelector: FontSizeSelectorField;
1388
+ image: ImageField;
1389
+ optionalNumber: OptionalNumberField;
1390
+ styledButton: StyledButtonField;
1391
+ styledImage: StyledImageField;
1392
+ styledLink: StyledLinkField;
1393
+ styledPageSection: StyledPageSectionField;
1394
+ styledText: StyledTextField;
1395
+ translatableString: TranslatableStringField;
1396
+ video: VideoField;
1397
+ };
1398
+ type YextPuckField = YextPuckFields[keyof YextPuckFields];
1399
+ type YextArrayField<Props extends {
1400
+ [key: string]: any;
1401
+ }[] = {
1402
+ [key: string]: any;
1403
+ }[]> = Omit<ArrayField<Props, YextPuckField>, "arrayFields"> & {
1404
+ arrayFields: YextFieldMap<Props[0]>;
1405
+ };
1406
+ type YextObjectField<Props extends {
1407
+ [key: string]: any;
1408
+ } = {
1409
+ [key: string]: any;
1410
+ }> = Omit<ObjectField<Props, YextPuckField>, "objectFields"> & {
1411
+ objectFields: YextFieldMap<Props>;
1412
+ };
1413
+ type YextCustomFieldRenderProps<ValueType> = Parameters<CustomField<ValueType>["render"]>[0];
1414
+ type YextFieldDefinition<ValueType = any> = Field<ValueType, YextPuckField> | Field<NonNullable<ValueType>, YextPuckField> | YextPuckField | (ValueType extends Record<string, any>[] ? YextArrayField<ValueType> : never) | (ValueType extends Record<string, any> ? YextObjectField<ValueType> : never);
1415
+ type YextComponentConfig<Props extends DefaultComponentProps = DefaultComponentProps> = Omit<ComponentConfig<{
1416
+ props: Props;
1417
+ fields: YextPuckFields;
1418
+ }>, "fields" | "resolveFields"> & {
1419
+ fields?: YextFields<Props>;
1420
+ resolveFields?: ComponentConfig<{
1421
+ props: Props;
1422
+ fields: YextPuckFields;
1423
+ }>["resolveFields"];
1424
+ };
1425
+ type YextFields<T extends DefaultComponentProps = DefaultComponentProps> = YextFieldsInternal<T> & YextFieldMap<T>;
1426
+ type YextFieldsInternal<T extends DefaultComponentProps = DefaultComponentProps> = Fields<T, any>;
1427
+ type YextFieldMap<T extends DefaultComponentProps = DefaultComponentProps> = {
1428
+ [PropName in keyof Omit<T, "editMode">]: YextFieldDefinition<T[PropName]>;
1429
+ };
1430
+ /**
1431
+ * Converts Yext field definitions into a runtime `Fields` object that Puck can
1432
+ * render safely.
1433
+ *
1434
+ * Yext field types are registered as Puck overrides, but Puck still asks its
1435
+ * internal default field registry to render child fields inside native `object`
1436
+ * and `array` fields. Since field types like `basicSelector` do not exist in
1437
+ * that registry, this wraps each Yext-specific field as a Puck `custom` field
1438
+ * rendered by `YextAutoField`, including nested `objectFields` and
1439
+ * `arrayFields`. Normal Puck field types are left unchanged.
1440
+ */
1441
+ declare const toPuckFields: <Props extends DefaultComponentProps = DefaultComponentProps>(fields: Fields<Props, any>) => Fields<Props>;
1442
+
1443
+ /**
1444
+ * Public item-source types.
1445
+ *
1446
+ * 1. Define the authored configuration accepted by `createItemSource(...)`.
1447
+ * 2. Define the repeated entity-field value shape returned to consumers.
1448
+ * 3. Define the resolved item shape returned by `resolveItems(...)`.
1449
+ */
1450
+ type CreateItemSourceOptions<TItemProps extends Record<string, unknown>> = {
1451
+ label: string;
1452
+ mappingFields: YextFieldMap<TItemProps>;
1453
+ defaultValues?: TItemProps[];
1454
+ };
1455
+ type RepeatedEntityFieldValue<TItemProps extends Record<string, unknown>> = YextEntityField<TItemProps[], TItemProps>;
1456
+ type RepeatedEntityFieldMetadata<TItemProps extends Record<string, unknown>> = {
1457
+ mappingFields: YextFieldMap<TItemProps>;
1458
+ manualItemFields: YextFieldMap<TItemProps>;
1459
+ defaultItemValue: TItemProps;
1460
+ defaultMappings: TItemProps;
1461
+ manualItemSummary?: (item: unknown, index?: number) => string;
1462
+ };
1463
+ /**
1464
+ * Resolves authored item fields into the render-ready value shape returned
1465
+ * from `ItemSourceInstance.resolveItems(...)`.
1466
+ */
1467
+ type ResolvedItemField<TValue> = TValue extends YextEntityField<infer TResolved, any> ? TResolved | undefined : TValue extends Array<infer TItem> ? ResolvedItemField<TItem>[] : TValue extends Record<string, unknown> ? {
1468
+ [TKey in keyof TValue]: ResolvedItemField<TValue[TKey]>;
1469
+ } : TValue;
1470
+ /**
1471
+ * Public contract returned by `createItemSource(...)`.
1472
+ */
1473
+ type ItemSourceInstance<TItemProps extends Record<string, unknown>> = {
1474
+ field: YextFieldDefinition<RepeatedEntityFieldValue<TItemProps>>;
1475
+ defaultValue: RepeatedEntityFieldValue<TItemProps>;
1476
+ value: RepeatedEntityFieldValue<TItemProps>;
1477
+ resolveItems: (value: RepeatedEntityFieldValue<TItemProps> | undefined, streamDocument: StreamDocument) => ResolvedItemField<TItemProps>[];
1478
+ };
1479
+ type SlotMappedCardsData<TMappings extends Record<string, unknown>> = YextEntityField<Array<{
1480
+ id?: string;
1481
+ }>, TMappings>;
1482
+ type CreateSlottedItemSourceOptions<TMappings extends Record<string, unknown>, TCardProps extends Record<string, unknown> = Record<string, unknown>> = {
1483
+ label: string;
1484
+ mappingFields: YextFieldMap<TMappings>;
1485
+ itemLabel: string;
1486
+ cardName?: string;
1487
+ defaultItemProps?: TCardProps | (() => TCardProps);
1488
+ defaultItems?: number;
1489
+ };
1490
+ type SlottedItemSourceInstance<TMappings extends Record<string, unknown>> = {
1491
+ field: YextFieldDefinition<SlotMappedCardsData<TMappings>>;
1492
+ defaultValue: SlotMappedCardsData<TMappings>;
1493
+ defaultWrapperProps: {
1494
+ data: SlotMappedCardsData<TMappings>;
1495
+ slots: {
1496
+ CardSlot: [];
1497
+ };
1498
+ manualSlots: {
1499
+ CardSlot: [];
1500
+ };
1501
+ };
1502
+ value: SlotMappedCardsData<TMappings>;
1503
+ resolveItems: (value: SlotMappedCardsData<TMappings> | undefined, streamDocument: StreamDocument) => ResolvedItemField<TMappings>[];
1504
+ populateSlots: <TData extends {
1505
+ props: {
1506
+ data: SlotMappedCardsData<TMappings>;
1507
+ slots: {
1508
+ CardSlot: unknown;
1509
+ };
1510
+ manualSlots?: {
1511
+ CardSlot: unknown;
1512
+ };
1513
+ };
1514
+ }>(data: TData, streamDocument: StreamDocument | undefined) => TData;
1515
+ };
1516
+
1517
+ type EntityFieldSelectorField<T extends Record<string, any> = Record<string, any>> = BaseField & {
1518
+ type: "entityField";
1519
+ label?: string | MsgString;
1520
+ visible?: boolean;
1521
+ filter: MappedSourceFieldFilter<T>;
1522
+ constantValueFilter?: RenderEntityFieldFilter<T>;
1523
+ /** Hides the Knowledge Graph/static-content toggle when enabled. */
1524
+ disableConstantValueToggle?: boolean;
1525
+ /** Whether the field can be translated or not. */
1526
+ disallowTranslation?: boolean;
1527
+ /** Shows the "Apply to all locales" control for translatable static values. */
1528
+ showApplyAllOption?: boolean;
1529
+ /** A dotted path to the linked source field on the active Puck item. Used for directories. */
1530
+ sourceFieldPath?: string;
1531
+ /** Uses this linked source field and hides the repeated-source selector. Used for directories. */
1532
+ fixedRepeatedField?: string;
1533
+ /** Hides the parent-field requirements tooltip for repeated sources. */
1534
+ hideRequirementsTooltip?: boolean;
1535
+ /** Configures repeated linked-item and manual-item editing. */
1536
+ repeated?: RepeatedEntityFieldMetadata<any>;
1537
+ };
1538
+ type EntityFieldSelectorFieldProps = FieldProps<EntityFieldSelectorField>;
1539
+ declare const EntityFieldSelectorFieldOverride: ({ field, value, onChange, }: EntityFieldSelectorFieldProps) => React__default.JSX.Element;
1540
+ declare const ConstantValueModeToggler: ({ fieldTypeFilter, constantValueEnabled, toggleConstantValueEnabled, disableConstantValue, label, showLocale, infoTooltipRequirements, }: {
1541
+ fieldTypeFilter: EntityFieldTypes[];
1542
+ constantValueEnabled: boolean;
1543
+ toggleConstantValueEnabled: (constantValueEnabled: boolean) => void;
1544
+ disableConstantValue?: boolean;
1545
+ label: string;
1546
+ showLocale?: boolean;
1547
+ infoTooltipRequirements?: string[];
1548
+ }) => React__default.JSX.Element;
1549
+
1550
+ type RenderYextEntityFieldSelectorProps<T extends Record<string, any>> = Omit<EntityFieldSelectorField<T>, "type" | "label"> & {
1551
+ label: string;
1552
+ };
1553
+ /**
1554
+ * @deprecated Prefer authoring `{ type: "entityField", ... }` directly in
1555
+ * `YextFields`. This wrapper remains for backwards compatibility.
1556
+ */
1557
+ declare const YextEntityFieldSelector: <T extends Record<string, any>, TValue, TMappings = never>(props: RenderYextEntityFieldSelectorProps<T>) => Field<YextEntityField<TValue, TMappings>>;
1558
+
1559
+ type ResolveComponentDataOptions = {
1560
+ variant?: BodyProps["variant"];
1561
+ isDarkBackground?: boolean;
1562
+ className?: string;
1563
+ color?: ThemeColor;
1564
+ output?: "render" | "plainText";
1565
+ };
1566
+ /**
1567
+ * The primary function for resolving all component data. It handles entity
1568
+ * fields, constant values, embedded fields, and translatable types.
1569
+ *
1570
+ * @param data The field configuration object from component props OR a direct translatable value.
1571
+ * @param locale The current language locale (e.g., "en").
1572
+ * @param streamDocument The entity document. If not provided, embedded fields will not be resolved.
1573
+ * @returns The fully resolved data for the component.
1574
+ */
1575
+ declare function resolveComponentData(data: TranslatableString | YextEntityField<TranslatableString>, locale: string, streamDocument?: any): string;
1576
+ declare function resolveComponentData(data: TranslatableRichText | YextEntityField<TranslatableRichText>, locale: string, streamDocument?: Record<string, any>, options?: Omit<ResolveComponentDataOptions, "output"> & {
1577
+ output?: "render";
1578
+ }): string | React__default.ReactElement;
1579
+ declare function resolveComponentData(data: TranslatableString | TranslatableRichText | YextEntityField<TranslatableString | TranslatableRichText> | undefined, locale: string, streamDocument: Record<string, any> | undefined, options: {
1580
+ output: "plainText";
1581
+ }): string;
1582
+ declare function resolveComponentData<T>(data: YextEntityField<T>, locale: string, streamDocument?: Record<string, any>): T | undefined;
1583
+ declare function resolveComponentData(data: TranslatableAssetImage | YextEntityField<TranslatableAssetImage>, locale: string, streamDocument?: Record<string, any>): TranslatableAssetImage | undefined;
1584
+ /**
1585
+ * Takes a TranslatableString or TranslatableRichText and a locale and returns the value as a string
1586
+ * @param translatableText a TranslatableRichText
1587
+ * @param locale "en" or other locale value
1588
+ * @return string to be displayed in the editor input
1589
+ */
1590
+ declare function getDisplayValue(translatableText: TranslatableString | TranslatableRichText, locale?: string): string;
1591
+
1592
+ type FieldResolution<T> = {
1593
+ value: T | undefined;
1594
+ traversedMultiValueReference: boolean;
1595
+ multiValueReferenceField?: string;
1596
+ };
1597
+ /**
1598
+ * Resolves a Yext entity field from either a selected field path or a constant
1599
+ * value, including embedded field interpolation inside constants.
1600
+ */
1601
+ declare const resolveYextEntityField: <T>(streamDocument: StreamDocument | undefined, entityField: YextEntityField<T>, locale?: string) => T | undefined;
1602
+ declare const findField: <T>(streamDocument: StreamDocument, fieldName: string) => T | undefined;
1603
+ declare const resolveField: <T>(streamDocument: StreamDocument, fieldName: string) => FieldResolution<T>;
1604
+
1605
+ /**
1606
+ * Creates the helper API for one slot-backed repeated-item wrapper.
1607
+ */
1608
+ declare function createSlottedItemSource<TMappings extends Record<string, unknown>, TCardProps extends Record<string, unknown> = Record<string, unknown>>({ label, mappingFields, itemLabel, cardName, defaultItemProps, defaultItems, }: CreateSlottedItemSourceOptions<TMappings, TCardProps>): SlottedItemSourceInstance<TMappings>;
1609
+
1610
+ /**
1611
+ * Builds the search headless config for the template. Returns undefined if the config is not valid.
1612
+ * @param document the entity document
1613
+ * @param experienceKeyEnvVar override the default locator experience env var
1614
+ */
1615
+ declare const createSearchHeadlessConfig: (document: any, experienceKeyEnvVar?: string) => (_yext_search_headless_react.SearchConfigWithApiKey & {
1616
+ headlessId?: string;
1617
+ verticalKey?: string;
1618
+ }) | undefined;
1619
+ /**
1620
+ * Builds the search analytics config for the template. Returns undefined if the config is not valid.
1621
+ * @param document the entity document
1622
+ */
1623
+ declare const createSearchAnalyticsConfig: (document: any) => SearchAnalyticsConfig | undefined;
1624
+
1625
+ /**
1626
+ * Normalizes the provided content by converting upper-case ones to lower case,
1627
+ * replacing white spaces, '?', and '#', with a "-" and stripping all other illegal characters.
1628
+ *
1629
+ * @param content The content to normalize
1630
+ * @return The normalized result
1631
+ */
1632
+ declare const normalizeSlug: (content: string) => string;
1633
+
1634
+ declare const resolveUrlTemplate: (streamDocument: StreamDocument, relativePrefixToRoot: string) => string;
1635
+ declare const resolveUrlTemplateOfChild: (profile: any, streamDocument: StreamDocument, relativePrefixToRoot?: string) => string;
1636
+ declare const mergeMeta: (profile: any, streamDocument: StreamDocument) => StreamDocument;
1637
+
1638
+ type BreadcrumbLink = {
1639
+ /** The display name of the DM parent. */
1640
+ name: string;
1641
+ /** The relative url path to the DM parent. */
1642
+ slug: string;
1643
+ };
1644
+ /**
1645
+ * Reads the first valid dm_directoryParents field from the stream document.
1646
+ * Extracts the parents' display name and resolves the url path based on pathInfo (with dm slug fallback).
1647
+ */
1648
+ declare const resolveBreadcrumbs: (streamDocument: StreamDocument) => BreadcrumbLink[];
1649
+
1650
+ type ComponentRegistry = Record<string, Config<any> | (() => Promise<Config<any>>)>;
1651
+ declare const useTemplateMetadata: () => TemplateMetadata;
1652
+
1653
+ type EntityFieldProps = {
1654
+ displayName?: string;
1655
+ fieldId?: string;
1656
+ constantValueEnabled?: boolean;
1657
+ children: React__default.ReactNode;
1658
+ fullHeight?: boolean;
1659
+ className?: string;
1660
+ };
1661
+ declare const EntityField: React__default.ForwardRefExoticComponent<EntityFieldProps & React__default.RefAttributes<HTMLDivElement>>;
1662
+ type EntityTooltipsContext = {
1663
+ tooltipsVisible: boolean;
1664
+ toggleTooltips: () => void;
1665
+ };
1666
+ declare const EntityTooltipsContext: React__default.Context<EntityTooltipsContext | undefined>;
1667
+ declare const EntityTooltipsProvider: ({ children, }: {
1668
+ children: React__default.ReactNode;
1669
+ }) => React__default.JSX.Element;
1670
+ declare const useEntityTooltips: () => EntityTooltipsContext | undefined;
1671
+
1672
+ type YextAutoFieldProps<ValueType = any> = Omit<FieldProps<any, ValueType>, "field"> & {
1673
+ field: YextFieldDefinition<ValueType>;
1674
+ value: ValueType;
1675
+ };
1676
+ declare const YextAutoField: <ValueType>({ field, ...props }: YextAutoFieldProps<ValueType>) => React__default.JSX.Element;
1677
+
1678
+ declare const resolveDataFromParent: <T extends DefaultComponentProps>(fields: YextFields<T> | YextFieldMap<T>, data: Omit<ComponentData<T, string, Record<string, DefaultComponentProps>>, "type">) => Fields<T>;
1679
+
1680
+ declare const Accordion: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
1681
+ declare const AccordionItem: React__default.ForwardRefExoticComponent<React__default.DetailsHTMLAttributes<HTMLDetailsElement> & React__default.RefAttributes<HTMLDetailsElement>>;
1682
+ declare const AccordionTrigger: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLElement> & React__default.RefAttributes<HTMLElement>>;
1683
+ declare const AccordionContent: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
1684
+
1685
+ interface BackgroundProps extends React.HTMLAttributes<HTMLDivElement> {
1686
+ background?: ThemeColor;
1687
+ as?: "div" | "section" | "nav" | "header" | "footer" | "main" | "aside";
1688
+ }
1689
+ declare const Background: React.ForwardRefExoticComponent<BackgroundProps & React.RefAttributes<HTMLDivElement>>;
1690
+
1691
+ declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
1692
+ declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): React.JSX.Element;
1693
+ declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): React.JSX.Element;
1694
+ declare function DropdownMenuItem({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
1695
+ inset?: boolean;
1696
+ }): React.JSX.Element;
1697
+
1698
+ declare const headingVariants: (props?: ({
1699
+ level?: 2 | 1 | 3 | 4 | 5 | 6 | null | undefined;
1700
+ fontSize?: "default" | "xs" | "sm" | "base" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
1701
+ weight?: "default" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | null | undefined;
1702
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1703
+ interface HeadingProps extends Omit<React.HTMLAttributes<HTMLHeadingElement>, "color">, VariantProps<typeof headingVariants> {
1704
+ level: HeadingLevel;
1705
+ semanticLevelOverride?: HeadingLevel | "span";
1706
+ color?: ThemeColor;
1707
+ }
1708
+ declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
1709
+
1710
+ interface HoursStatusAtomProps {
1711
+ hours: HoursType;
1712
+ className?: string;
1713
+ comingSoon?: boolean;
1714
+ showCurrentStatus?: boolean;
1715
+ showDayNames?: boolean;
1716
+ timeFormat?: "12h" | "24h";
1717
+ dayOfWeekFormat?: "short" | "long";
1718
+ timezone?: string;
1719
+ boldCurrentStatus?: boolean;
1720
+ bodyVariant?: "lg" | "base" | "sm";
1721
+ }
1722
+ declare const HoursStatusAtom: React.MemoExoticComponent<({ hours, className, comingSoon, showCurrentStatus, showDayNames, timeFormat, dayOfWeekFormat, timezone, boldCurrentStatus, bodyVariant, }: HoursStatusAtomProps) => any>;
1723
+
1724
+ interface HoursTableAtomProps extends Omit<HoursTableProps, "dayOfWeekNames" | "intervalStringsBuilderFn" | "intervalTranslations"> {
1725
+ className?: string;
1726
+ }
1727
+ declare const HoursTableAtom: (props: HoursTableAtomProps) => React.JSX.Element;
1728
+
1729
+ interface ImageProps {
1730
+ image: ImageType | ComplexImageType | TranslatableAssetImage;
1731
+ aspectRatio?: number;
1732
+ width?: number;
1733
+ imageFillType?: ImageFillType;
1734
+ className?: string;
1735
+ /** sizes attribute of the underlying img tag */
1736
+ sizes?: string;
1737
+ loading?: "lazy" | "eager";
1738
+ /**
1739
+ * Entity data used to resolve embedded fields.
1740
+ * Defaults to the stream document if not provided.
1741
+ */
1742
+ streamDocumentOverride?: Record<string, any>;
1743
+ style?: React.CSSProperties;
1744
+ }
1745
+ declare const getImageAltText: (image: ImageType | ComplexImageType | AssetImageType | undefined, locale: string, streamDocument: StreamDocument | Record<string, any>) => string | undefined;
1746
+ declare const Image: React.FC<ImageProps>;
1747
+ type ImgSizesByBreakpoint = {
1748
+ base: string;
1749
+ sm?: string;
1750
+ md?: string;
1751
+ lg?: string;
1752
+ xl?: string;
1753
+ "2xl"?: string;
1754
+ };
1755
+ /**
1756
+ * Creates an img sizes attribute based on the default Tailwind breakpoints.
1757
+ * Replaces `maxWidth` with the current page section max width from the theme.
1758
+ * Replaces `width` with the width parameter.
1759
+ * @param sizes - the width of the image at different breakpoints
1760
+ * @param width - the current width prop of the image
1761
+ * @returns a string for the sizes attribute of an img tag
1762
+ */
1763
+ declare const imgSizesHelper: (sizes: ImgSizesByBreakpoint, width?: string) => string;
1764
+
1765
+ type MaybeLinkProps = {
1766
+ href?: string;
1767
+ children?: React.ReactNode;
1768
+ className?: string;
1769
+ eventName?: string;
1770
+ variant?: CTAVariant;
1771
+ color?: ThemeColor;
1772
+ alwaysHideCaret?: boolean;
1773
+ ariaLabel?: string;
1774
+ disabled?: boolean;
1775
+ };
1776
+ declare const MaybeLink: (props: MaybeLinkProps) => React.JSX.Element;
1777
+
1778
+ declare const pageSectionVariants: (props?: ({
1779
+ verticalPadding?: "default" | "none" | "sm" | "footer" | "header" | "footerSecondary" | null | undefined;
1780
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1781
+ declare const maxWidthVariants: (props?: ({
1782
+ maxWidth?: "768px" | "960px" | "1024px" | "1280px" | "1440px" | "theme" | "fullWidth" | null | undefined;
1783
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1784
+ interface PageSectionProps extends VariantProps<typeof maxWidthVariants>, React.HTMLAttributes<HTMLDivElement> {
1785
+ background?: ThemeColor;
1786
+ verticalPadding?: VariantProps<typeof pageSectionVariants>["verticalPadding"];
1787
+ as?: "div" | "section" | "nav" | "header" | "footer" | "main" | "aside";
1788
+ outerClassName?: string;
1789
+ outerStyle?: React.CSSProperties;
1790
+ }
1791
+ declare const PageSection: React.ForwardRefExoticComponent<PageSectionProps & React.RefAttributes<HTMLDivElement>>;
1792
+
1793
+ type PhoneAtomProps = {
1794
+ phoneNumber: string;
1795
+ label?: string;
1796
+ eventName?: string;
1797
+ backgroundColor?: ThemeColor;
1798
+ format: "domestic" | "international" | undefined;
1799
+ includeHyperlink: boolean;
1800
+ includeIcon: boolean;
1801
+ linkColor?: ThemeColor;
1802
+ onClick?: () => void;
1803
+ };
1804
+ declare const PhoneAtom: (props: PhoneAtomProps) => React.JSX.Element;
1805
+ declare const formatPhoneNumber: (phoneNumberString: string, format?: string) => string;
1806
+
1807
+ declare enum TimestampOption {
1808
+ DATE = "DATE",
1809
+ DATE_TIME = "DATE_TIME",
1810
+ DATE_RANGE = "DATE_RANGE",
1811
+ DATE_TIME_RANGE = "DATE_TIME_RANGE"
1812
+ }
1813
+ type TimestampAtomProps = {
1814
+ date: string;
1815
+ option?: TimestampOption;
1816
+ endDate?: string;
1817
+ timeZone?: string;
1818
+ hideTimeZone?: boolean;
1819
+ locale?: string;
1820
+ dateFormatOverride?: Omit<Intl.DateTimeFormatOptions, "timeZone">;
1821
+ dateTimeFormatOverride?: Omit<Intl.DateTimeFormatOptions, "timeZone">;
1822
+ };
1823
+ declare const TimestampAtom: ({ date, option, endDate, timeZone, hideTimeZone, locale, dateFormatOverride, dateTimeFormatOverride, }: TimestampAtomProps) => JSX.Element;
1824
+
1825
+ type VideoAtomProps = {
1826
+ youTubeEmbedUrl: string;
1827
+ title: string;
1828
+ className?: string;
1829
+ };
1830
+ declare const VideoAtom: (props: VideoAtomProps) => React.JSX.Element;
1831
+
1832
+ interface VisibilityWrapperProps {
1833
+ liveVisibility: boolean;
1834
+ isEditing: boolean;
1835
+ iconSize?: VariantProps<typeof wrapperVariants>["size"];
1836
+ children: React.ReactNode;
1837
+ }
1838
+ declare const wrapperVariants: (props?: ({
1839
+ size?: "lg" | "md" | null | undefined;
1840
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1841
+ declare const VisibilityWrapper: React.FC<VisibilityWrapperProps>;
1842
+
1843
+ declare const LOCATOR_ENTITY_TYPES: readonly ["location", "healthcareProfessional", "healthcareFacility", "event", "atm", "restaurant", "hotel", "providerFacility", "financialProfessional"];
1844
+ type LocatorEntityType = (typeof LOCATOR_ENTITY_TYPES)[number];
1845
+ declare const DEFAULT_ENTITY_TYPE: LocatorEntityType;
1846
+ declare function isLocatorEntityType(value: string): value is LocatorEntityType;
1847
+ declare const getLocatorEntityTypeSourceMap: (streamDocument?: StreamDocument) => Partial<Record<LocatorEntityType, string | undefined>>;
1848
+ declare const getEntityTypeLabel: (entityType: LocatorEntityType) => string;
1849
+
1850
+ export { type TranslatableStringField as $, type MultiSelectorField as A, type BasicSelectorField as B, type CreateItemSourceOptions as C, type DateTimeSelectorField as D, type EntityFieldTypes as E, type FontRegistry as F, type FontSizeSelectorField as G, type HeadingProps as H, type ItemSourceInstance as I, type ImageField as J, type StyledButtonField as K, type LocatorEntityType as L, type MsgString as M, type StyledButtonValue as N, type OptionalNumberField as O, type ProductPrice as P, type StyledImageField as Q, type RichText as R, type StreamFields as S, type TranslationDictionary as T, type StyledImageValue as U, type StyledLinkField as V, type StyledLinkValue as W, type StyledPageSectionField as X, type YextComponentConfig as Y, type StyledPageSectionValue as Z, type StyledTextField as _, type StreamDocument as a, type PresetImageType as a$, type VideoField as a0, type AssetVideo as a1, type SectionLibraryTranslationLoaders as a2, Accordion as a3, AccordionContent as a4, AccordionItem as a5, AccordionTrigger as a6, type AssetImageType as a7, Background as a8, type BackgroundProps as a9, type Font as aA, FontSizeSelectorFieldOverride as aB, type FoodDeliveryServiceType as aC, Heading as aD, type HeroSectionType as aE, HoursStatusAtom as aF, type HoursStatusAtomProps as aG, HoursTableAtom as aH, type HoursTableAtomProps as aI, Image as aJ, type ImageContentData as aK, ImageFieldOverride as aL, type ImageProps as aM, type InsightSectionType as aN, type InsightStruct as aO, type LocalizedAssetImage as aP, MaybeLink as aQ, type MaybeLinkProps as aR, MultiSelectorFieldOverride as aS, type MultiSelectorOption as aT, type MultiSelectorOptions as aU, OptionalNumberFieldOverride as aV, PageSection as aW, type PageSectionProps as aX, type PersonStruct as aY, PhoneAtom as aZ, type PhoneAtomProps as a_, BackgroundProvider as aa, BasicSelectorFieldOverride as ab, Body as ac, type BreadcrumbLink as ad, Button as ae, type ButtonProps as af, CTA as ag, CTASelectorFieldOverride as ah, CodeFieldOverride as ai, ComprehensiveCTAFieldOverride as aj, type CreateSlottedItemSourceOptions as ak, DateTimeSelectorFieldOverride as al, DropdownMenu as am, DropdownMenuContent as an, DropdownMenuItem as ao, DropdownMenuTrigger as ap, EmbeddedFieldStringInputFromEntity as aq, EmbeddedFieldStringInputFromOptions as ar, type EnhancedTranslatableCTA as as, EntityField as at, EntityFieldSelectorFieldOverride as au, type EventSectionType as av, type EventStruct as aw, type FAQSectionType as ax, type FAQStruct as ay, FOOD_DELIVERY_SERVICES as az, type ThemeConfig as b, msg as b$, type ProductSectionType as b0, type ProductStruct as b1, type PromoSectionType as b2, type RenderYextEntityFieldSelectorProps as b3, StyledButtonFieldOverride as b4, StyledImageFieldOverride as b5, StyledLinkFieldOverride as b6, StyledPageSectionFieldOverride as b7, StyledTextFieldOverride as b8, type TeamSectionType as b9, type YextSchemaField as bA, type YextSchemaFieldDefinition as bB, backgroundColors as bC, bindSlots as bD, bodyVariants as bE, buttonVariants as bF, constructFontSelectOptions as bG, createSearchAnalyticsConfig as bH, createSearchHeadlessConfig as bI, createSlottedItemSource as bJ, deepMerge as bK, defaultFonts as bL, defaultThemeTailwindExtensions as bM, fetchLocalesToPathsForEntity as bN, getDefaultForegroundColor as bO, getFontWeightOptions as bP, getFontWeightOverrideOptions as bQ, getPageMetadata as bR, getPreferredDistanceUnit as bS, getSurfaceColorStyle as bT, getThemeColorCssValue as bU, getThemeColorHexValue as bV, headingVariants as bW, imgSizesHelper as bX, isDarkColor as bY, isLocalizedAssetImage as bZ, mergeMeta as b_, TemplatePropsContext as ba, type TestimonialSectionType as bb, type TestimonialStruct as bc, TimestampAtom as bd, type TimestampAtomProps as be, TimestampOption as bf, type TranslatableCTA as bg, TranslatableStringFieldOverride as bh, type TranslationLoader as bi, type TranslationLoaders as bj, VideoAtom as bk, type VideoAtomProps as bl, VideoFieldOverride as bm, VisibilityWrapper as bn, VisualEditorComponentsContentPath as bo, VisualEditorThemeClassSafelist as bp, type YextArrayField as bq, YextAutoField as br, type YextCTAField as bs, type YextCustomFieldRenderProps as bt, YextEntityFieldSelector as bu, type YextFieldDefinition as bv, type YextFieldMap as bw, type YextFields as bx, type YextObjectField as by, type YextPuckField as bz, type TailwindConfig as c, normalizeLink as c0, normalizeSlug as c1, normalizeThemeColorToken as c2, pt as c3, resolveBreadcrumbs as c4, resolveComponentData as c5, resolveDataFromParent as c6, resolveLocalizedAssetImage as c7, resolveUrlTemplate as c8, resolveUrlTemplateOfChild as c9, getBackgroundColorStyle as cA, getCTAType as cB, getDisplayValue as cC, getEntityTypeLabel as cD, getImageAltText as cE, getLocatorEntityTypeSourceMap as cF, getTextColorClass as cG, getTextColorStyle as cH, hexToRGB as cI, isColorContrastWcagCompliant as cJ, isCtaVariantWithColor as cK, isLocatorEntityType as cL, isNonNormalizableLinkType as cM, loadTranslationDictionary as cN, resolveDirectoryRootProps as cO, resolveField as cP, toMeters as cQ, toMiles as cR, useEntityTooltips as cS, useTemplateMetadata as cT, resolveYextEntityField as ca, themeManagerCn as cb, themeManagerTwMergeConfiguration as cc, themeResolver as cd, toKilometers as ce, toPuckFields as cf, useBackground as cg, useDocument as ch, usePlatformTranslation as ci, useTemplateProps as cj, type SlotMappedCardsData as ck, ConstantValueModeToggler as cl, DEFAULT_ENTITY_TYPE as cm, type EmbeddedStringOption as cn, EntityTooltipsProvider as co, type FieldResolution as cp, type FieldTypeData as cq, type ImagePayload as cr, type LocatorConfig as cs, type RootConfig as ct, buildLocatorDisplayOptions as cu, findField as cv, formatDistance as cw, formatPhoneNumber as cx, fromMeters as cy, getBackgroundColorClasses as cz, type ComponentRegistry as d, type TranslatableRichText as e, ThemeOptions as f, type ThemeColor as g, type YextEntityField as h, type CTAVariant as i, type TranslatableString as j, type HeadingLevel as k, type ImageFillType as l, type TranslatableAssetImage as m, type ImgSizesByBreakpoint as n, type SlottedItemSourceInstance as o, type BodyProps as p, type MultiSelectorValue as q, type StyledTextValue as r, type ComprehensiveCTAValue as s, type CTAProps as t, type BaseTextStyles as u, type CTASelectorField as v, type CodeField as w, type ComprehensiveCTAField as x, type EntityFieldSelectorField as y, type MultiSelectorOptionValue as z };