pagepilot-visual-editor 1.0.8 → 1.0.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/README.md +105 -1
- package/dist/blocks-internal/block-button/src/index.d.ts +10 -10
- package/dist/blocks-internal/block-columns-container/src/index.d.ts +3 -3
- package/dist/blocks-internal/block-container/src/index.d.ts +8 -8
- package/dist/blocks-internal/block-grid/src/index.d.ts +1 -1
- package/dist/blocks-internal/block-heading/src/index.d.ts +7 -7
- package/dist/blocks-internal/block-html/src/index.d.ts +2 -2
- package/dist/blocks-internal/block-iframe/src/index.d.ts +2 -2
- package/dist/blocks-internal/block-image/src/index.d.ts +3 -3
- package/dist/blocks-internal/block-list/src/index.d.ts +6 -6
- package/dist/blocks-internal/block-logo/src/index.d.ts +2 -2
- package/dist/blocks-internal/block-stepper/src/index.d.ts +5 -5
- package/dist/blocks-internal/block-text/src/index.d.ts +4 -4
- package/dist/blocks-internal/block-video/src/index.d.ts +3 -3
- package/dist/blocks-internal/block-youtube-url/src/index.d.ts +3 -3
- package/dist/editor/renderSections.d.ts +2 -0
- package/dist/editor-sample/App/InspectorDrawer/LayersPanelStyles.d.ts +2 -2
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/templateApplyHelpers.d.ts +2 -14
- package/dist/editor-sample/App/shared/editor.styles.d.ts +3 -3
- package/dist/editor-sample/documents/blocks/ColumnsContainer/ColumnsContainerPropsSchema.d.ts +3 -3
- package/dist/editor-sample/documents/blocks/Container/ContainerPropsSchema.d.ts +8 -8
- package/dist/editor-sample/documents/blocks/DemoPicker/DemoPropsSchema.d.ts +2 -2
- package/dist/editor-sample/documents/blocks/EmailLayout/EmailLayoutPropsSchema.d.ts +3 -3
- package/dist/editor-sample/documents/blocks/FormsPicker/FormsPropsSchema.d.ts +2 -2
- package/dist/editor-sample/documents/blocks/Grid/GridPropsSchema.d.ts +3 -3
- package/dist/editor-sample/documents/blocks/Marquee/MarqueePropsSchema.d.ts +2 -2
- package/dist/editor-sample/documents/blocks/MenuPicker/MenuPropsSchema.d.ts +2 -2
- package/dist/editor-sample/documents/blocks/PricingAccordion/PricingAccordionPropsSchema.d.ts +2 -2
- package/dist/editor-sample/documents/blocks/Rating/RatingPropsSchema.d.ts +2 -2
- package/dist/editor-sample/documents/blocks/helpers/zod.d.ts +3 -3
- package/dist/editor-sample/documents/editor/EditorContext.d.ts +2 -2
- package/dist/editor-sample/documents/editor/core.d.ts +85 -85
- package/dist/editor-sample/documents/editor/templateVariables.d.ts +4 -75
- package/dist/email-builder-core/blocks/AccessibilityTools/AccessibilityToolsPropsSchema.d.ts +3 -3
- package/dist/email-builder-core/blocks/Calendly/CalendlyPropsSchema.d.ts +2 -2
- package/dist/email-builder-core/blocks/ColumnsContainer/ColumnsContainerPropsSchema.d.ts +3 -3
- package/dist/email-builder-core/blocks/Container/ContainerPropsSchema.d.ts +8 -8
- package/dist/email-builder-core/blocks/DemoPicker/DemoPropsSchema.d.ts +2 -2
- package/dist/email-builder-core/blocks/EmailLayout/EmailLayoutPropsSchema.d.ts +5 -5
- package/dist/email-builder-core/blocks/EmailLayout/EmailLayoutReader.d.ts +1 -1
- package/dist/email-builder-core/blocks/FlexColumns/FlexColumnsPropsSchema.d.ts +2 -2
- package/dist/email-builder-core/blocks/FormsPicker/FormsPropsSchema.d.ts +2 -2
- package/dist/email-builder-core/blocks/Grid/GridPropsSchema.d.ts +3 -3
- package/dist/email-builder-core/blocks/Marquee/MarqueePropsSchema.d.ts +2 -2
- package/dist/email-builder-core/blocks/MenuPicker/MenuPropsSchema.d.ts +4 -4
- package/dist/email-builder-core/blocks/Pagination/PaginationPropsSchema.d.ts +5 -5
- package/dist/email-builder-core/blocks/PricingAccordion/PricingAccordionPropsSchema.d.ts +2 -2
- package/dist/email-builder-core/blocks/Rating/RatingPropsSchema.d.ts +2 -2
- package/dist/email-builder-core/blocks/SkipLink/SkipLinkPropsSchema.d.ts +2 -2
- package/dist/email-builder-core/blocks/Table/TablePropsSchema.d.ts +2 -2
- package/dist/index.cjs +225 -221
- package/dist/index.d.ts +2 -0
- package/dist/index.js +15913 -15530
- package/dist/render-core/collectSubtreeIds.d.ts +1 -0
- package/dist/render-core/combineSections.d.ts +37 -0
- package/dist/render-core/stubs/editorContext.d.ts +10 -0
- package/dist/render-core/stubs/usePreviewScreen.d.ts +7 -0
- package/dist/render-core/templateBaking.d.ts +35 -0
- package/dist/render-core/templateEnvelope.d.ts +11 -0
- package/dist/render.cjs +726 -0
- package/dist/render.d.ts +4 -0
- package/dist/render.js +15085 -0
- package/dist/renderToStaticHtml.d.ts +107 -0
- package/package.json +11 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function collectSubtreeIds(documentTree: Record<string, any>, rootId: string): string[];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface SectionForRender {
|
|
2
|
+
sectionType?: 'internal' | 'external' | string;
|
|
3
|
+
content?: string;
|
|
4
|
+
contentMetadata?: {
|
|
5
|
+
document?: any;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export interface RenderDocumentForSaveOptions {
|
|
11
|
+
rootBlockId?: string;
|
|
12
|
+
injectTabsScrollSyncScript?: boolean;
|
|
13
|
+
injectCarouselScript?: boolean;
|
|
14
|
+
injectFontAssets?: boolean;
|
|
15
|
+
headHtml?: string;
|
|
16
|
+
bodyBottomHtml?: string;
|
|
17
|
+
isBanner?: boolean;
|
|
18
|
+
seo?: any;
|
|
19
|
+
}
|
|
20
|
+
export declare function isExternalSection(section: SectionForRender | undefined): boolean;
|
|
21
|
+
export declare function renderDocumentForSave(document: any, options?: RenderDocumentForSaveOptions): string;
|
|
22
|
+
export interface CombineSectionsOptions extends RenderDocumentForSaveOptions {
|
|
23
|
+
includeExternalSections?: boolean;
|
|
24
|
+
wrapInDocumentShell?: boolean;
|
|
25
|
+
lang?: string;
|
|
26
|
+
canvasColor?: string;
|
|
27
|
+
fontFamily?: string;
|
|
28
|
+
seoTitle?: string;
|
|
29
|
+
seoDescription?: string;
|
|
30
|
+
extraHead?: string;
|
|
31
|
+
extraBodyBottom?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function combineSectionsToHtml(sections: SectionForRender[], options?: CombineSectionsOptions): {
|
|
34
|
+
html: string;
|
|
35
|
+
sectionHtml: string[];
|
|
36
|
+
flushedSections: SectionForRender[];
|
|
37
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Reader-side view of `currentRecordType`. Always `null` at render time. */
|
|
2
|
+
export declare function useCurrentRecordType(): string | null;
|
|
3
|
+
/**
|
|
4
|
+
* Reader-side view of `selectedScreenSize`. Static "desktop" — the render
|
|
5
|
+
* bundle has no interactive device switcher, and desktop styles are the
|
|
6
|
+
* canonical layout the published HTML ships with.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useSelectedScreenSize(): 'desktop' | 'mobile' | 'tablet';
|
|
9
|
+
/** No-op setter — never invoked at render time. */
|
|
10
|
+
export declare function setSelectedMainTab(_next: string): void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type TemplateScalarType = 'text' | 'textarea' | 'number' | 'image';
|
|
2
|
+
export type TemplateFormType = TemplateScalarType | 'array';
|
|
3
|
+
export type TemplateItemFieldDef = {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type?: TemplateScalarType;
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
};
|
|
9
|
+
export type TemplateArrayRow = Record<string, string>;
|
|
10
|
+
export type TemplateFormField = {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
type: TemplateFormType;
|
|
14
|
+
value?: string | TemplateArrayRow[];
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
itemFields?: TemplateItemFieldDef[];
|
|
17
|
+
sourceBlockId?: string;
|
|
18
|
+
rowIds?: string[];
|
|
19
|
+
containerId?: string;
|
|
20
|
+
repeatable?: boolean;
|
|
21
|
+
templateId?: string;
|
|
22
|
+
dataSource?: {
|
|
23
|
+
type: 'custom' | 'custom-json' | 'api' | 'menu';
|
|
24
|
+
customJson?: string;
|
|
25
|
+
apiUrl?: string;
|
|
26
|
+
apiMethod?: 'GET' | 'POST';
|
|
27
|
+
menuId?: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare function buildRepeatRowIndex(document: any | null | undefined, fields: TemplateFormField[] | null | undefined): Map<string, TemplateArrayRow>;
|
|
31
|
+
export declare function getTextFieldsForType(type: string | undefined): string[] | undefined;
|
|
32
|
+
export declare function getTemplateForms(document: any | null | undefined): TemplateFormField[];
|
|
33
|
+
export declare function applyVariables(input: string | null | undefined, fields: TemplateFormField[] | null | undefined, rowContext?: TemplateArrayRow | null): string;
|
|
34
|
+
export declare function substituteBlockText(block: any, fields: TemplateFormField[] | null | undefined, rowContext?: TemplateArrayRow | null): any;
|
|
35
|
+
export declare function bakeTemplateValues<T = any>(document: T, fields: TemplateFormField[] | null | undefined): T;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locate the `formFields[]` array on an incoming template record no matter
|
|
3
|
+
* where it's stored. See editor copy for the full envelope catalogue.
|
|
4
|
+
*/
|
|
5
|
+
export declare function resolveTemplateFormFields(templateRecord: any): any[];
|
|
6
|
+
/**
|
|
7
|
+
* Unwrap a saved template `configuration` down to the raw
|
|
8
|
+
* `{ root, "block-…" }` document tree the renderer / editor expect. See
|
|
9
|
+
* editor copy for the full envelope catalogue.
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolveTemplateDocument(templateRecord: any): any | null;
|