efficient-web-builder 47.2.0 → 48.1.0
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/CHANGELOG.md +54 -0
- package/dist/editor/components/HeroPartPanel.js +1 -1
- package/dist/editor/components/HoverEffectField.d.ts +1 -0
- package/dist/editor/components/HoverEffectField.js +1 -1
- package/dist/editor/components/MediaUploadField.d.ts +9 -0
- package/dist/editor/components/MediaUploadField.js +1 -1
- package/dist/editor/components/PartSettingsPanel.d.ts +2 -1
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/PreviewPartAnchors.d.ts +3 -1
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/components/SameInEveryViewNote.d.ts +1 -0
- package/dist/editor/components/SameInEveryViewNote.js +1 -0
- package/dist/editor/components/SaveAsTemplateButton.d.ts +5 -0
- package/dist/editor/components/SaveAsTemplateButton.js +1 -0
- package/dist/editor/components/SectionIcon.js +1 -1
- package/dist/editor/components/SiteFields.d.ts +4 -1
- package/dist/editor/components/SiteFields.js +1 -1
- package/dist/editor/components/SiteRestoreNotice.js +1 -1
- package/dist/editor/components/SiteTextStylesField.js +1 -1
- package/dist/editor/components/TickerSettingsPanel.js +1 -1
- package/dist/editor/components/VersionHistoryDrawer.js +1 -1
- package/dist/editor/components/WebsitePreviewButton.d.ts +2 -1
- package/dist/editor/components/WebsitePreviewButton.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/usePartMotion.d.ts +10 -0
- package/dist/editor/components/usePartMotion.js +1 -0
- package/dist/editor/components/useSocialSettings.d.ts +2 -2
- package/dist/editor/lib/animation/AnimationDurationRow.js +1 -1
- package/dist/editor/lib/animation/fields.d.ts +1 -1
- package/dist/editor/lib/animation/fields.js +1 -1
- package/dist/editor/lib/animation/hover-fields.d.ts +1 -0
- package/dist/editor/lib/animation/hover-fields.js +1 -0
- package/dist/editor/lib/document/add-target.d.ts +2 -1
- package/dist/editor/lib/document/add-target.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Contents/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/general/Contents/fields.js +1 -0
- package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/blocks/general/index.js +1 -1
- package/dist/editor/lib/document/build-config.js +1 -1
- package/dist/editor/lib/document/canvas-typing.d.ts +1 -0
- package/dist/editor/lib/document/canvas-typing.js +1 -1
- package/dist/editor/lib/document/card-display-chips.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +7 -3
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/geocode-resolve.d.ts +1 -0
- package/dist/editor/lib/document/geocode-resolve.js +1 -1
- package/dist/editor/lib/document/overrides.js +1 -1
- package/dist/editor/lib/document/page-root.js +2 -2
- package/dist/editor/lib/document/part-motion-canvas.d.ts +9 -0
- package/dist/editor/lib/document/part-motion-canvas.js +1 -0
- package/dist/format/lib/animation/hover.d.ts +5 -0
- package/dist/format/lib/animation/hover.js +1 -0
- package/dist/format/lib/content/anchor-name.d.ts +2 -0
- package/dist/format/lib/content/anchor-name.js +1 -0
- package/dist/format/lib/content/box-layout.d.ts +8 -0
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-link.js +1 -1
- package/dist/format/lib/content/box-separator.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +8 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/container-gap.d.ts +2 -1
- package/dist/format/lib/content/container-gap.js +1 -1
- package/dist/format/lib/content/list-number.d.ts +1 -0
- package/dist/format/lib/content/list-number.js +1 -0
- package/dist/format/lib/content/section-min-height.d.ts +3 -2
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/content/section-sticky.js +1 -1
- package/dist/format/lib/content/sticky-aside.d.ts +2 -0
- package/dist/format/lib/content/sticky-aside.js +1 -0
- package/dist/format/lib/document/blocks/general/Contents/meta.d.ts +5 -0
- package/dist/format/lib/document/blocks/general/Contents/meta.js +1 -0
- package/dist/format/lib/document/blocks/general/metas.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/metas.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +10 -0
- package/dist/format/lib/document/container-blocks.js +1 -1
- package/dist/format/lib/document/easel-row-words.d.ts +1 -0
- package/dist/format/lib/document/easel-row-words.js +1 -1
- package/dist/format/lib/document/general-order.d.ts +1 -1
- package/dist/format/lib/document/general-order.js +1 -1
- package/dist/format/lib/document/panel-tabs.d.ts +8 -0
- package/dist/format/lib/document/panel-tabs.js +1 -0
- package/dist/format/lib/document/part-records.d.ts +6 -0
- package/dist/format/lib/document/part-records.js +1 -0
- package/dist/format/lib/document/passes/registry-context.d.ts +1 -1
- package/dist/format/lib/document/passes/registry-context.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +2 -0
- package/dist/format/lib/document/section-groups.d.ts +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +6 -0
- package/dist/format/lib/editor-words-catalogue.js +3 -3
- package/dist/format/lib/hero-ticker.d.ts +1 -0
- package/dist/format/lib/hero-ticker.js +1 -1
- package/dist/format/lib/links/page-link-rules.js +1 -1
- package/dist/format/lib/sections/contents-text-regions.d.ts +3 -0
- package/dist/format/lib/sections/contents-text-regions.js +1 -0
- package/dist/format/lib/sections/section-text-regions.js +1 -1
- package/dist/format/lib/sections/strip-shape.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +3 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/ContentsList.d.ts +14 -0
- package/dist/render/components/ContentsList.js +1 -0
- package/dist/render/components/DocBody.d.ts +18 -0
- package/dist/render/components/DocBody.js +5 -5
- package/dist/render/components/FAQ.js +1 -1
- package/dist/render/components/Flex.d.ts +3 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Grid.d.ts +2 -1
- package/dist/render/components/Grid.js +1 -1
- package/dist/render/components/HeroGroup.d.ts +2 -1
- package/dist/render/components/HeroGroup.js +1 -1
- package/dist/render/components/HeroSection.d.ts +2 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.d.ts +2 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/PageContentsContext.d.ts +14 -0
- package/dist/render/components/PageContentsContext.js +1 -0
- package/dist/render/components/PartStyledKind.js +1 -1
- package/dist/render/components/PartStyledText.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.d.ts +4 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/components/Reel.js +1 -1
- package/dist/render/components/SectionAnimation.d.ts +10 -3
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/Text.d.ts +2 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/components/Timeline.js +1 -1
- package/dist/render/components/goldPhrases.d.ts +1 -1
- package/dist/render/components/goldPhrases.js +2 -2
- package/dist/render/lib/animation/entrance.d.ts +1 -0
- package/dist/render/lib/animation/entrance.js +1 -1
- package/dist/render/lib/animation/part-motion.d.ts +25 -0
- package/dist/render/lib/animation/part-motion.js +2 -0
- package/dist/render/lib/content/button-look.js +1 -1
- package/dist/render/lib/content/page-contents.d.ts +17 -0
- package/dist/render/lib/content/page-contents.js +1 -0
- package/dist/render/lib/document/blocks/general/Contents/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/Contents/render.js +1 -0
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Grid/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroGroup/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
- package/dist/render/lib/document/blocks/general/renders.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/renders.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +3 -0
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-docbody.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-docbody.js +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/hero-media-parts.d.ts +2 -2
- package/dist/render/lib/document/page-render.js +1 -1
- package/dist/render/lib/document/part-styles.d.ts +10 -1
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/clickable-parts.js +1 -1
- package/dist/render/lib/document/passes/section-anchor.d.ts +1 -0
- package/dist/render/lib/document/passes/section-anchor.js +1 -1
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +1 -0
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.d.ts +16 -4
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/package.json +3 -3
- package/dist/editor/lib/document/selected-host.d.ts +0 -2
- package/dist/editor/lib/document/selected-host.js +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type AnimationTabKind } from "../lib/animation/fields.js";
|
|
2
|
+
export type PartMotionRows = {
|
|
3
|
+
part: string;
|
|
4
|
+
fields: Record<string, unknown>;
|
|
5
|
+
values: Record<string, unknown>;
|
|
6
|
+
keys: ReadonlySet<string>;
|
|
7
|
+
onChange: (key: string, value: unknown) => void;
|
|
8
|
+
};
|
|
9
|
+
export type PartMotionKind = Extract<AnimationTabKind, "textPart" | "block">;
|
|
10
|
+
export declare function usePartMotion(nodeId: string, part: string, kind: PartMotionKind): PartMotionRows;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useMemo as O}from"react";import{useEasel as w}from"efficient-easel/easel";import{useSectionOps as E}from"efficient-easel/screen/lib/document/use-section-ops";import{animationTabFields as P}from"../lib/animation/fields.js";import{PART_MOTION_KEYS as c,propsWithPartMotion as x,readPartMotion as y}from"../../render/lib/animation/part-motion.js";import{assignSectionGroups as K}from"../lib/document/field-groups.js";const i=new Map,T=o=>{let t=i.get(o);return t||i.set(o,t=K(P(o),`part:${o}`)),t},b=new Set(c);function R(o,t,m){const{getItemById:n,getSelectorForId:a}=w(e=>e),f=E(),u=n(o)?.props??{},p=y(u,t),l=JSON.stringify(p),S=O(()=>Object.fromEntries(c.map(e=>[e,p[e]])),[l]);return{part:t,fields:T(m),values:S,keys:b,onChange:(e,g)=>{const r=a(o),s=n(o);if(!r||!s)return;const M=x(s.props??{},t,e,g);f.replaceComponent(r.zone,r.index,{...s,props:M})}}}export{R as usePartMotion};
|
|
@@ -7,8 +7,8 @@ export declare function useSocialSettings({ token, siteId, enabled, }: {
|
|
|
7
7
|
siteId: string | null;
|
|
8
8
|
enabled: boolean;
|
|
9
9
|
}): {
|
|
10
|
-
links: Partial<Record<"facebook" | "instagram" | "pinterest" | "telegram" | "tiktok" | "whatsapp" | "youtube" | "
|
|
11
|
-
rows: Record<"facebook" | "instagram" | "pinterest" | "telegram" | "tiktok" | "whatsapp" | "youtube" | "
|
|
10
|
+
links: Partial<Record<"facebook" | "instagram" | "pinterest" | "telegram" | "tiktok" | "whatsapp" | "youtube" | "line" | "x" | "linkedin" | "wechat", string>>;
|
|
11
|
+
rows: Record<"facebook" | "instagram" | "pinterest" | "telegram" | "tiktok" | "whatsapp" | "youtube" | "line" | "x" | "linkedin" | "wechat", SocialRowState>;
|
|
12
12
|
canSave: boolean;
|
|
13
13
|
saveLink: (platform: SocialPlatform, value: string) => Promise<SocialSaveOutcome>;
|
|
14
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{ClockIcon as m,DurationIcon as p}from"efficient-easel/icons";import{MOTION_TIMING as a}from"efficient-shell/format";import{slider as s}from"../document/box-fields.js";import{useSelectedHost as d}from"
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{ClockIcon as m,DurationIcon as p}from"efficient-easel/icons";import{MOTION_TIMING as a}from"efficient-shell/format";import{slider as s}from"../document/box-fields.js";import{useSelectedHost as d}from"efficient-easel/easel";import{loopDelayOf as c,loopSecondsOf as f}from"../../../format/lib/animation/loop.js";function x(o){const{min:t,max:n,step:r,default:e}=a[o].duration;return s("Duration",i(p,{}),t,n,r,e,"s")}function D(o){const{min:t,max:n,step:r,default:e}=a[o].delay;return s("Delay",i(m,{}),t,n,r,e,"s")}function u(o,t){const n=o.render,r=e=>{const l=d();return n({...e,value:t(e.value,l?.values)})};return{...o,render:e=>i(r,{...e})}}function w({readsSpeed:o}){return u(x("loop"),(t,n)=>f({loopDuration:t,speed:o?n?.speed:void 0}))}function g(){return u(D("loop"),o=>c({loopDelay:o}))}export{D as animationDelayField,x as animationDurationField,g as loopDelayField,w as loopDurationField};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type AnimationTabKind = "section" | "block" | "box" | "marquee";
|
|
1
|
+
export type AnimationTabKind = "section" | "block" | "box" | "marquee" | "textPart";
|
|
2
2
|
export declare function animationTabFields(kind: AnimationTabKind): Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loopDelayField as r,loopDurationField as i}from"./AnimationDurationRow.js";import{entranceFields as
|
|
1
|
+
import{loopDelayField as r,loopDurationField as i}from"./AnimationDurationRow.js";import{entranceFields as e}from"./entrance-fields.js";import{hoverFields as t}from"./hover-fields.js";import{loopDirectionField as l,loopFields as a}from"./loop-fields.js";function m(o){switch(o){case"section":case"block":return e();case"box":return{...e(),...a()};case"textPart":return{...e(),...t()};case"marquee":return{...e(),scrollDirection:l(),loopDuration:i({readsSpeed:!0}),loopDelay:r()}}}export{m as animationTabFields};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function hoverFields(): Record<string, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{HoverIcon as e}from"efficient-easel/icons";import{group as t}from"efficient-easel/screen/lib/document/box-fields";import{HOVER_EFFECT_LABELS as p}from"../../components/HoverEffectField.js";import{segmented as m}from"../document/box-fields.js";import{HOVER_KEY as i,PART_HOVER_KINDS as n}from"../../../format/lib/animation/hover.js";const s="_gHover",E="What this does when a shopper points at it, or taps it on a phone.";function h(){return{[s]:t("Hover"),[i]:{...m("Hover effect",r(e,{}),n.map(o=>({label:p[o],value:o})),"none"),description:E}}}export{h as hoverFields};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { AddTarget } from "efficient-easel/screen/lib/document/add-target-types";
|
|
2
|
-
|
|
2
|
+
import type { ScreenNodeAt } from "efficient-easel/screen/lib/screen-parts";
|
|
3
|
+
export declare function canAddTo(nodeType: string, nestDepth?: number, at?: ScreenNodeAt): AddTarget | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{blockOfferOf as
|
|
1
|
+
import{cardTemplateBlocks as i,cardTemplateOwner as f,cardTemplatesNameBlocks as u}from"../../../format/lib/content/card-template.js";import{blockOfferOf as p}from"./block-offer.js";import{containerBlocksFor as h}from"../../../format/lib/document/container-blocks.js";import{blockChoicesFor as m,FOOTER_BLOCKS_SLOT as a}from"./footer-blocks.js";import{SLOT_SECTION_SPECS as d}from"../../../render/lib/document/slot-specs.js";function _(o,n=0,c){const e=T(y(o,n),c),r=e?p():null;return e&&r?O(e,r):e}function O(o,n){if(o.spec)return n.offers(o.spec.childType)?o:null;const c=o.choices??[],e=c.filter(r=>n.offers(r.type));return e.length===c.length?o:e.length>0?{...o,choices:e}:null}function T(o,n){if(!o||o.source!=="container"||!n||!u())return o;const c=f({data:n.data},n.id),e=typeof c?.type=="string"?i(c.type):[],r=o.choices??[],s=e.filter(t=>!r.some(l=>l.type===t.type));return s.length?{...o,choices:[...r,...s.map(t=>({type:t.type,label:t.label}))]}:o}function y(o,n){const c=d[o];if(c)return{source:"section",slot:c.slot,choices:null,spec:c};const e=h(o,n);if(e)return{source:"container",slot:e.slot,choices:e.choices,spec:null};const r=m(o);return r?{source:"footer",slot:a,choices:r,spec:null}:null}export{_ as canAddTo};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as B}from"react/jsx-runtime";import{ButtonIcon as C,ButtonIconIcon as S,IconAfterTextIcon as T,IconBeforeTextIcon as w}from"efficient-easel/icons";import{SettingsField as k}from"efficient-easel/panel";import{useSelectedFields as m}from"efficient-easel/easel";import{buttonFieldSet as F}from"efficient-easel/screen/lib/document/button-fields";import{IconPicker as v,Segmented as O}from"efficient-shell/ui";import{shellGlyphOf as P}from"../../../shell-glyph.js";import{StorefrontTextLinkField as _}from"../../../../../components/StorefrontLinkField.js";import{usePreviewHeader as a}from"../../../../../../render/components/PreviewHeaderContext.js";import{BUTTON_ICONS as N,buttonIconChoice as R,buttonIconSide as j,buttonWidth as L}from"../../../../../../format/lib/content/button-icon.js";import{BUTTON_PAD_BUILT_IN as W,buttonLook as u}from"../../../../../../render/lib/content/button-look.js";import{nonEmptyString as z}from"../../../../../../format/lib/non-empty-string.js";import{selectedThemeColors as A,siteButtonPaint as d,siteButtonRadiusPx as E}from"../../../../../../format/lib/theme.js";import{say as r}from"../../../../../../format/lib/editor-words.js";import{backTo as D,buttonWordsEntryField as U,inOwnBox as G,linkField as H,plainText as K,useSelectedSibling as f}from"../../../controls.js";import{useThemePresets as V}from"../../../ColourControl.js";import{keptByRow as c}from"efficient-easel/screen/lib/document/style-fields";import{group as p}from"efficient-easel/screen/lib/document/box-fields";import{rowSay as q}from"../../../box-fields.js";import{CARD_ROW_FACTS as J,cardRowField as h,cardRowFields as M}from"../../../card-row-fields.js";import{consentWordsKept as Q,withConsentWordsRow as X}from"../../../consent-words-field.js";const b=o=>P(o==="none"?"no-symbol":o),Y=N.map(o=>({value:o,icon:b(o)}));function Z({value:o,onChange:n}){const t=m(),i=t.values.href,s=typeof o=="string"?o:o&&typeof o=="object"&&"text"in o?String(o.text??""):"";return e(_,{label:"Button",icon:e(C,{size:18}),text:s,onTextChange:n,link:typeof i=="string"?i:"",onLinkChange:l=>t.onChange("href",l)})}function $({value:o,onChange:n}){const t=m(),i=R(o,t.values.arrow),s=j(t.values.iconPosition),l=L(t.values.widthFit)==="fill",I=b("icon-at-end");return e(k,{label:r("Icon"),icon:e(S,{size:18}),children:B("div",{className:"flex items-center gap-2",children:[e(v,{label:r("Icon"),value:i,emptyValue:"none",options:Y,onChange:n}),i!=="none"&&e(O,{size:"sm",block:!0,label:r("Icon position"),value:s==="end"&&!l?"after":s,onChange:g=>t.onChange("iconPosition",g),options:[{value:"before",icon:e(w,{size:16}),label:e("span",{className:"sr-only",children:r("Icon before text")}),title:r("Icon before text")},{value:"after",icon:e(T,{size:16}),label:e("span",{className:"sr-only",children:r("Icon after text")}),title:r("Icon after text")},...l?[{value:"end",icon:I,label:e("span",{className:"sr-only",children:r("Icon at the far end")}),title:r("Icon at the far end")}]:[]]})]})})}const x=()=>d(a().theme),y=F({follows:{useFill:()=>x().fill,useText:()=>x().ink,useBorder:()=>{const[o]=f("variant"),[n]=f("buttonColor"),{theme:t}=a(),i=u({variant:o,buttonColor:n}).border.width,s=z(n)??(o==="ghost"?A(t).text:d(t).fill);return{width:i,color:s}},useCorners:()=>E(a().cornerRadiusPx),useFillOpacity:()=>u({variant:f("variant")[0]}).fillOpacity},usePresets:V,resetTo:o=>D(o,r("Styles")),padding:{fallback:W},say:q});function oo(o,n){const t=Object.keys(o);return Object.fromEntries(t.slice(0,t.indexOf(n)+1).map(i=>[i,o[i]]))}const So={fields:{label:G(K("Button"),o=>e(Z,{value:o.value,onChange:o.onChange})),labelText:U("label"),href:{...H("Button link"),...c("label")},consentWords:Q("label"),_gButton:p("Button"),rowField:h("Shows","text"),rowLinkField:h("Link from","link"),...oo(y,"_dDesign"),_gStyle:p("Style"),variant:c("buttonColor"),icon:{type:"custom",render:o=>e($,{value:o.value,onChange:o.onChange})},iconPosition:c("icon"),arrow:c("icon"),...y},resolveFields:(o,n)=>X(M(n.fields,o,n),o.props,"label",["href"]),showWhenFacts:J};export{So as ButtonBlockFields};
|
|
1
|
+
import{jsx as e,jsxs as B}from"react/jsx-runtime";import{ButtonIcon as C,ButtonIconIcon as S,IconAfterTextIcon as T,IconBeforeTextIcon as w}from"efficient-easel/icons";import{SettingsField as k}from"efficient-easel/panel";import{useSelectedFields as m}from"efficient-easel/easel";import{buttonFieldSet as F}from"efficient-easel/screen/lib/document/button-fields";import{IconPicker as v,Segmented as O}from"efficient-shell/ui";import{shellGlyphOf as P}from"../../../shell-glyph.js";import{StorefrontTextLinkField as _}from"../../../../../components/StorefrontLinkField.js";import{usePreviewHeader as a}from"../../../../../../render/components/PreviewHeaderContext.js";import{BUTTON_ICONS as N,buttonIconChoice as R,buttonIconSide as j,buttonWidth as L}from"../../../../../../format/lib/content/button-icon.js";import{BUTTON_PAD_BUILT_IN as W,buttonLook as u}from"../../../../../../render/lib/content/button-look.js";import{nonEmptyString as z}from"../../../../../../format/lib/non-empty-string.js";import{selectedThemeColors as A,siteButtonPaint as d,siteButtonRadiusPx as E}from"../../../../../../format/lib/theme.js";import{say as r}from"../../../../../../format/lib/editor-words.js";import{backTo as D,buttonWordsEntryField as U,inOwnBox as G,linkField as H,plainText as K,useSelectedSibling as f}from"../../../controls.js";import{useThemePresets as V}from"../../../ColourControl.js";import{keptByRow as c}from"efficient-easel/screen/lib/document/style-fields";import{group as p}from"efficient-easel/screen/lib/document/box-fields";import{rowSay as q}from"../../../box-fields.js";import{CARD_ROW_FACTS as J,cardRowField as h,cardRowFields as M}from"../../../card-row-fields.js";import{consentWordsKept as Q,withConsentWordsRow as X}from"../../../consent-words-field.js";const b=o=>P(o==="none"?"no-symbol":o),Y=N.map(o=>({value:o,icon:b(o)}));function Z({value:o,onChange:n}){const t=m(),i=t.values.href,s=typeof o=="string"?o:o&&typeof o=="object"&&"text"in o?String(o.text??""):"";return e(_,{label:"Button",icon:e(C,{size:18}),text:s,onTextChange:n,link:typeof i=="string"?i:"",onLinkChange:l=>t.onChange("href",l)})}function $({value:o,onChange:n}){const t=m(),i=R(o,t.values.arrow),s=j(t.values.iconPosition),l=L(t.values.widthFit)==="fill",I=b("icon-at-end");return e(k,{label:r("Icon"),icon:e(S,{size:18}),children:B("div",{className:"flex items-center gap-2",children:[e(v,{label:r("Icon"),value:i,emptyValue:"none",options:Y,onChange:n}),i!=="none"&&e(O,{size:"sm",block:!0,label:r("Icon position"),value:s==="end"&&!l?"after":s,onChange:g=>t.onChange("iconPosition",g),options:[{value:"before",icon:e(w,{size:16}),label:e("span",{className:"sr-only",children:r("Icon before text")}),title:r("Icon before text")},{value:"after",icon:e(T,{size:16}),label:e("span",{className:"sr-only",children:r("Icon after text")}),title:r("Icon after text")},...l?[{value:"end",icon:I,label:e("span",{className:"sr-only",children:r("Icon at the far end")}),title:r("Icon at the far end")}]:[]]})]})})}const x=()=>d(a().theme),y=F({follows:{useFill:()=>x().fill,useText:()=>x().ink,useBorder:()=>{const[o]=f("variant"),[n]=f("buttonColor"),{theme:t}=a(),i=u({variant:o,buttonColor:n}).border.width,s=z(n)??(o==="ghost"?A(t).text:d(t).fill);return{width:i,color:s}},useCorners:()=>E(a().cornerRadiusPx),useFillOpacity:()=>u({variant:f("variant")[0]}).fillOpacity},usePresets:V,resetTo:o=>D(o,r("Styles")),padding:{fallback:W,tablet:!0},say:q});function oo(o,n){const t=Object.keys(o);return Object.fromEntries(t.slice(0,t.indexOf(n)+1).map(i=>[i,o[i]]))}const So={fields:{label:G(K("Button"),o=>e(Z,{value:o.value,onChange:o.onChange})),labelText:U("label"),href:{...H("Button link"),...c("label")},consentWords:Q("label"),_gButton:p("Button"),rowField:h("Shows","text"),rowLinkField:h("Link from","link"),...oo(y,"_dDesign"),_gStyle:p("Style"),variant:c("buttonColor"),icon:{type:"custom",render:o=>e($,{value:o.value,onChange:o.onChange})},iconPosition:c("icon"),arrow:c("icon"),...y},resolveFields:(o,n)=>X(M(n.fields,o,n),o.props,"label",["href"]),showWhenFacts:J};export{So as ButtonBlockFields};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{StickyIcon as r}from"efficient-easel/icons";import{group as i}from"efficient-easel/screen/lib/document/box-fields";import{SECTION_STICK_LABEL as t}from"../../../../../../format/lib/content/section-sticky.js";import{text as m,toggle as e}from"../../../controls.js";import{CONTENTS_PH as p}from"../../../../../../format/lib/document/blocks/general/Contents/meta.js";const S={fields:{title:m("Heading",p.title),_gStick:i(t),sticky:e(t,!0,o(r,{}))}};export{S as ContentsFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{EyeOffIcon as r,StylesIcon as d,WeightIcon as p,WidthIcon as c}from"efficient-easel/icons";import{deviceField as m}from"efficient-easel/screen/lib/document/device-fields";import{swapPadding as f,toggle as a}from"../../../controls.js";import{keptByRow as g}from"efficient-easel/screen/lib/document/style-fields";import{select as I,sidesPaddingFields as D,slider as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{EyeOffIcon as r,StylesIcon as d,WeightIcon as p,WidthIcon as c}from"efficient-easel/icons";import{deviceField as m}from"efficient-easel/screen/lib/document/device-fields";import{swapPadding as f,toggle as a}from"../../../controls.js";import{keptByRow as g}from"efficient-easel/screen/lib/document/style-fields";import{select as I,sidesPaddingFields as D,slider as t}from"../../../box-fields.js";import{DEFAULT_DIVIDER_STYLE as o,DIVIDER_SPACE_PX as E,DIVIDER_STYLE_OPTIONS as _,parseDividerSpacing as h}from"../../../../../../format/lib/sections/divider-style.js";import{withRowRules as y}from"../../../../../../render/lib/document/show-when.js";const S={any:[{field:"style",set:!1},{field:"style",is:o}]},P={not:{field:"style",is:"none"}},v={fields:y({style:I("Style",e(d,{}),_,o),spacing:g("sectionPaddingTop"),thickness:t("Thickness",e(p,{}),1,8,1,1,"px"),lengthPct:t("Length",e(c,{}),10,100,1,100,"%"),hideOnMobile:m("mobile",a("Hide",!1,e(r,{})))},[[["thickness"],S],[["lengthPct"],P]]),resolveFields:(s,{fields:n})=>{const i=E[h(s.props.spacing)],l=D({fallback:{top:i,bottom:i},tablet:!0});return f(n,l)}};export{v as DividerFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{phoneKey as n}from"efficient-easel/draw";import{BOX_CARD_PAD as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{phoneKey as n,tabletKey as m}from"efficient-easel/draw";import{BOX_CARD_PAD as r,BOX_DARKEN as a,BOX_DARKEN_STYLES as h,isBackgroundBox as R}from"../../../../../../format/lib/content/box-background.js";import{BOX_TAB_SHAPES as y,REEL_SHAPE_LABELS as E}from"../../../../../../format/lib/reel.js";import{deviceField as s}from"efficient-easel/screen/lib/document/device-fields";import{ClockIcon as T,CropIcon as g,LineBetweenIcon as N,LineSolidIcon as C,OpacityIcon as P,ShadowIcon as H,StylesIcon as f,TargetIcon as D}from"efficient-easel/icons";import{boxBlockSpacingField as X,boxFillField as M,boxColumnsFields as W,boxShareField as j,boxSharePhoneField as v,containerDirectionField as K,containerGapRows as U,linkField as G,plainText as z,swapPadding as S,toggle as p,upload as _,withPanelOnly as J}from"../../../controls.js";import{BOX_SHAPE_OPTIONS as u,boxShapeOf as V}from"../../../../../../format/lib/content/box-shape.js";import{BOX_COLUMNS_MAX as Y,BOX_COLUMNS_MIN as q,boxPhoneRowOneLine as Q}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as b}from"../../../../../../format/lib/content/box-separator.js";import{group as i,phoneTwinFields as O}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as Z,boxJustifyField as $,boxWrapField as x,placementField as ee,select as d,sidesPaddingFields as k,slider as oe}from"../../../box-fields.js";import{withRowRules as te}from"../../../../../../render/lib/document/show-when.js";import{separatorField as ne}from"../../../separator-field.js";import{LOOP_SCROLLS as ie}from"../../../../../../format/lib/animation/index.js";import{FlexSlots as ae}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{CARD_BOX_FACTS as le,cardDisplayField as re}from"../../../card-display-chips.js";const se={field:"bgImage",set:!0},A={field:"phoneRow",in:[2,3]},pe={field:"direction",is:"tabs"},de={field:"line",in:[!0,!1]},ce={field:"anchor",set:!0},w=["fixed","screen"],me={not:{any:[{field:"sectionHeightMode",in:w},{field:"sectionHeightModePhone",in:w}]}},he={context:"parent.line",is:!0},c={field:"direction",is:"row",default:"row"},l={not:ie},F={all:[c,l,{not:{field:"separator",in:b.map(e=>e.value)}},{not:{field:"line",is:!0}}]},ge={all:[l,{not:{all:[c,{field:"separator",in:b.map(e=>e.value)}]}}]},I={not:{all:[F,{field:"columns",in:Array.from({length:Y},(e,t)=>t+q)}]}};function fe(e){return{...e,render:t=>e.render({...t,value:Q(t.value)?"nowrap":"wrap"})}}const Ce={fields:te({_gContent:i("Content"),content:ae.content,_gCardDisplay:i("Display"),cardDisplay:re(),_gLayout:i("Layout"),direction:K("Flex"),tabShape:d("Tab shape",o(f,{}),y.map(e=>({label:E[e],value:e})),"tabs"),label:J(z("Tab name")),...U("Flex"),justify:$(),align:Z(),...O("wrap",x(),void 0,{phoneRow:fe(x())}),boxShape:s("desktop",d("Box shape",o(g,{}),[...u],"auto")),[n("boxShape")]:O("boxShape",d("Box shape",o(g,{}),[...u],"auto",{phoneRest:e=>V(e)}))[n("boxShape")],separator:ne(o(N,{size:18}),"none"),share:s("desktop",j()),[n("share")]:v(),...W(),blockSpacing:X(),line:p("Line",!1,o(C,{}),"A line across the blocks, with a dot on each."),upcoming:p("Upcoming",!1,o(T,{}),"Still to come: a hollow dot, and the gold line stops before it."),_gShadow:i("Shadow"),shadow:p("Shadow",!1,o(H,{})),fillColor:M(),_gBackground:i("Background image"),bgImage:s("desktop",_("Image","image/*")),bgImagePhone:s("mobile",_("Image","image/*")),darken:oe("Darken",o(P,{}),a.min,a.max,a.step,a.fallback,a.unit),darkenStyle:d("Darken style",o(f,{}),h,h[0].value),placement:ee("Content position"),_gLink:i("Link"),link:G("Link to"),jumpHighlight:p("Highlight when a link jumps here",!1,o(D,{}),"When a link lands on this Box's anchor, the Box gets an accent outline and its first block turns accent.")},[[["darken","darkenStyle","placement"],se],[[n("share")],A],[[n("wrap")],{all:[A,l]}],[["tabShape"],pe],[["separator"],c],[["columns",m("columns")],F],[[m("gap")],ge],[["justify"],l],[["wrap"],{all:[l,I]}],[["share"],I],[["line"],de],[["upcoming"],he],[["jumpHighlight"],ce],[["boxShape",n("boxShape")],me]]),resolveFields:(e,{fields:t})=>{const L=e.props;if(R(L.bgImage)){const B=k({fallback:{top:r.desktop,bottom:r.desktop,left:r.side,right:r.side},tablet:!0});return S(t,B)}return e.props.padV2!==!0?S(t,k({fallback:{top:24,bottom:24},tablet:!0})):t},showWhenFacts:le};export{Ce as FlexFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{HERO_GROUP_NUDGE_LIMIT as n,HERO_GROUP_WIDTH_DEFAULT as u,HERO_GROUP_WIDTH_MAX as p,HERO_GROUP_WIDTH_MIN as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{HERO_GROUP_NUDGE_LIMIT as n,HERO_GROUP_WIDTH_DEFAULT as u,HERO_GROUP_WIDTH_MAX as p,HERO_GROUP_WIDTH_MIN as l,HERO_GROUP_WIDTH_NESTED_DEFAULT as _,heroGroupNestDepth as f}from"../../../../../../format/lib/hero-group-placement.js";import{WidthIcon as m}from"efficient-easel/icons";import{containerDirectionField as c,containerGapRows as h,heroGroupPlacementPoints as G,plainText as H,withIdentifier as g,withOffPage as R,withPanelOnly as x}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as F,boxJustifyField as O,boxWrapField as P,placementField as D,positionFields as E,sidesPaddingFields as w,slider as s}from"../../../box-fields.js";import{PH as I}from"../../../../../../format/lib/document/blocks/placeholders.js";import{withRowRules as T}from"../../../../../../render/lib/document/show-when.js";import{HeroGroupSlots as y}from"../../../../../../format/lib/document/blocks/general/HeroGroup/meta.js";const S={fields:T({_gContent:o("Content"),name:x(g(R(H("Box name",I.boxName)))),content:y.content,_gLayout:o("Layout"),placement:D("Placement",{pointsFor:G}),width:s("Width",r(m,{}),l,p,5,u,"%"),direction:c("HeroGroup"),...h("HeroGroup"),justify:O(),align:F(),wrap:P(),_gNudge:o("Nudge"),...E({keys:{x:"nudgeX",y:"nudgeY"},min:-n,max:n,label:null}),...w({tablet:!0})},[[["placement"],{context:"heroGroupDepth",is:0}]]),resolveFields:(e,{fields:t,appState:d})=>{const a=typeof e.props.id=="string"?e.props.id:"";if(f(d?.data,a)===0)return t;const i={...t};return i.width=s("Width",r(m,{}),l,p,5,_,"%"),i}};export{S as HeroGroupFields};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const assembleGeneralBlocks: () => Record<"Grid" | "
|
|
2
|
-
export declare const generalBlocks: Record<"Grid" | "
|
|
1
|
+
export declare const assembleGeneralBlocks: () => Record<"Grid" | "HeroGroup" | "HeroSlide" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Heading" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "ButtonBlock" | "PostCard" | "Integrations" | "Contents", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
2
|
+
export declare const generalBlocks: Record<"Grid" | "HeroGroup" | "HeroSlide" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Heading" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "ButtonBlock" | "PostCard" | "Integrations" | "Contents", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{assembleBlocks as o}from"../../../../../format/lib/document/blocks/block-types.js";import{registerGeneralSectionRows as r}from"../../../../../render/lib/document/blocks/general/section-to-box-rows.js";import{BannerFields as e}from"./Banner/fields.js";import{BreadcrumbFields as i}from"./Breadcrumb/fields.js";import{ButtonBlockFields as t}from"./ButtonBlock/fields.js";import{CardsFields as m}from"./Cards/fields.js";import{CategoryBarFields as s}from"./CategoryBar/fields.js";import{ChartFields as d}from"./Chart/fields.js";import{ContactLocationsFields as l}from"./ContactLocations/fields.js";import{CountdownFields as a}from"./Countdown/fields.js";import{CustomHTMLFields as p}from"../../../../../format/lib/document/blocks/general/CustomHTML/fields.js";import{DividerFields as F}from"./Divider/fields.js";import{
|
|
1
|
+
import{assembleBlocks as o}from"../../../../../format/lib/document/blocks/block-types.js";import{registerGeneralSectionRows as r}from"../../../../../render/lib/document/blocks/general/section-to-box-rows.js";import{BannerFields as e}from"./Banner/fields.js";import{BreadcrumbFields as i}from"./Breadcrumb/fields.js";import{ButtonBlockFields as t}from"./ButtonBlock/fields.js";import{CardsFields as m}from"./Cards/fields.js";import{CategoryBarFields as s}from"./CategoryBar/fields.js";import{ChartFields as d}from"./Chart/fields.js";import{ContactLocationsFields as l}from"./ContactLocations/fields.js";import{CountdownFields as a}from"./Countdown/fields.js";import{CustomHTMLFields as p}from"../../../../../format/lib/document/blocks/general/CustomHTML/fields.js";import{DividerFields as F}from"./Divider/fields.js";import{ContentsFields as f}from"./Contents/fields.js";import{DocBodyFields as n}from"./DocBody/fields.js";import{DocMastheadFields as c}from"./DocMasthead/fields.js";import{DocMetaCardsFields as S}from"./DocMetaCards/fields.js";import{DocTabsFields as B}from"./DocTabs/fields.js";import{EyebrowFields as g}from"./Eyebrow/fields.js";import{FAQFields as u}from"./FAQ/fields.js";import{FeaturedCoverFields as C}from"./FeaturedCover/fields.js";import{FlexFields as T}from"./Flex/fields.js";import{FootprintFields as k}from"./Footprint/fields.js";import{GridFields as L}from"./Grid/fields.js";import{HeadingFields as H}from"./Heading/fields.js";import{HeroFields as M}from"./Hero/fields.js";import{HeroGroupFields as h}from"./HeroGroup/fields.js";import{HeroSingleFields as y}from"./HeroSingle/fields.js";import{HeroSlideFields as D}from"./HeroSlide/fields.js";import{ImageBlockFields as P}from"./ImageBlock/fields.js";import{IntegrationsFields as E}from"./Integrations/fields.js";import{IntroBleedFields as b}from"./IntroBleed/fields.js";import{KeyFeaturesFields as G}from"./KeyFeatures/fields.js";import{LocationMapFields as I}from"./LocationMap/fields.js";import{LogoBlockFields as R}from"./LogoBlock/fields.js";import{LogosFields as x}from"./Logos/fields.js";import{LongReadFields as A}from"./LongRead/fields.js";import{ManifestoFields as w}from"./Manifesto/fields.js";import{MastheadFields as v}from"./Masthead/fields.js";import{MockupFields as N}from"./Mockup/fields.js";import{OrderSummaryFields as K}from"./OrderSummary/fields.js";import{ParagraphsAFields as O}from"./ParagraphsA/fields.js";import{PaymentBadgesFields as Q}from"./PaymentBadges/fields.js";import{PostCardFields as W}from"./PostCard/fields.js";import{ProcessStepsFields as _}from"./ProcessSteps/fields.js";import{ProseFields as j}from"./Prose/fields.js";import{SectionHeaderFields as q}from"./SectionHeader/fields.js";import{SeriesFields as z}from"./Series/fields.js";import{SpacerFields as J}from"../../../../../format/lib/document/blocks/general/Spacer/fields.js";import{SpecStripFields as U}from"./SpecStrip/fields.js";import{SplitFields as V}from"./Split/fields.js";import{StatsFields as X}from"./Stats/fields.js";import{StatsParagraphFields as Y}from"./StatsParagraph/fields.js";import{TestimonialsFields as Z}from"./Testimonials/fields.js";import{TextFields as $}from"./Text/fields.js";import{TickerFields as oo}from"./Ticker/fields.js";import{TimelineFields as ro}from"./Timeline/fields.js";import{TimelineTrackFields as eo}from"./TimelineTrack/fields.js";import{TitleWithButtonsFields as io}from"./TitleWithButtons/fields.js";import{GENERAL_RENDERS as to}from"../../../../../render/lib/document/blocks/general/renders.js";const mo={Banner:e,Breadcrumb:i,ButtonBlock:t,Cards:m,CategoryBar:s,Chart:d,ContactLocations:l,Countdown:a,CustomHTML:p,Divider:F,Contents:f,DocBody:n,DocMasthead:c,DocMetaCards:S,DocTabs:B,Eyebrow:g,FAQ:u,FeaturedCover:C,Flex:T,Footprint:k,Grid:L,Heading:H,Hero:M,HeroGroup:h,HeroSingle:y,HeroSlide:D,ImageBlock:P,Integrations:E,IntroBleed:b,KeyFeatures:G,LocationMap:I,LogoBlock:R,Logos:x,LongRead:A,Manifesto:w,Masthead:v,Mockup:N,OrderSummary:K,ParagraphsA:O,PaymentBadges:Q,PostCard:W,ProcessSteps:_,Prose:j,SectionHeader:q,Series:z,Spacer:J,SpecStrip:U,Split:V,Stats:X,StatsParagraph:Y,Testimonials:Z,Text:$,Ticker:oo,Timeline:ro,TimelineTrack:eo,TitleWithButtons:io},so=()=>(r(),o(to,mo)),nr=so();export{so as assembleGeneralBlocks,nr as generalBlocks};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolveBlockOffer as
|
|
1
|
+
import{cardTemplateBlocks as w,hasCardTemplate as j,isCardTemplateBlock as O}from"../../../format/lib/content/card-template.js";import{resolveBlockOffer as $}from"./block-offer.js";import{applyBlockPasses as B,registryPassContext as C}from"../../../render/lib/document/passes/index.js";import{PASS_INSPECTOR as F}from"./passes/inspector.js";function k(n,a,c){if(!n)return n;let l=!1;const d={};for(const[s,e]of Object.entries(n)){let o=e;if(e&&typeof e=="object")if(e.type==="slot")if(e.allow){const r=e.allow.filter(a);r.length!==e.allow.length&&(o={...e,allow:r})}else{const r=new Set(e.disallow??[]),p=c.filter(m=>!r.has(m));p.length>0&&(o={...e,disallow:[...e.disallow??[],...p]})}else{const r=k(e.arrayFields,a,c),p=k(e.objectFields,a,c);(r!==e.arrayFields||p!==e.objectFields)&&(o={...e,...r?{arrayFields:r}:null,...p?{objectFields:p}:null})}o!==e&&(l=!0),d[s]=o}return l?d:n}function S(n,a,c){const l={};for(const[o,r]of Object.entries(a.fields??{}))l[o]=r&&typeof r=="object"&&r.type==="slot"?{...r}:r;const d={...a,...a.fields?{fields:l}:null},s=B(n,d,c),e=Object.keys(l).filter(o=>s.fields?.[o]!==l[o]);if(e.length>0)throw new Error(`efficient-web-builder: blocks.host["${n}"] declares ${e.map(o=>`"${o}"`).join(", ")}, ${e.length===1?"a name":"names"} the editor gives every section a setting under. Give the block's own field another name.`);return s}function v(n,a,c){const l=new Set([...Object.keys(n.components??{}),...a]),d=[...Object.entries(n.categories??{}).map(([s,e])=>({key:s,components:e?.components??[]})),...c];for(const s of d){const e=s.components.filter(O);if(e.length>0)throw new Error(`efficient-web-builder: the category "${s.key}" lists ${e.map(o=>`"${o}"`).join(", ")}, a block a card template declares. A card's block is added in its card only; take it out of the category.`)}for(const s of l){if(!j(s))continue;const e=w(s).filter(o=>!l.has(o.type)).map(o=>`"${o.type}"`);if(e.length>0)throw new Error(`efficient-web-builder: the card template of "${s}" declares ${e.join(", ")}, which the editor does not register. Register it in the registry or in blocks.host.`)}}function A(n,a){const c=Object.entries(a?.host??{}),l=a?.categories??[],d=$(a);if(v(n,c.map(([t])=>t),l),!d&&c.length===0&&l.length===0)return n;const s=n.components,e=c.map(([t])=>t).filter(t=>t in s);if(e.length>0)throw new Error(`efficient-web-builder: blocks.host registers ${e.map(t=>`"${t}"`).join(", ")}, which ${e.length===1?"is already a block":"are already blocks"} of the editor. Give a host's block a type of its own.`);const o=t=>d?d.offers(t):!0,r=Object.keys(s).filter(t=>!o(t)),p={};for(const[t,i]of Object.entries(s)){const h=d?k(i?.fields,o,r):i?.fields;p[t]=h===i?.fields?i:{...i,fields:h}}if(c.length>0){const t=new Set(c.map(([y])=>y)),i=n.categories?.structure?.components??[],g={...C(Object.keys(s),i,t),isHostBlock:y=>t.has(y),inspector:F};for(const[y,f]of c){const b=S(y,f,g),u=k(b.fields,o,r);p[y]=u===b.fields?b:{...b,fields:u}}}const m=[];for(const[t,i]of Object.entries(n.categories??{})){const h=i?.components??[],g=h.filter(o);g.length===h.length?m.push([t,i]):g.length>0&&m.push([t,{...i,components:g}])}for(const t of l){const i=t.components.filter(f=>f in p&&o(f));if(i.length===0)continue;const h=m.find(([f])=>f===t.key);if(h){const[,f]=h,b=new Set(f.components??[]);h[1]={...f,components:[...f.components??[],...i.filter(u=>!b.has(u))]};continue}const g=[t.key,{title:t.title,components:i}],y=t.before?m.findIndex(([f])=>f===t.before):-1;y===-1?m.push(g):m.splice(y,0,g)}return{...n,components:p,categories:Object.fromEntries(m)}}export{A as buildConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useSyncExternalStore as
|
|
1
|
+
import{useSyncExternalStore as g}from"react";import{rowBound as P}from"../../../format/lib/content/card-template.js";import{linkedCount as O}from"../../../format/lib/content/count-numbers.js";import{SHOP_MARKUP as R}from"../../../format/lib/markup.js";import{readHidable as S,textFieldOffPage as k}from"./controls.js";import{decodePartId as v}from"efficient-easel/draw";import{canTypeOnCanvas as K,PART_ATTR as y}from"../../../render/lib/document/text-parts.js";import{partRowField as C}from"./part-row-field.js";import{decodePartKey as b,partRowValue as A}from"../../../render/lib/document/part-rows.js";import{isMultilineKind as E,typeInPlaceKind as _}from"../../../render/lib/document/part-text.js";import{commitPartText as w}from"./part-typing.js";import{consentWordsOf as F}from"../../../format/lib/content/consent-banner.js";import{KICKER_NUMBER_ATTR as I}from"../../../render/lib/content/page-contents.js";const B=`[${I}]`,L=["bold","italic","underline","strike","link","sup","sub"],M=["bullet","number"];function $(e,t){return e?[...L,...t?M:[]]:[]}function T(e,t){const r=v(e);if(!r?.propKey)return null;const{nodeId:u,propKey:s}=r,o=t.getItemById(u),c=t.getSelectorForId(u);if(!o||!c)return null;const{key:n,row:i}=b(s),a=t.components[o.type]?.fields?.[n],d=i?C(a,i):a,m=_(d);if(!m)return null;const l=o.props??{};if(F(l)!==null||!i&&P(o.type,l,n)||o.type==="Text"&&n==="text"&&O(l)||i&&!(Array.isArray(l[n])&&i.index<l[n].length))return null;const x=i?A(l[n],i):l[n];return{node:o,selector:c,propKey:s,kind:m,stored:x,offPage:k(d)}}function ee(e,t){const r=T(e,t);if(!r)return null;const{text:u,hidden:s}=S(r.stored);if(!K({offPage:r.offPage,hidden:!!s}))return null;const o=E(r.kind);return{partId:e,value:u,rules:R,multiline:o,skip:B,offered:$(r.kind!=="plainText",o),write:c=>{const n=T(e,t);n&&w({node:n.node,propKey:n.propKey,kind:n.kind,zone:n.selector.zone,index:n.selector.index},c,t.replace)}}}function te(e,t,r){return e?.isConnected&&e.getAttribute(y)===r?e:t?.querySelector(`[${y}="${h(r)}"]`)??null}function h(e){return e.replace(/["\\]/g,"\\$&")}function ne(e){const t=e.activeElement;return t?t.tagName==="IFRAME"||!!t.closest(".es-canvas"):!1}let f=null;const p=new Set;function N(){return f}function re(e){if(e!==f){f=e;for(const t of p)t()}}function W(e){return p.add(e),()=>{p.delete(e)}}function oe(){return g(W,N,()=>null)}export{N as canvasTypingPart,ne as keysOnCanvas,te as partElement,$ as partTextTools,ee as partTypingTarget,re as setCanvasTypingPart,W as subscribeCanvasTypingPart,oe as useCanvasTypingPart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as f}from"react/jsx-runtime";import{
|
|
1
|
+
"use client";import{jsx as f}from"react/jsx-runtime";import{isNodeList as x}from"efficient-easel/data";import{useEasel as N}from"efficient-easel/easel";import{slotChildName as O,slotChildRowName as g}from"efficient-easel/draw";import{cardTemplateCardOwner as y,cardTemplateField as h,namedRowField as D}from"../../../format/lib/content/card-template.js";import{DisplayRow as _,useSelectedPatch as S}from"./controls.js";import{websiteNodeIsLocked as T}from"./locked-blocks.js";import{stripMarkup as b}from"../../../format/lib/markup.js";import{sourceRowName as A}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as E}from"../../../format/lib/document/show-when-attach.js";import{deviceField as F}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as L}from"efficient-easel/screen/lib/document/panel-no-control-mark";const C="notCardOfTemplate",M={not:{context:C,is:!0}},V={[C]:(e,n)=>{const t=y(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function d(e){const n=e.props?.content;return x(n)?n:[]}const m=e=>!!e.props?._hidden;function R(e,n=()=>!1){return d(e).flatMap(t=>typeof t?.props?.id!="string"?[]:d(t).length&&!m(t)?R(t,n):n(t)?[]:[t])}function P(e,n,t){const i=R(e,t).map(r=>({child:r,name:n(r)})),s=new Set(i.map(r=>r.name)),u=new Set;return i.map(({child:r,name:p})=>{let o=p;if(u.has(p)){let a=2;for(;s.has(`${p} ${a}`);)a+=1;o=`${p} ${a}`,s.add(o)}return u.add(p),{id:r.props.id,label:o,shown:!m(r)}})}function l(e,n){return d(e).flatMap(t=>m(t)?n(t)?[]:[t,...l(t,n)]:l(t,n))}function w(e,n,t){const i=d(e);let s=!1;const u=i.map(r=>{if(s)return r;let p;if(r?.props?.id===n){if(t?!("_hidden"in r.props):m(r))return r;const{_hidden:o,...a}=r.props;p={...r,props:t?a:{...a,_hidden:!0}}}else p=w(r,n,t);return s=p!==r,p});return s?{...e,props:{...e.props,content:u}}:e}function k(e,n,t){return O(e).trim()?t(e):h(n,D(e.props))?.label??t(e)}const $="This page is read-only.";function B({card:e,ownerType:n,labelOf:t,write:i,readOnly:s}){const u=o=>g(o,t,b,void 0,A),r=o=>T(o.type,o),p=P(e,o=>k(o,n,u),r);return p.length?f(_,{parts:p,changed:p.some(o=>!o.shown),shown:o=>p.find(a=>a.id===o)?.shown??!0,disabledReason:s?$:void 0,onPress:(o,a)=>i(c=>w(c,o,a)),onReset:()=>i(o=>l(o,r).reduce((a,c)=>w(a,String(c.props.id),!0),o))}):f(L,{})}function I(){try{const e=N(s=>s),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const i=y(e.appState,t.props?.id);return{labelOf:s=>n[s]?.label??s,card:t,ownerType:typeof i?.type=="string"?i.type:void 0}}catch{return null}}function j({readOnly:e}){const n=I(),t=S();return n?f(B,{...n,readOnly:e,write:i=>{e||t(s=>{const u={...n.card,props:s},r=i(u);return r===u?null:{content:r.props.content}})}}):f(_,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function Z(){return E(F("desktop",{type:"custom",render:({readOnly:e})=>f(j,{readOnly:e})}),M)}export{V as CARD_BOX_FACTS,B as CardDisplayChips,C as NOT_CARD_OF_TEMPLATE,k as cardChipLabel,Z as cardDisplayField,P as cardDisplayItems,R as cardDisplayParts,w as withChildShown};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from "react";
|
|
2
|
+
import { type FieldsPatch } from "efficient-easel/easel";
|
|
2
3
|
import { type MediaValue } from "../../../format/lib/media-value.js";
|
|
3
4
|
import { type LoadingShows } from "../../../format/lib/hero-video.js";
|
|
4
5
|
import { readHidable, hidableText, type HidableValue } from "efficient-easel/draw";
|
|
@@ -56,6 +57,7 @@ export declare function SiteGapDefaultReset({ inherited, onReset, label, }: {
|
|
|
56
57
|
}): import("react").JSX.Element;
|
|
57
58
|
export declare function containerGapField(container: GapContainer): import("efficient-easel/screen/lib/document/box-fields").BoxField<string | number>;
|
|
58
59
|
export declare function containerGapPhoneField(container: GapContainer): CustomField<string | number>;
|
|
60
|
+
export declare function containerGapTabletField(container: GapContainer): CustomField<string | number>;
|
|
59
61
|
export declare const DESKTOP_GAP_NOT_OVERLAP: ShowWhenRule;
|
|
60
62
|
export declare function containerGapRows(container: GapContainer): {
|
|
61
63
|
[x: string]: import("efficient-easel/screen/lib/document/box-fields").BoxField<string | number> | CustomField<string | number>;
|
|
@@ -113,7 +115,6 @@ export declare function plainTextarea(label: string, placeholder?: string, hint?
|
|
|
113
115
|
export declare const BUCKET_ICONS: Record<Bucket, (props: {
|
|
114
116
|
size?: number;
|
|
115
117
|
}) => ReactElement>;
|
|
116
|
-
export declare function entriesHiddenForTab(buckets: readonly Bucket[], active: string): boolean | null;
|
|
117
118
|
export declare function panelNote(text: string): CustomField<undefined>;
|
|
118
119
|
export declare function PanelNoteLine({ text }: {
|
|
119
120
|
text: string;
|
|
@@ -180,7 +181,7 @@ interface CornersRowTier {
|
|
|
180
181
|
export declare function cornersRowField(tier: CornersRowTier): CustomField<number | null>;
|
|
181
182
|
export declare function useSelectedSibling(key: string): [unknown, (next: unknown) => void];
|
|
182
183
|
export declare function keptBy<T = unknown>(): CustomField<T>;
|
|
183
|
-
export declare function useSelectedPatch(): (patch:
|
|
184
|
+
export declare function useSelectedPatch(): (patch: FieldsPatch) => void;
|
|
184
185
|
export declare function cornerSidesField(): CustomField<string[] | null>;
|
|
185
186
|
export declare function sectionCornersField(): CustomField<number | null>;
|
|
186
187
|
export declare function sectionShapeFields(): Record<string, unknown>;
|
|
@@ -193,10 +194,13 @@ export declare function boxShareField(points?: readonly (typeof BOX_SHARE_POINTS
|
|
|
193
194
|
export declare function boxBlockSpacingField(): SelectField;
|
|
194
195
|
export declare function boxSharePhoneField(): CustomField<string>;
|
|
195
196
|
export declare function boxPhoneRowField(): import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
|
|
196
|
-
export declare function boxColumnsFields():
|
|
197
|
+
export declare function boxColumnsFields(): {
|
|
198
|
+
phoneRow: import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
|
|
199
|
+
};
|
|
197
200
|
export declare function sizeField(label: string, min: number, max: number, step: number, fallback: number, role: TypeRole): CustomField<TypeSizeValue>;
|
|
198
201
|
export declare function cellWidthFields(): Record<string, unknown>;
|
|
199
202
|
export declare function useSelectedProps(): Record<string, unknown>;
|
|
203
|
+
export declare const RowPropsContext: import("react").Context<Record<string, unknown> | null>;
|
|
200
204
|
export declare function phoneOverrideField(opts: {
|
|
201
205
|
label: string;
|
|
202
206
|
desktopKey: string;
|