@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.
- package/dist/{SectionLibraryVisualEditorProvider-67ng4X9e.js → SectionLibraryVisualEditorProvider-DN65KSX7.js} +35875 -24721
- package/dist/SectionLibraryVisualEditorProvider.css +1 -1
- package/dist/cli/assets/directory-locator-source/components/sections/directory/Directory.tsx +39 -1
- package/dist/cli/assets/directory-locator-source/components/sections/directory/DirectoryWrapper.tsx +13 -5
- package/dist/cli/assets/directory-locator-source/sectionLibrarySupport.ts +32 -0
- package/dist/cli/yextve.js +322 -218
- package/dist/{locatorEntityTypes-s4dmT9l5.d.ts → createYextFieldTransforms-CrIkiJ_X.d.ts} +334 -27
- package/dist/index.d.ts +42 -68
- package/dist/locales/platform/cs/visual-editor.json +124 -4
- package/dist/locales/platform/da/visual-editor.json +110 -4
- package/dist/locales/platform/de/visual-editor.json +110 -4
- package/dist/locales/platform/en/visual-editor.json +110 -4
- package/dist/locales/platform/en-GB/visual-editor.json +110 -4
- package/dist/locales/platform/es/visual-editor.json +117 -4
- package/dist/locales/platform/et/visual-editor.json +110 -4
- package/dist/locales/platform/fi/visual-editor.json +110 -4
- package/dist/locales/platform/fr/visual-editor.json +117 -4
- package/dist/locales/platform/hr/visual-editor.json +117 -4
- package/dist/locales/platform/hu/visual-editor.json +110 -4
- package/dist/locales/platform/it/visual-editor.json +117 -4
- package/dist/locales/platform/ja/visual-editor.json +110 -4
- package/dist/locales/platform/lt/visual-editor.json +124 -4
- package/dist/locales/platform/lv/visual-editor.json +114 -4
- package/dist/locales/platform/nb/visual-editor.json +110 -4
- package/dist/locales/platform/nl/visual-editor.json +110 -4
- package/dist/locales/platform/pl/visual-editor.json +124 -4
- package/dist/locales/platform/pt/visual-editor.json +117 -4
- package/dist/locales/platform/ro/visual-editor.json +117 -4
- package/dist/locales/platform/sk/visual-editor.json +124 -4
- package/dist/locales/platform/sv/visual-editor.json +110 -4
- package/dist/locales/platform/tr/visual-editor.json +109 -3
- package/dist/locales/platform/zh/visual-editor.json +110 -4
- package/dist/locales/platform/zh-TW/visual-editor.json +110 -4
- package/dist/plugin/internal/layoutGeneration/limits.d.ts +28 -0
- package/dist/plugin/plugin.js +7025 -2259
- package/dist/plugin/types/generationPrompts.d.ts +19 -0
- package/dist/plugin/types/generationSettings.d.ts +12 -0
- package/dist/plugin/types/sectionLibrary.d.ts +11 -4
- package/dist/plugin/vite-plugin/layout-generation/generationLogger.d.ts +5 -0
- package/dist/plugin/vite-plugin/layout-generation/generationReports.d.ts +13 -0
- package/dist/plugin/vite-plugin/layout-generation/middleware.d.ts +14 -0
- package/dist/plugin/vite-plugin/layout-generation/modelProxy.d.ts +9 -0
- package/dist/plugin/vite-plugin/layout-generation/prompts.d.ts +17 -0
- package/dist/plugin/vite-plugin/layout-generation/settings.d.ts +3 -0
- package/dist/plugin/vite-plugin/local-editor/artifacts.d.ts +4 -2
- package/dist/plugin/vite-plugin/local-editor/data.d.ts +2 -0
- package/dist/plugin/vite-plugin/local-editor/generatedFiles.d.ts +2 -3
- package/dist/plugin/vite-plugin/local-editor/server.d.ts +17 -1
- package/dist/plugin/vite-plugin/local-editor/types.d.ts +18 -2
- package/dist/plugin/vite-plugin/plugin.d.ts +1 -1
- package/dist/section-library-support.js +156 -136
- package/dist/sectionLibrarySupport.d.ts +425 -4
- package/dist/style.css +1 -1
- package/dist/visual-editor-6mKs9VUe.js +842 -0
- package/dist/visual-editor-BK6fTU7k.js +804 -0
- package/dist/visual-editor-BruRrJYN.js +804 -0
- package/dist/visual-editor-Bs3wAslG.js +804 -0
- package/dist/visual-editor-C9TLeAzP.js +804 -0
- package/dist/visual-editor-CHWtMtlu.js +823 -0
- package/dist/visual-editor-CcfUKpnd.js +804 -0
- package/dist/visual-editor-ClC6hoz3.js +804 -0
- package/dist/visual-editor-CtQwadxQ.js +842 -0
- package/dist/visual-editor-D7VeTRK_.js +816 -0
- package/dist/visual-editor-DTE5kxrA.js +804 -0
- package/dist/visual-editor-DjTEbi-1.js +842 -0
- package/dist/visual-editor-DkHhrFsX.js +804 -0
- package/dist/visual-editor-DtL-Zuv_.js +804 -0
- package/dist/visual-editor-Duishbsa.js +842 -0
- package/dist/visual-editor-LXMNWXry.js +823 -0
- package/dist/visual-editor-QpGupjY5.js +823 -0
- package/dist/visual-editor-_TatCCAS.js +804 -0
- package/dist/visual-editor-gEaWoNRu.js +804 -0
- package/dist/visual-editor-gjpr-NAN.js +804 -0
- package/dist/visual-editor-qJW0uCiQ.js +804 -0
- package/dist/visual-editor-sOPDMkOR.js +823 -0
- package/dist/visual-editor-tPb7n5l8.js +823 -0
- package/dist/visual-editor-vomNdlNO.js +804 -0
- package/dist/visual-editor-zKhC7_0C.js +823 -0
- package/dist/visual-editor.css +1 -1
- package/dist/visual-editor.js +14649 -10994
- package/package.json +7 -4
- package/dist/visual-editor-9bLkRo2X.js +0 -702
- package/dist/visual-editor-B5f3AZF6.js +0 -706
- package/dist/visual-editor-BGZbJkMp.js +0 -694
- package/dist/visual-editor-BPVqHHz5.js +0 -706
- package/dist/visual-editor-BPvDMSb8.js +0 -706
- package/dist/visual-editor-BTT9n9b6.js +0 -718
- package/dist/visual-editor-BXSlgf31.js +0 -694
- package/dist/visual-editor-Bez9GftS.js +0 -694
- package/dist/visual-editor-Bk5QJccl.js +0 -718
- package/dist/visual-editor-BqtG2m0y.js +0 -694
- package/dist/visual-editor-C00efXqJ.js +0 -706
- package/dist/visual-editor-CZdmgAn0.js +0 -706
- package/dist/visual-editor-CcOCcCUQ.js +0 -694
- package/dist/visual-editor-D2_8u6ZI.js +0 -694
- package/dist/visual-editor-D4vaqoBN.js +0 -694
- package/dist/visual-editor-D6n8EP_O.js +0 -694
- package/dist/visual-editor-DKG_E7X4.js +0 -694
- package/dist/visual-editor-DQq0_rUn.js +0 -706
- package/dist/visual-editor-DRXezaoB.js +0 -694
- package/dist/visual-editor-DbgFzBNV.js +0 -718
- package/dist/visual-editor-DiLdoISr.js +0 -718
- package/dist/visual-editor-DnTPMRV4.js +0 -694
- package/dist/visual-editor-E0hASBXn.js +0 -694
- package/dist/visual-editor-W1OHU94y.js +0 -694
- 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
|
-
|
|
54
|
+
type Vertical = (typeof verticals)[number];
|
|
55
55
|
export declare const purposes: readonly ["LOCATION", "CITATION"];
|
|
56
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,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
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
21
|
+
type LocalEditorDefaults = {
|
|
7
22
|
layoutId?: string;
|
|
8
23
|
locale?: string;
|
|
9
24
|
entityId?: string;
|
|
10
25
|
};
|
|
11
|
-
|
|
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 {
|
|
2
|
-
import { setDeep as
|
|
3
|
-
function
|
|
4
|
-
return
|
|
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
|
|
6
|
+
const d = (a) => a.substring(1).split("&").map((e) => e.split("=")).reduce((e, s) => s.length === 2 ? {
|
|
7
7
|
...e,
|
|
8
|
-
[
|
|
9
|
-
} : e, {}), g = (
|
|
10
|
-
const
|
|
11
|
-
return t && (
|
|
12
|
-
(
|
|
13
|
-
|
|
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
|
-
)),
|
|
18
|
-
},
|
|
19
|
-
const t =
|
|
20
|
-
if (
|
|
21
|
-
(
|
|
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
|
|
23
|
+
const n = s.reduce(
|
|
24
24
|
(i, l) => (i[l] = t[l], i),
|
|
25
25
|
{ ...o }
|
|
26
26
|
);
|
|
27
|
-
return
|
|
27
|
+
return c(e, "props.parentStyles", n);
|
|
28
28
|
}
|
|
29
29
|
return e;
|
|
30
30
|
};
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
b as Accordion,
|
|
33
33
|
C as AccordionContent,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
h as AccordionItem,
|
|
35
|
+
y as AccordionTrigger,
|
|
36
|
+
E as Background,
|
|
37
37
|
P as BackgroundProvider,
|
|
38
38
|
v as Body,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
I as Button,
|
|
40
|
+
A as CTA,
|
|
41
|
+
F as CardContextProvider,
|
|
42
42
|
L as ComponentErrorBoundary,
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
M as ConstantValueModeToggler,
|
|
44
|
+
f as DEFAULT_ENTITY_TYPE,
|
|
45
45
|
D as DropdownMenu,
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
x as DropdownMenuContent,
|
|
47
|
+
O as DropdownMenuItem,
|
|
48
48
|
V as DropdownMenuTrigger,
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
R as EditorButton,
|
|
50
|
+
Z as EmbeddedFieldStringInputFromEntity,
|
|
51
51
|
k as EmbeddedFieldStringInputFromOptions,
|
|
52
52
|
w as EntityField,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
N as
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
J as
|
|
69
|
-
ee as
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
te as
|
|
73
|
-
oe as
|
|
74
|
-
re as
|
|
75
|
-
ne as
|
|
76
|
-
ie as
|
|
77
|
-
le as
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
pe as
|
|
81
|
-
|
|
82
|
-
ge as
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
Te as
|
|
86
|
-
|
|
87
|
-
Ce as
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
};
|