efficient-web-builder 63.0.0 → 64.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 +25 -0
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/lib/animation/fields.js +1 -1
- package/dist/editor/lib/animation/loop-fields.js +1 -1
- package/dist/editor/lib/animation/scroll-fields.d.ts +3 -0
- package/dist/editor/lib/animation/scroll-fields.js +1 -0
- package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
- package/dist/editor/lib/document/card-display-chips.d.ts +3 -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 +7 -2
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/part-motion-canvas.d.ts +2 -1
- package/dist/editor/lib/document/part-motion-canvas.js +1 -1
- package/dist/format/lib/animation/loop.d.ts +1 -0
- package/dist/format/lib/animation/loop.js +1 -1
- package/dist/format/lib/animation/mark-zoom.d.ts +11 -0
- package/dist/format/lib/animation/mark-zoom.js +1 -0
- package/dist/format/lib/animation/scroll.d.ts +20 -0
- package/dist/format/lib/animation/scroll.js +1 -0
- package/dist/format/lib/content/block-sources.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +1 -1
- package/dist/format/lib/content/card-template.d.ts +8 -5
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/image-aspect.d.ts +6 -0
- package/dist/format/lib/content/image-aspect.js +1 -1
- package/dist/format/lib/content/section-sticky.d.ts +29 -13
- package/dist/format/lib/content/section-sticky.js +1 -1
- package/dist/format/lib/content/slot-field-blocks.d.ts +1 -0
- package/dist/format/lib/content/slot-field-blocks.js +1 -0
- package/dist/format/lib/document/blocks/block-types.d.ts +2 -0
- package/dist/format/lib/document/blocks/general/Banner/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ContactLocations/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/FeaturedCover/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Hero/meta.d.ts +1 -0
- 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/ImageBlock/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/IntroBleed/meta.js +2 -2
- package/dist/format/lib/document/blocks/general/LogoBlock/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Logos/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/LongRead/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Manifesto/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/PaymentBadges/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/PostCard/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/SectionHeader/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Split/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Timeline/meta.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +5 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +10 -0
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/render/components/Banner.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +1 -0
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/ContactLocations.js +2 -2
- package/dist/render/components/HeroPictures.d.ts +22 -2
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +2 -1
- package/dist/render/components/InBoxContext.js +1 -1
- package/dist/render/components/IntroBleed.d.ts +1 -2
- package/dist/render/components/IntroBleed.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/Logos.js +1 -1
- package/dist/render/components/PictureZoom.d.ts +24 -0
- package/dist/render/components/PictureZoom.js +1 -0
- package/dist/render/components/Placeholder.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/components/ScrollEffect.d.ts +14 -0
- package/dist/render/components/ScrollEffect.js +1 -0
- package/dist/render/components/ScrollProgressArm.d.ts +5 -0
- package/dist/render/components/ScrollProgressArm.js +1 -0
- package/dist/render/components/SectionAnimation.d.ts +4 -0
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/SectionHeader.js +1 -1
- package/dist/render/lib/animation/part-motion.d.ts +4 -1
- package/dist/render/lib/animation/part-motion.js +2 -2
- package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
- package/dist/render/lib/document/blocks/general/IntroBleed/render.js +1 -1
- 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-editorial.js +1 -1
- package/dist/render/lib/document/page-frame.d.ts +2 -1
- package/dist/render/lib/document/page-frame.js +1 -1
- package/dist/render/lib/document/part-styles.d.ts +9 -0
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/scroll-effect.d.ts +3 -0
- package/dist/render/lib/document/passes/scroll-effect.js +1 -0
- package/dist/render/lib/document/passes/section-sticky.js +1 -1
- package/dist/render/lib/document/passes/slots-start-afresh.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design"},H={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return H[a]??$[a]??I[o]}function pe(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),p=h(C?C.inner:a),l=p?I[p.label]:void 0;if(l)for(const g of G(l))t.includes(g)||t.push(g)}return t}const ge=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let p=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(p=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",H],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{H as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,pe as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
|
|
1
|
+
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as A}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const B=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design"},H={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return H[a]??$[a]??I[o]}function pe(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),p=h(C?C.inner:a),l=p?I[p.label]:void 0;if(l)for(const g of G(l))t.includes(g)||t.push(g)}return t}const ge=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(A()),...Object.keys(A())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...A()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let p=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(p=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",H],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=B.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return B.some(t=>d[t]in e)}function Oe(e){const t=B.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{H as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,B as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,pe as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type SeenEntrance } from "../../../render/components/SectionAnimation.js";
|
|
2
|
+
import { type ScrollView } from "../../../format/lib/animation/scroll.js";
|
|
2
3
|
import { PART_LIFT_ATTR, type PartMotion } from "../../../render/lib/animation/part-motion.js";
|
|
3
4
|
export { PART_LIFT_ATTR };
|
|
4
5
|
export type SeenPartEntrances = Map<string, SeenEntrance>;
|
|
@@ -6,4 +7,4 @@ type StampedPart = {
|
|
|
6
7
|
element: HTMLElement;
|
|
7
8
|
partKey: string;
|
|
8
9
|
};
|
|
9
|
-
export declare function paintPartMotion(stamped: readonly StampedPart[], motionOf: (partKey: string) => PartMotion | undefined,
|
|
10
|
+
export declare function paintPartMotion(stamped: readonly StampedPart[], motionOf: (partKey: string) => PartMotion | undefined, viewOrPhone: ScrollView | boolean, seen: SeenPartEntrances): () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ENTRANCE_ATTR as
|
|
1
|
+
import{ENTRANCE_ATTR as b,playEntrance as k}from"efficient-shell/format";import{entranceReplay as A}from"../../../render/components/SectionAnimation.js";import{entranceOf as y}from"../../../render/lib/animation/entrance.js";import{scrollOf as x}from"../../../format/lib/animation/scroll.js";import{PART_LIFT_ATTR as d,drawPartEntrance as E,drawPartScroll as M,ensurePartLiftSheet as R,firstOnPage as T,partBoxOf as P,partMotionDrawn as _}from"../../../render/lib/animation/part-motion.js";const h=new WeakMap;function C(c,r,f,m){const i=typeof f=="boolean"?f?"phone":"desktop":f,w=i==="phone",p=[],l=new Map;for(const{partKey:e}of c){if(l.has(e))continue;const t=r(e)??{},s=y(t,"desktop"),n=y(t,"phone"),a=m.get(e),o=a?A.next(a,s,n,w):null;m.set(e,o?o.seen:A.seed(s,n)),l.set(e,o?.play??!1)}const u=new Map,g=c.filter(e=>!c.some(t=>t!==e&&t.partKey===e.partKey&&t.element.contains(e.element)));for(const e of g){const t=P(e.element);t&&u.set(t,[...u.get(t)??[],e])}for(const[e,t]of u){const s=o=>_(r(o.partKey)??{}),n=T(t.filter(o=>s(o).entrance));if(n){const o=r(n.partKey)??{};p.push(E(e,y(o,w?"phone":"desktop")));const K=h.get(e);h.set(e,n.partKey),(l.get(n.partKey)||K!==void 0&&K!==n.partKey)&&e.hasAttribute(b)&&k(e)}else h.delete(e);const a=e.hasAttribute(b)?void 0:T(t.filter(o=>x(r(o.partKey)??{},i).effect!=="none"));a&&p.push(M(e,x(r(a.partKey)??{},i))),t.some(o=>s(o).hover==="lift")&&(R(e.ownerDocument),e.setAttribute(d,""),p.push(()=>e.removeAttribute(d)))}return()=>p.forEach(e=>e())}export{d as PART_LIFT_ATTR,C as paintPartMotion};
|
|
@@ -7,6 +7,7 @@ export declare const LOOP_OPTIONS: readonly {
|
|
|
7
7
|
value: Loop;
|
|
8
8
|
}[];
|
|
9
9
|
export declare function parseLoop(value: unknown): Loop;
|
|
10
|
+
export declare const LOOP_GROUP_KEY = "_gLoop";
|
|
10
11
|
export declare const LOOP_SCROLLS: ShowWhenRule;
|
|
11
12
|
export type LoopDirection = "left" | "right" | "up" | "down";
|
|
12
13
|
export declare const DEFAULT_LOOP_DIRECTION: LoopDirection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{MOTION_EASING as p,MOTION_TIMING as e,motionSeconds as l}from"efficient-shell/format";import{parseOption as r}from"../parse-option.js";const
|
|
1
|
+
import{MOTION_EASING as p,MOTION_TIMING as e,motionSeconds as l}from"efficient-shell/format";import{parseOption as r}from"../parse-option.js";const O="none",i=[{label:"None",value:"none"},{label:"Marquee",value:"scroll"}];function _(o){return r(i,O,o)}const x="_gLoop",D={field:"loop",is:"scroll"},u="left",c=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],a={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function d(o){return r(c,u,o)}function E(o){return o==="up"||o==="down"}function N(o){return l("loop","duration",o.loopDuration!=null?o.loopDuration:o.speed)}const I=e.loop.duration.default,f=e.loop.delay.default;function P(o){return l("loop","delay",o.loopDelay)}function T(o,n,t=f){return`${a[o]} ${n}s ${p.loop}${t?` ${t}s`:""} infinite`}export{f as DEFAULT_LOOP_DELAY,u as DEFAULT_LOOP_DIRECTION,I as DEFAULT_LOOP_SECONDS,c as LOOP_DIRECTION_OPTIONS,x as LOOP_GROUP_KEY,O as LOOP_NONE,i as LOOP_OPTIONS,D as LOOP_SCROLLS,E as isVerticalLoop,T as loopAnimation,P as loopDelayOf,N as loopSecondsOf,_ as parseLoop,d as parseLoopDirection};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const MARK_GAP_PX = 4;
|
|
2
|
+
export interface MarkRect {
|
|
3
|
+
readonly left: number;
|
|
4
|
+
readonly top: number;
|
|
5
|
+
readonly width: number;
|
|
6
|
+
readonly height: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function markZoomCap(mark: MarkRect, others: readonly {
|
|
9
|
+
rect: MarkRect;
|
|
10
|
+
mark: boolean;
|
|
11
|
+
}[], zoom: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const x=4;function s(h,i,e,n){return i<=0?1/0:n?2*(h-4)/(i+e):2*(h-e/2-4)/i}function g(h,i,e){const n=t=>t.width>0&&t.height>0;if(!n(h)||i.some(t=>t.mark&&!n(t.rect)))return 1;const a=h.left+h.width/2,d=h.top+h.height/2;let o=e;for(const{rect:t,mark:c}of i){const f=Math.abs(t.left+t.width/2-a),M=Math.abs(t.top+t.height/2-d),r=Math.max(s(f,h.width,t.width,c),s(M,h.height,t.height,c));o=Math.min(o,Math.max(1,r))}return o}export{x as MARK_GAP_PX,g as markZoomCap};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ScrollValue } from "efficient-shell/format";
|
|
2
|
+
export declare const SCROLL_KEYS: {
|
|
3
|
+
readonly effect: "scroll";
|
|
4
|
+
readonly zoom: "scrollZoom";
|
|
5
|
+
readonly start: "scrollStart";
|
|
6
|
+
readonly end: "scrollEnd";
|
|
7
|
+
};
|
|
8
|
+
export declare const SCROLL_GROUP_KEY = "_gScroll";
|
|
9
|
+
export declare const SCROLL_CUSTOMIZE_KEY = "_cScroll";
|
|
10
|
+
export type ScrollView = "desktop" | "tablet" | "phone";
|
|
11
|
+
export declare const scrollViewKey: (key: string, view: ScrollView) => string;
|
|
12
|
+
export declare const SCROLL_STORE_KEYS: readonly string[];
|
|
13
|
+
type Props = Readonly<Record<string, unknown>>;
|
|
14
|
+
export declare function scrollOf(props: Props, view: ScrollView): ScrollValue;
|
|
15
|
+
export type ScrollViews = Readonly<Record<ScrollView, ScrollValue>>;
|
|
16
|
+
export declare function scrollDrawn(props: Props): ScrollViews | null;
|
|
17
|
+
export type ScrollOrigins = Readonly<Partial<Record<ScrollView, string>>>;
|
|
18
|
+
export declare function scrollOrigins(points: Readonly<Partial<Record<ScrollView, string>>>): ScrollOrigins;
|
|
19
|
+
export declare function scrollOriginsOf(props: Props, focusKey: string): ScrollOrigins;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{FOLLOW_RULES as O,phoneKey as S,resolveViewValue as m,tabletKey as L}from"efficient-easel/screen/lib/content/view-tiers";import{parseFocal as b,formatFocal as h,readScroll as x}from"efficient-shell/format";import{viewFocusValues as _}from"../content/picture-focus-rows.js";const n={effect:"scroll",zoom:"scrollZoom",start:"scrollStart",end:"scrollEnd"},C="_gScroll",V="_cScroll",f=["desktop","tablet","phone"],l=(t,o)=>o==="phone"?S(t):o==="tablet"?L(t):t,F=Object.values(n).flatMap(t=>f.map(o=>l(t,o))),c=t=>t===null||t===""?void 0:t,u=(t,o,e)=>m("same",c(t),c(o),c(e),O);function r(t,o,e){return u(t[l(o,"desktop")],t[l(o,"tablet")],t[l(o,"phone")])[e]}function s(t,o){return x(r(t,n.effect,o),r(t,n.zoom,o),r(t,n.start,o),r(t,n.end,o))}function Y(t){const o={desktop:s(t,"desktop"),tablet:s(t,"tablet"),phone:s(t,"phone")};return f.every(e=>o[e].effect==="none")?null:o}function E(t){const o=u(t.desktop,t.tablet,t.phone),e=i=>{const a=o[i];if(typeof a!="string")return;const{x:d,y:p}=b(a);return h(d,p)};return{desktop:e("desktop"),tablet:e("tablet"),phone:e("phone")}}function k(t,o){return E(_(t,o))}export{V as SCROLL_CUSTOMIZE_KEY,C as SCROLL_GROUP_KEY,n as SCROLL_KEYS,F as SCROLL_STORE_KEYS,Y as scrollDrawn,s as scrollOf,E as scrollOrigins,k as scrollOriginsOf,l as scrollViewKey};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{globalRegistry as c}from"../global-registry.js";import{nonEmptyString as a}from"../non-empty-string.js";const
|
|
1
|
+
import{globalRegistry as c}from"../global-registry.js";import{nonEmptyString as a}from"../non-empty-string.js";import{slotFieldBlocks as f}from"./slot-field-blocks.js";const p="dataSource",g="dataSourceOptions",u="dataRows",w="countKey",A="counts",C="location-payment-methods",P="shop-payment-methods",v="delivery-options";function y(e){return typeof e.open=="function"}const m=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function n(){return c("efficient.block-sources",()=>({sources:new Map,revision:0}))}const d=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!==""),b=e=>[e?.key,e?.label].every(t=>typeof t=="string"&&t.trim()!==""),l=e=>typeof e=="string"&&e.trim()!=="";function h(e){if(!e||!l(e.label))return null;if(y(e))return{label:e.label.trim(),open:e.open};const t=e.href;return l(t)?{label:e.label.trim(),href:t.trim()}:null}function k(e){if(typeof e.key!="string"||!m.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(r=>typeof r!="string"||!r))throw new Error(`The block source ${e.key} names no block it can fill.`);const t=e.blocks.find(r=>f().has(r));if(t)throw new Error(`The block source ${e.key} names ${t}, whose card template declares slot fields: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);const o=h(e.edit);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(r=>i(r)).filter(r=>r!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(d)}:{},...Array.isArray(e.fields)?{fields:e.fields.filter(b).map(r=>({...r}))}:{},...o?{edit:o}:{},...typeof e.useRows=="function"?{useRows:e.useRows}:{},...Array.isArray(e.records)?{records:e.records.filter(r=>typeof r=="string"&&r.trim()!=="").map(r=>r.trim())}:{}}}function T(e){const t=e.map(k),o=n();for(const r of t)o.sources.set(r.key,r);t.length&&(o.revision+=1)}function U(e){const t=[...n().sources.values()];return e===void 0?t:t.filter(o=>o.blocks.includes(e))}function O(e){return n().sources.get(e)??null}function N(e){return n().sources.get(e)?.choices??[]}function B(){return n().revision}function S(e){const t=e?.[p];return typeof t=="string"?t.trim():""}function i(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t={};for(const[o,r]of Object.entries(e)){const s=a(r);s&&(t[o]=s)}return Object.keys(t).length?t:null}function E(e){const t=e?.[u];return Array.isArray(t)?t.map(i).filter(o=>o!==null):null}function K(e,t,o=[]){const r=E(e);if(r!==null&&(r.length||!t))return{rows:r,sample:!1};if(!t)return{rows:[],sample:!1};const s=O(S(e))?.sample;return{rows:s?.length?s:o,sample:!0}}export{g as BLOCK_SOURCE_OPTIONS_PROP,p as BLOCK_SOURCE_PROP,u as BLOCK_SOURCE_ROWS_PROP,A as COUNTS_SOURCE,w as COUNT_KEY_PROP,v as DELIVERY_OPTIONS_SOURCE,C as LOCATION_PAYMENT_METHODS_SOURCE,P as SHOP_PAYMENT_METHODS_SOURCE,O as blockSourceSpec,U as blockSources,B as blockSourcesRevision,S as declaredBlockSource,y as isSourceEditAction,T as registerBlockSources,E as servedRows,N as sourceChoices,K as sourcedRows};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const BOX_SHAPES: ("square" | "auto" | "video" | "screen" | "
|
|
1
|
+
export declare const BOX_SHAPES: ("square" | "auto" | "video" | "screen" | "tall" | "wide" | "landscape" | "portrait" | "panorama" | "story" | "poster")[];
|
|
2
2
|
export type BoxShape = (typeof BOX_SHAPES)[number];
|
|
3
3
|
export declare function boxShapeOf(value: unknown): BoxShape;
|
|
4
4
|
export declare function boxShapeClass(value: unknown): string;
|
|
@@ -32,6 +32,7 @@ export interface CardRowFieldSpec {
|
|
|
32
32
|
export interface CardTemplateSlotSpec {
|
|
33
33
|
slot: string;
|
|
34
34
|
label?: string;
|
|
35
|
+
fields?: readonly CardRowFieldSpec[];
|
|
35
36
|
}
|
|
36
37
|
export interface CardTemplateSpec {
|
|
37
38
|
block: string;
|
|
@@ -60,18 +61,19 @@ export declare function cardTemplateSlotNames(type: unknown): readonly string[];
|
|
|
60
61
|
export declare function isCardTemplateSlot(type: unknown, slot: string): boolean;
|
|
61
62
|
export declare function cardTemplateSlotLabel(type: unknown, slot: string): string | null;
|
|
62
63
|
export declare function cardTemplateFields(type: string, kind?: CardRowFieldKind): readonly CardRowFieldSpec[];
|
|
63
|
-
export declare function defaultListField(type: unknown): string;
|
|
64
|
-
export declare function cardListShows(props: Record<string, unknown> | null | undefined, ownerType: unknown): string;
|
|
64
|
+
export declare function defaultListField(type: unknown, slot?: string): string;
|
|
65
|
+
export declare function cardListShows(props: Record<string, unknown> | null | undefined, ownerType: unknown, slot?: string): string;
|
|
65
66
|
export declare function cardTemplateFieldsOf(owner: {
|
|
66
67
|
type?: unknown;
|
|
67
68
|
props?: Record<string, unknown>;
|
|
68
|
-
} | null | undefined, kind?: CardRowFieldKind): readonly CardRowFieldSpec[];
|
|
69
|
+
} | null | undefined, kind?: CardRowFieldKind, slot?: string): readonly CardRowFieldSpec[];
|
|
69
70
|
export declare function cardTemplateField(type: string | undefined, key: string, owner?: {
|
|
70
71
|
type?: unknown;
|
|
71
72
|
props?: Record<string, unknown>;
|
|
72
|
-
} | null): CardRowFieldSpec | null;
|
|
73
|
+
} | null, slot?: string): CardRowFieldSpec | null;
|
|
73
74
|
export declare function rowFieldSpec(copy: {
|
|
74
75
|
ownerType?: string;
|
|
76
|
+
slot?: string;
|
|
75
77
|
fields?: readonly CardRowFieldSpec[];
|
|
76
78
|
owner?: {
|
|
77
79
|
type?: unknown;
|
|
@@ -90,12 +92,13 @@ export declare function rowPartByKey(type: string, props: Record<string, unknown
|
|
|
90
92
|
export declare function rowBound(type: string, props: Record<string, unknown> | null | undefined, key: string): boolean;
|
|
91
93
|
export declare function rowFieldOf(type: string, props: Record<string, unknown> | null | undefined, key: string): string;
|
|
92
94
|
export declare function rowFieldText(row: SourceRow | null | undefined, key: string): string | null;
|
|
93
|
-
export declare function rowFilledProps(type: string, props: Record<string, unknown>, row: SourceRow | null | undefined, ownerType?: string, fields?: readonly CardRowFieldSpec[]): Record<string, unknown>;
|
|
95
|
+
export declare function rowFilledProps(type: string, props: Record<string, unknown>, row: SourceRow | null | undefined, ownerType?: string, fields?: readonly CardRowFieldSpec[], slot?: string): Record<string, unknown>;
|
|
94
96
|
type DocNode = {
|
|
95
97
|
type?: unknown;
|
|
96
98
|
props?: Record<string, unknown>;
|
|
97
99
|
};
|
|
98
100
|
export declare function cardTemplateOwner(appState: unknown, id: unknown): DocNode | null | undefined;
|
|
101
|
+
export declare function cardTemplateSlotOf(appState: unknown, id: unknown): string | null | undefined;
|
|
99
102
|
export declare function cardTemplateCardOwner(appState: unknown, id: unknown): DocNode | null | undefined;
|
|
100
103
|
export declare function cardCopyPlace(appState: unknown, id: unknown): CardCopyPlace | undefined;
|
|
101
104
|
export declare function cardListFieldsOf(appState: unknown, list: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{blockSourceSpec as x,declaredBlockSource as w}from"./block-sources.js";import{isNodeList as C}from"efficient-easel/data";import{BOX_TYPE as _}from"../document/container-blocks.js";import{globalRegistry as A}from"../global-registry.js";import{nonEmptyString as T}from"../non-empty-string.js";import{accentItalicRuns as I}from"../markup.js";import{withCardsTemplate as E}from"../document/cards-template-on-read.js";import{withCardListTemplate as F}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as P,withArticleBodyTemplate as D}from"../document/article-body-seed.js";import{withLogosTemplate as v}from"../document/blocks/general/Logos/card-seed.js";import{withFaqTemplate as W}from"../document/blocks/general/FAQ/card-seed.js";import{withFootprintSideTemplate as M}from"../document/blocks/general/Footprint/card-seed.js";const B="template",N="Card template",y="CardList",h=["Text","ImageBlock","ButtonBlock","Flex"],p="rowField",K="rowLinkField";function be(){return{type:"slot",allow:[...h]}}const j=h.filter(e=>e!=="ButtonBlock"),L="items",R="itemFields";function ke(){return{type:"slot",allow:[...j]}}const H=[{block:"OrderSummary",typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"FAQ",typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>W(e)},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>M(e)},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],seed:e=>E("Cards",e)},{block:"ProcessSteps",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:y,label:"Card list"}]},{block:"Logos",fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>v(e)},{block:y,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:L,seed:e=>F(e)},{block:P,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>D(e)}];function a(){return A("efficient.card-templates",()=>new Map(H.map(e=>[e.block,e])))}function ge(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const r=[];for(const o of t.blocks??[]){if(typeof o?.type!="string"||!o.type)throw new Error(`The card template of ${t.block} names an empty block.`);r.some(l=>l.type===o.type)||r.push({type:o.type,label:o.label||o.type})}const n=[];for(const o of t.slots??[]){if(typeof o?.slot!="string"||!o.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);const l=T(o.label);n.some(s=>s.slot===o.slot)||n.push(l?{slot:o.slot,label:l}:{slot:o.slot})}const i=T(t.typedRows);a().set(t.block,{block:t.block,...n.length?{slots:n}:{},fields:t.fields.map(o=>({...o})),blocks:r,typedRows:i,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function Y(e,t){const r=e?a().get(e)?.seed:void 0;return r?r(t):t}function xe(e,t){const r=$(e),n=(r.length?r:[B]).filter(s=>t[s]===void 0||Array.isArray(t[s])&&t[s].length===0);if(!n.length)return t;const i={...t};for(const s of n)delete i[s];const o=e?a().get(e)?.seedOnInsert:void 0,l=o?o(i):Y(e,i);return l===i?t:l}function we(){for(const e of a().values())if(e.blocks?.length)return!0;return!1}function Te(e){return a().get(e)?.blocks??[]}function Be(e){for(const t of a().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function he(e){return typeof e=="string"&&a().get(e)?.typedRows||""}function Le(e){return typeof e=="string"&&a().get(e)?.linesBetween===!0}function Re(e){return typeof e=="string"&&a().has(e)}const U=[{slot:B}];function m(e){if(typeof e!="string")return[];const t=a().get(e);return t?t.slots??U:[]}function $(e){return m(e).map(t=>t.slot)}function Q(e,t){return m(e).some(r=>r.slot===t)}function Oe(e,t){const r=m(e).find(n=>n.slot===t);return r?r.label??N:null}function q(e,t){const r=a().get(e)?.fields??[];return t?r.filter(n=>(n.kind??"text")===t):r}function V(e){return typeof e=="string"?q(e,"list")[0]?.key??"":""}function X(e,t){return b(e)||V(t)}function O(e,t){const r=typeof e?.type=="string"?e.type:"";if(!r)return[];const n=a().get(r)?.fields??[],i=x(w(e?.props))?.fields,o=i?.length?[...i.map(l=>({...l})),...n.filter(l=>l.everySource&&!i.some(s=>s.key===l.key))]:n;return t?o.filter(l=>(l.kind??"text")===t):o}function z(e,t,r){return e?r?O(r).find(n=>n.key===t)??null:a().get(e)?.fields.find(n=>n.key===t)??null:null}function S(e,t){return!e||!t?null:e.fields?.find(r=>r.key===t)??z(e.ownerType,t,e.owner)}function Se(e,t){return S(e,t)?.plain===!0}function b(e,t=p){const r=e?.[t];return typeof r=="string"?r.trim():""}function Ce(e,t){return e.key||String(t+1)}function _e(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[r,n]of Object.entries(e))typeof n=="string"&&(t[r]=n);return t}const G="hideWhenRowEmpty";function Ae(e,t){const r=e[G];return!t||!Array.isArray(r)||!r.length?!1:r.every(n=>typeof n!="string"||!t[n]?.trim())}const k={Text:{text:p},ImageBlock:{src:p},ButtonBlock:{label:p,href:K},LogoBlock:{alt:p},Breadcrumb:{currentCrumb:p}},Ie=k,J=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Ee(e,t,r){return Z(e,t,r)&&!J.has(`${e}.${r}`)}function Z(e,t,r){return ee(e,t,r)!==""}function ee(e,t,r){const n=k[e]?.[r];return n?b(t,n):""}function te(e,t){return!t||!e?null:e[t]??""}function Fe(e,t,r,n,i){if(!r)return t;let o=null;for(const[l,s]of Object.entries(k[e]??{})){const f=b(t,s),c=te(r,f);c!==null&&(o??={...t},o[l]=S({ownerType:n,fields:i},f)?.mark==="accentItalic"?I(c):c)}return o??t}function g(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(o,l)=>{for(const s of o){if(s?.props?.id===t)return l;for(const[f,c]of Object.entries(s?.props??{})){if(!C(c))continue;const u=Q(s.type,f)?{owner:s,direct:!0,nested:l!==null,underBox:!1}:l&&{owner:l.owner,direct:!1,nested:l.nested,underBox:l.underBox||s.type===_},d=n(c,u);if(d!==void 0)return d}}},i=n(r,null);return i===void 0?null:i}function re(e,t){const r=g(e,t);return r&&r.owner}function Pe(e,t){const r=g(e,t);return r&&(r.direct?r.owner:null)}function De(e,t){const r=g(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function ve(e,t,r){if(t?.type!==y)return[];const n=re(e,t.props?.id);if(!n){const l=x(w(t.props))?.fields,s=l?.length?l.map(u=>({...u})):ne(t.props),f=(a().get(y)?.fields??[]).filter(u=>u.everySource&&!s.some(d=>d.key===u.key)),c=[...s,...f];return r?c.filter(u=>(u.kind??"text")===r):c}const i=X(t.props,n.type),o=i&&O(n,"list").find(l=>l.key===i)?.fields||[];return r?o.filter(l=>(l.kind??"text")===r):o}function We(e,t){return{[p]:"",[L]:e.map(r=>({...r})),[R]:t.map(r=>({...r}))}}function ne(e,t){const r=e?.[R];if(!Array.isArray(r))return[];const n=r.flatMap(i=>{if(!i||typeof i!="object")return[];const{key:o,label:l,kind:s,multiline:f,alt:c,next:u}=i;if(typeof o!="string"||!o||typeof l!="string")return[];const d=s==="image"||s==="link"||s==="colour"?s:void 0;return[{key:o,label:l,...d?{kind:d}:{},...f===!0?{multiline:!0}:{},...typeof c=="string"&&c?{alt:c}:{},...typeof u=="string"&&u?{next:u}:{}}]});return t?n.filter(i=>(i.kind??"text")===t):n}export{G as BOX_HIDE_WHEN_ROW_EMPTY,R as CARD_LIST_FIELDS,j as CARD_LIST_ITEM_BLOCKS,L as CARD_LIST_ROWS,y as CARD_LIST_TYPE,p as CARD_ROW_FIELD_PROP,K as CARD_ROW_LINK_PROP,h as CARD_TEMPLATE_BLOCKS,N as CARD_TEMPLATE_LABEL,B as CARD_TEMPLATE_SLOT,Ie as ROW_BOUND_PROPS,J as ROW_PART_BY_WORDS,De as cardCopyPlace,Ce as cardKeyOf,ve as cardListFieldsOf,ke as cardListItemSlot,We as cardListProps,X as cardListShows,_e as cardRow,Te as cardTemplateBlocks,Pe as cardTemplateCardOwner,z as cardTemplateField,q as cardTemplateFields,O as cardTemplateFieldsOf,Le as cardTemplateLinesBetween,re as cardTemplateOwner,be as cardTemplateSlot,Oe as cardTemplateSlotLabel,$ as cardTemplateSlotNames,he as cardTemplateTypedRows,we as cardTemplatesNameBlocks,V as defaultListField,Re as hasCardTemplate,Be as isCardTemplateBlock,Q as isCardTemplateSlot,b as namedRowField,ge as registerCardTemplates,Z as rowBound,ee as rowFieldOf,S as rowFieldSpec,te as rowFieldText,Se as rowFieldWordsArePlain,Fe as rowFilledProps,Ee as rowPartByKey,Ae as templateBoxIsEmpty,xe as templateOnInsert,Y as templateOnRead};
|
|
1
|
+
import{blockSources as E,blockSourceSpec as w,declaredBlockSource as T}from"./block-sources.js";import{slotFieldBlocks as h}from"./slot-field-blocks.js";import{isNodeList as I}from"efficient-easel/data";import{BOX_TYPE as F}from"../document/container-blocks.js";import{globalRegistry as P}from"../global-registry.js";import{nonEmptyString as B}from"../non-empty-string.js";import{accentItalicRuns as D}from"../markup.js";import{withCardsTemplate as v}from"../document/cards-template-on-read.js";import{withCardListTemplate as W}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as M,withArticleBodyTemplate as N}from"../document/article-body-seed.js";import{withLogosTemplate as K}from"../document/blocks/general/Logos/card-seed.js";import{withFaqTemplate as j}from"../document/blocks/general/FAQ/card-seed.js";import{withFootprintSideTemplate as H}from"../document/blocks/general/Footprint/card-seed.js";const L="template",Y="Card template",m="CardList",S=["Text","ImageBlock","ButtonBlock","Flex"],p="rowField",$="rowLinkField";function he(){return{type:"slot",allow:[...S]}}const U=S.filter(e=>e!=="ButtonBlock"),O="items",R="itemFields";function Be(){return{type:"slot",allow:[...U]}}const Q=[{block:"OrderSummary",typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"FAQ",typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>j(e)},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>H(e)},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],seed:e=>v("Cards",e)},{block:"ProcessSteps",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:m,label:"Card list"}]},{block:"Logos",fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>K(e)},{block:m,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:O,seed:e=>W(e)},{block:M,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>N(e)}];function f(){return P("efficient.card-templates",()=>new Map(Q.map(e=>[e.block,e])))}function Le(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const o=[];for(const r of t.blocks??[]){if(typeof r?.type!="string"||!r.type)throw new Error(`The card template of ${t.block} names an empty block.`);o.some(l=>l.type===r.type)||o.push({type:r.type,label:r.label||r.type})}const n=[];for(const r of t.slots??[]){if(typeof r?.slot!="string"||!r.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);const l=B(r.label),c=Array.isArray(r.fields)?{fields:r.fields.map(a=>({...a}))}:null;n.some(a=>a.slot===r.slot)||n.push({slot:r.slot,...l?{label:l}:null,...c})}const s=n.some(r=>r.fields);if(s&&(t.fields.some(r=>r.everySource)||E(t.block).length))throw new Error(`The card template of ${t.block} declares slot fields, but the block reads a source: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);s?h().add(t.block):h().delete(t.block);const i=B(t.typedRows);f().set(t.block,{block:t.block,...n.length?{slots:n}:{},fields:t.fields.map(r=>({...r})),blocks:o,typedRows:i,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function q(e,t){const o=e?f().get(e)?.seed:void 0;return o?o(t):t}function Se(e,t){const o=X(e),n=(o.length?o:[L]).filter(l=>t[l]===void 0||Array.isArray(t[l])&&t[l].length===0);if(!n.length)return t;const s={...t};for(const l of n)delete s[l];const i=e?f().get(e)?.seedOnInsert:void 0,r=i?i(s):q(e,s);return r===s?t:r}function Oe(){for(const e of f().values())if(e.blocks?.length)return!0;return!1}function Re(e){return f().get(e)?.blocks??[]}function Ae(e){for(const t of f().values())if(t.blocks?.some(o=>o.type===e))return!0;return!1}function Ce(e){return typeof e=="string"&&f().get(e)?.typedRows||""}function _e(e){return typeof e=="string"&&f().get(e)?.linesBetween===!0}function Ee(e){return typeof e=="string"&&f().has(e)}const V=[{slot:L}];function y(e){if(typeof e!="string")return[];const t=f().get(e);return t?t.slots??V:[]}function X(e){return y(e).map(t=>t.slot)}function z(e,t){return y(e).some(o=>o.slot===t)}function Ie(e,t){const o=y(e).find(n=>n.slot===t);return o?o.label??Y:null}function b(e,t){return t?y(e).find(o=>o.slot===t)?.fields:void 0}function G(e,t){const o=f().get(e)?.fields??[];return t?o.filter(n=>(n.kind??"text")===t):o}function J(e,t){if(typeof e!="string")return"";const o=b(e,t);return(o?o.filter(n=>n.kind==="list"):G(e,"list"))[0]?.key??""}function Z(e,t,o){return x(e)||J(t,o)}function A(e,t,o){const n=typeof e?.type=="string"?e.type:"";if(!n)return[];const s=b(n,o);if(s)return t?s.filter(c=>(c.kind??"text")===t):s;const i=f().get(n)?.fields??[],r=w(T(e?.props))?.fields,l=r?.length?[...r.map(c=>({...c})),...i.filter(c=>c.everySource&&!r.some(a=>a.key===c.key))]:i;return t?l.filter(c=>(c.kind??"text")===t):l}function ee(e,t,o,n){if(!e)return null;const s=b(e,n);return s?s.find(i=>i.key===t)??null:o?A(o).find(i=>i.key===t)??null:f().get(e)?.fields.find(i=>i.key===t)??null}function C(e,t){return!e||!t?null:e.fields?.find(o=>o.key===t)??ee(e.ownerType,t,e.owner,e.slot)}function Fe(e,t){return C(e,t)?.plain===!0}function x(e,t=p){const o=e?.[t];return typeof o=="string"?o.trim():""}function Pe(e,t){return e.key||String(t+1)}function De(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[o,n]of Object.entries(e))typeof n=="string"&&(t[o]=n);return t}const te="hideWhenRowEmpty";function ve(e,t){const o=e[te];return!t||!Array.isArray(o)||!o.length?!1:o.every(n=>typeof n!="string"||!t[n]?.trim())}const g={Text:{text:p},ImageBlock:{src:p},ButtonBlock:{label:p,href:$},LogoBlock:{alt:p},Breadcrumb:{currentCrumb:p}},We=g,oe=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Me(e,t,o){return re(e,t,o)&&!oe.has(`${e}.${o}`)}function re(e,t,o){return ne(e,t,o)!==""}function ne(e,t,o){const n=g[e]?.[o];return n?x(t,n):""}function le(e,t){return!t||!e?null:e[t]??""}function Ne(e,t,o,n,s,i){if(!o)return t;let r=null;for(const[l,c]of Object.entries(g[e]??{})){const a=x(t,c),u=le(o,a);u!==null&&(r??={...t},r[l]=C({ownerType:n,fields:s,slot:i},a)?.mark==="accentItalic"?D(u):u)}return r??t}function k(e,t){const o=e?.data?.content;if(!Array.isArray(o)||typeof t!="string")return;const n=(i,r)=>{for(const l of i){if(l?.props?.id===t)return r;for(const[c,a]of Object.entries(l?.props??{})){if(!I(a))continue;const u=z(l.type,c)?{owner:l,slot:c,direct:!0,nested:r!==null,underBox:!1}:r&&{owner:r.owner,slot:r.slot,direct:!1,nested:r.nested,underBox:r.underBox||l.type===F},d=n(a,u);if(d!==void 0)return d}}},s=n(o,null);return s===void 0?null:s}function se(e,t){const o=k(e,t);return o&&o.owner}function ie(e,t){const o=k(e,t);return o&&o.slot}function Ke(e,t){const o=k(e,t);return o&&(o.direct?o.owner:null)}function je(e,t){const o=k(e,t);if(o!==void 0)return o===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:o.nested,underBox:o.underBox}}function He(e,t,o){if(t?.type!==m)return[];const n=se(e,t.props?.id);if(!n){const l=w(T(t.props))?.fields,c=l?.length?l.map(d=>({...d})):ce(t.props),a=(f().get(m)?.fields??[]).filter(d=>d.everySource&&!c.some(_=>_.key===d.key)),u=[...c,...a];return o?u.filter(d=>(d.kind??"text")===o):u}const s=ie(e,t.props?.id)??void 0,i=Z(t.props,n.type,s),r=i&&A(n,"list",s).find(l=>l.key===i)?.fields||[];return o?r.filter(l=>(l.kind??"text")===o):r}function Ye(e,t){return{[p]:"",[O]:e.map(o=>({...o})),[R]:t.map(o=>({...o}))}}function ce(e,t){const o=e?.[R];if(!Array.isArray(o))return[];const n=o.flatMap(s=>{if(!s||typeof s!="object")return[];const{key:i,label:r,kind:l,multiline:c,alt:a,next:u}=s;if(typeof i!="string"||!i||typeof r!="string")return[];const d=l==="image"||l==="link"||l==="colour"?l:void 0;return[{key:i,label:r,...d?{kind:d}:{},...c===!0?{multiline:!0}:{},...typeof a=="string"&&a?{alt:a}:{},...typeof u=="string"&&u?{next:u}:{}}]});return t?n.filter(s=>(s.kind??"text")===t):n}export{te as BOX_HIDE_WHEN_ROW_EMPTY,R as CARD_LIST_FIELDS,U as CARD_LIST_ITEM_BLOCKS,O as CARD_LIST_ROWS,m as CARD_LIST_TYPE,p as CARD_ROW_FIELD_PROP,$ as CARD_ROW_LINK_PROP,S as CARD_TEMPLATE_BLOCKS,Y as CARD_TEMPLATE_LABEL,L as CARD_TEMPLATE_SLOT,We as ROW_BOUND_PROPS,oe as ROW_PART_BY_WORDS,je as cardCopyPlace,Pe as cardKeyOf,He as cardListFieldsOf,Be as cardListItemSlot,Ye as cardListProps,Z as cardListShows,De as cardRow,Re as cardTemplateBlocks,Ke as cardTemplateCardOwner,ee as cardTemplateField,G as cardTemplateFields,A as cardTemplateFieldsOf,_e as cardTemplateLinesBetween,se as cardTemplateOwner,he as cardTemplateSlot,Ie as cardTemplateSlotLabel,X as cardTemplateSlotNames,ie as cardTemplateSlotOf,Ce as cardTemplateTypedRows,Oe as cardTemplatesNameBlocks,J as defaultListField,Ee as hasCardTemplate,Ae as isCardTemplateBlock,z as isCardTemplateSlot,x as namedRowField,Le as registerCardTemplates,re as rowBound,ne as rowFieldOf,C as rowFieldSpec,le as rowFieldText,Fe as rowFieldWordsArePlain,Ne as rowFilledProps,Me as rowPartByKey,ve as templateBoxIsEmpty,Se as templateOnInsert,q as templateOnRead};
|
|
@@ -37,6 +37,12 @@ export declare function imageFillRowClasses(from: ImageFillFrom): {
|
|
|
37
37
|
img: string;
|
|
38
38
|
figure: string;
|
|
39
39
|
};
|
|
40
|
+
export declare const FILLS_ITS_FRAME: {
|
|
41
|
+
readonly img: string;
|
|
42
|
+
};
|
|
43
|
+
export declare function pictureLayerClass(fill: {
|
|
44
|
+
readonly img: string;
|
|
45
|
+
} | null | undefined): string;
|
|
40
46
|
export declare const isImageRatio: (value: unknown) => value is ImageRatio;
|
|
41
47
|
export declare function imageRatioAspect(value: unknown): string | null;
|
|
42
48
|
export declare function imageWidthFollowsBox(drawn: unknown, phone: unknown, fit: "cover" | "contain"): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BOX_GIVES_PICTURES_A_HEIGHT as
|
|
1
|
+
import{BOX_GIVES_PICTURES_A_HEIGHT as f}from"./box-layout.js";import{imageIsCropped as w,parseImageFit as n}from"./image-fit.js";import{SHAPE_TABLE as p}from"./gallery-card-layout.js";const x=p.map(e=>e.image),a="fill",S={label:"Fill row",value:a,showWhen:f},r="4/3",u={frame:"view-wide:h-full view-wide:min-h-[240px]",img:"view-wide:absolute view-wide:inset-0",figure:"view-wide:h-full"},l={all:{frame:"h-full min-h-[240px]",img:"absolute inset-0",figure:"h-full"},wide:u,tablet:u,desktop:{frame:"view-desktop:h-full view-desktop:min-h-[240px] max-view-desktop:aspect-[4/3]",img:"view-desktop:absolute view-desktop:inset-0",figure:"view-desktop:h-full"}};function h(e,t,i){return t&&!o(i)?"all":e??"wide"}function m(e){return l[e]}const C=l.all;function P(e){return e?`${e.img} h-full w-full`:"relative h-full w-full"}const _={auto:"","3/4":"aspect-[3/4]","2/1":"aspect-[2/1]","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","16/10":"aspect-[16/10]","1/1":"aspect-square","9/16":"aspect-[9/16]","2/3":"aspect-[2/3]","4/5":"aspect-[4/5]"},g={auto:"","3/4":"view-wide:aspect-[3/4]","2/1":"view-wide:aspect-[2/1]","21/9":"view-wide:aspect-[21/9]","16/9":"view-wide:aspect-[16/9]","4/3":"view-wide:aspect-[4/3]","16/10":"view-wide:aspect-[16/10]","1/1":"view-wide:aspect-square","9/16":"view-wide:aspect-[9/16]","2/3":"view-wide:aspect-[2/3]","4/5":"view-wide:aspect-[4/5]"},A={auto:"","3/4":"max-view-wide:aspect-[3/4]","2/1":"max-view-wide:aspect-[2/1]","21/9":"max-view-wide:aspect-[21/9]","16/9":"max-view-wide:aspect-[16/9]","4/3":"max-view-wide:aspect-[4/3]","16/10":"max-view-wide:aspect-[16/10]","1/1":"max-view-wide:aspect-square","9/16":"max-view-wide:aspect-[9/16]","2/3":"max-view-wide:aspect-[2/3]","4/5":"max-view-wide:aspect-[4/5]"},L={auto:"max-view-wide:aspect-auto!","3/4":"max-view-wide:aspect-[3/4]!","2/1":"max-view-wide:aspect-[2/1]!","21/9":"max-view-wide:aspect-[21/9]!","16/9":"max-view-wide:aspect-[16/9]!","4/3":"","16/10":"max-view-wide:aspect-[16/10]!","1/1":"max-view-wide:aspect-square!","9/16":"max-view-wide:aspect-[9/16]!","2/3":"max-view-wide:aspect-[2/3]!","4/5":"max-view-wide:aspect-[4/5]!"},c=e=>x.includes(e),o=c;function k(e){const t=c(e)?p.find(i=>i.image===e)?.ratio:null;return t?`${t[0]} / ${t[1]}`:null}function B(e,t,i){return i==="contain"?!0:[e,t??e].every(s=>s!==a&&(!c(s)||s==="auto"))}function T(e,t){return e===a&&!t?r:e}function W(e){return e===a?r:o(e)?e:void 0}function d(e,t){return o(t)?t===e?null:t:e===a?r:null}function I(e,t){const i=d(e,t);return w(e,"cover")||i!==null&&w(i,"cover")}function O(e,t,i){return n(e,"cover")==="cover"&&I(t,i)}function b(e,t,i,s){return e==="desktop"?O(t,i,s):n(t,"cover")!=="cover"?!1:v(e==="tablet"?i:d(i,s)??i)}const v=e=>e===a||o(e)&&e!=="auto";function H(e,t,i="wide"){return e===a&&i==="all"?m("all").frame:t===null?o(e)?_[e]:"":[e===a?m(i).frame:o(e)?g[e]:"",e===a&&i==="desktop"?L[t]:A[t]].filter(Boolean).join(" ")}export{C as FILLS_ITS_FRAME,a as FILL_ROW,S as FILL_ROW_OPTION,H as imageAspectClasses,T as imageAspectDrawn,I as imageAspectDrawsARatio,d as imageAspectPhoneOf,W as imageAspectPhoneRest,h as imageFillFrom,m as imageFillRowClasses,O as imageFocalPointActs,b as imageFocalPointActsIn,k as imageRatioAspect,B as imageWidthFollowsBox,c as isImageRatio,P as pictureLayerClass};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
|
+
import { type ShowWhenRule } from "efficient-shell/format";
|
|
2
3
|
export declare const SECTION_STICK_LABEL = "Stick to top";
|
|
3
4
|
export declare const SECTION_STICK_DISTANCE: {
|
|
4
5
|
readonly min: 0;
|
|
@@ -6,17 +7,19 @@ export declare const SECTION_STICK_DISTANCE: {
|
|
|
6
7
|
readonly step: 4;
|
|
7
8
|
readonly fallback: 0;
|
|
8
9
|
};
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
readonly
|
|
17
|
-
readonly tablet: "--sf-stick-distance-tablet";
|
|
18
|
-
readonly phone: "--sf-stick-distance-phone";
|
|
10
|
+
export declare const SECTION_PIN_LABEL = "Pin while scrolling";
|
|
11
|
+
export declare const SECTION_PIN_GROUP = "Scroll";
|
|
12
|
+
export declare const SECTION_PIN_VARS: {
|
|
13
|
+
readonly distance: "--sf-pin-distance";
|
|
14
|
+
readonly position: "--sf-pin-position";
|
|
15
|
+
readonly on: "--sf-pin-on";
|
|
16
|
+
readonly length: "--sf-pin-length";
|
|
17
|
+
readonly header: "--sf-pin-header";
|
|
19
18
|
};
|
|
19
|
+
export declare const SECTION_PIN_SCREENS_KEY = "stickTopScreens";
|
|
20
|
+
export declare const SECTION_PIN_SCREENS_KEYS: readonly string[];
|
|
21
|
+
export declare const SECTION_PIN_SCREENS_LABEL = "Screens";
|
|
22
|
+
export declare const PIN_AT_SCREEN_TOP: ReadonlySet<string>;
|
|
20
23
|
export declare const SECTION_STICK_EXCLUDED: ReadonlySet<string>;
|
|
21
24
|
export type SectionStickProps = {
|
|
22
25
|
stickTop?: unknown;
|
|
@@ -25,20 +28,33 @@ export type SectionStickProps = {
|
|
|
25
28
|
stickTopDistanceTablet?: unknown;
|
|
26
29
|
stickTopPhone?: unknown;
|
|
27
30
|
stickTopDistancePhone?: unknown;
|
|
31
|
+
stickTopScreens?: unknown;
|
|
32
|
+
stickTopScreensTablet?: unknown;
|
|
33
|
+
stickTopScreensPhone?: unknown;
|
|
34
|
+
sticky?: unknown;
|
|
28
35
|
};
|
|
36
|
+
export declare const INTRO_OLD_STICKY_PINS: ShowWhenRule;
|
|
29
37
|
export declare function hasTabletStick(props: SectionStickProps): boolean;
|
|
30
38
|
export declare function hasPhoneStick(props: SectionStickProps): boolean;
|
|
31
|
-
export declare function resolveSectionStick(props: SectionStickProps
|
|
39
|
+
export declare function resolveSectionStick(props: SectionStickProps, opts?: {
|
|
40
|
+
intro?: boolean;
|
|
41
|
+
}): {
|
|
32
42
|
desktop: boolean;
|
|
33
43
|
desktopDistance: number;
|
|
44
|
+
desktopScreens: number;
|
|
34
45
|
tablet: boolean;
|
|
35
46
|
tabletDistance: number;
|
|
47
|
+
tabletScreens: number;
|
|
36
48
|
ownTablet: boolean;
|
|
37
49
|
phone: boolean;
|
|
38
50
|
phoneDistance: number;
|
|
51
|
+
phoneScreens: number;
|
|
39
52
|
ownPhone: boolean;
|
|
40
53
|
};
|
|
41
|
-
export declare function
|
|
42
|
-
|
|
54
|
+
export declare function sectionPinAttrs(props: SectionStickProps, opts?: {
|
|
55
|
+
atScreenTop?: boolean;
|
|
56
|
+
track?: boolean;
|
|
57
|
+
}): {
|
|
58
|
+
attrs: Record<string, string>;
|
|
43
59
|
style: CSSProperties;
|
|
44
60
|
} | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{finiteNumber as
|
|
1
|
+
import{pinAttrs as _,readPin as h}from"efficient-shell/format";import{finiteNumber as E}from"../finite-number.js";import{viewVarSplit as I}from"./view-var-split.js";const g="Stick to top",f={min:0,max:200,step:4,fallback:0},A="Pin while scrolling",L="Scroll",o={distance:"--sf-pin-distance",position:"--sf-pin-position",on:"--sf-pin-on",length:"--sf-pin-length",header:"--sf-pin-header"},N="stickTopScreens",w=[N,"stickTopScreensTablet","stickTopScreensPhone"],K="Screens",R=new Set(["IntroBleed"]),$=new Set(["CategoryBar","DocTabs","Contents"]);function x(e){return typeof e.stickTop=="boolean"?e.stickTop:e.sticky!==!1}const d=e=>h(!0,e).length,B={all:[{not:{field:"stickTop",in:[!0,!1]}},{not:{field:"sticky",is:!1}}]};function b(e){const s=E(e)??f.fallback;return Math.min(f.max,Math.max(f.min,Math.round(s)))}function C(e){return typeof e.stickTopTablet=="boolean"}function P(e){return typeof e.stickTopPhone=="boolean"}function y(e,s={}){const t=s.intro?x(e):e.stickTop===!0,T=b(e.stickTopDistance),k=d(e.stickTopScreens),i=C(e),c=i?e.stickTopTablet===!0:t,p=i?b(e.stickTopDistanceTablet):T,r=i?d(e.stickTopScreensTablet):k,a=P(e),n=a?e.stickTopPhone===!0:c,l=a?b(e.stickTopDistancePhone):p,S=a?d(e.stickTopScreensPhone):r;return{desktop:t,desktopDistance:T,desktopScreens:k,tablet:c,tabletDistance:p,tabletScreens:r,ownTablet:i,phone:n,phoneDistance:l,phoneScreens:S,ownPhone:a}}function V(e,s={}){const t=y(e,{intro:s.atScreenTop});if(!t.desktop&&!t.tablet&&!t.phone)return null;const T=s.atScreenTop===!0&&typeof e.stickTop!="boolean",k=t.desktop&&t.desktopScreens>0||t.tablet&&t.tabletScreens>0||t.phone&&t.phoneScreens>0,i=s.track===!0&&!T&&k,c=(n,l,S,u)=>I({tabletClass:"",tabletVar:`${n}-tablet`,phoneClass:"",phoneVar:`${n}-phone`},l,S,u).style,p={...s.atScreenTop?{[o.header]:"0px"}:{},[o.distance]:`${t.desktopDistance}px`,...c(o.distance,`${t.desktopDistance}px`,`${t.tabletDistance}px`,`${t.phoneDistance}px`)};if(i){const n=S=>S?"1":"0",l={...p,...t.desktop?{}:{[o.on]:"0"},...c(o.on,n(t.desktop),n(t.tablet),n(t.phone)),[o.length]:String(t.desktopScreens),...c(o.length,String(t.desktopScreens),String(t.tabletScreens),String(t.phoneScreens))};return{attrs:_(h(!0),"track").attrs,style:l}}const r=n=>n?"sticky":"static",a={...p,...t.desktop?{}:{[o.position]:"static"},...c(o.position,r(t.desktop),r(t.tablet),r(t.phone))};return{attrs:_(h(!0),"stick").attrs,style:a}}export{B as INTRO_OLD_STICKY_PINS,R as PIN_AT_SCREEN_TOP,L as SECTION_PIN_GROUP,A as SECTION_PIN_LABEL,N as SECTION_PIN_SCREENS_KEY,w as SECTION_PIN_SCREENS_KEYS,K as SECTION_PIN_SCREENS_LABEL,o as SECTION_PIN_VARS,f as SECTION_STICK_DISTANCE,$ as SECTION_STICK_EXCLUDED,g as SECTION_STICK_LABEL,P as hasPhoneStick,C as hasTabletStick,y as resolveSectionStick,V as sectionPinAttrs};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function slotFieldBlocks(): Set<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{globalRegistry as e}from"../global-registry.js";function t(){return e("efficient.slot-field-blocks",()=>new Set)}export{t as slotFieldBlocks};
|
|
@@ -5,9 +5,11 @@ export type BlockSlots = Record<string, {
|
|
|
5
5
|
type: "slot";
|
|
6
6
|
allow?: string[];
|
|
7
7
|
disallow?: string[];
|
|
8
|
+
ownPictures?: true;
|
|
8
9
|
}>;
|
|
9
10
|
export type BlockRender = Pick<Block, "label" | "defaultProps" | "render" | "inline" | "phoneOrder"> & {
|
|
10
11
|
fields?: BlockSlots;
|
|
12
|
+
drawsPictures?: true;
|
|
11
13
|
};
|
|
12
14
|
export type BlockMeta = Omit<BlockRender, "render">;
|
|
13
15
|
export type BlockFields = Pick<Block, "fields" | "resolveFields" | "resolveData"> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={label:"Banner",defaultProps:{eyebrow:"",title:"",body:"",imageSrc:"",ctaText:"",ctaHref:"",contained:!0,overlay:60}};export{e as BannerMeta};
|
|
1
|
+
const e={label:"Banner",drawsPictures:!0,defaultProps:{eyebrow:"",title:"",body:"",imageSrc:"",ctaText:"",ctaHref:"",contained:!0,overlay:60}};export{e as BannerMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CONTACT_LOCATIONS_CARDS_PLACEHOLDER as
|
|
1
|
+
import{CONTACT_LOCATIONS_CARDS_PLACEHOLDER as t,CONTACT_LOCATIONS_DEFAULTS as e}from"../../../../content/contact.js";const i={label:"Contact / Locations",drawsPictures:!0,defaultProps:{sectionNumber:e.sectionNumber,heading:e.heading,tagline:e.tagline,galleryKicker:e.galleryKicker,galleryHint:e.galleryHint,locations:t,mapTheme:e.mapTheme}};export{i as ContactLocationsMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CTA_PH as t,PH as e}from"../../placeholders.js";const r={badge:"Featured",imageDate:e.date,category:e.category,readLabel:"0 min read",date:e.date,title:"Add a *headline* for this story.",dek:"A short summary of the featured article — one or two sentences that draw the reader in.",ctaText:"Read the story",ctaHref:t.href},d={label:"Featured cover",defaultProps:{source:null,image:"",badge:"",imageDate:"",category:"",readLabel:"",date:"",title:"",dek:"",ctaText:"",ctaHref:""}};export{r as FEATUREDCOVER_PH,d as FeaturedCoverMeta};
|
|
1
|
+
import{CTA_PH as t,PH as e}from"../../placeholders.js";const r={badge:"Featured",imageDate:e.date,category:e.category,readLabel:"0 min read",date:e.date,title:"Add a *headline* for this story.",dek:"A short summary of the featured article — one or two sentences that draw the reader in.",ctaText:"Read the story",ctaHref:t.href},d={label:"Featured cover",drawsPictures:!0,defaultProps:{source:null,image:"",badge:"",imageDate:"",category:"",readLabel:"",date:"",title:"",dek:"",ctaText:"",ctaHref:""}};export{r as FEATUREDCOVER_PH,d as FeaturedCoverMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t={slides:{type:"slot"},strip:{type:"slot",allow:["Flex"]}},e={label:"Hero",fields:t,defaultProps:{alignment:"left",textureOpacity:40,autoplay:!1,autoplayInterval:6}};export{e as HeroMeta,t as HeroSlots};
|
|
1
|
+
const t={slides:{type:"slot",ownPictures:!0},strip:{type:"slot",allow:["Flex"]}},e={label:"Hero",drawsPictures:!0,fields:t,defaultProps:{alignment:"left",textureOpacity:40,autoplay:!1,autoplayInterval:6}};export{e as HeroMeta,t as HeroSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FOCAL_DEFAULT as e}from"efficient-shell/format";import{DEFAULT_OVERLAY_POSITION as r}from"../../../../sections/hero-overlay.js";import{DEFAULT_TINT as o}from"../../../../content/tint.js";const t={boxes:{type:"slot",allow:["HeroGroup"]}},p={label:"Hero Single",fields:t,defaultProps:{mediaType:"image",imageFocal:e,tintColor:o,tintOpacity:0,overlay:100,overlayColor:o,overlayPosition:r}};export{p as HeroSingleMeta,t as HeroSingleSlots};
|
|
1
|
+
import{FOCAL_DEFAULT as e}from"efficient-shell/format";import{DEFAULT_OVERLAY_POSITION as r}from"../../../../sections/hero-overlay.js";import{DEFAULT_TINT as o}from"../../../../content/tint.js";const t={boxes:{type:"slot",allow:["HeroGroup"]}},p={label:"Hero Single",drawsPictures:!0,fields:t,defaultProps:{mediaType:"image",imageFocal:e,tintColor:o,tintOpacity:0,overlay:100,overlayColor:o,overlayPosition:r}};export{p as HeroSingleMeta,t as HeroSingleSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e={label:"Image",drawsPictures:!0,defaultProps:{src:"",alt:"",aspect:"16/9",contained:!1}};export{e as ImageBlockMeta};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{TYPE_SIZE_INHERIT as e}from"../../../../content/section-type-size.js";const
|
|
2
|
-
*Highlight line*`,body:"A sentence or two of supporting copy."},
|
|
1
|
+
import{SECTION_PIN_SCREENS_KEY as t}from"../../../../content/section-sticky.js";import{TYPE_SIZE_INHERIT as e}from"../../../../content/section-type-size.js";const r={eyebrow:"— Label",title:`Section headline
|
|
2
|
+
*Highlight line*`,body:"A sentence or two of supporting copy."},l={label:"Scroll-Over Text",drawsPictures:!0,defaultProps:{eyebrow:"",title:"",body:"",imageSrc:"",imageSrcMobile:"",heightDesktop:100,heightMobile:100,overlay:60,titleSizeDesktop:e,bodySizeDesktop:e,titleSizeMobile:e,bodySizeMobile:e,ctaText:"",ctaHref:"",buttonColor:"",buttonTextColor:"",stickTop:!0,[t]:0,uppercase:!1}};export{r as INTRO_PH,l as IntroBleedMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FOOTER_LOGO_PX as o}from"../../../../logo/logo-size.js";const
|
|
1
|
+
import{FOOTER_LOGO_PX as o}from"../../../../logo/logo-size.js";const r={label:"Logo",drawsPictures:!0,defaultProps:{heightPx:o,reverse:"auto"}};export{r as LogoBlockMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{say as o}from"../../../../editor-words.js";const s={heading:"Trusted by *teams worldwide*"},l=()=>[{src:"",alt:o("Logo one")},{src:"",alt:o("Logo two")},{src:"",alt:o("Logo three")},{src:"",alt:o("Logo four")},{src:"",alt:o("Logo five")}],t={logos:{type:"slot",allow:["LogoBlock"]},template:{type:"slot",allow:["LogoBlock"]}},r={label:"Logos",fields:t,defaultProps:{items:[],contained:!0}};export{s as LOGOS_PH,r as LogosMeta,t as LogosSlots,l as logosScaffoldItems};
|
|
1
|
+
import{say as o}from"../../../../editor-words.js";const s={heading:"Trusted by *teams worldwide*"},l=()=>[{src:"",alt:o("Logo one")},{src:"",alt:o("Logo two")},{src:"",alt:o("Logo three")},{src:"",alt:o("Logo four")},{src:"",alt:o("Logo five")}],t={logos:{type:"slot",allow:["LogoBlock"]},template:{type:"slot",allow:["LogoBlock"]}},r={label:"Logos",drawsPictures:!0,fields:t,defaultProps:{items:[],contained:!0}};export{s as LOGOS_PH,r as LogosMeta,t as LogosSlots,l as logosScaffoldItems};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CTA_PH as t,PH as e}from"../../placeholders.js";const
|
|
1
|
+
import{CTA_PH as t,PH as e}from"../../placeholders.js";const r={headNum:e.sectionNumber,headTitle:e.headingAccent,headDesc:e.body,category:e.category,metaMiddle:"Section",readLabel:"0 min read",title:"Article *headline* goes here.",dek:"A short summary of the article goes here.",quote:"A short pull quote.",quoteAttribution:"— "+e.date,ctaText:"Begin reading",ctaHref:t.href,imageLabel:"Featured *image*",metaPublished:e.date,metaReads:"0 min"},d={label:"Long read",drawsPictures:!0,defaultProps:{source:null,headNum:"",headTitle:"",headDesc:"",category:"",metaMiddle:"",readLabel:"",title:"",dek:"",quote:"",quoteAttribution:"",ctaText:"",ctaHref:"",image:"",imageLabel:"",metaPublished:"",metaReads:""}};export{r as LONGREAD_PH,d as LongReadMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={label:"Brand Text",defaultProps:{eyebrow:"",imageSrc:"",stats:[]}};export{e as ManifestoMeta};
|
|
1
|
+
const e={label:"Brand Text",drawsPictures:!0,defaultProps:{eyebrow:"",imageSrc:"",stats:[]}};export{e as ManifestoMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{say as e}from"../../../../editor-words.js";const t={heading:"Ways to pay"},s=()=>[{label:"Visa"},{label:"Mastercard"},{label:"Amex"},{label:"PayPal"}],
|
|
1
|
+
import{say as e}from"../../../../editor-words.js";const t={heading:"Ways to pay"},s=()=>[{label:"Visa"},{label:"Mastercard"},{label:"Amex"},{label:"PayPal"}],r=()=>[{text:e("Secure encrypted checkout")},{text:e("30-day returns")}],o={label:"Payment Methods",drawsPictures:!0,defaultProps:{heading:"",badges:[],assurances:[],contained:!0}};export{t as PAYMENT_PH,o as PaymentBadgesMeta,r as paymentScaffoldAssurances,s as paymentScaffoldBadges};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BOX_DARKEN_STYLES as t}from"../../../../content/box-background.js";import{POST_CARD_HEIGHT as
|
|
1
|
+
import{BOX_DARKEN_STYLES as t}from"../../../../content/box-background.js";import{POST_CARD_HEIGHT as r,POST_CARD_LAYOUT_FALLBACK as o}from"../../../../post-card-layout.js";import{PH as e}from"../../placeholders.js";const d={title:"Add a *headline* for this post.",excerpt:"A short summary of the post — one or two sentences.",category:e.category,date:e.date,readLabel:"0 min read"},m={label:"Post Card",drawsPictures:!0,defaultProps:{source:null,image:"",title:"",excerpt:"",href:"",category:"",date:"",readLabel:"",layout:o,showCover:!0,placement:"bottom-left",darken:55,darkenStyle:t[0].value,minHeight:r.fallback}};export{d as POSTCARD_PH,m as PostCardMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PH as t}from"../../placeholders.js";import{cardTemplateSlot as e}from"../../../../content/card-template.js";const
|
|
1
|
+
import{PH as t}from"../../placeholders.js";import{cardTemplateSlot as e}from"../../../../content/card-template.js";const p={num:t.sectionNumber,title:t.headingAccent,description:t.body,cta:t.viewAll},o={boxes:{type:"slot"},template:e()},l={label:"Image & Text Columns",drawsPictures:!0,fields:o,defaultProps:{num:"",title:"",description:"",columns:3,padTop:120,padBottom:120}};export{p as PROCESS_PH,l as ProcessStepsMeta,o as ProcessStepsSlots};
|