efficient-web-builder 69.5.0 → 70.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/dist/editor/components/AddPageWindow.d.ts +7 -0
- package/dist/editor/components/AddPageWindow.js +1 -0
- package/dist/editor/components/PageStarterCard.d.ts +9 -0
- package/dist/editor/components/PageStarterCard.js +1 -0
- package/dist/editor/components/PagesPanel.js +1 -1
- package/dist/editor/components/SiteFields.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/storefront-editor.css +71 -0
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Prose/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/TimelineTrack/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/box-footer-rows.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/host-config.d.ts +2 -0
- package/dist/editor/lib/document/host-config.js +1 -0
- package/dist/editor/lib/document/overrides.d.ts +1 -0
- package/dist/editor/lib/document/overrides.js +1 -1
- package/dist/editor/lib/document/page-root.d.ts +12 -0
- package/dist/editor/lib/document/page-root.js +2 -2
- package/dist/editor/lib/host-document-bridge.js +1 -1
- package/dist/format/lib/build/module-specifiers.d.ts +11 -0
- package/dist/format/lib/build/module-specifiers.js +1 -1
- package/dist/format/lib/content/box-background.d.ts +1 -7
- package/dist/format/lib/content/box-background.js +1 -1
- package/dist/format/lib/content/box-darken-styles.d.ts +7 -0
- package/dist/format/lib/content/box-darken-styles.js +1 -0
- package/dist/format/lib/content/card-row-keys.d.ts +10 -0
- package/dist/format/lib/content/card-row-keys.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +1 -11
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/count-numbers.js +1 -1
- package/dist/format/lib/content/site-gutter.js +1 -1
- package/dist/format/lib/document/blocks/general/CardList/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Cards/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/FAQ/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Flex/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Footprint/meta.js +2 -2
- package/dist/format/lib/document/blocks/general/Grid/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Hero/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroGroup/meta.d.ts +1 -1
- package/dist/format/lib/document/blocks/general/HeroGroup/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSlide/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Logos/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/OrderSummary/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/PostCard/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.d.ts +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/row-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/slots.d.ts +93 -0
- package/dist/format/lib/document/blocks/general/slots.js +1 -0
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/node-lists.d.ts +4 -0
- package/dist/format/lib/document/node-lists.js +1 -1
- package/dist/format/lib/document/passes/document-position.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +9 -0
- package/dist/format/lib/editor-words-catalogue.js +3 -3
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/page-starters.d.ts +14 -0
- package/dist/format/lib/page-starters.js +1 -0
- package/dist/format/lib/source-rules/panel-one-arrow.js +1 -1
- package/dist/format/lib/source-rules/support/panel-select-cascade.d.ts +1 -1
- package/dist/format/lib/source-rules/support/panel-select-cascade.js +1 -1
- package/dist/format/lib/web-backend.d.ts +9 -0
- package/dist/render/lib/content/page-contents.js +1 -1
- package/dist/render/lib/document/slot-counts.js +1 -1
- package/package.json +6 -6
- package/dist/format/lib/document/panel-bands.d.ts +0 -15
- package/dist/format/lib/document/panel-bands.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,designGroupHeader as x,foldMarker as W,foldMetaOf as C,quietMarker as z,heightFields as w,sectionShapeFields as E,sectionThemeFields as O,stickFields as P,widthField as D}from"./controls.js";import{group as q}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as J,deviceMetaOf as $}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as S,SETTINGS_BUCKETS as Q}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as p}from"efficient-easel/screen/lib/document/field-buckets";import{ownEntry as g,hasOwnEntry as V}from"../../../format/lib/own-entry.js";const A=Q;function X(t){return t==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",R={"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 size":"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"},H={"AlloyWheelsListing._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function F(t,e,o){const a=`${t}.${e}`;return g(G,a)??g(H,a)??g(R,o)}function pe(t,e,o){const a=F(t,e,o);return a?X(a):void 0}function ee(t){return t==="Animation"?[d.Animation]:[d.Design,p[t]]}function _(...t){const e=[];for(const o of t)for(const a of Object.values(o)){const h=$(a),b=C(h?h.inner:a),l=b?g(R,b.label):void 0;if(l)for(const y of ee(l))e.includes(y)||e.push(y)}return e}const ge=[..._(T({tablet:!0,siteSide:!0}),D("full"),w(),m(),P()),...Object.keys(T({tablet:!0,siteSide:!0})),...Object.keys(D("full")),...Object.keys(w()),...Object.keys(m()),...Object.keys(P())],ye=[..._(O()),...Object.keys(O())],ke=[..._(E()),...Object.keys(E())],Se=[..._(B()),...Object.keys(B())],_e=Object.keys(Y()),ve=Object.keys(U()),te={"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)","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 t={...T({tablet:!0,siteSide:!0}),...D("full"),...w(),...m(),...O(),...E(),...B()};for(const e of Object.keys(M)){const o=C(t[e]),a=o?g(R,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 "${e}", 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 ne=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),oe=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...S.map(t=>[p[t],t])]);function ae(t){const e=`${t}.`;return Object.keys(te).filter(o=>o.startsWith(e)).map(o=>o.slice(e.length))}function ie(t,e){const o=$(t),a=q(e);return o?J(o.tier,a):a}function re(t,e){const o=C(e);return o?t==="Content"||t==="Animation"?W(e,o.label):z(e):e}function j(t){return t==="Design"?S:["Animation"]}function fe(t,e){const o=[],a=new Set(ae(e)),h=new Set;let b=!1,l=null;for(const[n,r]of Object.entries(t)){const i=C(r);if(ne.has(n))throw new Error(`${e}.${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=oe.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${e}.${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)&&(b=!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)||V(M,n)){const s=F(e,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${e}.${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)&&h.add(n),o.push(l={place:s,entries:[]});continue}const u=F(e,n,i.label);if(!u)throw new Error(`${e}.${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 ${[...S,"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:ie(r,i.label)]]})}const y=new Set(Object.entries(t).filter(([,n])=>C(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",H]]){const i=Object.keys(r).filter(c=>c.startsWith(`${e}.`)).filter(c=>!y.has(c.slice(e.length+1)));if(i.length)throw new Error(`${e}: ${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=b?[]:[...a].filter(n=>!h.has(n));if(v.length)throw new Error(`${e}: 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 I=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>I.has(r))),k={};for(const n of f){k[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!I.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"&&(k[p[r]]=x(r));for(const u of i)for(const[s,N]of u.entries)k[s]=re(r,N)}}return k}function me(t){return d.Design in t?t:{[d.Design]:L("Design",null),[p.Content]:x("Content"),...t}}function Le(t){return A.some(e=>d[e]in t)}function we(t){const e=A.filter(a=>d[a]in t);if(e.length===0)return t;const o={...t};for(const a of e)o[d[a]]=L(a,a===e[0]?e:null);return o}export{G as BLOCK_KEY_GROUP,A as BUCKETS,d as BUCKET_KEY,_e as CARD_MEDIA_FIELD_KEYS,ve as CARD_SHOW_FIELD_KEYS,S as DESIGN_GROUPS,p as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,H as KEY_GROUP,R as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,te as RETIRED,Se as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,fe as assignSectionGroups,pe as bucketOf,X as bucketOfPlace,Le as hasBucketTabs,_ as headerKeysOf,ee as headerKeysOfPlace,F as placeOf,we as reseatBucketTabs,ae as retiredHeadings,me as seatDesignBucket};
|
|
1
|
+
import{anchorFields as E,bucketHeader as w,cardMediaFields as W,cardShowFields as z,designGroupHeader as $,foldMarker as J,foldMetaOf as C,quietMarker as q,heightFields as O,sectionShapeFields as D,sectionThemeFields as T,stickFields as H,widthField as B}from"./controls.js";import{group as Q}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as A}from"./box-fields.js";import{deviceField as V,deviceMetaOf as K}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as R}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as _,SETTINGS_BUCKETS as X}from"efficient-easel/panel";import{BUCKET_KEY as l,DESIGN_GROUP_KEY as g}from"efficient-easel/screen/lib/document/field-buckets";import{ownEntry as p,hasOwnEntry as M}from"../../../format/lib/own-entry.js";const F=X;function Z(n){return n==="Animation"?"Animation":"Design"}const ee="Editor only — not shown live",x={"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 size":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[ee]:"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"},j={"AlloyWheelsListing._gCards":"Design","Flex._gLink":"Link","LongRead._gLink":"Link"},N={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function I(n,e,o){const i=`${n}.${e}`;return p(N,i)??p(j,i)??p(x,o)}function pe(n,e,o){const i=I(n,e,o);return i?Z(i):void 0}function te(n){return n==="Animation"?[l.Animation]:[l.Design,g[n]]}function v(...n){const e=[];for(const o of n)for(const i of Object.values(o)){const s=K(i),h=C(s?s.inner:i),u=h?p(x,h.label):void 0;if(u)for(const y of te(u))e.includes(y)||e.push(y)}return e}const ye=[...v(A({tablet:!0,siteSide:!0}),B("full"),O(),E(),H()),...Object.keys(A({tablet:!0,siteSide:!0})),...Object.keys(B("full")),...Object.keys(O()),...Object.keys(E()),...Object.keys(H())],ke=[...v(T()),...Object.keys(T())],Se=[...v(D()),...Object.keys(D())],_e=[...v(R()),...Object.keys(R())],ve=Object.keys(W()),fe=Object.keys(z()),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)","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)","Flex._gLink":"repeated the Link group heading above it (owner 2026-11-17)","LongRead._gLink":"repeated the Link group heading above it (decided 2026-11-17)","Flex._gJump":"repeated the Anchor group heading above it (owner 2026-11-17)","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)"},Y={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Link:["Link"],Anchor:["Anchor"],Animation:["Animation"]},P={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const n={...A({tablet:!0,siteSide:!0}),...B("full"),...O(),...E(),...T(),...D(),...R()};for(const e of Object.keys(P)){const o=C(n[e]),i=o?p(x,o.label):void 0;if(!o||o.level!==2||!i||!Y[i].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${e}", 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([[l.Design,"Content"],[l.Animation,"Animation"],..._.map(n=>[g[n],n])]);function ie(n){const e=`${n}.`;return Object.keys(ne).filter(o=>o.startsWith(e)).map(o=>o.slice(e.length))}function re(n,e){const o=K(n),i=Q(e);return o?V(o.tier,i):i}function de(n,e){const o=C(e);return o?n==="Content"||n==="Animation"?J(e,o.label):q(e):e}function U(n){return n==="Design"?_:["Animation"]}function me(n,e){const o=[],i=new Set(ie(e)),s=new Set;let h=!1,u=null;for(const[t,d]of Object.entries(n)){const a=C(d);if(oe.has(t))throw new Error(`${e}.${t}: 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 from efficient-easel's DESIGN_GROUP_KEY (\`[DESIGN_GROUP_KEY.Design]: section("Design")\`).`);const c=ae.get(t);if(c!==void 0){if(a?.level!==1)throw new Error(`${e}.${t}: that key is reserved for the ${c} heading of the settings panel, but this field is ${a?`a level-${a.level} "${a.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(t===l.Design||t===l.Animation)&&(h=!0),o.push(u={place:c,entries:[],adopted:!0});continue}if(!a){u||o.push(u={place:"Content",entries:[]}),u.entries.push([t,d]);continue}if(i.has(t)||M(P,t)){const r=I(e,t,a.label);if(a.level!==2||!r||!Y[r].includes(a.label))throw new Error(`${e}.${t}: ${i.has(t)?"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-${a.level} "${a.label}" header in the ${r??"(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.`);i.has(t)&&s.add(t),o.push(u={place:r,entries:[],uniform:M(P,t)});continue}const b=I(e,t,a.label);if(!b)throw new Error(`${e}.${t}: the inspector group "${a.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[..._,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(u={place:b,entries:[[t,a.level===2?d:re(d,a.label)]]})}const y=new Set(Object.entries(n).filter(([,t])=>C(t)).map(([t])=>t));for(const[t,d]of[["BLOCK_KEY_GROUP",N],["KEY_GROUP",j]]){const a=Object.keys(d).filter(c=>c.startsWith(`${e}.`)).filter(c=>!y.has(c.slice(e.length+1))&&!i.has(c.slice(e.length+1)));if(a.length)throw new Error(`${e}: ${t} (lib/document/field-groups.ts) lists ${JSON.stringify(a)}, 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 f=h?[]:[...i].filter(t=>!s.has(t));if(f.length)throw new Error(`${e}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(f)}, but this section has no such fold header${f.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 G=new Set(o.filter(t=>t.entries.length>0).map(t=>t.place)),m=F.filter(t=>U(t).some(d=>G.has(d))),k={};for(const t of m){k[l[t]]=w(t,t===m[0]?m:null);for(const d of U(t)){if(!G.has(d))continue;const a=o.filter(r=>r.place===d),c=a.findIndex(r=>r.adopted);c>0&&a.unshift(...a.splice(c,1));const b=a.filter(r=>r.uniform);if(b.length>0){const r=a.filter(L=>!L.uniform),S=a[0]?.adopted?1:0;a.splice(0,a.length,...r.slice(0,S),...b,...r.slice(S))}t==="Design"&&(k[g[d]]=$(d));for(const r of a)for(const[S,L]of r.entries)k[S]=de(d,L)}}return k}function Le(n){return l.Design in n?n:{[l.Design]:w("Design",null),[g.Content]:$("Content"),...n}}function Ee(n){return F.some(e=>l[e]in n)}function we(n){const e=F.filter(i=>l[i]in n);if(e.length===0)return n;const o={...n};for(const i of e)o[l[i]]=w(i,i===e[0]?e:null);return o}export{N as BLOCK_KEY_GROUP,F as BUCKETS,l as BUCKET_KEY,ve as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,_ as DESIGN_GROUPS,g as DESIGN_GROUP_KEY,ee as EDITOR_ONLY_GROUP,P as INJECTED_RETIRED,j as KEY_GROUP,x as LABEL_GROUP,ye as LAYOUT_FIELD_KEYS,Y as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,Se as SECTION_SHAPE_FIELD_KEYS,ke as SECTION_THEME_FIELD_KEYS,me as assignSectionGroups,pe as bucketOf,Z as bucketOfPlace,Ee as hasBucketTabs,v as headerKeysOf,te as headerKeysOfPlace,I as placeOf,we as reseatBucketTabs,ie as retiredHeadings,Le as seatDesignBucket};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useMemo as s}from"react";import{sessionRegistry as i}from"efficient-easel/screen/lib/session";import{useEaselSession as e}from"efficient-easel/screen/lib/session-context";import{buildConfig as r}from"./build-config.js";import{blocksOf as t}from"../website-session.js";function c(){const o=e();return s(()=>r(i(o),t(o)),[o])}export{c as useHostConfig};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { type EaselCanvasProps } from "efficient-easel/easel";
|
|
2
2
|
export declare function SiteCanvas(props: Omit<EaselCanvasProps, "frameWrapper" | "overlay" | "height" | "mirrorStyles">): import("react").JSX.Element;
|
|
3
|
+
export declare function useSiteWidthsMetadata(): Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as h,Fragment as
|
|
1
|
+
"use client";import{jsx as h,Fragment as D,jsxs as F}from"react/jsx-runtime";import{useContext as k,useEffect as M,useMemo as T,useRef as v}from"react";import{EaselCanvas as W,repeatCopyAt as $,useEasel as N}from"efficient-easel/easel";import _ from"../../components/PreviewThemeFrame.js";import{OpenDocumentChromeLoadNotice as b}from"../../components/PinnedChromeLoadNotice.js";import{SiteRestoreNotice as j}from"../../components/SiteRestoreNotice.js";import{decodePartId as B,REPEAT_ATTRIBUTE as S,REPEAT_INDEX_ATTRIBUTE as P}from"efficient-easel/draw";import{usePreviewParts as K}from"efficient-easel/draw/client";import{cssString as w,partElement as E,partTypingTarget as O,setCanvasTypingPart as A}from"./canvas-typing.js";import{usePartTypingDeps as V}from"../../components/usePartTypingDeps.js";import{copyRowTarget as H,copyRowValue as L,writeCopyText as U}from"./card-copy-rows.js";import{partColourName as q,partThemeColors as J,readInks as X}from"../../../format/lib/document/part-inks.js";import{PART_ATTR as C}from"../../../render/lib/document/text-parts.js";import{useBlockMetadata as z}from"../editor-block-metadata.js";import{usePreviewHeader as G,useSiteContentWidth as x}from"../../../render/components/PreviewHeaderContext.js";import{setEditorSiteContentWidth as I}from"../../../format/lib/document/editor-site-widths.js";import{siteWidthsMetadata as Q}from"../../../format/lib/content/section-width.js";import{useEditorCanvasStyles as Y}from"../editor-canvas-styles.js";import{usePageVideoFrames as Z,videoFramesMetadata as tt}from"../page-video-frames.js";import{ScreenDocumentContext as et}from"efficient-easel/screen/components/ScreenDocumentContext";function Et(r){const{mirrorHostStyles:n}=Y(),a=z(),i=rt(),m=x(),t=k(et),o=Z(t?.docId??null),e=N(u=>u.appState.data),p=tt(o,e),d=JSON.stringify(p),s=T(()=>p,[d]),f=T(()=>({...r.metadata??a??{},...i,...s}),[r.metadata,a,i,s]);M(()=>(I(m),()=>I(null)),[m]);const l=v(null),c=ot(l),{onDocument:g}=r,y=u=>{l.current=u,g?.(u)};return F(D,{children:[h(j,{}),h(b,{}),h(W,{...r,onDocument:y,typing:c,metadata:f,height:"fill",mirrorStyles:n,frameWrapper:_})]})}function rt(){const{sectionBackgroundWidth:r,themeFromDocument:n}=G(),a=x();return T(()=>Q(n?null:r,a),[r,a,n])}function ot(r){const n=V(),a=K(),i=v({parts:a});return i.current={parts:a},T(()=>{const m=(t,o)=>{let e=O(t,n),p,d=null;const s=o??(e?null:E(null,r.current,t)),f=!e&&s?$(s):null,l=f?B(t):null;if(f&&s&&l?.propKey){e=H({...f,nodeId:l.nodeId,key:l.propKey},n),p=l.propKey;const u=s.closest(`[${S}][${P}]`),R=`[${S}="${w(u?.getAttribute(S)??"")}"][${P}="${w(u?.getAttribute(P)??"")}"]`;d=()=>(s.ownerDocument??r.current)?.querySelector(R)??null}if(!e)return null;let c=s;const g=()=>(c=E(c,d?d():c?.ownerDocument??r.current,t),c),y=g();return y?{element:g,value:e.value,rules:e.rules,multiline:e.multiline,skip:e.skip,write:e.write,key:p,toolbar:{offered:e.offered,colors:e.offered.length>0?J(X(y)):void 0,colorNameOf:q}}:null};return{at:t=>{const o=t.closest(`[${C}]`),e=o?.getAttribute(C);return o&&e?m(e,o):null},atSelection:()=>{const t=i.current.parts.selectedPartId;return t?m(t,null):null},onCopyText:t=>U(t,n),copyValue:t=>L(t,n),onChange:t=>{if(!t.typing){A(null);return}const o=t.element.closest(`[${C}]`)?.getAttribute(C)??null;A(o),o&&i.current.parts.selectedPartId!==o&&i.current.parts.select(o)}}},[n,r])}export{Et as SiteCanvas,rt as useSiteWidthsMetadata};
|
|
@@ -24,4 +24,16 @@ export declare function EditorThemedBody({ propsTheme, propsFonts, propsCornerSt
|
|
|
24
24
|
overlay?: ReactNode;
|
|
25
25
|
children?: ReactNode;
|
|
26
26
|
}): import("react").JSX.Element;
|
|
27
|
+
export declare function SiteThemeCarrier({ propsTheme, propsFonts, propsCornerStyle, propsCornerRadiusPx, propsHeadingCompression, propsHeadingTypography, pageBackground, chromeInheritsSiteBackground, onClickCapture, body, }: {
|
|
28
|
+
propsTheme?: ThemeValue;
|
|
29
|
+
propsFonts?: FontsValue;
|
|
30
|
+
propsCornerStyle?: string;
|
|
31
|
+
propsCornerRadiusPx?: number | null;
|
|
32
|
+
propsHeadingCompression?: string;
|
|
33
|
+
propsHeadingTypography?: HeadingTypographyValue;
|
|
34
|
+
pageBackground?: string;
|
|
35
|
+
chromeInheritsSiteBackground?: boolean;
|
|
36
|
+
onClickCapture?: (e: MouseEvent<HTMLDivElement>) => void;
|
|
37
|
+
body: (contentStyle: CSSProperties) => ReactNode;
|
|
38
|
+
}): import("react").JSX.Element;
|
|
27
39
|
export declare const suppressPreviewNav: (e: MouseEvent<HTMLDivElement>) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as o,jsxs as
|
|
2
|
-
`),
|
|
1
|
+
import{jsx as o,Fragment as M,jsxs as P}from"react/jsx-runtime";import{accentItalicCss as $,storedTextStyles as K,textStylesCss as X}from"../../../render/lib/text-styles/site-text-styles.js";import{pageWidthMarker as Y,PAGE_WIDTH_ATTR as q,siteWidthTokens as J,siteGutterTokens as Q,siteGutterPhoneClass as Z,siteGutterPhoneTokens as ee,heroBackgroundTokens as te}from"../../../format/lib/content/page-width.js";import{siteBlockGapPhoneClass as oe,siteBlockGapPhoneTokens as ne,siteBlockGapTokens as re}from"../../../format/lib/content/container-gap.js";import{usePreviewHeader as ie}from"../../../render/components/PreviewHeaderContext.js";import{SitePhotographyProvider as se}from"../../../render/components/SitePhotographyContext.js";import{ThemeLightInkProvider as ae}from"../../../render/components/ThemeLightInkContext.js";import{CORNER_STYLE_TO_PX as de,normalizeCornerStyle as ce,normalizeCornerRadius as le,themeColorStyle as pe,themeLightInk as he,typeSizesStyle as me,headingTypographyStyle as ue,normalizeHeadingTypography as fe,themeAccentStyle as ge,themeButtonStyle as Se,themePresetAccentVars as ye,themeSurfaceStyle as xe,siteCornerRadiusTokens as Te,shadowColorTokens as ke,headingCompressionAttr as Ce,cardShadowAttr as Pe,cardGapAttr as Ge,hoverEffectAttr as Ee}from"../../../format/lib/theme.js";import{fontRoleStyle as Ae}from"../../../format/lib/fonts.js";import{wordStyleTokens as ve}from"../../../format/lib/word-styles.js";import{isStandaloneSectionDocument as _e,pageHasHeaderSection as G,pageTakesTopSpace as Be,topSpaceMarker as Re,TOP_SPACE_ATTR as Ie,HEADER_CLEARANCE_CLASS as we}from"../../../render/lib/document/header-clearance.js";import{leadSectionInk as He,HEADER_INK_ATTR as We}from"../../../render/lib/document/header-ink.js";import{useEasel as be}from"efficient-easel/easel";import{useCardContentSwitchPass as Ne}from"../../components/useCardContentSwitchPass.js";import{pageBackgroundVars as De}from"../../../format/lib/content/page-background.js";import{pageWidthTokens as Fe}from"../../../render/lib/document/page-frame.js";import{EditingBridgesProvider as Le}from"../../../render/lib/document/editing-bridges.js";import Ue from"../../components/SectionTextPartBridge.js";import{PageContentsFromDocument as E}from"../../../render/components/PageContentsContext.js";const ze={SectionTextParts:Ue};import{PageWidthWrapper as ft,PublishedPageFrame as gt,pageWidthTokens as St}from"../../../render/lib/document/page-frame.js";const je="color-mix(in oklab, var(--bg) 40%, #ffffff)",Ve="12vh";function Oe({style:n,children:i}){const{appState:s}=be(g=>g),t=s.data.content,r=s.data.root;if(_e(t))return o("div",{className:"sf-themed-content",style:{...n,background:je,minHeight:"100vh",paddingBottom:Ve},children:o("div",{style:{background:"var(--bg)"},children:o(E,{content:t,children:i})})});const a=G(t)&&Be(r,t),d=G(t)?Re(r,t):null,m=d?{[Ie]:d}:null,c=Y(r?.widthChoice),u=c?{[q]:c}:null,l=a?null:He(t),f=l?{[We]:l}:null;return o("div",{className:`sf-themed-content${a?` ${we}`:""}`,style:n,...f,...m,...u,children:o("div",{style:{background:"var(--bg)",minHeight:"100%"},children:o(E,{content:t,children:i})})})}function pt({propsTheme:n,propsFonts:i,propsCornerStyle:s,propsCornerRadiusPx:t,propsHeadingCompression:r,propsHeadingTypography:a,pageBackground:d,chromeInheritsSiteBackground:m,suppressPreviewNav:c,footer:u,overlay:l,children:f}){return Ne(),o(Me,{propsTheme:n,propsFonts:i,propsCornerStyle:s,propsCornerRadiusPx:t,propsHeadingCompression:r,propsHeadingTypography:a,pageBackground:d,chromeInheritsSiteBackground:m,onClickCapture:c,body:g=>P(M,{children:[o(Oe,{style:g,children:f}),u,l]})})}function Me({propsTheme:n,propsFonts:i,propsCornerStyle:s,propsCornerRadiusPx:t,propsHeadingCompression:r,propsHeadingTypography:a,pageBackground:d,chromeInheritsSiteBackground:m,onClickCapture:c,body:u}){const{theme:l,fonts:f,sizes:g,cornerRadiusPx:A,cardShadow:S,shadowColor:v,cardGap:_,hoverEffect:y,headingCompression:B,siteWidth:R,siteGutter:I,siteGutterPhone:x,blockGap:w,blockGapPhone:T,siteLengthUnits:H,headingTypography:W,heroBackgroundFollowsWidth:b,photographyGrayscale:N,textStyles:D,wordStyles:F,themeFromDocument:e}=ie(),p=e?n:l,L=e?i:f,U=e?void 0:g,z=e?t===void 0?de[ce(s)]:le(t):A,h=e?{}:H,j=e?r:B,k=e?a:W,C=[X(K(e?void 0:D)),$(fe(k).italicStrong)].filter(Boolean).join(`
|
|
2
|
+
`),V=Fe(),O={...pe(p),...me(U),...ue(k),...V.style,...m?{}:De(d)};return P("div",{className:`sf-theme-surfaces sf-theme-accent ${[Z(e?void 0:x),oe(e?void 0:T)].filter(Boolean).join(" ")}`.trim(),style:{...Ae(L),...ve(e?null:F),...ge(p),...Se(p),...ye(p),...xe(p),...Te(z,h.cornerRadiusUnit),...ke(e?void 0:S,e?void 0:v,e?void 0:y),...J(e?void 0:R,h.siteWidthUnit),...Q(e?void 0:I,h.siteGutterUnit),...ee(e?void 0:x,h.siteGutterPhoneUnit),...re(e?void 0:w,h.blockGapUnit),...ne(e?void 0:T,h.blockGapPhoneUnit),...te(e?void 0:b)},"data-sf-headings":Ce(j),"data-sf-card-shadow":e?void 0:Pe(S),"data-sf-card-gap":e?void 0:Ge(_),"data-sf-card-hover":e?void 0:Ee(y),onClickCapture:c,children:[C?o("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:C}}):null,o(se,{grayscale:e?void 0:N,children:o(Le,{value:ze,children:o(ae,{ink:he(p),children:u(O)})})})]})}const ht=n=>{n.target?.closest?.("a")&&n.preventDefault()};export{ze as EDITING_BRIDGES,Oe as EditorPageBody,pt as EditorThemedBody,ft as PageWidthWrapper,gt as PublishedPageFrame,je as SECTION_PREVIEW_CANVAS,Ve as SECTION_PREVIEW_CANVAS_TAIL,Me as SiteThemeCarrier,St as pageWidthTokens,ht as suppressPreviewNav};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FIELD_DESCRIPTION_MARKER as
|
|
1
|
+
import{FIELD_DESCRIPTION_MARKER as E}from"efficient-easel/screen/lib/host";import{isNode as y}from"efficient-easel/data";import{nodeListKeys as j}from"../../format/lib/document/node-lists.js";import{RETIRED_SECTIONS as v}from"../../format/lib/document/section-catalog.js";import{layoutPresetFor as O}from"./sections/text-layouts.js";import{hasOwnEntry as x}from"../../format/lib/own-entry.js";function u(r,t){const e=r.components[t]?.label;return typeof e=="string"&&e.trim()?e.trim():t}function w(r){return r.length>3&&r.endsWith("s")?r.slice(0,-1):r}function d(r,t,e,o){r.forEach((s,l)=>{if(y(s)){o.push({node:s,list:r,index:l,parent:t,slot:e});for(const i of j(s))d(s.props[i],s,i,o)}})}function F(r){const t=[];d(Array.isArray(r.content)?r.content:[],null,"",t);for(const e of Object.values(r.zones??{}))Array.isArray(e)&&d(e,null,"",t);return t}function h(r,t){return F(r).find(e=>String(e.node.props.id)===t)}function T(r,t,e){if(!e)return null;const o=h(t,e);if(!o)return null;const s=u(r,o.node.type),l=o.parent?`${u(r,o.parent.type)} · ${w(o.slot)} ${o.index+1}`:s;return{blockId:e,type:o.node.type,label:l,path:""}}const S=r=>r.filter(t=>!!t&&typeof t=="object"&&"value"in t).map(t=>typeof t.label=="string"?{value:t.value,label:t.label}:{value:t.value});function C(r){if(!r||typeof r!="object")return null;const t=r;if(typeof t.type!="string")return null;const e=t.type==="custom"?t[E]:void 0,o={type:e?.type??t.type},s=e?.label??t.label;typeof s=="string"&&(o.label=s);const l=e?.options??t.options;Array.isArray(l)&&(o.options=S(l));for(const i of["arrayFields","objectFields"]){const n=e?.[i]??t[i];n&&typeof n=="object"&&(o[i]=k(n))}return o}function k(r){const t={};for(const[e,o]of Object.entries(r??{})){const s=C(o);s&&(t[e]=s)}return t}function B(r){const t={};for(const[e,o]of Object.entries(r.components))o&&(t[e]={label:u(r,e),fields:k(o.fields),...m(e)?{retired:!0}:{}});return t}function m(r){return x(v,r)}function g(r,t){const e=r.components[t]?.defaultProps;return e&&typeof e=="object"?structuredClone(e):{}}function R(r,t){let e=r;for(const o of t?t.split("."):[]){const s=/^([A-Za-z_][A-Za-z0-9_]*)(?:\[(\d+)\])?$/.exec(o);if(!s||!e||typeof e!="object")return null;e=e[s[1]],s[2]!==void 0&&(e=Array.isArray(e)?e[Number(s[2])]:void 0)}return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function b(r,t){return r.findIndex(e=>y(e)&&String(e.props.id)===t)}function A(r,t,e){const o=t||e;if(!o)return r.length;const s=b(r,o);if(s<0)throw new Error(`there is no top-level block ${o}`);return t?s+1:s}function K(r,t,e,o,s={}){const l=structuredClone(t),i=Array.isArray(l.content)?l.content:l.content=[];try{e.forEach((n,_)=>{const a=c=>{throw new Error(`change ${_+1}: ${c}`)};switch(n.op){case"set_props":{const c=h(l,n.block_id)??a(`there is no block ${n.block_id}`);"id"in n.props&&a("a block's id is never changed");const f=R(c.node.props,n.path)??a(`there is no ${n.path} in that block`);Object.assign(f,structuredClone(n.props));break}case"insert_block":{r.components[n.type]??a(`there is no block type ${n.type}`),m(n.type)&&a(`${u(r,n.type)} is retired: it is no longer added (a page that holds one keeps it)`);const c=O(n.type),f=Object.keys(n.props??{}).filter(p=>p!=="id");c&&f.length&&a(`${u(r,n.type)} is laid down as a Box of blocks: insert it with no props, then change its blocks`);const $=c?c(p=>g(r,p),o,s):{type:n.type,props:{...g(r,n.type),...structuredClone(n.props),id:o(n.type)}};i.splice(A(i,n.after,n.before),0,$);break}case"remove_block":{const c=b(i,n.block_id);c<0&&a(`there is no top-level block ${n.block_id}`),i.splice(c,1);break}case"move_block":{const c=b(i,n.block_id);c<0&&a(`there is no top-level block ${n.block_id}`);const[f]=i.splice(c,1);i.splice(A(i,n.after,n.before),0,f);break}default:a(`"${n.op}" is not a change this editor makes`)}})}catch(n){return{ok:!1,reason:n instanceof Error?n.message:String(n)}}return{ok:!0,document:l}}export{K as applyPageEdits,u as blockLabel,B as describeBlocks,T as describeSelection};
|
|
@@ -16,6 +16,8 @@ export interface TypeScriptApi {
|
|
|
16
16
|
ScriptKind: {
|
|
17
17
|
JS: number;
|
|
18
18
|
TS: number;
|
|
19
|
+
TSX: number;
|
|
20
|
+
JSX: number;
|
|
19
21
|
};
|
|
20
22
|
SyntaxKind: {
|
|
21
23
|
ImportKeyword: number;
|
|
@@ -29,8 +31,17 @@ export interface TypeScriptApi {
|
|
|
29
31
|
isLiteralTypeNode(node: SyntaxNode): boolean;
|
|
30
32
|
isModuleDeclaration(node: SyntaxNode): boolean;
|
|
31
33
|
isStringLiteral(node: unknown): boolean;
|
|
34
|
+
isNoSubstitutionTemplateLiteral(node: unknown): boolean;
|
|
35
|
+
isImportEqualsDeclaration(node: SyntaxNode): boolean;
|
|
36
|
+
isExternalModuleReference(node: unknown): boolean;
|
|
37
|
+
isNamespaceImport(node: unknown): boolean;
|
|
38
|
+
isNamedExports(node: unknown): boolean;
|
|
32
39
|
}
|
|
33
40
|
export declare function moduleSpecifiers(ts: TypeScriptApi, fileName: string, text: string): ModuleSpecifier[];
|
|
41
|
+
export declare function importIsTypeOnly(ts: TypeScriptApi, node: SyntaxNode): boolean;
|
|
42
|
+
export declare function exportIsTypeOnly(ts: TypeScriptApi, node: SyntaxNode): boolean;
|
|
43
|
+
export declare function importsOf(ts: TypeScriptApi, fileName: string, text: string): string[];
|
|
44
|
+
export declare function packageNameOf(spec: string): string;
|
|
34
45
|
export declare function relinkSpecifiers(ts: TypeScriptApi, fileName: string, text: string, retarget: (spec: string) => string | null): {
|
|
35
46
|
text: string;
|
|
36
47
|
rewritten: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function f(e,n,s){const l=e.createSourceFile(n,s,e.ScriptTarget.Latest,!1,n.endsWith(".d.ts")?e.ScriptKind.TS:e.ScriptKind.JS),i=[],o=t=>i.push({start:t.getStart(l)+1,end:t.getEnd()-1,text:t.text}),c=t=>{const r=t;if((e.isImportDeclaration(t)||e.isExportDeclaration(t))&&r.moduleSpecifier&&e.isStringLiteral(r.moduleSpecifier))o(r.moduleSpecifier);else if(e.isCallExpression(t)){const a=r.arguments,p=r.expression;a.length>0&&e.isStringLiteral(a[0])&&(p.kind===e.SyntaxKind.ImportKeyword||e.isIdentifier(p)&&p.text==="require")&&o(a[0])}else if(e.isImportTypeNode(t)){const a=r.argument;e.isLiteralTypeNode(a)&&e.isStringLiteral(a.literal)&&o(a.literal)}else e.isModuleDeclaration(t)&&e.isStringLiteral(r.name)&&o(r.name);e.forEachChild(t,c)};return c(l),i.sort((t,r)=>r.start-t.start)}function S(e,n){const s=n.importClause;if(!s)return!1;if(s.isTypeOnly)return!0;if(s.name)return!1;const l=s.namedBindings;if(!l||e.isNamespaceImport(l))return!1;const{elements:i}=l;return i.length>0&&i.every(o=>o.isTypeOnly)}function m(e,n){const s=n;if(s.isTypeOnly)return!0;if(!s.exportClause||!e.isNamedExports(s.exportClause))return!1;const{elements:l}=s.exportClause;return l.length>0&&l.every(i=>i.isTypeOnly)}function x(e,n){return/\.tsx$/.test(n)?e.ScriptKind.TSX:/\.jsx$/.test(n)?e.ScriptKind.JSX:/\.[cm]?js$/.test(n)?e.ScriptKind.JS:e.ScriptKind.TS}function d(e,n,s){const l=e.createSourceFile(n,s,e.ScriptTarget.Latest,!1,x(e,n)),i=[],o=t=>e.isStringLiteral(t)||e.isNoSubstitutionTemplateLiteral(t)?t.text:null,c=t=>{const r=t;if(e.isImportDeclaration(t)&&e.isStringLiteral(r.moduleSpecifier))S(e,t)||i.push(r.moduleSpecifier.text);else if(e.isExportDeclaration(t)&&r.moduleSpecifier&&e.isStringLiteral(r.moduleSpecifier))m(e,t)||i.push(r.moduleSpecifier.text);else if(e.isImportEqualsDeclaration(t)&&!r.isTypeOnly&&e.isExternalModuleReference(r.moduleReference)){const a=o(r.moduleReference.expression);a!==null&&i.push(a)}else if(e.isCallExpression(t)){const a=r.arguments,p=r.expression;if(a.length>0&&(p.kind===e.SyntaxKind.ImportKeyword||e.isIdentifier(p)&&p.text==="require")){const u=o(a[0]);u!==null&&i.push(u)}}e.forEachChild(t,c)};return c(l),i}function g(e){const n=e.split("/");return e.startsWith("@")?n.slice(0,2).join("/"):n[0]}function y(e,n,s,l){let i=s,o=0;for(const c of f(e,n,s)){const t=l(c.text);t===null||t===c.text||(i=i.slice(0,c.start)+t+i.slice(c.end),o+=1)}return{text:i,rewritten:o}}function h(e,n){const s=e.split("/").slice(0,-1),l=n.split("/");let i=0;for(;i<s.length&&i<l.length-1&&s[i]===l[i];)i+=1;const o=s.length-i,c=l.slice(i).join("/");return o===0?`./${c}`:`${"../".repeat(o)}${c}`}export{m as exportIsTypeOnly,S as importIsTypeOnly,d as importsOf,f as moduleSpecifiers,g as packageNameOf,h as relativeSpecifier,y as relinkSpecifiers};
|
|
@@ -12,13 +12,7 @@ export declare const BOX_DARKEN: {
|
|
|
12
12
|
readonly fallback: 0;
|
|
13
13
|
readonly unit: "%";
|
|
14
14
|
};
|
|
15
|
-
export
|
|
16
|
-
readonly label: "Even";
|
|
17
|
-
readonly value: "even";
|
|
18
|
-
}, {
|
|
19
|
-
readonly label: "From the bottom";
|
|
20
|
-
readonly value: "bottom";
|
|
21
|
-
}];
|
|
15
|
+
export { BOX_DARKEN_STYLES } from "./box-darken-styles.js";
|
|
22
16
|
export declare const BOX_CARD_PAD: {
|
|
23
17
|
readonly desktop: 20;
|
|
24
18
|
readonly phone: 20;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseHexColor as C}from"efficient-shell/format";import{fillColorRole as
|
|
1
|
+
import{parseHexColor as C}from"efficient-shell/format";import{fillColorRole as D}from"efficient-shell/markup";import{BOX_ROW_IMAGE_PROP as c}from"./box-card-rule.js";import{boxLayoutClasses as P}from"./box-layout.js";import{namedRowField as u,rowFieldText as h}from"./card-template.js";import{fillInkCss as y,fillSlotNamed as L,inkTokenOf as E,partColourName as I}from"../document/part-inks.js";import{scrim as f}from"./scrim.js";import{viewVarSplit as _}from"./view-var-split.js";import{BOX_DARKEN_STYLES as N}from"./box-darken-styles.js";const J="sf-card",Q="[--sf-card-lift:none] [--sf-card-shadow-hover:var(--sf-card-shadow,none)]",g={min:0,max:100,step:5,fallback:0,unit:"%"};import{BOX_DARKEN_STYLES as mt}from"./box-darken-styles.js";const B="68%",U={desktop:20,phone:20,side:40,sidePhone:24},Z="sf-box-sides",v={min:0,max:200,step:10};function R(t){return typeof t=="string"&&t.trim()!==""}function tt(t){return R(typeof t?.bgImage=="string"?t.bgImage:null)||O(t)}function O(t){return u(t,c)!==""}function et(t,e){return e||!O(t)?t:{...t,[c]:""}}function ot(t,e){const n=h(e,u(t,c))?.trim();return n||null}function F(t,e){const o=typeof t=="number"?t:Number.parseFloat(String(t??""));if(!Number.isFinite(o)||o<=0)return null;const l=(Math.min(g.max,Math.max(g.min,o))/100).toFixed(2);return e!=="bottom"?{background:f(Number(l))}:{background:`linear-gradient(0deg, ${f(Number(l))} 0%, ${f(0)} ${B})`}}const k=[{label:"Flat",value:"",hint:"One colour from top to bottom"},{label:"Fade",value:"down",hint:"The colour fades into the page colour at the bottom"}],nt="fillFade",m=k[1].value,T=t=>t===m?m:k[0].value,X=[{mix:"12%",at:"50%"},{mix:"19%",at:"70%"},{mix:"50%",at:"95%"}];function rt(t){return T(t)!==m?null:{backgroundImage:`linear-gradient(to bottom, transparent, ${X.map(o=>`color-mix(in srgb, var(--bg) ${o.mix}, transparent) ${o.at}`).join(", ")})`}}const A=t=>typeof t=="string"?C(t.trim()):null,p=t=>{const e=A(t);if(e!==null||typeof t!="string")return e;const o=t.trim();return o&&!o.startsWith("#")&&y(o)||null},lt=t=>{if(typeof t!="string")return null;const e=D(I(t.trim()));return e?.kind==="slot"?e.slot:null},W="swatch";function at(t,e){if(!e)return null;const o=h(e,u(t,W)),n=L(o);return A(o)??(n&&E(n)||null)}const V={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function st(t,e,o){return _(V,p(t),p(e),p(o))}const w={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function it(t){const e=F(t.darken,t.darkenStyle);if(!e)return{className:"",style:{}};const o=(r,i)=>String(F(r,i)?.background??"none"),n=r=>(typeof r=="number"||typeof r=="string"&&r.trim()!=="")&&Number.isFinite(Number(r))?r:void 0,l=r=>N.some(i=>i.value===r)?r:void 0,[a,s,d,x]=[n(t.darkenTablet),l(t.darkenStyleTablet),n(t.darkenPhone),l(t.darkenStylePhone)],b=a??t.darken,S=s??t.darkenStyle;return _(w,String(e.background),a!==void 0||s!==void 0?o(b,S):null,d!==void 0||x!==void 0?o(d??b,x??S):null)}function ct(t,e){const o={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[n,l]=o[t]??o.center,[a,s]=e==="column"?[l,n]:[n,l];return P(a,s)}export{U as BOX_CARD_PAD,v as BOX_CARD_SIDE,g as BOX_DARKEN,mt as BOX_DARKEN_STYLES,k as BOX_FILL_FADES,nt as BOX_FILL_FADE_PROP,V as BOX_FILL_VIEWS,Z as BOX_OWNS_SIDES_CLASS,W as BOX_SWATCH_PROP,w as BOX_WASH_VIEWS,Q as CARD_NO_LIFT_CLASS,J as CARD_SHADOW_CLASS,et as boxCardProps,F as boxDarkenStyle,T as boxFillFadeOf,rt as boxFillFadeStyle,A as boxFillOf,lt as boxFillSlot,st as boxFillViews,tt as boxIsCard,O as boxNamesRowPicture,p as boxPaintOf,ct as boxPlacementClasses,ot as boxRowPicture,at as boxSwatchFill,it as boxWashViews,R as isBackgroundBox};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}];export{e as BOX_DARKEN_STYLES};
|
|
@@ -3,3 +3,13 @@ export declare const CARD_ROW_LINK_PROP = "rowLinkField";
|
|
|
3
3
|
export declare const CARD_TEMPLATE_SLOT = "template";
|
|
4
4
|
export declare const CARD_LIST_TYPE = "CardList";
|
|
5
5
|
export declare const BOX_HIDE_WHEN_ROW_EMPTY = "hideWhenRowEmpty";
|
|
6
|
+
export declare const CARD_TEMPLATE_BLOCKS: readonly ["Text", "ImageBlock", "ButtonBlock", "Flex"];
|
|
7
|
+
export declare function cardTemplateSlot(): {
|
|
8
|
+
type: "slot";
|
|
9
|
+
allow: string[];
|
|
10
|
+
};
|
|
11
|
+
export declare const CARD_LIST_ITEM_BLOCKS: ("Text" | "ImageBlock" | "Flex")[];
|
|
12
|
+
export declare function cardListItemSlot(): {
|
|
13
|
+
type: "slot";
|
|
14
|
+
allow: string[];
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const r="rowField",_="rowLinkField",l="template",n="CardList",c="hideWhenRowEmpty",t=["Text","ImageBlock","ButtonBlock","Flex"];function p(){return{type:"slot",allow:[...t]}}const e=t.filter(o=>o!=="ButtonBlock");function L(){return{type:"slot",allow:[...e]}}export{c as BOX_HIDE_WHEN_ROW_EMPTY,e as CARD_LIST_ITEM_BLOCKS,n as CARD_LIST_TYPE,r as CARD_ROW_FIELD_PROP,_ as CARD_ROW_LINK_PROP,t as CARD_TEMPLATE_BLOCKS,l as CARD_TEMPLATE_SLOT,L as cardListItemSlot,p as cardTemplateSlot};
|
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
import { type SourceRow } from "./block-sources.js";
|
|
2
2
|
import type { CardCopyPlace } from "./mirror-cards.js";
|
|
3
3
|
export declare const CARD_TEMPLATE_LABEL = "Card template";
|
|
4
|
-
export
|
|
5
|
-
export { BOX_HIDE_WHEN_ROW_EMPTY, CARD_LIST_TYPE, CARD_ROW_FIELD_PROP, CARD_ROW_LINK_PROP, CARD_TEMPLATE_SLOT } from "./card-row-keys.js";
|
|
6
|
-
export declare function cardTemplateSlot(): {
|
|
7
|
-
type: "slot";
|
|
8
|
-
allow: string[];
|
|
9
|
-
};
|
|
10
|
-
export declare const CARD_LIST_ITEM_BLOCKS: ("Flex" | "Text" | "ImageBlock")[];
|
|
4
|
+
export { BOX_HIDE_WHEN_ROW_EMPTY, CARD_LIST_TYPE, CARD_ROW_FIELD_PROP, CARD_ROW_LINK_PROP, CARD_LIST_ITEM_BLOCKS, CARD_TEMPLATE_BLOCKS, CARD_TEMPLATE_SLOT, cardListItemSlot, cardTemplateSlot } from "./card-row-keys.js";
|
|
11
5
|
export declare const CARD_LIST_ROWS = "items";
|
|
12
6
|
export declare const CARD_LIST_FIELDS = "itemFields";
|
|
13
|
-
export declare function cardListItemSlot(): {
|
|
14
|
-
type: "slot";
|
|
15
|
-
allow: string[];
|
|
16
|
-
};
|
|
17
7
|
export type CardRowFieldKind = "text" | "image" | "link" | "list" | "colour" | "date";
|
|
18
8
|
export type CardRowFieldKinds = CardRowFieldKind | readonly CardRowFieldKind[];
|
|
19
9
|
export declare function fieldsOfKind(fields: readonly CardRowFieldSpec[], kind?: CardRowFieldKinds): readonly CardRowFieldSpec[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{blockSources as Y,blockSourceSpec as O,declaredBlockSource as R}from"./block-sources.js";import{slotFieldBlocks as h}from"./slot-field-blocks.js";import{isNodeList as v}from"efficient-easel/data";import{BOX_TYPE as W}from"../document/container-blocks.js";import{globalRegistry as M}from"../global-registry.js";import{nonEmptyString as S}from"../non-empty-string.js";import{accentItalicRuns as N}from"../markup.js";import{BOX_HIDE_WHEN_ROW_EMPTY as K,CARD_LIST_TYPE as k,CARD_ROW_FIELD_PROP as p,CARD_ROW_LINK_PROP as y,CARD_TEMPLATE_SLOT as B}from"./card-row-keys.js";import{withCardsTemplate as H}from"../document/cards-template-on-read.js";import{CARDS_TYPE as L}from"../document/blocks/general/Cards/card-seed.js";import{ORDER_SUMMARY_TYPE as $}from"../document/blocks/general/OrderSummary/block-type.js";import{PROCESS_STEPS_TYPE as j}from"../document/blocks/general/ProcessSteps/row-seed.js";import{withCardListTemplate as U}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as Q,withArticleBodyTemplate as X}from"../document/article-body-seed.js";import{LOGOS_TYPE as q,withLogosTemplate as V}from"../document/blocks/general/Logos/card-seed.js";import{FAQ_TYPE as G,withFaqTemplate as z}from"../document/blocks/general/FAQ/card-seed.js";import{FOOTPRINT_TYPE as J,withFootprintListTemplate as Z}from"../document/blocks/general/Footprint/card-seed.js";const ee="Card template",E=["Text","ImageBlock","ButtonBlock","Flex"];import{BOX_HIDE_WHEN_ROW_EMPTY as st,CARD_LIST_TYPE as it,CARD_ROW_FIELD_PROP as at,CARD_ROW_LINK_PROP as ct,CARD_TEMPLATE_SLOT as ft}from"./card-row-keys.js";function Fe(){return{type:"slot",allow:[...E]}}const te=E.filter(e=>e!=="ButtonBlock"),A="items",P="itemFields";function Ye(){return{type:"slot",allow:[...te]}}function m(e,t){if(!t)return e;const r=typeof t=="string"?[t]:t;return e.filter(n=>r.includes(n.kind??"text"))}const re=[{block:$,typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:G,typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>z(e)},{block:J,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=>Z(e)},{block:L,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=>H(L,e)},{block:j,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:k,label:"Card list"}]},{block:q,fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>V(e)},{block:k,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:A,seed:e=>U(e)},{block:Q,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>X(e)}];function f(){return M("efficient.card-templates",()=>new Map(re.map(e=>[e.block,e])))}function ve(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.`);if(o.type===D)throw new Error(`The card template of ${t.block} names "${D}" in its blocks. Only a host's seed puts a host part in a card template; a merchant never adds one. Take it out.`);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=S(o.label),c=Array.isArray(o.fields)?{fields:o.fields.map(a=>({...a}))}:null;n.some(a=>a.slot===o.slot)||n.push({slot:o.slot,...l?{label:l}:null,...c})}const s=n.some(o=>o.fields);if(s&&(t.fields.some(o=>o.everySource)||Y(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=S(t.typedRows);f().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 oe(e,t){const r=e?f().get(e)?.seed:void 0;return r?r(t):t}function We(e,t){const r=le(e),n=(r.length?r:[B]).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,o=i?i(s):oe(e,s);return o===s?t:o}function Me(){for(const e of f().values())if(e.blocks?.length)return!0;return!1}function Ne(e){return f().get(e)?.blocks??[]}function Ke(e){for(const t of f().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function He(e){return typeof e=="string"&&f().get(e)?.typedRows||""}function $e(e){return typeof e=="string"&&f().get(e)?.linesBetween===!0}function je(e){return typeof e=="string"&&f().has(e)}const ne=[{slot:B}];function b(e){if(typeof e!="string")return[];const t=f().get(e);return t?t.slots??ne:[]}function le(e){return b(e).map(t=>t.slot)}function se(e,t){return b(e).some(r=>r.slot===t)}function Ue(e,t){const r=b(e).find(n=>n.slot===t);return r?r.label??ee:null}function g(e,t){return t?b(e).find(r=>r.slot===t)?.fields:void 0}function ie(e,t){const r=f().get(e)?.fields??[];return m(r,t)}function ae(e,t){if(typeof e!="string")return"";const r=g(e,t);return(r?m(r,"list"):ie(e,"list"))[0]?.key??""}function ce(e,t,r){return _(e)||ae(t,r)}function C(e,t,r){const n=typeof e?.type=="string"?e.type:"";if(!n)return[];const s=g(n,r);if(s)return m(s,t);const i=f().get(n)?.fields??[],o=O(R(e?.props))?.fields,l=o?.length?[...o.map(c=>({...c})),...i.filter(c=>c.everySource&&!o.some(a=>a.key===c.key))]:i;return m(l,t)}function fe(e,t,r,n){if(!e)return null;const s=g(e,n);return s?s.find(i=>i.key===t)??null:r?C(r).find(i=>i.key===t)??null:f().get(e)?.fields.find(i=>i.key===t)??null}function x(e,t){return!e||!t?null:e.fields?.find(r=>r.key===t)??fe(e.ownerType,t,e.owner,e.slot)}function Qe(e,t){return x(e,t)?.plain===!0}function Xe(e,t){return x(e,t)?.kind==="date"}function _(e,t=p){const r=e?.[t];return typeof r=="string"?r.trim():""}function qe(e,t){return e.key||String(t+1)}function Ve(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}function Ge(e,t){const r=e[K];return!t||!Array.isArray(r)||!r.length?!1:r.every(n=>typeof n!="string"||!t[n]?.trim())}const w={Text:{text:p,href:y},ImageBlock:{src:p,href:y},ButtonBlock:{label:p,href:y},LogoBlock:{alt:p,href:y},Breadcrumb:{currentCrumb:p}},ze=w,ue=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Je(e,t,r){return de(e,t,r)&&!ue.has(`${e}.${r}`)}function de(e,t,r){return pe(e,t,r)!==""}function pe(e,t,r){const n=w[e]?.[r];return n?_(t,n):""}function I(e,t){return!t||!e?null:e[t]??""}function me(e,t){return I(e,t)?.trim()||void 0}function Ze(e,t,r,n,s,i){if(!r)return t;let o=null;for(const[l,c]of Object.entries(w[e]??{})){const a=_(t,c),u=I(r,a);if(u!==null){if(o??={...t},c===y){o[l]=me(r,a);continue}o[l]=x({ownerType:n,fields:s,slot:i},a)?.mark==="accentItalic"?N(u):u}}return o??t}function T(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(i,o)=>{for(const l of i){if(l?.props?.id===t)return o;for(const[c,a]of Object.entries(l?.props??{})){if(!v(a))continue;const u=se(l.type,c)?{owner:l,slot:c,direct:!0,nested:o!==null,underBox:!1}:o&&{owner:o.owner,slot:o.slot,direct:!1,nested:o.nested,underBox:o.underBox||l.type===W},d=n(a,u);if(d!==void 0)return d}}},s=n(r,null);return s===void 0?null:s}function ye(e,t){const r=T(e,t);return r&&r.owner}function ke(e,t){const r=T(e,t);return r&&r.slot}function et(e,t){const r=T(e,t);return r&&(r.direct?r.owner:null)}function tt(e,t){const r=T(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function rt(e,t,r){if(t?.type!==k)return[];const n=ye(e,t.props?.id);if(!n){const l=O(R(t.props))?.fields,c=l?.length?l.map(d=>({...d})):be(t.props),a=(f().get(k)?.fields??[]).filter(d=>d.everySource&&!c.some(F=>F.key===d.key)),u=[...c,...a];return m(u,r)}const s=ke(e,t.props?.id)??void 0,i=ce(t.props,n.type,s),o=i&&C(n,"list",s).find(l=>l.key===i)?.fields||[];return m(o,r)}function ot(e,t){return{[p]:"",[A]:e.map(r=>({...r})),[P]:t.map(r=>({...r}))}}function be(e,t){const r=e?.[P];if(!Array.isArray(r))return[];const n=r.flatMap(s=>{if(!s||typeof s!="object")return[];const{key:i,label:o,kind:l,multiline:c,alt:a,next:u}=s;if(typeof i!="string"||!i||typeof o!="string")return[];const d=l==="image"||l==="link"||l==="colour"||l==="date"?l:void 0;return[{key:i,label:o,...d?{kind:d}:{},...c===!0?{multiline:!0}:{},...typeof a=="string"&&a?{alt:a}:{},...typeof u=="string"&&u?{next:u}:{}}]});return m(n,t)}const D="HostPart";export{st as BOX_HIDE_WHEN_ROW_EMPTY,P as CARD_LIST_FIELDS,te as CARD_LIST_ITEM_BLOCKS,A as CARD_LIST_ROWS,it as CARD_LIST_TYPE,at as CARD_ROW_FIELD_PROP,ct as CARD_ROW_LINK_PROP,E as CARD_TEMPLATE_BLOCKS,ee as CARD_TEMPLATE_LABEL,ft as CARD_TEMPLATE_SLOT,D as HOST_PART_TYPE,ze as ROW_BOUND_PROPS,ue as ROW_PART_BY_WORDS,tt as cardCopyPlace,qe as cardKeyOf,rt as cardListFieldsOf,Ye as cardListItemSlot,ot as cardListProps,ce as cardListShows,Ve as cardRow,Ne as cardTemplateBlocks,et as cardTemplateCardOwner,fe as cardTemplateField,ie as cardTemplateFields,C as cardTemplateFieldsOf,$e as cardTemplateLinesBetween,ye as cardTemplateOwner,Fe as cardTemplateSlot,Ue as cardTemplateSlotLabel,le as cardTemplateSlotNames,ke as cardTemplateSlotOf,He as cardTemplateTypedRows,Me as cardTemplatesNameBlocks,ae as defaultListField,m as fieldsOfKind,je as hasCardTemplate,Ke as isCardTemplateBlock,se as isCardTemplateSlot,_ as namedRowField,ve as registerCardTemplates,de as rowBound,Xe as rowFieldIsDate,pe as rowFieldOf,x as rowFieldSpec,I as rowFieldText,Qe as rowFieldWordsArePlain,Ze as rowFilledProps,me as rowLinkText,Je as rowPartByKey,Ge as templateBoxIsEmpty,We as templateOnInsert,oe as templateOnRead};
|
|
1
|
+
import{blockSources as F,blockSourceSpec as O,declaredBlockSource as R}from"./block-sources.js";import{slotFieldBlocks as h}from"./slot-field-blocks.js";import{nodeListKeys as Y}from"../document/node-lists.js";import{BOX_TYPE as v}from"../document/container-blocks.js";import{globalRegistry as W}from"../global-registry.js";import{nonEmptyString as S}from"../non-empty-string.js";import{accentItalicRuns as M}from"../markup.js";import{BOX_HIDE_WHEN_ROW_EMPTY as K,CARD_LIST_TYPE as b,CARD_ROW_FIELD_PROP as p,CARD_ROW_LINK_PROP as y,CARD_TEMPLATE_SLOT as L}from"./card-row-keys.js";import{withCardsTemplate as N}from"../document/cards-template-on-read.js";import{CARDS_TYPE as E}from"../document/blocks/general/Cards/card-seed.js";import{ORDER_SUMMARY_TYPE as H}from"../document/blocks/general/OrderSummary/block-type.js";import{PROCESS_STEPS_TYPE as $}from"../document/blocks/general/ProcessSteps/row-seed.js";import{withCardListTemplate as U}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as j,withArticleBodyTemplate as Q}from"../document/article-body-seed.js";import{LOGOS_TYPE as X,withLogosTemplate as q}from"../document/blocks/general/Logos/card-seed.js";import{FAQ_TYPE as V,withFaqTemplate as G}from"../document/blocks/general/FAQ/card-seed.js";import{FOOTPRINT_TYPE as z,withFootprintListTemplate as J}from"../document/blocks/general/Footprint/card-seed.js";const Z="Card template";import{BOX_HIDE_WHEN_ROW_EMPTY as rt,CARD_LIST_TYPE as ot,CARD_ROW_FIELD_PROP as nt,CARD_ROW_LINK_PROP as lt,CARD_LIST_ITEM_BLOCKS as st,CARD_TEMPLATE_BLOCKS as it,CARD_TEMPLATE_SLOT as at,cardListItemSlot as ct,cardTemplateSlot as ft}from"./card-row-keys.js";const A="items",B="itemFields";function m(e,t){if(!t)return e;const r=typeof t=="string"?[t]:t;return e.filter(n=>r.includes(n.kind??"text"))}const ee=[{block:H,typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:V,typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>G(e)},{block:z,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=>J(e)},{block:E,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=>N(E,e)},{block:$,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:b,label:"Card list"}]},{block:X,fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>q(e)},{block:b,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:A,seed:e=>U(e)},{block:j,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>Q(e)}];function f(){return W("efficient.card-templates",()=>new Map(ee.map(e=>[e.block,e])))}function Ie(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.`);if(o.type===I)throw new Error(`The card template of ${t.block} names "${I}" in its blocks. Only a host's seed puts a host part in a card template; a merchant never adds one. Take it out.`);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=S(o.label),a=Array.isArray(o.fields)?{fields:o.fields.map(c=>({...c}))}:null;n.some(c=>c.slot===o.slot)||n.push({slot:o.slot,...l?{label:l}:null,...a})}const s=n.some(o=>o.fields);if(s&&(t.fields.some(o=>o.everySource)||F(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=S(t.typedRows);f().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 te(e,t){const r=e?f().get(e)?.seed:void 0;return r?r(t):t}function De(e,t){const r=oe(e),n=(r.length?r:[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,o=i?i(s):te(e,s);return o===s?t:o}function Fe(){for(const e of f().values())if(e.blocks?.length)return!0;return!1}function Ye(e){return f().get(e)?.blocks??[]}function ve(e){for(const t of f().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function We(e){return typeof e=="string"&&f().get(e)?.typedRows||""}function Me(e){return typeof e=="string"&&f().get(e)?.linesBetween===!0}function Ke(e){return typeof e=="string"&&f().has(e)}const re=[{slot:L}];function k(e){if(typeof e!="string")return[];const t=f().get(e);return t?t.slots??re:[]}function oe(e){return k(e).map(t=>t.slot)}function ne(e,t){return k(e).some(r=>r.slot===t)}function Ne(e,t){const r=k(e).find(n=>n.slot===t);return r?r.label??Z:null}function g(e,t){return t?k(e).find(r=>r.slot===t)?.fields:void 0}function le(e,t){const r=f().get(e)?.fields??[];return m(r,t)}function se(e,t){if(typeof e!="string")return"";const r=g(e,t);return(r?m(r,"list"):le(e,"list"))[0]?.key??""}function ie(e,t,r){return x(e)||se(t,r)}function P(e,t,r){const n=typeof e?.type=="string"?e.type:"";if(!n)return[];const s=g(n,r);if(s)return m(s,t);const i=f().get(n)?.fields??[],o=O(R(e?.props))?.fields,l=o?.length?[...o.map(a=>({...a})),...i.filter(a=>a.everySource&&!o.some(c=>c.key===a.key))]:i;return m(l,t)}function ae(e,t,r,n){if(!e)return null;const s=g(e,n);return s?s.find(i=>i.key===t)??null:r?P(r).find(i=>i.key===t)??null:f().get(e)?.fields.find(i=>i.key===t)??null}function _(e,t){return!e||!t?null:e.fields?.find(r=>r.key===t)??ae(e.ownerType,t,e.owner,e.slot)}function He(e,t){return _(e,t)?.plain===!0}function $e(e,t){return _(e,t)?.kind==="date"}function x(e,t=p){const r=e?.[t];return typeof r=="string"?r.trim():""}function Ue(e,t){return e.key||String(t+1)}function je(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}function Qe(e,t){const r=e[K];return!t||!Array.isArray(r)||!r.length?!1:r.every(n=>typeof n!="string"||!t[n]?.trim())}const w={Text:{text:p,href:y},ImageBlock:{src:p,href:y},ButtonBlock:{label:p,href:y},LogoBlock:{alt:p,href:y},Breadcrumb:{currentCrumb:p}},Xe=w,ce=new Set(["ButtonBlock.label","LogoBlock.alt"]);function qe(e,t,r){return fe(e,t,r)&&!ce.has(`${e}.${r}`)}function fe(e,t,r){return ue(e,t,r)!==""}function ue(e,t,r){const n=w[e]?.[r];return n?x(t,n):""}function C(e,t){return!t||!e?null:e[t]??""}function de(e,t){return C(e,t)?.trim()||void 0}function Ve(e,t,r,n,s,i){if(!r)return t;let o=null;for(const[l,a]of Object.entries(w[e]??{})){const c=x(t,a),u=C(r,c);if(u!==null){if(o??={...t},a===y){o[l]=de(r,c);continue}o[l]=_({ownerType:n,fields:s,slot:i},c)?.mark==="accentItalic"?M(u):u}}return o??t}function T(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(i,o)=>{for(const l of i){if(l?.props?.id===t)return o;for(const a of Y(l??{})){const c=l.props[a],u=ne(l.type,a)?{owner:l,slot:a,direct:!0,nested:o!==null,underBox:!1}:o&&{owner:o.owner,slot:o.slot,direct:!1,nested:o.nested,underBox:o.underBox||l.type===v},d=n(c,u);if(d!==void 0)return d}}},s=n(r,null);return s===void 0?null:s}function pe(e,t){const r=T(e,t);return r&&r.owner}function me(e,t){const r=T(e,t);return r&&r.slot}function Ge(e,t){const r=T(e,t);return r&&(r.direct?r.owner:null)}function ze(e,t){const r=T(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function Je(e,t,r){if(t?.type!==b)return[];const n=pe(e,t.props?.id);if(!n){const l=O(R(t.props))?.fields,a=l?.length?l.map(d=>({...d})):ye(t.props),c=(f().get(b)?.fields??[]).filter(d=>d.everySource&&!a.some(D=>D.key===d.key)),u=[...a,...c];return m(u,r)}const s=me(e,t.props?.id)??void 0,i=ie(t.props,n.type,s),o=i&&P(n,"list",s).find(l=>l.key===i)?.fields||[];return m(o,r)}function Ze(e,t){return{[p]:"",[A]:e.map(r=>({...r})),[B]:t.map(r=>({...r}))}}function ye(e,t){const r=e?.[B];if(!Array.isArray(r))return[];const n=r.flatMap(s=>{if(!s||typeof s!="object")return[];const{key:i,label:o,kind:l,multiline:a,alt:c,next:u}=s;if(typeof i!="string"||!i||typeof o!="string")return[];const d=l==="image"||l==="link"||l==="colour"||l==="date"?l:void 0;return[{key:i,label:o,...d?{kind:d}:{},...a===!0?{multiline:!0}:{},...typeof c=="string"&&c?{alt:c}:{},...typeof u=="string"&&u?{next:u}:{}}]});return m(n,t)}const I="HostPart";export{rt as BOX_HIDE_WHEN_ROW_EMPTY,B as CARD_LIST_FIELDS,st as CARD_LIST_ITEM_BLOCKS,A as CARD_LIST_ROWS,ot as CARD_LIST_TYPE,nt as CARD_ROW_FIELD_PROP,lt as CARD_ROW_LINK_PROP,it as CARD_TEMPLATE_BLOCKS,Z as CARD_TEMPLATE_LABEL,at as CARD_TEMPLATE_SLOT,I as HOST_PART_TYPE,Xe as ROW_BOUND_PROPS,ce as ROW_PART_BY_WORDS,ze as cardCopyPlace,Ue as cardKeyOf,Je as cardListFieldsOf,ct as cardListItemSlot,Ze as cardListProps,ie as cardListShows,je as cardRow,Ye as cardTemplateBlocks,Ge as cardTemplateCardOwner,ae as cardTemplateField,le as cardTemplateFields,P as cardTemplateFieldsOf,Me as cardTemplateLinesBetween,pe as cardTemplateOwner,ft as cardTemplateSlot,Ne as cardTemplateSlotLabel,oe as cardTemplateSlotNames,me as cardTemplateSlotOf,We as cardTemplateTypedRows,Fe as cardTemplatesNameBlocks,se as defaultListField,m as fieldsOfKind,Ke as hasCardTemplate,ve as isCardTemplateBlock,ne as isCardTemplateSlot,x as namedRowField,Ie as registerCardTemplates,fe as rowBound,$e as rowFieldIsDate,ue as rowFieldOf,_ as rowFieldSpec,C as rowFieldText,He as rowFieldWordsArePlain,Ve as rowFilledProps,de as rowLinkText,qe as rowPartByKey,Qe as templateBoxIsEmpty,De as templateOnInsert,te as templateOnRead};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNodeList as
|
|
1
|
+
import{isNodeList as l}from"efficient-easel/data";import{mapEachNode as S,mapNodeLists as T,nodeListsOf as E}from"../document/node-lists.js";import{CARD_LIST_ROWS as _,CARD_LIST_TYPE as y,namedRowField as L}from"./card-template.js";import{BLOCK_SOURCE_PROP as N,COUNT_KEY_PROP as u,COUNTS_SOURCE as i,declaredBlockSource as O,sourceChoices as U}from"./block-sources.js";const C="Flex";function x(t,n){return L(t)?typeof t?.[u]=="string"?c(n?.[u]):"":c(t?.[u])}const c=t=>typeof t=="string"?t.trim():"",P=t=>t.type===y&&Array.isArray(t.props?.[_])&&t.props[_].some(n=>c(n?.[u])!==""),A=new Intl.NumberFormat("en-US");function B(t){return/^\d+$/.test(t)?A.format(Number(t)):t}function F(t,n){const r=n?n.find(e=>e.key===t)?.value:U(i).find(e=>e.key===t)?.value;return r===void 0?null:B(r)}const W={[u]:"any"};function p(t,n=!1){const r=t.props;if(!r)return{node:t,names:!1};let e=t.type==="Text"&&(x(r)!==""||n&&x(r,W)!=="");const s=n||P(t);let o=T(t,a=>S(a,f=>{const d=p(f,s);return d.names&&(e=!0),d.node})).props;if(t.type!==C)return{node:o===r?t:{...t,props:o},names:e};const m=O(o);if(e&&!m&&(o={...o,[N]:i}),!e&&m===i){const{[N]:a,...f}=o;o=f}return{node:o===r?t:{...t,props:o},names:!1}}function R(t,n,r){for(const e of t){if(e?.props?.id===n)return r;for(const s of E(e??{})){const o=R(s,n,e.type===C?e:r);if(o!==void 0)return o}}}function I(t,n){if(!l(t))return!0;const r=R(t,n,null);if(r===void 0)return!0;if(r===null)return!1;const e=O(r.props);return!e||e===i}function k(t){const n=t?.content;if(!l(n))return t;const r=n.map(e=>p(e));return r.every((e,s)=>e.node===n[s])?t:{...t,content:r.map(e=>e.node)}}function v(t){return p(t).node}export{F as countNumber,B as countWords,I as countsReachText,x as linkedCount,v as settleCountNode,k as settleCountSources};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{nodeListKeys as g}from"../document/node-lists.js";import{isVerticalLoop as h}from"../animation/loop.js";import{boxCardProps as l,boxIsCard as B}from"./box-background.js";import"./box-card-rule.js";import{isCardTemplateSlot as R}from"./card-template.js";import{SECTION_WIDTH_FAMILY as y,hasWidthFamily as A,ownSectionWidth as x,siteWidthsOf as C}from"./section-width.js";const F=new Set(["Flex","Grid"]);function m(t){return typeof t=="string"&&F.has(t)}const W="contentWidth",I="full",S="content";function k(t){const n=t?.[W];return n===I?!1:n===S?!0:void 0}function K(t,n){return t&&!n}function O(t){return t.loop==="scroll"&&t.direction!=="tabs"&&t.direction!=="accordion"&&!B(t)&&!h(t.scrollDirection)}function u(t,n){return m(t)&&O(l(n,!1))?x({}):x(n)}function Y(t,n){return typeof t!="string"||!A(t)||y[t]==="rawMarkup"?u(t,n).background??"full":u(t,n).background??C(n).background}function H(t){return t!=="full"}function V(t,n,G){if(!Array.isArray(t)||typeof n!="string")return;const f=(_,e,b,p,c)=>{for(const r of _){const o=r?.props??{};if(o.id===n)return e;const i=m(r?.type),s=(p?u(r?.type,o).content:null)==="content"?!0:b,w=i&&(e.inBox?k(o)??s:s),T={insideGutter:e.insideGutter||w||i&&O(l(o,c)),inBox:e.inBox||i};for(const d of g({type:r?.type,props:o})){const E=o[d],a=f(E,T,s,!1,c||R(r?.type,d));if(a!==void 0)return a}}};return f(t,{insideGutter:!1,inBox:!1},G,!0,!1)}export{W as BOX_GUTTER_KEY,I as BOX_GUTTER_OFF,S as BOX_GUTTER_ON,k as boxGutterOf,V as boxPlaceOf,O as boxRunsEdgeToEdge,K as drawsSiteGutter,m as isFrameContainer,u as ownNodeWidth,Y as sectionGroundAnswer,H as siteDrawsGutter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{GENERAL_SLOTS as t}from"../slots.js";const r=t.CardList,i={label:"Card list",inline:!0,fields:r,defaultProps:{rowField:""}};export{i as CardListMeta,r as CardListSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{GENERAL_SLOTS as e}from"../slots.js";const r={eyebrow:"Label",title:"Section *heading.*"},t=e.Cards,s={label:"Cards",fields:t,defaultProps:{eyebrow:"",title:"",items:[],columns:3}};export{r as CARDS_PH,s as CardsMeta,t as CardsSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PH as e}from"../../placeholders.js";import{
|
|
1
|
+
import{PH as e}from"../../placeholders.js";import{GENERAL_SLOTS as t}from"../slots.js";const o={num:e.sectionNumber,title:"Frequently *asked.*",link:"View all questions"},l=t.FAQ,r={label:"Q&A",inline:!0,fields:l,defaultProps:{num:"",title:"",linkText:"",linkHref:"/faq",defaultOpen:!0,items:[]}};export{r as FAQMeta,l as FAQSlots,o as FAQ_PH};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as
|
|
1
|
+
import{phoneKey as o}from"efficient-easel/screen/lib/content/view-tiers";import{GENERAL_SLOTS as t}from"../slots.js";const e=t.Flex,p={label:"Box",fields:e,phoneOrder:{prop:o("order"),slot:"content"},defaultProps:{direction:"row",justify:"start",align:"stretch",wrap:!0,content:[],share:"equal",blockSpacing:"gap",padV2:!0,sectionPaddingTop:24,sectionPaddingBottom:24}};export{p as FlexMeta,e as FlexSlots};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{FOOTPRINT_DEFAULTS as
|
|
2
|
-
*${
|
|
1
|
+
import{FOOTPRINT_DEFAULTS as t}from"../../../../content/footprint.js";import{PH as o}from"../../placeholders.js";import{GENERAL_SLOTS as e}from"../slots.js";const s={sectionNumber:o.sectionNumber,heading:`${o.heading}
|
|
2
|
+
*${o.accent}*`,tagline:o.body},i=e.Footprint,p={label:"Locations Map",fields:i,defaultProps:{sectionNumber:"",heading:"",tagline:"",offices:[],mapTheme:t.mapTheme,padTop:120,padBottom:120,search:!1,searchHint:"",noMatchText:"",listPosition:"below",showDistance:!0}};export{s as FOOTPRINT_PH,p as FootprintMeta,i as FootprintSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=
|
|
1
|
+
import{GENERAL_SLOTS as o}from"../slots.js";const t=o.Grid,e={label:"Grid",fields:t,defaultProps:{columns:"3",content:[]}};export{e as GridMeta,t as GridSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=
|
|
1
|
+
import{GENERAL_SLOTS as e}from"../slots.js";const t=e.Hero,r={label:"Hero",drawsPictures:!0,fields:t,defaultProps:{alignment:"left",textureOpacity:40,autoplay:!1,autoplayInterval:6}};export{r as HeroMeta,t as HeroSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{HERO_GROUP_BLOCK_TYPES as
|
|
1
|
+
import{HERO_GROUP_BLOCK_TYPES as r}from"../../../container-blocks.js";import{BOX_LABEL as e}from"../../../section-catalog.js";import{HERO_GROUP_PLACEMENT_DEFAULT as t}from"../../../../hero-group-placement.js";import{GENERAL_SLOTS as o}from"../slots.js";const n={...o.HeroGroup,content:{...o.HeroGroup.content,allow:r}},u={label:e,inline:!0,fields:n,defaultProps:{placement:t,nudgeX:0,nudgeY:0,content:[]}};export{u as HeroGroupMeta,n as HeroGroupSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FOCAL_DEFAULT as
|
|
1
|
+
import{FOCAL_DEFAULT as r}from"efficient-shell/format";import{DEFAULT_OVERLAY_POSITION as e}from"../../../../sections/hero-overlay.js";import{DEFAULT_TINT as o}from"../../../../content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as t,HERO_FOCUS as i}from"../../../../hero-media-layout.js";import{GENERAL_SLOTS as l}from"../slots.js";const m=l.HeroSingle,T={label:"Hero Single",drawsPictures:!0,fields:m,defaultProps:{mediaType:t.HeroSingle,[i.image]:r,tintColor:o,tintOpacity:0,overlay:100,overlayColor:o,overlayPosition:e}};export{T as HeroSingleMeta,m as HeroSingleSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FOCAL_DEFAULT as
|
|
1
|
+
import{FOCAL_DEFAULT as e}from"efficient-shell/format";import{DEFAULT_TINT as o}from"../../../../content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as r,HERO_FOCUS as i}from"../../../../hero-media-layout.js";import{GENERAL_SLOTS as t}from"../slots.js";const l=t.HeroSlide,E={label:"Hero Slide",fields:l,defaultProps:{mediaType:r.HeroSlide,videoSpeed:100,[i.image]:e,tintColor:o,overlay:0}};export{E as HeroSlideMeta,l as HeroSlideSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{say as o}from"../../../../editor-words.js";const
|
|
1
|
+
import{say as o}from"../../../../editor-words.js";import{GENERAL_SLOTS as t}from"../slots.js";const a={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")}],s=t.Logos,c={label:"Logos",drawsPictures:!0,fields:s,defaultProps:{items:[],contained:!0}};export{a as LOGOS_PH,c as LogosMeta,s as LogosSlots,l as logosScaffoldItems};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{GENERAL_SLOTS as t}from"../slots.js";const o={title:"Order summary",note:"A short reassurance note under the total."},e=t.OrderSummary,a={label:"Order Table",fields:e,defaultProps:{eyebrow:"",title:"",rows:[],subRows:[],totalLabel:"",totalAmount:"",note:"",contained:!0}};export{o as ORDER_SUMMARY_PH,a as OrderSummaryMeta,e as OrderSummarySlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BOX_DARKEN_STYLES as t}from"../../../../content/box-
|
|
1
|
+
import{BOX_DARKEN_STYLES as t}from"../../../../content/box-darken-styles.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,5 +1,5 @@
|
|
|
1
1
|
import type { BlockSeed } from "../../../seed-parts.js";
|
|
2
|
-
export
|
|
2
|
+
export { PROCESS_COLUMNS_SLOT } from "../slots.js";
|
|
3
3
|
export declare const PROCESS_STEPS_SEED_COUNT = 3;
|
|
4
4
|
export declare const processColumnSeed: () => BlockSeed;
|
|
5
5
|
export declare const processColumnSeeds: () => BlockSeed[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as e}from"../../../container-blocks.js";import{headingTextSeed as t}from"../../../text-seeds.js";
|
|
1
|
+
import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as e}from"../../../container-blocks.js";import{headingTextSeed as t}from"../../../text-seeds.js";import{PROCESS_COLUMNS_SLOT as O}from"../slots.js";const p=3,r=()=>({type:o,props:{direction:"column"},slots:{[e]:[{type:"ImageBlock"},{type:o,props:{direction:"column"},slots:{[e]:[{type:"Text",props:t()},{type:"Text"}]}}]}}),m=()=>Array.from({length:p},r);export{O as PROCESS_COLUMNS_SLOT,p as PROCESS_STEPS_SEED_COUNT,r as processColumnSeed,m as processColumnSeeds};
|