@yext/visual-editor 2.0.0-beta.6 → 2.0.0-beta.8

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-D48NB__d.js → SectionLibraryVisualEditorProvider-B4oMQHkI.js} +37301 -28992
  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 +9 -0
  5. package/dist/cli/yextve.js +17 -3
  6. package/dist/{locatorEntityTypes-Cx069o6O.d.ts → createYextFieldTransforms-CPEwasy9.d.ts} +299 -27
  7. package/dist/index.d.ts +38 -67
  8. package/dist/locales/platform/cs/visual-editor.json +120 -0
  9. package/dist/locales/platform/da/visual-editor.json +106 -0
  10. package/dist/locales/platform/de/visual-editor.json +106 -0
  11. package/dist/locales/platform/en/visual-editor.json +106 -0
  12. package/dist/locales/platform/en-GB/visual-editor.json +106 -0
  13. package/dist/locales/platform/es/visual-editor.json +113 -0
  14. package/dist/locales/platform/et/visual-editor.json +106 -0
  15. package/dist/locales/platform/fi/visual-editor.json +106 -0
  16. package/dist/locales/platform/fr/visual-editor.json +113 -0
  17. package/dist/locales/platform/hr/visual-editor.json +113 -0
  18. package/dist/locales/platform/hu/visual-editor.json +106 -0
  19. package/dist/locales/platform/it/visual-editor.json +113 -0
  20. package/dist/locales/platform/ja/visual-editor.json +106 -0
  21. package/dist/locales/platform/lt/visual-editor.json +120 -0
  22. package/dist/locales/platform/lv/visual-editor.json +110 -0
  23. package/dist/locales/platform/nb/visual-editor.json +106 -0
  24. package/dist/locales/platform/nl/visual-editor.json +106 -0
  25. package/dist/locales/platform/pl/visual-editor.json +120 -0
  26. package/dist/locales/platform/pt/visual-editor.json +113 -0
  27. package/dist/locales/platform/ro/visual-editor.json +113 -0
  28. package/dist/locales/platform/sk/visual-editor.json +120 -0
  29. package/dist/locales/platform/sv/visual-editor.json +106 -0
  30. package/dist/locales/platform/tr/visual-editor.json +106 -0
  31. package/dist/locales/platform/zh/visual-editor.json +106 -0
  32. package/dist/locales/platform/zh-TW/visual-editor.json +106 -0
  33. package/dist/plugin/internal/layoutGeneration/limits.d.ts +28 -0
  34. package/dist/plugin/plugin.js +6795 -2063
  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 +122 -118
  51. package/dist/sectionLibrarySupport.d.ts +61 -4
  52. package/dist/visual-editor-6mKs9VUe.js +842 -0
  53. package/dist/{visual-editor-DC1pCUtq.js → visual-editor-BK6fTU7k.js} +335 -228
  54. package/dist/{visual-editor-BKK2RKRg.js → visual-editor-BruRrJYN.js} +342 -235
  55. package/dist/visual-editor-Bs3wAslG.js +804 -0
  56. package/dist/{visual-editor-aXXSZO_i.js → visual-editor-C9TLeAzP.js} +355 -248
  57. package/dist/{visual-editor-bEaD2J5r.js → visual-editor-CHWtMtlu.js} +364 -250
  58. package/dist/{visual-editor-EZ39Q-Cf.js → visual-editor-CcfUKpnd.js} +346 -239
  59. package/dist/visual-editor-ClC6hoz3.js +804 -0
  60. package/dist/visual-editor-CtQwadxQ.js +842 -0
  61. package/dist/{visual-editor-Dpc4OfjE.js → visual-editor-D7VeTRK_.js} +358 -247
  62. package/dist/{visual-editor-DM0HkCii.js → visual-editor-DTE5kxrA.js} +351 -244
  63. package/dist/{visual-editor-5YEXG9DH.js → visual-editor-DjTEbi-1.js} +370 -249
  64. package/dist/{visual-editor-DKurZtUt.js → visual-editor-DkHhrFsX.js} +341 -234
  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-_TatCCAS.js +804 -0
  70. package/dist/{visual-editor-BQsdxhUz.js → visual-editor-gEaWoNRu.js} +352 -245
  71. package/dist/{visual-editor-1L5yvx9x.js → visual-editor-gjpr-NAN.js} +358 -251
  72. package/dist/{visual-editor-BZSN_IFr.js → visual-editor-qJW0uCiQ.js} +366 -259
  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 +12865 -9706
  79. package/package.json +6 -3
  80. package/dist/visual-editor-7MhH35_G.js +0 -709
  81. package/dist/visual-editor-BZiKZha2.js +0 -709
  82. package/dist/visual-editor-C3JS3OQU.js +0 -697
  83. package/dist/visual-editor-CGPLMAQn.js +0 -721
  84. package/dist/visual-editor-CIo2noVV.js +0 -709
  85. package/dist/visual-editor-CX5aaC7B.js +0 -709
  86. package/dist/visual-editor-CZouujLr.js +0 -697
  87. package/dist/visual-editor-CdwYNJ-y.js +0 -721
  88. package/dist/visual-editor-CwLtLH7t.js +0 -697
  89. package/dist/visual-editor-HIaH9B9G.js +0 -697
  90. package/dist/visual-editor-J0zs1Agv.js +0 -721
  91. package/dist/visual-editor-SYachtCo.js +0 -709
  92. package/dist/visual-editor-VsL3_PCS.js +0 -697
@@ -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,162 @@
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-D48NB__d.js";
2
- import { setDeep as d } from "@puckeditor/core";
3
- function b(s, e) {
4
- return c(e)[s] ?? null;
1
+ import { cf as C, ci as y, cg as S, ch as P, bX as E, cZ as h, bt as v, cp as A, bD as I, c1 as f, bo as D, cm as F, c5 as M, cS as L, cU as V, cV as R, cT as x, aF as B, d3 as O, d4 as w, bC as W, b1 as k, cJ as U, bF as z, bG as G, bH as H, bK as Y, cv as N, bJ as _, cH as j, b$ as Q, bO as X, cX as Z, T as $, bY as J, bf as K, dj as q, dk as ee, au as se, ax as ae, aw as te, at as oe, av as re, dP as ne, dn as ie, bP as le, aD as ce, ds as de, bz as pe, bS as ge, cn as ue, dw as me, U as be, cx as Te, cw as Ce, b_ as ye, b0 as Se, bW as Pe, cW as Ee, f as he, c7 as ve, dQ as Ae, c8 as Ie, dR as fe, cd as De, cj as Fe, dS as Me, dT as Le, cF as Ve, dU as Re, co as xe, dD as Be, c6 as Oe, dV as we, cc as We, cb as ke, bs as Ue, bN as ze, cA as Ge, dG as He, dW as Ye, bI as Ne, dX as _e, bE as je, bQ as Qe, bL as Xe, cB as Ze, dY as $e, cu as Je, dZ as Ke, d_ as qe, m as es, az as ss, dI as as, j as ts, d$ as os, Y as rs, g as ns, bB as is, bA as ls, c0 as cs, e0 as ds, e1 as ps, bM as gs, cl as us, d as ms, c as bs, bR as Ts, bZ as Cs, by as ys, dN as Ss, cC as Ps, cD as Es, c4 as hs, br as vs, bU as As, aA as Is, as as fs, bV as Ds, e2 as Fs, cy as Ms, u as Ls, aB as Vs, c2 as Rs, bT as xs, cz as Bs, e3 as Os } from "./SectionLibraryVisualEditorProvider-B4oMQHkI.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,
35
+ P as AccordionTrigger,
36
36
  E as Background,
37
- P as BackgroundProvider,
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,
41
+ f as CardContextProvider,
42
+ D as ComponentErrorBoundary,
43
+ F as ConstantValueModeToggler,
44
+ M as DEFAULT_ENTITY_TYPE,
45
+ L as DropdownMenu,
46
46
  V as DropdownMenuContent,
47
47
  R as DropdownMenuItem,
48
- O as DropdownMenuTrigger,
48
+ x as DropdownMenuTrigger,
49
49
  B as EditorButton,
50
- k as EmbeddedFieldStringInputFromEntity,
51
- x as EmbeddedFieldStringInputFromOptions,
52
- w as EntityField,
53
- W as EntityTooltipsProvider,
54
- H as FOOD_DELIVERY_SERVICES,
50
+ O as EmbeddedFieldStringInputFromEntity,
51
+ w as EmbeddedFieldStringInputFromOptions,
52
+ W as EntityField,
53
+ k as EntityTooltipsProvider,
54
+ U as FOOD_DELIVERY_SERVICES,
55
55
  z as Heading,
56
- N as HoursStatusAtom,
57
- U as HoursTableAtom,
56
+ G as HoursStatusAtom,
57
+ H as HoursTableAtom,
58
58
  Y as Image,
59
- _ as MapPinIcon,
60
- G as MaybeLink,
59
+ N as MapPinIcon,
60
+ _ as MaybeLink,
61
+ j as MaybeRTF,
61
62
  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,
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,
63
+ X as PhoneAtom,
64
+ Z as SectionLibraryVisualEditorProvider,
65
+ $ as TARGET_ORIGINS,
66
+ J as TemplatePropsContext,
67
+ K as ThemeOptions,
68
+ q as TimestampAtom,
69
+ ee as TimestampOption,
70
+ se as Tooltip,
71
+ ae as TooltipArrow,
72
+ te as TooltipContent,
73
+ oe as TooltipProvider,
74
+ re as TooltipTrigger,
75
+ ne as VIEWPORT_BREAKPOINTS,
76
+ ie as VideoAtom,
77
+ le as VisibilityWrapper,
78
+ ce as YextAutoField,
78
79
  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
- 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,
80
+ pe as backgroundColors,
81
+ ge as bindSlots,
82
+ ue as buildLocatorDisplayOptions,
83
+ me as buttonVariants,
84
+ be as createPuckGenerationCatalog,
85
+ Te as createSearchAnalyticsConfig,
86
+ Ce as createSearchHeadlessConfig,
87
+ ye as createSlottedItemSource,
88
+ Se as createYextFieldTransforms,
89
+ Pe as deepMerge,
90
+ Ee as fetchLocalesToPathsForEntity,
91
+ he as findField,
92
+ ve as formatDistance,
93
+ Ae as formatPhoneNumber,
94
+ u as forwardHeadingLevel,
95
+ Ie as fromMeters,
96
+ fe as gatherSlotStyles,
97
+ De as getBackgroundColorClasses,
98
+ Fe as getBackgroundColorStyle,
96
99
  Me as getCTAType,
97
- fe as getDisplayValue,
98
- Le as getEntityTypeLabel,
99
- De as getImageAltText,
100
- Fe as getLocatorEntityTypeSourceMap,
101
- Ve as getPageMetadata,
102
- Re as getPreferredDistanceUnit,
103
- Oe as getRandomPlaceholderImageObject,
104
- Be as getTextColorClass,
100
+ Le as getDisplayValue,
101
+ Ve as getEntityTypeLabel,
102
+ Re as getImageAltText,
103
+ xe as getLocatorEntityTypeSourceMap,
104
+ Be as getPageMetadata,
105
+ Oe as getPreferredDistanceUnit,
106
+ we as getRandomPlaceholderImageObject,
107
+ We as getTextColorClass,
105
108
  ke as getTextColorStyle,
106
- xe as getThemeColorCssValue,
107
- we as getThemeValue,
108
- b as getValueFromQueryString,
109
- We as getViewport,
109
+ Ue as getThemeColorCssValue,
110
+ ze as getThemeValue,
111
+ g as getValueFromQueryString,
112
+ Ge as getViewport,
110
113
  He as headingVariants,
111
- ze as hexToRGB,
114
+ Ye as hexToRGB,
112
115
  Ne as imgSizesHelper,
113
- Ue as isColorContrastWcagCompliant,
114
- Ye as isCtaVariantWithColor,
115
- _e as isDirectoryGrid,
116
- Ge as isLocalizedAssetImage,
117
- Qe as isLocatorEntityType,
118
- qe as isNonNormalizableLinkType,
119
- je as isVisualEditorTestEnv,
116
+ _e as isColorContrastWcagCompliant,
117
+ je as isCtaVariantWithColor,
118
+ Qe as isDirectoryGrid,
119
+ Xe as isLocalizedAssetImage,
120
+ Ze as isLocatorEntityType,
121
+ $e as isNonNormalizableLinkType,
122
+ Je as isVisualEditorTestEnv,
120
123
  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,
134
- ds as resolveLocalizedAssetImage,
135
- cs as resolveLocatorResultUrl,
136
- ps as resolveUrlTemplate,
124
+ qe as loadTranslationDictionary,
125
+ es as mergeMeta,
126
+ ss as msg,
127
+ as as normalizeLink,
128
+ ts as normalizeSlug,
129
+ os as presetImageIcons,
130
+ rs as pt,
131
+ ns as resolveBreadcrumbs,
132
+ is as resolveComponentData,
133
+ ls as resolveDataFromParent,
134
+ cs as resolveDirectoryListChildren,
135
+ ds as resolveDirectoryRootProps,
136
+ ps as resolveField,
137
+ gs as resolveLocalizedAssetImage,
138
+ us as resolveLocatorResultUrl,
139
+ ms as resolveUrlTemplate,
137
140
  bs as resolveUrlTemplateOfChild,
138
- gs as sortAlphabetically,
139
- ms as syncLinkedSlotMappedCards,
141
+ Ts as sortAlphabetically,
142
+ Cs as syncLinkedSlotMappedCards,
140
143
  m as syncParentStyles,
141
- us as themeManagerCn,
142
- Ts as toKilometers,
143
- 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,
144
+ ys as themeManagerCn,
145
+ Ss as toKilometers,
146
+ Ps as toMeters,
147
+ Es as toMiles,
148
+ hs as toPuckFields,
149
+ vs as useBackground,
150
+ As as useCardContext,
151
+ Is as useDocument,
152
+ fs as useEntityTooltips,
153
+ Ds as useGetCardSlots,
154
+ Fs as useParentCardStyles,
152
155
  Ms as usePreviewWindow,
153
- fs as useReceiveMessage,
154
- Ls as useSendMessageToParent,
155
- Ds as useTemplateMetadata,
156
- Fs as useTemplateProps,
157
- Vs as useWindowWidth
156
+ Ls as useReceiveMessage,
157
+ Vs as useSendMessageToParent,
158
+ Rs as useTemplateMetadata,
159
+ xs as useTemplateProps,
160
+ Bs as useWindowWidth,
161
+ Os as withGenerationCatalog
158
162
  };