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

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 (106) hide show
  1. package/dist/{SectionLibraryVisualEditorProvider-67ng4X9e.js → SectionLibraryVisualEditorProvider-DN65KSX7.js} +35875 -24721
  2. package/dist/SectionLibraryVisualEditorProvider.css +1 -1
  3. package/dist/cli/assets/directory-locator-source/components/sections/directory/Directory.tsx +39 -1
  4. package/dist/cli/assets/directory-locator-source/components/sections/directory/DirectoryWrapper.tsx +13 -5
  5. package/dist/cli/assets/directory-locator-source/sectionLibrarySupport.ts +32 -0
  6. package/dist/cli/yextve.js +322 -218
  7. package/dist/{locatorEntityTypes-s4dmT9l5.d.ts → createYextFieldTransforms-CrIkiJ_X.d.ts} +334 -27
  8. package/dist/index.d.ts +42 -68
  9. package/dist/locales/platform/cs/visual-editor.json +124 -4
  10. package/dist/locales/platform/da/visual-editor.json +110 -4
  11. package/dist/locales/platform/de/visual-editor.json +110 -4
  12. package/dist/locales/platform/en/visual-editor.json +110 -4
  13. package/dist/locales/platform/en-GB/visual-editor.json +110 -4
  14. package/dist/locales/platform/es/visual-editor.json +117 -4
  15. package/dist/locales/platform/et/visual-editor.json +110 -4
  16. package/dist/locales/platform/fi/visual-editor.json +110 -4
  17. package/dist/locales/platform/fr/visual-editor.json +117 -4
  18. package/dist/locales/platform/hr/visual-editor.json +117 -4
  19. package/dist/locales/platform/hu/visual-editor.json +110 -4
  20. package/dist/locales/platform/it/visual-editor.json +117 -4
  21. package/dist/locales/platform/ja/visual-editor.json +110 -4
  22. package/dist/locales/platform/lt/visual-editor.json +124 -4
  23. package/dist/locales/platform/lv/visual-editor.json +114 -4
  24. package/dist/locales/platform/nb/visual-editor.json +110 -4
  25. package/dist/locales/platform/nl/visual-editor.json +110 -4
  26. package/dist/locales/platform/pl/visual-editor.json +124 -4
  27. package/dist/locales/platform/pt/visual-editor.json +117 -4
  28. package/dist/locales/platform/ro/visual-editor.json +117 -4
  29. package/dist/locales/platform/sk/visual-editor.json +124 -4
  30. package/dist/locales/platform/sv/visual-editor.json +110 -4
  31. package/dist/locales/platform/tr/visual-editor.json +109 -3
  32. package/dist/locales/platform/zh/visual-editor.json +110 -4
  33. package/dist/locales/platform/zh-TW/visual-editor.json +110 -4
  34. package/dist/plugin/internal/layoutGeneration/limits.d.ts +28 -0
  35. package/dist/plugin/plugin.js +7025 -2259
  36. package/dist/plugin/types/generationPrompts.d.ts +19 -0
  37. package/dist/plugin/types/generationSettings.d.ts +12 -0
  38. package/dist/plugin/types/sectionLibrary.d.ts +11 -4
  39. package/dist/plugin/vite-plugin/layout-generation/generationLogger.d.ts +5 -0
  40. package/dist/plugin/vite-plugin/layout-generation/generationReports.d.ts +13 -0
  41. package/dist/plugin/vite-plugin/layout-generation/middleware.d.ts +14 -0
  42. package/dist/plugin/vite-plugin/layout-generation/modelProxy.d.ts +9 -0
  43. package/dist/plugin/vite-plugin/layout-generation/prompts.d.ts +17 -0
  44. package/dist/plugin/vite-plugin/layout-generation/settings.d.ts +3 -0
  45. package/dist/plugin/vite-plugin/local-editor/artifacts.d.ts +4 -2
  46. package/dist/plugin/vite-plugin/local-editor/data.d.ts +2 -0
  47. package/dist/plugin/vite-plugin/local-editor/generatedFiles.d.ts +2 -3
  48. package/dist/plugin/vite-plugin/local-editor/server.d.ts +17 -1
  49. package/dist/plugin/vite-plugin/local-editor/types.d.ts +18 -2
  50. package/dist/plugin/vite-plugin/plugin.d.ts +1 -1
  51. package/dist/section-library-support.js +156 -136
  52. package/dist/sectionLibrarySupport.d.ts +425 -4
  53. package/dist/style.css +1 -1
  54. package/dist/visual-editor-6mKs9VUe.js +842 -0
  55. package/dist/visual-editor-BK6fTU7k.js +804 -0
  56. package/dist/visual-editor-BruRrJYN.js +804 -0
  57. package/dist/visual-editor-Bs3wAslG.js +804 -0
  58. package/dist/visual-editor-C9TLeAzP.js +804 -0
  59. package/dist/visual-editor-CHWtMtlu.js +823 -0
  60. package/dist/visual-editor-CcfUKpnd.js +804 -0
  61. package/dist/visual-editor-ClC6hoz3.js +804 -0
  62. package/dist/visual-editor-CtQwadxQ.js +842 -0
  63. package/dist/visual-editor-D7VeTRK_.js +816 -0
  64. package/dist/visual-editor-DTE5kxrA.js +804 -0
  65. package/dist/visual-editor-DjTEbi-1.js +842 -0
  66. package/dist/visual-editor-DkHhrFsX.js +804 -0
  67. package/dist/visual-editor-DtL-Zuv_.js +804 -0
  68. package/dist/visual-editor-Duishbsa.js +842 -0
  69. package/dist/visual-editor-LXMNWXry.js +823 -0
  70. package/dist/visual-editor-QpGupjY5.js +823 -0
  71. package/dist/visual-editor-_TatCCAS.js +804 -0
  72. package/dist/visual-editor-gEaWoNRu.js +804 -0
  73. package/dist/visual-editor-gjpr-NAN.js +804 -0
  74. package/dist/visual-editor-qJW0uCiQ.js +804 -0
  75. package/dist/visual-editor-sOPDMkOR.js +823 -0
  76. package/dist/visual-editor-tPb7n5l8.js +823 -0
  77. package/dist/visual-editor-vomNdlNO.js +804 -0
  78. package/dist/visual-editor-zKhC7_0C.js +823 -0
  79. package/dist/visual-editor.css +1 -1
  80. package/dist/visual-editor.js +14649 -10994
  81. package/package.json +7 -4
  82. package/dist/visual-editor-9bLkRo2X.js +0 -702
  83. package/dist/visual-editor-B5f3AZF6.js +0 -706
  84. package/dist/visual-editor-BGZbJkMp.js +0 -694
  85. package/dist/visual-editor-BPVqHHz5.js +0 -706
  86. package/dist/visual-editor-BPvDMSb8.js +0 -706
  87. package/dist/visual-editor-BTT9n9b6.js +0 -718
  88. package/dist/visual-editor-BXSlgf31.js +0 -694
  89. package/dist/visual-editor-Bez9GftS.js +0 -694
  90. package/dist/visual-editor-Bk5QJccl.js +0 -718
  91. package/dist/visual-editor-BqtG2m0y.js +0 -694
  92. package/dist/visual-editor-C00efXqJ.js +0 -706
  93. package/dist/visual-editor-CZdmgAn0.js +0 -706
  94. package/dist/visual-editor-CcOCcCUQ.js +0 -694
  95. package/dist/visual-editor-D2_8u6ZI.js +0 -694
  96. package/dist/visual-editor-D4vaqoBN.js +0 -694
  97. package/dist/visual-editor-D6n8EP_O.js +0 -694
  98. package/dist/visual-editor-DKG_E7X4.js +0 -694
  99. package/dist/visual-editor-DQq0_rUn.js +0 -706
  100. package/dist/visual-editor-DRXezaoB.js +0 -694
  101. package/dist/visual-editor-DbgFzBNV.js +0 -718
  102. package/dist/visual-editor-DiLdoISr.js +0 -718
  103. package/dist/visual-editor-DnTPMRV4.js +0 -694
  104. package/dist/visual-editor-E0hASBXn.js +0 -694
  105. package/dist/visual-editor-W1OHU94y.js +0 -694
  106. package/dist/visual-editor-bauJ9beX.js +0 -694
@@ -0,0 +1,19 @@
1
+ import { z } from "zod";
2
+ /** Contract version changes when keys or substitutions change. */
3
+ export declare const generationPromptBundleSchema: z.ZodObject<{
4
+ contractVersion: z.ZodLiteral<1>;
5
+ prompts: z.ZodObject<{
6
+ prepare: z.ZodString;
7
+ create: z.ZodString;
8
+ fullPageUpdate: z.ZodString;
9
+ plan: z.ZodString;
10
+ section: z.ZodString;
11
+ }, z.core.$strict>;
12
+ context: z.ZodObject<{
13
+ createLists: z.ZodString;
14
+ fullPageUpdateLists: z.ZodString;
15
+ createRecommendations: z.ZodString;
16
+ fullPageUpdateRecommendations: z.ZodString;
17
+ }, z.core.$strict>;
18
+ }, z.core.$strict>;
19
+ export type GenerationPromptBundle = z.infer<typeof generationPromptBundleSchema>;
@@ -0,0 +1,12 @@
1
+ import { z } from "zod";
2
+ /** Generation limits supplied by ALPHA, independently of prompt wording. */
3
+ export declare const generationSettingsSchema: z.ZodObject<{
4
+ attemptTimeoutMs: z.ZodNumber;
5
+ maxOutputTokens: z.ZodObject<{
6
+ page: z.ZodNumber;
7
+ prepare: z.ZodNumber;
8
+ plan: z.ZodNumber;
9
+ section: z.ZodNumber;
10
+ }, z.core.$strict>;
11
+ }, z.core.$strict>;
12
+ export type GenerationSettings = z.infer<typeof generationSettingsSchema>;
@@ -51,11 +51,13 @@ export type LibraryMetadata = {
51
51
  description: string;
52
52
  };
53
53
  export declare const verticals: readonly ["HEALTHCARE", "FINANCIAL_SERVICES", "FOOD_AND_DINING", "RETAIL", "HOSPITALITY", "PROFESSIONAL_SERVICES"];
54
- export type Vertical = (typeof verticals)[number];
54
+ type Vertical = (typeof verticals)[number];
55
55
  export declare const purposes: readonly ["LOCATION", "CITATION"];
56
- export type Purpose = (typeof purposes)[number];
56
+ type Purpose = (typeof purposes)[number];
57
57
  /** A layout for use with entity page sets. */
58
58
  export type EntityLayoutMetadata = {
59
+ /** Recommended starting sections for generation; adapt to the requested intent. */
60
+ defaultGenerationSectionIds?: string[];
59
61
  /** The internal id of the entity layout. */
60
62
  id: string;
61
63
  /** The user-facing display name of the layout. */
@@ -67,7 +69,9 @@ export type EntityLayoutMetadata = {
67
69
  pageSetType: "ENTITY";
68
70
  };
69
71
  /** A layout for use with directory page sets. */
70
- export type DirectoryLayoutMetadata = {
72
+ type DirectoryLayoutMetadata = {
73
+ /** Recommended starting sections for generation; adapt to the requested intent. */
74
+ defaultGenerationSectionIds?: string[];
71
75
  /** The internal id of the directory layout. */
72
76
  id: string;
73
77
  /** The user-facing display name of the layout. */
@@ -75,7 +79,9 @@ export type DirectoryLayoutMetadata = {
75
79
  pageSetType: "DIRECTORY";
76
80
  };
77
81
  /** A layout for use with locator page sets. */
78
- export type LocatorLayoutMetadata = {
82
+ type LocatorLayoutMetadata = {
83
+ /** Recommended starting sections for generation; adapt to the requested intent. */
84
+ defaultGenerationSectionIds?: string[];
79
85
  /** The internal id of the locator layout. */
80
86
  id: string;
81
87
  /** The user-facing display name of the layout. */
@@ -92,3 +98,4 @@ export type SectionLibraryLayout = {
92
98
  /** Puck Layout JSON */
93
99
  defaultLayout: Record<string, any>;
94
100
  };
101
+ export {};
@@ -0,0 +1,5 @@
1
+ /** One JSONL file per server session, named for its first log entry. */
2
+ export declare const createGenerationLogger: (directory: string) => ((message: string, details: object) => void) & {
3
+ flush: () => Promise<void>;
4
+ close: () => Promise<void>;
5
+ };
@@ -0,0 +1,13 @@
1
+ import type { IncomingMessage, ServerResponse } from "node:http";
2
+ /** Browser resolution can fail after the server accepts a generated result. */
3
+ export declare const handleGenerationErrorReport: (request: IncomingMessage & {
4
+ body?: unknown;
5
+ }, response: ServerResponse, log: ((message: string, details: object) => void) & {
6
+ flush: () => Promise<void>;
7
+ }) => Promise<void>;
8
+ /** Keep browser commit and resolution snapshots alongside model requests. */
9
+ export declare const handleGenerationDiagnostics: (request: IncomingMessage & {
10
+ body?: unknown;
11
+ }, response: ServerResponse, log: ((message: string, details: object) => void) & {
12
+ flush: () => Promise<void>;
13
+ }) => Promise<void>;
@@ -0,0 +1,14 @@
1
+ import type { GenerationSettings } from "../../types/generationSettings.ts";
2
+ import type { GenerationPromptBundle } from "../../types/generationPrompts.ts";
3
+ import type { IncomingMessage, ServerResponse } from "node:http";
4
+ import type { SectionLibraryLayout } from "../../types/sectionLibrary.ts";
5
+ import type { createGenerationLogger } from "./generationLogger.ts";
6
+ /** Local generation routes fall through to the rest of the Vite middleware stack. */
7
+ export declare const createGenerationMiddleware: ({ rootDir, getLayouts, getModel, prompts, generationSettings, logGeneration, }: {
8
+ rootDir: string;
9
+ getLayouts: () => SectionLibraryLayout[];
10
+ getModel: () => string;
11
+ prompts: GenerationPromptBundle | null;
12
+ generationSettings: GenerationSettings | null;
13
+ logGeneration: ReturnType<typeof createGenerationLogger>;
14
+ }) => (request: IncomingMessage, response: ServerResponse, next: () => void) => void;
@@ -0,0 +1,9 @@
1
+ import type { IncomingMessage, ServerResponse } from "node:http";
2
+ export declare const GENERATION_GATEWAY_URL = "http://modelgateway.service.us3dev.consul:8008/openai/responses";
3
+ /** Development transport only: forward prepared requests and raw response bytes. */
4
+ export declare const handleLocalEditorModelRequest: (request: IncomingMessage & {
5
+ body?: unknown;
6
+ }, response: ServerResponse, { model, log, }: {
7
+ model: string;
8
+ log: (message: string, details: object) => void;
9
+ }) => Promise<void>;
@@ -0,0 +1,17 @@
1
+ /** Read once at server startup. The local harness deliberately has no refresh/cache machinery. */
2
+ export declare const loadLocalGenerationPrompts: (rootDir: string, filePath?: string) => Promise<{
3
+ contractVersion: 1;
4
+ prompts: {
5
+ prepare: string;
6
+ create: string;
7
+ fullPageUpdate: string;
8
+ plan: string;
9
+ section: string;
10
+ };
11
+ context: {
12
+ createLists: string;
13
+ fullPageUpdateLists: string;
14
+ createRecommendations: string;
15
+ fullPageUpdateRecommendations: string;
16
+ };
17
+ } | null>;
@@ -0,0 +1,3 @@
1
+ import { type GenerationSettings } from "../../types/generationSettings.ts";
2
+ import type { LocalEditorOptions } from "../local-editor/types.ts";
3
+ export declare const resolveLocalGenerationSettings: (overrides?: LocalEditorOptions["generationSettings"]) => GenerationSettings | null;
@@ -1,7 +1,9 @@
1
1
  import type { SectionLibraryLayout } from "../../types/sectionLibrary.ts";
2
+ import type { ResolvedLocalEditorLayoutConfig } from "./types.ts";
2
3
  type CreateLocalEditorArtifactsManagerOptions = {
3
4
  localEditorTemplateSource: string;
4
5
  localEditorDataTemplateSource: string;
6
+ layoutGenerationEnabled?: boolean;
5
7
  };
6
8
  /**
7
9
  * Creates and removes the generated Local Editor Pages templates.
@@ -10,9 +12,9 @@ type CreateLocalEditorArtifactsManagerOptions = {
10
12
  * 2. Write data templates for Entity and Directory layouts.
11
13
  * 3. Remove only files that this feature generated.
12
14
  */
13
- export declare const createLocalEditorArtifactsManager: ({ localEditorTemplateSource, localEditorDataTemplateSource, }: CreateLocalEditorArtifactsManagerOptions) => {
15
+ export declare const createLocalEditorArtifactsManager: ({ localEditorTemplateSource, localEditorDataTemplateSource, layoutGenerationEnabled, }: CreateLocalEditorArtifactsManagerOptions) => {
14
16
  cleanupGeneratedLocalEditorArtifacts: (rootDir?: string) => void;
15
- syncLocalEditorDataTemplates: (layouts: SectionLibraryLayout[], rootDir?: string) => void;
17
+ syncLocalEditorDataTemplates: (layouts: SectionLibraryLayout[], rootDir?: string, resolvedLayouts?: ResolvedLocalEditorLayoutConfig[]) => void;
16
18
  syncLocalEditorTemplate: (layouts: SectionLibraryLayout[], rootDir?: string) => void;
17
19
  };
18
20
  export {};
@@ -7,4 +7,6 @@ import type { LocalEditorDocumentResponse, LocalEditorManifestResponse } from ".
7
7
  * effective default selection from layout defaults and snapshot data.
8
8
  */
9
9
  export declare const getLocalEditorManifest: (rootDir: string, libraryLayouts: SectionLibraryLayout[]) => Promise<LocalEditorManifestResponse>;
10
+ /** Locale keys for generation are scoped to the selected layout, not UI translations. */
11
+ export declare const getLocalEditorGenerationLocales: (rootDir: string, libraryLayouts: SectionLibraryLayout[], layoutId: string) => Promise<string[]>;
10
12
  export declare const getLocalEditorDocument: (rootDir: string, libraryLayouts: SectionLibraryLayout[], layoutId?: string, entityId?: string, locale?: string, directoryChildCount?: number) => Promise<LocalEditorDocumentResponse>;
@@ -1,10 +1,9 @@
1
1
  import type { PageSetType } from "../../types/sectionLibrary.ts";
2
- export declare const DEFAULT_LOCAL_EDITOR_ROUTE = "/local-editor";
2
+ import type { LocalEditorStreamDefinition } from "./types.ts";
3
3
  export declare const DEFAULT_LOCAL_EDITOR_STREAM_CONFIG_PATH = "stream.config.ts";
4
4
  export declare const LOCAL_EDITOR_API_BASE_PATH = "/__yext_visual_editor/local-editor";
5
5
  export declare const LOCAL_EDITOR_DATA_TEMPLATE_PREFIX = "local-editor-data-";
6
6
  export declare const LEGACY_LOCAL_EDITOR_DATA_TEMPLATE_PATH = "src/templates/local-editor-data.tsx";
7
- export declare const GENERATED_LOCAL_EDITOR_TEMPLATE_PREFIX = "/** THIS FILE IS AUTOGENERATED AND SHOULD NOT BE EDITED */";
8
7
  /**
9
8
  * Builds the generated data-template name used for one local-editor template.
10
9
  */
@@ -27,7 +26,7 @@ export declare const ensureLocalEditorStreamConfig: (rootDir: string) => void;
27
26
  * Injects template-specific placeholders into generated local-editor data
28
27
  * template source.
29
28
  */
30
- export declare const buildLocalEditorDataTemplateSource: (templateSource: string, streamConfigImportPath: string, layoutId: string, pageSetType: PageSetType) => string;
29
+ export declare const buildLocalEditorDataTemplateSource: (templateSource: string, stream: LocalEditorStreamDefinition | undefined, layoutId: string, pageSetType: PageSetType) => string;
31
30
  /**
32
31
  * Returns whether a template file was generated by the local-editor flow.
33
32
  */
@@ -1,5 +1,6 @@
1
+ import type { IncomingMessage } from "node:http";
1
2
  import type { SectionLibraryLayout } from "../../types/sectionLibrary.ts";
2
- export type JsonResponseWriter = {
3
+ type JsonResponseWriter = {
3
4
  setHeader: (name: string, value: string) => void;
4
5
  end: (chunk?: string) => void;
5
6
  statusCode: number;
@@ -16,3 +17,18 @@ export declare const handleLocalEditorRequest: (requestUrl: string, response: Js
16
17
  * local-editor server hooks.
17
18
  */
18
19
  export declare const sendJsonResponse: (response: JsonResponseWriter, payload: unknown, statusCode?: number) => void;
20
+ type JsonRequestBody = {
21
+ ok: true;
22
+ payload: unknown;
23
+ bodyBytes: number;
24
+ } | {
25
+ ok: false;
26
+ status: 400 | 413;
27
+ bodyBytes: number;
28
+ parseError?: string;
29
+ };
30
+ /** Read parsed middleware bodies or bounded UTF-8 streams using the same limits. */
31
+ export declare const readJsonRequestBody: (request: IncomingMessage & {
32
+ body?: unknown;
33
+ }, maxBytes: number) => Promise<JsonRequestBody>;
34
+ export {};
@@ -1,14 +1,29 @@
1
+ import type { GenerationSettings } from "../../types/generationSettings.ts";
1
2
  import type { YextSchemaField } from "../../types/entityFields.ts";
2
3
  import type { PageSetType } from "../../types/sectionLibrary.ts";
3
4
  export type LocalEditorOptions = {
4
5
  enabled?: boolean;
6
+ /** Enables layout generation and its local logs. Defaults to false. */
7
+ layoutGenerationEnabled?: boolean;
8
+ /** Model used by the local json-render generation endpoint. */
9
+ generationModel?: string;
10
+ /** Override local generation limits; omitted values retain the local defaults. */
11
+ generationSettings?: {
12
+ attemptTimeoutMs?: GenerationSettings["attemptTimeoutMs"];
13
+ maxOutputTokens?: Partial<GenerationSettings["maxOutputTokens"]>;
14
+ };
15
+ /**
16
+ * Path to the TypeScript prompt bundle in your ALPHA checkout, absolute or relative
17
+ * to the Vite root. Required for local AI generation.
18
+ */
19
+ generationPromptsPath?: string;
5
20
  };
6
- export type LocalEditorDefaults = {
21
+ type LocalEditorDefaults = {
7
22
  layoutId?: string;
8
23
  locale?: string;
9
24
  entityId?: string;
10
25
  };
11
- export type LocalEditorStreamField = string | {
26
+ type LocalEditorStreamField = string | {
12
27
  name: string;
13
28
  fullObject?: boolean;
14
29
  };
@@ -107,3 +122,4 @@ export type ResolvedLocalEditorConfig = {
107
122
  env: Record<string, string>;
108
123
  layouts: ResolvedLocalEditorLayoutConfig[];
109
124
  };
125
+ export {};
@@ -1,4 +1,4 @@
1
- import { Plugin } from "vite";
1
+ import type { Plugin } from "vite";
2
2
  import type { LocalEditorOptions } from "./local-editor/types.ts";
3
3
  export type VisualEditorPluginOptions = {
4
4
  /** @deprecated This option is ignored because Section Library builds are always enabled. */
@@ -1,158 +1,178 @@
1
- import { bI as y, bL as C, bJ as S, bK as E, bo as h, cs as P, aT as v, bS as A, b1 as I, bu as M, aO as L, bP as f, by as F, cl as D, cn as O, co as R, cm as V, Q as x, cy as B, cz as k, b0 as w, aq as W, cc as _, b3 as z, b4 as H, b5 as U, b8 as Y, bY as N, b7 as G, bs as Q, bc as q, cq as j, T as K, bp as Z, aF as $, cM as X, cN as J, W as ee, _ as se, Z as ae, U as te, X as oe, dd as re, cQ as ne, bf as ie, al as le, cU as de, aZ as ce, bj as pe, bQ as be, cY as ge, b_ as me, bZ as ue, br as Te, bn as ye, cp as Ce, f as Se, bA as Ee, de as he, bB as Pe, df as ve, bG as Ae, bM as Ie, cb as Me, dg as Le, c6 as fe, dh as Fe, bR as De, d1 as Oe, bz as Re, di as Ve, bF as xe, bE as Be, aS as ke, bb as we, c1 as We, d4 as _e, dj as ze, b6 as He, dk as Ue, b2 as Ye, bh as Ne, b9 as Ge, c2 as Qe, dl as qe, bX as je, dm as Ke, dn as Ze, m as $e, ak as Xe, d6 as Je, be as es, dp as ss, M as as, c7 as ts, a$ as os, a_ as rs, bt as ns, dq as is, dr as ls, ba as ds, bO as cs, d as ps, c as bs, bi as gs, bq as ms, aY as us, db as Ts, c3 as ys, c4 as Cs, bx as Ss, aR as Es, bl as hs, ac as Ps, R as vs, bm as As, ds as Is, b$ as Ms, u as Ls, an as fs, bv as Fs, bk as Ds, c0 as Os } from "./SectionLibraryVisualEditorProvider-67ng4X9e.js";
2
- import { setDeep as d } from "@puckeditor/core";
3
- function b(s, e) {
4
- return c(e)[s] ?? null;
1
+ import { ck as b, cn as C, cl as h, cm as y, c0 as E, d2 as P, by as v, cu as I, bI as A, c6 as F, bt as L, cr as M, ca as f, cX as D, cZ as x, c_ as O, cY as V, aK as R, d8 as Z, d9 as k, bH as w, b6 as B, cO as Y, bK as G, bL as W, bM as _, bP as H, dU as N, cA as U, bO as z, cM as K, c4 as $, bT as j, d0 as Q, T as X, c1 as q, bk as J, dp as ee, dq as ae, ax as se, aA as te, az as oe, aw as re, ay as ne, dV as ie, dt as le, bU as ce, aI as de, dx as pe, dW as me, dX as ge, bE as ue, bX as Se, cs as Te, dB as be, dY as Ce, U as he, cC as ye, cB as Ee, c3 as Pe, b5 as ve, dZ as Ie, b$ as Ae, d_ as Fe, d$ as Le, c$ as Me, f as fe, cc as De, e0 as xe, cd as Oe, e1 as Ve, ci as Re, co as Ze, e2 as ke, e3 as we, cK as Be, e4 as Ye, ct as Ge, dI as We, cb as _e, e5 as He, ch as Ne, cg as Ue, bx as ze, bS as Ke, cF as $e, dL as je, e6 as Qe, e7 as Xe, e8 as qe, bN as Je, e9 as ea, ea as aa, bJ as sa, bV as ta, bQ as oa, cG as ra, eb as na, cz as ia, ec as la, ed as ca, m as da, aD as pa, dN as ma, j as ga, ee as ua, Y as Sa, g as Ta, ef as ba, bG as Ca, bF as ha, c5 as ya, eg as Ea, eh as Pa, bR as va, cq as Ia, d as Aa, c as Fa, ei as La, ej as Ma, bW as fa, c2 as Da, bD as xa, dS as Oa, cH as Va, cI as Ra, c9 as Za, ek as ka, el as wa, bw as Ba, bZ as Ya, aF as Ga, av as Wa, b_ as _a, em as Ha, cD as Na, u as Ua, aG as za, c7 as Ka, bY as $a, cE as ja, en as Qa, eo as Xa } from "./SectionLibraryVisualEditorProvider-DN65KSX7.js";
2
+ import { setDeep as c } from "@puckeditor/core";
3
+ function m(a, e) {
4
+ return d(e)[a] ?? null;
5
5
  }
6
- const c = (s) => s.substring(1).split("&").map((e) => e.split("=")).reduce((e, a) => a.length === 2 ? {
6
+ const d = (a) => a.substring(1).split("&").map((e) => e.split("=")).reduce((e, s) => s.length === 2 ? {
7
7
  ...e,
8
- [a[0]]: decodeURIComponent(a[1].replace(/\+/g, "%20"))
9
- } : e, {}), g = (s, e) => {
10
- const a = s.props.slots.SectionHeadingSlot?.[0]?.props?.styles?.level, t = s.props.slots.CardsWrapperSlot?.[0]?.props?.slots?.CardSlot, o = a < 6 ? a + 1 : "span";
11
- return t && (s.props.slots.CardsWrapperSlot[0].props.slots.CardSlot = t.map(
12
- (n) => d(
13
- n,
8
+ [s[0]]: decodeURIComponent(s[1].replace(/\+/g, "%20"))
9
+ } : e, {}), g = (a, e) => {
10
+ const s = a.props.slots.SectionHeadingSlot?.[0]?.props?.styles?.level, t = a.props.slots.CardsWrapperSlot?.[0]?.props?.slots?.CardSlot, o = s < 6 ? s + 1 : "span";
11
+ return t && (a.props.slots.CardsWrapperSlot[0].props.slots.CardSlot = t.map(
12
+ (r) => r.props.slots?.[e]?.[0]?.props ? c(
13
+ r,
14
14
  `props.slots.${e}[0].props.styles.semanticLevelOverride`,
15
15
  o
16
- )
17
- )), s;
18
- }, m = (s, e, a) => {
19
- const t = s.parent?.props.styles || {}, o = e.props.parentStyles || {};
20
- if (a.some(
21
- (r) => t[r] !== o[r]
16
+ ) : r
17
+ )), a;
18
+ }, u = (a, e, s) => {
19
+ const t = a.parent?.props.styles || {}, o = e.props.parentStyles || {};
20
+ if (s.some(
21
+ (n) => t[n] !== o[n]
22
22
  )) {
23
- const r = a.reduce(
23
+ const n = s.reduce(
24
24
  (i, l) => (i[l] = t[l], i),
25
25
  { ...o }
26
26
  );
27
- return d(e, "props.parentStyles", r);
27
+ return c(e, "props.parentStyles", n);
28
28
  }
29
29
  return e;
30
30
  };
31
31
  export {
32
- y as Accordion,
32
+ b as Accordion,
33
33
  C as AccordionContent,
34
- S as AccordionItem,
35
- E as AccordionTrigger,
36
- h as Background,
34
+ h as AccordionItem,
35
+ y as AccordionTrigger,
36
+ E as Background,
37
37
  P as BackgroundProvider,
38
38
  v as Body,
39
- A as Button,
40
- I as CTA,
41
- M as CardContextProvider,
39
+ I as Button,
40
+ A as CTA,
41
+ F as CardContextProvider,
42
42
  L as ComponentErrorBoundary,
43
- f as ConstantValueModeToggler,
44
- F as DEFAULT_ENTITY_TYPE,
43
+ M as ConstantValueModeToggler,
44
+ f as DEFAULT_ENTITY_TYPE,
45
45
  D as DropdownMenu,
46
- O as DropdownMenuContent,
47
- R as DropdownMenuItem,
46
+ x as DropdownMenuContent,
47
+ O as DropdownMenuItem,
48
48
  V as DropdownMenuTrigger,
49
- x as EditorButton,
50
- B as EmbeddedFieldStringInputFromEntity,
49
+ R as EditorButton,
50
+ Z as EmbeddedFieldStringInputFromEntity,
51
51
  k as EmbeddedFieldStringInputFromOptions,
52
52
  w as EntityField,
53
- W as EntityTooltipsProvider,
54
- _ as FOOD_DELIVERY_SERVICES,
55
- z as Heading,
56
- H as HoursStatusAtom,
57
- U as HoursTableAtom,
58
- Y as Image,
59
- N as MapPinIcon,
60
- G as MaybeLink,
61
- Q as PageSection,
62
- q as PhoneAtom,
63
- j as SectionLibraryVisualEditorProvider,
64
- K as TARGET_ORIGINS,
65
- Z as TemplatePropsContext,
66
- $ as ThemeOptions,
67
- X as TimestampAtom,
68
- J as TimestampOption,
69
- ee as Tooltip,
70
- se as TooltipArrow,
71
- ae as TooltipContent,
72
- te as TooltipProvider,
73
- oe as TooltipTrigger,
74
- re as VIEWPORT_BREAKPOINTS,
75
- ne as VideoAtom,
76
- ie as VisibilityWrapper,
77
- le as YextAutoField,
78
- de as YextEntityFieldSelector,
79
- ce as backgroundColors,
80
- pe as bindSlots,
81
- be as buildLocatorDisplayOptions,
82
- ge as buttonVariants,
83
- me as createSearchAnalyticsConfig,
84
- ue as createSearchHeadlessConfig,
85
- Te as createSlottedItemSource,
86
- ye as deepMerge,
87
- Ce as fetchLocalesToPathsForEntity,
88
- Se as findField,
89
- Ee as formatDistance,
90
- he as formatPhoneNumber,
53
+ B as EntityTooltipsProvider,
54
+ Y as FOOD_DELIVERY_SERVICES,
55
+ G as Heading,
56
+ W as HoursStatusAtom,
57
+ _ as HoursTableAtom,
58
+ H as Image,
59
+ N as LOCATOR_ENTITY_TYPES,
60
+ U as MapPinIcon,
61
+ z as MaybeLink,
62
+ K as MaybeRTF,
63
+ $ as PageSection,
64
+ j as PhoneAtom,
65
+ Q as SectionLibraryVisualEditorProvider,
66
+ X as TARGET_ORIGINS,
67
+ q as TemplatePropsContext,
68
+ J as ThemeOptions,
69
+ ee as TimestampAtom,
70
+ ae as TimestampOption,
71
+ se as Tooltip,
72
+ te as TooltipArrow,
73
+ oe as TooltipContent,
74
+ re as TooltipProvider,
75
+ ne as TooltipTrigger,
76
+ ie as VIEWPORT_BREAKPOINTS,
77
+ le as VideoAtom,
78
+ ce as VisibilityWrapper,
79
+ de as YextAutoField,
80
+ pe as YextEntityFieldSelector,
81
+ me as assetImageZodSchema,
82
+ ge as backgroundColorZodSchema,
83
+ ue as backgroundColors,
84
+ Se as bindSlots,
85
+ Te as buildLocatorDisplayOptions,
86
+ be as buttonVariants,
87
+ Ce as comprehensiveCtaZodSchema,
88
+ he as createPuckGenerationCatalog,
89
+ ye as createSearchAnalyticsConfig,
90
+ Ee as createSearchHeadlessConfig,
91
+ Pe as createSlottedItemSource,
92
+ ve as createYextFieldTransforms,
93
+ Ie as ctaSelectorZodSchema,
94
+ Ae as deepMerge,
95
+ Fe as enhancedCtaZodSchema,
96
+ Le as entityFieldZodSchema,
97
+ Me as fetchLocalesToPathsForEntity,
98
+ fe as findField,
99
+ De as formatDistance,
100
+ xe as formatPhoneNumber,
91
101
  g as forwardHeadingLevel,
92
- Pe as fromMeters,
93
- ve as gatherSlotStyles,
94
- Ae as getBackgroundColorClasses,
95
- Ie as getBackgroundColorStyle,
96
- Me as getCTAType,
97
- Le as getDisplayValue,
98
- fe as getEntityTypeLabel,
99
- Fe as getImageAltText,
100
- De as getLocatorEntityTypeSourceMap,
101
- Oe as getPageMetadata,
102
- Re as getPreferredDistanceUnit,
103
- Ve as getRandomPlaceholderImageObject,
104
- xe as getTextColorClass,
105
- Be as getTextColorStyle,
106
- ke as getThemeColorCssValue,
107
- we as getThemeValue,
108
- b as getValueFromQueryString,
109
- We as getViewport,
110
- _e as headingVariants,
111
- ze as hexToRGB,
112
- He as imgSizesHelper,
113
- Ue as isColorContrastWcagCompliant,
114
- Ye as isCtaVariantWithColor,
115
- Ne as isDirectoryGrid,
116
- Ge as isLocalizedAssetImage,
117
- Qe as isLocatorEntityType,
118
- qe as isNonNormalizableLinkType,
119
- je as isVisualEditorTestEnv,
120
- Ke as linkTypeOptions,
121
- Ze as loadTranslationDictionary,
122
- $e as mergeMeta,
123
- Xe as msg,
124
- Je as normalizeLink,
125
- es as normalizeSlug,
126
- ss as presetImageIcons,
127
- as as pt,
128
- ts as resolveBreadcrumbs,
129
- os as resolveComponentData,
130
- rs as resolveDataFromParent,
131
- ns as resolveDirectoryListChildren,
132
- is as resolveDirectoryRootProps,
133
- ls as resolveField,
134
- ds as resolveLocalizedAssetImage,
135
- cs as resolveLocatorResultUrl,
136
- ps as resolveUrlTemplate,
137
- bs as resolveUrlTemplateOfChild,
138
- gs as sortAlphabetically,
139
- ms as syncLinkedSlotMappedCards,
140
- m as syncParentStyles,
141
- us as themeManagerCn,
142
- Ts as toKilometers,
143
- ys as toMeters,
144
- Cs as toMiles,
145
- Ss as toPuckFields,
146
- Es as useBackground,
147
- hs as useCardContext,
148
- Ps as useDocument,
149
- vs as useEntityTooltips,
150
- As as useGetCardSlots,
151
- Is as useParentCardStyles,
152
- Ms as usePreviewWindow,
153
- Ls as useReceiveMessage,
154
- fs as useSendMessageToParent,
155
- Fs as useTemplateMetadata,
156
- Ds as useTemplateProps,
157
- Os as useWindowWidth
102
+ Oe as fromMeters,
103
+ Ve as gatherSlotStyles,
104
+ Re as getBackgroundColorClasses,
105
+ Ze as getBackgroundColorStyle,
106
+ ke as getCTAType,
107
+ we as getDisplayValue,
108
+ Be as getEntityTypeLabel,
109
+ Ye as getImageAltText,
110
+ Ge as getLocatorEntityTypeSourceMap,
111
+ We as getPageMetadata,
112
+ _e as getPreferredDistanceUnit,
113
+ He as getRandomPlaceholderImageObject,
114
+ Ne as getTextColorClass,
115
+ Ue as getTextColorStyle,
116
+ ze as getThemeColorCssValue,
117
+ Ke as getThemeValue,
118
+ m as getValueFromQueryString,
119
+ $e as getViewport,
120
+ je as headingVariants,
121
+ Qe as hexToRGB,
122
+ Xe as hoursZodSchema,
123
+ qe as imageZodSchema,
124
+ Je as imgSizesHelper,
125
+ ea as inferFieldZodSchema,
126
+ aa as isColorContrastWcagCompliant,
127
+ sa as isCtaVariantWithColor,
128
+ ta as isDirectoryGrid,
129
+ oa as isLocalizedAssetImage,
130
+ ra as isLocatorEntityType,
131
+ na as isNonNormalizableLinkType,
132
+ ia as isVisualEditorTestEnv,
133
+ la as linkTypeOptions,
134
+ ca as loadTranslationDictionary,
135
+ da as mergeMeta,
136
+ pa as msg,
137
+ ma as normalizeLink,
138
+ ga as normalizeSlug,
139
+ ua as presetImageIcons,
140
+ Sa as pt,
141
+ Ta as resolveBreadcrumbs,
142
+ ba as resolveCanonicalSelectorGroups,
143
+ Ca as resolveComponentData,
144
+ ha as resolveDataFromParent,
145
+ ya as resolveDirectoryListChildren,
146
+ Ea as resolveDirectoryRootProps,
147
+ Pa as resolveField,
148
+ va as resolveLocalizedAssetImage,
149
+ Ia as resolveLocatorResultUrl,
150
+ Aa as resolveUrlTemplate,
151
+ Fa as resolveUrlTemplateOfChild,
152
+ La as richTextZodSchema,
153
+ Ma as siteColorZodSchema,
154
+ fa as sortAlphabetically,
155
+ Da as syncLinkedSlotMappedCards,
156
+ u as syncParentStyles,
157
+ xa as themeManagerCn,
158
+ Oa as toKilometers,
159
+ Va as toMeters,
160
+ Ra as toMiles,
161
+ Za as toPuckFields,
162
+ ka as translatableRichTextZodSchema,
163
+ wa as translatableStringZodSchema,
164
+ Ba as useBackground,
165
+ Ya as useCardContext,
166
+ Ga as useDocument,
167
+ Wa as useEntityTooltips,
168
+ _a as useGetCardSlots,
169
+ Ha as useParentCardStyles,
170
+ Na as usePreviewWindow,
171
+ Ua as useReceiveMessage,
172
+ za as useSendMessageToParent,
173
+ Ka as useTemplateMetadata,
174
+ $a as useTemplateProps,
175
+ ja as useWindowWidth,
176
+ Qa as widthZodSchema,
177
+ Xa as withGenerationCatalog
158
178
  };