@yext/visual-editor 2.0.0-beta.5 → 2.0.0-beta.7

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 (92) hide show
  1. package/dist/{SectionLibraryVisualEditorProvider-Cx0HVYVV.js → SectionLibraryVisualEditorProvider-DKUR2CCF.js} +21914 -15283
  2. package/dist/cli/assets/directory-locator-source/components/sections/directory/Directory.tsx +39 -1
  3. package/dist/cli/assets/directory-locator-source/components/sections/directory/DirectoryWrapper.tsx +13 -5
  4. package/dist/cli/assets/directory-locator-source/sectionLibrarySupport.ts +5 -0
  5. package/dist/cli/yextve.js +203 -186
  6. package/dist/index.d.ts +14 -4
  7. package/dist/locales/platform/cs/visual-editor.json +120 -3
  8. package/dist/locales/platform/da/visual-editor.json +106 -3
  9. package/dist/locales/platform/de/visual-editor.json +106 -3
  10. package/dist/locales/platform/en/visual-editor.json +106 -3
  11. package/dist/locales/platform/en-GB/visual-editor.json +106 -3
  12. package/dist/locales/platform/es/visual-editor.json +113 -3
  13. package/dist/locales/platform/et/visual-editor.json +106 -3
  14. package/dist/locales/platform/fi/visual-editor.json +106 -3
  15. package/dist/locales/platform/fr/visual-editor.json +113 -3
  16. package/dist/locales/platform/hr/visual-editor.json +113 -3
  17. package/dist/locales/platform/hu/visual-editor.json +106 -3
  18. package/dist/locales/platform/it/visual-editor.json +113 -3
  19. package/dist/locales/platform/ja/visual-editor.json +106 -3
  20. package/dist/locales/platform/lt/visual-editor.json +120 -3
  21. package/dist/locales/platform/lv/visual-editor.json +110 -3
  22. package/dist/locales/platform/nb/visual-editor.json +106 -3
  23. package/dist/locales/platform/nl/visual-editor.json +106 -3
  24. package/dist/locales/platform/pl/visual-editor.json +120 -3
  25. package/dist/locales/platform/pt/visual-editor.json +113 -3
  26. package/dist/locales/platform/ro/visual-editor.json +113 -3
  27. package/dist/locales/platform/sk/visual-editor.json +120 -3
  28. package/dist/locales/platform/sv/visual-editor.json +106 -3
  29. package/dist/locales/platform/tr/visual-editor.json +106 -3
  30. package/dist/locales/platform/zh/visual-editor.json +106 -3
  31. package/dist/locales/platform/zh-TW/visual-editor.json +106 -3
  32. package/dist/{locatorEntityTypes-Cx069o6O.d.ts → locatorEntityTypes-CBKnACVV.d.ts} +61 -2
  33. package/dist/plugin/internal/layoutGeneration/limits.d.ts +28 -0
  34. package/dist/plugin/plugin.js +6784 -2065
  35. package/dist/plugin/types/generationPrompts.d.ts +19 -0
  36. package/dist/plugin/types/generationSettings.d.ts +12 -0
  37. package/dist/plugin/types/sectionLibrary.d.ts +11 -4
  38. package/dist/plugin/vite-plugin/layout-generation/generationLogger.d.ts +5 -0
  39. package/dist/plugin/vite-plugin/layout-generation/generationReports.d.ts +13 -0
  40. package/dist/plugin/vite-plugin/layout-generation/middleware.d.ts +14 -0
  41. package/dist/plugin/vite-plugin/layout-generation/modelProxy.d.ts +9 -0
  42. package/dist/plugin/vite-plugin/layout-generation/prompts.d.ts +17 -0
  43. package/dist/plugin/vite-plugin/layout-generation/settings.d.ts +3 -0
  44. package/dist/plugin/vite-plugin/local-editor/artifacts.d.ts +4 -2
  45. package/dist/plugin/vite-plugin/local-editor/data.d.ts +2 -0
  46. package/dist/plugin/vite-plugin/local-editor/generatedFiles.d.ts +2 -3
  47. package/dist/plugin/vite-plugin/local-editor/server.d.ts +17 -1
  48. package/dist/plugin/vite-plugin/local-editor/types.d.ts +18 -2
  49. package/dist/plugin/vite-plugin/plugin.d.ts +1 -1
  50. package/dist/section-library-support.js +107 -105
  51. package/dist/sectionLibrarySupport.d.ts +61 -4
  52. package/dist/visual-editor-6mKs9VUe.js +842 -0
  53. package/dist/{visual-editor-C4_3sOZk.js → visual-editor-BK6fTU7k.js} +339 -235
  54. package/dist/{visual-editor-DHjY21yq.js → visual-editor-BruRrJYN.js} +351 -247
  55. package/dist/visual-editor-Bs3wAslG.js +804 -0
  56. package/dist/{visual-editor-Bbydkr0I.js → visual-editor-C9TLeAzP.js} +355 -251
  57. package/dist/{visual-editor-DjSURqT_.js → visual-editor-CHWtMtlu.js} +365 -254
  58. package/dist/{visual-editor-fiR-iLFH.js → visual-editor-CcfUKpnd.js} +352 -248
  59. package/dist/visual-editor-ClC6hoz3.js +804 -0
  60. package/dist/visual-editor-CtQwadxQ.js +842 -0
  61. package/dist/{visual-editor-B0RChJAU.js → visual-editor-D7VeTRK_.js} +358 -250
  62. package/dist/{visual-editor-U1Pe_9_s.js → visual-editor-DTE5kxrA.js} +341 -237
  63. package/dist/{visual-editor-CKGz4dG0.js → visual-editor-DjTEbi-1.js} +370 -252
  64. package/dist/{visual-editor-DdRZ_kR_.js → visual-editor-DkHhrFsX.js} +343 -239
  65. package/dist/visual-editor-DtL-Zuv_.js +804 -0
  66. package/dist/visual-editor-Duishbsa.js +842 -0
  67. package/dist/visual-editor-LXMNWXry.js +823 -0
  68. package/dist/visual-editor-QpGupjY5.js +823 -0
  69. package/dist/{visual-editor-BYcvKUJc.js → visual-editor-_TatCCAS.js} +358 -254
  70. package/dist/visual-editor-gEaWoNRu.js +804 -0
  71. package/dist/{visual-editor-BhN3aRjm.js → visual-editor-gjpr-NAN.js} +358 -254
  72. package/dist/{visual-editor-DZxcSdwZ.js → visual-editor-qJW0uCiQ.js} +342 -238
  73. package/dist/visual-editor-sOPDMkOR.js +823 -0
  74. package/dist/visual-editor-tPb7n5l8.js +823 -0
  75. package/dist/visual-editor-vomNdlNO.js +804 -0
  76. package/dist/visual-editor-zKhC7_0C.js +823 -0
  77. package/dist/visual-editor.css +1 -1
  78. package/dist/visual-editor.js +14054 -7278
  79. package/package.json +7 -4
  80. package/dist/visual-editor-09Llsq7g.js +0 -712
  81. package/dist/visual-editor-2ORuu8_g.js +0 -712
  82. package/dist/visual-editor-B2kjEXp2.js +0 -712
  83. package/dist/visual-editor-BAapOoWM.js +0 -724
  84. package/dist/visual-editor-BHd18M8g.js +0 -712
  85. package/dist/visual-editor-BIm0S65w.js +0 -724
  86. package/dist/visual-editor-BiWbsaWp.js +0 -700
  87. package/dist/visual-editor-BlP1VpUW.js +0 -724
  88. package/dist/visual-editor-CPhXp-Gz.js +0 -700
  89. package/dist/visual-editor-CtqYqY5l.js +0 -700
  90. package/dist/visual-editor-Jkut-qXP.js +0 -700
  91. package/dist/visual-editor-Ln4QTSN0.js +0 -700
  92. package/dist/visual-editor-WZ5gb_gc.js +0 -712
@@ -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,71 +1,71 @@
1
- import { bJ as y, bM as C, bK as S, bL as h, bp as E, cs as P, aW as v, bT as A, b4 as I, bv as M, aR as f, bQ as L, bz as D, cl as F, cn as V, co as R, cm as O, W as B, cy as k, cz as x, b3 as w, at as W, cc as H, b6 as z, b7 as N, b8 as U, bb as Y, bZ as _, ba as G, bt as Q, bf as q, cq as j, T as K, bq as $, aI as Z, cM as J, cN as X, Z as ee, a2 as se, a1 as ae, Y as te, _ as oe, de as re, cQ as ne, bg as ie, ao as le, cU as de, b0 as ce, bk as pe, bR as be, cY as ge, b$ as me, b_ as ue, bs as Te, bo as ye, cp as Ce, f as Se, bB as he, df as Ee, bC as Pe, dg as ve, bH as Ae, bN as Ie, cb as Me, dh as fe, c7 as Le, di as De, bS as Fe, d2 as Ve, bA as Re, dj as Oe, bG as Be, bF as ke, aV as xe, be as we, c2 as We, d5 as He, dk as ze, b9 as Ne, dl as Ue, b5 as Ye, bi as _e, bc as Ge, c3 as Qe, dm as qe, bY as je, dn as Ke, dp as $e, m as Ze, an as Je, d7 as Xe, k as es, dq as ss, Q as as, h as ts, b2 as os, b1 as rs, bu as ns, dr as is, ds as ls, bd as ds, bP as cs, d as ps, c as bs, bj as gs, br as ms, a$ as us, dc as Ts, c4 as ys, c5 as Cs, by as Ss, aU as hs, bm as Es, af as Ps, X as vs, bn as As, dt as Is, c0 as Ms, u as fs, aq as Ls, bw as Ds, bl as Fs, c1 as Vs } from "./SectionLibraryVisualEditorProvider-Cx0HVYVV.js";
2
- import { setDeep as d } from "@puckeditor/core";
3
- function b(s, e) {
4
- return c(e)[s] ?? null;
1
+ import { ce as C, ch as y, cf as S, cg as E, bW as P, cZ as h, br as v, co as A, bB as I, c0 as L, bm as M, cl as f, c4 as V, cS as D, cU as F, cV as B, cT as O, ay as R, d3 as w, d4 as x, bA as k, a$ as W, cJ as U, bD as z, bE as G, bF as H, bI as N, cu as Y, bH as _, b_ as Q, bM as $, cX as X, T as Z, bX as j, bd as J, di as K, dj as q, aB as ee, aF as se, aE as ae, aA as te, aC as oe, dN as re, dm as ne, bN as ie, aw as le, dr as ce, bx as de, bR as pe, cm as ge, dv as ue, U as me, cw as be, cv as Te, bZ as Ce, bV as ye, cW as Se, f as Ee, c6 as Pe, dO as he, c7 as ve, dP as Ae, cc as Ie, ci as Le, cI as Me, dQ as fe, cE as Ve, dR as De, cn as Fe, dB as Be, c5 as Oe, dS as Re, cb as we, ca as xe, bq as ke, bL as We, cz as Ue, dE as ze, dT as Ge, bG as He, dU as Ne, bC as Ye, bP as _e, bJ as Qe, cA as $e, dV as Xe, ct as Ze, dW as je, dX as Je, m as Ke, as as qe, dG as es, k as ss, dY as as, Y as ts, h as os, bz as rs, by as ns, b$ as is, dZ as ls, d_ as cs, bK as ds, ck as ps, d as gs, c as us, bQ as ms, bY as bs, bw as Ts, dL as Cs, cB as ys, cC as Ss, c3 as Es, bp as Ps, bT as hs, at as vs, az as As, bU as Is, d$ as Ls, cx as Ms, u as fs, au as Vs, c1 as Ds, bS as Fs, cy as Bs, e0 as Os } from "./SectionLibraryVisualEditorProvider-DKUR2CCF.js";
2
+ import { setDeep as c } from "@puckeditor/core";
3
+ function g(s, e) {
4
+ return d(e)[s] ?? null;
5
5
  }
6
- const c = (s) => s.substring(1).split("&").map((e) => e.split("=")).reduce((e, a) => a.length === 2 ? {
6
+ const d = (s) => s.substring(1).split("&").map((e) => e.split("=")).reduce((e, a) => a.length === 2 ? {
7
7
  ...e,
8
8
  [a[0]]: decodeURIComponent(a[1].replace(/\+/g, "%20"))
9
- } : e, {}), g = (s, e) => {
9
+ } : e, {}), u = (s, e) => {
10
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
11
  return t && (s.props.slots.CardsWrapperSlot[0].props.slots.CardSlot = t.map(
12
- (n) => d(
13
- n,
12
+ (r) => r.props.slots?.[e]?.[0]?.props ? c(
13
+ r,
14
14
  `props.slots.${e}[0].props.styles.semanticLevelOverride`,
15
15
  o
16
- )
16
+ ) : r
17
17
  )), s;
18
18
  }, m = (s, e, a) => {
19
19
  const t = s.parent?.props.styles || {}, o = e.props.parentStyles || {};
20
20
  if (a.some(
21
- (r) => t[r] !== o[r]
21
+ (n) => t[n] !== o[n]
22
22
  )) {
23
- const r = a.reduce(
23
+ const n = a.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,
33
- C as AccordionContent,
32
+ C as Accordion,
33
+ y as AccordionContent,
34
34
  S as AccordionItem,
35
- h as AccordionTrigger,
36
- E as Background,
37
- P as BackgroundProvider,
35
+ E as AccordionTrigger,
36
+ P as Background,
37
+ h as BackgroundProvider,
38
38
  v as Body,
39
39
  A as Button,
40
40
  I as CTA,
41
- M as CardContextProvider,
42
- f as ComponentErrorBoundary,
43
- L as ConstantValueModeToggler,
44
- D as DEFAULT_ENTITY_TYPE,
45
- F as DropdownMenu,
46
- V as DropdownMenuContent,
47
- R as DropdownMenuItem,
41
+ L as CardContextProvider,
42
+ M as ComponentErrorBoundary,
43
+ f as ConstantValueModeToggler,
44
+ V as DEFAULT_ENTITY_TYPE,
45
+ D as DropdownMenu,
46
+ F as DropdownMenuContent,
47
+ B as DropdownMenuItem,
48
48
  O as DropdownMenuTrigger,
49
- B as EditorButton,
50
- k as EmbeddedFieldStringInputFromEntity,
49
+ R as EditorButton,
50
+ w as EmbeddedFieldStringInputFromEntity,
51
51
  x as EmbeddedFieldStringInputFromOptions,
52
- w as EntityField,
52
+ k as EntityField,
53
53
  W as EntityTooltipsProvider,
54
- H as FOOD_DELIVERY_SERVICES,
54
+ U as FOOD_DELIVERY_SERVICES,
55
55
  z as Heading,
56
- N as HoursStatusAtom,
57
- U as HoursTableAtom,
58
- Y as Image,
59
- _ as MapPinIcon,
60
- G as MaybeLink,
56
+ G as HoursStatusAtom,
57
+ H as HoursTableAtom,
58
+ N as Image,
59
+ Y as MapPinIcon,
60
+ _ as MaybeLink,
61
61
  Q as PageSection,
62
- q as PhoneAtom,
63
- j as SectionLibraryVisualEditorProvider,
64
- K as TARGET_ORIGINS,
65
- $ as TemplatePropsContext,
66
- Z as ThemeOptions,
67
- J as TimestampAtom,
68
- X as TimestampOption,
62
+ $ as PhoneAtom,
63
+ X as SectionLibraryVisualEditorProvider,
64
+ Z as TARGET_ORIGINS,
65
+ j as TemplatePropsContext,
66
+ J as ThemeOptions,
67
+ K as TimestampAtom,
68
+ q as TimestampOption,
69
69
  ee as Tooltip,
70
70
  se as TooltipArrow,
71
71
  ae as TooltipContent,
@@ -75,84 +75,86 @@ export {
75
75
  ne as VideoAtom,
76
76
  ie as VisibilityWrapper,
77
77
  le as YextAutoField,
78
- de as YextEntityFieldSelector,
79
- ce as backgroundColors,
78
+ ce as YextEntityFieldSelector,
79
+ de as backgroundColors,
80
80
  pe as bindSlots,
81
- be as buildLocatorDisplayOptions,
82
- ge as buttonVariants,
83
- me as createSearchAnalyticsConfig,
84
- ue as createSearchHeadlessConfig,
85
- Te as createSlottedItemSource,
81
+ ge as buildLocatorDisplayOptions,
82
+ ue as buttonVariants,
83
+ me as createPuckGenerationCatalog,
84
+ be as createSearchAnalyticsConfig,
85
+ Te as createSearchHeadlessConfig,
86
+ Ce as createSlottedItemSource,
86
87
  ye as deepMerge,
87
- Ce as fetchLocalesToPathsForEntity,
88
- Se as findField,
89
- he as formatDistance,
90
- Ee as formatPhoneNumber,
91
- g as forwardHeadingLevel,
92
- Pe as fromMeters,
93
- ve as gatherSlotStyles,
94
- Ae as getBackgroundColorClasses,
95
- Ie as getBackgroundColorStyle,
88
+ Se as fetchLocalesToPathsForEntity,
89
+ Ee as findField,
90
+ Pe as formatDistance,
91
+ he as formatPhoneNumber,
92
+ u as forwardHeadingLevel,
93
+ ve as fromMeters,
94
+ Ae as gatherSlotStyles,
95
+ Ie as getBackgroundColorClasses,
96
+ Le as getBackgroundColorStyle,
96
97
  Me as getCTAType,
97
98
  fe as getDisplayValue,
98
- Le as getEntityTypeLabel,
99
+ Ve as getEntityTypeLabel,
99
100
  De as getImageAltText,
100
101
  Fe as getLocatorEntityTypeSourceMap,
101
- Ve as getPageMetadata,
102
- Re as getPreferredDistanceUnit,
103
- Oe as getRandomPlaceholderImageObject,
104
- Be as getTextColorClass,
105
- ke as getTextColorStyle,
106
- xe as getThemeColorCssValue,
107
- we as getThemeValue,
108
- b as getValueFromQueryString,
109
- We as getViewport,
110
- He as headingVariants,
111
- ze as hexToRGB,
112
- Ne as imgSizesHelper,
113
- Ue as isColorContrastWcagCompliant,
102
+ Be as getPageMetadata,
103
+ Oe as getPreferredDistanceUnit,
104
+ Re as getRandomPlaceholderImageObject,
105
+ we as getTextColorClass,
106
+ xe as getTextColorStyle,
107
+ ke as getThemeColorCssValue,
108
+ We as getThemeValue,
109
+ g as getValueFromQueryString,
110
+ Ue as getViewport,
111
+ ze as headingVariants,
112
+ Ge as hexToRGB,
113
+ He as imgSizesHelper,
114
+ Ne as isColorContrastWcagCompliant,
114
115
  Ye as isCtaVariantWithColor,
115
116
  _e as isDirectoryGrid,
116
- Ge as isLocalizedAssetImage,
117
- Qe as isLocatorEntityType,
118
- qe as isNonNormalizableLinkType,
119
- je as isVisualEditorTestEnv,
120
- Ke as linkTypeOptions,
121
- $e as loadTranslationDictionary,
122
- Ze as mergeMeta,
123
- Je as msg,
124
- Xe 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,
117
+ Qe as isLocalizedAssetImage,
118
+ $e as isLocatorEntityType,
119
+ Xe as isNonNormalizableLinkType,
120
+ Ze as isVisualEditorTestEnv,
121
+ je as linkTypeOptions,
122
+ Je as loadTranslationDictionary,
123
+ Ke as mergeMeta,
124
+ qe as msg,
125
+ es as normalizeLink,
126
+ ss as normalizeSlug,
127
+ as as presetImageIcons,
128
+ ts as pt,
129
+ os as resolveBreadcrumbs,
130
+ rs as resolveComponentData,
131
+ ns as resolveDataFromParent,
132
+ is as resolveDirectoryListChildren,
133
+ ls as resolveDirectoryRootProps,
134
+ cs as resolveField,
134
135
  ds as resolveLocalizedAssetImage,
135
- cs as resolveLocatorResultUrl,
136
- ps as resolveUrlTemplate,
137
- bs as resolveUrlTemplateOfChild,
138
- gs as sortAlphabetically,
139
- ms as syncLinkedSlotMappedCards,
136
+ ps as resolveLocatorResultUrl,
137
+ gs as resolveUrlTemplate,
138
+ us as resolveUrlTemplateOfChild,
139
+ ms as sortAlphabetically,
140
+ bs as syncLinkedSlotMappedCards,
140
141
  m as syncParentStyles,
141
- us as themeManagerCn,
142
- Ts as toKilometers,
142
+ Ts as themeManagerCn,
143
+ Cs as toKilometers,
143
144
  ys as toMeters,
144
- Cs as toMiles,
145
- Ss as toPuckFields,
146
- hs as useBackground,
147
- Es as useCardContext,
148
- Ps as useDocument,
149
- vs as useEntityTooltips,
150
- As as useGetCardSlots,
151
- Is as useParentCardStyles,
145
+ Ss as toMiles,
146
+ Es as toPuckFields,
147
+ Ps as useBackground,
148
+ hs as useCardContext,
149
+ vs as useDocument,
150
+ As as useEntityTooltips,
151
+ Is as useGetCardSlots,
152
+ Ls as useParentCardStyles,
152
153
  Ms as usePreviewWindow,
153
154
  fs as useReceiveMessage,
154
- Ls as useSendMessageToParent,
155
+ Vs as useSendMessageToParent,
155
156
  Ds as useTemplateMetadata,
156
157
  Fs as useTemplateProps,
157
- Vs as useWindowWidth
158
+ Bs as useWindowWidth,
159
+ Os as withGenerationCatalog
158
160
  };