pagepilot-visual-editor 1.0.9 → 1.0.11
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 +16 -1
- package/dist/blocks-internal/block-button/src/index.d.ts +44 -10
- package/dist/blocks-internal/block-button-group/src/index.d.ts +6 -6
- package/dist/blocks-internal/block-columns-container/src/index.d.ts +6 -6
- package/dist/blocks-internal/block-container/src/index.d.ts +34 -8
- package/dist/blocks-internal/block-grid/src/index.d.ts +1 -1
- package/dist/blocks-internal/block-heading/src/index.d.ts +8 -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 +62 -3
- package/dist/blocks-internal/block-list/src/index.d.ts +5 -5
- package/dist/blocks-internal/block-logo/src/index.d.ts +43 -2
- package/dist/blocks-internal/block-stepper/src/index.d.ts +4 -4
- package/dist/blocks-internal/block-text/src/index.d.ts +5 -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 -68
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/AvatarSidebarPanel.d.ts +1 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/EmailLayoutSidebarPanel.d.ts +3 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/MenuPickerSidebarPanel.d.ts +1 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/AnimationSection.d.ts +18 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/BoxShadowControls.d.ts +19 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/HoverEffectSection.d.ts +16 -0
- package/dist/editor-sample/App/InspectorDrawer/LayersPanelStyles.d.ts +2 -2
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/templateApplyHelpers.d.ts +2 -39
- package/dist/editor-sample/App/TemplatePanel/minimap/MiniMapFrame.d.ts +4 -2
- package/dist/editor-sample/App/shared/editor.styles.d.ts +3 -3
- package/dist/editor-sample/documents/blocks/Avatar/AvatarPropsSchema.d.ts +3 -0
- package/dist/editor-sample/documents/blocks/ButtonGroup/ButtonGroupPropsSchema.d.ts +6 -6
- package/dist/editor-sample/documents/blocks/ColumnsContainer/ColumnsContainerPropsSchema.d.ts +6 -6
- package/dist/editor-sample/documents/blocks/Container/ContainerPropsSchema.d.ts +53 -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 +4 -3
- 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/TabsBlock/TabsBlockPropsSchema.d.ts +3 -3
- package/dist/editor-sample/documents/blocks/Timer/TimerPropsSchema.d.ts +1 -0
- package/dist/editor-sample/documents/blocks/Timer/variants/CircularProgressView.d.ts +2 -1
- package/dist/editor-sample/documents/blocks/Timer/variants/DigitalFlipView.d.ts +2 -1
- package/dist/editor-sample/documents/blocks/helpers/TStyle.d.ts +1 -0
- package/dist/editor-sample/documents/blocks/helpers/responsiveStyle.d.ts +1 -1
- package/dist/editor-sample/documents/blocks/helpers/zod.d.ts +3 -3
- package/dist/editor-sample/documents/editor/EditorContext.d.ts +3 -3
- package/dist/editor-sample/documents/editor/core.d.ts +266 -94
- 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/ButtonGroup/ButtonGroupPropsSchema.d.ts +6 -6
- package/dist/email-builder-core/blocks/Calendly/CalendlyPropsSchema.d.ts +2 -2
- package/dist/email-builder-core/blocks/ColumnsContainer/ColumnsContainerPropsSchema.d.ts +6 -6
- package/dist/email-builder-core/blocks/Container/ContainerPropsSchema.d.ts +53 -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 +7 -0
- 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 +6 -6
- package/dist/email-builder-core/blocks/MenuPicker/MenuReader.d.ts +7 -1
- 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/email-builder-core/blocks/TabsBlock/TabsBlockPropsSchema.d.ts +3 -3
- package/dist/email-builder-core/blocks/Timer/TimerPropsSchema.d.ts +1 -0
- package/dist/email-builder-core/blocks/Timer/variants/CircularProgressView.d.ts +2 -1
- package/dist/email-builder-core/blocks/Timer/variants/DigitalFlipView.d.ts +2 -1
- package/dist/email-builder-core/blocks/animationSchema.d.ts +32 -0
- package/dist/email-builder-core/blocks/boxShadowSchema.d.ts +23 -0
- package/dist/email-builder-core/blocks/hoverEffectSchema.d.ts +20 -0
- package/dist/email-builder-core/helpers/templateVariables.d.ts +2 -14
- package/dist/email-builder-core/renderers/animationCss.d.ts +18 -0
- package/dist/email-builder-core/renderers/pageScripts.d.ts +10 -0
- package/dist/host-stubs/style/menu.styled.d.ts +10 -1
- package/dist/index.cjs +394 -244
- package/dist/index.js +27144 -25729
- 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 +873 -0
- package/dist/render.d.ts +4 -0
- package/dist/render.js +15409 -0
- package/dist/renderToStaticHtml.d.ts +1 -1
- package/package.json +11 -3
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Per-block box-shadow config (see block-button, block-container, block-image,
|
|
4
|
+
* block-logo index.tsx render paths and their sidebar panels). Container puts
|
|
5
|
+
* `boxShadow` under `style`; Image/Button/Logo put it under `props`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const BOX_SHADOW_SCHEMA: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
8
|
+
color: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
9
|
+
offsetX: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
10
|
+
offsetY: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
11
|
+
blur: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
12
|
+
spread: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
13
|
+
inset: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
14
|
+
}, z.core.$strip>>>;
|
|
15
|
+
export type TBoxShadow = z.infer<typeof BOX_SHADOW_SCHEMA>;
|
|
16
|
+
/** Strip out the color part of a CSS gradient so the shadow renders as a
|
|
17
|
+
* solid colour — `box-shadow` doesn't support gradients. */
|
|
18
|
+
export declare function resolveShadowColor(color: string): string;
|
|
19
|
+
/** Compose `boxShadow`-style props into an inline-style object suitable for
|
|
20
|
+
* spreading. Returns `{}` when the shadow has no color (treated as disabled). */
|
|
21
|
+
export declare function getBoxShadowStyle(boxShadow: TBoxShadow): {
|
|
22
|
+
boxShadow?: string;
|
|
23
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Per-block CSS `:hover` scale/transition config (see block-container,
|
|
4
|
+
* block-image render paths and HoverEffectSection.tsx sidebar UI).
|
|
5
|
+
* Distinct from AnimationSection's trigger-based keyframe animations —
|
|
6
|
+
* this is a plain `:hover { transform: scale(x); }` transition.
|
|
7
|
+
*/
|
|
8
|
+
export declare const HOVER_EFFECT_SCHEMA: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
9
|
+
enabled: z.ZodBoolean;
|
|
10
|
+
scale: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
11
|
+
duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
12
|
+
easing: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
ease: "ease";
|
|
14
|
+
"ease-in": "ease-in";
|
|
15
|
+
"ease-in-out": "ease-in-out";
|
|
16
|
+
"ease-out": "ease-out";
|
|
17
|
+
linear: "linear";
|
|
18
|
+
}>>>;
|
|
19
|
+
}, z.core.$strip>>>;
|
|
20
|
+
export type THoverEffect = z.infer<typeof HOVER_EFFECT_SCHEMA>;
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type TemplateFormType
|
|
3
|
-
export type TemplateArrayRow = Record<string, string>;
|
|
4
|
-
export type TemplateFormField = {
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
type?: TemplateFormType;
|
|
8
|
-
defaultValue?: string;
|
|
9
|
-
fields?: TemplateFormField[];
|
|
10
|
-
};
|
|
11
|
-
/** Identity transform — return the block's text as-is. */
|
|
12
|
-
export declare function substituteBlockText<T>(text: T, _forms?: unknown, _row?: unknown): T;
|
|
13
|
-
/** Empty row index — no array-repeat substitution. */
|
|
14
|
-
export declare function buildRepeatRowIndex(_document: unknown, _forms: TemplateFormField[]): Map<string, TemplateArrayRow>;
|
|
1
|
+
export { substituteBlockText, buildRepeatRowIndex, } from '../../render-core/templateBaking';
|
|
2
|
+
export type { TemplateScalarType, TemplateFormType, TemplateArrayRow, TemplateFormField, } from '../../render-core/templateBaking';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared keyframes + trigger rules for the per-block animation (see the
|
|
3
|
+
* `props.animation` field on Image, Container, Button, Logo, Avatar; the
|
|
4
|
+
* `data-animate-*` attributes emitted from Reader/core.tsx; and the
|
|
5
|
+
* `buildAnimationScript()` runtime in ./pageScripts.ts).
|
|
6
|
+
*
|
|
7
|
+
* `transform`/`opacity` only — no layout properties — so animating never
|
|
8
|
+
* causes reflow or content shift. Speed/delay are applied inline by the
|
|
9
|
+
* runtime script via animation-duration/animation-delay, so these rules
|
|
10
|
+
* only define the motion itself, not its timing.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ANIMATION_TYPES: readonly ["fade-in", "slide-left", "slide-right", "slide-up", "slide-down", "zoom-in", "bounce"];
|
|
13
|
+
export type TAnimationType = (typeof ANIMATION_TYPES)[number];
|
|
14
|
+
export declare const ANIMATION_SPEED_SECONDS: Record<'slow' | 'medium' | 'fast', number>;
|
|
15
|
+
/** Just the @keyframes — reused by both the published page CSS below and the
|
|
16
|
+
* editor canvas's one-off Preview button (see AnimationSection.tsx). */
|
|
17
|
+
export declare const animationKeyframesCss: string;
|
|
18
|
+
export declare const animationCss: string;
|
|
@@ -4,12 +4,22 @@ export declare const hasDemoBlock: (document: TReaderDocument) => boolean;
|
|
|
4
4
|
export declare const hasCarouselBlock: (document: TReaderDocument) => boolean;
|
|
5
5
|
export declare const hasPaginationBlock: (document: TReaderDocument) => boolean;
|
|
6
6
|
export declare const hasTimerBlock: (document: TReaderDocument) => boolean;
|
|
7
|
+
export declare const hasAnimatedBlock: (document: TReaderDocument) => boolean;
|
|
7
8
|
export declare const PAGE_PILOT_SCRIPTS_BASE_URL = "https://pagepilot.fabbuilder.com/scripts";
|
|
8
9
|
export declare const TABS_SCRIPT_URL = "https://pagepilot.fabbuilder.com/scripts/pagePilotTabs.js";
|
|
9
10
|
export declare const CAROUSEL_SCRIPT_URL = "https://pagepilot.fabbuilder.com/scripts/pagePilotCarousel.js";
|
|
10
11
|
export declare const PAGINATION_SCRIPT_URL = "https://pagepilot.fabbuilder.com/scripts/pagePilotPagination.js";
|
|
11
12
|
export declare const DEMO_SCALE_SCRIPT_URL = "https://pagepilot.fabbuilder.com/scripts/pagePilotDemoScale.js";
|
|
12
13
|
export declare const TIMER_SCRIPT_URL = "https://pagepilot.fabbuilder.com/scripts/pagePilotTimer.js";
|
|
14
|
+
export declare const ANIMATION_SCRIPT_URL = "https://pagepilot.fabbuilder.com/scripts/pagePilotAnimation.js";
|
|
15
|
+
/**
|
|
16
|
+
* The per-page runtime that reads the `data-animate-*` attributes emitted by
|
|
17
|
+
* Reader/core.tsx and drives the CSS animation (see animationCss.ts). Ported
|
|
18
|
+
* verbatim from ahd-fe's `public/scripts/pagePilotAnimation.js` and inlined
|
|
19
|
+
* here because pagepilot-visual-editor is a standalone library — it ships
|
|
20
|
+
* self-contained pages, not a hosted app with a public CDN.
|
|
21
|
+
*/
|
|
22
|
+
export declare const buildAnimationScript: () => string;
|
|
13
23
|
export declare const buildDemoScaleJs: () => string;
|
|
14
24
|
export declare const buildTabsScript: () => string;
|
|
15
25
|
export declare const buildCarouselScript: () => string;
|
|
@@ -16,7 +16,16 @@ export declare const menuNav: (backgroundColor: string, position: string, hasSlo
|
|
|
16
16
|
export declare const menuSlot: (align: "start" | "center" | "end", isCenter?: boolean) => CSSProperties;
|
|
17
17
|
export declare const menuList: (orientation: string, level: number, gap: string) => CSSProperties;
|
|
18
18
|
export declare const menuListItem: CSSProperties;
|
|
19
|
-
export
|
|
19
|
+
export type MenuItemStyleOverride = {
|
|
20
|
+
textColor?: string | null;
|
|
21
|
+
backgroundColor?: string | null;
|
|
22
|
+
fontWeight?: string | null;
|
|
23
|
+
borderColor?: string | null;
|
|
24
|
+
borderWidth?: number | null;
|
|
25
|
+
borderRadius?: number | null;
|
|
26
|
+
padding?: string | null;
|
|
27
|
+
};
|
|
28
|
+
export declare const menuLink: (showIcons: boolean, hasIcon: boolean, textColor: string, fontSize: string, fontWeight: string, padding: string, fontFamily?: string, itemOverride?: MenuItemStyleOverride) => CSSProperties;
|
|
20
29
|
export declare const menuIcon: (iconSize: string) => CSSProperties;
|
|
21
30
|
export declare const menuChildrenWrapper: (level: number) => CSSProperties;
|
|
22
31
|
export declare const menuToggleInput: CSSProperties;
|