efficient-web-builder 49.1.0 → 51.0.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 +43 -0
- package/README.md +1 -1
- package/dist/editor/components/BlogPostSource.js +1 -1
- package/dist/editor/components/EditorPagePathProvider.d.ts +4 -0
- package/dist/editor/components/EditorPagePathProvider.js +1 -0
- package/dist/editor/components/HeroPartPanel.js +1 -1
- package/dist/editor/components/MediaUploadField.js +1 -1
- package/dist/editor/components/PagesPanel.js +1 -1
- package/dist/editor/components/SectionEditor.js +1 -1
- package/dist/editor/components/SourceStatus.d.ts +3 -3
- package/dist/editor/components/SourceStatus.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/ThemeCard.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/storefront-editor.css +1 -1
- package/dist/editor/components/usePartMotion.d.ts +1 -1
- package/dist/editor/components/usePartTypingDeps.d.ts +2 -0
- package/dist/editor/components/usePartTypingDeps.js +1 -0
- package/dist/editor/lib/animation/entrance-fields.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 +7 -1
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/add-target.js +1 -1
- package/dist/editor/lib/document/block-source-fields.d.ts +6 -0
- package/dist/editor/lib/document/block-source-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ContactLocations/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/PaymentBadges/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/hero-shared-fields.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-copy-rows.d.ts +12 -0
- package/dist/editor/lib/document/card-copy-rows.js +1 -0
- package/dist/editor/lib/document/card-display-chips.d.ts +7 -2
- package/dist/editor/lib/document/card-display-chips.js +1 -1
- package/dist/editor/lib/document/card-row-fields.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +1 -0
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/darken-fields.d.ts +4 -0
- package/dist/editor/lib/document/darken-fields.js +1 -0
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/overrides.js +1 -1
- package/dist/editor/lib/document/slot-new-children.d.ts +2 -0
- package/dist/editor/lib/document/slot-new-children.js +1 -0
- package/dist/editor/lib/sections/hero-ticker-to-strip.js +1 -1
- package/dist/editor/lib/sections/new-section-node.js +1 -1
- package/dist/format/components/stored-pick-row.d.ts +8 -0
- package/dist/format/components/stored-pick-row.js +1 -0
- package/dist/format/lib/animation/hover.d.ts +32 -1
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/block-sources.d.ts +11 -0
- package/dist/format/lib/content/block-sources.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +11 -0
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +2 -1
- package/dist/format/lib/content/box-shape.js +1 -1
- package/dist/format/lib/content/card-place.d.ts +8 -0
- package/dist/format/lib/content/card-place.js +1 -0
- package/dist/format/lib/content/card-template.d.ts +20 -2
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/image-treatment.d.ts +23 -4
- package/dist/format/lib/content/image-treatment.js +1 -1
- package/dist/format/lib/document/blocks/general/Cards/card-seed.d.ts +15 -0
- package/dist/format/lib/document/blocks/general/Cards/card-seed.js +1 -0
- package/dist/format/lib/document/blocks/general/Cards/meta.d.ts +6 -0
- package/dist/format/lib/document/blocks/general/Cards/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Hero/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +8 -0
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/cards-template-on-read.d.ts +4 -0
- package/dist/format/lib/document/cards-template-on-read.js +1 -0
- 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/editor-page-context.js +1 -1
- package/dist/format/lib/document/passes/card-template-on-insert.d.ts +2 -0
- package/dist/format/lib/document/passes/card-template-on-insert.js +1 -0
- package/dist/format/lib/document/passes/types.d.ts +6 -0
- package/dist/format/lib/document/renamed-props.js +1 -1
- package/dist/format/lib/document/section-catalog.js +22 -2
- package/dist/format/lib/document/seed-parts.d.ts +18 -0
- package/dist/format/lib/document/seed-parts.js +1 -0
- package/dist/format/lib/editor-page-rows.d.ts +2 -0
- package/dist/format/lib/editor-page-rows.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +21 -6
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/hero-ticker.d.ts +4 -0
- package/dist/format/lib/hero-ticker.js +1 -1
- package/dist/format/lib/page-at-own-slug.d.ts +9 -0
- package/dist/format/lib/page-at-own-slug.js +1 -0
- package/dist/format/lib/popup/new-popup.js +1 -1
- package/dist/format/lib/sections/hero-overlay.js +1 -1
- package/dist/render/components/ButtonBlock.d.ts +1 -1
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/Cards.d.ts +4 -2
- package/dist/render/components/Cards.js +1 -1
- package/dist/render/components/ContactLocations.d.ts +3 -1
- package/dist/render/components/ContactLocations.js +2 -2
- package/dist/render/components/Flex.d.ts +5 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/HeroPictures.d.ts +10 -0
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/ImageBlock.d.ts +6 -1
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/Manifesto.d.ts +3 -1
- package/dist/render/components/Manifesto.js +1 -1
- package/dist/render/components/PhotoHoverSheet.d.ts +4 -0
- package/dist/render/components/PhotoHoverSheet.js +1 -0
- package/dist/render/components/PictureWash.d.ts +6 -0
- package/dist/render/components/PictureWash.js +1 -0
- package/dist/render/components/Placeholder.js +1 -1
- package/dist/render/components/PostCard.js +1 -1
- package/dist/render/components/Split.d.ts +3 -1
- package/dist/render/components/Split.js +1 -1
- package/dist/render/components/Text.d.ts +4 -3
- package/dist/render/components/Text.js +1 -1
- package/dist/render/lib/animation/part-motion.js +2 -2
- package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ContactLocations/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Manifesto/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Split/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +1 -2
- package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +1 -5
- 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-locations.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/section-animation.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +7 -7
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/dist/render/lib/site-runtime.d.ts +2 -0
- package/dist/render/lib/site-runtime.js +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as c}from"react/jsx-runtime";import{AccentIcon as v,ColumnsIcon as x,StylesIcon as f}from"efficient-easel/icons";import{copyText as b,plainText as C,plainTextarea as B,text as w,textarea as M,withOffPage as S}from"../../../controls.js";import{group as p}from"efficient-easel/screen/lib/document/box-fields";import{select as y,slider as A}from"../../../box-fields.js";import{SPLITTABLE_SECTIONS as H,headFieldsForPlacement as N}from"../../../../../../format/lib/sections/section-head-placement.js";import{SECTION_EYEBROW_LOOK_OPTIONS as D,eyebrowLookFor as k}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{BLOCK_SOURCE_EDIT_PROP as K,blockSourceEditField as W,blockSourceField as J,blockSourceFields as U}from"../../../block-source-fields.js";import{declaredBlockSource as E,sourceChoices as Y}from"../../../../../../format/lib/content/block-sources.js";import{cardKeyOf as q,cardRow as z,cardTemplateFields as O}from"../../../../../../format/lib/content/card-template.js";import{isNodeList as G,newId as F}from"efficient-easel/data";import{say as Q}from"../../../../../../format/lib/editor-words.js";import{cardsFieldsFollowContent as V}from"../../../../../../format/lib/document/cards-template-on-read.js";import{CARDS_PH as I,CardsSlots as X}from"../../../../../../format/lib/document/blocks/general/Cards/meta.js";const Z=e=>G(e.template)&&e.template.length>0;function $(e){const r=E(e);return r?Y(r).map(t=>({label:t.label,value:t.key})):(Array.isArray(e.items)?e.items:[]).map((t,l)=>({label:typeof t?.title=="string"&&t.title.trim()||Q("Card {n}",{n:l+1}),value:q(z(t),l)}))}const ee=e=>Object.defineProperty({...e},"key",{get:()=>F("card"),enumerable:!0});function te(e,r){const o=Z(r)&&r.cardStyle!=="label-only"&&!!e.highlightedCard;return Object.fromEntries(Object.entries(e).flatMap(([t,l])=>t==="highlightedCard"?o?[[t,re(l,$(r))]]:[]:t==="highlightBadge"?o?[[t,l]]:[]:t==="items"&&o&&l?[[t,se(l)]]:[[t,l]]))}const L=new WeakMap;function re(e,r){let o=L.get(e);o||L.set(e,o=new Map);const t=JSON.stringify(r);let l=o.get(t);return l||o.set(t,l={...e,options:[...e.options,...r]}),l}const _=e=>e.kind==="link"?S(C(e.label)):e.multiline?B(e.label):b(e.label),oe=Object.fromEntries(O("Cards").filter(e=>!e.everySource).map(e=>[e.key,_(e)])),le=Object.fromEntries(O("Cards").filter(e=>e.key==="title"||e.key==="body").map(e=>[e.key,_(e)])),T=new WeakMap;function se(e){let r=T.get(e);return r||T.set(e,r={...e,arrayFields:oe}),r}const we={fields:{_gSource:p("Source"),dataSource:J("Card content","Manual"),[K]:W(),_gContent:p("Content"),eyebrow:w("Eyebrow",I.eyebrow),eyebrowLook:y("Eyebrow style",c(f,{}),[...D],k("Cards")),title:M("Heading",I.title),items:{type:"array",label:"Cards",arrayFields:le,defaultItemProps:ee({title:"",body:""}),getItemSummary:e=>e?.title||e?.body||"Card"},...X,highlightedCard:y("Highlighted card",c(v,{}),[{label:"None",value:""}],""),highlightBadge:w("Highlight badge","Most popular"),_gStyle:p("Style"),cardStyle:y("Card style",c(f,{}),[{label:"Cards",value:"cards"},{label:"Label only",value:"label-only"}],"cards"),columns:A("Columns",c(x,{}),2,4,1,3)},resolveData:e=>{const r=V(e.props),o=r===e.props?e:{...e,props:r},t=o.props;if(!Array.isArray(t.items)||E(t))return o;const l=t.items,a=typeof t.highlightedCard=="string"?t.highlightedCard.trim():"",i=s=>s&&typeof s=="object"&&typeof s.key=="string"?s.key:"",P=!!a&&!l.some(s=>i(s)===a),d=new Set;let u=t.highlightedCard,h=!1;const R=l.map((s,j)=>{if(!s||typeof s!="object")return s;const n=i(s);if(n&&!d.has(n))return d.add(n),s;const g=!n&&P&&a===String(j+1);if(n||g){const m=F("card");return d.add(m),h=!0,g&&(u=m),{...s,key:m}}return s});return h?{...o,props:{...t,items:R,highlightedCard:u}}:o},resolveFields:(e,{fields:r})=>{const o=N(U("Cards",r,e.props,{hides:["items"]}),e.props.headPlacement,H.Cards.headRows),t=e.props,l=te(o,t);if(t.cardStyle!=="label-only")return l;const a=o.items,i=o.eyebrowLook;return{...l,...a?{items:{...a,arrayFields:{title:b("Feature label"),href:S(C("Link"))}}}:{},...i?{eyebrowLook:{...i,fallback:k("KeyFeatures")}}:{}}}};export{we as CardsFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a}from"react/jsx-runtime";import p from"../../../../../components/LocationsGroupedField.js";import{splitLegacyRegion as m}from"../../../../../../format/lib/content/contact.js";import{BLOCK_SOURCE_ROWS_PROP as l}from"../../../../../../format/lib/content/block-sources.js";import{blockSourceField as d,blockSourceFields as u}from"../../../block-source-fields.js";import{needsGeocodeWork as
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import p from"../../../../../components/LocationsGroupedField.js";import{splitLegacyRegion as m}from"../../../../../../format/lib/content/contact.js";import{BLOCK_SOURCE_ROWS_PROP as l}from"../../../../../../format/lib/content/block-sources.js";import{blockSourceField as d,blockSourceFields as u}from"../../../block-source-fields.js";import{needsGeocodeWork as g,resolveGeocodeRows as f}from"../../../geocode-resolve.js";const _={fields:{dataSource:d("Location content","Manual"),locations:{type:"custom",render:({value:o,onChange:r})=>a(p,{value:o,onChange:r})}},resolveData:async o=>{const r=o.props,e=r.locations??[];if(!g(e))return o;const n=await f(e,t=>{const s=m(t.region);return[String(t.address??"").replace(/\s*\n+\s*/g,", "),t.name,String(t.state??"").trim()||s.state,String(t.country??"").trim()||s.country].map(c=>String(c??"").trim()).filter(Boolean).join(", ")}),{[l]:S,...i}=r;return{...o,props:{...i,locations:n}}},resolveFields:(o,{fields:r})=>u("ContactLocations",r,o.props)};export{_ as ContactLocationsFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{phoneKey as t,tabletKey as a}from"efficient-easel/draw";import{BOX_CARD_PAD as d,isBackgroundBox as W}from"../../../../../../format/lib/content/box-background.js";import{darkenFields as X}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as j,REEL_SHAPE_LABELS as K}from"../../../../../../format/lib/reel.js";import{deviceField as r}from"efficient-easel/screen/lib/document/device-fields";import{ClockIcon as v,CropIcon as u,LineBetweenIcon as G,LineSolidIcon as Y,ShadowIcon as J,StylesIcon as V,TableIcon as A,TargetIcon as z}from"efficient-easel/icons";import{boxBlockSpacingField as q,boxFillField as Q,boxColumnsFields as Z,boxShareField as $,boxSharePhoneField as oo,boxShareTabletField as eo,containerDirectionField as no,containerGapRows as to,linkField as ao,plainText as io,swapPadding as g,toggle as c,upload as O,withPanelOnly as lo}from"../../../controls.js";import{BOX_SHAPE_OPTIONS as R,boxShapeOf as ro}from"../../../../../../format/lib/content/box-shape.js";import{BOX_COLUMNS_MAX as E,BOX_COLUMNS_MIN as C,boxPhoneRowOneLine as so}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as b}from"../../../../../../format/lib/content/box-separator.js";import{VIEW_KEY_ACCESS as po,group as i,phoneTwinFields as F}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as co,boxJustifyField as mo,boxWrapField as L,placementField as So,select as s,sidesPaddingFields as N}from"../../../box-fields.js";import{withRowRules as _o}from"../../../../../../render/lib/document/show-when.js";import{separatorField as ho}from"../../../separator-field.js";import{LOOP_SCROLLS as fo}from"../../../../../../format/lib/animation/index.js";import{FlexSlots as uo}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{CARD_BOX_FACTS as Ao,ON_A_CARD as go,cardDisplayField as Oo}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Ro,mirrorCardsField as Eo}from"../../../mirror-cards-field.js";import{SHARED_COLUMNS_KEY as l,SHARED_COLUMNS_LABEL as D,SHARED_COLUMNS_OFF as H,sharedColumnsDrawn as T,sharedColumnsFits as x,SHARED_COLUMNS_PHONE_POINTS as Co,SHARED_COLUMNS_POINTS as bo}from"../../../../../../render/lib/content/box-shared-columns.js";const Fo={field:"bgImage",set:!0},I={field:"phoneRow",in:[2,3]},Lo={field:"direction",is:"tabs"},No={field:"line",in:[!0,!1]},Do={field:"anchor",set:!0},w=["fixed","screen"],Ho={not:{any:[{field:"sectionHeightMode",in:w},{field:"sectionHeightModePhone",in:w}]}},To={context:"parent.line",is:!0},h={field:"direction",is:"row",default:"row"},p={not:fo},f={all:[h,p,{not:{field:"separator",in:b.map(o=>o.value)}},{not:{field:"line",is:!0}}]},xo={all:[f,...["columns",a("columns")].map(o=>({not:{field:o,in:Array.from({length:E},(n,_)=>_+C)}}))]},Io={all:[p,{not:{all:[h,{field:"separator",in:b.map(o=>o.value)}]}}]},k={not:{all:[f,{field:"columns",in:Array.from({length:E},(o,n)=>n+C)}]}},wo="sharedColumnsFits",P="sharedColumnsMisfit",B="sharedColumnsDraws",M="sharedColumnsPhoneDraws",ko={[wo]:o=>x(o.props??{}),[P]:o=>!x(o.props??{}),[B]:o=>T(o.props??{}).desktop,[M]:o=>T(o.props??{}).phone};function y(o){return{all:[{not:{context:P,is:!0}},{any:[go,{field:o,set:!0}]}]}}const m={not:{context:B,is:!0}},S={not:{context:M,is:!0}},Po={any:[m,S]};function Bo(o){return{...o,render:n=>o.render({...n,value:so(n.value)?"nowrap":"wrap"})}}const ae={fields:_o({_gContent:i("Content"),content:uo.content,_gCardDisplay:i("Display"),cardDisplay:Oo(),_gLayout:i("Layout"),direction:no("Flex"),tabShape:s("Tab shape",e(V,{}),j.map(o=>({label:K[o],value:o})),"tabs"),mirrorCards:Eo(),label:lo(io("Tab name")),...to("Flex"),justify:mo(),align:co(),...F("wrap",L(),void 0,{phoneRow:Bo(L())}),...F("boxShape",s("Box shape",e(u,{}),[...R],"auto"),po,{phoneRow:s("Box shape",e(u,{}),[...R],"auto",{phoneRest:o=>ro(o)})}),separator:ho(e(G,{size:18}),"none"),share:r("desktop",$()),[a("share")]:eo(),[t("share")]:oo(),[l]:r("desktop",s(D,e(A,{}),[...bo],H)),[t(l)]:r("mobile",s(D,e(A,{}),[...Co],H)),...Z(),blockSpacing:q(),line:c("Line",!1,e(Y,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,e(v,{}),"Still to come: a hollow dot, and the gold line stops before it."),_gShadow:i("Shadow"),shadow:c("Shadow",!1,e(J,{})),fillColor:Q(),_gBackground:i("Background image"),bgImage:r("desktop",O("Image","image/*")),bgImagePhone:r("mobile",O("Image","image/*")),...X(),placement:So("Content position"),_gLink:i("Link"),link:ao("Link to"),jumpHighlight:c("Highlight when a link jumps here",!1,e(z,{}),"When a link lands on this Box's anchor, the Box gets an accent outline and its first block turns accent.")},[[["darken","darkenStyle","placement"],Fo],[[t("share")],{all:[I,S]}],[[l],y(l)],[[t(l)],y(t(l))],[[t("wrap")],{all:[I,p,S]}],[["phoneRow"],S],[["tabShape"],Lo],[["separator"],h],[["columns",a("columns")],f],[[a("gap")],Io],[["justify"],{all:[p,Po]}],[["wrap"],{all:[p,k,m]}],[["share"],{all:[k,m]}],[[a("share")],{all:[xo,m]}],[["line"],No],[["upcoming"],To],[["jumpHighlight"],Do],[["boxShape",a("boxShape"),t("boxShape")],Ho]]),resolveFields:(o,{fields:n})=>{const _=o.props;if(W(_.bgImage)){const U=N({fallback:{top:d.desktop,bottom:d.desktop,left:d.side,right:d.side},tablet:!0});return g(n,U)}return o.props.padV2!==!0?g(n,N({fallback:{top:24,bottom:24},tablet:!0})):n},showWhenFacts:{...Ao,...Ro,...ko}};export{ae as FlexFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as m,REEL_SHAPE_DEFAULT as d,HERO_REEL_SHAPES as A,REEL_SHAPE_LABELS as R,REEL_SHOWN_DEFAULT as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as m,REEL_SHAPE_DEFAULT as d,HERO_REEL_SHAPES as A,REEL_SHAPE_LABELS as R,REEL_SHOWN_DEFAULT as O}from"../../../../../../format/lib/reel.js";import{HERO_TEXTURE_SHOWN_DEFAULT as P}from"../../../../../../format/lib/hero-texture.js";import{HERO_ARROW_SHAPE_DEFAULT as H,HERO_ARROW_SHAPE_LABELS as L,HERO_ARROW_SHAPES as u,HERO_ARROWS_PLACEMENT_DEFAULT as h,HERO_ARROWS_SHOWN_DEFAULT as w}from"../../../../../../format/lib/hero-arrows.js";import{ClockIcon as I,EyeIcon as t,OpacityIcon as T,PhoneIcon as s,PlayIcon as k,SlideArrowsBareIcon as f,SlideArrowsRoundIcon as D,SlideArrowsSquareIcon as g,SlidePickerBarIcon as U,SlidePickerCardsIcon as y,SlidePickerDotsIcon as F,SlidePickerNumbersIcon as W,SlidePickerSquaresIcon as b,SquareIcon as E}from"efficient-easel/icons";import{SlideArrowsRoundSolidIcon as N}from"efficient-shell/icons/efficient-looks";const C=N,x={cards:e(y,{}),dots:e(F,{}),numbers:e(W,{}),bar:e(U,{}),squares:e(b,{})},B={outline:e(D,{}),solid:e(C,{}),square:e(g,{}),bare:e(f,{})};import{toggle as i}from"../../../controls.js";import{HERO_TEXTURE_COLOR_ROW as q}from"../../hero-shared-fields.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{alignmentField as M,iconPickerRow as _,placementField as n,segmented as c,slider as p}from"../../../box-fields.js";import{deviceField as l,deviceNote as j}from"efficient-easel/screen/lib/document/device-fields";import{HERO_PHONE_SIDEWAYS_DEFAULT as X,HERO_PHONE_SIDEWAYS_LABEL as Y,HERO_PHONE_UPDOWN_DEFAULT as v,HERO_PHONE_UPDOWN_LABEL as K,phoneSidewaysPoints as z,phoneUpDownPoints as G}from"../../../../../../format/lib/hero-phone-stack.js";import{heightField as S}from"../../shared-fields.js";import{HeroSlots as a}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const ne={fields:{_dDevice:j(),_gContent:o("Content"),slides:a.slides,strip:a.strip,_gStyle:o("Style"),alignment:M(),_gTexture:o("Texture"),showTexture:i("Show texture",P,e(t,{})),textureColor:q,textureOpacity:p("Texture opacity",e(T,{}),0,100,1,40,"%"),_gLayout:o("Layout"),heightDesktop:S("desktop"),heightMobile:S("mobile"),_gAutoplay:o("Auto-slide"),autoplay:i("Auto-advance slides",!1,e(k,{})),autoplayInterval:p("Still time per slide",e(I,{}),2,15,1,6,"s"),_gPicker:o("Slide picker"),showPicker:i("Show slide picker",O,e(t,{})),pickerShape:_("Slide picker shape",e(E,{}),A.map(r=>({label:R[r],value:r,picture:x[r]})),d),pickerPlacement:n("Slide picker placement",{fallback:m}),_gArrows:o("Arrows"),showArrows:i("Show arrows",w,e(t,{})),arrowsShape:_("Arrows shape",e(E,{}),u.map(r=>({label:L[r],value:r,picture:B[r]})),H),arrowsPlacement:n("Arrows placement",{fallback:h}),_gPhone:l("mobile",o("On a phone")),phoneUpDown:l("mobile",c(K,e(s,{}),G(),v)),phoneSideways:l("mobile",c(Y,e(s,{}),z(),X))}};export{ne as HeroFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{BlockVideoIcon as c,ClockIcon as p,ImageIcon as g,MediaIcon as s,OpacityIcon as u,PlayIcon as v}from"efficient-easel/icons";import{colorInput as f,focusKeptField as i,loadingShowsField as I,MEDIA_TYPE_OPTIONS as y,plainText as _,text as S,upload as a,withIdentifier as O,withPanelOnly as m}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{segmented as E,slider as t}from"../../../box-fields.js";import{LOADING_SHOWS_IMAGE as F,VIDEO_PLAYBACK_DEFAULT as P,VIDEO_SOURCE_DEFAULT as l}from"../../../../../../format/lib/hero-video.js";import{HERO_SLIDE_OVERLAY_ROWS as n,HERO_VIDEO_ROWS as d}from"../../hero-shared-fields.js";import{PH as T}from"../../../../../../format/lib/document/blocks/placeholders.js";import{slotNoticeField as b}from"../../shared-fields.js";import{forMediaType as L,heroMediaFields as D,VIDEO_FILE_LABEL as h,VIDEO_FILE_PROMPT as k}from"../../../../../../render/lib/document/hero-media-parts.js";import{DEFAULT_TINT as A}from"../../../../../../format/lib/content/tint.js";import{HeroSlideSlots as C}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";const r=L("video","video"),G={fields:D({_gContent:o("Content"),name:m(O(_("Slide name",T.slideName))),process:m(S("Reel label","Label")),groupNotice:b("HeroSlide"),groups:C.groups,_gMedia:o("Media"),mediaType:E("Type",e(s,{}),y,"video"),videoSource:d.videoSource,mediaVideo:a(h,"video/*",k,{frame:"videoFrame"}),youtubeUrl:d.youtubeUrl,videoPlayback:d.videoPlayback,videoSpeed:t("Playback speed",e(v,{}),25,100,5,100,"%"),loadingShows:I("Show while loading",e(p,{}),{frame:e(c,{}),image:e(g,{})}),videoFrame:i(),mediaImage:a("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:i(),imageFocalPhone:i(),poster:a("Image","image/*","Choose an image"),_gTint:o("Image tint"),tintColor:f("Tint color",A),overlay:t("
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{BlockVideoIcon as c,ClockIcon as p,ImageIcon as g,MediaIcon as s,OpacityIcon as u,PlayIcon as v}from"efficient-easel/icons";import{colorInput as f,focusKeptField as i,loadingShowsField as I,MEDIA_TYPE_OPTIONS as y,plainText as _,text as S,upload as a,withIdentifier as O,withPanelOnly as m}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{segmented as E,slider as t}from"../../../box-fields.js";import{LOADING_SHOWS_IMAGE as F,VIDEO_PLAYBACK_DEFAULT as P,VIDEO_SOURCE_DEFAULT as l}from"../../../../../../format/lib/hero-video.js";import{HERO_SLIDE_OVERLAY_ROWS as n,HERO_VIDEO_ROWS as d}from"../../hero-shared-fields.js";import{PH as T}from"../../../../../../format/lib/document/blocks/placeholders.js";import{slotNoticeField as b}from"../../shared-fields.js";import{forMediaType as L,heroMediaFields as D,VIDEO_FILE_LABEL as h,VIDEO_FILE_PROMPT as k}from"../../../../../../render/lib/document/hero-media-parts.js";import{DEFAULT_TINT as A}from"../../../../../../format/lib/content/tint.js";import{HeroSlideSlots as C}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";const r=L("video","video"),G={fields:D({_gContent:o("Content"),name:m(O(_("Slide name",T.slideName))),process:m(S("Reel label","Label")),groupNotice:b("HeroSlide"),groups:C.groups,_gMedia:o("Media"),mediaType:E("Type",e(s,{}),y,"video"),videoSource:d.videoSource,mediaVideo:a(h,"video/*",k,{frame:"videoFrame"}),youtubeUrl:d.youtubeUrl,videoPlayback:d.videoPlayback,videoSpeed:t("Playback speed",e(v,{}),25,100,5,100,"%"),loadingShows:I("Show while loading",e(p,{}),{frame:e(c,{}),image:e(g,{})}),videoFrame:i(),mediaImage:a("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:i(),imageFocalPhone:i(),poster:a("Image","image/*","Choose an image"),_gTint:o("Image tint"),tintColor:f("Tint color",A),overlay:t("Tint",e(u,{}),0,100,5,0,"%"),_gOverlay:o("Overlay"),overlayColor:n.overlayColor,overlayPosition:n.overlayPosition},{onlyFor:{image:["mediaImage","imageFocal","imageFocalPhone","_gTint","tintColor","overlay"],video:["videoSource","videoPlayback","loadingShows","videoFrame"]},fallback:"video",rules:{mediaVideo:{all:[r,{field:"videoSource",is:"upload",default:l}]},youtubeUrl:{all:[r,{field:"videoSource",is:"youtube",default:l}]},videoSpeed:{all:[r,{field:"videoSource",is:"upload",default:l},{field:"videoPlayback",is:"background",default:P}]},poster:{all:[{field:"mediaType",is:"video",default:"video"},F]}}})};export{G as HeroSlideFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{IMAGE_FIT_ROW_LABEL as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{IMAGE_FIT_ROW_LABEL as t,imageFitOptions as a,imageIsCropped as m,parseImageFit as s}from"../../../../../../format/lib/content/image-fit.js";import{ImageIcon as c}from"efficient-easel/icons";import{focusKeptField as r,imageCornersField as f,linkField as p,plainText as d,cornerSidesField as g,upload as n,withPanelOnly as F}from"../../../controls.js";import{group as l}from"efficient-easel/screen/lib/document/box-fields";import{select as u}from"../../../box-fields.js";import{photographyToggle as h}from"../../shared-fields.js";import{CARD_ROW_FACTS as I,cardRowField as _,cardRowFields as v}from"../../../card-row-fields.js";import{offerNextPicture as S}from"../../../../animation/hover-fields.js";import{darkenFields as A}from"../../../darken-fields.js";const L={fields:{_gImage:l("Image"),src:n("Image","image/*",void 0,{focus:"focal",focusWhen:e=>m(e.aspect,s(e.fit,"cover"))}),alt:F(d("Alt text")),rowField:_("Shows","image"),aspect:{type:"select",label:"Aspect ratio",options:[{label:"Auto",value:"auto"},{label:"21 : 9",value:"21/9"},{label:"16 : 9",value:"16/9"},{label:"4 : 3",value:"4/3"},{label:"1 : 1",value:"1/1"}]},fit:u(t,i(c,{}),a(),"cover"),focal:r(),focalPhone:r(),href:p("Link"),_gStyle:l("Style"),grayscale:h(),...A(),_gShape:l("Shape"),corners:f(),cornerSides:g()},resolveFields:(e,o)=>S(v(o.fields,e,o),e,o),showWhenFacts:I};export{L as ImageBlockFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{blockSourceField as
|
|
1
|
+
import{blockSourceField as r,blockSourceFields as s}from"../../../block-source-fields.js";import{copyText as a,text as l,upload as m}from"../../../controls.js";import{group as t}from"efficient-easel/screen/lib/document/box-fields";import{PAYMENT_PH as n}from"../../../../../../format/lib/document/blocks/general/PaymentBadges/meta.js";const c={fields:{_gContent:t("Content"),heading:l("Heading",n.heading),dataSource:r("Payment content","Manual"),badges:{type:"array",label:"Payment methods",arrayFields:{label:a("Name"),src:m("Logo","image/*")},getItemSummary:e=>e.label||e.src||"Method"},assurances:{type:"array",label:"Reassurance lines",arrayFields:{text:a("Line")},getItemSummary:e=>e.text||"Line"},_gLayout:t("Layout")},resolveFields:(e,{fields:o})=>s("PaymentBadges",o,e.props,{hides:["badges"]})};export{c as PaymentBadgesFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{darkenFields as m}from"../../../darken-fields.js";import{POST_CARD_HEIGHT as e,POST_CARD_LAYOUT_FALLBACK as l,POST_CARD_LAYOUTS as n}from"../../../../../../format/lib/post-card-layout.js";import c from"../../../../../components/BlogPostSource.js";import{HeightIcon as s,ImageIcon as p,LayoutIcon as d}from"efficient-easel/icons";import{NOT_BOUND_TO_POST as g,linkField as O,sourceField as _,text as r,textarea as i,toggle as C,upload as f}from"../../../controls.js";import{group as T}from"efficient-easel/screen/lib/document/box-fields";import{placementField as u,select as h,slider as x}from"../../../box-fields.js";import{withRowRules as R}from"../../../../../../render/lib/document/show-when.js";import{POSTCARD_PH as t}from"../../../../../../format/lib/document/blocks/general/PostCard/meta.js";const a={field:"layout",is:"cover"},S={not:a},L=["placement","darken","darkenStyle","minHeight","_gTint"],y=["showCover"],A=["image","title","excerpt","href"],B={fields:R({source:_(c),image:f("Cover image","image/*"),title:i("Heading",t.title),excerpt:i("Excerpt",t.excerpt),href:O("Link"),category:r("Category",t.category),date:r("Date",t.date),readLabel:r("Read time",t.readLabel),layout:h("Card layout",o(d,{}),n,l),showCover:C("Show cover image",!0,o(p,{})),placement:u("Text position"),minHeight:x("Card height",o(s,{}),e.min,e.max,e.step,e.fallback,e.unit),_gTint:T("Image tint"),...m()},[[L,a],[y,S],[A,g]])};export{B as PostCardFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{BlockBadgeIcon as n,BorderTopIcon as p,MediaLayoutInsetIcon as a}from"efficient-easel/icons";import{FieldGlyph as m}from"../../../../../components/FieldGlyph.js";import{COUNT_KEY_PROP as s}from"../../../../../../format/lib/content/block-sources.js";import{CARD_PLACE_PROP as d,OUTSIDE_FRAMED_CARD as l,framesItsCards as f}from"../../../../../../format/lib/content/card-place.js";import{cardTemplateOwner as h}from"../../../../../../format/lib/content/card-template.js";import{CARD_ROW_FACTS as c,cardRowField as u,cardRowFields as g}from"../../../card-row-fields.js";import{textarea as w}from"../../../controls.js";import{group as x}from"efficient-easel/screen/lib/document/box-fields";import{keptByRow as b}from"efficient-easel/screen/lib/document/style-fields";import{segmented as R,select as _}from"../../../box-fields.js";import{withShowWhen as v}from"../../../../../../format/lib/document/show-when-attach.js";import{PH as F}from"../../../../../../format/lib/document/blocks/placeholders.js";import{toneField as P}from"../../shared-fields.js";import{blockAlignmentFields as y}from"../../../box-fields.js";import{consentWordsKept as H,withConsentWordsRow as T}from"../../../consent-words-field.js";import{withLiveNumberRow as A}from"../../../live-number-field.js";function C(e,o){const t=o?.textStyle;if(typeof t!="string"||!t.startsWith("heading-"))return e;const{align:O,alignPhone:I,...i}=e;return i}const Q={fields:{text:w("Body",F.body),consentWords:H("text"),[s]:b("text"),...y(),tone:P(),_gText:x("Text"),rowField:u("Shows","text"),[d]:v(R("Place",r(n,{}),[{label:"In the card",value:"",picture:r(a,{})},{label:"On the top line",value:"top-line",picture:r(p,{})}],""),{not:{context:l,is:!0}}),tag:_("HTML tag",r(m,{noun:"heading"}),[{label:"Paragraph",value:"p"},{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],"p")},resolveFields:(e,o)=>C(A(T(g(o.fields,e,o),e.props,"text"),e.props),e.props),showWhenFacts:{...c,[l]:(e,o)=>{const t=h(o.appState,e.props?.id);return t===void 0?void 0:!f(t?.type)}}};export{Q as TextFields};
|
|
@@ -1,2 +1,2 @@
|
|
|
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" | "
|
|
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" | "
|
|
1
|
+
export declare const assembleGeneralBlocks: () => Record<"ImageBlock" | "Manifesto" | "Split" | "ContactLocations" | "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" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "FAQ" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "Heading" | "Eyebrow" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "PostCard" | "Integrations", 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<"ImageBlock" | "Manifesto" | "Split" | "ContactLocations" | "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" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "FAQ" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "Heading" | "Eyebrow" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "PostCard" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
@@ -4,6 +4,8 @@ export declare const HERO_OVERLAY_ROWS: {
|
|
|
4
4
|
overlayPosition: CustomField<string>;
|
|
5
5
|
};
|
|
6
6
|
export declare function textureColorOfSlide(appState: unknown, slideId: unknown): string | undefined;
|
|
7
|
+
export declare function textureColorHint(slides: unknown): string | undefined;
|
|
8
|
+
export declare const HERO_TEXTURE_COLOR_ROW: CustomField<string>;
|
|
7
9
|
export declare const HERO_SLIDE_OVERLAY_ROWS: {
|
|
8
10
|
overlayColor: CustomField<string>;
|
|
9
11
|
overlayPosition: CustomField<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,Fragment as
|
|
1
|
+
import{jsx as r,Fragment as S}from"react/jsx-runtime";import{PlacementIcon as c,PlayIcon as f,UploadIcon as C}from"efficient-easel/icons";import{useEasel as R}from"efficient-easel/easel";import{colorInput as A,edgePad as u,plainText as L,useSelectedSibling as a}from"../controls.js";import{ColourRow as P,InheritedColourRow as I}from"../ColourControl.js";import{segmented as d}from"../box-fields.js";import{DEFAULT_TINT as O}from"../../../../format/lib/content/tint.js";import{say as n}from"../../../../format/lib/editor-words.js";import{nonEmptyString as i}from"../../../../format/lib/non-empty-string.js";import{findParentNode as T}from"../../../../format/lib/document/passes/document-position.js";import{DEFAULT_OVERLAY_POSITION as p,OVERLAY_POSITION_OPTIONS as m,slideOverlayState as y}from"../../../../format/lib/sections/hero-overlay.js";import{VIDEO_PLAYBACK_DEFAULT as h,VIDEO_PLAYBACK_LABELS as w,VIDEO_PLAYBACKS as x,VIDEO_SOURCE_DEFAULT as g,VIDEO_SOURCE_LABELS as D,VIDEO_SOURCES as U}from"../../../../format/lib/hero-video.js";const oo={overlayColor:A("Overlay color",O),overlayPosition:u("Overlay position",m,p,"A corner would need a diagonal ramp, which this overlay does not draw.",r(c,{}))},E="Texture",_=o=>u("Overlay position",m,o,"A corner would need a diagonal ramp, which this overlay does not draw.",r(c,{}),void 0,E);function V(){try{const{appState:o,selectedItem:e}=R(t=>t);return b(o,e?.props?.id)}catch{return}}function b(o,e){return i(T(o,e)?.props?.textureColor)}function F({value:o,onChange:e}){const[t]=a("overlayPosition"),l=V(),s=i(o)??"",v=y({overlayColor:s,overlayPosition:t},l);return r(I,{label:n("Overlay color"),value:s,inherited:v.color,resetTo:n(E),onChange:e,onReset:()=>e("")})}const Y=_(p),W=_("");function N(o){const[e]=a("overlayColor"),t=y({overlayColor:e,overlayPosition:o.value}).own?Y:W;return r(S,{children:t.render(o)})}function B(o){if(!Array.isArray(o))return;const e=o.flatMap((t,l)=>i(t?.props?.overlayColor)?[l+1]:[]);if(e.length!==0)return e.length===1?n("Slide {n}: own Overlay color.",{n:e[0]}):n("Slides {n}: own Overlay color.",{n:e.join(", ")})}function H({value:o,onChange:e}){const[t]=a("slides");return r(P,{label:n("Texture color"),value:o||O,onChange:e,hint:B(t)})}const eo={type:"custom",render:({value:o,onChange:e})=>r(H,{value:o,onChange:e})},ro={overlayColor:{type:"custom",render:({value:o,onChange:e})=>r(F,{value:o,onChange:e})},overlayPosition:{type:"custom",render:({value:o,onChange:e})=>r(N,{value:o,onChange:e})}},to={videoSource:d("Source",r(C,{}),U.map(o=>({label:D[o],value:o})),g),youtubeUrl:L("YouTube link","https://youtu.be/…"),videoPlayback:d("Playback",r(f,{}),x.map(o=>({label:w[o],value:o})),h)};export{oo as HERO_OVERLAY_ROWS,ro as HERO_SLIDE_OVERLAY_ROWS,eo as HERO_TEXTURE_COLOR_ROW,to as HERO_VIDEO_ROWS,B as textureColorHint,b as textureColorOfSlide};
|
|
@@ -24,6 +24,7 @@ export type PartTyping = {
|
|
|
24
24
|
};
|
|
25
25
|
export declare function partTypingTarget(partId: string, deps: PartTypingDeps): PartTyping | null;
|
|
26
26
|
export declare function partElement(last: Pick<HTMLElement, "isConnected" | "getAttribute"> | null, doc: Pick<Document, "querySelector"> | null, partId: string): HTMLElement | null;
|
|
27
|
+
export declare function cssString(value: string): string;
|
|
27
28
|
export declare function keysOnCanvas(doc: Pick<Document, "activeElement">): boolean;
|
|
28
29
|
export declare function canvasTypingPart(): string | null;
|
|
29
30
|
export declare function setCanvasTypingPart(partId: string | null): void;
|
|
@@ -1 +1 @@
|
|
|
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
|
+
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,h as cssString,ne as keysOnCanvas,te as partElement,$ as partTextTools,ee as partTypingTarget,re as setCanvasTypingPart,W as subscribeCanvasTypingPart,oe as useCanvasTypingPart};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CanvasCopyPlace, CanvasCopyText } from "efficient-easel/easel";
|
|
2
|
+
import type { CopyItemRequest } from "efficient-easel/screen";
|
|
3
|
+
import { type PartTyping, type PartTypingDeps } from "./canvas-typing.js";
|
|
4
|
+
type CopyAt = Omit<CanvasCopyPlace, "count"> & {
|
|
5
|
+
count?: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function copyRowPart(copy: CopyAt, deps: PartTypingDeps): string | null;
|
|
8
|
+
export declare function copyRowTarget(copy: CopyAt, deps: PartTypingDeps): PartTyping | null;
|
|
9
|
+
export declare function copyRowValue(copy: CopyAt, deps: PartTypingDeps): string | undefined;
|
|
10
|
+
export declare function writeCopyText(edit: CanvasCopyText, deps: PartTypingDeps): boolean;
|
|
11
|
+
export declare function copyItemWrite(request: CopyItemRequest, deps: PartTypingDeps): boolean;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{encodePartId as u}from"efficient-easel/draw";import{insertAt as d,moveTo as p,removeAt as m}from"efficient-easel/fields";import{declaredBlockSource as w}from"../../../format/lib/content/block-sources.js";import{cardTemplateTypedRows as x,rowFieldOf as y}from"../../../format/lib/content/card-template.js";import{partTypingTarget as I}from"./canvas-typing.js";import{encodePartKey as g}from"../../../format/lib/document/part-key.js";function c(e,t){if(e.outer)return null;const r=t.getItemById(e.ownerId);if(!r)return null;const o=x(r.type);return!o||w(r.props)?null:{node:r,rows:o}}function A(e,t){const r=c(e,t),o=t.getItemById(e.nodeId);if(!r||!o)return null;const l=y(o.type,o.props,e.key);if(!l)return null;const n=r.node.props[r.rows];return!Array.isArray(n)||e.index<0||e.index>=n.length?null:u(e.ownerId,g(r.rows,{index:e.index,rowKey:l}))}function f(e,t){const r=A(e,t);return r?I(r,t):null}function R(e,t){return f(e,t)?.value}function B(e,t){const r=f(e,t);return r?(r.write(e.text),!0):!1}function E(e,t){const r=c(e,t),o=r&&t.getSelectorForId(e.ownerId);if(!r||!o)return!1;const l=r.node.props,n=l[r.rows],i=e.index;if(!Array.isArray(n)||i<0||i>=n.length)return!1;let s;switch(e.action){case"addAfter":{const a=t.components[r.node.type]?.fields?.[r.rows];s=d(n,i+1,{...a?.defaultItemProps??{}});break}case"moveEarlier":case"moveLater":{const a=e.action==="moveEarlier"?i-1:i+1;if(a<0||a>=n.length)return!1;s=p(n,i,a);break}case"delete":s=m(n,i);break;default:return!1}return t.replace(o.zone,o.index,{...r.node,props:{...l,[r.rows]:s}}),!0}export{E as copyItemWrite,A as copyRowPart,f as copyRowTarget,R as copyRowValue,B as writeCopyText};
|
|
@@ -17,10 +17,15 @@ export declare function cardDisplayItems(card: Card, label: (child: Child) => st
|
|
|
17
17
|
shown: boolean;
|
|
18
18
|
}[];
|
|
19
19
|
export declare function withChildShown<C extends Card>(card: C, id: string, shown: boolean): C;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
type ChipOwner = {
|
|
21
|
+
type?: unknown;
|
|
22
|
+
props?: Record<string, unknown>;
|
|
23
|
+
} | null | undefined;
|
|
24
|
+
export declare function cardChipLabel(child: Child, ownerType: string | undefined, layers: (child: Child) => string, owner?: ChipOwner): string;
|
|
25
|
+
export declare function CardDisplayChips({ card, ownerType, owner, labelOf, write, readOnly, }: {
|
|
22
26
|
card: Card;
|
|
23
27
|
ownerType: string | undefined;
|
|
28
|
+
owner?: ChipOwner;
|
|
24
29
|
labelOf: (type: string) => string;
|
|
25
30
|
write: (next: (latest: Card) => Card) => void;
|
|
26
31
|
readOnly?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as d}from"react/jsx-runtime";import{isNodeList as N}from"efficient-easel/data";import{useEasel as O}from"efficient-easel/easel";import{slotChildName as g,slotChildRowName as h}from"efficient-easel/draw";import{cardTemplateCardOwner as _,cardTemplateField as D,namedRowField as S}from"../../../format/lib/content/card-template.js";import{DisplayRow as C,useSelectedPatch as T}from"./controls.js";import{websiteNodeIsLocked as b}from"./locked-blocks.js";import{stripMarkup as A}from"../../../format/lib/markup.js";import{sourceRowName as E}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as F}from"../../../format/lib/document/show-when-attach.js";import{deviceField as L}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as M}from"efficient-easel/screen/lib/document/panel-no-control-mark";const x="notCardOfTemplate",P={not:{context:x,is:!0}},Z={[x]:(e,n)=>{const t=_(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function m(e){const n=e.props?.content;return N(n)?n:[]}const c=e=>!!e.props?._hidden;function R(e,n=()=>!1){return m(e).flatMap(t=>typeof t?.props?.id!="string"?[]:m(t).length&&!c(t)?R(t,n):n(t)?[]:[t])}function k(e,n,t){const p=R(e,t).map(r=>({child:r,name:n(r)})),s=new Set(p.map(r=>r.name)),a=new Set;return p.map(({child:r,name:i})=>{let u=i;if(a.has(i)){let o=2;for(;s.has(`${i} ${o}`);)o+=1;u=`${i} ${o}`,s.add(u)}return a.add(i),{id:r.props.id,label:u,shown:!c(r)}})}function w(e,n){return m(e).flatMap(t=>c(t)?n(t)?[]:[t,...w(t,n)]:w(t,n))}function y(e,n,t){const p=m(e);let s=!1;const a=p.map(r=>{if(s)return r;let i;if(r?.props?.id===n){if(t?!("_hidden"in r.props):c(r))return r;const{_hidden:u,...o}=r.props;i={...r,props:t?o:{...o,_hidden:!0}}}else i=y(r,n,t);return s=i!==r,i});return s?{...e,props:{...e.props,content:a}}:e}function $(e,n,t,p){return g(e).trim()?t(e):D(n,S(e.props),p)?.label??t(e)}const B="This page is read-only.";function I({card:e,ownerType:n,owner:t,labelOf:p,write:s,readOnly:a}){const r=o=>h(o,p,A,void 0,E),i=o=>b(o.type,o),u=k(e,o=>$(o,n,r,t),i);return u.length?d(C,{parts:u,changed:u.some(o=>!o.shown),shown:o=>u.find(f=>f.id===o)?.shown??!0,disabledReason:a?B:void 0,onPress:(o,f)=>s(l=>y(l,o,f)),onReset:()=>s(o=>w(o,i).reduce((f,l)=>y(f,String(l.props.id),!0),o))}):d(M,{})}function j(){try{const e=O(s=>s),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const p=_(e.appState,t.props?.id);return{labelOf:s=>n[s]?.label??s,card:t,ownerType:typeof p?.type=="string"?p.type:void 0,owner:p}}catch{return null}}function v({readOnly:e}){const n=j(),t=T();return n?d(I,{...n,readOnly:e,write:p=>{e||t(s=>{const a={...n.card,props:s},r=p(a);return r===a?null:{content:r.props.content}})}}):d(C,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function ee(){return F(L("desktop",{type:"custom",render:({readOnly:e})=>d(v,{readOnly:e})}),P)}export{Z as CARD_BOX_FACTS,I as CardDisplayChips,x as NOT_CARD_OF_TEMPLATE,P as ON_A_CARD,$ as cardChipLabel,ee as cardDisplayField,k as cardDisplayItems,R as cardDisplayParts,y as withChildShown};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as T}from"react/jsx-runtime";import{ListIcon as h}from"efficient-easel/icons";import{FieldGlyph as _}from"../../components/FieldGlyph.js";import{cardTemplateFieldsOf as A,cardTemplateOwner as x}from"../../../format/lib/content/card-template.js";import{blockSourcesRevision as C,declaredBlockSource as E}from"../../../format/lib/content/block-sources.js";import{select as g}from"./box-fields.js";import{withShowWhen as j}from"../../../format/lib/document/show-when-attach.js";const b="outsideCardTemplate",F={not:{context:b,is:!0}},W={[b]:(o,e)=>{const n=x(e.appState,o.props?.id);return n===void 0?void 0:n===null}};function B(o,e){const n=e==="link"?T(_,{noun:"link"}):T(h,{}),r={...g(o,n,[{label:"Typed here",value:""}],""),cardRowKind:e};return j(r,F)}function O(o){return!!(o&&typeof o=="object"&&"cardRowKind"in o)}const k=new WeakMap;function P(o,e,n){const r=Object.keys(o).filter(t=>O(o[t]));if(!r.length)return o;const i=e.props??{},c=x(n.appState,i.id),w=typeof c?.type=="string"?c.type:"",p=r.map(t=>typeof i[t]=="string"?i[t].trim():""),S=E(c?.props),f=`${w}\0${S}\0${C()}\0${p.join("\0")}`;let s=k.get(o);s||k.set(o,s=new Map);const y=s.get(f);if(y)return y;const l={...o};return r.forEach((t,u)=>{const d=o[t],R=w?A(c,d.cardRowKind):[],m=p[u]&&!R.some(a=>a.key===p[u])?p[u]:"";l[t]={...d,options:[...d.options,...R.map(a=>({label:a.label,value:a.key})),...m?[{label:m,value:m}]:[]]}}),s.set(f,l),l}export{W as CARD_ROW_FACTS,F as IN_CARD_TEMPLATE,b as OUTSIDE_CARD_TEMPLATE,B as cardRowField,P as cardRowFields};
|
|
@@ -193,6 +193,7 @@ export declare function cardShapeFields(): Record<string, unknown>;
|
|
|
193
193
|
export declare function boxShareField(points?: readonly (typeof BOX_SHARE_POINTS)[number][], fallback?: string): CustomField<string>;
|
|
194
194
|
export declare function boxBlockSpacingField(): SelectField;
|
|
195
195
|
export declare function boxSharePhoneField(): CustomField<string>;
|
|
196
|
+
export declare function boxShareTabletField(): import("efficient-easel/screen/lib/document/box-fields").BoxField<string>;
|
|
196
197
|
export declare function boxPhoneRowField(): import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
|
|
197
198
|
export declare function boxColumnsFields(): {
|
|
198
199
|
phoneRow: import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
|